lazycodex-ai 5.1.2 → 5.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +233 -81
- package/dist/cli-node/index.js +233 -81
- package/package.json +1 -1
- package/packages/lsp-daemon/dist/cli.js +2 -1
- package/packages/lsp-daemon/dist/client.js +2 -1
- package/packages/lsp-daemon/dist/index.js +2 -1
- package/packages/lsp-tools-mcp/dist/cli.js +2 -1
- package/packages/lsp-tools-mcp/dist/mcp.js +2 -1
- package/packages/lsp-tools-mcp/dist/tools.js +2 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/dist/cli.js +33 -7
- 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/comment-checker/src/runner.ts +4 -4
- 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 +4 -4
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +141 -107
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +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/lsp/src/lsp-session-state.ts +2 -2
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- 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/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/browser/runtime/omowright/manifest.json +1 -1
package/dist/cli-node/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var package_default;
|
|
|
65
65
|
var init_package = __esm(() => {
|
|
66
66
|
package_default = {
|
|
67
67
|
name: "oh-my-opencode",
|
|
68
|
-
version: "5.1.
|
|
68
|
+
version: "5.1.4",
|
|
69
69
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
70
70
|
main: "./dist/index.js",
|
|
71
71
|
types: "dist/index.d.ts",
|
|
@@ -242,7 +242,7 @@ var init_package = __esm(() => {
|
|
|
242
242
|
},
|
|
243
243
|
devDependencies: {
|
|
244
244
|
"@clack/prompts": "^1.8.1",
|
|
245
|
-
"@code-yeongyu/senpi": "2026.9.29-
|
|
245
|
+
"@code-yeongyu/senpi": "2026.9.29-5",
|
|
246
246
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
247
247
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
248
248
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
@@ -300,18 +300,18 @@ var init_package = __esm(() => {
|
|
|
300
300
|
typescript: "^7.0.2"
|
|
301
301
|
},
|
|
302
302
|
optionalDependencies: {
|
|
303
|
-
"oh-my-opencode-darwin-arm64": "5.1.
|
|
304
|
-
"oh-my-opencode-darwin-x64": "5.1.
|
|
305
|
-
"oh-my-opencode-darwin-x64-baseline": "5.1.
|
|
306
|
-
"oh-my-opencode-linux-arm64": "5.1.
|
|
307
|
-
"oh-my-opencode-linux-arm64-musl": "5.1.
|
|
308
|
-
"oh-my-opencode-linux-x64": "5.1.
|
|
309
|
-
"oh-my-opencode-linux-x64-baseline": "5.1.
|
|
310
|
-
"oh-my-opencode-linux-x64-musl": "5.1.
|
|
311
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.1.
|
|
312
|
-
"oh-my-opencode-windows-arm64": "5.1.
|
|
313
|
-
"oh-my-opencode-windows-x64": "5.1.
|
|
314
|
-
"oh-my-opencode-windows-x64-baseline": "5.1.
|
|
303
|
+
"oh-my-opencode-darwin-arm64": "5.1.4",
|
|
304
|
+
"oh-my-opencode-darwin-x64": "5.1.4",
|
|
305
|
+
"oh-my-opencode-darwin-x64-baseline": "5.1.4",
|
|
306
|
+
"oh-my-opencode-linux-arm64": "5.1.4",
|
|
307
|
+
"oh-my-opencode-linux-arm64-musl": "5.1.4",
|
|
308
|
+
"oh-my-opencode-linux-x64": "5.1.4",
|
|
309
|
+
"oh-my-opencode-linux-x64-baseline": "5.1.4",
|
|
310
|
+
"oh-my-opencode-linux-x64-musl": "5.1.4",
|
|
311
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.1.4",
|
|
312
|
+
"oh-my-opencode-windows-arm64": "5.1.4",
|
|
313
|
+
"oh-my-opencode-windows-x64": "5.1.4",
|
|
314
|
+
"oh-my-opencode-windows-x64-baseline": "5.1.4"
|
|
315
315
|
},
|
|
316
316
|
overrides: {
|
|
317
317
|
hono: "^4.13.8",
|
|
@@ -7393,6 +7393,8 @@ var init_category_model_requirements = __esm(() => {
|
|
|
7393
7393
|
},
|
|
7394
7394
|
"deep-low": {
|
|
7395
7395
|
fallbackChain: [
|
|
7396
|
+
{ providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol", variant: "medium" },
|
|
7397
|
+
{ providers: ["openai", "chatgpt-subscription"], model: "gpt-6.1-sol-fast", variant: "medium" },
|
|
7396
7398
|
{
|
|
7397
7399
|
providers: ["openai", "chatgpt-subscription", "github-copilot", "opencode"],
|
|
7398
7400
|
model: "gpt-5.6-sol",
|
|
@@ -7445,7 +7447,9 @@ var init_category_model_requirements = __esm(() => {
|
|
|
7445
7447
|
providers: ["anthropic", "anthropic-api", "github-copilot"],
|
|
7446
7448
|
model: "claude-haiku-4-5",
|
|
7447
7449
|
variant: "off"
|
|
7448
|
-
}
|
|
7450
|
+
},
|
|
7451
|
+
{ providers: ["zai-coding-plan"], model: "glm-5.3-flash", variant: "low" },
|
|
7452
|
+
{ providers: ["xiaomi"], model: "mimo-v2.6-flash", variant: "low" }
|
|
7449
7453
|
]
|
|
7450
7454
|
},
|
|
7451
7455
|
"unspecified-low": {
|
|
@@ -7610,7 +7614,7 @@ var init_model_capability_aliases = __esm(() => {
|
|
|
7610
7614
|
description: "Normalizes OpenCode's OpenAI GPT fast service-tier IDs to canonical snapshot IDs.",
|
|
7611
7615
|
providerIDs: ["openai"],
|
|
7612
7616
|
allowedSubproviderHosts: ["vercel"],
|
|
7613
|
-
match: (normalizedModelID) => /^(?:gpt-5\.6-(?:sol|terra|luna)|gpt-6-(?:astra|sol|luna))-fast$/.test(normalizedModelID),
|
|
7617
|
+
match: (normalizedModelID) => /^(?:gpt-5\.6-(?:sol|terra|luna)|gpt-6-(?:astra|sol|luna)|gpt-6\.1-sol)-fast$/.test(normalizedModelID),
|
|
7614
7618
|
canonicalize: (normalizedModelID) => normalizedModelID.slice(0, -"-fast".length)
|
|
7615
7619
|
},
|
|
7616
7620
|
{
|
|
@@ -7758,6 +7762,14 @@ var init_model_capability_heuristics = __esm(() => {
|
|
|
7758
7762
|
reasoningEffortAliases: { none: "low", minimal: "low" },
|
|
7759
7763
|
supportsTemperature: false
|
|
7760
7764
|
},
|
|
7765
|
+
{
|
|
7766
|
+
family: "gpt-6.1-sol",
|
|
7767
|
+
pattern: /gpt-6-1-sol/,
|
|
7768
|
+
variants: ["low", "medium", "high", "xhigh", "max"],
|
|
7769
|
+
reasoningEfforts: ["low", "medium", "high", "xhigh", "max"],
|
|
7770
|
+
reasoningEffortAliases: { none: "low", minimal: "low" },
|
|
7771
|
+
supportsTemperature: false
|
|
7772
|
+
},
|
|
7761
7773
|
{
|
|
7762
7774
|
family: "gpt-6",
|
|
7763
7775
|
includes: ["gpt-6"],
|
|
@@ -8189,6 +8201,36 @@ var init_supplemental_entries = __esm(() => {
|
|
|
8189
8201
|
output: 128000
|
|
8190
8202
|
}
|
|
8191
8203
|
},
|
|
8204
|
+
"gpt-6.1-sol": {
|
|
8205
|
+
id: "gpt-6.1-sol",
|
|
8206
|
+
family: "gpt",
|
|
8207
|
+
reasoning: true,
|
|
8208
|
+
temperature: false,
|
|
8209
|
+
toolCall: true,
|
|
8210
|
+
modalities: {
|
|
8211
|
+
input: ["text", "image"],
|
|
8212
|
+
output: ["text"]
|
|
8213
|
+
},
|
|
8214
|
+
limit: {
|
|
8215
|
+
context: 400000,
|
|
8216
|
+
output: 128000
|
|
8217
|
+
}
|
|
8218
|
+
},
|
|
8219
|
+
"gpt-6.1-sol-fast": {
|
|
8220
|
+
id: "gpt-6.1-sol-fast",
|
|
8221
|
+
family: "gpt",
|
|
8222
|
+
reasoning: true,
|
|
8223
|
+
temperature: false,
|
|
8224
|
+
toolCall: true,
|
|
8225
|
+
modalities: {
|
|
8226
|
+
input: ["text", "image"],
|
|
8227
|
+
output: ["text"]
|
|
8228
|
+
},
|
|
8229
|
+
limit: {
|
|
8230
|
+
context: 400000,
|
|
8231
|
+
output: 128000
|
|
8232
|
+
}
|
|
8233
|
+
},
|
|
8192
8234
|
"gpt-6-luna": {
|
|
8193
8235
|
id: "gpt-6-luna",
|
|
8194
8236
|
family: "gpt-nano",
|
|
@@ -9455,7 +9497,7 @@ You are working on tasks that don't fit specific categories but require substant
|
|
|
9455
9497
|
</Category_Context>`, UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`, DEEP_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here when one subsystem plus its callers holds the mechanism and the evidence, once read, leaves one right answer. Wide but mechanical work belongs here or in a quick batch. When unsure, choose deep-low: a misrouted child returns \`ESCALATE: deep-high\` after one cheap attempt; re-spawn the same brief as deep-high with its findings.</Selection_Gate>`, DEEP_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Route here only when you can name the decision evidence cannot settle: a trade-off with no single right answer, a contract change crossing a package or process boundary, a mechanism with no in-repo pattern to copy, or correctness argued from invariants rather than observed in a test. Wide scope with easy decisions is deep-low or unspecified-high; reasoning as the deliverable is ultrabrain.</Selection_Gate>`, DEEP_LOW_GATE_MODELS, DEEP_HIGH_GATE_MODEL = "gpt-6-astra", OPENAI_CATEGORIES;
|
|
9456
9498
|
var init_openai_categories = __esm(() => {
|
|
9457
9499
|
init_types();
|
|
9458
|
-
DEEP_LOW_GATE_MODELS = ["gpt-5.6-sol-fast", "gpt-5.6-sol"];
|
|
9500
|
+
DEEP_LOW_GATE_MODELS = ["gpt-6.1-sol", "gpt-6.1-sol-fast", "gpt-5.6-sol-fast", "gpt-5.6-sol"];
|
|
9459
9501
|
OPENAI_CATEGORIES = [
|
|
9460
9502
|
{
|
|
9461
9503
|
name: "ultrabrain",
|
|
@@ -9466,7 +9508,7 @@ var init_openai_categories = __esm(() => {
|
|
|
9466
9508
|
},
|
|
9467
9509
|
{
|
|
9468
9510
|
name: "deep-low",
|
|
9469
|
-
config: { model: "openai/gpt-
|
|
9511
|
+
config: { model: "openai/gpt-6.1-sol", variant: "medium" },
|
|
9470
9512
|
description: "Default deep lane: one goal, one deliverable, decisions the child can settle from what it reads. **3D graphics, computer/browser use, CAPTCHA, multimodal, backend, logic, and algorithm work is routed here.** Multiple goals fan out as parallel calls.",
|
|
9471
9513
|
callerGuidance: DEEP_LOW_CATEGORY_CALLER_GUIDANCE,
|
|
9472
9514
|
promptAppend: DEEP_LOW_CATEGORY_PROMPT_APPEND,
|
|
@@ -64780,6 +64822,94 @@ var init_model_capabilities_generated = __esm(() => {
|
|
|
64780
64822
|
context: 1e6,
|
|
64781
64823
|
output: 128000
|
|
64782
64824
|
}
|
|
64825
|
+
},
|
|
64826
|
+
"glm-5.3-flash": {
|
|
64827
|
+
id: "glm-5.3-flash",
|
|
64828
|
+
family: "glm-flash",
|
|
64829
|
+
reasoning: true,
|
|
64830
|
+
temperature: true,
|
|
64831
|
+
toolCall: true,
|
|
64832
|
+
modalities: {
|
|
64833
|
+
input: [
|
|
64834
|
+
"text",
|
|
64835
|
+
"image",
|
|
64836
|
+
"video"
|
|
64837
|
+
],
|
|
64838
|
+
output: [
|
|
64839
|
+
"text"
|
|
64840
|
+
]
|
|
64841
|
+
},
|
|
64842
|
+
limit: {
|
|
64843
|
+
context: 1048576,
|
|
64844
|
+
output: 1048576
|
|
64845
|
+
}
|
|
64846
|
+
},
|
|
64847
|
+
"zai/glm-5.3-flash": {
|
|
64848
|
+
id: "zai/glm-5.3-flash",
|
|
64849
|
+
family: "glm-flash",
|
|
64850
|
+
reasoning: true,
|
|
64851
|
+
temperature: true,
|
|
64852
|
+
toolCall: true,
|
|
64853
|
+
modalities: {
|
|
64854
|
+
input: [
|
|
64855
|
+
"text",
|
|
64856
|
+
"image",
|
|
64857
|
+
"video",
|
|
64858
|
+
"pdf"
|
|
64859
|
+
],
|
|
64860
|
+
output: [
|
|
64861
|
+
"text"
|
|
64862
|
+
]
|
|
64863
|
+
},
|
|
64864
|
+
limit: {
|
|
64865
|
+
context: 1e6,
|
|
64866
|
+
output: 131072
|
|
64867
|
+
}
|
|
64868
|
+
},
|
|
64869
|
+
"mimo-v2.6-flash": {
|
|
64870
|
+
id: "mimo-v2.6-flash",
|
|
64871
|
+
family: "mimo",
|
|
64872
|
+
reasoning: true,
|
|
64873
|
+
temperature: true,
|
|
64874
|
+
toolCall: true,
|
|
64875
|
+
modalities: {
|
|
64876
|
+
input: [
|
|
64877
|
+
"text",
|
|
64878
|
+
"image",
|
|
64879
|
+
"audio",
|
|
64880
|
+
"video"
|
|
64881
|
+
],
|
|
64882
|
+
output: [
|
|
64883
|
+
"text"
|
|
64884
|
+
]
|
|
64885
|
+
},
|
|
64886
|
+
limit: {
|
|
64887
|
+
context: 1048576,
|
|
64888
|
+
output: 131072
|
|
64889
|
+
}
|
|
64890
|
+
},
|
|
64891
|
+
"xiaomi/mimo-v2.6-flash": {
|
|
64892
|
+
id: "xiaomi/mimo-v2.6-flash",
|
|
64893
|
+
family: "mimo",
|
|
64894
|
+
reasoning: true,
|
|
64895
|
+
temperature: true,
|
|
64896
|
+
toolCall: true,
|
|
64897
|
+
modalities: {
|
|
64898
|
+
input: [
|
|
64899
|
+
"text",
|
|
64900
|
+
"image",
|
|
64901
|
+
"audio",
|
|
64902
|
+
"video"
|
|
64903
|
+
],
|
|
64904
|
+
output: [
|
|
64905
|
+
"text"
|
|
64906
|
+
]
|
|
64907
|
+
},
|
|
64908
|
+
limit: {
|
|
64909
|
+
context: 1048576,
|
|
64910
|
+
input: 1048576,
|
|
64911
|
+
output: 131072
|
|
64912
|
+
}
|
|
64783
64913
|
}
|
|
64784
64914
|
}
|
|
64785
64915
|
};
|
|
@@ -89099,7 +89229,7 @@ var package_default2;
|
|
|
89099
89229
|
var init_package2 = __esm(() => {
|
|
89100
89230
|
package_default2 = {
|
|
89101
89231
|
name: "@oh-my-opencode/omo-codex",
|
|
89102
|
-
version: "5.1.
|
|
89232
|
+
version: "5.1.4",
|
|
89103
89233
|
type: "module",
|
|
89104
89234
|
private: true,
|
|
89105
89235
|
description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
|
|
@@ -106532,15 +106662,10 @@ async function checkDeprecatedReasoningKeys() {
|
|
|
106532
106662
|
}
|
|
106533
106663
|
|
|
106534
106664
|
// packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
|
|
106535
|
-
init_src();
|
|
106536
106665
|
import { existsSync as existsSync55 } from "node:fs";
|
|
106537
|
-
import { createRequire as
|
|
106666
|
+
import { createRequire as createRequire4 } from "node:module";
|
|
106538
106667
|
import { homedir as homedir20 } from "node:os";
|
|
106539
|
-
import {
|
|
106540
|
-
|
|
106541
|
-
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
106542
|
-
import { join as join87 } from "path";
|
|
106543
|
-
import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
|
|
106668
|
+
import { join as join89 } from "node:path";
|
|
106544
106669
|
// packages/comment-checker-core/src/release.ts
|
|
106545
106670
|
import { join as join85 } from "node:path";
|
|
106546
106671
|
var COMMENT_CHECKER_RELEASE_VERSION = "0.8.0";
|
|
@@ -106567,12 +106692,45 @@ function isCachedCommentCheckerCurrent(cacheDir, readFile = (path) => readFileSy
|
|
|
106567
106692
|
return false;
|
|
106568
106693
|
}
|
|
106569
106694
|
}
|
|
106695
|
+
// packages/comment-checker-core/src/package-binary.ts
|
|
106696
|
+
import { createRequire as createRequire3 } from "node:module";
|
|
106697
|
+
import { dirname as dirname33, join as join87 } from "node:path";
|
|
106698
|
+
var COMMENT_CHECKER_PACKAGE_NAME = "@code-yeongyu/comment-checker";
|
|
106699
|
+
function isModuleResolutionMiss(error) {
|
|
106700
|
+
return error instanceof Error || typeof error === "object" && error !== null && "name" in error && error.name === "ResolveMessage";
|
|
106701
|
+
}
|
|
106702
|
+
function findCommentCheckerPackageBinary(input) {
|
|
106703
|
+
const packageName = input.packageName ?? COMMENT_CHECKER_PACKAGE_NAME;
|
|
106704
|
+
const platformKey = `${input.platform ?? process.platform}-${input.arch ?? process.arch}`;
|
|
106705
|
+
const packageDir = dirname33(input.packageJsonPath);
|
|
106706
|
+
const candidates = [
|
|
106707
|
+
resolvePlatformPackageBinary(input.packageJsonPath, `${packageName}-${platformKey}`, input.binaryName),
|
|
106708
|
+
join87(packageDir, "vendor", platformKey, input.binaryName),
|
|
106709
|
+
join87(packageDir, "bin", input.binaryName)
|
|
106710
|
+
];
|
|
106711
|
+
return candidates.find((candidate) => candidate !== null && input.existsSync(candidate)) ?? null;
|
|
106712
|
+
}
|
|
106713
|
+
function resolvePlatformPackageBinary(packageJsonPath, platformPackageName, binaryName) {
|
|
106714
|
+
try {
|
|
106715
|
+
const manifestPath = createRequire3(packageJsonPath).resolve(`${platformPackageName}/package.json`);
|
|
106716
|
+
return join87(dirname33(manifestPath), "bin", binaryName);
|
|
106717
|
+
} catch (error) {
|
|
106718
|
+
if (isModuleResolutionMiss(error))
|
|
106719
|
+
return null;
|
|
106720
|
+
throw error;
|
|
106721
|
+
}
|
|
106722
|
+
}
|
|
106723
|
+
// packages/omo-opencode/src/cli/doctor/checks/dependencies.ts
|
|
106724
|
+
init_src();
|
|
106725
|
+
|
|
106570
106726
|
// packages/omo-opencode/src/hooks/comment-checker/downloader.ts
|
|
106727
|
+
import { join as join88 } from "path";
|
|
106728
|
+
import { homedir as homedir19, tmpdir as tmpdir4 } from "os";
|
|
106571
106729
|
init_binary_downloader();
|
|
106572
106730
|
init_logger2();
|
|
106573
106731
|
init_plugin_identity();
|
|
106574
106732
|
var DEBUG = process.env.COMMENT_CHECKER_DEBUG === "1";
|
|
106575
|
-
var DEBUG_FILE =
|
|
106733
|
+
var DEBUG_FILE = join88(tmpdir4(), "comment-checker-debug.log");
|
|
106576
106734
|
function getCacheDir2() {
|
|
106577
106735
|
return commentCheckerCacheDir({
|
|
106578
106736
|
platform: process.platform,
|
|
@@ -106631,7 +106789,7 @@ async function getBinaryVersion(binary) {
|
|
|
106631
106789
|
}
|
|
106632
106790
|
}
|
|
106633
106791
|
async function checkAstGrepCli() {
|
|
106634
|
-
const runtimeDir = astGrepRuntimeDir(
|
|
106792
|
+
const runtimeDir = astGrepRuntimeDir(join89(homedir20(), ".omo"));
|
|
106635
106793
|
const sgPath = findSgBinarySync({ runtimeDir });
|
|
106636
106794
|
if (sgPath === null) {
|
|
106637
106795
|
return {
|
|
@@ -106653,20 +106811,14 @@ async function checkAstGrepCli() {
|
|
|
106653
106811
|
};
|
|
106654
106812
|
}
|
|
106655
106813
|
function resolveCommentCheckerPackageJson() {
|
|
106656
|
-
const require2 =
|
|
106814
|
+
const require2 = createRequire4(import.meta.url);
|
|
106657
106815
|
return require2.resolve("@code-yeongyu/comment-checker/package.json");
|
|
106658
106816
|
}
|
|
106659
|
-
function
|
|
106817
|
+
function findCommentCheckerPackageBinary2(baseDirOverride, resolvePackageJsonPath = resolveCommentCheckerPackageJson) {
|
|
106660
106818
|
const binaryName = process.platform === "win32" ? "comment-checker.exe" : "comment-checker";
|
|
106661
|
-
const platformKey = `${process.platform}-${process.arch === "x64" ? "x64" : process.arch}`;
|
|
106662
106819
|
try {
|
|
106663
|
-
const
|
|
106664
|
-
|
|
106665
|
-
if (existsSync55(vendorPath))
|
|
106666
|
-
return vendorPath;
|
|
106667
|
-
const binPath = join88(packageDir, "bin", binaryName);
|
|
106668
|
-
if (existsSync55(binPath))
|
|
106669
|
-
return binPath;
|
|
106820
|
+
const packageJsonPath = baseDirOverride === undefined ? resolvePackageJsonPath() : join89(baseDirOverride, "package.json");
|
|
106821
|
+
return findCommentCheckerPackageBinary({ packageJsonPath, binaryName, existsSync: existsSync55 });
|
|
106670
106822
|
} catch (error) {
|
|
106671
106823
|
if (!(error instanceof Error) && !isModuleResolutionFailure(error))
|
|
106672
106824
|
throw error;
|
|
@@ -106686,7 +106838,7 @@ async function checkCommentChecker() {
|
|
|
106686
106838
|
};
|
|
106687
106839
|
}
|
|
106688
106840
|
const binaryCheck = await checkBinaryExists("comment-checker");
|
|
106689
|
-
const resolvedPath = binaryCheck.exists ? binaryCheck.path :
|
|
106841
|
+
const resolvedPath = binaryCheck.exists ? binaryCheck.path : findCommentCheckerPackageBinary2();
|
|
106690
106842
|
if (!resolvedPath) {
|
|
106691
106843
|
return {
|
|
106692
106844
|
name: "Comment Checker",
|
|
@@ -106812,7 +106964,7 @@ async function getGhCliInfo(dependencies = {}) {
|
|
|
106812
106964
|
init_zod();
|
|
106813
106965
|
init_opencode_config_dir();
|
|
106814
106966
|
import { existsSync as existsSync56, readFileSync as readFileSync38 } from "node:fs";
|
|
106815
|
-
import { delimiter as delimiter3, dirname as
|
|
106967
|
+
import { delimiter as delimiter3, dirname as dirname35, resolve as resolve23 } from "node:path";
|
|
106816
106968
|
import { fileURLToPath as fileURLToPath7 } from "node:url";
|
|
106817
106969
|
|
|
106818
106970
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
@@ -106943,7 +107095,7 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
106943
107095
|
].join(";");
|
|
106944
107096
|
function getModuleDirectory(moduleUrl) {
|
|
106945
107097
|
try {
|
|
106946
|
-
return
|
|
107098
|
+
return dirname35(fileURLToPath7(moduleUrl));
|
|
106947
107099
|
} catch (error) {
|
|
106948
107100
|
if (!(error instanceof Error))
|
|
106949
107101
|
throw error;
|
|
@@ -107040,13 +107192,13 @@ function getInstalledLspServers(options = {}) {
|
|
|
107040
107192
|
init_shared();
|
|
107041
107193
|
import { existsSync as existsSync57, readFileSync as readFileSync39 } from "node:fs";
|
|
107042
107194
|
import { homedir as homedir21 } from "node:os";
|
|
107043
|
-
import { join as
|
|
107195
|
+
import { join as join90 } from "node:path";
|
|
107044
107196
|
var BUILTIN_MCP_SERVERS = ["websearch", "context7", "grep_app", "lsp"];
|
|
107045
107197
|
function getMcpConfigPaths() {
|
|
107046
107198
|
return [
|
|
107047
|
-
|
|
107048
|
-
|
|
107049
|
-
|
|
107199
|
+
join90(homedir21(), ".claude", ".mcp.json"),
|
|
107200
|
+
join90(process.cwd(), ".mcp.json"),
|
|
107201
|
+
join90(process.cwd(), ".claude", ".mcp.json")
|
|
107050
107202
|
];
|
|
107051
107203
|
}
|
|
107052
107204
|
function loadUserMcpConfig() {
|
|
@@ -107328,7 +107480,7 @@ init_src();
|
|
|
107328
107480
|
import { existsSync as existsSync59 } from "node:fs";
|
|
107329
107481
|
import { lstat as lstat16, readdir as readdir14, readFile as readFile30 } from "node:fs/promises";
|
|
107330
107482
|
import { homedir as homedir23 } from "node:os";
|
|
107331
|
-
import { basename as basename12, join as
|
|
107483
|
+
import { basename as basename12, join as join91, resolve as resolve24 } from "node:path";
|
|
107332
107484
|
// packages/omo-opencode/package.json
|
|
107333
107485
|
var package_default3 = {
|
|
107334
107486
|
name: "@oh-my-opencode/omo-opencode",
|
|
@@ -107397,13 +107549,13 @@ var CODEX_BIN_NAMES = [
|
|
|
107397
107549
|
"omo-git-bash-hook"
|
|
107398
107550
|
];
|
|
107399
107551
|
async function gatherCodexSummary(deps = {}) {
|
|
107400
|
-
const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
107552
|
+
const codexHome = resolve24(deps.codexHome ?? process.env.CODEX_HOME ?? join91(homedir23(), ".codex"));
|
|
107401
107553
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
107402
107554
|
const detection = await (deps.detectCodexInstallation ?? detectCodexInstallation)();
|
|
107403
107555
|
const pluginRoot = await resolveInstalledPluginRoot(codexHome);
|
|
107404
|
-
const manifest = pluginRoot === null ? null : await readJson(
|
|
107405
|
-
const installSnapshot = pluginRoot === null ? null : await readJson(
|
|
107406
|
-
const configPath =
|
|
107556
|
+
const manifest = pluginRoot === null ? null : await readJson(join91(pluginRoot, ".codex-plugin", "plugin.json"));
|
|
107557
|
+
const installSnapshot = pluginRoot === null ? null : await readJson(join91(pluginRoot, "lazycodex-install.json"));
|
|
107558
|
+
const configPath = join91(codexHome, "config.toml");
|
|
107407
107559
|
const pluginVersion = stringField(manifest, "version");
|
|
107408
107560
|
return {
|
|
107409
107561
|
codexPath: detection.found && "path" in detection ? detection.path : null,
|
|
@@ -107460,7 +107612,7 @@ function buildCodexIssues(summary) {
|
|
|
107460
107612
|
if (summary.pluginRoot === null) {
|
|
107461
107613
|
issues.push({
|
|
107462
107614
|
title: "OMO Codex plugin is not installed",
|
|
107463
|
-
description: `Expected cached plugin at ${
|
|
107615
|
+
description: `Expected cached plugin at ${join91("plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2, DEFAULT_PLUGIN_VERSION)} under CODEX_HOME.`,
|
|
107464
107616
|
fix: "Run: npx lazycodex-ai install",
|
|
107465
107617
|
severity: "error",
|
|
107466
107618
|
affects: ["plugin loading"]
|
|
@@ -107525,12 +107677,12 @@ function buildCodexIssues(summary) {
|
|
|
107525
107677
|
return issues;
|
|
107526
107678
|
}
|
|
107527
107679
|
async function resolveInstalledPluginRoot(codexHome) {
|
|
107528
|
-
const pluginRoot =
|
|
107680
|
+
const pluginRoot = join91(codexHome, "plugins", "cache", MARKETPLACE_NAME, PLUGIN_NAME2);
|
|
107529
107681
|
if (!existsSync59(pluginRoot))
|
|
107530
107682
|
return null;
|
|
107531
107683
|
const versions = await readdir14(pluginRoot, { withFileTypes: true });
|
|
107532
107684
|
const candidates = versions.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareVersionsDescending);
|
|
107533
|
-
return candidates.length === 0 ? null :
|
|
107685
|
+
return candidates.length === 0 ? null : join91(pluginRoot, candidates[0] ?? DEFAULT_PLUGIN_VERSION);
|
|
107534
107686
|
}
|
|
107535
107687
|
async function readCodexConfigSummary(configPath) {
|
|
107536
107688
|
if (!existsSync59(configPath)) {
|
|
@@ -107558,13 +107710,13 @@ async function readCodexConfigSummary(configPath) {
|
|
|
107558
107710
|
async function readLinkedBins(binDir) {
|
|
107559
107711
|
const linked = [];
|
|
107560
107712
|
for (const name of CODEX_BIN_NAMES) {
|
|
107561
|
-
if (await pathExists3(
|
|
107713
|
+
if (await pathExists3(join91(binDir, process.platform === "win32" ? `${name}.cmd` : name)))
|
|
107562
107714
|
linked.push(name);
|
|
107563
107715
|
}
|
|
107564
107716
|
return linked;
|
|
107565
107717
|
}
|
|
107566
107718
|
async function readLinkedAgents(codexHome) {
|
|
107567
|
-
const agentsDir =
|
|
107719
|
+
const agentsDir = join91(codexHome, "agents");
|
|
107568
107720
|
if (!existsSync59(agentsDir))
|
|
107569
107721
|
return [];
|
|
107570
107722
|
const entries = await readdir14(agentsDir, { withFileTypes: true });
|
|
@@ -107698,7 +107850,7 @@ function resolveLatestVersion(input) {
|
|
|
107698
107850
|
init_src();
|
|
107699
107851
|
import { readdir as readdir15, readFile as readFile31, stat as stat7 } from "node:fs/promises";
|
|
107700
107852
|
import { homedir as homedir24 } from "node:os";
|
|
107701
|
-
import { dirname as
|
|
107853
|
+
import { dirname as dirname36, isAbsolute as isAbsolute14, join as join92, relative as relative9, resolve as resolve25, sep as sep9 } from "node:path";
|
|
107702
107854
|
var CODEX_COMPONENTS_CHECK_ID = "codex-components";
|
|
107703
107855
|
var CODEX_COMPONENTS_CHECK_NAME = "codex-components";
|
|
107704
107856
|
var PLUGIN_DATA_DIR_NAME = "omo-sisyphuslabs";
|
|
@@ -107708,7 +107860,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
107708
107860
|
const env = deps.env ?? process.env;
|
|
107709
107861
|
const platform = deps.platform ?? process.platform;
|
|
107710
107862
|
const arch = deps.arch ?? process.arch;
|
|
107711
|
-
const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ??
|
|
107863
|
+
const codexHome = resolve25(deps.codexHome ?? env["CODEX_HOME"] ?? join92(homedir24(), ".codex"));
|
|
107712
107864
|
const summary = await gatherCodexSummary({ ...deps, codexHome });
|
|
107713
107865
|
if (summary.pluginRoot === null) {
|
|
107714
107866
|
return {
|
|
@@ -107733,7 +107885,7 @@ async function checkCodexComponents(deps = {}) {
|
|
|
107733
107885
|
});
|
|
107734
107886
|
}
|
|
107735
107887
|
const runtimeSgDir = runtimeSgDirectory(codexHome, platform, arch);
|
|
107736
|
-
const runtimeSgPath =
|
|
107888
|
+
const runtimeSgPath = join92(runtimeSgDir, sgBinaryName(platform));
|
|
107737
107889
|
const sg = findSgBinarySync({
|
|
107738
107890
|
arch,
|
|
107739
107891
|
env,
|
|
@@ -107772,7 +107924,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
107772
107924
|
const manifest = await readJson2(manifestPath);
|
|
107773
107925
|
if (manifest === null || !isRecord18(manifest["mcpServers"]))
|
|
107774
107926
|
continue;
|
|
107775
|
-
const manifestRoot =
|
|
107927
|
+
const manifestRoot = dirname36(manifestPath);
|
|
107776
107928
|
const isRootManifest = resolve25(manifestRoot) === resolve25(pluginRoot);
|
|
107777
107929
|
for (const server of Object.values(manifest["mcpServers"])) {
|
|
107778
107930
|
if (!isRecord18(server) || !Array.isArray(server["args"]))
|
|
@@ -107793,7 +107945,7 @@ async function auditBundleTargets(pluginRoot) {
|
|
|
107793
107945
|
continue;
|
|
107794
107946
|
const commands = [];
|
|
107795
107947
|
collectHookCommands(manifest, commands);
|
|
107796
|
-
const hookPluginRoot =
|
|
107948
|
+
const hookPluginRoot = dirname36(dirname36(hookManifestPath));
|
|
107797
107949
|
for (const command of commands) {
|
|
107798
107950
|
for (const relativePath of extractPluginRootPaths(command)) {
|
|
107799
107951
|
referencedCount += 1;
|
|
@@ -107832,7 +107984,7 @@ async function classifyBundleTarget(bundleRoot, baseRoot, relativePath, allowEsc
|
|
|
107832
107984
|
}
|
|
107833
107985
|
async function findHookManifestPaths(root) {
|
|
107834
107986
|
const paths = await findManifestPaths(root, "hooks.json");
|
|
107835
|
-
return paths.filter((path) =>
|
|
107987
|
+
return paths.filter((path) => dirname36(path).endsWith(`${sep9}hooks`));
|
|
107836
107988
|
}
|
|
107837
107989
|
async function findManifestPaths(root, manifestName) {
|
|
107838
107990
|
let entries;
|
|
@@ -107845,7 +107997,7 @@ async function findManifestPaths(root, manifestName) {
|
|
|
107845
107997
|
for (const entry of entries) {
|
|
107846
107998
|
if (entry.name === "node_modules" || entry.name === ".git")
|
|
107847
107999
|
continue;
|
|
107848
|
-
const entryPath =
|
|
108000
|
+
const entryPath = join92(root, entry.name);
|
|
107849
108001
|
if (entry.isDirectory()) {
|
|
107850
108002
|
paths.push(...await findManifestPaths(entryPath, manifestName));
|
|
107851
108003
|
continue;
|
|
@@ -107889,18 +108041,18 @@ function isPluginRuntimePathArg(arg) {
|
|
|
107889
108041
|
return normalized.endsWith(".js") && normalized.includes("/dist/") && (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("components/") || normalized.startsWith("/") || isAbsolute14(arg));
|
|
107890
108042
|
}
|
|
107891
108043
|
function runtimeSgDirectory(codexHome, platform, arch) {
|
|
107892
|
-
return
|
|
108044
|
+
return join92(codexHome, "runtime", "ast-grep", runtimeSlug(platform, arch));
|
|
107893
108045
|
}
|
|
107894
108046
|
function describeSgSource(sgPath, env, runtimeSgDir, platform) {
|
|
107895
108047
|
const override = env[SG_PATH_ENV_KEY]?.trim();
|
|
107896
108048
|
if (override !== undefined && override.length > 0 && sgPath === override)
|
|
107897
108049
|
return `env override ${SG_PATH_ENV_KEY}`;
|
|
107898
|
-
if (sgPath ===
|
|
108050
|
+
if (sgPath === join92(runtimeSgDir, sgBinaryName(platform)))
|
|
107899
108051
|
return "runtime dir";
|
|
107900
108052
|
return "PATH";
|
|
107901
108053
|
}
|
|
107902
108054
|
async function readBootstrapStateSummary(codexHome) {
|
|
107903
|
-
const statePath =
|
|
108055
|
+
const statePath = join92(codexHome, "plugins", "data", PLUGIN_DATA_DIR_NAME, "bootstrap", "state.json");
|
|
107904
108056
|
const raw = await readJson2(statePath);
|
|
107905
108057
|
if (raw === null)
|
|
107906
108058
|
return null;
|
|
@@ -107979,16 +108131,16 @@ function isRecord18(value) {
|
|
|
107979
108131
|
import { existsSync as existsSync60 } from "node:fs";
|
|
107980
108132
|
import { readFile as readFile32 } from "node:fs/promises";
|
|
107981
108133
|
import { homedir as homedir25 } from "node:os";
|
|
107982
|
-
import { join as
|
|
108134
|
+
import { join as join93, resolve as resolve26 } from "node:path";
|
|
107983
108135
|
var RUNTIME_WRAPPER_MARKER2 = "OMO_GENERATED_RUNTIME_WRAPPER";
|
|
107984
108136
|
var CHECK_NAME = "codex-runtime-wrapper";
|
|
107985
108137
|
var REINSTALL_COMMAND = "npx --yes lazycodex-ai@latest install --no-tui";
|
|
107986
108138
|
async function checkCodexRuntimeWrapper(deps = {}) {
|
|
107987
|
-
const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ??
|
|
108139
|
+
const codexHome = resolve26(deps.codexHome ?? process.env.CODEX_HOME ?? join93(homedir25(), ".codex"));
|
|
107988
108140
|
const binDir = resolveCodexInstallerBinDir({ binDir: deps.binDir, codexHome, env: process.env });
|
|
107989
108141
|
const platform = deps.platform ?? process.platform;
|
|
107990
|
-
const wrapperPath =
|
|
107991
|
-
const legacyWrapperPath =
|
|
108142
|
+
const wrapperPath = join93(binDir, platform === "win32" ? "omo-agent-toolkit.cmd" : "omo-agent-toolkit");
|
|
108143
|
+
const legacyWrapperPath = join93(binDir, platform === "win32" ? "omo.cmd" : "omo");
|
|
107992
108144
|
const [wrapper, legacyWrapper] = await Promise.all([readRuntimeWrapper(wrapperPath), readRuntimeWrapper(legacyWrapperPath)]);
|
|
107993
108145
|
const issues = [];
|
|
107994
108146
|
if (wrapper?.includes(RUNTIME_WRAPPER_MARKER2) === true) {
|
|
@@ -108524,12 +108676,12 @@ import {
|
|
|
108524
108676
|
unlinkSync as unlinkSync9,
|
|
108525
108677
|
writeFileSync as writeFileSync14
|
|
108526
108678
|
} from "node:fs";
|
|
108527
|
-
import { basename as basename13, dirname as
|
|
108679
|
+
import { basename as basename13, dirname as dirname37, join as join96 } from "node:path";
|
|
108528
108680
|
|
|
108529
108681
|
// packages/mcp-client-core/src/config-dir.ts
|
|
108530
108682
|
import { existsSync as existsSync61, realpathSync as realpathSync10 } from "node:fs";
|
|
108531
108683
|
import { homedir as homedir26 } from "node:os";
|
|
108532
|
-
import { join as
|
|
108684
|
+
import { join as join94, resolve as resolve27 } from "node:path";
|
|
108533
108685
|
function resolveConfigPath2(pathValue) {
|
|
108534
108686
|
const resolvedPath = resolve27(pathValue);
|
|
108535
108687
|
if (!existsSync61(resolvedPath))
|
|
@@ -108547,13 +108699,13 @@ function getOpenCodeCliConfigDir(env = process.env) {
|
|
|
108547
108699
|
if (customConfigDir) {
|
|
108548
108700
|
return resolveConfigPath2(customConfigDir);
|
|
108549
108701
|
}
|
|
108550
|
-
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() ||
|
|
108551
|
-
return resolveConfigPath2(
|
|
108702
|
+
const xdgConfigDir = env["XDG_CONFIG_HOME"]?.trim() || join94(homedir26(), ".config");
|
|
108703
|
+
return resolveConfigPath2(join94(xdgConfigDir, "opencode"));
|
|
108552
108704
|
}
|
|
108553
108705
|
|
|
108554
108706
|
// packages/mcp-client-core/src/mcp-oauth/storage-index.ts
|
|
108555
108707
|
import { chmodSync as chmodSync4, existsSync as existsSync62, readFileSync as readFileSync41, renameSync as renameSync7, writeFileSync as writeFileSync13 } from "node:fs";
|
|
108556
|
-
import { join as
|
|
108708
|
+
import { join as join95 } from "node:path";
|
|
108557
108709
|
var INDEX_FILE_NAME = "index.json";
|
|
108558
108710
|
function isTokenIndex(value) {
|
|
108559
108711
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
@@ -108561,7 +108713,7 @@ function isTokenIndex(value) {
|
|
|
108561
108713
|
return Object.values(value).every((entry) => typeof entry === "string");
|
|
108562
108714
|
}
|
|
108563
108715
|
function getIndexPath(storageDir) {
|
|
108564
|
-
return
|
|
108716
|
+
return join95(storageDir, INDEX_FILE_NAME);
|
|
108565
108717
|
}
|
|
108566
108718
|
function readTokenIndex(storageDir) {
|
|
108567
108719
|
const indexPath = getIndexPath(storageDir);
|
|
@@ -108605,16 +108757,16 @@ function deleteTokenIndexEntry(storageDir, hash) {
|
|
|
108605
108757
|
var STORAGE_DIR_NAME = "mcp-oauth";
|
|
108606
108758
|
var LEGACY_STORAGE_FILE_NAME = "mcp-oauth.json";
|
|
108607
108759
|
function getMcpOauthStorageDir() {
|
|
108608
|
-
return
|
|
108760
|
+
return join96(getOpenCodeCliConfigDir(), STORAGE_DIR_NAME);
|
|
108609
108761
|
}
|
|
108610
108762
|
function getMcpOauthServerHash(serverHost, resource) {
|
|
108611
108763
|
return createHash7("sha256").update(buildKey(serverHost, resource)).digest("hex").slice(0, 32);
|
|
108612
108764
|
}
|
|
108613
108765
|
function getMcpOauthStoragePath(serverHost, resource) {
|
|
108614
|
-
return
|
|
108766
|
+
return join96(getMcpOauthStorageDir(), `${getMcpOauthServerHash(serverHost, resource)}.json`);
|
|
108615
108767
|
}
|
|
108616
108768
|
function getLegacyStoragePath() {
|
|
108617
|
-
return
|
|
108769
|
+
return join96(getOpenCodeCliConfigDir(), LEGACY_STORAGE_FILE_NAME);
|
|
108618
108770
|
}
|
|
108619
108771
|
function normalizeHost2(serverHost) {
|
|
108620
108772
|
let host = serverHost.trim();
|
|
@@ -108708,7 +108860,7 @@ function readLegacyStore() {
|
|
|
108708
108860
|
}
|
|
108709
108861
|
function writeTokenFile(filePath, token) {
|
|
108710
108862
|
try {
|
|
108711
|
-
const dir =
|
|
108863
|
+
const dir = dirname37(filePath);
|
|
108712
108864
|
if (!existsSync63(dir)) {
|
|
108713
108865
|
mkdirSync17(dir, { recursive: true });
|
|
108714
108866
|
}
|
|
@@ -108793,7 +108945,7 @@ function listTokensByHost(serverHost) {
|
|
|
108793
108945
|
for (const [hash, indexedKey] of Object.entries(index)) {
|
|
108794
108946
|
if (!indexedKey.startsWith(prefix))
|
|
108795
108947
|
continue;
|
|
108796
|
-
const indexedToken = readTokenFile(
|
|
108948
|
+
const indexedToken = readTokenFile(join96(getMcpOauthStorageDir(), `${hash}.json`));
|
|
108797
108949
|
if (indexedToken)
|
|
108798
108950
|
result[indexedKey] = indexedToken;
|
|
108799
108951
|
}
|
|
@@ -108808,7 +108960,7 @@ function listAllTokens() {
|
|
|
108808
108960
|
for (const entry of readdirSync13(dir, { withFileTypes: true })) {
|
|
108809
108961
|
if (!entry.isFile() || !entry.name.endsWith(".json") || entry.name === "index.json")
|
|
108810
108962
|
continue;
|
|
108811
|
-
const token = readTokenFile(
|
|
108963
|
+
const token = readTokenFile(join96(dir, entry.name));
|
|
108812
108964
|
const hash = basename13(entry.name, ".json");
|
|
108813
108965
|
if (token)
|
|
108814
108966
|
result[index[hash] ?? hash] = token;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lazycodex-ai",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -5350,7 +5350,8 @@ function missingDependencyAvailability(error) {
|
|
|
5350
5350
|
extensions: [...error.lookup.server.extensions],
|
|
5351
5351
|
installHint: error.lookup.installHint,
|
|
5352
5352
|
installDecisionTool: context.capabilities.installDecisionTool,
|
|
5353
|
-
installDecisionsPath: context.installDecisionsPath
|
|
5353
|
+
installDecisionsPath: context.installDecisionsPath,
|
|
5354
|
+
decision: loadInstallDecision(error.lookup.server.id)?.decision ?? null
|
|
5354
5355
|
};
|
|
5355
5356
|
default: {
|
|
5356
5357
|
const exhaustive = error.lookup;
|