oh-my-opencode 4.17.1 → 4.18.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/skills/codex-qa/SKILL.md +2 -0
- package/.agents/skills/codex-qa/scripts/lsp-e2e.sh +3654 -0
- package/.agents/skills/opencode-qa/scripts/lsp-e2e.sh +3071 -0
- package/.agents/skills/work-with-pr/SKILL.md +16 -37
- package/.agents/skills/work-with-pr-workspace/evals/evals.json +3 -3
- package/.opencode/skills/work-with-pr/SKILL.md +16 -37
- package/.opencode/skills/work-with-pr-workspace/evals/evals.json +3 -3
- package/dist/cli/get-local-version/types.d.ts +1 -1
- package/dist/cli/index.js +498 -165
- package/dist/cli-node/index.js +498 -165
- package/dist/index.js +425 -392
- package/dist/skills/frontend/SKILL.md +1 -1
- package/dist/skills/frontend/references/design/README.md +9 -0
- package/dist/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/dist/skills/frontend/references/design/layout-skill.md +107 -0
- package/dist/skills/programming/SKILL.md +12 -2
- package/package.json +17 -16
- package/packages/lsp-core/package.json +4 -0
- package/packages/lsp-core/src/index.ts +1 -0
- package/packages/lsp-core/src/lsp/cleanup-errors.test.ts +18 -0
- package/packages/lsp-core/src/lsp/cleanup-errors.ts +12 -3
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +261 -0
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +63 -0
- package/packages/lsp-core/src/lsp/client-wrapper.ts +35 -5
- package/packages/lsp-core/src/lsp/client.ts +262 -80
- package/packages/lsp-core/src/lsp/config-loader.ts +5 -17
- package/packages/lsp-core/src/lsp/connection.ts +12 -6
- package/packages/lsp-core/src/lsp/directory-diagnostics.test.ts +104 -0
- package/packages/lsp-core/src/lsp/directory-diagnostics.ts +60 -27
- package/packages/lsp-core/src/lsp/errors.ts +11 -0
- package/packages/lsp-core/src/lsp/fixtures/diagnostics-freshness-contract-probe.ts +283 -0
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-contract-probe.ts +196 -0
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +215 -0
- package/packages/lsp-core/src/lsp/formatters.ts +3 -0
- package/packages/lsp-core/src/lsp/json-rpc-connection-cancellation.test.ts +97 -0
- package/packages/lsp-core/src/lsp/json-rpc-connection.ts +73 -5
- package/packages/lsp-core/src/lsp/server-install-state.ts +3 -6
- package/packages/lsp-core/src/lsp/transport-protocol.ts +52 -0
- package/packages/lsp-core/src/lsp/transport.ts +96 -70
- package/packages/lsp-core/src/lsp/workspace-apply-edit-failure.ts +19 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-lease.integration.test.ts +214 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-sync.integration.test.ts +113 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit-test-support.ts +163 -0
- package/packages/lsp-core/src/lsp/workspace-apply-edit.integration.test.ts +163 -0
- package/packages/lsp-core/src/lsp/workspace-document-state.test.ts +67 -0
- package/packages/lsp-core/src/lsp/workspace-document-state.ts +368 -0
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +113 -0
- package/packages/lsp-core/src/lsp/workspace-edit-commit.test.ts +140 -0
- package/packages/lsp-core/src/lsp/workspace-edit-commit.ts +220 -0
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.test.ts +56 -0
- package/packages/lsp-core/src/lsp/workspace-edit-contract-evidence.ts +30 -0
- package/packages/lsp-core/src/lsp/workspace-edit-fingerprint.ts +44 -0
- package/packages/lsp-core/src/lsp/workspace-edit-options.test.ts +147 -0
- package/packages/lsp-core/src/lsp/workspace-edit-parse-helpers.ts +59 -0
- package/packages/lsp-core/src/lsp/workspace-edit-parser.ts +130 -0
- package/packages/lsp-core/src/lsp/workspace-edit-path.ts +98 -0
- package/packages/lsp-core/src/lsp/workspace-edit-plan-types.ts +60 -0
- package/packages/lsp-core/src/lsp/workspace-edit-plan.ts +73 -0
- package/packages/lsp-core/src/lsp/workspace-edit-prevalidation.test.ts +174 -0
- package/packages/lsp-core/src/lsp/workspace-edit-resource-parser.ts +89 -0
- package/packages/lsp-core/src/lsp/workspace-edit-simulation.ts +183 -0
- package/packages/lsp-core/src/lsp/workspace-edit-snapshot.ts +53 -0
- package/packages/lsp-core/src/lsp/workspace-edit-text.ts +125 -0
- package/packages/lsp-core/src/lsp/workspace-edit-types.ts +121 -0
- package/packages/lsp-core/src/lsp/workspace-edit.characterization.test.ts +95 -0
- package/packages/lsp-core/src/lsp/workspace-edit.ts +49 -200
- package/packages/lsp-core/src/lsp/workspace-mutation-controller.ts +182 -0
- package/packages/lsp-core/src/mcp.ts +18 -7
- package/packages/lsp-core/src/missing-dependency-result.test.ts +105 -0
- package/packages/lsp-core/src/missing-dependency-result.ts +57 -0
- package/packages/lsp-core/src/post-edit/index.ts +1 -0
- package/packages/lsp-core/src/post-edit/orchestration.test.ts +157 -0
- package/packages/lsp-core/src/post-edit/orchestration.ts +178 -0
- package/packages/lsp-core/src/request-context.test.ts +171 -0
- package/packages/lsp-core/src/request-context.ts +222 -9
- package/packages/lsp-core/src/tool-surface.test.ts +4 -1
- package/packages/lsp-core/src/tools/diagnostics.ts +32 -13
- package/packages/lsp-core/src/tools/navigation.ts +12 -12
- package/packages/lsp-core/src/tools/rename.ts +10 -15
- package/packages/lsp-core/src/tools/symbols.ts +11 -11
- package/packages/lsp-core/src/tools/types.ts +2 -1
- package/packages/lsp-daemon/dist/cli.js +3114 -747
- package/packages/lsp-daemon/dist/client.d.ts +105 -0
- package/packages/lsp-daemon/dist/client.js +5851 -0
- package/packages/lsp-daemon/dist/daemon-client.d.ts +11 -6
- package/packages/lsp-daemon/dist/daemon-client.js +113 -30
- package/packages/lsp-daemon/dist/daemon-server.d.ts +1 -0
- package/packages/lsp-daemon/dist/daemon-server.js +40 -15
- package/packages/lsp-daemon/dist/ensure-daemon.d.ts +8 -7
- package/packages/lsp-daemon/dist/ensure-daemon.js +67 -44
- package/packages/lsp-daemon/dist/index.d.ts +2 -2
- package/packages/lsp-daemon/dist/index.js +2862 -754
- package/packages/lsp-daemon/dist/ipc-protocol.d.ts +46 -0
- package/packages/lsp-daemon/dist/ipc-protocol.js +187 -0
- package/packages/lsp-daemon/dist/lock.js +14 -4
- package/packages/lsp-daemon/dist/ownership.d.ts +49 -0
- package/packages/lsp-daemon/dist/ownership.js +168 -0
- package/packages/lsp-daemon/dist/paths.d.ts +33 -9
- package/packages/lsp-daemon/dist/paths.js +72 -33
- package/packages/lsp-daemon/dist/proxy.d.ts +3 -0
- package/packages/lsp-daemon/dist/proxy.js +54 -3
- package/packages/lsp-daemon/dist/request-routing.d.ts +7 -2
- package/packages/lsp-daemon/dist/request-routing.js +71 -22
- package/packages/lsp-daemon/dist/run-daemon.js +9 -2
- package/packages/lsp-daemon/dist/runtime-contract.d.ts +21 -0
- package/packages/lsp-daemon/dist/runtime-contract.js +58 -0
- package/packages/lsp-daemon/dist/socket-jsonrpc.js +6 -1
- package/packages/lsp-daemon/package.json +12 -3
- package/packages/lsp-tools-mcp/dist/cli.js +2115 -442
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +1741 -148
- package/packages/lsp-tools-mcp/dist/mcp.js +2127 -454
- package/packages/lsp-tools-mcp/dist/request-context.js +176 -6
- package/packages/lsp-tools-mcp/dist/tools.js +2118 -446
- 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/dist/.omo-runtime-manifest.json +55 -0
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +2959 -944
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook-cli.js +0 -4
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.d.ts +5 -2
- package/packages/omo-codex/plugin/components/lsp/dist/codex-hook.js +41 -62
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.d.ts +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/daemon-cli-path.js +24 -15
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.d.ts +3 -7
- package/packages/omo-codex/plugin/components/lsp/dist/lsp-session-state.js +23 -49
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +3 -2
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.mjs +31 -1
- package/packages/omo-codex/plugin/components/lsp/scripts/build-lsp-daemon.test.mjs +76 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.mjs +201 -0
- package/packages/omo-codex/plugin/components/lsp/scripts/build-runtime.test.mjs +55 -0
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook-cli.ts +0 -4
- package/packages/omo-codex/plugin/components/lsp/src/codex-hook.ts +49 -71
- package/packages/omo-codex/plugin/components/lsp/src/daemon-cli-path.ts +26 -15
- package/packages/omo-codex/plugin/components/lsp/src/lsp-session-state.ts +26 -64
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook-unavailable.test.ts +16 -17
- package/packages/omo-codex/plugin/components/lsp/test/codex-hook.test.ts +30 -4
- package/packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts +19 -5
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.5.md +1 -1
- package/packages/omo-codex/plugin/components/rules/bundled-rules/hephaestus/gpt-5.6.md +8 -6
- 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 +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/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/directive.md +37 -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 +37 -10
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +37 -10
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +10 -9
- 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 +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/stop-checking-ulw-loop-resume.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 +26 -14
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/build-bundled-mcp-runtimes.mjs +2 -3
- package/packages/omo-codex/plugin/scripts/build-components.mjs +13 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +9 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/packages/omo-codex/plugin/skills/frontend/references/design/layout-skill.md +107 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +12 -2
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +37 -10
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +10 -9
- package/packages/omo-codex/plugin/test/aggregate-build.test.mjs +8 -0
- package/packages/omo-codex/plugin/test/component-bundled-cli.test.mjs +128 -15
- package/packages/omo-codex/plugin/test/install-time-build-runtime.test.mjs +10 -0
- package/packages/omo-codex/plugin/test/lsp-prebuild-layouts.test.mjs +2 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +1 -1
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +351 -74
- package/packages/shared-skills/skills/frontend/SKILL.md +1 -1
- package/packages/shared-skills/skills/frontend/references/design/README.md +9 -0
- package/packages/shared-skills/skills/frontend/references/design/design-system-architecture.md +4 -2
- package/packages/shared-skills/skills/frontend/references/design/layout-skill.md +107 -0
- package/packages/shared-skills/skills/programming/SKILL.md +12 -2
package/dist/index.js
CHANGED
|
@@ -6777,11 +6777,17 @@ function toGitFileStatus(statusToken) {
|
|
|
6777
6777
|
return "deleted";
|
|
6778
6778
|
return "modified";
|
|
6779
6779
|
}
|
|
6780
|
+
function normalizeGitStatusPath(statusToken, filePath) {
|
|
6781
|
+
if (statusToken !== "R" && statusToken !== "C")
|
|
6782
|
+
return filePath;
|
|
6783
|
+
const arrowIndex = filePath.lastIndexOf(" -> ");
|
|
6784
|
+
return arrowIndex === -1 ? filePath : filePath.slice(arrowIndex + 4);
|
|
6785
|
+
}
|
|
6780
6786
|
function parseGitStatusPorcelainLine(line) {
|
|
6781
6787
|
if (!line)
|
|
6782
6788
|
return null;
|
|
6783
6789
|
const statusToken = line.substring(0, 2).trim();
|
|
6784
|
-
const filePath = line.substring(3);
|
|
6790
|
+
const filePath = normalizeGitStatusPath(statusToken, line.substring(3));
|
|
6785
6791
|
if (!filePath)
|
|
6786
6792
|
return null;
|
|
6787
6793
|
return {
|
|
@@ -22492,6 +22498,9 @@ function classifyRuntimeFallbackError(error) {
|
|
|
22492
22498
|
if (errorName?.includes("messageabortederror") || errorName?.includes("aborterror")) {
|
|
22493
22499
|
return "abort";
|
|
22494
22500
|
}
|
|
22501
|
+
if (errorName === "contextoverflowerror") {
|
|
22502
|
+
return "context_overflow";
|
|
22503
|
+
}
|
|
22495
22504
|
if (errorName?.includes("ailoadapikeyerror") || errorName?.includes("loadapi") || /api.?key.?is.?missing/i.test(message) && /environment variable/i.test(message)) {
|
|
22496
22505
|
return "missing_api_key";
|
|
22497
22506
|
}
|
|
@@ -22510,7 +22519,7 @@ function isRuntimeFallbackRetryableError(error, retryOnErrors, options = {}) {
|
|
|
22510
22519
|
const statusCode = getRuntimeFallbackStatusCode(error, retryOnErrors);
|
|
22511
22520
|
const message = getRuntimeFallbackErrorMessage(error);
|
|
22512
22521
|
const errorType = classifyRuntimeFallbackError(error);
|
|
22513
|
-
if (errorType === "abort")
|
|
22522
|
+
if (errorType === "abort" || errorType === "context_overflow")
|
|
22514
22523
|
return false;
|
|
22515
22524
|
if (errorType === "missing_api_key" || errorType === "model_not_found" || errorType === "quota_exceeded") {
|
|
22516
22525
|
return true;
|
|
@@ -89664,7 +89673,7 @@ function getCachedVersion(options = {}) {
|
|
|
89664
89673
|
// package.json
|
|
89665
89674
|
var package_default = {
|
|
89666
89675
|
name: "oh-my-opencode",
|
|
89667
|
-
version: "4.
|
|
89676
|
+
version: "4.18.1",
|
|
89668
89677
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
89669
89678
|
main: "./dist/index.js",
|
|
89670
89679
|
types: "dist/index.d.ts",
|
|
@@ -89771,8 +89780,10 @@ var package_default = {
|
|
|
89771
89780
|
build: "bun run script/build.ts",
|
|
89772
89781
|
"build:cli-node": "bun run script/build-cli-node.ts",
|
|
89773
89782
|
"build:codex-install": "bun run script/build-codex-install.ts",
|
|
89783
|
+
"install:codex-dev": "bun run script/build-codex-install.ts && bun run script/install-codex-dev.ts",
|
|
89774
89784
|
"build:codex-plugin": "npm --prefix packages/omo-codex/plugin ci && bun run --cwd packages/omo-codex/plugin build",
|
|
89775
|
-
"build:senpi-plugin": "
|
|
89785
|
+
"build:senpi-plugin": "bun run build:lsp-daemon && bun run build:senpi-plugin:stage",
|
|
89786
|
+
"build:senpi-plugin:stage": "node packages/omo-senpi/plugin/scripts/stage-lsp-daemon-runtime.mjs && node packages/omo-senpi/plugin/scripts/build-extension.mjs && node packages/omo-senpi/plugin/scripts/sync-skills.mjs && node packages/omo-senpi/plugin/scripts/embed-directive.mjs --check && node packages/omo-senpi/plugin/scripts/build-install.mjs",
|
|
89776
89787
|
"build:materialize-frontend": "node packages/omo-codex/plugin/scripts/materialize-shared-upstreams.mjs --strict",
|
|
89777
89788
|
"build:shared-skills-assets": "bun run build:materialize-frontend && rm -rf dist/skills && cp -R packages/shared-skills/skills dist/skills",
|
|
89778
89789
|
"build:lsp-tools-mcp": "npm --prefix packages/lsp-tools-mcp ci && npm --prefix packages/lsp-tools-mcp run build",
|
|
@@ -89794,7 +89805,7 @@ var package_default = {
|
|
|
89794
89805
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
89795
89806
|
test: "bun test",
|
|
89796
89807
|
"test:codex": "bun run build:codex-install && bun run build:git-bash-mcp && bun run build:lsp-tools-mcp && bun run build:lsp-daemon && npm --prefix packages/lsp-tools-mcp test && npm --prefix packages/omo-codex/plugin ci && npm --prefix packages/omo-codex/plugin/components/ulw-loop test && bun run --cwd packages/omo-codex/plugin build && npm --prefix packages/omo-codex/plugin/components/codegraph run typecheck && npm --prefix packages/omo-codex/plugin/components/codegraph test && node scripts/check-third-party-notices.mjs --ship && bun test packages/omo-opencode/src/cli/cli-installer.platform.test.ts packages/omo-codex/src/install/codex-cache.test.ts packages/omo-codex/src/install/codex-cleanup.test.ts packages/omo-codex/src/install/codex-config-agent-cleanup.test.ts packages/omo-codex/src/install/codex-config-autonomous-features.test.ts packages/omo-codex/src/install/codex-config-reasoning.test.ts packages/omo-codex/src/install/codex-config-toml.test.ts packages/omo-codex/src/install/codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex-project-local-cleanup.test.ts packages/omo-codex/src/install/install-codex.test.ts packages/omo-codex/src/install/install-codex-packaged.test.ts packages/omo-codex/src/install/link-cached-plugin-agents.test.ts packages/omo-codex/src/**/*.test.ts packages/utils/src/jsonc-parser.test.ts packages/utils/src/frontmatter.test.ts packages/hashline-core/src/hash-computation.test.ts packages/hashline-core/src/smoke-untested-modules.test.ts packages/rules-engine/src/index.test.ts packages/rules-engine/src/security-boundary.test.ts packages/agents-md-core/src/injector.test.ts packages/omo-codex/plugin/components/lsp/test/package-smoke.test.ts && node --test packages/omo-codex/plugin/test/*.test.mjs packages/omo-codex/scripts/install-cache-copy.test.mjs packages/omo-codex/scripts/install-cli-args.test.mjs packages/omo-codex/scripts/install-delegated-command.test.mjs packages/omo-codex/scripts/install-config-autonomous-features.test.mjs packages/omo-codex/scripts/install-config-autonomous.test.mjs packages/omo-codex/scripts/install-config-reasoning.test.mjs packages/omo-codex/scripts/install-config.test.mjs packages/omo-codex/scripts/install-hook-targets.test.mjs packages/omo-codex/scripts/install-project-local-cleanup.test.mjs packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs packages/omo-codex/scripts/install-local-entrypoint.test.mjs packages/omo-codex/scripts/install-local-git-bash-preflight.test.mjs packages/omo-codex/scripts/install-local.test.mjs packages/omo-codex/scripts/install-marketplace-cache.test.mjs packages/omo-codex/scripts/install-mcp-context7-runtime.test.mjs packages/omo-codex/scripts/install-mcp-runtime.test.mjs packages/omo-codex/scripts/install-packaged-local.test.mjs packages/omo-codex/scripts/install-generated-bundle.test.mjs packages/omo-codex/scripts/install-agent-links.test.mjs packages/omo-codex/scripts/install-bin-links.test.mjs",
|
|
89797
|
-
"test:senpi": "
|
|
89808
|
+
"test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test packages/omo-senpi",
|
|
89798
89809
|
"test:windows-codex": "bun run test:codex",
|
|
89799
89810
|
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build"
|
|
89800
89811
|
},
|
|
@@ -89834,7 +89845,6 @@ var package_default = {
|
|
|
89834
89845
|
picocolors: "^1.1.1",
|
|
89835
89846
|
picomatch: "^4.0.4",
|
|
89836
89847
|
"posthog-node": "^5.34.3",
|
|
89837
|
-
"vscode-jsonrpc": "^8.2.1",
|
|
89838
89848
|
zod: "^4.4.3"
|
|
89839
89849
|
},
|
|
89840
89850
|
devDependencies: {
|
|
@@ -89875,18 +89885,18 @@ var package_default = {
|
|
|
89875
89885
|
typescript: "^6.0.3"
|
|
89876
89886
|
},
|
|
89877
89887
|
optionalDependencies: {
|
|
89878
|
-
"oh-my-opencode-darwin-arm64": "4.
|
|
89879
|
-
"oh-my-opencode-darwin-x64": "4.
|
|
89880
|
-
"oh-my-opencode-darwin-x64-baseline": "4.
|
|
89881
|
-
"oh-my-opencode-linux-arm64": "4.
|
|
89882
|
-
"oh-my-opencode-linux-arm64-musl": "4.
|
|
89883
|
-
"oh-my-opencode-linux-x64": "4.
|
|
89884
|
-
"oh-my-opencode-linux-x64-baseline": "4.
|
|
89885
|
-
"oh-my-opencode-linux-x64-musl": "4.
|
|
89886
|
-
"oh-my-opencode-linux-x64-musl-baseline": "4.
|
|
89887
|
-
"oh-my-opencode-windows-arm64": "4.
|
|
89888
|
-
"oh-my-opencode-windows-x64": "4.
|
|
89889
|
-
"oh-my-opencode-windows-x64-baseline": "4.
|
|
89888
|
+
"oh-my-opencode-darwin-arm64": "4.18.1",
|
|
89889
|
+
"oh-my-opencode-darwin-x64": "4.18.1",
|
|
89890
|
+
"oh-my-opencode-darwin-x64-baseline": "4.18.1",
|
|
89891
|
+
"oh-my-opencode-linux-arm64": "4.18.1",
|
|
89892
|
+
"oh-my-opencode-linux-arm64-musl": "4.18.1",
|
|
89893
|
+
"oh-my-opencode-linux-x64": "4.18.1",
|
|
89894
|
+
"oh-my-opencode-linux-x64-baseline": "4.18.1",
|
|
89895
|
+
"oh-my-opencode-linux-x64-musl": "4.18.1",
|
|
89896
|
+
"oh-my-opencode-linux-x64-musl-baseline": "4.18.1",
|
|
89897
|
+
"oh-my-opencode-windows-arm64": "4.18.1",
|
|
89898
|
+
"oh-my-opencode-windows-x64": "4.18.1",
|
|
89899
|
+
"oh-my-opencode-windows-x64-baseline": "4.18.1"
|
|
89890
89900
|
},
|
|
89891
89901
|
overrides: {
|
|
89892
89902
|
"@earendil-works/pi-agent-core": "0.80.3",
|
|
@@ -95620,8 +95630,8 @@ Before acting, survey the skills available in this system: scan their descriptio
|
|
|
95620
95630
|
**ALWAYS run both tracks in parallel:**
|
|
95621
95631
|
\`\`\`
|
|
95622
95632
|
// Fire background agents for deep exploration
|
|
95623
|
-
task(subagent_type="explore", load_skills=[], prompt="
|
|
95624
|
-
task(subagent_type="librarian", load_skills=[], prompt="
|
|
95633
|
+
task(subagent_type="explore", load_skills=[], prompt="CONTEXT: implementing [TASK]; gap: [KNOWLEDGE GAP]. GOAL: find [X] patterns in the codebase - file paths, implementation approach, conventions, module connections - to unblock [DOWNSTREAM DECISION]. Focus on production code in src/. STOP WHEN: the findings answer the gap or two search rounds add nothing new. EVIDENCE: file:line refs with one-line descriptions.", run_in_background=true)
|
|
95634
|
+
task(subagent_type="librarian", load_skills=[], prompt="CONTEXT: working with [TECHNOLOGY]; need [SPECIFIC INFO]. GOAL: official docs and production examples for [Y] - API reference, configuration, recommended patterns, pitfalls - to unblock [DECISION THIS INFORMS]. Skip tutorials. STOP WHEN: the cited sources answer [SPECIFIC INFO] or sources repeat. EVIDENCE: source links with the claim each supports.", run_in_background=true)
|
|
95625
95635
|
|
|
95626
95636
|
// WHILE THEY RUN - use direct tools for immediate context
|
|
95627
95637
|
grep(pattern="relevant_pattern", path="src/")
|
|
@@ -95640,7 +95650,7 @@ deep_context = background_output(task_id=...)
|
|
|
95640
95650
|
|
|
95641
95651
|
**Execute:**
|
|
95642
95652
|
- Surgical, minimal changes matching existing patterns
|
|
95643
|
-
- If delegating:
|
|
95653
|
+
- If delegating: every child prompt carries GOAL, STOP WHEN (the exact observable condition that ends its run \u2014 the child stops the moment it holds), and EVIDENCE (what it returns so you can verify, not trust) \u2014 plus exhaustive context. Judge the child by its returned EVIDENCE against its STOP WHEN, never by its self-report.
|
|
95644
95654
|
|
|
95645
95655
|
**Verify (per-scenario, not just "at the end"):**
|
|
95646
95656
|
- RED\u2192GREEN proof captured (test id + assertion msg in both states)
|
|
@@ -95659,7 +95669,7 @@ Define 3+ scenarios covering: **happy path**, **edge** (boundary / empty / malfo
|
|
|
95659
95669
|
- The real surface that proves it.
|
|
95660
95670
|
- The test file + test id (written test-first; see TDD).
|
|
95661
95671
|
|
|
95662
|
-
Scenarios are the contract. Done = every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured.
|
|
95672
|
+
Scenarios are the contract. Done = every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured. Then declare WHEN TO STOP for the whole run, in one line: "I'll stop right away when <the exact observable state that ends this run>" \u2014 its end state MUST be the full STOP GOAL from the Stop rules, never scenario completion alone. The Stop rules bind to this line \u2014 the moment it holds, you stop.
|
|
95663
95673
|
|
|
95664
95674
|
## TDD (MANDATORY on every production change)
|
|
95665
95675
|
|
|
@@ -95703,13 +95713,12 @@ Name the exact tool + exact invocation per scenario (literal \`curl\` / \`send-k
|
|
|
95703
95713
|
|
|
95704
95714
|
Trigger if user said "\uC5C4\uBC00"/"strictly"/"rigorously"/"properly review", or task touches 3+ files OR ran 20+ turns OR 30+ min, or it's a refactor/migration/perf/security change. Spawn a high-rigor reviewer via \`task\` with goal + scenarios + evidence + diff. A concern blocks only when it cites a success criterion the evidence fails \u2014 others are notes. Fix cited blockers, re-run only the affected QA, and re-submit the delta at most twice; an approval with only notes left counts as approval. If cited blockers remain after two re-reviews, surface them to the user before declaring done.
|
|
95705
95715
|
|
|
95706
|
-
##
|
|
95716
|
+
## STOP RULES
|
|
95707
95717
|
|
|
95708
|
-
|
|
95709
|
-
|
|
95710
|
-
2
|
|
95711
|
-
|
|
95712
|
-
4. Reviewer gate (if triggered) returned unconditional approval.
|
|
95718
|
+
- After each result, ask whether the user's core request can now be answered with useful evidence in hand. If yes, answer now \u2014 skip any remaining retrieval, ceremony, or verification that adds no evidence.
|
|
95719
|
+
- The STOP GOAL: every scenario PASSES with RED\u2192GREEN proof AND real-surface artifact captured; full suite green and \`lsp_diagnostics\` clean on changed files; QA teardown receipts recorded; no scope creep; and (if triggered) the reviewer gate approved unconditionally. Above ALL of that, the decisive test \u2014 outranking every other consideration \u2014 is: is the user's problem ACTUALLY SOLVED in observable behavior? If no, you are NOT done, whatever the checklist says. If yes, deliver the final message and STOP \u2014 no hesitation, no extra verification pass, no polish loop. Work past the stop goal is scope creep, not diligence.
|
|
95720
|
+
- After 2 identical failed attempts at one step, surface what was tried and ask the user before another retry.
|
|
95721
|
+
- After 2 parallel exploration waves yield no new useful facts, stop exploring and act.
|
|
95713
95722
|
|
|
95714
95723
|
**Deliver exactly what was asked. No more, no less.**
|
|
95715
95724
|
|
|
@@ -117697,9 +117706,8 @@ async function getSdkAllSessions(client3) {
|
|
|
117697
117706
|
return sessions.map((session) => session.id);
|
|
117698
117707
|
}
|
|
117699
117708
|
async function sdkSessionExists(client3, sessionID) {
|
|
117700
|
-
const
|
|
117701
|
-
|
|
117702
|
-
return sessions.some((session) => session.id === sessionID);
|
|
117709
|
+
const messages = await getSdkSessionMessages(client3, sessionID);
|
|
117710
|
+
return messages.length > 0;
|
|
117703
117711
|
}
|
|
117704
117712
|
async function getSdkSessionMessages(client3, sessionID) {
|
|
117705
117713
|
const response = await fetchSdkResponse(() => client3.session.messages({ path: { id: sessionID } }));
|
|
@@ -131025,11 +131033,7 @@ The fallback retry session is now created and can be inspected directly.
|
|
|
131025
131033
|
throw new Error(`Task has no sessionID: ${existingTask.id}`);
|
|
131026
131034
|
}
|
|
131027
131035
|
if (existingTask.status === "running") {
|
|
131028
|
-
|
|
131029
|
-
taskId: existingTask.id,
|
|
131030
|
-
sessionID: existingTask.sessionId
|
|
131031
|
-
});
|
|
131032
|
-
return existingTask;
|
|
131036
|
+
throw new Error(`Task ${existingTask.id} is currently running and cannot accept a continuation prompt. ` + "Wait for it to complete before resuming it with task_id.");
|
|
131033
131037
|
}
|
|
131034
131038
|
const resumeSnapshot = this.captureResumeTaskSnapshot(existingTask);
|
|
131035
131039
|
const completionTimer = this.completionTimers.get(existingTask.id);
|
|
@@ -150399,7 +150403,7 @@ ID contract: background task IDs (\`bg_...\`) use \`background_output(task_id="b
|
|
|
150399
150403
|
|
|
150400
150404
|
User instructions override these defaults; newer instructions override older ones. Safety and type-safety constraints never yield.
|
|
150401
150405
|
|
|
150402
|
-
Implement, don't propose. Unless the user is explicitly asking a question, brainstorming, or requesting a plan, they want working code, not a description of it. Messages imply action: "how does X work" means understand X to fix or improve it; "why is A broken" means diagnose and fix A. Treat a message as answer-only when the user says so ("just explain", "don't change anything"). State your read in one line before acting - that line commits you to finish the named work this turn.
|
|
150406
|
+
Implement, don't propose. Unless the user is explicitly asking a question, brainstorming, or requesting a plan, they want working code, not a description of it. Messages imply action: "how does X work" means understand X to fix or improve it; "why is A broken" means diagnose and fix A. Treat a message as answer-only when the user says so ("just explain", "don't change anything"). State your read in one line before acting - name the work and end with "I'll stop right away when <the exact, observable condition that ends this turn>". That line commits you to finish the named work this turn, and the stop condition you declared is BINDING - the instant it holds, stop (see Stop Rules).
|
|
150403
150407
|
|
|
150404
150408
|
Make the requested in-scope changes and run non-destructive validation without asking first. Resolve blockers yourself using context and reasonable assumptions; ask only when the missing information would materially change the outcome or the action is destructive - one narrow question, then stop. Never ask permission for obvious work.
|
|
150405
150409
|
|
|
@@ -150497,7 +150501,7 @@ AGENTS.md files carry directory-scoped conventions. Obey them for files in their
|
|
|
150497
150501
|
|
|
150498
150502
|
- Every \`task()\` call needs \`load_skills\` (an empty array \`[]\` is valid).
|
|
150499
150503
|
- Reuse continuation IDs (\`ses_...\`) for follow-ups via \`task(task_id="ses_...")\`; never pass background task IDs (\`bg_...\`) to \`task()\`. This preserves the sub-agent's full context and saves 70%+ of tokens.
|
|
150500
|
-
- Sub-agent prompts carry
|
|
150504
|
+
- Sub-agent prompts carry six fields - **CONTEXT** (task, modules, approach), **GOAL** (the one outcome that makes the child done), **STOP WHEN** (the exact, observable condition that ends its run; the child stops the moment it holds, exactly like your own intent line), **EVIDENCE** (what the child returns so you can SEE, not trust, that the condition held), **DOWNSTREAM** (how you will use the result), **REQUEST** (what to find, return format, what to skip). Fill GOAL, STOP WHEN, and EVIDENCE with outcomes and binding constraints, never mechanisms - name the behavior the child's work must achieve or distinguish, not a copy-ready assertion string, prompt fragment, or expected pass/assert count. Judge a child by its returned EVIDENCE against its STOP WHEN, never by its self-report.
|
|
150501
150505
|
|
|
150502
150506
|
**Background tasks.** Collect results via \`background_output(task_id="bg_...")\` after completion. Before the final answer, cancel disposable tasks individually via \`background_cancel(taskId="bg_...")\`; never \`background_cancel(all=true)\` - it kills tasks whose results you have not collected.
|
|
150503
150507
|
|
|
@@ -150521,11 +150525,11 @@ Done when ALL of:
|
|
|
150521
150525
|
- The artifact has been driven through its matching surface this turn (Manual QA Gate).
|
|
150522
150526
|
- The final message reports what you did, what you verified, what you could not verify (with the reason), and pre-existing issues you noticed but did not touch.
|
|
150523
150527
|
|
|
150524
|
-
When you think you are done: re-read the original request and your intent line,
|
|
150528
|
+
When you think you are done: re-read the original request and your intent line once, and confirm each criterion above against the evidence you already captured - do not open a fresh validation pass to manufacture it.
|
|
150525
150529
|
|
|
150526
150530
|
# Stop Rules
|
|
150527
150531
|
|
|
150528
|
-
Write the final message and stop only when Success Criteria are all true. Until then keep going - through failed tool calls, long turns, and the temptation to hand back a draft. Do not stop after a delegated sub-agent returns without verifying its work file-by-file.
|
|
150532
|
+
Write the final message and stop only when Success Criteria are all true. Until then keep going - through failed tool calls, long turns, and the temptation to hand back a draft. Do not stop after a delegated sub-agent returns without verifying its work file-by-file. The moment Success Criteria hold and the stop condition from your intent line is met, deliver the final message and STOP - stopping is mandatory and immediate, not a judgment call. No extra validation loop, no re-polish, no bonus refactor, no drive-by cleanup; every action past the stop goal is a defect, not diligence.
|
|
150529
150533
|
|
|
150530
150534
|
**Hard invariants** - non-negotiable, regardless of pressure to ship:
|
|
150531
150535
|
|
|
@@ -153757,9 +153761,10 @@ function createCodegraphMcpConfig(options = {}) {
|
|
|
153757
153761
|
}
|
|
153758
153762
|
|
|
153759
153763
|
// packages/omo-opencode/src/mcp/lsp.ts
|
|
153760
|
-
import { existsSync as existsSync113 } from "fs";
|
|
153764
|
+
import { existsSync as existsSync113, readFileSync as readFileSync78 } from "fs";
|
|
153761
153765
|
import { delimiter as delimiter2, dirname as dirname45, resolve as resolve39 } from "path";
|
|
153762
153766
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
153767
|
+
import { z as z11 } from "zod";
|
|
153763
153768
|
|
|
153764
153769
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
153765
153770
|
function normalizeCliPath(path22) {
|
|
@@ -153822,8 +153827,15 @@ var LSP_TOOLS_PACKAGE_REL = "packages/lsp-tools-mcp";
|
|
|
153822
153827
|
var DIST_CLI_REL = "dist/cli.js";
|
|
153823
153828
|
var SOURCE_CLI_REL = "src/cli.ts";
|
|
153824
153829
|
var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-client.json"];
|
|
153830
|
+
var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
|
|
153831
|
+
var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
|
|
153832
|
+
var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
153833
|
+
var DaemonPackageSchema = z11.object({
|
|
153834
|
+
version: z11.string().min(1)
|
|
153835
|
+
});
|
|
153825
153836
|
var LSP_BOOTSTRAP_SCRIPT = [
|
|
153826
153837
|
"const { existsSync } = require('node:fs')",
|
|
153838
|
+
"const { createRequire } = require('node:module')",
|
|
153827
153839
|
"const { join } = require('node:path')",
|
|
153828
153840
|
"const { spawnSync } = require('node:child_process')",
|
|
153829
153841
|
"const root = process.argv[1]",
|
|
@@ -153832,16 +153844,18 @@ var LSP_BOOTSTRAP_SCRIPT = [
|
|
|
153832
153844
|
`const toolsPackage = join(root, '${LSP_TOOLS_PACKAGE_REL}')`,
|
|
153833
153845
|
`const daemonPackage = join(root, '${PACKAGE_REL}')`,
|
|
153834
153846
|
"const toolsDist = join(toolsPackage, 'dist/cli.js')",
|
|
153835
|
-
"const
|
|
153847
|
+
"const daemonPackageJson = join(daemonPackage, 'package.json')",
|
|
153836
153848
|
"const daemonSource = join(daemonPackage, 'src/cli.ts')",
|
|
153837
153849
|
"const run = (command, args, stdio) => spawnSync(command, args, { cwd: root, env: process.env, stdio })",
|
|
153838
153850
|
"const finish = (result) => { if (result.error) { console.error(result.error.message); process.exit(1) } process.exit(result.status ?? 1) }",
|
|
153839
153851
|
"const runIfAvailable = (command, args) => { const result = run(command, args, 'inherit'); if (result.error) return false; finish(result); return true }",
|
|
153840
|
-
|
|
153841
|
-
"
|
|
153852
|
+
`const resolveDaemonCli = () => { try { return createRequire(daemonPackageJson).resolve('${DAEMON_PACKAGE_NAME}/cli') } catch (error) { if (error instanceof Error) return null; throw error } }`,
|
|
153853
|
+
"const daemonCli = existsSync(daemonPackageJson) ? resolveDaemonCli() : null",
|
|
153854
|
+
"if (daemonCli) finish(run(process.execPath, [daemonCli, 'mcp'], 'inherit'))",
|
|
153855
|
+
`if (existsSync(daemonSource) && existsSync(toolsDist)) { const pkg = require(daemonPackageJson); process.env.${OMO_LSP_DAEMON_CLI} = daemonSource; process.env.${OMO_LSP_DAEMON_VERSION} = pkg.version; runIfAvailable(bun, [daemonSource, 'mcp']) }`,
|
|
153842
153856
|
"const steps = [[npm, ['--prefix', toolsPackage, 'install', '--no-package-lock', '--no-audit', '--no-fund']], [npm, ['--prefix', toolsPackage, 'run', 'build']], [npm, ['--prefix', daemonPackage, 'install', '--no-package-lock', '--no-audit', '--no-fund']], [npm, ['--prefix', daemonPackage, 'run', 'build']]]",
|
|
153843
153857
|
"for (const [command, args] of steps) { const result = run(command, args, ['ignore', 'ignore', 'inherit']); if (result.error || result.status !== 0) finish(result) }",
|
|
153844
|
-
"finish(run(process.execPath, [
|
|
153858
|
+
"finish(run(process.execPath, [resolveDaemonCli(), 'mcp'], 'inherit'))"
|
|
153845
153859
|
].join(";");
|
|
153846
153860
|
function getModuleDirectory(moduleUrl) {
|
|
153847
153861
|
try {
|
|
@@ -153855,6 +153869,16 @@ function getModuleDirectory(moduleUrl) {
|
|
|
153855
153869
|
function findBootstrapRoot(candidates, pathExists) {
|
|
153856
153870
|
return candidates.find((candidate) => pathExists(resolve39(candidate.root, "package.json")))?.root ?? process.cwd();
|
|
153857
153871
|
}
|
|
153872
|
+
function readDaemonPackageVersion(root) {
|
|
153873
|
+
try {
|
|
153874
|
+
const packageJson = JSON.parse(readFileSync78(resolve39(root, PACKAGE_REL, "package.json"), "utf-8"));
|
|
153875
|
+
return DaemonPackageSchema.parse(packageJson).version;
|
|
153876
|
+
} catch (error) {
|
|
153877
|
+
if (!(error instanceof Error))
|
|
153878
|
+
throw error;
|
|
153879
|
+
return null;
|
|
153880
|
+
}
|
|
153881
|
+
}
|
|
153858
153882
|
function createBootstrapCandidate(root, pathExists, resolveExecutable) {
|
|
153859
153883
|
const runtime7 = resolveJavaScriptRuntime(resolveExecutable);
|
|
153860
153884
|
const bun = resolveExecutable("bun");
|
|
@@ -153879,7 +153903,7 @@ function resolveLspCommand(options = {}) {
|
|
|
153879
153903
|
sourceCliRel: SOURCE_CLI_REL,
|
|
153880
153904
|
pathExists,
|
|
153881
153905
|
resolveExecutable,
|
|
153882
|
-
isSourceCandidateAvailable: ({ root }) => pathExists(resolve39(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL))
|
|
153906
|
+
isSourceCandidateAvailable: ({ root }) => pathExists(resolve39(root, LSP_TOOLS_PACKAGE_REL, DIST_CLI_REL)) && readDaemonPackageVersion(root) !== null
|
|
153883
153907
|
}) : [];
|
|
153884
153908
|
const distCandidate = candidates.find((candidate) => hasCliSuffix(candidate.path, DIST_CLI_REL) && candidate.exists);
|
|
153885
153909
|
if (distCandidate) {
|
|
@@ -153893,20 +153917,29 @@ function resolveLspCommand(options = {}) {
|
|
|
153893
153917
|
}
|
|
153894
153918
|
function createLspMcpConfig(options = {}) {
|
|
153895
153919
|
const resolvedCommand = resolveLspCommand(options);
|
|
153920
|
+
const cwd = resolve39(options.cwd ?? process.cwd());
|
|
153921
|
+
const configDir = getOpenCodeConfigDir({ binary: "opencode" });
|
|
153922
|
+
const sourceVersion = hasCliSuffix(resolvedCommand.path, SOURCE_CLI_REL) ? readDaemonPackageVersion(resolvedCommand.root) : null;
|
|
153896
153923
|
return {
|
|
153897
153924
|
type: "local",
|
|
153898
153925
|
command: resolvedCommand.command,
|
|
153899
153926
|
enabled: resolvedCommand.exists,
|
|
153900
153927
|
environment: {
|
|
153901
|
-
LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.join(delimiter2)
|
|
153928
|
+
LSP_TOOLS_MCP_PROJECT_CONFIG: PROJECT_LSP_CONFIGS.map((configPath) => resolve39(cwd, configPath)).join(delimiter2),
|
|
153929
|
+
LSP_TOOLS_MCP_USER_CONFIG: resolve39(configDir, "lsp.json"),
|
|
153930
|
+
LSP_TOOLS_MCP_INSTALL_DECISIONS: resolve39(configDir, "lsp-install-decisions.json"),
|
|
153931
|
+
...sourceVersion ? {
|
|
153932
|
+
[OMO_LSP_DAEMON_CLI]: resolvedCommand.path,
|
|
153933
|
+
[OMO_LSP_DAEMON_VERSION]: sourceVersion
|
|
153934
|
+
} : {}
|
|
153902
153935
|
}
|
|
153903
153936
|
};
|
|
153904
153937
|
}
|
|
153905
153938
|
|
|
153906
153939
|
// packages/omo-opencode/src/mcp/types.ts
|
|
153907
|
-
import { z as
|
|
153908
|
-
var McpNameSchema =
|
|
153909
|
-
var AnyMcpNameSchema =
|
|
153940
|
+
import { z as z12 } from "zod";
|
|
153941
|
+
var McpNameSchema = z12.enum(["websearch", "context7", "grep_app", "lsp", "codegraph"]);
|
|
153942
|
+
var AnyMcpNameSchema = z12.string().min(1);
|
|
153910
153943
|
|
|
153911
153944
|
// packages/omo-opencode/src/mcp/index.ts
|
|
153912
153945
|
function createBuiltinMcps(disabledMcps = [], config, options = {}) {
|
|
@@ -157983,14 +158016,14 @@ class OpencodeClient2 extends HeyApiClient {
|
|
|
157983
158016
|
// node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
157984
158017
|
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
157985
158018
|
// packages/omo-opencode/src/plugin/native-skills.ts
|
|
157986
|
-
import { z as
|
|
157987
|
-
var NativeSkillEntrySchema =
|
|
157988
|
-
name:
|
|
157989
|
-
description:
|
|
157990
|
-
location:
|
|
157991
|
-
content:
|
|
158019
|
+
import { z as z13 } from "zod";
|
|
158020
|
+
var NativeSkillEntrySchema = z13.object({
|
|
158021
|
+
name: z13.string(),
|
|
158022
|
+
description: z13.string().default(""),
|
|
158023
|
+
location: z13.string(),
|
|
158024
|
+
content: z13.string()
|
|
157992
158025
|
});
|
|
157993
|
-
var NativeSkillEntriesSchema =
|
|
158026
|
+
var NativeSkillEntriesSchema = z13.array(NativeSkillEntrySchema);
|
|
157994
158027
|
function getObjectProperty(value, property) {
|
|
157995
158028
|
if (typeof value !== "object" || value === null)
|
|
157996
158029
|
return;
|
|
@@ -159128,7 +159161,7 @@ async function resolveParticipant2(teamRunId, sessionID, config, deps) {
|
|
|
159128
159161
|
}
|
|
159129
159162
|
|
|
159130
159163
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
|
|
159131
|
-
import { z as
|
|
159164
|
+
import { z as z14 } from "zod";
|
|
159132
159165
|
init_types2();
|
|
159133
159166
|
var TEAM_CREATE_USAGE = 'team_create requires exactly one of teamName or inline_spec. Use team_create({ teamName: "existing-team" }) or team_create({ inline_spec: { name: "team-name", members: [{ name: "worker", category: "quick", prompt: "Do the assigned work." }] } }).';
|
|
159134
159167
|
function omitEmptyStringArgs(rawArgs) {
|
|
@@ -159137,10 +159170,10 @@ function omitEmptyStringArgs(rawArgs) {
|
|
|
159137
159170
|
}
|
|
159138
159171
|
return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
|
|
159139
159172
|
}
|
|
159140
|
-
var TeamCreateArgsSchema =
|
|
159141
|
-
teamName:
|
|
159142
|
-
inline_spec:
|
|
159143
|
-
leadSessionId:
|
|
159173
|
+
var TeamCreateArgsSchema = z14.preprocess(omitEmptyStringArgs, z14.object({
|
|
159174
|
+
teamName: z14.string().min(1).nullish(),
|
|
159175
|
+
inline_spec: z14.unknown().nullish(),
|
|
159176
|
+
leadSessionId: z14.string().nullish()
|
|
159144
159177
|
}).superRefine((value, ctx) => {
|
|
159145
159178
|
const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
|
|
159146
159179
|
if (optionCount !== 1) {
|
|
@@ -159261,7 +159294,7 @@ function createTeamCreateTool(config, client5, bgMgr, tmuxMgr, executorConfig, d
|
|
|
159261
159294
|
});
|
|
159262
159295
|
}
|
|
159263
159296
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
159264
|
-
import { z as
|
|
159297
|
+
import { z as z15 } from "zod";
|
|
159265
159298
|
// packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
|
|
159266
159299
|
init_store3();
|
|
159267
159300
|
init_shutdown_helpers();
|
|
@@ -159350,13 +159383,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
|
|
|
159350
159383
|
|
|
159351
159384
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
159352
159385
|
init_store2();
|
|
159353
|
-
var TeamDeleteArgsSchema =
|
|
159354
|
-
var TeamShutdownRequestArgsSchema =
|
|
159355
|
-
var TeamApproveShutdownArgsSchema =
|
|
159356
|
-
var TeamRejectShutdownArgsSchema =
|
|
159357
|
-
teamRunId:
|
|
159358
|
-
memberName:
|
|
159359
|
-
reason:
|
|
159386
|
+
var TeamDeleteArgsSchema = z15.object({ teamRunId: z15.string().min(1), force: z15.boolean().optional() });
|
|
159387
|
+
var TeamShutdownRequestArgsSchema = z15.object({ teamRunId: z15.string().min(1), targetMemberName: z15.string().min(1) });
|
|
159388
|
+
var TeamApproveShutdownArgsSchema = z15.object({ teamRunId: z15.string().min(1), memberName: z15.string().min(1) });
|
|
159389
|
+
var TeamRejectShutdownArgsSchema = z15.object({
|
|
159390
|
+
teamRunId: z15.string().min(1),
|
|
159391
|
+
memberName: z15.string().min(1),
|
|
159392
|
+
reason: z15.string().min(1)
|
|
159360
159393
|
});
|
|
159361
159394
|
var defaultTeamShutdownToolDeps = {
|
|
159362
159395
|
listActiveTeams,
|
|
@@ -163033,8 +163066,8 @@ import { homedir as homedir35 } from "os";
|
|
|
163033
163066
|
import * as path27 from "path";
|
|
163034
163067
|
|
|
163035
163068
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
163036
|
-
import { z as
|
|
163037
|
-
var BuiltinAgentNameSchema =
|
|
163069
|
+
import { z as z16 } from "zod";
|
|
163070
|
+
var BuiltinAgentNameSchema = z16.enum([
|
|
163038
163071
|
"sisyphus",
|
|
163039
163072
|
"hephaestus",
|
|
163040
163073
|
"prometheus",
|
|
@@ -163047,7 +163080,7 @@ var BuiltinAgentNameSchema = z15.enum([
|
|
|
163047
163080
|
"atlas",
|
|
163048
163081
|
"sisyphus-junior"
|
|
163049
163082
|
]);
|
|
163050
|
-
var BuiltinSkillNameSchema =
|
|
163083
|
+
var BuiltinSkillNameSchema = z16.enum([
|
|
163051
163084
|
"playwright",
|
|
163052
163085
|
"agent-browser",
|
|
163053
163086
|
"dev-browser",
|
|
@@ -163062,7 +163095,7 @@ var BuiltinSkillNameSchema = z15.enum([
|
|
|
163062
163095
|
"visual-qa",
|
|
163063
163096
|
"team-mode"
|
|
163064
163097
|
]);
|
|
163065
|
-
var OverridableAgentNameSchema =
|
|
163098
|
+
var OverridableAgentNameSchema = z16.enum([
|
|
163066
163099
|
"build",
|
|
163067
163100
|
"plan",
|
|
163068
163101
|
"sisyphus",
|
|
@@ -163079,40 +163112,40 @@ var OverridableAgentNameSchema = z15.enum([
|
|
|
163079
163112
|
"atlas"
|
|
163080
163113
|
]);
|
|
163081
163114
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
163082
|
-
import { z as
|
|
163115
|
+
import { z as z19 } from "zod";
|
|
163083
163116
|
|
|
163084
163117
|
// packages/omo-opencode/src/config/schema/fallback-models.ts
|
|
163085
|
-
import { z as
|
|
163086
|
-
var FallbackModelObjectSchema =
|
|
163087
|
-
model:
|
|
163088
|
-
variant:
|
|
163089
|
-
reasoningEffort:
|
|
163090
|
-
temperature:
|
|
163091
|
-
top_p:
|
|
163092
|
-
maxTokens:
|
|
163093
|
-
thinking:
|
|
163094
|
-
type:
|
|
163095
|
-
budgetTokens:
|
|
163118
|
+
import { z as z17 } from "zod";
|
|
163119
|
+
var FallbackModelObjectSchema = z17.object({
|
|
163120
|
+
model: z17.string(),
|
|
163121
|
+
variant: z17.string().optional(),
|
|
163122
|
+
reasoningEffort: z17.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
163123
|
+
temperature: z17.number().min(0).max(2).optional(),
|
|
163124
|
+
top_p: z17.number().min(0).max(1).optional(),
|
|
163125
|
+
maxTokens: z17.number().optional(),
|
|
163126
|
+
thinking: z17.object({
|
|
163127
|
+
type: z17.enum(["enabled", "disabled"]),
|
|
163128
|
+
budgetTokens: z17.number().optional()
|
|
163096
163129
|
}).optional()
|
|
163097
163130
|
});
|
|
163098
|
-
var FallbackModelStringArraySchema =
|
|
163099
|
-
var FallbackModelObjectArraySchema =
|
|
163100
|
-
var FallbackModelMixedArraySchema =
|
|
163101
|
-
var FallbackModelsSchema =
|
|
163102
|
-
|
|
163131
|
+
var FallbackModelStringArraySchema = z17.array(z17.string());
|
|
163132
|
+
var FallbackModelObjectArraySchema = z17.array(FallbackModelObjectSchema);
|
|
163133
|
+
var FallbackModelMixedArraySchema = z17.array(z17.union([z17.string(), FallbackModelObjectSchema]));
|
|
163134
|
+
var FallbackModelsSchema = z17.union([
|
|
163135
|
+
z17.string(),
|
|
163103
163136
|
FallbackModelStringArraySchema,
|
|
163104
163137
|
FallbackModelObjectArraySchema,
|
|
163105
163138
|
FallbackModelMixedArraySchema
|
|
163106
163139
|
]);
|
|
163107
163140
|
|
|
163108
163141
|
// packages/omo-opencode/src/config/schema/internal/permission.ts
|
|
163109
|
-
import { z as
|
|
163110
|
-
var PermissionValueSchema =
|
|
163111
|
-
var BashPermissionSchema =
|
|
163142
|
+
import { z as z18 } from "zod";
|
|
163143
|
+
var PermissionValueSchema = z18.enum(["ask", "allow", "deny"]);
|
|
163144
|
+
var BashPermissionSchema = z18.union([
|
|
163112
163145
|
PermissionValueSchema,
|
|
163113
|
-
|
|
163146
|
+
z18.record(z18.string(), PermissionValueSchema)
|
|
163114
163147
|
]);
|
|
163115
|
-
var AgentPermissionSchema =
|
|
163148
|
+
var AgentPermissionSchema = z18.object({
|
|
163116
163149
|
edit: PermissionValueSchema.optional(),
|
|
163117
163150
|
bash: BashPermissionSchema.optional(),
|
|
163118
163151
|
webfetch: PermissionValueSchema.optional(),
|
|
@@ -163122,46 +163155,46 @@ var AgentPermissionSchema = z17.object({
|
|
|
163122
163155
|
}).catchall(PermissionValueSchema.optional());
|
|
163123
163156
|
|
|
163124
163157
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
163125
|
-
var AgentOverrideConfigSchema =
|
|
163126
|
-
model:
|
|
163158
|
+
var AgentOverrideConfigSchema = z19.object({
|
|
163159
|
+
model: z19.string().optional(),
|
|
163127
163160
|
fallback_models: FallbackModelsSchema.optional(),
|
|
163128
|
-
variant:
|
|
163129
|
-
category:
|
|
163130
|
-
skills:
|
|
163131
|
-
temperature:
|
|
163132
|
-
top_p:
|
|
163133
|
-
prompt:
|
|
163134
|
-
prompt_append:
|
|
163135
|
-
tools:
|
|
163136
|
-
disable:
|
|
163137
|
-
description:
|
|
163138
|
-
mode:
|
|
163139
|
-
color:
|
|
163140
|
-
displayName:
|
|
163161
|
+
variant: z19.string().optional(),
|
|
163162
|
+
category: z19.string().optional(),
|
|
163163
|
+
skills: z19.array(z19.string()).optional(),
|
|
163164
|
+
temperature: z19.number().min(0).max(2).optional(),
|
|
163165
|
+
top_p: z19.number().min(0).max(1).optional(),
|
|
163166
|
+
prompt: z19.string().optional(),
|
|
163167
|
+
prompt_append: z19.string().optional(),
|
|
163168
|
+
tools: z19.record(z19.string(), z19.boolean()).optional(),
|
|
163169
|
+
disable: z19.boolean().optional(),
|
|
163170
|
+
description: z19.string().optional(),
|
|
163171
|
+
mode: z19.enum(["subagent", "primary", "all"]).optional(),
|
|
163172
|
+
color: z19.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
163173
|
+
displayName: z19.string().optional(),
|
|
163141
163174
|
permission: AgentPermissionSchema.optional(),
|
|
163142
|
-
maxTokens:
|
|
163143
|
-
thinking:
|
|
163144
|
-
type:
|
|
163145
|
-
budgetTokens:
|
|
163175
|
+
maxTokens: z19.number().optional(),
|
|
163176
|
+
thinking: z19.object({
|
|
163177
|
+
type: z19.enum(["enabled", "disabled"]),
|
|
163178
|
+
budgetTokens: z19.number().optional()
|
|
163146
163179
|
}).optional(),
|
|
163147
|
-
reasoningEffort:
|
|
163148
|
-
textVerbosity:
|
|
163149
|
-
providerOptions:
|
|
163150
|
-
ultrawork:
|
|
163151
|
-
model:
|
|
163152
|
-
variant:
|
|
163180
|
+
reasoningEffort: z19.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
163181
|
+
textVerbosity: z19.enum(["low", "medium", "high"]).optional(),
|
|
163182
|
+
providerOptions: z19.record(z19.string(), z19.unknown()).optional(),
|
|
163183
|
+
ultrawork: z19.object({
|
|
163184
|
+
model: z19.string().optional(),
|
|
163185
|
+
variant: z19.string().optional()
|
|
163153
163186
|
}).optional(),
|
|
163154
|
-
compaction:
|
|
163155
|
-
model:
|
|
163156
|
-
variant:
|
|
163187
|
+
compaction: z19.object({
|
|
163188
|
+
model: z19.string().optional(),
|
|
163189
|
+
variant: z19.string().optional()
|
|
163157
163190
|
}).optional()
|
|
163158
163191
|
});
|
|
163159
|
-
var AgentOverridesSchema =
|
|
163192
|
+
var AgentOverridesSchema = z19.object({
|
|
163160
163193
|
build: AgentOverrideConfigSchema.optional(),
|
|
163161
163194
|
plan: AgentOverrideConfigSchema.optional(),
|
|
163162
163195
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
163163
163196
|
hephaestus: AgentOverrideConfigSchema.extend({
|
|
163164
|
-
allow_non_gpt_model:
|
|
163197
|
+
allow_non_gpt_model: z19.boolean().optional()
|
|
163165
163198
|
}).optional(),
|
|
163166
163199
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
163167
163200
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
@@ -163175,65 +163208,65 @@ var AgentOverridesSchema = z18.object({
|
|
|
163175
163208
|
atlas: AgentOverrideConfigSchema.optional()
|
|
163176
163209
|
}).catchall(AgentOverrideConfigSchema.optional());
|
|
163177
163210
|
// packages/omo-opencode/src/config/schema/babysitting.ts
|
|
163178
|
-
import { z as
|
|
163179
|
-
var BabysittingConfigSchema =
|
|
163180
|
-
timeout_ms:
|
|
163211
|
+
import { z as z20 } from "zod";
|
|
163212
|
+
var BabysittingConfigSchema = z20.object({
|
|
163213
|
+
timeout_ms: z20.number().default(120000)
|
|
163181
163214
|
});
|
|
163182
163215
|
// packages/omo-opencode/src/config/schema/background-task.ts
|
|
163183
|
-
import { z as
|
|
163184
|
-
var CircuitBreakerConfigSchema =
|
|
163185
|
-
enabled:
|
|
163186
|
-
maxToolCalls:
|
|
163187
|
-
consecutiveThreshold:
|
|
163216
|
+
import { z as z21 } from "zod";
|
|
163217
|
+
var CircuitBreakerConfigSchema = z21.object({
|
|
163218
|
+
enabled: z21.boolean().optional(),
|
|
163219
|
+
maxToolCalls: z21.number().int().min(10).optional(),
|
|
163220
|
+
consecutiveThreshold: z21.number().int().min(5).optional()
|
|
163188
163221
|
});
|
|
163189
|
-
var BackgroundTaskConfigSchema =
|
|
163190
|
-
defaultConcurrency:
|
|
163191
|
-
providerConcurrency:
|
|
163192
|
-
modelConcurrency:
|
|
163193
|
-
maxDepth:
|
|
163194
|
-
staleTimeoutMs:
|
|
163195
|
-
messageStalenessTimeoutMs:
|
|
163196
|
-
taskTtlMs:
|
|
163197
|
-
sessionGoneTimeoutMs:
|
|
163198
|
-
taskCleanupDelayMs:
|
|
163199
|
-
syncPollTimeoutMs:
|
|
163200
|
-
maxToolCalls:
|
|
163222
|
+
var BackgroundTaskConfigSchema = z21.object({
|
|
163223
|
+
defaultConcurrency: z21.number().min(1).optional(),
|
|
163224
|
+
providerConcurrency: z21.record(z21.string(), z21.number().min(0)).optional(),
|
|
163225
|
+
modelConcurrency: z21.record(z21.string(), z21.number().min(0)).optional(),
|
|
163226
|
+
maxDepth: z21.number().int().min(1).optional(),
|
|
163227
|
+
staleTimeoutMs: z21.number().min(60000).optional(),
|
|
163228
|
+
messageStalenessTimeoutMs: z21.number().min(60000).optional(),
|
|
163229
|
+
taskTtlMs: z21.number().min(300000).optional(),
|
|
163230
|
+
sessionGoneTimeoutMs: z21.number().min(1e4).optional(),
|
|
163231
|
+
taskCleanupDelayMs: z21.number().min(60000).optional(),
|
|
163232
|
+
syncPollTimeoutMs: z21.number().min(60000).optional(),
|
|
163233
|
+
maxToolCalls: z21.number().int().min(10).optional(),
|
|
163201
163234
|
circuitBreaker: CircuitBreakerConfigSchema.optional()
|
|
163202
163235
|
});
|
|
163203
163236
|
// packages/omo-opencode/src/config/schema/browser-automation.ts
|
|
163204
|
-
import { z as
|
|
163205
|
-
var BrowserAutomationProviderSchema =
|
|
163237
|
+
import { z as z22 } from "zod";
|
|
163238
|
+
var BrowserAutomationProviderSchema = z22.enum([
|
|
163206
163239
|
"playwright",
|
|
163207
163240
|
"agent-browser",
|
|
163208
163241
|
"dev-browser",
|
|
163209
163242
|
"playwright-cli"
|
|
163210
163243
|
]);
|
|
163211
|
-
var BrowserAutomationConfigSchema =
|
|
163244
|
+
var BrowserAutomationConfigSchema = z22.object({
|
|
163212
163245
|
provider: BrowserAutomationProviderSchema.default("playwright")
|
|
163213
163246
|
});
|
|
163214
163247
|
// packages/omo-opencode/src/config/schema/categories.ts
|
|
163215
|
-
import { z as
|
|
163216
|
-
var CategoryConfigSchema =
|
|
163217
|
-
description:
|
|
163218
|
-
model:
|
|
163248
|
+
import { z as z23 } from "zod";
|
|
163249
|
+
var CategoryConfigSchema = z23.object({
|
|
163250
|
+
description: z23.string().optional(),
|
|
163251
|
+
model: z23.string().optional(),
|
|
163219
163252
|
fallback_models: FallbackModelsSchema.optional(),
|
|
163220
|
-
variant:
|
|
163221
|
-
temperature:
|
|
163222
|
-
top_p:
|
|
163223
|
-
maxTokens:
|
|
163224
|
-
thinking:
|
|
163225
|
-
type:
|
|
163226
|
-
budgetTokens:
|
|
163253
|
+
variant: z23.string().optional(),
|
|
163254
|
+
temperature: z23.number().min(0).max(2).optional(),
|
|
163255
|
+
top_p: z23.number().min(0).max(1).optional(),
|
|
163256
|
+
maxTokens: z23.number().optional(),
|
|
163257
|
+
thinking: z23.object({
|
|
163258
|
+
type: z23.enum(["enabled", "disabled"]),
|
|
163259
|
+
budgetTokens: z23.number().optional()
|
|
163227
163260
|
}).optional(),
|
|
163228
|
-
reasoningEffort:
|
|
163229
|
-
textVerbosity:
|
|
163230
|
-
tools:
|
|
163231
|
-
prompt_append:
|
|
163232
|
-
max_prompt_tokens:
|
|
163233
|
-
is_unstable_agent:
|
|
163234
|
-
disable:
|
|
163261
|
+
reasoningEffort: z23.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
163262
|
+
textVerbosity: z23.enum(["low", "medium", "high"]).optional(),
|
|
163263
|
+
tools: z23.record(z23.string(), z23.boolean()).optional(),
|
|
163264
|
+
prompt_append: z23.string().optional(),
|
|
163265
|
+
max_prompt_tokens: z23.number().int().positive().optional(),
|
|
163266
|
+
is_unstable_agent: z23.boolean().optional(),
|
|
163267
|
+
disable: z23.boolean().optional()
|
|
163235
163268
|
});
|
|
163236
|
-
var BuiltinCategoryNameSchema =
|
|
163269
|
+
var BuiltinCategoryNameSchema = z23.enum([
|
|
163237
163270
|
"visual-engineering",
|
|
163238
163271
|
"ultrabrain",
|
|
163239
163272
|
"deep",
|
|
@@ -163243,39 +163276,39 @@ var BuiltinCategoryNameSchema = z22.enum([
|
|
|
163243
163276
|
"unspecified-high",
|
|
163244
163277
|
"writing"
|
|
163245
163278
|
]);
|
|
163246
|
-
var CategoriesConfigSchema =
|
|
163279
|
+
var CategoriesConfigSchema = z23.record(z23.string(), CategoryConfigSchema);
|
|
163247
163280
|
// packages/omo-opencode/src/config/schema/claude-code.ts
|
|
163248
|
-
import { z as
|
|
163249
|
-
var ClaudeCodeConfigSchema =
|
|
163250
|
-
mcp:
|
|
163251
|
-
commands:
|
|
163252
|
-
skills:
|
|
163253
|
-
agents:
|
|
163254
|
-
hooks:
|
|
163255
|
-
plugins:
|
|
163256
|
-
plugins_override:
|
|
163257
|
-
anthropic_provider:
|
|
163281
|
+
import { z as z24 } from "zod";
|
|
163282
|
+
var ClaudeCodeConfigSchema = z24.object({
|
|
163283
|
+
mcp: z24.boolean().optional(),
|
|
163284
|
+
commands: z24.boolean().optional(),
|
|
163285
|
+
skills: z24.boolean().optional(),
|
|
163286
|
+
agents: z24.boolean().optional(),
|
|
163287
|
+
hooks: z24.boolean().optional(),
|
|
163288
|
+
plugins: z24.boolean().optional(),
|
|
163289
|
+
plugins_override: z24.record(z24.string(), z24.boolean()).optional(),
|
|
163290
|
+
anthropic_provider: z24.string().trim().min(1).refine((v) => !v.includes("/"), {
|
|
163258
163291
|
message: "anthropic_provider must be a provider name without '/'"
|
|
163259
163292
|
}).optional()
|
|
163260
163293
|
});
|
|
163261
163294
|
// packages/omo-opencode/src/config/schema/codegraph.ts
|
|
163262
|
-
import { z as
|
|
163263
|
-
var CodegraphConfigSchema =
|
|
163264
|
-
auto_init:
|
|
163265
|
-
auto_provision:
|
|
163266
|
-
enabled:
|
|
163267
|
-
install_dir:
|
|
163268
|
-
telemetry:
|
|
163269
|
-
watch_debounce_ms:
|
|
163295
|
+
import { z as z25 } from "zod";
|
|
163296
|
+
var CodegraphConfigSchema = z25.object({
|
|
163297
|
+
auto_init: z25.boolean().default(true),
|
|
163298
|
+
auto_provision: z25.boolean().default(true),
|
|
163299
|
+
enabled: z25.boolean().default(true),
|
|
163300
|
+
install_dir: z25.string().optional(),
|
|
163301
|
+
telemetry: z25.boolean().optional(),
|
|
163302
|
+
watch_debounce_ms: z25.number().nonnegative().optional()
|
|
163270
163303
|
});
|
|
163271
163304
|
// packages/omo-opencode/src/config/schema/comment-checker.ts
|
|
163272
|
-
import { z as
|
|
163273
|
-
var CommentCheckerConfigSchema =
|
|
163274
|
-
custom_prompt:
|
|
163305
|
+
import { z as z26 } from "zod";
|
|
163306
|
+
var CommentCheckerConfigSchema = z26.object({
|
|
163307
|
+
custom_prompt: z26.string().optional()
|
|
163275
163308
|
});
|
|
163276
163309
|
// packages/omo-opencode/src/config/schema/commands.ts
|
|
163277
|
-
import { z as
|
|
163278
|
-
var BuiltinCommandNameSchema =
|
|
163310
|
+
import { z as z27 } from "zod";
|
|
163311
|
+
var BuiltinCommandNameSchema = z27.enum([
|
|
163279
163312
|
"ralph-loop",
|
|
163280
163313
|
"ulw-loop",
|
|
163281
163314
|
"cancel-ralph",
|
|
@@ -163286,21 +163319,21 @@ var BuiltinCommandNameSchema = z26.enum([
|
|
|
163286
163319
|
"hyperplan"
|
|
163287
163320
|
]);
|
|
163288
163321
|
// packages/omo-opencode/src/config/schema/default-mode.ts
|
|
163289
|
-
import { z as
|
|
163290
|
-
var DefaultModeConfigSchema =
|
|
163291
|
-
ultrawork:
|
|
163292
|
-
ralph_loop:
|
|
163322
|
+
import { z as z28 } from "zod";
|
|
163323
|
+
var DefaultModeConfigSchema = z28.object({
|
|
163324
|
+
ultrawork: z28.boolean().default(false),
|
|
163325
|
+
ralph_loop: z28.boolean().default(false)
|
|
163293
163326
|
});
|
|
163294
163327
|
// packages/omo-opencode/src/config/schema/dynamic-context-pruning.ts
|
|
163295
|
-
import { z as
|
|
163296
|
-
var DynamicContextPruningConfigSchema =
|
|
163297
|
-
enabled:
|
|
163298
|
-
notification:
|
|
163299
|
-
turn_protection:
|
|
163300
|
-
enabled:
|
|
163301
|
-
turns:
|
|
163328
|
+
import { z as z29 } from "zod";
|
|
163329
|
+
var DynamicContextPruningConfigSchema = z29.object({
|
|
163330
|
+
enabled: z29.boolean().default(false),
|
|
163331
|
+
notification: z29.enum(["off", "minimal", "detailed"]).default("detailed"),
|
|
163332
|
+
turn_protection: z29.object({
|
|
163333
|
+
enabled: z29.boolean().default(true),
|
|
163334
|
+
turns: z29.number().min(1).max(10).default(3)
|
|
163302
163335
|
}).optional(),
|
|
163303
|
-
protected_tools:
|
|
163336
|
+
protected_tools: z29.array(z29.string()).default([
|
|
163304
163337
|
"task",
|
|
163305
163338
|
"todowrite",
|
|
163306
163339
|
"todoread",
|
|
@@ -163309,46 +163342,46 @@ var DynamicContextPruningConfigSchema = z28.object({
|
|
|
163309
163342
|
"session_write",
|
|
163310
163343
|
"session_search"
|
|
163311
163344
|
]),
|
|
163312
|
-
strategies:
|
|
163313
|
-
deduplication:
|
|
163314
|
-
enabled:
|
|
163345
|
+
strategies: z29.object({
|
|
163346
|
+
deduplication: z29.object({
|
|
163347
|
+
enabled: z29.boolean().default(true)
|
|
163315
163348
|
}).optional(),
|
|
163316
|
-
supersede_writes:
|
|
163317
|
-
enabled:
|
|
163318
|
-
aggressive:
|
|
163349
|
+
supersede_writes: z29.object({
|
|
163350
|
+
enabled: z29.boolean().default(true),
|
|
163351
|
+
aggressive: z29.boolean().default(false)
|
|
163319
163352
|
}).optional(),
|
|
163320
|
-
purge_errors:
|
|
163321
|
-
enabled:
|
|
163322
|
-
turns:
|
|
163353
|
+
purge_errors: z29.object({
|
|
163354
|
+
enabled: z29.boolean().default(true),
|
|
163355
|
+
turns: z29.number().min(1).max(20).default(5)
|
|
163323
163356
|
}).optional()
|
|
163324
163357
|
}).optional()
|
|
163325
163358
|
});
|
|
163326
163359
|
// packages/omo-opencode/src/config/schema/experimental.ts
|
|
163327
|
-
import { z as
|
|
163328
|
-
var ExperimentalConfigSchema =
|
|
163329
|
-
aggressive_truncation:
|
|
163330
|
-
preemptive_compaction:
|
|
163331
|
-
truncate_all_tool_outputs:
|
|
163360
|
+
import { z as z30 } from "zod";
|
|
163361
|
+
var ExperimentalConfigSchema = z30.object({
|
|
163362
|
+
aggressive_truncation: z30.boolean().optional(),
|
|
163363
|
+
preemptive_compaction: z30.boolean().optional(),
|
|
163364
|
+
truncate_all_tool_outputs: z30.boolean().optional(),
|
|
163332
163365
|
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
163333
|
-
task_system:
|
|
163334
|
-
plugin_load_timeout_ms:
|
|
163335
|
-
safe_hook_creation:
|
|
163336
|
-
disable_omo_env:
|
|
163337
|
-
hashline_edit:
|
|
163338
|
-
model_fallback_title:
|
|
163339
|
-
max_tools:
|
|
163340
|
-
disable_live_parent_wake_routing:
|
|
163366
|
+
task_system: z30.boolean().optional(),
|
|
163367
|
+
plugin_load_timeout_ms: z30.number().min(1000).optional(),
|
|
163368
|
+
safe_hook_creation: z30.boolean().optional(),
|
|
163369
|
+
disable_omo_env: z30.boolean().optional(),
|
|
163370
|
+
hashline_edit: z30.boolean().optional(),
|
|
163371
|
+
model_fallback_title: z30.boolean().optional(),
|
|
163372
|
+
max_tools: z30.number().int().min(1).optional(),
|
|
163373
|
+
disable_live_parent_wake_routing: z30.boolean().optional()
|
|
163341
163374
|
});
|
|
163342
163375
|
// packages/omo-opencode/src/config/schema/git-master.ts
|
|
163343
|
-
import { z as
|
|
163344
|
-
var GitMasterConfigSchema =
|
|
163345
|
-
commit_footer:
|
|
163346
|
-
include_co_authored_by:
|
|
163376
|
+
import { z as z31 } from "zod";
|
|
163377
|
+
var GitMasterConfigSchema = z31.object({
|
|
163378
|
+
commit_footer: z31.union([z31.boolean(), z31.string()]).default(true),
|
|
163379
|
+
include_co_authored_by: z31.boolean().default(true),
|
|
163347
163380
|
git_env_prefix: GitEnvPrefixSchema
|
|
163348
163381
|
});
|
|
163349
163382
|
// packages/omo-opencode/src/config/schema/hooks.ts
|
|
163350
|
-
import { z as
|
|
163351
|
-
var HookNameSchema =
|
|
163383
|
+
import { z as z32 } from "zod";
|
|
163384
|
+
var HookNameSchema = z32.enum([
|
|
163352
163385
|
"todo-continuation-enforcer",
|
|
163353
163386
|
"session-notification",
|
|
163354
163387
|
"comment-checker",
|
|
@@ -163407,229 +163440,229 @@ var HookNameSchema = z31.enum([
|
|
|
163407
163440
|
"legacy-plugin-toast"
|
|
163408
163441
|
]);
|
|
163409
163442
|
// packages/omo-opencode/src/config/schema/i18n.ts
|
|
163410
|
-
import { z as
|
|
163411
|
-
var I18nConfigSchema =
|
|
163412
|
-
locale:
|
|
163443
|
+
import { z as z33 } from "zod";
|
|
163444
|
+
var I18nConfigSchema = z33.object({
|
|
163445
|
+
locale: z33.string().optional()
|
|
163413
163446
|
});
|
|
163414
163447
|
// packages/omo-opencode/src/config/schema/keyword-detector.ts
|
|
163415
|
-
import { z as
|
|
163416
|
-
var KeywordTypeSchema =
|
|
163417
|
-
var KeywordDetectorConfigSchema =
|
|
163418
|
-
enabled_expansions:
|
|
163419
|
-
disabled_keywords:
|
|
163448
|
+
import { z as z34 } from "zod";
|
|
163449
|
+
var KeywordTypeSchema = z34.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
|
|
163450
|
+
var KeywordDetectorConfigSchema = z34.object({
|
|
163451
|
+
enabled_expansions: z34.array(KeywordTypeSchema).optional(),
|
|
163452
|
+
disabled_keywords: z34.array(KeywordTypeSchema).optional()
|
|
163420
163453
|
});
|
|
163421
163454
|
// packages/omo-opencode/src/config/schema/model-capabilities.ts
|
|
163422
|
-
import { z as
|
|
163423
|
-
var ModelCapabilitiesConfigSchema =
|
|
163424
|
-
enabled:
|
|
163425
|
-
auto_refresh_on_start:
|
|
163426
|
-
refresh_timeout_ms:
|
|
163427
|
-
source_url:
|
|
163455
|
+
import { z as z35 } from "zod";
|
|
163456
|
+
var ModelCapabilitiesConfigSchema = z35.object({
|
|
163457
|
+
enabled: z35.boolean().optional(),
|
|
163458
|
+
auto_refresh_on_start: z35.boolean().optional(),
|
|
163459
|
+
refresh_timeout_ms: z35.number().int().positive().optional(),
|
|
163460
|
+
source_url: z35.string().url().optional()
|
|
163428
163461
|
});
|
|
163429
163462
|
// packages/omo-opencode/src/config/schema/notification.ts
|
|
163430
|
-
import { z as
|
|
163431
|
-
var NotificationConfigSchema =
|
|
163432
|
-
force_enable:
|
|
163463
|
+
import { z as z36 } from "zod";
|
|
163464
|
+
var NotificationConfigSchema = z36.object({
|
|
163465
|
+
force_enable: z36.boolean().optional()
|
|
163433
163466
|
});
|
|
163434
163467
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
163435
|
-
import { z as
|
|
163468
|
+
import { z as z49 } from "zod";
|
|
163436
163469
|
|
|
163437
163470
|
// packages/omo-opencode/src/config/schema/agent-definitions.ts
|
|
163438
|
-
import { z as
|
|
163439
|
-
var AgentDefinitionPathSchema =
|
|
163440
|
-
var AgentDefinitionsConfigSchema =
|
|
163471
|
+
import { z as z37 } from "zod";
|
|
163472
|
+
var AgentDefinitionPathSchema = z37.string().min(1);
|
|
163473
|
+
var AgentDefinitionsConfigSchema = z37.array(AgentDefinitionPathSchema).optional();
|
|
163441
163474
|
|
|
163442
163475
|
// packages/omo-opencode/src/config/schema/openclaw.ts
|
|
163443
|
-
import { z as
|
|
163444
|
-
var OpenClawGatewaySchema =
|
|
163445
|
-
type:
|
|
163446
|
-
url:
|
|
163447
|
-
method:
|
|
163448
|
-
headers:
|
|
163449
|
-
command:
|
|
163450
|
-
timeout:
|
|
163476
|
+
import { z as z38 } from "zod";
|
|
163477
|
+
var OpenClawGatewaySchema = z38.object({
|
|
163478
|
+
type: z38.enum(["http", "command"]).default("http"),
|
|
163479
|
+
url: z38.string().optional(),
|
|
163480
|
+
method: z38.string().default("POST"),
|
|
163481
|
+
headers: z38.record(z38.string(), z38.string()).optional(),
|
|
163482
|
+
command: z38.string().optional(),
|
|
163483
|
+
timeout: z38.number().optional()
|
|
163451
163484
|
});
|
|
163452
|
-
var OpenClawHookSchema =
|
|
163453
|
-
enabled:
|
|
163454
|
-
gateway:
|
|
163455
|
-
instruction:
|
|
163485
|
+
var OpenClawHookSchema = z38.object({
|
|
163486
|
+
enabled: z38.boolean().default(true),
|
|
163487
|
+
gateway: z38.string(),
|
|
163488
|
+
instruction: z38.string()
|
|
163456
163489
|
});
|
|
163457
|
-
var OpenClawReplyListenerConfigSchema =
|
|
163458
|
-
discordBotToken:
|
|
163459
|
-
discordChannelId:
|
|
163460
|
-
discordMention:
|
|
163461
|
-
authorizedDiscordUserIds:
|
|
163462
|
-
telegramBotToken:
|
|
163463
|
-
telegramChatId:
|
|
163464
|
-
pollIntervalMs:
|
|
163465
|
-
rateLimitPerMinute:
|
|
163466
|
-
maxMessageLength:
|
|
163467
|
-
includePrefix:
|
|
163490
|
+
var OpenClawReplyListenerConfigSchema = z38.object({
|
|
163491
|
+
discordBotToken: z38.string().optional(),
|
|
163492
|
+
discordChannelId: z38.string().optional(),
|
|
163493
|
+
discordMention: z38.string().optional(),
|
|
163494
|
+
authorizedDiscordUserIds: z38.array(z38.string()).default([]),
|
|
163495
|
+
telegramBotToken: z38.string().optional(),
|
|
163496
|
+
telegramChatId: z38.string().optional(),
|
|
163497
|
+
pollIntervalMs: z38.number().default(3000),
|
|
163498
|
+
rateLimitPerMinute: z38.number().default(10),
|
|
163499
|
+
maxMessageLength: z38.number().default(500),
|
|
163500
|
+
includePrefix: z38.boolean().default(true)
|
|
163468
163501
|
});
|
|
163469
|
-
var OpenClawConfigSchema =
|
|
163470
|
-
enabled:
|
|
163471
|
-
gateways:
|
|
163472
|
-
hooks:
|
|
163502
|
+
var OpenClawConfigSchema = z38.object({
|
|
163503
|
+
enabled: z38.boolean().default(false),
|
|
163504
|
+
gateways: z38.record(z38.string(), OpenClawGatewaySchema).default({}),
|
|
163505
|
+
hooks: z38.record(z38.string(), OpenClawHookSchema).default({}),
|
|
163473
163506
|
replyListener: OpenClawReplyListenerConfigSchema.optional()
|
|
163474
163507
|
});
|
|
163475
163508
|
|
|
163476
163509
|
// packages/omo-opencode/src/config/schema/monitor.ts
|
|
163477
|
-
import { z as
|
|
163478
|
-
var MonitorConfigSchema =
|
|
163479
|
-
enabled:
|
|
163480
|
-
live_mode_enabled:
|
|
163481
|
-
allowed_commands:
|
|
163482
|
-
max_monitors_per_session:
|
|
163483
|
-
max_runtime_ms:
|
|
163484
|
-
batch_max_lines:
|
|
163485
|
-
batch_max_bytes:
|
|
163486
|
-
flush_interval_ms:
|
|
163487
|
-
ring_max_lines:
|
|
163488
|
-
line_max_bytes:
|
|
163489
|
-
pattern_max_length:
|
|
163510
|
+
import { z as z39 } from "zod";
|
|
163511
|
+
var MonitorConfigSchema = z39.object({
|
|
163512
|
+
enabled: z39.boolean().default(false),
|
|
163513
|
+
live_mode_enabled: z39.boolean().default(false),
|
|
163514
|
+
allowed_commands: z39.array(z39.string()).optional(),
|
|
163515
|
+
max_monitors_per_session: z39.number().int().min(1).max(16).default(3),
|
|
163516
|
+
max_runtime_ms: z39.number().int().min(1000).default(1800000),
|
|
163517
|
+
batch_max_lines: z39.number().int().min(1).default(50),
|
|
163518
|
+
batch_max_bytes: z39.number().int().min(1024).default(16384),
|
|
163519
|
+
flush_interval_ms: z39.number().int().min(250).default(1000),
|
|
163520
|
+
ring_max_lines: z39.number().int().min(1).default(1000),
|
|
163521
|
+
line_max_bytes: z39.number().int().min(256).default(8192),
|
|
163522
|
+
pattern_max_length: z39.number().int().min(1).default(512)
|
|
163490
163523
|
});
|
|
163491
163524
|
|
|
163492
163525
|
// packages/omo-opencode/src/config/schema/ralph-loop.ts
|
|
163493
|
-
import { z as
|
|
163494
|
-
var RalphLoopConfigSchema =
|
|
163495
|
-
enabled:
|
|
163496
|
-
default_max_iterations:
|
|
163497
|
-
state_dir:
|
|
163498
|
-
default_strategy:
|
|
163526
|
+
import { z as z40 } from "zod";
|
|
163527
|
+
var RalphLoopConfigSchema = z40.object({
|
|
163528
|
+
enabled: z40.boolean().default(false),
|
|
163529
|
+
default_max_iterations: z40.number().min(1).max(1000).default(100),
|
|
163530
|
+
state_dir: z40.string().optional(),
|
|
163531
|
+
default_strategy: z40.enum(["reset", "continue"]).default("continue")
|
|
163499
163532
|
});
|
|
163500
163533
|
|
|
163501
163534
|
// packages/omo-opencode/src/config/schema/runtime-fallback.ts
|
|
163502
|
-
import { z as
|
|
163503
|
-
var RuntimeFallbackConfigSchema =
|
|
163504
|
-
enabled:
|
|
163505
|
-
retry_on_errors:
|
|
163506
|
-
max_fallback_attempts:
|
|
163507
|
-
cooldown_seconds:
|
|
163508
|
-
timeout_seconds:
|
|
163509
|
-
notify_on_fallback:
|
|
163510
|
-
restore_primary_after_cooldown:
|
|
163535
|
+
import { z as z41 } from "zod";
|
|
163536
|
+
var RuntimeFallbackConfigSchema = z41.object({
|
|
163537
|
+
enabled: z41.boolean().optional(),
|
|
163538
|
+
retry_on_errors: z41.array(z41.number()).optional(),
|
|
163539
|
+
max_fallback_attempts: z41.number().min(1).max(20).optional(),
|
|
163540
|
+
cooldown_seconds: z41.number().min(0).optional(),
|
|
163541
|
+
timeout_seconds: z41.number().min(0).optional(),
|
|
163542
|
+
notify_on_fallback: z41.boolean().optional(),
|
|
163543
|
+
restore_primary_after_cooldown: z41.boolean().optional()
|
|
163511
163544
|
});
|
|
163512
163545
|
|
|
163513
163546
|
// packages/team-core/src/config.ts
|
|
163514
|
-
import * as
|
|
163515
|
-
var TeamModeConfigSchema =
|
|
163516
|
-
enabled:
|
|
163517
|
-
tmux_visualization:
|
|
163518
|
-
max_parallel_members:
|
|
163519
|
-
max_members:
|
|
163520
|
-
max_messages_per_run:
|
|
163521
|
-
max_wall_clock_minutes:
|
|
163522
|
-
max_member_turns:
|
|
163523
|
-
base_dir:
|
|
163524
|
-
message_payload_max_bytes:
|
|
163525
|
-
recipient_unread_max_bytes:
|
|
163526
|
-
mailbox_poll_interval_ms:
|
|
163547
|
+
import * as z42 from "zod";
|
|
163548
|
+
var TeamModeConfigSchema = z42.object({
|
|
163549
|
+
enabled: z42.boolean().default(false),
|
|
163550
|
+
tmux_visualization: z42.boolean().default(false),
|
|
163551
|
+
max_parallel_members: z42.number().int().min(1).max(8).default(4),
|
|
163552
|
+
max_members: z42.number().int().min(1).max(8).default(8),
|
|
163553
|
+
max_messages_per_run: z42.number().int().min(1).default(1e4),
|
|
163554
|
+
max_wall_clock_minutes: z42.number().int().min(1).default(120),
|
|
163555
|
+
max_member_turns: z42.number().int().min(1).default(500),
|
|
163556
|
+
base_dir: z42.string().optional(),
|
|
163557
|
+
message_payload_max_bytes: z42.number().int().min(1024).default(32768),
|
|
163558
|
+
recipient_unread_max_bytes: z42.number().int().min(1024).default(262144),
|
|
163559
|
+
mailbox_poll_interval_ms: z42.number().int().min(500).default(3000)
|
|
163527
163560
|
});
|
|
163528
163561
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
163529
|
-
import { z as
|
|
163530
|
-
var SkillSourceSchema =
|
|
163531
|
-
|
|
163532
|
-
|
|
163533
|
-
path:
|
|
163534
|
-
recursive:
|
|
163535
|
-
glob:
|
|
163562
|
+
import { z as z43 } from "zod";
|
|
163563
|
+
var SkillSourceSchema = z43.union([
|
|
163564
|
+
z43.string(),
|
|
163565
|
+
z43.object({
|
|
163566
|
+
path: z43.string(),
|
|
163567
|
+
recursive: z43.boolean().optional(),
|
|
163568
|
+
glob: z43.string().optional()
|
|
163536
163569
|
})
|
|
163537
163570
|
]);
|
|
163538
|
-
var SkillDefinitionSchema =
|
|
163539
|
-
description:
|
|
163540
|
-
template:
|
|
163541
|
-
from:
|
|
163542
|
-
model:
|
|
163543
|
-
agent:
|
|
163544
|
-
subtask:
|
|
163545
|
-
"argument-hint":
|
|
163546
|
-
license:
|
|
163547
|
-
compatibility:
|
|
163548
|
-
metadata:
|
|
163549
|
-
"allowed-tools":
|
|
163550
|
-
disable:
|
|
163571
|
+
var SkillDefinitionSchema = z43.object({
|
|
163572
|
+
description: z43.string().optional(),
|
|
163573
|
+
template: z43.string().optional(),
|
|
163574
|
+
from: z43.string().optional(),
|
|
163575
|
+
model: z43.string().optional(),
|
|
163576
|
+
agent: z43.string().optional(),
|
|
163577
|
+
subtask: z43.boolean().optional(),
|
|
163578
|
+
"argument-hint": z43.string().optional(),
|
|
163579
|
+
license: z43.string().optional(),
|
|
163580
|
+
compatibility: z43.string().optional(),
|
|
163581
|
+
metadata: z43.record(z43.string(), z43.unknown()).optional(),
|
|
163582
|
+
"allowed-tools": z43.array(z43.string()).optional(),
|
|
163583
|
+
disable: z43.boolean().optional()
|
|
163551
163584
|
});
|
|
163552
|
-
var SkillEntrySchema =
|
|
163553
|
-
var SkillsConfigSchema =
|
|
163554
|
-
|
|
163555
|
-
|
|
163556
|
-
sources:
|
|
163557
|
-
enable:
|
|
163558
|
-
disable:
|
|
163585
|
+
var SkillEntrySchema = z43.union([z43.boolean(), SkillDefinitionSchema]);
|
|
163586
|
+
var SkillsConfigSchema = z43.union([
|
|
163587
|
+
z43.array(z43.string()),
|
|
163588
|
+
z43.object({
|
|
163589
|
+
sources: z43.array(SkillSourceSchema).optional(),
|
|
163590
|
+
enable: z43.array(z43.string()).optional(),
|
|
163591
|
+
disable: z43.array(z43.string()).optional()
|
|
163559
163592
|
}).catchall(SkillEntrySchema)
|
|
163560
163593
|
]);
|
|
163561
163594
|
|
|
163562
163595
|
// packages/omo-opencode/src/config/schema/sisyphus.ts
|
|
163563
|
-
import { z as
|
|
163564
|
-
var SisyphusTasksConfigSchema =
|
|
163565
|
-
storage_path:
|
|
163566
|
-
task_list_id:
|
|
163567
|
-
claude_code_compat:
|
|
163596
|
+
import { z as z44 } from "zod";
|
|
163597
|
+
var SisyphusTasksConfigSchema = z44.object({
|
|
163598
|
+
storage_path: z44.string().optional(),
|
|
163599
|
+
task_list_id: z44.string().optional(),
|
|
163600
|
+
claude_code_compat: z44.boolean().default(false)
|
|
163568
163601
|
});
|
|
163569
|
-
var SisyphusConfigSchema =
|
|
163602
|
+
var SisyphusConfigSchema = z44.object({
|
|
163570
163603
|
tasks: SisyphusTasksConfigSchema.optional()
|
|
163571
163604
|
});
|
|
163572
163605
|
|
|
163573
163606
|
// packages/omo-opencode/src/config/schema/sisyphus-agent.ts
|
|
163574
|
-
import { z as
|
|
163575
|
-
var SisyphusAgentConfigSchema =
|
|
163576
|
-
disabled:
|
|
163577
|
-
default_builder_enabled:
|
|
163578
|
-
planner_enabled:
|
|
163579
|
-
replace_plan:
|
|
163580
|
-
tdd:
|
|
163607
|
+
import { z as z45 } from "zod";
|
|
163608
|
+
var SisyphusAgentConfigSchema = z45.object({
|
|
163609
|
+
disabled: z45.boolean().optional(),
|
|
163610
|
+
default_builder_enabled: z45.boolean().optional(),
|
|
163611
|
+
planner_enabled: z45.boolean().optional(),
|
|
163612
|
+
replace_plan: z45.boolean().optional(),
|
|
163613
|
+
tdd: z45.boolean().default(true).optional()
|
|
163581
163614
|
});
|
|
163582
163615
|
|
|
163583
163616
|
// packages/omo-opencode/src/config/schema/tui.ts
|
|
163584
|
-
import { z as
|
|
163585
|
-
var TuiSidebarConfigSchema =
|
|
163586
|
-
enabled:
|
|
163617
|
+
import { z as z46 } from "zod";
|
|
163618
|
+
var TuiSidebarConfigSchema = z46.object({
|
|
163619
|
+
enabled: z46.boolean().default(true)
|
|
163587
163620
|
});
|
|
163588
|
-
var TuiConfigSchema =
|
|
163621
|
+
var TuiConfigSchema = z46.object({
|
|
163589
163622
|
sidebar: TuiSidebarConfigSchema.default({ enabled: true })
|
|
163590
163623
|
});
|
|
163591
163624
|
|
|
163592
163625
|
// packages/omo-opencode/src/config/schema/start-work.ts
|
|
163593
|
-
import { z as
|
|
163594
|
-
var StartWorkConfigSchema =
|
|
163595
|
-
auto_commit:
|
|
163626
|
+
import { z as z47 } from "zod";
|
|
163627
|
+
var StartWorkConfigSchema = z47.object({
|
|
163628
|
+
auto_commit: z47.boolean().default(true)
|
|
163596
163629
|
});
|
|
163597
163630
|
|
|
163598
163631
|
// packages/omo-opencode/src/config/schema/websearch.ts
|
|
163599
|
-
import { z as
|
|
163600
|
-
var WebsearchProviderSchema =
|
|
163601
|
-
var WebsearchConfigSchema =
|
|
163632
|
+
import { z as z48 } from "zod";
|
|
163633
|
+
var WebsearchProviderSchema = z48.enum(["exa", "tavily"]);
|
|
163634
|
+
var WebsearchConfigSchema = z48.object({
|
|
163602
163635
|
provider: WebsearchProviderSchema.optional()
|
|
163603
163636
|
});
|
|
163604
163637
|
|
|
163605
163638
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
163606
|
-
var OhMyOpenCodeConfigSchema =
|
|
163607
|
-
$schema:
|
|
163608
|
-
new_task_system_enabled:
|
|
163609
|
-
default_run_agent:
|
|
163610
|
-
agent_order:
|
|
163639
|
+
var OhMyOpenCodeConfigSchema = z49.object({
|
|
163640
|
+
$schema: z49.string().optional(),
|
|
163641
|
+
new_task_system_enabled: z49.boolean().optional(),
|
|
163642
|
+
default_run_agent: z49.string().optional(),
|
|
163643
|
+
agent_order: z49.array(z49.string().max(128)).max(64).optional(),
|
|
163611
163644
|
agent_definitions: AgentDefinitionsConfigSchema,
|
|
163612
|
-
disabled_mcps:
|
|
163613
|
-
disabled_agents:
|
|
163614
|
-
disabled_skills:
|
|
163615
|
-
disabled_hooks:
|
|
163616
|
-
disabled_commands:
|
|
163617
|
-
disabled_tools:
|
|
163618
|
-
disabled_providers:
|
|
163619
|
-
mcp_env_allowlist:
|
|
163620
|
-
hashline_edit:
|
|
163621
|
-
telemetry:
|
|
163622
|
-
model_fallback:
|
|
163645
|
+
disabled_mcps: z49.array(AnyMcpNameSchema).optional(),
|
|
163646
|
+
disabled_agents: z49.array(z49.string()).optional(),
|
|
163647
|
+
disabled_skills: z49.array(z49.string()).optional(),
|
|
163648
|
+
disabled_hooks: z49.array(z49.string()).optional(),
|
|
163649
|
+
disabled_commands: z49.array(BuiltinCommandNameSchema).optional(),
|
|
163650
|
+
disabled_tools: z49.array(z49.string()).optional(),
|
|
163651
|
+
disabled_providers: z49.array(z49.string()).optional(),
|
|
163652
|
+
mcp_env_allowlist: z49.array(z49.string()).optional(),
|
|
163653
|
+
hashline_edit: z49.boolean().optional(),
|
|
163654
|
+
telemetry: z49.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable. Independent of codegraph.telemetry."),
|
|
163655
|
+
model_fallback: z49.boolean().optional(),
|
|
163623
163656
|
agents: AgentOverridesSchema.optional(),
|
|
163624
163657
|
categories: CategoriesConfigSchema.optional(),
|
|
163625
163658
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
163626
163659
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
163627
163660
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
163628
163661
|
experimental: ExperimentalConfigSchema.optional(),
|
|
163629
|
-
auto_update:
|
|
163662
|
+
auto_update: z49.boolean().optional(),
|
|
163630
163663
|
skills: SkillsConfigSchema.optional(),
|
|
163631
163664
|
ralph_loop: RalphLoopConfigSchema.optional(),
|
|
163632
|
-
runtime_fallback:
|
|
163665
|
+
runtime_fallback: z49.union([z49.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
163633
163666
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
163634
163667
|
notification: NotificationConfigSchema.optional(),
|
|
163635
163668
|
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
|
@@ -163652,7 +163685,7 @@ var OhMyOpenCodeConfigSchema = z48.object({
|
|
|
163652
163685
|
sisyphus: SisyphusConfigSchema.optional(),
|
|
163653
163686
|
start_work: StartWorkConfigSchema.optional(),
|
|
163654
163687
|
default_mode: DefaultModeConfigSchema.optional(),
|
|
163655
|
-
_migrations:
|
|
163688
|
+
_migrations: z49.array(z49.string()).optional()
|
|
163656
163689
|
});
|
|
163657
163690
|
// packages/omo-opencode/src/shared/disabled-providers.ts
|
|
163658
163691
|
init_logger2();
|
|
@@ -164156,7 +164189,7 @@ init_logger2();
|
|
|
164156
164189
|
// packages/telemetry-core/src/activity-state.ts
|
|
164157
164190
|
init_atomic_write();
|
|
164158
164191
|
init_xdg_data_dir();
|
|
164159
|
-
import { existsSync as existsSync117, mkdirSync as mkdirSync24, readFileSync as
|
|
164192
|
+
import { existsSync as existsSync117, mkdirSync as mkdirSync24, readFileSync as readFileSync80 } from "fs";
|
|
164160
164193
|
import { basename as basename27, join as join136 } from "path";
|
|
164161
164194
|
var POSTHOG_ACTIVITY_STATE_FILE = "posthog-activity.json";
|
|
164162
164195
|
function resolveTelemetryStateDir(product, options = {}) {
|
|
@@ -164200,7 +164233,7 @@ function readPostHogActivityState(stateDir, diagnostics) {
|
|
|
164200
164233
|
return {};
|
|
164201
164234
|
}
|
|
164202
164235
|
try {
|
|
164203
|
-
const stateContent =
|
|
164236
|
+
const stateContent = readFileSync80(stateFilePath, "utf-8");
|
|
164204
164237
|
const stateJson = JSON.parse(stateContent);
|
|
164205
164238
|
if (!isPostHogActivityState(stateJson)) {
|
|
164206
164239
|
return {};
|