@yunhozz/arc 0.4.7 → 0.5.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.
Files changed (41) hide show
  1. package/MANIFEST.sha256 +37 -29
  2. package/README.md +1 -1
  3. package/claude/skill/models.toml +7 -7
  4. package/claude/skill/references/coordination.md +4 -0
  5. package/claude/skill/references/handoff-prep.md +1 -1
  6. package/claude/skill/references/verification.md +9 -4
  7. package/codex/skill/models.toml +5 -5
  8. package/codex/skill/references/coordination.md +4 -0
  9. package/codex/skill/references/handoff-prep.md +1 -1
  10. package/codex/skill/references/verification.md +9 -4
  11. package/gemini/agents/arc-implementer.md +1 -1
  12. package/gemini/agents/arc-planner.md +1 -1
  13. package/gemini/agents/arc-qa.md +1 -1
  14. package/gemini/agents/arc-reviewer.md +1 -1
  15. package/gemini/agents/arc-scouter.md +1 -1
  16. package/gemini/skill/models.toml +6 -6
  17. package/gemini/skill/references/coordination.md +4 -0
  18. package/gemini/skill/references/handoff-prep.md +1 -1
  19. package/gemini/skill/references/verification.md +9 -4
  20. package/grok/skill/references/coordination.md +4 -0
  21. package/grok/skill/references/handoff-prep.md +1 -1
  22. package/grok/skill/references/verification.md +9 -4
  23. package/lib/cli/postinstall.mjs +1 -1
  24. package/lib/installer/runtime-assets.mjs +5 -1
  25. package/lib/models/catalog-gemini.mjs +4 -1
  26. package/lib/models/gemini-models.json +4 -0
  27. package/lib/runtime/final-verify.mjs +2158 -0
  28. package/lib/runtime/node-test-reporter.mjs +81 -0
  29. package/lib/runtime/platform-registry.mjs +1 -1
  30. package/lib/runtime/test-results.mjs +736 -0
  31. package/lib/runtime/verify-cli.mjs +60 -0
  32. package/lib/tui/app.mjs +4 -2
  33. package/lib/tui/render.mjs +1 -1
  34. package/lib/watch/index.mjs +1 -1
  35. package/lib/watch/menu.mjs +26 -15
  36. package/package.json +1 -1
  37. package/shared/skill/runtime/final-verify.mjs +2158 -0
  38. package/shared/skill/runtime/node-test-reporter.mjs +81 -0
  39. package/shared/skill/runtime/platform-registry.mjs +1 -1
  40. package/shared/skill/runtime/test-results.mjs +736 -0
  41. package/shared/skill/runtime/verify-cli.mjs +60 -0
@@ -0,0 +1,60 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import {fileURLToPath} from 'node:url';
4
+ import {validateWorkflowId} from './scope.mjs';
5
+ import {dispatchVerify, VerifyError, VERIFY_COMMANDS} from './final-verify.mjs';
6
+
7
+ export async function runVerifyCommand(args, io = {}) {
8
+ const output = io.output ?? process.stdout;
9
+ let workflowId = null;
10
+ let result;
11
+ let exit;
12
+ try {
13
+ const [command, ...rest] = args;
14
+ const env = io.env ?? process.env;
15
+ if (VERIFY_COMMANDS.includes(command) && Object.hasOwn(env, 'ARC_BRIDGE_CHILD')) {
16
+ throw new VerifyError('bridge_child');
17
+ }
18
+
19
+ let cwd;
20
+ let input;
21
+ try {
22
+ if (!VERIFY_COMMANDS.includes(command)) throw Error('Expected verify command');
23
+ const options = {};
24
+ for (let i = 0; i < rest.length; i += 2) {
25
+ const key = rest[i];
26
+ if (!['--cwd', '--workflow', '--input'].includes(key) || Object.hasOwn(options, key) || typeof rest[i+1] !== 'string') {
27
+ throw Error('Invalid verify option');
28
+ }
29
+ options[key] = rest[i+1];
30
+ }
31
+ workflowId = validateWorkflowId(options['--workflow']);
32
+ cwd = options['--cwd'];
33
+ if (typeof cwd !== 'string' || !path.isAbsolute(cwd) || path.normalize(cwd) !== cwd || cwd.includes('\0')) {
34
+ throw Error('Absolute workspace required');
35
+ }
36
+ if (options['--input'] !== '-') throw Error('Verify commands require --input -');
37
+ } catch (error) {
38
+ throw new VerifyError('invalid_request', 'deny', {message: error.message});
39
+ }
40
+ const text = io.input ?? fs.readFileSync(0, 'utf8');
41
+ try {
42
+ input = JSON.parse(text);
43
+ } catch {
44
+ throw new VerifyError('invalid_request', 'deny', {message: 'Expected JSON input'});
45
+ }
46
+ result = await dispatchVerify(command, {cwd, workflowId, input, env});
47
+ } catch (error) {
48
+ if (error instanceof VerifyError) result = error.result;
49
+ else {
50
+ exit = 1;
51
+ result = {decision: 'hold', code: 'verify_error', message: error.message};
52
+ }
53
+ }
54
+ output.write(JSON.stringify({workflowId, ...result}) + '\n');
55
+ return exit ?? {allow: 0, deny: 2, hold: 3}[result.decision];
56
+ }
57
+
58
+ if (process.argv[1] && fs.realpathSync(process.argv[1], {throwIfNoEntry: false}) === fileURLToPath(import.meta.url)) {
59
+ process.exitCode = await runVerifyCommand(process.argv.slice(2));
60
+ }