W-22203672: add hidden --agent-json flag to agent preview start#405
Open
andresrivas-sf wants to merge 3 commits intomainfrom
Open
W-22203672: add hidden --agent-json flag to agent preview start#405andresrivas-sf wants to merge 3 commits intomainfrom
andresrivas-sf wants to merge 3 commits intomainfrom
Conversation
W-22203672 Adds a hidden --agent-json flag that accepts a file path to a pre-compiled AgentJSON, bypassing the compile step in ScriptAgent. Intended for internal developer testing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
jshackell-sfdc
left a comment
There was a problem hiding this comment.
see my small suggestion.
Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com>
Contributor
|
@andresrivas-sf few comments:
|
| throw new SfError( | ||
| `Failed to read or parse --agent-json file '${filePath}': ${SfError.wrap(error).message}`, | ||
| 'AgentJsonReadError' | ||
| ); |
Contributor
There was a problem hiding this comment.
can you add telemetry logging similar to line 120?
W-22203672 - Apply jshackell's wording suggestion for flag summary - Add dependsOn authoring-bundle to --agent-json flag - Add telemetry for AgentJsonReadError - Add --agent-json flag to interactive agent preview command - Add NUT tests for --agent-json flag Co-Authored-By: Claude Sonnet 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
@W-22203672@
--agent-jsonflag tosf agent preview startaccepting a file path to a pre-compiled AgentJSONScriptAgentviaScriptAgentOptions, skipping the compile steploadAgentJson()helper to keeprun()complexity within lint limitsAgent.init) and error path (invalid JSON throwsAgentJsonReadError)Dependencies
Depends on forcedotcom/agents#271 —
@salesforce/agentsmust be bumped after that merges.Test plan
yarn test:onlypasses (244 tests)sf agent preview start --authoring-bundle MyAgent --simulate-actions --agent-json /path/to/compiled.json --target-org myOrgand confirm session starts without a compile request🤖 Generated with Claude Code