@copado/agentia-cli 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -1
- package/README.md +2205 -1530
- package/dist/commands/auth/get.js +21 -1
- package/dist/commands/auth/set.js +13 -0
- package/dist/commands/auth/unset.js +37 -0
- package/dist/commands/cicd/cloud/commit.js +2 -2
- package/dist/commands/cicd/cloud/promote.js +19 -5
- package/dist/commands/cicd/credential/auth/status.js +2 -2
- package/dist/commands/cicd/credential/auth/web/login.js +2 -2
- package/dist/commands/cicd/credential/create.js +2 -2
- package/dist/commands/cicd/credential/list.js +2 -2
- package/dist/commands/cicd/credential/open.js +2 -2
- package/dist/commands/cicd/credential/update.js +2 -2
- package/dist/commands/cicd/data/commit/create.js +2 -2
- package/dist/commands/cicd/data/commit/list.js +2 -2
- package/dist/commands/cicd/data/dataset-file/content.js +2 -2
- package/dist/commands/cicd/data/dataset-file/list.js +2 -2
- package/dist/commands/cicd/data/filter/add.js +2 -2
- package/dist/commands/cicd/data/filter/delete.js +2 -2
- package/dist/commands/cicd/data/filter/list.js +2 -2
- package/dist/commands/cicd/data/filter/update.js +2 -2
- package/dist/commands/cicd/data/formula/create.js +2 -2
- package/dist/commands/cicd/data/formula/list.js +2 -2
- package/dist/commands/cicd/data/formula/update.js +2 -2
- package/dist/commands/cicd/data/records/match.js +2 -2
- package/dist/commands/cicd/data/records/search.js +2 -2
- package/dist/commands/cicd/data/sobject/fields.js +2 -2
- package/dist/commands/cicd/data/sobject/relationships.js +2 -2
- package/dist/commands/cicd/data/sync/apply.js +2 -2
- package/dist/commands/cicd/data/sync/preview-updates.js +2 -2
- package/dist/commands/cicd/data/template/convert-old.js +2 -2
- package/dist/commands/cicd/data/template/create.js +2 -2
- package/dist/commands/cicd/data/template/delete.js +2 -2
- package/dist/commands/cicd/data/template/get-detail.js +2 -2
- package/dist/commands/cicd/data/template/get.js +2 -2
- package/dist/commands/cicd/data/template/list.js +2 -2
- package/dist/commands/cicd/data/template/open.js +2 -2
- package/dist/commands/cicd/data/template/save-detail.js +2 -2
- package/dist/commands/cicd/environment/auth/status.js +2 -2
- package/dist/commands/cicd/environment/auth/web/login.js +2 -2
- package/dist/commands/cicd/environment/create.js +2 -2
- package/dist/commands/cicd/environment/get.js +2 -2
- package/dist/commands/cicd/environment/list.js +2 -2
- package/dist/commands/cicd/environment/open.js +2 -2
- package/dist/commands/cicd/environment/update.js +2 -2
- package/dist/commands/cicd/extension/create.js +2 -2
- package/dist/commands/cicd/extension/install.js +2 -2
- package/dist/commands/cicd/extension/package.js +2 -2
- package/dist/commands/cicd/extension/publish.js +2 -2
- package/dist/commands/cicd/extension/uninstall.js +2 -2
- package/dist/commands/cicd/extension/validate.js +2 -2
- package/dist/commands/cicd/extension-configuration/get.js +2 -2
- package/dist/commands/cicd/extension-configuration/list.js +2 -2
- package/dist/commands/cicd/extension-configuration/open.js +2 -2
- package/dist/commands/cicd/function/defaults.js +2 -2
- package/dist/commands/cicd/function/delete.js +2 -2
- package/dist/commands/cicd/function/get.js +2 -2
- package/dist/commands/cicd/function/list.js +2 -2
- package/dist/commands/cicd/function/open.js +2 -2
- package/dist/commands/cicd/function/result/get.js +2 -2
- package/dist/commands/cicd/function/result/log/get.js +2 -2
- package/dist/commands/cicd/function/run-local.js +2 -2
- package/dist/commands/cicd/function/run.js +2 -2
- package/dist/commands/cicd/function/upsert.js +2 -2
- package/dist/commands/cicd/health-check.js +2 -2
- package/dist/commands/cicd/job/get.js +2 -2
- package/dist/commands/cicd/job/kill.js +2 -2
- package/dist/commands/cicd/job/list.js +2 -2
- package/dist/commands/cicd/job/log/get.js +2 -2
- package/dist/commands/cicd/job/open.js +2 -2
- package/dist/commands/cicd/job/pause.js +2 -2
- package/dist/commands/cicd/job/result-file/get.js +2 -2
- package/dist/commands/cicd/job/result-file/list.js +2 -2
- package/dist/commands/cicd/job/resume.js +2 -2
- package/dist/commands/cicd/job/run.js +2 -2
- package/dist/commands/cicd/metadata/content/compare.js +2 -2
- package/dist/commands/cicd/metadata/content/get.js +2 -2
- package/dist/commands/cicd/metadata/dependency/list.js +44 -21
- package/dist/commands/cicd/metadata/explore.js +2 -2
- package/dist/commands/cicd/metadata/index/compare.js +2 -2
- package/dist/commands/cicd/metadata/list.js +2 -2
- package/dist/commands/cicd/metadata/refresh/deleted.js +2 -2
- package/dist/commands/cicd/metadata/refresh/run.js +2 -2
- package/dist/commands/cicd/metadata/refresh/status.js +2 -2
- package/dist/commands/cicd/notification/configure.js +2 -2
- package/dist/commands/cicd/notification/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +2 -2
- package/dist/commands/cicd/pipeline/automation/create.js +2 -2
- package/dist/commands/cicd/pipeline/automation/deactivate.js +2 -2
- package/dist/commands/cicd/pipeline/automation/delete.js +2 -2
- package/dist/commands/cicd/pipeline/automation/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/list.js +2 -2
- package/dist/commands/cicd/pipeline/automation/open.js +2 -2
- package/dist/commands/cicd/pipeline/automation/update.js +2 -2
- package/dist/commands/cicd/pipeline/connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/create.js +2 -2
- package/dist/commands/cicd/pipeline/get.js +2 -2
- package/dist/commands/cicd/pipeline/list.js +2 -2
- package/dist/commands/cicd/pipeline/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/create.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/get.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/list.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/update.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/update.js +2 -2
- package/dist/commands/cicd/project/create.js +2 -2
- package/dist/commands/cicd/project/default/get.js +2 -2
- package/dist/commands/cicd/project/default/set.js +2 -2
- package/dist/commands/cicd/project/default/unset.js +2 -2
- package/dist/commands/cicd/project/delete.js +2 -2
- package/dist/commands/cicd/project/get.js +2 -2
- package/dist/commands/cicd/project/list.js +2 -2
- package/dist/commands/cicd/project/open.js +2 -2
- package/dist/commands/cicd/project/update.js +2 -2
- package/dist/commands/cicd/promotion/conflict/get.js +2 -2
- package/dist/commands/cicd/promotion/conflict/list.js +2 -2
- package/dist/commands/cicd/promotion/conflict/resolve.js +2 -2
- package/dist/commands/cicd/promotion/conflict/unresolve.js +2 -2
- package/dist/commands/cicd/promotion/get.js +2 -2
- package/dist/commands/cicd/promotion/job-step/update.js +2 -2
- package/dist/commands/cicd/promotion/list.js +2 -2
- package/dist/commands/cicd/promotion/open.js +2 -2
- package/dist/commands/cicd/promotion/queue/list.js +28 -0
- package/dist/commands/cicd/promotion/queue/remove.js +37 -0
- package/dist/commands/cicd/promotion/run.js +2 -2
- package/dist/commands/cicd/repository/auth/https/configure.js +2 -2
- package/dist/commands/cicd/repository/auth/oauth/login.js +2 -2
- package/dist/commands/cicd/repository/auth/setup.js +2 -2
- package/dist/commands/cicd/repository/auth/ssh/configure.js +2 -2
- package/dist/commands/cicd/repository/create.js +2 -2
- package/dist/commands/cicd/repository/delete.js +2 -2
- package/dist/commands/cicd/repository/get.js +2 -2
- package/dist/commands/cicd/repository/list.js +2 -2
- package/dist/commands/cicd/repository/open.js +2 -2
- package/dist/commands/cicd/repository/reset.js +2 -2
- package/dist/commands/cicd/repository/update.js +2 -2
- package/dist/commands/cicd/repository/validate.js +2 -2
- package/dist/commands/cicd/stage/create.js +2 -2
- package/dist/commands/cicd/stage/delete.js +2 -2
- package/dist/commands/cicd/stage/get.js +2 -2
- package/dist/commands/cicd/stage/list.js +2 -2
- package/dist/commands/cicd/stage/open.js +2 -2
- package/dist/commands/cicd/stage/update.js +2 -2
- package/dist/commands/cicd/template/defaults.js +2 -2
- package/dist/commands/cicd/template/delete.js +2 -2
- package/dist/commands/cicd/template/get.js +2 -2
- package/dist/commands/cicd/template/list.js +2 -2
- package/dist/commands/cicd/template/upsert.js +2 -2
- package/dist/commands/cicd/user/get.js +2 -2
- package/dist/commands/cicd/work/ahead-behind.js +2 -2
- package/dist/commands/cicd/work/create.js +2 -2
- package/dist/commands/cicd/work/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/create.js +2 -2
- package/dist/commands/cicd/work/deployment-step/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/list.js +2 -2
- package/dist/commands/cicd/work/deployment-step/reorder.js +2 -2
- package/dist/commands/cicd/work/deployment-step/salesforce-flows.js +2 -2
- package/dist/commands/cicd/work/deployment-step/types.js +2 -2
- package/dist/commands/cicd/work/deployment-step/update.js +2 -2
- package/dist/commands/cicd/work/done.js +2 -2
- package/dist/commands/cicd/work/environment-sync.js +2 -2
- package/dist/commands/cicd/work/get.js +2 -2
- package/dist/commands/cicd/work/list.js +2 -2
- package/dist/commands/cicd/work/open.js +2 -2
- package/dist/commands/cicd/work/promote.js +2 -2
- package/dist/commands/cicd/work/publish.js +2 -2
- package/dist/commands/cicd/work/push.js +2 -2
- package/dist/commands/cicd/work/set.js +2 -2
- package/dist/commands/cicd/work/status.js +2 -2
- package/dist/commands/cicd/work/submit.js +2 -2
- package/dist/commands/cicd/work/test/apex.js +2 -2
- package/dist/commands/cicd/work/test.js +2 -2
- package/dist/commands/cicd/work/update.js +2 -2
- package/dist/commands/help-agent.js +15 -0
- package/dist/commands/help.js +38 -0
- package/dist/commands/history/clear.js +42 -0
- package/dist/commands/history/list.js +50 -0
- package/dist/commands/support.js +15 -0
- package/dist/commands/testing/browser/execute.js +49 -0
- package/dist/commands/testing/browser/history.js +49 -0
- package/dist/commands/testing/browser/inspect.js +35 -0
- package/dist/commands/testing/browser/recorder.js +52 -0
- package/dist/commands/testing/browser/reports.js +33 -0
- package/dist/commands/testing/browser/screenshot.js +27 -0
- package/dist/commands/testing/browser/set-options.js +35 -0
- package/dist/commands/testing/browser/start.js +51 -0
- package/dist/commands/testing/browser/status.js +26 -0
- package/dist/commands/testing/browser/stop.js +34 -0
- package/dist/commands/testing/browser/view.js +35 -0
- package/dist/commands/testing/job/runs/abort.js +1 -1
- package/dist/commands/testing/job/runs/get.js +1 -1
- package/dist/commands/testing/job/runs/list.js +1 -1
- package/dist/commands/testing/job/runs/logs.js +1 -1
- package/dist/commands/testing/job/runs/search.js +1 -1
- package/dist/hooks/init/cicd-connection.js +59 -0
- package/dist/lib/agentia-command.js +69 -6
- package/dist/lib/cicd-command.js +3 -0
- package/dist/lib/cicd-connection.js +22 -0
- package/dist/lib/cicd-gateway.js +2 -1
- package/dist/lib/command-history-sanitization.js +9 -0
- package/dist/lib/command-history.js +11 -0
- package/dist/lib/command-output-buffer.js +6 -1
- package/dist/lib/defaults-store.js +3 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/help-agent-command.js +3 -0
- package/dist/lib/help-agent-interaction-history.js +10 -0
- package/dist/lib/help-agent-session.js +3 -0
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +3 -2
- package/dist/lib/mcp/testing-browser-tools.js +194 -0
- package/dist/lib/mcp/testing-tools.js +4 -3
- package/dist/lib/mcp/tool-annotations.js +32 -12
- package/dist/lib/mcp/tools.js +88 -37
- package/dist/lib/promotion-queue.js +5 -0
- package/dist/lib/promotion-run.js +2 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/support-ai-context.js +11 -0
- package/dist/lib/support-ai-stream-parser.js +4 -0
- package/dist/lib/support-ai.js +9 -0
- package/dist/lib/testing-browser-command.js +6 -0
- package/dist/lib/testing-browser-operations.js +17 -0
- package/dist/lib/testing-browser-requests.js +11 -0
- package/dist/lib/testing-browser-robot.js +9 -0
- package/dist/lib/testing-browser-session.js +14 -0
- package/dist/lib/testing-browser-state.js +17 -0
- package/dist/lib/testing-browser-stream.js +7 -0
- package/dist/lib/testing-browser-types.js +3 -0
- package/dist/lib/testing-browser-viewer-key.js +7 -0
- package/dist/lib/testing-gateway.js +2 -1
- package/dist/lib/testing-operations.js +21 -1
- package/dist/lib/testing-sanitization.js +2 -1
- package/dist/lib/work-promote.js +2 -1
- package/oclif.manifest.json +3108 -1450
- package/package.json +11 -4
- package/templates/skills/agentia-ai/SKILL.md +6 -2
- package/templates/skills/agentia-ai/references/ai-agents.md +19 -1
- package/templates/skills/agentia-cicd/SKILL.md +2 -2
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +16 -0
- package/templates/skills/agentia-cicd/references/promotions.md +10 -1
- package/templates/skills/agentia-metadata/SKILL.md +9 -3
- package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +8 -4
- package/templates/skills/agentia-testing/SKILL.md +9 -4
- package/templates/skills/agentia-testing/references/browser-testing.md +93 -0
- package/templates/skills/agentia-testing/references/flow-automation.md +112 -0
- package/templates/skills/agentia-testing/references/qforce.md +88 -0
- package/templates/skills/agentia-testing/references/qweb.md +103 -0
- package/templates/skills/agentia-testing/references/tests.md +17 -9
- package/dist/commands/testing/live/continue.js +0 -16
- package/dist/commands/testing/live/execute.js +0 -43
- package/dist/commands/testing/live/history.js +0 -40
- package/dist/commands/testing/live/inspect.js +0 -31
- package/dist/commands/testing/live/interrupt.js +0 -16
- package/dist/commands/testing/live/recorder.js +0 -42
- package/dist/commands/testing/live/reports.js +0 -31
- package/dist/commands/testing/live/screenshot.js +0 -25
- package/dist/commands/testing/live/set-options.js +0 -35
- package/dist/commands/testing/live/start.js +0 -58
- package/dist/commands/testing/live/status.js +0 -24
- package/dist/commands/testing/live/stop.js +0 -36
- package/dist/commands/testing/live/view.js +0 -36
- package/dist/lib/mcp/testing-live-tools.js +0 -226
- package/dist/lib/testing-live-command.js +0 -8
- package/dist/lib/testing-live-operations.js +0 -25
- package/dist/lib/testing-live-recorder.js +0 -11
- package/dist/lib/testing-live-robot.js +0 -9
- package/dist/lib/testing-live-state.js +0 -12
- package/dist/lib/testing-live-types.js +0 -3
package/package.json
CHANGED
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
"init": [
|
|
70
70
|
"./dist/hooks/init/version-warning",
|
|
71
71
|
"./dist/hooks/init/migrate-user-config",
|
|
72
|
-
"./dist/hooks/init/plugin-host"
|
|
72
|
+
"./dist/hooks/init/plugin-host",
|
|
73
|
+
"./dist/hooks/init/cicd-connection"
|
|
73
74
|
]
|
|
74
75
|
},
|
|
75
76
|
"plugins": [
|
|
@@ -97,6 +98,9 @@
|
|
|
97
98
|
"auth": {
|
|
98
99
|
"description": "Manage authentication credentials"
|
|
99
100
|
},
|
|
101
|
+
"history": {
|
|
102
|
+
"description": "Inspect temporary local command history"
|
|
103
|
+
},
|
|
100
104
|
"adv": {
|
|
101
105
|
"description": "Manage Copado Pipelines Advanced deployments"
|
|
102
106
|
},
|
|
@@ -217,6 +221,9 @@
|
|
|
217
221
|
"cicd:promotion:job-step": {
|
|
218
222
|
"description": "Manage Copado promotion job steps"
|
|
219
223
|
},
|
|
224
|
+
"cicd:promotion:queue": {
|
|
225
|
+
"description": "Inspect and clear the promotion job queue"
|
|
226
|
+
},
|
|
220
227
|
"cicd:notification": {
|
|
221
228
|
"description": "Configure Copado notification subscriptions"
|
|
222
229
|
},
|
|
@@ -247,8 +254,8 @@
|
|
|
247
254
|
"testing:job:schedule": {
|
|
248
255
|
"description": "Manage the schedule for a Copado Robotic Testing job"
|
|
249
256
|
},
|
|
250
|
-
"testing:
|
|
251
|
-
"description": "Manage Copado Robotic Testing
|
|
257
|
+
"testing:browser": {
|
|
258
|
+
"description": "Manage Copado Robotic Testing browser sessions"
|
|
252
259
|
},
|
|
253
260
|
"testing:project": {
|
|
254
261
|
"description": "Manage Copado Robotic Testing projects"
|
|
@@ -268,7 +275,7 @@
|
|
|
268
275
|
}
|
|
269
276
|
},
|
|
270
277
|
"type": "module",
|
|
271
|
-
"version": "1.
|
|
278
|
+
"version": "1.3.0",
|
|
272
279
|
"x-agentia-protected-build": true,
|
|
273
280
|
"x-agentia-protected-files": [
|
|
274
281
|
"dist/lib/runtime.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentia-ai
|
|
3
|
-
description: Use this skill when prompting Copado AI agents through the Agentia CLI or MCP, including `agentia ai agent ask`, `agentia ai agent chat`, Plan, Build, Test, Release, Operate, Knowledge, workspace, dialogue, user story, Salesforce org, and component context.
|
|
3
|
+
description: Use this skill when prompting Copado AI agents or using interactive in-app support through the Agentia CLI or MCP, including `agentia help-agent`, `agentia ai agent ask`, `agentia ai agent chat`, Plan, Build, Test, Release, Operate, Knowledge, workspace, dialogue, user story, Salesforce org, and component context.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Agentia managed skill file: agentia setup skills -->
|
|
@@ -11,9 +11,11 @@ Use this skill to ask Copado AI agents through Agentia with the right agent sele
|
|
|
11
11
|
|
|
12
12
|
Prefer the `agentia_ai_ask` MCP tool when it is available for single-turn prompts. Use CLI examples as the fallback. Use `agentia ai agent chat` only for interactive terminal sessions.
|
|
13
13
|
|
|
14
|
+
Use `agentia help-agent` when a person wants interactive Copado product support. It opens without an eager CICD credential preflight, obtains fresh short-lived access per turn, and writes response deltas immediately. Each turn refreshes bounded local context, including dominant CLI/IDE/MCP usage; follow-ups include a bounded redacted digest of successful prior messages. Successful turn pairs are retained separately for at most 24 hours but never restored into a later chat. Use `agentia history list` to inspect sanitized command outcomes or `agentia history clear --yes` to remove command and Help Agent interaction history.
|
|
15
|
+
|
|
14
16
|
## Start Here
|
|
15
17
|
|
|
16
|
-
1.
|
|
18
|
+
1. For `ai agent` and workspace commands, confirm AI auth with `agentia auth get --ai --json`. Configure missing credentials with `agentia auth set --ai ...` or the supported `AGENTIA_AI_*` environment variables. For `help-agent`, confirm CICD auth with `agentia auth get --cicd --json`.
|
|
17
19
|
2. Omit `--agent` by default: `ask` and `chat` use `orchestrate`, which routes work to the right specialist. Pass `--agent plan`, `build`, `test`, `release`, `operate`, or `knowledge` only to target a specialist explicitly.
|
|
18
20
|
3. Add useful context flags when available: `--workspace`, `--dialogue`, `--user-story`, `--sf-org`, and `--component`.
|
|
19
21
|
4. Use `--json` for automation. Use `--no-stream` when the caller needs a buffered response.
|
|
@@ -28,6 +30,8 @@ Prefer the `agentia_ai_ask` MCP tool when it is available for single-turn prompt
|
|
|
28
30
|
- Use the Knowledge agent for Copado AI Knowledge grounding and product questions.
|
|
29
31
|
- Use the Plan, Build, Test, Release, and Operate agents according to the lifecycle intent.
|
|
30
32
|
- Do not paste PATs or secrets into prompts.
|
|
33
|
+
- Use `help-agent` only in an interactive terminal; it has no JSON or MCP mode.
|
|
34
|
+
- Treat history as temporary diagnostic context, not an audit log. CLI/IDE command rows can contain sanitized parameters, structured results, and bounded output tails; MCP rows contain metadata only. Successful Help Agent turn pairs are redacted, bounded, and retained separately for up to 24 hours. Raw User-Agent values, secrets, full paths, conversation IDs, and HMACs are excluded.
|
|
31
35
|
|
|
32
36
|
## Report Back
|
|
33
37
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# AI Agents Reference
|
|
4
4
|
|
|
5
|
-
Use this reference for `agentia ai agent ask`, `agentia ai agent chat`, and the matching `agentia_ai_ask` MCP tool.
|
|
5
|
+
Use this reference for `agentia help-agent`, `agentia ai agent ask`, `agentia ai agent chat`, and the matching `agentia_ai_ask` MCP tool.
|
|
6
6
|
|
|
7
7
|
## Authentication And Context
|
|
8
8
|
|
|
@@ -52,6 +52,22 @@ agentia ai agent chat --agent orchestrate --workspace <workspace-id>
|
|
|
52
52
|
|
|
53
53
|
Chat creates or reuses one dialogue for the session and supports session slash commands. It is not suitable for headless JSON workflows.
|
|
54
54
|
|
|
55
|
+
## Interactive Product Support
|
|
56
|
+
|
|
57
|
+
Use the experimental Help Agent for Copado product questions when a human is present:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
agentia help-agent
|
|
61
|
+
agentia support
|
|
62
|
+
agentia help --agent
|
|
63
|
+
agentia history list --limit 10
|
|
64
|
+
agentia history clear --yes
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
All three Help Agent entry points share the same behavior. They open without a CICD user or credential preflight and do not use the separately configured AI PAT. Every request identifies the assistant as a concise Copado expert on Agentia Headless and Copado tools for developers working locally. The system prompt uses retained history to identify dominant CLI/IDE/MCP usage and asks one brief question when tooling or a local-versus-cloud operations flow is unclear. Each turn requests a fresh short-lived HMAC and refreshes CLI version, platform, architecture, workspace basename, normalized current origin, aggregate tool counts, and the three newest sanitized command summaries. Follow-up turns include a deterministic redacted digest of at most six successful prior messages. SSE response deltas render immediately. `/help`, `/clear`, and `/exit` are supported; `/clear` resets the conversation identifier and in-memory digest.
|
|
68
|
+
|
|
69
|
+
The `history` commands inspect up to 100 sanitized command summaries and clear all temporary history. CLI/IDE rows can contain sanitized parameters, a redacted structured result, and ordered 20 KiB stdout/stderr tails. MCP rows contain only command ID, timing, outcome, CLI version, workspace basename, and `mcp` origin—never arguments, output, results, or errors. Successful Help Agent turn pairs are separately redacted, capped at 4 KiB per message, and retained in private storage for at most 24 hours/100 pairs; they are not restored into later chats. `history clear --yes` deletes both stores. Help Agent has no JSON or MCP mode. Never paste credentials or tokens into prompts.
|
|
70
|
+
|
|
55
71
|
## Workspace And Quota Helpers
|
|
56
72
|
|
|
57
73
|
Use these adjacent commands when the prompt workflow needs context setup:
|
|
@@ -68,3 +84,5 @@ Use these adjacent commands when the prompt workflow needs context setup:
|
|
|
68
84
|
- `--user-story`, `--sf-org`, and `--component` enrich prompt context but do not replace a clear prompt.
|
|
69
85
|
- Streaming is human-friendly. For tools, CI, or follow-up parsing, use `--json` and consider `--no-stream`.
|
|
70
86
|
- `chat` has no MCP equivalent and should not be used in non-interactive shells.
|
|
87
|
+
- `help-agent` requires CICD authentication and a CICD environment where Support AI authentication is enabled.
|
|
88
|
+
- Temporary command history is diagnostic context, not a durable audit log; the operating system may remove it.
|
|
@@ -13,7 +13,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
13
13
|
|
|
14
14
|
## Start Here
|
|
15
15
|
|
|
16
|
-
1. Confirm `agentia auth get --cicd --json` is configured, or that the current process supplies `AGENTIA_CICD_API_KEY` and `AGENTIA_CICD_BASE_URL`.
|
|
16
|
+
1. Confirm `agentia auth get --cicd --json` is configured, or that the current process supplies `AGENTIA_CICD_API_KEY` and `AGENTIA_CICD_BASE_URL`. For sandbox function/template/extension work against a different Copado org, use a named connection (`auth set --connection`) plus `--cicd-connection` / MCP `cicdConnection` instead of swapping the default key.
|
|
17
17
|
2. Identify the domain below and read only the matching reference file.
|
|
18
18
|
3. Before mutating data, read the target record first with the matching `get`, `list`, or `status` command.
|
|
19
19
|
4. Never print credentials, PATs, OAuth signatures, or unmasked environment variables.
|
|
@@ -31,7 +31,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
31
31
|
- Slack notification subscriptions on a pipeline (`agentia_notification_configure` / CLI): [references/notifications.md](references/notifications.md)
|
|
32
32
|
- Release data templates, records, matching, sync, dataset files, and data commits: [references/data.md](references/data.md)
|
|
33
33
|
|
|
34
|
-
For **Org Intelligence** (read Salesforce metadata against a sandbox/developer org credential; prefer local files first, then the org; metadata only—not data, not edits), use the separate skill `agentia-metadata/SKILL.md` (`cicd metadata explore` / MCP `agentia_metadata_explore`).
|
|
34
|
+
For **Org Intelligence** (read Salesforce metadata against a sandbox/developer org credential; prefer local files first, then the org; metadata only—not data, not edits), use the separate skill `agentia-metadata/SKILL.md` (`cicd metadata explore` / MCP `agentia_metadata_explore`). For the **Copado dependency graph**—including local DX `--path` and story/project-default context—use the same skill’s [metadata-dependency](../agentia-metadata/references/metadata-dependency.md) reference (`cicd metadata dependency list` / MCP `agentia_metadata_dependency_list`).
|
|
35
35
|
|
|
36
36
|
## General Rules
|
|
37
37
|
|
|
@@ -6,6 +6,22 @@ Use this reference for `agentia cicd environment ...`, `agentia cicd environment
|
|
|
6
6
|
|
|
7
7
|
`auth set --cicd` stores the API key used by the CLI. `cicd credential` lists, creates, updates, opens, or authenticates Copado environment credential records. They are different credential types.
|
|
8
8
|
|
|
9
|
+
## Named CICD Connections
|
|
10
|
+
|
|
11
|
+
Use a named connection when story lifecycle should stay on the default/production Copado org while function, template, or extension work targets a sandbox.
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
agentia auth set --cicd "$SANDBOX_KEY" --custom-url https://test.api.copado.com --connection sandbox --kind sandbox
|
|
15
|
+
agentia cicd function upsert MyFn --file ./fn.json --cicd-connection sandbox
|
|
16
|
+
agentia auth get --cicd --json
|
|
17
|
+
agentia auth unset --connection sandbox --yes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `--cicd-connection <name>` is available only on `agentia cicd ...` commands (and MCP `cicdConnection` on CICD tools). It does not appear on `ai`, `adv`, `testing`, or `auth`.
|
|
21
|
+
- `AGENTIA_CICD_CONNECTION=<name>` sets a session default for `cicd` commands without changing keychain storage.
|
|
22
|
+
- Do not combine a named connection with `AGENTIA_CICD_API_KEY` / `AGENTIA_CICD_BASE_URL`; the CLI errors instead of silently picking one.
|
|
23
|
+
- Connections tagged `--kind production` require confirmation (CLI TTY), `--yes`, or `AGENTIA_CICD_ALLOW_PRODUCTION=true` (required for MCP).
|
|
24
|
+
|
|
9
25
|
## Environment Commands
|
|
10
26
|
|
|
11
27
|
| Command | Use For | Notes |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# CICD Promotions Reference
|
|
4
4
|
|
|
5
|
-
Use this reference for `agentia cicd promotion ...`, `agentia cicd promotion conflict ...`, and `agentia cicd cloud promote`.
|
|
5
|
+
Use this reference for `agentia cicd promotion ...`, `agentia cicd promotion conflict ...`, `agentia cicd promotion queue ...`, and `agentia cicd cloud promote`.
|
|
6
6
|
|
|
7
7
|
## Entry Points
|
|
8
8
|
|
|
@@ -50,6 +50,15 @@ Use `--resume <job-execution-id>` to resume the original execution after conflic
|
|
|
50
50
|
|
|
51
51
|
Read conflict content before manual resolution. Do not invent resolved content; use the user's reviewed file or ask for confirmation.
|
|
52
52
|
|
|
53
|
+
## Queue Commands
|
|
54
|
+
|
|
55
|
+
| Command | Use For |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `promotion queue list <promotion-id>` | Show the job queue holding the promotion's destination (status, step, owner, whether the user can manage the queue). |
|
|
58
|
+
| `promotion queue remove <promotion-id> --item <queue-item-id> --yes` | Remove queued items; needs the Manage Queue permission. Repeat `--item` for several. |
|
|
59
|
+
|
|
60
|
+
List first and take item IDs from the output. Removal is destructive: confirm the item with the user. A conflict error means the queue changed since the read; list again. MCP: `agentia_promotion_queue_list`, `agentia_promotion_queue_remove` (`itemIds`).
|
|
61
|
+
|
|
53
62
|
## Gotchas
|
|
54
63
|
|
|
55
64
|
- Promotion IDs are not User Story IDs. Use `cloud promote` if you only have the story.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentia-metadata
|
|
3
|
-
description: Org Intelligence — read Salesforce metadata in a sandbox or developer org through Agentia `cicd metadata explore` (and MCP `agentia_metadata_explore`). Use when listing or searching metadata names, reading items by API name, finding where a class/field/etc is referenced, describing types, reading type documentation, or running specified Apex tests. Prefer local project files first, then the org. Reads metadata only (not org data); does not edit or deploy metadata.
|
|
3
|
+
description: Org Intelligence — read Salesforce metadata in a sandbox or developer org through Agentia `cicd metadata explore` (and MCP `agentia_metadata_explore`). Use when listing or searching metadata names, reading items by API name, finding where a class/field/etc is referenced, describing types, reading type documentation, or running specified Apex tests. Also covers Copado `cicd metadata dependency list` (MCP `agentia_metadata_dependency_list`), including `--path` for local DX files. Prefer local project files first, then the org. Reads metadata only (not org data); does not edit or deploy metadata.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Agentia managed skill file: agentia setup skills -->
|
|
@@ -45,14 +45,17 @@ local when reconciling differences unless the user asks for the org version.
|
|
|
45
45
|
| List metadata names that match a pattern | `list` |
|
|
46
46
|
| Search source (Apex Page/Class/Trigger/Component only) | `search` |
|
|
47
47
|
| Retrieve one item by API name | `read` |
|
|
48
|
-
| Find where a class/field/etc is used or called | `find_references` |
|
|
48
|
+
| Find where a class/field/etc is used or called (org) | `find_references` |
|
|
49
|
+
| Copado dependency graph (pipeline/org; local DX `--path`) | `cicd metadata dependency list` |
|
|
49
50
|
| Describe a metadata type shape | `describe_type` |
|
|
50
51
|
| Get type documentation from the tool | `read_documentation` |
|
|
51
52
|
| Run specific Apex test classes | `run_apex_tests` |
|
|
52
53
|
|
|
53
54
|
Use `list` / `search` to discover exact names before `read` or
|
|
54
55
|
`find_references`. Pass type + name for references. Confirm with the user
|
|
55
|
-
before `run_apex_tests`.
|
|
56
|
+
before `run_apex_tests`. For Copado uses/dependants from a local DX file,
|
|
57
|
+
prefer `cicd metadata dependency list --path` (see dependency reference)—do
|
|
58
|
+
not invent type/name when a path is available.
|
|
56
59
|
|
|
57
60
|
## Org And Scope
|
|
58
61
|
|
|
@@ -133,6 +136,9 @@ When helping the user design or draft Salesforce metadata (local edits only):
|
|
|
133
136
|
Flags, MCP args, examples, and gotchas:
|
|
134
137
|
[references/metadata-explore.md](references/metadata-explore.md)
|
|
135
138
|
|
|
139
|
+
Copado dependency graph (`--path`, context defaults, human table):
|
|
140
|
+
[references/metadata-dependency.md](references/metadata-dependency.md)
|
|
141
|
+
|
|
136
142
|
## Report Back
|
|
137
143
|
|
|
138
144
|
Report actions run, object type / fullName / pattern, credential Id (never
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
2
|
+
|
|
3
|
+
# Copado Metadata Dependency List
|
|
4
|
+
|
|
5
|
+
Use `agentia cicd metadata dependency list` (MCP `agentia_metadata_dependency_list`)
|
|
6
|
+
for the **Copado CICD dependency graph** against pipeline/org context—not Org
|
|
7
|
+
Intelligence `find_references` (org Metadata API references).
|
|
8
|
+
|
|
9
|
+
Prefer this when the caller has local Salesforce DX source paths (for example
|
|
10
|
+
IDEX) or already knows metadata type/name and needs uses / dependants from
|
|
11
|
+
Copado.
|
|
12
|
+
|
|
13
|
+
## Choose An Input Mode
|
|
14
|
+
|
|
15
|
+
Use **only one**:
|
|
16
|
+
|
|
17
|
+
| Mode | When |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `--path` / MCP `path` | Local DX file path(s). Resolves type/name via existing SDR helpers. |
|
|
20
|
+
| `--metadata-name` + `--metadata-type` | Explicit selection. |
|
|
21
|
+
| `--from-changes` | Committed branch diff + staged index (not unstaged). |
|
|
22
|
+
| `--file` / `--stdin` | Full JSON dependency request body. |
|
|
23
|
+
|
|
24
|
+
Do not invent a second path mapper—`--path` reuses the same resolvers as
|
|
25
|
+
`--from-changes`. Unresolvable paths fail with a clear error and do not call
|
|
26
|
+
the gateway.
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
agentia cicd metadata dependency list \
|
|
30
|
+
--path force-app/main/default/classes/MyClass.cls \
|
|
31
|
+
--target-org-id <id> \
|
|
32
|
+
--retrieve-mode all \
|
|
33
|
+
--json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
MCP accepts `path` as a string or string array. Mutually exclusive with
|
|
37
|
+
`metadataName` / `metadataType`.
|
|
38
|
+
|
|
39
|
+
## Context Defaults
|
|
40
|
+
|
|
41
|
+
When omitted, these resolve from the **active work item**, then **project
|
|
42
|
+
defaults**:
|
|
43
|
+
|
|
44
|
+
- `--pipeline-id` / `pipelineId`
|
|
45
|
+
- `--source-credential-id` / `sourceCredentialId`
|
|
46
|
+
- `--source-org-id` / `sourceOrgId`
|
|
47
|
+
- `--platform-experience` / `platformExperience` (from story `platform`, else
|
|
48
|
+
`sfdx`)
|
|
49
|
+
|
|
50
|
+
`--target-org-id` / `targetOrgId` is **never** inferred—pass it when compare
|
|
51
|
+
status is needed.
|
|
52
|
+
|
|
53
|
+
Explicit flags always win.
|
|
54
|
+
|
|
55
|
+
## Output
|
|
56
|
+
|
|
57
|
+
- **`--json` / MCP:** gateway `DependencyResult` (including enriched
|
|
58
|
+
`localPaths` for `--path` / `--from-changes` when resolvable).
|
|
59
|
+
- **Human table columns:** `PARENT` (evaluated metadata), `RELATION`
|
|
60
|
+
(`used by` from `u`, `dependant` from `d`), `NAME`, `TYPE`, and `STATUS`
|
|
61
|
+
from gateway `s`. The STATUS column is omitted when `s` is absent (typical
|
|
62
|
+
without a target org).
|
|
63
|
+
|
|
64
|
+
## Vs Org Intelligence
|
|
65
|
+
|
|
66
|
+
| Need | Command |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Org Metadata API references | `cicd metadata explore --action find_references` |
|
|
69
|
+
| Copado dependency graph (pipeline/org compare) | `cicd metadata dependency list` |
|
|
70
|
+
| Local DX path → dependency graph | `cicd metadata dependency list --path …` |
|
|
@@ -107,9 +107,13 @@ agentia cicd metadata explore --action read --object-type ApexClass --full-name
|
|
|
107
107
|
|
|
108
108
|
### `find_references`
|
|
109
109
|
|
|
110
|
-
Partial reference
|
|
111
|
-
Requires `--object-type` and `--full-name
|
|
112
|
-
|
|
110
|
+
Partial **org** reference lookup: metadata that uses or calls a given item via
|
|
111
|
+
the Metadata API tool. Requires `--object-type` and `--full-name`. Coverage may
|
|
112
|
+
be incomplete—treat results as a starting point.
|
|
113
|
+
|
|
114
|
+
For the **Copado CICD dependency graph** (including local DX `--path`), use
|
|
115
|
+
`cicd metadata dependency list` instead—see
|
|
116
|
+
[metadata-dependency.md](metadata-dependency.md).
|
|
113
117
|
|
|
114
118
|
```sh
|
|
115
119
|
agentia cicd metadata explore --action find_references --object-type ApexClass --full-name MyClass --json
|
|
@@ -139,4 +143,4 @@ agentia cicd metadata explore --action run_apex_tests --apex-unit-tests MyClassT
|
|
|
139
143
|
| Copado metadata index search | `cicd metadata list` |
|
|
140
144
|
| Indexed/Git content blobs | `cicd metadata content get` |
|
|
141
145
|
| Org/Git content diff | `cicd metadata content compare` |
|
|
142
|
-
| Copado dependency graph | `cicd metadata dependency list` |
|
|
146
|
+
| Copado dependency graph (local DX `--path`, story/defaults context) | `cicd metadata dependency list` — [metadata-dependency.md](metadata-dependency.md) |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agentia-testing
|
|
3
|
-
description: Use this skill when creating, updating, running, inspecting, or troubleshooting Copado Robotic Testing with the Agentia CLI, including projects, permissions, robots, jobs, builds, schedules, data tables, variables, user parameters,
|
|
3
|
+
description: Use this skill when creating, updating, running, inspecting, or troubleshooting Copado Robotic Testing with the Agentia CLI, including projects, permissions, robots, jobs, builds, schedules, data tables, variables, user parameters, browser testing, Git-backed storage, and Robot Framework execution.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Agentia managed skill file: agentia setup skills -->
|
|
7
7
|
|
|
8
8
|
# Agentia Testing
|
|
9
9
|
|
|
10
|
-
Use this skill to operate Copado Robotic Testing through Agentia without confusing CRT resources, executions,
|
|
10
|
+
Use this skill to operate Copado Robotic Testing through Agentia without confusing CRT resources, executions, browser sessions, and Copado CICD records.
|
|
11
11
|
|
|
12
12
|
Prefer Agentia MCP tools when they are available and match the task. Use CLI examples as the fallback, and add `--json` whenever the result will be parsed or reused.
|
|
13
13
|
|
|
@@ -20,7 +20,11 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
20
20
|
|
|
21
21
|
## Reference
|
|
22
22
|
|
|
23
|
-
- CRT lifecycle, execution, schedules, data tables,
|
|
23
|
+
- CRT lifecycle, execution, schedules, data tables, browser testing, and safety rules: [references/tests.md](references/tests.md)
|
|
24
|
+
- Browser session lifecycle, parallel recorder subagent workflow, 600s idle keepalive, and troubleshooting: [references/browser-testing.md](references/browser-testing.md)
|
|
25
|
+
- Goal-driven browser-testing automation loop (Observe -> Act -> Verify -> Recover), screenshot detection overlays, and script export: [references/flow-automation.md](references/flow-automation.md)
|
|
26
|
+
- QWeb Robot Framework keyword catalog, 4-space separator rule, locator priority, and decision tree: [references/qweb.md](references/qweb.md)
|
|
27
|
+
- QForce & Salesforce Lightning automation (`--library QForce`, `LaunchApp`, `VerifyField`, `PickList`, `ComboBox`): [references/qforce.md](references/qforce.md)
|
|
24
28
|
|
|
25
29
|
## General Rules
|
|
26
30
|
|
|
@@ -30,8 +34,9 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
30
34
|
- Use Git-backed job flags only when the user or project clearly uses repository-backed CRT test storage.
|
|
31
35
|
- In JSON or non-interactive CLI calls, destructive actions require `--yes`; matching MCP tools require `confirm: true`.
|
|
32
36
|
- Prefer `--value-stdin` and `--git-password-stdin` over putting secrets in process arguments.
|
|
37
|
+
- Always pass `--no-open` to `agentia testing browser view` by default (`agentia testing browser view --project <project-id> --no-open --json`) and share the returned URL; omit `--no-open` only when the user explicitly asks to open the browser.
|
|
33
38
|
- Use the currently configured CRT credential context for validation. Test14 credentials belong to CICD and must not be substituted for CRT credentials.
|
|
34
39
|
|
|
35
40
|
## Report Back
|
|
36
41
|
|
|
37
|
-
Report the CRT project, robot, job/test ID, build or
|
|
42
|
+
Report the CRT project, robot, job/test ID, build or browser-session ID when present, final status, cleanup, and where outputs were written. Do not include PAKs or other secrets.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
2
|
+
|
|
3
|
+
# CRT Browser Testing Reference
|
|
4
|
+
|
|
5
|
+
Use `agentia testing browser` (and the matching `agentia_testing_browser_*` MCP tools) to drive an interactive Copado Robotic Testing browser session tied to a CRT Job and Project.
|
|
6
|
+
|
|
7
|
+
## Mental Model
|
|
8
|
+
|
|
9
|
+
- **One active session at a time**, stored in `.agentia/config.user.json` under `testingBrowserSession`. Always pass `--project <project-id>` (and optional `<job-id>` / `--session-id` guards).
|
|
10
|
+
- **In-memory Session Cookies**: Agentia exchanges your CRT PAK for `FL`, `XSRF-TOKEN`, and `sessionsToken` cookies via `/user/access-keys/tokens?toSign=all`. Cookies stay in memory (cached with a 60s expiry buffer in long-lived processes like MCP and `recorder`) and are never written to disk.
|
|
11
|
+
- **Browser Viewer**: Always pass `--no-open` to `testing browser view` by default (`agentia testing browser view --project <project-id> --no-open --json`) to print/return the interactive CRT browser session URL `https://<domain>/browser/session/<sessionId>?projectId=<projectId>&orgId=<orgId>` without launching a local browser window. Omit `--no-open` only when the user explicitly asks to open the browser. `testing browser stop` cleans up the session automatically.
|
|
12
|
+
- **Replayable Keyword History**: Every `testing browser execute` and `testing browser recorder` event appends to `~/.agentia/testing-live/<projectId>/<jobId>.jsonl` with full Robot Framework keyword lines (`TypeSecret` values and auth tokens redacted). Closing a session does not clear history.
|
|
13
|
+
|
|
14
|
+
## Canonical Workflow
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
# 1. Start the session (polls /api/status, loads QWeb/QForce/QMobile, sets QWeb config, opens Chrome)
|
|
18
|
+
agentia testing browser start <job-id> --project <project-id> --json
|
|
19
|
+
|
|
20
|
+
# 2. (Optional) Start the recorder in a background subagent before handing the viewer URL to a user
|
|
21
|
+
agentia testing browser recorder --project <project-id> --output flow.robot
|
|
22
|
+
|
|
23
|
+
# 3. Surface the viewer URL with --no-open by default (omit --no-open only if the user explicitly asks to open the browser)
|
|
24
|
+
agentia testing browser view --project <project-id> --no-open --json
|
|
25
|
+
|
|
26
|
+
# 4. Execute Robot Framework keywords (4+ spaces separate arguments)
|
|
27
|
+
agentia testing browser execute --project <project-id> \
|
|
28
|
+
--line "GoTo https://example.com" \
|
|
29
|
+
--line "VerifyText Example Domain" --json
|
|
30
|
+
|
|
31
|
+
# 5. Observe page state, DOM, and annotated screenshots
|
|
32
|
+
agentia testing browser inspect --project <project-id> --json
|
|
33
|
+
agentia testing browser inspect --project <project-id> --dom --json
|
|
34
|
+
agentia testing browser screenshot --project <project-id> --output /tmp/page.png --json
|
|
35
|
+
|
|
36
|
+
# 6. Export proven steps from Keyword History into a .robot script
|
|
37
|
+
agentia testing browser history <job-id> --project <project-id> --lines-only > flow.robot
|
|
38
|
+
|
|
39
|
+
# 7. Tear down the session (cleans up host, PACE, and local state)
|
|
40
|
+
agentia testing browser stop --project <project-id> --yes --json
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Subcommands & Flags
|
|
44
|
+
|
|
45
|
+
| Subcommand | Purpose & Key Flags |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| `testing browser start <job-id>` | Create and bootstrap a session. Flags: `--project` (required), `--library QWeb\|QForce\|QMobile` (default `QWeb`), `--no-bootstrap`, `--no-browser`, `--screen WIDTHxHEIGHTxDEPTH`, `--viewport WIDTHxHEIGHT`, `--file`, `--timeout`. |
|
|
48
|
+
| `testing browser status [job-id]` | Check `env` (`isBrowserStarted`, `isWindowOpen`), `recorder` (`connected`), `server` (`ambleApiVersion`, `inShutdownState`, `inFatalErrorState`), and `session` (`currentIdleTime`, `sessionIdleTimeout`, `timeToExpire`, `isKeywordExecutionPending`). |
|
|
49
|
+
| `testing browser execute [job-id]` | Run keywords using `--line "..."` (repeatable), `--keyword <name> --arg <val>`, `--file <path>`, or `--stdin`. Pass `--raw` to skip `.robot` section parsing. |
|
|
50
|
+
| `testing browser inspect [job-id]` | Fetch `GET /api/system-state` (`url`, `timestamp`, `changeOrigin`, `systemState` interactive element annotations). Add `--dom` with `--output <file>` or `--json` to stream and reassemble `document.documentElement.outerHTML` over the terminal WebSocket. |
|
|
51
|
+
| `testing browser screenshot [job-id]` | Save the current viewport PNG (including teal detection bounding boxes) to `--output <path>`. |
|
|
52
|
+
| `testing browser reports [job-id]` | Fetch Robot Framework `log.html`, `report.html`, and `output.xml` metadata, or write them to `--output-dir <dir>`. |
|
|
53
|
+
| `testing browser set-options [job-id]` | Set the full recorder option block (`--[no-]enable`, `--[no-]scroll-text`, `--[no-]healing-context`, `--[no-]hover-text`, `--[no-]system-state`, `--[no-]verify-text`, `--[no-]table-keywords`). Unspecified options default to `false`. |
|
|
54
|
+
| `testing browser view` | Print (`--no-open`, default for agents) or open the CRT browser session URL. Always use `--no-open` unless the user explicitly asks to open the browser. |
|
|
55
|
+
| `testing browser recorder [job-id]` | Connect to the session WebSocket, enable backend recording, and stream captured interactions and executed keywords as Robot Framework lines (or JSON lines with `--json`). Flags: `--output <file.robot>`, `--no-enable`, `--force` (reclaim stale lock), `--debug`. |
|
|
56
|
+
| `testing browser history [job-id]` | Read per-job keyword history. Flags: `--job <id>`, `--limit <n>`, `--keyword <name>` (case-insensitive first token), `--lines-only` (flatten to raw `.robot` lines), `--include-failed` (failed executions are omitted by default), `--status completed\|failed\|recorded`. MCP `linesOnly: true` returns `count`, `jobId`, `lines`, and `projectId` without `executions`. |
|
|
57
|
+
| `testing browser stop [job-id]` | Stop the session on the session host and PACE, and clear local state. Requires `--yes` in `--json` / non-TTY mode (`confirm: true` in MCP). |
|
|
58
|
+
|
|
59
|
+
## Parallel Recorder & Idle Keepalive Patterns
|
|
60
|
+
|
|
61
|
+
### 1. Parallel Recorder via Background Subagent
|
|
62
|
+
When driving or co-piloting a browser session with a human:
|
|
63
|
+
1. Run `agentia testing browser start <job-id> --project <project-id> --json`.
|
|
64
|
+
2. Before handing the viewer URL to the user, start `agentia testing browser recorder --project <project-id> --output captured.robot` in a background shell/subagent. The recorder captures both browser interactions (`status: "recorded"`) and `testing browser execute` commands (`status: "completed"`) in execution order so `--output` produces a complete `.robot` file.
|
|
65
|
+
3. Run `agentia testing browser view --project <project-id> --no-open --json` (always pass `--no-open` by default unless the user explicitly asks to open the browser) and share the `url` with the user.
|
|
66
|
+
4. **Verify capture after the user's first action**:
|
|
67
|
+
```sh
|
|
68
|
+
agentia testing browser history --project <project-id> --status recorded --json
|
|
69
|
+
```
|
|
70
|
+
`recorder.connected: true` in `status` only proves the WebSocket is open, not that events are firing. If `count` remains `0` after the user clicks, drive the steps via `testing browser execute` instead.
|
|
71
|
+
5. **Clean shutdown**: Send `SIGINT` (`kill -INT <pid>`) to the recorder process before running `testing browser stop` so it cleanly posts `setoptions {recorder: {enabled: false}}`. Then export the unified script from history with `agentia testing browser history --project <project-id> --lines-only > captured.robot`.
|
|
72
|
+
|
|
73
|
+
### 2. Keeping Idle Sessions Warm (600s Timeout)
|
|
74
|
+
- `session.sessionIdleTimeout` defaults to **600 seconds (10 minutes)** and is reset **only by executed keywords**.
|
|
75
|
+
- The recorder's 3-second WebSocket heartbeat keeps the socket open but **does not reset the session idle timer**.
|
|
76
|
+
- When waiting on a human to log in (e.g., MFA/SSO) or inspect the viewer, run a lightweight keepalive loop that fires `GetTitle` every 4 minutes:
|
|
77
|
+
```sh
|
|
78
|
+
while true; do sleep 240; agentia testing browser execute --project <project-id> --line "GetTitle" --json || break; done &
|
|
79
|
+
```
|
|
80
|
+
Stop the keepalive loop before `testing browser stop`.
|
|
81
|
+
|
|
82
|
+
## Troubleshooting
|
|
83
|
+
|
|
84
|
+
- **`No active CRT browser session`**: Start a session with `agentia testing browser start <job-id> --project <project-id>`. If a session died from the 600s idle timeout (`404` / `410`), Agentia clears the stale local state automatically on `status` or `stop`.
|
|
85
|
+
- **`A CRT browser recorder is already running for session <id>`**: Another recorder holds the owner-scoped lock at `~/.agentia/testing-live/locks/<sessionId>.lock`. Stop the other process or pass `--force` if the prior process crashed.
|
|
86
|
+
- **Keyword fails (`CRT browser keyword execution failed`)**:
|
|
87
|
+
1. Do not retry blindly. Run `agentia testing browser inspect --project <project-id> --json`.
|
|
88
|
+
2. Check if the target element has `isCovered: true` (modal/sticky header blocking it) or different `readableTexts`.
|
|
89
|
+
3. Check `agentia testing browser status --project <project-id> --json` to confirm `env.isWindowOpen: true` and `server.inFatalErrorState: false`.
|
|
90
|
+
- **Browser window closed (`isWindowOpen: false`)**: Re-open Chrome with:
|
|
91
|
+
```sh
|
|
92
|
+
agentia testing browser execute --project <project-id> --line "Open Browser about:blank chrome" --json
|
|
93
|
+
```
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
2
|
+
|
|
3
|
+
# Goal-Driven Flow Automation in CRT Browser Testing
|
|
4
|
+
|
|
5
|
+
Use this methodology when turning a natural-language goal ("create a lead", "add a product to the cart and verify checkout") into a verified sequence of Robot Framework keywords against an active `agentia testing browser` session.
|
|
6
|
+
|
|
7
|
+
Applies to `QWeb` (default), `--library QForce` (see [qforce.md](qforce.md) for Lightning-specific rules layered on top), and `--library QMobile`.
|
|
8
|
+
|
|
9
|
+
## The Core Loop
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Observe -> Act (one logical step) -> Verify expected state -> Recover if needed -> Continue
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Do **not** write an entire multi-page `.robot` script up front and fire it in one `testing browser execute --file` call. Every page transition is a hypothesis until confirmed against the browser session. Execute one logical step at a time, verify the transition, and then choose the next keyword. Batching is only appropriate for coupled inputs on the same verified view (such as `TypeText Username ...` + `TypeSecret Password ...`).
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
# 1. Act
|
|
19
|
+
agentia testing browser execute --project <project-id> --line "GoTo https://example.com" --json
|
|
20
|
+
|
|
21
|
+
# 2. Verify
|
|
22
|
+
agentia testing browser execute --project <project-id> --line "VerifyText Example Domain" --json
|
|
23
|
+
|
|
24
|
+
# 3. Observe interactive elements before the next decision
|
|
25
|
+
agentia testing browser inspect --project <project-id> --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Choosing Locators (Priority Order)
|
|
29
|
+
|
|
30
|
+
Always prefer semantic locators over structural XPaths:
|
|
31
|
+
|
|
32
|
+
1. **Visible text** (`ClickText`, `TypeText`, `TypeSecret`, `VerifyText`, `DropDown`, `ClickCheckbox`). Disambiguate repeated text with `anchor=<nearby text>` before reaching for `index=<N>`.
|
|
33
|
+
2. **Unique attribute** (`alt`, `title`, `tooltip`, `data-icon`) when there is no visible text — use `ClickItem` / `VerifyItem`.
|
|
34
|
+
3. **XPath as a last resort** (`ClickElement`, `VerifyElement`) only when text and attribute locators cannot reach the element.
|
|
35
|
+
|
|
36
|
+
While exploring unfamiliar pages, pass a short bounded timeout (`timeout=3`) so a wrong locator fails in 3 seconds instead of 10 seconds:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
agentia testing browser execute --project <project-id> --line "ClickText Sign In timeout=3" --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Drop the tight `timeout=3` override when curating the final exported `.robot` suite.
|
|
43
|
+
|
|
44
|
+
## Why "Completed" Execution Still Needs Verification
|
|
45
|
+
|
|
46
|
+
`testing browser execute` returning `status: "completed"` only proves the keyword ran without throwing an error—it does **not** prove that navigation succeeded, a form submitted, or a modal opened.
|
|
47
|
+
|
|
48
|
+
After any state-changing keyword (`GoTo`, `Click*`, `Type*`, `DropDown`, `PickList`, `ComboBox`, `PressKey`), run a `Verify*` keyword targeting content **unique to the new state**:
|
|
49
|
+
- After login -> verify dashboard heading or app navigation.
|
|
50
|
+
- After opening a modal -> verify a field label inside the modal before typing.
|
|
51
|
+
- After saving a record -> verify the saved state or record detail field.
|
|
52
|
+
|
|
53
|
+
Watch for missing workflow transitions:
|
|
54
|
+
- **Typed into a search box**: Append `\n` to the `TypeText` value to submit on Enter, or click the search button.
|
|
55
|
+
- **Filled form fields**: Click `Save` / `Submit` before asserting the outcome.
|
|
56
|
+
|
|
57
|
+
## Observing Page State: `inspect` + `screenshot` Overlay
|
|
58
|
+
|
|
59
|
+
| Question | Command |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| Which interactive elements are visible? | `agentia testing browser inspect --project <project-id> --json` |
|
|
62
|
+
| What does the viewport look like with detection boxes? | `agentia testing browser screenshot --project <project-id> --output /tmp/page.png --json` |
|
|
63
|
+
| What is the raw HTML (`outerHTML`)? | `agentia testing browser inspect --project <project-id> --dom --json` |
|
|
64
|
+
|
|
65
|
+
### Reading `inspect` and `screenshot` Together
|
|
66
|
+
The PNG saved by `testing browser screenshot` is not a plain screenshot: the CRT inspection engine draws colored bounding rectangles (teal by default from `SetConfig HighlightColor teal`) around every detected UI element. Each rectangle corresponds to an entry in the `systemState` array from `testing browser inspect`:
|
|
67
|
+
- `annotationIndex` — matches the numbered/boxed element in the detection pass.
|
|
68
|
+
- `readableTexts` (`ownText`, `ariaLabel`, `nearbyTexts`) — exact strings to pass to `ClickText` / `TypeText` and `anchor=`.
|
|
69
|
+
- `elementType` and `role` — distinguishes inputs, buttons, links, and `role="combobox"` lookups.
|
|
70
|
+
- `isVisible`, `isInteractive`, `isEnabled`, `isCovered` — if `isCovered: true`, a modal, toast, or sticky header is covering the element and must be closed or scrolled past first.
|
|
71
|
+
|
|
72
|
+
## Recovery Protocol
|
|
73
|
+
|
|
74
|
+
When an action or verification fails:
|
|
75
|
+
1. **Stop immediately.** Do not execute the next planned step.
|
|
76
|
+
2. **Inspect first** (`testing browser inspect` and `testing browser screenshot`) — never retry blindly.
|
|
77
|
+
3. **Compare expected vs. actual state**:
|
|
78
|
+
- *Still on the previous view?* A workflow transition (submit, save, menu click) didn't fire. Complete the transition rather than swapping locators.
|
|
79
|
+
- *On the expected view?* The locator was wrong. Pick up to 3 semantic alternatives directly from `systemState[].readableTexts` (`anchor=`, `ClickItem`, etc.).
|
|
80
|
+
4. **Wrong-but-successful action** (e.g., clicked the wrong `New` button):
|
|
81
|
+
- Inspect where you landed, restore the prior view (`Back` or re-navigate), verify restoration, and retry with `anchor=<nearby text>` or `SetConfig PartialMatch False`.
|
|
82
|
+
- Remember that successful wrong clicks land in `testing browser history` (`status: "completed"`) — strip them when curating the final `.robot` file.
|
|
83
|
+
|
|
84
|
+
## Tuning the Session for Agent-Driven Flows
|
|
85
|
+
|
|
86
|
+
- **Exact text matching**: Bootstrap sets `PartialMatch True`. On text-dense pages (especially Salesforce Lightning), switch to exact matching since you have exact `readableTexts` from `inspect`:
|
|
87
|
+
```sh
|
|
88
|
+
agentia testing browser execute --project <project-id> --line "SetConfig PartialMatch False" --json
|
|
89
|
+
```
|
|
90
|
+
- **XHR-heavy pages**: Raise timeouts with `SetConfig DefaultTimeout 20s` and `SetConfig XHRTimeout 30s` instead of adding `Sleep`.
|
|
91
|
+
|
|
92
|
+
## Exporting and Promoting the Proven Flow
|
|
93
|
+
|
|
94
|
+
Failed probes (`status: "failed"`) are automatically excluded by `testing browser history`:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
agentia testing browser history <job-id> --project <project-id> --lines-only > flow.robot
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Curate `flow.robot` by removing exploratory detours, temporary `timeout=3` overrides, and duplicate steps, then wrap it in a standard Robot Framework suite for `agentia testing job files upload` and `agentia testing job run`:
|
|
101
|
+
|
|
102
|
+
```robotframework
|
|
103
|
+
*** Settings ***
|
|
104
|
+
Library QWeb
|
|
105
|
+
Suite Setup Open Browser about:blank chrome
|
|
106
|
+
Suite Teardown Close All Browsers
|
|
107
|
+
|
|
108
|
+
*** Test Cases ***
|
|
109
|
+
Verified Flow
|
|
110
|
+
GoTo https://example.com
|
|
111
|
+
VerifyText Example Domain
|
|
112
|
+
```
|