lazycodex-ai 5.0.0-beta.43 → 5.0.0-beta.44
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/dist/cli/index.js +236 -247
- package/dist/cli-node/index.js +236 -247
- package/package.json +3 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +47 -2
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +4 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +32 -50
- package/packages/shared-skills/skill-source-filter.d.ts +16 -0
- package/packages/shared-skills/skill-source-filter.mjs +44 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisyphuslabs/omo-codex-plugin",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.44",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sisyphuslabs/omo-codex-plugin",
|
|
9
|
-
"version": "5.0.0-beta.
|
|
9
|
+
"version": "5.0.0-beta.44",
|
|
10
10
|
"workspaces": [
|
|
11
11
|
"components/comment-checker",
|
|
12
12
|
"components/git-bash",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
"components/comment-checker": {
|
|
92
92
|
"name": "@code-yeongyu/codex-comment-checker",
|
|
93
|
-
"version": "5.0.0-beta.
|
|
93
|
+
"version": "5.0.0-beta.44",
|
|
94
94
|
"license": "MIT",
|
|
95
95
|
"bin": {
|
|
96
96
|
"omo-comment-checker": "dist/cli.js"
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
},
|
|
112
112
|
"components/git-bash": {
|
|
113
113
|
"name": "@sisyphuslabs/codex-git-bash-hook",
|
|
114
|
-
"version": "5.0.0-beta.
|
|
114
|
+
"version": "5.0.0-beta.44",
|
|
115
115
|
"bin": {
|
|
116
116
|
"omo-git-bash-hook": "dist/cli.js"
|
|
117
117
|
},
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
},
|
|
126
126
|
"components/lazycodex-executor-verify": {
|
|
127
127
|
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
|
|
128
|
-
"version": "5.0.0-beta.
|
|
128
|
+
"version": "5.0.0-beta.44",
|
|
129
129
|
"license": "MIT",
|
|
130
130
|
"bin": {
|
|
131
131
|
"lazycodex-executor-verify": "dist/cli.js"
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
},
|
|
143
143
|
"components/lsp": {
|
|
144
144
|
"name": "@code-yeongyu/codex-lsp",
|
|
145
|
-
"version": "5.0.0-beta.
|
|
145
|
+
"version": "5.0.0-beta.44",
|
|
146
146
|
"license": "MIT",
|
|
147
147
|
"dependencies": {
|
|
148
148
|
"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
},
|
|
164
164
|
"components/rules": {
|
|
165
165
|
"name": "@code-yeongyu/codex-rules",
|
|
166
|
-
"version": "5.0.0-beta.
|
|
166
|
+
"version": "5.0.0-beta.44",
|
|
167
167
|
"license": "MIT",
|
|
168
168
|
"dependencies": {
|
|
169
169
|
"picomatch": "^4.0.7"
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
"components/teammode": {
|
|
187
187
|
"name": "@sisyphuslabs/codex-teammode",
|
|
188
|
-
"version": "5.0.0-beta.
|
|
188
|
+
"version": "5.0.0-beta.44",
|
|
189
189
|
"devDependencies": {
|
|
190
190
|
"@types/node": "^26.2.0",
|
|
191
191
|
"bun-types": "^1.4.0",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
},
|
|
199
199
|
"components/telemetry": {
|
|
200
200
|
"name": "@code-yeongyu/codex-telemetry",
|
|
201
|
-
"version": "5.0.0-beta.
|
|
201
|
+
"version": "5.0.0-beta.44",
|
|
202
202
|
"license": "MIT",
|
|
203
203
|
"bin": {
|
|
204
204
|
"omo-telemetry": "dist/cli.js"
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
},
|
|
217
217
|
"components/ultrawork": {
|
|
218
218
|
"name": "@code-yeongyu/codex-ultrawork",
|
|
219
|
-
"version": "5.0.0-beta.
|
|
219
|
+
"version": "5.0.0-beta.44",
|
|
220
220
|
"license": "MIT",
|
|
221
221
|
"bin": {
|
|
222
222
|
"omo-ultrawork": "dist/cli.js"
|
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
},
|
|
235
235
|
"components/ulw-execute-continuation": {
|
|
236
236
|
"name": "@code-yeongyu/codex-ulw-execute-continuation",
|
|
237
|
-
"version": "5.0.0-beta.
|
|
237
|
+
"version": "5.0.0-beta.44",
|
|
238
238
|
"license": "MIT",
|
|
239
239
|
"bin": {
|
|
240
240
|
"omo-ulw-execute-continuation": "dist/cli.js"
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
},
|
|
252
252
|
"components/ulw-loop": {
|
|
253
253
|
"name": "@code-yeongyu/codex-ulw-loop",
|
|
254
|
-
"version": "5.0.0-beta.
|
|
254
|
+
"version": "5.0.0-beta.44",
|
|
255
255
|
"license": "MIT",
|
|
256
256
|
"bin": {
|
|
257
257
|
"omo-ulw-loop": "dist/cli.js",
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { cp, mkdir, mkdtemp, readdir, readFile, rm, symlink } from "node:fs/promises";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { dirname, join, relative, sep } from "node:path";
|
|
4
6
|
import test from "node:test";
|
|
5
7
|
import { fileURLToPath } from "node:url";
|
|
6
8
|
|
|
9
|
+
import { canonicalUltraworkDirectiveRelativePath } from "../scripts/canonical-ultrawork-directive.mjs";
|
|
10
|
+
|
|
7
11
|
import {
|
|
8
12
|
codexHarnessToolCompatibility,
|
|
9
13
|
insertCodexCompatibilityGuidance,
|
|
@@ -99,3 +103,44 @@ test("#given the aggregate sync implementation #when its skill adaptation pipeli
|
|
|
99
103
|
);
|
|
100
104
|
assert.match(script, /await adaptSkillForCodex\(skillName\)/);
|
|
101
105
|
});
|
|
106
|
+
|
|
107
|
+
test("#given the flattened plugin cache the Codex installer produces #when sync-skills runs inside it #then it resolves shared skills through the linked package and writes the skill tree", async () => {
|
|
108
|
+
// given: installMarketplaceLocally copies plugin/ (minus node_modules) to
|
|
109
|
+
// <CODEX_HOME>/plugins/cache/<marketplace>/omo/<version>, materializes the canonical directive
|
|
110
|
+
// under that root, links @oh-my-opencode/shared-skills through the rewritten file: dependency,
|
|
111
|
+
// and only then runs `npm run sync:skills` there. packages/shared-skills is NOT a sibling of
|
|
112
|
+
// that directory, so a checkout-relative import cannot resolve in this layout.
|
|
113
|
+
const codexHome = await mkdtemp(join(tmpdir(), "omo-codex-cache-layout-"));
|
|
114
|
+
const cachedPluginRoot = join(codexHome, "plugins", "cache", "sisyphuslabs", "omo", "0.0.0-cache-layout");
|
|
115
|
+
await cp(pluginRoot, cachedPluginRoot, {
|
|
116
|
+
recursive: true,
|
|
117
|
+
filter: (source) => {
|
|
118
|
+
const parts = relative(pluginRoot, source).split(sep);
|
|
119
|
+
return parts[0] !== "skills" && !parts.includes("node_modules") && !parts.includes(".git");
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
const directiveTarget = join(cachedPluginRoot, canonicalUltraworkDirectiveRelativePath);
|
|
123
|
+
await mkdir(dirname(directiveTarget), { recursive: true });
|
|
124
|
+
await cp(join(repositoryRoot, "..", canonicalUltraworkDirectiveRelativePath), directiveTarget);
|
|
125
|
+
const linkedSharedSkills = join(cachedPluginRoot, "node_modules", "@oh-my-opencode", "shared-skills");
|
|
126
|
+
await mkdir(dirname(linkedSharedSkills), { recursive: true });
|
|
127
|
+
await symlink(join(repositoryRoot, "shared-skills"), linkedSharedSkills, "dir");
|
|
128
|
+
|
|
129
|
+
try {
|
|
130
|
+
// when: the installer runs `npm run sync:skills` here, whose script is `node scripts/sync-skills.mjs`
|
|
131
|
+
const result = spawnSync(process.execPath, [join(cachedPluginRoot, "scripts", "sync-skills.mjs")], {
|
|
132
|
+
cwd: cachedPluginRoot,
|
|
133
|
+
encoding: "utf8",
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
// then
|
|
137
|
+
assert.equal(result.status, 0, `sync-skills failed in the cache layout:\n${result.stderr}`);
|
|
138
|
+
const syncedSkills = (await readdir(join(cachedPluginRoot, "skills"), { withFileTypes: true }))
|
|
139
|
+
.filter((entry) => entry.isDirectory())
|
|
140
|
+
.map((entry) => entry.name);
|
|
141
|
+
assert.ok(syncedSkills.includes("ultrawork"), "component skill ultrawork must be synced");
|
|
142
|
+
assert.ok(syncedSkills.includes("git-master"), "shared skill git-master must be synced from the linked package");
|
|
143
|
+
} finally {
|
|
144
|
+
await rm(codexHome, { recursive: true, force: true });
|
|
145
|
+
}
|
|
146
|
+
});
|
|
@@ -94,6 +94,10 @@ test("#given aggregate Codex skills #when source wiring is inspected #then share
|
|
|
94
94
|
assert.equal(rootPackageFiles.includes("packages/shared-skills/skills"), true);
|
|
95
95
|
assert.equal(sharedSkillDependency, "file:../../shared-skills");
|
|
96
96
|
assert.match(syncScript, /from "@oh-my-opencode\/shared-skills"/);
|
|
97
|
+
assert.match(syncScript, /from "@oh-my-opencode\/shared-skills\/skill-source-filter"/);
|
|
98
|
+
// A checkout-relative path dangles once the installer flattens plugin/ into
|
|
99
|
+
// <CODEX_HOME>/plugins/cache/<marketplace>/omo/<version> (see canonical-ultrawork-directive.mjs).
|
|
100
|
+
assert.doesNotMatch(syncScript, /from "\.\.\/\.\.\/\.\.\/shared-skills\//);
|
|
97
101
|
assert.doesNotMatch(syncScript, /shared-skills",\s*"skills"/);
|
|
98
102
|
});
|
|
99
103
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// omo-codex-install:
|
|
2
|
+
// omo-codex-install:81cf03496fa0db52b428d9e5f1d2a022f753fe60530d84f72d767af03333373f:74615821cc6dea8cce3ad3c76b8074d6c165e02322f2725057fdbc1b08d2875e
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __returnValue = (v) => v;
|
|
5
5
|
function __exportSetter(name, newValue) {
|
|
@@ -112,20 +112,20 @@ var init_atomic_write = __esm(() => {
|
|
|
112
112
|
|
|
113
113
|
// packages/telemetry-core/src/activity-state.ts
|
|
114
114
|
import { existsSync as existsSync4, mkdirSync as mkdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
115
|
-
import { basename as basename6, join as
|
|
115
|
+
import { basename as basename6, join as join31 } from "node:path";
|
|
116
116
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
117
117
|
const dataDir = resolveXdgDataDir(product.cacheDirName, {
|
|
118
118
|
env: options.env,
|
|
119
119
|
osProvider: options.osProvider
|
|
120
120
|
});
|
|
121
|
-
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined :
|
|
121
|
+
const xdgStateDir = options.env?.XDG_DATA_HOME === undefined ? undefined : join31(options.env.XDG_DATA_HOME, product.cacheDirName);
|
|
122
122
|
if (dataDir === xdgStateDir || xdgStateDir === undefined && basename6(dataDir) === product.cacheDirName) {
|
|
123
123
|
return dataDir;
|
|
124
124
|
}
|
|
125
|
-
return
|
|
125
|
+
return join31(dataDir, product.cacheDirName);
|
|
126
126
|
}
|
|
127
127
|
function getTelemetryActivityStateFilePath(stateDir) {
|
|
128
|
-
return
|
|
128
|
+
return join31(stateDir, POSTHOG_ACTIVITY_STATE_FILE);
|
|
129
129
|
}
|
|
130
130
|
function getDailyActiveCaptureState(input) {
|
|
131
131
|
const state = readPostHogActivityState(input.stateDir, input.diagnostics);
|
|
@@ -196,9 +196,9 @@ var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com", DEFAULT_POSTHOG_API_KEY =
|
|
|
196
196
|
|
|
197
197
|
// packages/telemetry-core/src/diagnostics.ts
|
|
198
198
|
import { appendFileSync, existsSync as existsSync5, mkdirSync as mkdirSync3, readFileSync as readFileSync3 } from "node:fs";
|
|
199
|
-
import { join as
|
|
199
|
+
import { join as join32 } from "node:path";
|
|
200
200
|
function getTelemetryDiagnosticsFilePath(diagnosticsDir) {
|
|
201
|
-
return
|
|
201
|
+
return join32(diagnosticsDir, DIAGNOSTICS_FILE_NAME);
|
|
202
202
|
}
|
|
203
203
|
function writeTelemetryDiagnostic(input, options) {
|
|
204
204
|
const now = options.now ?? new Date;
|
|
@@ -7977,7 +7977,7 @@ var package_default;
|
|
|
7977
7977
|
var init_package = __esm(() => {
|
|
7978
7978
|
package_default = {
|
|
7979
7979
|
name: "@oh-my-opencode/omo-codex",
|
|
7980
|
-
version: "5.0.0-beta.
|
|
7980
|
+
version: "5.0.0-beta.44",
|
|
7981
7981
|
type: "module",
|
|
7982
7982
|
private: true,
|
|
7983
7983
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -8198,7 +8198,7 @@ var init_telemetry = __esm(() => {
|
|
|
8198
8198
|
|
|
8199
8199
|
// packages/omo-codex/src/install/install-local-cli.ts
|
|
8200
8200
|
import { readFile as readFile23 } from "node:fs/promises";
|
|
8201
|
-
import { dirname as dirname12, join as
|
|
8201
|
+
import { dirname as dirname12, join as join37, resolve as resolve10 } from "node:path";
|
|
8202
8202
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
8203
8203
|
|
|
8204
8204
|
// packages/utils/src/runtime/spawn.ts
|
|
@@ -8466,7 +8466,7 @@ var defaultRunCommand = async (command, args, options) => {
|
|
|
8466
8466
|
};
|
|
8467
8467
|
|
|
8468
8468
|
// packages/omo-codex/src/install/install-codex.ts
|
|
8469
|
-
import { join as
|
|
8469
|
+
import { join as join33, resolve as resolve9 } from "node:path";
|
|
8470
8470
|
import { existsSync as existsSync6 } from "node:fs";
|
|
8471
8471
|
import { homedir as homedir2 } from "node:os";
|
|
8472
8472
|
|
|
@@ -12657,30 +12657,13 @@ async function removeGitBashHooksOffWindows(input) {
|
|
|
12657
12657
|
`);
|
|
12658
12658
|
}
|
|
12659
12659
|
|
|
12660
|
-
// packages/omo-codex/src/install/omo-sot-migration.ts
|
|
12661
|
-
import { join as join29 } from "node:path";
|
|
12662
|
-
async function seedAndMigrateOmoSot(input) {
|
|
12663
|
-
const commandEnv = { ...input.env };
|
|
12664
|
-
const scriptPath = join29(input.repoRoot, "packages", "omo-codex", "plugin", "scripts", "migrate-omo-sot.mjs");
|
|
12665
|
-
try {
|
|
12666
|
-
await input.runCommand(process.execPath, [scriptPath, "--seed"], {
|
|
12667
|
-
cwd: input.repoRoot,
|
|
12668
|
-
env: commandEnv
|
|
12669
|
-
});
|
|
12670
|
-
} catch (error) {
|
|
12671
|
-
if (!(error instanceof Error))
|
|
12672
|
-
throw error;
|
|
12673
|
-
input.log(`Warning: skipped OMO SOT seed/migration: ${error.message}`);
|
|
12674
|
-
}
|
|
12675
|
-
}
|
|
12676
|
-
|
|
12677
12660
|
// packages/omo-codex/src/install/install-ast-grep-sg.ts
|
|
12678
|
-
import { join as
|
|
12661
|
+
import { join as join30 } from "node:path";
|
|
12679
12662
|
|
|
12680
12663
|
// packages/utils/src/ast-grep/install-script.ts
|
|
12681
12664
|
import { spawn as spawn2 } from "node:child_process";
|
|
12682
12665
|
import { existsSync as existsSync3 } from "node:fs";
|
|
12683
|
-
import { join as
|
|
12666
|
+
import { join as join29 } from "node:path";
|
|
12684
12667
|
|
|
12685
12668
|
// packages/utils/src/ast-grep/sg-manifest.ts
|
|
12686
12669
|
function normalizeRuntimePlatform(platform = process.platform) {
|
|
@@ -12702,7 +12685,7 @@ var AST_GREP_BIN_DIR_ENV_KEY = "OMO_AST_GREP_BIN_DIR";
|
|
|
12702
12685
|
var KILL_GRACE_MS = 1000;
|
|
12703
12686
|
var AST_GREP_INSTALL_TIMEOUT_MS = 30000;
|
|
12704
12687
|
function astGrepRuntimeDir(baseDir, platform = process.platform, arch = process.arch) {
|
|
12705
|
-
return
|
|
12688
|
+
return join29(baseDir, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
12706
12689
|
}
|
|
12707
12690
|
function isMissingExecutable(error) {
|
|
12708
12691
|
if (!("code" in error))
|
|
@@ -12740,7 +12723,7 @@ function defaultSpawnProcess(command, args, options) {
|
|
|
12740
12723
|
};
|
|
12741
12724
|
}
|
|
12742
12725
|
function scriptPathForPlatform(skillDir, platform) {
|
|
12743
|
-
return
|
|
12726
|
+
return join29(skillDir, platform === "win32" ? "install.ps1" : "install.sh");
|
|
12744
12727
|
}
|
|
12745
12728
|
function invocationsForPlatform(scriptPath, platform) {
|
|
12746
12729
|
if (platform !== "win32")
|
|
@@ -12826,7 +12809,7 @@ async function installAstGrepForCodex(options) {
|
|
|
12826
12809
|
return;
|
|
12827
12810
|
const platform = options.platform ?? process.platform;
|
|
12828
12811
|
const targetDir = astGrepRuntimeDir(options.codexHome, platform, options.arch ?? process.arch);
|
|
12829
|
-
const skillDir =
|
|
12812
|
+
const skillDir = join30(plugin.path, "skills", "ast-grep");
|
|
12830
12813
|
const installer = options.installer ?? runAstGrepSkillInstall;
|
|
12831
12814
|
try {
|
|
12832
12815
|
const result = await installer({ platform, skillDir, targetDir });
|
|
@@ -12859,7 +12842,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
12859
12842
|
const env2 = options.env ?? process.env;
|
|
12860
12843
|
const platform = options.platform ?? process.platform;
|
|
12861
12844
|
const repoRoot = resolve9(options.repoRoot ?? findRepoRoot({ importerDir: import.meta.dir, env: env2 }));
|
|
12862
|
-
const codexHome = resolve9(options.codexHome ?? env2.CODEX_HOME ??
|
|
12845
|
+
const codexHome = resolve9(options.codexHome ?? env2.CODEX_HOME ?? join33(homedir2(), ".codex"));
|
|
12863
12846
|
const projectDirectory = resolve9(options.projectDirectory ?? env2.OMO_CODEX_PROJECT ?? process.cwd());
|
|
12864
12847
|
const binDir = resolveCodexInstallerBinDir({ binDir: options.binDir, codexHome, env: env2 });
|
|
12865
12848
|
const runCommand = options.runCommand ?? defaultRunCommand;
|
|
@@ -12876,9 +12859,9 @@ async function runCodexInstaller(options = {}) {
|
|
|
12876
12859
|
if (!gitBashResolution.found) {
|
|
12877
12860
|
throw new Error(gitBashResolution.installHint);
|
|
12878
12861
|
}
|
|
12879
|
-
const codexPackageRoot =
|
|
12862
|
+
const codexPackageRoot = join33(repoRoot, "packages", "omo-codex");
|
|
12880
12863
|
const marketplace = await readMarketplace(repoRoot, {
|
|
12881
|
-
marketplacePath:
|
|
12864
|
+
marketplacePath: join33(codexPackageRoot, "marketplace.json")
|
|
12882
12865
|
});
|
|
12883
12866
|
const distributionManifest = await readDistributionManifest(repoRoot);
|
|
12884
12867
|
const installed = [];
|
|
@@ -12924,7 +12907,7 @@ async function runCodexInstaller(options = {}) {
|
|
|
12924
12907
|
if (runtimeLink !== null)
|
|
12925
12908
|
log(`Linked ${runtimeLink.name} -> ${runtimeLink.target}`);
|
|
12926
12909
|
else
|
|
12927
|
-
log(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${
|
|
12910
|
+
log(`Warning: skipped the omo-agent-toolkit runtime wrapper because ${join33(repoRoot, "dist", "cli", "index.js")} is missing; omo-agent-toolkit ulw-loop commands will be unavailable until a package shipping dist/cli is installed`);
|
|
12928
12911
|
}
|
|
12929
12912
|
pluginSources.push({ name: entry.name, sourcePath });
|
|
12930
12913
|
installed.push(plugin);
|
|
@@ -12987,13 +12970,13 @@ async function runCodexInstaller(options = {}) {
|
|
|
12987
12970
|
continue;
|
|
12988
12971
|
log(`Warning: deferred legacy Codex LSP daemon cleanup for v${cleanup.version}: ${cleanup.reason}`);
|
|
12989
12972
|
}
|
|
12990
|
-
const marketplaceRoot =
|
|
12973
|
+
const marketplaceRoot = join33(codexHome, "plugins", "cache", marketplace.name);
|
|
12991
12974
|
await writeCachedMarketplaceManifest({
|
|
12992
12975
|
marketplaceName: marketplace.name,
|
|
12993
12976
|
marketplaceRoot,
|
|
12994
12977
|
plugins: installed
|
|
12995
12978
|
});
|
|
12996
|
-
const configPath =
|
|
12979
|
+
const configPath = join33(codexHome, "config.toml");
|
|
12997
12980
|
await updateCodexConfig({
|
|
12998
12981
|
configPath,
|
|
12999
12982
|
repoRoot: codexPackageRoot,
|
|
@@ -13007,7 +12990,6 @@ async function runCodexInstaller(options = {}) {
|
|
|
13007
12990
|
autonomousPermissions: options.autonomousPermissions !== false,
|
|
13008
12991
|
...options.reasoning === undefined ? {} : { reasoning: options.reasoning }
|
|
13009
12992
|
});
|
|
13010
|
-
await seedAndMigrateOmoSot({ env: env2, log, repoRoot, runCommand });
|
|
13011
12993
|
const projectCleanup = await repairProjectLocalCodexArtifactsBestEffort({
|
|
13012
12994
|
startDirectory: projectDirectory,
|
|
13013
12995
|
codexHome,
|
|
@@ -13053,7 +13035,7 @@ function findRepoRootFromImporter(importerDir) {
|
|
|
13053
13035
|
for (let depth = 0;depth <= 7; depth += 1) {
|
|
13054
13036
|
if (isRepoRootWithCodexPlugin(current))
|
|
13055
13037
|
return current;
|
|
13056
|
-
for (const wrapperPackageRoot of [
|
|
13038
|
+
for (const wrapperPackageRoot of [join33(current, "node_modules", "oh-my-openagent"), join33(current, "oh-my-openagent")]) {
|
|
13057
13039
|
if (isRepoRootWithCodexPlugin(wrapperPackageRoot))
|
|
13058
13040
|
return wrapperPackageRoot;
|
|
13059
13041
|
}
|
|
@@ -13071,7 +13053,7 @@ function findRepoRoot(input) {
|
|
|
13071
13053
|
return findRepoRootFromImporter(input.importerDir);
|
|
13072
13054
|
}
|
|
13073
13055
|
function isRepoRootWithCodexPlugin(repoRoot) {
|
|
13074
|
-
return existsSync6(
|
|
13056
|
+
return existsSync6(join33(repoRoot, "packages", "omo-codex", "plugin", ".codex-plugin", "plugin.json"));
|
|
13075
13057
|
}
|
|
13076
13058
|
function codexMarketplaceSource(marketplaceRoot) {
|
|
13077
13059
|
return { sourceType: "local", source: marketplaceRoot };
|
|
@@ -13384,12 +13366,12 @@ function shellQuote(value) {
|
|
|
13384
13366
|
// packages/omo-codex/src/install/lazycodex-manual-update.ts
|
|
13385
13367
|
import { spawn as spawn3, spawnSync as spawnSync2 } from "node:child_process";
|
|
13386
13368
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
13387
|
-
import { dirname as dirname11, join as
|
|
13369
|
+
import { dirname as dirname11, join as join35 } from "node:path";
|
|
13388
13370
|
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
13389
13371
|
import { fileURLToPath } from "node:url";
|
|
13390
13372
|
|
|
13391
13373
|
// packages/omo-codex/src/install/lazycodex-bun-global-paths.ts
|
|
13392
|
-
import { join as
|
|
13374
|
+
import { join as join34 } from "node:path";
|
|
13393
13375
|
function isBunGlobalEntrypointPath(invokedPath, env2) {
|
|
13394
13376
|
if (typeof invokedPath !== "string" || invokedPath.trim().length === 0)
|
|
13395
13377
|
return false;
|
|
@@ -13400,8 +13382,8 @@ function resolveBunGlobalRoots(env2) {
|
|
|
13400
13382
|
const bunInstallRoot = env2.BUN_INSTALL?.trim();
|
|
13401
13383
|
const homeRoot = env2.HOME?.trim();
|
|
13402
13384
|
return [
|
|
13403
|
-
...bunInstallRoot ? [
|
|
13404
|
-
...homeRoot ? [
|
|
13385
|
+
...bunInstallRoot ? [join34(bunInstallRoot, "bin"), join34(bunInstallRoot, "install", "global", "node_modules")] : [],
|
|
13386
|
+
...homeRoot ? [join34(homeRoot, ".bun", "bin"), join34(homeRoot, ".bun", "install", "global", "node_modules")] : []
|
|
13405
13387
|
].map(normalizePathForPrefix);
|
|
13406
13388
|
}
|
|
13407
13389
|
function normalizePathForPrefix(path2) {
|
|
@@ -13494,7 +13476,7 @@ function resolveCurrentVersion(env2) {
|
|
|
13494
13476
|
if (env2.LAZYCODEX_CURRENT_VERSION?.trim())
|
|
13495
13477
|
return env2.LAZYCODEX_CURRENT_VERSION.trim();
|
|
13496
13478
|
const pluginRoot = dirname11(dirname11(fileURLToPath(import.meta.url)));
|
|
13497
|
-
return readVersionManifest(resolveInstalledVersionPath(env2, pluginRoot)) ?? readVersionManifest(
|
|
13479
|
+
return readVersionManifest(resolveInstalledVersionPath(env2, pluginRoot)) ?? readVersionManifest(join35(pluginRoot, "..", "..", "..", "package.json")) ?? readVersionManifest(join35(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
13498
13480
|
}
|
|
13499
13481
|
function resolveLatestVersion(env2) {
|
|
13500
13482
|
if (env2.LAZYCODEX_LATEST_VERSION?.trim())
|
|
@@ -13610,7 +13592,7 @@ function compareVersions(left, right) {
|
|
|
13610
13592
|
function resolveInstalledVersionPath(env2, pluginRoot) {
|
|
13611
13593
|
if (env2.LAZYCODEX_INSTALLED_VERSION_FILE?.trim())
|
|
13612
13594
|
return env2.LAZYCODEX_INSTALLED_VERSION_FILE.trim();
|
|
13613
|
-
return
|
|
13595
|
+
return join35(pluginRoot, INSTALLED_VERSION_FILE);
|
|
13614
13596
|
}
|
|
13615
13597
|
function readVersionManifest(path2) {
|
|
13616
13598
|
try {
|
|
@@ -13627,10 +13609,10 @@ function readVersionManifest(path2) {
|
|
|
13627
13609
|
}
|
|
13628
13610
|
// packages/omo-codex/src/install/codex-git-bash-mcp-env.ts
|
|
13629
13611
|
import { readFile as readFile22, writeFile as writeFile13 } from "node:fs/promises";
|
|
13630
|
-
import { join as
|
|
13612
|
+
import { join as join36 } from "node:path";
|
|
13631
13613
|
var GIT_BASH_ENV_KEY2 = "OMO_CODEX_GIT_BASH_PATH";
|
|
13632
13614
|
async function stampGitBashMcpEnv(input) {
|
|
13633
|
-
const manifestPath =
|
|
13615
|
+
const manifestPath = join36(input.pluginRoot, ".mcp.json");
|
|
13634
13616
|
if (!await fileExistsStrict(manifestPath))
|
|
13635
13617
|
return false;
|
|
13636
13618
|
const parsed = JSON.parse(await readFile22(manifestPath, "utf8"));
|
|
@@ -13677,7 +13659,7 @@ async function runLazyCodexInstallLocalCli(input) {
|
|
|
13677
13659
|
return 0;
|
|
13678
13660
|
}
|
|
13679
13661
|
if (parsed.kind === "version") {
|
|
13680
|
-
const packageJson = JSON.parse(await readFile23(
|
|
13662
|
+
const packageJson = JSON.parse(await readFile23(join37(input.defaultRepoRoot, "package.json"), "utf8"));
|
|
13681
13663
|
const version2 = typeof packageJson.version === "string" ? packageJson.version : "unknown";
|
|
13682
13664
|
input.log(`lazycodex-ai ${version2}`);
|
|
13683
13665
|
return 0;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const ignoredSkillSourceDirNames: readonly string[];
|
|
2
|
+
export const ignoredSkillSourceFileNames: readonly string[];
|
|
3
|
+
|
|
4
|
+
export interface SkillSourceCopyFilterOptions {
|
|
5
|
+
/** Additional file names (basename) to skip, merged with the shared defaults. */
|
|
6
|
+
ignoredFileNames?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Returns an fs.cp-compatible filter for copying one skill source tree. Ignore rules are
|
|
11
|
+
* evaluated against the path RELATIVE to sourceRoot, never against the checkout's ancestors.
|
|
12
|
+
*/
|
|
13
|
+
export function createSkillSourceCopyFilter(
|
|
14
|
+
sourceRoot: string,
|
|
15
|
+
options?: SkillSourceCopyFilterOptions,
|
|
16
|
+
): (sourcePath: string) => boolean;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for which files inside a skill source tree are copied into a
|
|
3
|
+
* harness plugin. Both omo-codex and omo-senpi sync-skills scripts consume this.
|
|
4
|
+
*
|
|
5
|
+
* Segments are tested RELATIVE to the copy root. The ignore list targets the skill tree's
|
|
6
|
+
* own cache directories; it must never react to where the repository happens to be checked
|
|
7
|
+
* out (a clone under ~/.omo/... or beneath any __pycache__-named ancestor still ships its
|
|
8
|
+
* skills). Testing the absolute path was the defect this module replaces.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const ignoredSkillSourceDirNames = Object.freeze([".mypy_cache", ".omo", ".pytest_cache", ".ruff_cache", "__pycache__"]);
|
|
12
|
+
export const ignoredSkillSourceFileNames = Object.freeze([".gitignore", ".npmignore", "pyrightconfig.json"]);
|
|
13
|
+
const sourceTestFilePattern = /\.test\.ts$/;
|
|
14
|
+
|
|
15
|
+
function toSegments(path) {
|
|
16
|
+
return path.replaceAll("\\", "/").split("/").filter((segment) => segment.length > 0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} sourceRoot absolute path of the directory being copied
|
|
21
|
+
* @param {{ ignoredFileNames?: readonly string[] }} [options]
|
|
22
|
+
* @returns {(sourcePath: string) => boolean} an fs.cp-compatible filter
|
|
23
|
+
*/
|
|
24
|
+
export function createSkillSourceCopyFilter(sourceRoot, options = {}) {
|
|
25
|
+
const rootSegments = toSegments(sourceRoot);
|
|
26
|
+
const ignoredFileNames = new Set([...ignoredSkillSourceFileNames, ...(options.ignoredFileNames ?? [])]);
|
|
27
|
+
const ignoredDirNames = new Set(ignoredSkillSourceDirNames);
|
|
28
|
+
|
|
29
|
+
return function shouldCopySkillSource(sourcePath) {
|
|
30
|
+
const pathSegments = toSegments(sourcePath);
|
|
31
|
+
if (pathSegments.length < rootSegments.length) return false;
|
|
32
|
+
for (let index = 0; index < rootSegments.length; index += 1) {
|
|
33
|
+
if (pathSegments[index] !== rootSegments[index]) return false;
|
|
34
|
+
}
|
|
35
|
+
const segments = pathSegments.slice(rootSegments.length);
|
|
36
|
+
if (segments.length === 0) return true;
|
|
37
|
+
const name = segments.at(-1) ?? "";
|
|
38
|
+
if (segments.some((segment) => ignoredDirNames.has(segment))) return false;
|
|
39
|
+
if (ignoredFileNames.has(name)) return false;
|
|
40
|
+
if (sourceTestFilePattern.test(name) || name.endsWith(".pyc")) return false;
|
|
41
|
+
const scriptsIndex = segments.lastIndexOf("scripts");
|
|
42
|
+
return scriptsIndex === -1 || segments[scriptsIndex + 1] !== "tests";
|
|
43
|
+
};
|
|
44
|
+
}
|