harness-everything 0.57.4 → 1.0.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.releaserc.json +2 -0
- package/AGENTS.md +8 -2
- package/CHANGELOG.md +23 -0
- package/README.md +4 -4
- package/benchmarks/results/live-host/agy-2026-11-22/README.md +49 -0
- package/benchmarks/results/live-host/agy-2026-11-23/README.md +48 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md +40 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/edit-state-final.json +11 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/events-2026-11-24.jsonl +103 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/host-version.txt +3 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/live-event-trace-probe.js +11 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/plugin-load-lines.txt +2 -0
- package/benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/reminder-excerpt.txt +1 -0
- package/ci/doc-capability-consistency.test.js +15 -3
- package/ci/lib/opencode-v2-driver.js +169 -0
- package/ci/mechanism-2ao-plugin-sync.test.js +235 -2
- package/ci/mechanism-2n-opencode-plugin.test.js +387 -223
- package/ci/mechanism-2p-opencode-v2-entrypoint.test.js +24 -15
- package/ci/mechanism-2u-issue-42-regressions.test.js +41 -2
- package/ci/mechanism-2w-platform-compatibility.test.js +29 -5
- package/ci/mechanism-2x-release-automation.test.js +3 -1
- package/ci/mechanism-30-opencode-plugin-loadability.test.js +78 -45
- package/ci/mechanism-338-opencode-async.test.js +367 -194
- package/ci/mechanism-341-opencode-lane.test.js +143 -183
- package/ci/mechanism-39-opencode-verify-outcomes.test.js +118 -86
- package/ci/mechanism-394-opencode-ledger-lesson.test.js +46 -97
- package/ci/mechanism-397-opencode-observations.test.js +58 -47
- package/ci/mechanism-453-opencode-v2-driver.test.js +51 -0
- package/ci/mechanism-453-opencode-v2-only-events.test.js +241 -0
- package/ci/mechanism-agy-hooks.test.js +1096 -0
- package/ci/mechanism-agy-plugin-package.test.js +76 -0
- package/ci/telemetry.test.js +31 -24
- package/docs/architecture.md +4 -2
- package/docs/platform-capabilities.md +62 -26
- package/docs/platform-compatibility.json +41 -6
- package/docs/system-one-observations.md +1 -1
- package/docs/telemetry.md +1 -1
- package/docs/troubleshooting.md +2 -2
- package/hooks/scripts/agy-post-tool.js +124 -0
- package/hooks/scripts/agy-pre-invocation.js +185 -0
- package/hooks/scripts/agy-pre-tool.js +158 -0
- package/hooks/scripts/agy-session-start.js +54 -0
- package/hooks/scripts/agy-stop.js +152 -0
- package/hooks/scripts/lib/agy-adapter-core.js +168 -0
- package/hooks/scripts/state-persist.js +50 -10
- package/opencode-plugin/README.md +60 -66
- package/opencode-plugin/index.mjs +11 -13
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.antigravity-plugin/plugin.json +18 -0
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/hooks/scripts/agy-post-tool.js +124 -0
- package/plugins/harness-everything/hooks/scripts/agy-pre-invocation.js +185 -0
- package/plugins/harness-everything/hooks/scripts/agy-pre-tool.js +158 -0
- package/plugins/harness-everything/hooks/scripts/agy-session-start.js +54 -0
- package/plugins/harness-everything/hooks/scripts/agy-stop.js +152 -0
- package/plugins/harness-everything/hooks/scripts/lib/agy-adapter-core.js +168 -0
- package/plugins/harness-everything/hooks/scripts/state-persist.js +50 -10
- package/plugins/harness-everything/hooks.json +44 -0
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/rules/AGENTS.md +117 -0
- package/sbom.cdx.json +12 -12
- package/scripts/plugin-sync.js +105 -14
- package/scripts/sync-openai-plugin.js +16 -1
- package/scripts/sync-release-version.js +1 -0
package/scripts/plugin-sync.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
const { spawnSync } = require('child_process');
|
|
14
14
|
const fs = require('fs');
|
|
15
|
+
const os = require('os');
|
|
15
16
|
const path = require('path');
|
|
16
17
|
|
|
17
18
|
const DEFAULTS = Object.freeze({
|
|
@@ -234,7 +235,7 @@ function resultError(result) {
|
|
|
234
235
|
|
|
235
236
|
function createContext(options = {}) {
|
|
236
237
|
const runner = options.runner || defaultRunner;
|
|
237
|
-
const log = options.log || (message => console.log(message));
|
|
238
|
+
const log = options.log || (message => (options.json ? console.warn(message) : console.log(message)));
|
|
238
239
|
const warn = options.warn || (message => console.warn(message));
|
|
239
240
|
const context = {
|
|
240
241
|
...DEFAULTS,
|
|
@@ -243,6 +244,7 @@ function createContext(options = {}) {
|
|
|
243
244
|
log,
|
|
244
245
|
warn,
|
|
245
246
|
dryRun: Boolean(options.dryRun),
|
|
247
|
+
hasCustomProbe: Boolean(options.commandAvailable || options.runner),
|
|
246
248
|
commandAvailable: options.commandAvailable || (command => {
|
|
247
249
|
const result = runner(command, ['--version'], { probe: true });
|
|
248
250
|
return result && result.status === 0 && !result.error;
|
|
@@ -599,6 +601,89 @@ function syncCodex(context) {
|
|
|
599
601
|
return { host: 'codex', status: 'synchronized', action, compatHooks: compatHooks.result };
|
|
600
602
|
}
|
|
601
603
|
|
|
604
|
+
function syncAgy(context) {
|
|
605
|
+
const hasAgyCli = context.commandAvailable('agy');
|
|
606
|
+
const projectRoot = context.cwd || (!context.hasCustomProbe ? process.cwd() : null);
|
|
607
|
+
const projectAgentsDir = context.agyProjectRoot || (projectRoot ? path.join(projectRoot, '.agents') : null);
|
|
608
|
+
const globalGeminiDir = context.agyGlobalRoot ||
|
|
609
|
+
(context.agyHome
|
|
610
|
+
? path.join(context.agyHome, '.gemini')
|
|
611
|
+
: (!context.hasCustomProbe ? path.join(os.homedir(), '.gemini') : null));
|
|
612
|
+
|
|
613
|
+
const isExplicitAgy = context.host === 'agy';
|
|
614
|
+
const hasExplicitTarget = Boolean(context.agyTarget);
|
|
615
|
+
|
|
616
|
+
const existingProjectTarget = projectAgentsDir &&
|
|
617
|
+
fs.existsSync(path.join(projectAgentsDir, 'plugins', context.plugin, '.antigravity-plugin', 'plugin.json'))
|
|
618
|
+
? path.join(projectAgentsDir, 'plugins', context.plugin)
|
|
619
|
+
: null;
|
|
620
|
+
|
|
621
|
+
const existingGlobalTarget = globalGeminiDir && (
|
|
622
|
+
fs.existsSync(path.join(globalGeminiDir, 'config', 'plugins', context.plugin, '.antigravity-plugin', 'plugin.json')) ||
|
|
623
|
+
fs.existsSync(path.join(globalGeminiDir, 'config', 'plugins', context.plugin, 'plugin.json'))
|
|
624
|
+
) ? path.join(globalGeminiDir, 'config', 'plugins', context.plugin) : null;
|
|
625
|
+
|
|
626
|
+
// Under default --host all, do not select AGY just because an unrelated .agents directory exists.
|
|
627
|
+
// Require AGY CLI (agy), existing AGY config/target, or explicit --host agy.
|
|
628
|
+
if (!isExplicitAgy && !hasAgyCli && !hasExplicitTarget && !existingProjectTarget && !existingGlobalTarget) {
|
|
629
|
+
return {
|
|
630
|
+
host: 'agy',
|
|
631
|
+
status: 'skipped',
|
|
632
|
+
reasonCode: 'cli-not-found',
|
|
633
|
+
reason: 'agy CLI or Antigravity target directory not found'
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
const effectiveTarget = context.agyTarget ||
|
|
638
|
+
existingProjectTarget ||
|
|
639
|
+
existingGlobalTarget ||
|
|
640
|
+
(context.agyProjectRoot
|
|
641
|
+
? path.join(context.agyProjectRoot, 'plugins', context.plugin)
|
|
642
|
+
: path.join(context.agyHome || os.homedir(), '.gemini', 'config', 'plugins', context.plugin));
|
|
643
|
+
|
|
644
|
+
const isInstalled = fs.existsSync(path.join(effectiveTarget, 'plugin.json')) ||
|
|
645
|
+
fs.existsSync(path.join(effectiveTarget, '.antigravity-plugin', 'plugin.json'));
|
|
646
|
+
|
|
647
|
+
const action = isInstalled ? 'update' : 'install';
|
|
648
|
+
|
|
649
|
+
if (context.dryRun) {
|
|
650
|
+
context.log(`[dry-run] agy plugin ${action} -> ${effectiveTarget}`);
|
|
651
|
+
return { host: 'agy', status: 'dry-run', action, target: effectiveTarget };
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const sourcePackage = path.resolve(__dirname, '..', 'plugins', context.plugin);
|
|
655
|
+
const targetParent = path.dirname(effectiveTarget);
|
|
656
|
+
const stagingDir = `${effectiveTarget}.${process.pid}.${Date.now()}.tmp`;
|
|
657
|
+
const backupDir = `${effectiveTarget}.${process.pid}.${Date.now()}.bak`;
|
|
658
|
+
|
|
659
|
+
try {
|
|
660
|
+
fs.mkdirSync(targetParent, { recursive: true });
|
|
661
|
+
fs.cpSync(sourcePackage, stagingDir, { recursive: true });
|
|
662
|
+
|
|
663
|
+
if (fs.existsSync(effectiveTarget)) {
|
|
664
|
+
fs.renameSync(effectiveTarget, backupDir);
|
|
665
|
+
try {
|
|
666
|
+
fs.renameSync(stagingDir, effectiveTarget);
|
|
667
|
+
fs.rmSync(backupDir, { recursive: true, force: true });
|
|
668
|
+
} catch (swapErr) {
|
|
669
|
+
if (fs.existsSync(backupDir) && !fs.existsSync(effectiveTarget)) {
|
|
670
|
+
fs.renameSync(backupDir, effectiveTarget);
|
|
671
|
+
}
|
|
672
|
+
throw swapErr;
|
|
673
|
+
}
|
|
674
|
+
} else {
|
|
675
|
+
fs.renameSync(stagingDir, effectiveTarget);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
return { host: 'agy', status: 'synchronized', action, target: effectiveTarget };
|
|
679
|
+
} catch (err) {
|
|
680
|
+
if (fs.existsSync(stagingDir)) {
|
|
681
|
+
try { fs.rmSync(stagingDir, { recursive: true, force: true }); } catch (_) {}
|
|
682
|
+
}
|
|
683
|
+
return { host: 'agy', status: 'failed', action, error: `AGY plugin ${action} failed: ${err.message}` };
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
602
687
|
function parseArgs(argv) {
|
|
603
688
|
const options = { host: 'all', dryRun: false, json: false };
|
|
604
689
|
for (let index = 0; index < argv.length; index++) {
|
|
@@ -608,7 +693,7 @@ function parseArgs(argv) {
|
|
|
608
693
|
else if (arg === '--json') options.json = true;
|
|
609
694
|
else if (arg === '--host') {
|
|
610
695
|
options.host = argv[++index];
|
|
611
|
-
if (!options.host) throw new Error('--host requires all, claude, or
|
|
696
|
+
if (!options.host) throw new Error('--host requires all, claude, codex, or agy');
|
|
612
697
|
} else if (arg === '--repository') {
|
|
613
698
|
options.repository = argv[++index];
|
|
614
699
|
if (!options.repository) throw new Error('--repository requires a repository or URL');
|
|
@@ -620,7 +705,7 @@ function parseArgs(argv) {
|
|
|
620
705
|
}
|
|
621
706
|
}
|
|
622
707
|
options.host = String(options.host).toLowerCase();
|
|
623
|
-
if (!['all', 'claude', 'codex'].includes(options.host)) throw new Error(`Unsupported host: ${options.host}`);
|
|
708
|
+
if (!['all', 'claude', 'codex', 'agy'].includes(options.host)) throw new Error(`Unsupported host: ${options.host}`);
|
|
624
709
|
return options;
|
|
625
710
|
}
|
|
626
711
|
|
|
@@ -634,18 +719,18 @@ local compatibility-hook runtime and user hook entries; Codex trust remains a
|
|
|
634
719
|
separate host review.
|
|
635
720
|
|
|
636
721
|
Options:
|
|
637
|
-
--host <all|claude|codex> Limit synchronization to one host (default: all)
|
|
638
|
-
--repository <repo|url>
|
|
639
|
-
--ref <git-ref>
|
|
640
|
-
--dry-run
|
|
641
|
-
--json
|
|
642
|
-
-h, --help
|
|
722
|
+
--host <all|claude|codex|agy> Limit synchronization to one host (default: all)
|
|
723
|
+
--repository <repo|url> Marketplace source (default: dyphn1/Harness-everything)
|
|
724
|
+
--ref <git-ref> Codex marketplace ref (default: main)
|
|
725
|
+
--dry-run Detect state and print mutating commands
|
|
726
|
+
--json Print a machine-readable summary
|
|
727
|
+
-h, --help Show this help
|
|
643
728
|
`;
|
|
644
729
|
}
|
|
645
730
|
|
|
646
731
|
function sync(options, dependencies = {}) {
|
|
647
732
|
const context = createContext({ ...options, ...dependencies });
|
|
648
|
-
const hosts = context.host === 'all' ? ['claude', 'codex'] : [context.host];
|
|
733
|
+
const hosts = context.host === 'all' ? ['claude', 'codex', 'agy'] : [context.host];
|
|
649
734
|
// Each host sync is fully synchronous and the marketplace update/refresh
|
|
650
735
|
// step does real network I/O (observed ~10s+ for Claude alone), so without
|
|
651
736
|
// this the terminal stays completely silent until every host finishes —
|
|
@@ -653,7 +738,10 @@ function sync(options, dependencies = {}) {
|
|
|
653
738
|
// stdout, so `--json` consumers' stdout stays pure JSON.
|
|
654
739
|
const results = hosts.map(host => {
|
|
655
740
|
context.warn(`[...] ${host}: syncing`);
|
|
656
|
-
|
|
741
|
+
if (host === 'claude') return syncClaude(context);
|
|
742
|
+
if (host === 'codex') return syncCodex(context);
|
|
743
|
+
if (host === 'agy') return syncAgy(context);
|
|
744
|
+
return { host, status: 'failed', error: `Unknown host ${host}` };
|
|
657
745
|
});
|
|
658
746
|
const summary = {
|
|
659
747
|
repository: context.repository,
|
|
@@ -662,6 +750,7 @@ function sync(options, dependencies = {}) {
|
|
|
662
750
|
dryRun: context.dryRun,
|
|
663
751
|
results,
|
|
664
752
|
synchronized: results.filter(result => result.status === 'synchronized').length,
|
|
753
|
+
planned: results.filter(result => result.status === 'dry-run').length,
|
|
665
754
|
skipped: results.filter(result => result.status === 'skipped').length,
|
|
666
755
|
failed: results.filter(result => result.status === 'failed').length
|
|
667
756
|
};
|
|
@@ -687,16 +776,18 @@ function main(argv = process.argv.slice(2)) {
|
|
|
687
776
|
else {
|
|
688
777
|
for (const result of summary.results) {
|
|
689
778
|
if (result.status === 'synchronized') console.log('[ok] ' + result.host + ': ' + result.action + (result.compatHooks ? '; Codex hooks ' + result.compatHooks.status : ''));
|
|
779
|
+
else if (result.status === 'dry-run') console.log(`[dry-run] ${result.host}: ${result.action}${result.target ? ' -> ' + result.target : ''}`);
|
|
690
780
|
else if (result.status === 'skipped') console.log(`[skip] ${result.host}: ${result.reason}`);
|
|
691
781
|
else console.error(`[fail] ${result.host}: ${result.error}`);
|
|
692
782
|
}
|
|
693
|
-
|
|
783
|
+
const completed = summary.synchronized + summary.planned;
|
|
784
|
+
if (completed === 0 && summary.failed === 0) {
|
|
694
785
|
console.error(summary.results.every(result => result.reasonCode === 'cli-not-found')
|
|
695
|
-
? 'No supported host CLI was found. Install Claude Code and/or
|
|
786
|
+
? 'No supported host CLI was found. Install Claude Code, Codex, and/or Antigravity (AGY), then retry.'
|
|
696
787
|
: 'No host plugin was synchronized. Review the skip reasons above.');
|
|
697
788
|
}
|
|
698
789
|
}
|
|
699
|
-
return summary.failed > 0 || summary.synchronized === 0 ? 1 : 0;
|
|
790
|
+
return summary.failed > 0 || (summary.synchronized + summary.planned) === 0 ? 1 : 0;
|
|
700
791
|
}
|
|
701
792
|
|
|
702
793
|
if (require.main === module) process.exitCode = main();
|
|
@@ -111,4 +111,19 @@ fs.writeFileSync(
|
|
|
111
111
|
'utf8'
|
|
112
112
|
);
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
// Antigravity (AGY) plugin synchronization: rules and manifest lockstep
|
|
115
|
+
const packageRulesRoot = path.join(pluginRoot, 'rules');
|
|
116
|
+
fs.mkdirSync(packageRulesRoot, { recursive: true });
|
|
117
|
+
syncTree(path.join(ROOT, 'AGENTS.md'), path.join(packageRulesRoot, 'AGENTS.md'));
|
|
118
|
+
|
|
119
|
+
const agyManifestPath = path.join(pluginRoot, '.antigravity-plugin', 'plugin.json');
|
|
120
|
+
if (fs.existsSync(agyManifestPath)) {
|
|
121
|
+
const agyManifest = JSON.parse(fs.readFileSync(agyManifestPath, 'utf8'));
|
|
122
|
+
const rootPkg = JSON.parse(fs.readFileSync(path.join(ROOT, 'package.json'), 'utf8'));
|
|
123
|
+
if (agyManifest.version !== rootPkg.version) {
|
|
124
|
+
agyManifest.version = rootPkg.version;
|
|
125
|
+
fs.writeFileSync(agyManifestPath, JSON.stringify(agyManifest, null, 2) + '\n', 'utf8');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
console.log(`OpenAI and AGY plugin skills and runtime synchronized: ${expected.size} skills`);
|
|
@@ -34,6 +34,7 @@ const VERSION_TARGETS = [
|
|
|
34
34
|
},
|
|
35
35
|
{ file: 'plugins/harness-everything/plugin.json', get: data => data.version, set: (data, v) => { data.version = v; } },
|
|
36
36
|
{ file: 'plugins/harness-everything/.codex-plugin/plugin.json', get: data => data.version, set: (data, v) => { data.version = v; } },
|
|
37
|
+
{ file: 'plugins/harness-everything/.antigravity-plugin/plugin.json', get: data => data.version, set: (data, v) => { data.version = v; } },
|
|
37
38
|
{ file: 'opencode-plugin/plugin.json', get: data => data.version, set: (data, v) => { data.version = v; } }
|
|
38
39
|
];
|
|
39
40
|
|