oh-my-opencode 4.16.3 → 4.17.1
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/.agents/command/omomomo.md +1 -1
- package/.agents/command/publish.md +31 -58
- package/.agents/skills/hyperplan/SKILL.md +3 -3
- package/.agents/skills/omomomo/SKILL.md +1 -1
- package/.agents/skills/pre-publish-review/SKILL.md +1 -1
- package/.agents/skills/publish/SKILL.md +32 -59
- package/.opencode/command/omomomo.md +1 -1
- package/.opencode/command/publish.md +31 -58
- package/.opencode/skills/hyperplan/SKILL.md +3 -3
- package/.opencode/skills/pre-publish-review/SKILL.md +4 -1
- package/README.ja.md +4 -4
- package/README.ko.md +4 -4
- package/README.md +2 -2
- package/README.ru.md +4 -4
- package/README.zh-cn.md +4 -4
- package/dist/cli/index.js +195 -76
- package/dist/cli-node/index.js +195 -76
- package/dist/features/team-mode/test-support/async-test-helpers.d.ts +2 -2
- package/dist/index.js +310 -299
- package/dist/plugin/chat-message/types.d.ts +4 -0
- package/dist/plugin/command-execute-before.d.ts +1 -0
- package/dist/plugin/stop-continuation.d.ts +17 -0
- package/dist/skills/remove-ai-slops/SKILL.md +2 -2
- package/dist/skills/review-work/SKILL.md +10 -2
- package/dist/skills/start-work/SKILL.md +6 -3
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
- package/dist/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/dist/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
- package/dist/skills/ulw-plan/SKILL.md +2 -1
- package/dist/skills/ulw-plan/references/full-workflow.md +1 -1
- package/dist/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/dist/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/dist/skills/visual-qa/SKILL.md +9 -5
- package/dist/tui.js +79 -32
- package/package.json +15 -14
- package/packages/git-bash-mcp/package.json +27 -0
- package/packages/lsp-daemon/dist/cli.js +7 -13
- package/packages/lsp-daemon/dist/daemon-client.js +3 -5
- package/packages/lsp-daemon/dist/index.js +12 -18
- package/packages/lsp-daemon/dist/request-routing.js +6 -8
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +3 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +1080 -1017
- 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/AGENTS.md +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/cli.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/dist/codex-hook.js +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/src/codex-hook.ts +6 -2
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/cli.test.ts +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts +67 -2
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +14 -14
- 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/test/package-smoke.test.ts +0 -13
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +2 -2
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +3 -3
- 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/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 -79
- package/packages/omo-codex/plugin/components/teammode/AGENTS.md +2 -2
- 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 +33 -16
- package/packages/omo-codex/plugin/components/teammode/skills/teammode/scripts/team.mjs +2 -1
- package/packages/omo-codex/plugin/components/teammode/test/v2-spawn-schema.test.ts +69 -0
- 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/agents/explorer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-code-reviewer.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-gate-reviewer.toml +6 -6
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-qa-executor.toml +5 -5
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-high.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/{lazycodex-executor.toml → lazycodex-worker-low.toml} +6 -4
- package/packages/omo-codex/plugin/components/ultrawork/agents/lazycodex-worker-medium.toml +26 -0
- package/packages/omo-codex/plugin/components/ultrawork/agents/librarian.toml +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/agents/plan.toml +7 -7
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +76 -37
- 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 +76 -37
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +25 -0
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +0 -68
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/CHANGELOG.md +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +3 -1
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +76 -37
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +13 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +405 -25
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.d.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/paths.js +16 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-crud.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-verdicts.js +20 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.d.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +12 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +148 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/stop-resume-hook.js +209 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +25 -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 +14 -15
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +30 -28
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +6 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +14 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli.ts +10 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/paths.ts +27 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-crud.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-verdicts.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +16 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +138 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/stop-resume-hook.ts +208 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-create-goals.test.ts +12 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-entrypoint.test.ts +4 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +8 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/fixtures/quality-gate-builder.ts +24 -13
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +5 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/paths.test.ts +43 -8
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +55 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +228 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/stop-resume-hook.test.ts +193 -0
- 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-guarding-ulw-loop-spawns.json +18 -0
- 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/stop-checking-ulw-loop-resume.json +17 -0
- 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 +2 -2
- 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/model-catalog.json +16 -7
- 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/migrate-codex-config/catalog.mjs +16 -7
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +8 -2
- package/packages/omo-codex/plugin/skills/init-deep/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/remove-ai-slops/SKILL.md +4 -4
- package/packages/omo-codex/plugin/skills/review-work/SKILL.md +18 -4
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +6 -3
- package/packages/omo-codex/plugin/skills/teammode/SKILL.md +33 -16
- package/packages/omo-codex/plugin/skills/teammode/scripts/team.mjs +2 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +76 -37
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +14 -15
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +30 -28
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/omo-codex/plugin/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/omo-codex/plugin/skills/ulw-research/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/visual-qa/SKILL.md +11 -7
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +76 -16
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +23 -2
- package/packages/omo-codex/plugin/test/aggregate-manifest.test.mjs +1 -1
- package/packages/omo-codex/plugin/test/aggregate-model-catalog.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/auto-update.test.mjs +4 -4
- package/packages/omo-codex/plugin/test/component-hook-contract-cases.mjs +2 -2
- package/packages/omo-codex/plugin/test/lcx-bug-skills.test.mjs +4 -101
- package/packages/omo-codex/plugin/test/migrate-codex-config.test.mjs +14 -14
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +11 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +5 -3
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +25 -0
- package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +24 -0
- package/packages/omo-codex/plugin/test/ulw-plan-skill-contract.test.mjs +9 -40
- package/packages/omo-codex/plugin/test/ulw-research-skill-contract.test.mjs +4 -277
- package/packages/omo-codex/scripts/install-config-reasoning.test.mjs +5 -5
- package/packages/omo-codex/scripts/install-config.test.mjs +22 -3
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +98 -30
- package/packages/shared-skills/skills/remove-ai-slops/SKILL.md +2 -2
- package/packages/shared-skills/skills/review-work/SKILL.md +10 -2
- package/packages/shared-skills/skills/start-work/SKILL.md +6 -3
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/engine/templates/package.json +1 -1
- package/packages/shared-skills/skills/ultimate-browsing/references/chrome-stealth.md +11 -11
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +2 -1
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +4 -4
- package/packages/shared-skills/skills/ulw-plan/scripts/scaffold-plan.mjs +2 -2
- package/packages/shared-skills/skills/visual-qa/SKILL.md +9 -5
- package/dist/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
- package/packages/omo-codex/plugin/components/ulw-loop/test/skill-contract.test.ts +0 -70
- package/packages/omo-codex/plugin/test/ulw-research-epistemic-contract.test.mjs +0 -98
- package/packages/shared-skills/skills/visual-qa/scripts/skill-prompt-contract.test.ts +0 -296
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oh-my-opencode/git-bash-mcp",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": true,
|
|
6
|
+
"bin": {
|
|
7
|
+
"omo-git-bash": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./src/index.ts",
|
|
12
|
+
"import": "./src/index.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "bun build src/cli.ts --outdir dist --target node --format esm",
|
|
17
|
+
"typecheck": "tsgo --noEmit -p tsconfig.json",
|
|
18
|
+
"test": "bun test src/*.test.ts"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@oh-my-opencode/mcp-stdio-core": "workspace:*",
|
|
22
|
+
"@oh-my-opencode/utils": "workspace:*"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"bun-types": "1.3.12"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -3556,13 +3556,13 @@ function resolveSocketPath(dir, version) {
|
|
|
3556
3556
|
// src/request-routing.ts
|
|
3557
3557
|
var CONTEXT_KEY = "_context";
|
|
3558
3558
|
function extractRequestContext(raw) {
|
|
3559
|
-
if (!
|
|
3559
|
+
if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
|
|
3560
3560
|
return { input: raw, context: undefined };
|
|
3561
3561
|
const params = raw["params"];
|
|
3562
|
-
if (!
|
|
3562
|
+
if (!isPlainRecord(params))
|
|
3563
3563
|
return { input: raw, context: undefined };
|
|
3564
3564
|
const args = params["arguments"];
|
|
3565
|
-
if (!
|
|
3565
|
+
if (!isPlainRecord(args))
|
|
3566
3566
|
return { input: raw, context: undefined };
|
|
3567
3567
|
const context = parseContext(args[CONTEXT_KEY]);
|
|
3568
3568
|
if (!context)
|
|
@@ -3579,7 +3579,7 @@ function handleDaemonMessage(raw) {
|
|
|
3579
3579
|
return handleLspMcpRequest(input);
|
|
3580
3580
|
}
|
|
3581
3581
|
function parseContext(value) {
|
|
3582
|
-
if (!
|
|
3582
|
+
if (!isPlainRecord(value))
|
|
3583
3583
|
return;
|
|
3584
3584
|
const context = {};
|
|
3585
3585
|
const cwd = value["cwd"];
|
|
@@ -3590,11 +3590,8 @@ function parseContext(value) {
|
|
|
3590
3590
|
context.env = env;
|
|
3591
3591
|
return context.cwd === undefined && context.env === undefined ? undefined : context;
|
|
3592
3592
|
}
|
|
3593
|
-
function isRecord5(value) {
|
|
3594
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3595
|
-
}
|
|
3596
3593
|
function isStringRecord2(value) {
|
|
3597
|
-
return
|
|
3594
|
+
return isPlainRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
3598
3595
|
}
|
|
3599
3596
|
|
|
3600
3597
|
// src/socket-jsonrpc.ts
|
|
@@ -3721,10 +3718,10 @@ function sendToolCall(socketPath, name, args, timeoutMs) {
|
|
|
3721
3718
|
});
|
|
3722
3719
|
}
|
|
3723
3720
|
function toToolResult(message) {
|
|
3724
|
-
if (!
|
|
3721
|
+
if (!isPlainRecord(message) || message["id"] !== REQUEST_ID)
|
|
3725
3722
|
return null;
|
|
3726
3723
|
const result = message["result"];
|
|
3727
|
-
if (!
|
|
3724
|
+
if (!isPlainRecord(result) || !Array.isArray(result["content"]))
|
|
3728
3725
|
return null;
|
|
3729
3726
|
return {
|
|
3730
3727
|
content: result["content"],
|
|
@@ -3732,9 +3729,6 @@ function toToolResult(message) {
|
|
|
3732
3729
|
details: result["details"]
|
|
3733
3730
|
};
|
|
3734
3731
|
}
|
|
3735
|
-
function isRecord6(value) {
|
|
3736
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3737
|
-
}
|
|
3738
3732
|
function errorText(error) {
|
|
3739
3733
|
return error instanceof Error ? error.message : String(error);
|
|
3740
3734
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { connect } from "node:net";
|
|
2
|
+
import { isPlainRecord } from "@oh-my-opencode/mcp-stdio-core/record";
|
|
2
3
|
import { ensureDaemonRunning } from "./ensure-daemon.js";
|
|
3
4
|
import { daemonPaths } from "./paths.js";
|
|
4
5
|
import { CONTEXT_KEY } from "./request-routing.js";
|
|
@@ -95,10 +96,10 @@ function sendToolCall(socketPath, name, args, timeoutMs) {
|
|
|
95
96
|
});
|
|
96
97
|
}
|
|
97
98
|
function toToolResult(message) {
|
|
98
|
-
if (!
|
|
99
|
+
if (!isPlainRecord(message) || message["id"] !== REQUEST_ID)
|
|
99
100
|
return null;
|
|
100
101
|
const result = message["result"];
|
|
101
|
-
if (!
|
|
102
|
+
if (!isPlainRecord(result) || !Array.isArray(result["content"]))
|
|
102
103
|
return null;
|
|
103
104
|
return {
|
|
104
105
|
content: result["content"],
|
|
@@ -106,9 +107,6 @@ function toToolResult(message) {
|
|
|
106
107
|
details: result["details"],
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
function isRecord(value) {
|
|
110
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
111
|
-
}
|
|
112
110
|
function errorText(error) {
|
|
113
111
|
return error instanceof Error ? error.message : String(error);
|
|
114
112
|
}
|
|
@@ -1415,6 +1415,11 @@ async function disposeDefaultLspManager() {
|
|
|
1415
1415
|
// src/daemon-client.ts
|
|
1416
1416
|
import { connect as connect2 } from "node:net";
|
|
1417
1417
|
|
|
1418
|
+
// ../mcp-stdio-core/src/record.ts
|
|
1419
|
+
function isPlainRecord(value) {
|
|
1420
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1418
1423
|
// src/ensure-daemon.ts
|
|
1419
1424
|
import { spawn as spawn2 } from "node:child_process";
|
|
1420
1425
|
import { closeSync as closeSync2, existsSync as existsSync2, mkdirSync as mkdirSync2, openSync as openSync2 } from "node:fs";
|
|
@@ -1632,11 +1637,6 @@ function resolveSocketPath(dir, version) {
|
|
|
1632
1637
|
return natural;
|
|
1633
1638
|
return join2(tmpdir(), `omo-lsp-${version}-${digest}.sock`);
|
|
1634
1639
|
}
|
|
1635
|
-
|
|
1636
|
-
// ../mcp-stdio-core/src/record.ts
|
|
1637
|
-
function isPlainRecord(value) {
|
|
1638
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1639
|
-
}
|
|
1640
1640
|
// ../mcp-stdio-core/src/responses.ts
|
|
1641
1641
|
function successResponse(id, result) {
|
|
1642
1642
|
return { jsonrpc: "2.0", id, result };
|
|
@@ -3550,13 +3550,13 @@ function requestedProtocolVersion(params) {
|
|
|
3550
3550
|
// src/request-routing.ts
|
|
3551
3551
|
var CONTEXT_KEY = "_context";
|
|
3552
3552
|
function extractRequestContext(raw) {
|
|
3553
|
-
if (!
|
|
3553
|
+
if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
|
|
3554
3554
|
return { input: raw, context: undefined };
|
|
3555
3555
|
const params = raw["params"];
|
|
3556
|
-
if (!
|
|
3556
|
+
if (!isPlainRecord(params))
|
|
3557
3557
|
return { input: raw, context: undefined };
|
|
3558
3558
|
const args = params["arguments"];
|
|
3559
|
-
if (!
|
|
3559
|
+
if (!isPlainRecord(args))
|
|
3560
3560
|
return { input: raw, context: undefined };
|
|
3561
3561
|
const context = parseContext(args[CONTEXT_KEY]);
|
|
3562
3562
|
if (!context)
|
|
@@ -3573,7 +3573,7 @@ function handleDaemonMessage(raw) {
|
|
|
3573
3573
|
return handleLspMcpRequest(input);
|
|
3574
3574
|
}
|
|
3575
3575
|
function parseContext(value) {
|
|
3576
|
-
if (!
|
|
3576
|
+
if (!isPlainRecord(value))
|
|
3577
3577
|
return;
|
|
3578
3578
|
const context = {};
|
|
3579
3579
|
const cwd = value["cwd"];
|
|
@@ -3584,11 +3584,8 @@ function parseContext(value) {
|
|
|
3584
3584
|
context.env = env;
|
|
3585
3585
|
return context.cwd === undefined && context.env === undefined ? undefined : context;
|
|
3586
3586
|
}
|
|
3587
|
-
function isRecord5(value) {
|
|
3588
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3589
|
-
}
|
|
3590
3587
|
function isStringRecord2(value) {
|
|
3591
|
-
return
|
|
3588
|
+
return isPlainRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
3592
3589
|
}
|
|
3593
3590
|
|
|
3594
3591
|
// src/socket-jsonrpc.ts
|
|
@@ -3715,10 +3712,10 @@ function sendToolCall(socketPath, name, args, timeoutMs) {
|
|
|
3715
3712
|
});
|
|
3716
3713
|
}
|
|
3717
3714
|
function toToolResult(message) {
|
|
3718
|
-
if (!
|
|
3715
|
+
if (!isPlainRecord(message) || message["id"] !== REQUEST_ID)
|
|
3719
3716
|
return null;
|
|
3720
3717
|
const result = message["result"];
|
|
3721
|
-
if (!
|
|
3718
|
+
if (!isPlainRecord(result) || !Array.isArray(result["content"]))
|
|
3722
3719
|
return null;
|
|
3723
3720
|
return {
|
|
3724
3721
|
content: result["content"],
|
|
@@ -3726,9 +3723,6 @@ function toToolResult(message) {
|
|
|
3726
3723
|
details: result["details"]
|
|
3727
3724
|
};
|
|
3728
3725
|
}
|
|
3729
|
-
function isRecord6(value) {
|
|
3730
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3731
|
-
}
|
|
3732
3726
|
function errorText(error) {
|
|
3733
3727
|
return error instanceof Error ? error.message : String(error);
|
|
3734
3728
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { handleLspMcpRequest } from "@oh-my-opencode/lsp-core/mcp";
|
|
2
2
|
import { runWithRequestContext } from "@oh-my-opencode/lsp-core/request-context";
|
|
3
|
+
import { isPlainRecord } from "@oh-my-opencode/mcp-stdio-core/record";
|
|
3
4
|
export const CONTEXT_KEY = "_context";
|
|
4
5
|
export function extractRequestContext(raw) {
|
|
5
|
-
if (!
|
|
6
|
+
if (!isPlainRecord(raw) || raw["method"] !== "tools/call")
|
|
6
7
|
return { input: raw, context: undefined };
|
|
7
8
|
const params = raw["params"];
|
|
8
|
-
if (!
|
|
9
|
+
if (!isPlainRecord(params))
|
|
9
10
|
return { input: raw, context: undefined };
|
|
10
11
|
const args = params["arguments"];
|
|
11
|
-
if (!
|
|
12
|
+
if (!isPlainRecord(args))
|
|
12
13
|
return { input: raw, context: undefined };
|
|
13
14
|
const context = parseContext(args[CONTEXT_KEY]);
|
|
14
15
|
if (!context)
|
|
@@ -25,7 +26,7 @@ export function handleDaemonMessage(raw) {
|
|
|
25
26
|
return handleLspMcpRequest(input);
|
|
26
27
|
}
|
|
27
28
|
function parseContext(value) {
|
|
28
|
-
if (!
|
|
29
|
+
if (!isPlainRecord(value))
|
|
29
30
|
return undefined;
|
|
30
31
|
const context = {};
|
|
31
32
|
const cwd = value["cwd"];
|
|
@@ -36,9 +37,6 @@ function parseContext(value) {
|
|
|
36
37
|
context.env = env;
|
|
37
38
|
return context.cwd === undefined && context.env === undefined ? undefined : context;
|
|
38
39
|
}
|
|
39
|
-
function isRecord(value) {
|
|
40
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41
|
-
}
|
|
42
40
|
function isStringRecord(value) {
|
|
43
|
-
return
|
|
41
|
+
return isPlainRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
44
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omo",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.1",
|
|
4
4
|
"description": "One Codex plugin namespace for Yeongyu's local Codex components.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Yeongyu Kim",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"./hooks/user-prompt-submit-checking-ulw-loop-steering.json",
|
|
31
31
|
"./hooks/pre-tool-use-recommending-git-bash-mcp.json",
|
|
32
32
|
"./hooks/pre-tool-use-enforcing-unlimited-goal-budget.json",
|
|
33
|
+
"./hooks/pre-tool-use-guarding-ulw-loop-spawns.json",
|
|
33
34
|
"./hooks/post-tool-use-checking-comments.json",
|
|
34
35
|
"./hooks/post-tool-use-checking-lsp-diagnostics.json",
|
|
35
36
|
"./hooks/post-tool-use-checking-codegraph-init-guidance.json",
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"./hooks/post-compact-resetting-project-rule-cache.json",
|
|
40
41
|
"./hooks/post-compact-resetting-lsp-diagnostics-cache.json",
|
|
41
42
|
"./hooks/stop-checking-start-work-continuation.json",
|
|
43
|
+
"./hooks/stop-checking-ulw-loop-resume.json",
|
|
42
44
|
"./hooks/subagent-stop-checking-start-work-continuation.json",
|
|
43
45
|
"./hooks/subagent-stop-verifying-lazycodex-executor-evidence.json"
|
|
44
46
|
],
|