@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.
- package/MANIFEST.sha256 +37 -29
- package/README.md +1 -1
- package/claude/skill/models.toml +7 -7
- package/claude/skill/references/coordination.md +4 -0
- package/claude/skill/references/handoff-prep.md +1 -1
- package/claude/skill/references/verification.md +9 -4
- package/codex/skill/models.toml +5 -5
- package/codex/skill/references/coordination.md +4 -0
- package/codex/skill/references/handoff-prep.md +1 -1
- package/codex/skill/references/verification.md +9 -4
- package/gemini/agents/arc-implementer.md +1 -1
- package/gemini/agents/arc-planner.md +1 -1
- package/gemini/agents/arc-qa.md +1 -1
- package/gemini/agents/arc-reviewer.md +1 -1
- package/gemini/agents/arc-scouter.md +1 -1
- package/gemini/skill/models.toml +6 -6
- package/gemini/skill/references/coordination.md +4 -0
- package/gemini/skill/references/handoff-prep.md +1 -1
- package/gemini/skill/references/verification.md +9 -4
- package/grok/skill/references/coordination.md +4 -0
- package/grok/skill/references/handoff-prep.md +1 -1
- package/grok/skill/references/verification.md +9 -4
- package/lib/cli/postinstall.mjs +1 -1
- package/lib/installer/runtime-assets.mjs +5 -1
- package/lib/models/catalog-gemini.mjs +4 -1
- package/lib/models/gemini-models.json +4 -0
- package/lib/runtime/final-verify.mjs +2158 -0
- package/lib/runtime/node-test-reporter.mjs +81 -0
- package/lib/runtime/platform-registry.mjs +1 -1
- package/lib/runtime/test-results.mjs +736 -0
- package/lib/runtime/verify-cli.mjs +60 -0
- package/lib/tui/app.mjs +4 -2
- package/lib/tui/render.mjs +1 -1
- package/lib/watch/index.mjs +1 -1
- package/lib/watch/menu.mjs +26 -15
- package/package.json +1 -1
- package/shared/skill/runtime/final-verify.mjs +2158 -0
- package/shared/skill/runtime/node-test-reporter.mjs +81 -0
- package/shared/skill/runtime/platform-registry.mjs +1 -1
- package/shared/skill/runtime/test-results.mjs +736 -0
- package/shared/skill/runtime/verify-cli.mjs +60 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {isAbsolute, relative} from 'node:path';
|
|
2
|
+
|
|
3
|
+
const entities = {
|
|
4
|
+
'&': '&', '<': '<', '>': '>', '"': '"', "'": ''',
|
|
5
|
+
'\t': '	', '\n': ' ', '\r': ' '
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
function escapeAttribute(value) {
|
|
9
|
+
return String(value ?? '')
|
|
10
|
+
.replace(/[^\t\n\r\u0020-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}]/gu, '\uFFFD')
|
|
11
|
+
.replace(/[&<>"'\t\n\r]/g, char => entities[char]);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function attribute(name, value) {
|
|
15
|
+
return ' ' + name + '="' + escapeAttribute(value) + '"';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function failureMessage(error) {
|
|
19
|
+
return error?.cause?.message ?? error?.message ?? '';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function isFileFailure({file, name, nesting}, failed, children) {
|
|
23
|
+
return failed && nesting === 0 && !children.length && isAbsolute(file ?? '') &&
|
|
24
|
+
(name === file || name === relative(process.cwd(), file));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function writeTestcase({name, file, details, skip, todo}, failed) {
|
|
28
|
+
const attrs = attribute('name', name) + attribute('file', file) + attribute('time', details.duration_ms / 1000);
|
|
29
|
+
if (todo) return '<testcase' + attrs + '><skipped message="todo"/></testcase>\n';
|
|
30
|
+
if (skip) return '<testcase' + attrs + '><skipped/></testcase>\n';
|
|
31
|
+
if (failed) {
|
|
32
|
+
return '<testcase' + attrs + '><failure' + attribute('message', failureMessage(details.error)) + '/></testcase>\n';
|
|
33
|
+
}
|
|
34
|
+
return '<testcase' + attrs + '/>\n';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function* writeResult({data, failed, children}) {
|
|
38
|
+
const {name, file, details} = data;
|
|
39
|
+
if (isFileFailure(data, failed, children)) {
|
|
40
|
+
yield '<testsuite' + attribute('name', name) + attribute('file', file) + ' errors="1">' +
|
|
41
|
+
'<error' + attribute('message', failureMessage(details?.error)) + '/></testsuite>\n';
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const isSuite = details?.type === 'suite';
|
|
46
|
+
if (children.length || isSuite) {
|
|
47
|
+
const ownFailure = failed && details?.error?.failureType !== 'subtestsFailed';
|
|
48
|
+
if (ownFailure && !isSuite) yield writeTestcase(data, true);
|
|
49
|
+
yield '<testsuite' + attribute('name', name) + '>\n';
|
|
50
|
+
if (ownFailure && isSuite) {
|
|
51
|
+
yield '<error' + attribute('message', failureMessage(details?.error)) + '/>\n';
|
|
52
|
+
}
|
|
53
|
+
for (const child of children) yield* writeResult(child);
|
|
54
|
+
yield '</testsuite>\n';
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
yield writeTestcase(data, failed);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export default async function* arcNodeReporter(source) {
|
|
62
|
+
yield '<?xml version="1.0" encoding="UTF-8"?>\n<testsuites>\n';
|
|
63
|
+
const files = new Map();
|
|
64
|
+
for await (const {type, data} of source) {
|
|
65
|
+
if (type === 'test:start') {
|
|
66
|
+
if (!files.has(data.file)) files.set(data.file, []);
|
|
67
|
+
files.get(data.file)[data.nesting] = {name: data.name, children: []};
|
|
68
|
+
} else if (type === 'test:pass' || type === 'test:fail') {
|
|
69
|
+
const stack = files.get(data.file);
|
|
70
|
+
const started = stack?.[data.nesting];
|
|
71
|
+
const children = started?.name === data.name ? started.children : [];
|
|
72
|
+
if (started) stack.length = data.nesting;
|
|
73
|
+
const result = {data, failed: type === 'test:fail', children};
|
|
74
|
+
const parent = stack?.[data.nesting - 1];
|
|
75
|
+
if (parent) parent.children.push(result);
|
|
76
|
+
else yield* writeResult(result);
|
|
77
|
+
if (stack?.length === 0) files.delete(data.file);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
yield '</testsuites>\n';
|
|
81
|
+
}
|
|
@@ -109,7 +109,7 @@ export const DEFAULT_PLATFORM_REGISTRY = createPlatformRegistry([
|
|
|
109
109
|
{
|
|
110
110
|
id: 'gemini', label: 'Gemini', displayOrder: 2, anchorOrder: 2,
|
|
111
111
|
home: {env: 'GEMINI_CLI_HOME', resolve: context => resolveHome('gemini', context)},
|
|
112
|
-
cli: {command: 'gemini', supportedVersions:
|
|
112
|
+
cli: {command: 'gemini', supportedVersions: null},
|
|
113
113
|
auth: {kind: 'none'},
|
|
114
114
|
models: {effortField: 'effort'},
|
|
115
115
|
profile: {
|