lazycodex-ai 5.0.0 → 5.1.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/README.ja.md +41 -376
- package/README.ko.md +45 -376
- package/README.md +39 -376
- package/README.ru.md +50 -368
- package/README.zh-cn.md +50 -371
- package/dist/cli/index.js +242 -150
- package/dist/cli-node/index.js +242 -150
- package/package.json +6 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +26 -3
- 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/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/dist/cli.js +42 -32
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/src/plan-checklist.ts +55 -29
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/test/boulder-reader.test.ts +51 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- 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/post-tool-use-recording-spawn-admission.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-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/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +3 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +4 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +6 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +7 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/types.py +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/find-agent-sessions.py +4 -0
- package/packages/omo-codex/plugin/test/node-install-surface.test.mjs +0 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +37 -14
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/aside_scanner.py +3 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/cli.py +4 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/file_scanners.py +6 -2
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +7 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/transcript.py +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/types.py +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/find-agent-sessions.py +4 -0
package/dist/cli/index.js
CHANGED
|
@@ -64,7 +64,7 @@ var package_default;
|
|
|
64
64
|
var init_package = __esm(() => {
|
|
65
65
|
package_default = {
|
|
66
66
|
name: "oh-my-opencode",
|
|
67
|
-
version: "5.
|
|
67
|
+
version: "5.1.0",
|
|
68
68
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
69
69
|
main: "./dist/index.js",
|
|
70
70
|
types: "dist/index.d.ts",
|
|
@@ -97,6 +97,11 @@ var init_package = __esm(() => {
|
|
|
97
97
|
"packages/omo-codex",
|
|
98
98
|
"packages/omo-senpi",
|
|
99
99
|
"packages/senpi-task",
|
|
100
|
+
"packages/senpi-desktop-protocol",
|
|
101
|
+
"packages/senpi-desktop-engine",
|
|
102
|
+
"packages/senpi-desktop-prelude",
|
|
103
|
+
"packages/senpi-desktop-service",
|
|
104
|
+
"packages/senpi-desktop-tool",
|
|
100
105
|
"packages/omo-opencode",
|
|
101
106
|
"packages/omo-native"
|
|
102
107
|
],
|
|
@@ -198,7 +203,7 @@ var init_package = __esm(() => {
|
|
|
198
203
|
prepublishOnly: "bun run clean && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && bun run build",
|
|
199
204
|
"test:model-capabilities": "bun test --timeout 20000 packages/model-core/src/model-capability-aliases.test.ts packages/model-core/src/model-capability-guardrails.test.ts packages/model-core/src/model-capabilities.test.ts packages/omo-opencode/src/cli/doctor/checks/model-resolution.test.ts --bail",
|
|
200
205
|
typecheck: "tsgo --noEmit && bun run typecheck:script && bun run typecheck:packages",
|
|
201
|
-
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/isolation-core/tsconfig.json && tsgo --noEmit -p packages/memory-core/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json && tsgo --noEmit -p packages/omo-native/tsconfig.json",
|
|
206
|
+
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/isolation-core/tsconfig.json && tsgo --noEmit -p packages/memory-core/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json && tsgo --noEmit -p packages/omo-native/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-protocol/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-engine/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-prelude/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-service/tsconfig.json && tsgo --noEmit -p packages/senpi-desktop-tool/tsconfig.json",
|
|
202
207
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
203
208
|
test: "bun test --timeout 20000",
|
|
204
209
|
"changelog:section": "bun script/changelog-section.ts",
|
|
@@ -207,7 +212,8 @@ var init_package = __esm(() => {
|
|
|
207
212
|
"test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test --timeout 20000 packages/omo-senpi && bun test ./.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs",
|
|
208
213
|
"test:windows-codex": "bun run test:codex",
|
|
209
214
|
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
|
|
210
|
-
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build"
|
|
215
|
+
"build:ast-grep-mcp": "bun run --cwd packages/ast-grep-mcp build",
|
|
216
|
+
"test:desktop": "bun script/check-cargo-pinned-deps.mjs && bun run --cwd packages/senpi-desktop-protocol test && bun run --cwd packages/senpi-desktop-engine test && bun run --cwd packages/senpi-desktop-prelude test && bun run --cwd packages/senpi-desktop-service test && bun run --cwd packages/senpi-desktop-tool test"
|
|
211
217
|
},
|
|
212
218
|
keywords: [
|
|
213
219
|
"opencode",
|
|
@@ -247,7 +253,7 @@ var init_package = __esm(() => {
|
|
|
247
253
|
zod: "^4.6.5"
|
|
248
254
|
},
|
|
249
255
|
devDependencies: {
|
|
250
|
-
"@code-yeongyu/senpi": "2026.9.
|
|
256
|
+
"@code-yeongyu/senpi": "2026.9.28-7",
|
|
251
257
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
252
258
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
253
259
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -256,11 +262,11 @@ var init_package = __esm(() => {
|
|
|
256
262
|
"@oh-my-opencode/delegate-core": "workspace:*",
|
|
257
263
|
"@oh-my-opencode/git-bash-mcp": "workspace:*",
|
|
258
264
|
"@oh-my-opencode/hashline-core": "workspace:*",
|
|
259
|
-
"@oh-my-opencode/lsp-core": "workspace:*",
|
|
260
265
|
"@oh-my-opencode/isolation-core": "workspace:*",
|
|
261
|
-
"@oh-my-opencode/
|
|
266
|
+
"@oh-my-opencode/lsp-core": "workspace:*",
|
|
262
267
|
"@oh-my-opencode/mcp-client-core": "workspace:*",
|
|
263
268
|
"@oh-my-opencode/mcp-stdio-core": "workspace:*",
|
|
269
|
+
"@oh-my-opencode/memory-core": "workspace:*",
|
|
264
270
|
"@oh-my-opencode/model-core": "workspace:*",
|
|
265
271
|
"@oh-my-opencode/omo-codex": "workspace:*",
|
|
266
272
|
"@oh-my-opencode/omo-config-core": "workspace:*",
|
|
@@ -269,6 +275,11 @@ var init_package = __esm(() => {
|
|
|
269
275
|
"@oh-my-opencode/openclaw-core": "workspace:*",
|
|
270
276
|
"@oh-my-opencode/prompts-core": "workspace:*",
|
|
271
277
|
"@oh-my-opencode/rules-engine": "workspace:*",
|
|
278
|
+
"@oh-my-opencode/senpi-desktop-engine": "workspace:*",
|
|
279
|
+
"@oh-my-opencode/senpi-desktop-prelude": "workspace:*",
|
|
280
|
+
"@oh-my-opencode/senpi-desktop-protocol": "workspace:*",
|
|
281
|
+
"@oh-my-opencode/senpi-desktop-service": "workspace:*",
|
|
282
|
+
"@oh-my-opencode/senpi-desktop-tool": "workspace:*",
|
|
272
283
|
"@oh-my-opencode/senpi-task": "workspace:*",
|
|
273
284
|
"@oh-my-opencode/shared-skills": "workspace:*",
|
|
274
285
|
"@oh-my-opencode/skills-loader-core": "workspace:*",
|
|
@@ -288,18 +299,18 @@ var init_package = __esm(() => {
|
|
|
288
299
|
typescript: "^7.0.2"
|
|
289
300
|
},
|
|
290
301
|
optionalDependencies: {
|
|
291
|
-
"oh-my-opencode-darwin-arm64": "5.
|
|
292
|
-
"oh-my-opencode-darwin-x64": "5.
|
|
293
|
-
"oh-my-opencode-darwin-x64-baseline": "5.
|
|
294
|
-
"oh-my-opencode-linux-arm64": "5.
|
|
295
|
-
"oh-my-opencode-linux-arm64-musl": "5.
|
|
296
|
-
"oh-my-opencode-linux-x64": "5.
|
|
297
|
-
"oh-my-opencode-linux-x64-baseline": "5.
|
|
298
|
-
"oh-my-opencode-linux-x64-musl": "5.
|
|
299
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.
|
|
300
|
-
"oh-my-opencode-windows-arm64": "5.
|
|
301
|
-
"oh-my-opencode-windows-x64": "5.
|
|
302
|
-
"oh-my-opencode-windows-x64-baseline": "5.
|
|
302
|
+
"oh-my-opencode-darwin-arm64": "5.1.0",
|
|
303
|
+
"oh-my-opencode-darwin-x64": "5.1.0",
|
|
304
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.0",
|
|
305
|
+
"oh-my-opencode-linux-arm64": "5.1.0",
|
|
306
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.0",
|
|
307
|
+
"oh-my-opencode-linux-x64": "5.1.0",
|
|
308
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.0",
|
|
309
|
+
"oh-my-opencode-linux-x64-musl": "5.1.0",
|
|
310
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.0",
|
|
311
|
+
"oh-my-opencode-windows-arm64": "5.1.0",
|
|
312
|
+
"oh-my-opencode-windows-x64": "5.1.0",
|
|
313
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.0"
|
|
303
314
|
},
|
|
304
315
|
overrides: {
|
|
305
316
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -6396,6 +6407,9 @@ function getActiveReservation(sessionID) {
|
|
|
6396
6407
|
pruneExpiredReservations();
|
|
6397
6408
|
return promptAsyncReservations.get(sessionID);
|
|
6398
6409
|
}
|
|
6410
|
+
function reservedDispatchResult(reservation) {
|
|
6411
|
+
return reservation.expiresAt === undefined ? { status: "reserved", reservedBy: reservation.source } : { status: "reserved", reservedBy: reservation.source, expiresAt: reservation.expiresAt };
|
|
6412
|
+
}
|
|
6399
6413
|
function setPromptReservation(sessionID, reservation) {
|
|
6400
6414
|
promptAsyncReservations.set(sessionID, reservation);
|
|
6401
6415
|
}
|
|
@@ -6445,7 +6459,7 @@ async function dispatchAfterSessionIdle(args) {
|
|
|
6445
6459
|
reservedBy: existing.source,
|
|
6446
6460
|
reservedAgeMs: Date.now() - existing.reservedAt
|
|
6447
6461
|
});
|
|
6448
|
-
return
|
|
6462
|
+
return reservedDispatchResult(existing);
|
|
6449
6463
|
}
|
|
6450
6464
|
const reservation = {
|
|
6451
6465
|
source,
|
|
@@ -6983,7 +6997,7 @@ async function dispatchInternalPrompt(args) {
|
|
|
6983
6997
|
if (queueBehavior === "defer") {
|
|
6984
6998
|
const activeReservation = getActiveReservation(sessionID);
|
|
6985
6999
|
if (activeReservation) {
|
|
6986
|
-
return
|
|
7000
|
+
return reservedDispatchResult(activeReservation);
|
|
6987
7001
|
}
|
|
6988
7002
|
const queuedBy = getQueuedPromptBlocker(sessionID);
|
|
6989
7003
|
if (queuedBy !== undefined || isPromptQueueDraining(sessionID)) {
|
|
@@ -7478,11 +7492,6 @@ var init_category_model_requirements = __esm(() => {
|
|
|
7478
7492
|
writing: {
|
|
7479
7493
|
requiresAnyModel: true,
|
|
7480
7494
|
fallbackChain: [
|
|
7481
|
-
{
|
|
7482
|
-
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
7483
|
-
model: "claude-fable-5-1",
|
|
7484
|
-
variant: "low"
|
|
7485
|
-
},
|
|
7486
7495
|
{
|
|
7487
7496
|
providers: ["anthropic", "anthropic-api", "github-copilot", "opencode"],
|
|
7488
7497
|
model: "claude-opus-5-5",
|
|
@@ -8045,8 +8054,17 @@ var init_model_resolver = () => {};
|
|
|
8045
8054
|
// packages/model-core/src/fallback-chain-from-models.ts
|
|
8046
8055
|
var init_fallback_chain_from_models = () => {};
|
|
8047
8056
|
|
|
8057
|
+
// packages/model-core/src/runtime-fallback-auto-retry-signal.ts
|
|
8058
|
+
var init_runtime_fallback_auto_retry_signal = () => {};
|
|
8059
|
+
|
|
8060
|
+
// packages/model-core/src/runtime-fallback-error-shape.ts
|
|
8061
|
+
var init_runtime_fallback_error_shape = () => {};
|
|
8062
|
+
|
|
8063
|
+
// packages/model-core/src/runtime-fallback-error-classifier.ts
|
|
8064
|
+
var init_runtime_fallback_error_classifier = () => {};
|
|
8065
|
+
|
|
8048
8066
|
// packages/model-core/src/model-error-classifier.ts
|
|
8049
|
-
var RETRYABLE_ERROR_NAMES,
|
|
8067
|
+
var RETRYABLE_ERROR_NAMES, NON_RETRYABLE_ERROR_NAMES;
|
|
8050
8068
|
var init_model_error_classifier = __esm(() => {
|
|
8051
8069
|
RETRYABLE_ERROR_NAMES = new Set([
|
|
8052
8070
|
"providermodelnotfounderror",
|
|
@@ -8055,11 +8073,6 @@ var init_model_error_classifier = __esm(() => {
|
|
|
8055
8073
|
"providerconnectionerror",
|
|
8056
8074
|
"authenticationerror"
|
|
8057
8075
|
]);
|
|
8058
|
-
STOP_ERROR_NAMES = new Set([
|
|
8059
|
-
"quotaexceedederror",
|
|
8060
|
-
"insufficientcreditserror",
|
|
8061
|
-
"freeusagelimiterror"
|
|
8062
|
-
]);
|
|
8063
8076
|
NON_RETRYABLE_ERROR_NAMES = new Set([
|
|
8064
8077
|
"messageabortederror",
|
|
8065
8078
|
"permissiondeniederror",
|
|
@@ -8071,15 +8084,6 @@ var init_model_error_classifier = __esm(() => {
|
|
|
8071
8084
|
]);
|
|
8072
8085
|
});
|
|
8073
8086
|
|
|
8074
|
-
// packages/model-core/src/runtime-fallback-auto-retry-signal.ts
|
|
8075
|
-
var init_runtime_fallback_auto_retry_signal = () => {};
|
|
8076
|
-
|
|
8077
|
-
// packages/model-core/src/runtime-fallback-error-shape.ts
|
|
8078
|
-
var init_runtime_fallback_error_shape = () => {};
|
|
8079
|
-
|
|
8080
|
-
// packages/model-core/src/runtime-fallback-error-classifier.ts
|
|
8081
|
-
var init_runtime_fallback_error_classifier = () => {};
|
|
8082
|
-
|
|
8083
8087
|
// packages/model-core/src/provider-exhaustion-fallback-policy.ts
|
|
8084
8088
|
var init_provider_exhaustion_fallback_policy = () => {};
|
|
8085
8089
|
|
|
@@ -9281,7 +9285,7 @@ var init_kimi_categories = __esm(() => {
|
|
|
9281
9285
|
KIMI_CATEGORIES = [
|
|
9282
9286
|
{
|
|
9283
9287
|
name: "writing",
|
|
9284
|
-
config: { model: "anthropic/claude-
|
|
9288
|
+
config: { model: "anthropic/claude-opus-5-5", variant: "low" },
|
|
9285
9289
|
description: "Documentation, prose, technical writing",
|
|
9286
9290
|
promptAppend: WRITING_CATEGORY_PROMPT_APPEND
|
|
9287
9291
|
}
|
|
@@ -74341,6 +74345,29 @@ var init_category = __esm(() => {
|
|
|
74341
74345
|
OmoCategoriesConfigSchema = record(string2(), OmoCategoryConfigSchema);
|
|
74342
74346
|
});
|
|
74343
74347
|
|
|
74348
|
+
// packages/omo-config-core/src/schema/computer.ts
|
|
74349
|
+
var positiveInteger, nonNegativeInteger, OmoComputerSettingsLayerSchema, OmoComputerSettingsSchema;
|
|
74350
|
+
var init_computer = __esm(() => {
|
|
74351
|
+
init_zod();
|
|
74352
|
+
positiveInteger = number2().int().positive();
|
|
74353
|
+
nonNegativeInteger = number2().int().nonnegative();
|
|
74354
|
+
OmoComputerSettingsLayerSchema = object({
|
|
74355
|
+
enabled: boolean2().describe("Experimental: register the computer tool in OmO Native sessions (default: on where the host is supported; false leaves it unregistered)"),
|
|
74356
|
+
display: string2().min(1),
|
|
74357
|
+
max_width: positiveInteger,
|
|
74358
|
+
max_height: positiveInteger,
|
|
74359
|
+
screenshot_max_bytes: positiveInteger,
|
|
74360
|
+
stop_hotkey: string2().min(1),
|
|
74361
|
+
allow_host_relay_only_stop: boolean2(),
|
|
74362
|
+
macos_canary: _enum(["session", "off"]),
|
|
74363
|
+
audit_log: object({ enabled: boolean2() }).partial().strict(),
|
|
74364
|
+
screenshot_gc: object({ enabled: boolean2(), stale_ms: nonNegativeInteger, scan_interval_ms: nonNegativeInteger }).partial().strict(),
|
|
74365
|
+
engine_path: string2().min(1),
|
|
74366
|
+
cua_adapter: boolean2()
|
|
74367
|
+
}).partial().strict().describe("Experimental computer use in OmO Native: screenshots, windows, accessibility trees and native mouse and keyboard input. Every key is optional; defaults depend on the host.");
|
|
74368
|
+
OmoComputerSettingsSchema = OmoComputerSettingsLayerSchema;
|
|
74369
|
+
});
|
|
74370
|
+
|
|
74344
74371
|
// packages/omo-config-core/src/schema/git-master.ts
|
|
74345
74372
|
var OmoGitMasterSettingsShape, OmoGitMasterSettingsLayerSchema, OmoGitMasterSettingsSchema;
|
|
74346
74373
|
var init_git_master = __esm(() => {
|
|
@@ -74613,11 +74640,11 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
74613
74640
|
const record2 = record(string2(), unknown()).parse(input);
|
|
74614
74641
|
return OmoTaskSettingsSchema.parse({
|
|
74615
74642
|
...record2,
|
|
74616
|
-
residency_max_children: record2["residency_max_children"] ??
|
|
74643
|
+
residency_max_children: record2["residency_max_children"] ?? DEFAULT_RESIDENCY_MAX_CHILDREN,
|
|
74617
74644
|
global_concurrency: record2["global_concurrency"] ?? Math.max(8, resolveParallelism() * 2)
|
|
74618
74645
|
});
|
|
74619
74646
|
}
|
|
74620
|
-
var DEFAULT_RESIDENCY_MAX_CHILDREN =
|
|
74647
|
+
var DEFAULT_RESIDENCY_MAX_CHILDREN = "unlimited", ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, IsolationBackendKindSchema, OmoTaskIsolationSchema, isolationDefaults, OmoTaskIsolationLayerSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
|
|
74621
74648
|
var init_task = __esm(() => {
|
|
74622
74649
|
init_zod();
|
|
74623
74650
|
ResidencyMaxChildrenInputSchema = union([number2().int().nonnegative(), literal("unlimited")]);
|
|
@@ -74680,7 +74707,7 @@ var init_task = __esm(() => {
|
|
|
74680
74707
|
provider_concurrency: record(string2(), number2().int().nonnegative()).optional(),
|
|
74681
74708
|
model_concurrency: record(string2(), number2().int().nonnegative()).optional(),
|
|
74682
74709
|
max_depth: number2().int().nonnegative().default(1),
|
|
74683
|
-
residency_max_children: ResidencyMaxChildrenInputSchema.default(
|
|
74710
|
+
residency_max_children: ResidencyMaxChildrenInputSchema.default(DEFAULT_RESIDENCY_MAX_CHILDREN),
|
|
74684
74711
|
resident_idle_timeout_ms: number2().int().positive().max(Number.MAX_SAFE_INTEGER).default(900000),
|
|
74685
74712
|
ttl_ms: number2().int().positive().default(86400000),
|
|
74686
74713
|
state_dir: string2().optional(),
|
|
@@ -74831,6 +74858,7 @@ var init_config = __esm(() => {
|
|
|
74831
74858
|
init_zod();
|
|
74832
74859
|
init_agent();
|
|
74833
74860
|
init_category();
|
|
74861
|
+
init_computer();
|
|
74834
74862
|
init_git_master();
|
|
74835
74863
|
init_memory();
|
|
74836
74864
|
init_model_catalog();
|
|
@@ -74853,6 +74881,7 @@ var init_config = __esm(() => {
|
|
|
74853
74881
|
model_profile: string2().optional(),
|
|
74854
74882
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
74855
74883
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
74884
|
+
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
74856
74885
|
disabled_skills: OmoDisabledSkillsSchema.optional()
|
|
74857
74886
|
}).strict();
|
|
74858
74887
|
OmoConfigProfileSchema = object({
|
|
@@ -74867,6 +74896,7 @@ var init_config = __esm(() => {
|
|
|
74867
74896
|
model_profile: string2().optional(),
|
|
74868
74897
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
74869
74898
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
74899
|
+
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
74870
74900
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
74871
74901
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
74872
74902
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -74886,6 +74916,7 @@ var init_config = __esm(() => {
|
|
|
74886
74916
|
model_profile: string2().optional(),
|
|
74887
74917
|
memory: OmoMemorySettingsSchema.optional(),
|
|
74888
74918
|
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
74919
|
+
computer: OmoComputerSettingsSchema.optional(),
|
|
74889
74920
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
74890
74921
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
74891
74922
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -74908,6 +74939,7 @@ var init_config = __esm(() => {
|
|
|
74908
74939
|
model_profile: string2().optional(),
|
|
74909
74940
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
74910
74941
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
74942
|
+
computer: OmoComputerSettingsLayerSchema.optional(),
|
|
74911
74943
|
disabled_skills: OmoDisabledSkillsSchema.optional(),
|
|
74912
74944
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
74913
74945
|
"[native]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -75053,6 +75085,7 @@ var init_schema = __esm(() => {
|
|
|
75053
75085
|
init_task();
|
|
75054
75086
|
init_team();
|
|
75055
75087
|
init_telemetry();
|
|
75088
|
+
init_computer();
|
|
75056
75089
|
});
|
|
75057
75090
|
|
|
75058
75091
|
// packages/omo-config-core/src/loader/disabled-skills.ts
|
|
@@ -85364,7 +85397,7 @@ class SyncSpanContextManager {
|
|
|
85364
85397
|
var init_context = () => {};
|
|
85365
85398
|
|
|
85366
85399
|
// node_modules/.bun/@posthog+core@1.55.0/node_modules/@posthog/core/dist/traces/config.mjs
|
|
85367
|
-
function
|
|
85400
|
+
function positiveInteger2(value, fallback) {
|
|
85368
85401
|
return typeof value == "number" && Number.isInteger(value) && value >= 1 ? value : fallback;
|
|
85369
85402
|
}
|
|
85370
85403
|
function withUsableIdentityKeys(attributes) {
|
|
@@ -85399,22 +85432,22 @@ function resolveTracesConfig(config, hostResourceAttributes, logger) {
|
|
|
85399
85432
|
const resourceAttributes = assignUserAttributes({
|
|
85400
85433
|
...hostResourceAttributes
|
|
85401
85434
|
}, withUsableIdentityKeys(config?.resourceAttributes));
|
|
85402
|
-
const maxExportBatchSize =
|
|
85435
|
+
const maxExportBatchSize = positiveInteger2(config?.maxExportBatchSize, DEFAULT_MAX_EXPORT_BATCH_SIZE);
|
|
85403
85436
|
return {
|
|
85404
85437
|
serviceName: resourceAttributes?.["service.name"] ?? config?.serviceName,
|
|
85405
85438
|
serviceVersion: resourceAttributes?.["service.version"] ?? config?.serviceVersion,
|
|
85406
85439
|
environment: resourceAttributes?.["deployment.environment"] ?? config?.environment,
|
|
85407
85440
|
resourceAttributes,
|
|
85408
85441
|
beforeSpanSend: resolveBeforeSpanSend(config?.beforeSpanSend, logger),
|
|
85409
|
-
maxAttributesPerSpan:
|
|
85410
|
-
maxEventsPerSpan:
|
|
85442
|
+
maxAttributesPerSpan: positiveInteger2(config?.maxAttributesPerSpan, DEFAULT_MAX_ATTRIBUTES_PER_SPAN),
|
|
85443
|
+
maxEventsPerSpan: positiveInteger2(config?.maxEventsPerSpan, DEFAULT_MAX_EVENTS_PER_SPAN),
|
|
85411
85444
|
maxAttributesPerEvent: DEFAULT_MAX_ATTRIBUTES_PER_EVENT,
|
|
85412
|
-
maxAttributeValueLength:
|
|
85413
|
-
flushIntervalMs:
|
|
85445
|
+
maxAttributeValueLength: positiveInteger2(config?.maxAttributeValueLength, DEFAULT_MAX_ATTRIBUTE_VALUE_LENGTH),
|
|
85446
|
+
flushIntervalMs: positiveInteger2(config?.flushIntervalMs, DEFAULT_FLUSH_INTERVAL_MS2),
|
|
85414
85447
|
maxExportBatchSize,
|
|
85415
|
-
maxQueueSize: Math.max(
|
|
85416
|
-
maxLiveSpans:
|
|
85417
|
-
maxSpanAgeMs:
|
|
85448
|
+
maxQueueSize: Math.max(positiveInteger2(config?.maxQueueSize, DEFAULT_MAX_QUEUE_SIZE), maxExportBatchSize),
|
|
85449
|
+
maxLiveSpans: positiveInteger2(config?.maxLiveSpans, DEFAULT_MAX_LIVE_SPANS),
|
|
85450
|
+
maxSpanAgeMs: positiveInteger2(config?.maxSpanAgeMs, DEFAULT_MAX_SPAN_AGE_MS)
|
|
85418
85451
|
};
|
|
85419
85452
|
}
|
|
85420
85453
|
var DEFAULT_FLUSH_INTERVAL_MS2 = 5000, DEFAULT_MAX_EXPORT_BATCH_SIZE = 512, DEFAULT_MAX_QUEUE_SIZE = 2048, DEFAULT_MAX_ATTRIBUTES_PER_SPAN = 128, DEFAULT_MAX_EVENTS_PER_SPAN = 128, DEFAULT_MAX_ATTRIBUTES_PER_EVENT = 128, DEFAULT_MAX_ATTRIBUTE_VALUE_LENGTH = 8192, DEFAULT_MAX_LIVE_SPANS = 1e4, DEFAULT_MAX_SPAN_AGE_MS = 3600000, IDENTITY_KEYS;
|
|
@@ -88954,7 +88987,7 @@ var package_default2;
|
|
|
88954
88987
|
var init_package2 = __esm(() => {
|
|
88955
88988
|
package_default2 = {
|
|
88956
88989
|
name: "@oh-my-opencode/omo-codex",
|
|
88957
|
-
version: "5.
|
|
88990
|
+
version: "5.1.0",
|
|
88958
88991
|
type: "module",
|
|
88959
88992
|
private: true,
|
|
88960
88993
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -98104,6 +98137,8 @@ function isErrno(error, code) {
|
|
|
98104
98137
|
var REQUIRED_PLUGIN_ARTIFACTS = [
|
|
98105
98138
|
join62("extensions", "omo.js"),
|
|
98106
98139
|
join62("extensions", "omo-task.js"),
|
|
98140
|
+
join62("extensions", "omo-computer-use.js"),
|
|
98141
|
+
join62("extensions", "assets.generated.json"),
|
|
98107
98142
|
join62("extensions", "omo-member.js"),
|
|
98108
98143
|
join62("extensions", "memory-run-supervisor.mjs"),
|
|
98109
98144
|
...PERSONA_ASSET_FILES.map((filename) => join62("extensions", filename)),
|
|
@@ -98295,7 +98330,7 @@ async function runNativeDevInstaller(options) {
|
|
|
98295
98330
|
return runSenpiInstaller(options);
|
|
98296
98331
|
}
|
|
98297
98332
|
// packages/omo-opencode/src/cli/install-native/legacy-omo-bin.ts
|
|
98298
|
-
import { lstatSync as lstatSync4, readFileSync as readFileSync15, realpathSync as realpathSync8 } from "fs";
|
|
98333
|
+
import { lstatSync as lstatSync4, readFileSync as readFileSync15, realpathSync as realpathSync8, statSync as statSync4 } from "fs";
|
|
98299
98334
|
import { dirname as dirname26, isAbsolute as isAbsolute12, join as join64, posix as posix9, win32 as win325 } from "path";
|
|
98300
98335
|
var NATIVE_OMO_PACKAGE = "omo-ai";
|
|
98301
98336
|
var LEGACY_OMO_BIN_PACKAGES = ["oh-my-openagent", "oh-my-opencode", "lazycodex"];
|
|
@@ -98377,12 +98412,11 @@ function resolveOwner(binPath) {
|
|
|
98377
98412
|
if (fromLink !== null)
|
|
98378
98413
|
return fromLink;
|
|
98379
98414
|
const shim = readShimText(binPath);
|
|
98380
|
-
|
|
98381
|
-
return null;
|
|
98382
|
-
const lightWrapper = codexLightWrapperOwner(shim);
|
|
98415
|
+
const lightWrapper = shim === null ? null : codexLightWrapperOwner(shim);
|
|
98383
98416
|
if (lightWrapper !== null)
|
|
98384
98417
|
return lightWrapper;
|
|
98385
|
-
|
|
98418
|
+
const entries = [...shim === null ? [] : shimEntryPaths(shim, dirname26(binPath)), ...bunxEntryPaths(binPath)];
|
|
98419
|
+
for (const entry of entries) {
|
|
98386
98420
|
if (!isInsideNodeModules(entry) || !pathExists(entry))
|
|
98387
98421
|
continue;
|
|
98388
98422
|
const owner = ownerOfFile(entry);
|
|
@@ -98403,6 +98437,23 @@ function shimEntryPaths(shim, shimDirectory) {
|
|
|
98403
98437
|
}
|
|
98404
98438
|
return paths;
|
|
98405
98439
|
}
|
|
98440
|
+
function bunxEntryPaths(binPath) {
|
|
98441
|
+
if (!/\.exe$/i.test(binPath))
|
|
98442
|
+
return [];
|
|
98443
|
+
const sidecar = `${binPath.slice(0, -4)}.bunx`;
|
|
98444
|
+
let contents;
|
|
98445
|
+
try {
|
|
98446
|
+
if (!statSync4(sidecar).isFile())
|
|
98447
|
+
return [];
|
|
98448
|
+
contents = readFileSync15(sidecar).toString("utf16le");
|
|
98449
|
+
} catch {
|
|
98450
|
+
return [];
|
|
98451
|
+
}
|
|
98452
|
+
const end = contents.indexOf('"\x00');
|
|
98453
|
+
if (end <= 0)
|
|
98454
|
+
return [];
|
|
98455
|
+
return [join64(dirname26(dirname26(binPath)), contents.slice(0, end).replace(/\\/g, "/"))];
|
|
98456
|
+
}
|
|
98406
98457
|
function codexLightWrapperOwner(shim) {
|
|
98407
98458
|
if (!shim.includes(CODEX_LIGHT_WRAPPER_MARKER))
|
|
98408
98459
|
return null;
|
|
@@ -103332,20 +103383,41 @@ var BOULDER_FILE = "boulder.json";
|
|
|
103332
103383
|
var BOULDER_STATE_PATH = `${BOULDER_DIR}/${BOULDER_FILE}`;
|
|
103333
103384
|
var NOTEPAD_DIR = "notepads";
|
|
103334
103385
|
var NOTEPAD_BASE_PATH = `${BOULDER_DIR}/${NOTEPAD_DIR}`;
|
|
103386
|
+
// packages/boulder-state/src/markdown-fence.ts
|
|
103387
|
+
var FENCE_PATTERN = /^[ \t]{0,3}(`{3,}|~{3,})(.*)$/;
|
|
103388
|
+
function parseOpeningFence(line) {
|
|
103389
|
+
const match = line.match(FENCE_PATTERN);
|
|
103390
|
+
const run = match?.[1];
|
|
103391
|
+
const info = match?.[2];
|
|
103392
|
+
const marker = run?.charAt(0);
|
|
103393
|
+
if (run === undefined || info === undefined || marker !== "`" && marker !== "~" || marker === "`" && info.includes("`")) {
|
|
103394
|
+
return null;
|
|
103395
|
+
}
|
|
103396
|
+
return { marker, length: run.length };
|
|
103397
|
+
}
|
|
103398
|
+
function isClosingFence(line, fence) {
|
|
103399
|
+
const run = line.match(/^[ \t]{0,3}(`{3,}|~{3,})[ \t]*$/)?.[1];
|
|
103400
|
+
return run?.charAt(0) === fence.marker && run.length >= fence.length;
|
|
103401
|
+
}
|
|
103402
|
+
|
|
103335
103403
|
// packages/boulder-state/src/plan-checklist.ts
|
|
103336
|
-
var SIMPLE_CHECKBOX_PATTERN = /^[-*][ \t]*\[[ \t]*([xX]?)[ \t]*\][ \t]+(.+)$/;
|
|
103404
|
+
var SIMPLE_CHECKBOX_PATTERN = /^[-*][ \t]*\[[ \t]*([xX~]?)[ \t]*\][ \t]+(.+)$/;
|
|
103337
103405
|
var TODO_HEADING_PATTERN = /^##[ \t]+TODOs(?:[ \t]+#+)?[ \t]*$/i;
|
|
103338
103406
|
var FINAL_VERIFICATION_HEADING_PATTERN = /^##[ \t]+Final Verification Wave(?:[ \t]+#+)?[ \t]*$/i;
|
|
103339
103407
|
var SECTION_BOUNDARY_HEADING_PATTERN = /^#{1,2}(?:[ \t]+|$)/;
|
|
103340
|
-
var
|
|
103341
|
-
var
|
|
103342
|
-
var
|
|
103408
|
+
var STRUCTURED_CHECKBOX_PATTERN = /^- \[([ xX~])\] (.+)$/;
|
|
103409
|
+
var TODO_TASK_LABEL_PATTERN = /^([1-9]\d*|T[1-9]\d*(?:\.[1-9]\d*[a-z]?)?)(?:\.[ \t]+|[ \t]+(?:[-\u2014][ \t]+)?)(.+)$/i;
|
|
103410
|
+
var FINAL_WAVE_TASK_LABEL_PATTERN = /^([FH][1-9]\d*(?:\.[1-9]\d*[a-z]?)?)(?:\.[ \t]+|[ \t]+(?:[-\u2014][ \t]+)?)(.+)$/i;
|
|
103343
103411
|
function parsePlanChecklist(markdown) {
|
|
103344
103412
|
const lines = markdown.split(/\r?\n/);
|
|
103345
103413
|
if (!hasStructuredSection(lines)) {
|
|
103346
103414
|
return parseSimpleChecklist(lines);
|
|
103347
103415
|
}
|
|
103348
|
-
|
|
103416
|
+
const structuredPlan = parseStructuredPlan(lines);
|
|
103417
|
+
if (structuredPlan.checklist.total === 0 && structuredPlan.hasUntrackedTopLevelCheckbox) {
|
|
103418
|
+
return parseSimpleChecklist(lines);
|
|
103419
|
+
}
|
|
103420
|
+
return structuredPlan.checklist;
|
|
103349
103421
|
}
|
|
103350
103422
|
function parseCurrentTopLevelTask(markdown) {
|
|
103351
103423
|
const lines = markdown.split(/\r?\n/);
|
|
@@ -103355,10 +103427,12 @@ function parseCurrentTopLevelTask(markdown) {
|
|
|
103355
103427
|
return parseStructuredPlan(lines).nextTask;
|
|
103356
103428
|
}
|
|
103357
103429
|
function parseStructuredPlan(lines) {
|
|
103430
|
+
let completed = 0;
|
|
103358
103431
|
let remaining = 0;
|
|
103359
103432
|
let total = 0;
|
|
103360
103433
|
let nextTaskLabel = null;
|
|
103361
103434
|
let nextTask = null;
|
|
103435
|
+
let hasUntrackedTopLevelCheckbox = false;
|
|
103362
103436
|
let section = "other";
|
|
103363
103437
|
let fence = null;
|
|
103364
103438
|
for (const line of lines) {
|
|
@@ -103378,6 +103452,9 @@ function parseStructuredPlan(lines) {
|
|
|
103378
103452
|
continue;
|
|
103379
103453
|
}
|
|
103380
103454
|
if (section === "other") {
|
|
103455
|
+
if (parseSimpleTopLevelCheckbox(line) !== null) {
|
|
103456
|
+
hasUntrackedTopLevelCheckbox = true;
|
|
103457
|
+
}
|
|
103381
103458
|
continue;
|
|
103382
103459
|
}
|
|
103383
103460
|
const checkbox = parseStructuredTopLevelCheckbox(line, section);
|
|
@@ -103385,7 +103462,11 @@ function parseStructuredPlan(lines) {
|
|
|
103385
103462
|
continue;
|
|
103386
103463
|
}
|
|
103387
103464
|
total += 1;
|
|
103388
|
-
if (checkbox.
|
|
103465
|
+
if (checkbox.status === "done") {
|
|
103466
|
+
completed += 1;
|
|
103467
|
+
continue;
|
|
103468
|
+
}
|
|
103469
|
+
if (checkbox.status === "in-progress") {
|
|
103389
103470
|
continue;
|
|
103390
103471
|
}
|
|
103391
103472
|
remaining += 1;
|
|
@@ -103396,15 +103477,17 @@ function parseStructuredPlan(lines) {
|
|
|
103396
103477
|
}
|
|
103397
103478
|
return {
|
|
103398
103479
|
checklist: {
|
|
103399
|
-
completed
|
|
103480
|
+
completed,
|
|
103400
103481
|
remaining,
|
|
103401
103482
|
total,
|
|
103402
103483
|
nextTaskLabel
|
|
103403
103484
|
},
|
|
103404
|
-
nextTask
|
|
103485
|
+
nextTask,
|
|
103486
|
+
hasUntrackedTopLevelCheckbox
|
|
103405
103487
|
};
|
|
103406
103488
|
}
|
|
103407
103489
|
function parseSimpleChecklist(lines) {
|
|
103490
|
+
let completed = 0;
|
|
103408
103491
|
let remaining = 0;
|
|
103409
103492
|
let total = 0;
|
|
103410
103493
|
let nextTaskLabel = null;
|
|
@@ -103426,7 +103509,11 @@ function parseSimpleChecklist(lines) {
|
|
|
103426
103509
|
continue;
|
|
103427
103510
|
}
|
|
103428
103511
|
total += 1;
|
|
103429
|
-
if (checkbox.
|
|
103512
|
+
if (checkbox.status === "done") {
|
|
103513
|
+
completed += 1;
|
|
103514
|
+
continue;
|
|
103515
|
+
}
|
|
103516
|
+
if (checkbox.status === "in-progress") {
|
|
103430
103517
|
continue;
|
|
103431
103518
|
}
|
|
103432
103519
|
remaining += 1;
|
|
@@ -103434,7 +103521,7 @@ function parseSimpleChecklist(lines) {
|
|
|
103434
103521
|
nextTaskLabel = checkbox.label;
|
|
103435
103522
|
}
|
|
103436
103523
|
}
|
|
103437
|
-
return { completed
|
|
103524
|
+
return { completed, remaining, total, nextTaskLabel };
|
|
103438
103525
|
}
|
|
103439
103526
|
function parseSimpleTopLevelCheckbox(line) {
|
|
103440
103527
|
const match = line.match(SIMPLE_CHECKBOX_PATTERN);
|
|
@@ -103443,7 +103530,13 @@ function parseSimpleTopLevelCheckbox(line) {
|
|
|
103443
103530
|
if (marker === undefined || label === undefined) {
|
|
103444
103531
|
return null;
|
|
103445
103532
|
}
|
|
103446
|
-
return {
|
|
103533
|
+
return { status: parseCheckboxStatus(marker), label };
|
|
103534
|
+
}
|
|
103535
|
+
function parseCheckboxStatus(marker) {
|
|
103536
|
+
if (marker.toLowerCase() === "x") {
|
|
103537
|
+
return "done";
|
|
103538
|
+
}
|
|
103539
|
+
return marker === "~" ? "in-progress" : "open";
|
|
103447
103540
|
}
|
|
103448
103541
|
function hasStructuredSection(lines) {
|
|
103449
103542
|
let fence = null;
|
|
@@ -103475,8 +103568,7 @@ function parseStructuredSectionHeading(line) {
|
|
|
103475
103568
|
return "other";
|
|
103476
103569
|
}
|
|
103477
103570
|
function parseStructuredTopLevelCheckbox(line, section) {
|
|
103478
|
-
const
|
|
103479
|
-
const match = line.match(pattern);
|
|
103571
|
+
const match = line.match(STRUCTURED_CHECKBOX_PATTERN);
|
|
103480
103572
|
const marker = match?.[1];
|
|
103481
103573
|
const label = match?.[2];
|
|
103482
103574
|
if (marker === undefined || label === undefined) {
|
|
@@ -103486,10 +103578,10 @@ function parseStructuredTopLevelCheckbox(line, section) {
|
|
|
103486
103578
|
if (task === null) {
|
|
103487
103579
|
return null;
|
|
103488
103580
|
}
|
|
103489
|
-
return {
|
|
103581
|
+
return { status: parseCheckboxStatus(marker), label, task };
|
|
103490
103582
|
}
|
|
103491
103583
|
function buildTaskRef(section, label) {
|
|
103492
|
-
const pattern = section === "todo" ?
|
|
103584
|
+
const pattern = section === "todo" ? TODO_TASK_LABEL_PATTERN : FINAL_WAVE_TASK_LABEL_PATTERN;
|
|
103493
103585
|
const match = label.match(pattern);
|
|
103494
103586
|
const rawLabel = match?.[1];
|
|
103495
103587
|
const title = match?.[2];
|
|
@@ -103503,20 +103595,6 @@ function buildTaskRef(section, label) {
|
|
|
103503
103595
|
title
|
|
103504
103596
|
};
|
|
103505
103597
|
}
|
|
103506
|
-
function parseOpeningFence(line) {
|
|
103507
|
-
const match = line.match(FENCE_PATTERN);
|
|
103508
|
-
const run = match?.[1];
|
|
103509
|
-
const info = match?.[2];
|
|
103510
|
-
const marker = run?.charAt(0);
|
|
103511
|
-
if (run === undefined || info === undefined || marker !== "`" && marker !== "~" || marker === "`" && info.includes("`")) {
|
|
103512
|
-
return null;
|
|
103513
|
-
}
|
|
103514
|
-
return { marker, length: run.length };
|
|
103515
|
-
}
|
|
103516
|
-
function isClosingFence(line, fence) {
|
|
103517
|
-
const run = line.match(/^[ \t]{0,3}(`{3,}|~{3,})[ \t]*$/)?.[1];
|
|
103518
|
-
return run?.charAt(0) === fence.marker && run.length >= fence.length;
|
|
103519
|
-
}
|
|
103520
103598
|
// packages/boulder-state/src/top-level-task.ts
|
|
103521
103599
|
import { existsSync as existsSync36, readFileSync as readFileSync19 } from "fs";
|
|
103522
103600
|
function readCurrentTopLevelTask(planPath) {
|
|
@@ -103558,7 +103636,7 @@ function resolveBoulderPlanPathForWork(directory, work) {
|
|
|
103558
103636
|
return resolveBoulderPlanPath(directory, work);
|
|
103559
103637
|
}
|
|
103560
103638
|
// packages/boulder-state/src/storage/plan-progress.ts
|
|
103561
|
-
import { existsSync as existsSync38, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as
|
|
103639
|
+
import { existsSync as existsSync38, readFileSync as readFileSync20, readdirSync as readdirSync9, statSync as statSync5 } from "fs";
|
|
103562
103640
|
function getPlanProgress(planPath) {
|
|
103563
103641
|
if (!existsSync38(planPath)) {
|
|
103564
103642
|
return { total: 0, completed: 0, isComplete: false };
|
|
@@ -103977,7 +104055,7 @@ async function hasActiveBoulderContinuation(directory, sessionID, client) {
|
|
|
103977
104055
|
if (!boulder || !boulder.active_plan)
|
|
103978
104056
|
return false;
|
|
103979
104057
|
const progress = getPlanProgress(resolveBoulderPlanPath(directory, boulder));
|
|
103980
|
-
if (progress.isComplete)
|
|
104058
|
+
if (progress.isComplete || progress.total === 0)
|
|
103981
104059
|
return false;
|
|
103982
104060
|
if (!client)
|
|
103983
104061
|
return false;
|
|
@@ -106175,13 +106253,14 @@ init_src();
|
|
|
106175
106253
|
import { existsSync as existsSync55 } from "fs";
|
|
106176
106254
|
import { createRequire as createRequire2 } from "module";
|
|
106177
106255
|
import { homedir as homedir20 } from "os";
|
|
106178
|
-
import { dirname as dirname33, join as
|
|
106256
|
+
import { dirname as dirname33, join as join87 } from "path";
|
|
106179
106257
|
|
|
106180
106258
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
106181
|
-
import { join as
|
|
106259
|
+
import { join as join86 } from "path";
|
|
106182
106260
|
import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
|
|
106183
106261
|
// packages/comment-checker-core/src/release.ts
|
|
106184
106262
|
import { join as join84 } from "path";
|
|
106263
|
+
var COMMENT_CHECKER_RELEASE_VERSION = "0.8.0";
|
|
106185
106264
|
function commentCheckerBinaryName(platform) {
|
|
106186
106265
|
return platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
106187
106266
|
}
|
|
@@ -106194,12 +106273,23 @@ function commentCheckerCacheDir(input) {
|
|
|
106194
106273
|
const base = input.env.XDG_CACHE_HOME || join84(input.homedir, ".cache");
|
|
106195
106274
|
return join84(base, input.cacheDirName, "bin");
|
|
106196
106275
|
}
|
|
106276
|
+
// packages/comment-checker-core/src/cached-release.ts
|
|
106277
|
+
import { readFileSync as readFileSync37, writeFileSync as writeFileSync12 } from "fs";
|
|
106278
|
+
import { join as join85 } from "path";
|
|
106279
|
+
var COMMENT_CHECKER_VERSION_MARKER = "comment-checker.version";
|
|
106280
|
+
function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSync37(path, "utf-8")) {
|
|
106281
|
+
try {
|
|
106282
|
+
return readFile(join85(cacheDir, COMMENT_CHECKER_VERSION_MARKER)).trim() === COMMENT_CHECKER_RELEASE_VERSION;
|
|
106283
|
+
} catch {
|
|
106284
|
+
return false;
|
|
106285
|
+
}
|
|
106286
|
+
}
|
|
106197
106287
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
106198
106288
|
init_binary_downloader();
|
|
106199
106289
|
init_logger2();
|
|
106200
106290
|
init_plugin_identity();
|
|
106201
106291
|
var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
|
|
106202
|
-
var DEBUG_FILE =
|
|
106292
|
+
var DEBUG_FILE = join86(tmpdir4(), "comment-checker-debug.log");
|
|
106203
106293
|
function getCacheDir2() {
|
|
106204
106294
|
return commentCheckerCacheDir({
|
|
106205
106295
|
platform: process.platform,
|
|
@@ -106212,7 +106302,9 @@ function getBinaryName() {
|
|
|
106212
106302
|
return commentCheckerBinaryName(process.platform);
|
|
106213
106303
|
}
|
|
106214
106304
|
function getCachedBinaryPath2() {
|
|
106215
|
-
|
|
106305
|
+
const cacheDir = getCacheDir2();
|
|
106306
|
+
const cached = getCachedBinaryPath(cacheDir, getBinaryName());
|
|
106307
|
+
return cached !== null && isCachedCommentCheckerCurrent(cacheDir) ? cached : null;
|
|
106216
106308
|
}
|
|
106217
106309
|
|
|
106218
106310
|
// packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
|
|
@@ -106256,7 +106348,7 @@ async function getBinaryVersion(binary) {
|
|
|
106256
106348
|
}
|
|
106257
106349
|
}
|
|
106258
106350
|
async function checkAstGrepCli() {
|
|
106259
|
-
const runtimeDir = astGrepRuntimeDir(
|
|
106351
|
+
const runtimeDir = astGrepRuntimeDir(join87(homedir20(), ".omo"));
|
|
106260
106352
|
const sgPath = findSgBinarySync({ runtimeDir });
|
|
106261
106353
|
if (sgPath === null) {
|
|
106262
106354
|
return {
|
|
@@ -106286,10 +106378,10 @@ function findCommentCheckerPackageBinary(baseDirOverride, resolvePackageJsonPath
|
|
|
106286
106378
|
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
106287
106379
|
try {
|
|
106288
106380
|
const packageDir = baseDirOverride ?? dirname33(resolvePackageJsonPath());
|
|
106289
|
-
const vendorPath =
|
|
106381
|
+
const vendorPath = join87(packageDir, "vendor", platformKey, binaryName);
|
|
106290
106382
|
if (existsSync55(vendorPath))
|
|
106291
106383
|
return vendorPath;
|
|
106292
|
-
const binPath =
|
|
106384
|
+
const binPath = join87(packageDir, "bin", binaryName);
|
|
106293
106385
|
if (existsSync55(binPath))
|
|
106294
106386
|
return binPath;
|
|
106295
106387
|
} catch (error) {
|
|
@@ -106436,7 +106528,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
106436
106528
|
// packages/omo-opencode/src/mcp/lsp.ts
|
|
106437
106529
|
init_zod();
|
|
106438
106530
|
init_opencode_config_dir();
|
|
106439
|
-
import { existsSync as existsSync56, readFileSync as
|
|
106531
|
+
import { existsSync as existsSync56, readFileSync as readFileSync38 } from "fs";
|
|
106440
106532
|
import { delimiter as delimiter3, dirname as dirname34, resolve as resolve23 } from "path";
|
|
106441
106533
|
import { fileURLToPath as fileURLToPath7 } from "url";
|
|
106442
106534
|
|
|
@@ -106580,7 +106672,7 @@ function findBootstrapRoot(candidates, pathExists) {
|
|
|
106580
106672
|
}
|
|
106581
106673
|
function readDaemonPackageVersion(root) {
|
|
106582
106674
|
try {
|
|
106583
|
-
const packageJson = JSON.parse(
|
|
106675
|
+
const packageJson = JSON.parse(readFileSync38(resolve23(root, PACKAGE_REL, "package.json"), "utf-8"));
|
|
106584
106676
|
return DaemonPackageSchema.parse(packageJson).version;
|
|
106585
106677
|
} catch (error) {
|
|
106586
106678
|
if (!(error instanceof Error))
|
|
@@ -106663,15 +106755,15 @@ function getInstalledLspServers(options = {}) {
|
|
|
106663
106755
|
|
|
106664
106756
|
// packages/omo-opencode/src/cli/doctor/checks/tools-mcp.ts
|
|
106665
106757
|
init_shared();
|
|
106666
|
-
import { existsSync as existsSync57, readFileSync as
|
|
106758
|
+
import { existsSync as existsSync57, readFileSync as readFileSync39 } from "fs";
|
|
106667
106759
|
import { homedir as homedir21 } from "os";
|
|
106668
|
-
import { join as
|
|
106760
|
+
import { join as join88 } from "path";
|
|
106669
106761
|
var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
|
|
106670
106762
|
function getMcpConfigPaths() {
|
|
106671
106763
|
return [
|
|
106672
|
-
|
|
106673
|
-
|
|
106674
|
-
|
|
106764
|
+
join88(homedir21(), ".claude", ".mcp.json"),
|
|
106765
|
+
join88(process.cwd(), ".mcp.json"),
|
|
106766
|
+
join88(process.cwd(), ".claude", ".mcp.json")
|
|
106675
106767
|
];
|
|
106676
106768
|
}
|
|
106677
106769
|
function loadUserMcpConfig() {
|
|
@@ -106680,7 +106772,7 @@ function loadUserMcpConfig() {
|
|
|
106680
106772
|
if (!existsSync57(configPath))
|
|
106681
106773
|
continue;
|
|
106682
106774
|
try {
|
|
106683
|
-
const content =
|
|
106775
|
+
const content = readFileSync39(configPath, "utf-8");
|
|
106684
106776
|
const config = parseJsonc(content);
|
|
106685
106777
|
if (config.mcpServers) {
|
|
106686
106778
|
Object.assign(servers, config.mcpServers);
|
|
@@ -106815,7 +106907,7 @@ async function checkTools() {
|
|
|
106815
106907
|
|
|
106816
106908
|
// packages/omo-opencode/src/cli/doctor/checks/telemetry.ts
|
|
106817
106909
|
init_src5();
|
|
106818
|
-
import { existsSync as existsSync58, readFileSync as
|
|
106910
|
+
import { existsSync as existsSync58, readFileSync as readFileSync40 } from "fs";
|
|
106819
106911
|
function isTelemetryState(value) {
|
|
106820
106912
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
106821
106913
|
}
|
|
@@ -106825,7 +106917,7 @@ function readLastActiveDay(stateFilePath) {
|
|
|
106825
106917
|
}
|
|
106826
106918
|
let parsed;
|
|
106827
106919
|
try {
|
|
106828
|
-
parsed = JSON.parse(
|
|
106920
|
+
parsed = JSON.parse(readFileSync40(stateFilePath, "utf-8"));
|
|
106829
106921
|
} catch (error) {
|
|
106830
106922
|
if (error instanceof Error) {
|
|
106831
106923
|
return "unreadable";
|
|
@@ -106953,7 +107045,7 @@ init_src();
|
|
|
106953
107045
|
import { existsSync as existsSync59 } from "fs";
|
|
106954
107046
|
import { lstat as lstat16, readdir as readdir14, readFile as readFile28 } from "fs/promises";
|
|
106955
107047
|
import { homedir as homedir23 } from "os";
|
|
106956
|
-
import { basename as basename12, join as
|
|
107048
|
+
import { basename as basename12, join as join89, resolve as resolve24 } from "path";
|
|
106957
107049
|
// packages/omo-opencode/package.json
|
|
106958
107050
|
var package_default3 = {
|
|
106959
107051
|
name: "@oh-my-opencode/omo-opencode",
|
|
@@ -107023,13 +107115,13 @@ var CODEX_BIN_NAMES = [
|
|
|
107023
107115
|
"omo-git-bash-hook"
|
|
107024
107116
|
];
|
|
107025
107117
|
async function gatherCodexSummary(deps = {}) {
|
|
107026
|
-
const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
107118
|
+
const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join89(homedir23(), ".codex"));
|
|
107027
107119
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
107028
107120
|
const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
|
|
107029
107121
|
const pluginRoot = await resolveInstalledPluginRoot(codexHome);
|
|
107030
|
-
const manifest = pluginRoot === null ? null : await readJson(
|
|
107031
|
-
const installSnapshot = pluginRoot === null ? null : await readJson(
|
|
107032
|
-
const configPath =
|
|
107122
|
+
const manifest = pluginRoot === null ? null : await readJson(join89(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
107123
|
+
const installSnapshot = pluginRoot === null ? null : await readJson(join89(pluginRoot, "lazycodex-install.json"));
|
|
107124
|
+
const configPath = join89(codexHome, "config.toml");
|
|
107033
107125
|
const pluginVersion = stringField(manifest, "version");
|
|
107034
107126
|
return {
|
|
107035
107127
|
codexPath: detection.found && "path" in detection ? detection.path : null,
|
|
@@ -107086,7 +107178,7 @@ function buildCodexIssues(summary) {
|
|
|
107086
107178
|
if (summary.pluginRoot === null) {
|
|
107087
107179
|
issues.push({
|
|
107088
107180
|
title: "OMO Codex plugin is not installed",
|
|
107089
|
-
description: `Expected cached plugin at ${
|
|
107181
|
+
description: `Expected cached plugin at ${join89("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
|
|
107090
107182
|
fix: "Run: npx lazycodex-ai install",
|
|
107091
107183
|
severity: "error",
|
|
107092
107184
|
affects: ["plugin loading"]
|
|
@@ -107151,12 +107243,12 @@ function buildCodexIssues(summary) {
|
|
|
107151
107243
|
return issues;
|
|
107152
107244
|
}
|
|
107153
107245
|
async function resolveInstalledPluginRoot(codexHome) {
|
|
107154
|
-
const pluginRoot =
|
|
107246
|
+
const pluginRoot = join89(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
|
|
107155
107247
|
if (!existsSync59(pluginRoot))
|
|
107156
107248
|
return null;
|
|
107157
107249
|
const versions = await readdir14(pluginRoot, { withFileTypes: true });
|
|
107158
107250
|
const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
|
|
107159
|
-
return candidates.length === 0 ? null :
|
|
107251
|
+
return candidates.length === 0 ? null : join89(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
|
|
107160
107252
|
}
|
|
107161
107253
|
async function readCodexConfigSummary(configPath) {
|
|
107162
107254
|
if (!existsSync59(configPath)) {
|
|
@@ -107184,13 +107276,13 @@ async function readCodexConfigSummary(configPath) {
|
|
|
107184
107276
|
async function readLinkedBins(binDir) {
|
|
107185
107277
|
const linked = [];
|
|
107186
107278
|
for (const name of CODEX_BIN_NAMES) {
|
|
107187
|
-
if (await pathExists3(
|
|
107279
|
+
if (await pathExists3(join89(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
|
|
107188
107280
|
linked.push(name);
|
|
107189
107281
|
}
|
|
107190
107282
|
return linked;
|
|
107191
107283
|
}
|
|
107192
107284
|
async function readLinkedAgents(codexHome) {
|
|
107193
|
-
const agentsDir =
|
|
107285
|
+
const agentsDir = join89(codexHome, "agents");
|
|
107194
107286
|
if (!existsSync59(agentsDir))
|
|
107195
107287
|
return [];
|
|
107196
107288
|
const entries = await readdir14(agentsDir, { withFileTypes: true });
|
|
@@ -107324,7 +107416,7 @@ function resolveLatestVersion(input) {
|
|
|
107324
107416
|
init_src();
|
|
107325
107417
|
import { readdir as readdir15, readFile as readFile29, stat as stat7 } from "fs/promises";
|
|
107326
107418
|
import { homedir as homedir24 } from "os";
|
|
107327
|
-
import { dirname as dirname35, isAbsolute as isAbsolute14, join as
|
|
107419
|
+
import { dirname as dirname35, isAbsolute as isAbsolute14, join as join90, relative as relative9, resolve as resolve25, sep as sep9 } from "path";
|
|
107328
107420
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
107329
107421
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
107330
107422
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -107334,7 +107426,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
107334
107426
|
const env = deps.env ?? process.env;
|
|
107335
107427
|
const platform = deps.platform ?? process.platform;
|
|
107336
107428
|
const arch = deps.arch ?? process.arch;
|
|
107337
|
-
const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ??
|
|
107429
|
+
const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ?? join90(homedir24(), ".codex"));
|
|
107338
107430
|
const summary = await gatherCodexSummary({ ...deps, codexHome });
|
|
107339
107431
|
if (summary.pluginRoot === null) {
|
|
107340
107432
|
return {
|
|
@@ -107359,7 +107451,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
107359
107451
|
});
|
|
107360
107452
|
}
|
|
107361
107453
|
const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
|
|
107362
|
-
const runtimeSgPath =
|
|
107454
|
+
const runtimeSgPath = join90(runtimeSgDir, sgBinaryName(platform));
|
|
107363
107455
|
const sg = findSgBinarySync({
|
|
107364
107456
|
arch,
|
|
107365
107457
|
env,
|
|
@@ -107471,7 +107563,7 @@ async function findManifestPaths(root, manifestName) {
|
|
|
107471
107563
|
for (const entry of entries) {
|
|
107472
107564
|
if (entry.name === "node_modules" || entry.name === ".git")
|
|
107473
107565
|
continue;
|
|
107474
|
-
const entryPath =
|
|
107566
|
+
const entryPath = join90(root, entry.name);
|
|
107475
107567
|
if (entry.isDirectory()) {
|
|
107476
107568
|
paths.push(...await findManifestPaths(entryPath, manifestName));
|
|
107477
107569
|
continue;
|
|
@@ -107515,18 +107607,18 @@ function isPluginRuntimePathArg(arg) {
|
|
|
107515
107607
|
return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute14(arg));
|
|
107516
107608
|
}
|
|
107517
107609
|
function runtimeSgDirectory(codexHome, platform, arch) {
|
|
107518
|
-
return
|
|
107610
|
+
return join90(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
107519
107611
|
}
|
|
107520
107612
|
function describeSgSource(sgPath, env, runtimeSgDir, platform) {
|
|
107521
107613
|
const override = env[SG_PATH_ENV_KEY]?.trim();
|
|
107522
107614
|
if (override !== undefined && override.length > 0 && sgPath === override)
|
|
107523
107615
|
return `env override ${SG_PATH_ENV_KEY}`;
|
|
107524
|
-
if (sgPath ===
|
|
107616
|
+
if (sgPath === join90(runtimeSgDir, sgBinaryName(platform)))
|
|
107525
107617
|
return "runtime dir";
|
|
107526
107618
|
return "PATH";
|
|
107527
107619
|
}
|
|
107528
107620
|
async function readBootstrapStateSummary(codexHome) {
|
|
107529
|
-
const statePath =
|
|
107621
|
+
const statePath = join90(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
|
|
107530
107622
|
const raw = await readJson2(statePath);
|
|
107531
107623
|
if (raw === null)
|
|
107532
107624
|
return null;
|
|
@@ -107605,16 +107697,16 @@ function isRecord18(value) {
|
|
|
107605
107697
|
import { existsSync as existsSync60 } from "fs";
|
|
107606
107698
|
import { readFile as readFile30 } from "fs/promises";
|
|
107607
107699
|
import { homedir as homedir25 } from "os";
|
|
107608
|
-
import { join as
|
|
107700
|
+
import { join as join91, resolve as resolve26 } from "path";
|
|
107609
107701
|
var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
107610
107702
|
var CHECK_NAME = "codex-runtime-wrapper";
|
|
107611
107703
|
var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
|
|
107612
107704
|
async function checkCodexRuntimeWrapper(deps = {}) {
|
|
107613
|
-
const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
107705
|
+
const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join91(homedir25(), ".codex"));
|
|
107614
107706
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
107615
107707
|
const platform = deps.platform ?? process.platform;
|
|
107616
|
-
const wrapperPath =
|
|
107617
|
-
const legacyWrapperPath =
|
|
107708
|
+
const wrapperPath = join91(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
|
|
107709
|
+
const legacyWrapperPath = join91(binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
107618
107710
|
const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
|
|
107619
107711
|
const issues = [];
|
|
107620
107712
|
if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
|
|
@@ -108145,17 +108237,17 @@ import {
|
|
|
108145
108237
|
existsSync as existsSync63,
|
|
108146
108238
|
mkdirSync as mkdirSync17,
|
|
108147
108239
|
readdirSync as readdirSync13,
|
|
108148
|
-
readFileSync as
|
|
108240
|
+
readFileSync as readFileSync42,
|
|
108149
108241
|
renameSync as renameSync8,
|
|
108150
108242
|
unlinkSync as unlinkSync9,
|
|
108151
|
-
writeFileSync as
|
|
108243
|
+
writeFileSync as writeFileSync14
|
|
108152
108244
|
} from "fs";
|
|
108153
|
-
import { basename as basename13, dirname as dirname36, join as
|
|
108245
|
+
import { basename as basename13, dirname as dirname36, join as join94 } from "path";
|
|
108154
108246
|
|
|
108155
108247
|
// packages/mcp-client-core/src/config-dir.ts
|
|
108156
108248
|
import { existsSync as existsSync61, realpathSync as realpathSync10 } from "fs";
|
|
108157
108249
|
import { homedir as homedir26 } from "os";
|
|
108158
|
-
import { join as
|
|
108250
|
+
import { join as join92, resolve as resolve27 } from "path";
|
|
108159
108251
|
function resolveConfigPath2(pathValue) {
|
|
108160
108252
|
const resolvedPath = resolve27(pathValue);
|
|
108161
108253
|
if (!existsSync61(resolvedPath))
|
|
@@ -108173,13 +108265,13 @@ function getOpenCodeCliConfigDir(env = process.env) {
|
|
|
108173
108265
|
if (customConfigDir) {
|
|
108174
108266
|
return resolveConfigPath2(customConfigDir);
|
|
108175
108267
|
}
|
|
108176
|
-
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() ||
|
|
108177
|
-
return resolveConfigPath2(
|
|
108268
|
+
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join92(homedir26(), ".config");
|
|
108269
|
+
return resolveConfigPath2(join92(xdgConfigDir, "opencode"));
|
|
108178
108270
|
}
|
|
108179
108271
|
|
|
108180
108272
|
// packages/mcp-client-core/src/mcp-oauth/storage-index.ts
|
|
108181
|
-
import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as
|
|
108182
|
-
import { join as
|
|
108273
|
+
import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "fs";
|
|
108274
|
+
import { join as join93 } from "path";
|
|
108183
108275
|
var INDEX_FILE_NAME = "index.json";
|
|
108184
108276
|
function isTokenIndex(value) {
|
|
108185
108277
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -108187,14 +108279,14 @@ function isTokenIndex(value) {
|
|
|
108187
108279
|
return Object.values(value).every((entry) => typeof entry === "string");
|
|
108188
108280
|
}
|
|
108189
108281
|
function getIndexPath(storageDir) {
|
|
108190
|
-
return
|
|
108282
|
+
return join93(storageDir, INDEX_FILE_NAME);
|
|
108191
108283
|
}
|
|
108192
108284
|
function readTokenIndex(storageDir) {
|
|
108193
108285
|
const indexPath = getIndexPath(storageDir);
|
|
108194
108286
|
if (!existsSync62(indexPath))
|
|
108195
108287
|
return {};
|
|
108196
108288
|
try {
|
|
108197
|
-
const parsed = JSON.parse(
|
|
108289
|
+
const parsed = JSON.parse(readFileSync41(indexPath, "utf-8"));
|
|
108198
108290
|
return isTokenIndex(parsed) ? parsed : {};
|
|
108199
108291
|
} catch (readError) {
|
|
108200
108292
|
if (!(readError instanceof Error))
|
|
@@ -108206,7 +108298,7 @@ function writeTokenIndex(storageDir, index) {
|
|
|
108206
108298
|
try {
|
|
108207
108299
|
const indexPath = getIndexPath(storageDir);
|
|
108208
108300
|
const tempPath = `${indexPath}.tmp.${Date.now()}`;
|
|
108209
|
-
|
|
108301
|
+
writeFileSync13(tempPath, JSON.stringify(index, null, 2), { encoding: "utf-8", mode: 384 });
|
|
108210
108302
|
chmodSync4(tempPath, 384);
|
|
108211
108303
|
renameSync7(tempPath, indexPath);
|
|
108212
108304
|
return true;
|
|
@@ -108231,16 +108323,16 @@ function deleteTokenIndexEntry(storageDir, hash) {
|
|
|
108231
108323
|
var STORAGE_DIR_NAME = "mcp-oauth";
|
|
108232
108324
|
var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
108233
108325
|
function getMcpOauthStorageDir() {
|
|
108234
|
-
return
|
|
108326
|
+
return join94(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
108235
108327
|
}
|
|
108236
108328
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
108237
108329
|
return createHash7("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
108238
108330
|
}
|
|
108239
108331
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
108240
|
-
return
|
|
108332
|
+
return join94(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
108241
108333
|
}
|
|
108242
108334
|
function getLegacyStoragePath() {
|
|
108243
|
-
return
|
|
108335
|
+
return join94(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
|
|
108244
108336
|
}
|
|
108245
108337
|
function normalizeHost2(serverHost) {
|
|
108246
108338
|
let host = serverHost.trim();
|
|
@@ -108304,7 +108396,7 @@ function readTokenFile(filePath) {
|
|
|
108304
108396
|
if (!existsSync63(filePath))
|
|
108305
108397
|
return null;
|
|
108306
108398
|
try {
|
|
108307
|
-
const parsed = JSON.parse(
|
|
108399
|
+
const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
|
|
108308
108400
|
return isOAuthTokenData(parsed) ? parsed : null;
|
|
108309
108401
|
} catch (readError) {
|
|
108310
108402
|
if (!(readError instanceof Error))
|
|
@@ -108317,7 +108409,7 @@ function readLegacyStore() {
|
|
|
108317
108409
|
if (!existsSync63(filePath))
|
|
108318
108410
|
return null;
|
|
108319
108411
|
try {
|
|
108320
|
-
const parsed = JSON.parse(
|
|
108412
|
+
const parsed = JSON.parse(readFileSync42(filePath, "utf-8"));
|
|
108321
108413
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
|
|
108322
108414
|
return null;
|
|
108323
108415
|
const result = {};
|
|
@@ -108339,7 +108431,7 @@ function writeTokenFile(filePath, token) {
|
|
|
108339
108431
|
mkdirSync17(dir, { recursive: true });
|
|
108340
108432
|
}
|
|
108341
108433
|
const tempPath = `${filePath}.tmp.${Date.now()}`;
|
|
108342
|
-
|
|
108434
|
+
writeFileSync14(tempPath, JSON.stringify(token, null, 2), { encoding: "utf-8", mode: 384 });
|
|
108343
108435
|
chmodSync5(tempPath, 384);
|
|
108344
108436
|
renameSync8(tempPath, filePath);
|
|
108345
108437
|
return true;
|
|
@@ -108395,7 +108487,7 @@ function deleteLegacyToken(serverHost, resource) {
|
|
|
108395
108487
|
function writeLegacyStore(store) {
|
|
108396
108488
|
try {
|
|
108397
108489
|
const filePath = getLegacyStoragePath();
|
|
108398
|
-
|
|
108490
|
+
writeFileSync14(filePath, JSON.stringify(store, null, 2), { encoding: "utf-8", mode: 384 });
|
|
108399
108491
|
chmodSync5(filePath, 384);
|
|
108400
108492
|
return true;
|
|
108401
108493
|
} catch (writeError) {
|
|
@@ -108419,7 +108511,7 @@ function listTokensByHost(serverHost) {
|
|
|
108419
108511
|
for (const [hash, indexedKey] of Object.entries(index)) {
|
|
108420
108512
|
if (!indexedKey.startsWith(prefix))
|
|
108421
108513
|
continue;
|
|
108422
|
-
const indexedToken = readTokenFile(
|
|
108514
|
+
const indexedToken = readTokenFile(join94(getMcpOauthStorageDir(), `${hash}.json`));
|
|
108423
108515
|
if (indexedToken)
|
|
108424
108516
|
result[indexedKey] = indexedToken;
|
|
108425
108517
|
}
|
|
@@ -108434,7 +108526,7 @@ function listAllTokens() {
|
|
|
108434
108526
|
for (const entry of readdirSync13(dir, { withFileTypes: true })) {
|
|
108435
108527
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
108436
108528
|
continue;
|
|
108437
|
-
const token = readTokenFile(
|
|
108529
|
+
const token = readTokenFile(join94(dir, entry.name));
|
|
108438
108530
|
const hash = basename13(entry.name, ".json");
|
|
108439
108531
|
if (token)
|
|
108440
108532
|
result[index[hash] ?? hash] = token;
|
|
@@ -109158,7 +109250,7 @@ async function boulder(options) {
|
|
|
109158
109250
|
}
|
|
109159
109251
|
// packages/omo-opencode/src/cli/codex-ulw-loop.ts
|
|
109160
109252
|
import { spawn as spawn5 } from "child_process";
|
|
109161
|
-
import { existsSync as existsSync65, readFileSync as
|
|
109253
|
+
import { existsSync as existsSync65, readFileSync as readFileSync43, realpathSync as realpathSync11 } from "fs";
|
|
109162
109254
|
import { homedir as homedir27 } from "os";
|
|
109163
109255
|
var ULW_LOOP_DELEGATION_SENTINEL = "OMO_ULW_LOOP_DELEGATED";
|
|
109164
109256
|
function resolveCodexUlwLoopCommand(input = {}) {
|
|
@@ -109208,7 +109300,7 @@ function resolveLegacyLocalOmoBin(env, homeDir, currentExecutablePaths) {
|
|
|
109208
109300
|
}
|
|
109209
109301
|
function isGeneratedRuntimeWrapper(candidate) {
|
|
109210
109302
|
try {
|
|
109211
|
-
return
|
|
109303
|
+
return readFileSync43(candidate, "utf8").includes(RUNTIME_WRAPPER_MARKER);
|
|
109212
109304
|
} catch (error) {
|
|
109213
109305
|
if (error instanceof Error)
|
|
109214
109306
|
return false;
|