oh-my-opencode 5.0.0-beta.1 → 5.0.0-beta.10
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/publish.md +44 -16
- package/.agents/skills/publish/SKILL.md +44 -16
- package/.agents/skills/work-with-pr/SKILL.md +37 -23
- package/.opencode/command/publish.md +44 -16
- package/.opencode/skills/work-with-pr/SKILL.md +37 -23
- package/README.md +12 -1
- package/dist/agents/atlas/agent.d.ts +0 -1
- package/dist/agents/sisyphus/grok-4.d.ts +20 -0
- package/dist/agents/sisyphus/index.d.ts +2 -0
- package/dist/agents/sisyphus-agent-config.d.ts +6 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +1 -1
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +15 -4
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/index.js +797 -465
- package/dist/cli/run/on-complete-hook.d.ts +2 -0
- package/dist/cli-node/index.js +797 -465
- package/dist/hooks/atlas/final-wave-approval-gate.test-support.d.ts +50 -0
- package/dist/hooks/atlas/system-reminder-templates.d.ts +0 -1
- package/dist/index.js +1511 -1140
- package/dist/shared/normalize-sdk-response.d.ts +1 -0
- package/dist/shared/shell-env.d.ts +1 -1
- package/dist/skills/coding-agent-sessions/SKILL.md +3 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/dist/skills/frontend/SKILL.md +10 -7
- package/dist/skills/frontend/references/design/_INDEX.md +1 -0
- package/dist/skills/frontend/references/design/stylegallery.md +80 -0
- package/dist/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/dist/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- 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 -2
- package/dist/skills/ulw-plan/references/full-workflow.md +27 -3
- package/dist/skills/ulw-plan/references/intent-clear.md +2 -1
- package/dist/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/tui.js +176 -14
- package/package.json +21 -19
- package/packages/lsp-core/src/lsp/client-diagnostics-concurrency.integration.test.ts +44 -0
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +0 -28
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +60 -7
- package/packages/lsp-core/src/lsp/client-wrapper.ts +69 -16
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
- package/packages/lsp-core/src/tools/diagnostics.ts +3 -3
- package/packages/lsp-core/src/tools/navigation.ts +4 -2
- package/packages/lsp-core/src/tools/rename.ts +4 -2
- package/packages/lsp-core/src/tools/symbols.ts +1 -1
- package/packages/lsp-daemon/dist/cli.js +83 -29
- package/packages/lsp-daemon/dist/client.js +76 -22
- package/packages/lsp-daemon/dist/index.js +81 -27
- package/packages/lsp-tools-mcp/dist/cli.js +76 -22
- package/packages/lsp-tools-mcp/dist/mcp.js +76 -22
- package/packages/lsp-tools-mcp/dist/tools.js +76 -22
- 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/dist/cli.js +118 -8
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +118 -8
- 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/lazycodex-executor-verify/test/codex-hook.test.ts +3 -17
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +83 -29
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules-priority.test.ts +11 -16
- package/packages/omo-codex/plugin/components/rules/test/bundled-rules.test.ts +16 -23
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-budget.test.ts +9 -7
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-context.test.ts +0 -6
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-dedup.test.ts +6 -4
- package/packages/omo-codex/plugin/components/rules/test/codex-hook-post-compact-directive.test.ts +12 -9
- package/packages/omo-codex/plugin/components/rules/test/codex-hook.test.ts +28 -37
- package/packages/omo-codex/plugin/components/rules/test/formatter.test.ts +37 -69
- package/packages/omo-codex/plugin/components/rules/test/hook-output.test.ts +2 -3
- package/packages/omo-codex/plugin/components/rules/test/windows-git-bash-bundled-rule.test.ts +1 -15
- package/packages/omo-codex/plugin/components/start-work-continuation/AGENTS.md +3 -2
- 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/cli.test.ts +0 -3
- package/packages/omo-codex/plugin/components/start-work-continuation/test/codex-hook.test.ts +2 -16
- 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/test/thread-title-hook.test.ts +3 -9
- package/packages/omo-codex/plugin/components/telemetry/dist/cli.js +24 -12
- package/packages/omo-codex/plugin/components/telemetry/dist/posthog.js +24 -12
- 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 +6 -0
- 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 +6 -0
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +2 -2
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +27 -3
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/components/ultrawork/test/codex-hook.test.ts +0 -136
- package/packages/omo-codex/plugin/components/ultrawork/test/skill-pointer.test.ts +0 -2
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +6 -0
- 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 +3 -2
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-continuation.test.ts +0 -1
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-hook.test.ts +0 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/package-smoke.test.ts +2 -35
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +4 -5
- 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 +20 -20
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +10 -7
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/omo-codex/plugin/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/omo-codex/plugin/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- 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 +6 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +3 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/define-goal.md +108 -0
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +1 -0
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +2 -2
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +27 -3
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/packages/omo-codex/plugin/test/aggregate-agents.test.mjs +19 -173
- package/packages/omo-codex/plugin/test/aggregate-hooks.test.mjs +4 -24
- package/packages/omo-codex/plugin/test/aggregate-plugin-fixture.mjs +175 -13
- package/packages/omo-codex/plugin/test/aggregate.test.mjs +78 -2
- package/packages/omo-codex/plugin/test/auto-update-release-notes.test.mjs +19 -33
- package/packages/omo-codex/plugin/test/lcx-contribute-bug-fix-template.test.mjs +21 -27
- package/packages/omo-codex/plugin/test/scaffold-plan.test.mjs +0 -36
- package/packages/omo-codex/plugin/test/sync-skills-codex-compatibility.test.mjs +101 -0
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +1 -119
- package/packages/omo-codex/plugin/test/teammode-archive-ambiguity.test.mjs +0 -40
- package/packages/omo-codex/plugin/test/teammode-communication.test.mjs +6 -62
- package/packages/omo-codex/plugin/test/teammode-thread-links.test.mjs +3 -36
- package/packages/omo-codex/plugin/test/teammode-transport.test.mjs +0 -44
- package/packages/omo-codex/plugin/test/teammode-worktree.test.mjs +2 -6
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +0 -3
- package/packages/omo-codex/plugin/test/ulw-plan-review-state-contract.test.mjs +0 -3
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +57 -19
- package/packages/omo-codex/scripts/install-lazycodex-version-stamp.test.mjs +7 -2
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +3 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +4 -4
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +1 -1
- package/packages/shared-skills/skills/frontend/SKILL.md +10 -7
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +1 -0
- package/packages/shared-skills/skills/frontend/references/design/stylegallery.md +80 -0
- package/packages/shared-skills/skills/ultimate-browsing/ATTRIBUTION.md +37 -10
- package/packages/shared-skills/skills/ultimate-browsing/engine/AGENTS.md +179 -0
- 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 -2
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +27 -3
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +2 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-unclear.md +3 -3
- package/dist/tools/call-omo-agent/background-agent-executor.d.ts +0 -5
- package/packages/omo-codex/plugin/test/aggregate-skills.test.mjs +0 -92
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +0 -314
- package/packages/omo-codex/plugin/test/ulw-plan-scope-contract.test.mjs +0 -24
|
@@ -4269,7 +4269,7 @@ function finalize(ctx, schema) {
|
|
|
4269
4269
|
result.$schema = "http://json-schema.org/draft-07/schema#";
|
|
4270
4270
|
} else if (ctx.target === "draft-04") {
|
|
4271
4271
|
result.$schema = "http://json-schema.org/draft-04/schema#";
|
|
4272
|
-
} else if (ctx.target === "openapi-3.0") {}
|
|
4272
|
+
} else if (ctx.target === "openapi-3.0") {}
|
|
4273
4273
|
if (ctx.external?.uri) {
|
|
4274
4274
|
const id = ctx.external.registry.get(schema)?.id;
|
|
4275
4275
|
if (!id)
|
|
@@ -4478,7 +4478,7 @@ var literalProcessor = (schema, ctx, json, _params) => {
|
|
|
4478
4478
|
if (val === undefined) {
|
|
4479
4479
|
if (ctx.unrepresentable === "throw") {
|
|
4480
4480
|
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
|
|
4481
|
-
}
|
|
4481
|
+
}
|
|
4482
4482
|
} else if (typeof val === "bigint") {
|
|
4483
4483
|
if (ctx.unrepresentable === "throw") {
|
|
4484
4484
|
throw new Error("BigInt literals cannot be represented in JSON Schema");
|
|
@@ -5817,11 +5817,12 @@ var OmoCodegraphSettingsSchema = OmoCodegraphSettingsLayerSchema.extend({
|
|
|
5817
5817
|
|
|
5818
5818
|
// ../../../../omo-config-core/src/schema/memory.ts
|
|
5819
5819
|
var OmoMemoryReflectionTriggerSchema = object({
|
|
5820
|
-
step_count: number2().int().nonnegative().default(
|
|
5820
|
+
step_count: number2().int().nonnegative().default(25),
|
|
5821
5821
|
on_compaction: boolean2().default(true)
|
|
5822
5822
|
}).strict();
|
|
5823
5823
|
var OmoMemoryReflectionSchema = object({
|
|
5824
|
-
|
|
5824
|
+
enabled: boolean2().default(true),
|
|
5825
|
+
trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 25, on_compaction: true }),
|
|
5825
5826
|
merge: _enum(["auto", "integration"]).default("auto"),
|
|
5826
5827
|
category: string2().min(1).default("quick"),
|
|
5827
5828
|
timeout_minutes: number2().int().positive().default(15),
|
|
@@ -5834,11 +5835,36 @@ var OmoMemorySyncSchema = object({
|
|
|
5834
5835
|
var OmoMemorySearchSchema = object({
|
|
5835
5836
|
enabled: boolean2().default(true)
|
|
5836
5837
|
}).strict();
|
|
5838
|
+
var OmoMemoryNudgeSchema = object({
|
|
5839
|
+
enabled: boolean2().default(true),
|
|
5840
|
+
every_user_turns: number2().int().min(1).default(10)
|
|
5841
|
+
}).strict();
|
|
5842
|
+
var OmoMemoryFactsSchema = object({
|
|
5843
|
+
enabled: boolean2().default(true),
|
|
5844
|
+
debounce_settles: number2().int().min(1).default(4)
|
|
5845
|
+
}).strict();
|
|
5846
|
+
var OmoMemoryDreamSchema = object({
|
|
5847
|
+
enabled: boolean2().default(true),
|
|
5848
|
+
idle_minutes: number2().int().min(0).default(30),
|
|
5849
|
+
min_hours_between: number2().int().min(1).default(24),
|
|
5850
|
+
shutdown_launch: boolean2().default(true),
|
|
5851
|
+
auto_select_max: number2().int().min(1).max(10).default(5),
|
|
5852
|
+
auto_select_max_chars: number2().int().min(1e4).default(150000)
|
|
5853
|
+
}).strict();
|
|
5854
|
+
var OmoMemoryPeopleSchema = object({
|
|
5855
|
+
enabled: boolean2().default(true),
|
|
5856
|
+
max_entries: number2().int().min(1).max(100).default(40),
|
|
5857
|
+
max_entry_chars: number2().int().min(50).max(500).default(200)
|
|
5858
|
+
}).strict();
|
|
5859
|
+
var OmoMemorySoulSchema = object({
|
|
5860
|
+
edit_notice: boolean2().default(true)
|
|
5861
|
+
}).strict();
|
|
5837
5862
|
var OmoMemoryReflectionTriggerLayerSchema = object({
|
|
5838
5863
|
step_count: number2().int().nonnegative().optional(),
|
|
5839
5864
|
on_compaction: boolean2().optional()
|
|
5840
5865
|
}).strict();
|
|
5841
5866
|
var OmoMemoryReflectionLayerSchema = object({
|
|
5867
|
+
enabled: boolean2().optional(),
|
|
5842
5868
|
trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
|
|
5843
5869
|
merge: _enum(["auto", "integration"]).optional(),
|
|
5844
5870
|
category: string2().min(1).optional(),
|
|
@@ -5852,10 +5878,39 @@ var OmoMemorySyncLayerSchema = object({
|
|
|
5852
5878
|
var OmoMemorySearchLayerSchema = object({
|
|
5853
5879
|
enabled: boolean2().optional()
|
|
5854
5880
|
}).strict();
|
|
5881
|
+
var OmoMemoryNudgeLayerSchema = object({
|
|
5882
|
+
enabled: boolean2().optional(),
|
|
5883
|
+
every_user_turns: number2().int().min(1).optional()
|
|
5884
|
+
}).strict();
|
|
5885
|
+
var OmoMemoryFactsLayerSchema = object({
|
|
5886
|
+
enabled: boolean2().optional(),
|
|
5887
|
+
debounce_settles: number2().int().min(1).optional()
|
|
5888
|
+
}).strict();
|
|
5889
|
+
var OmoMemoryDreamLayerSchema = object({
|
|
5890
|
+
enabled: boolean2().optional(),
|
|
5891
|
+
idle_minutes: number2().int().min(0).optional(),
|
|
5892
|
+
min_hours_between: number2().int().min(1).optional(),
|
|
5893
|
+
shutdown_launch: boolean2().optional(),
|
|
5894
|
+
auto_select_max: number2().int().min(1).max(10).optional(),
|
|
5895
|
+
auto_select_max_chars: number2().int().min(1e4).optional()
|
|
5896
|
+
}).strict();
|
|
5897
|
+
var OmoMemoryPeopleLayerSchema = object({
|
|
5898
|
+
enabled: boolean2().optional(),
|
|
5899
|
+
max_entries: number2().int().min(1).max(100).optional(),
|
|
5900
|
+
max_entry_chars: number2().int().min(50).max(500).optional()
|
|
5901
|
+
}).strict();
|
|
5902
|
+
var OmoMemorySoulLayerSchema = object({
|
|
5903
|
+
edit_notice: boolean2().optional()
|
|
5904
|
+
}).strict();
|
|
5855
5905
|
var OmoMemoryAgentOverridesSchema = object({
|
|
5856
5906
|
enabled: boolean2().optional(),
|
|
5857
5907
|
agent: string2().min(1).optional(),
|
|
5858
5908
|
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5909
|
+
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
5910
|
+
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
5911
|
+
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
5912
|
+
people: OmoMemoryPeopleLayerSchema.optional(),
|
|
5913
|
+
soul: OmoMemorySoulLayerSchema.optional(),
|
|
5859
5914
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5860
5915
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5861
5916
|
compile_warn_tokens: number2().int().positive().optional()
|
|
@@ -5863,13 +5918,27 @@ var OmoMemoryAgentOverridesSchema = object({
|
|
|
5863
5918
|
var OmoMemorySettingsSchema = object({
|
|
5864
5919
|
enabled: boolean2().default(true),
|
|
5865
5920
|
agent: string2().min(1).default("auto"),
|
|
5921
|
+
tool_exposure: _enum(["direct", "search"]).default("direct"),
|
|
5866
5922
|
reflection: OmoMemoryReflectionSchema.default({
|
|
5867
|
-
|
|
5923
|
+
enabled: true,
|
|
5924
|
+
trigger: { step_count: 25, on_compaction: true },
|
|
5868
5925
|
merge: "auto",
|
|
5869
5926
|
category: "quick",
|
|
5870
5927
|
timeout_minutes: 15,
|
|
5871
5928
|
sandbox: "auto"
|
|
5872
5929
|
}),
|
|
5930
|
+
nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
|
|
5931
|
+
facts: OmoMemoryFactsSchema.default({ enabled: true, debounce_settles: 4 }),
|
|
5932
|
+
dream: OmoMemoryDreamSchema.default({
|
|
5933
|
+
enabled: true,
|
|
5934
|
+
idle_minutes: 30,
|
|
5935
|
+
min_hours_between: 24,
|
|
5936
|
+
shutdown_launch: true,
|
|
5937
|
+
auto_select_max: 5,
|
|
5938
|
+
auto_select_max_chars: 150000
|
|
5939
|
+
}),
|
|
5940
|
+
people: OmoMemoryPeopleSchema.default({ enabled: true, max_entries: 40, max_entry_chars: 200 }),
|
|
5941
|
+
soul: OmoMemorySoulSchema.default({ edit_notice: true }),
|
|
5873
5942
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5874
5943
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5875
5944
|
compile_warn_tokens: number2().int().positive().default(30000),
|
|
@@ -5878,7 +5947,13 @@ var OmoMemorySettingsSchema = object({
|
|
|
5878
5947
|
var OmoMemorySettingsLayerSchema = object({
|
|
5879
5948
|
enabled: boolean2().optional(),
|
|
5880
5949
|
agent: string2().min(1).optional(),
|
|
5950
|
+
tool_exposure: _enum(["direct", "search"]).optional(),
|
|
5881
5951
|
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5952
|
+
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
5953
|
+
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
5954
|
+
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
5955
|
+
people: OmoMemoryPeopleLayerSchema.optional(),
|
|
5956
|
+
soul: OmoMemorySoulLayerSchema.optional(),
|
|
5882
5957
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5883
5958
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5884
5959
|
compile_warn_tokens: number2().int().positive().optional(),
|
|
@@ -5917,6 +5992,16 @@ var OmoTaskTeamSettingsSchema = object({
|
|
|
5917
5992
|
var OmoTaskWarningsSchema = object({
|
|
5918
5993
|
unavailable_categories: boolean2().default(true)
|
|
5919
5994
|
}).strict();
|
|
5995
|
+
var OmoTaskDagSettingsSchema = object({
|
|
5996
|
+
max_nodes_per_run: number2().int().positive().default(64),
|
|
5997
|
+
max_runs_per_session: number2().int().positive().default(16),
|
|
5998
|
+
subscriber_ring: number2().int().positive().default(1000),
|
|
5999
|
+
heartbeat_ms: number2().int().positive().default(15000),
|
|
6000
|
+
history_default_limit: number2().int().positive().default(256),
|
|
6001
|
+
history_max_limit: number2().int().positive().default(1000),
|
|
6002
|
+
retention_days: number2().int().positive().default(7),
|
|
6003
|
+
max_prompt_bytes: number2().int().positive().default(262144)
|
|
6004
|
+
}).strict();
|
|
5920
6005
|
var OmoTaskSettingsSchema = object({
|
|
5921
6006
|
default_execution_mode: _enum(["in-process", "process"]).default("in-process"),
|
|
5922
6007
|
default_concurrency: number2().int().positive().default(5),
|
|
@@ -5934,7 +6019,18 @@ var OmoTaskSettingsSchema = object({
|
|
|
5934
6019
|
max_members: 8,
|
|
5935
6020
|
max_parallel_members: 4,
|
|
5936
6021
|
max_wall_clock_minutes: 120
|
|
5937
|
-
})
|
|
6022
|
+
}),
|
|
6023
|
+
dag: OmoTaskDagSettingsSchema.optional()
|
|
6024
|
+
}).strict();
|
|
6025
|
+
var OmoTaskDagSettingsLayerSchema = object({
|
|
6026
|
+
max_nodes_per_run: number2().int().positive().optional(),
|
|
6027
|
+
max_runs_per_session: number2().int().positive().optional(),
|
|
6028
|
+
subscriber_ring: number2().int().positive().optional(),
|
|
6029
|
+
heartbeat_ms: number2().int().positive().optional(),
|
|
6030
|
+
history_default_limit: number2().int().positive().optional(),
|
|
6031
|
+
history_max_limit: number2().int().positive().optional(),
|
|
6032
|
+
retention_days: number2().int().positive().optional(),
|
|
6033
|
+
max_prompt_bytes: number2().int().positive().optional()
|
|
5938
6034
|
}).strict();
|
|
5939
6035
|
var OmoTaskWaitLayerSchema = object({
|
|
5940
6036
|
min_ms: number2().int().positive().optional(),
|
|
@@ -5962,7 +6058,8 @@ var OmoTaskSettingsLayerSchema = object({
|
|
|
5962
6058
|
resume_children: boolean2().optional(),
|
|
5963
6059
|
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
5964
6060
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
5965
|
-
team: OmoTaskTeamSettingsLayerSchema.optional()
|
|
6061
|
+
team: OmoTaskTeamSettingsLayerSchema.optional(),
|
|
6062
|
+
dag: OmoTaskDagSettingsLayerSchema.optional()
|
|
5966
6063
|
}).strict();
|
|
5967
6064
|
function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism) {
|
|
5968
6065
|
const record2 = record(string2(), unknown()).parse(input);
|
|
@@ -6019,6 +6116,15 @@ var OmoTeamSpecLayerSchema = OmoTeamSpecBaseSchema.partial();
|
|
|
6019
6116
|
var OmoTeamsConfigSchema = record(string2(), OmoTeamSpecSchema);
|
|
6020
6117
|
var OmoTeamsConfigLayerSchema = record(string2(), OmoTeamSpecLayerSchema);
|
|
6021
6118
|
|
|
6119
|
+
// ../../../../omo-config-core/src/schema/telemetry.ts
|
|
6120
|
+
var OmoTelemetrySettingsShape = {
|
|
6121
|
+
enabled: boolean2()
|
|
6122
|
+
};
|
|
6123
|
+
var OmoTelemetrySettingsLayerSchema = object(OmoTelemetrySettingsShape).partial().strict();
|
|
6124
|
+
var OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
|
|
6125
|
+
enabled: boolean2().default(true)
|
|
6126
|
+
}).strict();
|
|
6127
|
+
|
|
6022
6128
|
// ../../../../omo-config-core/src/schema/config.ts
|
|
6023
6129
|
var OmoOpenCodeHarnessConfigSchema = record(string2(), unknown());
|
|
6024
6130
|
var OmoTypedHarnessConfigSchema = object({
|
|
@@ -6028,7 +6134,8 @@ var OmoTypedHarnessConfigSchema = object({
|
|
|
6028
6134
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
6029
6135
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
6030
6136
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
6031
|
-
memory: OmoMemorySettingsLayerSchema.optional()
|
|
6137
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
6138
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
6032
6139
|
}).strict();
|
|
6033
6140
|
var OmoConfigProfileSchema = object({
|
|
6034
6141
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
@@ -6038,6 +6145,7 @@ var OmoConfigProfileSchema = object({
|
|
|
6038
6145
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
6039
6146
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
6040
6147
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
6148
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
6041
6149
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
6042
6150
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
6043
6151
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
@@ -6051,6 +6159,7 @@ var OmoConfigSchema = object({
|
|
|
6051
6159
|
teams: OmoTeamsConfigSchema.optional(),
|
|
6052
6160
|
models: OmoModelCatalogSchema.optional(),
|
|
6053
6161
|
memory: OmoMemorySettingsSchema.optional(),
|
|
6162
|
+
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
6054
6163
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
6055
6164
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
6056
6165
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -6067,6 +6176,7 @@ var OmoConfigLayerSchema = object({
|
|
|
6067
6176
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
6068
6177
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
6069
6178
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
6179
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
6070
6180
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
6071
6181
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
6072
6182
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
|
|
10
10
|
"timeout": 5,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.10) Recommending Git Bash MCP"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "command",
|
|
21
21
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
22
22
|
"timeout": 5,
|
|
23
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
23
|
+
"statusMessage": "(OmO 5.0.0-beta.10) Resetting Git Bash MCP Reminder"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.10) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
package/packages/omo-codex/plugin/components/lazycodex-executor-verify/test/codex-hook.test.ts
CHANGED
|
@@ -36,10 +36,8 @@ describe("lazycodex executor SubagentStop verifier", () => {
|
|
|
36
36
|
// then
|
|
37
37
|
const parsed = parseBlockOutput(output);
|
|
38
38
|
expect(parsed.decision).toBe("block");
|
|
39
|
-
expect(parsed.reason).toContain("너는 방금 작업을 완료했다고 보고했고, 그건 거짓말이다.");
|
|
40
39
|
expect(parsed.reason).toContain(".omo/evidence/");
|
|
41
40
|
expect(parsed.reason).toContain("EVIDENCE_RECORDED: <path>");
|
|
42
|
-
expect(parsed.reason).not.toContain("2번째");
|
|
43
41
|
});
|
|
44
42
|
|
|
45
43
|
it("#given a prior blocked stop #when lazycodex executor stops again #then escalates the attempt count", () => {
|
|
@@ -51,8 +49,9 @@ describe("lazycodex executor SubagentStop verifier", () => {
|
|
|
51
49
|
const output = runSubagentStopHook(createInput(cwd), nodeFileSystem);
|
|
52
50
|
|
|
53
51
|
// then
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
expect(parseBlockOutput(output).decision).toBe("block");
|
|
53
|
+
const statePath = join(cwd, ".omo", "lazycodex-executor-verify", "sess.1-agent_1.json");
|
|
54
|
+
expect(JSON.parse(readFileSync(statePath, "utf8"))).toEqual({ attempts: 2 });
|
|
56
55
|
});
|
|
57
56
|
|
|
58
57
|
it("#given turn_id is omitted #when lazycodex executor stops #then the hook still parses the payload", () => {
|
|
@@ -394,18 +393,5 @@ describe("tier worker receipt enforcement", () => {
|
|
|
394
393
|
expect(matcher.test("lazycodex-gate-reviewer")).toBe(false);
|
|
395
394
|
}
|
|
396
395
|
});
|
|
397
|
-
|
|
398
|
-
it("#given the tier worker TOMLs #when inspected #then each instructs the EVIDENCE_RECORDED receipt line", () => {
|
|
399
|
-
for (const tier of ["low", "medium", "high"]) {
|
|
400
|
-
// when
|
|
401
|
-
const toml = readFileSync(
|
|
402
|
-
new URL(`../../ultrawork/agents/lazycodex-worker-${tier}.toml`, import.meta.url),
|
|
403
|
-
"utf8",
|
|
404
|
-
);
|
|
405
|
-
|
|
406
|
-
// then
|
|
407
|
-
expect(toml).toContain("EVIDENCE_RECORDED: <path>");
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
396
|
});
|
|
411
397
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "5.0.0-beta.
|
|
4
|
-
"inputDigest": "sha256:
|
|
3
|
+
"version": "5.0.0-beta.10",
|
|
4
|
+
"inputDigest": "sha256:5d8af4d49d78ea8b6e75e04e2bd3f1803b997dfcf0808dd40e1c72a5b1281455",
|
|
5
5
|
"outputs": [
|
|
6
6
|
{
|
|
7
7
|
"path": "cli.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "cli.js",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "8b31921f00d7333877fa0ba3b50e7318096656ad92249b285148c6fada11459d"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "codex-hook-cli.d.ts",
|
|
@@ -8,7 +8,7 @@ import { argv, execPath as execPath2, stderr } from "node:process";
|
|
|
8
8
|
import { stdin as processStdin } from "node:process";
|
|
9
9
|
|
|
10
10
|
// src/codex-hook.ts
|
|
11
|
-
import { readFileSync as readFileSync9, realpathSync as
|
|
11
|
+
import { readFileSync as readFileSync9, realpathSync as realpathSync7 } from "node:fs";
|
|
12
12
|
import { homedir as homedir3 } from "node:os";
|
|
13
13
|
import { join as join11, resolve as resolve11 } from "node:path";
|
|
14
14
|
|
|
@@ -42,8 +42,8 @@ import * as path from "node:path";
|
|
|
42
42
|
import { fileURLToPath } from "node:url";
|
|
43
43
|
import { statSync as statSync2 } from "node:fs";
|
|
44
44
|
import { isAbsolute as isAbsolute2 } from "node:path";
|
|
45
|
-
import { existsSync as existsSync10, statSync as statSync4 } from "node:fs";
|
|
46
|
-
import { dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
|
|
45
|
+
import { existsSync as existsSync10, realpathSync as realpathSync4, statSync as statSync4 } from "node:fs";
|
|
46
|
+
import { basename as basename3, dirname as dirname8, join as join4, resolve as resolve7 } from "node:path";
|
|
47
47
|
import { basename as basename2, extname } from "node:path";
|
|
48
48
|
import { resolve as resolve6 } from "node:path";
|
|
49
49
|
import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
@@ -4117,32 +4117,86 @@ function isDirectoryPath(filePath) {
|
|
|
4117
4117
|
}
|
|
4118
4118
|
}
|
|
4119
4119
|
function findWorkspaceRoot(filePath) {
|
|
4120
|
-
const
|
|
4120
|
+
const cwd = contextCwd();
|
|
4121
|
+
const abs = resolveReadablePathInsideContext(filePath);
|
|
4121
4122
|
let dir = abs;
|
|
4122
4123
|
if (!isDirectoryPath(dir)) {
|
|
4123
4124
|
dir = dirname8(dir);
|
|
4124
4125
|
}
|
|
4125
|
-
|
|
4126
|
-
while (dir
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4126
|
+
const fallbackRoot = nearestExistingDirectoryInsideContext(dir, cwd) ?? cwd;
|
|
4127
|
+
while (isPathInside(cwd, dir)) {
|
|
4128
|
+
const canonicalDir = existingDirectoryInsideContext(dir, cwd);
|
|
4129
|
+
if (canonicalDir !== undefined) {
|
|
4130
|
+
for (const marker of WORKSPACE_MARKERS) {
|
|
4131
|
+
if (existsSync10(join4(dir, marker))) {
|
|
4132
|
+
return canonicalDir;
|
|
4133
|
+
}
|
|
4130
4134
|
}
|
|
4131
4135
|
}
|
|
4132
|
-
|
|
4136
|
+
if (dir === cwd)
|
|
4137
|
+
break;
|
|
4133
4138
|
dir = dirname8(dir);
|
|
4134
4139
|
}
|
|
4135
|
-
return
|
|
4140
|
+
return fallbackRoot;
|
|
4136
4141
|
}
|
|
4137
|
-
function
|
|
4142
|
+
function resolveReadablePathInsideContext(filePath) {
|
|
4138
4143
|
const cwd = contextCwd();
|
|
4139
4144
|
const abs = resolve7(cwd, filePath);
|
|
4145
|
+
if (isPathInside(cwd, abs))
|
|
4146
|
+
return abs;
|
|
4147
|
+
const rebased = rebaseThroughCanonicalAncestor(abs, cwd);
|
|
4148
|
+
if (rebased !== undefined)
|
|
4149
|
+
return rebased;
|
|
4150
|
+
const canonical = canonicalizeExistingOrNearestAncestor(abs);
|
|
4151
|
+
if (isPathInside(cwd, canonical))
|
|
4152
|
+
return canonical;
|
|
4153
|
+
throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
|
|
4154
|
+
}
|
|
4155
|
+
function resolvePathInsideContext(filePath) {
|
|
4156
|
+
const cwd = contextCwd();
|
|
4157
|
+
const abs = resolveReadablePathInsideContext(filePath);
|
|
4140
4158
|
const canonical = canonicalizeExistingOrNearestAncestor(abs);
|
|
4141
4159
|
if (!isPathInside(cwd, canonical)) {
|
|
4142
4160
|
throw new LspInvalidPathError(`LSP file path must be inside request cwd: ${filePath}`);
|
|
4143
4161
|
}
|
|
4144
4162
|
return canonical;
|
|
4145
4163
|
}
|
|
4164
|
+
function rebaseThroughCanonicalAncestor(path2, cwd) {
|
|
4165
|
+
let current = path2;
|
|
4166
|
+
const suffix = [];
|
|
4167
|
+
while (true) {
|
|
4168
|
+
if (existsSync10(current)) {
|
|
4169
|
+
const canonical = realpathSync4(current);
|
|
4170
|
+
if (isPathInside(cwd, canonical))
|
|
4171
|
+
return suffix.length === 0 ? canonical : join4(canonical, ...suffix);
|
|
4172
|
+
}
|
|
4173
|
+
const parent = dirname8(current);
|
|
4174
|
+
if (parent === current)
|
|
4175
|
+
return;
|
|
4176
|
+
suffix.unshift(basename3(current));
|
|
4177
|
+
current = parent;
|
|
4178
|
+
}
|
|
4179
|
+
}
|
|
4180
|
+
function existingDirectoryInsideContext(directory, cwd) {
|
|
4181
|
+
if (!existsSync10(directory))
|
|
4182
|
+
return;
|
|
4183
|
+
const canonical = realpathSync4(directory);
|
|
4184
|
+
if (!statSync4(canonical).isDirectory())
|
|
4185
|
+
return;
|
|
4186
|
+
return isPathInside(cwd, canonical) ? canonical : undefined;
|
|
4187
|
+
}
|
|
4188
|
+
function nearestExistingDirectoryInsideContext(directory, cwd) {
|
|
4189
|
+
let current = directory;
|
|
4190
|
+
while (isPathInside(cwd, current)) {
|
|
4191
|
+
const canonical = existingDirectoryInsideContext(current, cwd);
|
|
4192
|
+
if (canonical !== undefined)
|
|
4193
|
+
return canonical;
|
|
4194
|
+
if (current === cwd)
|
|
4195
|
+
return;
|
|
4196
|
+
current = dirname8(current);
|
|
4197
|
+
}
|
|
4198
|
+
return;
|
|
4199
|
+
}
|
|
4146
4200
|
function formatServerLookupError(result) {
|
|
4147
4201
|
if (result.status === "not_installed") {
|
|
4148
4202
|
return formatNotInstalled(result);
|
|
@@ -4213,7 +4267,7 @@ function formatNotInstalled(result) {
|
|
|
4213
4267
|
].join(`
|
|
4214
4268
|
`);
|
|
4215
4269
|
}
|
|
4216
|
-
var
|
|
4270
|
+
var READ_ONLY_TOOLS = new Set([
|
|
4217
4271
|
"diagnostics",
|
|
4218
4272
|
"definition",
|
|
4219
4273
|
"references",
|
|
@@ -4222,7 +4276,7 @@ var READ_ONLY_RETRY_TOOLS = new Set([
|
|
|
4222
4276
|
"prepareRename"
|
|
4223
4277
|
]);
|
|
4224
4278
|
async function withLspClient(filePath, fn, toolName, options = {}) {
|
|
4225
|
-
const absPath = resolvePathInsideContext(filePath);
|
|
4279
|
+
const absPath = READ_ONLY_TOOLS.has(toolName) ? resolveReadablePathInsideContext(filePath) : resolvePathInsideContext(filePath);
|
|
4226
4280
|
if (isDirectoryPath(absPath)) {
|
|
4227
4281
|
throw new LspInvalidPathError("Directory paths are not supported by this LSP tool. " + "Use lsp.diagnostics with a directory path for directory diagnostics.");
|
|
4228
4282
|
}
|
|
@@ -4237,9 +4291,9 @@ async function withLspClient(filePath, fn, toolName, options = {}) {
|
|
|
4237
4291
|
const acquireAndCall = async (allowRetry) => {
|
|
4238
4292
|
const client = await manager.getClient(root, server2, options.signal);
|
|
4239
4293
|
try {
|
|
4240
|
-
return await fn(client, root);
|
|
4294
|
+
return await fn(client, root, absPath);
|
|
4241
4295
|
} catch (err) {
|
|
4242
|
-
if (allowRetry &&
|
|
4296
|
+
if (allowRetry && READ_ONLY_TOOLS.has(toolName) && isLspDeadConnectionError(err)) {
|
|
4243
4297
|
manager.invalidateClient(root, server2.id, client);
|
|
4244
4298
|
return acquireAndCall(false);
|
|
4245
4299
|
}
|
|
@@ -4669,7 +4723,7 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4669
4723
|
const filePath = requireString(params, "filePath");
|
|
4670
4724
|
const severity = severityFilter(params);
|
|
4671
4725
|
try {
|
|
4672
|
-
const absPath =
|
|
4726
|
+
const absPath = resolveReadablePathInsideContext(filePath);
|
|
4673
4727
|
if (isDirectoryPath(absPath)) {
|
|
4674
4728
|
const extension = inferExtensionFromDirectory(absPath);
|
|
4675
4729
|
if (!extension) {
|
|
@@ -4698,7 +4752,7 @@ async function executeLspDiagnostics(params, signal) {
|
|
|
4698
4752
|
};
|
|
4699
4753
|
return text(output2.output, details2);
|
|
4700
4754
|
}
|
|
4701
|
-
const result = await withLspClient(filePath, async (client) => client.diagnostics(
|
|
4755
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.diagnostics(resolvedFilePath, signal), "diagnostics", clientOptions(signal));
|
|
4702
4756
|
if (result.transientError) {
|
|
4703
4757
|
const message = result.transientError.message;
|
|
4704
4758
|
const details2 = {
|
|
@@ -4770,7 +4824,7 @@ async function executeLspGotoDefinition(params, signal) {
|
|
|
4770
4824
|
const line = requireNumber(params, "line");
|
|
4771
4825
|
const character = requireNumber(params, "character");
|
|
4772
4826
|
try {
|
|
4773
|
-
const result = await withLspClient(filePath, async (client) => client.definition(
|
|
4827
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.definition(resolvedFilePath, line, character, signal), "definition", clientOptions(signal));
|
|
4774
4828
|
const locations = !result ? [] : Array.isArray(result) ? result : [result];
|
|
4775
4829
|
const details = { filePath, line, character, locations };
|
|
4776
4830
|
if (locations.length === 0)
|
|
@@ -4795,7 +4849,7 @@ async function executeLspFindReferences(params, signal) {
|
|
|
4795
4849
|
const character = requireNumber(params, "character");
|
|
4796
4850
|
const includeDeclaration = optionalBoolean(params, "includeDeclaration") ?? true;
|
|
4797
4851
|
try {
|
|
4798
|
-
const result = await withLspClient(filePath, async (client) => client.references(
|
|
4852
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.references(resolvedFilePath, line, character, includeDeclaration, signal), "references", clientOptions(signal));
|
|
4799
4853
|
const references = Array.isArray(result) ? result : [];
|
|
4800
4854
|
const total = references.length;
|
|
4801
4855
|
const truncated = total > DEFAULT_MAX_REFERENCES;
|
|
@@ -4835,7 +4889,7 @@ async function executeLspPrepareRename(params, signal) {
|
|
|
4835
4889
|
const line = requireNumber(params, "line");
|
|
4836
4890
|
const character = requireNumber(params, "character");
|
|
4837
4891
|
try {
|
|
4838
|
-
const result = await withLspClient(filePath, async (client) => client.prepareRename(
|
|
4892
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.prepareRename(resolvedFilePath, line, character, signal), "prepareRename", clientOptions(signal));
|
|
4839
4893
|
const details = { filePath, line, character, result };
|
|
4840
4894
|
return text(formatPrepareRenameResult(result), details);
|
|
4841
4895
|
} catch (error) {
|
|
@@ -4856,7 +4910,7 @@ async function executeLspRename(params, signal) {
|
|
|
4856
4910
|
const character = requireNumber(params, "character");
|
|
4857
4911
|
const newName = requireString(params, "newName");
|
|
4858
4912
|
try {
|
|
4859
|
-
const result = await withLspClient(filePath, async (client) => client.rename(
|
|
4913
|
+
const result = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.rename(resolvedFilePath, line, character, newName, signal), "rename", clientOptions(signal));
|
|
4860
4914
|
const details = { filePath, line, character, newName, apply: result.apply, edit: result.edit };
|
|
4861
4915
|
return text(formatApplyResult(result.apply), details, !result.apply.success);
|
|
4862
4916
|
} catch (error) {
|
|
@@ -4930,7 +4984,7 @@ async function executeLspSymbols(params, signal) {
|
|
|
4930
4984
|
const symbols2 = await withLspClient(filePath, async (client) => client.workspaceSymbols(query, signal), "workspaceSymbols", clientOptions(signal));
|
|
4931
4985
|
return formatSymbolsResult(filePath, scope, symbols2, limit, query);
|
|
4932
4986
|
}
|
|
4933
|
-
const symbols = await withLspClient(filePath, async (client) => client.documentSymbols(
|
|
4987
|
+
const symbols = await withLspClient(filePath, async (client, _workspaceRoot, resolvedFilePath) => client.documentSymbols(resolvedFilePath, signal), "documentSymbols", clientOptions(signal));
|
|
4934
4988
|
return formatSymbolsResult(filePath, scope, symbols, limit);
|
|
4935
4989
|
} catch (error) {
|
|
4936
4990
|
const query = optionalString(params, "query");
|
|
@@ -5400,8 +5454,8 @@ function extensionKey(filePath) {
|
|
|
5400
5454
|
}
|
|
5401
5455
|
// ../../../../lsp-core/src/request-context.ts
|
|
5402
5456
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5403
|
-
import { existsSync as existsSync12, realpathSync as
|
|
5404
|
-
import { basename as
|
|
5457
|
+
import { existsSync as existsSync12, realpathSync as realpathSync5, statSync as statSync6 } from "node:fs";
|
|
5458
|
+
import { basename as basename4, delimiter as delimiter4, dirname as dirname2, isAbsolute as isAbsolute6, join as join7, relative as relative5, resolve as resolve9 } from "node:path";
|
|
5405
5459
|
|
|
5406
5460
|
class LspRequestContextParseError2 extends Error {
|
|
5407
5461
|
code;
|
|
@@ -5447,14 +5501,14 @@ function canonicalCwd2(cwd) {
|
|
|
5447
5501
|
if (!existsSync12(resolved) || !statSync6(resolved).isDirectory()) {
|
|
5448
5502
|
throw new LspRequestContextParseError2("invalid_cwd", `LSP request cwd must be an existing directory: ${cwd}`);
|
|
5449
5503
|
}
|
|
5450
|
-
return
|
|
5504
|
+
return realpathSync5(resolved);
|
|
5451
5505
|
}
|
|
5452
5506
|
function canonicalizeExistingOrNearestAncestor2(path2) {
|
|
5453
5507
|
let current = resolve9(path2);
|
|
5454
5508
|
const suffix = [];
|
|
5455
5509
|
while (true) {
|
|
5456
5510
|
try {
|
|
5457
|
-
const existing =
|
|
5511
|
+
const existing = realpathSync5(current);
|
|
5458
5512
|
return suffix.length === 0 ? existing : join7(existing, ...suffix);
|
|
5459
5513
|
} catch (error) {
|
|
5460
5514
|
if (!isMissingPathError2(error))
|
|
@@ -5462,7 +5516,7 @@ function canonicalizeExistingOrNearestAncestor2(path2) {
|
|
|
5462
5516
|
const parent = dirname2(current);
|
|
5463
5517
|
if (parent === current)
|
|
5464
5518
|
throw error;
|
|
5465
|
-
suffix.unshift(
|
|
5519
|
+
suffix.unshift(basename4(current));
|
|
5466
5520
|
current = parent;
|
|
5467
5521
|
}
|
|
5468
5522
|
}
|
|
@@ -5775,7 +5829,7 @@ function notConfiguredAvailability(details) {
|
|
|
5775
5829
|
return typeof extension === "string" && extension.length > 0 ? { extension } : undefined;
|
|
5776
5830
|
}
|
|
5777
5831
|
function codexLspRequestContext(env = process.env, cwd = process.cwd()) {
|
|
5778
|
-
const canonicalCwd3 =
|
|
5832
|
+
const canonicalCwd3 = realpathSync7(resolve11(cwd));
|
|
5779
5833
|
const codexHome = resolve11(env["CODEX_HOME"]?.trim() || join11(homedir3(), ".codex"));
|
|
5780
5834
|
return parseLspRequestContext2({
|
|
5781
5835
|
cwd: canonicalCwd3,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
|
|
10
10
|
"timeout": 60,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.10) Checking LSP Diagnostics"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type": "command",
|
|
22
22
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
23
23
|
"timeout": 5,
|
|
24
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
24
|
+
"statusMessage": "(OmO 5.0.0-beta.10) Resetting LSP Diagnostics Cache"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|