@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
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '
|
|
3
|
-
import { testingJobFlag, testingLogOptionFlags, testingOutputFlags, testingProjectFlag, } from '
|
|
4
|
-
import { getTestingBuildLogs } from '
|
|
5
|
-
export default class
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { testingJobFlag, testingLogOptionFlags, testingOutputFlags, testingProjectFlag, } from '../../../../lib/testing-flags.js';
|
|
4
|
+
import { getTestingBuildLogs } from '../../../../lib/testing-operations.js';
|
|
5
|
+
export default class TestingJobRunsLogs extends AgentiaCommand {
|
|
6
6
|
static args = {
|
|
7
7
|
id: Args.integer({
|
|
8
8
|
description: 'CRT build/run ID.',
|
|
9
9
|
required: true,
|
|
10
10
|
}),
|
|
11
11
|
};
|
|
12
|
-
static
|
|
12
|
+
static deprecateAliases = true;
|
|
13
|
+
static description = 'Get logs for a Copado Robotic Testing job run';
|
|
13
14
|
static examples = [
|
|
14
15
|
'<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id>',
|
|
16
|
+
'<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id> --tail-lines 200',
|
|
15
17
|
'<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id> --output log.html --json',
|
|
16
18
|
];
|
|
17
19
|
static flags = {
|
|
@@ -20,8 +22,9 @@ export default class TestingLogs extends AgentiaCommand {
|
|
|
20
22
|
...testingLogOptionFlags,
|
|
21
23
|
...testingOutputFlags,
|
|
22
24
|
};
|
|
25
|
+
static hiddenAliases = ['testing:logs', 'testing:test:logs', 'testing:build:logs'];
|
|
23
26
|
async run() {
|
|
24
|
-
const { args, flags } = await this.parse(
|
|
27
|
+
const { args, flags } = await this.parse(TestingJobRunsLogs);
|
|
25
28
|
const result = await this.withSpinner('Fetching testing run logs', () => getTestingBuildLogs({
|
|
26
29
|
buildId: args.id,
|
|
27
30
|
container: flags.container,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '
|
|
3
|
-
import { testingJobFlag, testingProjectFlag } from '
|
|
4
|
-
import { searchTestingBuilds } from '
|
|
5
|
-
import { formatTestingBuildTable, TESTING_RUN_TYPES, } from '
|
|
6
|
-
export default class
|
|
7
|
-
static
|
|
2
|
+
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
|
+
import { testingJobFlag, testingProjectFlag } from '../../../../lib/testing-flags.js';
|
|
4
|
+
import { searchTestingBuilds } from '../../../../lib/testing-operations.js';
|
|
5
|
+
import { formatTestingBuildTable, TESTING_RUN_TYPES, } from '../../../../lib/testing-types.js';
|
|
6
|
+
export default class TestingJobRunsSearch extends AgentiaCommand {
|
|
7
|
+
static deprecateAliases = true;
|
|
8
|
+
static description = 'Search Copado Robotic Testing job run metrics';
|
|
8
9
|
static examples = [
|
|
9
10
|
'<%= config.bin %> <%= command.id %> --project <project-id> --job <job-id> --status failed',
|
|
10
11
|
'<%= config.bin %> <%= command.id %> --project <project-id> --job <job-id> --run-type regression --count --json',
|
|
@@ -27,8 +28,9 @@ export default class TestingBuildSearch extends AgentiaCommand {
|
|
|
27
28
|
status: Flags.string({ description: 'Status filter. Can be provided multiple times.', multiple: true }),
|
|
28
29
|
to: Flags.string({ description: 'Include builds at or before this ISO-8601 date or epoch value.' }),
|
|
29
30
|
};
|
|
31
|
+
static hiddenAliases = ['testing:build:search'];
|
|
30
32
|
async run() {
|
|
31
|
-
const { flags } = await this.parse(
|
|
33
|
+
const { flags } = await this.parse(TestingJobRunsSearch);
|
|
32
34
|
const result = await this.withSpinner('Searching testing builds', () => searchTestingBuilds({
|
|
33
35
|
count: flags.count,
|
|
34
36
|
from: flags.from,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Args } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
3
|
import { testingProjectFlag } from '../../../../lib/testing-flags.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getTestingJobScheduleStatus } from '../../../../lib/testing-operations.js';
|
|
5
5
|
import { formatTestingRecord } from '../../../../lib/testing-types.js';
|
|
6
6
|
export default class TestingJobScheduleGet extends AgentiaCommand {
|
|
7
7
|
static args = {
|
|
8
|
-
id: Args.integer({ description: 'CRT job
|
|
8
|
+
id: Args.integer({ description: 'CRT job ID.', required: true }),
|
|
9
9
|
};
|
|
10
|
-
static description = 'Get the schedule for a Copado Robotic Testing job
|
|
10
|
+
static description = 'Get the schedule for a Copado Robotic Testing job';
|
|
11
11
|
static examples = [
|
|
12
12
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
13
13
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
@@ -15,15 +15,9 @@ export default class TestingJobScheduleGet extends AgentiaCommand {
|
|
|
15
15
|
static flags = { ...testingProjectFlag };
|
|
16
16
|
async run() {
|
|
17
17
|
const { args, flags } = await this.parse(TestingJobScheduleGet);
|
|
18
|
-
const
|
|
19
|
-
const result = {
|
|
20
|
-
configured: schedule !== undefined,
|
|
21
|
-
jobId: args.id,
|
|
22
|
-
projectId: flags.project,
|
|
23
|
-
...(schedule === undefined ? {} : { schedule }),
|
|
24
|
-
};
|
|
18
|
+
const result = await this.withSpinner('Getting testing schedule', () => getTestingJobScheduleStatus({ jobId: args.id, projectId: flags.project }));
|
|
25
19
|
this.display(() => {
|
|
26
|
-
this.log(schedule === undefined ? 'No schedule configured.' : formatTestingRecord(schedule));
|
|
20
|
+
this.log(result.schedule === undefined ? 'No schedule configured.' : formatTestingRecord(result.schedule));
|
|
27
21
|
});
|
|
28
22
|
return result;
|
|
29
23
|
}
|
|
@@ -2,12 +2,12 @@ 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
4
|
import { testingProjectFlag } from '../../../../lib/testing-flags.js';
|
|
5
|
-
import { removeTestingJobSchedule } from '../../../../lib/testing-
|
|
5
|
+
import { removeTestingJobSchedule } from '../../../../lib/testing-operations.js';
|
|
6
6
|
export default class TestingJobScheduleRemove extends AgentiaCommand {
|
|
7
7
|
static args = {
|
|
8
|
-
id: Args.integer({ description: 'CRT job
|
|
8
|
+
id: Args.integer({ description: 'CRT job ID.', required: true }),
|
|
9
9
|
};
|
|
10
|
-
static description = 'Remove the schedule from a Copado Robotic Testing job
|
|
10
|
+
static description = 'Remove the schedule from a Copado Robotic Testing job';
|
|
11
11
|
static examples = [
|
|
12
12
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --yes',
|
|
13
13
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --yes --json',
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../../lib/agentia-command.js';
|
|
3
3
|
import { testingProjectFlag } from '../../../../lib/testing-flags.js';
|
|
4
|
-
import { setTestingJobSchedule } from '../../../../lib/testing-
|
|
4
|
+
import { setTestingJobSchedule } from '../../../../lib/testing-operations.js';
|
|
5
5
|
import { TESTING_RECORD_BUILD_OPTIONS } from '../../../../lib/testing-types.js';
|
|
6
6
|
export default class TestingJobScheduleSet extends AgentiaCommand {
|
|
7
7
|
static args = {
|
|
8
|
-
id: Args.integer({ description: 'CRT job
|
|
8
|
+
id: Args.integer({ description: 'CRT job ID.', required: true }),
|
|
9
9
|
};
|
|
10
|
-
static description = 'Create or update a Copado Robotic Testing job
|
|
10
|
+
static description = 'Create or update a Copado Robotic Testing job schedule';
|
|
11
11
|
static examples = [
|
|
12
12
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --cron "0 6 * * 1-5"',
|
|
13
13
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --cron "0 6 * * *" --timezone Europe/Helsinki --record failed --json',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Args, Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingGitStorageFlags, testingProjectFlag
|
|
4
|
-
import {
|
|
3
|
+
import { testingGitStorageFlags, testingProjectFlag } from '../../../lib/testing-flags.js';
|
|
4
|
+
import { updateTestingJob } from '../../../lib/testing-operations.js';
|
|
5
5
|
import { resolveTestingSecretInput } from '../../../lib/testing-secret-input.js';
|
|
6
6
|
import { formatTestingRecord, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, } from '../../../lib/testing-types.js';
|
|
7
7
|
export default class TestingJobUpdate extends AgentiaCommand {
|
|
8
8
|
static args = {
|
|
9
9
|
id: Args.integer({
|
|
10
|
-
description: 'CRT job
|
|
10
|
+
description: 'CRT job ID.',
|
|
11
11
|
required: true,
|
|
12
12
|
}),
|
|
13
13
|
};
|
|
14
|
-
static description = 'Update Copado Robotic Testing job
|
|
14
|
+
static description = 'Update Copado Robotic Testing job metadata';
|
|
15
15
|
static examples = [
|
|
16
16
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --name "Smoke"',
|
|
17
17
|
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --git-url https://github.com/acme/crt-tests.git --git-branch main',
|
|
@@ -22,26 +22,21 @@ export default class TestingJobUpdate extends AgentiaCommand {
|
|
|
22
22
|
...testingProjectFlag,
|
|
23
23
|
...testingGitStorageFlags,
|
|
24
24
|
'case-duration-change-detection': Flags.boolean({
|
|
25
|
-
|
|
25
|
+
allowNo: true,
|
|
26
|
+
description: 'Enable or disable duration analytics.',
|
|
26
27
|
}),
|
|
27
28
|
description: Flags.string({
|
|
28
|
-
description: 'Job
|
|
29
|
-
}),
|
|
30
|
-
'hide-video-params': Flags.boolean({
|
|
31
|
-
description: 'Hide video parameters.',
|
|
29
|
+
description: 'Job description.',
|
|
32
30
|
}),
|
|
33
31
|
name: Flags.string({
|
|
34
|
-
description: 'Job
|
|
35
|
-
}),
|
|
36
|
-
'no-case-duration-change-detection': Flags.boolean({
|
|
37
|
-
description: 'Disable case duration change detection analytics.',
|
|
32
|
+
description: 'Job name.',
|
|
38
33
|
}),
|
|
39
34
|
'parallel-mode': Flags.option({
|
|
40
35
|
description: 'Parallel execution mode.',
|
|
41
36
|
options: [...TESTING_JOB_PARALLEL_MODES],
|
|
42
37
|
})(),
|
|
43
38
|
robot: Flags.integer({
|
|
44
|
-
description: 'CRT robot ID that should execute this job
|
|
39
|
+
description: 'CRT robot ID that should execute this job.',
|
|
45
40
|
}),
|
|
46
41
|
'screen-depth': Flags.integer({
|
|
47
42
|
description: 'Screen color depth. Must be provided with --screen-width and --screen-height.',
|
|
@@ -53,7 +48,8 @@ export default class TestingJobUpdate extends AgentiaCommand {
|
|
|
53
48
|
description: 'Screen width. Must be provided with --screen-height and --screen-depth.',
|
|
54
49
|
}),
|
|
55
50
|
'show-video-params': Flags.boolean({
|
|
56
|
-
|
|
51
|
+
allowNo: true,
|
|
52
|
+
description: 'Enable or disable video streaming and recording capabilities when running the test job.',
|
|
57
53
|
}),
|
|
58
54
|
'suite-type': Flags.option({
|
|
59
55
|
description: 'CRT suite/job type.',
|
|
@@ -65,33 +61,30 @@ export default class TestingJobUpdate extends AgentiaCommand {
|
|
|
65
61
|
};
|
|
66
62
|
async run() {
|
|
67
63
|
const { args, flags } = await this.parse(TestingJobUpdate);
|
|
68
|
-
const screen = this.screenFromFlags(flags);
|
|
69
|
-
const showVideoParams = this.videoParamsFromFlags(flags);
|
|
70
|
-
const caseDurationChangeDetection = this.analyticsFromFlags(flags);
|
|
71
64
|
const gitPassword = await resolveTestingSecretInput({
|
|
72
65
|
value: flags['git-password'],
|
|
73
66
|
valueFile: flags['git-password-file'],
|
|
74
67
|
valueStdin: flags['git-password-stdin'],
|
|
75
68
|
}, { label: 'CRT Git password', required: false });
|
|
76
69
|
const job = await this.withSpinner('Updating testing job', () => updateTestingJob({
|
|
77
|
-
|
|
70
|
+
caseDurationChangeDetection: flags['case-duration-change-detection'],
|
|
78
71
|
description: flags.description,
|
|
79
72
|
domainCredentialId: flags['git-domain-credential'],
|
|
73
|
+
gitBranch: flags['git-branch'],
|
|
74
|
+
gitPassword,
|
|
75
|
+
gitTag: flags['git-tag'],
|
|
76
|
+
gitUrl: flags['git-url'],
|
|
77
|
+
gitUseCallerCredentials: flags['git-use-caller-credentials'],
|
|
78
|
+
gitUsername: flags['git-username'],
|
|
80
79
|
jobId: args.id,
|
|
81
80
|
name: flags.name,
|
|
82
81
|
parallelExecution: flags['parallel-mode'],
|
|
83
82
|
projectId: flags.project,
|
|
84
83
|
robotId: flags.robot,
|
|
85
|
-
screen,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
gitPassword,
|
|
90
|
-
gitTag: flags['git-tag'],
|
|
91
|
-
gitUrl: flags['git-url'],
|
|
92
|
-
gitUseCallerCredentials: flags['git-use-caller-credentials'],
|
|
93
|
-
gitUsername: flags['git-username'],
|
|
94
|
-
}),
|
|
84
|
+
screenDepth: flags['screen-depth'],
|
|
85
|
+
screenHeight: flags['screen-height'],
|
|
86
|
+
screenWidth: flags['screen-width'],
|
|
87
|
+
showVideoParams: flags['show-video-params'],
|
|
95
88
|
suiteType: flags['suite-type'],
|
|
96
89
|
timeout: flags.timeout,
|
|
97
90
|
}));
|
|
@@ -101,41 +94,5 @@ export default class TestingJobUpdate extends AgentiaCommand {
|
|
|
101
94
|
});
|
|
102
95
|
return job;
|
|
103
96
|
}
|
|
104
|
-
analyticsFromFlags(flags) {
|
|
105
|
-
if (flags['case-duration-change-detection'] === true && flags['no-case-duration-change-detection'] === true) {
|
|
106
|
-
this.error('Use either --case-duration-change-detection or --no-case-duration-change-detection, not both.', {
|
|
107
|
-
exit: 2,
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
if (flags['case-duration-change-detection'] === true)
|
|
111
|
-
return true;
|
|
112
|
-
if (flags['no-case-duration-change-detection'] === true)
|
|
113
|
-
return false;
|
|
114
|
-
return undefined;
|
|
115
|
-
}
|
|
116
|
-
screenFromFlags(flags) {
|
|
117
|
-
const values = [flags['screen-depth'], flags['screen-height'], flags['screen-width']];
|
|
118
|
-
const supplied = values.filter((value) => value !== undefined);
|
|
119
|
-
if (supplied.length === 0)
|
|
120
|
-
return undefined;
|
|
121
|
-
if (supplied.length !== values.length) {
|
|
122
|
-
this.error('Provide --screen-width, --screen-height, and --screen-depth together.', { exit: 2 });
|
|
123
|
-
}
|
|
124
|
-
const [depth, height, width] = values;
|
|
125
|
-
if (depth <= 0 || height <= 0 || width <= 0) {
|
|
126
|
-
this.error('Screen dimensions and depth must be positive integers.', { exit: 2 });
|
|
127
|
-
}
|
|
128
|
-
return { depth, height, width };
|
|
129
|
-
}
|
|
130
|
-
videoParamsFromFlags(flags) {
|
|
131
|
-
if (flags['show-video-params'] === true && flags['hide-video-params'] === true) {
|
|
132
|
-
this.error('Use either --show-video-params or --hide-video-params, not both.', { exit: 2 });
|
|
133
|
-
}
|
|
134
|
-
if (flags['show-video-params'] === true)
|
|
135
|
-
return true;
|
|
136
|
-
if (flags['hide-video-params'] === true)
|
|
137
|
-
return false;
|
|
138
|
-
return undefined;
|
|
139
|
-
}
|
|
140
97
|
}
|
|
141
98
|
//# sourceMappingURL=update.js.map
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
1
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { controlTestingLive } from '../../../lib/testing-live-operations.js';
|
|
2
|
+
import { runTestingLiveControlCommand, testingLiveCommonFlags, testingLiveOptionalJobArg, } from '../../../lib/testing-live-command.js';
|
|
5
3
|
export default class TestingLiveContinue extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
4
|
+
static args = testingLiveOptionalJobArg;
|
|
7
5
|
static description = 'Continue paused Robot execution in the active CRT live session';
|
|
8
6
|
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id>'];
|
|
9
7
|
static flags = testingLiveCommonFlags;
|
|
10
8
|
async run() {
|
|
11
9
|
const { args, flags } = await this.parse(TestingLiveContinue);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
sessionId: flags['session-id'],
|
|
10
|
+
return runTestingLiveControlCommand('continue', args, flags, {
|
|
11
|
+
display: (fn) => this.display(fn),
|
|
12
|
+
log: (msg) => this.log(msg),
|
|
16
13
|
});
|
|
17
|
-
this.display(() => this.log(result.message));
|
|
18
|
-
return result;
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=continue.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
3
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg } from '../../../lib/testing-live-command.js';
|
|
4
4
|
import { executeTestingLive } from '../../../lib/testing-live-operations.js';
|
|
5
5
|
export default class TestingLiveExecute extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
6
|
+
static args = testingLiveOptionalJobArg;
|
|
7
7
|
static description = 'Execute bounded Robot Framework keywords in an active CRT live session';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --project <project-id> --keyword GoTo --arg https://example.com',
|
|
@@ -4,13 +4,18 @@ import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
|
4
4
|
import { getTestingLiveHistory } from '../../../lib/testing-live-operations.js';
|
|
5
5
|
import { readTestingLiveState } from '../../../lib/testing-live-state.js';
|
|
6
6
|
export default class TestingLiveHistory extends AgentiaCommand {
|
|
7
|
-
static args = {
|
|
7
|
+
static args = {
|
|
8
|
+
'job-id': Args.integer({ description: 'CRT job ID; defaults to the active session.', required: false }),
|
|
9
|
+
};
|
|
8
10
|
static description = 'Read bounded sanitized local CRT live execution history';
|
|
9
11
|
static examples = ['<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --limit 20 --json'];
|
|
10
12
|
static flags = {
|
|
11
13
|
...testingLiveCommonFlags,
|
|
12
14
|
limit: Flags.integer({ default: 10, description: 'Maximum records to return.', max: 500, min: 1 }),
|
|
13
|
-
status: Flags.option({
|
|
15
|
+
status: Flags.option({
|
|
16
|
+
description: 'Execution status filter.',
|
|
17
|
+
options: ['completed', 'failed', 'recorded'],
|
|
18
|
+
})(),
|
|
14
19
|
};
|
|
15
20
|
async run() {
|
|
16
21
|
const { args, flags } = await this.parse(TestingLiveHistory);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
3
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg } from '../../../lib/testing-live-command.js';
|
|
4
4
|
import { inspectTestingLive } from '../../../lib/testing-live-operations.js';
|
|
5
|
+
import { formatTestingRecord } from '../../../lib/testing-types.js';
|
|
5
6
|
export default class TestingLiveInspect extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
7
|
+
static args = testingLiveOptionalJobArg;
|
|
7
8
|
static description = 'Inspect bounded, sanitized page state from an active CRT live session';
|
|
8
9
|
static examples = [
|
|
9
10
|
'<%= config.bin %> <%= command.id %> --project <project-id> --json',
|
|
@@ -23,7 +24,7 @@ export default class TestingLiveInspect extends AgentiaCommand {
|
|
|
23
24
|
projectId: flags.project,
|
|
24
25
|
sessionId: flags['session-id'],
|
|
25
26
|
}));
|
|
26
|
-
this.display(() => this.log(flags.dom ? `DOM written to ${String(result.path)}.` :
|
|
27
|
+
this.display(() => this.log(flags.dom ? `DOM written to ${String(result.path)}.` : formatTestingRecord(result)));
|
|
27
28
|
return result;
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
1
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { controlTestingLive } from '../../../lib/testing-live-operations.js';
|
|
2
|
+
import { runTestingLiveControlCommand, testingLiveCommonFlags, testingLiveOptionalJobArg, } from '../../../lib/testing-live-command.js';
|
|
5
3
|
export default class TestingLiveInterrupt extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
4
|
+
static args = testingLiveOptionalJobArg;
|
|
7
5
|
static description = 'Interrupt Robot execution in the active CRT live session';
|
|
8
6
|
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id>'];
|
|
9
7
|
static flags = testingLiveCommonFlags;
|
|
10
8
|
async run() {
|
|
11
9
|
const { args, flags } = await this.parse(TestingLiveInterrupt);
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
sessionId: flags['session-id'],
|
|
10
|
+
return runTestingLiveControlCommand('interrupt', args, flags, {
|
|
11
|
+
display: (fn) => this.display(fn),
|
|
12
|
+
log: (msg) => this.log(msg),
|
|
16
13
|
});
|
|
17
|
-
this.display(() => this.log(result.message));
|
|
18
|
-
return result;
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
//# sourceMappingURL=interrupt.js.map
|
|
@@ -1,134 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { closeSync, constants, mkdirSync, openSync, writeSync } from 'node:fs';
|
|
5
|
-
import { dirname, extname, resolve } from 'node:path';
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
6
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { loadTestingLiveConnection, setTestingLiveOptions } from '../../../lib/testing-live-operations.js';
|
|
10
|
-
import { acquireTestingLiveRecorderLock, connectTestingLiveWebSocket, parseTestingLiveRecorderFrame, robotLinesFromRecorderEvent, } from '../../../lib/testing-live-recorder.js';
|
|
3
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg } from '../../../lib/testing-live-command.js';
|
|
4
|
+
import { recordTestingLiveSession } from '../../../lib/testing-live-operations.js';
|
|
11
5
|
export default class TestingLiveRecorder extends AgentiaCommand {
|
|
12
|
-
static args =
|
|
6
|
+
static args = testingLiveOptionalJobArg;
|
|
13
7
|
static description = 'Record CRT live interactions as bounded Robot Framework lines';
|
|
14
8
|
static enableJsonFlag = false;
|
|
15
|
-
static examples = [
|
|
16
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --output recorded.robot',
|
|
17
|
-
];
|
|
9
|
+
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --output recorded.robot'];
|
|
18
10
|
static flags = {
|
|
11
|
+
...testingLiveCommonFlags,
|
|
19
12
|
debug: Flags.boolean({ default: false, description: 'Print frame sizes and event types without frame bodies.' }),
|
|
20
13
|
'no-enable': Flags.boolean({ default: false, description: 'Do not manage the server recorder toggle.' }),
|
|
21
14
|
output: Flags.string({ char: 'o', description: 'Explicit .robot file to append recorded keywords to.' }),
|
|
22
|
-
project: Flags.integer({ char: 'p', description: 'CRT project ID.', required: true }),
|
|
23
|
-
'session-id': Flags.integer({ description: 'Guard that must match the active CRT live session.', min: 1 }),
|
|
24
15
|
};
|
|
25
16
|
async run() {
|
|
26
17
|
const { args, flags } = await this.parse(TestingLiveRecorder);
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
sessionId: flags['session-id'],
|
|
31
|
-
});
|
|
32
|
-
const lock = acquireTestingLiveRecorderLock(connection.metadata.sessionId);
|
|
33
|
-
const descriptor = flags.output === undefined ? undefined : openRobotOutput(flags.output);
|
|
34
|
-
let recorded = 0;
|
|
18
|
+
const controller = new AbortController();
|
|
19
|
+
const stop = () => controller.abort();
|
|
20
|
+
process.once('SIGINT', stop);
|
|
35
21
|
try {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, 3000);
|
|
50
|
-
const stop = () => socket.close();
|
|
51
|
-
process.once('SIGINT', stop);
|
|
52
|
-
socket.once('error', () => reject(new Error('CRT live recorder connection failed.')));
|
|
53
|
-
socket.once('open', () => this.log('Recording CRT interactions. Press Ctrl-C to stop.'));
|
|
54
|
-
socket.on('message', (frame) => {
|
|
55
|
-
try {
|
|
56
|
-
const event = parseTestingLiveRecorderFrame(frame);
|
|
57
|
-
if (event === undefined)
|
|
58
|
-
return;
|
|
59
|
-
if (flags.debug) {
|
|
60
|
-
const type = typeof event.type === 'string' && /^[a-z-]{1,32}$/u.test(event.type)
|
|
61
|
-
? event.type
|
|
62
|
-
: 'unknown';
|
|
63
|
-
this.warn(`Recorder event ${type} (${Buffer.byteLength(frame.toString())} bytes).`);
|
|
64
|
-
}
|
|
65
|
-
const lines = robotLinesFromRecorderEvent(event);
|
|
66
|
-
if (lines.length === 0)
|
|
67
|
-
return;
|
|
68
|
-
for (const line of lines)
|
|
69
|
-
this.log(line);
|
|
70
|
-
if (descriptor !== undefined) {
|
|
71
|
-
writeSync(descriptor, `${lines.join('\n')}\n\n`, undefined, 'utf8');
|
|
72
|
-
}
|
|
73
|
-
const now = new Date().toISOString();
|
|
74
|
-
appendTestingLiveHistory({
|
|
75
|
-
completedAt: now,
|
|
76
|
-
id: randomUUID(),
|
|
77
|
-
jobId: connection.metadata.jobId,
|
|
78
|
-
lines,
|
|
79
|
-
projectId: connection.metadata.projectId,
|
|
80
|
-
startedAt: now,
|
|
81
|
-
status: 'recorded',
|
|
82
|
-
});
|
|
83
|
-
recorded += lines.length;
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
this.warn(error.message);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
socket.once('close', () => resolvePromise());
|
|
90
|
-
socket.once('error', () => resolvePromise());
|
|
91
|
-
socket.once('close', cleanup);
|
|
92
|
-
socket.once('error', cleanup);
|
|
93
|
-
function cleanup() {
|
|
94
|
-
clearInterval(heartbeat);
|
|
95
|
-
process.removeListener('SIGINT', stop);
|
|
96
|
-
}
|
|
22
|
+
return await recordTestingLiveSession({
|
|
23
|
+
appendRobot: flags.output,
|
|
24
|
+
jobId: args['job-id'],
|
|
25
|
+
noEnable: flags['no-enable'],
|
|
26
|
+
onDebugFrame: flags.debug
|
|
27
|
+
? ({ bytes, type }) => this.warn(`Recorder event ${type} (${bytes} bytes).`)
|
|
28
|
+
: undefined,
|
|
29
|
+
onError: (error) => this.warn(error.message),
|
|
30
|
+
onKeywordLine: (line) => this.log(line),
|
|
31
|
+
onReady: () => this.log('Recording CRT interactions. Press Ctrl-C to stop.'),
|
|
32
|
+
projectId: flags.project,
|
|
33
|
+
sessionId: flags['session-id'],
|
|
34
|
+
signal: controller.signal,
|
|
97
35
|
});
|
|
98
36
|
}
|
|
99
37
|
finally {
|
|
100
|
-
|
|
101
|
-
closeSync(descriptor);
|
|
102
|
-
lock.release();
|
|
103
|
-
if (!flags['no-enable']) {
|
|
104
|
-
await setTestingLiveOptions({
|
|
105
|
-
jobId: connection.metadata.jobId,
|
|
106
|
-
projectId: connection.metadata.projectId,
|
|
107
|
-
recorder: emptyOptions(false),
|
|
108
|
-
sessionId: connection.metadata.sessionId,
|
|
109
|
-
}).catch(() => { });
|
|
110
|
-
}
|
|
38
|
+
process.removeListener('SIGINT', stop);
|
|
111
39
|
}
|
|
112
|
-
return { recorded, sessionId: connection.metadata.sessionId };
|
|
113
40
|
}
|
|
114
41
|
}
|
|
115
|
-
function emptyOptions(enabled) {
|
|
116
|
-
return {
|
|
117
|
-
enabled,
|
|
118
|
-
enableHealingContext: false,
|
|
119
|
-
enableHoverText: false,
|
|
120
|
-
enableScrollText: false,
|
|
121
|
-
enableSystemState: false,
|
|
122
|
-
enableVerifyText: false,
|
|
123
|
-
preferTableKeywords: false,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function openRobotOutput(path) {
|
|
127
|
-
if (path.includes('\0') || extname(path).toLowerCase() !== '.robot') {
|
|
128
|
-
throw new Error('CRT recorder output must be an explicit .robot path.');
|
|
129
|
-
}
|
|
130
|
-
const target = resolve(path);
|
|
131
|
-
mkdirSync(dirname(target), { mode: 0o700, recursive: true });
|
|
132
|
-
return openSync(target, constants.O_APPEND | constants.O_CREAT | constants.O_NOFOLLOW | constants.O_WRONLY, 0o600);
|
|
133
|
-
}
|
|
134
42
|
//# sourceMappingURL=recorder.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
3
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg } from '../../../lib/testing-live-command.js';
|
|
4
4
|
import { getTestingLiveReports } from '../../../lib/testing-live-operations.js';
|
|
5
5
|
export default class TestingLiveReports extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
6
|
+
static args = testingLiveOptionalJobArg;
|
|
7
7
|
static description = 'List or save bounded report artifacts from an active CRT live session';
|
|
8
8
|
static examples = [
|
|
9
9
|
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
2
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
3
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg } from '../../../lib/testing-live-command.js';
|
|
4
4
|
import { saveTestingLiveScreenshot } from '../../../lib/testing-live-operations.js';
|
|
5
5
|
export default class TestingLiveScreenshot extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
6
|
+
static args = testingLiveOptionalJobArg;
|
|
7
7
|
static description = 'Save a bounded CRT live browser screenshot to an explicit file';
|
|
8
8
|
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --output screenshot.png'];
|
|
9
9
|
static flags = {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
1
|
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags, testingLiveRecorderOptionFlags, testingLiveRecorderOptions, } from '../../../lib/testing-live-command.js';
|
|
2
|
+
import { testingLiveCommonFlags, testingLiveOptionalJobArg, testingLiveRecorderOptionFlags, testingLiveRecorderOptions, } from '../../../lib/testing-live-command.js';
|
|
4
3
|
import { setTestingLiveOptions } from '../../../lib/testing-live-operations.js';
|
|
5
4
|
export default class TestingLiveSetOptions extends AgentiaCommand {
|
|
6
|
-
static args =
|
|
5
|
+
static args = testingLiveOptionalJobArg;
|
|
7
6
|
static description = 'Set the complete validated CRT live recorder option block';
|
|
8
7
|
static examples = [
|
|
9
8
|
'<%= config.bin %> <%= command.id %> --project <project-id> --enable --scroll-text --table-keywords',
|
|
@@ -11,7 +10,15 @@ export default class TestingLiveSetOptions extends AgentiaCommand {
|
|
|
11
10
|
static flags = { ...testingLiveCommonFlags, ...testingLiveRecorderOptionFlags };
|
|
12
11
|
async run() {
|
|
13
12
|
const { args, flags } = await this.parse(TestingLiveSetOptions);
|
|
14
|
-
const optionNames = [
|
|
13
|
+
const optionNames = [
|
|
14
|
+
'enable',
|
|
15
|
+
'healing-context',
|
|
16
|
+
'hover-text',
|
|
17
|
+
'scroll-text',
|
|
18
|
+
'system-state',
|
|
19
|
+
'table-keywords',
|
|
20
|
+
'verify-text',
|
|
21
|
+
];
|
|
15
22
|
if (!optionNames.some((name) => flags[name] !== undefined)) {
|
|
16
23
|
throw new Error('Provide at least one recorder option; unspecified options are set to false.');
|
|
17
24
|
}
|