oh-my-opencode 5.0.0-beta.52 → 5.0.0-beta.54
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 +15 -7
- package/.agents/skills/publish/SKILL.md +15 -7
- package/.opencode/command/publish.md +15 -7
- package/README.ja.md +11 -18
- package/README.ko.md +10 -17
- package/README.md +11 -18
- package/README.ru.md +11 -18
- package/README.zh-cn.md +11 -18
- package/dist/cli/index.js +147 -46
- package/dist/cli-node/index.js +147 -46
- package/dist/index.js +1311 -1200
- package/dist/skills/refactor/SKILL.md +3 -3
- package/dist/skills/review-work/SKILL.md +1 -1
- package/dist/skills/ulw-execute/SKILL.md +5 -5
- package/dist/tui.js +107 -10
- package/package.json +15 -14
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.d.ts +5 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-codex-validation.js +14 -34
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +1 -4
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.d.ts +0 -18
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +1 -88
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +10 -3
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-arg-parser.js +2 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +86 -174
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +2 -18
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +23 -33
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +16 -9
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-codex-validation.ts +18 -59
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +1 -6
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +1 -124
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +11 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-arg-parser.ts +10 -4
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +31 -50
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +29 -10
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-final.test.ts +0 -82
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint.test.ts +16 -22
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-checkpoint.test.ts +27 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-json-errors.test.ts +25 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-snapshot.test.ts +34 -11
- package/packages/omo-codex/plugin/components/ulw-loop/test/guided-recovery.test.ts +9 -47
- package/packages/omo-codex/plugin/components/ulw-loop/test/review-blockers.test.ts +9 -7
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-recording-spawn-admission.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +12 -12
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/skills/refactor/SKILL.md +3 -3
- package/packages/omo-codex/plugin/skills/ulw-execute/SKILL.md +5 -5
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/refactor/SKILL.md +3 -3
- package/packages/shared-skills/skills/review-work/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-execute/SKILL.md +5 -5
package/dist/index.js
CHANGED
|
@@ -11684,7 +11684,7 @@ var init_member_parser = __esm(() => {
|
|
|
11684
11684
|
});
|
|
11685
11685
|
|
|
11686
11686
|
// packages/team-core/src/types.ts
|
|
11687
|
-
import * as
|
|
11687
|
+
import * as z51 from "zod";
|
|
11688
11688
|
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;
|
|
11689
11689
|
var init_types2 = __esm(() => {
|
|
11690
11690
|
init_member_parser();
|
|
@@ -11705,40 +11705,40 @@ var init_types2 = __esm(() => {
|
|
|
11705
11705
|
"failed",
|
|
11706
11706
|
"orphaned"
|
|
11707
11707
|
];
|
|
11708
|
-
MemberBaseSchema =
|
|
11709
|
-
name:
|
|
11710
|
-
cwd:
|
|
11711
|
-
worktreePath:
|
|
11712
|
-
task_summary:
|
|
11713
|
-
subscriptions:
|
|
11714
|
-
backendType:
|
|
11715
|
-
color:
|
|
11716
|
-
isActive:
|
|
11708
|
+
MemberBaseSchema = z51.object({
|
|
11709
|
+
name: z51.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
11710
|
+
cwd: z51.string().optional(),
|
|
11711
|
+
worktreePath: z51.string().optional(),
|
|
11712
|
+
task_summary: z51.string().max(80).optional(),
|
|
11713
|
+
subscriptions: z51.array(z51.string()).optional(),
|
|
11714
|
+
backendType: z51.enum(["in-process", "tmux"]).default("in-process"),
|
|
11715
|
+
color: z51.string().optional(),
|
|
11716
|
+
isActive: z51.boolean().default(true)
|
|
11717
11717
|
}).strict();
|
|
11718
11718
|
CategoryMemberSchema = MemberBaseSchema.extend({
|
|
11719
|
-
kind:
|
|
11720
|
-
category:
|
|
11721
|
-
prompt:
|
|
11719
|
+
kind: z51.literal("category"),
|
|
11720
|
+
category: z51.string().min(1),
|
|
11721
|
+
prompt: z51.string().min(1)
|
|
11722
11722
|
});
|
|
11723
11723
|
SubagentMemberSchema = MemberBaseSchema.extend({
|
|
11724
|
-
kind:
|
|
11725
|
-
subagent_type:
|
|
11726
|
-
prompt:
|
|
11724
|
+
kind: z51.literal("subagent_type"),
|
|
11725
|
+
subagent_type: z51.string().min(1),
|
|
11726
|
+
prompt: z51.string().optional()
|
|
11727
11727
|
});
|
|
11728
|
-
MemberSchema =
|
|
11729
|
-
TeamReferenceSchema =
|
|
11730
|
-
path:
|
|
11731
|
-
description:
|
|
11728
|
+
MemberSchema = z51.discriminatedUnion("kind", [CategoryMemberSchema, SubagentMemberSchema]);
|
|
11729
|
+
TeamReferenceSchema = z51.object({
|
|
11730
|
+
path: z51.string(),
|
|
11731
|
+
description: z51.string().optional()
|
|
11732
11732
|
}).strict();
|
|
11733
|
-
TeamSpecSchema =
|
|
11734
|
-
version:
|
|
11735
|
-
name:
|
|
11736
|
-
description:
|
|
11737
|
-
createdAt:
|
|
11738
|
-
leadAgentId:
|
|
11739
|
-
teamAllowedPaths:
|
|
11740
|
-
sessionPermission:
|
|
11741
|
-
members:
|
|
11733
|
+
TeamSpecSchema = z51.object({
|
|
11734
|
+
version: z51.literal(1).default(1),
|
|
11735
|
+
name: z51.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
11736
|
+
description: z51.string().optional(),
|
|
11737
|
+
createdAt: z51.number().int().positive().default(() => Date.now()),
|
|
11738
|
+
leadAgentId: z51.string().optional(),
|
|
11739
|
+
teamAllowedPaths: z51.array(z51.string()).optional(),
|
|
11740
|
+
sessionPermission: z51.string().optional(),
|
|
11741
|
+
members: z51.array(MemberSchema).min(1).max(8)
|
|
11742
11742
|
}).superRefine((teamSpec, ctx) => {
|
|
11743
11743
|
if (teamSpec.leadAgentId === undefined && teamSpec.members.length > 1) {
|
|
11744
11744
|
ctx.addIssue({
|
|
@@ -11760,95 +11760,95 @@ var init_types2 = __esm(() => {
|
|
|
11760
11760
|
leadAgentId: firstMember.name
|
|
11761
11761
|
};
|
|
11762
11762
|
});
|
|
11763
|
-
MessageSchema =
|
|
11764
|
-
version:
|
|
11765
|
-
messageId:
|
|
11766
|
-
from:
|
|
11767
|
-
to:
|
|
11768
|
-
kind:
|
|
11769
|
-
body:
|
|
11770
|
-
summary:
|
|
11771
|
-
references:
|
|
11772
|
-
timestamp:
|
|
11773
|
-
correlationId:
|
|
11774
|
-
color:
|
|
11763
|
+
MessageSchema = z51.object({
|
|
11764
|
+
version: z51.literal(1),
|
|
11765
|
+
messageId: z51.string().uuid(),
|
|
11766
|
+
from: z51.string(),
|
|
11767
|
+
to: z51.string(),
|
|
11768
|
+
kind: z51.enum(MESSAGE_KINDS),
|
|
11769
|
+
body: z51.string().max(32 * 1024),
|
|
11770
|
+
summary: z51.string().optional(),
|
|
11771
|
+
references: z51.array(TeamReferenceSchema).optional(),
|
|
11772
|
+
timestamp: z51.number().int().positive(),
|
|
11773
|
+
correlationId: z51.string().uuid().optional(),
|
|
11774
|
+
color: z51.string().optional()
|
|
11775
11775
|
});
|
|
11776
|
-
TaskSchema =
|
|
11777
|
-
version:
|
|
11778
|
-
id:
|
|
11779
|
-
subject:
|
|
11780
|
-
description:
|
|
11781
|
-
activeForm:
|
|
11782
|
-
status:
|
|
11783
|
-
owner:
|
|
11784
|
-
blocks:
|
|
11785
|
-
blockedBy:
|
|
11786
|
-
metadata:
|
|
11787
|
-
createdAt:
|
|
11788
|
-
updatedAt:
|
|
11789
|
-
claimedAt:
|
|
11776
|
+
TaskSchema = z51.object({
|
|
11777
|
+
version: z51.literal(1),
|
|
11778
|
+
id: z51.string(),
|
|
11779
|
+
subject: z51.string(),
|
|
11780
|
+
description: z51.string(),
|
|
11781
|
+
activeForm: z51.string().optional(),
|
|
11782
|
+
status: z51.enum(TASK_STATUSES),
|
|
11783
|
+
owner: z51.string().optional(),
|
|
11784
|
+
blocks: z51.array(z51.string()).default([]),
|
|
11785
|
+
blockedBy: z51.array(z51.string()).default([]),
|
|
11786
|
+
metadata: z51.record(z51.string(), z51.unknown()).optional(),
|
|
11787
|
+
createdAt: z51.number().int().positive(),
|
|
11788
|
+
updatedAt: z51.number().int().positive(),
|
|
11789
|
+
claimedAt: z51.number().int().positive().optional()
|
|
11790
11790
|
});
|
|
11791
|
-
RuntimeStateMemberModelSchema =
|
|
11792
|
-
providerID:
|
|
11793
|
-
modelID:
|
|
11794
|
-
variant:
|
|
11795
|
-
reasoningEffort:
|
|
11796
|
-
temperature:
|
|
11797
|
-
top_p:
|
|
11798
|
-
maxTokens:
|
|
11799
|
-
thinking:
|
|
11800
|
-
type:
|
|
11801
|
-
budgetTokens:
|
|
11791
|
+
RuntimeStateMemberModelSchema = z51.object({
|
|
11792
|
+
providerID: z51.string(),
|
|
11793
|
+
modelID: z51.string(),
|
|
11794
|
+
variant: z51.string().optional(),
|
|
11795
|
+
reasoningEffort: z51.string().optional(),
|
|
11796
|
+
temperature: z51.number().optional(),
|
|
11797
|
+
top_p: z51.number().optional(),
|
|
11798
|
+
maxTokens: z51.number().optional(),
|
|
11799
|
+
thinking: z51.object({
|
|
11800
|
+
type: z51.enum(["enabled", "disabled"]),
|
|
11801
|
+
budgetTokens: z51.number().int().positive().optional()
|
|
11802
11802
|
}).optional()
|
|
11803
11803
|
}).strict();
|
|
11804
|
-
RuntimeStateMemberSchema =
|
|
11805
|
-
name:
|
|
11806
|
-
sessionId:
|
|
11807
|
-
tmuxPaneId:
|
|
11808
|
-
tmuxGridPaneId:
|
|
11809
|
-
agentType:
|
|
11810
|
-
subagent_type:
|
|
11811
|
-
category:
|
|
11804
|
+
RuntimeStateMemberSchema = z51.object({
|
|
11805
|
+
name: z51.string(),
|
|
11806
|
+
sessionId: z51.string().optional(),
|
|
11807
|
+
tmuxPaneId: z51.string().optional(),
|
|
11808
|
+
tmuxGridPaneId: z51.string().optional(),
|
|
11809
|
+
agentType: z51.enum(["leader", "general-purpose"]),
|
|
11810
|
+
subagent_type: z51.string().optional(),
|
|
11811
|
+
category: z51.string().optional(),
|
|
11812
11812
|
model: RuntimeStateMemberModelSchema.optional(),
|
|
11813
|
-
status:
|
|
11814
|
-
color:
|
|
11815
|
-
worktreePath:
|
|
11816
|
-
lastInjectedTurnMarker:
|
|
11817
|
-
pendingInjectedMessageIds:
|
|
11813
|
+
status: z51.enum(["pending", "running", "idle", "errored", "completed", "shutdown_approved"]),
|
|
11814
|
+
color: z51.string().optional(),
|
|
11815
|
+
worktreePath: z51.string().optional(),
|
|
11816
|
+
lastInjectedTurnMarker: z51.string().optional(),
|
|
11817
|
+
pendingInjectedMessageIds: z51.array(z51.string()).default([])
|
|
11818
11818
|
}).strict();
|
|
11819
|
-
RuntimeBoundsSchema =
|
|
11820
|
-
maxMembers:
|
|
11821
|
-
maxParallelMembers:
|
|
11822
|
-
maxMessagesPerRun:
|
|
11823
|
-
maxWallClockMinutes:
|
|
11824
|
-
maxMemberTurns:
|
|
11819
|
+
RuntimeBoundsSchema = z51.object({
|
|
11820
|
+
maxMembers: z51.number().int().default(8),
|
|
11821
|
+
maxParallelMembers: z51.number().int().default(4),
|
|
11822
|
+
maxMessagesPerRun: z51.number().int().default(1e4),
|
|
11823
|
+
maxWallClockMinutes: z51.number().int().default(120),
|
|
11824
|
+
maxMemberTurns: z51.number().int().default(500)
|
|
11825
11825
|
}).strict();
|
|
11826
|
-
ShutdownRequestSchema =
|
|
11827
|
-
memberId:
|
|
11828
|
-
requesterName:
|
|
11829
|
-
requestedAt:
|
|
11830
|
-
approvedAt:
|
|
11831
|
-
rejectedReason:
|
|
11832
|
-
rejectedAt:
|
|
11826
|
+
ShutdownRequestSchema = z51.object({
|
|
11827
|
+
memberId: z51.string(),
|
|
11828
|
+
requesterName: z51.string(),
|
|
11829
|
+
requestedAt: z51.number().int().positive(),
|
|
11830
|
+
approvedAt: z51.number().int().positive().optional(),
|
|
11831
|
+
rejectedReason: z51.string().optional(),
|
|
11832
|
+
rejectedAt: z51.number().int().positive().optional()
|
|
11833
11833
|
}).strict();
|
|
11834
|
-
RuntimeStateTmuxLayoutSchema =
|
|
11835
|
-
ownedSession:
|
|
11836
|
-
targetSessionId:
|
|
11837
|
-
focusWindowId:
|
|
11838
|
-
gridWindowId:
|
|
11839
|
-
paneIds:
|
|
11834
|
+
RuntimeStateTmuxLayoutSchema = z51.object({
|
|
11835
|
+
ownedSession: z51.boolean(),
|
|
11836
|
+
targetSessionId: z51.string(),
|
|
11837
|
+
focusWindowId: z51.string().optional(),
|
|
11838
|
+
gridWindowId: z51.string().optional(),
|
|
11839
|
+
paneIds: z51.array(z51.string()).optional()
|
|
11840
11840
|
}).strict();
|
|
11841
|
-
RuntimeStateSchema =
|
|
11842
|
-
version:
|
|
11843
|
-
teamRunId:
|
|
11844
|
-
teamName:
|
|
11845
|
-
specSource:
|
|
11846
|
-
createdAt:
|
|
11847
|
-
status:
|
|
11848
|
-
leadSessionId:
|
|
11841
|
+
RuntimeStateSchema = z51.object({
|
|
11842
|
+
version: z51.literal(1),
|
|
11843
|
+
teamRunId: z51.string().uuid(),
|
|
11844
|
+
teamName: z51.string(),
|
|
11845
|
+
specSource: z51.enum(["project", "user"]),
|
|
11846
|
+
createdAt: z51.number().int().positive(),
|
|
11847
|
+
status: z51.enum(RUNTIME_STATUSES),
|
|
11848
|
+
leadSessionId: z51.string().optional(),
|
|
11849
11849
|
tmuxLayout: RuntimeStateTmuxLayoutSchema.optional(),
|
|
11850
|
-
members:
|
|
11851
|
-
shutdownRequests:
|
|
11850
|
+
members: z51.array(RuntimeStateMemberSchema),
|
|
11851
|
+
shutdownRequests: z51.array(ShutdownRequestSchema).default([]),
|
|
11852
11852
|
bounds: RuntimeBoundsSchema
|
|
11853
11853
|
});
|
|
11854
11854
|
AGENT_ELIGIBILITY_REGISTRY = {
|
|
@@ -19900,6 +19900,10 @@ function isKimiK3Model(model) {
|
|
|
19900
19900
|
return true;
|
|
19901
19901
|
return false;
|
|
19902
19902
|
}
|
|
19903
|
+
function isSWE2Model(model) {
|
|
19904
|
+
const modelName = extractModelName(model).toLowerCase();
|
|
19905
|
+
return /^swe-2(?:[-.]|$)/.test(modelName);
|
|
19906
|
+
}
|
|
19903
19907
|
function isMiniMaxModel(model) {
|
|
19904
19908
|
const modelName = extractModelName(model).toLowerCase();
|
|
19905
19909
|
return modelName.includes("minimax");
|
|
@@ -20379,6 +20383,18 @@ function resolveCompatibleModelSettings(input) {
|
|
|
20379
20383
|
function normalizeModelName(name) {
|
|
20380
20384
|
return name.toLowerCase().replace(/claude-(opus|sonnet|haiku)-(\d+)[.-](\d+)/g, "claude-$1-$2.$3").replace(/kimi-k2[.-](\d+)/g, "kimi-k2.$1").replace(/\b(glm|gpt)-(\d+)[.-](\d+)/g, "$1-$2.$3");
|
|
20381
20385
|
}
|
|
20386
|
+
function modelIdOf(model) {
|
|
20387
|
+
return model.split("/").slice(1).join("/");
|
|
20388
|
+
}
|
|
20389
|
+
function closestMatch(matches, providers) {
|
|
20390
|
+
const providerRank = (model) => providers === undefined || providers.length === 0 ? 0 : providers.indexOf(model.split("/")[0] ?? "");
|
|
20391
|
+
return matches.reduce((best, current) => {
|
|
20392
|
+
const rankDelta = providerRank(current) - providerRank(best);
|
|
20393
|
+
if (rankDelta !== 0)
|
|
20394
|
+
return rankDelta < 0 ? current : best;
|
|
20395
|
+
return modelIdOf(current).length < modelIdOf(best).length ? current : best;
|
|
20396
|
+
});
|
|
20397
|
+
}
|
|
20382
20398
|
function fuzzyMatchModel(target, available, providers) {
|
|
20383
20399
|
if (available.size === 0) {
|
|
20384
20400
|
return null;
|
|
@@ -20403,14 +20419,11 @@ function fuzzyMatchModel(target, available, providers) {
|
|
|
20403
20419
|
if (exactMatch) {
|
|
20404
20420
|
return exactMatch;
|
|
20405
20421
|
}
|
|
20406
|
-
const exactModelIdMatches = matches.filter((model) =>
|
|
20407
|
-
const modelId = model.split("/").slice(1).join("/");
|
|
20408
|
-
return normalizeModelName(modelId) === targetNormalized;
|
|
20409
|
-
});
|
|
20422
|
+
const exactModelIdMatches = matches.filter((model) => normalizeModelName(modelIdOf(model)) === targetNormalized);
|
|
20410
20423
|
if (exactModelIdMatches.length > 0) {
|
|
20411
|
-
return exactModelIdMatches
|
|
20424
|
+
return closestMatch(exactModelIdMatches, providers);
|
|
20412
20425
|
}
|
|
20413
|
-
return matches
|
|
20426
|
+
return closestMatch(matches, providers);
|
|
20414
20427
|
}
|
|
20415
20428
|
|
|
20416
20429
|
// packages/model-core/src/provider-model-id-transform.ts
|
|
@@ -22664,7 +22677,7 @@ var OmoCategoryConfigSchema = z4.preprocess((value) => isRecord7(value) ? normal
|
|
|
22664
22677
|
var OmoCategoriesConfigSchema = z4.record(z4.string(), OmoCategoryConfigSchema);
|
|
22665
22678
|
|
|
22666
22679
|
// packages/omo-config-core/src/schema/config.ts
|
|
22667
|
-
import * as
|
|
22680
|
+
import * as z14 from "zod";
|
|
22668
22681
|
|
|
22669
22682
|
// packages/omo-config-core/src/schema/git-master.ts
|
|
22670
22683
|
import * as z5 from "zod";
|
|
@@ -22705,9 +22718,20 @@ var OmoMemorySyncSchema = z7.object({
|
|
|
22705
22718
|
var OmoMemorySearchSchema = z7.object({
|
|
22706
22719
|
enabled: z7.boolean().default(true)
|
|
22707
22720
|
}).strict();
|
|
22721
|
+
var OmoMemoryRecallEventCapsSchema = z7.object({
|
|
22722
|
+
tool_args: z7.number().int().nonnegative().default(400),
|
|
22723
|
+
result_head: z7.number().int().nonnegative().default(600),
|
|
22724
|
+
assistant: z7.number().int().nonnegative().default(1500),
|
|
22725
|
+
prompt: z7.number().int().nonnegative().default(4000)
|
|
22726
|
+
}).strict();
|
|
22708
22727
|
var OmoMemoryRecallSchema = z7.object({
|
|
22709
22728
|
enabled: z7.boolean().default(true),
|
|
22710
|
-
max_items: z7.number().int().min(1).max(5).default(2)
|
|
22729
|
+
max_items: z7.number().int().min(1).max(5).default(2),
|
|
22730
|
+
category: z7.string().min(1).default("quick"),
|
|
22731
|
+
event_caps: OmoMemoryRecallEventCapsSchema.default({ tool_args: 400, result_head: 600, assistant: 1500, prompt: 4000 }),
|
|
22732
|
+
sidecar_max_tokens: z7.number().int().positive().default(48000),
|
|
22733
|
+
max_concurrent_wakes: z7.number().int().positive().default(2),
|
|
22734
|
+
tool_budget: z7.number().int().positive().default(8)
|
|
22711
22735
|
}).strict();
|
|
22712
22736
|
var OmoMemoryNudgeSchema = z7.object({
|
|
22713
22737
|
enabled: z7.boolean().default(true),
|
|
@@ -22755,9 +22779,20 @@ var OmoMemorySyncLayerSchema = z7.object({
|
|
|
22755
22779
|
var OmoMemorySearchLayerSchema = z7.object({
|
|
22756
22780
|
enabled: z7.boolean().optional()
|
|
22757
22781
|
}).strict();
|
|
22782
|
+
var OmoMemoryRecallEventCapsLayerSchema = z7.object({
|
|
22783
|
+
tool_args: z7.number().int().nonnegative().optional(),
|
|
22784
|
+
result_head: z7.number().int().nonnegative().optional(),
|
|
22785
|
+
assistant: z7.number().int().nonnegative().optional(),
|
|
22786
|
+
prompt: z7.number().int().nonnegative().optional()
|
|
22787
|
+
}).strict();
|
|
22758
22788
|
var OmoMemoryRecallLayerSchema = z7.object({
|
|
22759
22789
|
enabled: z7.boolean().optional(),
|
|
22760
|
-
max_items: z7.number().int().min(1).max(5).optional()
|
|
22790
|
+
max_items: z7.number().int().min(1).max(5).optional(),
|
|
22791
|
+
category: z7.string().min(1).optional(),
|
|
22792
|
+
event_caps: OmoMemoryRecallEventCapsLayerSchema.optional(),
|
|
22793
|
+
sidecar_max_tokens: z7.number().int().positive().optional(),
|
|
22794
|
+
max_concurrent_wakes: z7.number().int().positive().optional(),
|
|
22795
|
+
tool_budget: z7.number().int().positive().optional()
|
|
22761
22796
|
}).strict();
|
|
22762
22797
|
var OmoMemoryNudgeLayerSchema = z7.object({
|
|
22763
22798
|
enabled: z7.boolean().optional(),
|
|
@@ -22827,7 +22862,15 @@ var OmoMemorySettingsSchema = z7.object({
|
|
|
22827
22862
|
write_notice: OmoMemoryWriteNoticeSchema.default({ enabled: true }),
|
|
22828
22863
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
22829
22864
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
22830
|
-
recall: OmoMemoryRecallSchema.default({
|
|
22865
|
+
recall: OmoMemoryRecallSchema.default({
|
|
22866
|
+
enabled: true,
|
|
22867
|
+
max_items: 2,
|
|
22868
|
+
category: "quick",
|
|
22869
|
+
event_caps: { tool_args: 400, result_head: 600, assistant: 1500, prompt: 4000 },
|
|
22870
|
+
sidecar_max_tokens: 48000,
|
|
22871
|
+
max_concurrent_wakes: 2,
|
|
22872
|
+
tool_budget: 8
|
|
22873
|
+
}),
|
|
22831
22874
|
compile_warn_tokens: z7.number().int().positive().default(30000),
|
|
22832
22875
|
agents: z7.record(z7.string(), OmoMemoryAgentOverridesSchema).default({})
|
|
22833
22876
|
}).strict();
|
|
@@ -22865,46 +22908,61 @@ var OmoModelCatalogEntryLayerInputSchema = OmoModelCatalogEntryInputSchema.parti
|
|
|
22865
22908
|
var OmoModelCatalogEntryLayerSchema = z8.preprocess((value) => isRecord8(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryLayerInputSchema);
|
|
22866
22909
|
var OmoModelCatalogLayerSchema = z8.record(z8.string(), OmoModelCatalogEntryLayerSchema);
|
|
22867
22910
|
|
|
22911
|
+
// packages/omo-config-core/src/schema/model-profile.ts
|
|
22912
|
+
import * as z9 from "zod";
|
|
22913
|
+
function isRecord9(value) {
|
|
22914
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22915
|
+
}
|
|
22916
|
+
var OmoModelProfileInputSchema = z9.object({
|
|
22917
|
+
display_name: z9.string().optional(),
|
|
22918
|
+
models: z9.array(z9.union([z9.string(), OmoFallbackModelObjectSchema])).optional()
|
|
22919
|
+
}).strict();
|
|
22920
|
+
var OmoModelProfileSchema = z9.preprocess((value) => isRecord9(value) ? normalizeLegacyModelFields(value) : value, OmoModelProfileInputSchema);
|
|
22921
|
+
var OmoModelProfilesSchema = z9.record(z9.string(), OmoModelProfileSchema);
|
|
22922
|
+
var OmoModelProfileLayerInputSchema = OmoModelProfileInputSchema.partial();
|
|
22923
|
+
var OmoModelProfileLayerSchema = z9.preprocess((value) => isRecord9(value) ? normalizeLegacyModelFields(value) : value, OmoModelProfileLayerInputSchema);
|
|
22924
|
+
var OmoModelProfilesLayerSchema = z9.record(z9.string(), OmoModelProfileLayerSchema);
|
|
22925
|
+
|
|
22868
22926
|
// packages/omo-config-core/src/schema/task.ts
|
|
22869
22927
|
import { availableParallelism } from "os";
|
|
22870
|
-
import * as
|
|
22928
|
+
import * as z10 from "zod";
|
|
22871
22929
|
var DEFAULT_RESIDENCY_MAX_CHILDREN = 16;
|
|
22872
|
-
var ResidencyMaxChildrenInputSchema =
|
|
22873
|
-
var OmoTaskWaitSchema =
|
|
22874
|
-
min_ms:
|
|
22875
|
-
default_ms:
|
|
22876
|
-
max_ms:
|
|
22930
|
+
var ResidencyMaxChildrenInputSchema = z10.union([z10.number().int().nonnegative(), z10.literal("unlimited")]);
|
|
22931
|
+
var OmoTaskWaitSchema = z10.object({
|
|
22932
|
+
min_ms: z10.number().int().positive().default(5000),
|
|
22933
|
+
default_ms: z10.number().int().positive().default(60000),
|
|
22934
|
+
max_ms: z10.number().int().positive().default(600000)
|
|
22877
22935
|
}).strict();
|
|
22878
|
-
var OmoTaskTeamSettingsSchema =
|
|
22879
|
-
max_members:
|
|
22880
|
-
max_parallel_members:
|
|
22881
|
-
max_wall_clock_minutes:
|
|
22936
|
+
var OmoTaskTeamSettingsSchema = z10.object({
|
|
22937
|
+
max_members: z10.number().int().min(1).max(8).default(8),
|
|
22938
|
+
max_parallel_members: z10.number().int().min(1).max(8).default(4),
|
|
22939
|
+
max_wall_clock_minutes: z10.number().int().positive().default(120)
|
|
22882
22940
|
}).strict();
|
|
22883
|
-
var OmoTaskWarningsSchema =
|
|
22884
|
-
unavailable_categories:
|
|
22941
|
+
var OmoTaskWarningsSchema = z10.object({
|
|
22942
|
+
unavailable_categories: z10.boolean().default(true)
|
|
22885
22943
|
}).strict();
|
|
22886
|
-
var OmoTaskDagSettingsSchema =
|
|
22887
|
-
max_nodes_per_run:
|
|
22888
|
-
max_runs_per_session:
|
|
22889
|
-
subscriber_ring:
|
|
22890
|
-
heartbeat_ms:
|
|
22891
|
-
history_default_limit:
|
|
22892
|
-
history_max_limit:
|
|
22893
|
-
retention_days:
|
|
22894
|
-
max_prompt_bytes:
|
|
22944
|
+
var OmoTaskDagSettingsSchema = z10.object({
|
|
22945
|
+
max_nodes_per_run: z10.number().int().positive().default(64),
|
|
22946
|
+
max_runs_per_session: z10.number().int().positive().default(16),
|
|
22947
|
+
subscriber_ring: z10.number().int().positive().default(1000),
|
|
22948
|
+
heartbeat_ms: z10.number().int().positive().default(15000),
|
|
22949
|
+
history_default_limit: z10.number().int().positive().default(256),
|
|
22950
|
+
history_max_limit: z10.number().int().positive().default(1000),
|
|
22951
|
+
retention_days: z10.number().int().positive().default(7),
|
|
22952
|
+
max_prompt_bytes: z10.number().int().positive().default(262144)
|
|
22895
22953
|
}).strict();
|
|
22896
|
-
var OmoTaskSettingsSchema =
|
|
22897
|
-
default_execution_mode:
|
|
22898
|
-
default_concurrency:
|
|
22899
|
-
global_concurrency:
|
|
22900
|
-
provider_concurrency:
|
|
22901
|
-
model_concurrency:
|
|
22902
|
-
max_depth:
|
|
22954
|
+
var OmoTaskSettingsSchema = z10.object({
|
|
22955
|
+
default_execution_mode: z10.enum(["in-process", "process"]).default("in-process"),
|
|
22956
|
+
default_concurrency: z10.number().int().nonnegative().default(5),
|
|
22957
|
+
global_concurrency: z10.number().int().nonnegative().default(8),
|
|
22958
|
+
provider_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22959
|
+
model_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22960
|
+
max_depth: z10.number().int().nonnegative().default(1),
|
|
22903
22961
|
residency_max_children: ResidencyMaxChildrenInputSchema.default(8),
|
|
22904
|
-
ttl_ms:
|
|
22905
|
-
state_dir:
|
|
22906
|
-
reattach_on_reconcile:
|
|
22907
|
-
resume_children:
|
|
22962
|
+
ttl_ms: z10.number().int().positive().default(86400000),
|
|
22963
|
+
state_dir: z10.string().optional(),
|
|
22964
|
+
reattach_on_reconcile: z10.boolean().optional(),
|
|
22965
|
+
resume_children: z10.boolean().default(true),
|
|
22908
22966
|
warnings: OmoTaskWarningsSchema.default({ unavailable_categories: true }),
|
|
22909
22967
|
wait: OmoTaskWaitSchema.default({ min_ms: 5000, default_ms: 60000, max_ms: 600000 }),
|
|
22910
22968
|
team: OmoTaskTeamSettingsSchema.default({
|
|
@@ -22914,48 +22972,48 @@ var OmoTaskSettingsSchema = z9.object({
|
|
|
22914
22972
|
}),
|
|
22915
22973
|
dag: OmoTaskDagSettingsSchema.optional()
|
|
22916
22974
|
}).strict();
|
|
22917
|
-
var OmoTaskDagSettingsLayerSchema =
|
|
22918
|
-
max_nodes_per_run:
|
|
22919
|
-
max_runs_per_session:
|
|
22920
|
-
subscriber_ring:
|
|
22921
|
-
heartbeat_ms:
|
|
22922
|
-
history_default_limit:
|
|
22923
|
-
history_max_limit:
|
|
22924
|
-
retention_days:
|
|
22925
|
-
max_prompt_bytes:
|
|
22975
|
+
var OmoTaskDagSettingsLayerSchema = z10.object({
|
|
22976
|
+
max_nodes_per_run: z10.number().int().positive().optional(),
|
|
22977
|
+
max_runs_per_session: z10.number().int().positive().optional(),
|
|
22978
|
+
subscriber_ring: z10.number().int().positive().optional(),
|
|
22979
|
+
heartbeat_ms: z10.number().int().positive().optional(),
|
|
22980
|
+
history_default_limit: z10.number().int().positive().optional(),
|
|
22981
|
+
history_max_limit: z10.number().int().positive().optional(),
|
|
22982
|
+
retention_days: z10.number().int().positive().optional(),
|
|
22983
|
+
max_prompt_bytes: z10.number().int().positive().optional()
|
|
22926
22984
|
}).strict();
|
|
22927
|
-
var OmoTaskWaitLayerSchema =
|
|
22928
|
-
min_ms:
|
|
22929
|
-
default_ms:
|
|
22930
|
-
max_ms:
|
|
22985
|
+
var OmoTaskWaitLayerSchema = z10.object({
|
|
22986
|
+
min_ms: z10.number().int().positive().optional(),
|
|
22987
|
+
default_ms: z10.number().int().positive().optional(),
|
|
22988
|
+
max_ms: z10.number().int().positive().optional()
|
|
22931
22989
|
}).strict();
|
|
22932
|
-
var OmoTaskTeamSettingsLayerSchema =
|
|
22933
|
-
max_members:
|
|
22934
|
-
max_parallel_members:
|
|
22935
|
-
max_wall_clock_minutes:
|
|
22990
|
+
var OmoTaskTeamSettingsLayerSchema = z10.object({
|
|
22991
|
+
max_members: z10.number().int().min(1).max(8).optional(),
|
|
22992
|
+
max_parallel_members: z10.number().int().min(1).max(8).optional(),
|
|
22993
|
+
max_wall_clock_minutes: z10.number().int().positive().optional()
|
|
22936
22994
|
}).strict();
|
|
22937
|
-
var OmoTaskWarningsLayerSchema =
|
|
22938
|
-
unavailable_categories:
|
|
22995
|
+
var OmoTaskWarningsLayerSchema = z10.object({
|
|
22996
|
+
unavailable_categories: z10.boolean().optional()
|
|
22939
22997
|
}).strict();
|
|
22940
|
-
var OmoTaskSettingsLayerSchema =
|
|
22941
|
-
default_execution_mode:
|
|
22942
|
-
default_concurrency:
|
|
22943
|
-
global_concurrency:
|
|
22944
|
-
provider_concurrency:
|
|
22945
|
-
model_concurrency:
|
|
22946
|
-
max_depth:
|
|
22998
|
+
var OmoTaskSettingsLayerSchema = z10.object({
|
|
22999
|
+
default_execution_mode: z10.enum(["in-process", "process"]).optional(),
|
|
23000
|
+
default_concurrency: z10.number().int().nonnegative().optional(),
|
|
23001
|
+
global_concurrency: z10.number().int().nonnegative().optional(),
|
|
23002
|
+
provider_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
23003
|
+
model_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
23004
|
+
max_depth: z10.number().int().nonnegative().optional(),
|
|
22947
23005
|
residency_max_children: ResidencyMaxChildrenInputSchema.optional(),
|
|
22948
|
-
ttl_ms:
|
|
22949
|
-
state_dir:
|
|
22950
|
-
reattach_on_reconcile:
|
|
22951
|
-
resume_children:
|
|
23006
|
+
ttl_ms: z10.number().int().positive().optional(),
|
|
23007
|
+
state_dir: z10.string().optional(),
|
|
23008
|
+
reattach_on_reconcile: z10.boolean().optional(),
|
|
23009
|
+
resume_children: z10.boolean().optional(),
|
|
22952
23010
|
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
22953
23011
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
22954
23012
|
team: OmoTaskTeamSettingsLayerSchema.optional(),
|
|
22955
23013
|
dag: OmoTaskDagSettingsLayerSchema.optional()
|
|
22956
23014
|
}).strict();
|
|
22957
23015
|
function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism) {
|
|
22958
|
-
const record =
|
|
23016
|
+
const record = z10.record(z10.string(), z10.unknown()).parse(input);
|
|
22959
23017
|
return OmoTaskSettingsSchema.parse({
|
|
22960
23018
|
...record,
|
|
22961
23019
|
residency_max_children: record["residency_max_children"] ?? Math.min(DEFAULT_RESIDENCY_MAX_CHILDREN, Math.max(8, resolveParallelism() * 2)),
|
|
@@ -22964,39 +23022,39 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
22964
23022
|
}
|
|
22965
23023
|
|
|
22966
23024
|
// packages/omo-config-core/src/schema/team.ts
|
|
22967
|
-
import * as
|
|
22968
|
-
var OmoTeamMemberBaseSchema =
|
|
22969
|
-
name:
|
|
22970
|
-
cwd:
|
|
22971
|
-
worktreePath:
|
|
22972
|
-
subscriptions:
|
|
22973
|
-
backendType:
|
|
22974
|
-
color:
|
|
22975
|
-
isActive:
|
|
23025
|
+
import * as z11 from "zod";
|
|
23026
|
+
var OmoTeamMemberBaseSchema = z11.object({
|
|
23027
|
+
name: z11.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
23028
|
+
cwd: z11.string().optional(),
|
|
23029
|
+
worktreePath: z11.string().optional(),
|
|
23030
|
+
subscriptions: z11.array(z11.string()).optional(),
|
|
23031
|
+
backendType: z11.enum(["in-process", "tmux"]).default("in-process"),
|
|
23032
|
+
color: z11.string().optional(),
|
|
23033
|
+
isActive: z11.boolean().default(true)
|
|
22976
23034
|
}).strict();
|
|
22977
23035
|
var OmoTeamCategoryMemberSchema = OmoTeamMemberBaseSchema.extend({
|
|
22978
|
-
kind:
|
|
22979
|
-
category:
|
|
22980
|
-
prompt:
|
|
23036
|
+
kind: z11.literal("category"),
|
|
23037
|
+
category: z11.string().min(1),
|
|
23038
|
+
prompt: z11.string().min(1)
|
|
22981
23039
|
});
|
|
22982
23040
|
var OmoTeamSubagentMemberSchema = OmoTeamMemberBaseSchema.extend({
|
|
22983
|
-
kind:
|
|
22984
|
-
subagent_type:
|
|
22985
|
-
prompt:
|
|
23041
|
+
kind: z11.literal("subagent_type"),
|
|
23042
|
+
subagent_type: z11.string().min(1),
|
|
23043
|
+
prompt: z11.string().optional()
|
|
22986
23044
|
});
|
|
22987
|
-
var OmoTeamMemberSchema =
|
|
23045
|
+
var OmoTeamMemberSchema = z11.discriminatedUnion("kind", [
|
|
22988
23046
|
OmoTeamCategoryMemberSchema,
|
|
22989
23047
|
OmoTeamSubagentMemberSchema
|
|
22990
23048
|
]);
|
|
22991
|
-
var OmoTeamSpecBaseSchema =
|
|
22992
|
-
version:
|
|
22993
|
-
name:
|
|
22994
|
-
description:
|
|
22995
|
-
createdAt:
|
|
22996
|
-
leadAgentId:
|
|
22997
|
-
teamAllowedPaths:
|
|
22998
|
-
sessionPermission:
|
|
22999
|
-
members:
|
|
23049
|
+
var OmoTeamSpecBaseSchema = z11.object({
|
|
23050
|
+
version: z11.literal(1).default(1),
|
|
23051
|
+
name: z11.string().min(1).regex(/^[a-z0-9-]+$/).optional(),
|
|
23052
|
+
description: z11.string().optional(),
|
|
23053
|
+
createdAt: z11.number().int().positive().optional(),
|
|
23054
|
+
leadAgentId: z11.string().optional(),
|
|
23055
|
+
teamAllowedPaths: z11.array(z11.string()).optional(),
|
|
23056
|
+
sessionPermission: z11.string().optional(),
|
|
23057
|
+
members: z11.array(OmoTeamMemberSchema).min(1).max(8)
|
|
23000
23058
|
}).strict();
|
|
23001
23059
|
var OmoTeamSpecSchema = OmoTeamSpecBaseSchema.superRefine((teamSpec, ctx) => {
|
|
23002
23060
|
if (teamSpec.leadAgentId === undefined && teamSpec.members.length > 1) {
|
|
@@ -23008,38 +23066,38 @@ var OmoTeamSpecSchema = OmoTeamSpecBaseSchema.superRefine((teamSpec, ctx) => {
|
|
|
23008
23066
|
}
|
|
23009
23067
|
});
|
|
23010
23068
|
var OmoTeamSpecLayerSchema = OmoTeamSpecBaseSchema.partial();
|
|
23011
|
-
var OmoTeamsConfigSchema =
|
|
23012
|
-
var OmoTeamsConfigLayerSchema =
|
|
23069
|
+
var OmoTeamsConfigSchema = z11.record(z11.string(), OmoTeamSpecSchema);
|
|
23070
|
+
var OmoTeamsConfigLayerSchema = z11.record(z11.string(), OmoTeamSpecLayerSchema);
|
|
23013
23071
|
|
|
23014
23072
|
// packages/omo-config-core/src/schema/telemetry.ts
|
|
23015
|
-
import * as
|
|
23073
|
+
import * as z12 from "zod";
|
|
23016
23074
|
var OmoTelemetrySettingsShape = {
|
|
23017
|
-
enabled:
|
|
23075
|
+
enabled: z12.boolean()
|
|
23018
23076
|
};
|
|
23019
|
-
var OmoTelemetrySettingsLayerSchema =
|
|
23077
|
+
var OmoTelemetrySettingsLayerSchema = z12.object(OmoTelemetrySettingsShape).partial().strict();
|
|
23020
23078
|
var OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
|
|
23021
|
-
enabled:
|
|
23079
|
+
enabled: z12.boolean().default(true)
|
|
23022
23080
|
}).strict();
|
|
23023
23081
|
|
|
23024
23082
|
// packages/omo-config-core/src/schema/format-on-mutation.ts
|
|
23025
|
-
import * as
|
|
23026
|
-
var mode =
|
|
23027
|
-
var languages =
|
|
23028
|
-
var OmoFormatOnMutationLayerSchema =
|
|
23083
|
+
import * as z13 from "zod";
|
|
23084
|
+
var mode = z13.enum(["off", "best-effort", "required"]);
|
|
23085
|
+
var languages = z13.record(z13.string(), z13.boolean()).optional();
|
|
23086
|
+
var OmoFormatOnMutationLayerSchema = z13.object({
|
|
23029
23087
|
mode: mode.optional(),
|
|
23030
23088
|
languages,
|
|
23031
|
-
maxFileBytes:
|
|
23032
|
-
timeoutMs:
|
|
23089
|
+
maxFileBytes: z13.number().int().positive().optional(),
|
|
23090
|
+
timeoutMs: z13.number().int().positive().optional()
|
|
23033
23091
|
}).strict();
|
|
23034
23092
|
var OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
23035
23093
|
mode: mode.default("best-effort"),
|
|
23036
|
-
maxFileBytes:
|
|
23037
|
-
timeoutMs:
|
|
23094
|
+
maxFileBytes: z13.number().int().positive().default(1048576),
|
|
23095
|
+
timeoutMs: z13.number().int().positive().default(3000)
|
|
23038
23096
|
}).strict();
|
|
23039
23097
|
|
|
23040
23098
|
// packages/omo-config-core/src/schema/config.ts
|
|
23041
|
-
var OmoOpenCodeHarnessConfigSchema =
|
|
23042
|
-
var OmoTypedHarnessConfigSchema =
|
|
23099
|
+
var OmoOpenCodeHarnessConfigSchema = z14.record(z14.string(), z14.unknown());
|
|
23100
|
+
var OmoTypedHarnessConfigSchema = z14.object({
|
|
23043
23101
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23044
23102
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23045
23103
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -23047,10 +23105,12 @@ var OmoTypedHarnessConfigSchema = z13.object({
|
|
|
23047
23105
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23048
23106
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23049
23107
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23108
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23109
|
+
model_profile: z14.string().optional(),
|
|
23050
23110
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23051
23111
|
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
23052
23112
|
}).strict();
|
|
23053
|
-
var OmoConfigProfileSchema =
|
|
23113
|
+
var OmoConfigProfileSchema = z14.object({
|
|
23054
23114
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23055
23115
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23056
23116
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -23058,47 +23118,53 @@ var OmoConfigProfileSchema = z13.object({
|
|
|
23058
23118
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23059
23119
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23060
23120
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23121
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23122
|
+
model_profile: z14.string().optional(),
|
|
23061
23123
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23062
23124
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
23063
23125
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23064
23126
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23065
23127
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
23066
23128
|
}).strict();
|
|
23067
|
-
var OmoConfigSchema =
|
|
23129
|
+
var OmoConfigSchema = z14.object({
|
|
23068
23130
|
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
23069
|
-
$schema:
|
|
23131
|
+
$schema: z14.string().optional(),
|
|
23070
23132
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23071
23133
|
agents: OmoAgentsConfigSchema.optional(),
|
|
23072
23134
|
git_master: OmoGitMasterSettingsSchema.optional(),
|
|
23073
23135
|
task: OmoTaskSettingsSchema.optional(),
|
|
23074
23136
|
teams: OmoTeamsConfigSchema.optional(),
|
|
23075
23137
|
models: OmoModelCatalogSchema.optional(),
|
|
23138
|
+
model_profiles: OmoModelProfilesSchema.optional(),
|
|
23139
|
+
model_profile: z14.string().optional(),
|
|
23076
23140
|
memory: OmoMemorySettingsSchema.optional(),
|
|
23077
23141
|
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
23078
23142
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23079
23143
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23080
23144
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
23081
|
-
profiles:
|
|
23082
|
-
_migrations:
|
|
23083
|
-
legacy_migrations:
|
|
23145
|
+
profiles: z14.record(z14.string(), OmoConfigProfileSchema).default({}),
|
|
23146
|
+
_migrations: z14.array(z14.string()).optional(),
|
|
23147
|
+
legacy_migrations: z14.record(z14.string(), z14.unknown()).optional()
|
|
23084
23148
|
}).strict();
|
|
23085
|
-
var OmoConfigLayerSchema =
|
|
23149
|
+
var OmoConfigLayerSchema = z14.object({
|
|
23086
23150
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23087
|
-
$schema:
|
|
23151
|
+
$schema: z14.string().optional(),
|
|
23088
23152
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23089
23153
|
agents: OmoAgentsConfigSchema.optional(),
|
|
23090
23154
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
23091
23155
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23092
23156
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23093
23157
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23158
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23159
|
+
model_profile: z14.string().optional(),
|
|
23094
23160
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23095
23161
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
23096
23162
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23097
23163
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23098
23164
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
23099
|
-
profiles:
|
|
23100
|
-
_migrations:
|
|
23101
|
-
legacy_migrations:
|
|
23165
|
+
profiles: z14.record(z14.string(), OmoConfigProfileSchema).optional(),
|
|
23166
|
+
_migrations: z14.array(z14.string()).optional(),
|
|
23167
|
+
legacy_migrations: z14.record(z14.string(), z14.unknown()).optional()
|
|
23102
23168
|
}).strict();
|
|
23103
23169
|
|
|
23104
23170
|
// packages/omo-config-core/src/loader/loader.ts
|
|
@@ -23346,21 +23412,21 @@ function hasUnsafeUnrecognizedKey(issues) {
|
|
|
23346
23412
|
function hasTamperedPrototype(value) {
|
|
23347
23413
|
if (Array.isArray(value))
|
|
23348
23414
|
return value.some((entry) => hasTamperedPrototype(entry));
|
|
23349
|
-
if (!
|
|
23415
|
+
if (!isRecord10(value))
|
|
23350
23416
|
return false;
|
|
23351
23417
|
const prototype = Object.getPrototypeOf(value);
|
|
23352
23418
|
if (prototype !== Object.prototype && prototype !== null)
|
|
23353
23419
|
return true;
|
|
23354
23420
|
return Object.values(value).some((entry) => hasTamperedPrototype(entry));
|
|
23355
23421
|
}
|
|
23356
|
-
function
|
|
23422
|
+
function isRecord10(value) {
|
|
23357
23423
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23358
23424
|
}
|
|
23359
23425
|
function containerAt(record, path) {
|
|
23360
23426
|
let container = record;
|
|
23361
23427
|
for (const segment of path) {
|
|
23362
23428
|
const next = container[segment];
|
|
23363
|
-
if (!
|
|
23429
|
+
if (!isRecord10(next))
|
|
23364
23430
|
return null;
|
|
23365
23431
|
container = next;
|
|
23366
23432
|
}
|
|
@@ -23598,6 +23664,38 @@ function resolveCategoryDefinition(definition, catalog, cycleNames) {
|
|
|
23598
23664
|
...definition.fallback_models === undefined ? {} : { fallback_models: resolveFallbackModels(definition.fallback_models, catalog, cycleNames) }
|
|
23599
23665
|
};
|
|
23600
23666
|
}
|
|
23667
|
+
function resolveModelProfile(definition, catalog, cycleNames) {
|
|
23668
|
+
return {
|
|
23669
|
+
...definition,
|
|
23670
|
+
...definition.models === undefined ? {} : { models: definition.models.map((entry) => resolveModelEntry(entry, catalog, cycleNames)) }
|
|
23671
|
+
};
|
|
23672
|
+
}
|
|
23673
|
+
function profileShadowDiagnostics(view) {
|
|
23674
|
+
if (view.model_profiles === undefined || view.models === undefined)
|
|
23675
|
+
return [];
|
|
23676
|
+
return Object.keys(view.model_profiles).flatMap((name) => view.models?.[name] === undefined ? [] : [{
|
|
23677
|
+
kind: "validation",
|
|
23678
|
+
message: `Model profile "${name}" shadows a model catalog entry of the same name`,
|
|
23679
|
+
path: `model_profiles.${name}`
|
|
23680
|
+
}]);
|
|
23681
|
+
}
|
|
23682
|
+
function profileSpliceDiagnostics(section, definitions, profileNames) {
|
|
23683
|
+
if (definitions === undefined || profileNames.size === 0)
|
|
23684
|
+
return [];
|
|
23685
|
+
return Object.entries(definitions).flatMap(([name, definition]) => (definition.models ?? []).flatMap((entry, index) => typeof entry !== "string" || !profileNames.has(entry) ? [] : [{
|
|
23686
|
+
kind: "validation",
|
|
23687
|
+
message: `"${entry}" is a model profile; splicing a profile into a category chain is not supported yet`,
|
|
23688
|
+
path: `${section}.${name}.models.${index}`
|
|
23689
|
+
}]));
|
|
23690
|
+
}
|
|
23691
|
+
function modelProfileDiagnostics(view) {
|
|
23692
|
+
const profileNames = new Set(Object.keys(view.model_profiles ?? {}));
|
|
23693
|
+
return [
|
|
23694
|
+
...profileShadowDiagnostics(view),
|
|
23695
|
+
...profileSpliceDiagnostics("categories", view.categories, profileNames),
|
|
23696
|
+
...profileSpliceDiagnostics("agents", view.agents, profileNames)
|
|
23697
|
+
];
|
|
23698
|
+
}
|
|
23601
23699
|
function cycleDiagnostics(catalog) {
|
|
23602
23700
|
if (catalog === undefined)
|
|
23603
23701
|
return [];
|
|
@@ -23608,9 +23706,10 @@ function cycleDiagnostics(catalog) {
|
|
|
23608
23706
|
}));
|
|
23609
23707
|
}
|
|
23610
23708
|
function resolveModelReferences(view) {
|
|
23611
|
-
const
|
|
23709
|
+
const cycles = cycleDiagnostics(view.models);
|
|
23710
|
+
const diagnostics = [...cycles, ...modelProfileDiagnostics(view)];
|
|
23612
23711
|
const cycleNames = new Set;
|
|
23613
|
-
for (const diagnostic of
|
|
23712
|
+
for (const diagnostic of cycles) {
|
|
23614
23713
|
const name = diagnostic.path.split(".")[1];
|
|
23615
23714
|
if (name !== undefined)
|
|
23616
23715
|
cycleNames.add(name);
|
|
@@ -23623,12 +23722,17 @@ function resolveModelReferences(view) {
|
|
|
23623
23722
|
name,
|
|
23624
23723
|
resolveCategoryDefinition(definition, view.models, cycleNames)
|
|
23625
23724
|
]));
|
|
23725
|
+
const modelProfiles = view.model_profiles === undefined ? undefined : Object.fromEntries(Object.entries(view.model_profiles).map(([name, definition]) => [
|
|
23726
|
+
name,
|
|
23727
|
+
resolveModelProfile(definition, view.models, cycleNames)
|
|
23728
|
+
]));
|
|
23626
23729
|
return {
|
|
23627
23730
|
diagnostics,
|
|
23628
23731
|
view: {
|
|
23629
23732
|
...view,
|
|
23630
23733
|
...agents === undefined ? {} : { agents },
|
|
23631
|
-
...categories === undefined ? {} : { categories }
|
|
23734
|
+
...categories === undefined ? {} : { categories },
|
|
23735
|
+
...modelProfiles === undefined ? {} : { model_profiles: modelProfiles }
|
|
23632
23736
|
}
|
|
23633
23737
|
};
|
|
23634
23738
|
}
|
|
@@ -24755,8 +24859,8 @@ function findUnknownKeyPaths(schema, value) {
|
|
|
24755
24859
|
}
|
|
24756
24860
|
|
|
24757
24861
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
24758
|
-
import { z as
|
|
24759
|
-
var BuiltinAgentNameSchema =
|
|
24862
|
+
import { z as z15 } from "zod";
|
|
24863
|
+
var BuiltinAgentNameSchema = z15.enum([
|
|
24760
24864
|
"sisyphus",
|
|
24761
24865
|
"hephaestus",
|
|
24762
24866
|
"prometheus",
|
|
@@ -24769,7 +24873,7 @@ var BuiltinAgentNameSchema = z14.enum([
|
|
|
24769
24873
|
"atlas",
|
|
24770
24874
|
"sisyphus-junior"
|
|
24771
24875
|
]);
|
|
24772
|
-
var BuiltinSkillNameSchema =
|
|
24876
|
+
var BuiltinSkillNameSchema = z15.enum([
|
|
24773
24877
|
"playwright",
|
|
24774
24878
|
"agent-browser",
|
|
24775
24879
|
"dev-browser",
|
|
@@ -24784,7 +24888,7 @@ var BuiltinSkillNameSchema = z14.enum([
|
|
|
24784
24888
|
"visual-qa",
|
|
24785
24889
|
"team-mode"
|
|
24786
24890
|
]);
|
|
24787
|
-
var OverridableAgentNameSchema =
|
|
24891
|
+
var OverridableAgentNameSchema = z15.enum([
|
|
24788
24892
|
"build",
|
|
24789
24893
|
"plan",
|
|
24790
24894
|
"sisyphus",
|
|
@@ -24801,41 +24905,41 @@ var OverridableAgentNameSchema = z14.enum([
|
|
|
24801
24905
|
"atlas"
|
|
24802
24906
|
]);
|
|
24803
24907
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
24804
|
-
import { z as
|
|
24908
|
+
import { z as z18 } from "zod";
|
|
24805
24909
|
|
|
24806
24910
|
// packages/omo-opencode/src/config/schema/fallback-models.ts
|
|
24807
|
-
import { z as
|
|
24808
|
-
var FallbackModelObjectSchema =
|
|
24809
|
-
model:
|
|
24911
|
+
import { z as z16 } from "zod";
|
|
24912
|
+
var FallbackModelObjectSchema = z16.object({
|
|
24913
|
+
model: z16.string(),
|
|
24810
24914
|
reasoning: OmoReasoningSchema.optional(),
|
|
24811
|
-
variant:
|
|
24812
|
-
reasoningEffort:
|
|
24813
|
-
temperature:
|
|
24814
|
-
top_p:
|
|
24815
|
-
maxTokens:
|
|
24816
|
-
thinking:
|
|
24817
|
-
type:
|
|
24818
|
-
budgetTokens:
|
|
24915
|
+
variant: z16.string().optional(),
|
|
24916
|
+
reasoningEffort: z16.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
24917
|
+
temperature: z16.number().min(0).max(2).optional(),
|
|
24918
|
+
top_p: z16.number().min(0).max(1).optional(),
|
|
24919
|
+
maxTokens: z16.number().optional(),
|
|
24920
|
+
thinking: z16.object({
|
|
24921
|
+
type: z16.enum(["enabled", "disabled"]),
|
|
24922
|
+
budgetTokens: z16.number().optional()
|
|
24819
24923
|
}).optional()
|
|
24820
24924
|
});
|
|
24821
|
-
var FallbackModelStringArraySchema =
|
|
24822
|
-
var FallbackModelObjectArraySchema =
|
|
24823
|
-
var FallbackModelMixedArraySchema =
|
|
24824
|
-
var FallbackModelsSchema =
|
|
24825
|
-
|
|
24925
|
+
var FallbackModelStringArraySchema = z16.array(z16.string());
|
|
24926
|
+
var FallbackModelObjectArraySchema = z16.array(FallbackModelObjectSchema);
|
|
24927
|
+
var FallbackModelMixedArraySchema = z16.array(z16.union([z16.string(), FallbackModelObjectSchema]));
|
|
24928
|
+
var FallbackModelsSchema = z16.union([
|
|
24929
|
+
z16.string(),
|
|
24826
24930
|
FallbackModelStringArraySchema,
|
|
24827
24931
|
FallbackModelObjectArraySchema,
|
|
24828
24932
|
FallbackModelMixedArraySchema
|
|
24829
24933
|
]);
|
|
24830
24934
|
|
|
24831
24935
|
// packages/omo-opencode/src/config/schema/internal/permission.ts
|
|
24832
|
-
import { z as
|
|
24833
|
-
var PermissionValueSchema =
|
|
24834
|
-
var BashPermissionSchema =
|
|
24936
|
+
import { z as z17 } from "zod";
|
|
24937
|
+
var PermissionValueSchema = z17.enum(["ask", "allow", "deny"]);
|
|
24938
|
+
var BashPermissionSchema = z17.union([
|
|
24835
24939
|
PermissionValueSchema,
|
|
24836
|
-
|
|
24940
|
+
z17.record(z17.string(), PermissionValueSchema)
|
|
24837
24941
|
]);
|
|
24838
|
-
var AgentPermissionSchema =
|
|
24942
|
+
var AgentPermissionSchema = z17.object({
|
|
24839
24943
|
edit: PermissionValueSchema.optional(),
|
|
24840
24944
|
bash: BashPermissionSchema.optional(),
|
|
24841
24945
|
webfetch: PermissionValueSchema.optional(),
|
|
@@ -24845,50 +24949,50 @@ var AgentPermissionSchema = z16.object({
|
|
|
24845
24949
|
}).catchall(PermissionValueSchema.optional());
|
|
24846
24950
|
|
|
24847
24951
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
24848
|
-
var AgentOverrideConfigSchema =
|
|
24849
|
-
model:
|
|
24850
|
-
models:
|
|
24952
|
+
var AgentOverrideConfigSchema = z18.object({
|
|
24953
|
+
model: z18.string().optional(),
|
|
24954
|
+
models: z18.array(z18.union([z18.string(), FallbackModelObjectSchema])).optional(),
|
|
24851
24955
|
fallback_models: FallbackModelsSchema.optional(),
|
|
24852
24956
|
reasoning: OmoReasoningSchema.optional(),
|
|
24853
|
-
variant:
|
|
24854
|
-
category:
|
|
24855
|
-
skills:
|
|
24856
|
-
temperature:
|
|
24857
|
-
top_p:
|
|
24858
|
-
prompt:
|
|
24859
|
-
prompt_append:
|
|
24860
|
-
tools:
|
|
24861
|
-
disable:
|
|
24862
|
-
description:
|
|
24863
|
-
mode:
|
|
24864
|
-
color:
|
|
24865
|
-
displayName:
|
|
24957
|
+
variant: z18.string().optional(),
|
|
24958
|
+
category: z18.string().optional(),
|
|
24959
|
+
skills: z18.array(z18.string()).optional(),
|
|
24960
|
+
temperature: z18.number().min(0).max(2).optional(),
|
|
24961
|
+
top_p: z18.number().min(0).max(1).optional(),
|
|
24962
|
+
prompt: z18.string().optional(),
|
|
24963
|
+
prompt_append: z18.string().optional(),
|
|
24964
|
+
tools: z18.record(z18.string(), z18.boolean()).optional(),
|
|
24965
|
+
disable: z18.boolean().optional(),
|
|
24966
|
+
description: z18.string().optional(),
|
|
24967
|
+
mode: z18.enum(["subagent", "primary", "all"]).optional(),
|
|
24968
|
+
color: z18.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
24969
|
+
displayName: z18.string().optional(),
|
|
24866
24970
|
permission: AgentPermissionSchema.optional(),
|
|
24867
|
-
maxTokens:
|
|
24868
|
-
thinking:
|
|
24869
|
-
type:
|
|
24870
|
-
budgetTokens:
|
|
24971
|
+
maxTokens: z18.number().optional(),
|
|
24972
|
+
thinking: z18.object({
|
|
24973
|
+
type: z18.enum(["enabled", "disabled"]),
|
|
24974
|
+
budgetTokens: z18.number().optional()
|
|
24871
24975
|
}).optional(),
|
|
24872
|
-
reasoningEffort:
|
|
24873
|
-
textVerbosity:
|
|
24874
|
-
providerOptions:
|
|
24875
|
-
ultrawork:
|
|
24876
|
-
model:
|
|
24976
|
+
reasoningEffort: z18.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
24977
|
+
textVerbosity: z18.enum(["low", "medium", "high"]).optional(),
|
|
24978
|
+
providerOptions: z18.record(z18.string(), z18.unknown()).optional(),
|
|
24979
|
+
ultrawork: z18.object({
|
|
24980
|
+
model: z18.string().optional(),
|
|
24877
24981
|
reasoning: OmoReasoningSchema.optional(),
|
|
24878
|
-
variant:
|
|
24982
|
+
variant: z18.string().optional()
|
|
24879
24983
|
}).optional(),
|
|
24880
|
-
compaction:
|
|
24881
|
-
model:
|
|
24984
|
+
compaction: z18.object({
|
|
24985
|
+
model: z18.string().optional(),
|
|
24882
24986
|
reasoning: OmoReasoningSchema.optional(),
|
|
24883
|
-
variant:
|
|
24987
|
+
variant: z18.string().optional()
|
|
24884
24988
|
}).optional()
|
|
24885
24989
|
});
|
|
24886
|
-
var AgentOverridesSchema =
|
|
24990
|
+
var AgentOverridesSchema = z18.object({
|
|
24887
24991
|
build: AgentOverrideConfigSchema.optional(),
|
|
24888
24992
|
plan: AgentOverrideConfigSchema.optional(),
|
|
24889
24993
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
24890
24994
|
hephaestus: AgentOverrideConfigSchema.extend({
|
|
24891
|
-
allow_non_gpt_model:
|
|
24995
|
+
allow_non_gpt_model: z18.boolean().optional()
|
|
24892
24996
|
}).optional(),
|
|
24893
24997
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
24894
24998
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
@@ -24902,72 +25006,72 @@ var AgentOverridesSchema = z17.object({
|
|
|
24902
25006
|
atlas: AgentOverrideConfigSchema.optional()
|
|
24903
25007
|
}).catchall(AgentOverrideConfigSchema.optional());
|
|
24904
25008
|
// packages/omo-opencode/src/config/schema/babysitting.ts
|
|
24905
|
-
import { z as
|
|
24906
|
-
var BabysittingConfigSchema =
|
|
24907
|
-
timeout_ms:
|
|
25009
|
+
import { z as z19 } from "zod";
|
|
25010
|
+
var BabysittingConfigSchema = z19.object({
|
|
25011
|
+
timeout_ms: z19.number().default(120000)
|
|
24908
25012
|
});
|
|
24909
25013
|
// packages/omo-opencode/src/config/schema/background-task.ts
|
|
24910
|
-
import { z as
|
|
24911
|
-
var CircuitBreakerConfigSchema =
|
|
24912
|
-
enabled:
|
|
24913
|
-
maxToolCalls:
|
|
24914
|
-
consecutiveThreshold:
|
|
25014
|
+
import { z as z20 } from "zod";
|
|
25015
|
+
var CircuitBreakerConfigSchema = z20.object({
|
|
25016
|
+
enabled: z20.boolean().optional(),
|
|
25017
|
+
maxToolCalls: z20.number().int().min(10).optional(),
|
|
25018
|
+
consecutiveThreshold: z20.number().int().min(5).optional()
|
|
24915
25019
|
});
|
|
24916
|
-
var BackgroundTaskConfigSchema =
|
|
24917
|
-
defaultConcurrency:
|
|
24918
|
-
providerConcurrency:
|
|
24919
|
-
modelConcurrency:
|
|
24920
|
-
maxDepth:
|
|
24921
|
-
maxLiveDescendantsPerRoot:
|
|
24922
|
-
staleTimeoutMs:
|
|
24923
|
-
messageStalenessTimeoutMs:
|
|
24924
|
-
taskTtlMs:
|
|
24925
|
-
sessionGoneTimeoutMs:
|
|
24926
|
-
taskCleanupDelayMs:
|
|
24927
|
-
syncPollTimeoutMs:
|
|
24928
|
-
maxToolCalls:
|
|
25020
|
+
var BackgroundTaskConfigSchema = z20.object({
|
|
25021
|
+
defaultConcurrency: z20.number().min(0).optional(),
|
|
25022
|
+
providerConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
|
|
25023
|
+
modelConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
|
|
25024
|
+
maxDepth: z20.number().int().min(1).optional(),
|
|
25025
|
+
maxLiveDescendantsPerRoot: z20.number().int().min(0).optional(),
|
|
25026
|
+
staleTimeoutMs: z20.number().min(60000).optional(),
|
|
25027
|
+
messageStalenessTimeoutMs: z20.number().min(60000).optional(),
|
|
25028
|
+
taskTtlMs: z20.number().min(300000).optional(),
|
|
25029
|
+
sessionGoneTimeoutMs: z20.number().min(1e4).optional(),
|
|
25030
|
+
taskCleanupDelayMs: z20.number().min(60000).optional(),
|
|
25031
|
+
syncPollTimeoutMs: z20.number().min(60000).optional(),
|
|
25032
|
+
maxToolCalls: z20.number().int().min(10).optional(),
|
|
24929
25033
|
circuitBreaker: CircuitBreakerConfigSchema.optional()
|
|
24930
25034
|
});
|
|
24931
25035
|
// packages/omo-opencode/src/config/schema/browser-automation.ts
|
|
24932
|
-
import { z as
|
|
24933
|
-
var BrowserAutomationProviderSchema =
|
|
25036
|
+
import { z as z21 } from "zod";
|
|
25037
|
+
var BrowserAutomationProviderSchema = z21.enum([
|
|
24934
25038
|
"playwright",
|
|
24935
25039
|
"agent-browser",
|
|
24936
25040
|
"dev-browser",
|
|
24937
25041
|
"playwright-cli"
|
|
24938
25042
|
]);
|
|
24939
|
-
var BrowserAutomationConfigSchema =
|
|
25043
|
+
var BrowserAutomationConfigSchema = z21.object({
|
|
24940
25044
|
provider: BrowserAutomationProviderSchema.default("playwright"),
|
|
24941
|
-
playwright_mcp_args:
|
|
25045
|
+
playwright_mcp_args: z21.array(z21.string()).optional()
|
|
24942
25046
|
});
|
|
24943
25047
|
// packages/omo-opencode/src/config/schema/categories.ts
|
|
24944
|
-
import { z as
|
|
24945
|
-
var CategoryConfigSchema =
|
|
24946
|
-
description:
|
|
24947
|
-
model:
|
|
24948
|
-
models:
|
|
25048
|
+
import { z as z22 } from "zod";
|
|
25049
|
+
var CategoryConfigSchema = z22.object({
|
|
25050
|
+
description: z22.string().optional(),
|
|
25051
|
+
model: z22.string().optional(),
|
|
25052
|
+
models: z22.array(z22.union([z22.string(), FallbackModelObjectSchema])).optional(),
|
|
24949
25053
|
fallback_models: FallbackModelsSchema.optional(),
|
|
24950
25054
|
reasoning: OmoReasoningSchema.optional(),
|
|
24951
|
-
variant:
|
|
24952
|
-
temperature:
|
|
24953
|
-
top_p:
|
|
24954
|
-
max_tokens:
|
|
24955
|
-
provider_options:
|
|
24956
|
-
maxTokens:
|
|
24957
|
-
thinking:
|
|
24958
|
-
type:
|
|
24959
|
-
budgetTokens:
|
|
25055
|
+
variant: z22.string().optional(),
|
|
25056
|
+
temperature: z22.number().min(0).max(2).optional(),
|
|
25057
|
+
top_p: z22.number().min(0).max(1).optional(),
|
|
25058
|
+
max_tokens: z22.number().int().positive().optional(),
|
|
25059
|
+
provider_options: z22.record(z22.string(), z22.unknown()).optional(),
|
|
25060
|
+
maxTokens: z22.number().optional(),
|
|
25061
|
+
thinking: z22.object({
|
|
25062
|
+
type: z22.enum(["enabled", "disabled"]),
|
|
25063
|
+
budgetTokens: z22.number().optional()
|
|
24960
25064
|
}).optional(),
|
|
24961
|
-
reasoningEffort:
|
|
24962
|
-
textVerbosity:
|
|
24963
|
-
tools:
|
|
24964
|
-
prompt_append:
|
|
24965
|
-
max_prompt_tokens:
|
|
24966
|
-
is_unstable_agent:
|
|
24967
|
-
disable:
|
|
24968
|
-
warn_unavailable:
|
|
25065
|
+
reasoningEffort: z22.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
25066
|
+
textVerbosity: z22.enum(["low", "medium", "high"]).optional(),
|
|
25067
|
+
tools: z22.record(z22.string(), z22.boolean()).optional(),
|
|
25068
|
+
prompt_append: z22.string().optional(),
|
|
25069
|
+
max_prompt_tokens: z22.number().int().positive().optional(),
|
|
25070
|
+
is_unstable_agent: z22.boolean().optional(),
|
|
25071
|
+
disable: z22.boolean().optional(),
|
|
25072
|
+
warn_unavailable: z22.boolean().optional()
|
|
24969
25073
|
});
|
|
24970
|
-
var BuiltinCategoryNameSchema =
|
|
25074
|
+
var BuiltinCategoryNameSchema = z22.enum([
|
|
24971
25075
|
"visual-engineering",
|
|
24972
25076
|
"ultrabrain",
|
|
24973
25077
|
"deep",
|
|
@@ -24977,29 +25081,29 @@ var BuiltinCategoryNameSchema = z21.enum([
|
|
|
24977
25081
|
"unspecified-high",
|
|
24978
25082
|
"writing"
|
|
24979
25083
|
]);
|
|
24980
|
-
var CategoriesConfigSchema =
|
|
25084
|
+
var CategoriesConfigSchema = z22.record(z22.string(), CategoryConfigSchema);
|
|
24981
25085
|
// packages/omo-opencode/src/config/schema/claude-code.ts
|
|
24982
|
-
import { z as
|
|
24983
|
-
var ClaudeCodeConfigSchema =
|
|
24984
|
-
mcp:
|
|
24985
|
-
commands:
|
|
24986
|
-
skills:
|
|
24987
|
-
agents:
|
|
24988
|
-
hooks:
|
|
24989
|
-
plugins:
|
|
24990
|
-
plugins_override:
|
|
24991
|
-
anthropic_provider:
|
|
25086
|
+
import { z as z23 } from "zod";
|
|
25087
|
+
var ClaudeCodeConfigSchema = z23.object({
|
|
25088
|
+
mcp: z23.boolean().optional(),
|
|
25089
|
+
commands: z23.boolean().optional(),
|
|
25090
|
+
skills: z23.boolean().optional(),
|
|
25091
|
+
agents: z23.boolean().optional(),
|
|
25092
|
+
hooks: z23.boolean().optional(),
|
|
25093
|
+
plugins: z23.boolean().optional(),
|
|
25094
|
+
plugins_override: z23.record(z23.string(), z23.boolean()).optional(),
|
|
25095
|
+
anthropic_provider: z23.string().trim().min(1).refine((v) => !v.includes("/"), {
|
|
24992
25096
|
message: "anthropic_provider must be a provider name without '/'"
|
|
24993
25097
|
}).optional()
|
|
24994
25098
|
});
|
|
24995
25099
|
// packages/omo-opencode/src/config/schema/comment-checker.ts
|
|
24996
|
-
import { z as
|
|
24997
|
-
var CommentCheckerConfigSchema =
|
|
24998
|
-
custom_prompt:
|
|
25100
|
+
import { z as z24 } from "zod";
|
|
25101
|
+
var CommentCheckerConfigSchema = z24.object({
|
|
25102
|
+
custom_prompt: z24.string().optional()
|
|
24999
25103
|
});
|
|
25000
25104
|
// packages/omo-opencode/src/config/schema/commands.ts
|
|
25001
|
-
import { z as
|
|
25002
|
-
var BuiltinCommandNameSchema =
|
|
25105
|
+
import { z as z25 } from "zod";
|
|
25106
|
+
var BuiltinCommandNameSchema = z25.enum([
|
|
25003
25107
|
"goal",
|
|
25004
25108
|
"refactor",
|
|
25005
25109
|
"ulw-execute",
|
|
@@ -25008,21 +25112,21 @@ var BuiltinCommandNameSchema = z24.enum([
|
|
|
25008
25112
|
"hyperplan"
|
|
25009
25113
|
]);
|
|
25010
25114
|
// packages/omo-opencode/src/config/schema/default-mode.ts
|
|
25011
|
-
import { z as
|
|
25012
|
-
var DefaultModeConfigSchema =
|
|
25013
|
-
ultrawork:
|
|
25014
|
-
goal:
|
|
25115
|
+
import { z as z26 } from "zod";
|
|
25116
|
+
var DefaultModeConfigSchema = z26.object({
|
|
25117
|
+
ultrawork: z26.boolean().default(false),
|
|
25118
|
+
goal: z26.boolean().default(false)
|
|
25015
25119
|
});
|
|
25016
25120
|
// packages/omo-opencode/src/config/schema/dynamic-context-pruning.ts
|
|
25017
|
-
import { z as
|
|
25018
|
-
var DynamicContextPruningConfigSchema =
|
|
25019
|
-
enabled:
|
|
25020
|
-
notification:
|
|
25021
|
-
turn_protection:
|
|
25022
|
-
enabled:
|
|
25023
|
-
turns:
|
|
25121
|
+
import { z as z27 } from "zod";
|
|
25122
|
+
var DynamicContextPruningConfigSchema = z27.object({
|
|
25123
|
+
enabled: z27.boolean().default(false),
|
|
25124
|
+
notification: z27.enum(["off", "minimal", "detailed"]).default("detailed"),
|
|
25125
|
+
turn_protection: z27.object({
|
|
25126
|
+
enabled: z27.boolean().default(true),
|
|
25127
|
+
turns: z27.number().min(1).max(10).default(3)
|
|
25024
25128
|
}).optional(),
|
|
25025
|
-
protected_tools:
|
|
25129
|
+
protected_tools: z27.array(z27.string()).default([
|
|
25026
25130
|
"task",
|
|
25027
25131
|
"todowrite",
|
|
25028
25132
|
"todoread",
|
|
@@ -25031,45 +25135,45 @@ var DynamicContextPruningConfigSchema = z26.object({
|
|
|
25031
25135
|
"session_write",
|
|
25032
25136
|
"session_search"
|
|
25033
25137
|
]),
|
|
25034
|
-
strategies:
|
|
25035
|
-
deduplication:
|
|
25036
|
-
enabled:
|
|
25138
|
+
strategies: z27.object({
|
|
25139
|
+
deduplication: z27.object({
|
|
25140
|
+
enabled: z27.boolean().default(true)
|
|
25037
25141
|
}).optional(),
|
|
25038
|
-
supersede_writes:
|
|
25039
|
-
enabled:
|
|
25040
|
-
aggressive:
|
|
25142
|
+
supersede_writes: z27.object({
|
|
25143
|
+
enabled: z27.boolean().default(true),
|
|
25144
|
+
aggressive: z27.boolean().default(false)
|
|
25041
25145
|
}).optional(),
|
|
25042
|
-
purge_errors:
|
|
25043
|
-
enabled:
|
|
25044
|
-
turns:
|
|
25146
|
+
purge_errors: z27.object({
|
|
25147
|
+
enabled: z27.boolean().default(true),
|
|
25148
|
+
turns: z27.number().min(1).max(20).default(5)
|
|
25045
25149
|
}).optional()
|
|
25046
25150
|
}).optional()
|
|
25047
25151
|
});
|
|
25048
25152
|
// packages/omo-opencode/src/config/schema/experimental.ts
|
|
25049
|
-
import { z as
|
|
25050
|
-
var ExperimentalConfigSchema =
|
|
25051
|
-
aggressive_truncation:
|
|
25052
|
-
preemptive_compaction:
|
|
25053
|
-
truncate_all_tool_outputs:
|
|
25153
|
+
import { z as z28 } from "zod";
|
|
25154
|
+
var ExperimentalConfigSchema = z28.object({
|
|
25155
|
+
aggressive_truncation: z28.boolean().optional(),
|
|
25156
|
+
preemptive_compaction: z28.boolean().optional(),
|
|
25157
|
+
truncate_all_tool_outputs: z28.boolean().optional(),
|
|
25054
25158
|
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
|
|
25055
|
-
task_system:
|
|
25056
|
-
plugin_load_timeout_ms:
|
|
25057
|
-
safe_hook_creation:
|
|
25058
|
-
disable_omo_env:
|
|
25059
|
-
hashline_edit:
|
|
25060
|
-
model_fallback_title:
|
|
25061
|
-
max_tools:
|
|
25062
|
-
disable_live_parent_wake_routing:
|
|
25159
|
+
task_system: z28.boolean().optional(),
|
|
25160
|
+
plugin_load_timeout_ms: z28.number().min(1000).optional(),
|
|
25161
|
+
safe_hook_creation: z28.boolean().optional(),
|
|
25162
|
+
disable_omo_env: z28.boolean().optional(),
|
|
25163
|
+
hashline_edit: z28.boolean().optional(),
|
|
25164
|
+
model_fallback_title: z28.boolean().optional(),
|
|
25165
|
+
max_tools: z28.number().int().min(1).optional(),
|
|
25166
|
+
disable_live_parent_wake_routing: z28.boolean().optional()
|
|
25063
25167
|
});
|
|
25064
25168
|
// packages/omo-opencode/src/config/schema/goal.ts
|
|
25065
|
-
import { z as
|
|
25066
|
-
var GoalConfigSchema =
|
|
25067
|
-
enabled:
|
|
25068
|
-
auto_start:
|
|
25069
|
-
default_max_iterations:
|
|
25169
|
+
import { z as z29 } from "zod";
|
|
25170
|
+
var GoalConfigSchema = z29.object({
|
|
25171
|
+
enabled: z29.boolean().default(false),
|
|
25172
|
+
auto_start: z29.boolean().default(false),
|
|
25173
|
+
default_max_iterations: z29.number().min(1).max(1000).default(100)
|
|
25070
25174
|
});
|
|
25071
25175
|
// packages/skills-loader-core/src/config/git-env-prefix.ts
|
|
25072
|
-
import { z as
|
|
25176
|
+
import { z as z30 } from "zod";
|
|
25073
25177
|
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_-]*)*$/;
|
|
25074
25178
|
var GIT_ENV_PREFIX_VALIDATION_MESSAGE = 'git_env_prefix must be empty or use shell-safe env assignments like "GIT_MASTER=1"';
|
|
25075
25179
|
function isValidGitEnvPrefix(value) {
|
|
@@ -25084,17 +25188,17 @@ function assertValidGitEnvPrefix(value) {
|
|
|
25084
25188
|
}
|
|
25085
25189
|
return value;
|
|
25086
25190
|
}
|
|
25087
|
-
var GitEnvPrefixSchema =
|
|
25191
|
+
var GitEnvPrefixSchema = z30.string().refine(isValidGitEnvPrefix, { message: GIT_ENV_PREFIX_VALIDATION_MESSAGE }).default("GIT_MASTER=1");
|
|
25088
25192
|
// packages/omo-opencode/src/config/schema/git-master.ts
|
|
25089
|
-
import { z as
|
|
25090
|
-
var GitMasterConfigSchema =
|
|
25091
|
-
commit_footer:
|
|
25092
|
-
include_co_authored_by:
|
|
25193
|
+
import { z as z31 } from "zod";
|
|
25194
|
+
var GitMasterConfigSchema = z31.object({
|
|
25195
|
+
commit_footer: z31.union([z31.boolean(), z31.string()]).default(true),
|
|
25196
|
+
include_co_authored_by: z31.boolean().default(true),
|
|
25093
25197
|
git_env_prefix: GitEnvPrefixSchema
|
|
25094
25198
|
});
|
|
25095
25199
|
// packages/omo-opencode/src/config/schema/hooks.ts
|
|
25096
|
-
import { z as
|
|
25097
|
-
var HookNameSchema =
|
|
25200
|
+
import { z as z32 } from "zod";
|
|
25201
|
+
var HookNameSchema = z32.enum([
|
|
25098
25202
|
"todo-continuation-enforcer",
|
|
25099
25203
|
"session-notification",
|
|
25100
25204
|
"comment-checker",
|
|
@@ -25152,240 +25256,240 @@ var HookNameSchema = z31.enum([
|
|
|
25152
25256
|
"legacy-plugin-toast"
|
|
25153
25257
|
]);
|
|
25154
25258
|
// packages/omo-opencode/src/config/schema/i18n.ts
|
|
25155
|
-
import { z as
|
|
25156
|
-
var I18nConfigSchema =
|
|
25157
|
-
locale:
|
|
25259
|
+
import { z as z33 } from "zod";
|
|
25260
|
+
var I18nConfigSchema = z33.object({
|
|
25261
|
+
locale: z33.string().optional()
|
|
25158
25262
|
});
|
|
25159
25263
|
// packages/omo-opencode/src/config/schema/keyword-detector.ts
|
|
25160
|
-
import { z as
|
|
25161
|
-
var KeywordTypeSchema =
|
|
25162
|
-
var KeywordDetectorConfigSchema =
|
|
25163
|
-
enabled_expansions:
|
|
25164
|
-
disabled_keywords:
|
|
25264
|
+
import { z as z34 } from "zod";
|
|
25265
|
+
var KeywordTypeSchema = z34.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
|
|
25266
|
+
var KeywordDetectorConfigSchema = z34.object({
|
|
25267
|
+
enabled_expansions: z34.array(KeywordTypeSchema).optional(),
|
|
25268
|
+
disabled_keywords: z34.array(KeywordTypeSchema).optional()
|
|
25165
25269
|
});
|
|
25166
25270
|
// packages/omo-opencode/src/config/schema/model-capabilities.ts
|
|
25167
|
-
import { z as
|
|
25168
|
-
var ModelCapabilitiesConfigSchema =
|
|
25169
|
-
enabled:
|
|
25170
|
-
auto_refresh_on_start:
|
|
25171
|
-
refresh_timeout_ms:
|
|
25172
|
-
source_url:
|
|
25271
|
+
import { z as z35 } from "zod";
|
|
25272
|
+
var ModelCapabilitiesConfigSchema = z35.object({
|
|
25273
|
+
enabled: z35.boolean().optional(),
|
|
25274
|
+
auto_refresh_on_start: z35.boolean().optional(),
|
|
25275
|
+
refresh_timeout_ms: z35.number().int().positive().optional(),
|
|
25276
|
+
source_url: z35.string().url().optional()
|
|
25173
25277
|
});
|
|
25174
25278
|
// packages/omo-opencode/src/config/schema/notification.ts
|
|
25175
|
-
import { z as
|
|
25176
|
-
var NotificationConfigSchema =
|
|
25177
|
-
force_enable:
|
|
25279
|
+
import { z as z36 } from "zod";
|
|
25280
|
+
var NotificationConfigSchema = z36.object({
|
|
25281
|
+
force_enable: z36.boolean().optional()
|
|
25178
25282
|
});
|
|
25179
25283
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
25180
|
-
import { z as
|
|
25284
|
+
import { z as z50 } from "zod";
|
|
25181
25285
|
|
|
25182
25286
|
// packages/omo-opencode/src/mcp/types.ts
|
|
25183
|
-
import { z as
|
|
25184
|
-
var McpNameSchema =
|
|
25185
|
-
var AnyMcpNameSchema =
|
|
25287
|
+
import { z as z37 } from "zod";
|
|
25288
|
+
var McpNameSchema = z37.enum(["websearch", "context7", "grep_app", "lsp"]);
|
|
25289
|
+
var AnyMcpNameSchema = z37.string().min(1);
|
|
25186
25290
|
|
|
25187
25291
|
// packages/omo-opencode/src/config/schema/agent-definitions.ts
|
|
25188
|
-
import { z as
|
|
25189
|
-
var AgentDefinitionPathSchema =
|
|
25190
|
-
var AgentDefinitionsConfigSchema =
|
|
25292
|
+
import { z as z38 } from "zod";
|
|
25293
|
+
var AgentDefinitionPathSchema = z38.string().min(1);
|
|
25294
|
+
var AgentDefinitionsConfigSchema = z38.array(AgentDefinitionPathSchema).optional();
|
|
25191
25295
|
|
|
25192
25296
|
// packages/omo-opencode/src/config/schema/openclaw.ts
|
|
25193
|
-
import { z as
|
|
25194
|
-
var OpenClawGatewaySchema =
|
|
25195
|
-
type:
|
|
25196
|
-
url:
|
|
25197
|
-
method:
|
|
25198
|
-
headers:
|
|
25199
|
-
command:
|
|
25200
|
-
timeout:
|
|
25297
|
+
import { z as z39 } from "zod";
|
|
25298
|
+
var OpenClawGatewaySchema = z39.object({
|
|
25299
|
+
type: z39.enum(["http", "command"]).default("http"),
|
|
25300
|
+
url: z39.string().optional(),
|
|
25301
|
+
method: z39.string().default("POST"),
|
|
25302
|
+
headers: z39.record(z39.string(), z39.string()).optional(),
|
|
25303
|
+
command: z39.string().optional(),
|
|
25304
|
+
timeout: z39.number().optional()
|
|
25201
25305
|
});
|
|
25202
|
-
var OpenClawHookSchema =
|
|
25203
|
-
enabled:
|
|
25204
|
-
gateway:
|
|
25205
|
-
instruction:
|
|
25306
|
+
var OpenClawHookSchema = z39.object({
|
|
25307
|
+
enabled: z39.boolean().default(true),
|
|
25308
|
+
gateway: z39.string(),
|
|
25309
|
+
instruction: z39.string()
|
|
25206
25310
|
});
|
|
25207
|
-
var OpenClawReplyListenerConfigSchema =
|
|
25208
|
-
discordBotToken:
|
|
25209
|
-
discordChannelId:
|
|
25210
|
-
discordMention:
|
|
25211
|
-
authorizedDiscordUserIds:
|
|
25212
|
-
telegramBotToken:
|
|
25213
|
-
telegramChatId:
|
|
25214
|
-
pollIntervalMs:
|
|
25215
|
-
rateLimitPerMinute:
|
|
25216
|
-
maxMessageLength:
|
|
25217
|
-
includePrefix:
|
|
25311
|
+
var OpenClawReplyListenerConfigSchema = z39.object({
|
|
25312
|
+
discordBotToken: z39.string().optional(),
|
|
25313
|
+
discordChannelId: z39.string().optional(),
|
|
25314
|
+
discordMention: z39.string().optional(),
|
|
25315
|
+
authorizedDiscordUserIds: z39.array(z39.string()).default([]),
|
|
25316
|
+
telegramBotToken: z39.string().optional(),
|
|
25317
|
+
telegramChatId: z39.string().optional(),
|
|
25318
|
+
pollIntervalMs: z39.number().default(3000),
|
|
25319
|
+
rateLimitPerMinute: z39.number().default(10),
|
|
25320
|
+
maxMessageLength: z39.number().default(500),
|
|
25321
|
+
includePrefix: z39.boolean().default(true)
|
|
25218
25322
|
});
|
|
25219
|
-
var OpenClawConfigSchema =
|
|
25220
|
-
enabled:
|
|
25221
|
-
gateways:
|
|
25222
|
-
hooks:
|
|
25323
|
+
var OpenClawConfigSchema = z39.object({
|
|
25324
|
+
enabled: z39.boolean().default(false),
|
|
25325
|
+
gateways: z39.record(z39.string(), OpenClawGatewaySchema).default({}),
|
|
25326
|
+
hooks: z39.record(z39.string(), OpenClawHookSchema).default({}),
|
|
25223
25327
|
replyListener: OpenClawReplyListenerConfigSchema.optional()
|
|
25224
25328
|
});
|
|
25225
25329
|
|
|
25226
25330
|
// packages/omo-opencode/src/config/schema/monitor.ts
|
|
25227
|
-
import { z as
|
|
25228
|
-
var MonitorConfigSchema =
|
|
25229
|
-
enabled:
|
|
25230
|
-
live_mode_enabled:
|
|
25231
|
-
allowed_commands:
|
|
25232
|
-
max_monitors_per_session:
|
|
25233
|
-
max_runtime_ms:
|
|
25234
|
-
batch_max_lines:
|
|
25235
|
-
batch_max_bytes:
|
|
25236
|
-
flush_interval_ms:
|
|
25237
|
-
ring_max_lines:
|
|
25238
|
-
line_max_bytes:
|
|
25239
|
-
pattern_max_length:
|
|
25331
|
+
import { z as z40 } from "zod";
|
|
25332
|
+
var MonitorConfigSchema = z40.object({
|
|
25333
|
+
enabled: z40.boolean().default(false),
|
|
25334
|
+
live_mode_enabled: z40.boolean().default(false),
|
|
25335
|
+
allowed_commands: z40.array(z40.string()).optional(),
|
|
25336
|
+
max_monitors_per_session: z40.number().int().min(1).max(16).default(3),
|
|
25337
|
+
max_runtime_ms: z40.number().int().min(1000).default(1800000),
|
|
25338
|
+
batch_max_lines: z40.number().int().min(1).default(50),
|
|
25339
|
+
batch_max_bytes: z40.number().int().min(1024).default(16384),
|
|
25340
|
+
flush_interval_ms: z40.number().int().min(250).default(1000),
|
|
25341
|
+
ring_max_lines: z40.number().int().min(1).default(1000),
|
|
25342
|
+
line_max_bytes: z40.number().int().min(256).default(8192),
|
|
25343
|
+
pattern_max_length: z40.number().int().min(1).default(512)
|
|
25240
25344
|
});
|
|
25241
25345
|
|
|
25242
25346
|
// packages/omo-opencode/src/config/schema/runtime-fallback.ts
|
|
25243
|
-
import { z as
|
|
25244
|
-
var RuntimeFallbackConfigSchema =
|
|
25245
|
-
enabled:
|
|
25246
|
-
retry_on_errors:
|
|
25247
|
-
max_fallback_attempts:
|
|
25248
|
-
cooldown_seconds:
|
|
25249
|
-
timeout_seconds:
|
|
25250
|
-
notify_on_fallback:
|
|
25251
|
-
restore_primary_after_cooldown:
|
|
25347
|
+
import { z as z41 } from "zod";
|
|
25348
|
+
var RuntimeFallbackConfigSchema = z41.object({
|
|
25349
|
+
enabled: z41.boolean().optional(),
|
|
25350
|
+
retry_on_errors: z41.array(z41.number()).optional(),
|
|
25351
|
+
max_fallback_attempts: z41.number().min(1).max(20).optional(),
|
|
25352
|
+
cooldown_seconds: z41.number().min(0).optional(),
|
|
25353
|
+
timeout_seconds: z41.number().min(0).optional(),
|
|
25354
|
+
notify_on_fallback: z41.boolean().optional(),
|
|
25355
|
+
restore_primary_after_cooldown: z41.boolean().optional()
|
|
25252
25356
|
});
|
|
25253
25357
|
|
|
25254
25358
|
// packages/team-core/src/config.ts
|
|
25255
|
-
import * as
|
|
25256
|
-
var TeamModeConfigSchema =
|
|
25257
|
-
enabled:
|
|
25258
|
-
tmux_visualization:
|
|
25259
|
-
max_parallel_members:
|
|
25260
|
-
max_members:
|
|
25261
|
-
max_messages_per_run:
|
|
25262
|
-
max_wall_clock_minutes:
|
|
25263
|
-
max_member_turns:
|
|
25264
|
-
base_dir:
|
|
25265
|
-
message_payload_max_bytes:
|
|
25266
|
-
recipient_unread_max_bytes:
|
|
25267
|
-
mailbox_poll_interval_ms:
|
|
25359
|
+
import * as z42 from "zod";
|
|
25360
|
+
var TeamModeConfigSchema = z42.object({
|
|
25361
|
+
enabled: z42.boolean().default(false),
|
|
25362
|
+
tmux_visualization: z42.boolean().default(false),
|
|
25363
|
+
max_parallel_members: z42.number().int().min(1).max(8).default(4),
|
|
25364
|
+
max_members: z42.number().int().min(1).max(8).default(8),
|
|
25365
|
+
max_messages_per_run: z42.number().int().min(1).default(1e4),
|
|
25366
|
+
max_wall_clock_minutes: z42.number().int().min(1).default(120),
|
|
25367
|
+
max_member_turns: z42.number().int().min(1).default(500),
|
|
25368
|
+
base_dir: z42.string().optional(),
|
|
25369
|
+
message_payload_max_bytes: z42.number().int().min(1024).default(32768),
|
|
25370
|
+
recipient_unread_max_bytes: z42.number().int().min(1024).default(262144),
|
|
25371
|
+
mailbox_poll_interval_ms: z42.number().int().min(500).default(3000)
|
|
25268
25372
|
});
|
|
25269
25373
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
25270
|
-
import { z as
|
|
25271
|
-
var SkillSourceSchema =
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
path:
|
|
25275
|
-
recursive:
|
|
25276
|
-
glob:
|
|
25374
|
+
import { z as z43 } from "zod";
|
|
25375
|
+
var SkillSourceSchema = z43.union([
|
|
25376
|
+
z43.string(),
|
|
25377
|
+
z43.object({
|
|
25378
|
+
path: z43.string(),
|
|
25379
|
+
recursive: z43.boolean().optional(),
|
|
25380
|
+
glob: z43.string().optional()
|
|
25277
25381
|
})
|
|
25278
25382
|
]);
|
|
25279
|
-
var SkillDefinitionSchema =
|
|
25280
|
-
description:
|
|
25281
|
-
template:
|
|
25282
|
-
from:
|
|
25283
|
-
model:
|
|
25284
|
-
agent:
|
|
25285
|
-
subtask:
|
|
25286
|
-
"argument-hint":
|
|
25287
|
-
license:
|
|
25288
|
-
compatibility:
|
|
25289
|
-
metadata:
|
|
25290
|
-
"allowed-tools":
|
|
25291
|
-
disable:
|
|
25383
|
+
var SkillDefinitionSchema = z43.object({
|
|
25384
|
+
description: z43.string().optional(),
|
|
25385
|
+
template: z43.string().optional(),
|
|
25386
|
+
from: z43.string().optional(),
|
|
25387
|
+
model: z43.string().optional(),
|
|
25388
|
+
agent: z43.string().optional(),
|
|
25389
|
+
subtask: z43.boolean().optional(),
|
|
25390
|
+
"argument-hint": z43.string().optional(),
|
|
25391
|
+
license: z43.string().optional(),
|
|
25392
|
+
compatibility: z43.string().optional(),
|
|
25393
|
+
metadata: z43.record(z43.string(), z43.unknown()).optional(),
|
|
25394
|
+
"allowed-tools": z43.array(z43.string()).optional(),
|
|
25395
|
+
disable: z43.boolean().optional()
|
|
25292
25396
|
});
|
|
25293
|
-
var SkillEntrySchema =
|
|
25294
|
-
var SkillsConfigSchema =
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
sources:
|
|
25298
|
-
enable:
|
|
25299
|
-
disable:
|
|
25397
|
+
var SkillEntrySchema = z43.union([z43.boolean(), SkillDefinitionSchema]);
|
|
25398
|
+
var SkillsConfigSchema = z43.union([
|
|
25399
|
+
z43.array(z43.string()),
|
|
25400
|
+
z43.object({
|
|
25401
|
+
sources: z43.array(SkillSourceSchema).optional(),
|
|
25402
|
+
enable: z43.array(z43.string()).optional(),
|
|
25403
|
+
disable: z43.array(z43.string()).optional()
|
|
25300
25404
|
}).catchall(SkillEntrySchema)
|
|
25301
25405
|
]);
|
|
25302
25406
|
|
|
25303
25407
|
// packages/omo-opencode/src/config/schema/sisyphus.ts
|
|
25304
|
-
import { z as
|
|
25305
|
-
var SisyphusTasksConfigSchema =
|
|
25306
|
-
storage_path:
|
|
25307
|
-
task_list_id:
|
|
25308
|
-
claude_code_compat:
|
|
25408
|
+
import { z as z44 } from "zod";
|
|
25409
|
+
var SisyphusTasksConfigSchema = z44.object({
|
|
25410
|
+
storage_path: z44.string().optional(),
|
|
25411
|
+
task_list_id: z44.string().optional(),
|
|
25412
|
+
claude_code_compat: z44.boolean().default(false)
|
|
25309
25413
|
});
|
|
25310
|
-
var SisyphusConfigSchema =
|
|
25414
|
+
var SisyphusConfigSchema = z44.object({
|
|
25311
25415
|
tasks: SisyphusTasksConfigSchema.optional()
|
|
25312
25416
|
});
|
|
25313
25417
|
|
|
25314
25418
|
// packages/omo-opencode/src/config/schema/sisyphus-agent.ts
|
|
25315
|
-
import { z as
|
|
25316
|
-
var SisyphusAgentConfigSchema =
|
|
25317
|
-
disabled:
|
|
25318
|
-
default_builder_enabled:
|
|
25319
|
-
planner_enabled:
|
|
25320
|
-
replace_plan:
|
|
25321
|
-
tdd:
|
|
25419
|
+
import { z as z45 } from "zod";
|
|
25420
|
+
var SisyphusAgentConfigSchema = z45.object({
|
|
25421
|
+
disabled: z45.boolean().optional(),
|
|
25422
|
+
default_builder_enabled: z45.boolean().optional(),
|
|
25423
|
+
planner_enabled: z45.boolean().optional(),
|
|
25424
|
+
replace_plan: z45.boolean().optional(),
|
|
25425
|
+
tdd: z45.boolean().default(true).optional()
|
|
25322
25426
|
});
|
|
25323
25427
|
|
|
25324
25428
|
// packages/omo-opencode/src/config/schema/tmux.ts
|
|
25325
25429
|
init_src2();
|
|
25326
|
-
import { z as
|
|
25327
|
-
var TmuxLayoutSchema =
|
|
25328
|
-
var TmuxIsolationSchema =
|
|
25329
|
-
var TmuxConfigSchema =
|
|
25330
|
-
enabled:
|
|
25430
|
+
import { z as z46 } from "zod";
|
|
25431
|
+
var TmuxLayoutSchema = z46.enum(TMUX_LAYOUT_VALUES);
|
|
25432
|
+
var TmuxIsolationSchema = z46.enum(TMUX_ISOLATION_VALUES);
|
|
25433
|
+
var TmuxConfigSchema = z46.object({
|
|
25434
|
+
enabled: z46.boolean().default(false),
|
|
25331
25435
|
layout: TmuxLayoutSchema.default("main-vertical"),
|
|
25332
|
-
main_pane_size:
|
|
25333
|
-
main_pane_min_width:
|
|
25334
|
-
agent_pane_min_width:
|
|
25436
|
+
main_pane_size: z46.number().min(20).max(80).default(60),
|
|
25437
|
+
main_pane_min_width: z46.number().min(40).default(120),
|
|
25438
|
+
agent_pane_min_width: z46.number().min(20).default(40),
|
|
25335
25439
|
isolation: TmuxIsolationSchema.default("inline")
|
|
25336
25440
|
});
|
|
25337
25441
|
|
|
25338
25442
|
// packages/omo-opencode/src/config/schema/tui.ts
|
|
25339
|
-
import { z as
|
|
25340
|
-
var TuiSidebarConfigSchema =
|
|
25341
|
-
enabled:
|
|
25443
|
+
import { z as z47 } from "zod";
|
|
25444
|
+
var TuiSidebarConfigSchema = z47.object({
|
|
25445
|
+
enabled: z47.boolean().default(true)
|
|
25342
25446
|
});
|
|
25343
|
-
var TuiConfigSchema =
|
|
25447
|
+
var TuiConfigSchema = z47.object({
|
|
25344
25448
|
sidebar: TuiSidebarConfigSchema.default({ enabled: true })
|
|
25345
25449
|
});
|
|
25346
25450
|
|
|
25347
25451
|
// packages/omo-opencode/src/config/schema/ulw-execute.ts
|
|
25348
|
-
import { z as
|
|
25349
|
-
var UlwExecuteConfigSchema =
|
|
25350
|
-
auto_commit:
|
|
25452
|
+
import { z as z48 } from "zod";
|
|
25453
|
+
var UlwExecuteConfigSchema = z48.object({
|
|
25454
|
+
auto_commit: z48.boolean().default(true)
|
|
25351
25455
|
});
|
|
25352
25456
|
|
|
25353
25457
|
// packages/omo-opencode/src/config/schema/websearch.ts
|
|
25354
|
-
import { z as
|
|
25355
|
-
var WebsearchProviderSchema =
|
|
25356
|
-
var WebsearchConfigSchema =
|
|
25458
|
+
import { z as z49 } from "zod";
|
|
25459
|
+
var WebsearchProviderSchema = z49.enum(["exa", "tavily"]);
|
|
25460
|
+
var WebsearchConfigSchema = z49.object({
|
|
25357
25461
|
provider: WebsearchProviderSchema.optional()
|
|
25358
25462
|
});
|
|
25359
25463
|
|
|
25360
25464
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
25361
|
-
var OhMyOpenCodeConfigSchema =
|
|
25362
|
-
$schema:
|
|
25363
|
-
new_task_system_enabled:
|
|
25364
|
-
default_run_agent:
|
|
25365
|
-
agent_order:
|
|
25465
|
+
var OhMyOpenCodeConfigSchema = z50.object({
|
|
25466
|
+
$schema: z50.string().optional(),
|
|
25467
|
+
new_task_system_enabled: z50.boolean().optional(),
|
|
25468
|
+
default_run_agent: z50.string().optional(),
|
|
25469
|
+
agent_order: z50.array(z50.string().max(128)).max(64).optional(),
|
|
25366
25470
|
agent_definitions: AgentDefinitionsConfigSchema,
|
|
25367
|
-
disabled_mcps:
|
|
25368
|
-
disabled_agents:
|
|
25369
|
-
disabled_skills:
|
|
25370
|
-
disabled_hooks:
|
|
25371
|
-
disabled_commands:
|
|
25372
|
-
disabled_tools:
|
|
25373
|
-
disabled_providers:
|
|
25374
|
-
mcp_env_allowlist:
|
|
25375
|
-
hashline_edit:
|
|
25376
|
-
telemetry:
|
|
25377
|
-
model_fallback:
|
|
25471
|
+
disabled_mcps: z50.array(AnyMcpNameSchema).optional(),
|
|
25472
|
+
disabled_agents: z50.array(z50.string()).optional(),
|
|
25473
|
+
disabled_skills: z50.array(z50.string()).optional(),
|
|
25474
|
+
disabled_hooks: z50.array(z50.string()).optional(),
|
|
25475
|
+
disabled_commands: z50.array(BuiltinCommandNameSchema).optional(),
|
|
25476
|
+
disabled_tools: z50.array(z50.string()).optional(),
|
|
25477
|
+
disabled_providers: z50.array(z50.string()).optional(),
|
|
25478
|
+
mcp_env_allowlist: z50.array(z50.string()).optional(),
|
|
25479
|
+
hashline_edit: z50.boolean().optional(),
|
|
25480
|
+
telemetry: z50.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable."),
|
|
25481
|
+
model_fallback: z50.boolean().optional(),
|
|
25378
25482
|
agents: AgentOverridesSchema.optional(),
|
|
25379
25483
|
categories: CategoriesConfigSchema.optional(),
|
|
25380
25484
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
25381
25485
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
25382
25486
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
25383
25487
|
experimental: ExperimentalConfigSchema.optional(),
|
|
25384
|
-
auto_update:
|
|
25488
|
+
auto_update: z50.boolean().optional(),
|
|
25385
25489
|
skills: SkillsConfigSchema.optional(),
|
|
25386
25490
|
goal: GoalConfigSchema.optional(),
|
|
25387
|
-
ralph_loop:
|
|
25388
|
-
runtime_fallback:
|
|
25491
|
+
ralph_loop: z50.record(z50.string(), z50.unknown()).optional(),
|
|
25492
|
+
runtime_fallback: z50.union([z50.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
25389
25493
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
25390
25494
|
notification: NotificationConfigSchema.optional(),
|
|
25391
25495
|
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
|
@@ -25408,7 +25512,7 @@ var OhMyOpenCodeConfigSchema = z49.object({
|
|
|
25408
25512
|
ulw_execute: UlwExecuteConfigSchema.optional(),
|
|
25409
25513
|
start_work: UlwExecuteConfigSchema.optional(),
|
|
25410
25514
|
default_mode: DefaultModeConfigSchema.optional(),
|
|
25411
|
-
_migrations:
|
|
25515
|
+
_migrations: z50.array(z50.string()).optional()
|
|
25412
25516
|
});
|
|
25413
25517
|
// packages/omo-opencode/src/config/validate.ts
|
|
25414
25518
|
function shortPath(configPath) {
|
|
@@ -96399,7 +96503,7 @@ function getCachedVersion(options = {}) {
|
|
|
96399
96503
|
// package.json
|
|
96400
96504
|
var package_default = {
|
|
96401
96505
|
name: "oh-my-opencode",
|
|
96402
|
-
version: "5.0.0-beta.
|
|
96506
|
+
version: "5.0.0-beta.54",
|
|
96403
96507
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
96404
96508
|
main: "./dist/index.js",
|
|
96405
96509
|
types: "dist/index.d.ts",
|
|
@@ -96537,6 +96641,7 @@ var package_default = {
|
|
|
96537
96641
|
"typecheck:packages": "tsgo --noEmit -p packages/rules-engine/tsconfig.json && tsgo --noEmit -p packages/delegate-core/tsconfig.json && tsgo --noEmit -p packages/mcp-stdio-core/tsconfig.json && tsgo --noEmit -p packages/mcp-client-core/tsconfig.json && tsgo --noEmit -p packages/git-bash-mcp/tsconfig.json && tsgo --noEmit -p packages/ast-grep-mcp/tsconfig.json && tsgo --noEmit -p packages/lsp-core/tsconfig.json && tsgo --noEmit -p packages/utils/tsconfig.json && tsgo --noEmit -p packages/model-core/tsconfig.json && tsgo --noEmit -p packages/omo-config-core/tsconfig.json && tsgo --noEmit -p packages/prompts-core/tsconfig.json && tsgo --noEmit -p packages/comment-checker-core/tsconfig.json && tsgo --noEmit -p packages/hashline-core/tsconfig.json && tsgo --noEmit -p packages/tmux-core/tsconfig.json && tsgo --noEmit -p packages/team-core/tsconfig.json && tsgo --noEmit -p packages/openclaw-core/tsconfig.json && tsgo --noEmit -p packages/boulder-state/tsconfig.json && tsgo --noEmit -p packages/memory-core/tsconfig.json && tsgo --noEmit -p packages/telemetry-core/tsconfig.json && tsgo --noEmit -p packages/claude-code-compat-core/tsconfig.json && tsgo --noEmit -p packages/skills-loader-core/tsconfig.json && tsgo --noEmit -p packages/agents-md-core/tsconfig.json && tsgo --noEmit -p packages/omo-codex/plugin/shared/tsconfig.json && tsgo --noEmit -p packages/omo-codex/tsconfig.json && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && tsgo --noEmit -p packages/senpi-task/tsconfig.json && tsgo --noEmit -p packages/pi-goal/tsconfig.json && tsgo --noEmit -p packages/pi-webfetch/tsconfig.json && tsgo --noEmit -p packages/omo-opencode/tsconfig.json && tsgo --noEmit -p packages/omo-native/tsconfig.json",
|
|
96538
96642
|
"typecheck:script": "tsgo --noEmit -p script/tsconfig.json",
|
|
96539
96643
|
test: "bun test --timeout 20000",
|
|
96644
|
+
"changelog:section": "bun script/changelog-section.ts",
|
|
96540
96645
|
"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 && node scripts/check-third-party-notices.mjs --ship && bun test --timeout 20000 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",
|
|
96541
96646
|
"test:fast": "bun run script/test-fast.ts",
|
|
96542
96647
|
"test:senpi": "bun run build:senpi-plugin && tsgo --noEmit -p packages/omo-senpi/tsconfig.json && bun test --timeout 20000 packages/omo-senpi && bun test ./.agents/skills/senpi-qa/scripts/resolve-evidence-dir.test.mjs",
|
|
@@ -96583,7 +96688,7 @@ var package_default = {
|
|
|
96583
96688
|
zod: "^4.4.3"
|
|
96584
96689
|
},
|
|
96585
96690
|
devDependencies: {
|
|
96586
|
-
"@code-yeongyu/senpi": "2026.9.
|
|
96691
|
+
"@code-yeongyu/senpi": "2026.9.11",
|
|
96587
96692
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
96588
96693
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
96589
96694
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -96624,18 +96729,18 @@ var package_default = {
|
|
|
96624
96729
|
typescript: "^7.0.2"
|
|
96625
96730
|
},
|
|
96626
96731
|
optionalDependencies: {
|
|
96627
|
-
"oh-my-opencode-darwin-arm64": "5.0.0-beta.
|
|
96628
|
-
"oh-my-opencode-darwin-x64": "5.0.0-beta.
|
|
96629
|
-
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.
|
|
96630
|
-
"oh-my-opencode-linux-arm64": "5.0.0-beta.
|
|
96631
|
-
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.
|
|
96632
|
-
"oh-my-opencode-linux-x64": "5.0.0-beta.
|
|
96633
|
-
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.
|
|
96634
|
-
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.
|
|
96635
|
-
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.
|
|
96636
|
-
"oh-my-opencode-windows-arm64": "5.0.0-beta.
|
|
96637
|
-
"oh-my-opencode-windows-x64": "5.0.0-beta.
|
|
96638
|
-
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.
|
|
96732
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.54",
|
|
96733
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.54",
|
|
96734
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.54",
|
|
96735
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.54",
|
|
96736
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.54",
|
|
96737
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.54",
|
|
96738
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.54",
|
|
96739
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.54",
|
|
96740
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.54",
|
|
96741
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.54",
|
|
96742
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.54",
|
|
96743
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.54"
|
|
96639
96744
|
},
|
|
96640
96745
|
overrides: {
|
|
96641
96746
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -102145,6 +102250,11 @@ var atlasPromptVariants = {
|
|
|
102145
102250
|
content: kimi_k3_default,
|
|
102146
102251
|
filePath: "packages/prompts-core/prompts/atlas/kimi-k3.md"
|
|
102147
102252
|
},
|
|
102253
|
+
"swe-2": {
|
|
102254
|
+
kind: "bundled",
|
|
102255
|
+
content: kimi_k3_default,
|
|
102256
|
+
filePath: "packages/prompts-core/prompts/atlas/kimi-k3.md"
|
|
102257
|
+
},
|
|
102148
102258
|
"kimi-k2-7": {
|
|
102149
102259
|
kind: "bundled",
|
|
102150
102260
|
content: kimi_k2_7_default,
|
|
@@ -103309,6 +103419,7 @@ var MODEL_MATCHERS = {
|
|
|
103309
103419
|
gpt: isGptModel,
|
|
103310
103420
|
gemini: isGeminiModel,
|
|
103311
103421
|
"kimi-k3": isKimiK3Model,
|
|
103422
|
+
"swe-2": isSWE2Model,
|
|
103312
103423
|
"kimi-k2-7": isKimiK27Model,
|
|
103313
103424
|
kimi: isKimiK2Model,
|
|
103314
103425
|
glm: isGlmModel,
|
|
@@ -105147,35 +105258,35 @@ import { mkdirSync as mkdirSync17, readFileSync as readFileSync45, renameSync as
|
|
|
105147
105258
|
import { join as join82 } from "path";
|
|
105148
105259
|
|
|
105149
105260
|
// packages/omo-opencode/src/hooks/goal/types.ts
|
|
105150
|
-
import { z as
|
|
105261
|
+
import { z as z52 } from "zod";
|
|
105151
105262
|
var GOAL_STATUS_VALUES = ["active", "paused", "complete"];
|
|
105152
|
-
var GoalStatusSchema =
|
|
105153
|
-
var GoalSchema =
|
|
105154
|
-
id:
|
|
105155
|
-
sessionID:
|
|
105156
|
-
objective:
|
|
105263
|
+
var GoalStatusSchema = z52.enum(GOAL_STATUS_VALUES);
|
|
105264
|
+
var GoalSchema = z52.object({
|
|
105265
|
+
id: z52.string(),
|
|
105266
|
+
sessionID: z52.string(),
|
|
105267
|
+
objective: z52.string(),
|
|
105157
105268
|
status: GoalStatusSchema,
|
|
105158
|
-
tokensUsed:
|
|
105159
|
-
timeUsedSeconds:
|
|
105160
|
-
createdAt:
|
|
105161
|
-
updatedAt:
|
|
105162
|
-
lastStartedAt:
|
|
105163
|
-
completedAt:
|
|
105269
|
+
tokensUsed: z52.number().int().nonnegative(),
|
|
105270
|
+
timeUsedSeconds: z52.number().int().nonnegative(),
|
|
105271
|
+
createdAt: z52.number().int().nonnegative(),
|
|
105272
|
+
updatedAt: z52.number().int().nonnegative(),
|
|
105273
|
+
lastStartedAt: z52.number().int().nonnegative().optional(),
|
|
105274
|
+
completedAt: z52.number().int().nonnegative().optional()
|
|
105164
105275
|
});
|
|
105165
|
-
var GoalFileSchema =
|
|
105166
|
-
version:
|
|
105276
|
+
var GoalFileSchema = z52.object({
|
|
105277
|
+
version: z52.literal(1),
|
|
105167
105278
|
goal: GoalSchema.nullable()
|
|
105168
105279
|
});
|
|
105169
|
-
var GoalToolSnapshotSchema =
|
|
105170
|
-
sessionID:
|
|
105171
|
-
objective:
|
|
105280
|
+
var GoalToolSnapshotSchema = z52.object({
|
|
105281
|
+
sessionID: z52.string(),
|
|
105282
|
+
objective: z52.string(),
|
|
105172
105283
|
status: GoalStatusSchema,
|
|
105173
|
-
tokensUsed:
|
|
105174
|
-
timeUsedSeconds:
|
|
105175
|
-
createdAt:
|
|
105176
|
-
updatedAt:
|
|
105284
|
+
tokensUsed: z52.number().int().nonnegative(),
|
|
105285
|
+
timeUsedSeconds: z52.number().int().nonnegative(),
|
|
105286
|
+
createdAt: z52.number().int().nonnegative(),
|
|
105287
|
+
updatedAt: z52.number().int().nonnegative()
|
|
105177
105288
|
});
|
|
105178
|
-
var GoalToolResponseSchema =
|
|
105289
|
+
var GoalToolResponseSchema = z52.object({
|
|
105179
105290
|
goal: GoalToolSnapshotSchema.nullable()
|
|
105180
105291
|
});
|
|
105181
105292
|
|
|
@@ -122703,11 +122814,11 @@ function createMonitorStatusInjectorHook(monitorManager, config) {
|
|
|
122703
122814
|
import { resolve as resolve25 } from "path";
|
|
122704
122815
|
|
|
122705
122816
|
// node_modules/.bun/@opencode-ai+plugin@1.18.22+5df5880790e6b42e/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
122706
|
-
import { z as
|
|
122817
|
+
import { z as z53 } from "zod";
|
|
122707
122818
|
function tool(input) {
|
|
122708
122819
|
return input;
|
|
122709
122820
|
}
|
|
122710
|
-
tool.schema =
|
|
122821
|
+
tool.schema = z53;
|
|
122711
122822
|
|
|
122712
122823
|
// packages/omo-opencode/src/shared/ripgrep-cli.ts
|
|
122713
122824
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
@@ -131823,55 +131934,55 @@ function isExplicitSyncRun(runInBackground) {
|
|
|
131823
131934
|
import { join as join114 } from "path";
|
|
131824
131935
|
|
|
131825
131936
|
// packages/omo-opencode/src/tools/task/types.ts
|
|
131826
|
-
import { z as
|
|
131827
|
-
var TaskStatusSchema =
|
|
131828
|
-
var TaskObjectSchema =
|
|
131829
|
-
id:
|
|
131830
|
-
subject:
|
|
131831
|
-
description:
|
|
131937
|
+
import { z as z54 } from "zod";
|
|
131938
|
+
var TaskStatusSchema = z54.enum(["pending", "in_progress", "completed", "deleted"]);
|
|
131939
|
+
var TaskObjectSchema = z54.object({
|
|
131940
|
+
id: z54.string(),
|
|
131941
|
+
subject: z54.string(),
|
|
131942
|
+
description: z54.string(),
|
|
131832
131943
|
status: TaskStatusSchema,
|
|
131833
|
-
activeForm:
|
|
131834
|
-
blocks:
|
|
131835
|
-
blockedBy:
|
|
131836
|
-
owner:
|
|
131837
|
-
metadata:
|
|
131838
|
-
repoURL:
|
|
131839
|
-
parentID:
|
|
131840
|
-
threadID:
|
|
131944
|
+
activeForm: z54.string().optional(),
|
|
131945
|
+
blocks: z54.array(z54.string()).default([]),
|
|
131946
|
+
blockedBy: z54.array(z54.string()).default([]),
|
|
131947
|
+
owner: z54.string().optional(),
|
|
131948
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131949
|
+
repoURL: z54.string().optional(),
|
|
131950
|
+
parentID: z54.string().optional(),
|
|
131951
|
+
threadID: z54.string()
|
|
131841
131952
|
}).strict();
|
|
131842
|
-
var TaskCreateInputSchema =
|
|
131843
|
-
subject:
|
|
131844
|
-
description:
|
|
131845
|
-
activeForm:
|
|
131846
|
-
blocks:
|
|
131847
|
-
blockedBy:
|
|
131848
|
-
owner:
|
|
131849
|
-
metadata:
|
|
131850
|
-
repoURL:
|
|
131851
|
-
parentID:
|
|
131953
|
+
var TaskCreateInputSchema = z54.object({
|
|
131954
|
+
subject: z54.string(),
|
|
131955
|
+
description: z54.string().optional(),
|
|
131956
|
+
activeForm: z54.string().optional(),
|
|
131957
|
+
blocks: z54.array(z54.string()).optional(),
|
|
131958
|
+
blockedBy: z54.array(z54.string()).optional(),
|
|
131959
|
+
owner: z54.string().optional(),
|
|
131960
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131961
|
+
repoURL: z54.string().optional(),
|
|
131962
|
+
parentID: z54.string().optional()
|
|
131852
131963
|
});
|
|
131853
|
-
var TaskListInputSchema =
|
|
131964
|
+
var TaskListInputSchema = z54.object({
|
|
131854
131965
|
status: TaskStatusSchema.optional(),
|
|
131855
|
-
parentID:
|
|
131966
|
+
parentID: z54.string().optional()
|
|
131856
131967
|
});
|
|
131857
|
-
var TaskGetInputSchema =
|
|
131858
|
-
id:
|
|
131968
|
+
var TaskGetInputSchema = z54.object({
|
|
131969
|
+
id: z54.string()
|
|
131859
131970
|
});
|
|
131860
|
-
var TaskUpdateInputSchema =
|
|
131861
|
-
id:
|
|
131862
|
-
subject:
|
|
131863
|
-
description:
|
|
131971
|
+
var TaskUpdateInputSchema = z54.object({
|
|
131972
|
+
id: z54.string(),
|
|
131973
|
+
subject: z54.string().optional(),
|
|
131974
|
+
description: z54.string().optional(),
|
|
131864
131975
|
status: TaskStatusSchema.optional(),
|
|
131865
|
-
activeForm:
|
|
131866
|
-
addBlocks:
|
|
131867
|
-
addBlockedBy:
|
|
131868
|
-
owner:
|
|
131869
|
-
metadata:
|
|
131870
|
-
repoURL:
|
|
131871
|
-
parentID:
|
|
131976
|
+
activeForm: z54.string().optional(),
|
|
131977
|
+
addBlocks: z54.array(z54.string()).optional(),
|
|
131978
|
+
addBlockedBy: z54.array(z54.string()).optional(),
|
|
131979
|
+
owner: z54.string().optional(),
|
|
131980
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131981
|
+
repoURL: z54.string().optional(),
|
|
131982
|
+
parentID: z54.string().optional()
|
|
131872
131983
|
});
|
|
131873
|
-
var TaskDeleteInputSchema =
|
|
131874
|
-
id:
|
|
131984
|
+
var TaskDeleteInputSchema = z54.object({
|
|
131985
|
+
id: z54.string()
|
|
131875
131986
|
});
|
|
131876
131987
|
|
|
131877
131988
|
// packages/omo-opencode/src/features/claude-tasks/storage.ts
|
|
@@ -132772,7 +132883,7 @@ function createHashlineEditTool(ctx) {
|
|
|
132772
132883
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
132773
132884
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
132774
132885
|
init_logger2();
|
|
132775
|
-
import { z as
|
|
132886
|
+
import { z as z55 } from "zod";
|
|
132776
132887
|
|
|
132777
132888
|
// packages/team-core/src/team-mailbox/send.ts
|
|
132778
132889
|
init_paths();
|
|
@@ -133353,18 +133464,18 @@ async function resolveTeamRuntimeDetails(teamRunId, sessionID, config, deps) {
|
|
|
133353
133464
|
|
|
133354
133465
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
133355
133466
|
var MESSAGE_TOOL_KINDS = ["message", "announcement"];
|
|
133356
|
-
var TeamReferenceArgsSchema =
|
|
133357
|
-
path:
|
|
133358
|
-
description:
|
|
133467
|
+
var TeamReferenceArgsSchema = z55.object({
|
|
133468
|
+
path: z55.string().min(1),
|
|
133469
|
+
description: z55.string().optional()
|
|
133359
133470
|
});
|
|
133360
|
-
var TeamSendMessageArgsSchema =
|
|
133361
|
-
teamRunId:
|
|
133362
|
-
to:
|
|
133363
|
-
body:
|
|
133364
|
-
kind:
|
|
133365
|
-
correlationId:
|
|
133366
|
-
summary:
|
|
133367
|
-
references:
|
|
133471
|
+
var TeamSendMessageArgsSchema = z55.object({
|
|
133472
|
+
teamRunId: z55.string().min(1),
|
|
133473
|
+
to: z55.string().min(1),
|
|
133474
|
+
body: z55.string(),
|
|
133475
|
+
kind: z55.enum(MESSAGE_TOOL_KINDS).optional(),
|
|
133476
|
+
correlationId: z55.preprocess((value) => value === "" ? undefined : value, z55.uuid().optional()),
|
|
133477
|
+
summary: z55.string().optional(),
|
|
133478
|
+
references: z55.array(TeamReferenceArgsSchema).optional()
|
|
133368
133479
|
});
|
|
133369
133480
|
function createTeamSendMessageTool(config, client, deps = defaultTeamSendMessageToolDeps) {
|
|
133370
133481
|
return tool({
|
|
@@ -142010,63 +142121,63 @@ function getLiteralValue(schema) {
|
|
|
142010
142121
|
}
|
|
142011
142122
|
|
|
142012
142123
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
142013
|
-
import * as
|
|
142124
|
+
import * as z56 from "zod/v4";
|
|
142014
142125
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
142015
142126
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
142016
142127
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
142017
142128
|
var JSONRPC_VERSION = "2.0";
|
|
142018
|
-
var AssertObjectSchema =
|
|
142019
|
-
var ProgressTokenSchema =
|
|
142020
|
-
var CursorSchema =
|
|
142021
|
-
var TaskCreationParamsSchema =
|
|
142022
|
-
ttl:
|
|
142023
|
-
pollInterval:
|
|
142129
|
+
var AssertObjectSchema = z56.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
142130
|
+
var ProgressTokenSchema = z56.union([z56.string(), z56.number().int()]);
|
|
142131
|
+
var CursorSchema = z56.string();
|
|
142132
|
+
var TaskCreationParamsSchema = z56.looseObject({
|
|
142133
|
+
ttl: z56.number().optional(),
|
|
142134
|
+
pollInterval: z56.number().optional()
|
|
142024
142135
|
});
|
|
142025
|
-
var TaskMetadataSchema =
|
|
142026
|
-
ttl:
|
|
142136
|
+
var TaskMetadataSchema = z56.object({
|
|
142137
|
+
ttl: z56.number().optional()
|
|
142027
142138
|
});
|
|
142028
|
-
var RelatedTaskMetadataSchema =
|
|
142029
|
-
taskId:
|
|
142139
|
+
var RelatedTaskMetadataSchema = z56.object({
|
|
142140
|
+
taskId: z56.string()
|
|
142030
142141
|
});
|
|
142031
|
-
var RequestMetaSchema =
|
|
142142
|
+
var RequestMetaSchema = z56.looseObject({
|
|
142032
142143
|
progressToken: ProgressTokenSchema.optional(),
|
|
142033
142144
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
142034
142145
|
});
|
|
142035
|
-
var BaseRequestParamsSchema =
|
|
142146
|
+
var BaseRequestParamsSchema = z56.object({
|
|
142036
142147
|
_meta: RequestMetaSchema.optional()
|
|
142037
142148
|
});
|
|
142038
142149
|
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142039
142150
|
task: TaskMetadataSchema.optional()
|
|
142040
142151
|
});
|
|
142041
142152
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
142042
|
-
var RequestSchema =
|
|
142043
|
-
method:
|
|
142153
|
+
var RequestSchema = z56.object({
|
|
142154
|
+
method: z56.string(),
|
|
142044
142155
|
params: BaseRequestParamsSchema.loose().optional()
|
|
142045
142156
|
});
|
|
142046
|
-
var NotificationsParamsSchema =
|
|
142157
|
+
var NotificationsParamsSchema = z56.object({
|
|
142047
142158
|
_meta: RequestMetaSchema.optional()
|
|
142048
142159
|
});
|
|
142049
|
-
var NotificationSchema =
|
|
142050
|
-
method:
|
|
142160
|
+
var NotificationSchema = z56.object({
|
|
142161
|
+
method: z56.string(),
|
|
142051
142162
|
params: NotificationsParamsSchema.loose().optional()
|
|
142052
142163
|
});
|
|
142053
|
-
var ResultSchema =
|
|
142164
|
+
var ResultSchema = z56.looseObject({
|
|
142054
142165
|
_meta: RequestMetaSchema.optional()
|
|
142055
142166
|
});
|
|
142056
|
-
var RequestIdSchema =
|
|
142057
|
-
var JSONRPCRequestSchema =
|
|
142058
|
-
jsonrpc:
|
|
142167
|
+
var RequestIdSchema = z56.union([z56.string(), z56.number().int()]);
|
|
142168
|
+
var JSONRPCRequestSchema = z56.object({
|
|
142169
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142059
142170
|
id: RequestIdSchema,
|
|
142060
142171
|
...RequestSchema.shape
|
|
142061
142172
|
}).strict();
|
|
142062
142173
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
142063
|
-
var JSONRPCNotificationSchema =
|
|
142064
|
-
jsonrpc:
|
|
142174
|
+
var JSONRPCNotificationSchema = z56.object({
|
|
142175
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142065
142176
|
...NotificationSchema.shape
|
|
142066
142177
|
}).strict();
|
|
142067
142178
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
142068
|
-
var JSONRPCResultResponseSchema =
|
|
142069
|
-
jsonrpc:
|
|
142179
|
+
var JSONRPCResultResponseSchema = z56.object({
|
|
142180
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142070
142181
|
id: RequestIdSchema,
|
|
142071
142182
|
result: ResultSchema
|
|
142072
142183
|
}).strict();
|
|
@@ -142082,153 +142193,153 @@ var ErrorCode;
|
|
|
142082
142193
|
ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError";
|
|
142083
142194
|
ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
142084
142195
|
})(ErrorCode || (ErrorCode = {}));
|
|
142085
|
-
var JSONRPCErrorResponseSchema =
|
|
142086
|
-
jsonrpc:
|
|
142196
|
+
var JSONRPCErrorResponseSchema = z56.object({
|
|
142197
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142087
142198
|
id: RequestIdSchema.optional(),
|
|
142088
|
-
error:
|
|
142089
|
-
code:
|
|
142090
|
-
message:
|
|
142091
|
-
data:
|
|
142199
|
+
error: z56.object({
|
|
142200
|
+
code: z56.number().int(),
|
|
142201
|
+
message: z56.string(),
|
|
142202
|
+
data: z56.unknown().optional()
|
|
142092
142203
|
})
|
|
142093
142204
|
}).strict();
|
|
142094
142205
|
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
|
|
142095
|
-
var JSONRPCMessageSchema =
|
|
142206
|
+
var JSONRPCMessageSchema = z56.union([
|
|
142096
142207
|
JSONRPCRequestSchema,
|
|
142097
142208
|
JSONRPCNotificationSchema,
|
|
142098
142209
|
JSONRPCResultResponseSchema,
|
|
142099
142210
|
JSONRPCErrorResponseSchema
|
|
142100
142211
|
]);
|
|
142101
|
-
var JSONRPCResponseSchema =
|
|
142212
|
+
var JSONRPCResponseSchema = z56.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
142102
142213
|
var EmptyResultSchema = ResultSchema.strict();
|
|
142103
142214
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142104
142215
|
requestId: RequestIdSchema.optional(),
|
|
142105
|
-
reason:
|
|
142216
|
+
reason: z56.string().optional()
|
|
142106
142217
|
});
|
|
142107
142218
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
142108
|
-
method:
|
|
142219
|
+
method: z56.literal("notifications/cancelled"),
|
|
142109
142220
|
params: CancelledNotificationParamsSchema
|
|
142110
142221
|
});
|
|
142111
|
-
var IconSchema =
|
|
142112
|
-
src:
|
|
142113
|
-
mimeType:
|
|
142114
|
-
sizes:
|
|
142115
|
-
theme:
|
|
142222
|
+
var IconSchema = z56.object({
|
|
142223
|
+
src: z56.string(),
|
|
142224
|
+
mimeType: z56.string().optional(),
|
|
142225
|
+
sizes: z56.array(z56.string()).optional(),
|
|
142226
|
+
theme: z56.enum(["light", "dark"]).optional()
|
|
142116
142227
|
});
|
|
142117
|
-
var IconsSchema =
|
|
142118
|
-
icons:
|
|
142228
|
+
var IconsSchema = z56.object({
|
|
142229
|
+
icons: z56.array(IconSchema).optional()
|
|
142119
142230
|
});
|
|
142120
|
-
var BaseMetadataSchema =
|
|
142121
|
-
name:
|
|
142122
|
-
title:
|
|
142231
|
+
var BaseMetadataSchema = z56.object({
|
|
142232
|
+
name: z56.string(),
|
|
142233
|
+
title: z56.string().optional()
|
|
142123
142234
|
});
|
|
142124
142235
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
142125
142236
|
...BaseMetadataSchema.shape,
|
|
142126
142237
|
...IconsSchema.shape,
|
|
142127
|
-
version:
|
|
142128
|
-
websiteUrl:
|
|
142129
|
-
description:
|
|
142238
|
+
version: z56.string(),
|
|
142239
|
+
websiteUrl: z56.string().optional(),
|
|
142240
|
+
description: z56.string().optional()
|
|
142130
142241
|
});
|
|
142131
|
-
var FormElicitationCapabilitySchema =
|
|
142132
|
-
applyDefaults:
|
|
142133
|
-
}),
|
|
142134
|
-
var ElicitationCapabilitySchema =
|
|
142242
|
+
var FormElicitationCapabilitySchema = z56.intersection(z56.object({
|
|
142243
|
+
applyDefaults: z56.boolean().optional()
|
|
142244
|
+
}), z56.record(z56.string(), z56.unknown()));
|
|
142245
|
+
var ElicitationCapabilitySchema = z56.preprocess((value) => {
|
|
142135
142246
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
142136
142247
|
if (Object.keys(value).length === 0) {
|
|
142137
142248
|
return { form: {} };
|
|
142138
142249
|
}
|
|
142139
142250
|
}
|
|
142140
142251
|
return value;
|
|
142141
|
-
},
|
|
142252
|
+
}, z56.intersection(z56.object({
|
|
142142
142253
|
form: FormElicitationCapabilitySchema.optional(),
|
|
142143
142254
|
url: AssertObjectSchema.optional()
|
|
142144
|
-
}),
|
|
142145
|
-
var ClientTasksCapabilitySchema =
|
|
142255
|
+
}), z56.record(z56.string(), z56.unknown()).optional()));
|
|
142256
|
+
var ClientTasksCapabilitySchema = z56.looseObject({
|
|
142146
142257
|
list: AssertObjectSchema.optional(),
|
|
142147
142258
|
cancel: AssertObjectSchema.optional(),
|
|
142148
|
-
requests:
|
|
142149
|
-
sampling:
|
|
142259
|
+
requests: z56.looseObject({
|
|
142260
|
+
sampling: z56.looseObject({
|
|
142150
142261
|
createMessage: AssertObjectSchema.optional()
|
|
142151
142262
|
}).optional(),
|
|
142152
|
-
elicitation:
|
|
142263
|
+
elicitation: z56.looseObject({
|
|
142153
142264
|
create: AssertObjectSchema.optional()
|
|
142154
142265
|
}).optional()
|
|
142155
142266
|
}).optional()
|
|
142156
142267
|
});
|
|
142157
|
-
var ServerTasksCapabilitySchema =
|
|
142268
|
+
var ServerTasksCapabilitySchema = z56.looseObject({
|
|
142158
142269
|
list: AssertObjectSchema.optional(),
|
|
142159
142270
|
cancel: AssertObjectSchema.optional(),
|
|
142160
|
-
requests:
|
|
142161
|
-
tools:
|
|
142271
|
+
requests: z56.looseObject({
|
|
142272
|
+
tools: z56.looseObject({
|
|
142162
142273
|
call: AssertObjectSchema.optional()
|
|
142163
142274
|
}).optional()
|
|
142164
142275
|
}).optional()
|
|
142165
142276
|
});
|
|
142166
|
-
var ClientCapabilitiesSchema =
|
|
142167
|
-
experimental:
|
|
142168
|
-
sampling:
|
|
142277
|
+
var ClientCapabilitiesSchema = z56.object({
|
|
142278
|
+
experimental: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142279
|
+
sampling: z56.object({
|
|
142169
142280
|
context: AssertObjectSchema.optional(),
|
|
142170
142281
|
tools: AssertObjectSchema.optional()
|
|
142171
142282
|
}).optional(),
|
|
142172
142283
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
142173
|
-
roots:
|
|
142174
|
-
listChanged:
|
|
142284
|
+
roots: z56.object({
|
|
142285
|
+
listChanged: z56.boolean().optional()
|
|
142175
142286
|
}).optional(),
|
|
142176
142287
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
142177
|
-
extensions:
|
|
142288
|
+
extensions: z56.record(z56.string(), AssertObjectSchema).optional()
|
|
142178
142289
|
});
|
|
142179
142290
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142180
|
-
protocolVersion:
|
|
142291
|
+
protocolVersion: z56.string(),
|
|
142181
142292
|
capabilities: ClientCapabilitiesSchema,
|
|
142182
142293
|
clientInfo: ImplementationSchema
|
|
142183
142294
|
});
|
|
142184
142295
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
142185
|
-
method:
|
|
142296
|
+
method: z56.literal("initialize"),
|
|
142186
142297
|
params: InitializeRequestParamsSchema
|
|
142187
142298
|
});
|
|
142188
|
-
var ServerCapabilitiesSchema =
|
|
142189
|
-
experimental:
|
|
142299
|
+
var ServerCapabilitiesSchema = z56.object({
|
|
142300
|
+
experimental: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142190
142301
|
logging: AssertObjectSchema.optional(),
|
|
142191
142302
|
completions: AssertObjectSchema.optional(),
|
|
142192
|
-
prompts:
|
|
142193
|
-
listChanged:
|
|
142303
|
+
prompts: z56.object({
|
|
142304
|
+
listChanged: z56.boolean().optional()
|
|
142194
142305
|
}).optional(),
|
|
142195
|
-
resources:
|
|
142196
|
-
subscribe:
|
|
142197
|
-
listChanged:
|
|
142306
|
+
resources: z56.object({
|
|
142307
|
+
subscribe: z56.boolean().optional(),
|
|
142308
|
+
listChanged: z56.boolean().optional()
|
|
142198
142309
|
}).optional(),
|
|
142199
|
-
tools:
|
|
142200
|
-
listChanged:
|
|
142310
|
+
tools: z56.object({
|
|
142311
|
+
listChanged: z56.boolean().optional()
|
|
142201
142312
|
}).optional(),
|
|
142202
142313
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
142203
|
-
extensions:
|
|
142314
|
+
extensions: z56.record(z56.string(), AssertObjectSchema).optional()
|
|
142204
142315
|
});
|
|
142205
142316
|
var InitializeResultSchema = ResultSchema.extend({
|
|
142206
|
-
protocolVersion:
|
|
142317
|
+
protocolVersion: z56.string(),
|
|
142207
142318
|
capabilities: ServerCapabilitiesSchema,
|
|
142208
142319
|
serverInfo: ImplementationSchema,
|
|
142209
|
-
instructions:
|
|
142320
|
+
instructions: z56.string().optional()
|
|
142210
142321
|
});
|
|
142211
142322
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
142212
|
-
method:
|
|
142323
|
+
method: z56.literal("notifications/initialized"),
|
|
142213
142324
|
params: NotificationsParamsSchema.optional()
|
|
142214
142325
|
});
|
|
142215
142326
|
var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
142216
142327
|
var PingRequestSchema = RequestSchema.extend({
|
|
142217
|
-
method:
|
|
142328
|
+
method: z56.literal("ping"),
|
|
142218
142329
|
params: BaseRequestParamsSchema.optional()
|
|
142219
142330
|
});
|
|
142220
|
-
var ProgressSchema =
|
|
142221
|
-
progress:
|
|
142222
|
-
total:
|
|
142223
|
-
message:
|
|
142331
|
+
var ProgressSchema = z56.object({
|
|
142332
|
+
progress: z56.number(),
|
|
142333
|
+
total: z56.optional(z56.number()),
|
|
142334
|
+
message: z56.optional(z56.string())
|
|
142224
142335
|
});
|
|
142225
|
-
var ProgressNotificationParamsSchema =
|
|
142336
|
+
var ProgressNotificationParamsSchema = z56.object({
|
|
142226
142337
|
...NotificationsParamsSchema.shape,
|
|
142227
142338
|
...ProgressSchema.shape,
|
|
142228
142339
|
progressToken: ProgressTokenSchema
|
|
142229
142340
|
});
|
|
142230
142341
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
142231
|
-
method:
|
|
142342
|
+
method: z56.literal("notifications/progress"),
|
|
142232
142343
|
params: ProgressNotificationParamsSchema
|
|
142233
142344
|
});
|
|
142234
142345
|
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -142240,60 +142351,60 @@ var PaginatedRequestSchema = RequestSchema.extend({
|
|
|
142240
142351
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
142241
142352
|
nextCursor: CursorSchema.optional()
|
|
142242
142353
|
});
|
|
142243
|
-
var TaskStatusSchema2 =
|
|
142244
|
-
var TaskSchema2 =
|
|
142245
|
-
taskId:
|
|
142354
|
+
var TaskStatusSchema2 = z56.enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
142355
|
+
var TaskSchema2 = z56.object({
|
|
142356
|
+
taskId: z56.string(),
|
|
142246
142357
|
status: TaskStatusSchema2,
|
|
142247
|
-
ttl:
|
|
142248
|
-
createdAt:
|
|
142249
|
-
lastUpdatedAt:
|
|
142250
|
-
pollInterval:
|
|
142251
|
-
statusMessage:
|
|
142358
|
+
ttl: z56.union([z56.number(), z56.null()]),
|
|
142359
|
+
createdAt: z56.string(),
|
|
142360
|
+
lastUpdatedAt: z56.string(),
|
|
142361
|
+
pollInterval: z56.optional(z56.number()),
|
|
142362
|
+
statusMessage: z56.optional(z56.string())
|
|
142252
142363
|
});
|
|
142253
142364
|
var CreateTaskResultSchema = ResultSchema.extend({
|
|
142254
142365
|
task: TaskSchema2
|
|
142255
142366
|
});
|
|
142256
142367
|
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema2);
|
|
142257
142368
|
var TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
142258
|
-
method:
|
|
142369
|
+
method: z56.literal("notifications/tasks/status"),
|
|
142259
142370
|
params: TaskStatusNotificationParamsSchema
|
|
142260
142371
|
});
|
|
142261
142372
|
var GetTaskRequestSchema = RequestSchema.extend({
|
|
142262
|
-
method:
|
|
142373
|
+
method: z56.literal("tasks/get"),
|
|
142263
142374
|
params: BaseRequestParamsSchema.extend({
|
|
142264
|
-
taskId:
|
|
142375
|
+
taskId: z56.string()
|
|
142265
142376
|
})
|
|
142266
142377
|
});
|
|
142267
142378
|
var GetTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
142268
142379
|
var GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
142269
|
-
method:
|
|
142380
|
+
method: z56.literal("tasks/result"),
|
|
142270
142381
|
params: BaseRequestParamsSchema.extend({
|
|
142271
|
-
taskId:
|
|
142382
|
+
taskId: z56.string()
|
|
142272
142383
|
})
|
|
142273
142384
|
});
|
|
142274
142385
|
var GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
142275
142386
|
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
|
|
142276
|
-
method:
|
|
142387
|
+
method: z56.literal("tasks/list")
|
|
142277
142388
|
});
|
|
142278
142389
|
var ListTasksResultSchema = PaginatedResultSchema.extend({
|
|
142279
|
-
tasks:
|
|
142390
|
+
tasks: z56.array(TaskSchema2)
|
|
142280
142391
|
});
|
|
142281
142392
|
var CancelTaskRequestSchema = RequestSchema.extend({
|
|
142282
|
-
method:
|
|
142393
|
+
method: z56.literal("tasks/cancel"),
|
|
142283
142394
|
params: BaseRequestParamsSchema.extend({
|
|
142284
|
-
taskId:
|
|
142395
|
+
taskId: z56.string()
|
|
142285
142396
|
})
|
|
142286
142397
|
});
|
|
142287
142398
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
142288
|
-
var ResourceContentsSchema =
|
|
142289
|
-
uri:
|
|
142290
|
-
mimeType:
|
|
142291
|
-
_meta:
|
|
142399
|
+
var ResourceContentsSchema = z56.object({
|
|
142400
|
+
uri: z56.string(),
|
|
142401
|
+
mimeType: z56.optional(z56.string()),
|
|
142402
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142292
142403
|
});
|
|
142293
142404
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
142294
|
-
text:
|
|
142405
|
+
text: z56.string()
|
|
142295
142406
|
});
|
|
142296
|
-
var Base64Schema =
|
|
142407
|
+
var Base64Schema = z56.string().refine((val) => {
|
|
142297
142408
|
try {
|
|
142298
142409
|
atob(val);
|
|
142299
142410
|
return true;
|
|
@@ -142304,447 +142415,447 @@ var Base64Schema = z55.string().refine((val) => {
|
|
|
142304
142415
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
142305
142416
|
blob: Base64Schema
|
|
142306
142417
|
});
|
|
142307
|
-
var RoleSchema =
|
|
142308
|
-
var AnnotationsSchema =
|
|
142309
|
-
audience:
|
|
142310
|
-
priority:
|
|
142311
|
-
lastModified:
|
|
142418
|
+
var RoleSchema = z56.enum(["user", "assistant"]);
|
|
142419
|
+
var AnnotationsSchema = z56.object({
|
|
142420
|
+
audience: z56.array(RoleSchema).optional(),
|
|
142421
|
+
priority: z56.number().min(0).max(1).optional(),
|
|
142422
|
+
lastModified: z56.iso.datetime({ offset: true }).optional()
|
|
142312
142423
|
});
|
|
142313
|
-
var ResourceSchema =
|
|
142424
|
+
var ResourceSchema = z56.object({
|
|
142314
142425
|
...BaseMetadataSchema.shape,
|
|
142315
142426
|
...IconsSchema.shape,
|
|
142316
|
-
uri:
|
|
142317
|
-
description:
|
|
142318
|
-
mimeType:
|
|
142319
|
-
size:
|
|
142427
|
+
uri: z56.string(),
|
|
142428
|
+
description: z56.optional(z56.string()),
|
|
142429
|
+
mimeType: z56.optional(z56.string()),
|
|
142430
|
+
size: z56.optional(z56.number()),
|
|
142320
142431
|
annotations: AnnotationsSchema.optional(),
|
|
142321
|
-
_meta:
|
|
142432
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142322
142433
|
});
|
|
142323
|
-
var ResourceTemplateSchema =
|
|
142434
|
+
var ResourceTemplateSchema = z56.object({
|
|
142324
142435
|
...BaseMetadataSchema.shape,
|
|
142325
142436
|
...IconsSchema.shape,
|
|
142326
|
-
uriTemplate:
|
|
142327
|
-
description:
|
|
142328
|
-
mimeType:
|
|
142437
|
+
uriTemplate: z56.string(),
|
|
142438
|
+
description: z56.optional(z56.string()),
|
|
142439
|
+
mimeType: z56.optional(z56.string()),
|
|
142329
142440
|
annotations: AnnotationsSchema.optional(),
|
|
142330
|
-
_meta:
|
|
142441
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142331
142442
|
});
|
|
142332
142443
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
142333
|
-
method:
|
|
142444
|
+
method: z56.literal("resources/list")
|
|
142334
142445
|
});
|
|
142335
142446
|
var ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
142336
|
-
resources:
|
|
142447
|
+
resources: z56.array(ResourceSchema)
|
|
142337
142448
|
});
|
|
142338
142449
|
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
142339
|
-
method:
|
|
142450
|
+
method: z56.literal("resources/templates/list")
|
|
142340
142451
|
});
|
|
142341
142452
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
142342
|
-
resourceTemplates:
|
|
142453
|
+
resourceTemplates: z56.array(ResourceTemplateSchema)
|
|
142343
142454
|
});
|
|
142344
142455
|
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142345
|
-
uri:
|
|
142456
|
+
uri: z56.string()
|
|
142346
142457
|
});
|
|
142347
142458
|
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142348
142459
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
142349
|
-
method:
|
|
142460
|
+
method: z56.literal("resources/read"),
|
|
142350
142461
|
params: ReadResourceRequestParamsSchema
|
|
142351
142462
|
});
|
|
142352
142463
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
142353
|
-
contents:
|
|
142464
|
+
contents: z56.array(z56.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
142354
142465
|
});
|
|
142355
142466
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
142356
|
-
method:
|
|
142467
|
+
method: z56.literal("notifications/resources/list_changed"),
|
|
142357
142468
|
params: NotificationsParamsSchema.optional()
|
|
142358
142469
|
});
|
|
142359
142470
|
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142360
142471
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
142361
|
-
method:
|
|
142472
|
+
method: z56.literal("resources/subscribe"),
|
|
142362
142473
|
params: SubscribeRequestParamsSchema
|
|
142363
142474
|
});
|
|
142364
142475
|
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142365
142476
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
142366
|
-
method:
|
|
142477
|
+
method: z56.literal("resources/unsubscribe"),
|
|
142367
142478
|
params: UnsubscribeRequestParamsSchema
|
|
142368
142479
|
});
|
|
142369
142480
|
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142370
|
-
uri:
|
|
142481
|
+
uri: z56.string()
|
|
142371
142482
|
});
|
|
142372
142483
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
142373
|
-
method:
|
|
142484
|
+
method: z56.literal("notifications/resources/updated"),
|
|
142374
142485
|
params: ResourceUpdatedNotificationParamsSchema
|
|
142375
142486
|
});
|
|
142376
|
-
var PromptArgumentSchema =
|
|
142377
|
-
name:
|
|
142378
|
-
description:
|
|
142379
|
-
required:
|
|
142487
|
+
var PromptArgumentSchema = z56.object({
|
|
142488
|
+
name: z56.string(),
|
|
142489
|
+
description: z56.optional(z56.string()),
|
|
142490
|
+
required: z56.optional(z56.boolean())
|
|
142380
142491
|
});
|
|
142381
|
-
var PromptSchema =
|
|
142492
|
+
var PromptSchema = z56.object({
|
|
142382
142493
|
...BaseMetadataSchema.shape,
|
|
142383
142494
|
...IconsSchema.shape,
|
|
142384
|
-
description:
|
|
142385
|
-
arguments:
|
|
142386
|
-
_meta:
|
|
142495
|
+
description: z56.optional(z56.string()),
|
|
142496
|
+
arguments: z56.optional(z56.array(PromptArgumentSchema)),
|
|
142497
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142387
142498
|
});
|
|
142388
142499
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
142389
|
-
method:
|
|
142500
|
+
method: z56.literal("prompts/list")
|
|
142390
142501
|
});
|
|
142391
142502
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
142392
|
-
prompts:
|
|
142503
|
+
prompts: z56.array(PromptSchema)
|
|
142393
142504
|
});
|
|
142394
142505
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142395
|
-
name:
|
|
142396
|
-
arguments:
|
|
142506
|
+
name: z56.string(),
|
|
142507
|
+
arguments: z56.record(z56.string(), z56.string()).optional()
|
|
142397
142508
|
});
|
|
142398
142509
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
142399
|
-
method:
|
|
142510
|
+
method: z56.literal("prompts/get"),
|
|
142400
142511
|
params: GetPromptRequestParamsSchema
|
|
142401
142512
|
});
|
|
142402
|
-
var TextContentSchema =
|
|
142403
|
-
type:
|
|
142404
|
-
text:
|
|
142513
|
+
var TextContentSchema = z56.object({
|
|
142514
|
+
type: z56.literal("text"),
|
|
142515
|
+
text: z56.string(),
|
|
142405
142516
|
annotations: AnnotationsSchema.optional(),
|
|
142406
|
-
_meta:
|
|
142517
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142407
142518
|
});
|
|
142408
|
-
var ImageContentSchema =
|
|
142409
|
-
type:
|
|
142519
|
+
var ImageContentSchema = z56.object({
|
|
142520
|
+
type: z56.literal("image"),
|
|
142410
142521
|
data: Base64Schema,
|
|
142411
|
-
mimeType:
|
|
142522
|
+
mimeType: z56.string(),
|
|
142412
142523
|
annotations: AnnotationsSchema.optional(),
|
|
142413
|
-
_meta:
|
|
142524
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142414
142525
|
});
|
|
142415
|
-
var AudioContentSchema =
|
|
142416
|
-
type:
|
|
142526
|
+
var AudioContentSchema = z56.object({
|
|
142527
|
+
type: z56.literal("audio"),
|
|
142417
142528
|
data: Base64Schema,
|
|
142418
|
-
mimeType:
|
|
142529
|
+
mimeType: z56.string(),
|
|
142419
142530
|
annotations: AnnotationsSchema.optional(),
|
|
142420
|
-
_meta:
|
|
142531
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142421
142532
|
});
|
|
142422
|
-
var ToolUseContentSchema =
|
|
142423
|
-
type:
|
|
142424
|
-
name:
|
|
142425
|
-
id:
|
|
142426
|
-
input:
|
|
142427
|
-
_meta:
|
|
142533
|
+
var ToolUseContentSchema = z56.object({
|
|
142534
|
+
type: z56.literal("tool_use"),
|
|
142535
|
+
name: z56.string(),
|
|
142536
|
+
id: z56.string(),
|
|
142537
|
+
input: z56.record(z56.string(), z56.unknown()),
|
|
142538
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142428
142539
|
});
|
|
142429
|
-
var EmbeddedResourceSchema =
|
|
142430
|
-
type:
|
|
142431
|
-
resource:
|
|
142540
|
+
var EmbeddedResourceSchema = z56.object({
|
|
142541
|
+
type: z56.literal("resource"),
|
|
142542
|
+
resource: z56.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
142432
142543
|
annotations: AnnotationsSchema.optional(),
|
|
142433
|
-
_meta:
|
|
142544
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142434
142545
|
});
|
|
142435
142546
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
142436
|
-
type:
|
|
142547
|
+
type: z56.literal("resource_link")
|
|
142437
142548
|
});
|
|
142438
|
-
var ContentBlockSchema =
|
|
142549
|
+
var ContentBlockSchema = z56.union([
|
|
142439
142550
|
TextContentSchema,
|
|
142440
142551
|
ImageContentSchema,
|
|
142441
142552
|
AudioContentSchema,
|
|
142442
142553
|
ResourceLinkSchema,
|
|
142443
142554
|
EmbeddedResourceSchema
|
|
142444
142555
|
]);
|
|
142445
|
-
var PromptMessageSchema =
|
|
142556
|
+
var PromptMessageSchema = z56.object({
|
|
142446
142557
|
role: RoleSchema,
|
|
142447
142558
|
content: ContentBlockSchema
|
|
142448
142559
|
});
|
|
142449
142560
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
142450
|
-
description:
|
|
142451
|
-
messages:
|
|
142561
|
+
description: z56.string().optional(),
|
|
142562
|
+
messages: z56.array(PromptMessageSchema)
|
|
142452
142563
|
});
|
|
142453
142564
|
var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
142454
|
-
method:
|
|
142565
|
+
method: z56.literal("notifications/prompts/list_changed"),
|
|
142455
142566
|
params: NotificationsParamsSchema.optional()
|
|
142456
142567
|
});
|
|
142457
|
-
var ToolAnnotationsSchema =
|
|
142458
|
-
title:
|
|
142459
|
-
readOnlyHint:
|
|
142460
|
-
destructiveHint:
|
|
142461
|
-
idempotentHint:
|
|
142462
|
-
openWorldHint:
|
|
142568
|
+
var ToolAnnotationsSchema = z56.object({
|
|
142569
|
+
title: z56.string().optional(),
|
|
142570
|
+
readOnlyHint: z56.boolean().optional(),
|
|
142571
|
+
destructiveHint: z56.boolean().optional(),
|
|
142572
|
+
idempotentHint: z56.boolean().optional(),
|
|
142573
|
+
openWorldHint: z56.boolean().optional()
|
|
142463
142574
|
});
|
|
142464
|
-
var ToolExecutionSchema =
|
|
142465
|
-
taskSupport:
|
|
142575
|
+
var ToolExecutionSchema = z56.object({
|
|
142576
|
+
taskSupport: z56.enum(["required", "optional", "forbidden"]).optional()
|
|
142466
142577
|
});
|
|
142467
|
-
var ToolSchema =
|
|
142578
|
+
var ToolSchema = z56.object({
|
|
142468
142579
|
...BaseMetadataSchema.shape,
|
|
142469
142580
|
...IconsSchema.shape,
|
|
142470
|
-
description:
|
|
142471
|
-
inputSchema:
|
|
142472
|
-
type:
|
|
142473
|
-
properties:
|
|
142474
|
-
required:
|
|
142475
|
-
}).catchall(
|
|
142476
|
-
outputSchema:
|
|
142477
|
-
type:
|
|
142478
|
-
properties:
|
|
142479
|
-
required:
|
|
142480
|
-
}).catchall(
|
|
142581
|
+
description: z56.string().optional(),
|
|
142582
|
+
inputSchema: z56.object({
|
|
142583
|
+
type: z56.literal("object"),
|
|
142584
|
+
properties: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142585
|
+
required: z56.array(z56.string()).optional()
|
|
142586
|
+
}).catchall(z56.unknown()),
|
|
142587
|
+
outputSchema: z56.object({
|
|
142588
|
+
type: z56.literal("object"),
|
|
142589
|
+
properties: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142590
|
+
required: z56.array(z56.string()).optional()
|
|
142591
|
+
}).catchall(z56.unknown()).optional(),
|
|
142481
142592
|
annotations: ToolAnnotationsSchema.optional(),
|
|
142482
142593
|
execution: ToolExecutionSchema.optional(),
|
|
142483
|
-
_meta:
|
|
142594
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142484
142595
|
});
|
|
142485
142596
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
142486
|
-
method:
|
|
142597
|
+
method: z56.literal("tools/list")
|
|
142487
142598
|
});
|
|
142488
142599
|
var ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
142489
|
-
tools:
|
|
142600
|
+
tools: z56.array(ToolSchema)
|
|
142490
142601
|
});
|
|
142491
142602
|
var CallToolResultSchema = ResultSchema.extend({
|
|
142492
|
-
content:
|
|
142493
|
-
structuredContent:
|
|
142494
|
-
isError:
|
|
142603
|
+
content: z56.array(ContentBlockSchema).default([]),
|
|
142604
|
+
structuredContent: z56.record(z56.string(), z56.unknown()).optional(),
|
|
142605
|
+
isError: z56.boolean().optional()
|
|
142495
142606
|
});
|
|
142496
142607
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
142497
|
-
toolResult:
|
|
142608
|
+
toolResult: z56.unknown()
|
|
142498
142609
|
}));
|
|
142499
142610
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142500
|
-
name:
|
|
142501
|
-
arguments:
|
|
142611
|
+
name: z56.string(),
|
|
142612
|
+
arguments: z56.record(z56.string(), z56.unknown()).optional()
|
|
142502
142613
|
});
|
|
142503
142614
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
142504
|
-
method:
|
|
142615
|
+
method: z56.literal("tools/call"),
|
|
142505
142616
|
params: CallToolRequestParamsSchema
|
|
142506
142617
|
});
|
|
142507
142618
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
142508
|
-
method:
|
|
142619
|
+
method: z56.literal("notifications/tools/list_changed"),
|
|
142509
142620
|
params: NotificationsParamsSchema.optional()
|
|
142510
142621
|
});
|
|
142511
|
-
var ListChangedOptionsBaseSchema =
|
|
142512
|
-
autoRefresh:
|
|
142513
|
-
debounceMs:
|
|
142622
|
+
var ListChangedOptionsBaseSchema = z56.object({
|
|
142623
|
+
autoRefresh: z56.boolean().default(true),
|
|
142624
|
+
debounceMs: z56.number().int().nonnegative().default(300)
|
|
142514
142625
|
});
|
|
142515
|
-
var LoggingLevelSchema =
|
|
142626
|
+
var LoggingLevelSchema = z56.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
142516
142627
|
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142517
142628
|
level: LoggingLevelSchema
|
|
142518
142629
|
});
|
|
142519
142630
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
142520
|
-
method:
|
|
142631
|
+
method: z56.literal("logging/setLevel"),
|
|
142521
142632
|
params: SetLevelRequestParamsSchema
|
|
142522
142633
|
});
|
|
142523
142634
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142524
142635
|
level: LoggingLevelSchema,
|
|
142525
|
-
logger:
|
|
142526
|
-
data:
|
|
142636
|
+
logger: z56.string().optional(),
|
|
142637
|
+
data: z56.unknown()
|
|
142527
142638
|
});
|
|
142528
142639
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
142529
|
-
method:
|
|
142640
|
+
method: z56.literal("notifications/message"),
|
|
142530
142641
|
params: LoggingMessageNotificationParamsSchema
|
|
142531
142642
|
});
|
|
142532
|
-
var ModelHintSchema =
|
|
142533
|
-
name:
|
|
142643
|
+
var ModelHintSchema = z56.object({
|
|
142644
|
+
name: z56.string().optional()
|
|
142534
142645
|
});
|
|
142535
|
-
var ModelPreferencesSchema =
|
|
142536
|
-
hints:
|
|
142537
|
-
costPriority:
|
|
142538
|
-
speedPriority:
|
|
142539
|
-
intelligencePriority:
|
|
142646
|
+
var ModelPreferencesSchema = z56.object({
|
|
142647
|
+
hints: z56.array(ModelHintSchema).optional(),
|
|
142648
|
+
costPriority: z56.number().min(0).max(1).optional(),
|
|
142649
|
+
speedPriority: z56.number().min(0).max(1).optional(),
|
|
142650
|
+
intelligencePriority: z56.number().min(0).max(1).optional()
|
|
142540
142651
|
});
|
|
142541
|
-
var ToolChoiceSchema =
|
|
142542
|
-
mode:
|
|
142652
|
+
var ToolChoiceSchema = z56.object({
|
|
142653
|
+
mode: z56.enum(["auto", "required", "none"]).optional()
|
|
142543
142654
|
});
|
|
142544
|
-
var ToolResultContentSchema =
|
|
142545
|
-
type:
|
|
142546
|
-
toolUseId:
|
|
142547
|
-
content:
|
|
142548
|
-
structuredContent:
|
|
142549
|
-
isError:
|
|
142550
|
-
_meta:
|
|
142655
|
+
var ToolResultContentSchema = z56.object({
|
|
142656
|
+
type: z56.literal("tool_result"),
|
|
142657
|
+
toolUseId: z56.string().describe("The unique identifier for the corresponding tool call."),
|
|
142658
|
+
content: z56.array(ContentBlockSchema).default([]),
|
|
142659
|
+
structuredContent: z56.object({}).loose().optional(),
|
|
142660
|
+
isError: z56.boolean().optional(),
|
|
142661
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142551
142662
|
});
|
|
142552
|
-
var SamplingContentSchema =
|
|
142553
|
-
var SamplingMessageContentBlockSchema =
|
|
142663
|
+
var SamplingContentSchema = z56.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
|
|
142664
|
+
var SamplingMessageContentBlockSchema = z56.discriminatedUnion("type", [
|
|
142554
142665
|
TextContentSchema,
|
|
142555
142666
|
ImageContentSchema,
|
|
142556
142667
|
AudioContentSchema,
|
|
142557
142668
|
ToolUseContentSchema,
|
|
142558
142669
|
ToolResultContentSchema
|
|
142559
142670
|
]);
|
|
142560
|
-
var SamplingMessageSchema =
|
|
142671
|
+
var SamplingMessageSchema = z56.object({
|
|
142561
142672
|
role: RoleSchema,
|
|
142562
|
-
content:
|
|
142563
|
-
_meta:
|
|
142673
|
+
content: z56.union([SamplingMessageContentBlockSchema, z56.array(SamplingMessageContentBlockSchema)]),
|
|
142674
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142564
142675
|
});
|
|
142565
142676
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142566
|
-
messages:
|
|
142677
|
+
messages: z56.array(SamplingMessageSchema),
|
|
142567
142678
|
modelPreferences: ModelPreferencesSchema.optional(),
|
|
142568
|
-
systemPrompt:
|
|
142569
|
-
includeContext:
|
|
142570
|
-
temperature:
|
|
142571
|
-
maxTokens:
|
|
142572
|
-
stopSequences:
|
|
142679
|
+
systemPrompt: z56.string().optional(),
|
|
142680
|
+
includeContext: z56.enum(["none", "thisServer", "allServers"]).optional(),
|
|
142681
|
+
temperature: z56.number().optional(),
|
|
142682
|
+
maxTokens: z56.number().int(),
|
|
142683
|
+
stopSequences: z56.array(z56.string()).optional(),
|
|
142573
142684
|
metadata: AssertObjectSchema.optional(),
|
|
142574
|
-
tools:
|
|
142685
|
+
tools: z56.array(ToolSchema).optional(),
|
|
142575
142686
|
toolChoice: ToolChoiceSchema.optional()
|
|
142576
142687
|
});
|
|
142577
142688
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
142578
|
-
method:
|
|
142689
|
+
method: z56.literal("sampling/createMessage"),
|
|
142579
142690
|
params: CreateMessageRequestParamsSchema
|
|
142580
142691
|
});
|
|
142581
142692
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
142582
|
-
model:
|
|
142583
|
-
stopReason:
|
|
142693
|
+
model: z56.string(),
|
|
142694
|
+
stopReason: z56.optional(z56.enum(["endTurn", "stopSequence", "maxTokens"]).or(z56.string())),
|
|
142584
142695
|
role: RoleSchema,
|
|
142585
142696
|
content: SamplingContentSchema
|
|
142586
142697
|
});
|
|
142587
142698
|
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
142588
|
-
model:
|
|
142589
|
-
stopReason:
|
|
142699
|
+
model: z56.string(),
|
|
142700
|
+
stopReason: z56.optional(z56.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z56.string())),
|
|
142590
142701
|
role: RoleSchema,
|
|
142591
|
-
content:
|
|
142702
|
+
content: z56.union([SamplingMessageContentBlockSchema, z56.array(SamplingMessageContentBlockSchema)])
|
|
142592
142703
|
});
|
|
142593
|
-
var BooleanSchemaSchema =
|
|
142594
|
-
type:
|
|
142595
|
-
title:
|
|
142596
|
-
description:
|
|
142597
|
-
default:
|
|
142704
|
+
var BooleanSchemaSchema = z56.object({
|
|
142705
|
+
type: z56.literal("boolean"),
|
|
142706
|
+
title: z56.string().optional(),
|
|
142707
|
+
description: z56.string().optional(),
|
|
142708
|
+
default: z56.boolean().optional()
|
|
142598
142709
|
});
|
|
142599
|
-
var StringSchemaSchema =
|
|
142600
|
-
type:
|
|
142601
|
-
title:
|
|
142602
|
-
description:
|
|
142603
|
-
minLength:
|
|
142604
|
-
maxLength:
|
|
142605
|
-
format:
|
|
142606
|
-
default:
|
|
142710
|
+
var StringSchemaSchema = z56.object({
|
|
142711
|
+
type: z56.literal("string"),
|
|
142712
|
+
title: z56.string().optional(),
|
|
142713
|
+
description: z56.string().optional(),
|
|
142714
|
+
minLength: z56.number().optional(),
|
|
142715
|
+
maxLength: z56.number().optional(),
|
|
142716
|
+
format: z56.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
142717
|
+
default: z56.string().optional()
|
|
142607
142718
|
});
|
|
142608
|
-
var NumberSchemaSchema =
|
|
142609
|
-
type:
|
|
142610
|
-
title:
|
|
142611
|
-
description:
|
|
142612
|
-
minimum:
|
|
142613
|
-
maximum:
|
|
142614
|
-
default:
|
|
142719
|
+
var NumberSchemaSchema = z56.object({
|
|
142720
|
+
type: z56.enum(["number", "integer"]),
|
|
142721
|
+
title: z56.string().optional(),
|
|
142722
|
+
description: z56.string().optional(),
|
|
142723
|
+
minimum: z56.number().optional(),
|
|
142724
|
+
maximum: z56.number().optional(),
|
|
142725
|
+
default: z56.number().optional()
|
|
142615
142726
|
});
|
|
142616
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
142617
|
-
type:
|
|
142618
|
-
title:
|
|
142619
|
-
description:
|
|
142620
|
-
enum:
|
|
142621
|
-
default:
|
|
142727
|
+
var UntitledSingleSelectEnumSchemaSchema = z56.object({
|
|
142728
|
+
type: z56.literal("string"),
|
|
142729
|
+
title: z56.string().optional(),
|
|
142730
|
+
description: z56.string().optional(),
|
|
142731
|
+
enum: z56.array(z56.string()),
|
|
142732
|
+
default: z56.string().optional()
|
|
142622
142733
|
});
|
|
142623
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
142624
|
-
type:
|
|
142625
|
-
title:
|
|
142626
|
-
description:
|
|
142627
|
-
oneOf:
|
|
142628
|
-
const:
|
|
142629
|
-
title:
|
|
142734
|
+
var TitledSingleSelectEnumSchemaSchema = z56.object({
|
|
142735
|
+
type: z56.literal("string"),
|
|
142736
|
+
title: z56.string().optional(),
|
|
142737
|
+
description: z56.string().optional(),
|
|
142738
|
+
oneOf: z56.array(z56.object({
|
|
142739
|
+
const: z56.string(),
|
|
142740
|
+
title: z56.string()
|
|
142630
142741
|
})),
|
|
142631
|
-
default:
|
|
142742
|
+
default: z56.string().optional()
|
|
142632
142743
|
});
|
|
142633
|
-
var LegacyTitledEnumSchemaSchema =
|
|
142634
|
-
type:
|
|
142635
|
-
title:
|
|
142636
|
-
description:
|
|
142637
|
-
enum:
|
|
142638
|
-
enumNames:
|
|
142639
|
-
default:
|
|
142744
|
+
var LegacyTitledEnumSchemaSchema = z56.object({
|
|
142745
|
+
type: z56.literal("string"),
|
|
142746
|
+
title: z56.string().optional(),
|
|
142747
|
+
description: z56.string().optional(),
|
|
142748
|
+
enum: z56.array(z56.string()),
|
|
142749
|
+
enumNames: z56.array(z56.string()).optional(),
|
|
142750
|
+
default: z56.string().optional()
|
|
142640
142751
|
});
|
|
142641
|
-
var SingleSelectEnumSchemaSchema =
|
|
142642
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
142643
|
-
type:
|
|
142644
|
-
title:
|
|
142645
|
-
description:
|
|
142646
|
-
minItems:
|
|
142647
|
-
maxItems:
|
|
142648
|
-
items:
|
|
142649
|
-
type:
|
|
142650
|
-
enum:
|
|
142752
|
+
var SingleSelectEnumSchemaSchema = z56.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
142753
|
+
var UntitledMultiSelectEnumSchemaSchema = z56.object({
|
|
142754
|
+
type: z56.literal("array"),
|
|
142755
|
+
title: z56.string().optional(),
|
|
142756
|
+
description: z56.string().optional(),
|
|
142757
|
+
minItems: z56.number().optional(),
|
|
142758
|
+
maxItems: z56.number().optional(),
|
|
142759
|
+
items: z56.object({
|
|
142760
|
+
type: z56.literal("string"),
|
|
142761
|
+
enum: z56.array(z56.string())
|
|
142651
142762
|
}),
|
|
142652
|
-
default:
|
|
142763
|
+
default: z56.array(z56.string()).optional()
|
|
142653
142764
|
});
|
|
142654
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
142655
|
-
type:
|
|
142656
|
-
title:
|
|
142657
|
-
description:
|
|
142658
|
-
minItems:
|
|
142659
|
-
maxItems:
|
|
142660
|
-
items:
|
|
142661
|
-
anyOf:
|
|
142662
|
-
const:
|
|
142663
|
-
title:
|
|
142765
|
+
var TitledMultiSelectEnumSchemaSchema = z56.object({
|
|
142766
|
+
type: z56.literal("array"),
|
|
142767
|
+
title: z56.string().optional(),
|
|
142768
|
+
description: z56.string().optional(),
|
|
142769
|
+
minItems: z56.number().optional(),
|
|
142770
|
+
maxItems: z56.number().optional(),
|
|
142771
|
+
items: z56.object({
|
|
142772
|
+
anyOf: z56.array(z56.object({
|
|
142773
|
+
const: z56.string(),
|
|
142774
|
+
title: z56.string()
|
|
142664
142775
|
}))
|
|
142665
142776
|
}),
|
|
142666
|
-
default:
|
|
142777
|
+
default: z56.array(z56.string()).optional()
|
|
142667
142778
|
});
|
|
142668
|
-
var MultiSelectEnumSchemaSchema =
|
|
142669
|
-
var EnumSchemaSchema =
|
|
142670
|
-
var PrimitiveSchemaDefinitionSchema =
|
|
142779
|
+
var MultiSelectEnumSchemaSchema = z56.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
142780
|
+
var EnumSchemaSchema = z56.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
142781
|
+
var PrimitiveSchemaDefinitionSchema = z56.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
142671
142782
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142672
|
-
mode:
|
|
142673
|
-
message:
|
|
142674
|
-
requestedSchema:
|
|
142675
|
-
type:
|
|
142676
|
-
properties:
|
|
142677
|
-
required:
|
|
142783
|
+
mode: z56.literal("form").optional(),
|
|
142784
|
+
message: z56.string(),
|
|
142785
|
+
requestedSchema: z56.object({
|
|
142786
|
+
type: z56.literal("object"),
|
|
142787
|
+
properties: z56.record(z56.string(), PrimitiveSchemaDefinitionSchema),
|
|
142788
|
+
required: z56.array(z56.string()).optional()
|
|
142678
142789
|
})
|
|
142679
142790
|
});
|
|
142680
142791
|
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142681
|
-
mode:
|
|
142682
|
-
message:
|
|
142683
|
-
elicitationId:
|
|
142684
|
-
url:
|
|
142792
|
+
mode: z56.literal("url"),
|
|
142793
|
+
message: z56.string(),
|
|
142794
|
+
elicitationId: z56.string(),
|
|
142795
|
+
url: z56.string().url()
|
|
142685
142796
|
});
|
|
142686
|
-
var ElicitRequestParamsSchema =
|
|
142797
|
+
var ElicitRequestParamsSchema = z56.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
142687
142798
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
142688
|
-
method:
|
|
142799
|
+
method: z56.literal("elicitation/create"),
|
|
142689
142800
|
params: ElicitRequestParamsSchema
|
|
142690
142801
|
});
|
|
142691
142802
|
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142692
|
-
elicitationId:
|
|
142803
|
+
elicitationId: z56.string()
|
|
142693
142804
|
});
|
|
142694
142805
|
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
142695
|
-
method:
|
|
142806
|
+
method: z56.literal("notifications/elicitation/complete"),
|
|
142696
142807
|
params: ElicitationCompleteNotificationParamsSchema
|
|
142697
142808
|
});
|
|
142698
142809
|
var ElicitResultSchema = ResultSchema.extend({
|
|
142699
|
-
action:
|
|
142700
|
-
content:
|
|
142810
|
+
action: z56.enum(["accept", "decline", "cancel"]),
|
|
142811
|
+
content: z56.preprocess((val) => val === null ? undefined : val, z56.record(z56.string(), z56.union([z56.string(), z56.number(), z56.boolean(), z56.array(z56.string())])).optional())
|
|
142701
142812
|
});
|
|
142702
|
-
var ResourceTemplateReferenceSchema =
|
|
142703
|
-
type:
|
|
142704
|
-
uri:
|
|
142813
|
+
var ResourceTemplateReferenceSchema = z56.object({
|
|
142814
|
+
type: z56.literal("ref/resource"),
|
|
142815
|
+
uri: z56.string()
|
|
142705
142816
|
});
|
|
142706
|
-
var PromptReferenceSchema =
|
|
142707
|
-
type:
|
|
142708
|
-
name:
|
|
142817
|
+
var PromptReferenceSchema = z56.object({
|
|
142818
|
+
type: z56.literal("ref/prompt"),
|
|
142819
|
+
name: z56.string()
|
|
142709
142820
|
});
|
|
142710
142821
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142711
|
-
ref:
|
|
142712
|
-
argument:
|
|
142713
|
-
name:
|
|
142714
|
-
value:
|
|
142822
|
+
ref: z56.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
142823
|
+
argument: z56.object({
|
|
142824
|
+
name: z56.string(),
|
|
142825
|
+
value: z56.string()
|
|
142715
142826
|
}),
|
|
142716
|
-
context:
|
|
142717
|
-
arguments:
|
|
142827
|
+
context: z56.object({
|
|
142828
|
+
arguments: z56.record(z56.string(), z56.string()).optional()
|
|
142718
142829
|
}).optional()
|
|
142719
142830
|
});
|
|
142720
142831
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
142721
|
-
method:
|
|
142832
|
+
method: z56.literal("completion/complete"),
|
|
142722
142833
|
params: CompleteRequestParamsSchema
|
|
142723
142834
|
});
|
|
142724
142835
|
var CompleteResultSchema = ResultSchema.extend({
|
|
142725
|
-
completion:
|
|
142726
|
-
values:
|
|
142727
|
-
total:
|
|
142728
|
-
hasMore:
|
|
142836
|
+
completion: z56.looseObject({
|
|
142837
|
+
values: z56.array(z56.string()).max(100),
|
|
142838
|
+
total: z56.optional(z56.number().int()),
|
|
142839
|
+
hasMore: z56.optional(z56.boolean())
|
|
142729
142840
|
})
|
|
142730
142841
|
});
|
|
142731
|
-
var RootSchema =
|
|
142732
|
-
uri:
|
|
142733
|
-
name:
|
|
142734
|
-
_meta:
|
|
142842
|
+
var RootSchema = z56.object({
|
|
142843
|
+
uri: z56.string().startsWith("file://"),
|
|
142844
|
+
name: z56.string().optional(),
|
|
142845
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142735
142846
|
});
|
|
142736
142847
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
142737
|
-
method:
|
|
142848
|
+
method: z56.literal("roots/list"),
|
|
142738
142849
|
params: BaseRequestParamsSchema.optional()
|
|
142739
142850
|
});
|
|
142740
142851
|
var ListRootsResultSchema = ResultSchema.extend({
|
|
142741
|
-
roots:
|
|
142852
|
+
roots: z56.array(RootSchema)
|
|
142742
142853
|
});
|
|
142743
142854
|
var RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
142744
|
-
method:
|
|
142855
|
+
method: z56.literal("notifications/roots/list_changed"),
|
|
142745
142856
|
params: NotificationsParamsSchema.optional()
|
|
142746
142857
|
});
|
|
142747
|
-
var ClientRequestSchema =
|
|
142858
|
+
var ClientRequestSchema = z56.union([
|
|
142748
142859
|
PingRequestSchema,
|
|
142749
142860
|
InitializeRequestSchema,
|
|
142750
142861
|
CompleteRequestSchema,
|
|
@@ -142763,14 +142874,14 @@ var ClientRequestSchema = z55.union([
|
|
|
142763
142874
|
ListTasksRequestSchema,
|
|
142764
142875
|
CancelTaskRequestSchema
|
|
142765
142876
|
]);
|
|
142766
|
-
var ClientNotificationSchema =
|
|
142877
|
+
var ClientNotificationSchema = z56.union([
|
|
142767
142878
|
CancelledNotificationSchema,
|
|
142768
142879
|
ProgressNotificationSchema,
|
|
142769
142880
|
InitializedNotificationSchema,
|
|
142770
142881
|
RootsListChangedNotificationSchema,
|
|
142771
142882
|
TaskStatusNotificationSchema
|
|
142772
142883
|
]);
|
|
142773
|
-
var ClientResultSchema =
|
|
142884
|
+
var ClientResultSchema = z56.union([
|
|
142774
142885
|
EmptyResultSchema,
|
|
142775
142886
|
CreateMessageResultSchema,
|
|
142776
142887
|
CreateMessageResultWithToolsSchema,
|
|
@@ -142780,7 +142891,7 @@ var ClientResultSchema = z55.union([
|
|
|
142780
142891
|
ListTasksResultSchema,
|
|
142781
142892
|
CreateTaskResultSchema
|
|
142782
142893
|
]);
|
|
142783
|
-
var ServerRequestSchema =
|
|
142894
|
+
var ServerRequestSchema = z56.union([
|
|
142784
142895
|
PingRequestSchema,
|
|
142785
142896
|
CreateMessageRequestSchema,
|
|
142786
142897
|
ElicitRequestSchema,
|
|
@@ -142790,7 +142901,7 @@ var ServerRequestSchema = z55.union([
|
|
|
142790
142901
|
ListTasksRequestSchema,
|
|
142791
142902
|
CancelTaskRequestSchema
|
|
142792
142903
|
]);
|
|
142793
|
-
var ServerNotificationSchema =
|
|
142904
|
+
var ServerNotificationSchema = z56.union([
|
|
142794
142905
|
CancelledNotificationSchema,
|
|
142795
142906
|
ProgressNotificationSchema,
|
|
142796
142907
|
LoggingMessageNotificationSchema,
|
|
@@ -142801,7 +142912,7 @@ var ServerNotificationSchema = z55.union([
|
|
|
142801
142912
|
TaskStatusNotificationSchema,
|
|
142802
142913
|
ElicitationCompleteNotificationSchema
|
|
142803
142914
|
]);
|
|
142804
|
-
var ServerResultSchema =
|
|
142915
|
+
var ServerResultSchema = z56.union([
|
|
142805
142916
|
EmptyResultSchema,
|
|
142806
142917
|
InitializeResultSchema,
|
|
142807
142918
|
CompleteResultSchema,
|
|
@@ -144479,149 +144590,149 @@ async function pkceChallenge(length) {
|
|
|
144479
144590
|
}
|
|
144480
144591
|
|
|
144481
144592
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
144482
|
-
import * as
|
|
144483
|
-
var SafeUrlSchema =
|
|
144593
|
+
import * as z57 from "zod/v4";
|
|
144594
|
+
var SafeUrlSchema = z57.url().superRefine((val, ctx) => {
|
|
144484
144595
|
if (!URL.canParse(val)) {
|
|
144485
144596
|
ctx.addIssue({
|
|
144486
|
-
code:
|
|
144597
|
+
code: z57.ZodIssueCode.custom,
|
|
144487
144598
|
message: "URL must be parseable",
|
|
144488
144599
|
fatal: true
|
|
144489
144600
|
});
|
|
144490
|
-
return
|
|
144601
|
+
return z57.NEVER;
|
|
144491
144602
|
}
|
|
144492
144603
|
}).refine((url) => {
|
|
144493
144604
|
const u = new URL(url);
|
|
144494
144605
|
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
144495
144606
|
}, { message: "URL cannot use javascript:, data:, or vbscript: scheme" });
|
|
144496
|
-
var OAuthProtectedResourceMetadataSchema =
|
|
144497
|
-
resource:
|
|
144498
|
-
authorization_servers:
|
|
144499
|
-
jwks_uri:
|
|
144500
|
-
scopes_supported:
|
|
144501
|
-
bearer_methods_supported:
|
|
144502
|
-
resource_signing_alg_values_supported:
|
|
144503
|
-
resource_name:
|
|
144504
|
-
resource_documentation:
|
|
144505
|
-
resource_policy_uri:
|
|
144506
|
-
resource_tos_uri:
|
|
144507
|
-
tls_client_certificate_bound_access_tokens:
|
|
144508
|
-
authorization_details_types_supported:
|
|
144509
|
-
dpop_signing_alg_values_supported:
|
|
144510
|
-
dpop_bound_access_tokens_required:
|
|
144607
|
+
var OAuthProtectedResourceMetadataSchema = z57.looseObject({
|
|
144608
|
+
resource: z57.string().url(),
|
|
144609
|
+
authorization_servers: z57.array(SafeUrlSchema).optional(),
|
|
144610
|
+
jwks_uri: z57.string().url().optional(),
|
|
144611
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144612
|
+
bearer_methods_supported: z57.array(z57.string()).optional(),
|
|
144613
|
+
resource_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144614
|
+
resource_name: z57.string().optional(),
|
|
144615
|
+
resource_documentation: z57.string().optional(),
|
|
144616
|
+
resource_policy_uri: z57.string().url().optional(),
|
|
144617
|
+
resource_tos_uri: z57.string().url().optional(),
|
|
144618
|
+
tls_client_certificate_bound_access_tokens: z57.boolean().optional(),
|
|
144619
|
+
authorization_details_types_supported: z57.array(z57.string()).optional(),
|
|
144620
|
+
dpop_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144621
|
+
dpop_bound_access_tokens_required: z57.boolean().optional()
|
|
144511
144622
|
});
|
|
144512
|
-
var OAuthMetadataSchema =
|
|
144513
|
-
issuer:
|
|
144623
|
+
var OAuthMetadataSchema = z57.looseObject({
|
|
144624
|
+
issuer: z57.string(),
|
|
144514
144625
|
authorization_endpoint: SafeUrlSchema,
|
|
144515
144626
|
token_endpoint: SafeUrlSchema,
|
|
144516
144627
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
144517
|
-
scopes_supported:
|
|
144518
|
-
response_types_supported:
|
|
144519
|
-
response_modes_supported:
|
|
144520
|
-
grant_types_supported:
|
|
144521
|
-
token_endpoint_auth_methods_supported:
|
|
144522
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
144628
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144629
|
+
response_types_supported: z57.array(z57.string()),
|
|
144630
|
+
response_modes_supported: z57.array(z57.string()).optional(),
|
|
144631
|
+
grant_types_supported: z57.array(z57.string()).optional(),
|
|
144632
|
+
token_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144633
|
+
token_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144523
144634
|
service_documentation: SafeUrlSchema.optional(),
|
|
144524
144635
|
revocation_endpoint: SafeUrlSchema.optional(),
|
|
144525
|
-
revocation_endpoint_auth_methods_supported:
|
|
144526
|
-
revocation_endpoint_auth_signing_alg_values_supported:
|
|
144527
|
-
introspection_endpoint:
|
|
144528
|
-
introspection_endpoint_auth_methods_supported:
|
|
144529
|
-
introspection_endpoint_auth_signing_alg_values_supported:
|
|
144530
|
-
code_challenge_methods_supported:
|
|
144531
|
-
client_id_metadata_document_supported:
|
|
144636
|
+
revocation_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144637
|
+
revocation_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144638
|
+
introspection_endpoint: z57.string().optional(),
|
|
144639
|
+
introspection_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144640
|
+
introspection_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144641
|
+
code_challenge_methods_supported: z57.array(z57.string()).optional(),
|
|
144642
|
+
client_id_metadata_document_supported: z57.boolean().optional()
|
|
144532
144643
|
});
|
|
144533
|
-
var OpenIdProviderMetadataSchema =
|
|
144534
|
-
issuer:
|
|
144644
|
+
var OpenIdProviderMetadataSchema = z57.looseObject({
|
|
144645
|
+
issuer: z57.string(),
|
|
144535
144646
|
authorization_endpoint: SafeUrlSchema,
|
|
144536
144647
|
token_endpoint: SafeUrlSchema,
|
|
144537
144648
|
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
144538
144649
|
jwks_uri: SafeUrlSchema,
|
|
144539
144650
|
registration_endpoint: SafeUrlSchema.optional(),
|
|
144540
|
-
scopes_supported:
|
|
144541
|
-
response_types_supported:
|
|
144542
|
-
response_modes_supported:
|
|
144543
|
-
grant_types_supported:
|
|
144544
|
-
acr_values_supported:
|
|
144545
|
-
subject_types_supported:
|
|
144546
|
-
id_token_signing_alg_values_supported:
|
|
144547
|
-
id_token_encryption_alg_values_supported:
|
|
144548
|
-
id_token_encryption_enc_values_supported:
|
|
144549
|
-
userinfo_signing_alg_values_supported:
|
|
144550
|
-
userinfo_encryption_alg_values_supported:
|
|
144551
|
-
userinfo_encryption_enc_values_supported:
|
|
144552
|
-
request_object_signing_alg_values_supported:
|
|
144553
|
-
request_object_encryption_alg_values_supported:
|
|
144554
|
-
request_object_encryption_enc_values_supported:
|
|
144555
|
-
token_endpoint_auth_methods_supported:
|
|
144556
|
-
token_endpoint_auth_signing_alg_values_supported:
|
|
144557
|
-
display_values_supported:
|
|
144558
|
-
claim_types_supported:
|
|
144559
|
-
claims_supported:
|
|
144560
|
-
service_documentation:
|
|
144561
|
-
claims_locales_supported:
|
|
144562
|
-
ui_locales_supported:
|
|
144563
|
-
claims_parameter_supported:
|
|
144564
|
-
request_parameter_supported:
|
|
144565
|
-
request_uri_parameter_supported:
|
|
144566
|
-
require_request_uri_registration:
|
|
144651
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144652
|
+
response_types_supported: z57.array(z57.string()),
|
|
144653
|
+
response_modes_supported: z57.array(z57.string()).optional(),
|
|
144654
|
+
grant_types_supported: z57.array(z57.string()).optional(),
|
|
144655
|
+
acr_values_supported: z57.array(z57.string()).optional(),
|
|
144656
|
+
subject_types_supported: z57.array(z57.string()),
|
|
144657
|
+
id_token_signing_alg_values_supported: z57.array(z57.string()),
|
|
144658
|
+
id_token_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144659
|
+
id_token_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144660
|
+
userinfo_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144661
|
+
userinfo_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144662
|
+
userinfo_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144663
|
+
request_object_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144664
|
+
request_object_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144665
|
+
request_object_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144666
|
+
token_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144667
|
+
token_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144668
|
+
display_values_supported: z57.array(z57.string()).optional(),
|
|
144669
|
+
claim_types_supported: z57.array(z57.string()).optional(),
|
|
144670
|
+
claims_supported: z57.array(z57.string()).optional(),
|
|
144671
|
+
service_documentation: z57.string().optional(),
|
|
144672
|
+
claims_locales_supported: z57.array(z57.string()).optional(),
|
|
144673
|
+
ui_locales_supported: z57.array(z57.string()).optional(),
|
|
144674
|
+
claims_parameter_supported: z57.boolean().optional(),
|
|
144675
|
+
request_parameter_supported: z57.boolean().optional(),
|
|
144676
|
+
request_uri_parameter_supported: z57.boolean().optional(),
|
|
144677
|
+
require_request_uri_registration: z57.boolean().optional(),
|
|
144567
144678
|
op_policy_uri: SafeUrlSchema.optional(),
|
|
144568
144679
|
op_tos_uri: SafeUrlSchema.optional(),
|
|
144569
|
-
client_id_metadata_document_supported:
|
|
144680
|
+
client_id_metadata_document_supported: z57.boolean().optional()
|
|
144570
144681
|
});
|
|
144571
|
-
var OpenIdProviderDiscoveryMetadataSchema =
|
|
144682
|
+
var OpenIdProviderDiscoveryMetadataSchema = z57.object({
|
|
144572
144683
|
...OpenIdProviderMetadataSchema.shape,
|
|
144573
144684
|
...OAuthMetadataSchema.pick({
|
|
144574
144685
|
code_challenge_methods_supported: true
|
|
144575
144686
|
}).shape
|
|
144576
144687
|
});
|
|
144577
|
-
var OAuthTokensSchema =
|
|
144578
|
-
access_token:
|
|
144579
|
-
id_token:
|
|
144580
|
-
token_type:
|
|
144581
|
-
expires_in:
|
|
144582
|
-
scope:
|
|
144583
|
-
refresh_token:
|
|
144688
|
+
var OAuthTokensSchema = z57.object({
|
|
144689
|
+
access_token: z57.string(),
|
|
144690
|
+
id_token: z57.string().optional(),
|
|
144691
|
+
token_type: z57.string(),
|
|
144692
|
+
expires_in: z57.coerce.number().optional(),
|
|
144693
|
+
scope: z57.string().optional(),
|
|
144694
|
+
refresh_token: z57.string().optional()
|
|
144584
144695
|
}).strip();
|
|
144585
|
-
var OAuthErrorResponseSchema =
|
|
144586
|
-
error:
|
|
144587
|
-
error_description:
|
|
144588
|
-
error_uri:
|
|
144696
|
+
var OAuthErrorResponseSchema = z57.object({
|
|
144697
|
+
error: z57.string(),
|
|
144698
|
+
error_description: z57.string().optional(),
|
|
144699
|
+
error_uri: z57.string().optional()
|
|
144589
144700
|
});
|
|
144590
|
-
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(
|
|
144701
|
+
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z57.literal("").transform(() => {
|
|
144591
144702
|
return;
|
|
144592
144703
|
}));
|
|
144593
|
-
var OAuthClientMetadataSchema =
|
|
144594
|
-
redirect_uris:
|
|
144595
|
-
token_endpoint_auth_method:
|
|
144596
|
-
grant_types:
|
|
144597
|
-
response_types:
|
|
144598
|
-
client_name:
|
|
144704
|
+
var OAuthClientMetadataSchema = z57.object({
|
|
144705
|
+
redirect_uris: z57.array(SafeUrlSchema),
|
|
144706
|
+
token_endpoint_auth_method: z57.string().optional(),
|
|
144707
|
+
grant_types: z57.array(z57.string()).optional(),
|
|
144708
|
+
response_types: z57.array(z57.string()).optional(),
|
|
144709
|
+
client_name: z57.string().optional(),
|
|
144599
144710
|
client_uri: SafeUrlSchema.optional(),
|
|
144600
144711
|
logo_uri: OptionalSafeUrlSchema,
|
|
144601
|
-
scope:
|
|
144602
|
-
contacts:
|
|
144712
|
+
scope: z57.string().optional(),
|
|
144713
|
+
contacts: z57.array(z57.string()).optional(),
|
|
144603
144714
|
tos_uri: OptionalSafeUrlSchema,
|
|
144604
|
-
policy_uri:
|
|
144715
|
+
policy_uri: z57.string().optional(),
|
|
144605
144716
|
jwks_uri: SafeUrlSchema.optional(),
|
|
144606
|
-
jwks:
|
|
144607
|
-
software_id:
|
|
144608
|
-
software_version:
|
|
144609
|
-
software_statement:
|
|
144717
|
+
jwks: z57.any().optional(),
|
|
144718
|
+
software_id: z57.string().optional(),
|
|
144719
|
+
software_version: z57.string().optional(),
|
|
144720
|
+
software_statement: z57.string().optional()
|
|
144610
144721
|
}).strip();
|
|
144611
|
-
var OAuthClientInformationSchema =
|
|
144612
|
-
client_id:
|
|
144613
|
-
client_secret:
|
|
144614
|
-
client_id_issued_at:
|
|
144615
|
-
client_secret_expires_at:
|
|
144722
|
+
var OAuthClientInformationSchema = z57.object({
|
|
144723
|
+
client_id: z57.string(),
|
|
144724
|
+
client_secret: z57.string().optional(),
|
|
144725
|
+
client_id_issued_at: z57.number().optional(),
|
|
144726
|
+
client_secret_expires_at: z57.number().optional()
|
|
144616
144727
|
}).strip();
|
|
144617
144728
|
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
144618
|
-
var OAuthClientRegistrationErrorSchema =
|
|
144619
|
-
error:
|
|
144620
|
-
error_description:
|
|
144729
|
+
var OAuthClientRegistrationErrorSchema = z57.object({
|
|
144730
|
+
error: z57.string(),
|
|
144731
|
+
error_description: z57.string().optional()
|
|
144621
144732
|
}).strip();
|
|
144622
|
-
var OAuthTokenRevocationRequestSchema =
|
|
144623
|
-
token:
|
|
144624
|
-
token_type_hint:
|
|
144733
|
+
var OAuthTokenRevocationRequestSchema = z57.object({
|
|
144734
|
+
token: z57.string(),
|
|
144735
|
+
token_type_hint: z57.string().optional()
|
|
144625
144736
|
}).strip();
|
|
144626
144737
|
|
|
144627
144738
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
@@ -146833,7 +146944,7 @@ function mirrorFilePath(projectDir) {
|
|
|
146833
146944
|
}
|
|
146834
146945
|
|
|
146835
146946
|
// packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
|
|
146836
|
-
import { z as
|
|
146947
|
+
import { z as z58 } from "zod";
|
|
146837
146948
|
var AGENT_STATUS_VALUES = [
|
|
146838
146949
|
"busy",
|
|
146839
146950
|
"idle",
|
|
@@ -146849,32 +146960,32 @@ var BACKGROUND_TASK_STATUS_VALUES = [
|
|
|
146849
146960
|
"cancelled",
|
|
146850
146961
|
"interrupt"
|
|
146851
146962
|
];
|
|
146852
|
-
var AgentRowSchema =
|
|
146853
|
-
name:
|
|
146854
|
-
status:
|
|
146963
|
+
var AgentRowSchema = z58.object({
|
|
146964
|
+
name: z58.string(),
|
|
146965
|
+
status: z58.enum(AGENT_STATUS_VALUES)
|
|
146855
146966
|
});
|
|
146856
|
-
var JobRowSchema =
|
|
146857
|
-
title:
|
|
146858
|
-
status:
|
|
146859
|
-
toolCalls:
|
|
146860
|
-
lastTool:
|
|
146967
|
+
var JobRowSchema = z58.object({
|
|
146968
|
+
title: z58.string(),
|
|
146969
|
+
status: z58.enum(BACKGROUND_TASK_STATUS_VALUES),
|
|
146970
|
+
toolCalls: z58.number().int().nonnegative().nullable(),
|
|
146971
|
+
lastTool: z58.string().nullable()
|
|
146861
146972
|
});
|
|
146862
|
-
var LoopLiveSchema =
|
|
146863
|
-
kind:
|
|
146864
|
-
goalsDone:
|
|
146865
|
-
goalsTotal:
|
|
146866
|
-
pass:
|
|
146867
|
-
fail:
|
|
146868
|
-
pending:
|
|
146869
|
-
blocked:
|
|
146870
|
-
activeGoal:
|
|
146973
|
+
var LoopLiveSchema = z58.object({
|
|
146974
|
+
kind: z58.literal("live"),
|
|
146975
|
+
goalsDone: z58.number().int().nonnegative(),
|
|
146976
|
+
goalsTotal: z58.number().int().nonnegative(),
|
|
146977
|
+
pass: z58.number().int().nonnegative(),
|
|
146978
|
+
fail: z58.number().int().nonnegative(),
|
|
146979
|
+
pending: z58.number().int().nonnegative(),
|
|
146980
|
+
blocked: z58.number().int().nonnegative(),
|
|
146981
|
+
activeGoal: z58.string().nullable()
|
|
146871
146982
|
});
|
|
146872
|
-
var TuiRuntimeSnapshotSchema =
|
|
146873
|
-
version:
|
|
146874
|
-
projectDir:
|
|
146875
|
-
updatedAt:
|
|
146876
|
-
activeAgents:
|
|
146877
|
-
jobBoard:
|
|
146983
|
+
var TuiRuntimeSnapshotSchema = z58.object({
|
|
146984
|
+
version: z58.literal(MIRROR_SCHEMA_VERSION),
|
|
146985
|
+
projectDir: z58.string(),
|
|
146986
|
+
updatedAt: z58.number(),
|
|
146987
|
+
activeAgents: z58.array(AgentRowSchema),
|
|
146988
|
+
jobBoard: z58.array(JobRowSchema),
|
|
146878
146989
|
loop: LoopLiveSchema.nullable()
|
|
146879
146990
|
});
|
|
146880
146991
|
|
|
@@ -146889,25 +147000,25 @@ function writeMirror(projectDir, snapshot) {
|
|
|
146889
147000
|
// packages/omo-opencode/src/features/tui-sidebar/loop-reader.ts
|
|
146890
147001
|
import { readdirSync as readdirSync29, readFileSync as readFileSync67, statSync as statSync13 } from "fs";
|
|
146891
147002
|
import { join as join124 } from "path";
|
|
146892
|
-
import { z as
|
|
146893
|
-
var CriterionSchema =
|
|
146894
|
-
status:
|
|
147003
|
+
import { z as z59 } from "zod";
|
|
147004
|
+
var CriterionSchema = z59.object({
|
|
147005
|
+
status: z59.string()
|
|
146895
147006
|
});
|
|
146896
|
-
var GoalBaseSchema =
|
|
146897
|
-
id:
|
|
146898
|
-
title:
|
|
146899
|
-
status:
|
|
147007
|
+
var GoalBaseSchema = z59.object({
|
|
147008
|
+
id: z59.string(),
|
|
147009
|
+
title: z59.string(),
|
|
147010
|
+
status: z59.string()
|
|
146900
147011
|
});
|
|
146901
|
-
var CurrentLoopSchema =
|
|
146902
|
-
version:
|
|
146903
|
-
activeGoalId:
|
|
146904
|
-
goals:
|
|
146905
|
-
successCriteria:
|
|
147012
|
+
var CurrentLoopSchema = z59.object({
|
|
147013
|
+
version: z59.literal(1),
|
|
147014
|
+
activeGoalId: z59.string().optional(),
|
|
147015
|
+
goals: z59.array(GoalBaseSchema.extend({
|
|
147016
|
+
successCriteria: z59.array(CriterionSchema)
|
|
146906
147017
|
}))
|
|
146907
147018
|
});
|
|
146908
|
-
var LegacyLoopSchema =
|
|
146909
|
-
goals:
|
|
146910
|
-
criteria:
|
|
147019
|
+
var LegacyLoopSchema = z59.object({
|
|
147020
|
+
goals: z59.array(GoalBaseSchema.extend({
|
|
147021
|
+
criteria: z59.array(CriterionSchema)
|
|
146911
147022
|
}))
|
|
146912
147023
|
});
|
|
146913
147024
|
function readActiveLoop(projectDir) {
|
|
@@ -163546,7 +163657,7 @@ var grep_app = {
|
|
|
163546
163657
|
import { existsSync as existsSync106, readFileSync as readFileSync74 } from "fs";
|
|
163547
163658
|
import { delimiter as delimiter2, dirname as dirname47, resolve as resolve35 } from "path";
|
|
163548
163659
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
163549
|
-
import { z as
|
|
163660
|
+
import { z as z60 } from "zod";
|
|
163550
163661
|
|
|
163551
163662
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
163552
163663
|
function normalizeCliPath(path) {
|
|
@@ -163647,8 +163758,8 @@ var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-clie
|
|
|
163647
163758
|
var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
|
|
163648
163759
|
var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
|
|
163649
163760
|
var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
163650
|
-
var DaemonPackageSchema =
|
|
163651
|
-
version:
|
|
163761
|
+
var DaemonPackageSchema = z60.object({
|
|
163762
|
+
version: z60.string().min(1)
|
|
163652
163763
|
});
|
|
163653
163764
|
var LSP_BOOTSTRAP_SCRIPT = [
|
|
163654
163765
|
"const { existsSync } = require('node:fs')",
|
|
@@ -168888,14 +168999,14 @@ class OpencodeClient2 extends HeyApiClient {
|
|
|
168888
168999
|
// node_modules/.bun/@opencode-ai+sdk@1.18.22/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
168889
169000
|
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
168890
169001
|
// packages/omo-opencode/src/plugin/native-skills.ts
|
|
168891
|
-
import { z as
|
|
168892
|
-
var NativeSkillEntrySchema =
|
|
168893
|
-
name:
|
|
168894
|
-
description:
|
|
168895
|
-
location:
|
|
168896
|
-
content:
|
|
169002
|
+
import { z as z61 } from "zod";
|
|
169003
|
+
var NativeSkillEntrySchema = z61.object({
|
|
169004
|
+
name: z61.string(),
|
|
169005
|
+
description: z61.string().default(""),
|
|
169006
|
+
location: z61.string(),
|
|
169007
|
+
content: z61.string()
|
|
168897
169008
|
});
|
|
168898
|
-
var NativeSkillEntriesSchema =
|
|
169009
|
+
var NativeSkillEntriesSchema = z61.array(NativeSkillEntrySchema);
|
|
168899
169010
|
function getObjectProperty(value, property) {
|
|
168900
169011
|
if (typeof value !== "object" || value === null)
|
|
168901
169012
|
return;
|
|
@@ -170045,7 +170156,7 @@ async function resolveParticipant2(teamRunId, sessionID, config, deps) {
|
|
|
170045
170156
|
}
|
|
170046
170157
|
|
|
170047
170158
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
|
|
170048
|
-
import { z as
|
|
170159
|
+
import { z as z62 } from "zod";
|
|
170049
170160
|
init_types2();
|
|
170050
170161
|
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." }] } }).';
|
|
170051
170162
|
function omitEmptyStringArgs(rawArgs) {
|
|
@@ -170054,10 +170165,10 @@ function omitEmptyStringArgs(rawArgs) {
|
|
|
170054
170165
|
}
|
|
170055
170166
|
return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
|
|
170056
170167
|
}
|
|
170057
|
-
var TeamCreateArgsSchema =
|
|
170058
|
-
teamName:
|
|
170059
|
-
inline_spec:
|
|
170060
|
-
leadSessionId:
|
|
170168
|
+
var TeamCreateArgsSchema = z62.preprocess(omitEmptyStringArgs, z62.object({
|
|
170169
|
+
teamName: z62.string().min(1).nullish(),
|
|
170170
|
+
inline_spec: z62.unknown().nullish(),
|
|
170171
|
+
leadSessionId: z62.string().nullish()
|
|
170061
170172
|
}).superRefine((value, ctx) => {
|
|
170062
170173
|
const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
|
|
170063
170174
|
if (optionCount !== 1) {
|
|
@@ -170178,7 +170289,7 @@ function createTeamCreateTool(config, client, bgMgr, tmuxMgr, executorConfig, de
|
|
|
170178
170289
|
});
|
|
170179
170290
|
}
|
|
170180
170291
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
170181
|
-
import { z as
|
|
170292
|
+
import { z as z63 } from "zod";
|
|
170182
170293
|
// packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
|
|
170183
170294
|
init_store2();
|
|
170184
170295
|
init_shutdown_helpers();
|
|
@@ -170267,13 +170378,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
|
|
|
170267
170378
|
|
|
170268
170379
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
170269
170380
|
init_store();
|
|
170270
|
-
var TeamDeleteArgsSchema =
|
|
170271
|
-
var TeamShutdownRequestArgsSchema =
|
|
170272
|
-
var TeamApproveShutdownArgsSchema =
|
|
170273
|
-
var TeamRejectShutdownArgsSchema =
|
|
170274
|
-
teamRunId:
|
|
170275
|
-
memberName:
|
|
170276
|
-
reason:
|
|
170381
|
+
var TeamDeleteArgsSchema = z63.object({ teamRunId: z63.string().min(1), force: z63.boolean().optional() });
|
|
170382
|
+
var TeamShutdownRequestArgsSchema = z63.object({ teamRunId: z63.string().min(1), targetMemberName: z63.string().min(1) });
|
|
170383
|
+
var TeamApproveShutdownArgsSchema = z63.object({ teamRunId: z63.string().min(1), memberName: z63.string().min(1) });
|
|
170384
|
+
var TeamRejectShutdownArgsSchema = z63.object({
|
|
170385
|
+
teamRunId: z63.string().min(1),
|
|
170386
|
+
memberName: z63.string().min(1),
|
|
170387
|
+
reason: z63.string().min(1)
|
|
170277
170388
|
});
|
|
170278
170389
|
var defaultTeamShutdownToolDeps = {
|
|
170279
170390
|
listActiveTeams,
|
|
@@ -174135,7 +174246,7 @@ function parseWindowsProcessTable(output) {
|
|
|
174135
174246
|
const entries = Array.isArray(parsed) ? parsed : parsed === undefined ? [] : [parsed];
|
|
174136
174247
|
const processes = [];
|
|
174137
174248
|
for (const entry of entries) {
|
|
174138
|
-
if (!
|
|
174249
|
+
if (!isRecord11(entry))
|
|
174139
174250
|
continue;
|
|
174140
174251
|
const pid = numberField(entry, "ProcessId");
|
|
174141
174252
|
const ppid = numberField(entry, "ParentProcessId");
|
|
@@ -174169,7 +174280,7 @@ function stringField(record, key) {
|
|
|
174169
174280
|
const value = record[key];
|
|
174170
174281
|
return typeof value === "string" ? value : undefined;
|
|
174171
174282
|
}
|
|
174172
|
-
function
|
|
174283
|
+
function isRecord11(value) {
|
|
174173
174284
|
return typeof value === "object" && value !== null;
|
|
174174
174285
|
}
|
|
174175
174286
|
|
|
@@ -174273,7 +174384,7 @@ async function attestLspDaemonOwner(target, deps = {}) {
|
|
|
174273
174384
|
}
|
|
174274
174385
|
}
|
|
174275
174386
|
function parseLspDaemonOwner(value) {
|
|
174276
|
-
if (!
|
|
174387
|
+
if (!isRecord12(value))
|
|
174277
174388
|
return null;
|
|
174278
174389
|
const pid = value["pid"];
|
|
174279
174390
|
const nonce = value["nonce"];
|
|
@@ -174285,7 +174396,7 @@ function parseLspDaemonOwner(value) {
|
|
|
174285
174396
|
return null;
|
|
174286
174397
|
if (typeof startedAt !== "string" || startedAt.length === 0)
|
|
174287
174398
|
return null;
|
|
174288
|
-
if (!
|
|
174399
|
+
if (!isRecord12(endpoint))
|
|
174289
174400
|
return null;
|
|
174290
174401
|
const kind = endpoint["kind"];
|
|
174291
174402
|
const path = endpoint["path"];
|
|
@@ -174337,7 +174448,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
174337
174448
|
return finish(null);
|
|
174338
174449
|
try {
|
|
174339
174450
|
const response = JSON.parse(line);
|
|
174340
|
-
if (!
|
|
174451
|
+
if (!isRecord12(response) || response["id"] !== OWNER_PING_REQUEST_ID || "error" in response) {
|
|
174341
174452
|
return finish(null);
|
|
174342
174453
|
}
|
|
174343
174454
|
finish(parseLspDaemonOwner(response["result"]));
|
|
@@ -174350,7 +174461,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
174350
174461
|
function sameOwner(left, right) {
|
|
174351
174462
|
return left.pid === right.pid && left.nonce === right.nonce && left.startedAt === right.startedAt && left.endpoint.kind === right.endpoint.kind && left.endpoint.path === right.endpoint.path && left.endpoint.dev === right.endpoint.dev && left.endpoint.ino === right.endpoint.ino;
|
|
174352
174463
|
}
|
|
174353
|
-
function
|
|
174464
|
+
function isRecord12(value) {
|
|
174354
174465
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
174355
174466
|
}
|
|
174356
174467
|
|
|
@@ -180011,7 +180122,7 @@ var TOPLEVEL_SENTINELS = [
|
|
|
180011
180122
|
field: "window_id"
|
|
180012
180123
|
}
|
|
180013
180124
|
];
|
|
180014
|
-
function
|
|
180125
|
+
function isRecord13(value) {
|
|
180015
180126
|
return typeof value == "object" && value !== null && !Array.isArray(value);
|
|
180016
180127
|
}
|
|
180017
180128
|
function toRfc3339(timestamp) {
|
|
@@ -180033,7 +180144,7 @@ function relocateInto(properties, key, value) {
|
|
|
180033
180144
|
properties[key] = value;
|
|
180034
180145
|
}
|
|
180035
180146
|
function buildV1Event(message) {
|
|
180036
|
-
const sourceProperties =
|
|
180147
|
+
const sourceProperties = isRecord13(message.properties) ? message.properties : {};
|
|
180037
180148
|
const properties = {
|
|
180038
180149
|
...sourceProperties
|
|
180039
180150
|
};
|