harness-everything 1.5.2 → 1.5.4
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +12 -0
- package/benchmarks/results/live-host/agy-2026-12-02-linux-loader/README.md +33 -0
- package/ci/mechanism-468-dispatch-cli.test.js +99 -4
- package/ci/mechanism-548-bigint-identity.test.js +252 -5
- package/ci/mechanism-error-ledger-promote.test.js +122 -1
- package/ci/mechanism-system-one-install.test.js +50 -0
- package/docs/error-handling/details/c8-dispatch-cli.md +12 -0
- package/docs/platform-capabilities.md +8 -1
- package/docs/platform-compatibility.json +3 -3
- package/docs/system-one-cycle.md +2 -1
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/system-one/cua_adapter.py +4 -2
- package/harness-everything/scripts/system-one/install.js +1 -5
- package/harness-everything/scripts/system-one/manifest.js +7 -3
- package/harness-everything/scripts/system-one/provider.js +3 -4
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/cua_adapter.py +4 -2
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/install.js +1 -5
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/manifest.js +7 -3
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/provider.js +3 -4
- package/sbom.cdx.json +7 -7
- package/scripts/dispatch.js +90 -7
- package/scripts/system-one-cycle/package.js +2 -2
package/sbom.cdx.json
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.7",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:5cebc116-0901-56e0-bb38-e6192158fc63",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-12-
|
|
8
|
+
"timestamp": "2026-12-02T01:41:44.070Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "1.5.
|
|
13
|
+
"version": "1.5.4"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@1.5.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@1.5.4",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "1.5.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@1.5.
|
|
20
|
+
"version": "1.5.4",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@1.5.4"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@1.5.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@1.5.4",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|
package/scripts/dispatch.js
CHANGED
|
@@ -402,7 +402,7 @@ function validateInput(options) {
|
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
function response(options, outcome, evidence = evidencePaths, input) {
|
|
405
|
-
|
|
405
|
+
let message = String(outcome.message || '');
|
|
406
406
|
const result = {
|
|
407
407
|
ok: outcome.exitCode === 0,
|
|
408
408
|
code: outcome.code,
|
|
@@ -421,6 +421,16 @@ function response(options, outcome, evidence = evidencePaths, input) {
|
|
|
421
421
|
? { pool: input.admission.pool, cap: input.admission.cap, slot: input.admission.slot }
|
|
422
422
|
: { pool: input.admission.pool, cap: input.admission.cap };
|
|
423
423
|
}
|
|
424
|
+
if (Object.hasOwn(outcome, 'usage')) {
|
|
425
|
+
result.usage = outcome.usage ?? null;
|
|
426
|
+
if (outcome.code === 'DONE') {
|
|
427
|
+
message += outcome.usage
|
|
428
|
+
? `; total tokens incl. cache: ${outcome.usage.totalTokens}${outcome.usage.mark ? ` (${outcome.usage.mark})` : ''}`
|
|
429
|
+
: '; total tokens incl. cache: unknown';
|
|
430
|
+
}
|
|
431
|
+
} else if (input && Object.hasOwn(input, 'measuredUsage')) result.usage = input.measuredUsage;
|
|
432
|
+
else if (outcome.phase === 'execution') result.usage = null;
|
|
433
|
+
result.message = message.slice(0, 1000);
|
|
424
434
|
if (outcome.argv) result.argv = outcome.argv;
|
|
425
435
|
if (outcome.cwd) result.cwd = outcome.cwd;
|
|
426
436
|
const paths = Object.fromEntries(Object.entries(evidence).filter(([, value]) => value && fs.existsSync(value)));
|
|
@@ -515,14 +525,83 @@ function runChild(command, args, worktree, scratch, logPath, timeout, appendLog
|
|
|
515
525
|
});
|
|
516
526
|
}
|
|
517
527
|
|
|
518
|
-
function runnerArgs(input, prompt, outputPath, timeoutMs = EXECUTION_TIMEOUT_MS) {
|
|
528
|
+
function runnerArgs(input, prompt, outputPath, timeoutMs = EXECUTION_TIMEOUT_MS, structured = false) {
|
|
519
529
|
if (input.runner === 'codex') {
|
|
520
|
-
return ['exec', '-m', input.model, ...(input.effort ? ['-c', `model_reasoning_effort="${input.effort}"`] : []), '-s', 'workspace-write', '-C', input.worktree, '-o', outputPath, prompt];
|
|
530
|
+
return ['exec', '-m', input.model, ...(input.effort ? ['-c', `model_reasoning_effort="${input.effort}"`] : []), '-s', 'workspace-write', '-C', input.worktree, '-o', outputPath, ...(structured ? ['--json'] : []), prompt];
|
|
521
531
|
}
|
|
522
532
|
if (input.runner === 'agy') {
|
|
523
|
-
return ['-p', prompt, '--model', input.model, '--mode', 'accept-edits', '--sandbox', '--settings', AGY_SETTINGS, '--print-timeout', `${Math.ceil(timeoutMs / 1000)}s
|
|
533
|
+
return ['-p', prompt, '--model', input.model, '--mode', 'accept-edits', '--sandbox', '--settings', AGY_SETTINGS, '--print-timeout', `${Math.ceil(timeoutMs / 1000)}s`, ...(structured ? ['--output-format', 'json'] : [])];
|
|
524
534
|
}
|
|
525
|
-
return ['run', '--auto', '-m', input.model, prompt];
|
|
535
|
+
return ['run', '--auto', '-m', input.model, ...(structured ? ['--format', 'json'] : []), prompt];
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function tokenCount(value) {
|
|
539
|
+
return Number.isSafeInteger(value) && value >= 0;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function parseJsonLines(output) {
|
|
543
|
+
if (typeof output !== 'string' || !output.trim()) return null;
|
|
544
|
+
try {
|
|
545
|
+
return output.trim().split(/\r?\n/).map(line => JSON.parse(line));
|
|
546
|
+
} catch {
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
function codexTokenUsage(output) {
|
|
552
|
+
const events = parseJsonLines(output);
|
|
553
|
+
if (!events) return null;
|
|
554
|
+
const completed = events.filter(event => event?.type === 'turn.completed');
|
|
555
|
+
if (completed.length !== 1) return null;
|
|
556
|
+
const usage = completed[0].usage;
|
|
557
|
+
if (!tokenCount(usage?.input_tokens) || !tokenCount(usage?.cached_input_tokens) || !tokenCount(usage?.output_tokens)
|
|
558
|
+
|| usage.cached_input_tokens > usage.input_tokens) return null;
|
|
559
|
+
if (usage.input_tokens === 0 && usage.cached_input_tokens === 0 && usage.output_tokens === 0) return null;
|
|
560
|
+
const totalTokens = usage.input_tokens + usage.output_tokens;
|
|
561
|
+
return tokenCount(totalTokens) ? totalTokens : null;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
function openCodeTokenUsage(output) {
|
|
565
|
+
const events = parseJsonLines(output);
|
|
566
|
+
if (!events || !events.length) return null;
|
|
567
|
+
const steps = events.filter(event => event?.type === 'step_finish');
|
|
568
|
+
if (!steps.length || events.at(-1)?.type !== 'step_finish' || steps.at(-1)?.part?.reason !== 'stop') return null;
|
|
569
|
+
const ids = new Set();
|
|
570
|
+
let totalTokens = 0;
|
|
571
|
+
for (const event of steps) {
|
|
572
|
+
const part = event.part;
|
|
573
|
+
const usage = part?.tokens;
|
|
574
|
+
const cache = usage?.cache;
|
|
575
|
+
if (part?.type !== 'step-finish' || typeof part.id !== 'string' || !part.id || ids.has(part.id)
|
|
576
|
+
|| !tokenCount(usage?.total) || !tokenCount(usage?.input) || !tokenCount(usage?.output)
|
|
577
|
+
|| !tokenCount(usage?.reasoning) || !tokenCount(cache?.read) || !tokenCount(cache?.write)
|
|
578
|
+
|| cache.write !== 0) return null;
|
|
579
|
+
if (usage.total !== usage.input + usage.output + usage.reasoning + cache.read) return null;
|
|
580
|
+
ids.add(part.id);
|
|
581
|
+
totalTokens += usage.total;
|
|
582
|
+
if (!tokenCount(totalTokens)) return null;
|
|
583
|
+
}
|
|
584
|
+
return totalTokens;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
function agyTokenUsage(output) {
|
|
588
|
+
if (typeof output !== 'string' || !output.trim()) return null;
|
|
589
|
+
let envelope;
|
|
590
|
+
try { envelope = JSON.parse(output); } catch { return null; }
|
|
591
|
+
const usage = envelope?.usage;
|
|
592
|
+
if (envelope?.status !== 'SUCCESS' || !tokenCount(usage?.input_tokens) || !tokenCount(usage?.output_tokens)
|
|
593
|
+
|| !tokenCount(usage?.thinking_tokens) || !tokenCount(usage?.cache_read_tokens) || !tokenCount(usage?.total_tokens)
|
|
594
|
+
|| usage.thinking_tokens > usage.output_tokens || usage.cache_read_tokens > usage.input_tokens
|
|
595
|
+
|| usage.total_tokens !== usage.input_tokens + usage.output_tokens) return null;
|
|
596
|
+
return usage.total_tokens;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
function measuredTokenUsage(runner, output) {
|
|
600
|
+
const totalTokens = runner === 'codex' ? codexTokenUsage(output)
|
|
601
|
+
: runner === 'opencode' ? openCodeTokenUsage(output)
|
|
602
|
+
: runner === 'agy' ? agyTokenUsage(output) : null;
|
|
603
|
+
if (totalTokens === null) return null;
|
|
604
|
+
return { totalTokens, ...(totalTokens > 30_000_000 ? { mark: 'OVER-BUDGET' } : {}) };
|
|
526
605
|
}
|
|
527
606
|
|
|
528
607
|
const READINESS_DIAGNOSTICS = {
|
|
@@ -666,6 +745,7 @@ function retainAndClean(input, attempt, paths) {
|
|
|
666
745
|
}
|
|
667
746
|
|
|
668
747
|
async function execute(input, options) {
|
|
748
|
+
const responseInput = input;
|
|
669
749
|
const managed = input.gates !== undefined;
|
|
670
750
|
let reservation = null;
|
|
671
751
|
if (managed) {
|
|
@@ -699,7 +779,7 @@ async function execute(input, options) {
|
|
|
699
779
|
if (existsOrSymlink(input.report)) fail(16, 'REPORT_INVALID', 'report', 'report path was populated before execution; refusing stale delivery');
|
|
700
780
|
const prompt = executionPrompt(input);
|
|
701
781
|
const outputPath = input.runner === 'codex' ? paths.rawOutput : null;
|
|
702
|
-
const run = await runChild(input.runner, runnerArgs(input, prompt, outputPath, EXECUTION_TIMEOUT_MS), input.worktree, input.scratch, paths.runLog, EXECUTION_TIMEOUT_MS, false, reservation);
|
|
782
|
+
const run = await runChild(input.runner, runnerArgs(input, prompt, outputPath, EXECUTION_TIMEOUT_MS, true), input.worktree, input.scratch, paths.runLog, EXECUTION_TIMEOUT_MS, false, reservation);
|
|
703
783
|
if (run.status !== 0) {
|
|
704
784
|
if (input.runner === 'agy' && !existsOrSymlink(input.report)) {
|
|
705
785
|
const diagnostic = agyQuotaDiagnostic(run);
|
|
@@ -708,6 +788,8 @@ async function execute(input, options) {
|
|
|
708
788
|
const timedOut = run.error?.code === 'ETIMEDOUT';
|
|
709
789
|
fail(15, timedOut ? 'RUN_TIMEOUT' : 'RUN_FAILED', 'execution', timedOut ? 'runner execution timed out' : `runner execution failed${run.error ? `: ${run.error.message}` : ''}`);
|
|
710
790
|
}
|
|
791
|
+
input.measuredUsage = measuredTokenUsage(input.runner, run.stdout);
|
|
792
|
+
responseInput.measuredUsage = input.measuredUsage;
|
|
711
793
|
|
|
712
794
|
if (input.runner === 'codex') {
|
|
713
795
|
if (!fs.existsSync(paths.rawOutput) || existsOrSymlink(input.report)) fail(16, 'REPORT_INVALID', 'report', 'fresh Codex output or report path is missing');
|
|
@@ -733,6 +815,7 @@ async function execute(input, options) {
|
|
|
733
815
|
code: 'DONE',
|
|
734
816
|
phase: 'report',
|
|
735
817
|
message: `Dispatch completed and the report is valid: ${input.report}`,
|
|
818
|
+
usage: input.measuredUsage,
|
|
736
819
|
}, evidencePaths, input);
|
|
737
820
|
}
|
|
738
821
|
|
|
@@ -758,7 +841,7 @@ async function main() {
|
|
|
758
841
|
code: 'DRY_RUN_OK',
|
|
759
842
|
phase: 'dry-run',
|
|
760
843
|
message: `Validated ${input.runner} model ${input.model} for packet ${input.packet} in ${input.worktree}; scratch ${input.scratch}; report ${input.report}`,
|
|
761
|
-
argv: [input.runner, ...runnerArgs(input, executionPrompt(input), outputPath)],
|
|
844
|
+
argv: [input.runner, ...runnerArgs(input, executionPrompt(input), outputPath, EXECUTION_TIMEOUT_MS, true)],
|
|
762
845
|
cwd: input.worktree,
|
|
763
846
|
}, evidencePaths, input);
|
|
764
847
|
return;
|
|
@@ -6,7 +6,7 @@ const path = require('node:path');
|
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
7
7
|
const { REPO, dataPath, writeJson, assertPrivateDataDir } = require('./common');
|
|
8
8
|
const { TASKS, validateFitStage } = require('./train');
|
|
9
|
-
const { validateVersionManifest } = require('../../harness-everything/scripts/system-one/manifest');
|
|
9
|
+
const { validVersion, validateVersionManifest } = require('../../harness-everything/scripts/system-one/manifest');
|
|
10
10
|
|
|
11
11
|
function trainerCatalogs() {
|
|
12
12
|
const trainer = path.join(REPO, 'scripts', 'system-one-train.py');
|
|
@@ -27,7 +27,7 @@ function trainerCatalogs() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function validateVersion(version) {
|
|
30
|
-
if (
|
|
30
|
+
if (!validVersion(version)) throw new Error('invalid --version');
|
|
31
31
|
return version;
|
|
32
32
|
}
|
|
33
33
|
|