lazycodex-ai 4.16.0 → 4.16.2
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/codex-ulw-loop.d.ts +8 -0
- package/dist/cli/get-local-version/types.d.ts +1 -1
- package/dist/cli/index.js +260 -207
- package/dist/cli-node/index.js +260 -207
- package/docs/reference/web-terminal-visual-qa.md +39 -45
- package/package.json +3 -2
- 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/codegraph/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/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus.md +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/start-work-continuation/directive.md +3 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +1 -1
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +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/teammode/skills/teammode/SKILL.md +3 -3
- 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/directive.md +19 -10
- 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/ultrawork/skills/ultrawork/SKILL.md +19 -10
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +13 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +2 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +22 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +4 -0
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +19 -10
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +15 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-steering.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +89 -27
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +55 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.d.ts +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-snapshot.js +33 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering-types.d.ts +10 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/steering.js +15 -11
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +7 -7
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +17 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-steering.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +59 -11
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-snapshot.ts +38 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering-types.ts +11 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/steering.ts +15 -7
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +16 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/plan-io.test.ts +260 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering-snapshot.test.ts +124 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/steering.test.ts +101 -2
- 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-codegraph-init-guidance.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-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-checking-codegraph-bootstrap.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-start-work-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-start-work-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 +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/auto-update.mjs +64 -17
- package/packages/omo-codex/plugin/scripts/hook-status-message.mjs +10 -6
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/multi-agent-v2-guard.mjs +186 -20
- package/packages/omo-codex/plugin/scripts/migrate-codex-config/subagent-limit-guard.mjs +51 -3
- package/packages/omo-codex/plugin/scripts/migrate-codex-config.mjs +33 -5
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +9 -9
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +7 -3
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +24 -2
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/README.md +2 -2
- package/packages/omo-codex/plugin/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +19 -10
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -1
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +7 -7
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +13 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +2 -0
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +14 -18
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +1 -1
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +35 -1
- package/packages/omo-codex/plugin/test/bootstrap-hooks.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/hook-status-message.test.mjs +22 -9
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +275 -19
- package/packages/omo-codex/plugin/test/subagent-limit-migration.test.mjs +33 -0
- package/packages/omo-codex/plugin/test/sync-hook-status-messages.test.mjs +6 -6
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +4 -2
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +52 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +65 -39
- package/packages/shared-skills/skills/frontend/SKILL.md +9 -9
- package/packages/shared-skills/skills/frontend/references/design/README.md +7 -3
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +24 -2
- package/packages/shared-skills/skills/frontend/references/designpowers/README.md +2 -2
- package/packages/shared-skills/skills/frontend/references/designpowers/lane-b-execution.md +1 -1
- package/packages/shared-skills/skills/review-work/SKILL.md +3 -1
- package/packages/shared-skills/skills/start-work/SKILL.md +4 -2
- package/packages/shared-skills/skills/ulw-research/SKILL.md +3 -1
- package/packages/shared-skills/skills/visual-qa/SKILL.md +13 -17
- package/script/qa/strip-ansi.mjs +10 -0
- package/script/qa/web-terminal-visual-qa.mjs +112 -195
- package/script/qa/xterm-live-terminal.mjs +180 -0
- package/script/qa/web-terminal-renderer.mjs +0 -218
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/codegraph/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO) Checking CodeGraph Bootstrap",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Checking CodeGraph Bootstrap",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\codegraph\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Loading Project Rules",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Loading Project Rules",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/telemetry/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO) Recording Session Telemetry",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Recording Session Telemetry",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\telemetry\\dist\\cli.js\" hook session-start"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Checking Start-Work Continuation",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook stop"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/start-work-continuation/dist/cli.js\" hook subagent-stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Checking Start-Work Continuation",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Checking Start-Work Continuation",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\start-work-continuation\\dist\\cli.js\" hook subagent-stop"
|
|
12
12
|
}
|
|
13
13
|
]
|
package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Verifying LazyCodex Executor Evidence",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Verifying LazyCodex Executor Evidence",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\lazycodex-executor-verify\\dist\\cli.js\" hook subagent-stop"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/ultrawork/dist/cli.js\" hook user-prompt-submit",
|
|
9
9
|
"timeout": 5,
|
|
10
|
-
"statusMessage": "(OmO) Checking Ultrawork Trigger",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Checking Ultrawork Trigger",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ultrawork\\dist\\cli.js\" hook user-prompt-submit"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/ulw-loop/dist/cli.js\" hook user-prompt-submit",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Checking Ulw-Loop Steering",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Checking Ulw-Loop Steering",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\ulw-loop\\dist\\cli.js\" hook user-prompt-submit"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/rules/dist/cli.js\" hook user-prompt-submit",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO) Loading Project Rules",
|
|
10
|
+
"statusMessage": "(OmO 4.16.2) Loading Project Rules",
|
|
11
11
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\node-dispatch.ps1\" \"${PLUGIN_ROOT}\\components\\rules\\dist\\cli.js\" hook user-prompt-submit"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisyphuslabs/omo-codex-plugin",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sisyphuslabs/omo-codex-plugin",
|
|
9
|
-
"version": "4.16.
|
|
9
|
+
"version": "4.16.1",
|
|
10
10
|
"workspaces": [
|
|
11
11
|
"components/codegraph",
|
|
12
12
|
"components/comment-checker",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
},
|
|
94
94
|
"components/codegraph": {
|
|
95
95
|
"name": "@sisyphuslabs/codex-codegraph",
|
|
96
|
-
"version": "4.16.
|
|
96
|
+
"version": "4.16.1",
|
|
97
97
|
"bin": {
|
|
98
98
|
"omo-codegraph": "dist/cli.js"
|
|
99
99
|
},
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
},
|
|
113
113
|
"components/comment-checker": {
|
|
114
114
|
"name": "@code-yeongyu/codex-comment-checker",
|
|
115
|
-
"version": "4.16.
|
|
115
|
+
"version": "4.16.1",
|
|
116
116
|
"license": "MIT",
|
|
117
117
|
"bin": {
|
|
118
118
|
"omo-comment-checker": "dist/cli.js"
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
},
|
|
134
134
|
"components/git-bash": {
|
|
135
135
|
"name": "@sisyphuslabs/codex-git-bash-hook",
|
|
136
|
-
"version": "4.16.
|
|
136
|
+
"version": "4.16.1",
|
|
137
137
|
"bin": {
|
|
138
138
|
"omo-git-bash-hook": "dist/cli.js"
|
|
139
139
|
},
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
},
|
|
149
149
|
"components/lazycodex-executor-verify": {
|
|
150
150
|
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
|
|
151
|
-
"version": "4.16.
|
|
151
|
+
"version": "4.16.1",
|
|
152
152
|
"license": "MIT",
|
|
153
153
|
"bin": {
|
|
154
154
|
"lazycodex-executor-verify": "dist/cli.js"
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
"components/lsp": {
|
|
167
167
|
"name": "@code-yeongyu/codex-lsp",
|
|
168
|
-
"version": "4.16.
|
|
168
|
+
"version": "4.16.1",
|
|
169
169
|
"license": "MIT",
|
|
170
170
|
"dependencies": {
|
|
171
171
|
"@code-yeongyu/lsp-daemon": "file:../../../../lsp-daemon"
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
"components/rules": {
|
|
187
187
|
"name": "@code-yeongyu/codex-rules",
|
|
188
|
-
"version": "4.16.
|
|
188
|
+
"version": "4.16.1",
|
|
189
189
|
"license": "MIT",
|
|
190
190
|
"dependencies": {
|
|
191
191
|
"picomatch": "^4.0.3"
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
},
|
|
208
208
|
"components/start-work-continuation": {
|
|
209
209
|
"name": "@code-yeongyu/codex-start-work-continuation",
|
|
210
|
-
"version": "4.16.
|
|
210
|
+
"version": "4.16.1",
|
|
211
211
|
"license": "MIT",
|
|
212
212
|
"bin": {
|
|
213
213
|
"omo-start-work-continuation": "dist/cli.js"
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
},
|
|
225
225
|
"components/teammode": {
|
|
226
226
|
"name": "@sisyphuslabs/codex-teammode",
|
|
227
|
-
"version": "4.16.
|
|
227
|
+
"version": "4.16.1",
|
|
228
228
|
"devDependencies": {
|
|
229
229
|
"@types/node": "^25.9.3",
|
|
230
230
|
"bun-types": "^1.3.1",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
},
|
|
238
238
|
"components/telemetry": {
|
|
239
239
|
"name": "@code-yeongyu/codex-telemetry",
|
|
240
|
-
"version": "4.16.
|
|
240
|
+
"version": "4.16.1",
|
|
241
241
|
"license": "MIT",
|
|
242
242
|
"bin": {
|
|
243
243
|
"omo-telemetry": "dist/cli.js"
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
},
|
|
256
256
|
"components/ultrawork": {
|
|
257
257
|
"name": "@code-yeongyu/codex-ultrawork",
|
|
258
|
-
"version": "4.16.
|
|
258
|
+
"version": "4.16.1",
|
|
259
259
|
"license": "MIT",
|
|
260
260
|
"bin": {
|
|
261
261
|
"omo-ultrawork": "dist/cli.js"
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
},
|
|
274
274
|
"components/ulw-loop": {
|
|
275
275
|
"name": "@code-yeongyu/codex-ulw-loop",
|
|
276
|
-
"version": "4.16.
|
|
276
|
+
"version": "4.16.1",
|
|
277
277
|
"license": "MIT",
|
|
278
278
|
"bin": {
|
|
279
279
|
"omo-ulw-loop": "dist/cli.js",
|
|
@@ -39,6 +39,44 @@ const DEFAULT_RETRY_INTERVAL_MS = 30 * 60 * 1_000;
|
|
|
39
39
|
|
|
40
40
|
export { resolveLazyCodexUpdatePlan };
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* Read Codex SessionStart stdin JSON and extract the effective session model.
|
|
44
|
+
* @param {NodeJS.ReadableStream | null | undefined} stdin
|
|
45
|
+
* @returns {Promise<string | null>}
|
|
46
|
+
*/
|
|
47
|
+
export async function readSessionModelFromStdin(stdin = process.stdin) {
|
|
48
|
+
if (!stdin || typeof stdin.on !== "function") return null;
|
|
49
|
+
if (stdin.isTTY) return null;
|
|
50
|
+
|
|
51
|
+
const raw = await new Promise((resolve) => {
|
|
52
|
+
let data = "";
|
|
53
|
+
let settled = false;
|
|
54
|
+
const finish = () => {
|
|
55
|
+
if (settled) return;
|
|
56
|
+
settled = true;
|
|
57
|
+
resolve(data);
|
|
58
|
+
};
|
|
59
|
+
stdin.setEncoding("utf8");
|
|
60
|
+
stdin.on("data", (chunk) => {
|
|
61
|
+
data += chunk;
|
|
62
|
+
});
|
|
63
|
+
stdin.once("end", finish);
|
|
64
|
+
stdin.once("error", finish);
|
|
65
|
+
// Hooks normally close stdin quickly; avoid hanging migration forever.
|
|
66
|
+
setTimeout(finish, 250).unref?.();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const trimmed = raw.trim();
|
|
70
|
+
if (!trimmed) return null;
|
|
71
|
+
try {
|
|
72
|
+
const payload = JSON.parse(trimmed);
|
|
73
|
+
if (typeof payload?.model === "string" && payload.model.trim()) return payload.model.trim();
|
|
74
|
+
return null;
|
|
75
|
+
} catch {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
42
80
|
export function resolveAutoUpdatePlan({ env = process.env, now = Date.now(), lastCheckedAt, lastAttemptedAt, lastStatus, installFlow } = {}) {
|
|
43
81
|
if (env.LAZYCODEX_AUTO_UPDATE_DISABLED === "1" || env.OMO_CODEX_AUTO_UPDATE_DISABLED === "1") {
|
|
44
82
|
return { shouldRun: false, reason: "disabled" };
|
|
@@ -126,8 +164,13 @@ export async function runLazyCodexManualUpdate({ env = process.env, dryRun = fal
|
|
|
126
164
|
return 0;
|
|
127
165
|
}
|
|
128
166
|
|
|
129
|
-
export async function runAutoUpdateCheck({
|
|
130
|
-
|
|
167
|
+
export async function runAutoUpdateCheck({
|
|
168
|
+
env = process.env,
|
|
169
|
+
now = Date.now(),
|
|
170
|
+
sessionModel = null,
|
|
171
|
+
requireSessionModel = false,
|
|
172
|
+
} = {}) {
|
|
173
|
+
const migrationNotices = await runConfigMigration({ env, sessionModel, requireSessionModel });
|
|
131
174
|
const statePath = resolveStatePath(env);
|
|
132
175
|
const notices = [...migrationNotices];
|
|
133
176
|
const state = await settlePendingNotice({ env, now, statePath, state: await readState(statePath), notices });
|
|
@@ -251,11 +294,11 @@ function resolveUpdateContext({ env }) {
|
|
|
251
294
|
return { currentVersion, latestVersion, shouldUpdate: plan.shouldUpdate };
|
|
252
295
|
}
|
|
253
296
|
|
|
254
|
-
async function runConfigMigration({ env }) {
|
|
297
|
+
async function runConfigMigration({ env, sessionModel = null, requireSessionModel = false }) {
|
|
255
298
|
if (env.LAZYCODEX_CONFIG_MIGRATION_DISABLED === "1" || env.OMO_CODEX_CONFIG_MIGRATION_DISABLED === "1") return [];
|
|
256
299
|
try {
|
|
257
300
|
await migrateOmoSotConfig({ env, seed: true });
|
|
258
|
-
const result = await migrateCodexConfig({ env });
|
|
301
|
+
const result = await migrateCodexConfig({ env, sessionModel, requireSessionModel });
|
|
259
302
|
if (result.modeChanged.length === 0) return [];
|
|
260
303
|
return [
|
|
261
304
|
"[LazyCodex] Removed unsupported Codex root multi_agent_mode from config.toml. Tell the user LazyCodex cleaned up a stale OMO-managed setting so Codex uses its supported per-turn multiAgentMode API.",
|
|
@@ -267,18 +310,22 @@ async function runConfigMigration({ env }) {
|
|
|
267
310
|
}
|
|
268
311
|
|
|
269
312
|
if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
additionalContext: notices.join("\n\n"),
|
|
277
|
-
},
|
|
278
|
-
}));
|
|
279
|
-
})
|
|
280
|
-
.catch((error) => {
|
|
281
|
-
console.error(error instanceof Error ? error.message : String(error));
|
|
282
|
-
process.exit(0);
|
|
313
|
+
(async () => {
|
|
314
|
+
const sessionModel = await readSessionModelFromStdin(process.stdin);
|
|
315
|
+
const { notices } = await runAutoUpdateCheck({
|
|
316
|
+
sessionModel,
|
|
317
|
+
// Hook CLI path: only force-disable when SessionStart provided the active model.
|
|
318
|
+
requireSessionModel: true,
|
|
283
319
|
});
|
|
320
|
+
if (notices.length === 0) return;
|
|
321
|
+
console.log(JSON.stringify({
|
|
322
|
+
hookSpecificOutput: {
|
|
323
|
+
hookEventName: "SessionStart",
|
|
324
|
+
additionalContext: notices.join("\n\n"),
|
|
325
|
+
},
|
|
326
|
+
}));
|
|
327
|
+
})().catch((error) => {
|
|
328
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
329
|
+
process.exit(0);
|
|
330
|
+
});
|
|
284
331
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const PRODUCT_NAME = "OmO";
|
|
2
2
|
|
|
3
3
|
const WORD_OVERRIDES = new Map([
|
|
4
4
|
["codegraph", "CodeGraph"],
|
|
@@ -9,15 +9,14 @@ const WORD_OVERRIDES = new Map([
|
|
|
9
9
|
]);
|
|
10
10
|
|
|
11
11
|
export function formatLazyCodexHookStatusMessage(version, label) {
|
|
12
|
-
|
|
13
|
-
return `${PRODUCT_PREFIX} ${normalizeLazyCodexHookStatusLabel(label)}`;
|
|
12
|
+
return `(${PRODUCT_NAME} ${normalizeVersion(version)}) ${normalizeLazyCodexHookStatusLabel(label)}`;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export function normalizeLazyCodexHookStatusLabel(label) {
|
|
17
16
|
const parsed = parseLazyCodexHookStatusMessage(label);
|
|
18
17
|
const rawLabel = parsed === null ? label : parsed.label;
|
|
19
18
|
const normalized = rawLabel
|
|
20
|
-
.replace(/^\(OmO
|
|
19
|
+
.replace(/^\(OmO(?:\s+[^)]+)?\)\s*/i, " ")
|
|
21
20
|
.replace(/\bOMO\b/gi, " ")
|
|
22
21
|
.replace(/\s+/g, " ")
|
|
23
22
|
.trim();
|
|
@@ -30,14 +29,19 @@ export function normalizeLazyCodexHookStatusLabel(label) {
|
|
|
30
29
|
|
|
31
30
|
export function parseLazyCodexHookStatusMessage(message) {
|
|
32
31
|
const trimmed = message.trim();
|
|
33
|
-
const current = /^\(OmO
|
|
34
|
-
if (current !== null) return { version:
|
|
32
|
+
const current = /^\(OmO(?:\s+([^)]+))?\)\s+(.+)$/.exec(trimmed);
|
|
33
|
+
if (current !== null) return { version: current[1], label: current[2] };
|
|
35
34
|
const legacy = /^LazyCodex\(([^)]+)\):\s+(.+)$/.exec(trimmed);
|
|
36
35
|
if (legacy === null) return null;
|
|
37
36
|
const [, version, label] = legacy;
|
|
38
37
|
return { version, label };
|
|
39
38
|
}
|
|
40
39
|
|
|
40
|
+
function normalizeVersion(version) {
|
|
41
|
+
const normalized = version.trim();
|
|
42
|
+
return normalized.length === 0 ? "local" : normalized;
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
function formatWord(word) {
|
|
42
46
|
const lower = word.toLowerCase();
|
|
43
47
|
const override = WORD_OVERRIDES.get(lower);
|
|
@@ -1,20 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Runtime migration
|
|
2
|
+
* Runtime migration for `[features.multi_agent_v2]`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `multi_agent_v2 = true` (removed here because a boolean key and a
|
|
9
|
-
* `[features.multi_agent_v2]` table for the same name are conflicting TOML).
|
|
4
|
+
* Historical behavior (openai/codex#26753): force `enabled = false` on every
|
|
5
|
+
* SessionStart because enabling V2 made every turn 400 with encrypted
|
|
6
|
+
* spawn_agent parameters on models that were not configured for encrypted
|
|
7
|
+
* tool use. OpenAI closed that as NOT_PLANNED (V2 under development).
|
|
10
8
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* GPT-5.6 models that declare `multi_agent_version: "v2"` in the Codex model
|
|
10
|
+
* catalog invert that failure mode: forcing `enabled = false` makes every
|
|
11
|
+
* turn 400 with a reserved `collaboration.spawn_agent` schema mismatch
|
|
12
|
+
* (lazycodex#118 / oh-my-openagent#6002 / openai/codex#31097), and
|
|
13
|
+
* `hide_spawn_agent_metadata = false` (written by OMO installers <= 4.15.x)
|
|
14
|
+
* mismatches the same reserved schema by re-adding agent_type/model
|
|
15
|
+
* properties to spawn_agent. For those models this guard clears the managed
|
|
16
|
+
* disable and the stale metadata override, leaving V2 unset so Codex can
|
|
17
|
+
* follow model metadata.
|
|
18
|
+
*
|
|
19
|
+
* When the selected model is unknown or declares V1, keep the #26753
|
|
20
|
+
* force-disable path.
|
|
21
|
+
*
|
|
22
|
+
* Opt out of the whole migration with LAZYCODEX_CONFIG_MIGRATION_DISABLED=1
|
|
23
|
+
* (or OMO_CODEX_CONFIG_MIGRATION_DISABLED=1).
|
|
17
24
|
*/
|
|
25
|
+
import { readFileSync } from "node:fs";
|
|
26
|
+
import { homedir } from "node:os";
|
|
27
|
+
import { join } from "node:path";
|
|
28
|
+
|
|
18
29
|
const MANAGED_COMMENT_MARKER = "openai/codex#26753";
|
|
19
30
|
const MANAGED_DISABLE_COMMENT = [
|
|
20
31
|
"# Managed by LazyCodex: multi_agent_v2 is re-disabled on every Codex session start",
|
|
@@ -23,26 +34,157 @@ const MANAGED_DISABLE_COMMENT = [
|
|
|
23
34
|
"",
|
|
24
35
|
].join("\n");
|
|
25
36
|
|
|
26
|
-
|
|
27
|
-
|
|
37
|
+
/**
|
|
38
|
+
* @param {string} config
|
|
39
|
+
* @param {{
|
|
40
|
+
* multiAgentVersion?: string | null,
|
|
41
|
+
* sessionModel?: string | null,
|
|
42
|
+
* requireSessionModel?: boolean,
|
|
43
|
+
* env?: NodeJS.ProcessEnv,
|
|
44
|
+
* modelsCachePath?: string,
|
|
45
|
+
* }} [options]
|
|
46
|
+
*/
|
|
47
|
+
export function forceDisableMultiAgentV2(config, options = {}) {
|
|
48
|
+
// Always normalize the legacy `[features]` boolean shorthand first: leaving
|
|
49
|
+
// `multi_agent_v2 = true|false` in place while a later guard appends the
|
|
50
|
+
// `[features.multi_agent_v2]` table would define the same name as both a
|
|
51
|
+
// scalar and a table, which Codex rejects as invalid TOML.
|
|
52
|
+
const normalized = removeFeaturesShorthand(config);
|
|
53
|
+
const sessionModel = normalizeModel(options.sessionModel);
|
|
54
|
+
const multiAgentVersion =
|
|
55
|
+
options.multiAgentVersion !== undefined
|
|
56
|
+
? options.multiAgentVersion
|
|
57
|
+
: resolveMultiAgentVersionFromConfig(normalized, options);
|
|
58
|
+
|
|
59
|
+
if (prefersMultiAgentV2(multiAgentVersion, sessionModel)) {
|
|
60
|
+
return clearMultiAgentV2DisableForReservedSchema(normalized);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// SessionStart can run with an override model (`codex -m gpt-5.6-terra`) while
|
|
64
|
+
// config.toml still lists a different default. If we cannot see the effective
|
|
65
|
+
// session model, do not force-disable — writing enabled=false would break a
|
|
66
|
+
// GPT-5.6 reserved collaboration.spawn_agent session.
|
|
67
|
+
if (options.requireSessionModel === true && !sessionModel) {
|
|
68
|
+
return normalized;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Unknown catalog entry for an explicit session model: skip force-disable
|
|
72
|
+
// rather than assume the legacy encrypted-V2 failure mode.
|
|
73
|
+
if (sessionModel && multiAgentVersion == null) {
|
|
74
|
+
return normalized;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return forceDisableLegacyEncryptedV2(normalized);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* True when the effective model should run MultiAgentV2: the catalog says
|
|
82
|
+
* "v2", or the catalog is unavailable but the model is a GPT-5.6 family
|
|
83
|
+
* model (which reserves the collaboration.spawn_agent schema).
|
|
84
|
+
* @param {"v1" | "v2" | null | undefined} multiAgentVersion
|
|
85
|
+
* @param {string | null | undefined} sessionModel
|
|
86
|
+
*/
|
|
87
|
+
export function prefersMultiAgentV2(multiAgentVersion, sessionModel) {
|
|
88
|
+
return multiAgentVersion === "v2" || (multiAgentVersion == null && isGpt56Family(normalizeModel(sessionModel)));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Resolve the effective model against Codex `models_cache.json`.
|
|
93
|
+
* Prefers SessionStart `model` over the root `model` in config.toml.
|
|
94
|
+
* @param {string} config
|
|
95
|
+
* @param {{ sessionModel?: string | null, env?: NodeJS.ProcessEnv, modelsCachePath?: string }} [options]
|
|
96
|
+
* @returns {"v1" | "v2" | null}
|
|
97
|
+
*/
|
|
98
|
+
export function resolveMultiAgentVersionFromConfig(config, options = {}) {
|
|
99
|
+
const model = normalizeModel(options.sessionModel) || readRootModel(config);
|
|
100
|
+
if (!model) return null;
|
|
101
|
+
return resolveMultiAgentVersionForModel(model, options);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param {string} model
|
|
106
|
+
* @param {{ env?: NodeJS.ProcessEnv, modelsCachePath?: string }} [options]
|
|
107
|
+
* @returns {"v1" | "v2" | null}
|
|
108
|
+
*/
|
|
109
|
+
export function resolveMultiAgentVersionForModel(model, options = {}) {
|
|
110
|
+
const cachePath =
|
|
111
|
+
options.modelsCachePath?.trim() ||
|
|
112
|
+
join(options.env?.CODEX_HOME?.trim() || join(homedir(), ".codex"), "models_cache.json");
|
|
113
|
+
|
|
114
|
+
try {
|
|
115
|
+
const cache = JSON.parse(readFileSync(cachePath, "utf8"));
|
|
116
|
+
const models = Array.isArray(cache?.models) ? cache.models : [];
|
|
117
|
+
const entry = models.find((item) => item?.slug === model || item?.id === model);
|
|
118
|
+
const version = entry?.multi_agent_version;
|
|
119
|
+
if (version === "v1" || version === "v2") return version;
|
|
120
|
+
return null;
|
|
121
|
+
} catch {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function readRootModel(config) {
|
|
127
|
+
const double = config.match(/^\s*model\s*=\s*"([^"]+)"/m);
|
|
128
|
+
if (double) return double[1];
|
|
129
|
+
const single = config.match(/^\s*model\s*=\s*'([^']+)'/m);
|
|
130
|
+
return single?.[1] ?? null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function normalizeModel(value) {
|
|
134
|
+
if (typeof value !== "string") return null;
|
|
135
|
+
const trimmed = value.trim();
|
|
136
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function isGpt56Family(model) {
|
|
140
|
+
return typeof model === "string" && /^gpt-5\.6\b/i.test(model);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function clearMultiAgentV2DisableForReservedSchema(config) {
|
|
144
|
+
// `config` arrives shorthand-normalized from forceDisableMultiAgentV2.
|
|
145
|
+
const result = removeManagedDisableComments(config);
|
|
146
|
+
|
|
28
147
|
const section = findSection(result, "[features.multi_agent_v2]");
|
|
148
|
+
if (!section) return result;
|
|
149
|
+
|
|
150
|
+
// Two settings poison the reserved collaboration.spawn_agent schema on V2
|
|
151
|
+
// models (verified against codex-cli 0.144.1 + gpt-5.6-sol):
|
|
152
|
+
// - `enabled = false` forces the legacy V1 tool surface on some Codex
|
|
153
|
+
// versions (#6002's failure shape);
|
|
154
|
+
// - `hide_spawn_agent_metadata = false` (written by OMO installers
|
|
155
|
+
// <= 4.15.x to expose agent_type) re-adds agent_type/model/... to
|
|
156
|
+
// spawn_agent, mismatching the reserved schema -> HTTP 400 every turn.
|
|
157
|
+
// Remove both; `hide_spawn_agent_metadata = true` matches the Codex
|
|
158
|
+
// default and is left alone.
|
|
159
|
+
const cleared = section.text
|
|
160
|
+
.replace(/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?\n?/gm, "")
|
|
161
|
+
.replace(/^\s*hide_spawn_agent_metadata\s*=\s*false[ \t]*(?:#[^\n]*)?\n?/gm, "");
|
|
162
|
+
if (cleared === section.text) return result;
|
|
163
|
+
return result.slice(0, section.start) + cleared + result.slice(section.end);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// `config` arrives shorthand-normalized from forceDisableMultiAgentV2.
|
|
167
|
+
function forceDisableLegacyEncryptedV2(config) {
|
|
168
|
+
const section = findSection(config, "[features.multi_agent_v2]");
|
|
29
169
|
|
|
30
170
|
if (!section) {
|
|
31
|
-
return ensureManagedComment(appendDisabledSection(
|
|
171
|
+
return ensureManagedComment(appendDisabledSection(config));
|
|
32
172
|
}
|
|
33
173
|
|
|
34
174
|
const enabledTruePattern = /^(\s*)enabled\s*=\s*true[ \t]*(#[^\n]*)?$/m;
|
|
35
175
|
if (enabledTruePattern.test(section.text)) {
|
|
36
|
-
const patched = section.text.replace(enabledTruePattern, (_match, indent, comment) =>
|
|
37
|
-
|
|
176
|
+
const patched = section.text.replace(enabledTruePattern, (_match, indent, comment) =>
|
|
177
|
+
comment ? `${indent}enabled = false ${comment}` : `${indent}enabled = false`,
|
|
178
|
+
);
|
|
179
|
+
return ensureManagedComment(config.slice(0, section.start) + patched + config.slice(section.end));
|
|
38
180
|
}
|
|
39
181
|
|
|
40
|
-
if (/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?$/m.test(section.text)) return
|
|
182
|
+
if (/^\s*enabled\s*=\s*false[ \t]*(?:#[^\n]*)?$/m.test(section.text)) return config;
|
|
41
183
|
|
|
42
184
|
const headerEnd = section.text.indexOf("\n");
|
|
43
185
|
const insertAt = headerEnd === -1 ? section.text.length : headerEnd + 1;
|
|
44
186
|
const patched = `${section.text.slice(0, insertAt)}${headerEnd === -1 ? "\n" : ""}enabled = false\n${section.text.slice(insertAt)}`;
|
|
45
|
-
return ensureManagedComment(
|
|
187
|
+
return ensureManagedComment(config.slice(0, section.start) + patched + config.slice(section.end));
|
|
46
188
|
}
|
|
47
189
|
|
|
48
190
|
function ensureManagedComment(config) {
|
|
@@ -52,6 +194,30 @@ function ensureManagedComment(config) {
|
|
|
52
194
|
return config.slice(0, section.start) + MANAGED_DISABLE_COMMENT + config.slice(section.start);
|
|
53
195
|
}
|
|
54
196
|
|
|
197
|
+
function removeManagedDisableComments(config) {
|
|
198
|
+
if (!config.includes(MANAGED_COMMENT_MARKER) && !config.includes("Managed by LazyCodex: multi_agent_v2")) {
|
|
199
|
+
return config;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
const lines = config.split("\n");
|
|
203
|
+
const kept = [];
|
|
204
|
+
for (const line of lines) {
|
|
205
|
+
const trimmed = line.trim();
|
|
206
|
+
if (
|
|
207
|
+
trimmed.startsWith("#") &&
|
|
208
|
+
(trimmed.includes(MANAGED_COMMENT_MARKER) ||
|
|
209
|
+
trimmed.includes("Managed by LazyCodex: multi_agent_v2") ||
|
|
210
|
+
trimmed.includes("because enabling it fails every turn with HTTP 400") ||
|
|
211
|
+
trimmed.includes("LAZYCODEX_CONFIG_MIGRATION_DISABLED=1") ||
|
|
212
|
+
trimmed.includes("OMO_CODEX_CONFIG_MIGRATION_DISABLED=1"))
|
|
213
|
+
) {
|
|
214
|
+
continue;
|
|
215
|
+
}
|
|
216
|
+
kept.push(line);
|
|
217
|
+
}
|
|
218
|
+
return kept.join("\n").replace(/\n{3,}/g, "\n\n");
|
|
219
|
+
}
|
|
220
|
+
|
|
55
221
|
function removeFeaturesShorthand(config) {
|
|
56
222
|
const section = findSection(config, "[features]");
|
|
57
223
|
if (!section) return config;
|