@observeone/cli 1.8.0 → 1.9.1

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.
Files changed (54) hide show
  1. package/README.md +37 -0
  2. package/dist/README.md +37 -0
  3. package/dist/commands/ai-check/create.d.ts +6 -0
  4. package/dist/commands/ai-check/create.d.ts.map +1 -0
  5. package/dist/commands/ai-check/create.js +79 -0
  6. package/dist/commands/ai-check/create.js.map +1 -0
  7. package/dist/commands/ai-check/delete.d.ts +6 -0
  8. package/dist/commands/ai-check/delete.d.ts.map +1 -0
  9. package/dist/commands/ai-check/delete.js +51 -0
  10. package/dist/commands/ai-check/delete.js.map +1 -0
  11. package/dist/commands/ai-check/get.d.ts +6 -0
  12. package/dist/commands/ai-check/get.d.ts.map +1 -0
  13. package/dist/commands/ai-check/get.js +37 -0
  14. package/dist/commands/ai-check/get.js.map +1 -0
  15. package/dist/commands/ai-check/index.d.ts +6 -0
  16. package/dist/commands/ai-check/index.d.ts.map +1 -0
  17. package/dist/commands/ai-check/index.js +22 -0
  18. package/dist/commands/ai-check/index.js.map +1 -0
  19. package/dist/commands/ai-check/list.d.ts +6 -0
  20. package/dist/commands/ai-check/list.d.ts.map +1 -0
  21. package/dist/commands/ai-check/list.js +36 -0
  22. package/dist/commands/ai-check/list.js.map +1 -0
  23. package/dist/commands/ai-check/run.d.ts +6 -0
  24. package/dist/commands/ai-check/run.d.ts.map +1 -0
  25. package/dist/commands/{ai-check.js → ai-check/run.js} +6 -316
  26. package/dist/commands/ai-check/run.js.map +1 -0
  27. package/dist/commands/ai-check/status.d.ts +6 -0
  28. package/dist/commands/ai-check/status.d.ts.map +1 -0
  29. package/dist/commands/ai-check/status.js +32 -0
  30. package/dist/commands/ai-check/status.js.map +1 -0
  31. package/dist/commands/ai-check/wait.d.ts +6 -0
  32. package/dist/commands/ai-check/wait.d.ts.map +1 -0
  33. package/dist/commands/ai-check/wait.js +59 -0
  34. package/dist/commands/ai-check/wait.js.map +1 -0
  35. package/dist/commands/schema.d.ts +4 -0
  36. package/dist/commands/schema.d.ts.map +1 -0
  37. package/dist/commands/schema.js +42 -0
  38. package/dist/commands/schema.js.map +1 -0
  39. package/dist/commands/templates.d.ts +4 -0
  40. package/dist/commands/templates.d.ts.map +1 -0
  41. package/dist/commands/templates.js +35 -0
  42. package/dist/commands/templates.js.map +1 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +5 -1
  45. package/dist/index.js.map +1 -1
  46. package/dist/package.json +1 -1
  47. package/dist/utils/schemas.d.ts +2 -0
  48. package/dist/utils/schemas.d.ts.map +1 -1
  49. package/dist/utils/schemas.js +56 -0
  50. package/dist/utils/schemas.js.map +1 -1
  51. package/package.json +1 -1
  52. package/dist/commands/ai-check.d.ts +0 -9
  53. package/dist/commands/ai-check.d.ts.map +0 -1
  54. package/dist/commands/ai-check.js.map +0 -1
package/README.md CHANGED
@@ -219,12 +219,49 @@ obs suite status <id>
219
219
  # Wait on a specific execution
220
220
  obs suite wait <id> <executionId>
221
221
 
222
+ # Update schedule without regenerating (v1.8.0)
223
+ obs suite schedule <id> --enable
224
+ obs suite schedule <id> --disable
225
+ obs suite schedule <id> --cron "*/30 * * * *"
226
+
227
+ # Update credentials/variables without regenerating (v1.8.0)
228
+ obs suite secrets <id> --var USERNAME=admin --var PASSWORD=secret
229
+ obs suite secrets <id> --var-file .env.test
230
+
222
231
  # Delete a suite
223
232
  obs suite delete <id>
224
233
  ```
225
234
 
226
235
  ---
227
236
 
237
+ ## Resource Discovery (v1.9.0)
238
+
239
+ Enumerate resource templates and fetch their JSON schemas. All commands work offline against bundled schemas, no login required.
240
+
241
+ ```bash
242
+ # List every resource type with required fields
243
+ obs templates list
244
+ obs templates list --json
245
+
246
+ # Print the JSON Schema (Draft-07) for any resource
247
+ obs schema monitor
248
+ obs schema ai-check
249
+ obs schema alert-channel --out ./schemas/alert-channel.schema.json
250
+
251
+ # Validate a JSON file against the bundled schema (offline)
252
+ obs validate --resource monitor --file ./my-monitor.json
253
+
254
+ # Scaffold a ready-to-edit template
255
+ obs init monitor
256
+ obs init ai-check --out ./tests/ai-check.json
257
+ ```
258
+
259
+ Aliases: `api-check` → `check`, `url-monitor` → `monitor`, `browser-check` → `ai-check`.
260
+
261
+ The full chain for agents: `obs templates list` → `obs schema <name>` → generate payload → `obs validate` → `obs <resource> create --file <path>`. All steps except the final create are fully offline.
262
+
263
+ ---
264
+
228
265
  ## AI Agent Integration (Headless Mode)
229
266
 
230
267
  The `obs` CLI is explicitly designed to be used by AI coding agents.
package/dist/README.md CHANGED
@@ -219,12 +219,49 @@ obs suite status <id>
219
219
  # Wait on a specific execution
220
220
  obs suite wait <id> <executionId>
221
221
 
222
+ # Update schedule without regenerating (v1.8.0)
223
+ obs suite schedule <id> --enable
224
+ obs suite schedule <id> --disable
225
+ obs suite schedule <id> --cron "*/30 * * * *"
226
+
227
+ # Update credentials/variables without regenerating (v1.8.0)
228
+ obs suite secrets <id> --var USERNAME=admin --var PASSWORD=secret
229
+ obs suite secrets <id> --var-file .env.test
230
+
222
231
  # Delete a suite
223
232
  obs suite delete <id>
224
233
  ```
225
234
 
226
235
  ---
227
236
 
237
+ ## Resource Discovery (v1.9.0)
238
+
239
+ Enumerate resource templates and fetch their JSON schemas. All commands work offline against bundled schemas, no login required.
240
+
241
+ ```bash
242
+ # List every resource type with required fields
243
+ obs templates list
244
+ obs templates list --json
245
+
246
+ # Print the JSON Schema (Draft-07) for any resource
247
+ obs schema monitor
248
+ obs schema ai-check
249
+ obs schema alert-channel --out ./schemas/alert-channel.schema.json
250
+
251
+ # Validate a JSON file against the bundled schema (offline)
252
+ obs validate --resource monitor --file ./my-monitor.json
253
+
254
+ # Scaffold a ready-to-edit template
255
+ obs init monitor
256
+ obs init ai-check --out ./tests/ai-check.json
257
+ ```
258
+
259
+ Aliases: `api-check` → `check`, `url-monitor` → `monitor`, `browser-check` → `ai-check`.
260
+
261
+ The full chain for agents: `obs templates list` → `obs schema <name>` → generate payload → `obs validate` → `obs <resource> create --file <path>`. All steps except the final create are fully offline.
262
+
263
+ ---
264
+
228
265
  ## AI Agent Integration (Headless Mode)
229
266
 
230
267
  The `obs` CLI is explicitly designed to be used by AI coding agents.
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckCreateCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CA4ET"}
@@ -0,0 +1,79 @@
1
+ import { Command } from 'commander';
2
+ import inquirer from 'inquirer';
3
+ export function createAiCheckCreateCommand(configService, apiClient, outputService) {
4
+ return new Command('create')
5
+ .description('Create a new AI browser check')
6
+ .option('-n, --name <name>', 'Test name')
7
+ .option('-u, --url <url>', 'URL to test')
8
+ .option('-p, --prompt <prompt>', 'Test prompt')
9
+ .option('-j, --json', 'Output in JSON format')
10
+ .action(async (options) => {
11
+ if (process.env.OBS_JSON_OUTPUT === 'true' || options.json === true) {
12
+ outputService.enableJsonMode();
13
+ }
14
+ try {
15
+ const apiKey = configService.getApiKey();
16
+ if (!apiKey) {
17
+ outputService.error('Not authenticated. Please run "obs login" first.');
18
+ process.exit(1);
19
+ }
20
+ let name = options.name;
21
+ let url = options.url;
22
+ let prompt = options.prompt;
23
+ if (!name || !url || !prompt) {
24
+ const answers = await inquirer.prompt([
25
+ {
26
+ type: 'input',
27
+ name: 'name',
28
+ message: 'Check name:',
29
+ when: !name,
30
+ validate: (val) => (val.trim() ? true : 'Name is required'),
31
+ },
32
+ {
33
+ type: 'input',
34
+ name: 'url',
35
+ message: 'URL to test:',
36
+ when: !url,
37
+ validate: (val) => {
38
+ try {
39
+ new URL(val);
40
+ return true;
41
+ }
42
+ catch {
43
+ return 'Invalid URL';
44
+ }
45
+ },
46
+ },
47
+ {
48
+ type: 'input',
49
+ name: 'prompt',
50
+ message: 'What should the AI check? (prompt):',
51
+ when: !prompt,
52
+ validate: (val) => (val.trim() ? true : 'Prompt is required'),
53
+ },
54
+ ]);
55
+ name = name || answers.name;
56
+ url = url || answers.url;
57
+ prompt = prompt || answers.prompt;
58
+ }
59
+ outputService.progress('Creating AI browser check...');
60
+ const newTest = await apiClient.createTest({
61
+ name: name,
62
+ url: url,
63
+ prompt: prompt,
64
+ description: 'Created via CLI',
65
+ });
66
+ if (process.env.OBS_JSON_OUTPUT === 'true') {
67
+ outputService.formatJsonOutput(newTest);
68
+ }
69
+ else {
70
+ outputService.success(`AI browser check "${name}" created! (ID: ${newTest.id})`);
71
+ }
72
+ }
73
+ catch (error) {
74
+ outputService.error(outputService.formatError(error));
75
+ process.exit(1);
76
+ }
77
+ });
78
+ }
79
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/commands/ai-check/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAKhC,MAAM,UAAU,0BAA0B,CACxC,aAA6B,EAC7B,SAAqB,EACrB,aAA6B;IAE7B,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,C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AAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckDeleteCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CA+CT"}
@@ -0,0 +1,51 @@
1
+ import { Command } from 'commander';
2
+ import inquirer from 'inquirer';
3
+ export function createAiCheckDeleteCommand(configService, apiClient, outputService) {
4
+ return new Command('delete')
5
+ .description('Delete an AI browser check')
6
+ .argument('<id>', 'Check ID')
7
+ .option('-y, --yes', 'Skip confirmation prompt')
8
+ .option('-j, --json', 'Output in JSON format')
9
+ .action(async (id, options) => {
10
+ if (process.env.OBS_JSON_OUTPUT === 'true' || options.json === true) {
11
+ outputService.enableJsonMode();
12
+ }
13
+ try {
14
+ const apiKey = configService.getApiKey();
15
+ if (!apiKey) {
16
+ outputService.error('Not authenticated. Please run "obs login" first.');
17
+ process.exit(1);
18
+ }
19
+ const testId = parseInt(id);
20
+ if (isNaN(testId)) {
21
+ outputService.error('Invalid test ID.');
22
+ process.exit(1);
23
+ }
24
+ if (!options.yes) {
25
+ const { confirm } = await inquirer.prompt([
26
+ {
27
+ type: 'confirm',
28
+ name: 'confirm',
29
+ message: `Are you sure you want to delete AI check ${testId}?`,
30
+ default: false,
31
+ },
32
+ ]);
33
+ if (!confirm)
34
+ return;
35
+ }
36
+ outputService.progress(`Deleting AI check ${testId}...`);
37
+ await apiClient.deleteTest(testId);
38
+ if (process.env.OBS_JSON_OUTPUT === 'true') {
39
+ outputService.formatJsonOutput({ success: true, id: testId });
40
+ }
41
+ else {
42
+ outputService.success(`AI check ${testId} deleted successfully.`);
43
+ }
44
+ }
45
+ catch (error) {
46
+ outputService.error(outputService.formatError(error));
47
+ process.exit(1);
48
+ }
49
+ });
50
+ }
51
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../src/commands/ai-check/delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAKhC,MAAM,UAAU,0BAA0B,CACxC,aAA6B,EAC7B,SAAqB,EACrB,aAA6B;IAE7B,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC;SACzB,WAAW,CAAC,4BAA4B,CAAC;SACzC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;SAC5B,MAAM,CAAC,WAAW,EAAE,0BAA0B,CAAC;SAC/C,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC;SAC7C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,OAAgC,EAAE,EAAE;QAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACpE,aAAa,CAAC,cAAc,EAAE,CAAC;QACjC,CAA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K,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckGetCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=get.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CAmCT"}
@@ -0,0 +1,37 @@
1
+ import { Command } from 'commander';
2
+ export function createAiCheckGetCommand(configService, apiClient, outputService) {
3
+ return new Command('get')
4
+ .description('Get details of an AI browser check')
5
+ .argument('<id>', 'Check ID')
6
+ .option('-j, --json', 'Output in JSON format')
7
+ .action(async (id, options) => {
8
+ if (process.env.OBS_JSON_OUTPUT === 'true' || options.json === true) {
9
+ outputService.enableJsonMode();
10
+ }
11
+ try {
12
+ const apiKey = configService.getApiKey();
13
+ if (!apiKey) {
14
+ outputService.error('Not authenticated. Please run "obs login" first.');
15
+ process.exit(1);
16
+ }
17
+ const testId = parseInt(id);
18
+ if (isNaN(testId)) {
19
+ outputService.error('Invalid test ID.');
20
+ process.exit(1);
21
+ }
22
+ outputService.progress(`Fetching AI check ${testId}...`);
23
+ const testData = await apiClient.getTest(testId);
24
+ if (process.env.OBS_JSON_OUTPUT === 'true') {
25
+ outputService.formatJsonOutput(testData);
26
+ }
27
+ else {
28
+ outputService.formatTestList([testData], true);
29
+ }
30
+ }
31
+ catch (error) {
32
+ outputService.error(outputService.formatError(error));
33
+ process.exit(1);
34
+ }
35
+ });
36
+ }
37
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/ai-check/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,MAAM,UAAU,uBAAuB,CACrC,aAA6B,EAC7B,SAAqB,EACrB,aAA6B;IAE7B,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC;SACtB,WAAW,CAAC,oCAAoC,CAAC;SACjD,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;SAC5B,MAAM,CAAC,YAAY,EAAE,uBAAuB,CAAC;SAC7C,MAAM,CAAC,KAAK,EAAE,EAAU,EAAE,OAAgC,EAAE,EAAE;QAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YACpE,aAAa,CAAC,cAAc,EAAE,CAAC;QACjC,CAAC;QACD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,EAAE,CAAC;YACzC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,aAAa,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;gBACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YAED,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;YAC5B,IAAI,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClB,aAAa,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;gBACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YAED,aAAa,CAAC,QAAQ,CAAC,qBAAqB,MAAM,KAAK,CAAC,CAAC;YACzD,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAEjD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,MAAM,EAAE,CAAC;gBAC3C,aAAa,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,aAAa,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;YACjD,CAAC;QACH,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAStE,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CAcT"}
@@ -0,0 +1,22 @@
1
+ import { Command } from 'commander';
2
+ import { createAiCheckRunCommand } from './run.js';
3
+ import { createAiCheckListCommand } from './list.js';
4
+ import { createAiCheckGetCommand } from './get.js';
5
+ import { createAiCheckCreateCommand } from './create.js';
6
+ import { createAiCheckDeleteCommand } from './delete.js';
7
+ import { createAiCheckStatusCommand } from './status.js';
8
+ import { createAiCheckWaitCommand } from './wait.js';
9
+ export function createAiCheckCommand(configService, apiClient, outputService) {
10
+ const aiCheck = new Command('ai-check').description('Manage and run AI-powered tests');
11
+ aiCheck.addCommand(createAiCheckRunCommand(configService, apiClient, outputService), {
12
+ isDefault: true,
13
+ });
14
+ aiCheck.addCommand(createAiCheckListCommand(configService, apiClient, outputService));
15
+ aiCheck.addCommand(createAiCheckGetCommand(configService, apiClient, outputService));
16
+ aiCheck.addCommand(createAiCheckCreateCommand(configService, apiClient, outputService));
17
+ aiCheck.addCommand(createAiCheckDeleteCommand(configService, apiClient, outputService));
18
+ aiCheck.addCommand(createAiCheckStatusCommand(configService, apiClient, outputService));
19
+ aiCheck.addCommand(createAiCheckWaitCommand(configService, apiClient, outputService));
20
+ return aiCheck;
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/ai-check/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,UAAU,oBAAoB,CAClC,aAA6B,EAC7B,SAAqB,EACrB,aAA6B;IAE7B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,iCAAiC,CAAC,CAAC;IAEvF,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,EAAE;QACnF,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IACtF,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IACrF,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,UAAU,CAAC,0BAA0B,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IACxF,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,aAAa,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAEtF,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckListCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CAqCT"}
@@ -0,0 +1,36 @@
1
+ import { Command } from 'commander';
2
+ export function createAiCheckListCommand(configService, apiClient, outputService) {
3
+ return new Command('list')
4
+ .description('List all AI browser checks')
5
+ .option('-f, --format <format>', 'Output format (table, json)', 'table')
6
+ .option('-j, --json', 'Output in JSON format')
7
+ .action(async (options) => {
8
+ if (process.env.OBS_JSON_OUTPUT === 'true' ||
9
+ options.format === 'json' ||
10
+ options.json === true) {
11
+ outputService.enableJsonMode();
12
+ }
13
+ try {
14
+ const apiKey = configService.getApiKey();
15
+ if (!apiKey) {
16
+ outputService.error('Not authenticated. Please run "obs login" first.');
17
+ process.exit(1);
18
+ }
19
+ outputService.progress('Fetching AI checks...');
20
+ const tests = await apiClient.getTests();
21
+ if (process.env.OBS_JSON_OUTPUT === 'true' ||
22
+ options.format === 'json' ||
23
+ options.json === true) {
24
+ outputService.formatJsonOutput(tests);
25
+ }
26
+ else {
27
+ outputService.formatTestList(tests, process.env.OBS_VERBOSE === 'true');
28
+ }
29
+ }
30
+ catch (error) {
31
+ outputService.error(outputService.formatError(error));
32
+ process.exit(1);
33
+ }
34
+ });
35
+ }
36
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/ai-check/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAK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AAK,CAAC,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from 'commander';
2
+ import { IConfigService } from '../../interfaces/config.interface.js';
3
+ import { IApiClient } from '../../interfaces/api-client.interface.js';
4
+ import { IOutputService } from '../../interfaces/output.interface.js';
5
+ export declare function createAiCheckRunCommand(configService: IConfigService, apiClient: IApiClient, outputService: IOutputService): Command;
6
+ //# sourceMappingURL=run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/ai-check/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AA2BtE,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,cAAc,EAC7B,SAAS,EAAE,UAAU,EACrB,aAAa,EAAE,cAAc,GAC5B,OAAO,CAyET"}