Add studio solution commands, skill, and agents.md#212
Open
Add studio solution commands, skill, and agents.md#212
Conversation
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>
- 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>
1c8999c to
74954e1
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uipath studio solutionfor managing UiPath Maestro solutions (.uis files):pack,unpack,push,pull,list, andpublishutils/api/studio_client.go) for HTTP calls to the Studio Web backend (ExternalSolution and Publish-Requests endpoints)skill/uipath-studio/) with comprehensive references, examples, and utility scripts for agent/solution developmentagents.md— complete CLI reference for coding agents covering all commands, workflows, and patternsNew Commands
uipath studio solution packuipath studio solution unpackuipath studio solution pushuipath studio solution pulluipath studio solution listuipath studio solution publishSkill Contents (64 files)
Test plan
uipath studio solution packcreates valid .uis ZIP from solution directoryuipath studio solution unpackextracts .uis correctlyuipath studio solution pushuploads to Studio Web with multipart/form-datauipath studio solution pulldownloads from Studio Webuipath studio solution listreturns solutions JSONuipath studio solution publishsends POST to Publish-Requestsgo test ./plugin/studio/solution/...for all 30+ unit testsuipath studio packagecommands🤖 Generated with Claude Code