oh-my-opencode 5.0.0-beta.52 → 5.0.0-beta.53
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/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 +109 -42
- package/dist/cli-node/index.js +109 -42
- package/dist/index.js +1267 -1197
- 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 +73 -6
- package/package.json +14 -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/hooks/hooks.json +5 -5
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- 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 = {
|
|
@@ -20379,6 +20379,18 @@ function resolveCompatibleModelSettings(input) {
|
|
|
20379
20379
|
function normalizeModelName(name) {
|
|
20380
20380
|
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
20381
|
}
|
|
20382
|
+
function modelIdOf(model) {
|
|
20383
|
+
return model.split("/").slice(1).join("/");
|
|
20384
|
+
}
|
|
20385
|
+
function closestMatch(matches, providers) {
|
|
20386
|
+
const providerRank = (model) => providers === undefined || providers.length === 0 ? 0 : providers.indexOf(model.split("/")[0] ?? "");
|
|
20387
|
+
return matches.reduce((best, current) => {
|
|
20388
|
+
const rankDelta = providerRank(current) - providerRank(best);
|
|
20389
|
+
if (rankDelta !== 0)
|
|
20390
|
+
return rankDelta < 0 ? current : best;
|
|
20391
|
+
return modelIdOf(current).length < modelIdOf(best).length ? current : best;
|
|
20392
|
+
});
|
|
20393
|
+
}
|
|
20382
20394
|
function fuzzyMatchModel(target, available, providers) {
|
|
20383
20395
|
if (available.size === 0) {
|
|
20384
20396
|
return null;
|
|
@@ -20403,14 +20415,11 @@ function fuzzyMatchModel(target, available, providers) {
|
|
|
20403
20415
|
if (exactMatch) {
|
|
20404
20416
|
return exactMatch;
|
|
20405
20417
|
}
|
|
20406
|
-
const exactModelIdMatches = matches.filter((model) =>
|
|
20407
|
-
const modelId = model.split("/").slice(1).join("/");
|
|
20408
|
-
return normalizeModelName(modelId) === targetNormalized;
|
|
20409
|
-
});
|
|
20418
|
+
const exactModelIdMatches = matches.filter((model) => normalizeModelName(modelIdOf(model)) === targetNormalized);
|
|
20410
20419
|
if (exactModelIdMatches.length > 0) {
|
|
20411
|
-
return exactModelIdMatches
|
|
20420
|
+
return closestMatch(exactModelIdMatches, providers);
|
|
20412
20421
|
}
|
|
20413
|
-
return matches
|
|
20422
|
+
return closestMatch(matches, providers);
|
|
20414
20423
|
}
|
|
20415
20424
|
|
|
20416
20425
|
// packages/model-core/src/provider-model-id-transform.ts
|
|
@@ -22664,7 +22673,7 @@ var OmoCategoryConfigSchema = z4.preprocess((value) => isRecord7(value) ? normal
|
|
|
22664
22673
|
var OmoCategoriesConfigSchema = z4.record(z4.string(), OmoCategoryConfigSchema);
|
|
22665
22674
|
|
|
22666
22675
|
// packages/omo-config-core/src/schema/config.ts
|
|
22667
|
-
import * as
|
|
22676
|
+
import * as z14 from "zod";
|
|
22668
22677
|
|
|
22669
22678
|
// packages/omo-config-core/src/schema/git-master.ts
|
|
22670
22679
|
import * as z5 from "zod";
|
|
@@ -22865,46 +22874,61 @@ var OmoModelCatalogEntryLayerInputSchema = OmoModelCatalogEntryInputSchema.parti
|
|
|
22865
22874
|
var OmoModelCatalogEntryLayerSchema = z8.preprocess((value) => isRecord8(value) ? normalizeLegacyModelFields(value) : value, OmoModelCatalogEntryLayerInputSchema);
|
|
22866
22875
|
var OmoModelCatalogLayerSchema = z8.record(z8.string(), OmoModelCatalogEntryLayerSchema);
|
|
22867
22876
|
|
|
22877
|
+
// packages/omo-config-core/src/schema/model-profile.ts
|
|
22878
|
+
import * as z9 from "zod";
|
|
22879
|
+
function isRecord9(value) {
|
|
22880
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22881
|
+
}
|
|
22882
|
+
var OmoModelProfileInputSchema = z9.object({
|
|
22883
|
+
display_name: z9.string().optional(),
|
|
22884
|
+
models: z9.array(z9.union([z9.string(), OmoFallbackModelObjectSchema])).optional()
|
|
22885
|
+
}).strict();
|
|
22886
|
+
var OmoModelProfileSchema = z9.preprocess((value) => isRecord9(value) ? normalizeLegacyModelFields(value) : value, OmoModelProfileInputSchema);
|
|
22887
|
+
var OmoModelProfilesSchema = z9.record(z9.string(), OmoModelProfileSchema);
|
|
22888
|
+
var OmoModelProfileLayerInputSchema = OmoModelProfileInputSchema.partial();
|
|
22889
|
+
var OmoModelProfileLayerSchema = z9.preprocess((value) => isRecord9(value) ? normalizeLegacyModelFields(value) : value, OmoModelProfileLayerInputSchema);
|
|
22890
|
+
var OmoModelProfilesLayerSchema = z9.record(z9.string(), OmoModelProfileLayerSchema);
|
|
22891
|
+
|
|
22868
22892
|
// packages/omo-config-core/src/schema/task.ts
|
|
22869
22893
|
import { availableParallelism } from "os";
|
|
22870
|
-
import * as
|
|
22894
|
+
import * as z10 from "zod";
|
|
22871
22895
|
var DEFAULT_RESIDENCY_MAX_CHILDREN = 16;
|
|
22872
|
-
var ResidencyMaxChildrenInputSchema =
|
|
22873
|
-
var OmoTaskWaitSchema =
|
|
22874
|
-
min_ms:
|
|
22875
|
-
default_ms:
|
|
22876
|
-
max_ms:
|
|
22896
|
+
var ResidencyMaxChildrenInputSchema = z10.union([z10.number().int().nonnegative(), z10.literal("unlimited")]);
|
|
22897
|
+
var OmoTaskWaitSchema = z10.object({
|
|
22898
|
+
min_ms: z10.number().int().positive().default(5000),
|
|
22899
|
+
default_ms: z10.number().int().positive().default(60000),
|
|
22900
|
+
max_ms: z10.number().int().positive().default(600000)
|
|
22877
22901
|
}).strict();
|
|
22878
|
-
var OmoTaskTeamSettingsSchema =
|
|
22879
|
-
max_members:
|
|
22880
|
-
max_parallel_members:
|
|
22881
|
-
max_wall_clock_minutes:
|
|
22902
|
+
var OmoTaskTeamSettingsSchema = z10.object({
|
|
22903
|
+
max_members: z10.number().int().min(1).max(8).default(8),
|
|
22904
|
+
max_parallel_members: z10.number().int().min(1).max(8).default(4),
|
|
22905
|
+
max_wall_clock_minutes: z10.number().int().positive().default(120)
|
|
22882
22906
|
}).strict();
|
|
22883
|
-
var OmoTaskWarningsSchema =
|
|
22884
|
-
unavailable_categories:
|
|
22907
|
+
var OmoTaskWarningsSchema = z10.object({
|
|
22908
|
+
unavailable_categories: z10.boolean().default(true)
|
|
22885
22909
|
}).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:
|
|
22910
|
+
var OmoTaskDagSettingsSchema = z10.object({
|
|
22911
|
+
max_nodes_per_run: z10.number().int().positive().default(64),
|
|
22912
|
+
max_runs_per_session: z10.number().int().positive().default(16),
|
|
22913
|
+
subscriber_ring: z10.number().int().positive().default(1000),
|
|
22914
|
+
heartbeat_ms: z10.number().int().positive().default(15000),
|
|
22915
|
+
history_default_limit: z10.number().int().positive().default(256),
|
|
22916
|
+
history_max_limit: z10.number().int().positive().default(1000),
|
|
22917
|
+
retention_days: z10.number().int().positive().default(7),
|
|
22918
|
+
max_prompt_bytes: z10.number().int().positive().default(262144)
|
|
22895
22919
|
}).strict();
|
|
22896
|
-
var OmoTaskSettingsSchema =
|
|
22897
|
-
default_execution_mode:
|
|
22898
|
-
default_concurrency:
|
|
22899
|
-
global_concurrency:
|
|
22900
|
-
provider_concurrency:
|
|
22901
|
-
model_concurrency:
|
|
22902
|
-
max_depth:
|
|
22920
|
+
var OmoTaskSettingsSchema = z10.object({
|
|
22921
|
+
default_execution_mode: z10.enum(["in-process", "process"]).default("in-process"),
|
|
22922
|
+
default_concurrency: z10.number().int().nonnegative().default(5),
|
|
22923
|
+
global_concurrency: z10.number().int().nonnegative().default(8),
|
|
22924
|
+
provider_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22925
|
+
model_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22926
|
+
max_depth: z10.number().int().nonnegative().default(1),
|
|
22903
22927
|
residency_max_children: ResidencyMaxChildrenInputSchema.default(8),
|
|
22904
|
-
ttl_ms:
|
|
22905
|
-
state_dir:
|
|
22906
|
-
reattach_on_reconcile:
|
|
22907
|
-
resume_children:
|
|
22928
|
+
ttl_ms: z10.number().int().positive().default(86400000),
|
|
22929
|
+
state_dir: z10.string().optional(),
|
|
22930
|
+
reattach_on_reconcile: z10.boolean().optional(),
|
|
22931
|
+
resume_children: z10.boolean().default(true),
|
|
22908
22932
|
warnings: OmoTaskWarningsSchema.default({ unavailable_categories: true }),
|
|
22909
22933
|
wait: OmoTaskWaitSchema.default({ min_ms: 5000, default_ms: 60000, max_ms: 600000 }),
|
|
22910
22934
|
team: OmoTaskTeamSettingsSchema.default({
|
|
@@ -22914,48 +22938,48 @@ var OmoTaskSettingsSchema = z9.object({
|
|
|
22914
22938
|
}),
|
|
22915
22939
|
dag: OmoTaskDagSettingsSchema.optional()
|
|
22916
22940
|
}).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:
|
|
22941
|
+
var OmoTaskDagSettingsLayerSchema = z10.object({
|
|
22942
|
+
max_nodes_per_run: z10.number().int().positive().optional(),
|
|
22943
|
+
max_runs_per_session: z10.number().int().positive().optional(),
|
|
22944
|
+
subscriber_ring: z10.number().int().positive().optional(),
|
|
22945
|
+
heartbeat_ms: z10.number().int().positive().optional(),
|
|
22946
|
+
history_default_limit: z10.number().int().positive().optional(),
|
|
22947
|
+
history_max_limit: z10.number().int().positive().optional(),
|
|
22948
|
+
retention_days: z10.number().int().positive().optional(),
|
|
22949
|
+
max_prompt_bytes: z10.number().int().positive().optional()
|
|
22926
22950
|
}).strict();
|
|
22927
|
-
var OmoTaskWaitLayerSchema =
|
|
22928
|
-
min_ms:
|
|
22929
|
-
default_ms:
|
|
22930
|
-
max_ms:
|
|
22951
|
+
var OmoTaskWaitLayerSchema = z10.object({
|
|
22952
|
+
min_ms: z10.number().int().positive().optional(),
|
|
22953
|
+
default_ms: z10.number().int().positive().optional(),
|
|
22954
|
+
max_ms: z10.number().int().positive().optional()
|
|
22931
22955
|
}).strict();
|
|
22932
|
-
var OmoTaskTeamSettingsLayerSchema =
|
|
22933
|
-
max_members:
|
|
22934
|
-
max_parallel_members:
|
|
22935
|
-
max_wall_clock_minutes:
|
|
22956
|
+
var OmoTaskTeamSettingsLayerSchema = z10.object({
|
|
22957
|
+
max_members: z10.number().int().min(1).max(8).optional(),
|
|
22958
|
+
max_parallel_members: z10.number().int().min(1).max(8).optional(),
|
|
22959
|
+
max_wall_clock_minutes: z10.number().int().positive().optional()
|
|
22936
22960
|
}).strict();
|
|
22937
|
-
var OmoTaskWarningsLayerSchema =
|
|
22938
|
-
unavailable_categories:
|
|
22961
|
+
var OmoTaskWarningsLayerSchema = z10.object({
|
|
22962
|
+
unavailable_categories: z10.boolean().optional()
|
|
22939
22963
|
}).strict();
|
|
22940
|
-
var OmoTaskSettingsLayerSchema =
|
|
22941
|
-
default_execution_mode:
|
|
22942
|
-
default_concurrency:
|
|
22943
|
-
global_concurrency:
|
|
22944
|
-
provider_concurrency:
|
|
22945
|
-
model_concurrency:
|
|
22946
|
-
max_depth:
|
|
22964
|
+
var OmoTaskSettingsLayerSchema = z10.object({
|
|
22965
|
+
default_execution_mode: z10.enum(["in-process", "process"]).optional(),
|
|
22966
|
+
default_concurrency: z10.number().int().nonnegative().optional(),
|
|
22967
|
+
global_concurrency: z10.number().int().nonnegative().optional(),
|
|
22968
|
+
provider_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22969
|
+
model_concurrency: z10.record(z10.string(), z10.number().int().nonnegative()).optional(),
|
|
22970
|
+
max_depth: z10.number().int().nonnegative().optional(),
|
|
22947
22971
|
residency_max_children: ResidencyMaxChildrenInputSchema.optional(),
|
|
22948
|
-
ttl_ms:
|
|
22949
|
-
state_dir:
|
|
22950
|
-
reattach_on_reconcile:
|
|
22951
|
-
resume_children:
|
|
22972
|
+
ttl_ms: z10.number().int().positive().optional(),
|
|
22973
|
+
state_dir: z10.string().optional(),
|
|
22974
|
+
reattach_on_reconcile: z10.boolean().optional(),
|
|
22975
|
+
resume_children: z10.boolean().optional(),
|
|
22952
22976
|
warnings: OmoTaskWarningsLayerSchema.optional(),
|
|
22953
22977
|
wait: OmoTaskWaitLayerSchema.optional(),
|
|
22954
22978
|
team: OmoTaskTeamSettingsLayerSchema.optional(),
|
|
22955
22979
|
dag: OmoTaskDagSettingsLayerSchema.optional()
|
|
22956
22980
|
}).strict();
|
|
22957
22981
|
function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism) {
|
|
22958
|
-
const record =
|
|
22982
|
+
const record = z10.record(z10.string(), z10.unknown()).parse(input);
|
|
22959
22983
|
return OmoTaskSettingsSchema.parse({
|
|
22960
22984
|
...record,
|
|
22961
22985
|
residency_max_children: record["residency_max_children"] ?? Math.min(DEFAULT_RESIDENCY_MAX_CHILDREN, Math.max(8, resolveParallelism() * 2)),
|
|
@@ -22964,39 +22988,39 @@ function resolveOmoTaskSettings(input, resolveParallelism = availableParallelism
|
|
|
22964
22988
|
}
|
|
22965
22989
|
|
|
22966
22990
|
// 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:
|
|
22991
|
+
import * as z11 from "zod";
|
|
22992
|
+
var OmoTeamMemberBaseSchema = z11.object({
|
|
22993
|
+
name: z11.string().min(1).regex(/^[a-z0-9-]+$/),
|
|
22994
|
+
cwd: z11.string().optional(),
|
|
22995
|
+
worktreePath: z11.string().optional(),
|
|
22996
|
+
subscriptions: z11.array(z11.string()).optional(),
|
|
22997
|
+
backendType: z11.enum(["in-process", "tmux"]).default("in-process"),
|
|
22998
|
+
color: z11.string().optional(),
|
|
22999
|
+
isActive: z11.boolean().default(true)
|
|
22976
23000
|
}).strict();
|
|
22977
23001
|
var OmoTeamCategoryMemberSchema = OmoTeamMemberBaseSchema.extend({
|
|
22978
|
-
kind:
|
|
22979
|
-
category:
|
|
22980
|
-
prompt:
|
|
23002
|
+
kind: z11.literal("category"),
|
|
23003
|
+
category: z11.string().min(1),
|
|
23004
|
+
prompt: z11.string().min(1)
|
|
22981
23005
|
});
|
|
22982
23006
|
var OmoTeamSubagentMemberSchema = OmoTeamMemberBaseSchema.extend({
|
|
22983
|
-
kind:
|
|
22984
|
-
subagent_type:
|
|
22985
|
-
prompt:
|
|
23007
|
+
kind: z11.literal("subagent_type"),
|
|
23008
|
+
subagent_type: z11.string().min(1),
|
|
23009
|
+
prompt: z11.string().optional()
|
|
22986
23010
|
});
|
|
22987
|
-
var OmoTeamMemberSchema =
|
|
23011
|
+
var OmoTeamMemberSchema = z11.discriminatedUnion("kind", [
|
|
22988
23012
|
OmoTeamCategoryMemberSchema,
|
|
22989
23013
|
OmoTeamSubagentMemberSchema
|
|
22990
23014
|
]);
|
|
22991
|
-
var OmoTeamSpecBaseSchema =
|
|
22992
|
-
version:
|
|
22993
|
-
name:
|
|
22994
|
-
description:
|
|
22995
|
-
createdAt:
|
|
22996
|
-
leadAgentId:
|
|
22997
|
-
teamAllowedPaths:
|
|
22998
|
-
sessionPermission:
|
|
22999
|
-
members:
|
|
23015
|
+
var OmoTeamSpecBaseSchema = z11.object({
|
|
23016
|
+
version: z11.literal(1).default(1),
|
|
23017
|
+
name: z11.string().min(1).regex(/^[a-z0-9-]+$/).optional(),
|
|
23018
|
+
description: z11.string().optional(),
|
|
23019
|
+
createdAt: z11.number().int().positive().optional(),
|
|
23020
|
+
leadAgentId: z11.string().optional(),
|
|
23021
|
+
teamAllowedPaths: z11.array(z11.string()).optional(),
|
|
23022
|
+
sessionPermission: z11.string().optional(),
|
|
23023
|
+
members: z11.array(OmoTeamMemberSchema).min(1).max(8)
|
|
23000
23024
|
}).strict();
|
|
23001
23025
|
var OmoTeamSpecSchema = OmoTeamSpecBaseSchema.superRefine((teamSpec, ctx) => {
|
|
23002
23026
|
if (teamSpec.leadAgentId === undefined && teamSpec.members.length > 1) {
|
|
@@ -23008,38 +23032,38 @@ var OmoTeamSpecSchema = OmoTeamSpecBaseSchema.superRefine((teamSpec, ctx) => {
|
|
|
23008
23032
|
}
|
|
23009
23033
|
});
|
|
23010
23034
|
var OmoTeamSpecLayerSchema = OmoTeamSpecBaseSchema.partial();
|
|
23011
|
-
var OmoTeamsConfigSchema =
|
|
23012
|
-
var OmoTeamsConfigLayerSchema =
|
|
23035
|
+
var OmoTeamsConfigSchema = z11.record(z11.string(), OmoTeamSpecSchema);
|
|
23036
|
+
var OmoTeamsConfigLayerSchema = z11.record(z11.string(), OmoTeamSpecLayerSchema);
|
|
23013
23037
|
|
|
23014
23038
|
// packages/omo-config-core/src/schema/telemetry.ts
|
|
23015
|
-
import * as
|
|
23039
|
+
import * as z12 from "zod";
|
|
23016
23040
|
var OmoTelemetrySettingsShape = {
|
|
23017
|
-
enabled:
|
|
23041
|
+
enabled: z12.boolean()
|
|
23018
23042
|
};
|
|
23019
|
-
var OmoTelemetrySettingsLayerSchema =
|
|
23043
|
+
var OmoTelemetrySettingsLayerSchema = z12.object(OmoTelemetrySettingsShape).partial().strict();
|
|
23020
23044
|
var OmoTelemetrySettingsSchema = OmoTelemetrySettingsLayerSchema.extend({
|
|
23021
|
-
enabled:
|
|
23045
|
+
enabled: z12.boolean().default(true)
|
|
23022
23046
|
}).strict();
|
|
23023
23047
|
|
|
23024
23048
|
// packages/omo-config-core/src/schema/format-on-mutation.ts
|
|
23025
|
-
import * as
|
|
23026
|
-
var mode =
|
|
23027
|
-
var languages =
|
|
23028
|
-
var OmoFormatOnMutationLayerSchema =
|
|
23049
|
+
import * as z13 from "zod";
|
|
23050
|
+
var mode = z13.enum(["off", "best-effort", "required"]);
|
|
23051
|
+
var languages = z13.record(z13.string(), z13.boolean()).optional();
|
|
23052
|
+
var OmoFormatOnMutationLayerSchema = z13.object({
|
|
23029
23053
|
mode: mode.optional(),
|
|
23030
23054
|
languages,
|
|
23031
|
-
maxFileBytes:
|
|
23032
|
-
timeoutMs:
|
|
23055
|
+
maxFileBytes: z13.number().int().positive().optional(),
|
|
23056
|
+
timeoutMs: z13.number().int().positive().optional()
|
|
23033
23057
|
}).strict();
|
|
23034
23058
|
var OmoFormatOnMutationSchema = OmoFormatOnMutationLayerSchema.extend({
|
|
23035
23059
|
mode: mode.default("best-effort"),
|
|
23036
|
-
maxFileBytes:
|
|
23037
|
-
timeoutMs:
|
|
23060
|
+
maxFileBytes: z13.number().int().positive().default(1048576),
|
|
23061
|
+
timeoutMs: z13.number().int().positive().default(3000)
|
|
23038
23062
|
}).strict();
|
|
23039
23063
|
|
|
23040
23064
|
// packages/omo-config-core/src/schema/config.ts
|
|
23041
|
-
var OmoOpenCodeHarnessConfigSchema =
|
|
23042
|
-
var OmoTypedHarnessConfigSchema =
|
|
23065
|
+
var OmoOpenCodeHarnessConfigSchema = z14.record(z14.string(), z14.unknown());
|
|
23066
|
+
var OmoTypedHarnessConfigSchema = z14.object({
|
|
23043
23067
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23044
23068
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23045
23069
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -23047,10 +23071,12 @@ var OmoTypedHarnessConfigSchema = z13.object({
|
|
|
23047
23071
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23048
23072
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23049
23073
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23074
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23075
|
+
model_profile: z14.string().optional(),
|
|
23050
23076
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23051
23077
|
telemetry: OmoTelemetrySettingsLayerSchema.optional()
|
|
23052
23078
|
}).strict();
|
|
23053
|
-
var OmoConfigProfileSchema =
|
|
23079
|
+
var OmoConfigProfileSchema = z14.object({
|
|
23054
23080
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23055
23081
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23056
23082
|
agents: OmoAgentsConfigSchema.optional(),
|
|
@@ -23058,47 +23084,53 @@ var OmoConfigProfileSchema = z13.object({
|
|
|
23058
23084
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23059
23085
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23060
23086
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23087
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23088
|
+
model_profile: z14.string().optional(),
|
|
23061
23089
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23062
23090
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
23063
23091
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23064
23092
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23065
23093
|
"[codex]": OmoTypedHarnessConfigSchema.optional()
|
|
23066
23094
|
}).strict();
|
|
23067
|
-
var OmoConfigSchema =
|
|
23095
|
+
var OmoConfigSchema = z14.object({
|
|
23068
23096
|
formatOnMutation: OmoFormatOnMutationSchema.optional(),
|
|
23069
|
-
$schema:
|
|
23097
|
+
$schema: z14.string().optional(),
|
|
23070
23098
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23071
23099
|
agents: OmoAgentsConfigSchema.optional(),
|
|
23072
23100
|
git_master: OmoGitMasterSettingsSchema.optional(),
|
|
23073
23101
|
task: OmoTaskSettingsSchema.optional(),
|
|
23074
23102
|
teams: OmoTeamsConfigSchema.optional(),
|
|
23075
23103
|
models: OmoModelCatalogSchema.optional(),
|
|
23104
|
+
model_profiles: OmoModelProfilesSchema.optional(),
|
|
23105
|
+
model_profile: z14.string().optional(),
|
|
23076
23106
|
memory: OmoMemorySettingsSchema.optional(),
|
|
23077
23107
|
telemetry: OmoTelemetrySettingsSchema.optional(),
|
|
23078
23108
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23079
23109
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23080
23110
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
23081
|
-
profiles:
|
|
23082
|
-
_migrations:
|
|
23083
|
-
legacy_migrations:
|
|
23111
|
+
profiles: z14.record(z14.string(), OmoConfigProfileSchema).default({}),
|
|
23112
|
+
_migrations: z14.array(z14.string()).optional(),
|
|
23113
|
+
legacy_migrations: z14.record(z14.string(), z14.unknown()).optional()
|
|
23084
23114
|
}).strict();
|
|
23085
|
-
var OmoConfigLayerSchema =
|
|
23115
|
+
var OmoConfigLayerSchema = z14.object({
|
|
23086
23116
|
formatOnMutation: OmoFormatOnMutationLayerSchema.optional(),
|
|
23087
|
-
$schema:
|
|
23117
|
+
$schema: z14.string().optional(),
|
|
23088
23118
|
categories: OmoCategoriesConfigSchema.optional(),
|
|
23089
23119
|
agents: OmoAgentsConfigSchema.optional(),
|
|
23090
23120
|
git_master: OmoGitMasterSettingsLayerSchema.optional(),
|
|
23091
23121
|
task: OmoTaskSettingsLayerSchema.optional(),
|
|
23092
23122
|
teams: OmoTeamsConfigLayerSchema.optional(),
|
|
23093
23123
|
models: OmoModelCatalogLayerSchema.optional(),
|
|
23124
|
+
model_profiles: OmoModelProfilesLayerSchema.optional(),
|
|
23125
|
+
model_profile: z14.string().optional(),
|
|
23094
23126
|
memory: OmoMemorySettingsLayerSchema.optional(),
|
|
23095
23127
|
telemetry: OmoTelemetrySettingsLayerSchema.optional(),
|
|
23096
23128
|
"[opencode]": OmoOpenCodeHarnessConfigSchema.optional(),
|
|
23097
23129
|
"[senpi]": OmoTypedHarnessConfigSchema.optional(),
|
|
23098
23130
|
"[codex]": OmoTypedHarnessConfigSchema.optional(),
|
|
23099
|
-
profiles:
|
|
23100
|
-
_migrations:
|
|
23101
|
-
legacy_migrations:
|
|
23131
|
+
profiles: z14.record(z14.string(), OmoConfigProfileSchema).optional(),
|
|
23132
|
+
_migrations: z14.array(z14.string()).optional(),
|
|
23133
|
+
legacy_migrations: z14.record(z14.string(), z14.unknown()).optional()
|
|
23102
23134
|
}).strict();
|
|
23103
23135
|
|
|
23104
23136
|
// packages/omo-config-core/src/loader/loader.ts
|
|
@@ -23346,21 +23378,21 @@ function hasUnsafeUnrecognizedKey(issues) {
|
|
|
23346
23378
|
function hasTamperedPrototype(value) {
|
|
23347
23379
|
if (Array.isArray(value))
|
|
23348
23380
|
return value.some((entry) => hasTamperedPrototype(entry));
|
|
23349
|
-
if (!
|
|
23381
|
+
if (!isRecord10(value))
|
|
23350
23382
|
return false;
|
|
23351
23383
|
const prototype = Object.getPrototypeOf(value);
|
|
23352
23384
|
if (prototype !== Object.prototype && prototype !== null)
|
|
23353
23385
|
return true;
|
|
23354
23386
|
return Object.values(value).some((entry) => hasTamperedPrototype(entry));
|
|
23355
23387
|
}
|
|
23356
|
-
function
|
|
23388
|
+
function isRecord10(value) {
|
|
23357
23389
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23358
23390
|
}
|
|
23359
23391
|
function containerAt(record, path) {
|
|
23360
23392
|
let container = record;
|
|
23361
23393
|
for (const segment of path) {
|
|
23362
23394
|
const next = container[segment];
|
|
23363
|
-
if (!
|
|
23395
|
+
if (!isRecord10(next))
|
|
23364
23396
|
return null;
|
|
23365
23397
|
container = next;
|
|
23366
23398
|
}
|
|
@@ -23598,6 +23630,38 @@ function resolveCategoryDefinition(definition, catalog, cycleNames) {
|
|
|
23598
23630
|
...definition.fallback_models === undefined ? {} : { fallback_models: resolveFallbackModels(definition.fallback_models, catalog, cycleNames) }
|
|
23599
23631
|
};
|
|
23600
23632
|
}
|
|
23633
|
+
function resolveModelProfile(definition, catalog, cycleNames) {
|
|
23634
|
+
return {
|
|
23635
|
+
...definition,
|
|
23636
|
+
...definition.models === undefined ? {} : { models: definition.models.map((entry) => resolveModelEntry(entry, catalog, cycleNames)) }
|
|
23637
|
+
};
|
|
23638
|
+
}
|
|
23639
|
+
function profileShadowDiagnostics(view) {
|
|
23640
|
+
if (view.model_profiles === undefined || view.models === undefined)
|
|
23641
|
+
return [];
|
|
23642
|
+
return Object.keys(view.model_profiles).flatMap((name) => view.models?.[name] === undefined ? [] : [{
|
|
23643
|
+
kind: "validation",
|
|
23644
|
+
message: `Model profile "${name}" shadows a model catalog entry of the same name`,
|
|
23645
|
+
path: `model_profiles.${name}`
|
|
23646
|
+
}]);
|
|
23647
|
+
}
|
|
23648
|
+
function profileSpliceDiagnostics(section, definitions, profileNames) {
|
|
23649
|
+
if (definitions === undefined || profileNames.size === 0)
|
|
23650
|
+
return [];
|
|
23651
|
+
return Object.entries(definitions).flatMap(([name, definition]) => (definition.models ?? []).flatMap((entry, index) => typeof entry !== "string" || !profileNames.has(entry) ? [] : [{
|
|
23652
|
+
kind: "validation",
|
|
23653
|
+
message: `"${entry}" is a model profile; splicing a profile into a category chain is not supported yet`,
|
|
23654
|
+
path: `${section}.${name}.models.${index}`
|
|
23655
|
+
}]));
|
|
23656
|
+
}
|
|
23657
|
+
function modelProfileDiagnostics(view) {
|
|
23658
|
+
const profileNames = new Set(Object.keys(view.model_profiles ?? {}));
|
|
23659
|
+
return [
|
|
23660
|
+
...profileShadowDiagnostics(view),
|
|
23661
|
+
...profileSpliceDiagnostics("categories", view.categories, profileNames),
|
|
23662
|
+
...profileSpliceDiagnostics("agents", view.agents, profileNames)
|
|
23663
|
+
];
|
|
23664
|
+
}
|
|
23601
23665
|
function cycleDiagnostics(catalog) {
|
|
23602
23666
|
if (catalog === undefined)
|
|
23603
23667
|
return [];
|
|
@@ -23608,9 +23672,10 @@ function cycleDiagnostics(catalog) {
|
|
|
23608
23672
|
}));
|
|
23609
23673
|
}
|
|
23610
23674
|
function resolveModelReferences(view) {
|
|
23611
|
-
const
|
|
23675
|
+
const cycles = cycleDiagnostics(view.models);
|
|
23676
|
+
const diagnostics = [...cycles, ...modelProfileDiagnostics(view)];
|
|
23612
23677
|
const cycleNames = new Set;
|
|
23613
|
-
for (const diagnostic of
|
|
23678
|
+
for (const diagnostic of cycles) {
|
|
23614
23679
|
const name = diagnostic.path.split(".")[1];
|
|
23615
23680
|
if (name !== undefined)
|
|
23616
23681
|
cycleNames.add(name);
|
|
@@ -23623,12 +23688,17 @@ function resolveModelReferences(view) {
|
|
|
23623
23688
|
name,
|
|
23624
23689
|
resolveCategoryDefinition(definition, view.models, cycleNames)
|
|
23625
23690
|
]));
|
|
23691
|
+
const modelProfiles = view.model_profiles === undefined ? undefined : Object.fromEntries(Object.entries(view.model_profiles).map(([name, definition]) => [
|
|
23692
|
+
name,
|
|
23693
|
+
resolveModelProfile(definition, view.models, cycleNames)
|
|
23694
|
+
]));
|
|
23626
23695
|
return {
|
|
23627
23696
|
diagnostics,
|
|
23628
23697
|
view: {
|
|
23629
23698
|
...view,
|
|
23630
23699
|
...agents === undefined ? {} : { agents },
|
|
23631
|
-
...categories === undefined ? {} : { categories }
|
|
23700
|
+
...categories === undefined ? {} : { categories },
|
|
23701
|
+
...modelProfiles === undefined ? {} : { model_profiles: modelProfiles }
|
|
23632
23702
|
}
|
|
23633
23703
|
};
|
|
23634
23704
|
}
|
|
@@ -24755,8 +24825,8 @@ function findUnknownKeyPaths(schema, value) {
|
|
|
24755
24825
|
}
|
|
24756
24826
|
|
|
24757
24827
|
// packages/omo-opencode/src/config/schema/agent-names.ts
|
|
24758
|
-
import { z as
|
|
24759
|
-
var BuiltinAgentNameSchema =
|
|
24828
|
+
import { z as z15 } from "zod";
|
|
24829
|
+
var BuiltinAgentNameSchema = z15.enum([
|
|
24760
24830
|
"sisyphus",
|
|
24761
24831
|
"hephaestus",
|
|
24762
24832
|
"prometheus",
|
|
@@ -24769,7 +24839,7 @@ var BuiltinAgentNameSchema = z14.enum([
|
|
|
24769
24839
|
"atlas",
|
|
24770
24840
|
"sisyphus-junior"
|
|
24771
24841
|
]);
|
|
24772
|
-
var BuiltinSkillNameSchema =
|
|
24842
|
+
var BuiltinSkillNameSchema = z15.enum([
|
|
24773
24843
|
"playwright",
|
|
24774
24844
|
"agent-browser",
|
|
24775
24845
|
"dev-browser",
|
|
@@ -24784,7 +24854,7 @@ var BuiltinSkillNameSchema = z14.enum([
|
|
|
24784
24854
|
"visual-qa",
|
|
24785
24855
|
"team-mode"
|
|
24786
24856
|
]);
|
|
24787
|
-
var OverridableAgentNameSchema =
|
|
24857
|
+
var OverridableAgentNameSchema = z15.enum([
|
|
24788
24858
|
"build",
|
|
24789
24859
|
"plan",
|
|
24790
24860
|
"sisyphus",
|
|
@@ -24801,41 +24871,41 @@ var OverridableAgentNameSchema = z14.enum([
|
|
|
24801
24871
|
"atlas"
|
|
24802
24872
|
]);
|
|
24803
24873
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
24804
|
-
import { z as
|
|
24874
|
+
import { z as z18 } from "zod";
|
|
24805
24875
|
|
|
24806
24876
|
// packages/omo-opencode/src/config/schema/fallback-models.ts
|
|
24807
|
-
import { z as
|
|
24808
|
-
var FallbackModelObjectSchema =
|
|
24809
|
-
model:
|
|
24877
|
+
import { z as z16 } from "zod";
|
|
24878
|
+
var FallbackModelObjectSchema = z16.object({
|
|
24879
|
+
model: z16.string(),
|
|
24810
24880
|
reasoning: OmoReasoningSchema.optional(),
|
|
24811
|
-
variant:
|
|
24812
|
-
reasoningEffort:
|
|
24813
|
-
temperature:
|
|
24814
|
-
top_p:
|
|
24815
|
-
maxTokens:
|
|
24816
|
-
thinking:
|
|
24817
|
-
type:
|
|
24818
|
-
budgetTokens:
|
|
24881
|
+
variant: z16.string().optional(),
|
|
24882
|
+
reasoningEffort: z16.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
24883
|
+
temperature: z16.number().min(0).max(2).optional(),
|
|
24884
|
+
top_p: z16.number().min(0).max(1).optional(),
|
|
24885
|
+
maxTokens: z16.number().optional(),
|
|
24886
|
+
thinking: z16.object({
|
|
24887
|
+
type: z16.enum(["enabled", "disabled"]),
|
|
24888
|
+
budgetTokens: z16.number().optional()
|
|
24819
24889
|
}).optional()
|
|
24820
24890
|
});
|
|
24821
|
-
var FallbackModelStringArraySchema =
|
|
24822
|
-
var FallbackModelObjectArraySchema =
|
|
24823
|
-
var FallbackModelMixedArraySchema =
|
|
24824
|
-
var FallbackModelsSchema =
|
|
24825
|
-
|
|
24891
|
+
var FallbackModelStringArraySchema = z16.array(z16.string());
|
|
24892
|
+
var FallbackModelObjectArraySchema = z16.array(FallbackModelObjectSchema);
|
|
24893
|
+
var FallbackModelMixedArraySchema = z16.array(z16.union([z16.string(), FallbackModelObjectSchema]));
|
|
24894
|
+
var FallbackModelsSchema = z16.union([
|
|
24895
|
+
z16.string(),
|
|
24826
24896
|
FallbackModelStringArraySchema,
|
|
24827
24897
|
FallbackModelObjectArraySchema,
|
|
24828
24898
|
FallbackModelMixedArraySchema
|
|
24829
24899
|
]);
|
|
24830
24900
|
|
|
24831
24901
|
// packages/omo-opencode/src/config/schema/internal/permission.ts
|
|
24832
|
-
import { z as
|
|
24833
|
-
var PermissionValueSchema =
|
|
24834
|
-
var BashPermissionSchema =
|
|
24902
|
+
import { z as z17 } from "zod";
|
|
24903
|
+
var PermissionValueSchema = z17.enum(["ask", "allow", "deny"]);
|
|
24904
|
+
var BashPermissionSchema = z17.union([
|
|
24835
24905
|
PermissionValueSchema,
|
|
24836
|
-
|
|
24906
|
+
z17.record(z17.string(), PermissionValueSchema)
|
|
24837
24907
|
]);
|
|
24838
|
-
var AgentPermissionSchema =
|
|
24908
|
+
var AgentPermissionSchema = z17.object({
|
|
24839
24909
|
edit: PermissionValueSchema.optional(),
|
|
24840
24910
|
bash: BashPermissionSchema.optional(),
|
|
24841
24911
|
webfetch: PermissionValueSchema.optional(),
|
|
@@ -24845,50 +24915,50 @@ var AgentPermissionSchema = z16.object({
|
|
|
24845
24915
|
}).catchall(PermissionValueSchema.optional());
|
|
24846
24916
|
|
|
24847
24917
|
// packages/omo-opencode/src/config/schema/agent-overrides.ts
|
|
24848
|
-
var AgentOverrideConfigSchema =
|
|
24849
|
-
model:
|
|
24850
|
-
models:
|
|
24918
|
+
var AgentOverrideConfigSchema = z18.object({
|
|
24919
|
+
model: z18.string().optional(),
|
|
24920
|
+
models: z18.array(z18.union([z18.string(), FallbackModelObjectSchema])).optional(),
|
|
24851
24921
|
fallback_models: FallbackModelsSchema.optional(),
|
|
24852
24922
|
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:
|
|
24923
|
+
variant: z18.string().optional(),
|
|
24924
|
+
category: z18.string().optional(),
|
|
24925
|
+
skills: z18.array(z18.string()).optional(),
|
|
24926
|
+
temperature: z18.number().min(0).max(2).optional(),
|
|
24927
|
+
top_p: z18.number().min(0).max(1).optional(),
|
|
24928
|
+
prompt: z18.string().optional(),
|
|
24929
|
+
prompt_append: z18.string().optional(),
|
|
24930
|
+
tools: z18.record(z18.string(), z18.boolean()).optional(),
|
|
24931
|
+
disable: z18.boolean().optional(),
|
|
24932
|
+
description: z18.string().optional(),
|
|
24933
|
+
mode: z18.enum(["subagent", "primary", "all"]).optional(),
|
|
24934
|
+
color: z18.string().regex(/^#[0-9A-Fa-f]{6}$/).optional(),
|
|
24935
|
+
displayName: z18.string().optional(),
|
|
24866
24936
|
permission: AgentPermissionSchema.optional(),
|
|
24867
|
-
maxTokens:
|
|
24868
|
-
thinking:
|
|
24869
|
-
type:
|
|
24870
|
-
budgetTokens:
|
|
24937
|
+
maxTokens: z18.number().optional(),
|
|
24938
|
+
thinking: z18.object({
|
|
24939
|
+
type: z18.enum(["enabled", "disabled"]),
|
|
24940
|
+
budgetTokens: z18.number().optional()
|
|
24871
24941
|
}).optional(),
|
|
24872
|
-
reasoningEffort:
|
|
24873
|
-
textVerbosity:
|
|
24874
|
-
providerOptions:
|
|
24875
|
-
ultrawork:
|
|
24876
|
-
model:
|
|
24942
|
+
reasoningEffort: z18.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
24943
|
+
textVerbosity: z18.enum(["low", "medium", "high"]).optional(),
|
|
24944
|
+
providerOptions: z18.record(z18.string(), z18.unknown()).optional(),
|
|
24945
|
+
ultrawork: z18.object({
|
|
24946
|
+
model: z18.string().optional(),
|
|
24877
24947
|
reasoning: OmoReasoningSchema.optional(),
|
|
24878
|
-
variant:
|
|
24948
|
+
variant: z18.string().optional()
|
|
24879
24949
|
}).optional(),
|
|
24880
|
-
compaction:
|
|
24881
|
-
model:
|
|
24950
|
+
compaction: z18.object({
|
|
24951
|
+
model: z18.string().optional(),
|
|
24882
24952
|
reasoning: OmoReasoningSchema.optional(),
|
|
24883
|
-
variant:
|
|
24953
|
+
variant: z18.string().optional()
|
|
24884
24954
|
}).optional()
|
|
24885
24955
|
});
|
|
24886
|
-
var AgentOverridesSchema =
|
|
24956
|
+
var AgentOverridesSchema = z18.object({
|
|
24887
24957
|
build: AgentOverrideConfigSchema.optional(),
|
|
24888
24958
|
plan: AgentOverrideConfigSchema.optional(),
|
|
24889
24959
|
sisyphus: AgentOverrideConfigSchema.optional(),
|
|
24890
24960
|
hephaestus: AgentOverrideConfigSchema.extend({
|
|
24891
|
-
allow_non_gpt_model:
|
|
24961
|
+
allow_non_gpt_model: z18.boolean().optional()
|
|
24892
24962
|
}).optional(),
|
|
24893
24963
|
"sisyphus-junior": AgentOverrideConfigSchema.optional(),
|
|
24894
24964
|
"OpenCode-Builder": AgentOverrideConfigSchema.optional(),
|
|
@@ -24902,72 +24972,72 @@ var AgentOverridesSchema = z17.object({
|
|
|
24902
24972
|
atlas: AgentOverrideConfigSchema.optional()
|
|
24903
24973
|
}).catchall(AgentOverrideConfigSchema.optional());
|
|
24904
24974
|
// packages/omo-opencode/src/config/schema/babysitting.ts
|
|
24905
|
-
import { z as
|
|
24906
|
-
var BabysittingConfigSchema =
|
|
24907
|
-
timeout_ms:
|
|
24975
|
+
import { z as z19 } from "zod";
|
|
24976
|
+
var BabysittingConfigSchema = z19.object({
|
|
24977
|
+
timeout_ms: z19.number().default(120000)
|
|
24908
24978
|
});
|
|
24909
24979
|
// packages/omo-opencode/src/config/schema/background-task.ts
|
|
24910
|
-
import { z as
|
|
24911
|
-
var CircuitBreakerConfigSchema =
|
|
24912
|
-
enabled:
|
|
24913
|
-
maxToolCalls:
|
|
24914
|
-
consecutiveThreshold:
|
|
24980
|
+
import { z as z20 } from "zod";
|
|
24981
|
+
var CircuitBreakerConfigSchema = z20.object({
|
|
24982
|
+
enabled: z20.boolean().optional(),
|
|
24983
|
+
maxToolCalls: z20.number().int().min(10).optional(),
|
|
24984
|
+
consecutiveThreshold: z20.number().int().min(5).optional()
|
|
24915
24985
|
});
|
|
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:
|
|
24986
|
+
var BackgroundTaskConfigSchema = z20.object({
|
|
24987
|
+
defaultConcurrency: z20.number().min(0).optional(),
|
|
24988
|
+
providerConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
|
|
24989
|
+
modelConcurrency: z20.record(z20.string(), z20.number().min(0)).optional(),
|
|
24990
|
+
maxDepth: z20.number().int().min(1).optional(),
|
|
24991
|
+
maxLiveDescendantsPerRoot: z20.number().int().min(0).optional(),
|
|
24992
|
+
staleTimeoutMs: z20.number().min(60000).optional(),
|
|
24993
|
+
messageStalenessTimeoutMs: z20.number().min(60000).optional(),
|
|
24994
|
+
taskTtlMs: z20.number().min(300000).optional(),
|
|
24995
|
+
sessionGoneTimeoutMs: z20.number().min(1e4).optional(),
|
|
24996
|
+
taskCleanupDelayMs: z20.number().min(60000).optional(),
|
|
24997
|
+
syncPollTimeoutMs: z20.number().min(60000).optional(),
|
|
24998
|
+
maxToolCalls: z20.number().int().min(10).optional(),
|
|
24929
24999
|
circuitBreaker: CircuitBreakerConfigSchema.optional()
|
|
24930
25000
|
});
|
|
24931
25001
|
// packages/omo-opencode/src/config/schema/browser-automation.ts
|
|
24932
|
-
import { z as
|
|
24933
|
-
var BrowserAutomationProviderSchema =
|
|
25002
|
+
import { z as z21 } from "zod";
|
|
25003
|
+
var BrowserAutomationProviderSchema = z21.enum([
|
|
24934
25004
|
"playwright",
|
|
24935
25005
|
"agent-browser",
|
|
24936
25006
|
"dev-browser",
|
|
24937
25007
|
"playwright-cli"
|
|
24938
25008
|
]);
|
|
24939
|
-
var BrowserAutomationConfigSchema =
|
|
25009
|
+
var BrowserAutomationConfigSchema = z21.object({
|
|
24940
25010
|
provider: BrowserAutomationProviderSchema.default("playwright"),
|
|
24941
|
-
playwright_mcp_args:
|
|
25011
|
+
playwright_mcp_args: z21.array(z21.string()).optional()
|
|
24942
25012
|
});
|
|
24943
25013
|
// packages/omo-opencode/src/config/schema/categories.ts
|
|
24944
|
-
import { z as
|
|
24945
|
-
var CategoryConfigSchema =
|
|
24946
|
-
description:
|
|
24947
|
-
model:
|
|
24948
|
-
models:
|
|
25014
|
+
import { z as z22 } from "zod";
|
|
25015
|
+
var CategoryConfigSchema = z22.object({
|
|
25016
|
+
description: z22.string().optional(),
|
|
25017
|
+
model: z22.string().optional(),
|
|
25018
|
+
models: z22.array(z22.union([z22.string(), FallbackModelObjectSchema])).optional(),
|
|
24949
25019
|
fallback_models: FallbackModelsSchema.optional(),
|
|
24950
25020
|
reasoning: OmoReasoningSchema.optional(),
|
|
24951
|
-
variant:
|
|
24952
|
-
temperature:
|
|
24953
|
-
top_p:
|
|
24954
|
-
max_tokens:
|
|
24955
|
-
provider_options:
|
|
24956
|
-
maxTokens:
|
|
24957
|
-
thinking:
|
|
24958
|
-
type:
|
|
24959
|
-
budgetTokens:
|
|
25021
|
+
variant: z22.string().optional(),
|
|
25022
|
+
temperature: z22.number().min(0).max(2).optional(),
|
|
25023
|
+
top_p: z22.number().min(0).max(1).optional(),
|
|
25024
|
+
max_tokens: z22.number().int().positive().optional(),
|
|
25025
|
+
provider_options: z22.record(z22.string(), z22.unknown()).optional(),
|
|
25026
|
+
maxTokens: z22.number().optional(),
|
|
25027
|
+
thinking: z22.object({
|
|
25028
|
+
type: z22.enum(["enabled", "disabled"]),
|
|
25029
|
+
budgetTokens: z22.number().optional()
|
|
24960
25030
|
}).optional(),
|
|
24961
|
-
reasoningEffort:
|
|
24962
|
-
textVerbosity:
|
|
24963
|
-
tools:
|
|
24964
|
-
prompt_append:
|
|
24965
|
-
max_prompt_tokens:
|
|
24966
|
-
is_unstable_agent:
|
|
24967
|
-
disable:
|
|
24968
|
-
warn_unavailable:
|
|
25031
|
+
reasoningEffort: z22.enum(["none", "minimal", "low", "medium", "high", "xhigh", "max"]).optional(),
|
|
25032
|
+
textVerbosity: z22.enum(["low", "medium", "high"]).optional(),
|
|
25033
|
+
tools: z22.record(z22.string(), z22.boolean()).optional(),
|
|
25034
|
+
prompt_append: z22.string().optional(),
|
|
25035
|
+
max_prompt_tokens: z22.number().int().positive().optional(),
|
|
25036
|
+
is_unstable_agent: z22.boolean().optional(),
|
|
25037
|
+
disable: z22.boolean().optional(),
|
|
25038
|
+
warn_unavailable: z22.boolean().optional()
|
|
24969
25039
|
});
|
|
24970
|
-
var BuiltinCategoryNameSchema =
|
|
25040
|
+
var BuiltinCategoryNameSchema = z22.enum([
|
|
24971
25041
|
"visual-engineering",
|
|
24972
25042
|
"ultrabrain",
|
|
24973
25043
|
"deep",
|
|
@@ -24977,29 +25047,29 @@ var BuiltinCategoryNameSchema = z21.enum([
|
|
|
24977
25047
|
"unspecified-high",
|
|
24978
25048
|
"writing"
|
|
24979
25049
|
]);
|
|
24980
|
-
var CategoriesConfigSchema =
|
|
25050
|
+
var CategoriesConfigSchema = z22.record(z22.string(), CategoryConfigSchema);
|
|
24981
25051
|
// 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:
|
|
25052
|
+
import { z as z23 } from "zod";
|
|
25053
|
+
var ClaudeCodeConfigSchema = z23.object({
|
|
25054
|
+
mcp: z23.boolean().optional(),
|
|
25055
|
+
commands: z23.boolean().optional(),
|
|
25056
|
+
skills: z23.boolean().optional(),
|
|
25057
|
+
agents: z23.boolean().optional(),
|
|
25058
|
+
hooks: z23.boolean().optional(),
|
|
25059
|
+
plugins: z23.boolean().optional(),
|
|
25060
|
+
plugins_override: z23.record(z23.string(), z23.boolean()).optional(),
|
|
25061
|
+
anthropic_provider: z23.string().trim().min(1).refine((v) => !v.includes("/"), {
|
|
24992
25062
|
message: "anthropic_provider must be a provider name without '/'"
|
|
24993
25063
|
}).optional()
|
|
24994
25064
|
});
|
|
24995
25065
|
// packages/omo-opencode/src/config/schema/comment-checker.ts
|
|
24996
|
-
import { z as
|
|
24997
|
-
var CommentCheckerConfigSchema =
|
|
24998
|
-
custom_prompt:
|
|
25066
|
+
import { z as z24 } from "zod";
|
|
25067
|
+
var CommentCheckerConfigSchema = z24.object({
|
|
25068
|
+
custom_prompt: z24.string().optional()
|
|
24999
25069
|
});
|
|
25000
25070
|
// packages/omo-opencode/src/config/schema/commands.ts
|
|
25001
|
-
import { z as
|
|
25002
|
-
var BuiltinCommandNameSchema =
|
|
25071
|
+
import { z as z25 } from "zod";
|
|
25072
|
+
var BuiltinCommandNameSchema = z25.enum([
|
|
25003
25073
|
"goal",
|
|
25004
25074
|
"refactor",
|
|
25005
25075
|
"ulw-execute",
|
|
@@ -25008,21 +25078,21 @@ var BuiltinCommandNameSchema = z24.enum([
|
|
|
25008
25078
|
"hyperplan"
|
|
25009
25079
|
]);
|
|
25010
25080
|
// packages/omo-opencode/src/config/schema/default-mode.ts
|
|
25011
|
-
import { z as
|
|
25012
|
-
var DefaultModeConfigSchema =
|
|
25013
|
-
ultrawork:
|
|
25014
|
-
goal:
|
|
25081
|
+
import { z as z26 } from "zod";
|
|
25082
|
+
var DefaultModeConfigSchema = z26.object({
|
|
25083
|
+
ultrawork: z26.boolean().default(false),
|
|
25084
|
+
goal: z26.boolean().default(false)
|
|
25015
25085
|
});
|
|
25016
25086
|
// 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:
|
|
25087
|
+
import { z as z27 } from "zod";
|
|
25088
|
+
var DynamicContextPruningConfigSchema = z27.object({
|
|
25089
|
+
enabled: z27.boolean().default(false),
|
|
25090
|
+
notification: z27.enum(["off", "minimal", "detailed"]).default("detailed"),
|
|
25091
|
+
turn_protection: z27.object({
|
|
25092
|
+
enabled: z27.boolean().default(true),
|
|
25093
|
+
turns: z27.number().min(1).max(10).default(3)
|
|
25024
25094
|
}).optional(),
|
|
25025
|
-
protected_tools:
|
|
25095
|
+
protected_tools: z27.array(z27.string()).default([
|
|
25026
25096
|
"task",
|
|
25027
25097
|
"todowrite",
|
|
25028
25098
|
"todoread",
|
|
@@ -25031,45 +25101,45 @@ var DynamicContextPruningConfigSchema = z26.object({
|
|
|
25031
25101
|
"session_write",
|
|
25032
25102
|
"session_search"
|
|
25033
25103
|
]),
|
|
25034
|
-
strategies:
|
|
25035
|
-
deduplication:
|
|
25036
|
-
enabled:
|
|
25104
|
+
strategies: z27.object({
|
|
25105
|
+
deduplication: z27.object({
|
|
25106
|
+
enabled: z27.boolean().default(true)
|
|
25037
25107
|
}).optional(),
|
|
25038
|
-
supersede_writes:
|
|
25039
|
-
enabled:
|
|
25040
|
-
aggressive:
|
|
25108
|
+
supersede_writes: z27.object({
|
|
25109
|
+
enabled: z27.boolean().default(true),
|
|
25110
|
+
aggressive: z27.boolean().default(false)
|
|
25041
25111
|
}).optional(),
|
|
25042
|
-
purge_errors:
|
|
25043
|
-
enabled:
|
|
25044
|
-
turns:
|
|
25112
|
+
purge_errors: z27.object({
|
|
25113
|
+
enabled: z27.boolean().default(true),
|
|
25114
|
+
turns: z27.number().min(1).max(20).default(5)
|
|
25045
25115
|
}).optional()
|
|
25046
25116
|
}).optional()
|
|
25047
25117
|
});
|
|
25048
25118
|
// 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:
|
|
25119
|
+
import { z as z28 } from "zod";
|
|
25120
|
+
var ExperimentalConfigSchema = z28.object({
|
|
25121
|
+
aggressive_truncation: z28.boolean().optional(),
|
|
25122
|
+
preemptive_compaction: z28.boolean().optional(),
|
|
25123
|
+
truncate_all_tool_outputs: z28.boolean().optional(),
|
|
25054
25124
|
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:
|
|
25125
|
+
task_system: z28.boolean().optional(),
|
|
25126
|
+
plugin_load_timeout_ms: z28.number().min(1000).optional(),
|
|
25127
|
+
safe_hook_creation: z28.boolean().optional(),
|
|
25128
|
+
disable_omo_env: z28.boolean().optional(),
|
|
25129
|
+
hashline_edit: z28.boolean().optional(),
|
|
25130
|
+
model_fallback_title: z28.boolean().optional(),
|
|
25131
|
+
max_tools: z28.number().int().min(1).optional(),
|
|
25132
|
+
disable_live_parent_wake_routing: z28.boolean().optional()
|
|
25063
25133
|
});
|
|
25064
25134
|
// packages/omo-opencode/src/config/schema/goal.ts
|
|
25065
|
-
import { z as
|
|
25066
|
-
var GoalConfigSchema =
|
|
25067
|
-
enabled:
|
|
25068
|
-
auto_start:
|
|
25069
|
-
default_max_iterations:
|
|
25135
|
+
import { z as z29 } from "zod";
|
|
25136
|
+
var GoalConfigSchema = z29.object({
|
|
25137
|
+
enabled: z29.boolean().default(false),
|
|
25138
|
+
auto_start: z29.boolean().default(false),
|
|
25139
|
+
default_max_iterations: z29.number().min(1).max(1000).default(100)
|
|
25070
25140
|
});
|
|
25071
25141
|
// packages/skills-loader-core/src/config/git-env-prefix.ts
|
|
25072
|
-
import { z as
|
|
25142
|
+
import { z as z30 } from "zod";
|
|
25073
25143
|
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
25144
|
var GIT_ENV_PREFIX_VALIDATION_MESSAGE = 'git_env_prefix must be empty or use shell-safe env assignments like "GIT_MASTER=1"';
|
|
25075
25145
|
function isValidGitEnvPrefix(value) {
|
|
@@ -25084,17 +25154,17 @@ function assertValidGitEnvPrefix(value) {
|
|
|
25084
25154
|
}
|
|
25085
25155
|
return value;
|
|
25086
25156
|
}
|
|
25087
|
-
var GitEnvPrefixSchema =
|
|
25157
|
+
var GitEnvPrefixSchema = z30.string().refine(isValidGitEnvPrefix, { message: GIT_ENV_PREFIX_VALIDATION_MESSAGE }).default("GIT_MASTER=1");
|
|
25088
25158
|
// packages/omo-opencode/src/config/schema/git-master.ts
|
|
25089
|
-
import { z as
|
|
25090
|
-
var GitMasterConfigSchema =
|
|
25091
|
-
commit_footer:
|
|
25092
|
-
include_co_authored_by:
|
|
25159
|
+
import { z as z31 } from "zod";
|
|
25160
|
+
var GitMasterConfigSchema = z31.object({
|
|
25161
|
+
commit_footer: z31.union([z31.boolean(), z31.string()]).default(true),
|
|
25162
|
+
include_co_authored_by: z31.boolean().default(true),
|
|
25093
25163
|
git_env_prefix: GitEnvPrefixSchema
|
|
25094
25164
|
});
|
|
25095
25165
|
// packages/omo-opencode/src/config/schema/hooks.ts
|
|
25096
|
-
import { z as
|
|
25097
|
-
var HookNameSchema =
|
|
25166
|
+
import { z as z32 } from "zod";
|
|
25167
|
+
var HookNameSchema = z32.enum([
|
|
25098
25168
|
"todo-continuation-enforcer",
|
|
25099
25169
|
"session-notification",
|
|
25100
25170
|
"comment-checker",
|
|
@@ -25152,240 +25222,240 @@ var HookNameSchema = z31.enum([
|
|
|
25152
25222
|
"legacy-plugin-toast"
|
|
25153
25223
|
]);
|
|
25154
25224
|
// packages/omo-opencode/src/config/schema/i18n.ts
|
|
25155
|
-
import { z as
|
|
25156
|
-
var I18nConfigSchema =
|
|
25157
|
-
locale:
|
|
25225
|
+
import { z as z33 } from "zod";
|
|
25226
|
+
var I18nConfigSchema = z33.object({
|
|
25227
|
+
locale: z33.string().optional()
|
|
25158
25228
|
});
|
|
25159
25229
|
// 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:
|
|
25230
|
+
import { z as z34 } from "zod";
|
|
25231
|
+
var KeywordTypeSchema = z34.enum(["ultrawork", "team", "hyperplan", "hyperplan-ultrawork"]);
|
|
25232
|
+
var KeywordDetectorConfigSchema = z34.object({
|
|
25233
|
+
enabled_expansions: z34.array(KeywordTypeSchema).optional(),
|
|
25234
|
+
disabled_keywords: z34.array(KeywordTypeSchema).optional()
|
|
25165
25235
|
});
|
|
25166
25236
|
// 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:
|
|
25237
|
+
import { z as z35 } from "zod";
|
|
25238
|
+
var ModelCapabilitiesConfigSchema = z35.object({
|
|
25239
|
+
enabled: z35.boolean().optional(),
|
|
25240
|
+
auto_refresh_on_start: z35.boolean().optional(),
|
|
25241
|
+
refresh_timeout_ms: z35.number().int().positive().optional(),
|
|
25242
|
+
source_url: z35.string().url().optional()
|
|
25173
25243
|
});
|
|
25174
25244
|
// packages/omo-opencode/src/config/schema/notification.ts
|
|
25175
|
-
import { z as
|
|
25176
|
-
var NotificationConfigSchema =
|
|
25177
|
-
force_enable:
|
|
25245
|
+
import { z as z36 } from "zod";
|
|
25246
|
+
var NotificationConfigSchema = z36.object({
|
|
25247
|
+
force_enable: z36.boolean().optional()
|
|
25178
25248
|
});
|
|
25179
25249
|
// packages/omo-opencode/src/config/schema/oh-my-opencode-config.ts
|
|
25180
|
-
import { z as
|
|
25250
|
+
import { z as z50 } from "zod";
|
|
25181
25251
|
|
|
25182
25252
|
// packages/omo-opencode/src/mcp/types.ts
|
|
25183
|
-
import { z as
|
|
25184
|
-
var McpNameSchema =
|
|
25185
|
-
var AnyMcpNameSchema =
|
|
25253
|
+
import { z as z37 } from "zod";
|
|
25254
|
+
var McpNameSchema = z37.enum(["websearch", "context7", "grep_app", "lsp"]);
|
|
25255
|
+
var AnyMcpNameSchema = z37.string().min(1);
|
|
25186
25256
|
|
|
25187
25257
|
// packages/omo-opencode/src/config/schema/agent-definitions.ts
|
|
25188
|
-
import { z as
|
|
25189
|
-
var AgentDefinitionPathSchema =
|
|
25190
|
-
var AgentDefinitionsConfigSchema =
|
|
25258
|
+
import { z as z38 } from "zod";
|
|
25259
|
+
var AgentDefinitionPathSchema = z38.string().min(1);
|
|
25260
|
+
var AgentDefinitionsConfigSchema = z38.array(AgentDefinitionPathSchema).optional();
|
|
25191
25261
|
|
|
25192
25262
|
// 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:
|
|
25263
|
+
import { z as z39 } from "zod";
|
|
25264
|
+
var OpenClawGatewaySchema = z39.object({
|
|
25265
|
+
type: z39.enum(["http", "command"]).default("http"),
|
|
25266
|
+
url: z39.string().optional(),
|
|
25267
|
+
method: z39.string().default("POST"),
|
|
25268
|
+
headers: z39.record(z39.string(), z39.string()).optional(),
|
|
25269
|
+
command: z39.string().optional(),
|
|
25270
|
+
timeout: z39.number().optional()
|
|
25201
25271
|
});
|
|
25202
|
-
var OpenClawHookSchema =
|
|
25203
|
-
enabled:
|
|
25204
|
-
gateway:
|
|
25205
|
-
instruction:
|
|
25272
|
+
var OpenClawHookSchema = z39.object({
|
|
25273
|
+
enabled: z39.boolean().default(true),
|
|
25274
|
+
gateway: z39.string(),
|
|
25275
|
+
instruction: z39.string()
|
|
25206
25276
|
});
|
|
25207
|
-
var OpenClawReplyListenerConfigSchema =
|
|
25208
|
-
discordBotToken:
|
|
25209
|
-
discordChannelId:
|
|
25210
|
-
discordMention:
|
|
25211
|
-
authorizedDiscordUserIds:
|
|
25212
|
-
telegramBotToken:
|
|
25213
|
-
telegramChatId:
|
|
25214
|
-
pollIntervalMs:
|
|
25215
|
-
rateLimitPerMinute:
|
|
25216
|
-
maxMessageLength:
|
|
25217
|
-
includePrefix:
|
|
25277
|
+
var OpenClawReplyListenerConfigSchema = z39.object({
|
|
25278
|
+
discordBotToken: z39.string().optional(),
|
|
25279
|
+
discordChannelId: z39.string().optional(),
|
|
25280
|
+
discordMention: z39.string().optional(),
|
|
25281
|
+
authorizedDiscordUserIds: z39.array(z39.string()).default([]),
|
|
25282
|
+
telegramBotToken: z39.string().optional(),
|
|
25283
|
+
telegramChatId: z39.string().optional(),
|
|
25284
|
+
pollIntervalMs: z39.number().default(3000),
|
|
25285
|
+
rateLimitPerMinute: z39.number().default(10),
|
|
25286
|
+
maxMessageLength: z39.number().default(500),
|
|
25287
|
+
includePrefix: z39.boolean().default(true)
|
|
25218
25288
|
});
|
|
25219
|
-
var OpenClawConfigSchema =
|
|
25220
|
-
enabled:
|
|
25221
|
-
gateways:
|
|
25222
|
-
hooks:
|
|
25289
|
+
var OpenClawConfigSchema = z39.object({
|
|
25290
|
+
enabled: z39.boolean().default(false),
|
|
25291
|
+
gateways: z39.record(z39.string(), OpenClawGatewaySchema).default({}),
|
|
25292
|
+
hooks: z39.record(z39.string(), OpenClawHookSchema).default({}),
|
|
25223
25293
|
replyListener: OpenClawReplyListenerConfigSchema.optional()
|
|
25224
25294
|
});
|
|
25225
25295
|
|
|
25226
25296
|
// 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:
|
|
25297
|
+
import { z as z40 } from "zod";
|
|
25298
|
+
var MonitorConfigSchema = z40.object({
|
|
25299
|
+
enabled: z40.boolean().default(false),
|
|
25300
|
+
live_mode_enabled: z40.boolean().default(false),
|
|
25301
|
+
allowed_commands: z40.array(z40.string()).optional(),
|
|
25302
|
+
max_monitors_per_session: z40.number().int().min(1).max(16).default(3),
|
|
25303
|
+
max_runtime_ms: z40.number().int().min(1000).default(1800000),
|
|
25304
|
+
batch_max_lines: z40.number().int().min(1).default(50),
|
|
25305
|
+
batch_max_bytes: z40.number().int().min(1024).default(16384),
|
|
25306
|
+
flush_interval_ms: z40.number().int().min(250).default(1000),
|
|
25307
|
+
ring_max_lines: z40.number().int().min(1).default(1000),
|
|
25308
|
+
line_max_bytes: z40.number().int().min(256).default(8192),
|
|
25309
|
+
pattern_max_length: z40.number().int().min(1).default(512)
|
|
25240
25310
|
});
|
|
25241
25311
|
|
|
25242
25312
|
// 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:
|
|
25313
|
+
import { z as z41 } from "zod";
|
|
25314
|
+
var RuntimeFallbackConfigSchema = z41.object({
|
|
25315
|
+
enabled: z41.boolean().optional(),
|
|
25316
|
+
retry_on_errors: z41.array(z41.number()).optional(),
|
|
25317
|
+
max_fallback_attempts: z41.number().min(1).max(20).optional(),
|
|
25318
|
+
cooldown_seconds: z41.number().min(0).optional(),
|
|
25319
|
+
timeout_seconds: z41.number().min(0).optional(),
|
|
25320
|
+
notify_on_fallback: z41.boolean().optional(),
|
|
25321
|
+
restore_primary_after_cooldown: z41.boolean().optional()
|
|
25252
25322
|
});
|
|
25253
25323
|
|
|
25254
25324
|
// 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:
|
|
25325
|
+
import * as z42 from "zod";
|
|
25326
|
+
var TeamModeConfigSchema = z42.object({
|
|
25327
|
+
enabled: z42.boolean().default(false),
|
|
25328
|
+
tmux_visualization: z42.boolean().default(false),
|
|
25329
|
+
max_parallel_members: z42.number().int().min(1).max(8).default(4),
|
|
25330
|
+
max_members: z42.number().int().min(1).max(8).default(8),
|
|
25331
|
+
max_messages_per_run: z42.number().int().min(1).default(1e4),
|
|
25332
|
+
max_wall_clock_minutes: z42.number().int().min(1).default(120),
|
|
25333
|
+
max_member_turns: z42.number().int().min(1).default(500),
|
|
25334
|
+
base_dir: z42.string().optional(),
|
|
25335
|
+
message_payload_max_bytes: z42.number().int().min(1024).default(32768),
|
|
25336
|
+
recipient_unread_max_bytes: z42.number().int().min(1024).default(262144),
|
|
25337
|
+
mailbox_poll_interval_ms: z42.number().int().min(500).default(3000)
|
|
25268
25338
|
});
|
|
25269
25339
|
// packages/omo-opencode/src/config/schema/skills.ts
|
|
25270
|
-
import { z as
|
|
25271
|
-
var SkillSourceSchema =
|
|
25272
|
-
|
|
25273
|
-
|
|
25274
|
-
path:
|
|
25275
|
-
recursive:
|
|
25276
|
-
glob:
|
|
25340
|
+
import { z as z43 } from "zod";
|
|
25341
|
+
var SkillSourceSchema = z43.union([
|
|
25342
|
+
z43.string(),
|
|
25343
|
+
z43.object({
|
|
25344
|
+
path: z43.string(),
|
|
25345
|
+
recursive: z43.boolean().optional(),
|
|
25346
|
+
glob: z43.string().optional()
|
|
25277
25347
|
})
|
|
25278
25348
|
]);
|
|
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:
|
|
25349
|
+
var SkillDefinitionSchema = z43.object({
|
|
25350
|
+
description: z43.string().optional(),
|
|
25351
|
+
template: z43.string().optional(),
|
|
25352
|
+
from: z43.string().optional(),
|
|
25353
|
+
model: z43.string().optional(),
|
|
25354
|
+
agent: z43.string().optional(),
|
|
25355
|
+
subtask: z43.boolean().optional(),
|
|
25356
|
+
"argument-hint": z43.string().optional(),
|
|
25357
|
+
license: z43.string().optional(),
|
|
25358
|
+
compatibility: z43.string().optional(),
|
|
25359
|
+
metadata: z43.record(z43.string(), z43.unknown()).optional(),
|
|
25360
|
+
"allowed-tools": z43.array(z43.string()).optional(),
|
|
25361
|
+
disable: z43.boolean().optional()
|
|
25292
25362
|
});
|
|
25293
|
-
var SkillEntrySchema =
|
|
25294
|
-
var SkillsConfigSchema =
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
sources:
|
|
25298
|
-
enable:
|
|
25299
|
-
disable:
|
|
25363
|
+
var SkillEntrySchema = z43.union([z43.boolean(), SkillDefinitionSchema]);
|
|
25364
|
+
var SkillsConfigSchema = z43.union([
|
|
25365
|
+
z43.array(z43.string()),
|
|
25366
|
+
z43.object({
|
|
25367
|
+
sources: z43.array(SkillSourceSchema).optional(),
|
|
25368
|
+
enable: z43.array(z43.string()).optional(),
|
|
25369
|
+
disable: z43.array(z43.string()).optional()
|
|
25300
25370
|
}).catchall(SkillEntrySchema)
|
|
25301
25371
|
]);
|
|
25302
25372
|
|
|
25303
25373
|
// 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:
|
|
25374
|
+
import { z as z44 } from "zod";
|
|
25375
|
+
var SisyphusTasksConfigSchema = z44.object({
|
|
25376
|
+
storage_path: z44.string().optional(),
|
|
25377
|
+
task_list_id: z44.string().optional(),
|
|
25378
|
+
claude_code_compat: z44.boolean().default(false)
|
|
25309
25379
|
});
|
|
25310
|
-
var SisyphusConfigSchema =
|
|
25380
|
+
var SisyphusConfigSchema = z44.object({
|
|
25311
25381
|
tasks: SisyphusTasksConfigSchema.optional()
|
|
25312
25382
|
});
|
|
25313
25383
|
|
|
25314
25384
|
// 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:
|
|
25385
|
+
import { z as z45 } from "zod";
|
|
25386
|
+
var SisyphusAgentConfigSchema = z45.object({
|
|
25387
|
+
disabled: z45.boolean().optional(),
|
|
25388
|
+
default_builder_enabled: z45.boolean().optional(),
|
|
25389
|
+
planner_enabled: z45.boolean().optional(),
|
|
25390
|
+
replace_plan: z45.boolean().optional(),
|
|
25391
|
+
tdd: z45.boolean().default(true).optional()
|
|
25322
25392
|
});
|
|
25323
25393
|
|
|
25324
25394
|
// packages/omo-opencode/src/config/schema/tmux.ts
|
|
25325
25395
|
init_src2();
|
|
25326
|
-
import { z as
|
|
25327
|
-
var TmuxLayoutSchema =
|
|
25328
|
-
var TmuxIsolationSchema =
|
|
25329
|
-
var TmuxConfigSchema =
|
|
25330
|
-
enabled:
|
|
25396
|
+
import { z as z46 } from "zod";
|
|
25397
|
+
var TmuxLayoutSchema = z46.enum(TMUX_LAYOUT_VALUES);
|
|
25398
|
+
var TmuxIsolationSchema = z46.enum(TMUX_ISOLATION_VALUES);
|
|
25399
|
+
var TmuxConfigSchema = z46.object({
|
|
25400
|
+
enabled: z46.boolean().default(false),
|
|
25331
25401
|
layout: TmuxLayoutSchema.default("main-vertical"),
|
|
25332
|
-
main_pane_size:
|
|
25333
|
-
main_pane_min_width:
|
|
25334
|
-
agent_pane_min_width:
|
|
25402
|
+
main_pane_size: z46.number().min(20).max(80).default(60),
|
|
25403
|
+
main_pane_min_width: z46.number().min(40).default(120),
|
|
25404
|
+
agent_pane_min_width: z46.number().min(20).default(40),
|
|
25335
25405
|
isolation: TmuxIsolationSchema.default("inline")
|
|
25336
25406
|
});
|
|
25337
25407
|
|
|
25338
25408
|
// packages/omo-opencode/src/config/schema/tui.ts
|
|
25339
|
-
import { z as
|
|
25340
|
-
var TuiSidebarConfigSchema =
|
|
25341
|
-
enabled:
|
|
25409
|
+
import { z as z47 } from "zod";
|
|
25410
|
+
var TuiSidebarConfigSchema = z47.object({
|
|
25411
|
+
enabled: z47.boolean().default(true)
|
|
25342
25412
|
});
|
|
25343
|
-
var TuiConfigSchema =
|
|
25413
|
+
var TuiConfigSchema = z47.object({
|
|
25344
25414
|
sidebar: TuiSidebarConfigSchema.default({ enabled: true })
|
|
25345
25415
|
});
|
|
25346
25416
|
|
|
25347
25417
|
// packages/omo-opencode/src/config/schema/ulw-execute.ts
|
|
25348
|
-
import { z as
|
|
25349
|
-
var UlwExecuteConfigSchema =
|
|
25350
|
-
auto_commit:
|
|
25418
|
+
import { z as z48 } from "zod";
|
|
25419
|
+
var UlwExecuteConfigSchema = z48.object({
|
|
25420
|
+
auto_commit: z48.boolean().default(true)
|
|
25351
25421
|
});
|
|
25352
25422
|
|
|
25353
25423
|
// packages/omo-opencode/src/config/schema/websearch.ts
|
|
25354
|
-
import { z as
|
|
25355
|
-
var WebsearchProviderSchema =
|
|
25356
|
-
var WebsearchConfigSchema =
|
|
25424
|
+
import { z as z49 } from "zod";
|
|
25425
|
+
var WebsearchProviderSchema = z49.enum(["exa", "tavily"]);
|
|
25426
|
+
var WebsearchConfigSchema = z49.object({
|
|
25357
25427
|
provider: WebsearchProviderSchema.optional()
|
|
25358
25428
|
});
|
|
25359
25429
|
|
|
25360
25430
|
// 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:
|
|
25431
|
+
var OhMyOpenCodeConfigSchema = z50.object({
|
|
25432
|
+
$schema: z50.string().optional(),
|
|
25433
|
+
new_task_system_enabled: z50.boolean().optional(),
|
|
25434
|
+
default_run_agent: z50.string().optional(),
|
|
25435
|
+
agent_order: z50.array(z50.string().max(128)).max(64).optional(),
|
|
25366
25436
|
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:
|
|
25437
|
+
disabled_mcps: z50.array(AnyMcpNameSchema).optional(),
|
|
25438
|
+
disabled_agents: z50.array(z50.string()).optional(),
|
|
25439
|
+
disabled_skills: z50.array(z50.string()).optional(),
|
|
25440
|
+
disabled_hooks: z50.array(z50.string()).optional(),
|
|
25441
|
+
disabled_commands: z50.array(BuiltinCommandNameSchema).optional(),
|
|
25442
|
+
disabled_tools: z50.array(z50.string()).optional(),
|
|
25443
|
+
disabled_providers: z50.array(z50.string()).optional(),
|
|
25444
|
+
mcp_env_allowlist: z50.array(z50.string()).optional(),
|
|
25445
|
+
hashline_edit: z50.boolean().optional(),
|
|
25446
|
+
telemetry: z50.boolean().optional().describe("Enable or disable anonymous telemetry. Default: enabled when omitted. Set to false to disable."),
|
|
25447
|
+
model_fallback: z50.boolean().optional(),
|
|
25378
25448
|
agents: AgentOverridesSchema.optional(),
|
|
25379
25449
|
categories: CategoriesConfigSchema.optional(),
|
|
25380
25450
|
claude_code: ClaudeCodeConfigSchema.optional(),
|
|
25381
25451
|
sisyphus_agent: SisyphusAgentConfigSchema.optional(),
|
|
25382
25452
|
comment_checker: CommentCheckerConfigSchema.optional(),
|
|
25383
25453
|
experimental: ExperimentalConfigSchema.optional(),
|
|
25384
|
-
auto_update:
|
|
25454
|
+
auto_update: z50.boolean().optional(),
|
|
25385
25455
|
skills: SkillsConfigSchema.optional(),
|
|
25386
25456
|
goal: GoalConfigSchema.optional(),
|
|
25387
|
-
ralph_loop:
|
|
25388
|
-
runtime_fallback:
|
|
25457
|
+
ralph_loop: z50.record(z50.string(), z50.unknown()).optional(),
|
|
25458
|
+
runtime_fallback: z50.union([z50.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
|
25389
25459
|
background_task: BackgroundTaskConfigSchema.optional(),
|
|
25390
25460
|
notification: NotificationConfigSchema.optional(),
|
|
25391
25461
|
model_capabilities: ModelCapabilitiesConfigSchema.optional(),
|
|
@@ -25408,7 +25478,7 @@ var OhMyOpenCodeConfigSchema = z49.object({
|
|
|
25408
25478
|
ulw_execute: UlwExecuteConfigSchema.optional(),
|
|
25409
25479
|
start_work: UlwExecuteConfigSchema.optional(),
|
|
25410
25480
|
default_mode: DefaultModeConfigSchema.optional(),
|
|
25411
|
-
_migrations:
|
|
25481
|
+
_migrations: z50.array(z50.string()).optional()
|
|
25412
25482
|
});
|
|
25413
25483
|
// packages/omo-opencode/src/config/validate.ts
|
|
25414
25484
|
function shortPath(configPath) {
|
|
@@ -96399,7 +96469,7 @@ function getCachedVersion(options = {}) {
|
|
|
96399
96469
|
// package.json
|
|
96400
96470
|
var package_default = {
|
|
96401
96471
|
name: "oh-my-opencode",
|
|
96402
|
-
version: "5.0.0-beta.
|
|
96472
|
+
version: "5.0.0-beta.53",
|
|
96403
96473
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
96404
96474
|
main: "./dist/index.js",
|
|
96405
96475
|
types: "dist/index.d.ts",
|
|
@@ -96583,7 +96653,7 @@ var package_default = {
|
|
|
96583
96653
|
zod: "^4.4.3"
|
|
96584
96654
|
},
|
|
96585
96655
|
devDependencies: {
|
|
96586
|
-
"@code-yeongyu/senpi": "2026.9.10",
|
|
96656
|
+
"@code-yeongyu/senpi": "2026.9.10-2",
|
|
96587
96657
|
"@oh-my-opencode/agents-md-core": "workspace:*",
|
|
96588
96658
|
"@oh-my-opencode/ast-grep-mcp": "workspace:*",
|
|
96589
96659
|
"@oh-my-opencode/boulder-state": "workspace:*",
|
|
@@ -96624,18 +96694,18 @@ var package_default = {
|
|
|
96624
96694
|
typescript: "^7.0.2"
|
|
96625
96695
|
},
|
|
96626
96696
|
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.
|
|
96697
|
+
"oh-my-opencode-darwin-arm64": "5.0.0-beta.53",
|
|
96698
|
+
"oh-my-opencode-darwin-x64": "5.0.0-beta.53",
|
|
96699
|
+
"oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.53",
|
|
96700
|
+
"oh-my-opencode-linux-arm64": "5.0.0-beta.53",
|
|
96701
|
+
"oh-my-opencode-linux-arm64-musl": "5.0.0-beta.53",
|
|
96702
|
+
"oh-my-opencode-linux-x64": "5.0.0-beta.53",
|
|
96703
|
+
"oh-my-opencode-linux-x64-baseline": "5.0.0-beta.53",
|
|
96704
|
+
"oh-my-opencode-linux-x64-musl": "5.0.0-beta.53",
|
|
96705
|
+
"oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.53",
|
|
96706
|
+
"oh-my-opencode-windows-arm64": "5.0.0-beta.53",
|
|
96707
|
+
"oh-my-opencode-windows-x64": "5.0.0-beta.53",
|
|
96708
|
+
"oh-my-opencode-windows-x64-baseline": "5.0.0-beta.53"
|
|
96639
96709
|
},
|
|
96640
96710
|
overrides: {
|
|
96641
96711
|
"@earendil-works/pi-agent-core": "0.84.2",
|
|
@@ -105147,35 +105217,35 @@ import { mkdirSync as mkdirSync17, readFileSync as readFileSync45, renameSync as
|
|
|
105147
105217
|
import { join as join82 } from "path";
|
|
105148
105218
|
|
|
105149
105219
|
// packages/omo-opencode/src/hooks/goal/types.ts
|
|
105150
|
-
import { z as
|
|
105220
|
+
import { z as z52 } from "zod";
|
|
105151
105221
|
var GOAL_STATUS_VALUES = ["active", "paused", "complete"];
|
|
105152
|
-
var GoalStatusSchema =
|
|
105153
|
-
var GoalSchema =
|
|
105154
|
-
id:
|
|
105155
|
-
sessionID:
|
|
105156
|
-
objective:
|
|
105222
|
+
var GoalStatusSchema = z52.enum(GOAL_STATUS_VALUES);
|
|
105223
|
+
var GoalSchema = z52.object({
|
|
105224
|
+
id: z52.string(),
|
|
105225
|
+
sessionID: z52.string(),
|
|
105226
|
+
objective: z52.string(),
|
|
105157
105227
|
status: GoalStatusSchema,
|
|
105158
|
-
tokensUsed:
|
|
105159
|
-
timeUsedSeconds:
|
|
105160
|
-
createdAt:
|
|
105161
|
-
updatedAt:
|
|
105162
|
-
lastStartedAt:
|
|
105163
|
-
completedAt:
|
|
105228
|
+
tokensUsed: z52.number().int().nonnegative(),
|
|
105229
|
+
timeUsedSeconds: z52.number().int().nonnegative(),
|
|
105230
|
+
createdAt: z52.number().int().nonnegative(),
|
|
105231
|
+
updatedAt: z52.number().int().nonnegative(),
|
|
105232
|
+
lastStartedAt: z52.number().int().nonnegative().optional(),
|
|
105233
|
+
completedAt: z52.number().int().nonnegative().optional()
|
|
105164
105234
|
});
|
|
105165
|
-
var GoalFileSchema =
|
|
105166
|
-
version:
|
|
105235
|
+
var GoalFileSchema = z52.object({
|
|
105236
|
+
version: z52.literal(1),
|
|
105167
105237
|
goal: GoalSchema.nullable()
|
|
105168
105238
|
});
|
|
105169
|
-
var GoalToolSnapshotSchema =
|
|
105170
|
-
sessionID:
|
|
105171
|
-
objective:
|
|
105239
|
+
var GoalToolSnapshotSchema = z52.object({
|
|
105240
|
+
sessionID: z52.string(),
|
|
105241
|
+
objective: z52.string(),
|
|
105172
105242
|
status: GoalStatusSchema,
|
|
105173
|
-
tokensUsed:
|
|
105174
|
-
timeUsedSeconds:
|
|
105175
|
-
createdAt:
|
|
105176
|
-
updatedAt:
|
|
105243
|
+
tokensUsed: z52.number().int().nonnegative(),
|
|
105244
|
+
timeUsedSeconds: z52.number().int().nonnegative(),
|
|
105245
|
+
createdAt: z52.number().int().nonnegative(),
|
|
105246
|
+
updatedAt: z52.number().int().nonnegative()
|
|
105177
105247
|
});
|
|
105178
|
-
var GoalToolResponseSchema =
|
|
105248
|
+
var GoalToolResponseSchema = z52.object({
|
|
105179
105249
|
goal: GoalToolSnapshotSchema.nullable()
|
|
105180
105250
|
});
|
|
105181
105251
|
|
|
@@ -122703,11 +122773,11 @@ function createMonitorStatusInjectorHook(monitorManager, config) {
|
|
|
122703
122773
|
import { resolve as resolve25 } from "path";
|
|
122704
122774
|
|
|
122705
122775
|
// node_modules/.bun/@opencode-ai+plugin@1.18.22+5df5880790e6b42e/node_modules/@opencode-ai/plugin/dist/tool.js
|
|
122706
|
-
import { z as
|
|
122776
|
+
import { z as z53 } from "zod";
|
|
122707
122777
|
function tool(input) {
|
|
122708
122778
|
return input;
|
|
122709
122779
|
}
|
|
122710
|
-
tool.schema =
|
|
122780
|
+
tool.schema = z53;
|
|
122711
122781
|
|
|
122712
122782
|
// packages/omo-opencode/src/shared/ripgrep-cli.ts
|
|
122713
122783
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
@@ -131823,55 +131893,55 @@ function isExplicitSyncRun(runInBackground) {
|
|
|
131823
131893
|
import { join as join114 } from "path";
|
|
131824
131894
|
|
|
131825
131895
|
// packages/omo-opencode/src/tools/task/types.ts
|
|
131826
|
-
import { z as
|
|
131827
|
-
var TaskStatusSchema =
|
|
131828
|
-
var TaskObjectSchema =
|
|
131829
|
-
id:
|
|
131830
|
-
subject:
|
|
131831
|
-
description:
|
|
131896
|
+
import { z as z54 } from "zod";
|
|
131897
|
+
var TaskStatusSchema = z54.enum(["pending", "in_progress", "completed", "deleted"]);
|
|
131898
|
+
var TaskObjectSchema = z54.object({
|
|
131899
|
+
id: z54.string(),
|
|
131900
|
+
subject: z54.string(),
|
|
131901
|
+
description: z54.string(),
|
|
131832
131902
|
status: TaskStatusSchema,
|
|
131833
|
-
activeForm:
|
|
131834
|
-
blocks:
|
|
131835
|
-
blockedBy:
|
|
131836
|
-
owner:
|
|
131837
|
-
metadata:
|
|
131838
|
-
repoURL:
|
|
131839
|
-
parentID:
|
|
131840
|
-
threadID:
|
|
131903
|
+
activeForm: z54.string().optional(),
|
|
131904
|
+
blocks: z54.array(z54.string()).default([]),
|
|
131905
|
+
blockedBy: z54.array(z54.string()).default([]),
|
|
131906
|
+
owner: z54.string().optional(),
|
|
131907
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131908
|
+
repoURL: z54.string().optional(),
|
|
131909
|
+
parentID: z54.string().optional(),
|
|
131910
|
+
threadID: z54.string()
|
|
131841
131911
|
}).strict();
|
|
131842
|
-
var TaskCreateInputSchema =
|
|
131843
|
-
subject:
|
|
131844
|
-
description:
|
|
131845
|
-
activeForm:
|
|
131846
|
-
blocks:
|
|
131847
|
-
blockedBy:
|
|
131848
|
-
owner:
|
|
131849
|
-
metadata:
|
|
131850
|
-
repoURL:
|
|
131851
|
-
parentID:
|
|
131912
|
+
var TaskCreateInputSchema = z54.object({
|
|
131913
|
+
subject: z54.string(),
|
|
131914
|
+
description: z54.string().optional(),
|
|
131915
|
+
activeForm: z54.string().optional(),
|
|
131916
|
+
blocks: z54.array(z54.string()).optional(),
|
|
131917
|
+
blockedBy: z54.array(z54.string()).optional(),
|
|
131918
|
+
owner: z54.string().optional(),
|
|
131919
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131920
|
+
repoURL: z54.string().optional(),
|
|
131921
|
+
parentID: z54.string().optional()
|
|
131852
131922
|
});
|
|
131853
|
-
var TaskListInputSchema =
|
|
131923
|
+
var TaskListInputSchema = z54.object({
|
|
131854
131924
|
status: TaskStatusSchema.optional(),
|
|
131855
|
-
parentID:
|
|
131925
|
+
parentID: z54.string().optional()
|
|
131856
131926
|
});
|
|
131857
|
-
var TaskGetInputSchema =
|
|
131858
|
-
id:
|
|
131927
|
+
var TaskGetInputSchema = z54.object({
|
|
131928
|
+
id: z54.string()
|
|
131859
131929
|
});
|
|
131860
|
-
var TaskUpdateInputSchema =
|
|
131861
|
-
id:
|
|
131862
|
-
subject:
|
|
131863
|
-
description:
|
|
131930
|
+
var TaskUpdateInputSchema = z54.object({
|
|
131931
|
+
id: z54.string(),
|
|
131932
|
+
subject: z54.string().optional(),
|
|
131933
|
+
description: z54.string().optional(),
|
|
131864
131934
|
status: TaskStatusSchema.optional(),
|
|
131865
|
-
activeForm:
|
|
131866
|
-
addBlocks:
|
|
131867
|
-
addBlockedBy:
|
|
131868
|
-
owner:
|
|
131869
|
-
metadata:
|
|
131870
|
-
repoURL:
|
|
131871
|
-
parentID:
|
|
131935
|
+
activeForm: z54.string().optional(),
|
|
131936
|
+
addBlocks: z54.array(z54.string()).optional(),
|
|
131937
|
+
addBlockedBy: z54.array(z54.string()).optional(),
|
|
131938
|
+
owner: z54.string().optional(),
|
|
131939
|
+
metadata: z54.record(z54.string(), z54.unknown()).optional(),
|
|
131940
|
+
repoURL: z54.string().optional(),
|
|
131941
|
+
parentID: z54.string().optional()
|
|
131872
131942
|
});
|
|
131873
|
-
var TaskDeleteInputSchema =
|
|
131874
|
-
id:
|
|
131943
|
+
var TaskDeleteInputSchema = z54.object({
|
|
131944
|
+
id: z54.string()
|
|
131875
131945
|
});
|
|
131876
131946
|
|
|
131877
131947
|
// packages/omo-opencode/src/features/claude-tasks/storage.ts
|
|
@@ -132772,7 +132842,7 @@ function createHashlineEditTool(ctx) {
|
|
|
132772
132842
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
132773
132843
|
import { randomUUID as randomUUID10 } from "crypto";
|
|
132774
132844
|
init_logger2();
|
|
132775
|
-
import { z as
|
|
132845
|
+
import { z as z55 } from "zod";
|
|
132776
132846
|
|
|
132777
132847
|
// packages/team-core/src/team-mailbox/send.ts
|
|
132778
132848
|
init_paths();
|
|
@@ -133353,18 +133423,18 @@ async function resolveTeamRuntimeDetails(teamRunId, sessionID, config, deps) {
|
|
|
133353
133423
|
|
|
133354
133424
|
// packages/omo-opencode/src/features/team-mode/tools/messaging.ts
|
|
133355
133425
|
var MESSAGE_TOOL_KINDS = ["message", "announcement"];
|
|
133356
|
-
var TeamReferenceArgsSchema =
|
|
133357
|
-
path:
|
|
133358
|
-
description:
|
|
133426
|
+
var TeamReferenceArgsSchema = z55.object({
|
|
133427
|
+
path: z55.string().min(1),
|
|
133428
|
+
description: z55.string().optional()
|
|
133359
133429
|
});
|
|
133360
|
-
var TeamSendMessageArgsSchema =
|
|
133361
|
-
teamRunId:
|
|
133362
|
-
to:
|
|
133363
|
-
body:
|
|
133364
|
-
kind:
|
|
133365
|
-
correlationId:
|
|
133366
|
-
summary:
|
|
133367
|
-
references:
|
|
133430
|
+
var TeamSendMessageArgsSchema = z55.object({
|
|
133431
|
+
teamRunId: z55.string().min(1),
|
|
133432
|
+
to: z55.string().min(1),
|
|
133433
|
+
body: z55.string(),
|
|
133434
|
+
kind: z55.enum(MESSAGE_TOOL_KINDS).optional(),
|
|
133435
|
+
correlationId: z55.preprocess((value) => value === "" ? undefined : value, z55.uuid().optional()),
|
|
133436
|
+
summary: z55.string().optional(),
|
|
133437
|
+
references: z55.array(TeamReferenceArgsSchema).optional()
|
|
133368
133438
|
});
|
|
133369
133439
|
function createTeamSendMessageTool(config, client, deps = defaultTeamSendMessageToolDeps) {
|
|
133370
133440
|
return tool({
|
|
@@ -142010,63 +142080,63 @@ function getLiteralValue(schema) {
|
|
|
142010
142080
|
}
|
|
142011
142081
|
|
|
142012
142082
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
142013
|
-
import * as
|
|
142083
|
+
import * as z56 from "zod/v4";
|
|
142014
142084
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
142015
142085
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
142016
142086
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
142017
142087
|
var JSONRPC_VERSION = "2.0";
|
|
142018
|
-
var AssertObjectSchema =
|
|
142019
|
-
var ProgressTokenSchema =
|
|
142020
|
-
var CursorSchema =
|
|
142021
|
-
var TaskCreationParamsSchema =
|
|
142022
|
-
ttl:
|
|
142023
|
-
pollInterval:
|
|
142088
|
+
var AssertObjectSchema = z56.custom((v) => v !== null && (typeof v === "object" || typeof v === "function"));
|
|
142089
|
+
var ProgressTokenSchema = z56.union([z56.string(), z56.number().int()]);
|
|
142090
|
+
var CursorSchema = z56.string();
|
|
142091
|
+
var TaskCreationParamsSchema = z56.looseObject({
|
|
142092
|
+
ttl: z56.number().optional(),
|
|
142093
|
+
pollInterval: z56.number().optional()
|
|
142024
142094
|
});
|
|
142025
|
-
var TaskMetadataSchema =
|
|
142026
|
-
ttl:
|
|
142095
|
+
var TaskMetadataSchema = z56.object({
|
|
142096
|
+
ttl: z56.number().optional()
|
|
142027
142097
|
});
|
|
142028
|
-
var RelatedTaskMetadataSchema =
|
|
142029
|
-
taskId:
|
|
142098
|
+
var RelatedTaskMetadataSchema = z56.object({
|
|
142099
|
+
taskId: z56.string()
|
|
142030
142100
|
});
|
|
142031
|
-
var RequestMetaSchema =
|
|
142101
|
+
var RequestMetaSchema = z56.looseObject({
|
|
142032
142102
|
progressToken: ProgressTokenSchema.optional(),
|
|
142033
142103
|
[RELATED_TASK_META_KEY]: RelatedTaskMetadataSchema.optional()
|
|
142034
142104
|
});
|
|
142035
|
-
var BaseRequestParamsSchema =
|
|
142105
|
+
var BaseRequestParamsSchema = z56.object({
|
|
142036
142106
|
_meta: RequestMetaSchema.optional()
|
|
142037
142107
|
});
|
|
142038
142108
|
var TaskAugmentedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142039
142109
|
task: TaskMetadataSchema.optional()
|
|
142040
142110
|
});
|
|
142041
142111
|
var isTaskAugmentedRequestParams = (value) => TaskAugmentedRequestParamsSchema.safeParse(value).success;
|
|
142042
|
-
var RequestSchema =
|
|
142043
|
-
method:
|
|
142112
|
+
var RequestSchema = z56.object({
|
|
142113
|
+
method: z56.string(),
|
|
142044
142114
|
params: BaseRequestParamsSchema.loose().optional()
|
|
142045
142115
|
});
|
|
142046
|
-
var NotificationsParamsSchema =
|
|
142116
|
+
var NotificationsParamsSchema = z56.object({
|
|
142047
142117
|
_meta: RequestMetaSchema.optional()
|
|
142048
142118
|
});
|
|
142049
|
-
var NotificationSchema =
|
|
142050
|
-
method:
|
|
142119
|
+
var NotificationSchema = z56.object({
|
|
142120
|
+
method: z56.string(),
|
|
142051
142121
|
params: NotificationsParamsSchema.loose().optional()
|
|
142052
142122
|
});
|
|
142053
|
-
var ResultSchema =
|
|
142123
|
+
var ResultSchema = z56.looseObject({
|
|
142054
142124
|
_meta: RequestMetaSchema.optional()
|
|
142055
142125
|
});
|
|
142056
|
-
var RequestIdSchema =
|
|
142057
|
-
var JSONRPCRequestSchema =
|
|
142058
|
-
jsonrpc:
|
|
142126
|
+
var RequestIdSchema = z56.union([z56.string(), z56.number().int()]);
|
|
142127
|
+
var JSONRPCRequestSchema = z56.object({
|
|
142128
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142059
142129
|
id: RequestIdSchema,
|
|
142060
142130
|
...RequestSchema.shape
|
|
142061
142131
|
}).strict();
|
|
142062
142132
|
var isJSONRPCRequest = (value) => JSONRPCRequestSchema.safeParse(value).success;
|
|
142063
|
-
var JSONRPCNotificationSchema =
|
|
142064
|
-
jsonrpc:
|
|
142133
|
+
var JSONRPCNotificationSchema = z56.object({
|
|
142134
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142065
142135
|
...NotificationSchema.shape
|
|
142066
142136
|
}).strict();
|
|
142067
142137
|
var isJSONRPCNotification = (value) => JSONRPCNotificationSchema.safeParse(value).success;
|
|
142068
|
-
var JSONRPCResultResponseSchema =
|
|
142069
|
-
jsonrpc:
|
|
142138
|
+
var JSONRPCResultResponseSchema = z56.object({
|
|
142139
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142070
142140
|
id: RequestIdSchema,
|
|
142071
142141
|
result: ResultSchema
|
|
142072
142142
|
}).strict();
|
|
@@ -142082,153 +142152,153 @@ var ErrorCode;
|
|
|
142082
142152
|
ErrorCode[ErrorCode["InternalError"] = -32603] = "InternalError";
|
|
142083
142153
|
ErrorCode[ErrorCode["UrlElicitationRequired"] = -32042] = "UrlElicitationRequired";
|
|
142084
142154
|
})(ErrorCode || (ErrorCode = {}));
|
|
142085
|
-
var JSONRPCErrorResponseSchema =
|
|
142086
|
-
jsonrpc:
|
|
142155
|
+
var JSONRPCErrorResponseSchema = z56.object({
|
|
142156
|
+
jsonrpc: z56.literal(JSONRPC_VERSION),
|
|
142087
142157
|
id: RequestIdSchema.optional(),
|
|
142088
|
-
error:
|
|
142089
|
-
code:
|
|
142090
|
-
message:
|
|
142091
|
-
data:
|
|
142158
|
+
error: z56.object({
|
|
142159
|
+
code: z56.number().int(),
|
|
142160
|
+
message: z56.string(),
|
|
142161
|
+
data: z56.unknown().optional()
|
|
142092
142162
|
})
|
|
142093
142163
|
}).strict();
|
|
142094
142164
|
var isJSONRPCErrorResponse = (value) => JSONRPCErrorResponseSchema.safeParse(value).success;
|
|
142095
|
-
var JSONRPCMessageSchema =
|
|
142165
|
+
var JSONRPCMessageSchema = z56.union([
|
|
142096
142166
|
JSONRPCRequestSchema,
|
|
142097
142167
|
JSONRPCNotificationSchema,
|
|
142098
142168
|
JSONRPCResultResponseSchema,
|
|
142099
142169
|
JSONRPCErrorResponseSchema
|
|
142100
142170
|
]);
|
|
142101
|
-
var JSONRPCResponseSchema =
|
|
142171
|
+
var JSONRPCResponseSchema = z56.union([JSONRPCResultResponseSchema, JSONRPCErrorResponseSchema]);
|
|
142102
142172
|
var EmptyResultSchema = ResultSchema.strict();
|
|
142103
142173
|
var CancelledNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142104
142174
|
requestId: RequestIdSchema.optional(),
|
|
142105
|
-
reason:
|
|
142175
|
+
reason: z56.string().optional()
|
|
142106
142176
|
});
|
|
142107
142177
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
142108
|
-
method:
|
|
142178
|
+
method: z56.literal("notifications/cancelled"),
|
|
142109
142179
|
params: CancelledNotificationParamsSchema
|
|
142110
142180
|
});
|
|
142111
|
-
var IconSchema =
|
|
142112
|
-
src:
|
|
142113
|
-
mimeType:
|
|
142114
|
-
sizes:
|
|
142115
|
-
theme:
|
|
142181
|
+
var IconSchema = z56.object({
|
|
142182
|
+
src: z56.string(),
|
|
142183
|
+
mimeType: z56.string().optional(),
|
|
142184
|
+
sizes: z56.array(z56.string()).optional(),
|
|
142185
|
+
theme: z56.enum(["light", "dark"]).optional()
|
|
142116
142186
|
});
|
|
142117
|
-
var IconsSchema =
|
|
142118
|
-
icons:
|
|
142187
|
+
var IconsSchema = z56.object({
|
|
142188
|
+
icons: z56.array(IconSchema).optional()
|
|
142119
142189
|
});
|
|
142120
|
-
var BaseMetadataSchema =
|
|
142121
|
-
name:
|
|
142122
|
-
title:
|
|
142190
|
+
var BaseMetadataSchema = z56.object({
|
|
142191
|
+
name: z56.string(),
|
|
142192
|
+
title: z56.string().optional()
|
|
142123
142193
|
});
|
|
142124
142194
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
142125
142195
|
...BaseMetadataSchema.shape,
|
|
142126
142196
|
...IconsSchema.shape,
|
|
142127
|
-
version:
|
|
142128
|
-
websiteUrl:
|
|
142129
|
-
description:
|
|
142197
|
+
version: z56.string(),
|
|
142198
|
+
websiteUrl: z56.string().optional(),
|
|
142199
|
+
description: z56.string().optional()
|
|
142130
142200
|
});
|
|
142131
|
-
var FormElicitationCapabilitySchema =
|
|
142132
|
-
applyDefaults:
|
|
142133
|
-
}),
|
|
142134
|
-
var ElicitationCapabilitySchema =
|
|
142201
|
+
var FormElicitationCapabilitySchema = z56.intersection(z56.object({
|
|
142202
|
+
applyDefaults: z56.boolean().optional()
|
|
142203
|
+
}), z56.record(z56.string(), z56.unknown()));
|
|
142204
|
+
var ElicitationCapabilitySchema = z56.preprocess((value) => {
|
|
142135
142205
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
142136
142206
|
if (Object.keys(value).length === 0) {
|
|
142137
142207
|
return { form: {} };
|
|
142138
142208
|
}
|
|
142139
142209
|
}
|
|
142140
142210
|
return value;
|
|
142141
|
-
},
|
|
142211
|
+
}, z56.intersection(z56.object({
|
|
142142
142212
|
form: FormElicitationCapabilitySchema.optional(),
|
|
142143
142213
|
url: AssertObjectSchema.optional()
|
|
142144
|
-
}),
|
|
142145
|
-
var ClientTasksCapabilitySchema =
|
|
142214
|
+
}), z56.record(z56.string(), z56.unknown()).optional()));
|
|
142215
|
+
var ClientTasksCapabilitySchema = z56.looseObject({
|
|
142146
142216
|
list: AssertObjectSchema.optional(),
|
|
142147
142217
|
cancel: AssertObjectSchema.optional(),
|
|
142148
|
-
requests:
|
|
142149
|
-
sampling:
|
|
142218
|
+
requests: z56.looseObject({
|
|
142219
|
+
sampling: z56.looseObject({
|
|
142150
142220
|
createMessage: AssertObjectSchema.optional()
|
|
142151
142221
|
}).optional(),
|
|
142152
|
-
elicitation:
|
|
142222
|
+
elicitation: z56.looseObject({
|
|
142153
142223
|
create: AssertObjectSchema.optional()
|
|
142154
142224
|
}).optional()
|
|
142155
142225
|
}).optional()
|
|
142156
142226
|
});
|
|
142157
|
-
var ServerTasksCapabilitySchema =
|
|
142227
|
+
var ServerTasksCapabilitySchema = z56.looseObject({
|
|
142158
142228
|
list: AssertObjectSchema.optional(),
|
|
142159
142229
|
cancel: AssertObjectSchema.optional(),
|
|
142160
|
-
requests:
|
|
142161
|
-
tools:
|
|
142230
|
+
requests: z56.looseObject({
|
|
142231
|
+
tools: z56.looseObject({
|
|
142162
142232
|
call: AssertObjectSchema.optional()
|
|
142163
142233
|
}).optional()
|
|
142164
142234
|
}).optional()
|
|
142165
142235
|
});
|
|
142166
|
-
var ClientCapabilitiesSchema =
|
|
142167
|
-
experimental:
|
|
142168
|
-
sampling:
|
|
142236
|
+
var ClientCapabilitiesSchema = z56.object({
|
|
142237
|
+
experimental: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142238
|
+
sampling: z56.object({
|
|
142169
142239
|
context: AssertObjectSchema.optional(),
|
|
142170
142240
|
tools: AssertObjectSchema.optional()
|
|
142171
142241
|
}).optional(),
|
|
142172
142242
|
elicitation: ElicitationCapabilitySchema.optional(),
|
|
142173
|
-
roots:
|
|
142174
|
-
listChanged:
|
|
142243
|
+
roots: z56.object({
|
|
142244
|
+
listChanged: z56.boolean().optional()
|
|
142175
142245
|
}).optional(),
|
|
142176
142246
|
tasks: ClientTasksCapabilitySchema.optional(),
|
|
142177
|
-
extensions:
|
|
142247
|
+
extensions: z56.record(z56.string(), AssertObjectSchema).optional()
|
|
142178
142248
|
});
|
|
142179
142249
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142180
|
-
protocolVersion:
|
|
142250
|
+
protocolVersion: z56.string(),
|
|
142181
142251
|
capabilities: ClientCapabilitiesSchema,
|
|
142182
142252
|
clientInfo: ImplementationSchema
|
|
142183
142253
|
});
|
|
142184
142254
|
var InitializeRequestSchema = RequestSchema.extend({
|
|
142185
|
-
method:
|
|
142255
|
+
method: z56.literal("initialize"),
|
|
142186
142256
|
params: InitializeRequestParamsSchema
|
|
142187
142257
|
});
|
|
142188
|
-
var ServerCapabilitiesSchema =
|
|
142189
|
-
experimental:
|
|
142258
|
+
var ServerCapabilitiesSchema = z56.object({
|
|
142259
|
+
experimental: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142190
142260
|
logging: AssertObjectSchema.optional(),
|
|
142191
142261
|
completions: AssertObjectSchema.optional(),
|
|
142192
|
-
prompts:
|
|
142193
|
-
listChanged:
|
|
142262
|
+
prompts: z56.object({
|
|
142263
|
+
listChanged: z56.boolean().optional()
|
|
142194
142264
|
}).optional(),
|
|
142195
|
-
resources:
|
|
142196
|
-
subscribe:
|
|
142197
|
-
listChanged:
|
|
142265
|
+
resources: z56.object({
|
|
142266
|
+
subscribe: z56.boolean().optional(),
|
|
142267
|
+
listChanged: z56.boolean().optional()
|
|
142198
142268
|
}).optional(),
|
|
142199
|
-
tools:
|
|
142200
|
-
listChanged:
|
|
142269
|
+
tools: z56.object({
|
|
142270
|
+
listChanged: z56.boolean().optional()
|
|
142201
142271
|
}).optional(),
|
|
142202
142272
|
tasks: ServerTasksCapabilitySchema.optional(),
|
|
142203
|
-
extensions:
|
|
142273
|
+
extensions: z56.record(z56.string(), AssertObjectSchema).optional()
|
|
142204
142274
|
});
|
|
142205
142275
|
var InitializeResultSchema = ResultSchema.extend({
|
|
142206
|
-
protocolVersion:
|
|
142276
|
+
protocolVersion: z56.string(),
|
|
142207
142277
|
capabilities: ServerCapabilitiesSchema,
|
|
142208
142278
|
serverInfo: ImplementationSchema,
|
|
142209
|
-
instructions:
|
|
142279
|
+
instructions: z56.string().optional()
|
|
142210
142280
|
});
|
|
142211
142281
|
var InitializedNotificationSchema = NotificationSchema.extend({
|
|
142212
|
-
method:
|
|
142282
|
+
method: z56.literal("notifications/initialized"),
|
|
142213
142283
|
params: NotificationsParamsSchema.optional()
|
|
142214
142284
|
});
|
|
142215
142285
|
var isInitializedNotification = (value) => InitializedNotificationSchema.safeParse(value).success;
|
|
142216
142286
|
var PingRequestSchema = RequestSchema.extend({
|
|
142217
|
-
method:
|
|
142287
|
+
method: z56.literal("ping"),
|
|
142218
142288
|
params: BaseRequestParamsSchema.optional()
|
|
142219
142289
|
});
|
|
142220
|
-
var ProgressSchema =
|
|
142221
|
-
progress:
|
|
142222
|
-
total:
|
|
142223
|
-
message:
|
|
142290
|
+
var ProgressSchema = z56.object({
|
|
142291
|
+
progress: z56.number(),
|
|
142292
|
+
total: z56.optional(z56.number()),
|
|
142293
|
+
message: z56.optional(z56.string())
|
|
142224
142294
|
});
|
|
142225
|
-
var ProgressNotificationParamsSchema =
|
|
142295
|
+
var ProgressNotificationParamsSchema = z56.object({
|
|
142226
142296
|
...NotificationsParamsSchema.shape,
|
|
142227
142297
|
...ProgressSchema.shape,
|
|
142228
142298
|
progressToken: ProgressTokenSchema
|
|
142229
142299
|
});
|
|
142230
142300
|
var ProgressNotificationSchema = NotificationSchema.extend({
|
|
142231
|
-
method:
|
|
142301
|
+
method: z56.literal("notifications/progress"),
|
|
142232
142302
|
params: ProgressNotificationParamsSchema
|
|
142233
142303
|
});
|
|
142234
142304
|
var PaginatedRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
@@ -142240,60 +142310,60 @@ var PaginatedRequestSchema = RequestSchema.extend({
|
|
|
142240
142310
|
var PaginatedResultSchema = ResultSchema.extend({
|
|
142241
142311
|
nextCursor: CursorSchema.optional()
|
|
142242
142312
|
});
|
|
142243
|
-
var TaskStatusSchema2 =
|
|
142244
|
-
var TaskSchema2 =
|
|
142245
|
-
taskId:
|
|
142313
|
+
var TaskStatusSchema2 = z56.enum(["working", "input_required", "completed", "failed", "cancelled"]);
|
|
142314
|
+
var TaskSchema2 = z56.object({
|
|
142315
|
+
taskId: z56.string(),
|
|
142246
142316
|
status: TaskStatusSchema2,
|
|
142247
|
-
ttl:
|
|
142248
|
-
createdAt:
|
|
142249
|
-
lastUpdatedAt:
|
|
142250
|
-
pollInterval:
|
|
142251
|
-
statusMessage:
|
|
142317
|
+
ttl: z56.union([z56.number(), z56.null()]),
|
|
142318
|
+
createdAt: z56.string(),
|
|
142319
|
+
lastUpdatedAt: z56.string(),
|
|
142320
|
+
pollInterval: z56.optional(z56.number()),
|
|
142321
|
+
statusMessage: z56.optional(z56.string())
|
|
142252
142322
|
});
|
|
142253
142323
|
var CreateTaskResultSchema = ResultSchema.extend({
|
|
142254
142324
|
task: TaskSchema2
|
|
142255
142325
|
});
|
|
142256
142326
|
var TaskStatusNotificationParamsSchema = NotificationsParamsSchema.merge(TaskSchema2);
|
|
142257
142327
|
var TaskStatusNotificationSchema = NotificationSchema.extend({
|
|
142258
|
-
method:
|
|
142328
|
+
method: z56.literal("notifications/tasks/status"),
|
|
142259
142329
|
params: TaskStatusNotificationParamsSchema
|
|
142260
142330
|
});
|
|
142261
142331
|
var GetTaskRequestSchema = RequestSchema.extend({
|
|
142262
|
-
method:
|
|
142332
|
+
method: z56.literal("tasks/get"),
|
|
142263
142333
|
params: BaseRequestParamsSchema.extend({
|
|
142264
|
-
taskId:
|
|
142334
|
+
taskId: z56.string()
|
|
142265
142335
|
})
|
|
142266
142336
|
});
|
|
142267
142337
|
var GetTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
142268
142338
|
var GetTaskPayloadRequestSchema = RequestSchema.extend({
|
|
142269
|
-
method:
|
|
142339
|
+
method: z56.literal("tasks/result"),
|
|
142270
142340
|
params: BaseRequestParamsSchema.extend({
|
|
142271
|
-
taskId:
|
|
142341
|
+
taskId: z56.string()
|
|
142272
142342
|
})
|
|
142273
142343
|
});
|
|
142274
142344
|
var GetTaskPayloadResultSchema = ResultSchema.loose();
|
|
142275
142345
|
var ListTasksRequestSchema = PaginatedRequestSchema.extend({
|
|
142276
|
-
method:
|
|
142346
|
+
method: z56.literal("tasks/list")
|
|
142277
142347
|
});
|
|
142278
142348
|
var ListTasksResultSchema = PaginatedResultSchema.extend({
|
|
142279
|
-
tasks:
|
|
142349
|
+
tasks: z56.array(TaskSchema2)
|
|
142280
142350
|
});
|
|
142281
142351
|
var CancelTaskRequestSchema = RequestSchema.extend({
|
|
142282
|
-
method:
|
|
142352
|
+
method: z56.literal("tasks/cancel"),
|
|
142283
142353
|
params: BaseRequestParamsSchema.extend({
|
|
142284
|
-
taskId:
|
|
142354
|
+
taskId: z56.string()
|
|
142285
142355
|
})
|
|
142286
142356
|
});
|
|
142287
142357
|
var CancelTaskResultSchema = ResultSchema.merge(TaskSchema2);
|
|
142288
|
-
var ResourceContentsSchema =
|
|
142289
|
-
uri:
|
|
142290
|
-
mimeType:
|
|
142291
|
-
_meta:
|
|
142358
|
+
var ResourceContentsSchema = z56.object({
|
|
142359
|
+
uri: z56.string(),
|
|
142360
|
+
mimeType: z56.optional(z56.string()),
|
|
142361
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142292
142362
|
});
|
|
142293
142363
|
var TextResourceContentsSchema = ResourceContentsSchema.extend({
|
|
142294
|
-
text:
|
|
142364
|
+
text: z56.string()
|
|
142295
142365
|
});
|
|
142296
|
-
var Base64Schema =
|
|
142366
|
+
var Base64Schema = z56.string().refine((val) => {
|
|
142297
142367
|
try {
|
|
142298
142368
|
atob(val);
|
|
142299
142369
|
return true;
|
|
@@ -142304,447 +142374,447 @@ var Base64Schema = z55.string().refine((val) => {
|
|
|
142304
142374
|
var BlobResourceContentsSchema = ResourceContentsSchema.extend({
|
|
142305
142375
|
blob: Base64Schema
|
|
142306
142376
|
});
|
|
142307
|
-
var RoleSchema =
|
|
142308
|
-
var AnnotationsSchema =
|
|
142309
|
-
audience:
|
|
142310
|
-
priority:
|
|
142311
|
-
lastModified:
|
|
142377
|
+
var RoleSchema = z56.enum(["user", "assistant"]);
|
|
142378
|
+
var AnnotationsSchema = z56.object({
|
|
142379
|
+
audience: z56.array(RoleSchema).optional(),
|
|
142380
|
+
priority: z56.number().min(0).max(1).optional(),
|
|
142381
|
+
lastModified: z56.iso.datetime({ offset: true }).optional()
|
|
142312
142382
|
});
|
|
142313
|
-
var ResourceSchema =
|
|
142383
|
+
var ResourceSchema = z56.object({
|
|
142314
142384
|
...BaseMetadataSchema.shape,
|
|
142315
142385
|
...IconsSchema.shape,
|
|
142316
|
-
uri:
|
|
142317
|
-
description:
|
|
142318
|
-
mimeType:
|
|
142319
|
-
size:
|
|
142386
|
+
uri: z56.string(),
|
|
142387
|
+
description: z56.optional(z56.string()),
|
|
142388
|
+
mimeType: z56.optional(z56.string()),
|
|
142389
|
+
size: z56.optional(z56.number()),
|
|
142320
142390
|
annotations: AnnotationsSchema.optional(),
|
|
142321
|
-
_meta:
|
|
142391
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142322
142392
|
});
|
|
142323
|
-
var ResourceTemplateSchema =
|
|
142393
|
+
var ResourceTemplateSchema = z56.object({
|
|
142324
142394
|
...BaseMetadataSchema.shape,
|
|
142325
142395
|
...IconsSchema.shape,
|
|
142326
|
-
uriTemplate:
|
|
142327
|
-
description:
|
|
142328
|
-
mimeType:
|
|
142396
|
+
uriTemplate: z56.string(),
|
|
142397
|
+
description: z56.optional(z56.string()),
|
|
142398
|
+
mimeType: z56.optional(z56.string()),
|
|
142329
142399
|
annotations: AnnotationsSchema.optional(),
|
|
142330
|
-
_meta:
|
|
142400
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142331
142401
|
});
|
|
142332
142402
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
142333
|
-
method:
|
|
142403
|
+
method: z56.literal("resources/list")
|
|
142334
142404
|
});
|
|
142335
142405
|
var ListResourcesResultSchema = PaginatedResultSchema.extend({
|
|
142336
|
-
resources:
|
|
142406
|
+
resources: z56.array(ResourceSchema)
|
|
142337
142407
|
});
|
|
142338
142408
|
var ListResourceTemplatesRequestSchema = PaginatedRequestSchema.extend({
|
|
142339
|
-
method:
|
|
142409
|
+
method: z56.literal("resources/templates/list")
|
|
142340
142410
|
});
|
|
142341
142411
|
var ListResourceTemplatesResultSchema = PaginatedResultSchema.extend({
|
|
142342
|
-
resourceTemplates:
|
|
142412
|
+
resourceTemplates: z56.array(ResourceTemplateSchema)
|
|
142343
142413
|
});
|
|
142344
142414
|
var ResourceRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142345
|
-
uri:
|
|
142415
|
+
uri: z56.string()
|
|
142346
142416
|
});
|
|
142347
142417
|
var ReadResourceRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142348
142418
|
var ReadResourceRequestSchema = RequestSchema.extend({
|
|
142349
|
-
method:
|
|
142419
|
+
method: z56.literal("resources/read"),
|
|
142350
142420
|
params: ReadResourceRequestParamsSchema
|
|
142351
142421
|
});
|
|
142352
142422
|
var ReadResourceResultSchema = ResultSchema.extend({
|
|
142353
|
-
contents:
|
|
142423
|
+
contents: z56.array(z56.union([TextResourceContentsSchema, BlobResourceContentsSchema]))
|
|
142354
142424
|
});
|
|
142355
142425
|
var ResourceListChangedNotificationSchema = NotificationSchema.extend({
|
|
142356
|
-
method:
|
|
142426
|
+
method: z56.literal("notifications/resources/list_changed"),
|
|
142357
142427
|
params: NotificationsParamsSchema.optional()
|
|
142358
142428
|
});
|
|
142359
142429
|
var SubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142360
142430
|
var SubscribeRequestSchema = RequestSchema.extend({
|
|
142361
|
-
method:
|
|
142431
|
+
method: z56.literal("resources/subscribe"),
|
|
142362
142432
|
params: SubscribeRequestParamsSchema
|
|
142363
142433
|
});
|
|
142364
142434
|
var UnsubscribeRequestParamsSchema = ResourceRequestParamsSchema;
|
|
142365
142435
|
var UnsubscribeRequestSchema = RequestSchema.extend({
|
|
142366
|
-
method:
|
|
142436
|
+
method: z56.literal("resources/unsubscribe"),
|
|
142367
142437
|
params: UnsubscribeRequestParamsSchema
|
|
142368
142438
|
});
|
|
142369
142439
|
var ResourceUpdatedNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142370
|
-
uri:
|
|
142440
|
+
uri: z56.string()
|
|
142371
142441
|
});
|
|
142372
142442
|
var ResourceUpdatedNotificationSchema = NotificationSchema.extend({
|
|
142373
|
-
method:
|
|
142443
|
+
method: z56.literal("notifications/resources/updated"),
|
|
142374
142444
|
params: ResourceUpdatedNotificationParamsSchema
|
|
142375
142445
|
});
|
|
142376
|
-
var PromptArgumentSchema =
|
|
142377
|
-
name:
|
|
142378
|
-
description:
|
|
142379
|
-
required:
|
|
142446
|
+
var PromptArgumentSchema = z56.object({
|
|
142447
|
+
name: z56.string(),
|
|
142448
|
+
description: z56.optional(z56.string()),
|
|
142449
|
+
required: z56.optional(z56.boolean())
|
|
142380
142450
|
});
|
|
142381
|
-
var PromptSchema =
|
|
142451
|
+
var PromptSchema = z56.object({
|
|
142382
142452
|
...BaseMetadataSchema.shape,
|
|
142383
142453
|
...IconsSchema.shape,
|
|
142384
|
-
description:
|
|
142385
|
-
arguments:
|
|
142386
|
-
_meta:
|
|
142454
|
+
description: z56.optional(z56.string()),
|
|
142455
|
+
arguments: z56.optional(z56.array(PromptArgumentSchema)),
|
|
142456
|
+
_meta: z56.optional(z56.looseObject({}))
|
|
142387
142457
|
});
|
|
142388
142458
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
142389
|
-
method:
|
|
142459
|
+
method: z56.literal("prompts/list")
|
|
142390
142460
|
});
|
|
142391
142461
|
var ListPromptsResultSchema = PaginatedResultSchema.extend({
|
|
142392
|
-
prompts:
|
|
142462
|
+
prompts: z56.array(PromptSchema)
|
|
142393
142463
|
});
|
|
142394
142464
|
var GetPromptRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142395
|
-
name:
|
|
142396
|
-
arguments:
|
|
142465
|
+
name: z56.string(),
|
|
142466
|
+
arguments: z56.record(z56.string(), z56.string()).optional()
|
|
142397
142467
|
});
|
|
142398
142468
|
var GetPromptRequestSchema = RequestSchema.extend({
|
|
142399
|
-
method:
|
|
142469
|
+
method: z56.literal("prompts/get"),
|
|
142400
142470
|
params: GetPromptRequestParamsSchema
|
|
142401
142471
|
});
|
|
142402
|
-
var TextContentSchema =
|
|
142403
|
-
type:
|
|
142404
|
-
text:
|
|
142472
|
+
var TextContentSchema = z56.object({
|
|
142473
|
+
type: z56.literal("text"),
|
|
142474
|
+
text: z56.string(),
|
|
142405
142475
|
annotations: AnnotationsSchema.optional(),
|
|
142406
|
-
_meta:
|
|
142476
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142407
142477
|
});
|
|
142408
|
-
var ImageContentSchema =
|
|
142409
|
-
type:
|
|
142478
|
+
var ImageContentSchema = z56.object({
|
|
142479
|
+
type: z56.literal("image"),
|
|
142410
142480
|
data: Base64Schema,
|
|
142411
|
-
mimeType:
|
|
142481
|
+
mimeType: z56.string(),
|
|
142412
142482
|
annotations: AnnotationsSchema.optional(),
|
|
142413
|
-
_meta:
|
|
142483
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142414
142484
|
});
|
|
142415
|
-
var AudioContentSchema =
|
|
142416
|
-
type:
|
|
142485
|
+
var AudioContentSchema = z56.object({
|
|
142486
|
+
type: z56.literal("audio"),
|
|
142417
142487
|
data: Base64Schema,
|
|
142418
|
-
mimeType:
|
|
142488
|
+
mimeType: z56.string(),
|
|
142419
142489
|
annotations: AnnotationsSchema.optional(),
|
|
142420
|
-
_meta:
|
|
142490
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142421
142491
|
});
|
|
142422
|
-
var ToolUseContentSchema =
|
|
142423
|
-
type:
|
|
142424
|
-
name:
|
|
142425
|
-
id:
|
|
142426
|
-
input:
|
|
142427
|
-
_meta:
|
|
142492
|
+
var ToolUseContentSchema = z56.object({
|
|
142493
|
+
type: z56.literal("tool_use"),
|
|
142494
|
+
name: z56.string(),
|
|
142495
|
+
id: z56.string(),
|
|
142496
|
+
input: z56.record(z56.string(), z56.unknown()),
|
|
142497
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142428
142498
|
});
|
|
142429
|
-
var EmbeddedResourceSchema =
|
|
142430
|
-
type:
|
|
142431
|
-
resource:
|
|
142499
|
+
var EmbeddedResourceSchema = z56.object({
|
|
142500
|
+
type: z56.literal("resource"),
|
|
142501
|
+
resource: z56.union([TextResourceContentsSchema, BlobResourceContentsSchema]),
|
|
142432
142502
|
annotations: AnnotationsSchema.optional(),
|
|
142433
|
-
_meta:
|
|
142503
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142434
142504
|
});
|
|
142435
142505
|
var ResourceLinkSchema = ResourceSchema.extend({
|
|
142436
|
-
type:
|
|
142506
|
+
type: z56.literal("resource_link")
|
|
142437
142507
|
});
|
|
142438
|
-
var ContentBlockSchema =
|
|
142508
|
+
var ContentBlockSchema = z56.union([
|
|
142439
142509
|
TextContentSchema,
|
|
142440
142510
|
ImageContentSchema,
|
|
142441
142511
|
AudioContentSchema,
|
|
142442
142512
|
ResourceLinkSchema,
|
|
142443
142513
|
EmbeddedResourceSchema
|
|
142444
142514
|
]);
|
|
142445
|
-
var PromptMessageSchema =
|
|
142515
|
+
var PromptMessageSchema = z56.object({
|
|
142446
142516
|
role: RoleSchema,
|
|
142447
142517
|
content: ContentBlockSchema
|
|
142448
142518
|
});
|
|
142449
142519
|
var GetPromptResultSchema = ResultSchema.extend({
|
|
142450
|
-
description:
|
|
142451
|
-
messages:
|
|
142520
|
+
description: z56.string().optional(),
|
|
142521
|
+
messages: z56.array(PromptMessageSchema)
|
|
142452
142522
|
});
|
|
142453
142523
|
var PromptListChangedNotificationSchema = NotificationSchema.extend({
|
|
142454
|
-
method:
|
|
142524
|
+
method: z56.literal("notifications/prompts/list_changed"),
|
|
142455
142525
|
params: NotificationsParamsSchema.optional()
|
|
142456
142526
|
});
|
|
142457
|
-
var ToolAnnotationsSchema =
|
|
142458
|
-
title:
|
|
142459
|
-
readOnlyHint:
|
|
142460
|
-
destructiveHint:
|
|
142461
|
-
idempotentHint:
|
|
142462
|
-
openWorldHint:
|
|
142527
|
+
var ToolAnnotationsSchema = z56.object({
|
|
142528
|
+
title: z56.string().optional(),
|
|
142529
|
+
readOnlyHint: z56.boolean().optional(),
|
|
142530
|
+
destructiveHint: z56.boolean().optional(),
|
|
142531
|
+
idempotentHint: z56.boolean().optional(),
|
|
142532
|
+
openWorldHint: z56.boolean().optional()
|
|
142463
142533
|
});
|
|
142464
|
-
var ToolExecutionSchema =
|
|
142465
|
-
taskSupport:
|
|
142534
|
+
var ToolExecutionSchema = z56.object({
|
|
142535
|
+
taskSupport: z56.enum(["required", "optional", "forbidden"]).optional()
|
|
142466
142536
|
});
|
|
142467
|
-
var ToolSchema =
|
|
142537
|
+
var ToolSchema = z56.object({
|
|
142468
142538
|
...BaseMetadataSchema.shape,
|
|
142469
142539
|
...IconsSchema.shape,
|
|
142470
|
-
description:
|
|
142471
|
-
inputSchema:
|
|
142472
|
-
type:
|
|
142473
|
-
properties:
|
|
142474
|
-
required:
|
|
142475
|
-
}).catchall(
|
|
142476
|
-
outputSchema:
|
|
142477
|
-
type:
|
|
142478
|
-
properties:
|
|
142479
|
-
required:
|
|
142480
|
-
}).catchall(
|
|
142540
|
+
description: z56.string().optional(),
|
|
142541
|
+
inputSchema: z56.object({
|
|
142542
|
+
type: z56.literal("object"),
|
|
142543
|
+
properties: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142544
|
+
required: z56.array(z56.string()).optional()
|
|
142545
|
+
}).catchall(z56.unknown()),
|
|
142546
|
+
outputSchema: z56.object({
|
|
142547
|
+
type: z56.literal("object"),
|
|
142548
|
+
properties: z56.record(z56.string(), AssertObjectSchema).optional(),
|
|
142549
|
+
required: z56.array(z56.string()).optional()
|
|
142550
|
+
}).catchall(z56.unknown()).optional(),
|
|
142481
142551
|
annotations: ToolAnnotationsSchema.optional(),
|
|
142482
142552
|
execution: ToolExecutionSchema.optional(),
|
|
142483
|
-
_meta:
|
|
142553
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142484
142554
|
});
|
|
142485
142555
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
142486
|
-
method:
|
|
142556
|
+
method: z56.literal("tools/list")
|
|
142487
142557
|
});
|
|
142488
142558
|
var ListToolsResultSchema = PaginatedResultSchema.extend({
|
|
142489
|
-
tools:
|
|
142559
|
+
tools: z56.array(ToolSchema)
|
|
142490
142560
|
});
|
|
142491
142561
|
var CallToolResultSchema = ResultSchema.extend({
|
|
142492
|
-
content:
|
|
142493
|
-
structuredContent:
|
|
142494
|
-
isError:
|
|
142562
|
+
content: z56.array(ContentBlockSchema).default([]),
|
|
142563
|
+
structuredContent: z56.record(z56.string(), z56.unknown()).optional(),
|
|
142564
|
+
isError: z56.boolean().optional()
|
|
142495
142565
|
});
|
|
142496
142566
|
var CompatibilityCallToolResultSchema = CallToolResultSchema.or(ResultSchema.extend({
|
|
142497
|
-
toolResult:
|
|
142567
|
+
toolResult: z56.unknown()
|
|
142498
142568
|
}));
|
|
142499
142569
|
var CallToolRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142500
|
-
name:
|
|
142501
|
-
arguments:
|
|
142570
|
+
name: z56.string(),
|
|
142571
|
+
arguments: z56.record(z56.string(), z56.unknown()).optional()
|
|
142502
142572
|
});
|
|
142503
142573
|
var CallToolRequestSchema = RequestSchema.extend({
|
|
142504
|
-
method:
|
|
142574
|
+
method: z56.literal("tools/call"),
|
|
142505
142575
|
params: CallToolRequestParamsSchema
|
|
142506
142576
|
});
|
|
142507
142577
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
142508
|
-
method:
|
|
142578
|
+
method: z56.literal("notifications/tools/list_changed"),
|
|
142509
142579
|
params: NotificationsParamsSchema.optional()
|
|
142510
142580
|
});
|
|
142511
|
-
var ListChangedOptionsBaseSchema =
|
|
142512
|
-
autoRefresh:
|
|
142513
|
-
debounceMs:
|
|
142581
|
+
var ListChangedOptionsBaseSchema = z56.object({
|
|
142582
|
+
autoRefresh: z56.boolean().default(true),
|
|
142583
|
+
debounceMs: z56.number().int().nonnegative().default(300)
|
|
142514
142584
|
});
|
|
142515
|
-
var LoggingLevelSchema =
|
|
142585
|
+
var LoggingLevelSchema = z56.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
142516
142586
|
var SetLevelRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142517
142587
|
level: LoggingLevelSchema
|
|
142518
142588
|
});
|
|
142519
142589
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
142520
|
-
method:
|
|
142590
|
+
method: z56.literal("logging/setLevel"),
|
|
142521
142591
|
params: SetLevelRequestParamsSchema
|
|
142522
142592
|
});
|
|
142523
142593
|
var LoggingMessageNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142524
142594
|
level: LoggingLevelSchema,
|
|
142525
|
-
logger:
|
|
142526
|
-
data:
|
|
142595
|
+
logger: z56.string().optional(),
|
|
142596
|
+
data: z56.unknown()
|
|
142527
142597
|
});
|
|
142528
142598
|
var LoggingMessageNotificationSchema = NotificationSchema.extend({
|
|
142529
|
-
method:
|
|
142599
|
+
method: z56.literal("notifications/message"),
|
|
142530
142600
|
params: LoggingMessageNotificationParamsSchema
|
|
142531
142601
|
});
|
|
142532
|
-
var ModelHintSchema =
|
|
142533
|
-
name:
|
|
142602
|
+
var ModelHintSchema = z56.object({
|
|
142603
|
+
name: z56.string().optional()
|
|
142534
142604
|
});
|
|
142535
|
-
var ModelPreferencesSchema =
|
|
142536
|
-
hints:
|
|
142537
|
-
costPriority:
|
|
142538
|
-
speedPriority:
|
|
142539
|
-
intelligencePriority:
|
|
142605
|
+
var ModelPreferencesSchema = z56.object({
|
|
142606
|
+
hints: z56.array(ModelHintSchema).optional(),
|
|
142607
|
+
costPriority: z56.number().min(0).max(1).optional(),
|
|
142608
|
+
speedPriority: z56.number().min(0).max(1).optional(),
|
|
142609
|
+
intelligencePriority: z56.number().min(0).max(1).optional()
|
|
142540
142610
|
});
|
|
142541
|
-
var ToolChoiceSchema =
|
|
142542
|
-
mode:
|
|
142611
|
+
var ToolChoiceSchema = z56.object({
|
|
142612
|
+
mode: z56.enum(["auto", "required", "none"]).optional()
|
|
142543
142613
|
});
|
|
142544
|
-
var ToolResultContentSchema =
|
|
142545
|
-
type:
|
|
142546
|
-
toolUseId:
|
|
142547
|
-
content:
|
|
142548
|
-
structuredContent:
|
|
142549
|
-
isError:
|
|
142550
|
-
_meta:
|
|
142614
|
+
var ToolResultContentSchema = z56.object({
|
|
142615
|
+
type: z56.literal("tool_result"),
|
|
142616
|
+
toolUseId: z56.string().describe("The unique identifier for the corresponding tool call."),
|
|
142617
|
+
content: z56.array(ContentBlockSchema).default([]),
|
|
142618
|
+
structuredContent: z56.object({}).loose().optional(),
|
|
142619
|
+
isError: z56.boolean().optional(),
|
|
142620
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142551
142621
|
});
|
|
142552
|
-
var SamplingContentSchema =
|
|
142553
|
-
var SamplingMessageContentBlockSchema =
|
|
142622
|
+
var SamplingContentSchema = z56.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema]);
|
|
142623
|
+
var SamplingMessageContentBlockSchema = z56.discriminatedUnion("type", [
|
|
142554
142624
|
TextContentSchema,
|
|
142555
142625
|
ImageContentSchema,
|
|
142556
142626
|
AudioContentSchema,
|
|
142557
142627
|
ToolUseContentSchema,
|
|
142558
142628
|
ToolResultContentSchema
|
|
142559
142629
|
]);
|
|
142560
|
-
var SamplingMessageSchema =
|
|
142630
|
+
var SamplingMessageSchema = z56.object({
|
|
142561
142631
|
role: RoleSchema,
|
|
142562
|
-
content:
|
|
142563
|
-
_meta:
|
|
142632
|
+
content: z56.union([SamplingMessageContentBlockSchema, z56.array(SamplingMessageContentBlockSchema)]),
|
|
142633
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142564
142634
|
});
|
|
142565
142635
|
var CreateMessageRequestParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142566
|
-
messages:
|
|
142636
|
+
messages: z56.array(SamplingMessageSchema),
|
|
142567
142637
|
modelPreferences: ModelPreferencesSchema.optional(),
|
|
142568
|
-
systemPrompt:
|
|
142569
|
-
includeContext:
|
|
142570
|
-
temperature:
|
|
142571
|
-
maxTokens:
|
|
142572
|
-
stopSequences:
|
|
142638
|
+
systemPrompt: z56.string().optional(),
|
|
142639
|
+
includeContext: z56.enum(["none", "thisServer", "allServers"]).optional(),
|
|
142640
|
+
temperature: z56.number().optional(),
|
|
142641
|
+
maxTokens: z56.number().int(),
|
|
142642
|
+
stopSequences: z56.array(z56.string()).optional(),
|
|
142573
142643
|
metadata: AssertObjectSchema.optional(),
|
|
142574
|
-
tools:
|
|
142644
|
+
tools: z56.array(ToolSchema).optional(),
|
|
142575
142645
|
toolChoice: ToolChoiceSchema.optional()
|
|
142576
142646
|
});
|
|
142577
142647
|
var CreateMessageRequestSchema = RequestSchema.extend({
|
|
142578
|
-
method:
|
|
142648
|
+
method: z56.literal("sampling/createMessage"),
|
|
142579
142649
|
params: CreateMessageRequestParamsSchema
|
|
142580
142650
|
});
|
|
142581
142651
|
var CreateMessageResultSchema = ResultSchema.extend({
|
|
142582
|
-
model:
|
|
142583
|
-
stopReason:
|
|
142652
|
+
model: z56.string(),
|
|
142653
|
+
stopReason: z56.optional(z56.enum(["endTurn", "stopSequence", "maxTokens"]).or(z56.string())),
|
|
142584
142654
|
role: RoleSchema,
|
|
142585
142655
|
content: SamplingContentSchema
|
|
142586
142656
|
});
|
|
142587
142657
|
var CreateMessageResultWithToolsSchema = ResultSchema.extend({
|
|
142588
|
-
model:
|
|
142589
|
-
stopReason:
|
|
142658
|
+
model: z56.string(),
|
|
142659
|
+
stopReason: z56.optional(z56.enum(["endTurn", "stopSequence", "maxTokens", "toolUse"]).or(z56.string())),
|
|
142590
142660
|
role: RoleSchema,
|
|
142591
|
-
content:
|
|
142661
|
+
content: z56.union([SamplingMessageContentBlockSchema, z56.array(SamplingMessageContentBlockSchema)])
|
|
142592
142662
|
});
|
|
142593
|
-
var BooleanSchemaSchema =
|
|
142594
|
-
type:
|
|
142595
|
-
title:
|
|
142596
|
-
description:
|
|
142597
|
-
default:
|
|
142663
|
+
var BooleanSchemaSchema = z56.object({
|
|
142664
|
+
type: z56.literal("boolean"),
|
|
142665
|
+
title: z56.string().optional(),
|
|
142666
|
+
description: z56.string().optional(),
|
|
142667
|
+
default: z56.boolean().optional()
|
|
142598
142668
|
});
|
|
142599
|
-
var StringSchemaSchema =
|
|
142600
|
-
type:
|
|
142601
|
-
title:
|
|
142602
|
-
description:
|
|
142603
|
-
minLength:
|
|
142604
|
-
maxLength:
|
|
142605
|
-
format:
|
|
142606
|
-
default:
|
|
142669
|
+
var StringSchemaSchema = z56.object({
|
|
142670
|
+
type: z56.literal("string"),
|
|
142671
|
+
title: z56.string().optional(),
|
|
142672
|
+
description: z56.string().optional(),
|
|
142673
|
+
minLength: z56.number().optional(),
|
|
142674
|
+
maxLength: z56.number().optional(),
|
|
142675
|
+
format: z56.enum(["email", "uri", "date", "date-time"]).optional(),
|
|
142676
|
+
default: z56.string().optional()
|
|
142607
142677
|
});
|
|
142608
|
-
var NumberSchemaSchema =
|
|
142609
|
-
type:
|
|
142610
|
-
title:
|
|
142611
|
-
description:
|
|
142612
|
-
minimum:
|
|
142613
|
-
maximum:
|
|
142614
|
-
default:
|
|
142678
|
+
var NumberSchemaSchema = z56.object({
|
|
142679
|
+
type: z56.enum(["number", "integer"]),
|
|
142680
|
+
title: z56.string().optional(),
|
|
142681
|
+
description: z56.string().optional(),
|
|
142682
|
+
minimum: z56.number().optional(),
|
|
142683
|
+
maximum: z56.number().optional(),
|
|
142684
|
+
default: z56.number().optional()
|
|
142615
142685
|
});
|
|
142616
|
-
var UntitledSingleSelectEnumSchemaSchema =
|
|
142617
|
-
type:
|
|
142618
|
-
title:
|
|
142619
|
-
description:
|
|
142620
|
-
enum:
|
|
142621
|
-
default:
|
|
142686
|
+
var UntitledSingleSelectEnumSchemaSchema = z56.object({
|
|
142687
|
+
type: z56.literal("string"),
|
|
142688
|
+
title: z56.string().optional(),
|
|
142689
|
+
description: z56.string().optional(),
|
|
142690
|
+
enum: z56.array(z56.string()),
|
|
142691
|
+
default: z56.string().optional()
|
|
142622
142692
|
});
|
|
142623
|
-
var TitledSingleSelectEnumSchemaSchema =
|
|
142624
|
-
type:
|
|
142625
|
-
title:
|
|
142626
|
-
description:
|
|
142627
|
-
oneOf:
|
|
142628
|
-
const:
|
|
142629
|
-
title:
|
|
142693
|
+
var TitledSingleSelectEnumSchemaSchema = z56.object({
|
|
142694
|
+
type: z56.literal("string"),
|
|
142695
|
+
title: z56.string().optional(),
|
|
142696
|
+
description: z56.string().optional(),
|
|
142697
|
+
oneOf: z56.array(z56.object({
|
|
142698
|
+
const: z56.string(),
|
|
142699
|
+
title: z56.string()
|
|
142630
142700
|
})),
|
|
142631
|
-
default:
|
|
142701
|
+
default: z56.string().optional()
|
|
142632
142702
|
});
|
|
142633
|
-
var LegacyTitledEnumSchemaSchema =
|
|
142634
|
-
type:
|
|
142635
|
-
title:
|
|
142636
|
-
description:
|
|
142637
|
-
enum:
|
|
142638
|
-
enumNames:
|
|
142639
|
-
default:
|
|
142703
|
+
var LegacyTitledEnumSchemaSchema = z56.object({
|
|
142704
|
+
type: z56.literal("string"),
|
|
142705
|
+
title: z56.string().optional(),
|
|
142706
|
+
description: z56.string().optional(),
|
|
142707
|
+
enum: z56.array(z56.string()),
|
|
142708
|
+
enumNames: z56.array(z56.string()).optional(),
|
|
142709
|
+
default: z56.string().optional()
|
|
142640
142710
|
});
|
|
142641
|
-
var SingleSelectEnumSchemaSchema =
|
|
142642
|
-
var UntitledMultiSelectEnumSchemaSchema =
|
|
142643
|
-
type:
|
|
142644
|
-
title:
|
|
142645
|
-
description:
|
|
142646
|
-
minItems:
|
|
142647
|
-
maxItems:
|
|
142648
|
-
items:
|
|
142649
|
-
type:
|
|
142650
|
-
enum:
|
|
142711
|
+
var SingleSelectEnumSchemaSchema = z56.union([UntitledSingleSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema]);
|
|
142712
|
+
var UntitledMultiSelectEnumSchemaSchema = z56.object({
|
|
142713
|
+
type: z56.literal("array"),
|
|
142714
|
+
title: z56.string().optional(),
|
|
142715
|
+
description: z56.string().optional(),
|
|
142716
|
+
minItems: z56.number().optional(),
|
|
142717
|
+
maxItems: z56.number().optional(),
|
|
142718
|
+
items: z56.object({
|
|
142719
|
+
type: z56.literal("string"),
|
|
142720
|
+
enum: z56.array(z56.string())
|
|
142651
142721
|
}),
|
|
142652
|
-
default:
|
|
142722
|
+
default: z56.array(z56.string()).optional()
|
|
142653
142723
|
});
|
|
142654
|
-
var TitledMultiSelectEnumSchemaSchema =
|
|
142655
|
-
type:
|
|
142656
|
-
title:
|
|
142657
|
-
description:
|
|
142658
|
-
minItems:
|
|
142659
|
-
maxItems:
|
|
142660
|
-
items:
|
|
142661
|
-
anyOf:
|
|
142662
|
-
const:
|
|
142663
|
-
title:
|
|
142724
|
+
var TitledMultiSelectEnumSchemaSchema = z56.object({
|
|
142725
|
+
type: z56.literal("array"),
|
|
142726
|
+
title: z56.string().optional(),
|
|
142727
|
+
description: z56.string().optional(),
|
|
142728
|
+
minItems: z56.number().optional(),
|
|
142729
|
+
maxItems: z56.number().optional(),
|
|
142730
|
+
items: z56.object({
|
|
142731
|
+
anyOf: z56.array(z56.object({
|
|
142732
|
+
const: z56.string(),
|
|
142733
|
+
title: z56.string()
|
|
142664
142734
|
}))
|
|
142665
142735
|
}),
|
|
142666
|
-
default:
|
|
142736
|
+
default: z56.array(z56.string()).optional()
|
|
142667
142737
|
});
|
|
142668
|
-
var MultiSelectEnumSchemaSchema =
|
|
142669
|
-
var EnumSchemaSchema =
|
|
142670
|
-
var PrimitiveSchemaDefinitionSchema =
|
|
142738
|
+
var MultiSelectEnumSchemaSchema = z56.union([UntitledMultiSelectEnumSchemaSchema, TitledMultiSelectEnumSchemaSchema]);
|
|
142739
|
+
var EnumSchemaSchema = z56.union([LegacyTitledEnumSchemaSchema, SingleSelectEnumSchemaSchema, MultiSelectEnumSchemaSchema]);
|
|
142740
|
+
var PrimitiveSchemaDefinitionSchema = z56.union([EnumSchemaSchema, BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema]);
|
|
142671
142741
|
var ElicitRequestFormParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142672
|
-
mode:
|
|
142673
|
-
message:
|
|
142674
|
-
requestedSchema:
|
|
142675
|
-
type:
|
|
142676
|
-
properties:
|
|
142677
|
-
required:
|
|
142742
|
+
mode: z56.literal("form").optional(),
|
|
142743
|
+
message: z56.string(),
|
|
142744
|
+
requestedSchema: z56.object({
|
|
142745
|
+
type: z56.literal("object"),
|
|
142746
|
+
properties: z56.record(z56.string(), PrimitiveSchemaDefinitionSchema),
|
|
142747
|
+
required: z56.array(z56.string()).optional()
|
|
142678
142748
|
})
|
|
142679
142749
|
});
|
|
142680
142750
|
var ElicitRequestURLParamsSchema = TaskAugmentedRequestParamsSchema.extend({
|
|
142681
|
-
mode:
|
|
142682
|
-
message:
|
|
142683
|
-
elicitationId:
|
|
142684
|
-
url:
|
|
142751
|
+
mode: z56.literal("url"),
|
|
142752
|
+
message: z56.string(),
|
|
142753
|
+
elicitationId: z56.string(),
|
|
142754
|
+
url: z56.string().url()
|
|
142685
142755
|
});
|
|
142686
|
-
var ElicitRequestParamsSchema =
|
|
142756
|
+
var ElicitRequestParamsSchema = z56.union([ElicitRequestFormParamsSchema, ElicitRequestURLParamsSchema]);
|
|
142687
142757
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
142688
|
-
method:
|
|
142758
|
+
method: z56.literal("elicitation/create"),
|
|
142689
142759
|
params: ElicitRequestParamsSchema
|
|
142690
142760
|
});
|
|
142691
142761
|
var ElicitationCompleteNotificationParamsSchema = NotificationsParamsSchema.extend({
|
|
142692
|
-
elicitationId:
|
|
142762
|
+
elicitationId: z56.string()
|
|
142693
142763
|
});
|
|
142694
142764
|
var ElicitationCompleteNotificationSchema = NotificationSchema.extend({
|
|
142695
|
-
method:
|
|
142765
|
+
method: z56.literal("notifications/elicitation/complete"),
|
|
142696
142766
|
params: ElicitationCompleteNotificationParamsSchema
|
|
142697
142767
|
});
|
|
142698
142768
|
var ElicitResultSchema = ResultSchema.extend({
|
|
142699
|
-
action:
|
|
142700
|
-
content:
|
|
142769
|
+
action: z56.enum(["accept", "decline", "cancel"]),
|
|
142770
|
+
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
142771
|
});
|
|
142702
|
-
var ResourceTemplateReferenceSchema =
|
|
142703
|
-
type:
|
|
142704
|
-
uri:
|
|
142772
|
+
var ResourceTemplateReferenceSchema = z56.object({
|
|
142773
|
+
type: z56.literal("ref/resource"),
|
|
142774
|
+
uri: z56.string()
|
|
142705
142775
|
});
|
|
142706
|
-
var PromptReferenceSchema =
|
|
142707
|
-
type:
|
|
142708
|
-
name:
|
|
142776
|
+
var PromptReferenceSchema = z56.object({
|
|
142777
|
+
type: z56.literal("ref/prompt"),
|
|
142778
|
+
name: z56.string()
|
|
142709
142779
|
});
|
|
142710
142780
|
var CompleteRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
142711
|
-
ref:
|
|
142712
|
-
argument:
|
|
142713
|
-
name:
|
|
142714
|
-
value:
|
|
142781
|
+
ref: z56.union([PromptReferenceSchema, ResourceTemplateReferenceSchema]),
|
|
142782
|
+
argument: z56.object({
|
|
142783
|
+
name: z56.string(),
|
|
142784
|
+
value: z56.string()
|
|
142715
142785
|
}),
|
|
142716
|
-
context:
|
|
142717
|
-
arguments:
|
|
142786
|
+
context: z56.object({
|
|
142787
|
+
arguments: z56.record(z56.string(), z56.string()).optional()
|
|
142718
142788
|
}).optional()
|
|
142719
142789
|
});
|
|
142720
142790
|
var CompleteRequestSchema = RequestSchema.extend({
|
|
142721
|
-
method:
|
|
142791
|
+
method: z56.literal("completion/complete"),
|
|
142722
142792
|
params: CompleteRequestParamsSchema
|
|
142723
142793
|
});
|
|
142724
142794
|
var CompleteResultSchema = ResultSchema.extend({
|
|
142725
|
-
completion:
|
|
142726
|
-
values:
|
|
142727
|
-
total:
|
|
142728
|
-
hasMore:
|
|
142795
|
+
completion: z56.looseObject({
|
|
142796
|
+
values: z56.array(z56.string()).max(100),
|
|
142797
|
+
total: z56.optional(z56.number().int()),
|
|
142798
|
+
hasMore: z56.optional(z56.boolean())
|
|
142729
142799
|
})
|
|
142730
142800
|
});
|
|
142731
|
-
var RootSchema =
|
|
142732
|
-
uri:
|
|
142733
|
-
name:
|
|
142734
|
-
_meta:
|
|
142801
|
+
var RootSchema = z56.object({
|
|
142802
|
+
uri: z56.string().startsWith("file://"),
|
|
142803
|
+
name: z56.string().optional(),
|
|
142804
|
+
_meta: z56.record(z56.string(), z56.unknown()).optional()
|
|
142735
142805
|
});
|
|
142736
142806
|
var ListRootsRequestSchema = RequestSchema.extend({
|
|
142737
|
-
method:
|
|
142807
|
+
method: z56.literal("roots/list"),
|
|
142738
142808
|
params: BaseRequestParamsSchema.optional()
|
|
142739
142809
|
});
|
|
142740
142810
|
var ListRootsResultSchema = ResultSchema.extend({
|
|
142741
|
-
roots:
|
|
142811
|
+
roots: z56.array(RootSchema)
|
|
142742
142812
|
});
|
|
142743
142813
|
var RootsListChangedNotificationSchema = NotificationSchema.extend({
|
|
142744
|
-
method:
|
|
142814
|
+
method: z56.literal("notifications/roots/list_changed"),
|
|
142745
142815
|
params: NotificationsParamsSchema.optional()
|
|
142746
142816
|
});
|
|
142747
|
-
var ClientRequestSchema =
|
|
142817
|
+
var ClientRequestSchema = z56.union([
|
|
142748
142818
|
PingRequestSchema,
|
|
142749
142819
|
InitializeRequestSchema,
|
|
142750
142820
|
CompleteRequestSchema,
|
|
@@ -142763,14 +142833,14 @@ var ClientRequestSchema = z55.union([
|
|
|
142763
142833
|
ListTasksRequestSchema,
|
|
142764
142834
|
CancelTaskRequestSchema
|
|
142765
142835
|
]);
|
|
142766
|
-
var ClientNotificationSchema =
|
|
142836
|
+
var ClientNotificationSchema = z56.union([
|
|
142767
142837
|
CancelledNotificationSchema,
|
|
142768
142838
|
ProgressNotificationSchema,
|
|
142769
142839
|
InitializedNotificationSchema,
|
|
142770
142840
|
RootsListChangedNotificationSchema,
|
|
142771
142841
|
TaskStatusNotificationSchema
|
|
142772
142842
|
]);
|
|
142773
|
-
var ClientResultSchema =
|
|
142843
|
+
var ClientResultSchema = z56.union([
|
|
142774
142844
|
EmptyResultSchema,
|
|
142775
142845
|
CreateMessageResultSchema,
|
|
142776
142846
|
CreateMessageResultWithToolsSchema,
|
|
@@ -142780,7 +142850,7 @@ var ClientResultSchema = z55.union([
|
|
|
142780
142850
|
ListTasksResultSchema,
|
|
142781
142851
|
CreateTaskResultSchema
|
|
142782
142852
|
]);
|
|
142783
|
-
var ServerRequestSchema =
|
|
142853
|
+
var ServerRequestSchema = z56.union([
|
|
142784
142854
|
PingRequestSchema,
|
|
142785
142855
|
CreateMessageRequestSchema,
|
|
142786
142856
|
ElicitRequestSchema,
|
|
@@ -142790,7 +142860,7 @@ var ServerRequestSchema = z55.union([
|
|
|
142790
142860
|
ListTasksRequestSchema,
|
|
142791
142861
|
CancelTaskRequestSchema
|
|
142792
142862
|
]);
|
|
142793
|
-
var ServerNotificationSchema =
|
|
142863
|
+
var ServerNotificationSchema = z56.union([
|
|
142794
142864
|
CancelledNotificationSchema,
|
|
142795
142865
|
ProgressNotificationSchema,
|
|
142796
142866
|
LoggingMessageNotificationSchema,
|
|
@@ -142801,7 +142871,7 @@ var ServerNotificationSchema = z55.union([
|
|
|
142801
142871
|
TaskStatusNotificationSchema,
|
|
142802
142872
|
ElicitationCompleteNotificationSchema
|
|
142803
142873
|
]);
|
|
142804
|
-
var ServerResultSchema =
|
|
142874
|
+
var ServerResultSchema = z56.union([
|
|
142805
142875
|
EmptyResultSchema,
|
|
142806
142876
|
InitializeResultSchema,
|
|
142807
142877
|
CompleteResultSchema,
|
|
@@ -144479,149 +144549,149 @@ async function pkceChallenge(length) {
|
|
|
144479
144549
|
}
|
|
144480
144550
|
|
|
144481
144551
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth.js
|
|
144482
|
-
import * as
|
|
144483
|
-
var SafeUrlSchema =
|
|
144552
|
+
import * as z57 from "zod/v4";
|
|
144553
|
+
var SafeUrlSchema = z57.url().superRefine((val, ctx) => {
|
|
144484
144554
|
if (!URL.canParse(val)) {
|
|
144485
144555
|
ctx.addIssue({
|
|
144486
|
-
code:
|
|
144556
|
+
code: z57.ZodIssueCode.custom,
|
|
144487
144557
|
message: "URL must be parseable",
|
|
144488
144558
|
fatal: true
|
|
144489
144559
|
});
|
|
144490
|
-
return
|
|
144560
|
+
return z57.NEVER;
|
|
144491
144561
|
}
|
|
144492
144562
|
}).refine((url) => {
|
|
144493
144563
|
const u = new URL(url);
|
|
144494
144564
|
return u.protocol !== "javascript:" && u.protocol !== "data:" && u.protocol !== "vbscript:";
|
|
144495
144565
|
}, { 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:
|
|
144566
|
+
var OAuthProtectedResourceMetadataSchema = z57.looseObject({
|
|
144567
|
+
resource: z57.string().url(),
|
|
144568
|
+
authorization_servers: z57.array(SafeUrlSchema).optional(),
|
|
144569
|
+
jwks_uri: z57.string().url().optional(),
|
|
144570
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144571
|
+
bearer_methods_supported: z57.array(z57.string()).optional(),
|
|
144572
|
+
resource_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144573
|
+
resource_name: z57.string().optional(),
|
|
144574
|
+
resource_documentation: z57.string().optional(),
|
|
144575
|
+
resource_policy_uri: z57.string().url().optional(),
|
|
144576
|
+
resource_tos_uri: z57.string().url().optional(),
|
|
144577
|
+
tls_client_certificate_bound_access_tokens: z57.boolean().optional(),
|
|
144578
|
+
authorization_details_types_supported: z57.array(z57.string()).optional(),
|
|
144579
|
+
dpop_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144580
|
+
dpop_bound_access_tokens_required: z57.boolean().optional()
|
|
144511
144581
|
});
|
|
144512
|
-
var OAuthMetadataSchema =
|
|
144513
|
-
issuer:
|
|
144582
|
+
var OAuthMetadataSchema = z57.looseObject({
|
|
144583
|
+
issuer: z57.string(),
|
|
144514
144584
|
authorization_endpoint: SafeUrlSchema,
|
|
144515
144585
|
token_endpoint: SafeUrlSchema,
|
|
144516
144586
|
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:
|
|
144587
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144588
|
+
response_types_supported: z57.array(z57.string()),
|
|
144589
|
+
response_modes_supported: z57.array(z57.string()).optional(),
|
|
144590
|
+
grant_types_supported: z57.array(z57.string()).optional(),
|
|
144591
|
+
token_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144592
|
+
token_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144523
144593
|
service_documentation: SafeUrlSchema.optional(),
|
|
144524
144594
|
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:
|
|
144595
|
+
revocation_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144596
|
+
revocation_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144597
|
+
introspection_endpoint: z57.string().optional(),
|
|
144598
|
+
introspection_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144599
|
+
introspection_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144600
|
+
code_challenge_methods_supported: z57.array(z57.string()).optional(),
|
|
144601
|
+
client_id_metadata_document_supported: z57.boolean().optional()
|
|
144532
144602
|
});
|
|
144533
|
-
var OpenIdProviderMetadataSchema =
|
|
144534
|
-
issuer:
|
|
144603
|
+
var OpenIdProviderMetadataSchema = z57.looseObject({
|
|
144604
|
+
issuer: z57.string(),
|
|
144535
144605
|
authorization_endpoint: SafeUrlSchema,
|
|
144536
144606
|
token_endpoint: SafeUrlSchema,
|
|
144537
144607
|
userinfo_endpoint: SafeUrlSchema.optional(),
|
|
144538
144608
|
jwks_uri: SafeUrlSchema,
|
|
144539
144609
|
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:
|
|
144610
|
+
scopes_supported: z57.array(z57.string()).optional(),
|
|
144611
|
+
response_types_supported: z57.array(z57.string()),
|
|
144612
|
+
response_modes_supported: z57.array(z57.string()).optional(),
|
|
144613
|
+
grant_types_supported: z57.array(z57.string()).optional(),
|
|
144614
|
+
acr_values_supported: z57.array(z57.string()).optional(),
|
|
144615
|
+
subject_types_supported: z57.array(z57.string()),
|
|
144616
|
+
id_token_signing_alg_values_supported: z57.array(z57.string()),
|
|
144617
|
+
id_token_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144618
|
+
id_token_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144619
|
+
userinfo_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144620
|
+
userinfo_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144621
|
+
userinfo_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144622
|
+
request_object_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144623
|
+
request_object_encryption_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144624
|
+
request_object_encryption_enc_values_supported: z57.array(z57.string()).optional(),
|
|
144625
|
+
token_endpoint_auth_methods_supported: z57.array(z57.string()).optional(),
|
|
144626
|
+
token_endpoint_auth_signing_alg_values_supported: z57.array(z57.string()).optional(),
|
|
144627
|
+
display_values_supported: z57.array(z57.string()).optional(),
|
|
144628
|
+
claim_types_supported: z57.array(z57.string()).optional(),
|
|
144629
|
+
claims_supported: z57.array(z57.string()).optional(),
|
|
144630
|
+
service_documentation: z57.string().optional(),
|
|
144631
|
+
claims_locales_supported: z57.array(z57.string()).optional(),
|
|
144632
|
+
ui_locales_supported: z57.array(z57.string()).optional(),
|
|
144633
|
+
claims_parameter_supported: z57.boolean().optional(),
|
|
144634
|
+
request_parameter_supported: z57.boolean().optional(),
|
|
144635
|
+
request_uri_parameter_supported: z57.boolean().optional(),
|
|
144636
|
+
require_request_uri_registration: z57.boolean().optional(),
|
|
144567
144637
|
op_policy_uri: SafeUrlSchema.optional(),
|
|
144568
144638
|
op_tos_uri: SafeUrlSchema.optional(),
|
|
144569
|
-
client_id_metadata_document_supported:
|
|
144639
|
+
client_id_metadata_document_supported: z57.boolean().optional()
|
|
144570
144640
|
});
|
|
144571
|
-
var OpenIdProviderDiscoveryMetadataSchema =
|
|
144641
|
+
var OpenIdProviderDiscoveryMetadataSchema = z57.object({
|
|
144572
144642
|
...OpenIdProviderMetadataSchema.shape,
|
|
144573
144643
|
...OAuthMetadataSchema.pick({
|
|
144574
144644
|
code_challenge_methods_supported: true
|
|
144575
144645
|
}).shape
|
|
144576
144646
|
});
|
|
144577
|
-
var OAuthTokensSchema =
|
|
144578
|
-
access_token:
|
|
144579
|
-
id_token:
|
|
144580
|
-
token_type:
|
|
144581
|
-
expires_in:
|
|
144582
|
-
scope:
|
|
144583
|
-
refresh_token:
|
|
144647
|
+
var OAuthTokensSchema = z57.object({
|
|
144648
|
+
access_token: z57.string(),
|
|
144649
|
+
id_token: z57.string().optional(),
|
|
144650
|
+
token_type: z57.string(),
|
|
144651
|
+
expires_in: z57.coerce.number().optional(),
|
|
144652
|
+
scope: z57.string().optional(),
|
|
144653
|
+
refresh_token: z57.string().optional()
|
|
144584
144654
|
}).strip();
|
|
144585
|
-
var OAuthErrorResponseSchema =
|
|
144586
|
-
error:
|
|
144587
|
-
error_description:
|
|
144588
|
-
error_uri:
|
|
144655
|
+
var OAuthErrorResponseSchema = z57.object({
|
|
144656
|
+
error: z57.string(),
|
|
144657
|
+
error_description: z57.string().optional(),
|
|
144658
|
+
error_uri: z57.string().optional()
|
|
144589
144659
|
});
|
|
144590
|
-
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(
|
|
144660
|
+
var OptionalSafeUrlSchema = SafeUrlSchema.optional().or(z57.literal("").transform(() => {
|
|
144591
144661
|
return;
|
|
144592
144662
|
}));
|
|
144593
|
-
var OAuthClientMetadataSchema =
|
|
144594
|
-
redirect_uris:
|
|
144595
|
-
token_endpoint_auth_method:
|
|
144596
|
-
grant_types:
|
|
144597
|
-
response_types:
|
|
144598
|
-
client_name:
|
|
144663
|
+
var OAuthClientMetadataSchema = z57.object({
|
|
144664
|
+
redirect_uris: z57.array(SafeUrlSchema),
|
|
144665
|
+
token_endpoint_auth_method: z57.string().optional(),
|
|
144666
|
+
grant_types: z57.array(z57.string()).optional(),
|
|
144667
|
+
response_types: z57.array(z57.string()).optional(),
|
|
144668
|
+
client_name: z57.string().optional(),
|
|
144599
144669
|
client_uri: SafeUrlSchema.optional(),
|
|
144600
144670
|
logo_uri: OptionalSafeUrlSchema,
|
|
144601
|
-
scope:
|
|
144602
|
-
contacts:
|
|
144671
|
+
scope: z57.string().optional(),
|
|
144672
|
+
contacts: z57.array(z57.string()).optional(),
|
|
144603
144673
|
tos_uri: OptionalSafeUrlSchema,
|
|
144604
|
-
policy_uri:
|
|
144674
|
+
policy_uri: z57.string().optional(),
|
|
144605
144675
|
jwks_uri: SafeUrlSchema.optional(),
|
|
144606
|
-
jwks:
|
|
144607
|
-
software_id:
|
|
144608
|
-
software_version:
|
|
144609
|
-
software_statement:
|
|
144676
|
+
jwks: z57.any().optional(),
|
|
144677
|
+
software_id: z57.string().optional(),
|
|
144678
|
+
software_version: z57.string().optional(),
|
|
144679
|
+
software_statement: z57.string().optional()
|
|
144610
144680
|
}).strip();
|
|
144611
|
-
var OAuthClientInformationSchema =
|
|
144612
|
-
client_id:
|
|
144613
|
-
client_secret:
|
|
144614
|
-
client_id_issued_at:
|
|
144615
|
-
client_secret_expires_at:
|
|
144681
|
+
var OAuthClientInformationSchema = z57.object({
|
|
144682
|
+
client_id: z57.string(),
|
|
144683
|
+
client_secret: z57.string().optional(),
|
|
144684
|
+
client_id_issued_at: z57.number().optional(),
|
|
144685
|
+
client_secret_expires_at: z57.number().optional()
|
|
144616
144686
|
}).strip();
|
|
144617
144687
|
var OAuthClientInformationFullSchema = OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);
|
|
144618
|
-
var OAuthClientRegistrationErrorSchema =
|
|
144619
|
-
error:
|
|
144620
|
-
error_description:
|
|
144688
|
+
var OAuthClientRegistrationErrorSchema = z57.object({
|
|
144689
|
+
error: z57.string(),
|
|
144690
|
+
error_description: z57.string().optional()
|
|
144621
144691
|
}).strip();
|
|
144622
|
-
var OAuthTokenRevocationRequestSchema =
|
|
144623
|
-
token:
|
|
144624
|
-
token_type_hint:
|
|
144692
|
+
var OAuthTokenRevocationRequestSchema = z57.object({
|
|
144693
|
+
token: z57.string(),
|
|
144694
|
+
token_type_hint: z57.string().optional()
|
|
144625
144695
|
}).strip();
|
|
144626
144696
|
|
|
144627
144697
|
// node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/auth-utils.js
|
|
@@ -146833,7 +146903,7 @@ function mirrorFilePath(projectDir) {
|
|
|
146833
146903
|
}
|
|
146834
146904
|
|
|
146835
146905
|
// packages/omo-opencode/src/features/tui-sidebar/snapshot-schema.ts
|
|
146836
|
-
import { z as
|
|
146906
|
+
import { z as z58 } from "zod";
|
|
146837
146907
|
var AGENT_STATUS_VALUES = [
|
|
146838
146908
|
"busy",
|
|
146839
146909
|
"idle",
|
|
@@ -146849,32 +146919,32 @@ var BACKGROUND_TASK_STATUS_VALUES = [
|
|
|
146849
146919
|
"cancelled",
|
|
146850
146920
|
"interrupt"
|
|
146851
146921
|
];
|
|
146852
|
-
var AgentRowSchema =
|
|
146853
|
-
name:
|
|
146854
|
-
status:
|
|
146922
|
+
var AgentRowSchema = z58.object({
|
|
146923
|
+
name: z58.string(),
|
|
146924
|
+
status: z58.enum(AGENT_STATUS_VALUES)
|
|
146855
146925
|
});
|
|
146856
|
-
var JobRowSchema =
|
|
146857
|
-
title:
|
|
146858
|
-
status:
|
|
146859
|
-
toolCalls:
|
|
146860
|
-
lastTool:
|
|
146926
|
+
var JobRowSchema = z58.object({
|
|
146927
|
+
title: z58.string(),
|
|
146928
|
+
status: z58.enum(BACKGROUND_TASK_STATUS_VALUES),
|
|
146929
|
+
toolCalls: z58.number().int().nonnegative().nullable(),
|
|
146930
|
+
lastTool: z58.string().nullable()
|
|
146861
146931
|
});
|
|
146862
|
-
var LoopLiveSchema =
|
|
146863
|
-
kind:
|
|
146864
|
-
goalsDone:
|
|
146865
|
-
goalsTotal:
|
|
146866
|
-
pass:
|
|
146867
|
-
fail:
|
|
146868
|
-
pending:
|
|
146869
|
-
blocked:
|
|
146870
|
-
activeGoal:
|
|
146932
|
+
var LoopLiveSchema = z58.object({
|
|
146933
|
+
kind: z58.literal("live"),
|
|
146934
|
+
goalsDone: z58.number().int().nonnegative(),
|
|
146935
|
+
goalsTotal: z58.number().int().nonnegative(),
|
|
146936
|
+
pass: z58.number().int().nonnegative(),
|
|
146937
|
+
fail: z58.number().int().nonnegative(),
|
|
146938
|
+
pending: z58.number().int().nonnegative(),
|
|
146939
|
+
blocked: z58.number().int().nonnegative(),
|
|
146940
|
+
activeGoal: z58.string().nullable()
|
|
146871
146941
|
});
|
|
146872
|
-
var TuiRuntimeSnapshotSchema =
|
|
146873
|
-
version:
|
|
146874
|
-
projectDir:
|
|
146875
|
-
updatedAt:
|
|
146876
|
-
activeAgents:
|
|
146877
|
-
jobBoard:
|
|
146942
|
+
var TuiRuntimeSnapshotSchema = z58.object({
|
|
146943
|
+
version: z58.literal(MIRROR_SCHEMA_VERSION),
|
|
146944
|
+
projectDir: z58.string(),
|
|
146945
|
+
updatedAt: z58.number(),
|
|
146946
|
+
activeAgents: z58.array(AgentRowSchema),
|
|
146947
|
+
jobBoard: z58.array(JobRowSchema),
|
|
146878
146948
|
loop: LoopLiveSchema.nullable()
|
|
146879
146949
|
});
|
|
146880
146950
|
|
|
@@ -146889,25 +146959,25 @@ function writeMirror(projectDir, snapshot) {
|
|
|
146889
146959
|
// packages/omo-opencode/src/features/tui-sidebar/loop-reader.ts
|
|
146890
146960
|
import { readdirSync as readdirSync29, readFileSync as readFileSync67, statSync as statSync13 } from "fs";
|
|
146891
146961
|
import { join as join124 } from "path";
|
|
146892
|
-
import { z as
|
|
146893
|
-
var CriterionSchema =
|
|
146894
|
-
status:
|
|
146962
|
+
import { z as z59 } from "zod";
|
|
146963
|
+
var CriterionSchema = z59.object({
|
|
146964
|
+
status: z59.string()
|
|
146895
146965
|
});
|
|
146896
|
-
var GoalBaseSchema =
|
|
146897
|
-
id:
|
|
146898
|
-
title:
|
|
146899
|
-
status:
|
|
146966
|
+
var GoalBaseSchema = z59.object({
|
|
146967
|
+
id: z59.string(),
|
|
146968
|
+
title: z59.string(),
|
|
146969
|
+
status: z59.string()
|
|
146900
146970
|
});
|
|
146901
|
-
var CurrentLoopSchema =
|
|
146902
|
-
version:
|
|
146903
|
-
activeGoalId:
|
|
146904
|
-
goals:
|
|
146905
|
-
successCriteria:
|
|
146971
|
+
var CurrentLoopSchema = z59.object({
|
|
146972
|
+
version: z59.literal(1),
|
|
146973
|
+
activeGoalId: z59.string().optional(),
|
|
146974
|
+
goals: z59.array(GoalBaseSchema.extend({
|
|
146975
|
+
successCriteria: z59.array(CriterionSchema)
|
|
146906
146976
|
}))
|
|
146907
146977
|
});
|
|
146908
|
-
var LegacyLoopSchema =
|
|
146909
|
-
goals:
|
|
146910
|
-
criteria:
|
|
146978
|
+
var LegacyLoopSchema = z59.object({
|
|
146979
|
+
goals: z59.array(GoalBaseSchema.extend({
|
|
146980
|
+
criteria: z59.array(CriterionSchema)
|
|
146911
146981
|
}))
|
|
146912
146982
|
});
|
|
146913
146983
|
function readActiveLoop(projectDir) {
|
|
@@ -163546,7 +163616,7 @@ var grep_app = {
|
|
|
163546
163616
|
import { existsSync as existsSync106, readFileSync as readFileSync74 } from "fs";
|
|
163547
163617
|
import { delimiter as delimiter2, dirname as dirname47, resolve as resolve35 } from "path";
|
|
163548
163618
|
import { fileURLToPath as fileURLToPath8 } from "url";
|
|
163549
|
-
import { z as
|
|
163619
|
+
import { z as z60 } from "zod";
|
|
163550
163620
|
|
|
163551
163621
|
// packages/omo-opencode/src/mcp/cli-suffix.ts
|
|
163552
163622
|
function normalizeCliPath(path) {
|
|
@@ -163647,8 +163717,8 @@ var PROJECT_LSP_CONFIGS = [".opencode/lsp.json", ".omo/lsp.json", ".omo/lsp-clie
|
|
|
163647
163717
|
var DAEMON_PACKAGE_NAME = "@code-yeongyu/lsp-daemon";
|
|
163648
163718
|
var OMO_LSP_DAEMON_CLI = "OMO_LSP_DAEMON_CLI";
|
|
163649
163719
|
var OMO_LSP_DAEMON_VERSION = "OMO_LSP_DAEMON_VERSION";
|
|
163650
|
-
var DaemonPackageSchema =
|
|
163651
|
-
version:
|
|
163720
|
+
var DaemonPackageSchema = z60.object({
|
|
163721
|
+
version: z60.string().min(1)
|
|
163652
163722
|
});
|
|
163653
163723
|
var LSP_BOOTSTRAP_SCRIPT = [
|
|
163654
163724
|
"const { existsSync } = require('node:fs')",
|
|
@@ -168888,14 +168958,14 @@ class OpencodeClient2 extends HeyApiClient {
|
|
|
168888
168958
|
// node_modules/.bun/@opencode-ai+sdk@1.18.22/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
168889
168959
|
var import_cross_spawn3 = __toESM(require_cross_spawn(), 1);
|
|
168890
168960
|
// packages/omo-opencode/src/plugin/native-skills.ts
|
|
168891
|
-
import { z as
|
|
168892
|
-
var NativeSkillEntrySchema =
|
|
168893
|
-
name:
|
|
168894
|
-
description:
|
|
168895
|
-
location:
|
|
168896
|
-
content:
|
|
168961
|
+
import { z as z61 } from "zod";
|
|
168962
|
+
var NativeSkillEntrySchema = z61.object({
|
|
168963
|
+
name: z61.string(),
|
|
168964
|
+
description: z61.string().default(""),
|
|
168965
|
+
location: z61.string(),
|
|
168966
|
+
content: z61.string()
|
|
168897
168967
|
});
|
|
168898
|
-
var NativeSkillEntriesSchema =
|
|
168968
|
+
var NativeSkillEntriesSchema = z61.array(NativeSkillEntrySchema);
|
|
168899
168969
|
function getObjectProperty(value, property) {
|
|
168900
168970
|
if (typeof value !== "object" || value === null)
|
|
168901
168971
|
return;
|
|
@@ -170045,7 +170115,7 @@ async function resolveParticipant2(teamRunId, sessionID, config, deps) {
|
|
|
170045
170115
|
}
|
|
170046
170116
|
|
|
170047
170117
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-inline-spec.ts
|
|
170048
|
-
import { z as
|
|
170118
|
+
import { z as z62 } from "zod";
|
|
170049
170119
|
init_types2();
|
|
170050
170120
|
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
170121
|
function omitEmptyStringArgs(rawArgs) {
|
|
@@ -170054,10 +170124,10 @@ function omitEmptyStringArgs(rawArgs) {
|
|
|
170054
170124
|
}
|
|
170055
170125
|
return Object.fromEntries(Object.entries(rawArgs).filter(([, value]) => value !== ""));
|
|
170056
170126
|
}
|
|
170057
|
-
var TeamCreateArgsSchema =
|
|
170058
|
-
teamName:
|
|
170059
|
-
inline_spec:
|
|
170060
|
-
leadSessionId:
|
|
170127
|
+
var TeamCreateArgsSchema = z62.preprocess(omitEmptyStringArgs, z62.object({
|
|
170128
|
+
teamName: z62.string().min(1).nullish(),
|
|
170129
|
+
inline_spec: z62.unknown().nullish(),
|
|
170130
|
+
leadSessionId: z62.string().nullish()
|
|
170061
170131
|
}).superRefine((value, ctx) => {
|
|
170062
170132
|
const optionCount = Number(value.teamName != null) + Number(value.inline_spec != null);
|
|
170063
170133
|
if (optionCount !== 1) {
|
|
@@ -170178,7 +170248,7 @@ function createTeamCreateTool(config, client, bgMgr, tmuxMgr, executorConfig, de
|
|
|
170178
170248
|
});
|
|
170179
170249
|
}
|
|
170180
170250
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
170181
|
-
import { z as
|
|
170251
|
+
import { z as z63 } from "zod";
|
|
170182
170252
|
// packages/omo-opencode/src/features/team-mode/team-runtime/shutdown.ts
|
|
170183
170253
|
init_store2();
|
|
170184
170254
|
init_shutdown_helpers();
|
|
@@ -170267,13 +170337,13 @@ async function rejectShutdown(teamRunId, memberName, rejectorName, reason, confi
|
|
|
170267
170337
|
|
|
170268
170338
|
// packages/omo-opencode/src/features/team-mode/tools/lifecycle-shutdown-tools.ts
|
|
170269
170339
|
init_store();
|
|
170270
|
-
var TeamDeleteArgsSchema =
|
|
170271
|
-
var TeamShutdownRequestArgsSchema =
|
|
170272
|
-
var TeamApproveShutdownArgsSchema =
|
|
170273
|
-
var TeamRejectShutdownArgsSchema =
|
|
170274
|
-
teamRunId:
|
|
170275
|
-
memberName:
|
|
170276
|
-
reason:
|
|
170340
|
+
var TeamDeleteArgsSchema = z63.object({ teamRunId: z63.string().min(1), force: z63.boolean().optional() });
|
|
170341
|
+
var TeamShutdownRequestArgsSchema = z63.object({ teamRunId: z63.string().min(1), targetMemberName: z63.string().min(1) });
|
|
170342
|
+
var TeamApproveShutdownArgsSchema = z63.object({ teamRunId: z63.string().min(1), memberName: z63.string().min(1) });
|
|
170343
|
+
var TeamRejectShutdownArgsSchema = z63.object({
|
|
170344
|
+
teamRunId: z63.string().min(1),
|
|
170345
|
+
memberName: z63.string().min(1),
|
|
170346
|
+
reason: z63.string().min(1)
|
|
170277
170347
|
});
|
|
170278
170348
|
var defaultTeamShutdownToolDeps = {
|
|
170279
170349
|
listActiveTeams,
|
|
@@ -174135,7 +174205,7 @@ function parseWindowsProcessTable(output) {
|
|
|
174135
174205
|
const entries = Array.isArray(parsed) ? parsed : parsed === undefined ? [] : [parsed];
|
|
174136
174206
|
const processes = [];
|
|
174137
174207
|
for (const entry of entries) {
|
|
174138
|
-
if (!
|
|
174208
|
+
if (!isRecord11(entry))
|
|
174139
174209
|
continue;
|
|
174140
174210
|
const pid = numberField(entry, "ProcessId");
|
|
174141
174211
|
const ppid = numberField(entry, "ParentProcessId");
|
|
@@ -174169,7 +174239,7 @@ function stringField(record, key) {
|
|
|
174169
174239
|
const value = record[key];
|
|
174170
174240
|
return typeof value === "string" ? value : undefined;
|
|
174171
174241
|
}
|
|
174172
|
-
function
|
|
174242
|
+
function isRecord11(value) {
|
|
174173
174243
|
return typeof value === "object" && value !== null;
|
|
174174
174244
|
}
|
|
174175
174245
|
|
|
@@ -174273,7 +174343,7 @@ async function attestLspDaemonOwner(target, deps = {}) {
|
|
|
174273
174343
|
}
|
|
174274
174344
|
}
|
|
174275
174345
|
function parseLspDaemonOwner(value) {
|
|
174276
|
-
if (!
|
|
174346
|
+
if (!isRecord12(value))
|
|
174277
174347
|
return null;
|
|
174278
174348
|
const pid = value["pid"];
|
|
174279
174349
|
const nonce = value["nonce"];
|
|
@@ -174285,7 +174355,7 @@ function parseLspDaemonOwner(value) {
|
|
|
174285
174355
|
return null;
|
|
174286
174356
|
if (typeof startedAt !== "string" || startedAt.length === 0)
|
|
174287
174357
|
return null;
|
|
174288
|
-
if (!
|
|
174358
|
+
if (!isRecord12(endpoint))
|
|
174289
174359
|
return null;
|
|
174290
174360
|
const kind = endpoint["kind"];
|
|
174291
174361
|
const path = endpoint["path"];
|
|
@@ -174337,7 +174407,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
174337
174407
|
return finish(null);
|
|
174338
174408
|
try {
|
|
174339
174409
|
const response = JSON.parse(line);
|
|
174340
|
-
if (!
|
|
174410
|
+
if (!isRecord12(response) || response["id"] !== OWNER_PING_REQUEST_ID || "error" in response) {
|
|
174341
174411
|
return finish(null);
|
|
174342
174412
|
}
|
|
174343
174413
|
finish(parseLspDaemonOwner(response["result"]));
|
|
@@ -174350,7 +174420,7 @@ async function pingLspDaemonOwner(endpoint, authToken) {
|
|
|
174350
174420
|
function sameOwner(left, right) {
|
|
174351
174421
|
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
174422
|
}
|
|
174353
|
-
function
|
|
174423
|
+
function isRecord12(value) {
|
|
174354
174424
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
174355
174425
|
}
|
|
174356
174426
|
|
|
@@ -180011,7 +180081,7 @@ var TOPLEVEL_SENTINELS = [
|
|
|
180011
180081
|
field: "window_id"
|
|
180012
180082
|
}
|
|
180013
180083
|
];
|
|
180014
|
-
function
|
|
180084
|
+
function isRecord13(value) {
|
|
180015
180085
|
return typeof value == "object" && value !== null && !Array.isArray(value);
|
|
180016
180086
|
}
|
|
180017
180087
|
function toRfc3339(timestamp) {
|
|
@@ -180033,7 +180103,7 @@ function relocateInto(properties, key, value) {
|
|
|
180033
180103
|
properties[key] = value;
|
|
180034
180104
|
}
|
|
180035
180105
|
function buildV1Event(message) {
|
|
180036
|
-
const sourceProperties =
|
|
180106
|
+
const sourceProperties = isRecord13(message.properties) ? message.properties : {};
|
|
180037
180107
|
const properties = {
|
|
180038
180108
|
...sourceProperties
|
|
180039
180109
|
};
|