Skip to content

Add studio solution commands, skill, and agents.md#212

Open
Chibionos wants to merge 16 commits intomainfrom
feat/studio-solution-commands
Open

Add studio solution commands, skill, and agents.md#212
Chibionos wants to merge 16 commits intomainfrom
feat/studio-solution-commands

Conversation

@Chibionos
Copy link

Summary

  • 6 new CLI commands under uipath studio solution for managing UiPath Maestro solutions (.uis files): pack, unpack, push, pull, list, and publish
  • Studio Web API client (utils/api/studio_client.go) for HTTP calls to the Studio Web backend (ExternalSolution and Publish-Requests endpoints)
  • Claude Code skill (skill/uipath-studio/) with comprehensive references, examples, and utility scripts for agent/solution development
  • agents.md — complete CLI reference for coding agents covering all commands, workflows, and patterns

New Commands

Command Type Description
uipath studio solution pack Local Pack solution directory into .uis (ZIP)
uipath studio solution unpack Local Extract .uis file into directory
uipath studio solution push API Upload .uis to Studio Web
uipath studio solution pull API Download solution from Studio Web
uipath studio solution list API List solutions in Studio Web
uipath studio solution publish API Publish solution for deployment

Skill Contents (64 files)

  • SKILL.md with 25+ trigger phrases for Claude Code integration
  • 6 reference docs (agent structure, solution structure, tool types, evaluation framework, Studio Web API, CLI architecture)
  • 28 example files (low-code agent, coded agent, solution wrapper)
  • 4 utility scripts (create, pack, unpack, validate)

Test plan

  • Verify uipath studio solution pack creates valid .uis ZIP from solution directory
  • Verify uipath studio solution unpack extracts .uis correctly
  • Verify uipath studio solution push uploads to Studio Web with multipart/form-data
  • Verify uipath studio solution pull downloads from Studio Web
  • Verify uipath studio solution list returns solutions JSON
  • Verify uipath studio solution publish sends POST to Publish-Requests
  • Run go test ./plugin/studio/solution/... for all 30+ unit tests
  • Verify no regressions on existing uipath studio package commands

🤖 Generated with Claude Code

Implement 6 new CLI plugin commands under `uipath studio solution` for
managing UiPath Maestro solutions: pack, unpack, push, pull, list, and
publish. Add a Studio Web API client for HTTP calls to the studio backend.

Include a comprehensive Claude Code skill (SKILL.md with references,
examples, and scripts) for agent/solution development, and an agents.md
coding agent reference documenting all CLI capabilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Chibi Vikram and others added 13 commits March 8, 2026 13:33
- Reduce pack() cyclomatic complexity by extracting shouldSkip/addFileToZip helpers
- Fix gosec G301: use 0750 directory permissions instead of 0755
- Fix gosec G110: use io.LimitReader to prevent decompression bomb
- Fix perfsprint: use errors.New instead of fmt.Errorf for static strings
- Fix usetesting: use t.Chdir() instead of os.Chdir() in tests
- Fix test assertions: check for error existence rather than custom messages
  when CLI framework validates required parameters before Execute runs
- Fix errors.Is(err, nil) to err == nil in readSolutionInfo

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Refactor unpack to use sanitizeArchivePath pattern matching existing
  codebase (plugin/zip_archive.go) to satisfy CodeQL analysis
- Use extractFile helper with io.CopyN and proper defer cleanup
- Add zip-slip protection test verifying path traversal is blocked
- Add test for extracted file content verification
- Add test for unpack default destination
- Add tests for pack readSolutionInfo and file size reporting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Close zip writer and file before os.Stat to ensure all data
is flushed to disk, fixing TestPackReportsFileSize on all platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- List: test multiple solutions returned, test invalid JSON response
- Publish: test 202 Accepted status, test 400 Bad Request error
- Pull: test file size reporting, test 404 Not Found error
- Push: test 201 Created status, test 400 Bad Request error

These tests exercise more error branches in studio_client.go
to improve overall code coverage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover previously untested paths including: studio_client.go progress
reader with large files, nil auth token handling, custom base URI paths,
multipart form writing, and non-JSON response handling. Also covers
pack command .pyc file filtering, invalid SolutionStorage.json, and
unwritable destination. Unpack command gains tests for zip directory
entries, missing/invalid SolutionStorage.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
….URL

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The network HTTP client retries on 500 status codes. With MaxAttempts=0
(the default for empty ExecutionSettings), the retry logic closes the
response body and returns a nil error, causing "read on closed response
body" errors. Setting MaxAttempts=1 matches the intended test behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Pack: test unreadable file (covers addFileToZip error + cleanup path)
  and unreadable SolutionStorage.json (covers readSolutionInfo ReadFile error)
- List: add 400 bad request test (covers StudioClient's own status check)
- StudioClient: fix ListSolutions test to use 400 instead of 500,
  add failing stream test for writeMultipartForm error path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove TestPackWithUnreadableSolutionStorageJson: chmod 0000 causes
  pack's file walk to fail before readSolutionInfo, making the test
  invalid (the error path is unreachable through normal command flow)
- Replace fmt.Errorf with errors.New for static strings (perfsprint)
- Remove unused fmt import

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TestWriteMultipartFormWithClosedWriter: covers CreatePart error path
- TestWriteMultipartFormWithReadError: covers io.Copy error during write
- TestPushSolutionWithFailingStreamCancelsRequest: covers writeMultipartBody
  goroutine error-cancel path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a writer that errors on Write() instead of a closed multipart writer,
since multipart.Writer.CreatePart doesn't check closed state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test parameter type assertion failure and empty value checks by calling
Execute directly, bypassing CLI framework validation. Covers
getStringParameter false branch and source/solutionId empty checks in
unpack, push, pull, and publish commands.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- TestReadSolutionInfoFileNotFound: covers readSolutionInfo os.ReadFile
  error path in pack command
- TestUnpackToReadOnlyDestinationReturnsError: covers extractFile
  os.OpenFile error when destination directory is read-only
- TestUnpackSubdirToReadOnlyDestinationReturnsError: covers extractFile
  os.MkdirAll error when creating subdirectory in read-only destination

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Chibionos Chibionos force-pushed the feat/studio-solution-commands branch from 1c8999c to 74954e1 Compare March 9, 2026 00:25
Chibi Vikram and others added 2 commits March 8, 2026 17:32
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generates a complete UiPath solution with agent project scaffold including:
- SolutionStorage.json and .uipx manifest with coordinated UUIDs
- agent.json with configurable model and system prompt
- entry-points.json, flow-layout.json, project.uiproj
- .agent-builder files (agent.json, bindings.json, entry-points.json)
- Default evaluation set with semantic similarity and trajectory evaluators
- Deployment resources (package and process)

Usage: uipath studio solution create --name MyAgent [--model ...] [--system-prompt ...]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant