@copado/agentia-cli 1.1.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 +69 -0
- package/README.md +3290 -2095
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- 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 +38 -0
- package/dist/commands/cicd/credential/auth/web/login.js +54 -0
- package/dist/commands/cicd/credential/create.js +2 -2
- package/dist/commands/cicd/credential/list.js +15 -19
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +11 -14
- 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 +36 -15
- package/dist/commands/cicd/environment/auth/web/login.js +22 -6
- 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 +8 -24
- 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 +24 -0
- package/dist/commands/cicd/extension-configuration/list.js +49 -0
- package/dist/commands/cicd/extension-configuration/open.js +38 -0
- 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 +3 -3
- package/dist/commands/cicd/metadata/dependency/list.js +45 -22
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/index/compare.js +2 -2
- package/dist/commands/cicd/metadata/list.js +5 -5
- package/dist/commands/cicd/metadata/refresh/deleted.js +3 -3
- package/dist/commands/cicd/metadata/refresh/run.js +4 -4
- package/dist/commands/cicd/metadata/refresh/status.js +4 -4
- 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 +39 -0
- package/dist/commands/cicd/pipeline/automation/create.js +33 -0
- package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
- package/dist/commands/cicd/pipeline/automation/get.js +32 -0
- package/dist/commands/cicd/pipeline/automation/list.js +38 -0
- package/dist/commands/cicd/pipeline/automation/open.js +38 -0
- package/dist/commands/cicd/pipeline/automation/update.js +38 -0
- 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 +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
- package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
- package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
- 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 +3 -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 +10 -9
- 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 +8 -6
- package/dist/commands/cicd/work/status.js +2 -2
- package/dist/commands/cicd/work/submit.js +5 -4
- 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 +3 -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/plugins/install.js +2 -5
- package/dist/commands/setup/skills/create.js +28 -2
- package/dist/commands/setup/skills/list.js +55 -0
- package/dist/commands/setup/skills/update.js +36 -3
- package/dist/commands/setup.js +3 -3
- 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/data-table/create.js +1 -2
- package/dist/commands/testing/data-table/delete.js +1 -2
- package/dist/commands/testing/data-table/export.js +2 -6
- package/dist/commands/testing/data-table/get.js +2 -4
- package/dist/commands/testing/data-table/list.js +1 -2
- package/dist/commands/testing/data-table/update.js +3 -4
- package/dist/commands/testing/job/create.js +26 -22
- package/dist/commands/testing/job/delete.js +2 -2
- package/dist/commands/testing/job/files/download.js +73 -0
- package/dist/commands/testing/job/files/list.js +43 -0
- package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
- package/dist/commands/testing/job/get.js +2 -2
- package/dist/commands/testing/job/list.js +1 -1
- package/dist/commands/testing/job/refs.js +4 -4
- package/dist/commands/testing/job/run.js +134 -1
- package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
- package/dist/commands/testing/job/runs/get.js +42 -0
- package/dist/commands/testing/{build → job/runs}/list.js +19 -10
- package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
- package/dist/commands/testing/{build → job/runs}/search.js +9 -7
- package/dist/commands/testing/job/schedule/get.js +5 -11
- package/dist/commands/testing/job/schedule/remove.js +3 -3
- package/dist/commands/testing/job/schedule/set.js +3 -3
- package/dist/commands/testing/job/update.js +22 -65
- package/dist/commands/testing/project/create.js +1 -17
- package/dist/commands/testing/project/get.js +0 -1
- package/dist/commands/testing/project/list.js +2 -2
- package/dist/commands/testing/project/permission/set.js +3 -7
- package/dist/commands/testing/project/permission/update.js +2 -2
- package/dist/commands/testing/robot/create.js +22 -25
- package/dist/commands/testing/robot/get.js +1 -1
- package/dist/commands/testing/robot/list.js +3 -3
- package/dist/commands/testing/robot/update.js +3 -3
- package/dist/commands/testing/user-parameter/create.js +3 -9
- package/dist/commands/testing/user-parameter/update.js +1 -7
- package/dist/commands/testing/variable/create.js +4 -9
- package/dist/commands/testing/variable/list.js +3 -3
- package/dist/commands/testing/variable/update.js +5 -12
- package/dist/help.js +17 -0
- package/dist/hooks/init/cicd-connection.js +59 -0
- package/dist/lib/agentia-command.js +69 -6
- package/dist/lib/ai-types.js +2 -1
- 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/claude-mcp-config.js +15 -0
- 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/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +6 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/environment-auth-status.js +2 -1
- package/dist/lib/environment-auth.js +2 -1
- package/dist/lib/environment-credential-flags.js +3 -1
- package/dist/lib/environment-credential-operations.js +8 -2
- package/dist/lib/environment-types.js +3 -1
- package/dist/lib/extension-configuration-ops.js +4 -0
- package/dist/lib/extension-configuration-sanitize.js +7 -0
- package/dist/lib/extension-configuration-types.js +8 -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/http-proxy.js +13 -0
- package/dist/lib/mcp/ai-tools.js +3 -3
- package/dist/lib/mcp/command-id.js +2 -0
- package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +73 -3
- package/dist/lib/mcp/testing-browser-tools.js +194 -0
- package/dist/lib/mcp/testing-tools.js +242 -552
- package/dist/lib/mcp/tool-annotations.js +59 -30
- package/dist/lib/mcp/tools.js +202 -66
- package/dist/lib/mcp/work-tools.js +18 -4
- package/dist/lib/metadata-explore.js +8 -0
- package/dist/lib/network-error.js +8 -0
- package/dist/lib/pipeline-automation-flags.js +12 -0
- package/dist/lib/pipeline-automation-ops.js +9 -0
- package/dist/lib/pipeline-automation-types.js +18 -0
- package/dist/lib/pipeline-lifecycle-id.js +3 -0
- package/dist/lib/pipeline-quality-gate-flags.js +12 -0
- package/dist/lib/pipeline-quality-gate-ops.js +9 -0
- package/dist/lib/pipeline-quality-gate-types.js +17 -0
- package/dist/lib/plugin-host/ai.js +2 -1
- package/dist/lib/plugin-skills.js +22 -0
- package/dist/lib/plugin-trust/gate.js +1 -2
- package/dist/lib/project-root.js +3 -1
- 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/salesforce-tooling-check.js +6 -0
- package/dist/lib/skill-packs.js +7 -0
- 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-archive.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-data-table.js +39 -0
- package/dist/lib/testing-execution.js +22 -0
- package/dist/lib/testing-flags.js +6 -2
- package/dist/lib/testing-gateway.js +5 -1
- package/dist/lib/testing-operations.js +9 -4
- package/dist/lib/testing-sanitization.js +3 -1
- package/dist/lib/testing-secret-input.js +2 -1
- package/dist/lib/testing-types.js +24 -3
- package/dist/lib/work-environment-sync.js +3 -1
- package/dist/lib/work-flags.js +6 -1
- package/dist/lib/work-local-development-flow.js +4 -0
- package/dist/lib/work-promote.js +2 -1
- package/dist/lib/work-submit-wait.js +3 -1
- package/oclif.manifest.json +8841 -7469
- package/package.json +45 -5
- package/templates/skills/agentia-ai/SKILL.md +9 -6
- package/templates/skills/agentia-ai/references/ai-agents.md +21 -3
- package/templates/skills/agentia-cicd/SKILL.md +8 -5
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +35 -13
- package/templates/skills/agentia-cicd/references/extensions.md +3 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
- package/templates/skills/agentia-cicd/references/promotions.md +10 -1
- package/templates/skills/agentia-cicd/references/work.md +20 -5
- package/templates/skills/agentia-metadata/SKILL.md +146 -0
- package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +146 -0
- package/templates/skills/agentia-testing/SKILL.md +12 -7
- 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 +31 -23
- package/dist/commands/testing/build/get.js +0 -38
- package/dist/commands/testing/build/latest.js +0 -40
- package/dist/commands/testing/build/logs.js +0 -47
- package/dist/commands/testing/build/run.js +0 -26
- package/dist/commands/testing/create.js +0 -2
- package/dist/commands/testing/job/download.js +0 -54
- package/dist/commands/testing/job/files.js +0 -34
- package/dist/commands/testing/live/continue.js +0 -21
- package/dist/commands/testing/live/execute.js +0 -43
- package/dist/commands/testing/live/history.js +0 -35
- package/dist/commands/testing/live/inspect.js +0 -30
- package/dist/commands/testing/live/interrupt.js +0 -21
- package/dist/commands/testing/live/recorder.js +0 -134
- 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 -28
- package/dist/commands/testing/live/start.js +0 -53
- package/dist/commands/testing/live/status.js +0 -27
- package/dist/commands/testing/live/stop.js +0 -38
- package/dist/commands/testing/live/view.js +0 -36
- package/dist/commands/testing/run.js +0 -26
- package/dist/commands/testing/status.js +0 -45
- package/dist/commands/testing/test/create.js +0 -2
- package/dist/commands/testing/test/logs.js +0 -2
- package/dist/commands/testing/test/run.js +0 -26
- package/dist/commands/testing/test/status.js +0 -2
- package/dist/commands/testing/test/update.js +0 -2
- package/dist/commands/testing/update.js +0 -65
- package/dist/lib/mcp/testing-live-tools.js +0 -215
- package/dist/lib/testing-data-command.js +0 -8
- package/dist/lib/testing-data-core.js +0 -20
- package/dist/lib/testing-data-export.js +0 -6
- package/dist/lib/testing-data-import.js +0 -6
- package/dist/lib/testing-data-io.js +0 -12
- package/dist/lib/testing-data-operations.js +0 -10
- package/dist/lib/testing-data-types.js +0 -4
- package/dist/lib/testing-live-command.js +0 -6
- package/dist/lib/testing-live-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- package/dist/lib/testing-live-operations.js +0 -19
- package/dist/lib/testing-live-recorder.js +0 -9
- package/dist/lib/testing-live-robot.js +0 -9
- package/dist/lib/testing-live-state.js +0 -5
- package/dist/lib/testing-live-types.js +0 -3
- package/dist/lib/testing-run-command.js +0 -3
- package/dist/lib/testing-schedule.js +0 -5
- package/dist/lib/testing-session.js +0 -5
- package/dist/lib/testing-watch.js +0 -4
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
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. 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
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
7
|
+
|
|
8
|
+
# Org Intelligence (Agentia Metadata Exploration)
|
|
9
|
+
|
|
10
|
+
**Org Intelligence** lets you inspect Salesforce **metadata** in the user's
|
|
11
|
+
connected sandbox / developer org via `cicd metadata explore` (MCP
|
|
12
|
+
`agentia_metadata_explore`). Prefer MCP when available; otherwise use the CLI
|
|
13
|
+
with `--json` when results will be parsed.
|
|
14
|
+
|
|
15
|
+
Covers Apex classes, triggers, objects, fields, Flows, and other Metadata API
|
|
16
|
+
types. First release is **read-oriented** only—do not invent validate, deploy,
|
|
17
|
+
create, update, or `check_async_id`.
|
|
18
|
+
|
|
19
|
+
## Capabilities And Limits
|
|
20
|
+
|
|
21
|
+
| Can | Cannot |
|
|
22
|
+
| --- | --- |
|
|
23
|
+
| Read / list / search / describe **metadata** | Read or query **org data** (records, SOQL results, reports as data) |
|
|
24
|
+
| Find metadata references (`find_references`) | **Edit**, create, update, validate, or deploy metadata |
|
|
25
|
+
| Run specified Apex test classes (when asked) | Mass-scan or compare entire orgs |
|
|
26
|
+
|
|
27
|
+
If the user asks to change metadata or fetch record data, say Org Intelligence
|
|
28
|
+
cannot do that and point them at the appropriate Copado/Agentia workflow or
|
|
29
|
+
local editing instead.
|
|
30
|
+
|
|
31
|
+
## Source Priority
|
|
32
|
+
|
|
33
|
+
1. **Local project files first** (workspace / git / force-app / retrieved source)
|
|
34
|
+
when they exist and answer the question.
|
|
35
|
+
2. **Then the connected org** via Org Intelligence (`cicd metadata explore`)
|
|
36
|
+
for names, bodies, docs, and references that are missing or unclear locally.
|
|
37
|
+
|
|
38
|
+
Do not call the org when local files already provide a clear answer. Prefer
|
|
39
|
+
local when reconciling differences unless the user asks for the org version.
|
|
40
|
+
|
|
41
|
+
## What You Can Do
|
|
42
|
+
|
|
43
|
+
| Goal | Action |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| List metadata names that match a pattern | `list` |
|
|
46
|
+
| Search source (Apex Page/Class/Trigger/Component only) | `search` |
|
|
47
|
+
| Retrieve one item by API name | `read` |
|
|
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` |
|
|
50
|
+
| Describe a metadata type shape | `describe_type` |
|
|
51
|
+
| Get type documentation from the tool | `read_documentation` |
|
|
52
|
+
| Run specific Apex test classes | `run_apex_tests` |
|
|
53
|
+
|
|
54
|
+
Use `list` / `search` to discover exact names before `read` or
|
|
55
|
+
`find_references`. Pass type + name for references. Confirm with the user
|
|
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.
|
|
59
|
+
|
|
60
|
+
## Org And Scope
|
|
61
|
+
|
|
62
|
+
- Target is the CICD project default credential when `--credential-id` /
|
|
63
|
+
`credentialId` is omitted. Pass `--credential-id` only to override. Do not
|
|
64
|
+
mix credential auth with `--session-id` + `--endpoint`.
|
|
65
|
+
- The user may call this **Org Intelligence**, or the connected org **Org**,
|
|
66
|
+
**Sandbox**, **Integration**, **Dev Org**, or similar—treat those as the
|
|
67
|
+
same target unless they ask for a different credential.
|
|
68
|
+
- You can access selected metadata. You **cannot** compare orgs or run mass
|
|
69
|
+
analysis / full-org scans—that hits limits and takes too long. If a list is
|
|
70
|
+
truncated or incomplete, say you cannot finish that breadth of scan and ask
|
|
71
|
+
the user to narrow the request.
|
|
72
|
+
|
|
73
|
+
## Pattern And Type Rules
|
|
74
|
+
|
|
75
|
+
- **Always quote CLI wildcards** (`--pattern 'Account*'`). Unquoted `*` is
|
|
76
|
+
expanded by the shell. MCP `pattern` does not need shell quotes.
|
|
77
|
+
- **`search`** only covers `ApexPage`, `ApexClass`, `ApexTrigger`, and
|
|
78
|
+
`ApexComponent`. Pattern ≥ 2 characters, at most one `*`.
|
|
79
|
+
- **`list` for CustomField / FieldSet / DuplicateRule / ListView** — pattern
|
|
80
|
+
must start with the SObject name and a dot (e.g. `Account.Name`,
|
|
81
|
+
`Account.namespace__Name__c`). You cannot list every item of every object.
|
|
82
|
+
- **`list` for Flow** — `--pattern` matches API name, Flow label, and
|
|
83
|
+
triggering object API name.
|
|
84
|
+
- **Profiles** — reading Profile details is not supported. Tell the user you
|
|
85
|
+
cannot answer questions about Profile contents. Listing Profile names may
|
|
86
|
+
still be attempted if useful, but do not claim you can read their body.
|
|
87
|
+
- **Reports, Dashboards, and Folders** — listing is not supported; say so.
|
|
88
|
+
|
|
89
|
+
## Apex Tests
|
|
90
|
+
|
|
91
|
+
- You cannot run all tests or local tests.
|
|
92
|
+
- Ask the user which test class names to run, then pass them via
|
|
93
|
+
`--apex-unit-tests` / `apexUnitTests` (comma-separated).
|
|
94
|
+
|
|
95
|
+
## How To Call
|
|
96
|
+
|
|
97
|
+
```sh
|
|
98
|
+
agentia cicd metadata explore --action describe_type --object-type ApexClass --json
|
|
99
|
+
agentia cicd metadata explore --action list --object-type ApexClass --pattern 'Account*' --json
|
|
100
|
+
agentia cicd metadata explore --action search --pattern 'Cont*' --json
|
|
101
|
+
agentia cicd metadata explore --action read --object-type ApexClass --full-name MyClass --json
|
|
102
|
+
agentia cicd metadata explore --action find_references --object-type ApexClass --full-name MyClass --json
|
|
103
|
+
agentia cicd metadata explore --action run_apex_tests --apex-unit-tests MyClassTest --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
| Surface | Name |
|
|
107
|
+
| --- | --- |
|
|
108
|
+
| CLI | `agentia cicd metadata explore` |
|
|
109
|
+
| MCP | `agentia_metadata_explore` |
|
|
110
|
+
|
|
111
|
+
Tool/CLI output is YAML inside `output` (human mode prints YAML; `--json` /
|
|
112
|
+
MCP return `{ output, credentialId? }`). **When talking to the user, respond in
|
|
113
|
+
XML—not YAML.** Summarize findings; do not dump full tool YAML unless asked.
|
|
114
|
+
Never echo session Ids, API keys, or other secrets.
|
|
115
|
+
|
|
116
|
+
## Gathering Context For Generated Code
|
|
117
|
+
|
|
118
|
+
When helping the user design or draft Salesforce metadata (local edits only):
|
|
119
|
+
|
|
120
|
+
- Prefer **local files**, then Org Intelligence `list` / `search` / `read` /
|
|
121
|
+
`describe_type` / `find_references` for accurate names and patterns.
|
|
122
|
+
- When drafting new Apex tests, search local code or ask about existing
|
|
123
|
+
conventions (data factories, test setup) before querying the org.
|
|
124
|
+
- Present draft code with the client's normal artifact / code-block features.
|
|
125
|
+
Org Intelligence does not write metadata to the org.
|
|
126
|
+
|
|
127
|
+
## Safety
|
|
128
|
+
|
|
129
|
+
- Stay on the supported read actions above—no metadata edits, no org data.
|
|
130
|
+
- Prefer sandbox/dev credentials; treat production as explicit and high-risk.
|
|
131
|
+
- Narrow `--pattern` when lists are large or truncated.
|
|
132
|
+
- Experimental command: expect a warning in human/JSON output.
|
|
133
|
+
|
|
134
|
+
## Reference
|
|
135
|
+
|
|
136
|
+
Flags, MCP args, examples, and gotchas:
|
|
137
|
+
[references/metadata-explore.md](references/metadata-explore.md)
|
|
138
|
+
|
|
139
|
+
Copado dependency graph (`--path`, context defaults, human table):
|
|
140
|
+
[references/metadata-dependency.md](references/metadata-dependency.md)
|
|
141
|
+
|
|
142
|
+
## Report Back
|
|
143
|
+
|
|
144
|
+
Report actions run, object type / fullName / pattern, credential Id (never
|
|
145
|
+
session Id), and outcome (names found, test result summary, or error). Do not
|
|
146
|
+
include secrets. Use XML in the user-facing reply.
|
|
@@ -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 …` |
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<!-- Agentia managed skill file: agentia setup skills -->
|
|
2
|
+
|
|
3
|
+
# Org Intelligence — Metadata Explore Reference
|
|
4
|
+
|
|
5
|
+
**Org Intelligence** is Agentia’s read-only Salesforce metadata inspection
|
|
6
|
+
feature: `agentia cicd metadata explore` and MCP `agentia_metadata_explore`
|
|
7
|
+
call `POST /agentia/headless/ai_metadata_tool` against the user's connected
|
|
8
|
+
sandbox/developer org (Copado credential or Salesforce session).
|
|
9
|
+
|
|
10
|
+
This is **org Metadata API exploration**, not Copado’s metadata index
|
|
11
|
+
(`cicd metadata list`) or content compare helpers.
|
|
12
|
+
|
|
13
|
+
**Source priority:** local project files first (when present), then the org.
|
|
14
|
+
|
|
15
|
+
**Can:** read / list / search / describe metadata; `find_references`; run
|
|
16
|
+
specified Apex tests when asked.
|
|
17
|
+
|
|
18
|
+
**Cannot:** read org **data** (records); **edit**, create, update, validate, or
|
|
19
|
+
deploy metadata. Do not invent validate/deploy/create/update, `check_async_id`,
|
|
20
|
+
or flags such as `--metadata-files`, `--async-id`, `--test-level`,
|
|
21
|
+
`--validate-only`, or `--organization-name`.
|
|
22
|
+
|
|
23
|
+
## Prerequisites
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
agentia auth get --cicd --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Omitting `--credential-id` / `credentialId` uses the CICD project default
|
|
30
|
+
credential automatically. Override only when the user needs a different org.
|
|
31
|
+
Credential auth and `--session-id` + `--endpoint` are mutually exclusive.
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
agentia cicd project default set --credential <credential-id>
|
|
35
|
+
agentia cicd environment list --type Sandbox --json
|
|
36
|
+
agentia cicd credential list --environmentid <environment-id> --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Shell Quoting
|
|
40
|
+
|
|
41
|
+
Always quote CLI wildcards:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
agentia cicd metadata explore --action list --object-type ApexClass --pattern 'Account*' --json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
MCP `pattern` does not need shell quotes.
|
|
48
|
+
|
|
49
|
+
## CLI Flags / MCP Args
|
|
50
|
+
|
|
51
|
+
| CLI | MCP | Notes |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| `--action` | `action` | Required. `list`, `search`, `read_documentation`, `describe_type`, `read`, `find_references`, `run_apex_tests` |
|
|
54
|
+
| `--object-type` | `objectType` | e.g. `ApexClass`, `CustomObject`, `Flow` |
|
|
55
|
+
| `--full-name` | `fullName` | Required for `read` |
|
|
56
|
+
| `--pattern` | `pattern` | Default `*`; quote wildcards on CLI |
|
|
57
|
+
| `--apex-unit-tests` | `apexUnitTests` | Required for `run_apex_tests` |
|
|
58
|
+
| `--credential-id` | `credentialId` | Overrides project default |
|
|
59
|
+
| `--session-id` | `sessionId` | With `--endpoint` only; never log |
|
|
60
|
+
| `--endpoint` | `endpoint` | Salesforce instance URL with session |
|
|
61
|
+
| `--json` | — | `{ output, credentialId? }` plus experimental warning |
|
|
62
|
+
|
|
63
|
+
## Actions
|
|
64
|
+
|
|
65
|
+
### `list`
|
|
66
|
+
|
|
67
|
+
List names for one metadata type. Use returned `fullName` values with `read`.
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
agentia cicd metadata explore --action list --object-type CustomObject --pattern 'Account*' --json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Special pattern rules:
|
|
74
|
+
|
|
75
|
+
- **CustomField / FieldSet / DuplicateRule / ListView** — pattern must start with
|
|
76
|
+
SObject + `.` (e.g. `Account.Name`, `Account.namespace__Name__c`).
|
|
77
|
+
- **Flow** — pattern matches API name, label, and triggering object API name.
|
|
78
|
+
|
|
79
|
+
Unsupported listings: **Reports**, **Dashboards**, **Folders** — tell the user.
|
|
80
|
+
|
|
81
|
+
### `search`
|
|
82
|
+
|
|
83
|
+
Text search across **ApexPage, ApexClass, ApexTrigger, ApexComponent** only.
|
|
84
|
+
Pattern ≥ 2 characters; at most one `*`.
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
agentia cicd metadata explore --action search --pattern 'MyCtrl*' --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### `describe_type` / `read_documentation`
|
|
91
|
+
|
|
92
|
+
Type shape vs tool-provided docs. Prefer `describe_type` for compact structure.
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
agentia cicd metadata explore --action describe_type --object-type Flow --json
|
|
96
|
+
agentia cicd metadata explore --action read_documentation --object-type ApexClass --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### `read`
|
|
100
|
+
|
|
101
|
+
Retrieve one component. **Profile contents are not supported**—inform the user
|
|
102
|
+
you cannot answer questions about Profile body/details.
|
|
103
|
+
|
|
104
|
+
```sh
|
|
105
|
+
agentia cicd metadata explore --action read --object-type ApexClass --full-name ns__MyClass --json
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### `find_references`
|
|
109
|
+
|
|
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).
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
agentia cicd metadata explore --action find_references --object-type ApexClass --full-name MyClass --json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### `run_apex_tests`
|
|
123
|
+
|
|
124
|
+
Requires explicit test class names. Cannot run all tests or local tests—ask the
|
|
125
|
+
user which classes to run.
|
|
126
|
+
|
|
127
|
+
```sh
|
|
128
|
+
agentia cicd metadata explore --action run_apex_tests --apex-unit-tests MyClassTest --json
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Limits And Behavior
|
|
132
|
+
|
|
133
|
+
- Selected metadata access only—no org compare, no mass structure scan.
|
|
134
|
+
- Truncated/incomplete lists → narrow pattern or tell the user the scan is too broad.
|
|
135
|
+
- Tool returns YAML in `output`; **user-facing replies should be XML**, not YAML.
|
|
136
|
+
- Never echo `--session-id` or other secrets.
|
|
137
|
+
|
|
138
|
+
## Related Commands
|
|
139
|
+
|
|
140
|
+
| Need | Command |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| Org Metadata API explore (read-oriented) | `cicd metadata explore` |
|
|
143
|
+
| Copado metadata index search | `cicd metadata list` |
|
|
144
|
+
| Indexed/Git content blobs | `cicd metadata content get` |
|
|
145
|
+
| Org/Git content diff | `cicd metadata content compare` |
|
|
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
|
|
|
@@ -15,23 +15,28 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
|
|
|
15
15
|
|
|
16
16
|
1. Confirm CRT auth with `agentia auth get --crt --json`. Configure missing credentials with `agentia auth set --crt ...` or the supported `AGENTIA_CRT_*` environment variables.
|
|
17
17
|
2. Identify or create the CRT Project and Robot before creating or running tests. Use explicit project and job IDs; do not invent hidden active-resource defaults.
|
|
18
|
-
3. Use `testing
|
|
18
|
+
3. Use `testing job ...` as the single namespace for test definitions and runs: `job create|update|run` for definitions, `job files list|upload|download` for test files, and `job runs list|search|get|logs|abort` for executions. The old `testing create|update|status|logs|run`, `testing test ...`, `testing build ...`, and `testing job files|upload|download` forms are deprecated aliases that warn when used.
|
|
19
19
|
4. Never expose PAKs, session cookies, viewer keys, variable values, or generated log content that contains secrets.
|
|
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
|
|
|
27
|
-
- `agentia testing
|
|
31
|
+
- `agentia testing job run` starts CRT Robot Framework execution. It is different from `agentia cicd work test --local`.
|
|
28
32
|
- `agentia testing job` manages CRT job/test definitions. It is different from `agentia cicd job`, which manages Copado CICD JobExecution records.
|
|
29
|
-
-
|
|
33
|
+
- `testing job run` waits for the final build result and exits non-zero when it fails. Add `--no-wait` when only the queued run record is needed.
|
|
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
|
+
```
|