oh-my-codex 0.10.2 → 0.10.3
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/README.de.md +4 -4
- package/README.es.md +4 -4
- package/README.fr.md +4 -4
- package/README.it.md +4 -4
- package/README.ja.md +4 -4
- package/README.ko.md +4 -4
- package/README.md +13 -7
- package/README.pt.md +4 -4
- package/README.ru.md +4 -4
- package/README.tr.md +4 -4
- package/README.vi.md +4 -4
- package/README.zh-TW.md +4 -4
- package/README.zh.md +4 -4
- package/dist/agents/__tests__/native-config.test.js +37 -33
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/__tests__/skill-bridge.test.d.ts +2 -0
- package/dist/agents/__tests__/skill-bridge.test.d.ts.map +1 -0
- package/dist/agents/__tests__/skill-bridge.test.js +71 -0
- package/dist/agents/__tests__/skill-bridge.test.js.map +1 -0
- package/dist/agents/native-config.d.ts +18 -6
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +109 -92
- package/dist/agents/native-config.js.map +1 -1
- package/dist/agents/skill-bridge.d.ts +20 -0
- package/dist/agents/skill-bridge.d.ts.map +1 -0
- package/dist/agents/skill-bridge.js +150 -0
- package/dist/agents/skill-bridge.js.map +1 -0
- package/dist/autoresearch/__tests__/contracts.test.js +37 -1
- package/dist/autoresearch/__tests__/contracts.test.js.map +1 -1
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.js +10 -10
- package/dist/autoresearch/__tests__/runtime-parity-extra.test.js.map +1 -1
- package/dist/autoresearch/__tests__/runtime.test.js +2 -2
- package/dist/autoresearch/__tests__/runtime.test.js.map +1 -1
- package/dist/autoresearch/contracts.d.ts.map +1 -1
- package/dist/autoresearch/contracts.js +17 -10
- package/dist/autoresearch/contracts.js.map +1 -1
- package/dist/autoresearch/runtime.d.ts.map +1 -1
- package/dist/autoresearch/runtime.js +71 -96
- package/dist/autoresearch/runtime.js.map +1 -1
- package/dist/cli/__tests__/agents-init.test.js +2 -0
- package/dist/cli/__tests__/agents-init.test.js.map +1 -1
- package/dist/cli/__tests__/agents.test.d.ts +2 -0
- package/dist/cli/__tests__/agents.test.d.ts.map +1 -0
- package/dist/cli/__tests__/agents.test.js +114 -0
- package/dist/cli/__tests__/agents.test.js.map +1 -0
- package/dist/cli/__tests__/autoresearch-guided.test.js +156 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch.test.js +195 -24
- package/dist/cli/__tests__/autoresearch.test.js.map +1 -1
- package/dist/cli/__tests__/cleanup.test.d.ts +2 -0
- package/dist/cli/__tests__/cleanup.test.d.ts.map +1 -0
- package/dist/cli/__tests__/cleanup.test.js +213 -0
- package/dist/cli/__tests__/cleanup.test.js.map +1 -0
- package/dist/cli/__tests__/error-handling-warnings.test.js +1 -1
- package/dist/cli/__tests__/error-handling-warnings.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +3 -3
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +521 -401
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/native-assets.test.js +72 -9
- package/dist/cli/__tests__/native-assets.test.js.map +1 -1
- package/dist/cli/__tests__/ralphthon.test.d.ts +2 -0
- package/dist/cli/__tests__/ralphthon.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralphthon.test.js +28 -0
- package/dist/cli/__tests__/ralphthon.test.js.map +1 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +36 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +35 -5
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +2 -2
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +131 -161
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/setup-skills-overwrite.test.js +10 -10
- package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +28 -2
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +1 -112
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +7 -20
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/agents-init.d.ts.map +1 -1
- package/dist/cli/agents-init.js +99 -95
- package/dist/cli/agents-init.js.map +1 -1
- package/dist/cli/agents.d.ts +14 -0
- package/dist/cli/agents.d.ts.map +1 -0
- package/dist/cli/agents.js +261 -0
- package/dist/cli/agents.js.map +1 -0
- package/dist/cli/autoresearch-guided.d.ts +8 -0
- package/dist/cli/autoresearch-guided.d.ts.map +1 -1
- package/dist/cli/autoresearch-guided.js +104 -37
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/autoresearch-intake.d.ts +60 -0
- package/dist/cli/autoresearch-intake.d.ts.map +1 -0
- package/dist/cli/autoresearch-intake.js +318 -0
- package/dist/cli/autoresearch-intake.js.map +1 -0
- package/dist/cli/autoresearch.d.ts +3 -1
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +64 -10
- package/dist/cli/autoresearch.js.map +1 -1
- package/dist/cli/cleanup.d.ts +52 -0
- package/dist/cli/cleanup.d.ts.map +1 -0
- package/dist/cli/cleanup.js +302 -0
- package/dist/cli/cleanup.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +9 -37
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/explore.d.ts.map +1 -1
- package/dist/cli/explore.js +5 -4
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +5 -7
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +610 -427
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/native-assets.d.ts +15 -1
- package/dist/cli/native-assets.d.ts.map +1 -1
- package/dist/cli/native-assets.js +134 -32
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/ralph.d.ts.map +1 -1
- package/dist/cli/ralph.js +38 -1
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/ralphthon.d.ts +14 -0
- package/dist/cli/ralphthon.d.ts.map +1 -0
- package/dist/cli/ralphthon.js +234 -0
- package/dist/cli/ralphthon.js.map +1 -0
- package/dist/cli/setup.d.ts +1 -4
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +111 -76
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts +3 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +35 -16
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +1 -0
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/uninstall.d.ts +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +82 -64
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +10 -10
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +15 -0
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/generator.d.ts +0 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +53 -42
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +295 -230
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +49 -24
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher-ralphthon.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-fallback-watcher-ralphthon.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-fallback-watcher-ralphthon.test.js +193 -0
- package/dist/hooks/__tests__/notify-fallback-watcher-ralphthon.test.js.map +1 -0
- package/dist/hooks/agents-overlay.d.ts +1 -1
- package/dist/hooks/agents-overlay.d.ts.map +1 -1
- package/dist/hooks/agents-overlay.js +109 -106
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/modes/base.d.ts +1 -1
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +1 -1
- package/dist/modes/base.js.map +1 -1
- package/dist/ralphthon/__tests__/bootstrap.test.d.ts +2 -0
- package/dist/ralphthon/__tests__/bootstrap.test.d.ts.map +1 -0
- package/dist/ralphthon/__tests__/bootstrap.test.js +23 -0
- package/dist/ralphthon/__tests__/bootstrap.test.js.map +1 -0
- package/dist/ralphthon/__tests__/orchestrator.test.d.ts +2 -0
- package/dist/ralphthon/__tests__/orchestrator.test.d.ts.map +1 -0
- package/dist/ralphthon/__tests__/orchestrator.test.js +309 -0
- package/dist/ralphthon/__tests__/orchestrator.test.js.map +1 -0
- package/dist/ralphthon/__tests__/prd.test.d.ts +2 -0
- package/dist/ralphthon/__tests__/prd.test.d.ts.map +1 -0
- package/dist/ralphthon/__tests__/prd.test.js +133 -0
- package/dist/ralphthon/__tests__/prd.test.js.map +1 -0
- package/dist/ralphthon/bootstrap.d.ts +3 -0
- package/dist/ralphthon/bootstrap.d.ts.map +1 -0
- package/dist/ralphthon/bootstrap.js +84 -0
- package/dist/ralphthon/bootstrap.js.map +1 -0
- package/dist/ralphthon/orchestrator.d.ts +50 -0
- package/dist/ralphthon/orchestrator.d.ts.map +1 -0
- package/dist/ralphthon/orchestrator.js +362 -0
- package/dist/ralphthon/orchestrator.js.map +1 -0
- package/dist/ralphthon/prd.d.ts +191 -0
- package/dist/ralphthon/prd.d.ts.map +1 -0
- package/dist/ralphthon/prd.js +355 -0
- package/dist/ralphthon/prd.js.map +1 -0
- package/dist/ralphthon/runtime.d.ts +31 -0
- package/dist/ralphthon/runtime.d.ts.map +1 -0
- package/dist/ralphthon/runtime.js +104 -0
- package/dist/ralphthon/runtime.js.map +1 -0
- package/dist/ralphthon/tmux.d.ts +3 -0
- package/dist/ralphthon/tmux.d.ts.map +1 -0
- package/dist/ralphthon/tmux.js +39 -0
- package/dist/ralphthon/tmux.js.map +1 -0
- package/dist/subagents/__tests__/tracker.test.d.ts +2 -0
- package/dist/subagents/__tests__/tracker.test.d.ts.map +1 -0
- package/dist/subagents/__tests__/tracker.test.js +47 -0
- package/dist/subagents/__tests__/tracker.test.js.map +1 -0
- package/dist/subagents/tracker.d.ts +52 -0
- package/dist/subagents/tracker.d.ts.map +1 -0
- package/dist/subagents/tracker.js +175 -0
- package/dist/subagents/tracker.js.map +1 -0
- package/dist/team/__tests__/worker-bootstrap.test.js +189 -163
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/__tests__/worktree.test.js +1 -1
- package/dist/team/__tests__/worktree.test.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +58 -63
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/team/worktree.js +1 -1
- package/dist/team/worktree.js.map +1 -1
- package/dist/utils/__tests__/agents-md.test.d.ts +2 -0
- package/dist/utils/__tests__/agents-md.test.d.ts.map +1 -0
- package/dist/utils/__tests__/agents-md.test.js +32 -0
- package/dist/utils/__tests__/agents-md.test.js.map +1 -0
- package/dist/utils/__tests__/agents-model-table.test.d.ts +2 -0
- package/dist/utils/__tests__/agents-model-table.test.d.ts.map +1 -0
- package/dist/utils/__tests__/agents-model-table.test.js +84 -0
- package/dist/utils/__tests__/agents-model-table.test.js.map +1 -0
- package/dist/utils/__tests__/paths.test.js +78 -83
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/agents-md.d.ts.map +1 -1
- package/dist/utils/agents-md.js +10 -0
- package/dist/utils/agents-md.js.map +1 -1
- package/dist/utils/agents-model-table.d.ts +16 -0
- package/dist/utils/agents-model-table.d.ts.map +1 -0
- package/dist/utils/agents-model-table.js +83 -0
- package/dist/utils/agents-model-table.js.map +1 -0
- package/dist/utils/paths.d.ts +6 -6
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +31 -31
- package/dist/utils/paths.js.map +1 -1
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js +21 -3
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
- package/dist/verification/__tests__/native-release-manifest.test.d.ts +2 -0
- package/dist/verification/__tests__/native-release-manifest.test.d.ts.map +1 -0
- package/dist/verification/__tests__/native-release-manifest.test.js +80 -0
- package/dist/verification/__tests__/native-release-manifest.test.js.map +1 -0
- package/package.json +1 -1
- package/prompts/executor.md +15 -0
- package/scripts/__tests__/smoke-packed-install.test.mjs +137 -8
- package/scripts/eval-adaptive-sort-optimization.py +24 -0
- package/scripts/eval-in-action-cat-shellout-demo.js +31 -0
- package/scripts/eval-ml-kaggle-model-optimization.py +29 -0
- package/scripts/eval-noisy-bayesopt-highdim.py +44 -0
- package/scripts/eval-noisy-latent-subspace-discovery.py +44 -0
- package/scripts/generate-native-release-manifest.mjs +14 -3
- package/scripts/notify-fallback-watcher.js +308 -6
- package/scripts/notify-hook.js +20 -0
- package/scripts/run-autoresearch-showcase.sh +75 -0
- package/scripts/smoke-packed-install.mjs +142 -10
- package/skills/deep-interview/SKILL.md +30 -1
- package/skills/omx-setup/SKILL.md +2 -2
- package/skills/skill/SKILL.md +32 -32
- package/skills/team/SKILL.md +6 -0
- package/skills/worker/SKILL.md +2 -2
- package/templates/AGENTS.md +97 -16
|
@@ -4,29 +4,42 @@ import { tmpdir } from 'node:os';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { test } from 'node:test';
|
|
6
6
|
import {
|
|
7
|
+
ensureRepoDependencies,
|
|
8
|
+
hasSparkShellFallbackBanner,
|
|
9
|
+
hasUsableNodeModules,
|
|
7
10
|
prepareLocalHydrationAssetDirectory,
|
|
11
|
+
resolveGitCommonDir,
|
|
12
|
+
resolveReusableNodeModulesSource,
|
|
8
13
|
rewriteManifestDownloadUrls,
|
|
9
14
|
} from '../smoke-packed-install.mjs';
|
|
10
15
|
|
|
16
|
+
test('detects the sparkshell GLIBC fallback banner', () => {
|
|
17
|
+
assert.equal(
|
|
18
|
+
hasSparkShellFallbackBanner('[sparkshell] GLIBC-incompatible native sidecar detected; falling back to raw command execution without summary support.\n'),
|
|
19
|
+
true,
|
|
20
|
+
);
|
|
21
|
+
assert.equal(hasSparkShellFallbackBanner('node v20.0.0\n'), false);
|
|
22
|
+
});
|
|
23
|
+
|
|
11
24
|
test('rewrites copied native manifest download urls to the local smoke server', async () => {
|
|
12
25
|
const root = await mkdtemp(join(tmpdir(), 'omx-smoke-packed-install-'));
|
|
13
26
|
try {
|
|
14
27
|
const sourceDir = join(root, 'source-release-assets');
|
|
15
28
|
await mkdir(sourceDir, { recursive: true });
|
|
16
|
-
await writeFile(join(sourceDir, 'omx-explore-harness-x86_64-unknown-linux-
|
|
17
|
-
await writeFile(join(sourceDir, 'omx-sparkshell-x86_64-unknown-linux-
|
|
29
|
+
await writeFile(join(sourceDir, 'omx-explore-harness-x86_64-unknown-linux-musl.tar.xz'), 'explore');
|
|
30
|
+
await writeFile(join(sourceDir, 'omx-sparkshell-x86_64-unknown-linux-musl.tar.xz'), 'sparkshell');
|
|
18
31
|
await writeFile(join(sourceDir, 'native-release-manifest.json'), JSON.stringify({
|
|
19
32
|
version: '0.9.0',
|
|
20
33
|
assets: [
|
|
21
34
|
{
|
|
22
35
|
product: 'omx-explore-harness',
|
|
23
|
-
archive: 'omx-explore-harness-x86_64-unknown-linux-
|
|
24
|
-
download_url: 'https://github.com/example/omx-explore-harness-x86_64-unknown-linux-
|
|
36
|
+
archive: 'omx-explore-harness-x86_64-unknown-linux-musl.tar.xz',
|
|
37
|
+
download_url: 'https://github.com/example/omx-explore-harness-x86_64-unknown-linux-musl.tar.xz',
|
|
25
38
|
},
|
|
26
39
|
{
|
|
27
40
|
product: 'omx-sparkshell',
|
|
28
|
-
archive: 'omx-sparkshell-x86_64-unknown-linux-
|
|
29
|
-
download_url: 'https://github.com/example/omx-sparkshell-x86_64-unknown-linux-
|
|
41
|
+
archive: 'omx-sparkshell-x86_64-unknown-linux-musl.tar.xz',
|
|
42
|
+
download_url: 'https://github.com/example/omx-sparkshell-x86_64-unknown-linux-musl.tar.xz',
|
|
30
43
|
},
|
|
31
44
|
],
|
|
32
45
|
}, null, 2));
|
|
@@ -41,11 +54,127 @@ test('rewrites copied native manifest download urls to the local smoke server',
|
|
|
41
54
|
assert.deepEqual(
|
|
42
55
|
copiedManifest.assets.map((asset) => asset.download_url),
|
|
43
56
|
[
|
|
44
|
-
'http://127.0.0.1:43123/omx-explore-harness-x86_64-unknown-linux-
|
|
45
|
-
'http://127.0.0.1:43123/omx-sparkshell-x86_64-unknown-linux-
|
|
57
|
+
'http://127.0.0.1:43123/omx-explore-harness-x86_64-unknown-linux-musl.tar.xz',
|
|
58
|
+
'http://127.0.0.1:43123/omx-sparkshell-x86_64-unknown-linux-musl.tar.xz',
|
|
46
59
|
],
|
|
47
60
|
);
|
|
48
61
|
} finally {
|
|
49
62
|
await rm(root, { recursive: true, force: true });
|
|
50
63
|
}
|
|
51
64
|
});
|
|
65
|
+
|
|
66
|
+
test('resolveGitCommonDir resolves relative git common dir output against the repo root', () => {
|
|
67
|
+
const commonDir = resolveGitCommonDir('/tmp/worktree', () => ({
|
|
68
|
+
status: 0,
|
|
69
|
+
stdout: '../primary/.git\n',
|
|
70
|
+
stderr: '',
|
|
71
|
+
}));
|
|
72
|
+
assert.equal(commonDir, '/tmp/primary/.git');
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
test('hasUsableNodeModules requires the packaged build dependencies', async () => {
|
|
76
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-smoke-node-modules-'));
|
|
77
|
+
try {
|
|
78
|
+
const nodeModules = join(root, 'node_modules');
|
|
79
|
+
await mkdir(join(nodeModules, 'typescript'), { recursive: true });
|
|
80
|
+
await mkdir(join(nodeModules, '@iarna', 'toml'), { recursive: true });
|
|
81
|
+
await mkdir(join(nodeModules, '@modelcontextprotocol', 'sdk'), { recursive: true });
|
|
82
|
+
await mkdir(join(nodeModules, 'zod'), { recursive: true });
|
|
83
|
+
await writeFile(join(nodeModules, 'typescript', 'package.json'), '{}');
|
|
84
|
+
await writeFile(join(nodeModules, '@iarna', 'toml', 'package.json'), '{}');
|
|
85
|
+
await writeFile(join(nodeModules, '@modelcontextprotocol', 'sdk', 'package.json'), '{}');
|
|
86
|
+
await writeFile(join(nodeModules, 'zod', 'package.json'), '{}');
|
|
87
|
+
|
|
88
|
+
assert.equal(hasUsableNodeModules(root), true);
|
|
89
|
+
|
|
90
|
+
await rm(join(nodeModules, 'zod', 'package.json'));
|
|
91
|
+
assert.equal(hasUsableNodeModules(root), false);
|
|
92
|
+
} finally {
|
|
93
|
+
await rm(root, { recursive: true, force: true });
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('resolveReusableNodeModulesSource reuses primary worktree node_modules when available', async () => {
|
|
98
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-smoke-reuse-node-modules-'));
|
|
99
|
+
try {
|
|
100
|
+
const primaryRepo = join(root, 'primary');
|
|
101
|
+
const worktreeRepo = join(root, 'worktree');
|
|
102
|
+
await mkdir(join(primaryRepo, 'node_modules', 'typescript'), { recursive: true });
|
|
103
|
+
await mkdir(join(primaryRepo, 'node_modules', '@iarna', 'toml'), { recursive: true });
|
|
104
|
+
await mkdir(join(primaryRepo, 'node_modules', '@modelcontextprotocol', 'sdk'), { recursive: true });
|
|
105
|
+
await mkdir(join(primaryRepo, 'node_modules', 'zod'), { recursive: true });
|
|
106
|
+
await writeFile(join(primaryRepo, 'node_modules', 'typescript', 'package.json'), '{}');
|
|
107
|
+
await writeFile(join(primaryRepo, 'node_modules', '@iarna', 'toml', 'package.json'), '{}');
|
|
108
|
+
await writeFile(join(primaryRepo, 'node_modules', '@modelcontextprotocol', 'sdk', 'package.json'), '{}');
|
|
109
|
+
await writeFile(join(primaryRepo, 'node_modules', 'zod', 'package.json'), '{}');
|
|
110
|
+
await mkdir(worktreeRepo, { recursive: true });
|
|
111
|
+
|
|
112
|
+
const reusable = resolveReusableNodeModulesSource(worktreeRepo, () => ({
|
|
113
|
+
status: 0,
|
|
114
|
+
stdout: `${join(primaryRepo, '.git')}\n`,
|
|
115
|
+
stderr: '',
|
|
116
|
+
}));
|
|
117
|
+
|
|
118
|
+
assert.equal(reusable, join(primaryRepo, 'node_modules'));
|
|
119
|
+
} finally {
|
|
120
|
+
await rm(root, { recursive: true, force: true });
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
test('ensureRepoDependencies symlinks a reusable primary worktree node_modules', async () => {
|
|
125
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-smoke-symlink-node-modules-'));
|
|
126
|
+
try {
|
|
127
|
+
const primaryRepo = join(root, 'primary');
|
|
128
|
+
const worktreeRepo = join(root, 'worktree');
|
|
129
|
+
await mkdir(join(primaryRepo, 'node_modules', 'typescript'), { recursive: true });
|
|
130
|
+
await mkdir(join(primaryRepo, 'node_modules', '@iarna', 'toml'), { recursive: true });
|
|
131
|
+
await mkdir(join(primaryRepo, 'node_modules', '@modelcontextprotocol', 'sdk'), { recursive: true });
|
|
132
|
+
await mkdir(join(primaryRepo, 'node_modules', 'zod'), { recursive: true });
|
|
133
|
+
await writeFile(join(primaryRepo, 'node_modules', 'typescript', 'package.json'), '{}');
|
|
134
|
+
await writeFile(join(primaryRepo, 'node_modules', '@iarna', 'toml', 'package.json'), '{}');
|
|
135
|
+
await writeFile(join(primaryRepo, 'node_modules', '@modelcontextprotocol', 'sdk', 'package.json'), '{}');
|
|
136
|
+
await writeFile(join(primaryRepo, 'node_modules', 'zod', 'package.json'), '{}');
|
|
137
|
+
await mkdir(worktreeRepo, { recursive: true });
|
|
138
|
+
|
|
139
|
+
const events = [];
|
|
140
|
+
const result = ensureRepoDependencies(worktreeRepo, {
|
|
141
|
+
gitRunner: () => ({
|
|
142
|
+
status: 0,
|
|
143
|
+
stdout: `${join(primaryRepo, '.git')}\n`,
|
|
144
|
+
stderr: '',
|
|
145
|
+
}),
|
|
146
|
+
install: () => {
|
|
147
|
+
throw new Error('install should not be called when a reusable node_modules source exists');
|
|
148
|
+
},
|
|
149
|
+
log: (message) => events.push(message),
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
assert.equal(result.strategy, 'symlink');
|
|
153
|
+
assert.equal(result.sourceNodeModulesPath, join(primaryRepo, 'node_modules'));
|
|
154
|
+
assert.equal(events[0], `[smoke:packed-install] Reusing node_modules from ${join(primaryRepo, 'node_modules')}`);
|
|
155
|
+
} finally {
|
|
156
|
+
await rm(root, { recursive: true, force: true });
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
test('ensureRepoDependencies falls back to npm ci when no reusable node_modules source exists', async () => {
|
|
161
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-smoke-install-node-modules-'));
|
|
162
|
+
try {
|
|
163
|
+
const installs = [];
|
|
164
|
+
const result = ensureRepoDependencies(root, {
|
|
165
|
+
gitRunner: () => ({
|
|
166
|
+
status: 1,
|
|
167
|
+
stdout: '',
|
|
168
|
+
stderr: 'not a worktree',
|
|
169
|
+
}),
|
|
170
|
+
install: (cwd) => {
|
|
171
|
+
installs.push(cwd);
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
assert.equal(result.strategy, 'installed');
|
|
176
|
+
assert.deepEqual(installs, [root]);
|
|
177
|
+
} finally {
|
|
178
|
+
await rm(root, { recursive: true, force: true });
|
|
179
|
+
}
|
|
180
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
result = subprocess.run(
|
|
8
|
+
[sys.executable, 'playground/adaptive_sort_demo/sort_benchmark.py'],
|
|
9
|
+
check=False,
|
|
10
|
+
capture_output=True,
|
|
11
|
+
text=True,
|
|
12
|
+
)
|
|
13
|
+
if result.stdout:
|
|
14
|
+
sys.stderr.write(result.stdout)
|
|
15
|
+
if result.stderr:
|
|
16
|
+
sys.stderr.write(result.stderr)
|
|
17
|
+
if result.returncode != 0:
|
|
18
|
+
print(json.dumps({'pass': False, 'score': 0.0}))
|
|
19
|
+
raise SystemExit(result.returncode)
|
|
20
|
+
|
|
21
|
+
payload = json.loads(result.stdout)
|
|
22
|
+
total_cost = float(payload['total_cost'])
|
|
23
|
+
score = 10000.0 / total_cost
|
|
24
|
+
print(json.dumps({'pass': total_cost > 0, 'score': score}))
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
|
|
4
|
+
const source = readFileSync('src/cli/autoresearch.ts', 'utf-8');
|
|
5
|
+
const stillUsesCatShellout = /execFileSync\('cat',\s*\[runtime\.manifestFile\]/.test(source);
|
|
6
|
+
|
|
7
|
+
if (stillUsesCatShellout) {
|
|
8
|
+
process.stderr.write('Evaluator: src/cli/autoresearch.ts still shells out to cat for the manifest.\n');
|
|
9
|
+
process.stdout.write(JSON.stringify({ pass: false, score: 0 }));
|
|
10
|
+
process.exit(1);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const build = spawnSync('npm', ['run', 'build'], { encoding: 'utf-8' });
|
|
14
|
+
if (build.stdout) process.stderr.write(build.stdout);
|
|
15
|
+
if (build.stderr) process.stderr.write(build.stderr);
|
|
16
|
+
if (build.status !== 0) {
|
|
17
|
+
process.stdout.write(JSON.stringify({ pass: false, score: 0 }));
|
|
18
|
+
process.exit(build.status ?? 1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const test = spawnSync('node', [
|
|
22
|
+
'--test',
|
|
23
|
+
'dist/cli/__tests__/autoresearch.test.js',
|
|
24
|
+
'dist/autoresearch/__tests__/runtime.test.js',
|
|
25
|
+
], { encoding: 'utf-8' });
|
|
26
|
+
if (test.stdout) process.stderr.write(test.stdout);
|
|
27
|
+
if (test.stderr) process.stderr.write(test.stderr);
|
|
28
|
+
|
|
29
|
+
const pass = test.status === 0;
|
|
30
|
+
process.stdout.write(JSON.stringify({ pass, score: pass ? 1 : 0 }));
|
|
31
|
+
process.exit(test.status ?? 1);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
result = subprocess.run(
|
|
8
|
+
[sys.executable, "playground/ml_kaggle_demo/train.py"],
|
|
9
|
+
check=False,
|
|
10
|
+
capture_output=True,
|
|
11
|
+
text=True,
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
if result.stdout:
|
|
15
|
+
sys.stderr.write(result.stdout)
|
|
16
|
+
if result.stderr:
|
|
17
|
+
sys.stderr.write(result.stderr)
|
|
18
|
+
|
|
19
|
+
if result.returncode != 0:
|
|
20
|
+
print(json.dumps({"pass": False, "score": 0.0}))
|
|
21
|
+
raise SystemExit(result.returncode)
|
|
22
|
+
|
|
23
|
+
metrics = json.loads(result.stdout)
|
|
24
|
+
auc = float(metrics["roc_auc"])
|
|
25
|
+
|
|
26
|
+
# Baseline should pass, but score_improvement should still reward better architectures.
|
|
27
|
+
passed = auc >= 0.90
|
|
28
|
+
print(json.dumps({"pass": passed, "score": auc}))
|
|
29
|
+
raise SystemExit(0 if passed else 1)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
CONFIG_PATH = Path('playground/bayesopt_highdim_demo/config.json')
|
|
9
|
+
SEEDS = (17, 29, 43)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def run_for_seed(seed: int) -> dict:
|
|
13
|
+
config = json.loads(CONFIG_PATH.read_text())
|
|
14
|
+
config['seed'] = seed
|
|
15
|
+
tmp_path = Path('.omx') / 'tmp' / f'noisy-bayesopt-seed-{seed}.json'
|
|
16
|
+
tmp_path.parent.mkdir(parents=True, exist_ok=True)
|
|
17
|
+
tmp_path.write_text(json.dumps(config))
|
|
18
|
+
|
|
19
|
+
result = subprocess.run(
|
|
20
|
+
[sys.executable, 'playground/bayesopt_highdim_demo/run_search.py', '--config', str(tmp_path)],
|
|
21
|
+
check=False,
|
|
22
|
+
capture_output=True,
|
|
23
|
+
text=True,
|
|
24
|
+
)
|
|
25
|
+
if result.stdout:
|
|
26
|
+
sys.stderr.write(result.stdout)
|
|
27
|
+
if result.stderr:
|
|
28
|
+
sys.stderr.write(result.stderr)
|
|
29
|
+
if result.returncode != 0:
|
|
30
|
+
raise SystemExit(result.returncode)
|
|
31
|
+
return json.loads(result.stdout)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def main() -> None:
|
|
35
|
+
rows = [run_for_seed(seed) for seed in SEEDS]
|
|
36
|
+
means = [float(row['best_mean']) for row in rows]
|
|
37
|
+
overall_mean = sum(means) / len(means)
|
|
38
|
+
variance_penalty = (max(means) - min(means)) * 0.15
|
|
39
|
+
score = overall_mean - variance_penalty
|
|
40
|
+
print(json.dumps({'pass': score >= 1.15, 'score': score}))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == '__main__':
|
|
44
|
+
main()
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import subprocess
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
CONFIG_PATH = Path('playground/bayesopt_latent_discovery_demo/config.json')
|
|
9
|
+
SEEDS = (23, 41, 59)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def run_for_seed(seed: int) -> dict:
|
|
13
|
+
config = json.loads(CONFIG_PATH.read_text())
|
|
14
|
+
config['seed'] = seed
|
|
15
|
+
tmp_path = Path('.omx') / 'tmp' / f'latent-discovery-seed-{seed}.json'
|
|
16
|
+
tmp_path.parent.mkdir(parents=True, exist_ok=True)
|
|
17
|
+
tmp_path.write_text(json.dumps(config))
|
|
18
|
+
|
|
19
|
+
result = subprocess.run(
|
|
20
|
+
[sys.executable, 'playground/bayesopt_latent_discovery_demo/run_search.py', '--config', str(tmp_path)],
|
|
21
|
+
check=False,
|
|
22
|
+
capture_output=True,
|
|
23
|
+
text=True,
|
|
24
|
+
)
|
|
25
|
+
if result.stdout:
|
|
26
|
+
sys.stderr.write(result.stdout)
|
|
27
|
+
if result.stderr:
|
|
28
|
+
sys.stderr.write(result.stderr)
|
|
29
|
+
if result.returncode != 0:
|
|
30
|
+
raise SystemExit(result.returncode)
|
|
31
|
+
return json.loads(result.stdout)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def main() -> None:
|
|
35
|
+
rows = [run_for_seed(seed) for seed in SEEDS]
|
|
36
|
+
means = [float(row['best_mean']) for row in rows]
|
|
37
|
+
overall_mean = sum(means) / len(means)
|
|
38
|
+
variance_penalty = (max(means) - min(means)) * 0.18
|
|
39
|
+
score = overall_mean - variance_penalty
|
|
40
|
+
print(json.dumps({'pass': score >= 1.4, 'score': score}))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == '__main__':
|
|
44
|
+
main()
|
|
@@ -29,8 +29,10 @@ function parseChecksum(raw) {
|
|
|
29
29
|
|
|
30
30
|
function mapTriple(triple) {
|
|
31
31
|
switch (triple) {
|
|
32
|
-
case 'x86_64-unknown-linux-gnu': return { platform: 'linux', arch: 'x64' };
|
|
33
|
-
case 'aarch64-unknown-linux-gnu': return { platform: 'linux', arch: 'arm64' };
|
|
32
|
+
case 'x86_64-unknown-linux-gnu': return { platform: 'linux', arch: 'x64', libc: 'glibc' };
|
|
33
|
+
case 'aarch64-unknown-linux-gnu': return { platform: 'linux', arch: 'arm64', libc: 'glibc' };
|
|
34
|
+
case 'x86_64-unknown-linux-musl': return { platform: 'linux', arch: 'x64', libc: 'musl' };
|
|
35
|
+
case 'aarch64-unknown-linux-musl': return { platform: 'linux', arch: 'arm64', libc: 'musl' };
|
|
34
36
|
case 'x86_64-apple-darwin': return { platform: 'darwin', arch: 'x64' };
|
|
35
37
|
case 'aarch64-apple-darwin': return { platform: 'darwin', arch: 'arm64' };
|
|
36
38
|
case 'x86_64-pc-windows-msvc': return { platform: 'win32', arch: 'x64' };
|
|
@@ -71,6 +73,8 @@ for (const artifact of Object.values(plan.artifacts)) {
|
|
|
71
73
|
version,
|
|
72
74
|
platform: mapped.platform,
|
|
73
75
|
arch: mapped.arch,
|
|
76
|
+
target: triple,
|
|
77
|
+
...(mapped.libc ? { libc: mapped.libc } : {}),
|
|
74
78
|
archive: artifact.name,
|
|
75
79
|
binary: executable.name,
|
|
76
80
|
binary_path: executable.path,
|
|
@@ -85,7 +89,14 @@ const manifest = {
|
|
|
85
89
|
version: plan.announcement_tag.replace(/^v/, ''),
|
|
86
90
|
tag: plan.announcement_tag,
|
|
87
91
|
generated_at: new Date().toISOString(),
|
|
88
|
-
assets: assets.sort((a, b) =>
|
|
92
|
+
assets: assets.sort((a, b) => {
|
|
93
|
+
const keyCompare = `${a.product}-${a.platform}-${a.arch}`.localeCompare(`${b.product}-${b.platform}-${b.arch}`);
|
|
94
|
+
if (keyCompare !== 0) return keyCompare;
|
|
95
|
+
const libcOrder = { musl: 0, glibc: 1 };
|
|
96
|
+
const libcCompare = (libcOrder[a.libc] ?? 2) - (libcOrder[b.libc] ?? 2);
|
|
97
|
+
if (libcCompare !== 0) return libcCompare;
|
|
98
|
+
return a.archive.localeCompare(b.archive);
|
|
99
|
+
}),
|
|
89
100
|
};
|
|
90
101
|
for (const product of requireProducts) {
|
|
91
102
|
if (!manifest.assets.some((asset) => asset.product === product)) {
|