oh-my-codex 0.21.37 → 0.21.39
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/Cargo.lock +6 -6
- package/Cargo.toml +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +53 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +2 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +55 -4
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/session-search-help.test.js +2 -2
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +122 -0
- package/dist/cli/__tests__/setup-install-mode.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__/team.test.js +17 -12
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/config/__tests__/models.test.js +2 -1
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +25 -4
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +1 -1
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +1 -1
- package/dist/config/models.js.map +1 -1
- package/dist/scripts/__tests__/run-test-files.test.js +192 -2
- package/dist/scripts/__tests__/run-test-files.test.js.map +1 -1
- package/dist/scripts/run-test-files.js +33 -14
- package/dist/scripts/run-test-files.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +32 -4
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +5 -5
- package/dist/team/__tests__/state-root.test.js.map +1 -1
- package/dist/vscode/__tests__/index.test.js +82 -20
- package/dist/vscode/__tests__/index.test.js.map +1 -1
- package/dist/vscode/index.d.ts +2 -0
- package/dist/vscode/index.d.ts.map +1 -1
- package/dist/vscode/index.js +3 -3
- package/dist/vscode/index.js.map +1 -1
- package/package.json +1 -1
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/src/scripts/__tests__/run-test-files.test.ts +193 -2
- package/src/scripts/run-test-files.ts +31 -14
package/Cargo.lock
CHANGED
|
@@ -32,7 +32,7 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
|
32
32
|
|
|
33
33
|
[[package]]
|
|
34
34
|
name = "omx-api"
|
|
35
|
-
version = "0.21.
|
|
35
|
+
version = "0.21.39"
|
|
36
36
|
dependencies = [
|
|
37
37
|
"serde",
|
|
38
38
|
"serde_json",
|
|
@@ -40,14 +40,14 @@ dependencies = [
|
|
|
40
40
|
|
|
41
41
|
[[package]]
|
|
42
42
|
name = "omx-explore-harness"
|
|
43
|
-
version = "0.21.
|
|
43
|
+
version = "0.21.39"
|
|
44
44
|
dependencies = [
|
|
45
45
|
"libc",
|
|
46
46
|
]
|
|
47
47
|
|
|
48
48
|
[[package]]
|
|
49
49
|
name = "omx-mux"
|
|
50
|
-
version = "0.21.
|
|
50
|
+
version = "0.21.39"
|
|
51
51
|
dependencies = [
|
|
52
52
|
"serde",
|
|
53
53
|
"serde_json",
|
|
@@ -55,7 +55,7 @@ dependencies = [
|
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "omx-runtime"
|
|
58
|
-
version = "0.21.
|
|
58
|
+
version = "0.21.39"
|
|
59
59
|
dependencies = [
|
|
60
60
|
"fs2",
|
|
61
61
|
"libc",
|
|
@@ -67,7 +67,7 @@ dependencies = [
|
|
|
67
67
|
|
|
68
68
|
[[package]]
|
|
69
69
|
name = "omx-runtime-core"
|
|
70
|
-
version = "0.21.
|
|
70
|
+
version = "0.21.39"
|
|
71
71
|
dependencies = [
|
|
72
72
|
"fs2",
|
|
73
73
|
"serde",
|
|
@@ -76,7 +76,7 @@ dependencies = [
|
|
|
76
76
|
|
|
77
77
|
[[package]]
|
|
78
78
|
name = "omx-sparkshell"
|
|
79
|
-
version = "0.21.
|
|
79
|
+
version = "0.21.39"
|
|
80
80
|
dependencies = [
|
|
81
81
|
"omx-mux",
|
|
82
82
|
]
|
package/Cargo.toml
CHANGED
|
@@ -1754,6 +1754,59 @@ command = "node"
|
|
|
1754
1754
|
await rm(wd, { recursive: true, force: true });
|
|
1755
1755
|
}
|
|
1756
1756
|
});
|
|
1757
|
+
it("doctor and its plugin-cache repair command handle stale OMX plugin hook trust (#3918)", async () => {
|
|
1758
|
+
const wd = await mkdtemp(join(tmpdir(), "omx-doctor-plugin-hook-trust-3918-"));
|
|
1759
|
+
try {
|
|
1760
|
+
const home = join(wd, "home");
|
|
1761
|
+
const codexDir = join(home, ".codex");
|
|
1762
|
+
const configPath = join(codexDir, "config.toml");
|
|
1763
|
+
await mkdir(codexDir, { recursive: true });
|
|
1764
|
+
const initialSetup = runOmx(wd, ["setup", "--scope", "user", "--plugin"], {
|
|
1765
|
+
HOME: home,
|
|
1766
|
+
CODEX_HOME: codexDir,
|
|
1767
|
+
});
|
|
1768
|
+
if (shouldSkipForSpawnPermissions(initialSetup.error))
|
|
1769
|
+
return;
|
|
1770
|
+
assert.equal(initialSetup.status, 0, initialSetup.stderr || initialSetup.stdout);
|
|
1771
|
+
const pluginManifest = JSON.parse(await readFile(join(repoRoot(), "plugins", "oh-my-codex", ".codex-plugin", "plugin.json"), "utf-8"));
|
|
1772
|
+
const pluginHooksPath = join(codexDir, "plugins", "cache", "oh-my-codex-local", "oh-my-codex", pluginManifest.version, "hooks", "hooks.json");
|
|
1773
|
+
const initialPluginHooks = await readFile(pluginHooksPath, "utf-8");
|
|
1774
|
+
const mutatedHooks = JSON.parse(initialPluginHooks);
|
|
1775
|
+
mutatedHooks.hooks.PostCompact[0].hooks[0].command += " --cache-rebuild-probe";
|
|
1776
|
+
await writeFile(pluginHooksPath, `${JSON.stringify(mutatedHooks, null, 2)}\n`);
|
|
1777
|
+
const pluginKey = "oh-my-codex@oh-my-codex-local:hooks/hooks.json:post_compact:0:0";
|
|
1778
|
+
const staleHash = `sha256:${"1".repeat(64)}`;
|
|
1779
|
+
const configWithStalePluginTrust = [
|
|
1780
|
+
(await readFile(configPath, "utf-8")).trimEnd(),
|
|
1781
|
+
"",
|
|
1782
|
+
"# OMX-owned Codex hook trust state",
|
|
1783
|
+
`[hooks.state.${JSON.stringify(pluginKey)}]`,
|
|
1784
|
+
`trusted_hash = ${JSON.stringify(staleHash)}`,
|
|
1785
|
+
"# End OMX-owned Codex hook trust state",
|
|
1786
|
+
"",
|
|
1787
|
+
].join("\n");
|
|
1788
|
+
await writeFile(configPath, configWithStalePluginTrust, "utf-8");
|
|
1789
|
+
const doctorResult = runOmx(wd, ["doctor"], { HOME: home, CODEX_HOME: codexDir });
|
|
1790
|
+
if (shouldSkipForSpawnPermissions(doctorResult.error))
|
|
1791
|
+
return;
|
|
1792
|
+
assert.equal(doctorResult.status, 0, doctorResult.stderr || doctorResult.stdout);
|
|
1793
|
+
assert.match(doctorResult.stdout, /Native hooks: plugin-scoped hooks are enabled, but cached plugin hook files or pinned hook launcher/);
|
|
1794
|
+
assert.match(doctorResult.stdout, /run `omx setup --plugin --repair-plugin-cache` to refresh the plugin cache/);
|
|
1795
|
+
assert.doesNotMatch(doctorResult.stdout, /managed_trust_key_conflict/);
|
|
1796
|
+
const setupResult = runOmx(wd, ["setup", "--scope", "user", "--plugin", "--repair-plugin-cache"], {
|
|
1797
|
+
HOME: home,
|
|
1798
|
+
CODEX_HOME: codexDir,
|
|
1799
|
+
});
|
|
1800
|
+
if (shouldSkipForSpawnPermissions(setupResult.error))
|
|
1801
|
+
return;
|
|
1802
|
+
assert.equal(setupResult.status, 0, setupResult.stderr || setupResult.stdout);
|
|
1803
|
+
assert.doesNotMatch(await readFile(configPath, "utf-8"), /oh-my-codex@oh-my-codex-local:hooks\/hooks\.json:/);
|
|
1804
|
+
assert.equal(await readFile(pluginHooksPath, "utf-8"), initialPluginHooks);
|
|
1805
|
+
}
|
|
1806
|
+
finally {
|
|
1807
|
+
await rm(wd, { recursive: true, force: true });
|
|
1808
|
+
}
|
|
1809
|
+
});
|
|
1757
1810
|
it("still rejects stale foreign trust at a managed-first migration destination", async () => {
|
|
1758
1811
|
const wd = await mkdtemp(join(tmpdir(), "omx-doctor-hooks-stale-destination-trust-"));
|
|
1759
1812
|
try {
|