oh-my-opencode 5.0.0-beta.1 → 5.0.0-beta.11
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 +805 -534
- package/dist/cli/run/on-complete-hook.d.ts +2 -0
- package/dist/cli-node/index.js +805 -534
- 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 +1566 -1217
- 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/tools/delegate-task/builtin-categories.d.ts +1 -0
- package/dist/tools/delegate-task/builtin-category-definition.d.ts +1 -0
- package/dist/tools/delegate-task/tool-description.d.ts +3 -1
- package/dist/tui.js +184 -83
- 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-outside-cwd.test.ts +78 -0
- package/packages/lsp-core/src/lsp/client-wrapper.test.ts +66 -13
- package/packages/lsp-core/src/lsp/client-wrapper.ts +70 -18
- package/packages/lsp-core/src/lsp/outside-context-workspace.ts +33 -0
- package/packages/lsp-core/src/lsp/workspace-edit-adversarial.test.ts +20 -1
- package/packages/lsp-core/src/lsp/workspace-markers.ts +1 -0
- 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 +160 -71
- package/packages/lsp-daemon/dist/client.js +135 -46
- package/packages/lsp-daemon/dist/index.js +143 -54
- package/packages/lsp-tools-mcp/dist/cli.js +131 -42
- package/packages/lsp-tools-mcp/dist/mcp.js +131 -42
- package/packages/lsp-tools-mcp/dist/tools.js +131 -42
- 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 +147 -64
- 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
package/dist/index.js
CHANGED
|
@@ -5537,14 +5537,15 @@ var init_codegraph = __esm(() => {
|
|
|
5537
5537
|
|
|
5538
5538
|
// packages/omo-config-core/src/schema/memory.ts
|
|
5539
5539
|
import * as z7 from "zod";
|
|
5540
|
-
var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
|
|
5540
|
+
var OmoMemoryReflectionTriggerSchema, OmoMemoryReflectionSchema, OmoMemorySyncSchema, OmoMemorySearchSchema, OmoMemoryNudgeSchema, OmoMemoryFactsSchema, OmoMemoryDreamSchema, OmoMemoryPeopleSchema, OmoMemorySoulSchema, OmoMemoryReflectionTriggerLayerSchema, OmoMemoryReflectionLayerSchema, OmoMemorySyncLayerSchema, OmoMemorySearchLayerSchema, OmoMemoryNudgeLayerSchema, OmoMemoryFactsLayerSchema, OmoMemoryDreamLayerSchema, OmoMemoryPeopleLayerSchema, OmoMemorySoulLayerSchema, OmoMemoryAgentOverridesSchema, OmoMemorySettingsSchema, OmoMemorySettingsLayerSchema;
|
|
5541
5541
|
var init_memory = __esm(() => {
|
|
5542
5542
|
OmoMemoryReflectionTriggerSchema = z7.object({
|
|
5543
|
-
step_count: z7.number().int().nonnegative().default(
|
|
5543
|
+
step_count: z7.number().int().nonnegative().default(25),
|
|
5544
5544
|
on_compaction: z7.boolean().default(true)
|
|
5545
5545
|
}).strict();
|
|
5546
5546
|
OmoMemoryReflectionSchema = z7.object({
|
|
5547
|
-
|
|
5547
|
+
enabled: z7.boolean().default(true),
|
|
5548
|
+
trigger: OmoMemoryReflectionTriggerSchema.default({ step_count: 25, on_compaction: true }),
|
|
5548
5549
|
merge: z7.enum(["auto", "integration"]).default("auto"),
|
|
5549
5550
|
category: z7.string().min(1).default("quick"),
|
|
5550
5551
|
timeout_minutes: z7.number().int().positive().default(15),
|
|
@@ -5557,11 +5558,36 @@ var init_memory = __esm(() => {
|
|
|
5557
5558
|
OmoMemorySearchSchema = z7.object({
|
|
5558
5559
|
enabled: z7.boolean().default(true)
|
|
5559
5560
|
}).strict();
|
|
5561
|
+
OmoMemoryNudgeSchema = z7.object({
|
|
5562
|
+
enabled: z7.boolean().default(true),
|
|
5563
|
+
every_user_turns: z7.number().int().min(1).default(10)
|
|
5564
|
+
}).strict();
|
|
5565
|
+
OmoMemoryFactsSchema = z7.object({
|
|
5566
|
+
enabled: z7.boolean().default(true),
|
|
5567
|
+
debounce_settles: z7.number().int().min(1).default(4)
|
|
5568
|
+
}).strict();
|
|
5569
|
+
OmoMemoryDreamSchema = z7.object({
|
|
5570
|
+
enabled: z7.boolean().default(true),
|
|
5571
|
+
idle_minutes: z7.number().int().min(0).default(30),
|
|
5572
|
+
min_hours_between: z7.number().int().min(1).default(24),
|
|
5573
|
+
shutdown_launch: z7.boolean().default(true),
|
|
5574
|
+
auto_select_max: z7.number().int().min(1).max(10).default(5),
|
|
5575
|
+
auto_select_max_chars: z7.number().int().min(1e4).default(150000)
|
|
5576
|
+
}).strict();
|
|
5577
|
+
OmoMemoryPeopleSchema = z7.object({
|
|
5578
|
+
enabled: z7.boolean().default(true),
|
|
5579
|
+
max_entries: z7.number().int().min(1).max(100).default(40),
|
|
5580
|
+
max_entry_chars: z7.number().int().min(50).max(500).default(200)
|
|
5581
|
+
}).strict();
|
|
5582
|
+
OmoMemorySoulSchema = z7.object({
|
|
5583
|
+
edit_notice: z7.boolean().default(true)
|
|
5584
|
+
}).strict();
|
|
5560
5585
|
OmoMemoryReflectionTriggerLayerSchema = z7.object({
|
|
5561
5586
|
step_count: z7.number().int().nonnegative().optional(),
|
|
5562
5587
|
on_compaction: z7.boolean().optional()
|
|
5563
5588
|
}).strict();
|
|
5564
5589
|
OmoMemoryReflectionLayerSchema = z7.object({
|
|
5590
|
+
enabled: z7.boolean().optional(),
|
|
5565
5591
|
trigger: OmoMemoryReflectionTriggerLayerSchema.optional(),
|
|
5566
5592
|
merge: z7.enum(["auto", "integration"]).optional(),
|
|
5567
5593
|
category: z7.string().min(1).optional(),
|
|
@@ -5575,10 +5601,39 @@ var init_memory = __esm(() => {
|
|
|
5575
5601
|
OmoMemorySearchLayerSchema = z7.object({
|
|
5576
5602
|
enabled: z7.boolean().optional()
|
|
5577
5603
|
}).strict();
|
|
5604
|
+
OmoMemoryNudgeLayerSchema = z7.object({
|
|
5605
|
+
enabled: z7.boolean().optional(),
|
|
5606
|
+
every_user_turns: z7.number().int().min(1).optional()
|
|
5607
|
+
}).strict();
|
|
5608
|
+
OmoMemoryFactsLayerSchema = z7.object({
|
|
5609
|
+
enabled: z7.boolean().optional(),
|
|
5610
|
+
debounce_settles: z7.number().int().min(1).optional()
|
|
5611
|
+
}).strict();
|
|
5612
|
+
OmoMemoryDreamLayerSchema = z7.object({
|
|
5613
|
+
enabled: z7.boolean().optional(),
|
|
5614
|
+
idle_minutes: z7.number().int().min(0).optional(),
|
|
5615
|
+
min_hours_between: z7.number().int().min(1).optional(),
|
|
5616
|
+
shutdown_launch: z7.boolean().optional(),
|
|
5617
|
+
auto_select_max: z7.number().int().min(1).max(10).optional(),
|
|
5618
|
+
auto_select_max_chars: z7.number().int().min(1e4).optional()
|
|
5619
|
+
}).strict();
|
|
5620
|
+
OmoMemoryPeopleLayerSchema = z7.object({
|
|
5621
|
+
enabled: z7.boolean().optional(),
|
|
5622
|
+
max_entries: z7.number().int().min(1).max(100).optional(),
|
|
5623
|
+
max_entry_chars: z7.number().int().min(50).max(500).optional()
|
|
5624
|
+
}).strict();
|
|
5625
|
+
OmoMemorySoulLayerSchema = z7.object({
|
|
5626
|
+
edit_notice: z7.boolean().optional()
|
|
5627
|
+
}).strict();
|
|
5578
5628
|
OmoMemoryAgentOverridesSchema = z7.object({
|
|
5579
5629
|
enabled: z7.boolean().optional(),
|
|
5580
5630
|
agent: z7.string().min(1).optional(),
|
|
5581
5631
|
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5632
|
+
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
5633
|
+
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
5634
|
+
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
5635
|
+
people: OmoMemoryPeopleLayerSchema.optional(),
|
|
5636
|
+
soul: OmoMemorySoulLayerSchema.optional(),
|
|
5582
5637
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5583
5638
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5584
5639
|
compile_warn_tokens: z7.number().int().positive().optional()
|
|
@@ -5586,13 +5641,27 @@ var init_memory = __esm(() => {
|
|
|
5586
5641
|
OmoMemorySettingsSchema = z7.object({
|
|
5587
5642
|
enabled: z7.boolean().default(true),
|
|
5588
5643
|
agent: z7.string().min(1).default("auto"),
|
|
5644
|
+
tool_exposure: z7.enum(["direct", "search"]).default("direct"),
|
|
5589
5645
|
reflection: OmoMemoryReflectionSchema.default({
|
|
5590
|
-
|
|
5646
|
+
enabled: true,
|
|
5647
|
+
trigger: { step_count: 25, on_compaction: true },
|
|
5591
5648
|
merge: "auto",
|
|
5592
5649
|
category: "quick",
|
|
5593
5650
|
timeout_minutes: 15,
|
|
5594
5651
|
sandbox: "auto"
|
|
5595
5652
|
}),
|
|
5653
|
+
nudge: OmoMemoryNudgeSchema.default({ enabled: true, every_user_turns: 10 }),
|
|
5654
|
+
facts: OmoMemoryFactsSchema.default({ enabled: true, debounce_settles: 4 }),
|
|
5655
|
+
dream: OmoMemoryDreamSchema.default({
|
|
5656
|
+
enabled: true,
|
|
5657
|
+
idle_minutes: 30,
|
|
5658
|
+
min_hours_between: 24,
|
|
5659
|
+
shutdown_launch: true,
|
|
5660
|
+
auto_select_max: 5,
|
|
5661
|
+
auto_select_max_chars: 150000
|
|
5662
|
+
}),
|
|
5663
|
+
people: OmoMemoryPeopleSchema.default({ enabled: true, max_entries: 40, max_entry_chars: 200 }),
|
|
5664
|
+
soul: OmoMemorySoulSchema.default({ edit_notice: true }),
|
|
5596
5665
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5597
5666
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5598
5667
|
compile_warn_tokens: z7.number().int().positive().default(30000),
|
|
@@ -5601,7 +5670,13 @@ var init_memory = __esm(() => {
|
|
|
5601
5670
|
OmoMemorySettingsLayerSchema = z7.object({
|
|
5602
5671
|
enabled: z7.boolean().optional(),
|
|
5603
5672
|
agent: z7.string().min(1).optional(),
|
|
5673
|
+
tool_exposure: z7.enum(["direct", "search"]).optional(),
|
|
5604
5674
|
reflection: OmoMemoryReflectionLayerSchema.optional(),
|
|
5675
|
+
nudge: OmoMemoryNudgeLayerSchema.optional(),
|
|
5676
|
+
facts: OmoMemoryFactsLayerSchema.optional(),
|
|
5677
|
+
dream: OmoMemoryDreamLayerSchema.optional(),
|
|
5678
|
+
people: OmoMemoryPeopleLayerSchema.optional(),
|
|
5679
|
+
soul: OmoMemorySoulLayerSchema.optional(),
|
|
5605
5680
|
sync: OmoMemorySyncLayerSchema.optional(),
|
|
5606
5681
|
search: OmoMemorySearchLayerSchema.optional(),
|
|
5607
5682
|
compile_warn_tokens: z7.number().int().positive().optional(),
|
|
@@ -5641,7 +5716,7 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
5641
5716
|
residency_max_children: record8["residency_max_children"] ?? Math.max(8, resolveParallelism() * 3)
|
|
5642
5717
|
});
|
|
5643
5718
|
}
|
|
5644
|
-
var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskSettingsSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
|
|
5719
|
+
var ResidencyMaxChildrenInputSchema, OmoTaskWaitSchema, OmoTaskTeamSettingsSchema, OmoTaskWarningsSchema, OmoTaskDagSettingsSchema, OmoTaskSettingsSchema, OmoTaskDagSettingsLayerSchema, OmoTaskWaitLayerSchema, OmoTaskTeamSettingsLayerSchema, OmoTaskWarningsLayerSchema, OmoTaskSettingsLayerSchema;
|
|
5645
5720
|
var init_task = __esm(() => {
|
|
5646
5721
|
ResidencyMaxChildrenInputSchema = z9.union([z9.number().int().positive(), z9.literal("unlimited")]);
|
|
5647
5722
|
OmoTaskWaitSchema = z9.object({
|
|
@@ -5657,6 +5732,16 @@ var init_task = __esm(() => {
|
|
|
5657
5732
|
OmoTaskWarningsSchema = z9.object({
|
|
5658
5733
|
unavailable_categories: z9.boolean().default(true)
|
|
5659
5734
|
}).strict();
|
|
5735
|
+
OmoTaskDagSettingsSchema = z9.object({
|
|
5736
|
+
max_nodes_per_run: z9.number().int().positive().default(64),
|
|
5737
|
+
max_runs_per_session: z9.number().int().positive().default(16),
|
|
5738
|
+
subscriber_ring: z9.number().int().positive().default(1000),
|
|
5739
|
+
heartbeat_ms: z9.number().int().positive().default(15000),
|
|
5740
|
+
history_default_limit: z9.number().int().positive().default(256),
|
|
5741
|
+
history_max_limit: z9.number().int().positive().default(1000),
|
|
5742
|
+
retention_days: z9.number().int().positive().default(7),
|
|
5743
|
+
max_prompt_bytes: z9.number().int().positive().default(262144)
|
|
5744
|
+
}).strict();
|
|
5660
5745
|
OmoTaskSettingsSchema = z9.object({
|
|
5661
5746
|
default_execution_mode: z9.enum(["in-process", "process"]).default("in-process"),
|
|
5662
5747
|
default_concurrency: z9.number().int().positive().default(5),
|
|
@@ -5674,7 +5759,18 @@ var init_task = __esm(() => {
|
|
|
5674
5759
|
max_members: 8,
|
|
5675
5760
|
max_parallel_members: 4,
|
|
5676
5761
|
max_wall_clock_minutes: 120
|
|
5677
|
-
})
|
|
5762
|
+
}),
|
|
5763
|
+
dag: OmoTaskDagSettingsSchema.optional()
|
|
5764
|
+
}).strict();
|
|
5765
|
+
OmoTaskDagSettingsLayerSchema = z9.object({
|
|
5766
|
+
max_nodes_per_run: z9.number().int().positive().optional(),
|
|
5767
|
+
max_runs_per_session: z9.number().int().positive().optional(),
|
|
5768
|
+
subscriber_ring: z9.number().int().positive().optional(),
|
|
5769
|
+
heartbeat_ms: z9.number().int().positive().optional(),
|
|
5770
|
+
history_default_limit: z9.number().int().positive().optional(),
|
|
5771
|
+
history_max_limit: z9.number().int().positive().optional(),
|
|
5772
|
+
retention_days: z9.number().int().positive().optional(),
|
|
5773
|
+
max_prompt_bytes: z9.number().int().positive().optional()
|
|
5678
5774
|
}).strict();
|
|
5679
5775
|
OmoTaskWaitLayerSchema = z9.object({
|
|
5680
5776
|
min_ms: z9.number().int().positive().optional(),
|
|
@@ -5702,7 +5798,8 @@ var init_task = __esm(() => {
|
|
|
5702
5798
|
resume_children: z9.boolean().optional(),
|
|
5703
5799
|
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
5704
5800
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
5705
|
-
team: OmoTaskTeamSettingsLayerSchema.optional()
|
|
5801
|
+
team: OmoTaskTeamSettingsLayerSchema.optional(),
|
|
5802
|
+
dag: OmoTaskDagSettingsLayerSchema.optional()
|
|
5706
5803
|
}).strict();
|
|
5707
5804
|
});
|
|
5708
5805
|
|
|
@@ -5757,8 +5854,21 @@ var init_team = __esm(() => {
|
|
|
5757
5854
|
OmoTeamsConfigLayerSchema = z10.record(z10.string(), OmoTeamSpecLayerSchema);
|
|
5758
5855
|
});
|
|
5759
5856
|
|
|
5760
|
-
// packages/omo-config-core/src/schema/
|
|
5857
|
+
// packages/omo-config-core/src/schema/telemetry.ts
|
|
5761
5858
|
import * as z11 from "zod";
|
|
5859
|
+
var OmoTelemetrySettingsShape, OmoTelemetrySettingsLayerSchema, OmoTelemetrySettingsSchema;
|
|
5860
|
+
var init_telemetry = __esm(() => {
|
|
5861
|
+
OmoTelemetrySettingsShape = {
|
|
5862
|
+
enabled: z11.boolean()
|
|
5863
|
+
};
|
|
5864
|
+
OmoTelemetrySettingsLayerSchema = z11.object(OmoTelemetrySettingsShape).partial().strict();
|
|
5865
|
+
OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
|
|
5866
|
+
enabled: z11.boolean().default(true)
|
|
5867
|
+
}).strict();
|
|
5868
|
+
});
|
|
5869
|
+
|
|
5870
|
+
// packages/omo-config-core/src/schema/config.ts
|
|
5871
|
+
import * as z12 from "zod";
|
|
5762
5872
|
var OmoOpenCodeHarnessConfigSchema, OmoTypedHarnessConfigSchema, OmoConfigProfileSchema, OmoConfigSchema, OmoConfigLayerSchema;
|
|
5763
5873
|
var init_config = __esm(() => {
|
|
5764
5874
|
init_agent();
|
|
@@ -5768,17 +5878,19 @@ var init_config = __esm(() => {
|
|
|
5768
5878
|
init_model_catalog();
|
|
5769
5879
|
init_task();
|
|
5770
5880
|
init_team();
|
|
5771
|
-
|
|
5772
|
-
|
|
5881
|
+
init_telemetry();
|
|
5882
|
+
OmoOpenCodeHarnessConfigSchema = z12.record(z12.string(), z12.unknown());
|
|
5883
|
+
OmoTypedHarnessConfigSchema = z12.object({
|
|
5773
5884
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
5774
5885
|
agents: OmoAgentsConfigSchema.optional(),
|
|
5775
5886
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
5776
5887
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
5777
5888
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5778
5889
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
5779
|
-
memory: OmoMemorySettingsLayerSchema.optional()
|
|
5890
|
+
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5891
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
5780
5892
|
}).strict();
|
|
5781
|
-
OmoConfigProfileSchema =
|
|
5893
|
+
OmoConfigProfileSchema = z12.object({
|
|
5782
5894
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
5783
5895
|
agents: OmoAgentsConfigSchema.optional(),
|
|
5784
5896
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -5786,12 +5898,13 @@ var init_config = __esm(() => {
|
|
|
5786
5898
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5787
5899
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
5788
5900
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5901
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
5789
5902
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5790
5903
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5791
5904
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
5792
5905
|
}).strict();
|
|
5793
|
-
OmoConfigSchema =
|
|
5794
|
-
$schema:
|
|
5906
|
+
OmoConfigSchema = z12.object({
|
|
5907
|
+
$schema: z12.string().optional(),
|
|
5795
5908
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
5796
5909
|
agents: OmoAgentsConfigSchema.optional(),
|
|
5797
5910
|
codegraph: OmoCodegraphSettingsSchema.optional(),
|
|
@@ -5799,15 +5912,16 @@ var init_config = __esm(() => {
|
|
|
5799
5912
|
teams: OmoTeamsConfigSchema.optional(),
|
|
5800
5913
|
models: OmoModelCatalogSchema.optional(),
|
|
5801
5914
|
memory: OmoMemorySettingsSchema.optional(),
|
|
5915
|
+
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
5802
5916
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5803
5917
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5804
5918
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
5805
|
-
profiles:
|
|
5806
|
-
_migrations:
|
|
5807
|
-
legacy_migrations:
|
|
5919
|
+
profiles: z12.record(z12.string(), OmoConfigProfileSchema).default({}),
|
|
5920
|
+
_migrations: z12.array(z12.string()).optional(),
|
|
5921
|
+
legacy_migrations: z12.record(z12.string(), z12.unknown()).optional()
|
|
5808
5922
|
}).strict();
|
|
5809
|
-
OmoConfigLayerSchema =
|
|
5810
|
-
$schema:
|
|
5923
|
+
OmoConfigLayerSchema = z12.object({
|
|
5924
|
+
$schema: z12.string().optional(),
|
|
5811
5925
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
5812
5926
|
agents: OmoAgentsConfigSchema.optional(),
|
|
5813
5927
|
codegraph: OmoCodegraphSettingsLayerSchema.optional(),
|
|
@@ -5815,12 +5929,13 @@ var init_config = __esm(() => {
|
|
|
5815
5929
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
5816
5930
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
5817
5931
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
5932
|
+
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
5818
5933
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
5819
5934
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
5820
5935
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
5821
|
-
profiles:
|
|
5822
|
-
_migrations:
|
|
5823
|
-
legacy_migrations:
|
|
5936
|
+
profiles: z12.record(z12.string(), OmoConfigProfileSchema).optional(),
|
|
5937
|
+
_migrations: z12.array(z12.string()).optional(),
|
|
5938
|
+
legacy_migrations: z12.record(z12.string(), z12.unknown()).optional()
|
|
5824
5939
|
}).strict();
|
|
5825
5940
|
});
|
|
5826
5941
|
|
|
@@ -5837,6 +5952,7 @@ var init_schema = __esm(() => {
|
|
|
5837
5952
|
init_model_ref();
|
|
5838
5953
|
init_task();
|
|
5839
5954
|
init_team();
|
|
5955
|
+
init_telemetry();
|
|
5840
5956
|
});
|
|
5841
5957
|
|
|
5842
5958
|
// packages/omo-config-core/src/loader/merge.ts
|
|
@@ -16168,7 +16284,7 @@ var init_member_parser = __esm(() => {
|
|
|
16168
16284
|
});
|
|
16169
16285
|
|
|
16170
16286
|
// packages/team-core/src/types.ts
|
|
16171
|
-
import * as
|
|
16287
|
+
import * as z50 from "zod";
|
|
16172
16288
|
var MESSAGE_KINDS, TASK_STATUSES, RUNTIME_STATUSES, MemberBaseSchema, CategoryMemberSchema, SubagentMemberSchema, MemberSchema, TeamReferenceSchema, MISSING_TEAM_LEAD_MESSAGE = "leadAgentId required (or write a `lead: {...}` field, or mark one member with `isLead: true`)", TeamSpecSchema, MessageSchema, TaskSchema, RuntimeStateMemberModelSchema, RuntimeStateMemberSchema, RuntimeBoundsSchema, ShutdownRequestSchema, RuntimeStateTmuxLayoutSchema, RuntimeStateSchema, AGENT_ELIGIBILITY_REGISTRY, parseMemberBase;
|
|
16173
16289
|
var init_types5 = __esm(() => {
|
|
16174
16290
|
init_member_parser();
|
|
@@ -16189,40 +16305,40 @@ var init_types5 = __esm(() => {
|
|
|
16189
16305
|
"failed",
|
|
16190
16306
|
"orphaned"
|
|
16191
16307
|
];
|
|
16192
|
-
MemberBaseSchema =
|
|
16193
|
-
name:
|
|
16194
|
-
cwd:
|
|
16195
|
-
worktreePath:
|
|
16196
|
-
task_summary:
|
|
16197
|
-
subscriptions:
|
|
16198
|
-
backendType:
|
|
16199
|
-
color:
|
|
16200
|
-
isActive:
|
|
16308
|
+
MemberBaseSchema = z50.object({
|
|
16309
|
+
name: z50.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
16310
|
+
cwd: z50.string().optional(),
|
|
16311
|
+
worktreePath: z50.string().optional(),
|
|
16312
|
+
task_summary: z50.string().max(80).optional(),
|
|
16313
|
+
subscriptions: z50.array(z50.string()).optional(),
|
|
16314
|
+
backendType: z50.enum(["in-process", "tmux"]).default("in-process"),
|
|
16315
|
+
color: z50.string().optional(),
|
|
16316
|
+
isActive: z50.boolean().default(true)
|
|
16201
16317
|
}).strict();
|
|
16202
16318
|
CategoryMemberSchema = MemberBaseSchema.extend({
|
|
16203
|
-
kind:
|
|
16204
|
-
category:
|
|
16205
|
-
prompt:
|
|
16319
|
+
kind: z50.literal("category"),
|
|
16320
|
+
category: z50.string().min(1),
|
|
16321
|
+
prompt: z50.string().min(1)
|
|
16206
16322
|
});
|
|
16207
16323
|
SubagentMemberSchema = MemberBaseSchema.extend({
|
|
16208
|
-
kind:
|
|
16209
|
-
subagent_type:
|
|
16210
|
-
prompt:
|
|
16324
|
+
kind: z50.literal("subagent_type"),
|
|
16325
|
+
subagent_type: z50.string().min(1),
|
|
16326
|
+
prompt: z50.string().optional()
|
|
16211
16327
|
});
|
|
16212
|
-
MemberSchema =
|
|
16213
|
-
TeamReferenceSchema =
|
|
16214
|
-
path:
|
|
16215
|
-
description:
|
|
16328
|
+
MemberSchema = z50.discriminatedUnion("kind", [CategoryMemberSchema, SubagentMemberSchema]);
|
|
16329
|
+
TeamReferenceSchema = z50.object({
|
|
16330
|
+
path: z50.string(),
|
|
16331
|
+
description: z50.string().optional()
|
|
16216
16332
|
}).strict();
|
|
16217
|
-
TeamSpecSchema =
|
|
16218
|
-
version:
|
|
16219
|
-
name:
|
|
16220
|
-
description:
|
|
16221
|
-
createdAt:
|
|
16222
|
-
leadAgentId:
|
|
16223
|
-
teamAllowedPaths:
|
|
16224
|
-
sessionPermission:
|
|
16225
|
-
members:
|
|
16333
|
+
TeamSpecSchema = z50.object({
|
|
16334
|
+
version: z50.literal(1).default(1),
|
|
16335
|
+
name: z50.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
16336
|
+
description: z50.string().optional(),
|
|
16337
|
+
createdAt: z50.number().int().positive().default(() => Date.now()),
|
|
16338
|
+
leadAgentId: z50.string().optional(),
|
|
16339
|
+
teamAllowedPaths: z50.array(z50.string()).optional(),
|
|
16340
|
+
sessionPermission: z50.string().optional(),
|
|
16341
|
+
members: z50.array(MemberSchema).min(1).max(8)
|
|
16226
16342
|
}).superRefine((teamSpec, ctx) => {
|
|
16227
16343
|
if (teamSpec.leadAgentId === undefined && teamSpec.members.length > 1) {
|
|
16228
16344
|
ctx.addIssue({
|
|
@@ -16244,95 +16360,95 @@ var init_types5 = __esm(() => {
|
|
|
16244
16360
|
leadAgentId: firstMember.name
|
|
16245
16361
|
};
|
|
16246
16362
|
});
|
|
16247
|
-
MessageSchema =
|
|
16248
|
-
version:
|
|
16249
|
-
messageId:
|
|
16250
|
-
from:
|
|
16251
|
-
to:
|
|
16252
|
-
kind:
|
|
16253
|
-
body:
|
|
16254
|
-
summary:
|
|
16255
|
-
references:
|
|
16256
|
-
timestamp:
|
|
16257
|
-
correlationId:
|
|
16258
|
-
color:
|
|
16363
|
+
MessageSchema = z50.object({
|
|
16364
|
+
version: z50.literal(1),
|
|
16365
|
+
messageId: z50.string().uuid(),
|
|
16366
|
+
from: z50.string(),
|
|
16367
|
+
to: z50.string(),
|
|
16368
|
+
kind: z50.enum(MESSAGE_KINDS),
|
|
16369
|
+
body: z50.string().max(32 * 1024),
|
|
16370
|
+
summary: z50.string().optional(),
|
|
16371
|
+
references: z50.array(TeamReferenceSchema).optional(),
|
|
16372
|
+
timestamp: z50.number().int().positive(),
|
|
16373
|
+
correlationId: z50.string().uuid().optional(),
|
|
16374
|
+
color: z50.string().optional()
|
|
16259
16375
|
});
|
|
16260
|
-
TaskSchema =
|
|
16261
|
-
version:
|
|
16262
|
-
id:
|
|
16263
|
-
subject:
|
|
16264
|
-
description:
|
|
16265
|
-
activeForm:
|
|
16266
|
-
status:
|
|
16267
|
-
owner:
|
|
16268
|
-
blocks:
|
|
16269
|
-
blockedBy:
|
|
16270
|
-
metadata:
|
|
16271
|
-
createdAt:
|
|
16272
|
-
updatedAt:
|
|
16273
|
-
claimedAt:
|
|
16376
|
+
TaskSchema = z50.object({
|
|
16377
|
+
version: z50.literal(1),
|
|
16378
|
+
id: z50.string(),
|
|
16379
|
+
subject: z50.string(),
|
|
16380
|
+
description: z50.string(),
|
|
16381
|
+
activeForm: z50.string().optional(),
|
|
16382
|
+
status: z50.enum(TASK_STATUSES),
|
|
16383
|
+
owner: z50.string().optional(),
|
|
16384
|
+
blocks: z50.array(z50.string()).default([]),
|
|
16385
|
+
blockedBy: z50.array(z50.string()).default([]),
|
|
16386
|
+
metadata: z50.record(z50.string(), z50.unknown()).optional(),
|
|
16387
|
+
createdAt: z50.number().int().positive(),
|
|
16388
|
+
updatedAt: z50.number().int().positive(),
|
|
16389
|
+
claimedAt: z50.number().int().positive().optional()
|
|
16274
16390
|
});
|
|
16275
|
-
RuntimeStateMemberModelSchema =
|
|
16276
|
-
providerID:
|
|
16277
|
-
modelID:
|
|
16278
|
-
variant:
|
|
16279
|
-
reasoningEffort:
|
|
16280
|
-
temperature:
|
|
16281
|
-
top_p:
|
|
16282
|
-
maxTokens:
|
|
16283
|
-
thinking:
|
|
16284
|
-
type:
|
|
16285
|
-
budgetTokens:
|
|
16391
|
+
RuntimeStateMemberModelSchema = z50.object({
|
|
16392
|
+
providerID: z50.string(),
|
|
16393
|
+
modelID: z50.string(),
|
|
16394
|
+
variant: z50.string().optional(),
|
|
16395
|
+
reasoningEffort: z50.string().optional(),
|
|
16396
|
+
temperature: z50.number().optional(),
|
|
16397
|
+
top_p: z50.number().optional(),
|
|
16398
|
+
maxTokens: z50.number().optional(),
|
|
16399
|
+
thinking: z50.object({
|
|
16400
|
+
type: z50.enum(["enabled", "disabled"]),
|
|
16401
|
+
budgetTokens: z50.number().int().positive().optional()
|
|
16286
16402
|
}).optional()
|
|
16287
16403
|
}).strict();
|
|
16288
|
-
RuntimeStateMemberSchema =
|
|
16289
|
-
name:
|
|
16290
|
-
sessionId:
|
|
16291
|
-
tmuxPaneId:
|
|
16292
|
-
tmuxGridPaneId:
|
|
16293
|
-
agentType:
|
|
16294
|
-
subagent_type:
|
|
16295
|
-
category:
|
|
16404
|
+
RuntimeStateMemberSchema = z50.object({
|
|
16405
|
+
name: z50.string(),
|
|
16406
|
+
sessionId: z50.string().optional(),
|
|
16407
|
+
tmuxPaneId: z50.string().optional(),
|
|
16408
|
+
tmuxGridPaneId: z50.string().optional(),
|
|
16409
|
+
agentType: z50.enum(["leader", "general-purpose"]),
|
|
16410
|
+
subagent_type: z50.string().optional(),
|
|
16411
|
+
category: z50.string().optional(),
|
|
16296
16412
|
model: RuntimeStateMemberModelSchema.optional(),
|
|
16297
|
-
status:
|
|
16298
|
-
color:
|
|
16299
|
-
worktreePath:
|
|
16300
|
-
lastInjectedTurnMarker:
|
|
16301
|
-
pendingInjectedMessageIds:
|
|
16413
|
+
status: z50.enum(["pending", "running", "idle", "errored", "completed", "shutdown_approved"]),
|
|
16414
|
+
color: z50.string().optional(),
|
|
16415
|
+
worktreePath: z50.string().optional(),
|
|
16416
|
+
lastInjectedTurnMarker: z50.string().optional(),
|
|
16417
|
+
pendingInjectedMessageIds: z50.array(z50.string()).default([])
|
|
16302
16418
|
}).strict();
|
|
16303
|
-
RuntimeBoundsSchema =
|
|
16304
|
-
maxMembers:
|
|
16305
|
-
maxParallelMembers:
|
|
16306
|
-
maxMessagesPerRun:
|
|
16307
|
-
maxWallClockMinutes:
|
|
16308
|
-
maxMemberTurns:
|
|
16419
|
+
RuntimeBoundsSchema = z50.object({
|
|
16420
|
+
maxMembers: z50.number().int().default(8),
|
|
16421
|
+
maxParallelMembers: z50.number().int().default(4),
|
|
16422
|
+
maxMessagesPerRun: z50.number().int().default(1e4),
|
|
16423
|
+
maxWallClockMinutes: z50.number().int().default(120),
|
|
16424
|
+
maxMemberTurns: z50.number().int().default(500)
|
|
16309
16425
|
}).strict();
|
|
16310
|
-
ShutdownRequestSchema =
|
|
16311
|
-
memberId:
|
|
16312
|
-
requesterName:
|
|
16313
|
-
requestedAt:
|
|
16314
|
-
approvedAt:
|
|
16315
|
-
rejectedReason:
|
|
16316
|
-
rejectedAt:
|
|
16426
|
+
ShutdownRequestSchema = z50.object({
|
|
16427
|
+
memberId: z50.string(),
|
|
16428
|
+
requesterName: z50.string(),
|
|
16429
|
+
requestedAt: z50.number().int().positive(),
|
|
16430
|
+
approvedAt: z50.number().int().positive().optional(),
|
|
16431
|
+
rejectedReason: z50.string().optional(),
|
|
16432
|
+
rejectedAt: z50.number().int().positive().optional()
|
|
16317
16433
|
}).strict();
|
|
16318
|
-
RuntimeStateTmuxLayoutSchema =
|
|
16319
|
-
ownedSession:
|
|
16320
|
-
targetSessionId:
|
|
16321
|
-
focusWindowId:
|
|
16322
|
-
gridWindowId:
|
|
16323
|
-
paneIds:
|
|
16434
|
+
RuntimeStateTmuxLayoutSchema = z50.object({
|
|
16435
|
+
ownedSession: z50.boolean(),
|
|
16436
|
+
targetSessionId: z50.string(),
|
|
16437
|
+
focusWindowId: z50.string().optional(),
|
|
16438
|
+
gridWindowId: z50.string().optional(),
|
|
16439
|
+
paneIds: z50.array(z50.string()).optional()
|
|
16324
16440
|
}).strict();
|
|
16325
|
-
RuntimeStateSchema =
|
|
16326
|
-
version:
|
|
16327
|
-
teamRunId:
|
|
16328
|
-
teamName:
|
|
16329
|
-
specSource:
|
|
16330
|
-
createdAt:
|
|
16331
|
-
status:
|
|
16332
|
-
leadSessionId:
|
|
16441
|
+
RuntimeStateSchema = z50.object({
|
|
16442
|
+
version: z50.literal(1),
|
|
16443
|
+
teamRunId: z50.string().uuid(),
|
|
16444
|
+
teamName: z50.string(),
|
|
16445
|
+
specSource: z50.enum(["project", "user"]),
|
|
16446
|
+
createdAt: z50.number().int().positive(),
|
|
16447
|
+
status: z50.enum(RUNTIME_STATUSES),
|
|
16448
|
+
leadSessionId: z50.string().optional(),
|
|
16333
16449
|
tmuxLayout: RuntimeStateTmuxLayoutSchema.optional(),
|
|
16334
|
-
members:
|
|
16335
|
-
shutdownRequests:
|
|
16450
|
+
members: z50.array(RuntimeStateMemberSchema),
|
|
16451
|
+
shutdownRequests: z50.array(ShutdownRequestSchema).default([]),
|
|
16336
16452
|
bounds: RuntimeBoundsSchema
|
|
16337
16453
|
});
|
|
16338
16454
|
AGENT_ELIGIBILITY_REGISTRY = {
|
|
@@ -24410,10 +24526,10 @@ var CATEGORY_MODEL_REQUIREMENTS = {
|
|
|
24410
24526
|
quick: {
|
|
24411
24527
|
fallbackChain: [
|
|
24412
24528
|
{ providers: ["kimi-for-coding"], model: "kimi-for-coding-highspeed" },
|
|
24413
|
-
{ providers: ["
|
|
24529
|
+
{ providers: ["openai-codex"], model: "gpt-5.6-luna-fast", variant: "low" },
|
|
24414
24530
|
{ providers: ["deepseek"], model: "deepseek-v4-flash", variant: "off" },
|
|
24415
24531
|
{
|
|
24416
|
-
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "
|
|
24532
|
+
providers: ["qwen-token-plan", "alibaba-token-plan", "bailian-coding-plan", "vercel"],
|
|
24417
24533
|
model: "qwen3.6-flash",
|
|
24418
24534
|
variant: "low"
|
|
24419
24535
|
},
|
|
@@ -24429,6 +24545,11 @@ var CATEGORY_MODEL_REQUIREMENTS = {
|
|
|
24429
24545
|
},
|
|
24430
24546
|
"unspecified-low": {
|
|
24431
24547
|
fallbackChain: [
|
|
24548
|
+
{
|
|
24549
|
+
providers: ["xai", "github-copilot", "opencode", "vercel"],
|
|
24550
|
+
model: "grok-4.6",
|
|
24551
|
+
variant: "xhigh"
|
|
24552
|
+
},
|
|
24432
24553
|
{
|
|
24433
24554
|
providers: ["openai", "quotio-openai", "github-copilot", "opencode", "vercel"],
|
|
24434
24555
|
model: "gpt-5.6-terra",
|
|
@@ -24569,6 +24690,16 @@ function isGlmModel(model) {
|
|
|
24569
24690
|
const modelName = extractModelName(model).toLowerCase();
|
|
24570
24691
|
return modelName.includes("glm");
|
|
24571
24692
|
}
|
|
24693
|
+
var GROK_45_RE = /grok-4-5(?![0-9])/;
|
|
24694
|
+
var GROK_46_RE = /grok-4-6(?![0-9])/;
|
|
24695
|
+
function isGrok45Model(model) {
|
|
24696
|
+
const modelName = extractModelName(model).toLowerCase().replaceAll(".", "-");
|
|
24697
|
+
return GROK_45_RE.test(modelName);
|
|
24698
|
+
}
|
|
24699
|
+
function isGrok46Model(model) {
|
|
24700
|
+
const modelName = extractModelName(model).toLowerCase().replaceAll(".", "-");
|
|
24701
|
+
return GROK_46_RE.test(modelName);
|
|
24702
|
+
}
|
|
24572
24703
|
var GEMINI_PROVIDERS = ["google/", "google-vertex/"];
|
|
24573
24704
|
function isGeminiModel(model) {
|
|
24574
24705
|
if (GEMINI_PROVIDERS.some((prefix) => model.startsWith(prefix)))
|
|
@@ -27120,8 +27251,8 @@ function findUnknownKeyPaths(schema2, value) {
|
|
|
27120
27251
|
}
|
|
27121
27252
|
|
|
27122
27253
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
27123
|
-
import { z as
|
|
27124
|
-
var BuiltinAgentNameSchema =
|
|
27254
|
+
import { z as z13 } from "zod";
|
|
27255
|
+
var BuiltinAgentNameSchema = z13.enum([
|
|
27125
27256
|
"sisyphus",
|
|
27126
27257
|
"hephaestus",
|
|
27127
27258
|
"prometheus",
|
|
@@ -27134,7 +27265,7 @@ var BuiltinAgentNameSchema = z12.enum([
|
|
|
27134
27265
|
"atlas",
|
|
27135
27266
|
"sisyphus-junior"
|
|
27136
27267
|
]);
|
|
27137
|
-
var BuiltinSkillNameSchema =
|
|
27268
|
+
var BuiltinSkillNameSchema = z13.enum([
|
|
27138
27269
|
"playwright",
|
|
27139
27270
|
"agent-browser",
|
|
27140
27271
|
"dev-browser",
|
|
@@ -27149,7 +27280,7 @@ var BuiltinSkillNameSchema = z12.enum([
|
|
|
27149
27280
|
"visual-qa",
|
|
27150
27281
|
"team-mode"
|
|
27151
27282
|
]);
|
|
27152
|
-
var OverridableAgentNameSchema =
|
|
27283
|
+
var OverridableAgentNameSchema = z13.enum([
|
|
27153
27284
|
"build",
|
|
27154
27285
|
"plan",
|
|
27155
27286
|
"sisyphus",
|
|
@@ -27167,42 +27298,42 @@ var OverridableAgentNameSchema = z12.enum([
|
|
|
27167
27298
|
]);
|
|
27168
27299
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
27169
27300
|
init_src();
|
|
27170
|
-
import { z as
|
|
27301
|
+
import { z as z16 } from "zod";
|
|
27171
27302
|
|
|
27172
27303
|
// packages/omo-opencode/src/config/schema/fallback-models.ts
|
|
27173
27304
|
init_src();
|
|
27174
|
-
import { z as
|
|
27175
|
-
var FallbackModelObjectSchema =
|
|
27176
|
-
model:
|
|
27305
|
+
import { z as z14 } from "zod";
|
|
27306
|
+
var FallbackModelObjectSchema = z14.object({
|
|
27307
|
+
model: z14.string(),
|
|
27177
27308
|
reasoning: OmoReasoningSchema.optional(),
|
|
27178
|
-
variant:
|
|
27179
|
-
reasoningEffort:
|
|
27180
|
-
temperature:
|
|
27181
|
-
top_p:
|
|
27182
|
-
maxTokens:
|
|
27183
|
-
thinking:
|
|
27184
|
-
type:
|
|
27185
|
-
budgetTokens:
|
|
27309
|
+
variant: z14.string().optional(),
|
|
27310
|
+
reasoningEffort: z14.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
27311
|
+
temperature: z14.number().min(0).max(2).optional(),
|
|
27312
|
+
top_p: z14.number().min(0).max(1).optional(),
|
|
27313
|
+
maxTokens: z14.number().optional(),
|
|
27314
|
+
thinking: z14.object({
|
|
27315
|
+
type: z14.enum(["enabled", "disabled"]),
|
|
27316
|
+
budgetTokens: z14.number().optional()
|
|
27186
27317
|
}).optional()
|
|
27187
27318
|
});
|
|
27188
|
-
var FallbackModelStringArraySchema =
|
|
27189
|
-
var FallbackModelObjectArraySchema =
|
|
27190
|
-
var FallbackModelMixedArraySchema =
|
|
27191
|
-
var FallbackModelsSchema =
|
|
27192
|
-
|
|
27319
|
+
var FallbackModelStringArraySchema = z14.array(z14.string());
|
|
27320
|
+
var FallbackModelObjectArraySchema = z14.array(FallbackModelObjectSchema);
|
|
27321
|
+
var FallbackModelMixedArraySchema = z14.array(z14.union([z14.string(), FallbackModelObjectSchema]));
|
|
27322
|
+
var FallbackModelsSchema = z14.union([
|
|
27323
|
+
z14.string(),
|
|
27193
27324
|
FallbackModelStringArraySchema,
|
|
27194
27325
|
FallbackModelObjectArraySchema,
|
|
27195
27326
|
FallbackModelMixedArraySchema
|
|
27196
27327
|
]);
|
|
27197
27328
|
|
|
27198
27329
|
// packages/omo-opencode/src/config/schema/internal/permission.ts
|
|
27199
|
-
import { z as
|
|
27200
|
-
var PermissionValueSchema =
|
|
27201
|
-
var BashPermissionSchema =
|
|
27330
|
+
import { z as z15 } from "zod";
|
|
27331
|
+
var PermissionValueSchema = z15.enum(["ask", "allow", "deny"]);
|
|
27332
|
+
var BashPermissionSchema = z15.union([
|
|
27202
27333
|
PermissionValueSchema,
|
|
27203
|
-
|
|
27334
|
+
z15.record(z15.string(), PermissionValueSchema)
|
|
27204
27335
|
]);
|
|
27205
|
-
var AgentPermissionSchema =
|
|
27336
|
+
var AgentPermissionSchema = z15.object({
|
|
27206
27337
|
edit: PermissionValueSchema.optional(),
|
|
27207
27338
|
bash: BashPermissionSchema.optional(),
|
|
27208
27339
|
webfetch: PermissionValueSchema.optional(),
|
|
@@ -27212,50 +27343,50 @@ var AgentPermissionSchema = z14.object({
|
|
|
27212
27343
|
}).catchall(PermissionValueSchema.optional());
|
|
27213
27344
|
|
|
27214
27345
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
27215
|
-
var AgentOverrideConfigSchema =
|
|
27216
|
-
model:
|
|
27217
|
-
models:
|
|
27346
|
+
var AgentOverrideConfigSchema = z16.object({
|
|
27347
|
+
model: z16.string().optional(),
|
|
27348
|
+
models: z16.array(z16.union([z16.string(), FallbackModelObjectSchema])).optional(),
|
|
27218
27349
|
fallback_models: FallbackModelsSchema.optional(),
|
|
27219
27350
|
reasoning: OmoReasoningSchema.optional(),
|
|
27220
|
-
variant:
|
|
27221
|
-
category:
|
|
27222
|
-
skills:
|
|
27223
|
-
temperature:
|
|
27224
|
-
top_p:
|
|
27225
|
-
prompt:
|
|
27226
|
-
prompt_append:
|
|
27227
|
-
tools:
|
|
27228
|
-
disable:
|
|
27229
|
-
description:
|
|
27230
|
-
mode:
|
|
27231
|
-
color:
|
|
27232
|
-
displayName:
|
|
27351
|
+
variant: z16.string().optional(),
|
|
27352
|
+
category: z16.string().optional(),
|
|
27353
|
+
skills: z16.array(z16.string()).optional(),
|
|
27354
|
+
temperature: z16.number().min(0).max(2).optional(),
|
|
27355
|
+
top_p: z16.number().min(0).max(1).optional(),
|
|
27356
|
+
prompt: z16.string().optional(),
|
|
27357
|
+
prompt_append: z16.string().optional(),
|
|
27358
|
+
tools: z16.record(z16.string(), z16.boolean()).optional(),
|
|
27359
|
+
disable: z16.boolean().optional(),
|
|
27360
|
+
description: z16.string().optional(),
|
|
27361
|
+
mode: z16.enum(["subagent", "primary", "all"]).optional(),
|
|
27362
|
+
color: z16.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
27363
|
+
displayName: z16.string().optional(),
|
|
27233
27364
|
permission: AgentPermissionSchema.optional(),
|
|
27234
|
-
maxTokens:
|
|
27235
|
-
thinking:
|
|
27236
|
-
type:
|
|
27237
|
-
budgetTokens:
|
|
27365
|
+
maxTokens: z16.number().optional(),
|
|
27366
|
+
thinking: z16.object({
|
|
27367
|
+
type: z16.enum(["enabled", "disabled"]),
|
|
27368
|
+
budgetTokens: z16.number().optional()
|
|
27238
27369
|
}).optional(),
|
|
27239
|
-
reasoningEffort:
|
|
27240
|
-
textVerbosity:
|
|
27241
|
-
providerOptions:
|
|
27242
|
-
ultrawork:
|
|
27243
|
-
model:
|
|
27370
|
+
reasoningEffort: z16.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
27371
|
+
textVerbosity: z16.enum(["low", "medium", "high"]).optional(),
|
|
27372
|
+
providerOptions: z16.record(z16.string(), z16.unknown()).optional(),
|
|
27373
|
+
ultrawork: z16.object({
|
|
27374
|
+
model: z16.string().optional(),
|
|
27244
27375
|
reasoning: OmoReasoningSchema.optional(),
|
|
27245
|
-
variant:
|
|
27376
|
+
variant: z16.string().optional()
|
|
27246
27377
|
}).optional(),
|
|
27247
|
-
compaction:
|
|
27248
|
-
model:
|
|
27378
|
+
compaction: z16.object({
|
|
27379
|
+
model: z16.string().optional(),
|
|
27249
27380
|
reasoning: OmoReasoningSchema.optional(),
|
|
27250
|
-
variant:
|
|
27381
|
+
variant: z16.string().optional()
|
|
27251
27382
|
}).optional()
|
|
27252
27383
|
});
|
|
27253
|
-
var AgentOverridesSchema =
|
|
27384
|
+
var AgentOverridesSchema = z16.object({
|
|
27254
27385
|
build: AgentOverrideConfigSchema.optional(),
|
|
27255
27386
|
plan: AgentOverrideConfigSchema.optional(),
|
|
27256
27387
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
27257
27388
|
hephaestus: AgentOverrideConfigSchema.extend({
|
|
27258
|
-
allow_non_gpt_model:
|
|
27389
|
+
allow_non_gpt_model: z16.boolean().optional()
|
|
27259
27390
|
}).optional(),
|
|
27260
27391
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
27261
27392
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
@@ -27269,72 +27400,72 @@ var AgentOverridesSchema = z15.object({
|
|
|
27269
27400
|
atlas: AgentOverrideConfigSchema.optional()
|
|
27270
27401
|
}).catchall(AgentOverrideConfigSchema.optional());
|
|
27271
27402
|
// packages/omo-opencode/src/config/schema/babysitting.ts
|
|
27272
|
-
import { z as
|
|
27273
|
-
var BabysittingConfigSchema =
|
|
27274
|
-
timeout_ms:
|
|
27403
|
+
import { z as z17 } from "zod";
|
|
27404
|
+
var BabysittingConfigSchema = z17.object({
|
|
27405
|
+
timeout_ms: z17.number().default(120000)
|
|
27275
27406
|
});
|
|
27276
27407
|
// packages/omo-opencode/src/config/schema/background-task.ts
|
|
27277
|
-
import { z as
|
|
27278
|
-
var CircuitBreakerConfigSchema =
|
|
27279
|
-
enabled:
|
|
27280
|
-
maxToolCalls:
|
|
27281
|
-
consecutiveThreshold:
|
|
27408
|
+
import { z as z18 } from "zod";
|
|
27409
|
+
var CircuitBreakerConfigSchema = z18.object({
|
|
27410
|
+
enabled: z18.boolean().optional(),
|
|
27411
|
+
maxToolCalls: z18.number().int().min(10).optional(),
|
|
27412
|
+
consecutiveThreshold: z18.number().int().min(5).optional()
|
|
27282
27413
|
});
|
|
27283
|
-
var BackgroundTaskConfigSchema =
|
|
27284
|
-
defaultConcurrency:
|
|
27285
|
-
providerConcurrency:
|
|
27286
|
-
modelConcurrency:
|
|
27287
|
-
maxDepth:
|
|
27288
|
-
staleTimeoutMs:
|
|
27289
|
-
messageStalenessTimeoutMs:
|
|
27290
|
-
taskTtlMs:
|
|
27291
|
-
sessionGoneTimeoutMs:
|
|
27292
|
-
taskCleanupDelayMs:
|
|
27293
|
-
syncPollTimeoutMs:
|
|
27294
|
-
maxToolCalls:
|
|
27414
|
+
var BackgroundTaskConfigSchema = z18.object({
|
|
27415
|
+
defaultConcurrency: z18.number().min(1).optional(),
|
|
27416
|
+
providerConcurrency: z18.record(z18.string(), z18.number().min(0)).optional(),
|
|
27417
|
+
modelConcurrency: z18.record(z18.string(), z18.number().min(0)).optional(),
|
|
27418
|
+
maxDepth: z18.number().int().min(1).optional(),
|
|
27419
|
+
staleTimeoutMs: z18.number().min(60000).optional(),
|
|
27420
|
+
messageStalenessTimeoutMs: z18.number().min(60000).optional(),
|
|
27421
|
+
taskTtlMs: z18.number().min(300000).optional(),
|
|
27422
|
+
sessionGoneTimeoutMs: z18.number().min(1e4).optional(),
|
|
27423
|
+
taskCleanupDelayMs: z18.number().min(60000).optional(),
|
|
27424
|
+
syncPollTimeoutMs: z18.number().min(60000).optional(),
|
|
27425
|
+
maxToolCalls: z18.number().int().min(10).optional(),
|
|
27295
27426
|
circuitBreaker: CircuitBreakerConfigSchema.optional()
|
|
27296
27427
|
});
|
|
27297
27428
|
// packages/omo-opencode/src/config/schema/browser-automation.ts
|
|
27298
|
-
import { z as
|
|
27299
|
-
var BrowserAutomationProviderSchema =
|
|
27429
|
+
import { z as z19 } from "zod";
|
|
27430
|
+
var BrowserAutomationProviderSchema = z19.enum([
|
|
27300
27431
|
"playwright",
|
|
27301
27432
|
"agent-browser",
|
|
27302
27433
|
"dev-browser",
|
|
27303
27434
|
"playwright-cli"
|
|
27304
27435
|
]);
|
|
27305
|
-
var BrowserAutomationConfigSchema =
|
|
27436
|
+
var BrowserAutomationConfigSchema = z19.object({
|
|
27306
27437
|
provider: BrowserAutomationProviderSchema.default("playwright"),
|
|
27307
|
-
playwright_mcp_args:
|
|
27438
|
+
playwright_mcp_args: z19.array(z19.string()).optional()
|
|
27308
27439
|
});
|
|
27309
27440
|
// packages/omo-opencode/src/config/schema/categories.ts
|
|
27310
27441
|
init_src();
|
|
27311
|
-
import { z as
|
|
27312
|
-
var CategoryConfigSchema =
|
|
27313
|
-
description:
|
|
27314
|
-
model:
|
|
27315
|
-
models:
|
|
27442
|
+
import { z as z20 } from "zod";
|
|
27443
|
+
var CategoryConfigSchema = z20.object({
|
|
27444
|
+
description: z20.string().optional(),
|
|
27445
|
+
model: z20.string().optional(),
|
|
27446
|
+
models: z20.array(z20.union([z20.string(), FallbackModelObjectSchema])).optional(),
|
|
27316
27447
|
fallback_models: FallbackModelsSchema.optional(),
|
|
27317
27448
|
reasoning: OmoReasoningSchema.optional(),
|
|
27318
|
-
variant:
|
|
27319
|
-
temperature:
|
|
27320
|
-
top_p:
|
|
27321
|
-
max_tokens:
|
|
27322
|
-
provider_options:
|
|
27323
|
-
maxTokens:
|
|
27324
|
-
thinking:
|
|
27325
|
-
type:
|
|
27326
|
-
budgetTokens:
|
|
27449
|
+
variant: z20.string().optional(),
|
|
27450
|
+
temperature: z20.number().min(0).max(2).optional(),
|
|
27451
|
+
top_p: z20.number().min(0).max(1).optional(),
|
|
27452
|
+
max_tokens: z20.number().int().positive().optional(),
|
|
27453
|
+
provider_options: z20.record(z20.string(), z20.unknown()).optional(),
|
|
27454
|
+
maxTokens: z20.number().optional(),
|
|
27455
|
+
thinking: z20.object({
|
|
27456
|
+
type: z20.enum(["enabled", "disabled"]),
|
|
27457
|
+
budgetTokens: z20.number().optional()
|
|
27327
27458
|
}).optional(),
|
|
27328
|
-
reasoningEffort:
|
|
27329
|
-
textVerbosity:
|
|
27330
|
-
tools:
|
|
27331
|
-
prompt_append:
|
|
27332
|
-
max_prompt_tokens:
|
|
27333
|
-
is_unstable_agent:
|
|
27334
|
-
disable:
|
|
27335
|
-
warn_unavailable:
|
|
27459
|
+
reasoningEffort: z20.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
27460
|
+
textVerbosity: z20.enum(["low", "medium", "high"]).optional(),
|
|
27461
|
+
tools: z20.record(z20.string(), z20.boolean()).optional(),
|
|
27462
|
+
prompt_append: z20.string().optional(),
|
|
27463
|
+
max_prompt_tokens: z20.number().int().positive().optional(),
|
|
27464
|
+
is_unstable_agent: z20.boolean().optional(),
|
|
27465
|
+
disable: z20.boolean().optional(),
|
|
27466
|
+
warn_unavailable: z20.boolean().optional()
|
|
27336
27467
|
});
|
|
27337
|
-
var BuiltinCategoryNameSchema =
|
|
27468
|
+
var BuiltinCategoryNameSchema = z20.enum([
|
|
27338
27469
|
"visual-engineering",
|
|
27339
27470
|
"ultrabrain",
|
|
27340
27471
|
"deep",
|
|
@@ -27344,41 +27475,41 @@ var BuiltinCategoryNameSchema = z19.enum([
|
|
|
27344
27475
|
"unspecified-high",
|
|
27345
27476
|
"writing"
|
|
27346
27477
|
]);
|
|
27347
|
-
var CategoriesConfigSchema =
|
|
27478
|
+
var CategoriesConfigSchema = z20.record(z20.string(), CategoryConfigSchema);
|
|
27348
27479
|
// packages/omo-opencode/src/config/schema/claude-code.ts
|
|
27349
|
-
import { z as
|
|
27350
|
-
var ClaudeCodeConfigSchema =
|
|
27351
|
-
mcp:
|
|
27352
|
-
commands:
|
|
27353
|
-
skills:
|
|
27354
|
-
agents:
|
|
27355
|
-
hooks:
|
|
27356
|
-
plugins:
|
|
27357
|
-
plugins_override:
|
|
27358
|
-
anthropic_provider:
|
|
27480
|
+
import { z as z21 } from "zod";
|
|
27481
|
+
var ClaudeCodeConfigSchema = z21.object({
|
|
27482
|
+
mcp: z21.boolean().optional(),
|
|
27483
|
+
commands: z21.boolean().optional(),
|
|
27484
|
+
skills: z21.boolean().optional(),
|
|
27485
|
+
agents: z21.boolean().optional(),
|
|
27486
|
+
hooks: z21.boolean().optional(),
|
|
27487
|
+
plugins: z21.boolean().optional(),
|
|
27488
|
+
plugins_override: z21.record(z21.string(), z21.boolean()).optional(),
|
|
27489
|
+
anthropic_provider: z21.string().trim().min(1).refine((v) => !v.includes("/"), {
|
|
27359
27490
|
message: "anthropic_provider must be a provider name without '/'"
|
|
27360
27491
|
}).optional()
|
|
27361
27492
|
});
|
|
27362
27493
|
// packages/omo-opencode/src/config/schema/codegraph.ts
|
|
27363
|
-
import { z as
|
|
27364
|
-
var CodegraphConfigSchema =
|
|
27365
|
-
auto_init:
|
|
27366
|
-
auto_provision:
|
|
27367
|
-
daemon:
|
|
27368
|
-
enabled:
|
|
27369
|
-
excluded_roots:
|
|
27370
|
-
install_dir:
|
|
27371
|
-
telemetry:
|
|
27372
|
-
watch_debounce_ms:
|
|
27494
|
+
import { z as z22 } from "zod";
|
|
27495
|
+
var CodegraphConfigSchema = z22.object({
|
|
27496
|
+
auto_init: z22.boolean().default(true),
|
|
27497
|
+
auto_provision: z22.boolean().default(true),
|
|
27498
|
+
daemon: z22.boolean().default(true),
|
|
27499
|
+
enabled: z22.boolean().default(true),
|
|
27500
|
+
excluded_roots: z22.array(z22.string()).optional(),
|
|
27501
|
+
install_dir: z22.string().optional(),
|
|
27502
|
+
telemetry: z22.boolean().optional(),
|
|
27503
|
+
watch_debounce_ms: z22.number().nonnegative().optional()
|
|
27373
27504
|
});
|
|
27374
27505
|
// packages/omo-opencode/src/config/schema/comment-checker.ts
|
|
27375
|
-
import { z as
|
|
27376
|
-
var CommentCheckerConfigSchema =
|
|
27377
|
-
custom_prompt:
|
|
27506
|
+
import { z as z23 } from "zod";
|
|
27507
|
+
var CommentCheckerConfigSchema = z23.object({
|
|
27508
|
+
custom_prompt: z23.string().optional()
|
|
27378
27509
|
});
|
|
27379
27510
|
// packages/omo-opencode/src/config/schema/commands.ts
|
|
27380
|
-
import { z as
|
|
27381
|
-
var BuiltinCommandNameSchema =
|
|
27511
|
+
import { z as z24 } from "zod";
|
|
27512
|
+
var BuiltinCommandNameSchema = z24.enum([
|
|
27382
27513
|
"goal",
|
|
27383
27514
|
"refactor",
|
|
27384
27515
|
"start-work",
|
|
@@ -27387,21 +27518,21 @@ var BuiltinCommandNameSchema = z23.enum([
|
|
|
27387
27518
|
"hyperplan"
|
|
27388
27519
|
]);
|
|
27389
27520
|
// packages/omo-opencode/src/config/schema/default-mode.ts
|
|
27390
|
-
import { z as
|
|
27391
|
-
var DefaultModeConfigSchema =
|
|
27392
|
-
ultrawork:
|
|
27393
|
-
goal:
|
|
27521
|
+
import { z as z25 } from "zod";
|
|
27522
|
+
var DefaultModeConfigSchema = z25.object({
|
|
27523
|
+
ultrawork: z25.boolean().default(false),
|
|
27524
|
+
goal: z25.boolean().default(false)
|
|
27394
27525
|
});
|
|
27395
27526
|
// packages/omo-opencode/src/config/schema/dynamic-context-pruning.ts
|
|
27396
|
-
import { z as
|
|
27397
|
-
var DynamicContextPruningConfigSchema =
|
|
27398
|
-
enabled:
|
|
27399
|
-
notification:
|
|
27400
|
-
turn_protection:
|
|
27401
|
-
enabled:
|
|
27402
|
-
turns:
|
|
27527
|
+
import { z as z26 } from "zod";
|
|
27528
|
+
var DynamicContextPruningConfigSchema = z26.object({
|
|
27529
|
+
enabled: z26.boolean().default(false),
|
|
27530
|
+
notification: z26.enum(["off", "minimal", "detailed"]).default("detailed"),
|
|
27531
|
+
turn_protection: z26.object({
|
|
27532
|
+
enabled: z26.boolean().default(true),
|
|
27533
|
+
turns: z26.number().min(1).max(10).default(3)
|
|
27403
27534
|
}).optional(),
|
|
27404
|
-
protected_tools:
|
|
27535
|
+
protected_tools: z26.array(z26.string()).default([
|
|
27405
27536
|
"task",
|
|
27406
27537
|
"todowrite",
|
|
27407
27538
|
"todoread",
|
|
@@ -27410,45 +27541,45 @@ var DynamicContextPruningConfigSchema = z25.object({
|
|
|
27410
27541
|
"session_write",
|
|
27411
27542
|
"session_search"
|
|
27412
27543
|
]),
|
|
27413
|
-
strategies:
|
|
27414
|
-
deduplication:
|
|
27415
|
-
enabled:
|
|
27544
|
+
strategies: z26.object({
|
|
27545
|
+
deduplication: z26.object({
|
|
27546
|
+
enabled: z26.boolean().default(true)
|
|
27416
27547
|
}).optional(),
|
|
27417
|
-
supersede_writes:
|
|
27418
|
-
enabled:
|
|
27419
|
-
aggressive:
|
|
27548
|
+
supersede_writes: z26.object({
|
|
27549
|
+
enabled: z26.boolean().default(true),
|
|
27550
|
+
aggressive: z26.boolean().default(false)
|
|
27420
27551
|
}).optional(),
|
|
27421
|
-
purge_errors:
|
|
27422
|
-
enabled:
|
|
27423
|
-
turns:
|
|
27552
|
+
purge_errors: z26.object({
|
|
27553
|
+
enabled: z26.boolean().default(true),
|
|
27554
|
+
turns: z26.number().min(1).max(20).default(5)
|
|
27424
27555
|
}).optional()
|
|
27425
27556
|
}).optional()
|
|
27426
27557
|
});
|
|
27427
27558
|
// packages/omo-opencode/src/config/schema/experimental.ts
|
|
27428
|
-
import { z as
|
|
27429
|
-
var ExperimentalConfigSchema =
|
|
27430
|
-
aggressive_truncation:
|
|
27431
|
-
preemptive_compaction:
|
|
27432
|
-
truncate_all_tool_outputs:
|
|
27559
|
+
import { z as z27 } from "zod";
|
|
27560
|
+
var ExperimentalConfigSchema = z27.object({
|
|
27561
|
+
aggressive_truncation: z27.boolean().optional(),
|
|
27562
|
+
preemptive_compaction: z27.boolean().optional(),
|
|
27563
|
+
truncate_all_tool_outputs: z27.boolean().optional(),
|
|
27433
27564
|
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
27434
|
-
task_system:
|
|
27435
|
-
plugin_load_timeout_ms:
|
|
27436
|
-
safe_hook_creation:
|
|
27437
|
-
disable_omo_env:
|
|
27438
|
-
hashline_edit:
|
|
27439
|
-
model_fallback_title:
|
|
27440
|
-
max_tools:
|
|
27441
|
-
disable_live_parent_wake_routing:
|
|
27565
|
+
task_system: z27.boolean().optional(),
|
|
27566
|
+
plugin_load_timeout_ms: z27.number().min(1000).optional(),
|
|
27567
|
+
safe_hook_creation: z27.boolean().optional(),
|
|
27568
|
+
disable_omo_env: z27.boolean().optional(),
|
|
27569
|
+
hashline_edit: z27.boolean().optional(),
|
|
27570
|
+
model_fallback_title: z27.boolean().optional(),
|
|
27571
|
+
max_tools: z27.number().int().min(1).optional(),
|
|
27572
|
+
disable_live_parent_wake_routing: z27.boolean().optional()
|
|
27442
27573
|
});
|
|
27443
27574
|
// packages/omo-opencode/src/config/schema/goal.ts
|
|
27444
|
-
import { z as
|
|
27445
|
-
var GoalConfigSchema =
|
|
27446
|
-
enabled:
|
|
27447
|
-
auto_start:
|
|
27448
|
-
default_max_iterations:
|
|
27575
|
+
import { z as z28 } from "zod";
|
|
27576
|
+
var GoalConfigSchema = z28.object({
|
|
27577
|
+
enabled: z28.boolean().default(false),
|
|
27578
|
+
auto_start: z28.boolean().default(false),
|
|
27579
|
+
default_max_iterations: z28.number().min(1).max(1000).default(100)
|
|
27449
27580
|
});
|
|
27450
27581
|
// packages/skills-loader-core/src/config/git-env-prefix.ts
|
|
27451
|
-
import { z as
|
|
27582
|
+
import { z as z29 } from "zod";
|
|
27452
27583
|
var GIT_ENV_ASSIGNMENT_PATTERN = /^(?:[A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)(?: [A-Za-z_][A-Za-z0-9_]*=[A-Za-z0-9_-]*)*$/;
|
|
27453
27584
|
var GIT_ENV_PREFIX_VALIDATION_MESSAGE = 'git_env_prefix must be empty or use shell-safe env assignments like "GIT_MASTER=1"';
|
|
27454
27585
|
function isValidGitEnvPrefix(value) {
|
|
@@ -27463,17 +27594,17 @@ function assertValidGitEnvPrefix(value) {
|
|
|
27463
27594
|
}
|
|
27464
27595
|
return value;
|
|
27465
27596
|
}
|
|
27466
|
-
var GitEnvPrefixSchema =
|
|
27597
|
+
var GitEnvPrefixSchema = z29.string().refine(isValidGitEnvPrefix, { message: GIT_ENV_PREFIX_VALIDATION_MESSAGE }).default("GIT_MASTER=1");
|
|
27467
27598
|
// packages/omo-opencode/src/config/schema/git-master.ts
|
|
27468
|
-
import { z as
|
|
27469
|
-
var GitMasterConfigSchema =
|
|
27470
|
-
commit_footer:
|
|
27471
|
-
include_co_authored_by:
|
|
27599
|
+
import { z as z30 } from "zod";
|
|
27600
|
+
var GitMasterConfigSchema = z30.object({
|
|
27601
|
+
commit_footer: z30.union([z30.boolean(), z30.string()]).default(true),
|
|
27602
|
+
include_co_authored_by: z30.boolean().default(true),
|
|
27472
27603
|
git_env_prefix: GitEnvPrefixSchema
|
|
27473
27604
|
});
|
|
27474
27605
|
// packages/omo-opencode/src/config/schema/hooks.ts
|
|
27475
|
-
import { z as
|
|
27476
|
-
var HookNameSchema =
|
|
27606
|
+
import { z as z31 } from "zod";
|
|
27607
|
+
var HookNameSchema = z31.enum([
|
|
27477
27608
|
"todo-continuation-enforcer",
|
|
27478
27609
|
"session-notification",
|
|
27479
27610
|
"comment-checker",
|
|
@@ -27532,240 +27663,240 @@ var HookNameSchema = z30.enum([
|
|
|
27532
27663
|
"legacy-plugin-toast"
|
|
27533
27664
|
]);
|
|
27534
27665
|
// packages/omo-opencode/src/config/schema/i18n.ts
|
|
27535
|
-
import { z as
|
|
27536
|
-
var I18nConfigSchema =
|
|
27537
|
-
locale:
|
|
27666
|
+
import { z as z32 } from "zod";
|
|
27667
|
+
var I18nConfigSchema = z32.object({
|
|
27668
|
+
locale: z32.string().optional()
|
|
27538
27669
|
});
|
|
27539
27670
|
// packages/omo-opencode/src/config/schema/keyword-detector.ts
|
|
27540
|
-
import { z as
|
|
27541
|
-
var KeywordTypeSchema =
|
|
27542
|
-
var KeywordDetectorConfigSchema =
|
|
27543
|
-
enabled_expansions:
|
|
27544
|
-
disabled_keywords:
|
|
27671
|
+
import { z as z33 } from "zod";
|
|
27672
|
+
var KeywordTypeSchema = z33.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
|
|
27673
|
+
var KeywordDetectorConfigSchema = z33.object({
|
|
27674
|
+
enabled_expansions: z33.array(KeywordTypeSchema).optional(),
|
|
27675
|
+
disabled_keywords: z33.array(KeywordTypeSchema).optional()
|
|
27545
27676
|
});
|
|
27546
27677
|
// packages/omo-opencode/src/config/schema/model-capabilities.ts
|
|
27547
|
-
import { z as
|
|
27548
|
-
var ModelCapabilitiesConfigSchema =
|
|
27549
|
-
enabled:
|
|
27550
|
-
auto_refresh_on_start:
|
|
27551
|
-
refresh_timeout_ms:
|
|
27552
|
-
source_url:
|
|
27678
|
+
import { z as z34 } from "zod";
|
|
27679
|
+
var ModelCapabilitiesConfigSchema = z34.object({
|
|
27680
|
+
enabled: z34.boolean().optional(),
|
|
27681
|
+
auto_refresh_on_start: z34.boolean().optional(),
|
|
27682
|
+
refresh_timeout_ms: z34.number().int().positive().optional(),
|
|
27683
|
+
source_url: z34.string().url().optional()
|
|
27553
27684
|
});
|
|
27554
27685
|
// packages/omo-opencode/src/config/schema/notification.ts
|
|
27555
|
-
import { z as
|
|
27556
|
-
var NotificationConfigSchema =
|
|
27557
|
-
force_enable:
|
|
27686
|
+
import { z as z35 } from "zod";
|
|
27687
|
+
var NotificationConfigSchema = z35.object({
|
|
27688
|
+
force_enable: z35.boolean().optional()
|
|
27558
27689
|
});
|
|
27559
27690
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
27560
|
-
import { z as
|
|
27691
|
+
import { z as z49 } from "zod";
|
|
27561
27692
|
|
|
27562
27693
|
// packages/omo-opencode/src/mcp/types.ts
|
|
27563
|
-
import { z as
|
|
27564
|
-
var McpNameSchema =
|
|
27565
|
-
var AnyMcpNameSchema =
|
|
27694
|
+
import { z as z36 } from "zod";
|
|
27695
|
+
var McpNameSchema = z36.enum(["websearch", "context7", "grep_app", "lsp", "codegraph"]);
|
|
27696
|
+
var AnyMcpNameSchema = z36.string().min(1);
|
|
27566
27697
|
|
|
27567
27698
|
// packages/omo-opencode/src/config/schema/agent-definitions.ts
|
|
27568
|
-
import { z as
|
|
27569
|
-
var AgentDefinitionPathSchema =
|
|
27570
|
-
var AgentDefinitionsConfigSchema =
|
|
27699
|
+
import { z as z37 } from "zod";
|
|
27700
|
+
var AgentDefinitionPathSchema = z37.string().min(1);
|
|
27701
|
+
var AgentDefinitionsConfigSchema = z37.array(AgentDefinitionPathSchema).optional();
|
|
27571
27702
|
|
|
27572
27703
|
// packages/omo-opencode/src/config/schema/openclaw.ts
|
|
27573
|
-
import { z as
|
|
27574
|
-
var OpenClawGatewaySchema =
|
|
27575
|
-
type:
|
|
27576
|
-
url:
|
|
27577
|
-
method:
|
|
27578
|
-
headers:
|
|
27579
|
-
command:
|
|
27580
|
-
timeout:
|
|
27704
|
+
import { z as z38 } from "zod";
|
|
27705
|
+
var OpenClawGatewaySchema = z38.object({
|
|
27706
|
+
type: z38.enum(["http", "command"]).default("http"),
|
|
27707
|
+
url: z38.string().optional(),
|
|
27708
|
+
method: z38.string().default("POST"),
|
|
27709
|
+
headers: z38.record(z38.string(), z38.string()).optional(),
|
|
27710
|
+
command: z38.string().optional(),
|
|
27711
|
+
timeout: z38.number().optional()
|
|
27581
27712
|
});
|
|
27582
|
-
var OpenClawHookSchema =
|
|
27583
|
-
enabled:
|
|
27584
|
-
gateway:
|
|
27585
|
-
instruction:
|
|
27713
|
+
var OpenClawHookSchema = z38.object({
|
|
27714
|
+
enabled: z38.boolean().default(true),
|
|
27715
|
+
gateway: z38.string(),
|
|
27716
|
+
instruction: z38.string()
|
|
27586
27717
|
});
|
|
27587
|
-
var OpenClawReplyListenerConfigSchema =
|
|
27588
|
-
discordBotToken:
|
|
27589
|
-
discordChannelId:
|
|
27590
|
-
discordMention:
|
|
27591
|
-
authorizedDiscordUserIds:
|
|
27592
|
-
telegramBotToken:
|
|
27593
|
-
telegramChatId:
|
|
27594
|
-
pollIntervalMs:
|
|
27595
|
-
rateLimitPerMinute:
|
|
27596
|
-
maxMessageLength:
|
|
27597
|
-
includePrefix:
|
|
27718
|
+
var OpenClawReplyListenerConfigSchema = z38.object({
|
|
27719
|
+
discordBotToken: z38.string().optional(),
|
|
27720
|
+
discordChannelId: z38.string().optional(),
|
|
27721
|
+
discordMention: z38.string().optional(),
|
|
27722
|
+
authorizedDiscordUserIds: z38.array(z38.string()).default([]),
|
|
27723
|
+
telegramBotToken: z38.string().optional(),
|
|
27724
|
+
telegramChatId: z38.string().optional(),
|
|
27725
|
+
pollIntervalMs: z38.number().default(3000),
|
|
27726
|
+
rateLimitPerMinute: z38.number().default(10),
|
|
27727
|
+
maxMessageLength: z38.number().default(500),
|
|
27728
|
+
includePrefix: z38.boolean().default(true)
|
|
27598
27729
|
});
|
|
27599
|
-
var OpenClawConfigSchema =
|
|
27600
|
-
enabled:
|
|
27601
|
-
gateways:
|
|
27602
|
-
hooks:
|
|
27730
|
+
var OpenClawConfigSchema = z38.object({
|
|
27731
|
+
enabled: z38.boolean().default(false),
|
|
27732
|
+
gateways: z38.record(z38.string(), OpenClawGatewaySchema).default({}),
|
|
27733
|
+
hooks: z38.record(z38.string(), OpenClawHookSchema).default({}),
|
|
27603
27734
|
replyListener: OpenClawReplyListenerConfigSchema.optional()
|
|
27604
27735
|
});
|
|
27605
27736
|
|
|
27606
27737
|
// packages/omo-opencode/src/config/schema/monitor.ts
|
|
27607
|
-
import { z as
|
|
27608
|
-
var MonitorConfigSchema =
|
|
27609
|
-
enabled:
|
|
27610
|
-
live_mode_enabled:
|
|
27611
|
-
allowed_commands:
|
|
27612
|
-
max_monitors_per_session:
|
|
27613
|
-
max_runtime_ms:
|
|
27614
|
-
batch_max_lines:
|
|
27615
|
-
batch_max_bytes:
|
|
27616
|
-
flush_interval_ms:
|
|
27617
|
-
ring_max_lines:
|
|
27618
|
-
line_max_bytes:
|
|
27619
|
-
pattern_max_length:
|
|
27738
|
+
import { z as z39 } from "zod";
|
|
27739
|
+
var MonitorConfigSchema = z39.object({
|
|
27740
|
+
enabled: z39.boolean().default(false),
|
|
27741
|
+
live_mode_enabled: z39.boolean().default(false),
|
|
27742
|
+
allowed_commands: z39.array(z39.string()).optional(),
|
|
27743
|
+
max_monitors_per_session: z39.number().int().min(1).max(16).default(3),
|
|
27744
|
+
max_runtime_ms: z39.number().int().min(1000).default(1800000),
|
|
27745
|
+
batch_max_lines: z39.number().int().min(1).default(50),
|
|
27746
|
+
batch_max_bytes: z39.number().int().min(1024).default(16384),
|
|
27747
|
+
flush_interval_ms: z39.number().int().min(250).default(1000),
|
|
27748
|
+
ring_max_lines: z39.number().int().min(1).default(1000),
|
|
27749
|
+
line_max_bytes: z39.number().int().min(256).default(8192),
|
|
27750
|
+
pattern_max_length: z39.number().int().min(1).default(512)
|
|
27620
27751
|
});
|
|
27621
27752
|
|
|
27622
27753
|
// packages/omo-opencode/src/config/schema/runtime-fallback.ts
|
|
27623
|
-
import { z as
|
|
27624
|
-
var RuntimeFallbackConfigSchema =
|
|
27625
|
-
enabled:
|
|
27626
|
-
retry_on_errors:
|
|
27627
|
-
max_fallback_attempts:
|
|
27628
|
-
cooldown_seconds:
|
|
27629
|
-
timeout_seconds:
|
|
27630
|
-
notify_on_fallback:
|
|
27631
|
-
restore_primary_after_cooldown:
|
|
27754
|
+
import { z as z40 } from "zod";
|
|
27755
|
+
var RuntimeFallbackConfigSchema = z40.object({
|
|
27756
|
+
enabled: z40.boolean().optional(),
|
|
27757
|
+
retry_on_errors: z40.array(z40.number()).optional(),
|
|
27758
|
+
max_fallback_attempts: z40.number().min(1).max(20).optional(),
|
|
27759
|
+
cooldown_seconds: z40.number().min(0).optional(),
|
|
27760
|
+
timeout_seconds: z40.number().min(0).optional(),
|
|
27761
|
+
notify_on_fallback: z40.boolean().optional(),
|
|
27762
|
+
restore_primary_after_cooldown: z40.boolean().optional()
|
|
27632
27763
|
});
|
|
27633
27764
|
|
|
27634
27765
|
// packages/team-core/src/config.ts
|
|
27635
|
-
import * as
|
|
27636
|
-
var TeamModeConfigSchema =
|
|
27637
|
-
enabled:
|
|
27638
|
-
tmux_visualization:
|
|
27639
|
-
max_parallel_members:
|
|
27640
|
-
max_members:
|
|
27641
|
-
max_messages_per_run:
|
|
27642
|
-
max_wall_clock_minutes:
|
|
27643
|
-
max_member_turns:
|
|
27644
|
-
base_dir:
|
|
27645
|
-
message_payload_max_bytes:
|
|
27646
|
-
recipient_unread_max_bytes:
|
|
27647
|
-
mailbox_poll_interval_ms:
|
|
27766
|
+
import * as z41 from "zod";
|
|
27767
|
+
var TeamModeConfigSchema = z41.object({
|
|
27768
|
+
enabled: z41.boolean().default(false),
|
|
27769
|
+
tmux_visualization: z41.boolean().default(false),
|
|
27770
|
+
max_parallel_members: z41.number().int().min(1).max(8).default(4),
|
|
27771
|
+
max_members: z41.number().int().min(1).max(8).default(8),
|
|
27772
|
+
max_messages_per_run: z41.number().int().min(1).default(1e4),
|
|
27773
|
+
max_wall_clock_minutes: z41.number().int().min(1).default(120),
|
|
27774
|
+
max_member_turns: z41.number().int().min(1).default(500),
|
|
27775
|
+
base_dir: z41.string().optional(),
|
|
27776
|
+
message_payload_max_bytes: z41.number().int().min(1024).default(32768),
|
|
27777
|
+
recipient_unread_max_bytes: z41.number().int().min(1024).default(262144),
|
|
27778
|
+
mailbox_poll_interval_ms: z41.number().int().min(500).default(3000)
|
|
27648
27779
|
});
|
|
27649
27780
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
27650
|
-
import { z as
|
|
27651
|
-
var SkillSourceSchema =
|
|
27652
|
-
|
|
27653
|
-
|
|
27654
|
-
path:
|
|
27655
|
-
recursive:
|
|
27656
|
-
glob:
|
|
27781
|
+
import { z as z42 } from "zod";
|
|
27782
|
+
var SkillSourceSchema = z42.union([
|
|
27783
|
+
z42.string(),
|
|
27784
|
+
z42.object({
|
|
27785
|
+
path: z42.string(),
|
|
27786
|
+
recursive: z42.boolean().optional(),
|
|
27787
|
+
glob: z42.string().optional()
|
|
27657
27788
|
})
|
|
27658
27789
|
]);
|
|
27659
|
-
var SkillDefinitionSchema =
|
|
27660
|
-
description:
|
|
27661
|
-
template:
|
|
27662
|
-
from:
|
|
27663
|
-
model:
|
|
27664
|
-
agent:
|
|
27665
|
-
subtask:
|
|
27666
|
-
"argument-hint":
|
|
27667
|
-
license:
|
|
27668
|
-
compatibility:
|
|
27669
|
-
metadata:
|
|
27670
|
-
"allowed-tools":
|
|
27671
|
-
disable:
|
|
27790
|
+
var SkillDefinitionSchema = z42.object({
|
|
27791
|
+
description: z42.string().optional(),
|
|
27792
|
+
template: z42.string().optional(),
|
|
27793
|
+
from: z42.string().optional(),
|
|
27794
|
+
model: z42.string().optional(),
|
|
27795
|
+
agent: z42.string().optional(),
|
|
27796
|
+
subtask: z42.boolean().optional(),
|
|
27797
|
+
"argument-hint": z42.string().optional(),
|
|
27798
|
+
license: z42.string().optional(),
|
|
27799
|
+
compatibility: z42.string().optional(),
|
|
27800
|
+
metadata: z42.record(z42.string(), z42.unknown()).optional(),
|
|
27801
|
+
"allowed-tools": z42.array(z42.string()).optional(),
|
|
27802
|
+
disable: z42.boolean().optional()
|
|
27672
27803
|
});
|
|
27673
|
-
var SkillEntrySchema =
|
|
27674
|
-
var SkillsConfigSchema =
|
|
27675
|
-
|
|
27676
|
-
|
|
27677
|
-
sources:
|
|
27678
|
-
enable:
|
|
27679
|
-
disable:
|
|
27804
|
+
var SkillEntrySchema = z42.union([z42.boolean(), SkillDefinitionSchema]);
|
|
27805
|
+
var SkillsConfigSchema = z42.union([
|
|
27806
|
+
z42.array(z42.string()),
|
|
27807
|
+
z42.object({
|
|
27808
|
+
sources: z42.array(SkillSourceSchema).optional(),
|
|
27809
|
+
enable: z42.array(z42.string()).optional(),
|
|
27810
|
+
disable: z42.array(z42.string()).optional()
|
|
27680
27811
|
}).catchall(SkillEntrySchema)
|
|
27681
27812
|
]);
|
|
27682
27813
|
|
|
27683
27814
|
// packages/omo-opencode/src/config/schema/sisyphus.ts
|
|
27684
|
-
import { z as
|
|
27685
|
-
var SisyphusTasksConfigSchema =
|
|
27686
|
-
storage_path:
|
|
27687
|
-
task_list_id:
|
|
27688
|
-
claude_code_compat:
|
|
27815
|
+
import { z as z43 } from "zod";
|
|
27816
|
+
var SisyphusTasksConfigSchema = z43.object({
|
|
27817
|
+
storage_path: z43.string().optional(),
|
|
27818
|
+
task_list_id: z43.string().optional(),
|
|
27819
|
+
claude_code_compat: z43.boolean().default(false)
|
|
27689
27820
|
});
|
|
27690
|
-
var SisyphusConfigSchema =
|
|
27821
|
+
var SisyphusConfigSchema = z43.object({
|
|
27691
27822
|
tasks: SisyphusTasksConfigSchema.optional()
|
|
27692
27823
|
});
|
|
27693
27824
|
|
|
27694
27825
|
// packages/omo-opencode/src/config/schema/sisyphus-agent.ts
|
|
27695
|
-
import { z as
|
|
27696
|
-
var SisyphusAgentConfigSchema =
|
|
27697
|
-
disabled:
|
|
27698
|
-
default_builder_enabled:
|
|
27699
|
-
planner_enabled:
|
|
27700
|
-
replace_plan:
|
|
27701
|
-
tdd:
|
|
27826
|
+
import { z as z44 } from "zod";
|
|
27827
|
+
var SisyphusAgentConfigSchema = z44.object({
|
|
27828
|
+
disabled: z44.boolean().optional(),
|
|
27829
|
+
default_builder_enabled: z44.boolean().optional(),
|
|
27830
|
+
planner_enabled: z44.boolean().optional(),
|
|
27831
|
+
replace_plan: z44.boolean().optional(),
|
|
27832
|
+
tdd: z44.boolean().default(true).optional()
|
|
27702
27833
|
});
|
|
27703
27834
|
|
|
27704
27835
|
// packages/omo-opencode/src/config/schema/tmux.ts
|
|
27705
27836
|
init_src3();
|
|
27706
|
-
import { z as
|
|
27707
|
-
var TmuxLayoutSchema =
|
|
27708
|
-
var TmuxIsolationSchema =
|
|
27709
|
-
var TmuxConfigSchema =
|
|
27710
|
-
enabled:
|
|
27837
|
+
import { z as z45 } from "zod";
|
|
27838
|
+
var TmuxLayoutSchema = z45.enum(TMUX_LAYOUT_VALUES);
|
|
27839
|
+
var TmuxIsolationSchema = z45.enum(TMUX_ISOLATION_VALUES);
|
|
27840
|
+
var TmuxConfigSchema = z45.object({
|
|
27841
|
+
enabled: z45.boolean().default(false),
|
|
27711
27842
|
layout: TmuxLayoutSchema.default("main-vertical"),
|
|
27712
|
-
main_pane_size:
|
|
27713
|
-
main_pane_min_width:
|
|
27714
|
-
agent_pane_min_width:
|
|
27843
|
+
main_pane_size: z45.number().min(20).max(80).default(60),
|
|
27844
|
+
main_pane_min_width: z45.number().min(40).default(120),
|
|
27845
|
+
agent_pane_min_width: z45.number().min(20).default(40),
|
|
27715
27846
|
isolation: TmuxIsolationSchema.default("inline")
|
|
27716
27847
|
});
|
|
27717
27848
|
|
|
27718
27849
|
// packages/omo-opencode/src/config/schema/tui.ts
|
|
27719
|
-
import { z as
|
|
27720
|
-
var TuiSidebarConfigSchema =
|
|
27721
|
-
enabled:
|
|
27850
|
+
import { z as z46 } from "zod";
|
|
27851
|
+
var TuiSidebarConfigSchema = z46.object({
|
|
27852
|
+
enabled: z46.boolean().default(true)
|
|
27722
27853
|
});
|
|
27723
|
-
var TuiConfigSchema =
|
|
27854
|
+
var TuiConfigSchema = z46.object({
|
|
27724
27855
|
sidebar: TuiSidebarConfigSchema.default({ enabled: true })
|
|
27725
27856
|
});
|
|
27726
27857
|
|
|
27727
27858
|
// packages/omo-opencode/src/config/schema/start-work.ts
|
|
27728
|
-
import { z as
|
|
27729
|
-
var StartWorkConfigSchema =
|
|
27730
|
-
auto_commit:
|
|
27859
|
+
import { z as z47 } from "zod";
|
|
27860
|
+
var StartWorkConfigSchema = z47.object({
|
|
27861
|
+
auto_commit: z47.boolean().default(true)
|
|
27731
27862
|
});
|
|
27732
27863
|
|
|
27733
27864
|
// packages/omo-opencode/src/config/schema/websearch.ts
|
|
27734
|
-
import { z as
|
|
27735
|
-
var WebsearchProviderSchema =
|
|
27736
|
-
var WebsearchConfigSchema =
|
|
27865
|
+
import { z as z48 } from "zod";
|
|
27866
|
+
var WebsearchProviderSchema = z48.enum(["exa", "tavily"]);
|
|
27867
|
+
var WebsearchConfigSchema = z48.object({
|
|
27737
27868
|
provider: WebsearchProviderSchema.optional()
|
|
27738
27869
|
});
|
|
27739
27870
|
|
|
27740
27871
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
27741
|
-
var OhMyOpenCodeConfigSchema =
|
|
27742
|
-
$schema:
|
|
27743
|
-
new_task_system_enabled:
|
|
27744
|
-
default_run_agent:
|
|
27745
|
-
agent_order:
|
|
27872
|
+
var OhMyOpenCodeConfigSchema = z49.object({
|
|
27873
|
+
$schema: z49.string().optional(),
|
|
27874
|
+
new_task_system_enabled: z49.boolean().optional(),
|
|
27875
|
+
default_run_agent: z49.string().optional(),
|
|
27876
|
+
agent_order: z49.array(z49.string().max(128)).max(64).optional(),
|
|
27746
27877
|
agent_definitions: AgentDefinitionsConfigSchema,
|
|
27747
|
-
disabled_mcps:
|
|
27748
|
-
disabled_agents:
|
|
27749
|
-
disabled_skills:
|
|
27750
|
-
disabled_hooks:
|
|
27751
|
-
disabled_commands:
|
|
27752
|
-
disabled_tools:
|
|
27753
|
-
disabled_providers:
|
|
27754
|
-
mcp_env_allowlist:
|
|
27755
|
-
hashline_edit:
|
|
27756
|
-
telemetry:
|
|
27757
|
-
model_fallback:
|
|
27878
|
+
disabled_mcps: z49.array(AnyMcpNameSchema).optional(),
|
|
27879
|
+
disabled_agents: z49.array(z49.string()).optional(),
|
|
27880
|
+
disabled_skills: z49.array(z49.string()).optional(),
|
|
27881
|
+
disabled_hooks: z49.array(z49.string()).optional(),
|
|
27882
|
+
disabled_commands: z49.array(BuiltinCommandNameSchema).optional(),
|
|
27883
|
+
disabled_tools: z49.array(z49.string()).optional(),
|
|
27884
|
+
disabled_providers: z49.array(z49.string()).optional(),
|
|
27885
|
+
mcp_env_allowlist: z49.array(z49.string()).optional(),
|
|
27886
|
+
hashline_edit: z49.boolean().optional(),
|
|
27887
|
+
telemetry: z49.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable. Independent of codegraph.telemetry."),
|
|
27888
|
+
model_fallback: z49.boolean().optional(),
|
|
27758
27889
|
agents: AgentOverridesSchema.optional(),
|
|
27759
27890
|
categories: CategoriesConfigSchema.optional(),
|
|
27760
27891
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
27761
27892
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
27762
27893
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
27763
27894
|
experimental: ExperimentalConfigSchema.optional(),
|
|
27764
|
-
auto_update:
|
|
27895
|
+
auto_update: z49.boolean().optional(),
|
|
27765
27896
|
skills: SkillsConfigSchema.optional(),
|
|
27766
27897
|
goal: GoalConfigSchema.optional(),
|
|
27767
|
-
ralph_loop:
|
|
27768
|
-
runtime_fallback:
|
|
27898
|
+
ralph_loop: z49.record(z49.string(), z49.unknown()).optional(),
|
|
27899
|
+
runtime_fallback: z49.union([z49.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
27769
27900
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
27770
27901
|
notification: NotificationConfigSchema.optional(),
|
|
27771
27902
|
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
|
@@ -27788,7 +27919,7 @@ var OhMyOpenCodeConfigSchema = z48.object({
|
|
|
27788
27919
|
sisyphus: SisyphusConfigSchema.optional(),
|
|
27789
27920
|
start_work: StartWorkConfigSchema.optional(),
|
|
27790
27921
|
default_mode: DefaultModeConfigSchema.optional(),
|
|
27791
|
-
_migrations:
|
|
27922
|
+
_migrations: z49.array(z49.string()).optional()
|
|
27792
27923
|
});
|
|
27793
27924
|
// packages/omo-opencode/src/config/validate.ts
|
|
27794
27925
|
function shortPath(configPath) {
|
|
@@ -28088,6 +28219,7 @@ init_logger2();
|
|
|
28088
28219
|
|
|
28089
28220
|
// packages/omo-opencode/src/shared/normalize-sdk-response.ts
|
|
28090
28221
|
function normalizeSDKResponse(response, fallback, options) {
|
|
28222
|
+
const fallbackIsArray = Array.isArray(fallback);
|
|
28091
28223
|
if (response == null) {
|
|
28092
28224
|
return fallback;
|
|
28093
28225
|
}
|
|
@@ -28097,14 +28229,17 @@ function normalizeSDKResponse(response, fallback, options) {
|
|
|
28097
28229
|
if (typeof response === "object" && "data" in response) {
|
|
28098
28230
|
const data = response.data;
|
|
28099
28231
|
if (data != null) {
|
|
28232
|
+
if (fallbackIsArray && !Array.isArray(data)) {
|
|
28233
|
+
return fallback;
|
|
28234
|
+
}
|
|
28100
28235
|
return data;
|
|
28101
28236
|
}
|
|
28102
|
-
if (options?.preferResponseOnMissingData === true) {
|
|
28237
|
+
if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
|
|
28103
28238
|
return response;
|
|
28104
28239
|
}
|
|
28105
28240
|
return fallback;
|
|
28106
28241
|
}
|
|
28107
|
-
if (options?.preferResponseOnMissingData === true) {
|
|
28242
|
+
if (options?.preferResponseOnMissingData === true && !fallbackIsArray) {
|
|
28108
28243
|
return response;
|
|
28109
28244
|
}
|
|
28110
28245
|
return fallback;
|
|
@@ -28423,23 +28558,14 @@ function truncateDescription(description, maxLength = 120) {
|
|
|
28423
28558
|
// packages/omo-opencode/src/tools/delegate-task/anthropic-categories.ts
|
|
28424
28559
|
var UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
28425
28560
|
You are working on tasks that don't fit specific categories but require substantial effort.
|
|
28426
|
-
|
|
28427
|
-
<Selection_Gate>
|
|
28428
|
-
BEFORE selecting this category, VERIFY ALL conditions:
|
|
28429
|
-
1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
|
|
28430
|
-
2. Task requires substantial effort across multiple systems/modules
|
|
28431
|
-
3. Changes have broad impact or require careful coordination
|
|
28432
|
-
4. NOT just "complex" - must be genuinely unclassifiable AND high-effort
|
|
28433
|
-
|
|
28434
|
-
If task fits ANY other category, DO NOT select unspecified-high.
|
|
28435
|
-
If task is unclassifiable but moderate-effort, use unspecified-low instead.
|
|
28436
|
-
</Selection_Gate>
|
|
28437
28561
|
</Category_Context>`;
|
|
28562
|
+
var UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits and substantial effort spans systems/modules with broad impact. Use unspecified-low for contained moderate work.</Selection_Gate>`;
|
|
28438
28563
|
var ANTHROPIC_CATEGORIES = [
|
|
28439
28564
|
{
|
|
28440
28565
|
name: "unspecified-high",
|
|
28441
28566
|
config: { model: "kimi-for-coding/k3", variant: "max" },
|
|
28442
28567
|
description: "Tasks that don't fit other categories, high effort required",
|
|
28568
|
+
callerGuidance: UNSPECIFIED_HIGH_CATEGORY_CALLER_GUIDANCE,
|
|
28443
28569
|
promptAppend: UNSPECIFIED_HIGH_CATEGORY_PROMPT_APPEND
|
|
28444
28570
|
}
|
|
28445
28571
|
];
|
|
@@ -28706,65 +28832,13 @@ Approach:
|
|
|
28706
28832
|
- Minimal viable implementation
|
|
28707
28833
|
- Skip unnecessary abstractions
|
|
28708
28834
|
- Direct and concise
|
|
28709
|
-
</Category_Context
|
|
28710
|
-
|
|
28711
|
-
<Caller_Warning>
|
|
28712
|
-
THIS CATEGORY USES A SMALLER/FASTER MODEL (gpt-5.6-luna-fast).
|
|
28713
|
-
|
|
28714
|
-
The model executing this task is optimized for speed over depth. Your prompt MUST be:
|
|
28715
|
-
|
|
28716
|
-
**EXHAUSTIVELY EXPLICIT** - Leave NOTHING to interpretation:
|
|
28717
|
-
1. MUST DO: List every required action as atomic, numbered steps
|
|
28718
|
-
2. MUST NOT DO: Explicitly forbid likely mistakes and deviations
|
|
28719
|
-
3. EXPECTED OUTPUT: Describe exact success criteria with concrete examples
|
|
28720
|
-
|
|
28721
|
-
**WHY THIS MATTERS:**
|
|
28722
|
-
- Smaller models benefit from explicit guardrails
|
|
28723
|
-
- Vague instructions may lead to unpredictable results
|
|
28724
|
-
- Implicit expectations may be missed
|
|
28725
|
-
**PROMPT STRUCTURE (MANDATORY):**
|
|
28726
|
-
\`\`\`
|
|
28727
|
-
TASK: [One-sentence goal]
|
|
28728
|
-
|
|
28729
|
-
MUST DO:
|
|
28730
|
-
1. [Specific action with exact details]
|
|
28731
|
-
2. [Another specific action]
|
|
28732
|
-
...
|
|
28733
|
-
|
|
28734
|
-
MUST NOT DO:
|
|
28735
|
-
- [Forbidden action + why]
|
|
28736
|
-
- [Another forbidden action]
|
|
28737
|
-
...
|
|
28738
|
-
|
|
28739
|
-
EXPECTED OUTPUT:
|
|
28740
|
-
- [Exact deliverable description]
|
|
28741
|
-
- [Success criteria / verification method]
|
|
28742
|
-
\`\`\`
|
|
28743
|
-
|
|
28744
|
-
If your prompt lacks this structure, REWRITE IT before delegating.
|
|
28745
|
-
</Caller_Warning>`;
|
|
28835
|
+
</Category_Context>`;
|
|
28836
|
+
var QUICK_CATEGORY_CALLER_GUIDANCE = `<Caller_Warning>Small/fast model: before delegating, write an explicit prompt with numbered must-do steps, forbidden deviations, and concrete success criteria.</Caller_Warning>`;
|
|
28746
28837
|
var UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND = `<Category_Context>
|
|
28747
28838
|
You are working on tasks that don't fit specific categories but require moderate effort.
|
|
28748
|
-
|
|
28749
|
-
|
|
28750
|
-
|
|
28751
|
-
1. Task does NOT fit: quick (trivial), visual-engineering (UI), ultrabrain (deep logic), artistry (creative), writing (docs)
|
|
28752
|
-
2. Task requires more than trivial effort but is NOT system-wide
|
|
28753
|
-
3. Scope is contained within a few files/modules
|
|
28754
|
-
|
|
28755
|
-
If task fits ANY other category, DO NOT select unspecified-low.
|
|
28756
|
-
This is NOT a default choice - it's for genuinely unclassifiable moderate-effort work.
|
|
28757
|
-
</Selection_Gate>
|
|
28758
|
-
</Category_Context>
|
|
28759
|
-
|
|
28760
|
-
<Caller_Warning>
|
|
28761
|
-
THIS CATEGORY USES A LIGHTWEIGHT MODEL (gpt-5.6-luna).
|
|
28762
|
-
|
|
28763
|
-
**PROVIDE CLEAR STRUCTURE:**
|
|
28764
|
-
1. MUST DO: Enumerate required actions explicitly
|
|
28765
|
-
2. MUST NOT DO: State forbidden actions to prevent scope creep
|
|
28766
|
-
3. EXPECTED OUTPUT: Define concrete success criteria
|
|
28767
|
-
</Caller_Warning>`;
|
|
28839
|
+
</Category_Context>`;
|
|
28840
|
+
var UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE = `<Selection_Gate>Use only when no specialist category fits, effort is moderate, and scope stays within a few files/modules. Prefer any matching specialist category.</Selection_Gate>
|
|
28841
|
+
<Caller_Warning>Provide explicit must-do steps, forbidden scope, and concrete success criteria.</Caller_Warning>`;
|
|
28768
28842
|
var OPENAI_CATEGORIES = [
|
|
28769
28843
|
{
|
|
28770
28844
|
name: "ultrabrain",
|
|
@@ -28784,12 +28858,14 @@ var OPENAI_CATEGORIES = [
|
|
|
28784
28858
|
name: "quick",
|
|
28785
28859
|
config: { model: "kimi-for-coding/kimi-for-coding-highspeed" },
|
|
28786
28860
|
description: "Trivial tasks - single file changes, typo fixes, simple modifications",
|
|
28861
|
+
callerGuidance: QUICK_CATEGORY_CALLER_GUIDANCE,
|
|
28787
28862
|
promptAppend: QUICK_CATEGORY_PROMPT_APPEND
|
|
28788
28863
|
},
|
|
28789
28864
|
{
|
|
28790
28865
|
name: "unspecified-low",
|
|
28791
|
-
config: { model: "
|
|
28866
|
+
config: { model: "xai/grok-4.6", variant: "xhigh" },
|
|
28792
28867
|
description: "Tasks that don't fit other categories, low effort required",
|
|
28868
|
+
callerGuidance: UNSPECIFIED_LOW_CATEGORY_CALLER_GUIDANCE,
|
|
28793
28869
|
promptAppend: UNSPECIFIED_LOW_CATEGORY_PROMPT_APPEND
|
|
28794
28870
|
}
|
|
28795
28871
|
];
|
|
@@ -28807,6 +28883,7 @@ function buildCategoryRecord(selector) {
|
|
|
28807
28883
|
var DEFAULT_CATEGORIES = buildCategoryRecord((definition2) => definition2.config);
|
|
28808
28884
|
var CATEGORY_PROMPT_APPENDS = buildCategoryRecord((definition2) => definition2.promptAppend);
|
|
28809
28885
|
var CATEGORY_DESCRIPTIONS = buildCategoryRecord((definition2) => definition2.description);
|
|
28886
|
+
var CATEGORY_CALLER_GUIDANCE = buildCategoryRecord((definition2) => definition2.callerGuidance);
|
|
28810
28887
|
var CATEGORY_PROMPT_APPEND_RESOLVERS = Object.fromEntries(BUILTIN_CATEGORIES.filter((definition2) => definition2.resolvePromptAppend !== undefined).map((definition2) => [definition2.name, definition2.resolvePromptAppend]));
|
|
28811
28888
|
var BUILTIN_CATEGORY_REQUIRES_MODEL = Object.fromEntries(BUILTIN_CATEGORIES.filter((definition2) => definition2.requiresModel !== undefined).map((definition2) => [definition2.name, definition2.requiresModel]));
|
|
28812
28889
|
|
|
@@ -84105,6 +84182,47 @@ var model_capabilities_generated_default = {
|
|
|
84105
84182
|
input: 272000,
|
|
84106
84183
|
output: 128000
|
|
84107
84184
|
}
|
|
84185
|
+
},
|
|
84186
|
+
"grok-4.6": {
|
|
84187
|
+
id: "grok-4.6",
|
|
84188
|
+
family: "grok",
|
|
84189
|
+
reasoning: true,
|
|
84190
|
+
temperature: true,
|
|
84191
|
+
toolCall: true,
|
|
84192
|
+
modalities: {
|
|
84193
|
+
input: [
|
|
84194
|
+
"text",
|
|
84195
|
+
"image"
|
|
84196
|
+
],
|
|
84197
|
+
output: [
|
|
84198
|
+
"text"
|
|
84199
|
+
]
|
|
84200
|
+
},
|
|
84201
|
+
limit: {
|
|
84202
|
+
context: 500000,
|
|
84203
|
+
output: 500000
|
|
84204
|
+
}
|
|
84205
|
+
},
|
|
84206
|
+
"xai/grok-4.6": {
|
|
84207
|
+
id: "xai/grok-4.6",
|
|
84208
|
+
family: "grok",
|
|
84209
|
+
reasoning: true,
|
|
84210
|
+
temperature: true,
|
|
84211
|
+
toolCall: true,
|
|
84212
|
+
modalities: {
|
|
84213
|
+
input: [
|
|
84214
|
+
"text",
|
|
84215
|
+
"image",
|
|
84216
|
+
"pdf"
|
|
84217
|
+
],
|
|
84218
|
+
output: [
|
|
84219
|
+
"text"
|
|
84220
|
+
]
|
|
84221
|
+
},
|
|
84222
|
+
limit: {
|
|
84223
|
+
context: 500000,
|
|
84224
|
+
output: 500000
|
|
84225
|
+
}
|
|
84108
84226
|
}
|
|
84109
84227
|
}
|
|
84110
84228
|
};
|
|
@@ -84240,21 +84358,21 @@ function restoreMessageCursor(sessionID, cursor) {
|
|
|
84240
84358
|
sessionCursors.set(sessionID, cloneCursorState(cursor));
|
|
84241
84359
|
}
|
|
84242
84360
|
// packages/omo-opencode/src/shared/shell-env.ts
|
|
84243
|
-
function detectShellType() {
|
|
84244
|
-
if (
|
|
84245
|
-
const shell =
|
|
84361
|
+
function detectShellType(platform = process.platform, env2 = process.env) {
|
|
84362
|
+
if (env2.SHELL) {
|
|
84363
|
+
const shell = env2.SHELL;
|
|
84246
84364
|
if (shell.includes("csh") || shell.includes("tcsh")) {
|
|
84247
84365
|
return "csh";
|
|
84248
84366
|
}
|
|
84249
84367
|
return "unix";
|
|
84250
84368
|
}
|
|
84251
|
-
if (
|
|
84369
|
+
if (platform === "win32" && (env2.BASH_VERSION || env2.MSYSTEM || env2.WSL_DISTRO_NAME)) {
|
|
84252
84370
|
return "unix";
|
|
84253
84371
|
}
|
|
84254
|
-
if (
|
|
84372
|
+
if (env2.PSModulePath) {
|
|
84255
84373
|
return "powershell";
|
|
84256
84374
|
}
|
|
84257
|
-
return
|
|
84375
|
+
return platform === "win32" ? "cmd" : "unix";
|
|
84258
84376
|
}
|
|
84259
84377
|
function shellEscape(value, shellType) {
|
|
84260
84378
|
if (value === "") {
|
|
@@ -85413,7 +85531,7 @@ var getUrl = ({ baseUrl, path: path7, query, querySerializer, url: _url }) => {
|
|
|
85413
85531
|
};
|
|
85414
85532
|
|
|
85415
85533
|
// node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/gen/client/utils.gen.js
|
|
85416
|
-
var createQuerySerializer = ({ allowReserved, array: array7, object:
|
|
85534
|
+
var createQuerySerializer = ({ allowReserved, array: array7, object: object13 } = {}) => {
|
|
85417
85535
|
const querySerializer = (queryParams) => {
|
|
85418
85536
|
const search = [];
|
|
85419
85537
|
if (queryParams && typeof queryParams === "object") {
|
|
@@ -85440,7 +85558,7 @@ var createQuerySerializer = ({ allowReserved, array: array7, object: object12 }
|
|
|
85440
85558
|
name,
|
|
85441
85559
|
style: "deepObject",
|
|
85442
85560
|
value,
|
|
85443
|
-
...
|
|
85561
|
+
...object13
|
|
85444
85562
|
});
|
|
85445
85563
|
if (serializedObject)
|
|
85446
85564
|
search.push(serializedObject);
|
|
@@ -98550,7 +98668,7 @@ function getCachedVersion(options = {}) {
|
|
|
98550
98668
|
// package.json
|
|
98551
98669
|
var package_default = {
|
|
98552
98670
|
name: "oh-my-opencode",
|
|
98553
|
-
version: "5.0.0-beta.
|
|
98671
|
+
version: "5.0.0-beta.11",
|
|
98554
98672
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
98555
98673
|
main: "./dist/index.js",
|
|
98556
98674
|
types: "dist/index.d.ts",
|
|
@@ -98686,6 +98804,7 @@ var package_default = {
|
|
|
98686
98804
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
98687
98805
|
test: "bun test",
|
|
98688
98806
|
"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",
|
|
98807
|
+
"test:fast": "bun run script/test-fast.ts",
|
|
98689
98808
|
"test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test packages/omo-senpi",
|
|
98690
98809
|
"test:windows-codex": "bun run test:codex",
|
|
98691
98810
|
"build:git-bash-mcp": "bun run --cwd packages/git-bash-mcp build",
|
|
@@ -98730,7 +98849,7 @@ var package_default = {
|
|
|
98730
98849
|
zod: "^4.4.3"
|
|
98731
98850
|
},
|
|
98732
98851
|
devDependencies: {
|
|
98733
|
-
"@code-yeongyu/senpi": "2026.8.
|
|
98852
|
+
"@code-yeongyu/senpi": "2026.8.18-3",
|
|
98734
98853
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
98735
98854
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
98736
98855
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -98746,6 +98865,7 @@ var package_default = {
|
|
|
98746
98865
|
"@oh-my-opencode/model-core": "workspace:*",
|
|
98747
98866
|
"@oh-my-opencode/omo-codex": "workspace:*",
|
|
98748
98867
|
"@oh-my-opencode/omo-config-core": "workspace:*",
|
|
98868
|
+
"@oh-my-opencode/omo-opencode": "workspace:*",
|
|
98749
98869
|
"@oh-my-opencode/omo-senpi": "workspace:*",
|
|
98750
98870
|
"@oh-my-opencode/openclaw-core": "workspace:*",
|
|
98751
98871
|
"@oh-my-opencode/pi-goal": "workspace:*",
|
|
@@ -98761,7 +98881,7 @@ var package_default = {
|
|
|
98761
98881
|
"@oh-my-opencode/utils": "workspace:*",
|
|
98762
98882
|
"@types/js-yaml": "^4.0.9",
|
|
98763
98883
|
"@types/picomatch": "^4.0.3",
|
|
98764
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
98884
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
98765
98885
|
"@xterm/addon-unicode11": "^0.9.0",
|
|
98766
98886
|
"@xterm/xterm": "^6.0.0",
|
|
98767
98887
|
"bun-types": "1.3.14",
|
|
@@ -98770,24 +98890,24 @@ var package_default = {
|
|
|
98770
98890
|
typescript: "^7.0.2"
|
|
98771
98891
|
},
|
|
98772
98892
|
optionalDependencies: {
|
|
98773
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
98774
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
98775
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
98776
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
98777
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
98778
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
98779
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
98780
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
98781
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
98782
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
98783
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
98784
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
98893
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.11",
|
|
98894
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.11",
|
|
98895
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.11",
|
|
98896
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.11",
|
|
98897
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.11",
|
|
98898
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.11",
|
|
98899
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.11",
|
|
98900
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.11",
|
|
98901
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.11",
|
|
98902
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.11",
|
|
98903
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.11",
|
|
98904
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.11"
|
|
98785
98905
|
},
|
|
98786
98906
|
overrides: {
|
|
98787
|
-
"@earendil-works/pi-agent-core": "0.
|
|
98788
|
-
"@earendil-works/pi-ai": "0.
|
|
98789
|
-
"@earendil-works/pi-coding-agent": "0.
|
|
98790
|
-
"@earendil-works/pi-tui": "0.
|
|
98907
|
+
"@earendil-works/pi-agent-core": "0.84.2",
|
|
98908
|
+
"@earendil-works/pi-ai": "0.84.2",
|
|
98909
|
+
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
98910
|
+
"@earendil-works/pi-tui": "0.84.2",
|
|
98791
98911
|
hono: "^4.12.18",
|
|
98792
98912
|
"@hono/node-server": "^1.19.13",
|
|
98793
98913
|
"express-rate-limit": "^8.5.1",
|
|
@@ -104850,7 +104970,7 @@ task(category="quick", load_skills=["git-master"], run_in_background=true)
|
|
|
104850
104970
|
|
|
104851
104971
|
### Goal Registration (BINDING)
|
|
104852
104972
|
|
|
104853
|
-
When the \`create_goal\` tool exists, you MUST register the run's goal with it BEFORE any implementation: the
|
|
104973
|
+
When the \`create_goal\` tool exists, you MUST register the run's goal with it BEFORE any implementation. Check \`get_goal\` first: continue a matching active goal instead of duplicating it; surface a conflicting one. Pass exactly \`objective\`, written outcome-first: the concrete thing that will be TRUE when done (an outcome, never an activity like "investigate X"), the named deliverable surfaces, the scenario contract below as success criteria (each a binary observable that CAN fail), explicit scope bounds, and one line "I'll stop right away when <the exact observable state that ends this run>". Never invent a budget or deadline the user did not state. Without the tool, record the same contract at the top of your TODO/notepad and treat it as binding.
|
|
104854
104974
|
|
|
104855
104975
|
### Pre-Implementation: Scenario Contract (BINDING)
|
|
104856
104976
|
|
|
@@ -105207,7 +105327,7 @@ task(subagent_type="plan", load_skills=[], run_in_background=false, prompt="<gat
|
|
|
105207
105327
|
|
|
105208
105328
|
### GOAL REGISTRATION (BINDING)
|
|
105209
105329
|
|
|
105210
|
-
When the \`create_goal\` tool exists, you MUST register the run's goal with it BEFORE any implementation: the
|
|
105330
|
+
When the \`create_goal\` tool exists, you MUST register the run's goal with it BEFORE any implementation. Check \`get_goal\` first: continue a matching active goal instead of duplicating it; surface a conflicting one. Pass exactly \`objective\`, written outcome-first: the concrete thing that will be TRUE when done (an outcome, never an activity like "investigate X"), the named deliverable surfaces, the scenario contract below as success criteria (each a binary observable that CAN fail), explicit scope bounds, and one line "I'll stop right away when <the exact observable state that ends this run>". Never invent a budget or deadline the user did not state. Without the tool, record the same contract at the top of your TODO/notepad and treat it as binding.
|
|
105211
105331
|
|
|
105212
105332
|
### SCENARIO CONTRACT (binding, defined BEFORE coding)
|
|
105213
105333
|
|
|
@@ -105476,7 +105596,7 @@ If a verification command is unavailable or not applicable, state the exact reas
|
|
|
105476
105596
|
|
|
105477
105597
|
## GOAL REGISTRATION
|
|
105478
105598
|
|
|
105479
|
-
When a \`create_goal\` tool exists, register the run's goal with
|
|
105599
|
+
When a \`create_goal\` tool exists, check \`get_goal\` first (continue a matching active goal; never duplicate), then register the run's goal before implementation with exactly \`objective\`, written outcome-first: the concrete outcome that will be true (never an activity), the named deliverable surfaces, the scenario contract as success criteria that can fail, scope bounds, and one WHEN TO STOP line naming the observable end state. Never invent a budget or deadline the user did not state. Without the tool, record the same contract in your working notes and treat it as binding.
|
|
105480
105600
|
|
|
105481
105601
|
## TODO DISCIPLINE
|
|
105482
105602
|
|
|
@@ -105677,7 +105797,7 @@ At start, run \`NOTE=$(mktemp -t ulw-$(date +%Y%m%d-%H%M%S).XXXXXX.md)\` and ech
|
|
|
105677
105797
|
|
|
105678
105798
|
## GOAL REGISTRATION
|
|
105679
105799
|
|
|
105680
|
-
When a \`create_goal\` tool exists, register the run's goal with
|
|
105800
|
+
When a \`create_goal\` tool exists, check \`get_goal\` first (continue a matching active goal; never duplicate), then register the run's goal before implementation with exactly \`objective\`, outcome-first: the concrete outcome that will be true (never an activity), named deliverable surfaces, the scenario contract as criteria that can fail, scope bounds, and the WHEN TO STOP line. No invented budgets or deadlines. No tool \u2192 record the same contract in the notepad and treat it as binding.
|
|
105681
105801
|
|
|
105682
105802
|
## TODO DISCIPLINE
|
|
105683
105803
|
|
|
@@ -107437,35 +107557,35 @@ import { mkdirSync as mkdirSync19, readFileSync as readFileSync49, renameSync as
|
|
|
107437
107557
|
import { join as join95 } from "path";
|
|
107438
107558
|
|
|
107439
107559
|
// packages/omo-opencode/src/hooks/goal/types.ts
|
|
107440
|
-
import { z as
|
|
107560
|
+
import { z as z51 } from "zod";
|
|
107441
107561
|
var GOAL_STATUS_VALUES = ["active", "paused", "complete"];
|
|
107442
|
-
var GoalStatusSchema =
|
|
107443
|
-
var GoalSchema =
|
|
107444
|
-
id:
|
|
107445
|
-
sessionID:
|
|
107446
|
-
objective:
|
|
107562
|
+
var GoalStatusSchema = z51.enum(GOAL_STATUS_VALUES);
|
|
107563
|
+
var GoalSchema = z51.object({
|
|
107564
|
+
id: z51.string(),
|
|
107565
|
+
sessionID: z51.string(),
|
|
107566
|
+
objective: z51.string(),
|
|
107447
107567
|
status: GoalStatusSchema,
|
|
107448
|
-
tokensUsed:
|
|
107449
|
-
timeUsedSeconds:
|
|
107450
|
-
createdAt:
|
|
107451
|
-
updatedAt:
|
|
107452
|
-
lastStartedAt:
|
|
107453
|
-
completedAt:
|
|
107568
|
+
tokensUsed: z51.number().int().nonnegative(),
|
|
107569
|
+
timeUsedSeconds: z51.number().int().nonnegative(),
|
|
107570
|
+
createdAt: z51.number().int().nonnegative(),
|
|
107571
|
+
updatedAt: z51.number().int().nonnegative(),
|
|
107572
|
+
lastStartedAt: z51.number().int().nonnegative().optional(),
|
|
107573
|
+
completedAt: z51.number().int().nonnegative().optional()
|
|
107454
107574
|
});
|
|
107455
|
-
var GoalFileSchema =
|
|
107456
|
-
version:
|
|
107575
|
+
var GoalFileSchema = z51.object({
|
|
107576
|
+
version: z51.literal(1),
|
|
107457
107577
|
goal: GoalSchema.nullable()
|
|
107458
107578
|
});
|
|
107459
|
-
var GoalToolSnapshotSchema =
|
|
107460
|
-
sessionID:
|
|
107461
|
-
objective:
|
|
107579
|
+
var GoalToolSnapshotSchema = z51.object({
|
|
107580
|
+
sessionID: z51.string(),
|
|
107581
|
+
objective: z51.string(),
|
|
107462
107582
|
status: GoalStatusSchema,
|
|
107463
|
-
tokensUsed:
|
|
107464
|
-
timeUsedSeconds:
|
|
107465
|
-
createdAt:
|
|
107466
|
-
updatedAt:
|
|
107583
|
+
tokensUsed: z51.number().int().nonnegative(),
|
|
107584
|
+
timeUsedSeconds: z51.number().int().nonnegative(),
|
|
107585
|
+
createdAt: z51.number().int().nonnegative(),
|
|
107586
|
+
updatedAt: z51.number().int().nonnegative()
|
|
107467
107587
|
});
|
|
107468
|
-
var GoalToolResponseSchema =
|
|
107588
|
+
var GoalToolResponseSchema = z51.object({
|
|
107469
107589
|
goal: GoalToolSnapshotSchema.nullable()
|
|
107470
107590
|
});
|
|
107471
107591
|
|
|
@@ -116236,6 +116356,10 @@ async function handleAtlasSessionIdle(input) {
|
|
|
116236
116356
|
return;
|
|
116237
116357
|
}
|
|
116238
116358
|
const { boulderState, progress, appendedSession } = activeBoulderSession;
|
|
116359
|
+
if (sessionState.waitingForFinalWaveApproval) {
|
|
116360
|
+
log2(`[${HOOK_NAME9}] Skipped: waiting for explicit final-wave approval`, { sessionID });
|
|
116361
|
+
return;
|
|
116362
|
+
}
|
|
116239
116363
|
if (progress.isComplete) {
|
|
116240
116364
|
await handleCompletedBoulderIdle({ ctx, options, sessionID, sessionState, boulderState });
|
|
116241
116365
|
return;
|
|
@@ -116263,10 +116387,6 @@ async function handleAtlasSessionIdle(input) {
|
|
|
116263
116387
|
const now = Date.now();
|
|
116264
116388
|
const activePlanPath = resolveBoulderPlanPath(ctx.directory, boulderState);
|
|
116265
116389
|
resetStallStateForPlanChange(sessionState, activePlanPath);
|
|
116266
|
-
if (sessionState.waitingForFinalWaveApproval) {
|
|
116267
|
-
log2(`[${HOOK_NAME9}] Skipped: waiting for explicit final-wave approval`, { sessionID });
|
|
116268
|
-
return;
|
|
116269
|
-
}
|
|
116270
116390
|
if (sessionState.stalledContinuationReason) {
|
|
116271
116391
|
log2(`[${HOOK_NAME9}] Skipped: boulder continuation stalled`, {
|
|
116272
116392
|
sessionID,
|
|
@@ -121063,6 +121183,9 @@ function createMessageUpdateHandler(deps, helpers) {
|
|
|
121063
121183
|
if (!sessionAwaitingFallbackResult.has(sessionID)) {
|
|
121064
121184
|
return;
|
|
121065
121185
|
}
|
|
121186
|
+
if (sessionRetryInFlight.has(sessionID)) {
|
|
121187
|
+
return;
|
|
121188
|
+
}
|
|
121066
121189
|
const hasVisible = await checkVisibleResponse(ctx, sessionID, info);
|
|
121067
121190
|
if (!hasVisible) {
|
|
121068
121191
|
log2(`[${HOOK_NAME13}] Assistant update observed without visible final response; keeping fallback timeout`, {
|
|
@@ -121122,14 +121245,23 @@ function createMessageUpdateHandler(deps, helpers) {
|
|
|
121122
121245
|
errorName: extractErrorName(error),
|
|
121123
121246
|
errorType: classifyErrorType(error)
|
|
121124
121247
|
});
|
|
121248
|
+
const terminalQuota402Abort = classifyErrorType(error) === "abort" && extractStatusCode(error, config3.retry_on_errors) === 402;
|
|
121125
121249
|
if (!isRetryableError(error, config3.retry_on_errors)) {
|
|
121126
|
-
|
|
121250
|
+
if (!terminalQuota402Abort) {
|
|
121251
|
+
log2(`[${HOOK_NAME13}] message.updated error not retryable, skipping fallback`, {
|
|
121252
|
+
sessionID,
|
|
121253
|
+
statusCode: extractStatusCode(error, config3.retry_on_errors),
|
|
121254
|
+
errorName: extractErrorName(error),
|
|
121255
|
+
errorType: classifyErrorType(error)
|
|
121256
|
+
});
|
|
121257
|
+
return;
|
|
121258
|
+
}
|
|
121259
|
+
log2(`[${HOOK_NAME13}] message.updated terminal-quota 402 abort with fallback chain; dispatching session-stable fallback`, {
|
|
121127
121260
|
sessionID,
|
|
121128
121261
|
statusCode: extractStatusCode(error, config3.retry_on_errors),
|
|
121129
121262
|
errorName: extractErrorName(error),
|
|
121130
121263
|
errorType: classifyErrorType(error)
|
|
121131
121264
|
});
|
|
121132
|
-
return;
|
|
121133
121265
|
}
|
|
121134
121266
|
const agent2 = info?.agent;
|
|
121135
121267
|
const resolvedAgent = await helpers.resolveAgentForSessionFromContext(sessionID, agent2);
|
|
@@ -124672,11 +124804,11 @@ function createMonitorStatusInjectorHook(monitorManager, config3) {
|
|
|
124672
124804
|
import { resolve as resolve34 } from "path";
|
|
124673
124805
|
|
|
124674
124806
|
// node_modules/.bun/@opencode-ai+plugin@1.15.13+e69f701e64847596/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
124675
|
-
import { z as
|
|
124807
|
+
import { z as z52 } from "zod";
|
|
124676
124808
|
function tool(input) {
|
|
124677
124809
|
return input;
|
|
124678
124810
|
}
|
|
124679
|
-
tool.schema =
|
|
124811
|
+
tool.schema = z52;
|
|
124680
124812
|
|
|
124681
124813
|
// packages/omo-opencode/src/shared/ripgrep-cli.ts
|
|
124682
124814
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
@@ -132758,14 +132890,39 @@ var SISYPHUS_JUNIOR_AGENT2 = getAgentDisplayName("sisyphus-junior");
|
|
|
132758
132890
|
|
|
132759
132891
|
// packages/omo-opencode/src/tools/delegate-task/categories.ts
|
|
132760
132892
|
init_logger2();
|
|
132893
|
+
function resolveAvailableModelEntry(entry, availableModels) {
|
|
132894
|
+
const configuredModel = typeof entry === "string" ? entry : entry.model;
|
|
132895
|
+
const parsedModel = parseModelString(configuredModel);
|
|
132896
|
+
if (!parsedModel)
|
|
132897
|
+
return null;
|
|
132898
|
+
const fullModel = `${parsedModel.providerID}/${parsedModel.modelID}`;
|
|
132899
|
+
const matchedModel = fuzzyMatchModel2(fullModel, availableModels, [parsedModel.providerID]);
|
|
132900
|
+
if (!matchedModel)
|
|
132901
|
+
return null;
|
|
132902
|
+
if (typeof entry === "string") {
|
|
132903
|
+
return parsedModel.variant ? `${matchedModel}(${parsedModel.variant})` : matchedModel;
|
|
132904
|
+
}
|
|
132905
|
+
return {
|
|
132906
|
+
...entry,
|
|
132907
|
+
model: matchedModel,
|
|
132908
|
+
variant: entry.variant ?? parsedModel.variant
|
|
132909
|
+
};
|
|
132910
|
+
}
|
|
132761
132911
|
function resolveCategoryConfig(categoryName, options) {
|
|
132762
132912
|
const { userCategories, inheritedModel: _inheritedModel, systemDefaultModel, availableModels } = options;
|
|
132763
132913
|
const defaultConfig = DEFAULT_CATEGORIES[categoryName];
|
|
132764
|
-
const
|
|
132765
|
-
const hasExplicitUserConfig =
|
|
132766
|
-
if (
|
|
132914
|
+
const configuredUserConfig = userCategories?.[categoryName];
|
|
132915
|
+
const hasExplicitUserConfig = configuredUserConfig !== undefined;
|
|
132916
|
+
if (configuredUserConfig?.disable) {
|
|
132767
132917
|
return null;
|
|
132768
132918
|
}
|
|
132919
|
+
let userConfig = configuredUserConfig;
|
|
132920
|
+
if (configuredUserConfig?.models && availableModels && availableModels.size > 0) {
|
|
132921
|
+
const models2 = configuredUserConfig.models.map((entry) => resolveAvailableModelEntry(entry, availableModels)).filter((entry) => entry !== null);
|
|
132922
|
+
if (models2.length === 0)
|
|
132923
|
+
return null;
|
|
132924
|
+
userConfig = { ...configuredUserConfig, models: models2 };
|
|
132925
|
+
}
|
|
132769
132926
|
const categoryReq = CATEGORY_MODEL_REQUIREMENTS[categoryName];
|
|
132770
132927
|
const requiredModel = categoryReq?.requiresModel ?? BUILTIN_CATEGORY_REQUIRES_MODEL[categoryName];
|
|
132771
132928
|
if (requiredModel && availableModels && !hasExplicitUserConfig) {
|
|
@@ -132950,6 +133107,11 @@ async function resolveCategoryExecution(args, executorCtx, inheritedModel, syste
|
|
|
132950
133107
|
const requirement2 = CATEGORY_MODEL_REQUIREMENTS[categoryName];
|
|
132951
133108
|
const requiredModel = requirement2?.requiresModel ?? BUILTIN_CATEGORY_REQUIRES_MODEL[categoryName];
|
|
132952
133109
|
const allCategoryNames = Object.keys(enabledCategories).join(", ");
|
|
133110
|
+
const configuredModels = userCategories?.[categoryName]?.models;
|
|
133111
|
+
if (configuredModels && availableModels.size > 0) {
|
|
133112
|
+
const configuredChain = configuredModels.map((entry) => getConfiguredModel(entry)).join(" -> ");
|
|
133113
|
+
return categoryResolutionError(`Configured model chain is unavailable for category "${categoryName}": ${configuredChain}`);
|
|
133114
|
+
}
|
|
132953
133115
|
if (categoryExists && requiredModel) {
|
|
132954
133116
|
return categoryResolutionError(`Category "${categoryName}" requires model "${requiredModel}" which is not available.
|
|
132955
133117
|
|
|
@@ -133395,7 +133557,8 @@ function createDelegateTaskPresentation(options) {
|
|
|
133395
133557
|
const categoryEntries = Object.entries(allCategories).map(([name, categoryConfig]) => ({
|
|
133396
133558
|
name,
|
|
133397
133559
|
categoryConfig,
|
|
133398
|
-
description: userCategories?.[name]?.description || CATEGORY_DESCRIPTIONS[name]
|
|
133560
|
+
description: userCategories?.[name]?.description || CATEGORY_DESCRIPTIONS[name],
|
|
133561
|
+
callerGuidance: CATEGORY_CALLER_GUIDANCE[name]
|
|
133399
133562
|
}));
|
|
133400
133563
|
const categoryNames = categoryEntries.map(({ name }) => name);
|
|
133401
133564
|
const categoryExamples = categoryNames.join(", ");
|
|
@@ -133407,8 +133570,13 @@ function createDelegateTaskPresentation(options) {
|
|
|
133407
133570
|
};
|
|
133408
133571
|
});
|
|
133409
133572
|
const availableSkills = options.availableSkills ?? [];
|
|
133410
|
-
const categoryList = categoryEntries.map(({ name, description: description2 }) => {
|
|
133411
|
-
|
|
133573
|
+
const categoryList = categoryEntries.map(({ name, description: description2, callerGuidance }) => {
|
|
133574
|
+
const categoryLine = description2 ? ` - ${name}: ${description2}` : ` - ${name}`;
|
|
133575
|
+
const indentedGuidance = callerGuidance?.replaceAll(`
|
|
133576
|
+
`, `
|
|
133577
|
+
`);
|
|
133578
|
+
return indentedGuidance ? `${categoryLine}
|
|
133579
|
+
${indentedGuidance}` : categoryLine;
|
|
133412
133580
|
}).join(`
|
|
133413
133581
|
`);
|
|
133414
133582
|
const description = `Spawn agent task with category-based or direct agent selection.
|
|
@@ -133630,55 +133798,55 @@ function isExplicitSyncRun(runInBackground) {
|
|
|
133630
133798
|
import { join as join127 } from "path";
|
|
133631
133799
|
|
|
133632
133800
|
// packages/omo-opencode/src/tools/task/types.ts
|
|
133633
|
-
import { z as
|
|
133634
|
-
var TaskStatusSchema =
|
|
133635
|
-
var TaskObjectSchema =
|
|
133636
|
-
id:
|
|
133637
|
-
subject:
|
|
133638
|
-
description:
|
|
133801
|
+
import { z as z53 } from "zod";
|
|
133802
|
+
var TaskStatusSchema = z53.enum(["pending", "in_progress", "completed", "deleted"]);
|
|
133803
|
+
var TaskObjectSchema = z53.object({
|
|
133804
|
+
id: z53.string(),
|
|
133805
|
+
subject: z53.string(),
|
|
133806
|
+
description: z53.string(),
|
|
133639
133807
|
status: TaskStatusSchema,
|
|
133640
|
-
activeForm:
|
|
133641
|
-
blocks:
|
|
133642
|
-
blockedBy:
|
|
133643
|
-
owner:
|
|
133644
|
-
metadata:
|
|
133645
|
-
repoURL:
|
|
133646
|
-
parentID:
|
|
133647
|
-
threadID:
|
|
133808
|
+
activeForm: z53.string().optional(),
|
|
133809
|
+
blocks: z53.array(z53.string()).default([]),
|
|
133810
|
+
blockedBy: z53.array(z53.string()).default([]),
|
|
133811
|
+
owner: z53.string().optional(),
|
|
133812
|
+
metadata: z53.record(z53.string(), z53.unknown()).optional(),
|
|
133813
|
+
repoURL: z53.string().optional(),
|
|
133814
|
+
parentID: z53.string().optional(),
|
|
133815
|
+
threadID: z53.string()
|
|
133648
133816
|
}).strict();
|
|
133649
|
-
var TaskCreateInputSchema =
|
|
133650
|
-
subject:
|
|
133651
|
-
description:
|
|
133652
|
-
activeForm:
|
|
133653
|
-
blocks:
|
|
133654
|
-
blockedBy:
|
|
133655
|
-
owner:
|
|
133656
|
-
metadata:
|
|
133657
|
-
repoURL:
|
|
133658
|
-
parentID:
|
|
133817
|
+
var TaskCreateInputSchema = z53.object({
|
|
133818
|
+
subject: z53.string(),
|
|
133819
|
+
description: z53.string().optional(),
|
|
133820
|
+
activeForm: z53.string().optional(),
|
|
133821
|
+
blocks: z53.array(z53.string()).optional(),
|
|
133822
|
+
blockedBy: z53.array(z53.string()).optional(),
|
|
133823
|
+
owner: z53.string().optional(),
|
|
133824
|
+
metadata: z53.record(z53.string(), z53.unknown()).optional(),
|
|
133825
|
+
repoURL: z53.string().optional(),
|
|
133826
|
+
parentID: z53.string().optional()
|
|
133659
133827
|
});
|
|
133660
|
-
var TaskListInputSchema =
|
|
133828
|
+
var TaskListInputSchema = z53.object({
|
|
133661
133829
|
status: TaskStatusSchema.optional(),
|
|
133662
|
-
parentID:
|
|
133830
|
+
parentID: z53.string().optional()
|
|
133663
133831
|
});
|
|
133664
|
-
var TaskGetInputSchema =
|
|
133665
|
-
id:
|
|
133832
|
+
var TaskGetInputSchema = z53.object({
|
|
133833
|
+
id: z53.string()
|
|
133666
133834
|
});
|
|
133667
|
-
var TaskUpdateInputSchema =
|
|
133668
|
-
id:
|
|
133669
|
-
subject:
|
|
133670
|
-
description:
|
|
133835
|
+
var TaskUpdateInputSchema = z53.object({
|
|
133836
|
+
id: z53.string(),
|
|
133837
|
+
subject: z53.string().optional(),
|
|
133838
|
+
description: z53.string().optional(),
|
|
133671
133839
|
status: TaskStatusSchema.optional(),
|
|
133672
|
-
activeForm:
|
|
133673
|
-
addBlocks:
|
|
133674
|
-
addBlockedBy:
|
|
133675
|
-
owner:
|
|
133676
|
-
metadata:
|
|
133677
|
-
repoURL:
|
|
133678
|
-
parentID:
|
|
133840
|
+
activeForm: z53.string().optional(),
|
|
133841
|
+
addBlocks: z53.array(z53.string()).optional(),
|
|
133842
|
+
addBlockedBy: z53.array(z53.string()).optional(),
|
|
133843
|
+
owner: z53.string().optional(),
|
|
133844
|
+
metadata: z53.record(z53.string(), z53.unknown()).optional(),
|
|
133845
|
+
repoURL: z53.string().optional(),
|
|
133846
|
+
parentID: z53.string().optional()
|
|
133679
133847
|
});
|
|
133680
|
-
var TaskDeleteInputSchema =
|
|
133681
|
-
id:
|
|
133848
|
+
var TaskDeleteInputSchema = z53.object({
|
|
133849
|
+
id: z53.string()
|
|
133682
133850
|
});
|
|
133683
133851
|
|
|
133684
133852
|
// packages/omo-opencode/src/features/claude-tasks/storage.ts
|
|
@@ -134524,7 +134692,7 @@ function createHashlineEditTool(ctx) {
|
|
|
134524
134692
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
134525
134693
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
134526
134694
|
init_logger2();
|
|
134527
|
-
import { z as
|
|
134695
|
+
import { z as z54 } from "zod";
|
|
134528
134696
|
|
|
134529
134697
|
// packages/team-core/src/team-mailbox/send.ts
|
|
134530
134698
|
init_paths3();
|
|
@@ -135051,18 +135219,18 @@ async function resolveTeamRuntimeDetails(teamRunId, sessionID, config3, deps) {
|
|
|
135051
135219
|
|
|
135052
135220
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
135053
135221
|
var MESSAGE_TOOL_KINDS = ["message", "announcement"];
|
|
135054
|
-
var TeamReferenceArgsSchema =
|
|
135055
|
-
path:
|
|
135056
|
-
description:
|
|
135222
|
+
var TeamReferenceArgsSchema = z54.object({
|
|
135223
|
+
path: z54.string().min(1),
|
|
135224
|
+
description: z54.string().optional()
|
|
135057
135225
|
});
|
|
135058
|
-
var TeamSendMessageArgsSchema =
|
|
135059
|
-
teamRunId:
|
|
135060
|
-
to:
|
|
135061
|
-
body:
|
|
135062
|
-
kind:
|
|
135063
|
-
correlationId:
|
|
135064
|
-
summary:
|
|
135065
|
-
references:
|
|
135226
|
+
var TeamSendMessageArgsSchema = z54.object({
|
|
135227
|
+
teamRunId: z54.string().min(1),
|
|
135228
|
+
to: z54.string().min(1),
|
|
135229
|
+
body: z54.string(),
|
|
135230
|
+
kind: z54.enum(MESSAGE_TOOL_KINDS).optional(),
|
|
135231
|
+
correlationId: z54.preprocess((value) => value === "" ? undefined : value, z54.uuid().optional()),
|
|
135232
|
+
summary: z54.string().optional(),
|
|
135233
|
+
references: z54.array(TeamReferenceArgsSchema).optional()
|
|
135066
135234
|
});
|
|
135067
135235
|
function createTeamSendMessageTool(config3, client3, deps = defaultTeamSendMessageToolDeps) {
|
|
135068
135236
|
return tool({
|
|
@@ -143377,63 +143545,63 @@ function getLiteralValue(schema2) {
|
|
|
143377
143545
|
}
|
|
143378
143546
|
|
|
143379
143547
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
143380
|
-
import * as
|
|
143548
|
+
import * as z55 from "zod/v4";
|
|
143381
143549
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
143382
143550
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
143383
143551
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
143384
143552
|
var JSONRPC_VERSION = "2.0";
|
|
143385
|
-
var AssertObjectSchema =
|
|
143386
|
-
var ProgressTokenSchema =
|
|
143387
|
-
var CursorSchema =
|
|
143388
|
-
var TaskCreationParamsSchema =
|
|
143389
|
-
ttl:
|
|
143390
|
-
pollInterval:
|
|
143553
|
+
var AssertObjectSchema = z55.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
143554
|
+
var ProgressTokenSchema = z55.union([z55.string(), z55.number().int()]);
|
|
143555
|
+
var CursorSchema = z55.string();
|
|
143556
|
+
var TaskCreationParamsSchema = z55.looseObject({
|
|
143557
|
+
ttl: z55.number().optional(),
|
|
143558
|
+
pollInterval: z55.number().optional()
|
|
143391
143559
|
});
|
|
143392
|
-
var TaskMetadataSchema =
|
|
143393
|
-
ttl:
|
|
143560
|
+
var TaskMetadataSchema = z55.object({
|
|
143561
|
+
ttl: z55.number().optional()
|
|
143394
143562
|
});
|
|
143395
|
-
var RelatedTaskMetadataSchema =
|
|
143396
|
-
taskId:
|
|
143563
|
+
var RelatedTaskMetadataSchema = z55.object({
|
|
143564
|
+
taskId: z55.string()
|
|
143397
143565
|
});
|
|
143398
|
-
var RequestMetaSchema =
|
|
143566
|
+
var RequestMetaSchema = z55.looseObject({
|
|
143399
143567
|
progressToken: ProgressTokenSchema.optional(),
|
|
143400
143568
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
143401
143569
|
});
|
|
143402
|
-
var BaseRequestParamsSchema =
|
|
143570
|
+
var BaseRequestParamsSchema = z55.object({
|
|
143403
143571
|
_meta: RequestMetaSchema.optional()
|
|
143404
143572
|
});
|
|
143405
143573
|
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
143406
143574
|
task: TaskMetadataSchema.optional()
|
|
143407
143575
|
});
|
|
143408
143576
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
143409
|
-
var RequestSchema =
|
|
143410
|
-
method:
|
|
143577
|
+
var RequestSchema = z55.object({
|
|
143578
|
+
method: z55.string(),
|
|
143411
143579
|
params: BaseRequestParamsSchema.loose().optional()
|
|
143412
143580
|
});
|
|
143413
|
-
var NotificationsParamsSchema =
|
|
143581
|
+
var NotificationsParamsSchema = z55.object({
|
|
143414
143582
|
_meta: RequestMetaSchema.optional()
|
|
143415
143583
|
});
|
|
143416
|
-
var NotificationSchema =
|
|
143417
|
-
method:
|
|
143584
|
+
var NotificationSchema = z55.object({
|
|
143585
|
+
method: z55.string(),
|
|
143418
143586
|
params: NotificationsParamsSchema.loose().optional()
|
|
143419
143587
|
});
|
|
143420
|
-
var ResultSchema =
|
|
143588
|
+
var ResultSchema = z55.looseObject({
|
|
143421
143589
|
_meta: RequestMetaSchema.optional()
|
|
143422
143590
|
});
|
|
143423
|
-
var RequestIdSchema =
|
|
143424
|
-
var JSONRPCRequestSchema =
|
|
143425
|
-
jsonrpc:
|
|
143591
|
+
var RequestIdSchema = z55.union([z55.string(), z55.number().int()]);
|
|
143592
|
+
var JSONRPCRequestSchema = z55.object({
|
|
143593
|
+
jsonrpc: z55.literal(JSONRPC_VERSION),
|
|
143426
143594
|
id: RequestIdSchema,
|
|
143427
143595
|
...RequestSchema.shape
|
|
143428
143596
|
}).strict();
|
|
143429
143597
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
143430
|
-
var JSONRPCNotificationSchema =
|
|
143431
|
-
jsonrpc:
|
|
143598
|
+
var JSONRPCNotificationSchema = z55.object({
|
|
143599
|
+
jsonrpc: z55.literal(JSONRPC_VERSION),
|
|
143432
143600
|
...NotificationSchema.shape
|
|
143433
143601
|
}).strict();
|
|
143434
143602
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
143435
|
-
var JSONRPCResultResponseSchema =
|
|
143436
|
-
jsonrpc:
|
|
143603
|
+
var JSONRPCResultResponseSchema = z55.object({
|
|
143604
|
+
jsonrpc: z55.literal(JSONRPC_VERSION),
|
|
143437
143605
|
id: RequestIdSchema,
|
|
143438
143606
|
result: ResultSchema
|
|
143439
143607
|
}).strict();
|
|
@@ -143449,153 +143617,153 @@ var ErrorCode;
|
|
|
143449
143617
|
ErrorCode2[ErrorCode2["InternalError"] = -32603] = "InternalError";
|
|
143450
143618
|
ErrorCode2[ErrorCode2["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
143451
143619
|
})(ErrorCode || (ErrorCode = {}));
|
|
143452
|
-
var JSONRPCErrorResponseSchema =
|
|
143453
|
-
jsonrpc:
|
|
143620
|
+
var JSONRPCErrorResponseSchema = z55.object({
|
|
143621
|
+
jsonrpc: z55.literal(JSONRPC_VERSION),
|
|
143454
143622
|
id: RequestIdSchema.optional(),
|
|
143455
|
-
error:
|
|
143456
|
-
code:
|
|
143457
|
-
message:
|
|
143458
|
-
data:
|
|
143623
|
+
error: z55.object({
|
|
143624
|
+
code: z55.number().int(),
|
|
143625
|
+
message: z55.string(),
|
|
143626
|
+
data: z55.unknown().optional()
|
|
143459
143627
|
})
|
|
143460
143628
|
}).strict();
|
|
143461
143629
|
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
|
|
143462
|
-
var JSONRPCMessageSchema =
|
|
143630
|
+
var JSONRPCMessageSchema = z55.union([
|
|
143463
143631
|
JSONRPCRequestSchema,
|
|
143464
143632
|
JSONRPCNotificationSchema,
|
|
143465
143633
|
JSONRPCResultResponseSchema,
|
|
143466
143634
|
JSONRPCErrorResponseSchema
|
|
143467
143635
|
]);
|
|
143468
|
-
var JSONRPCResponseSchema =
|
|
143636
|
+
var JSONRPCResponseSchema = z55.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
143469
143637
|
var EmptyResultSchema = ResultSchema.strict();
|
|
143470
143638
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
143471
143639
|
requestId: RequestIdSchema.optional(),
|
|
143472
|
-
reason:
|
|
143640
|
+
reason: z55.string().optional()
|
|
143473
143641
|
});
|
|
143474
143642
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
143475
|
-
method:
|
|
143643
|
+
method: z55.literal("notifications/cancelled"),
|
|
143476
143644
|
params: CancelledNotificationParamsSchema
|
|
143477
143645
|
});
|
|
143478
|
-
var IconSchema =
|
|
143479
|
-
src:
|
|
143480
|
-
mimeType:
|
|
143481
|
-
sizes:
|
|
143482
|
-
theme:
|
|
143646
|
+
var IconSchema = z55.object({
|
|
143647
|
+
src: z55.string(),
|
|
143648
|
+
mimeType: z55.string().optional(),
|
|
143649
|
+
sizes: z55.array(z55.string()).optional(),
|
|
143650
|
+
theme: z55.enum(["light", "dark"]).optional()
|
|
143483
143651
|
});
|
|
143484
|
-
var IconsSchema =
|
|
143485
|
-
icons:
|
|
143652
|
+
var IconsSchema = z55.object({
|
|
143653
|
+
icons: z55.array(IconSchema).optional()
|
|
143486
143654
|
});
|
|
143487
|
-
var BaseMetadataSchema =
|
|
143488
|
-
name:
|
|
143489
|
-
title:
|
|
143655
|
+
var BaseMetadataSchema = z55.object({
|
|
143656
|
+
name: z55.string(),
|
|
143657
|
+
title: z55.string().optional()
|
|
143490
143658
|
});
|
|
143491
143659
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
143492
143660
|
...BaseMetadataSchema.shape,
|
|
143493
143661
|
...IconsSchema.shape,
|
|
143494
|
-
version:
|
|
143495
|
-
websiteUrl:
|
|
143496
|
-
description:
|
|
143662
|
+
version: z55.string(),
|
|
143663
|
+
websiteUrl: z55.string().optional(),
|
|
143664
|
+
description: z55.string().optional()
|
|
143497
143665
|
});
|
|
143498
|
-
var FormElicitationCapabilitySchema =
|
|
143499
|
-
applyDefaults:
|
|
143500
|
-
}),
|
|
143501
|
-
var ElicitationCapabilitySchema =
|
|
143666
|
+
var FormElicitationCapabilitySchema = z55.intersection(z55.object({
|
|
143667
|
+
applyDefaults: z55.boolean().optional()
|
|
143668
|
+
}), z55.record(z55.string(), z55.unknown()));
|
|
143669
|
+
var ElicitationCapabilitySchema = z55.preprocess((value) => {
|
|
143502
143670
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
143503
143671
|
if (Object.keys(value).length === 0) {
|
|
143504
143672
|
return { form: {} };
|
|
143505
143673
|
}
|
|
143506
143674
|
}
|
|
143507
143675
|
return value;
|
|
143508
|
-
},
|
|
143676
|
+
}, z55.intersection(z55.object({
|
|
143509
143677
|
form: FormElicitationCapabilitySchema.optional(),
|
|
143510
143678
|
url: AssertObjectSchema.optional()
|
|
143511
|
-
}),
|
|
143512
|
-
var ClientTasksCapabilitySchema =
|
|
143679
|
+
}), z55.record(z55.string(), z55.unknown()).optional()));
|
|
143680
|
+
var ClientTasksCapabilitySchema = z55.looseObject({
|
|
143513
143681
|
list: AssertObjectSchema.optional(),
|
|
143514
143682
|
cancel: AssertObjectSchema.optional(),
|
|
143515
|
-
requests:
|
|
143516
|
-
sampling:
|
|
143683
|
+
requests: z55.looseObject({
|
|
143684
|
+
sampling: z55.looseObject({
|
|
143517
143685
|
createMessage: AssertObjectSchema.optional()
|
|
143518
143686
|
}).optional(),
|
|
143519
|
-
elicitation:
|
|
143687
|
+
elicitation: z55.looseObject({
|
|
143520
143688
|
create: AssertObjectSchema.optional()
|
|
143521
143689
|
}).optional()
|
|
143522
143690
|
}).optional()
|
|
143523
143691
|
});
|
|
143524
|
-
var ServerTasksCapabilitySchema =
|
|
143692
|
+
var ServerTasksCapabilitySchema = z55.looseObject({
|
|
143525
143693
|
list: AssertObjectSchema.optional(),
|
|
143526
143694
|
cancel: AssertObjectSchema.optional(),
|
|
143527
|
-
requests:
|
|
143528
|
-
tools:
|
|
143695
|
+
requests: z55.looseObject({
|
|
143696
|
+
tools: z55.looseObject({
|
|
143529
143697
|
call: AssertObjectSchema.optional()
|
|
143530
143698
|
}).optional()
|
|
143531
143699
|
}).optional()
|
|
143532
143700
|
});
|
|
143533
|
-
var ClientCapabilitiesSchema =
|
|
143534
|
-
experimental:
|
|
143535
|
-
sampling:
|
|
143701
|
+
var ClientCapabilitiesSchema = z55.object({
|
|
143702
|
+
experimental: z55.record(z55.string(), AssertObjectSchema).optional(),
|
|
143703
|
+
sampling: z55.object({
|
|
143536
143704
|
context: AssertObjectSchema.optional(),
|
|
143537
143705
|
tools: AssertObjectSchema.optional()
|
|
143538
143706
|
}).optional(),
|
|
143539
143707
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
143540
|
-
roots:
|
|
143541
|
-
listChanged:
|
|
143708
|
+
roots: z55.object({
|
|
143709
|
+
listChanged: z55.boolean().optional()
|
|
143542
143710
|
}).optional(),
|
|
143543
143711
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
143544
|
-
extensions:
|
|
143712
|
+
extensions: z55.record(z55.string(), AssertObjectSchema).optional()
|
|
143545
143713
|
});
|
|
143546
143714
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
143547
|
-
protocolVersion:
|
|
143715
|
+
protocolVersion: z55.string(),
|
|
143548
143716
|
capabilities: ClientCapabilitiesSchema,
|
|
143549
143717
|
clientInfo: ImplementationSchema
|
|
143550
143718
|
});
|
|
143551
143719
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
143552
|
-
method:
|
|
143720
|
+
method: z55.literal("initialize"),
|
|
143553
143721
|
params: InitializeRequestParamsSchema
|
|
143554
143722
|
});
|
|
143555
|
-
var ServerCapabilitiesSchema =
|
|
143556
|
-
experimental:
|
|
143723
|
+
var ServerCapabilitiesSchema = z55.object({
|
|
143724
|
+
experimental: z55.record(z55.string(), AssertObjectSchema).optional(),
|
|
143557
143725
|
logging: AssertObjectSchema.optional(),
|
|
143558
143726
|
completions: AssertObjectSchema.optional(),
|
|
143559
|
-
prompts:
|
|
143560
|
-
listChanged:
|
|
143727
|
+
prompts: z55.object({
|
|
143728
|
+
listChanged: z55.boolean().optional()
|
|
143561
143729
|
}).optional(),
|
|
143562
|
-
resources:
|
|
143563
|
-
subscribe:
|
|
143564
|
-
listChanged:
|
|
143730
|
+
resources: z55.object({
|
|
143731
|
+
subscribe: z55.boolean().optional(),
|
|
143732
|
+
listChanged: z55.boolean().optional()
|
|
143565
143733
|
}).optional(),
|
|
143566
|
-
tools:
|
|
143567
|
-
listChanged:
|
|
143734
|
+
tools: z55.object({
|
|
143735
|
+
listChanged: z55.boolean().optional()
|
|
143568
143736
|
}).optional(),
|
|
143569
143737
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
143570
|
-
extensions:
|
|
143738
|
+
extensions: z55.record(z55.string(), AssertObjectSchema).optional()
|
|
143571
143739
|
});
|
|
143572
143740
|
var InitializeResultSchema = ResultSchema.extend({
|
|
143573
|
-
protocolVersion:
|
|
143741
|
+
protocolVersion: z55.string(),
|
|
143574
143742
|
capabilities: ServerCapabilitiesSchema,
|
|
143575
143743
|
serverInfo: ImplementationSchema,
|
|
143576
|
-
instructions:
|
|
143744
|
+
instructions: z55.string().optional()
|
|
143577
143745
|
});
|
|
143578
143746
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
143579
|
-
method:
|
|
143747
|
+
method: z55.literal("notifications/initialized"),
|
|
143580
143748
|
params: NotificationsParamsSchema.optional()
|
|
143581
143749
|
});
|
|
143582
143750
|
var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
143583
143751
|
var PingRequestSchema = RequestSchema.extend({
|
|
143584
|
-
method:
|
|
143752
|
+
method: z55.literal("ping"),
|
|
143585
143753
|
params: BaseRequestParamsSchema.optional()
|
|
143586
143754
|
});
|
|
143587
|
-
var ProgressSchema =
|
|
143588
|
-
progress:
|
|
143589
|
-
total:
|
|
143590
|
-
message:
|
|
143755
|
+
var ProgressSchema = z55.object({
|
|
143756
|
+
progress: z55.number(),
|
|
143757
|
+
total: z55.optional(z55.number()),
|
|
143758
|
+
message: z55.optional(z55.string())
|
|
143591
143759
|
});
|
|
143592
|
-
var ProgressNotificationParamsSchema =
|
|
143760
|
+
var ProgressNotificationParamsSchema = z55.object({
|
|
143593
143761
|
...NotificationsParamsSchema.shape,
|
|
143594
143762
|
...ProgressSchema.shape,
|
|
143595
143763
|
progressToken: ProgressTokenSchema
|
|
143596
143764
|
});
|
|
143597
143765
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
143598
|
-
method:
|
|
143766
|
+
method: z55.literal("notifications/progress"),
|
|
143599
143767
|
params: ProgressNotificationParamsSchema
|
|
143600
143768
|
});
|
|
143601
143769
|
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -143607,60 +143775,60 @@ var PaginatedRequestSchema = RequestSchema.extend({
|
|
|
143607
143775
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
143608
143776
|
nextCursor: CursorSchema.optional()
|
|
143609
143777
|
});
|
|
143610
|
-
var TaskStatusSchema2 =
|
|
143611
|
-
var TaskSchema2 =
|
|
143612
|
-
taskId:
|
|
143778
|
+
var TaskStatusSchema2 = z55.enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
143779
|
+
var TaskSchema2 = z55.object({
|
|
143780
|
+
taskId: z55.string(),
|
|
143613
143781
|
status: TaskStatusSchema2,
|
|
143614
|
-
ttl:
|
|
143615
|
-
createdAt:
|
|
143616
|
-
lastUpdatedAt:
|
|
143617
|
-
pollInterval:
|
|
143618
|
-
statusMessage:
|
|
143782
|
+
ttl: z55.union([z55.number(), z55.null()]),
|
|
143783
|
+
createdAt: z55.string(),
|
|
143784
|
+
lastUpdatedAt: z55.string(),
|
|
143785
|
+
pollInterval: z55.optional(z55.number()),
|
|
143786
|
+
statusMessage: z55.optional(z55.string())
|
|
143619
143787
|
});
|
|
143620
143788
|
var CreateTaskResultSchema = ResultSchema.extend({
|
|
143621
143789
|
task: TaskSchema2
|
|
143622
143790
|
});
|
|
143623
143791
|
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema2);
|
|
143624
143792
|
var TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
143625
|
-
method:
|
|
143793
|
+
method: z55.literal("notifications/tasks/status"),
|
|
143626
143794
|
params: TaskStatusNotificationParamsSchema
|
|
143627
143795
|
});
|
|
143628
143796
|
var GetTaskRequestSchema = RequestSchema.extend({
|
|
143629
|
-
method:
|
|
143797
|
+
method: z55.literal("tasks/get"),
|
|
143630
143798
|
params: BaseRequestParamsSchema.extend({
|
|
143631
|
-
taskId:
|
|
143799
|
+
taskId: z55.string()
|
|
143632
143800
|
})
|
|
143633
143801
|
});
|
|
143634
143802
|
var GetTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
143635
143803
|
var GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
143636
|
-
method:
|
|
143804
|
+
method: z55.literal("tasks/result"),
|
|
143637
143805
|
params: BaseRequestParamsSchema.extend({
|
|
143638
|
-
taskId:
|
|
143806
|
+
taskId: z55.string()
|
|
143639
143807
|
})
|
|
143640
143808
|
});
|
|
143641
143809
|
var GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
143642
143810
|
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
|
|
143643
|
-
method:
|
|
143811
|
+
method: z55.literal("tasks/list")
|
|
143644
143812
|
});
|
|
143645
143813
|
var ListTasksResultSchema = PaginatedResultSchema.extend({
|
|
143646
|
-
tasks:
|
|
143814
|
+
tasks: z55.array(TaskSchema2)
|
|
143647
143815
|
});
|
|
143648
143816
|
var CancelTaskRequestSchema = RequestSchema.extend({
|
|
143649
|
-
method:
|
|
143817
|
+
method: z55.literal("tasks/cancel"),
|
|
143650
143818
|
params: BaseRequestParamsSchema.extend({
|
|
143651
|
-
taskId:
|
|
143819
|
+
taskId: z55.string()
|
|
143652
143820
|
})
|
|
143653
143821
|
});
|
|
143654
143822
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
143655
|
-
var ResourceContentsSchema =
|
|
143656
|
-
uri:
|
|
143657
|
-
mimeType:
|
|
143658
|
-
_meta:
|
|
143823
|
+
var ResourceContentsSchema = z55.object({
|
|
143824
|
+
uri: z55.string(),
|
|
143825
|
+
mimeType: z55.optional(z55.string()),
|
|
143826
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143659
143827
|
});
|
|
143660
143828
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
143661
|
-
text:
|
|
143829
|
+
text: z55.string()
|
|
143662
143830
|
});
|
|
143663
|
-
var Base64Schema =
|
|
143831
|
+
var Base64Schema = z55.string().refine((val) => {
|
|
143664
143832
|
try {
|
|
143665
143833
|
atob(val);
|
|
143666
143834
|
return true;
|
|
@@ -143671,447 +143839,447 @@ var Base64Schema = z54.string().refine((val) => {
|
|
|
143671
143839
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
143672
143840
|
blob: Base64Schema
|
|
143673
143841
|
});
|
|
143674
|
-
var RoleSchema =
|
|
143675
|
-
var AnnotationsSchema =
|
|
143676
|
-
audience:
|
|
143677
|
-
priority:
|
|
143678
|
-
lastModified:
|
|
143842
|
+
var RoleSchema = z55.enum(["user", "assistant"]);
|
|
143843
|
+
var AnnotationsSchema = z55.object({
|
|
143844
|
+
audience: z55.array(RoleSchema).optional(),
|
|
143845
|
+
priority: z55.number().min(0).max(1).optional(),
|
|
143846
|
+
lastModified: z55.iso.datetime({ offset: true }).optional()
|
|
143679
143847
|
});
|
|
143680
|
-
var ResourceSchema =
|
|
143848
|
+
var ResourceSchema = z55.object({
|
|
143681
143849
|
...BaseMetadataSchema.shape,
|
|
143682
143850
|
...IconsSchema.shape,
|
|
143683
|
-
uri:
|
|
143684
|
-
description:
|
|
143685
|
-
mimeType:
|
|
143686
|
-
size:
|
|
143851
|
+
uri: z55.string(),
|
|
143852
|
+
description: z55.optional(z55.string()),
|
|
143853
|
+
mimeType: z55.optional(z55.string()),
|
|
143854
|
+
size: z55.optional(z55.number()),
|
|
143687
143855
|
annotations: AnnotationsSchema.optional(),
|
|
143688
|
-
_meta:
|
|
143856
|
+
_meta: z55.optional(z55.looseObject({}))
|
|
143689
143857
|
});
|
|
143690
|
-
var ResourceTemplateSchema =
|
|
143858
|
+
var ResourceTemplateSchema = z55.object({
|
|
143691
143859
|
...BaseMetadataSchema.shape,
|
|
143692
143860
|
...IconsSchema.shape,
|
|
143693
|
-
uriTemplate:
|
|
143694
|
-
description:
|
|
143695
|
-
mimeType:
|
|
143861
|
+
uriTemplate: z55.string(),
|
|
143862
|
+
description: z55.optional(z55.string()),
|
|
143863
|
+
mimeType: z55.optional(z55.string()),
|
|
143696
143864
|
annotations: AnnotationsSchema.optional(),
|
|
143697
|
-
_meta:
|
|
143865
|
+
_meta: z55.optional(z55.looseObject({}))
|
|
143698
143866
|
});
|
|
143699
143867
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
143700
|
-
method:
|
|
143868
|
+
method: z55.literal("resources/list")
|
|
143701
143869
|
});
|
|
143702
143870
|
var ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
143703
|
-
resources:
|
|
143871
|
+
resources: z55.array(ResourceSchema)
|
|
143704
143872
|
});
|
|
143705
143873
|
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
143706
|
-
method:
|
|
143874
|
+
method: z55.literal("resources/templates/list")
|
|
143707
143875
|
});
|
|
143708
143876
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
143709
|
-
resourceTemplates:
|
|
143877
|
+
resourceTemplates: z55.array(ResourceTemplateSchema)
|
|
143710
143878
|
});
|
|
143711
143879
|
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
143712
|
-
uri:
|
|
143880
|
+
uri: z55.string()
|
|
143713
143881
|
});
|
|
143714
143882
|
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
143715
143883
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
143716
|
-
method:
|
|
143884
|
+
method: z55.literal("resources/read"),
|
|
143717
143885
|
params: ReadResourceRequestParamsSchema
|
|
143718
143886
|
});
|
|
143719
143887
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
143720
|
-
contents:
|
|
143888
|
+
contents: z55.array(z55.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
143721
143889
|
});
|
|
143722
143890
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
143723
|
-
method:
|
|
143891
|
+
method: z55.literal("notifications/resources/list_changed"),
|
|
143724
143892
|
params: NotificationsParamsSchema.optional()
|
|
143725
143893
|
});
|
|
143726
143894
|
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
143727
143895
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
143728
|
-
method:
|
|
143896
|
+
method: z55.literal("resources/subscribe"),
|
|
143729
143897
|
params: SubscribeRequestParamsSchema
|
|
143730
143898
|
});
|
|
143731
143899
|
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
143732
143900
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
143733
|
-
method:
|
|
143901
|
+
method: z55.literal("resources/unsubscribe"),
|
|
143734
143902
|
params: UnsubscribeRequestParamsSchema
|
|
143735
143903
|
});
|
|
143736
143904
|
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
143737
|
-
uri:
|
|
143905
|
+
uri: z55.string()
|
|
143738
143906
|
});
|
|
143739
143907
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
143740
|
-
method:
|
|
143908
|
+
method: z55.literal("notifications/resources/updated"),
|
|
143741
143909
|
params: ResourceUpdatedNotificationParamsSchema
|
|
143742
143910
|
});
|
|
143743
|
-
var PromptArgumentSchema =
|
|
143744
|
-
name:
|
|
143745
|
-
description:
|
|
143746
|
-
required:
|
|
143911
|
+
var PromptArgumentSchema = z55.object({
|
|
143912
|
+
name: z55.string(),
|
|
143913
|
+
description: z55.optional(z55.string()),
|
|
143914
|
+
required: z55.optional(z55.boolean())
|
|
143747
143915
|
});
|
|
143748
|
-
var PromptSchema =
|
|
143916
|
+
var PromptSchema = z55.object({
|
|
143749
143917
|
...BaseMetadataSchema.shape,
|
|
143750
143918
|
...IconsSchema.shape,
|
|
143751
|
-
description:
|
|
143752
|
-
arguments:
|
|
143753
|
-
_meta:
|
|
143919
|
+
description: z55.optional(z55.string()),
|
|
143920
|
+
arguments: z55.optional(z55.array(PromptArgumentSchema)),
|
|
143921
|
+
_meta: z55.optional(z55.looseObject({}))
|
|
143754
143922
|
});
|
|
143755
143923
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
143756
|
-
method:
|
|
143924
|
+
method: z55.literal("prompts/list")
|
|
143757
143925
|
});
|
|
143758
143926
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
143759
|
-
prompts:
|
|
143927
|
+
prompts: z55.array(PromptSchema)
|
|
143760
143928
|
});
|
|
143761
143929
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
143762
|
-
name:
|
|
143763
|
-
arguments:
|
|
143930
|
+
name: z55.string(),
|
|
143931
|
+
arguments: z55.record(z55.string(), z55.string()).optional()
|
|
143764
143932
|
});
|
|
143765
143933
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
143766
|
-
method:
|
|
143934
|
+
method: z55.literal("prompts/get"),
|
|
143767
143935
|
params: GetPromptRequestParamsSchema
|
|
143768
143936
|
});
|
|
143769
|
-
var TextContentSchema =
|
|
143770
|
-
type:
|
|
143771
|
-
text:
|
|
143937
|
+
var TextContentSchema = z55.object({
|
|
143938
|
+
type: z55.literal("text"),
|
|
143939
|
+
text: z55.string(),
|
|
143772
143940
|
annotations: AnnotationsSchema.optional(),
|
|
143773
|
-
_meta:
|
|
143941
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143774
143942
|
});
|
|
143775
|
-
var ImageContentSchema =
|
|
143776
|
-
type:
|
|
143943
|
+
var ImageContentSchema = z55.object({
|
|
143944
|
+
type: z55.literal("image"),
|
|
143777
143945
|
data: Base64Schema,
|
|
143778
|
-
mimeType:
|
|
143946
|
+
mimeType: z55.string(),
|
|
143779
143947
|
annotations: AnnotationsSchema.optional(),
|
|
143780
|
-
_meta:
|
|
143948
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143781
143949
|
});
|
|
143782
|
-
var AudioContentSchema =
|
|
143783
|
-
type:
|
|
143950
|
+
var AudioContentSchema = z55.object({
|
|
143951
|
+
type: z55.literal("audio"),
|
|
143784
143952
|
data: Base64Schema,
|
|
143785
|
-
mimeType:
|
|
143953
|
+
mimeType: z55.string(),
|
|
143786
143954
|
annotations: AnnotationsSchema.optional(),
|
|
143787
|
-
_meta:
|
|
143955
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143788
143956
|
});
|
|
143789
|
-
var ToolUseContentSchema =
|
|
143790
|
-
type:
|
|
143791
|
-
name:
|
|
143792
|
-
id:
|
|
143793
|
-
input:
|
|
143794
|
-
_meta:
|
|
143957
|
+
var ToolUseContentSchema = z55.object({
|
|
143958
|
+
type: z55.literal("tool_use"),
|
|
143959
|
+
name: z55.string(),
|
|
143960
|
+
id: z55.string(),
|
|
143961
|
+
input: z55.record(z55.string(), z55.unknown()),
|
|
143962
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143795
143963
|
});
|
|
143796
|
-
var EmbeddedResourceSchema =
|
|
143797
|
-
type:
|
|
143798
|
-
resource:
|
|
143964
|
+
var EmbeddedResourceSchema = z55.object({
|
|
143965
|
+
type: z55.literal("resource"),
|
|
143966
|
+
resource: z55.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
143799
143967
|
annotations: AnnotationsSchema.optional(),
|
|
143800
|
-
_meta:
|
|
143968
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143801
143969
|
});
|
|
143802
143970
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
143803
|
-
type:
|
|
143971
|
+
type: z55.literal("resource_link")
|
|
143804
143972
|
});
|
|
143805
|
-
var ContentBlockSchema =
|
|
143973
|
+
var ContentBlockSchema = z55.union([
|
|
143806
143974
|
TextContentSchema,
|
|
143807
143975
|
ImageContentSchema,
|
|
143808
143976
|
AudioContentSchema,
|
|
143809
143977
|
ResourceLinkSchema,
|
|
143810
143978
|
EmbeddedResourceSchema
|
|
143811
143979
|
]);
|
|
143812
|
-
var PromptMessageSchema =
|
|
143980
|
+
var PromptMessageSchema = z55.object({
|
|
143813
143981
|
role: RoleSchema,
|
|
143814
143982
|
content: ContentBlockSchema
|
|
143815
143983
|
});
|
|
143816
143984
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
143817
|
-
description:
|
|
143818
|
-
messages:
|
|
143985
|
+
description: z55.string().optional(),
|
|
143986
|
+
messages: z55.array(PromptMessageSchema)
|
|
143819
143987
|
});
|
|
143820
143988
|
var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
143821
|
-
method:
|
|
143989
|
+
method: z55.literal("notifications/prompts/list_changed"),
|
|
143822
143990
|
params: NotificationsParamsSchema.optional()
|
|
143823
143991
|
});
|
|
143824
|
-
var ToolAnnotationsSchema =
|
|
143825
|
-
title:
|
|
143826
|
-
readOnlyHint:
|
|
143827
|
-
destructiveHint:
|
|
143828
|
-
idempotentHint:
|
|
143829
|
-
openWorldHint:
|
|
143992
|
+
var ToolAnnotationsSchema = z55.object({
|
|
143993
|
+
title: z55.string().optional(),
|
|
143994
|
+
readOnlyHint: z55.boolean().optional(),
|
|
143995
|
+
destructiveHint: z55.boolean().optional(),
|
|
143996
|
+
idempotentHint: z55.boolean().optional(),
|
|
143997
|
+
openWorldHint: z55.boolean().optional()
|
|
143830
143998
|
});
|
|
143831
|
-
var ToolExecutionSchema =
|
|
143832
|
-
taskSupport:
|
|
143999
|
+
var ToolExecutionSchema = z55.object({
|
|
144000
|
+
taskSupport: z55.enum(["required", "optional", "forbidden"]).optional()
|
|
143833
144001
|
});
|
|
143834
|
-
var ToolSchema =
|
|
144002
|
+
var ToolSchema = z55.object({
|
|
143835
144003
|
...BaseMetadataSchema.shape,
|
|
143836
144004
|
...IconsSchema.shape,
|
|
143837
|
-
description:
|
|
143838
|
-
inputSchema:
|
|
143839
|
-
type:
|
|
143840
|
-
properties:
|
|
143841
|
-
required:
|
|
143842
|
-
}).catchall(
|
|
143843
|
-
outputSchema:
|
|
143844
|
-
type:
|
|
143845
|
-
properties:
|
|
143846
|
-
required:
|
|
143847
|
-
}).catchall(
|
|
144005
|
+
description: z55.string().optional(),
|
|
144006
|
+
inputSchema: z55.object({
|
|
144007
|
+
type: z55.literal("object"),
|
|
144008
|
+
properties: z55.record(z55.string(), AssertObjectSchema).optional(),
|
|
144009
|
+
required: z55.array(z55.string()).optional()
|
|
144010
|
+
}).catchall(z55.unknown()),
|
|
144011
|
+
outputSchema: z55.object({
|
|
144012
|
+
type: z55.literal("object"),
|
|
144013
|
+
properties: z55.record(z55.string(), AssertObjectSchema).optional(),
|
|
144014
|
+
required: z55.array(z55.string()).optional()
|
|
144015
|
+
}).catchall(z55.unknown()).optional(),
|
|
143848
144016
|
annotations: ToolAnnotationsSchema.optional(),
|
|
143849
144017
|
execution: ToolExecutionSchema.optional(),
|
|
143850
|
-
_meta:
|
|
144018
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143851
144019
|
});
|
|
143852
144020
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
143853
|
-
method:
|
|
144021
|
+
method: z55.literal("tools/list")
|
|
143854
144022
|
});
|
|
143855
144023
|
var ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
143856
|
-
tools:
|
|
144024
|
+
tools: z55.array(ToolSchema)
|
|
143857
144025
|
});
|
|
143858
144026
|
var CallToolResultSchema = ResultSchema.extend({
|
|
143859
|
-
content:
|
|
143860
|
-
structuredContent:
|
|
143861
|
-
isError:
|
|
144027
|
+
content: z55.array(ContentBlockSchema).default([]),
|
|
144028
|
+
structuredContent: z55.record(z55.string(), z55.unknown()).optional(),
|
|
144029
|
+
isError: z55.boolean().optional()
|
|
143862
144030
|
});
|
|
143863
144031
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
143864
|
-
toolResult:
|
|
144032
|
+
toolResult: z55.unknown()
|
|
143865
144033
|
}));
|
|
143866
144034
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
143867
|
-
name:
|
|
143868
|
-
arguments:
|
|
144035
|
+
name: z55.string(),
|
|
144036
|
+
arguments: z55.record(z55.string(), z55.unknown()).optional()
|
|
143869
144037
|
});
|
|
143870
144038
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
143871
|
-
method:
|
|
144039
|
+
method: z55.literal("tools/call"),
|
|
143872
144040
|
params: CallToolRequestParamsSchema
|
|
143873
144041
|
});
|
|
143874
144042
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
143875
|
-
method:
|
|
144043
|
+
method: z55.literal("notifications/tools/list_changed"),
|
|
143876
144044
|
params: NotificationsParamsSchema.optional()
|
|
143877
144045
|
});
|
|
143878
|
-
var ListChangedOptionsBaseSchema =
|
|
143879
|
-
autoRefresh:
|
|
143880
|
-
debounceMs:
|
|
144046
|
+
var ListChangedOptionsBaseSchema = z55.object({
|
|
144047
|
+
autoRefresh: z55.boolean().default(true),
|
|
144048
|
+
debounceMs: z55.number().int().nonnegative().default(300)
|
|
143881
144049
|
});
|
|
143882
|
-
var LoggingLevelSchema =
|
|
144050
|
+
var LoggingLevelSchema = z55.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
143883
144051
|
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
143884
144052
|
level: LoggingLevelSchema
|
|
143885
144053
|
});
|
|
143886
144054
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
143887
|
-
method:
|
|
144055
|
+
method: z55.literal("logging/setLevel"),
|
|
143888
144056
|
params: SetLevelRequestParamsSchema
|
|
143889
144057
|
});
|
|
143890
144058
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
143891
144059
|
level: LoggingLevelSchema,
|
|
143892
|
-
logger:
|
|
143893
|
-
data:
|
|
144060
|
+
logger: z55.string().optional(),
|
|
144061
|
+
data: z55.unknown()
|
|
143894
144062
|
});
|
|
143895
144063
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
143896
|
-
method:
|
|
144064
|
+
method: z55.literal("notifications/message"),
|
|
143897
144065
|
params: LoggingMessageNotificationParamsSchema
|
|
143898
144066
|
});
|
|
143899
|
-
var ModelHintSchema =
|
|
143900
|
-
name:
|
|
144067
|
+
var ModelHintSchema = z55.object({
|
|
144068
|
+
name: z55.string().optional()
|
|
143901
144069
|
});
|
|
143902
|
-
var ModelPreferencesSchema =
|
|
143903
|
-
hints:
|
|
143904
|
-
costPriority:
|
|
143905
|
-
speedPriority:
|
|
143906
|
-
intelligencePriority:
|
|
144070
|
+
var ModelPreferencesSchema = z55.object({
|
|
144071
|
+
hints: z55.array(ModelHintSchema).optional(),
|
|
144072
|
+
costPriority: z55.number().min(0).max(1).optional(),
|
|
144073
|
+
speedPriority: z55.number().min(0).max(1).optional(),
|
|
144074
|
+
intelligencePriority: z55.number().min(0).max(1).optional()
|
|
143907
144075
|
});
|
|
143908
|
-
var ToolChoiceSchema =
|
|
143909
|
-
mode:
|
|
144076
|
+
var ToolChoiceSchema = z55.object({
|
|
144077
|
+
mode: z55.enum(["auto", "required", "none"]).optional()
|
|
143910
144078
|
});
|
|
143911
|
-
var ToolResultContentSchema =
|
|
143912
|
-
type:
|
|
143913
|
-
toolUseId:
|
|
143914
|
-
content:
|
|
143915
|
-
structuredContent:
|
|
143916
|
-
isError:
|
|
143917
|
-
_meta:
|
|
144079
|
+
var ToolResultContentSchema = z55.object({
|
|
144080
|
+
type: z55.literal("tool_result"),
|
|
144081
|
+
toolUseId: z55.string().describe("The unique identifier for the corresponding tool call."),
|
|
144082
|
+
content: z55.array(ContentBlockSchema).default([]),
|
|
144083
|
+
structuredContent: z55.object({}).loose().optional(),
|
|
144084
|
+
isError: z55.boolean().optional(),
|
|
144085
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143918
144086
|
});
|
|
143919
|
-
var SamplingContentSchema =
|
|
143920
|
-
var SamplingMessageContentBlockSchema =
|
|
144087
|
+
var SamplingContentSchema = z55.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
|
|
144088
|
+
var SamplingMessageContentBlockSchema = z55.discriminatedUnion("type", [
|
|
143921
144089
|
TextContentSchema,
|
|
143922
144090
|
ImageContentSchema,
|
|
143923
144091
|
AudioContentSchema,
|
|
143924
144092
|
ToolUseContentSchema,
|
|
143925
144093
|
ToolResultContentSchema
|
|
143926
144094
|
]);
|
|
143927
|
-
var SamplingMessageSchema =
|
|
144095
|
+
var SamplingMessageSchema = z55.object({
|
|
143928
144096
|
role: RoleSchema,
|
|
143929
|
-
content:
|
|
143930
|
-
_meta:
|
|
144097
|
+
content: z55.union([SamplingMessageContentBlockSchema, z55.array(SamplingMessageContentBlockSchema)]),
|
|
144098
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
143931
144099
|
});
|
|
143932
144100
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
143933
|
-
messages:
|
|
144101
|
+
messages: z55.array(SamplingMessageSchema),
|
|
143934
144102
|
modelPreferences: ModelPreferencesSchema.optional(),
|
|
143935
|
-
systemPrompt:
|
|
143936
|
-
includeContext:
|
|
143937
|
-
temperature:
|
|
143938
|
-
maxTokens:
|
|
143939
|
-
stopSequences:
|
|
144103
|
+
systemPrompt: z55.string().optional(),
|
|
144104
|
+
includeContext: z55.enum(["none", "thisServer", "allServers"]).optional(),
|
|
144105
|
+
temperature: z55.number().optional(),
|
|
144106
|
+
maxTokens: z55.number().int(),
|
|
144107
|
+
stopSequences: z55.array(z55.string()).optional(),
|
|
143940
144108
|
metadata: AssertObjectSchema.optional(),
|
|
143941
|
-
tools:
|
|
144109
|
+
tools: z55.array(ToolSchema).optional(),
|
|
143942
144110
|
toolChoice: ToolChoiceSchema.optional()
|
|
143943
144111
|
});
|
|
143944
144112
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
143945
|
-
method:
|
|
144113
|
+
method: z55.literal("sampling/createMessage"),
|
|
143946
144114
|
params: CreateMessageRequestParamsSchema
|
|
143947
144115
|
});
|
|
143948
144116
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
143949
|
-
model:
|
|
143950
|
-
stopReason:
|
|
144117
|
+
model: z55.string(),
|
|
144118
|
+
stopReason: z55.optional(z55.enum(["endTurn", "stopSequence", "maxTokens"]).or(z55.string())),
|
|
143951
144119
|
role: RoleSchema,
|
|
143952
144120
|
content: SamplingContentSchema
|
|
143953
144121
|
});
|
|
143954
144122
|
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
143955
|
-
model:
|
|
143956
|
-
stopReason:
|
|
144123
|
+
model: z55.string(),
|
|
144124
|
+
stopReason: z55.optional(z55.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z55.string())),
|
|
143957
144125
|
role: RoleSchema,
|
|
143958
|
-
content:
|
|
144126
|
+
content: z55.union([SamplingMessageContentBlockSchema, z55.array(SamplingMessageContentBlockSchema)])
|
|
143959
144127
|
});
|
|
143960
|
-
var BooleanSchemaSchema =
|
|
143961
|
-
type:
|
|
143962
|
-
title:
|
|
143963
|
-
description:
|
|
143964
|
-
default:
|
|
144128
|
+
var BooleanSchemaSchema = z55.object({
|
|
144129
|
+
type: z55.literal("boolean"),
|
|
144130
|
+
title: z55.string().optional(),
|
|
144131
|
+
description: z55.string().optional(),
|
|
144132
|
+
default: z55.boolean().optional()
|
|
143965
144133
|
});
|
|
143966
|
-
var StringSchemaSchema =
|
|
143967
|
-
type:
|
|
143968
|
-
title:
|
|
143969
|
-
description:
|
|
143970
|
-
minLength:
|
|
143971
|
-
maxLength:
|
|
143972
|
-
format:
|
|
143973
|
-
default:
|
|
144134
|
+
var StringSchemaSchema = z55.object({
|
|
144135
|
+
type: z55.literal("string"),
|
|
144136
|
+
title: z55.string().optional(),
|
|
144137
|
+
description: z55.string().optional(),
|
|
144138
|
+
minLength: z55.number().optional(),
|
|
144139
|
+
maxLength: z55.number().optional(),
|
|
144140
|
+
format: z55.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
144141
|
+
default: z55.string().optional()
|
|
143974
144142
|
});
|
|
143975
|
-
var NumberSchemaSchema =
|
|
143976
|
-
type:
|
|
143977
|
-
title:
|
|
143978
|
-
description:
|
|
143979
|
-
minimum:
|
|
143980
|
-
maximum:
|
|
143981
|
-
default:
|
|
144143
|
+
var NumberSchemaSchema = z55.object({
|
|
144144
|
+
type: z55.enum(["number", "integer"]),
|
|
144145
|
+
title: z55.string().optional(),
|
|
144146
|
+
description: z55.string().optional(),
|
|
144147
|
+
minimum: z55.number().optional(),
|
|
144148
|
+
maximum: z55.number().optional(),
|
|
144149
|
+
default: z55.number().optional()
|
|
143982
144150
|
});
|
|
143983
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
143984
|
-
type:
|
|
143985
|
-
title:
|
|
143986
|
-
description:
|
|
143987
|
-
enum:
|
|
143988
|
-
default:
|
|
144151
|
+
var UntitledSingleSelectEnumSchemaSchema = z55.object({
|
|
144152
|
+
type: z55.literal("string"),
|
|
144153
|
+
title: z55.string().optional(),
|
|
144154
|
+
description: z55.string().optional(),
|
|
144155
|
+
enum: z55.array(z55.string()),
|
|
144156
|
+
default: z55.string().optional()
|
|
143989
144157
|
});
|
|
143990
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
143991
|
-
type:
|
|
143992
|
-
title:
|
|
143993
|
-
description:
|
|
143994
|
-
oneOf:
|
|
143995
|
-
const:
|
|
143996
|
-
title:
|
|
144158
|
+
var TitledSingleSelectEnumSchemaSchema = z55.object({
|
|
144159
|
+
type: z55.literal("string"),
|
|
144160
|
+
title: z55.string().optional(),
|
|
144161
|
+
description: z55.string().optional(),
|
|
144162
|
+
oneOf: z55.array(z55.object({
|
|
144163
|
+
const: z55.string(),
|
|
144164
|
+
title: z55.string()
|
|
143997
144165
|
})),
|
|
143998
|
-
default:
|
|
144166
|
+
default: z55.string().optional()
|
|
143999
144167
|
});
|
|
144000
|
-
var LegacyTitledEnumSchemaSchema =
|
|
144001
|
-
type:
|
|
144002
|
-
title:
|
|
144003
|
-
description:
|
|
144004
|
-
enum:
|
|
144005
|
-
enumNames:
|
|
144006
|
-
default:
|
|
144168
|
+
var LegacyTitledEnumSchemaSchema = z55.object({
|
|
144169
|
+
type: z55.literal("string"),
|
|
144170
|
+
title: z55.string().optional(),
|
|
144171
|
+
description: z55.string().optional(),
|
|
144172
|
+
enum: z55.array(z55.string()),
|
|
144173
|
+
enumNames: z55.array(z55.string()).optional(),
|
|
144174
|
+
default: z55.string().optional()
|
|
144007
144175
|
});
|
|
144008
|
-
var SingleSelectEnumSchemaSchema =
|
|
144009
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
144010
|
-
type:
|
|
144011
|
-
title:
|
|
144012
|
-
description:
|
|
144013
|
-
minItems:
|
|
144014
|
-
maxItems:
|
|
144015
|
-
items:
|
|
144016
|
-
type:
|
|
144017
|
-
enum:
|
|
144176
|
+
var SingleSelectEnumSchemaSchema = z55.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
144177
|
+
var UntitledMultiSelectEnumSchemaSchema = z55.object({
|
|
144178
|
+
type: z55.literal("array"),
|
|
144179
|
+
title: z55.string().optional(),
|
|
144180
|
+
description: z55.string().optional(),
|
|
144181
|
+
minItems: z55.number().optional(),
|
|
144182
|
+
maxItems: z55.number().optional(),
|
|
144183
|
+
items: z55.object({
|
|
144184
|
+
type: z55.literal("string"),
|
|
144185
|
+
enum: z55.array(z55.string())
|
|
144018
144186
|
}),
|
|
144019
|
-
default:
|
|
144187
|
+
default: z55.array(z55.string()).optional()
|
|
144020
144188
|
});
|
|
144021
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
144022
|
-
type:
|
|
144023
|
-
title:
|
|
144024
|
-
description:
|
|
144025
|
-
minItems:
|
|
144026
|
-
maxItems:
|
|
144027
|
-
items:
|
|
144028
|
-
anyOf:
|
|
144029
|
-
const:
|
|
144030
|
-
title:
|
|
144189
|
+
var TitledMultiSelectEnumSchemaSchema = z55.object({
|
|
144190
|
+
type: z55.literal("array"),
|
|
144191
|
+
title: z55.string().optional(),
|
|
144192
|
+
description: z55.string().optional(),
|
|
144193
|
+
minItems: z55.number().optional(),
|
|
144194
|
+
maxItems: z55.number().optional(),
|
|
144195
|
+
items: z55.object({
|
|
144196
|
+
anyOf: z55.array(z55.object({
|
|
144197
|
+
const: z55.string(),
|
|
144198
|
+
title: z55.string()
|
|
144031
144199
|
}))
|
|
144032
144200
|
}),
|
|
144033
|
-
default:
|
|
144201
|
+
default: z55.array(z55.string()).optional()
|
|
144034
144202
|
});
|
|
144035
|
-
var MultiSelectEnumSchemaSchema =
|
|
144036
|
-
var EnumSchemaSchema =
|
|
144037
|
-
var PrimitiveSchemaDefinitionSchema =
|
|
144203
|
+
var MultiSelectEnumSchemaSchema = z55.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
144204
|
+
var EnumSchemaSchema = z55.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
144205
|
+
var PrimitiveSchemaDefinitionSchema = z55.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
144038
144206
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
144039
|
-
mode:
|
|
144040
|
-
message:
|
|
144041
|
-
requestedSchema:
|
|
144042
|
-
type:
|
|
144043
|
-
properties:
|
|
144044
|
-
required:
|
|
144207
|
+
mode: z55.literal("form").optional(),
|
|
144208
|
+
message: z55.string(),
|
|
144209
|
+
requestedSchema: z55.object({
|
|
144210
|
+
type: z55.literal("object"),
|
|
144211
|
+
properties: z55.record(z55.string(), PrimitiveSchemaDefinitionSchema),
|
|
144212
|
+
required: z55.array(z55.string()).optional()
|
|
144045
144213
|
})
|
|
144046
144214
|
});
|
|
144047
144215
|
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
144048
|
-
mode:
|
|
144049
|
-
message:
|
|
144050
|
-
elicitationId:
|
|
144051
|
-
url:
|
|
144216
|
+
mode: z55.literal("url"),
|
|
144217
|
+
message: z55.string(),
|
|
144218
|
+
elicitationId: z55.string(),
|
|
144219
|
+
url: z55.string().url()
|
|
144052
144220
|
});
|
|
144053
|
-
var ElicitRequestParamsSchema =
|
|
144221
|
+
var ElicitRequestParamsSchema = z55.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
144054
144222
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
144055
|
-
method:
|
|
144223
|
+
method: z55.literal("elicitation/create"),
|
|
144056
144224
|
params: ElicitRequestParamsSchema
|
|
144057
144225
|
});
|
|
144058
144226
|
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
144059
|
-
elicitationId:
|
|
144227
|
+
elicitationId: z55.string()
|
|
144060
144228
|
});
|
|
144061
144229
|
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
144062
|
-
method:
|
|
144230
|
+
method: z55.literal("notifications/elicitation/complete"),
|
|
144063
144231
|
params: ElicitationCompleteNotificationParamsSchema
|
|
144064
144232
|
});
|
|
144065
144233
|
var ElicitResultSchema = ResultSchema.extend({
|
|
144066
|
-
action:
|
|
144067
|
-
content:
|
|
144234
|
+
action: z55.enum(["accept", "decline", "cancel"]),
|
|
144235
|
+
content: z55.preprocess((val) => val === null ? undefined : val, z55.record(z55.string(), z55.union([z55.string(), z55.number(), z55.boolean(), z55.array(z55.string())])).optional())
|
|
144068
144236
|
});
|
|
144069
|
-
var ResourceTemplateReferenceSchema =
|
|
144070
|
-
type:
|
|
144071
|
-
uri:
|
|
144237
|
+
var ResourceTemplateReferenceSchema = z55.object({
|
|
144238
|
+
type: z55.literal("ref/resource"),
|
|
144239
|
+
uri: z55.string()
|
|
144072
144240
|
});
|
|
144073
|
-
var PromptReferenceSchema =
|
|
144074
|
-
type:
|
|
144075
|
-
name:
|
|
144241
|
+
var PromptReferenceSchema = z55.object({
|
|
144242
|
+
type: z55.literal("ref/prompt"),
|
|
144243
|
+
name: z55.string()
|
|
144076
144244
|
});
|
|
144077
144245
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
144078
|
-
ref:
|
|
144079
|
-
argument:
|
|
144080
|
-
name:
|
|
144081
|
-
value:
|
|
144246
|
+
ref: z55.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
144247
|
+
argument: z55.object({
|
|
144248
|
+
name: z55.string(),
|
|
144249
|
+
value: z55.string()
|
|
144082
144250
|
}),
|
|
144083
|
-
context:
|
|
144084
|
-
arguments:
|
|
144251
|
+
context: z55.object({
|
|
144252
|
+
arguments: z55.record(z55.string(), z55.string()).optional()
|
|
144085
144253
|
}).optional()
|
|
144086
144254
|
});
|
|
144087
144255
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
144088
|
-
method:
|
|
144256
|
+
method: z55.literal("completion/complete"),
|
|
144089
144257
|
params: CompleteRequestParamsSchema
|
|
144090
144258
|
});
|
|
144091
144259
|
var CompleteResultSchema = ResultSchema.extend({
|
|
144092
|
-
completion:
|
|
144093
|
-
values:
|
|
144094
|
-
total:
|
|
144095
|
-
hasMore:
|
|
144260
|
+
completion: z55.looseObject({
|
|
144261
|
+
values: z55.array(z55.string()).max(100),
|
|
144262
|
+
total: z55.optional(z55.number().int()),
|
|
144263
|
+
hasMore: z55.optional(z55.boolean())
|
|
144096
144264
|
})
|
|
144097
144265
|
});
|
|
144098
|
-
var RootSchema =
|
|
144099
|
-
uri:
|
|
144100
|
-
name:
|
|
144101
|
-
_meta:
|
|
144266
|
+
var RootSchema = z55.object({
|
|
144267
|
+
uri: z55.string().startsWith("file://"),
|
|
144268
|
+
name: z55.string().optional(),
|
|
144269
|
+
_meta: z55.record(z55.string(), z55.unknown()).optional()
|
|
144102
144270
|
});
|
|
144103
144271
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
144104
|
-
method:
|
|
144272
|
+
method: z55.literal("roots/list"),
|
|
144105
144273
|
params: BaseRequestParamsSchema.optional()
|
|
144106
144274
|
});
|
|
144107
144275
|
var ListRootsResultSchema = ResultSchema.extend({
|
|
144108
|
-
roots:
|
|
144276
|
+
roots: z55.array(RootSchema)
|
|
144109
144277
|
});
|
|
144110
144278
|
var RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
144111
|
-
method:
|
|
144279
|
+
method: z55.literal("notifications/roots/list_changed"),
|
|
144112
144280
|
params: NotificationsParamsSchema.optional()
|
|
144113
144281
|
});
|
|
144114
|
-
var ClientRequestSchema =
|
|
144282
|
+
var ClientRequestSchema = z55.union([
|
|
144115
144283
|
PingRequestSchema,
|
|
144116
144284
|
InitializeRequestSchema,
|
|
144117
144285
|
CompleteRequestSchema,
|
|
@@ -144130,14 +144298,14 @@ var ClientRequestSchema = z54.union([
|
|
|
144130
144298
|
ListTasksRequestSchema,
|
|
144131
144299
|
CancelTaskRequestSchema
|
|
144132
144300
|
]);
|
|
144133
|
-
var ClientNotificationSchema =
|
|
144301
|
+
var ClientNotificationSchema = z55.union([
|
|
144134
144302
|
CancelledNotificationSchema,
|
|
144135
144303
|
ProgressNotificationSchema,
|
|
144136
144304
|
InitializedNotificationSchema,
|
|
144137
144305
|
RootsListChangedNotificationSchema,
|
|
144138
144306
|
TaskStatusNotificationSchema
|
|
144139
144307
|
]);
|
|
144140
|
-
var ClientResultSchema =
|
|
144308
|
+
var ClientResultSchema = z55.union([
|
|
144141
144309
|
EmptyResultSchema,
|
|
144142
144310
|
CreateMessageResultSchema,
|
|
144143
144311
|
CreateMessageResultWithToolsSchema,
|
|
@@ -144147,7 +144315,7 @@ var ClientResultSchema = z54.union([
|
|
|
144147
144315
|
ListTasksResultSchema,
|
|
144148
144316
|
CreateTaskResultSchema
|
|
144149
144317
|
]);
|
|
144150
|
-
var ServerRequestSchema =
|
|
144318
|
+
var ServerRequestSchema = z55.union([
|
|
144151
144319
|
PingRequestSchema,
|
|
144152
144320
|
CreateMessageRequestSchema,
|
|
144153
144321
|
ElicitRequestSchema,
|
|
@@ -144157,7 +144325,7 @@ var ServerRequestSchema = z54.union([
|
|
|
144157
144325
|
ListTasksRequestSchema,
|
|
144158
144326
|
CancelTaskRequestSchema
|
|
144159
144327
|
]);
|
|
144160
|
-
var ServerNotificationSchema =
|
|
144328
|
+
var ServerNotificationSchema = z55.union([
|
|
144161
144329
|
CancelledNotificationSchema,
|
|
144162
144330
|
ProgressNotificationSchema,
|
|
144163
144331
|
LoggingMessageNotificationSchema,
|
|
@@ -144168,7 +144336,7 @@ var ServerNotificationSchema = z54.union([
|
|
|
144168
144336
|
TaskStatusNotificationSchema,
|
|
144169
144337
|
ElicitationCompleteNotificationSchema
|
|
144170
144338
|
]);
|
|
144171
|
-
var ServerResultSchema =
|
|
144339
|
+
var ServerResultSchema = z55.union([
|
|
144172
144340
|
EmptyResultSchema,
|
|
144173
144341
|
InitializeResultSchema,
|
|
144174
144342
|
CompleteResultSchema,
|
|
@@ -145780,149 +145948,149 @@ async function pkceChallenge(length) {
|
|
|
145780
145948
|
}
|
|
145781
145949
|
|
|
145782
145950
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
145783
|
-
import * as
|
|
145784
|
-
var SafeUrlSchema =
|
|
145951
|
+
import * as z56 from "zod/v4";
|
|
145952
|
+
var SafeUrlSchema = z56.url().superRefine((val, ctx) => {
|
|
145785
145953
|
if (!URL.canParse(val)) {
|
|
145786
145954
|
ctx.addIssue({
|
|
145787
|
-
code:
|
|
145955
|
+
code: z56.ZodIssueCode.custom,
|
|
145788
145956
|
message: "URL must be parseable",
|
|
145789
145957
|
fatal: true
|
|
145790
145958
|
});
|
|
145791
|
-
return
|
|
145959
|
+
return z56.NEVER;
|
|
145792
145960
|
}
|
|
145793
145961
|
}).refine((url2) => {
|
|
145794
145962
|
const u = new URL(url2);
|
|
145795
145963
|
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
145796
145964
|
}, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
|
|
145797
|
-
var OAuthProtectedResourceMetadataSchema =
|
|
145798
|
-
resource:
|
|
145799
|
-
authorization_servers:
|
|
145800
|
-
jwks_uri:
|
|
145801
|
-
scopes_supported:
|
|
145802
|
-
bearer_methods_supported:
|
|
145803
|
-
resource_signing_alg_values_supported:
|
|
145804
|
-
resource_name:
|
|
145805
|
-
resource_documentation:
|
|
145806
|
-
resource_policy_uri:
|
|
145807
|
-
resource_tos_uri:
|
|
145808
|
-
tls_client_certificate_bound_access_tokens:
|
|
145809
|
-
authorization_details_types_supported:
|
|
145810
|
-
dpop_signing_alg_values_supported:
|
|
145811
|
-
dpop_bound_access_tokens_required:
|
|
145965
|
+
var OAuthProtectedResourceMetadataSchema = z56.looseObject({
|
|
145966
|
+
resource: z56.string().url(),
|
|
145967
|
+
authorization_servers: z56.array(SafeUrlSchema).optional(),
|
|
145968
|
+
jwks_uri: z56.string().url().optional(),
|
|
145969
|
+
scopes_supported: z56.array(z56.string()).optional(),
|
|
145970
|
+
bearer_methods_supported: z56.array(z56.string()).optional(),
|
|
145971
|
+
resource_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
145972
|
+
resource_name: z56.string().optional(),
|
|
145973
|
+
resource_documentation: z56.string().optional(),
|
|
145974
|
+
resource_policy_uri: z56.string().url().optional(),
|
|
145975
|
+
resource_tos_uri: z56.string().url().optional(),
|
|
145976
|
+
tls_client_certificate_bound_access_tokens: z56.boolean().optional(),
|
|
145977
|
+
authorization_details_types_supported: z56.array(z56.string()).optional(),
|
|
145978
|
+
dpop_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
145979
|
+
dpop_bound_access_tokens_required: z56.boolean().optional()
|
|
145812
145980
|
});
|
|
145813
|
-
var OAuthMetadataSchema =
|
|
145814
|
-
issuer:
|
|
145981
|
+
var OAuthMetadataSchema = z56.looseObject({
|
|
145982
|
+
issuer: z56.string(),
|
|
145815
145983
|
authorization_endpoint: SafeUrlSchema,
|
|
145816
145984
|
token_endpoint: SafeUrlSchema,
|
|
145817
145985
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
145818
|
-
scopes_supported:
|
|
145819
|
-
response_types_supported:
|
|
145820
|
-
response_modes_supported:
|
|
145821
|
-
grant_types_supported:
|
|
145822
|
-
token_endpoint_auth_methods_supported:
|
|
145823
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
145986
|
+
scopes_supported: z56.array(z56.string()).optional(),
|
|
145987
|
+
response_types_supported: z56.array(z56.string()),
|
|
145988
|
+
response_modes_supported: z56.array(z56.string()).optional(),
|
|
145989
|
+
grant_types_supported: z56.array(z56.string()).optional(),
|
|
145990
|
+
token_endpoint_auth_methods_supported: z56.array(z56.string()).optional(),
|
|
145991
|
+
token_endpoint_auth_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
145824
145992
|
service_documentation: SafeUrlSchema.optional(),
|
|
145825
145993
|
revocation_endpoint: SafeUrlSchema.optional(),
|
|
145826
|
-
revocation_endpoint_auth_methods_supported:
|
|
145827
|
-
revocation_endpoint_auth_signing_alg_values_supported:
|
|
145828
|
-
introspection_endpoint:
|
|
145829
|
-
introspection_endpoint_auth_methods_supported:
|
|
145830
|
-
introspection_endpoint_auth_signing_alg_values_supported:
|
|
145831
|
-
code_challenge_methods_supported:
|
|
145832
|
-
client_id_metadata_document_supported:
|
|
145994
|
+
revocation_endpoint_auth_methods_supported: z56.array(z56.string()).optional(),
|
|
145995
|
+
revocation_endpoint_auth_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
145996
|
+
introspection_endpoint: z56.string().optional(),
|
|
145997
|
+
introspection_endpoint_auth_methods_supported: z56.array(z56.string()).optional(),
|
|
145998
|
+
introspection_endpoint_auth_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
145999
|
+
code_challenge_methods_supported: z56.array(z56.string()).optional(),
|
|
146000
|
+
client_id_metadata_document_supported: z56.boolean().optional()
|
|
145833
146001
|
});
|
|
145834
|
-
var OpenIdProviderMetadataSchema =
|
|
145835
|
-
issuer:
|
|
146002
|
+
var OpenIdProviderMetadataSchema = z56.looseObject({
|
|
146003
|
+
issuer: z56.string(),
|
|
145836
146004
|
authorization_endpoint: SafeUrlSchema,
|
|
145837
146005
|
token_endpoint: SafeUrlSchema,
|
|
145838
146006
|
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
145839
146007
|
jwks_uri: SafeUrlSchema,
|
|
145840
146008
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
145841
|
-
scopes_supported:
|
|
145842
|
-
response_types_supported:
|
|
145843
|
-
response_modes_supported:
|
|
145844
|
-
grant_types_supported:
|
|
145845
|
-
acr_values_supported:
|
|
145846
|
-
subject_types_supported:
|
|
145847
|
-
id_token_signing_alg_values_supported:
|
|
145848
|
-
id_token_encryption_alg_values_supported:
|
|
145849
|
-
id_token_encryption_enc_values_supported:
|
|
145850
|
-
userinfo_signing_alg_values_supported:
|
|
145851
|
-
userinfo_encryption_alg_values_supported:
|
|
145852
|
-
userinfo_encryption_enc_values_supported:
|
|
145853
|
-
request_object_signing_alg_values_supported:
|
|
145854
|
-
request_object_encryption_alg_values_supported:
|
|
145855
|
-
request_object_encryption_enc_values_supported:
|
|
145856
|
-
token_endpoint_auth_methods_supported:
|
|
145857
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
145858
|
-
display_values_supported:
|
|
145859
|
-
claim_types_supported:
|
|
145860
|
-
claims_supported:
|
|
145861
|
-
service_documentation:
|
|
145862
|
-
claims_locales_supported:
|
|
145863
|
-
ui_locales_supported:
|
|
145864
|
-
claims_parameter_supported:
|
|
145865
|
-
request_parameter_supported:
|
|
145866
|
-
request_uri_parameter_supported:
|
|
145867
|
-
require_request_uri_registration:
|
|
146009
|
+
scopes_supported: z56.array(z56.string()).optional(),
|
|
146010
|
+
response_types_supported: z56.array(z56.string()),
|
|
146011
|
+
response_modes_supported: z56.array(z56.string()).optional(),
|
|
146012
|
+
grant_types_supported: z56.array(z56.string()).optional(),
|
|
146013
|
+
acr_values_supported: z56.array(z56.string()).optional(),
|
|
146014
|
+
subject_types_supported: z56.array(z56.string()),
|
|
146015
|
+
id_token_signing_alg_values_supported: z56.array(z56.string()),
|
|
146016
|
+
id_token_encryption_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146017
|
+
id_token_encryption_enc_values_supported: z56.array(z56.string()).optional(),
|
|
146018
|
+
userinfo_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146019
|
+
userinfo_encryption_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146020
|
+
userinfo_encryption_enc_values_supported: z56.array(z56.string()).optional(),
|
|
146021
|
+
request_object_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146022
|
+
request_object_encryption_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146023
|
+
request_object_encryption_enc_values_supported: z56.array(z56.string()).optional(),
|
|
146024
|
+
token_endpoint_auth_methods_supported: z56.array(z56.string()).optional(),
|
|
146025
|
+
token_endpoint_auth_signing_alg_values_supported: z56.array(z56.string()).optional(),
|
|
146026
|
+
display_values_supported: z56.array(z56.string()).optional(),
|
|
146027
|
+
claim_types_supported: z56.array(z56.string()).optional(),
|
|
146028
|
+
claims_supported: z56.array(z56.string()).optional(),
|
|
146029
|
+
service_documentation: z56.string().optional(),
|
|
146030
|
+
claims_locales_supported: z56.array(z56.string()).optional(),
|
|
146031
|
+
ui_locales_supported: z56.array(z56.string()).optional(),
|
|
146032
|
+
claims_parameter_supported: z56.boolean().optional(),
|
|
146033
|
+
request_parameter_supported: z56.boolean().optional(),
|
|
146034
|
+
request_uri_parameter_supported: z56.boolean().optional(),
|
|
146035
|
+
require_request_uri_registration: z56.boolean().optional(),
|
|
145868
146036
|
op_policy_uri: SafeUrlSchema.optional(),
|
|
145869
146037
|
op_tos_uri: SafeUrlSchema.optional(),
|
|
145870
|
-
client_id_metadata_document_supported:
|
|
146038
|
+
client_id_metadata_document_supported: z56.boolean().optional()
|
|
145871
146039
|
});
|
|
145872
|
-
var OpenIdProviderDiscoveryMetadataSchema =
|
|
146040
|
+
var OpenIdProviderDiscoveryMetadataSchema = z56.object({
|
|
145873
146041
|
...OpenIdProviderMetadataSchema.shape,
|
|
145874
146042
|
...OAuthMetadataSchema.pick({
|
|
145875
146043
|
code_challenge_methods_supported: true
|
|
145876
146044
|
}).shape
|
|
145877
146045
|
});
|
|
145878
|
-
var OAuthTokensSchema =
|
|
145879
|
-
access_token:
|
|
145880
|
-
id_token:
|
|
145881
|
-
token_type:
|
|
145882
|
-
expires_in:
|
|
145883
|
-
scope:
|
|
145884
|
-
refresh_token:
|
|
146046
|
+
var OAuthTokensSchema = z56.object({
|
|
146047
|
+
access_token: z56.string(),
|
|
146048
|
+
id_token: z56.string().optional(),
|
|
146049
|
+
token_type: z56.string(),
|
|
146050
|
+
expires_in: z56.coerce.number().optional(),
|
|
146051
|
+
scope: z56.string().optional(),
|
|
146052
|
+
refresh_token: z56.string().optional()
|
|
145885
146053
|
}).strip();
|
|
145886
|
-
var OAuthErrorResponseSchema =
|
|
145887
|
-
error:
|
|
145888
|
-
error_description:
|
|
145889
|
-
error_uri:
|
|
146054
|
+
var OAuthErrorResponseSchema = z56.object({
|
|
146055
|
+
error: z56.string(),
|
|
146056
|
+
error_description: z56.string().optional(),
|
|
146057
|
+
error_uri: z56.string().optional()
|
|
145890
146058
|
});
|
|
145891
|
-
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(
|
|
146059
|
+
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z56.literal("").transform(() => {
|
|
145892
146060
|
return;
|
|
145893
146061
|
}));
|
|
145894
|
-
var OAuthClientMetadataSchema =
|
|
145895
|
-
redirect_uris:
|
|
145896
|
-
token_endpoint_auth_method:
|
|
145897
|
-
grant_types:
|
|
145898
|
-
response_types:
|
|
145899
|
-
client_name:
|
|
146062
|
+
var OAuthClientMetadataSchema = z56.object({
|
|
146063
|
+
redirect_uris: z56.array(SafeUrlSchema),
|
|
146064
|
+
token_endpoint_auth_method: z56.string().optional(),
|
|
146065
|
+
grant_types: z56.array(z56.string()).optional(),
|
|
146066
|
+
response_types: z56.array(z56.string()).optional(),
|
|
146067
|
+
client_name: z56.string().optional(),
|
|
145900
146068
|
client_uri: SafeUrlSchema.optional(),
|
|
145901
146069
|
logo_uri: OptionalSafeUrlSchema,
|
|
145902
|
-
scope:
|
|
145903
|
-
contacts:
|
|
146070
|
+
scope: z56.string().optional(),
|
|
146071
|
+
contacts: z56.array(z56.string()).optional(),
|
|
145904
146072
|
tos_uri: OptionalSafeUrlSchema,
|
|
145905
|
-
policy_uri:
|
|
146073
|
+
policy_uri: z56.string().optional(),
|
|
145906
146074
|
jwks_uri: SafeUrlSchema.optional(),
|
|
145907
|
-
jwks:
|
|
145908
|
-
software_id:
|
|
145909
|
-
software_version:
|
|
145910
|
-
software_statement:
|
|
146075
|
+
jwks: z56.any().optional(),
|
|
146076
|
+
software_id: z56.string().optional(),
|
|
146077
|
+
software_version: z56.string().optional(),
|
|
146078
|
+
software_statement: z56.string().optional()
|
|
145911
146079
|
}).strip();
|
|
145912
|
-
var OAuthClientInformationSchema =
|
|
145913
|
-
client_id:
|
|
145914
|
-
client_secret:
|
|
145915
|
-
client_id_issued_at:
|
|
145916
|
-
client_secret_expires_at:
|
|
146080
|
+
var OAuthClientInformationSchema = z56.object({
|
|
146081
|
+
client_id: z56.string(),
|
|
146082
|
+
client_secret: z56.string().optional(),
|
|
146083
|
+
client_id_issued_at: z56.number().optional(),
|
|
146084
|
+
client_secret_expires_at: z56.number().optional()
|
|
145917
146085
|
}).strip();
|
|
145918
146086
|
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
145919
|
-
var OAuthClientRegistrationErrorSchema =
|
|
145920
|
-
error:
|
|
145921
|
-
error_description:
|
|
146087
|
+
var OAuthClientRegistrationErrorSchema = z56.object({
|
|
146088
|
+
error: z56.string(),
|
|
146089
|
+
error_description: z56.string().optional()
|
|
145922
146090
|
}).strip();
|
|
145923
|
-
var OAuthTokenRevocationRequestSchema =
|
|
145924
|
-
token:
|
|
145925
|
-
token_type_hint:
|
|
146091
|
+
var OAuthTokenRevocationRequestSchema = z56.object({
|
|
146092
|
+
token: z56.string(),
|
|
146093
|
+
token_type_hint: z56.string().optional()
|
|
145926
146094
|
}).strip();
|
|
145927
146095
|
|
|
145928
146096
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
@@ -148134,7 +148302,7 @@ function mirrorFilePath(projectDir) {
|
|
|
148134
148302
|
}
|
|
148135
148303
|
|
|
148136
148304
|
// packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
|
|
148137
|
-
import { z as
|
|
148305
|
+
import { z as z57 } from "zod";
|
|
148138
148306
|
var AGENT_STATUS_VALUES = [
|
|
148139
148307
|
"busy",
|
|
148140
148308
|
"idle",
|
|
@@ -148150,32 +148318,32 @@ var BACKGROUND_TASK_STATUS_VALUES = [
|
|
|
148150
148318
|
"cancelled",
|
|
148151
148319
|
"interrupt"
|
|
148152
148320
|
];
|
|
148153
|
-
var AgentRowSchema =
|
|
148154
|
-
name:
|
|
148155
|
-
status:
|
|
148321
|
+
var AgentRowSchema = z57.object({
|
|
148322
|
+
name: z57.string(),
|
|
148323
|
+
status: z57.enum(AGENT_STATUS_VALUES)
|
|
148156
148324
|
});
|
|
148157
|
-
var JobRowSchema =
|
|
148158
|
-
title:
|
|
148159
|
-
status:
|
|
148160
|
-
toolCalls:
|
|
148161
|
-
lastTool:
|
|
148325
|
+
var JobRowSchema = z57.object({
|
|
148326
|
+
title: z57.string(),
|
|
148327
|
+
status: z57.enum(BACKGROUND_TASK_STATUS_VALUES),
|
|
148328
|
+
toolCalls: z57.number().int().nonnegative().nullable(),
|
|
148329
|
+
lastTool: z57.string().nullable()
|
|
148162
148330
|
});
|
|
148163
|
-
var LoopLiveSchema =
|
|
148164
|
-
kind:
|
|
148165
|
-
goalsDone:
|
|
148166
|
-
goalsTotal:
|
|
148167
|
-
pass:
|
|
148168
|
-
fail:
|
|
148169
|
-
pending:
|
|
148170
|
-
blocked:
|
|
148171
|
-
activeGoal:
|
|
148331
|
+
var LoopLiveSchema = z57.object({
|
|
148332
|
+
kind: z57.literal("live"),
|
|
148333
|
+
goalsDone: z57.number().int().nonnegative(),
|
|
148334
|
+
goalsTotal: z57.number().int().nonnegative(),
|
|
148335
|
+
pass: z57.number().int().nonnegative(),
|
|
148336
|
+
fail: z57.number().int().nonnegative(),
|
|
148337
|
+
pending: z57.number().int().nonnegative(),
|
|
148338
|
+
blocked: z57.number().int().nonnegative(),
|
|
148339
|
+
activeGoal: z57.string().nullable()
|
|
148172
148340
|
});
|
|
148173
|
-
var TuiRuntimeSnapshotSchema =
|
|
148174
|
-
version:
|
|
148175
|
-
projectDir:
|
|
148176
|
-
updatedAt:
|
|
148177
|
-
activeAgents:
|
|
148178
|
-
jobBoard:
|
|
148341
|
+
var TuiRuntimeSnapshotSchema = z57.object({
|
|
148342
|
+
version: z57.literal(MIRROR_SCHEMA_VERSION),
|
|
148343
|
+
projectDir: z57.string(),
|
|
148344
|
+
updatedAt: z57.number(),
|
|
148345
|
+
activeAgents: z57.array(AgentRowSchema),
|
|
148346
|
+
jobBoard: z57.array(JobRowSchema),
|
|
148179
148347
|
loop: LoopLiveSchema.nullable()
|
|
148180
148348
|
});
|
|
148181
148349
|
|
|
@@ -148190,25 +148358,25 @@ function writeMirror(projectDir, snapshot) {
|
|
|
148190
148358
|
// packages/omo-opencode/src/features/tui-sidebar/loop-reader.ts
|
|
148191
148359
|
import { readdirSync as readdirSync32, readFileSync as readFileSync71, statSync as statSync14 } from "fs";
|
|
148192
148360
|
import { join as join137 } from "path";
|
|
148193
|
-
import { z as
|
|
148194
|
-
var CriterionSchema =
|
|
148195
|
-
status:
|
|
148361
|
+
import { z as z58 } from "zod";
|
|
148362
|
+
var CriterionSchema = z58.object({
|
|
148363
|
+
status: z58.string()
|
|
148196
148364
|
});
|
|
148197
|
-
var GoalBaseSchema =
|
|
148198
|
-
id:
|
|
148199
|
-
title:
|
|
148200
|
-
status:
|
|
148365
|
+
var GoalBaseSchema = z58.object({
|
|
148366
|
+
id: z58.string(),
|
|
148367
|
+
title: z58.string(),
|
|
148368
|
+
status: z58.string()
|
|
148201
148369
|
});
|
|
148202
|
-
var CurrentLoopSchema =
|
|
148203
|
-
version:
|
|
148204
|
-
activeGoalId:
|
|
148205
|
-
goals:
|
|
148206
|
-
successCriteria:
|
|
148370
|
+
var CurrentLoopSchema = z58.object({
|
|
148371
|
+
version: z58.literal(1),
|
|
148372
|
+
activeGoalId: z58.string().optional(),
|
|
148373
|
+
goals: z58.array(GoalBaseSchema.extend({
|
|
148374
|
+
successCriteria: z58.array(CriterionSchema)
|
|
148207
148375
|
}))
|
|
148208
148376
|
});
|
|
148209
|
-
var LegacyLoopSchema =
|
|
148210
|
-
goals:
|
|
148211
|
-
criteria:
|
|
148377
|
+
var LegacyLoopSchema = z58.object({
|
|
148378
|
+
goals: z58.array(GoalBaseSchema.extend({
|
|
148379
|
+
criteria: z58.array(CriterionSchema)
|
|
148212
148380
|
}))
|
|
148213
148381
|
});
|
|
148214
148382
|
function readActiveLoop(projectDir) {
|
|
@@ -152812,6 +152980,12 @@ function buildGptSisyphusAgentConfig(mode, model, prompt) {
|
|
|
152812
152980
|
function buildGlmSisyphusAgentConfig(mode, model, prompt) {
|
|
152813
152981
|
return buildBaseSisyphusAgentConfig(mode, model, prompt);
|
|
152814
152982
|
}
|
|
152983
|
+
function buildGrokSisyphusAgentConfig(mode, model, prompt) {
|
|
152984
|
+
return {
|
|
152985
|
+
...buildBaseSisyphusAgentConfig(mode, model, prompt),
|
|
152986
|
+
reasoningEffort: "high"
|
|
152987
|
+
};
|
|
152988
|
+
}
|
|
152815
152989
|
function buildClaudeSisyphusAgentConfig(mode, model, prompt) {
|
|
152816
152990
|
return {
|
|
152817
152991
|
...buildBaseSisyphusAgentConfig(mode, model, prompt),
|
|
@@ -156181,6 +156355,158 @@ function buildGpt55SisyphusPrompt(model, availableAgents, _availableTools = [],
|
|
|
156181
156355
|
${body}`;
|
|
156182
156356
|
}
|
|
156183
156357
|
|
|
156358
|
+
// packages/omo-opencode/src/agents/sisyphus/grok-4.ts
|
|
156359
|
+
function getGrokPromptIdentity(model) {
|
|
156360
|
+
return isGrok46Model(model) ? "Grok 4.6" : "Grok 4.5";
|
|
156361
|
+
}
|
|
156362
|
+
function buildGrok4TasksSection(useTaskSystem) {
|
|
156363
|
+
const noun = useTaskSystem ? "tasks" : "todos";
|
|
156364
|
+
const create = useTaskSystem ? "task_create" : "todowrite";
|
|
156365
|
+
const update = useTaskSystem ? "task_update" : "todowrite";
|
|
156366
|
+
const hook = useTaskSystem ? "TASK CONTINUATION" : "TODO CONTINUATION";
|
|
156367
|
+
return `<tasks>
|
|
156368
|
+
Use ${noun} for implementation work with two or more real steps, cross-file edits, delegated work, or uncertain scope. Skip tracking for direct answers, pure exploration, and one-step edits.
|
|
156369
|
+
|
|
156370
|
+
When tracking: call \`${create}\` before implementation, keep exactly one item \`in_progress\`, and call \`${update}\` the moment an item is done. Never batch completions. If scope changes, revise the list before more edits.
|
|
156371
|
+
|
|
156372
|
+
Your ${noun} are tracked by the harness via [SYSTEM REMINDER - ${hook}].
|
|
156373
|
+
</tasks>`;
|
|
156374
|
+
}
|
|
156375
|
+
function buildGrok4SisyphusPrompt(model, availableAgents, availableTools = [], availableSkills = [], availableCategories = [], useTaskSystem = false) {
|
|
156376
|
+
const keyTriggers = buildKeyTriggersSection(availableAgents, availableSkills);
|
|
156377
|
+
const toolSelection = buildToolSelectionTable(availableAgents, availableTools, availableSkills);
|
|
156378
|
+
const exploreSection = buildExploreSection(availableAgents);
|
|
156379
|
+
const librarianSection = buildLibrarianSection(availableAgents);
|
|
156380
|
+
const categorySkillsGuide = buildCategorySkillsDelegationGuide(availableCategories, availableSkills);
|
|
156381
|
+
const delegationTable = buildDelegationTable(availableAgents);
|
|
156382
|
+
const oracleSection = buildOracleSection(availableAgents);
|
|
156383
|
+
const hardBlocks = buildHardBlocksSection();
|
|
156384
|
+
const antiPatterns = buildAntiPatternsSection();
|
|
156385
|
+
const nonClaudePlannerSection = buildNonClaudePlannerSection(model);
|
|
156386
|
+
const tasksSection = buildGrok4TasksSection(useTaskSystem);
|
|
156387
|
+
const agentIdentity = buildAgentIdentitySection("Sisyphus", "Powerful AI Agent with orchestration capabilities from OhMyOpenCode");
|
|
156388
|
+
const roleBlock = `<role>
|
|
156389
|
+
You are Sisyphus, the OhMyOpenCode orchestration lead, running on ${getGrokPromptIdentity(model)}.
|
|
156390
|
+
|
|
156391
|
+
You are a senior engineer who scales output through specialists. Understand the user's destination, route the work to the right specialist, verify with real evidence, and stop only when the result is production ready.
|
|
156392
|
+
|
|
156393
|
+
Implementation starts only when the current user turn explicitly asks for it with concrete scope. Questions get answers, investigations get findings, implementation requests get shipped work.
|
|
156394
|
+
</role>`;
|
|
156395
|
+
const calibrationBlock = `<grok_calibration>
|
|
156396
|
+
Your judgment is good; this prompt stays short on purpose and trusts you to fill gaps with taste. Four rules carry the leverage:
|
|
156397
|
+
|
|
156398
|
+
1. DONE IS WRITTEN DOWN. Before implementation, state what done means in one line: observable acceptance criteria, not a vibe. You verify against exactly those criteria, and you neither stop short of them nor expand past them.
|
|
156399
|
+
2. VERIFY, THEN ITERATE. Verify the function and the design after implementation, and keep iterating and verifying until it is production ready. One pass of "it runs" is not done.
|
|
156400
|
+
3. CAPTURE, LIST, FIX. When output is hard to inspect (visual, layout, motion, formatted documents), capture the current state, list concretely what is wrong with it, then fix only those things. Never "improve" blind.
|
|
156401
|
+
4. NO REPEATED BLOCKS. You tend to duplicate code across components. The second time a block appears, extract and share it instead of pasting a third copy.
|
|
156402
|
+
</grok_calibration>`;
|
|
156403
|
+
const intentBlock = `<intent>
|
|
156404
|
+
Classify the CURRENT user message only. Do not carry implementation authorization across turns.
|
|
156405
|
+
|
|
156406
|
+
${keyTriggers}
|
|
156407
|
+
|
|
156408
|
+
Surface form to routing:
|
|
156409
|
+
|
|
156410
|
+
| User says | True intent | You do |
|
|
156411
|
+
|---|---|---|
|
|
156412
|
+
| "explain", "how does" | understanding | explore enough, then answer |
|
|
156413
|
+
| "implement", "add", "create", "write" | implementation | plan, delegate or execute, verify |
|
|
156414
|
+
| "look into", "check", "investigate" | investigation | inspect, report findings, wait |
|
|
156415
|
+
| "what do you think" | evaluation | judge, propose, wait |
|
|
156416
|
+
| "broken", "error", "fix" | root-cause repair | diagnose, fix minimally, verify |
|
|
156417
|
+
| "refactor", "improve", "clean up" | open-ended change | assess, propose or use the matching skill |
|
|
156418
|
+
|
|
156419
|
+
Say one concise intent line before non-trivial action: "I read this as [type]: [route]." If the answer is already in context, answer instead of re-deriving.
|
|
156420
|
+
|
|
156421
|
+
Ask only for scope changes, critical missing information, destructive actions, or external side effects. Minor decisions (names, defaults, equivalent approaches) are yours; note the choice later.
|
|
156422
|
+
</intent>`;
|
|
156423
|
+
const explorationBlock = `<exploration>
|
|
156424
|
+
Use tools for facts. Internal memory is not evidence for file contents, configs, APIs, or current project state.
|
|
156425
|
+
|
|
156426
|
+
${toolSelection}
|
|
156427
|
+
|
|
156428
|
+
${exploreSection}
|
|
156429
|
+
|
|
156430
|
+
${librarianSection}
|
|
156431
|
+
|
|
156432
|
+
Parallelize independent calls: file reads, searches, diagnostics, and background agents go out together. Sequence only when a later call needs an earlier result.
|
|
156433
|
+
|
|
156434
|
+
Search budget: known file or symbol = direct read/search; unfamiliar local pattern = one parallel wave; external package or API = librarian; architectural risk = Oracle. Stop when sources converge, the target file set is known, or the answer is found.
|
|
156435
|
+
|
|
156436
|
+
Fire explore/librarian in the background with [CONTEXT], [GOAL], [DOWNSTREAM], and [REQUEST]. Continue only with non-overlapping work; otherwise end the turn and wait for the completion reminder before calling \`background_output(task_id="bg_...")\`. Use \`task(task_id="ses_...")\` only for follow-ups to the same subagent.
|
|
156437
|
+
|
|
156438
|
+
${buildAntiDuplicationSection()}
|
|
156439
|
+
</exploration>`;
|
|
156440
|
+
const delegationBlock = `<delegation>
|
|
156441
|
+
Prefer delegation when a specialist fits, the work spans multiple files, the domain is visual/frontend/security/performance, or the module is unfamiliar. Execute directly only for small, local, fully understood changes.
|
|
156442
|
+
|
|
156443
|
+
${categorySkillsGuide}
|
|
156444
|
+
|
|
156445
|
+
${nonClaudePlannerSection}
|
|
156446
|
+
|
|
156447
|
+
${delegationTable}
|
|
156448
|
+
|
|
156449
|
+
Every delegation prompt carries six sections: TASK, EXPECTED OUTCOME, REQUIRED TOOLS, MUST DO, MUST NOT DO, CONTEXT. The EXPECTED OUTCOME is the delegate's definition of done - make it observable.
|
|
156450
|
+
|
|
156451
|
+
After delegation, verify the files and behavior yourself. A subagent report is a lead, not evidence.
|
|
156452
|
+
${oracleSection ? `
|
|
156453
|
+
${oracleSection}
|
|
156454
|
+
` : ""}</delegation>`;
|
|
156455
|
+
const executionBlock = `<behavior>
|
|
156456
|
+
Implementation loop:
|
|
156457
|
+
|
|
156458
|
+
1. Write down what done means, then plan the smallest path to it. Two or more steps need ${useTaskSystem ? "tasks" : "todos"}; one obvious edit does not.
|
|
156459
|
+
2. Match the repo: read configs and similar files before writing. Do not invent style.
|
|
156460
|
+
3. Change only what the request requires. Bug fix does not mean refactor. Refactor does not mean feature work.
|
|
156461
|
+
4. Use type-safe code. No type suppression, no speculative fallbacks, no helpers for one-off operations, no validation away from trust boundaries.
|
|
156462
|
+
5. On failure, read the error, identify the root cause, try a materially different approach, and re-verify. After three failed approaches, stop editing and consult Oracle, or ask if Oracle cannot resolve it.
|
|
156463
|
+
|
|
156464
|
+
Never revert, delete, push, publish, message, or affect shared systems without explicit approval. Reversible local edits and verification commands are allowed.
|
|
156465
|
+
</behavior>`;
|
|
156466
|
+
const verificationBlock = `<verification>
|
|
156467
|
+
Verification defines done, and it loops until production ready.
|
|
156468
|
+
|
|
156469
|
+
- File edit: run \`lsp_diagnostics\` on every changed file.
|
|
156470
|
+
- Behavioral change: run adjacent tests or the smallest relevant suite.
|
|
156471
|
+
- Buildable project: run the build/typecheck path that covers the touched code.
|
|
156472
|
+
- Runnable or user-visible behavior: exercise the real surface - browser for web, interactive_bash for TUI/CLI, curl for HTTP, driver script for libraries. Click through the real user path, not just the happy entry point.
|
|
156473
|
+
- Hard-to-inspect output: capture the current state, list what is wrong, fix only those things, capture again.
|
|
156474
|
+
- Delegated work: inspect touched files and rerun checks yourself.
|
|
156475
|
+
|
|
156476
|
+
A pass that surfaces a defect goes back to step one of the loop, not into the report. Report only evidence from this turn: "should pass" means unverified. Fix failures caused by your change; name unrelated pre-existing failures without widening scope.
|
|
156477
|
+
</verification>`;
|
|
156478
|
+
const communicationBlock = `<communication>
|
|
156479
|
+
Every sentence carries information the user does not already have. Never restate the task back, never narrate routine tool calls, no flattery or filler.
|
|
156480
|
+
|
|
156481
|
+
Stay quiet through small changes; start narrating when you touch many files or change direction. Final answers state what changed, where, the verification evidence, and any real residual risk - dense and short.
|
|
156482
|
+
</communication>`;
|
|
156483
|
+
const constraintsBlock = `<constraints>
|
|
156484
|
+
${hardBlocks}
|
|
156485
|
+
|
|
156486
|
+
${antiPatterns}
|
|
156487
|
+
</constraints>`;
|
|
156488
|
+
return `${agentIdentity}
|
|
156489
|
+
${roleBlock}
|
|
156490
|
+
|
|
156491
|
+
${calibrationBlock}
|
|
156492
|
+
|
|
156493
|
+
${intentBlock}
|
|
156494
|
+
|
|
156495
|
+
${explorationBlock}
|
|
156496
|
+
|
|
156497
|
+
${delegationBlock}
|
|
156498
|
+
|
|
156499
|
+
${executionBlock}
|
|
156500
|
+
|
|
156501
|
+
${verificationBlock}
|
|
156502
|
+
|
|
156503
|
+
${tasksSection}
|
|
156504
|
+
|
|
156505
|
+
${communicationBlock}
|
|
156506
|
+
|
|
156507
|
+
${constraintsBlock}`;
|
|
156508
|
+
}
|
|
156509
|
+
|
|
156184
156510
|
// packages/omo-opencode/src/agents/kimi-tool-loop-guard.ts
|
|
156185
156511
|
var KIMI_TOOL_LOOP_GUARD = `<tool_loop_guard>
|
|
156186
156512
|
Never call the same tool with the same arguments more than twice in a row.
|
|
@@ -157048,6 +157374,8 @@ function resolveSisyphusPromptFamily(model) {
|
|
|
157048
157374
|
return "claude-opus-4-7";
|
|
157049
157375
|
if (isGlmModel(model))
|
|
157050
157376
|
return "glm-5-2";
|
|
157377
|
+
if (isGrok45Model(model) || isGrok46Model(model))
|
|
157378
|
+
return "grok-4";
|
|
157051
157379
|
return "fallback";
|
|
157052
157380
|
}
|
|
157053
157381
|
function createSisyphusAgent(model, availableAgents, availableToolNames, availableSkills, availableCategories, useTaskSystem = false) {
|
|
@@ -157076,6 +157404,8 @@ function createSisyphusAgent(model, availableAgents, availableToolNames, availab
|
|
|
157076
157404
|
return buildClaudeSisyphusAgentConfig(MODE, model, buildClaudeOpus47SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
|
|
157077
157405
|
case "glm-5-2":
|
|
157078
157406
|
return buildGlmSisyphusAgentConfig(MODE, model, buildGlm52SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
|
|
157407
|
+
case "grok-4":
|
|
157408
|
+
return buildGrokSisyphusAgentConfig(MODE, model, buildGrok4SisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem));
|
|
157079
157409
|
case "fallback": {
|
|
157080
157410
|
const prompt = buildFallbackSisyphusPrompt(model, agents, tools, skills2, categories2, useTaskSystem);
|
|
157081
157411
|
return isGptModel(model) ? buildGptSisyphusAgentConfig(MODE, model, prompt) : buildClaudeSisyphusAgentConfig(MODE, model, prompt);
|
|
@@ -161750,7 +162080,7 @@ function setSisyphusRuntimePromptContext(ctx) {
|
|
|
161750
162080
|
function reconcileSisyphusRuntimePrompt(system, runtimeModel) {
|
|
161751
162081
|
if (!runtimeModel || !context)
|
|
161752
162082
|
return false;
|
|
161753
|
-
if (
|
|
162083
|
+
if (runtimeModel === context.configuredModel) {
|
|
161754
162084
|
return false;
|
|
161755
162085
|
}
|
|
161756
162086
|
const rebuilt = context.rebuildPromptForModel(runtimeModel);
|
|
@@ -163224,7 +163554,7 @@ function createCodegraphMcpConfig(options = {}) {
|
|
|
163224
163554
|
import { existsSync as existsSync115, readFileSync as readFileSync78 } from "fs";
|
|
163225
163555
|
import { delimiter as delimiter2, dirname as dirname50, resolve as resolve44 } from "path";
|
|
163226
163556
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
163227
|
-
import { z as
|
|
163557
|
+
import { z as z59 } from "zod";
|
|
163228
163558
|
|
|
163229
163559
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
163230
163560
|
function normalizeCliPath(path21) {
|
|
@@ -163290,8 +163620,8 @@ var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-clie
|
|
|
163290
163620
|
var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
|
|
163291
163621
|
var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
|
|
163292
163622
|
var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
163293
|
-
var DaemonPackageSchema =
|
|
163294
|
-
version:
|
|
163623
|
+
var DaemonPackageSchema = z59.object({
|
|
163624
|
+
version: z59.string().min(1)
|
|
163295
163625
|
});
|
|
163296
163626
|
var LSP_BOOTSTRAP_SCRIPT = [
|
|
163297
163627
|
"const { existsSync } = require('node:fs')",
|
|
@@ -163639,8 +163969,8 @@ function applyToolConfig(params) {
|
|
|
163639
163969
|
const atlas = agentByKey(params.agentResult, "atlas", params.pluginConfig);
|
|
163640
163970
|
if (atlas) {
|
|
163641
163971
|
atlas.permission = {
|
|
163642
|
-
...atlas.permission,
|
|
163643
163972
|
task: "allow",
|
|
163973
|
+
...atlas.permission,
|
|
163644
163974
|
call_omo_agent: "deny",
|
|
163645
163975
|
"task_*": "allow",
|
|
163646
163976
|
teammate: "allow",
|
|
@@ -163650,9 +163980,9 @@ function applyToolConfig(params) {
|
|
|
163650
163980
|
const sisyphus2 = agentByKey(params.agentResult, "sisyphus", params.pluginConfig);
|
|
163651
163981
|
if (sisyphus2) {
|
|
163652
163982
|
sisyphus2.permission = {
|
|
163983
|
+
task: "allow",
|
|
163653
163984
|
...sisyphus2.permission,
|
|
163654
163985
|
call_omo_agent: "deny",
|
|
163655
|
-
task: "allow",
|
|
163656
163986
|
question: questionPermission,
|
|
163657
163987
|
"task_*": "allow",
|
|
163658
163988
|
teammate: "allow",
|
|
@@ -163662,9 +163992,9 @@ function applyToolConfig(params) {
|
|
|
163662
163992
|
const hephaestus = agentByKey(params.agentResult, "hephaestus", params.pluginConfig);
|
|
163663
163993
|
if (hephaestus) {
|
|
163664
163994
|
hephaestus.permission = {
|
|
163995
|
+
task: "allow",
|
|
163665
163996
|
...hephaestus.permission,
|
|
163666
163997
|
call_omo_agent: "deny",
|
|
163667
|
-
task: "allow",
|
|
163668
163998
|
question: questionPermission,
|
|
163669
163999
|
teammate: "allow",
|
|
163670
164000
|
...denyTodoTools
|
|
@@ -163673,9 +164003,9 @@ function applyToolConfig(params) {
|
|
|
163673
164003
|
const prometheus = agentByKey(params.agentResult, "prometheus", params.pluginConfig);
|
|
163674
164004
|
if (prometheus) {
|
|
163675
164005
|
prometheus.permission = {
|
|
164006
|
+
task: "allow",
|
|
163676
164007
|
...prometheus.permission,
|
|
163677
164008
|
call_omo_agent: "deny",
|
|
163678
|
-
task: "allow",
|
|
163679
164009
|
question: questionPermission,
|
|
163680
164010
|
"task_*": "allow",
|
|
163681
164011
|
teammate: "allow",
|
|
@@ -167556,14 +167886,14 @@ class OpencodeClient2 extends HeyApiClient {
|
|
|
167556
167886
|
// node_modules/.bun/@opencode-ai+sdk@1.15.13/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
167557
167887
|
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
167558
167888
|
// packages/omo-opencode/src/plugin/native-skills.ts
|
|
167559
|
-
import { z as
|
|
167560
|
-
var NativeSkillEntrySchema =
|
|
167561
|
-
name:
|
|
167562
|
-
description:
|
|
167563
|
-
location:
|
|
167564
|
-
content:
|
|
167889
|
+
import { z as z60 } from "zod";
|
|
167890
|
+
var NativeSkillEntrySchema = z60.object({
|
|
167891
|
+
name: z60.string(),
|
|
167892
|
+
description: z60.string().default(""),
|
|
167893
|
+
location: z60.string(),
|
|
167894
|
+
content: z60.string()
|
|
167565
167895
|
});
|
|
167566
|
-
var NativeSkillEntriesSchema =
|
|
167896
|
+
var NativeSkillEntriesSchema = z60.array(NativeSkillEntrySchema);
|
|
167567
167897
|
function getObjectProperty(value, property) {
|
|
167568
167898
|
if (typeof value !== "object" || value === null)
|
|
167569
167899
|
return;
|
|
@@ -168708,7 +169038,7 @@ async function resolveParticipant2(teamRunId, sessionID, config3, deps) {
|
|
|
168708
169038
|
}
|
|
168709
169039
|
|
|
168710
169040
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
|
|
168711
|
-
import { z as
|
|
169041
|
+
import { z as z61 } from "zod";
|
|
168712
169042
|
init_types5();
|
|
168713
169043
|
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." }] } }).';
|
|
168714
169044
|
function omitEmptyStringArgs(rawArgs) {
|
|
@@ -168717,10 +169047,10 @@ function omitEmptyStringArgs(rawArgs) {
|
|
|
168717
169047
|
}
|
|
168718
169048
|
return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
|
|
168719
169049
|
}
|
|
168720
|
-
var TeamCreateArgsSchema =
|
|
168721
|
-
teamName:
|
|
168722
|
-
inline_spec:
|
|
168723
|
-
leadSessionId:
|
|
169050
|
+
var TeamCreateArgsSchema = z61.preprocess(omitEmptyStringArgs, z61.object({
|
|
169051
|
+
teamName: z61.string().min(1).nullish(),
|
|
169052
|
+
inline_spec: z61.unknown().nullish(),
|
|
169053
|
+
leadSessionId: z61.string().nullish()
|
|
168724
169054
|
}).superRefine((value, ctx) => {
|
|
168725
169055
|
const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
|
|
168726
169056
|
if (optionCount !== 1) {
|
|
@@ -168841,7 +169171,7 @@ function createTeamCreateTool(config3, client5, bgMgr, tmuxMgr, executorConfig,
|
|
|
168841
169171
|
});
|
|
168842
169172
|
}
|
|
168843
169173
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
168844
|
-
import { z as
|
|
169174
|
+
import { z as z62 } from "zod";
|
|
168845
169175
|
// packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
|
|
168846
169176
|
init_store3();
|
|
168847
169177
|
init_shutdown_helpers();
|
|
@@ -168930,13 +169260,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
|
|
|
168930
169260
|
|
|
168931
169261
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
168932
169262
|
init_store2();
|
|
168933
|
-
var TeamDeleteArgsSchema =
|
|
168934
|
-
var TeamShutdownRequestArgsSchema =
|
|
168935
|
-
var TeamApproveShutdownArgsSchema =
|
|
168936
|
-
var TeamRejectShutdownArgsSchema =
|
|
168937
|
-
teamRunId:
|
|
168938
|
-
memberName:
|
|
168939
|
-
reason:
|
|
169263
|
+
var TeamDeleteArgsSchema = z62.object({ teamRunId: z62.string().min(1), force: z62.boolean().optional() });
|
|
169264
|
+
var TeamShutdownRequestArgsSchema = z62.object({ teamRunId: z62.string().min(1), targetMemberName: z62.string().min(1) });
|
|
169265
|
+
var TeamApproveShutdownArgsSchema = z62.object({ teamRunId: z62.string().min(1), memberName: z62.string().min(1) });
|
|
169266
|
+
var TeamRejectShutdownArgsSchema = z62.object({
|
|
169267
|
+
teamRunId: z62.string().min(1),
|
|
169268
|
+
memberName: z62.string().min(1),
|
|
169269
|
+
reason: z62.string().min(1)
|
|
168940
169270
|
});
|
|
168941
169271
|
var defaultTeamShutdownToolDeps = {
|
|
168942
169272
|
listActiveTeams,
|
|
@@ -170733,9 +171063,16 @@ function createMessagesTransformHandler(args) {
|
|
|
170733
171063
|
|
|
170734
171064
|
// packages/omo-opencode/src/plugin/system-transform.ts
|
|
170735
171065
|
var ULTRAWORK_MODE_TAG = "<ultrawork-mode>";
|
|
171066
|
+
function toCanonicalModel(model) {
|
|
171067
|
+
if (!model?.id)
|
|
171068
|
+
return;
|
|
171069
|
+
if (model.id.includes("/") || !model.providerID)
|
|
171070
|
+
return model.id;
|
|
171071
|
+
return `${model.providerID}/${model.id}`;
|
|
171072
|
+
}
|
|
170736
171073
|
function createSystemTransformHandler(defaultMode, getUltraworkMessage2) {
|
|
170737
171074
|
return async (input, output) => {
|
|
170738
|
-
reconcileSisyphusRuntimePrompt(output.system, input.model
|
|
171075
|
+
reconcileSisyphusRuntimePrompt(output.system, toCanonicalModel(input.model));
|
|
170739
171076
|
if (!defaultMode?.ultrawork || !getUltraworkMessage2)
|
|
170740
171077
|
return;
|
|
170741
171078
|
if (output.system.some((part) => part.includes(ULTRAWORK_MODE_TAG)))
|
|
@@ -172772,6 +173109,7 @@ function writePostHogActivityState(stateDir, nextState, diagnostics) {
|
|
|
172772
173109
|
// packages/telemetry-core/src/constants.ts
|
|
172773
173110
|
var DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com";
|
|
172774
173111
|
var DEFAULT_POSTHOG_API_KEY = "phc_CFJhj5HyvA62QPhvyaUCtaq23aUfznnijg5VaaGkNk74";
|
|
173112
|
+
var UNCONFIGURED_POSTHOG_API_KEY = "phc_REPLACE_ME_OMO_NATIVE";
|
|
172775
173113
|
|
|
172776
173114
|
// packages/telemetry-core/src/env.ts
|
|
172777
173115
|
var TRUTHY_DISABLE_VALUES = ["1", "true", "yes"];
|
|
@@ -172793,6 +173131,9 @@ function shouldDisableTelemetry(input) {
|
|
|
172793
173131
|
const env2 = input.env ?? process.env;
|
|
172794
173132
|
const globalPrefix = input.globalEnvPrefix ?? "OMO";
|
|
172795
173133
|
const prefixes = Array.from(new Set([globalPrefix, input.productEnvPrefix]));
|
|
173134
|
+
if (isDisableFlag(env2["DO_NOT_TRACK"])) {
|
|
173135
|
+
return true;
|
|
173136
|
+
}
|
|
172796
173137
|
for (const prefix of prefixes) {
|
|
172797
173138
|
if (isDisableFlag(env2[`${prefix}_DISABLE_POSTHOG`])) {
|
|
172798
173139
|
return true;
|
|
@@ -172806,18 +173147,15 @@ function shouldDisableTelemetry(input) {
|
|
|
172806
173147
|
function getTelemetryApiKey(env2 = process.env, defaultApiKey = DEFAULT_POSTHOG_API_KEY) {
|
|
172807
173148
|
return env2["POSTHOG_API_KEY"]?.trim() ?? defaultApiKey;
|
|
172808
173149
|
}
|
|
172809
|
-
function
|
|
172810
|
-
|
|
173150
|
+
function isConfiguredTelemetryApiKey(apiKey) {
|
|
173151
|
+
const normalized = apiKey.trim();
|
|
173152
|
+
return normalized.length > 0 && normalized !== UNCONFIGURED_POSTHOG_API_KEY;
|
|
172811
173153
|
}
|
|
172812
|
-
|
|
172813
|
-
|
|
172814
|
-
import { createHash as createHash9 } from "crypto";
|
|
172815
|
-
import os6 from "os";
|
|
172816
|
-
function getDefaultTelemetryOsProvider() {
|
|
172817
|
-
return os6;
|
|
173154
|
+
function hasTelemetryApiKey(env2, defaultApiKey) {
|
|
173155
|
+
return isConfiguredTelemetryApiKey(getTelemetryApiKey(env2, defaultApiKey));
|
|
172818
173156
|
}
|
|
172819
|
-
function
|
|
172820
|
-
return
|
|
173157
|
+
function getTelemetryHost(env2 = process.env, defaultHost = DEFAULT_POSTHOG_HOST) {
|
|
173158
|
+
return env2["POSTHOG_HOST"]?.trim() || defaultHost;
|
|
172821
173159
|
}
|
|
172822
173160
|
|
|
172823
173161
|
// node_modules/.bun/posthog-node@5.35.12/node_modules/posthog-node/dist/extensions/error-tracking/modifiers/module.node.mjs
|
|
@@ -174143,7 +174481,7 @@ var FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/
|
|
|
174143
174481
|
var nodeStackLineParser = (line, platform2) => {
|
|
174144
174482
|
const lineMatch = line.match(FULL_MATCH);
|
|
174145
174483
|
if (lineMatch) {
|
|
174146
|
-
let
|
|
174484
|
+
let object19;
|
|
174147
174485
|
let method;
|
|
174148
174486
|
let functionName;
|
|
174149
174487
|
let typeName;
|
|
@@ -174154,18 +174492,18 @@ var nodeStackLineParser = (line, platform2) => {
|
|
|
174154
174492
|
if (functionName[methodStart - 1] === ".")
|
|
174155
174493
|
methodStart--;
|
|
174156
174494
|
if (methodStart > 0) {
|
|
174157
|
-
|
|
174495
|
+
object19 = functionName.slice(0, methodStart);
|
|
174158
174496
|
method = functionName.slice(methodStart + 1);
|
|
174159
|
-
const objectEnd =
|
|
174497
|
+
const objectEnd = object19.indexOf(".Module");
|
|
174160
174498
|
if (objectEnd > 0) {
|
|
174161
174499
|
functionName = functionName.slice(objectEnd + 1);
|
|
174162
|
-
|
|
174500
|
+
object19 = object19.slice(0, objectEnd);
|
|
174163
174501
|
}
|
|
174164
174502
|
}
|
|
174165
174503
|
typeName = undefined;
|
|
174166
174504
|
}
|
|
174167
174505
|
if (method) {
|
|
174168
|
-
typeName =
|
|
174506
|
+
typeName = object19;
|
|
174169
174507
|
methodName = method;
|
|
174170
174508
|
}
|
|
174171
174509
|
if (method === "<anonymous>") {
|
|
@@ -177987,6 +178325,16 @@ class PostHog extends PostHogBackendClient {
|
|
|
177987
178325
|
}
|
|
177988
178326
|
}
|
|
177989
178327
|
|
|
178328
|
+
// packages/telemetry-core/src/machine-id.ts
|
|
178329
|
+
import { createHash as createHash9 } from "crypto";
|
|
178330
|
+
import os6 from "os";
|
|
178331
|
+
function getDefaultTelemetryOsProvider() {
|
|
178332
|
+
return os6;
|
|
178333
|
+
}
|
|
178334
|
+
function getTelemetryDistinctId(machineIdPrefix, osProvider = getDefaultTelemetryOsProvider()) {
|
|
178335
|
+
return createHash9("sha256").update(`${machineIdPrefix}${osProvider.hostname()}`).digest("hex");
|
|
178336
|
+
}
|
|
178337
|
+
|
|
177990
178338
|
// packages/telemetry-core/src/posthog-client.ts
|
|
177991
178339
|
var NO_OP_CLIENT = {
|
|
177992
178340
|
enabled: false,
|
|
@@ -178021,7 +178369,7 @@ function createDefaultPostHogTransport(apiKey, options) {
|
|
|
178021
178369
|
}
|
|
178022
178370
|
function isTelemetryClientEnabled(input) {
|
|
178023
178371
|
const env2 = input.env ?? process.env;
|
|
178024
|
-
return !shouldDisableTelemetry({ env: env2, productEnvPrefix: input.product.productEnvPrefix }) &&
|
|
178372
|
+
return !shouldDisableTelemetry({ env: env2, productEnvPrefix: input.product.productEnvPrefix }) && hasTelemetryApiKey(env2, input.product.defaultApiKey);
|
|
178025
178373
|
}
|
|
178026
178374
|
function createTelemetryClient(input) {
|
|
178027
178375
|
if (!isTelemetryClientEnabled(input)) {
|
|
@@ -178087,7 +178435,8 @@ function createTransport(input) {
|
|
|
178087
178435
|
flushAt: 1,
|
|
178088
178436
|
flushInterval: 0,
|
|
178089
178437
|
host: getTelemetryHost(env2, input.product.defaultHost),
|
|
178090
|
-
disableGeoip: false
|
|
178438
|
+
disableGeoip: input.product.disableGeoip ?? false,
|
|
178439
|
+
...input.product.transportOptions
|
|
178091
178440
|
});
|
|
178092
178441
|
} catch (error) {
|
|
178093
178442
|
input.diagnostics?.({
|