@copado/agentia-cli 1.1.0 → 1.2.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 +40 -0
- package/README.md +2370 -1850
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- 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/list.js +13 -17
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +9 -12
- package/dist/commands/cicd/environment/auth/status.js +34 -13
- package/dist/commands/cicd/environment/auth/web/login.js +20 -4
- package/dist/commands/cicd/environment/open.js +6 -22
- 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/metadata/content/get.js +1 -1
- package/dist/commands/cicd/metadata/dependency/list.js +2 -2
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/list.js +3 -3
- package/dist/commands/cicd/metadata/refresh/deleted.js +1 -1
- package/dist/commands/cicd/metadata/refresh/run.js +2 -2
- package/dist/commands/cicd/metadata/refresh/status.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/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/work/create.js +1 -0
- package/dist/commands/cicd/work/environment-sync.js +8 -7
- package/dist/commands/cicd/work/set.js +6 -4
- package/dist/commands/cicd/work/submit.js +3 -2
- package/dist/commands/cicd/work/update.js +1 -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/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/live/continue.js +5 -10
- package/dist/commands/testing/live/execute.js +3 -3
- package/dist/commands/testing/live/history.js +7 -2
- package/dist/commands/testing/live/inspect.js +5 -4
- package/dist/commands/testing/live/interrupt.js +5 -10
- package/dist/commands/testing/live/recorder.js +23 -115
- package/dist/commands/testing/live/reports.js +3 -3
- package/dist/commands/testing/live/screenshot.js +3 -3
- package/dist/commands/testing/live/set-options.js +11 -4
- package/dist/commands/testing/live/start.js +9 -4
- package/dist/commands/testing/live/status.js +2 -5
- package/dist/commands/testing/live/stop.js +3 -5
- package/dist/commands/testing/live/view.js +2 -2
- 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/lib/ai-types.js +2 -1
- package/dist/lib/claude-mcp-config.js +15 -0
- package/dist/lib/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +4 -1
- 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/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/server.js +70 -1
- package/dist/lib/mcp/testing-live-tools.js +24 -13
- package/dist/lib/mcp/testing-tools.js +239 -550
- package/dist/lib/mcp/tool-annotations.js +27 -18
- package/dist/lib/mcp/tools.js +117 -32
- 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/runtime.js +1 -1
- package/dist/lib/salesforce-tooling-check.js +6 -0
- package/dist/lib/skill-packs.js +7 -0
- package/dist/lib/testing-archive.js +9 -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 +4 -1
- package/dist/lib/testing-live-command.js +3 -1
- package/dist/lib/testing-live-operations.js +7 -1
- package/dist/lib/testing-live-recorder.js +3 -1
- package/dist/lib/testing-live-state.js +8 -1
- package/dist/lib/testing-operations.js +6 -21
- package/dist/lib/testing-sanitization.js +2 -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-submit-wait.js +3 -1
- package/oclif.manifest.json +6609 -6895
- package/package.json +35 -2
- package/templates/skills/agentia-ai/SKILL.md +3 -4
- package/templates/skills/agentia-ai/references/ai-agents.md +2 -2
- package/templates/skills/agentia-cicd/SKILL.md +7 -4
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +19 -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/work.md +20 -5
- package/templates/skills/agentia-metadata/SKILL.md +140 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +142 -0
- package/templates/skills/agentia-testing/SKILL.md +3 -3
- package/templates/skills/agentia-testing/references/tests.md +14 -14
- 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/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/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-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- 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,32 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
|
+
import { fetchPipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
5
|
+
import { formatPipelineQualityGateDetail, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
6
|
+
export default class PipelineQualityGateGet extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.string({
|
|
9
|
+
description: 'Quality gate ID or name',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Get a Copado pipeline quality gate';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <rule-id> --pipeline-id <pipeline-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <rule-id> --pipeline-id <pipeline-id> --json',
|
|
17
|
+
];
|
|
18
|
+
static flags = {
|
|
19
|
+
'pipeline-id': Flags.string({
|
|
20
|
+
description: 'Pipeline ID or name',
|
|
21
|
+
required: true,
|
|
22
|
+
}),
|
|
23
|
+
};
|
|
24
|
+
async run() {
|
|
25
|
+
const { args, flags } = await this.parse(PipelineQualityGateGet);
|
|
26
|
+
const pipelineId = assertRequired(flags['pipeline-id'], '--pipeline-id');
|
|
27
|
+
const gate = await this.withSpinner('Fetching pipeline quality gate', () => fetchPipelineQualityGate(pipelineId, args.id));
|
|
28
|
+
this.display(() => this.log(formatPipelineQualityGateDetail(gate)));
|
|
29
|
+
return gate;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=get.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
2
|
+
import { assertRequired } from '../../../../lib/assert.js';
|
|
3
|
+
import { displayListPagination } from '../../../../lib/list-pagination.js';
|
|
4
|
+
import { pipelineQualityGateListFlags } from '../../../../lib/pipeline-quality-gate-flags.js';
|
|
5
|
+
import { fetchPipelineQualityGates } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
|
+
import { formatPipelineQualityGateTable, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
7
|
+
export default class PipelineQualityGateList extends AgentiaCommand {
|
|
8
|
+
static description = 'List Copado pipeline quality gates';
|
|
9
|
+
static examples = [
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id>',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> --pipeline-id <pipeline-id> --tool Selenium --json',
|
|
12
|
+
];
|
|
13
|
+
static flags = pipelineQualityGateListFlags;
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags } = await this.parse(PipelineQualityGateList);
|
|
16
|
+
const pipelineId = assertRequired(flags['pipeline-id'], '--pipeline-id');
|
|
17
|
+
const page = await this.withSpinner('Fetching pipeline quality gates', () => fetchPipelineQualityGates(pipelineId, {
|
|
18
|
+
cursor: flags.cursor,
|
|
19
|
+
name: flags.name,
|
|
20
|
+
pageSize: flags['page-size'],
|
|
21
|
+
tool: flags.tool,
|
|
22
|
+
}));
|
|
23
|
+
this.display(() => {
|
|
24
|
+
if (page.data.length === 0) {
|
|
25
|
+
this.log('No pipeline quality gates found.');
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this.log(formatPipelineQualityGateTable(page.data));
|
|
29
|
+
displayListPagination(this.log.bind(this), page);
|
|
30
|
+
});
|
|
31
|
+
return page;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { openNavigationTarget } from '../../../../lib/navigation-open.js';
|
|
4
|
+
import { resolveNavigationTarget } from '../../../../lib/navigation.js';
|
|
5
|
+
import { assertSalesforceLifecycleId } from '../../../../lib/pipeline-lifecycle-id.js';
|
|
6
|
+
export default class PipelineQualityGateOpen extends AgentiaCommand {
|
|
7
|
+
static args = {
|
|
8
|
+
id: Args.string({
|
|
9
|
+
description: 'Quality gate Salesforce ID',
|
|
10
|
+
required: true,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
13
|
+
static description = 'Open a Copado pipeline quality gate in the browser';
|
|
14
|
+
static examples = [
|
|
15
|
+
'<%= config.bin %> <%= command.id %> <rule-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <rule-id> --json',
|
|
17
|
+
];
|
|
18
|
+
async run() {
|
|
19
|
+
const { args } = await this.parse(PipelineQualityGateOpen);
|
|
20
|
+
let ruleId;
|
|
21
|
+
try {
|
|
22
|
+
ruleId = assertSalesforceLifecycleId(args.id, 'Quality gate ID');
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 2 });
|
|
26
|
+
}
|
|
27
|
+
const target = await this.withSpinner('Resolving navigation URL', () => resolveNavigationTarget({
|
|
28
|
+
id: ruleId,
|
|
29
|
+
resourceType: 'quality_gate_rule',
|
|
30
|
+
}));
|
|
31
|
+
await openNavigationTarget(target, {
|
|
32
|
+
jsonEnabled: this.jsonEnabled(),
|
|
33
|
+
log: this.log.bind(this),
|
|
34
|
+
});
|
|
35
|
+
return target;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=open.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Args } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { assertRequired } from '../../../../lib/assert.js';
|
|
4
|
+
import { buildPipelineQualityGateUpdatePayload, pipelineQualityGateUpdateFlags, } from '../../../../lib/pipeline-quality-gate-flags.js';
|
|
5
|
+
import { updatePipelineQualityGate } from '../../../../lib/pipeline-quality-gate-ops.js';
|
|
6
|
+
import { formatPipelineQualityGateDetail, } from '../../../../lib/pipeline-quality-gate-types.js';
|
|
7
|
+
export default class PipelineQualityGateUpdate extends AgentiaCommand {
|
|
8
|
+
static args = {
|
|
9
|
+
id: Args.string({
|
|
10
|
+
description: 'Quality gate ID or name',
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
static description = 'Update an inactive Copado pipeline quality gate';
|
|
15
|
+
static examples = [
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <rule-id> --pipeline-id <pipeline-id> --execution-sequence Before',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> <rule-id> --pipeline-id <pipeline-id> --environment-id <env-id> --json',
|
|
18
|
+
];
|
|
19
|
+
static flags = pipelineQualityGateUpdateFlags;
|
|
20
|
+
async run() {
|
|
21
|
+
const { args, flags } = await this.parse(PipelineQualityGateUpdate);
|
|
22
|
+
const pipelineId = assertRequired(flags['pipeline-id'], '--pipeline-id');
|
|
23
|
+
let payload;
|
|
24
|
+
try {
|
|
25
|
+
payload = await buildPipelineQualityGateUpdatePayload(flags);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
this.error(error instanceof Error ? error.message : String(error), { exit: 2 });
|
|
29
|
+
}
|
|
30
|
+
const updated = await this.withSpinner('Updating pipeline quality gate', () => updatePipelineQualityGate(pipelineId, args.id, payload));
|
|
31
|
+
this.display(() => {
|
|
32
|
+
this.log(`Updated quality gate (ID: ${updated.id ?? args.id}).`);
|
|
33
|
+
this.log(formatPipelineQualityGateDetail(updated));
|
|
34
|
+
});
|
|
35
|
+
return updated;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=update.js.map
|
|
@@ -9,6 +9,7 @@ export default class WorkCreate extends AgentiaCommand {
|
|
|
9
9
|
static description = 'Create a Copado user story';
|
|
10
10
|
static examples = [
|
|
11
11
|
'<%= config.bin %> <%= command.id %> --title "My story" --status Draft',
|
|
12
|
+
'<%= config.bin %> <%= command.id %> --title "My story" --custom-field JIRA_Key__c=CICD-1',
|
|
12
13
|
'<%= config.bin %> <%= command.id %> --title "My story" --json',
|
|
13
14
|
];
|
|
14
15
|
static flags = workMutationFlags;
|
|
@@ -10,27 +10,28 @@ export default class WorkEnvironmentSync extends AgentiaCommand {
|
|
|
10
10
|
'Resolves the next-environment Git branch from --destination-environment or --dev-org-branch (the dest pipeline connection destinationBranch, or that destination environment\'s outbound branch).',
|
|
11
11
|
'Merges origin/<next-env> with --no-ff --no-commit, restores every other path from HEAD, commits the guessed pathspecs,',
|
|
12
12
|
'and pushes the dest org branch (and the feature branch when HEAD starts with feature/).',
|
|
13
|
-
'If guessed pathspecs still conflict, PATCH the back-promotion status to Merge Conflict, resolve the files, and re-run with --
|
|
14
|
-
'To discard a conflicted merge, re-run with --
|
|
15
|
-
'After a successful sync, PATCH the back-promotion status to Completed.',
|
|
13
|
+
'If guessed pathspecs still conflict, PATCH the back-promotion status to Merge Conflict, store lastEnvironmentSyncName, resolve the files, and re-run with --continue (optional --promotion). The promotion destination environment supplies the dest org branch and the next-env branch.',
|
|
14
|
+
'To discard a conflicted merge, re-run with --abort (optional --promotion); runs git merge --abort and sets the back-promotion status to Draft.',
|
|
15
|
+
'After a successful sync, PATCH the back-promotion status to Completed and clear lastEnvironmentSyncName.',
|
|
16
16
|
'On git/merge failure (including conflicts) and after a successful --continue, uploads the captured command transcript as a Salesforce File on the back-promotion (`Environment Sync Logs <name-or-id> <datetime>.txt`) via `/agentia/headless/file/upload`. HTTP 404 is ignored until that endpoint is rolled out; other upload failures are warned and do not change the environment-sync outcome.',
|
|
17
17
|
].join(' ');
|
|
18
18
|
static examples = [
|
|
19
19
|
'<%= config.bin %> <%= command.id %> --destination-environment=dev1',
|
|
20
20
|
'<%= config.bin %> <%= command.id %> --dev-org-branch=dev1-sfp',
|
|
21
|
+
'<%= config.bin %> <%= command.id %> --continue',
|
|
22
|
+
'<%= config.bin %> <%= command.id %> --abort',
|
|
21
23
|
'<%= config.bin %> <%= command.id %> --promotion=P29334 --continue',
|
|
22
|
-
'<%= config.bin %> <%= command.id %> --promotion=P29334 --abort',
|
|
23
24
|
'<%= config.bin %> <%= command.id %> --destination-environment=dev1 --json',
|
|
24
25
|
];
|
|
25
26
|
static flags = {
|
|
26
27
|
abort: Flags.boolean({
|
|
27
28
|
default: false,
|
|
28
|
-
description: 'Abort an in-progress merge (`git merge --abort`) and set the back-promotion status to Draft.
|
|
29
|
+
description: 'Abort an in-progress merge (`git merge --abort`) and set the back-promotion status to Draft. Uses --promotion or lastEnvironmentSyncName. Exclusive with --continue.',
|
|
29
30
|
exclusive: ['continue'],
|
|
30
31
|
}),
|
|
31
32
|
continue: Flags.boolean({
|
|
32
33
|
default: false,
|
|
33
|
-
description: 'Finish after merge conflicts. If the merge is still in progress (conflicts fixed and staged, but not committed), commits it; if you already committed, continues from there through the remaining git steps.',
|
|
34
|
+
description: 'Finish after merge conflicts. If the merge is still in progress (conflicts fixed and staged, but not committed), commits it; if you already committed, continues from there through the remaining git steps. Uses --promotion or lastEnvironmentSyncName.',
|
|
34
35
|
exclusive: ['abort'],
|
|
35
36
|
}),
|
|
36
37
|
'destination-credential': Flags.string({
|
|
@@ -48,7 +49,7 @@ export default class WorkEnvironmentSync extends AgentiaCommand {
|
|
|
48
49
|
description: 'Pipeline ID. Defaults to the active work item from `cicd work set`.',
|
|
49
50
|
}),
|
|
50
51
|
promotion: Flags.string({
|
|
51
|
-
description: 'Back-promotion Id or name to PATCH when this run stops on merge conflicts, finishes successfully, continues, or aborts.
|
|
52
|
+
description: 'Back-promotion Id or name to PATCH when this run stops on merge conflicts, finishes successfully, continues, or aborts. Optional for --continue/--abort when lastEnvironmentSyncName was stored from a prior environment-sync run. Defaults to the back-promotion created in this run.',
|
|
52
53
|
}),
|
|
53
54
|
};
|
|
54
55
|
async run() {
|
|
@@ -4,6 +4,7 @@ import { CicdGateway } from '../../../lib/cicd-gateway.js';
|
|
|
4
4
|
import { reconcileWorkSetCredential } from '../../../lib/credential-sync.js';
|
|
5
5
|
import { writeLastWorkSelection } from '../../../lib/defaults-store.js';
|
|
6
6
|
import { checkoutFeatureBranch, fetchOriginBranch, fetchOriginBranchIfExists, listPendingChanges, } from '../../../lib/git-worktree.js';
|
|
7
|
+
import { withLocalDevelopmentFlow } from '../../../lib/work-local-development-flow.js';
|
|
7
8
|
import { performWorkSetNone, WorkSetNoneValidationError } from '../../../lib/work-set-none.js';
|
|
8
9
|
import { isWorkSetWarning, parseWorkSetSelection, toWorkSetWarningResult, writeWorkSetWarningSelection, } from '../../../lib/work-set-selection.js';
|
|
9
10
|
import { featureBranchName, workSetEndpoint, } from '../../../lib/work-types.js';
|
|
@@ -14,7 +15,7 @@ export default class WorkSet extends AgentiaCommand {
|
|
|
14
15
|
required: false,
|
|
15
16
|
}),
|
|
16
17
|
};
|
|
17
|
-
static description = [
|
|
18
|
+
static description = withLocalDevelopmentFlow([
|
|
18
19
|
'Set the active work item and prepare a local feature branch.',
|
|
19
20
|
'Calls the CICD gateway work/set endpoint, requires a clean tracked working tree,',
|
|
20
21
|
'fetches the work item base branch from origin, fetches the feature branch when it',
|
|
@@ -23,11 +24,12 @@ export default class WorkSet extends AgentiaCommand {
|
|
|
23
24
|
'A gateway warning prints the message, skips git, clears lastBaseBranch/lastDevOrgBranch/lastPullRequestBaseUrl,',
|
|
24
25
|
'and records lastWorkItemId/lastWorkItem/lastWorkItemTitle from the returned work item.',
|
|
25
26
|
'After work/set returns, compares the Story source credential with the CICD project default:',
|
|
26
|
-
'warns when the
|
|
27
|
-
'when they differ (shows the current credential and environment;
|
|
27
|
+
'warns when the Story credential is missing, skips comparison when a bound Story has no project default,',
|
|
28
|
+
'and warns without changing the Story when they differ (shows the current credential and environment;',
|
|
29
|
+
'use work update to change it).',
|
|
28
30
|
'With --none, clears every last* key from `.agentia/config.user.json` and checks out',
|
|
29
31
|
'the previous lastBaseBranch when present, else main, else master, else stays put.',
|
|
30
|
-
].join(' ');
|
|
32
|
+
].join(' '));
|
|
31
33
|
static examples = [
|
|
32
34
|
'<%= config.bin %> <%= command.id %> a0SKC000000CmZ2AU',
|
|
33
35
|
'<%= config.bin %> <%= command.id %> US-0001 --json',
|
|
@@ -9,13 +9,14 @@ import { LocalQualityGatesError, resolveLocalQualityGatesScript, runLocalQuality
|
|
|
9
9
|
import { openUrl } from '../../../lib/open-browser.js';
|
|
10
10
|
import { resolveWorkItemId } from '../../../lib/work-active.js';
|
|
11
11
|
import { pickWorkDoneFlags, runWorkDone, workDoneFlags } from '../../../lib/work-done.js';
|
|
12
|
+
import { withLocalDevelopmentFlow } from '../../../lib/work-local-development-flow.js';
|
|
12
13
|
import { reportLocalQualityGatesFailure, reportLocalQualityGatesOutcome, } from '../../../lib/work-local-run-tests.js';
|
|
13
14
|
import { performWorkPush, resolveActiveFeatureWorkItem, resolveWorkPushContext, resolveWorkPushNeed, uploadCapturedPublishLogsBestEffort, WorkPushValidationError, } from '../../../lib/work-push.js';
|
|
14
15
|
import { reportSubmitUserStoriesAheadBehind } from '../../../lib/work-submit-ahead-behind.js';
|
|
15
16
|
import { waitForPendingCommitJobBeforeSubmit } from '../../../lib/work-submit-wait.js';
|
|
16
17
|
import { buildPullRequestCompareUrl, formatWorkCommandMessage, workSubmitEndpoint, } from '../../../lib/work-types.js';
|
|
17
18
|
export default class WorkSubmit extends AgentiaCommand {
|
|
18
|
-
static description = [
|
|
19
|
+
static description = withLocalDevelopmentFlow([
|
|
19
20
|
'Submit the current feature/<lastWorkItem> work item for pipeline quality gates and validation.',
|
|
20
21
|
'Runs project-root .agentia_quality_gates.sh (macOS/Linux) or .agentia_quality_gates.cmd (Windows) when present,',
|
|
21
22
|
'pushes and registers commits when the branch is ahead of origin, then calls headless work/submit',
|
|
@@ -25,7 +26,7 @@ export default class WorkSubmit extends AgentiaCommand {
|
|
|
25
26
|
'After a successful submit or promote, uploads the captured command output as a Salesforce File on the user story (`Local Commit Logs <commitId> <datetime>.txt`) via `/agentia/headless/file/upload`. HTTP 404 is ignored until that endpoint is rolled out; other upload failures are warned and do not fail the command.',
|
|
26
27
|
'With --done or --deploy, matches Copado UI Submit when promoting (validate=false / headless work/done).',
|
|
27
28
|
'cicd work done is a compatibility alias of this command with --done.',
|
|
28
|
-
].join(' ');
|
|
29
|
+
].join(' '));
|
|
29
30
|
static examples = [
|
|
30
31
|
'<%= config.bin %> <%= command.id %>',
|
|
31
32
|
'<%= config.bin %> <%= command.id %> --apex-test-classes=MyTest,OtherTest',
|
|
@@ -14,6 +14,7 @@ export default class WorkUpdate extends AgentiaCommand {
|
|
|
14
14
|
static description = 'Update a Copado user story by ID';
|
|
15
15
|
static examples = [
|
|
16
16
|
'<%= config.bin %> <%= command.id %> --title "Updated story"',
|
|
17
|
+
'<%= config.bin %> <%= command.id %> --custom-field JIRA_Key__c=CICD-1',
|
|
17
18
|
'<%= config.bin %> <%= command.id %> a0SKC000000CmZ2AU --title "Updated story"',
|
|
18
19
|
'<%= config.bin %> <%= command.id %> a0SKC000000CmZ2AU --status "In Progress" --json',
|
|
19
20
|
];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { confirm } from '@inquirer/prompts';
|
|
2
2
|
import { Args, Flags } from '@oclif/core';
|
|
3
3
|
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
4
|
-
import { assessInstalls, enforceInstalls, parseInstallArguments, PluginTrustError, stockInstallArguments
|
|
4
|
+
import { assessInstalls, enforceInstalls, parseInstallArguments, PluginTrustError, stockInstallArguments } from '../../lib/plugin-trust/gate.js';
|
|
5
5
|
export default class PluginsInstall extends AgentiaCommand {
|
|
6
6
|
static aliases = ['plugins:add'];
|
|
7
7
|
static args = {
|
|
@@ -11,7 +11,7 @@ export default class PluginsInstall extends AgentiaCommand {
|
|
|
11
11
|
|
|
12
12
|
Official and Verified plugins install without a prompt. Community, unlisted, and git URL plugins ask first. Use --allow-unverified when there is no terminal or with --json.
|
|
13
13
|
|
|
14
|
-
A revoked version, or an npm tarball that differs from the hash in the catalog, is always refused. If the catalog cannot be reached, the command warns and
|
|
14
|
+
A revoked version, or an npm tarball that differs from the hash in the catalog, is always refused. If the catalog cannot be reached, plugins cannot be checked, so the command warns and asks first, even for Official and Verified plugins. Use --allow-unverified to install without the check.`;
|
|
15
15
|
static examples = [
|
|
16
16
|
'<%= config.bin %> <%= command.id %> @acme/agentia-plugin-x',
|
|
17
17
|
'<%= config.bin %> <%= command.id %> @acme/agentia-plugin-x@1.2.0 --allow-unverified --json',
|
|
@@ -35,9 +35,6 @@ A revoked version, or an npm tarball that differs from the hash in the catalog,
|
|
|
35
35
|
const registryVariable = this.config.scopedEnvVarKey('NPM_REGISTRY');
|
|
36
36
|
const customRegistry = Boolean(process.env[registryVariable]);
|
|
37
37
|
const { assessments } = await assessInstalls(inputs, { resolve: !customRegistry });
|
|
38
|
-
const skipped = uncheckedWarning(assessments);
|
|
39
|
-
if (skipped)
|
|
40
|
-
this.display(() => this.warn(skipped));
|
|
41
38
|
if (customRegistry)
|
|
42
39
|
this.display(() => this.warn(`${registryVariable} is set, so versions cannot be checked against the catalog.`));
|
|
43
40
|
plugins = await enforceInstalls(assessments, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { createPluginSkillLoader, pluginRefsFromConfig, selectPluginSkills, } from '../../../lib/plugin-skills.js';
|
|
3
4
|
import { createInquirerSetupPrompts, isPromptCanceled } from '../../../lib/setup-prompts.js';
|
|
4
5
|
import { resolveSelectedSkillPacks, runSetupSkills, SETUP_SKILL_TARGETS, } from '../../../lib/setup-skills.js';
|
|
5
6
|
export default class SetupSkillsCreate extends AgentiaCommand {
|
|
@@ -10,6 +11,7 @@ export default class SetupSkillsCreate extends AgentiaCommand {
|
|
|
10
11
|
'<%= config.bin %> <%= command.id %> --cicd --target agents --no-prompt',
|
|
11
12
|
'<%= config.bin %> <%= command.id %> --testing --ai --target cursor --no-prompt',
|
|
12
13
|
'<%= config.bin %> <%= command.id %> --json',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --plugin @acme/agentia-plugin-release --target cursor --no-prompt',
|
|
13
15
|
];
|
|
14
16
|
static flags = {
|
|
15
17
|
adv: Flags.boolean({
|
|
@@ -30,6 +32,10 @@ export default class SetupSkillsCreate extends AgentiaCommand {
|
|
|
30
32
|
default: false,
|
|
31
33
|
description: 'Skip interactive prompts; defaults the target to .agents/skills when --target is omitted',
|
|
32
34
|
}),
|
|
35
|
+
plugin: Flags.string({
|
|
36
|
+
description: 'Also install the skills this installed plugin contributes through its agentia:contribute hook (repeatable). Without pack flags only plugin skills are written',
|
|
37
|
+
multiple: true,
|
|
38
|
+
}),
|
|
33
39
|
target: Flags.string({
|
|
34
40
|
description: 'Project skill root to write (repeatable)',
|
|
35
41
|
multiple: true,
|
|
@@ -43,8 +49,17 @@ export default class SetupSkillsCreate extends AgentiaCommand {
|
|
|
43
49
|
const { flags } = await this.parse(SetupSkillsCreate);
|
|
44
50
|
const noPrompt = flags['no-prompt'] || this.jsonEnabled();
|
|
45
51
|
try {
|
|
46
|
-
|
|
52
|
+
const pluginNames = flags.plugin ?? [];
|
|
53
|
+
const hasPackFlag = flags.adv || flags.ai || flags.cicd || flags.testing;
|
|
54
|
+
const packs = pluginNames.length > 0 && !hasPackFlag ? [] : resolveSelectedSkillPacks(flags);
|
|
55
|
+
// The agentia:contribute hook runs only through this loader, once, and only when plugin skills are needed.
|
|
56
|
+
const loadPluginSkills = createPluginSkillLoader(this.config);
|
|
57
|
+
const plugin = pluginNames.length > 0
|
|
58
|
+
? await selectPluginSkills(pluginRefsFromConfig(this.config), pluginNames, loadPluginSkills)
|
|
59
|
+
: undefined;
|
|
60
|
+
const result = await runSetupSkills({
|
|
47
61
|
force: flags.force,
|
|
62
|
+
loadPluginSkills,
|
|
48
63
|
log: (message) => {
|
|
49
64
|
this.display(() => {
|
|
50
65
|
this.log(message);
|
|
@@ -52,11 +67,22 @@ export default class SetupSkillsCreate extends AgentiaCommand {
|
|
|
52
67
|
},
|
|
53
68
|
mode: 'create',
|
|
54
69
|
noPrompt,
|
|
55
|
-
|
|
70
|
+
offerPluginSkills: pluginNames.length === 0 && !hasPackFlag,
|
|
71
|
+
packs,
|
|
72
|
+
pluginRefs: pluginRefsFromConfig(this.config),
|
|
73
|
+
pluginSkills: plugin?.skills,
|
|
74
|
+
rules: packs.length > 0,
|
|
75
|
+
skippedPluginSkills: plugin?.skipped,
|
|
56
76
|
targets: flags.target,
|
|
57
77
|
}, {
|
|
58
78
|
prompts: noPrompt ? undefined : createInquirerSetupPrompts(),
|
|
59
79
|
});
|
|
80
|
+
for (const item of result.skippedPluginSkills) {
|
|
81
|
+
this.display(() => {
|
|
82
|
+
this.warn(`Skipped plugin skill ${item.plugin}/${item.skill}: ${item.reason}`);
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
return result;
|
|
60
86
|
}
|
|
61
87
|
catch (error) {
|
|
62
88
|
if (isPromptCanceled(error)) {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { createPluginSkillLoader, pluginRefsFromConfig, selectPluginSkills, } from '../../../lib/plugin-skills.js';
|
|
4
|
+
export default class SetupSkillsList extends AgentiaCommand {
|
|
5
|
+
static description = 'List skills that installed plugins contribute through their agentia:contribute hook (what "setup skills create|update --plugin" can install) and why invalid ones are skipped';
|
|
6
|
+
static examples = [
|
|
7
|
+
'<%= config.bin %> <%= command.id %>',
|
|
8
|
+
'<%= config.bin %> <%= command.id %> --plugin @acme/agentia-plugin-release --json',
|
|
9
|
+
];
|
|
10
|
+
static flags = {
|
|
11
|
+
plugin: Flags.string({
|
|
12
|
+
description: 'Only list skills from this installed plugin (repeatable)',
|
|
13
|
+
multiple: true,
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
async run() {
|
|
17
|
+
const { flags } = await this.parse(SetupSkillsList);
|
|
18
|
+
const plugins = pluginRefsFromConfig(this.config);
|
|
19
|
+
const load = createPluginSkillLoader(this.config);
|
|
20
|
+
let discovery;
|
|
21
|
+
try {
|
|
22
|
+
discovery =
|
|
23
|
+
flags.plugin && flags.plugin.length > 0
|
|
24
|
+
? await selectPluginSkills(plugins, flags.plugin, load)
|
|
25
|
+
: await load();
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
this.error(error.message, { exit: 1 });
|
|
29
|
+
}
|
|
30
|
+
const result = {
|
|
31
|
+
skills: discovery.skills.map((skill) => ({
|
|
32
|
+
description: skill.description,
|
|
33
|
+
files: skill.files.length,
|
|
34
|
+
id: skill.id,
|
|
35
|
+
plugin: skill.plugin,
|
|
36
|
+
skill: skill.name,
|
|
37
|
+
version: skill.version,
|
|
38
|
+
})),
|
|
39
|
+
skipped: discovery.skipped,
|
|
40
|
+
};
|
|
41
|
+
this.display(() => {
|
|
42
|
+
if (result.skills.length === 0 && result.skipped.length === 0) {
|
|
43
|
+
this.log('No installed plugin ships skills.');
|
|
44
|
+
}
|
|
45
|
+
for (const item of result.skills) {
|
|
46
|
+
this.log(`${item.skill} (${item.plugin}@${item.version}, ${item.files} files): ${item.description}`);
|
|
47
|
+
}
|
|
48
|
+
for (const item of result.skipped) {
|
|
49
|
+
this.log(`skipped ${item.plugin}/${item.skill}: ${item.reason}`);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
return result;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
+
import { createPluginSkillLoader, pluginRefsFromConfig, selectPluginSkills, } from '../../../lib/plugin-skills.js';
|
|
3
4
|
import { createInquirerSetupPrompts, isPromptCanceled } from '../../../lib/setup-prompts.js';
|
|
4
5
|
import { resolveSelectedSkillPacks, runSetupSkills, SETUP_SKILL_TARGETS, } from '../../../lib/setup-skills.js';
|
|
5
6
|
export default class SetupSkillsUpdate extends AgentiaCommand {
|
|
6
|
-
static description = 'Update Agentia-managed Markdown skill files and restore missing files in this project';
|
|
7
|
+
static description = 'Update Agentia-managed Markdown skill files and restore missing files in this project; without flags it also refreshes plugin skills already installed';
|
|
7
8
|
static examples = [
|
|
8
9
|
'<%= config.bin %> <%= command.id %>',
|
|
9
10
|
'<%= config.bin %> <%= command.id %> --ai --target cursor --no-prompt',
|
|
10
11
|
'<%= config.bin %> <%= command.id %> --adv --target agents --no-prompt',
|
|
11
12
|
'<%= config.bin %> <%= command.id %> --cicd --testing --target agents --no-prompt',
|
|
12
13
|
'<%= config.bin %> <%= command.id %> --force --json',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> --prune --target cursor --no-prompt',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> --plugin @acme/agentia-plugin-release --target cursor --no-prompt',
|
|
13
16
|
];
|
|
14
17
|
static flags = {
|
|
15
18
|
adv: Flags.boolean({
|
|
@@ -30,6 +33,15 @@ export default class SetupSkillsUpdate extends AgentiaCommand {
|
|
|
30
33
|
default: false,
|
|
31
34
|
description: 'Skip interactive prompts; defaults the target to .agents/skills when --target is omitted',
|
|
32
35
|
}),
|
|
36
|
+
plugin: Flags.string({
|
|
37
|
+
description: 'Also install the skills this installed plugin contributes through its agentia:contribute hook (repeatable). Without pack flags only plugin skills are written',
|
|
38
|
+
multiple: true,
|
|
39
|
+
}),
|
|
40
|
+
prune: Flags.boolean({
|
|
41
|
+
default: false,
|
|
42
|
+
description: 'Also delete installed plugin skills whose plugin is uninstalled or no longer contributes them (only files carrying that plugin\'s managed marker)',
|
|
43
|
+
exclusive: ['plugin'],
|
|
44
|
+
}),
|
|
33
45
|
target: Flags.string({
|
|
34
46
|
description: 'Project skill root to write (repeatable)',
|
|
35
47
|
multiple: true,
|
|
@@ -43,8 +55,17 @@ export default class SetupSkillsUpdate extends AgentiaCommand {
|
|
|
43
55
|
const { flags } = await this.parse(SetupSkillsUpdate);
|
|
44
56
|
const noPrompt = flags['no-prompt'] || this.jsonEnabled();
|
|
45
57
|
try {
|
|
46
|
-
|
|
58
|
+
const pluginNames = flags.plugin ?? [];
|
|
59
|
+
const hasPackFlag = flags.adv || flags.ai || flags.cicd || flags.testing;
|
|
60
|
+
const packs = pluginNames.length > 0 && !hasPackFlag ? [] : resolveSelectedSkillPacks(flags);
|
|
61
|
+
// The agentia:contribute hook runs only through this loader, once, and only when plugin skills are needed.
|
|
62
|
+
const loadPluginSkills = createPluginSkillLoader(this.config);
|
|
63
|
+
const plugin = pluginNames.length > 0
|
|
64
|
+
? await selectPluginSkills(pluginRefsFromConfig(this.config), pluginNames, loadPluginSkills)
|
|
65
|
+
: undefined;
|
|
66
|
+
const result = await runSetupSkills({
|
|
47
67
|
force: flags.force,
|
|
68
|
+
loadPluginSkills,
|
|
48
69
|
log: (message) => {
|
|
49
70
|
this.display(() => {
|
|
50
71
|
this.log(message);
|
|
@@ -52,11 +73,23 @@ export default class SetupSkillsUpdate extends AgentiaCommand {
|
|
|
52
73
|
},
|
|
53
74
|
mode: 'update',
|
|
54
75
|
noPrompt,
|
|
55
|
-
packs
|
|
76
|
+
packs,
|
|
77
|
+
pluginRefs: pluginRefsFromConfig(this.config),
|
|
78
|
+
pluginSkills: plugin?.skills,
|
|
79
|
+
prune: flags.prune,
|
|
80
|
+
refreshPlugins: pluginNames.length === 0 && !hasPackFlag,
|
|
81
|
+
rules: packs.length > 0,
|
|
82
|
+
skippedPluginSkills: plugin?.skipped,
|
|
56
83
|
targets: flags.target,
|
|
57
84
|
}, {
|
|
58
85
|
prompts: noPrompt ? undefined : createInquirerSetupPrompts(),
|
|
59
86
|
});
|
|
87
|
+
for (const item of result.skippedPluginSkills) {
|
|
88
|
+
this.display(() => {
|
|
89
|
+
this.warn(`Skipped plugin skill ${item.plugin}/${item.skill}: ${item.reason}`);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
return result;
|
|
60
93
|
}
|
|
61
94
|
catch (error) {
|
|
62
95
|
if (isPromptCanceled(error)) {
|
package/dist/commands/setup.js
CHANGED
|
@@ -6,8 +6,8 @@ import { runSetupWizard } from '../lib/setup-wizard.js';
|
|
|
6
6
|
export default class Setup extends AgentiaCommand {
|
|
7
7
|
static description = [
|
|
8
8
|
'Prepare this machine and the current project for Agentia.',
|
|
9
|
-
'Guides CICD, AI, and CRT authentication, Cursor MCP, local quality gates, Agent Skills, agent rules, and removal of a legacy AGENTS.md section.',
|
|
10
|
-
'Use --skip-auth to skip authentication and continue with Cursor MCP and project setup.',
|
|
9
|
+
'Guides CICD, AI, and CRT authentication, Cursor and Claude Code MCP, local quality gates, Agent Skills, agent rules, and removal of a legacy AGENTS.md section.',
|
|
10
|
+
'Use --skip-auth to skip authentication and continue with Cursor and Claude Code MCP and project setup.',
|
|
11
11
|
'Git is optional: .gitignore is updated only inside a repository, and generated files are not committed.',
|
|
12
12
|
].join(' ');
|
|
13
13
|
static enableJsonFlag = false;
|
|
@@ -18,7 +18,7 @@ export default class Setup extends AgentiaCommand {
|
|
|
18
18
|
static flags = {
|
|
19
19
|
'skip-auth': Flags.boolean({
|
|
20
20
|
default: false,
|
|
21
|
-
description: 'Skip CICD, AI, and CRT authentication; continue with Cursor MCP and project setup',
|
|
21
|
+
description: 'Skip CICD, AI, and CRT authentication; continue with Cursor and Claude Code MCP and project setup',
|
|
22
22
|
}),
|
|
23
23
|
};
|
|
24
24
|
async run() {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, } from '../../../lib/testing-data-
|
|
5
|
-
import { createTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
4
|
+
import { createTestingDataTable, formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, } from '../../../lib/testing-data-table.js';
|
|
6
5
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
6
|
export default class TestingDataTableCreate extends AgentiaCommand {
|
|
8
7
|
static description = 'Create a Copado Robotic Testing data table';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
3
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { testingDataJobFlag } from '../../../lib/testing-data-
|
|
5
|
-
import { deleteTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
4
|
+
import { deleteTestingDataTable, testingDataJobFlag } from '../../../lib/testing-data-table.js';
|
|
6
5
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
6
|
export default class TestingDataTableDelete extends AgentiaCommand {
|
|
8
7
|
static args = {
|
|
@@ -2,11 +2,7 @@ import { Args, Flags } from '@oclif/core';
|
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
4
4
|
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
5
|
-
import { testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-
|
|
6
|
-
import { parseTestingDatasetSelector, sliceTestingDataTable, unwrapTestingDataHeaders, } from '../../../lib/testing-data-core.js';
|
|
7
|
-
import { normalizeTestingDataPath, writeTestingDataFile } from '../../../lib/testing-data-export.js';
|
|
8
|
-
import { getTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
9
|
-
import { TESTING_DATA_EXPORT_FORMATS } from '../../../lib/testing-data-types.js';
|
|
5
|
+
import { getTestingDataTable, normalizeTestingDataPath, selectTestingDataTableDatasets, TESTING_DATA_EXPORT_FORMATS, testingDataJobFlag, testingDataRevisionFlag, unwrapTestingDataHeaders, writeTestingDataFile, } from '../../../lib/testing-data-table.js';
|
|
10
6
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
11
7
|
export default class TestingDataTableExport extends AgentiaCommand {
|
|
12
8
|
static args = {
|
|
@@ -48,7 +44,7 @@ export default class TestingDataTableExport extends AgentiaCommand {
|
|
|
48
44
|
tableId: args.id,
|
|
49
45
|
version: flags.revision,
|
|
50
46
|
}));
|
|
51
|
-
const selected =
|
|
47
|
+
const selected = selectTestingDataTableDatasets(table, flags.datasets);
|
|
52
48
|
if (selected.data === undefined)
|
|
53
49
|
throw new Error(`Data table ${args.id} has no data to export.`);
|
|
54
50
|
const result = await writeTestingDataFile(output, unwrapTestingDataHeaders(selected.data), flags.format);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { formatTestingDataTableHuman, testingDataJobFlag, testingDataRevisionFlag, } from '../../../lib/testing-data-
|
|
4
|
-
import { parseTestingDatasetSelector, sliceTestingDataTable } from '../../../lib/testing-data-core.js';
|
|
5
|
-
import { getTestingDataTable } from '../../../lib/testing-data-operations.js';
|
|
3
|
+
import { formatTestingDataTableHuman, getTestingDataTable, selectTestingDataTableDatasets, testingDataJobFlag, testingDataRevisionFlag, } from '../../../lib/testing-data-table.js';
|
|
6
4
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
7
5
|
export default class TestingDataTableGet extends AgentiaCommand {
|
|
8
6
|
static args = {
|
|
@@ -27,7 +25,7 @@ export default class TestingDataTableGet extends AgentiaCommand {
|
|
|
27
25
|
tableId: args.id,
|
|
28
26
|
version: flags.revision,
|
|
29
27
|
}));
|
|
30
|
-
const selected =
|
|
28
|
+
const selected = selectTestingDataTableDatasets(table, flags.datasets);
|
|
31
29
|
this.display(() => this.log(formatTestingDataTableHuman(selected)));
|
|
32
30
|
return { projectId: flags.project, table: selected };
|
|
33
31
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-
|
|
4
|
-
import { listTestingDataTables } from '../../../lib/testing-data-operations.js';
|
|
3
|
+
import { listTestingDataTables, testingDataJobFlag, testingDataRevisionFlag } from '../../../lib/testing-data-table.js';
|
|
5
4
|
import { testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
6
5
|
import { formatTestingTable } from '../../../lib/testing-types.js';
|
|
7
6
|
export default class TestingDataTableList extends AgentiaCommand {
|