@elizaos/autonomous 2.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/package.json +270 -0
- package/src/actions/emote.ts +101 -0
- package/src/actions/restart.ts +101 -0
- package/src/actions/send-message.ts +168 -0
- package/src/actions/stream-control.ts +439 -0
- package/src/actions/switch-stream-source.ts +126 -0
- package/src/actions/terminal.ts +186 -0
- package/src/api/agent-admin-routes.ts +178 -0
- package/src/api/agent-lifecycle-routes.ts +129 -0
- package/src/api/agent-model.ts +143 -0
- package/src/api/agent-transfer-routes.ts +211 -0
- package/src/api/apps-routes.ts +210 -0
- package/src/api/auth-routes.ts +90 -0
- package/src/api/bsc-trade.ts +736 -0
- package/src/api/bug-report-routes.ts +161 -0
- package/src/api/character-routes.ts +421 -0
- package/src/api/cloud-billing-routes.ts +598 -0
- package/src/api/cloud-compat-routes.ts +192 -0
- package/src/api/cloud-routes.ts +529 -0
- package/src/api/cloud-status-routes.ts +234 -0
- package/src/api/compat-utils.ts +154 -0
- package/src/api/connector-health.ts +135 -0
- package/src/api/coordinator-wiring.ts +179 -0
- package/src/api/credit-detection.ts +47 -0
- package/src/api/database.ts +1357 -0
- package/src/api/diagnostics-routes.ts +389 -0
- package/src/api/drop-service.ts +205 -0
- package/src/api/early-logs.ts +111 -0
- package/src/api/http-helpers.ts +252 -0
- package/src/api/index.ts +85 -0
- package/src/api/knowledge-routes.ts +1189 -0
- package/src/api/knowledge-service-loader.ts +92 -0
- package/src/api/memory-bounds.ts +121 -0
- package/src/api/memory-routes.ts +349 -0
- package/src/api/merkle-tree.ts +239 -0
- package/src/api/models-routes.ts +72 -0
- package/src/api/nfa-routes.ts +169 -0
- package/src/api/nft-verify.ts +188 -0
- package/src/api/og-tracker.ts +72 -0
- package/src/api/parse-action-block.ts +145 -0
- package/src/api/permissions-routes.ts +222 -0
- package/src/api/plugin-validation.ts +355 -0
- package/src/api/provider-switch-config.ts +455 -0
- package/src/api/registry-routes.ts +165 -0
- package/src/api/registry-service.ts +292 -0
- package/src/api/route-helpers.ts +21 -0
- package/src/api/sandbox-routes.ts +1480 -0
- package/src/api/server.ts +17674 -0
- package/src/api/signal-routes.ts +265 -0
- package/src/api/stream-persistence.ts +297 -0
- package/src/api/stream-route-state.ts +48 -0
- package/src/api/stream-routes.ts +1046 -0
- package/src/api/stream-voice-routes.ts +208 -0
- package/src/api/streaming-text.ts +129 -0
- package/src/api/streaming-types.ts +23 -0
- package/src/api/subscription-routes.ts +283 -0
- package/src/api/terminal-run-limits.ts +31 -0
- package/src/api/training-backend-check.ts +40 -0
- package/src/api/training-routes.ts +314 -0
- package/src/api/training-service-like.ts +46 -0
- package/src/api/trajectory-routes.ts +714 -0
- package/src/api/trigger-routes.ts +438 -0
- package/src/api/twitter-verify.ts +226 -0
- package/src/api/tx-service.ts +193 -0
- package/src/api/wallet-dex-prices.ts +206 -0
- package/src/api/wallet-evm-balance.ts +989 -0
- package/src/api/wallet-routes.ts +505 -0
- package/src/api/wallet-rpc.ts +523 -0
- package/src/api/wallet-trading-profile.ts +694 -0
- package/src/api/wallet.ts +745 -0
- package/src/api/whatsapp-routes.ts +282 -0
- package/src/api/zip-utils.ts +130 -0
- package/src/auth/anthropic.ts +63 -0
- package/src/auth/apply-stealth.ts +38 -0
- package/src/auth/claude-code-stealth.ts +141 -0
- package/src/auth/credentials.ts +226 -0
- package/src/auth/index.ts +18 -0
- package/src/auth/openai-codex.ts +94 -0
- package/src/auth/types.ts +24 -0
- package/src/awareness/registry.ts +220 -0
- package/src/bin.ts +10 -0
- package/src/cli/index.ts +36 -0
- package/src/cli/parse-duration.ts +43 -0
- package/src/cloud/auth.test.ts +370 -0
- package/src/cloud/auth.ts +176 -0
- package/src/cloud/backup.test.ts +150 -0
- package/src/cloud/backup.ts +50 -0
- package/src/cloud/base-url.ts +45 -0
- package/src/cloud/bridge-client.test.ts +481 -0
- package/src/cloud/bridge-client.ts +307 -0
- package/src/cloud/cloud-manager.test.ts +223 -0
- package/src/cloud/cloud-manager.ts +151 -0
- package/src/cloud/cloud-proxy.test.ts +122 -0
- package/src/cloud/cloud-proxy.ts +52 -0
- package/src/cloud/index.ts +23 -0
- package/src/cloud/reconnect.test.ts +178 -0
- package/src/cloud/reconnect.ts +108 -0
- package/src/cloud/validate-url.test.ts +147 -0
- package/src/cloud/validate-url.ts +176 -0
- package/src/config/character-schema.ts +44 -0
- package/src/config/config.ts +149 -0
- package/src/config/env-vars.ts +86 -0
- package/src/config/includes.ts +196 -0
- package/src/config/index.ts +15 -0
- package/src/config/object-utils.ts +10 -0
- package/src/config/paths.ts +92 -0
- package/src/config/plugin-auto-enable.ts +520 -0
- package/src/config/schema.ts +1342 -0
- package/src/config/telegram-custom-commands.ts +99 -0
- package/src/config/types.agent-defaults.ts +342 -0
- package/src/config/types.agents.ts +112 -0
- package/src/config/types.gateway.ts +243 -0
- package/src/config/types.hooks.ts +124 -0
- package/src/config/types.messages.ts +201 -0
- package/src/config/types.milady.ts +791 -0
- package/src/config/types.tools.ts +416 -0
- package/src/config/types.ts +7 -0
- package/src/config/zod-schema.agent-runtime.ts +777 -0
- package/src/config/zod-schema.core.ts +778 -0
- package/src/config/zod-schema.hooks.ts +139 -0
- package/src/config/zod-schema.providers-core.ts +1126 -0
- package/src/config/zod-schema.session.ts +98 -0
- package/src/config/zod-schema.ts +865 -0
- package/src/contracts/apps.ts +46 -0
- package/src/contracts/awareness.ts +56 -0
- package/src/contracts/config.ts +172 -0
- package/src/contracts/drop.ts +21 -0
- package/src/contracts/index.ts +8 -0
- package/src/contracts/onboarding.ts +592 -0
- package/src/contracts/permissions.ts +52 -0
- package/src/contracts/verification.ts +9 -0
- package/src/contracts/wallet.ts +503 -0
- package/src/diagnostics/integration-observability.ts +132 -0
- package/src/emotes/catalog.ts +655 -0
- package/src/external-modules.d.ts +7 -0
- package/src/hooks/discovery.test.ts +357 -0
- package/src/hooks/discovery.ts +231 -0
- package/src/hooks/eligibility.ts +146 -0
- package/src/hooks/hooks.test.ts +320 -0
- package/src/hooks/index.ts +8 -0
- package/src/hooks/loader.test.ts +418 -0
- package/src/hooks/loader.ts +256 -0
- package/src/hooks/registry.test.ts +168 -0
- package/src/hooks/registry.ts +74 -0
- package/src/hooks/types.ts +121 -0
- package/src/index.ts +19 -0
- package/src/onboarding-presets.ts +828 -0
- package/src/plugins/custom-rtmp/index.ts +40 -0
- package/src/providers/admin-trust.ts +76 -0
- package/src/providers/session-bridge.ts +143 -0
- package/src/providers/session-utils.ts +42 -0
- package/src/providers/simple-mode.ts +113 -0
- package/src/providers/ui-catalog.ts +135 -0
- package/src/providers/workspace-provider.ts +213 -0
- package/src/providers/workspace.ts +497 -0
- package/src/runtime/agent-event-service.ts +57 -0
- package/src/runtime/cloud-onboarding.test.ts +489 -0
- package/src/runtime/cloud-onboarding.ts +408 -0
- package/src/runtime/core-plugins.ts +53 -0
- package/src/runtime/custom-actions.ts +605 -0
- package/src/runtime/eliza.ts +4941 -0
- package/src/runtime/embedding-presets.ts +73 -0
- package/src/runtime/index.ts +8 -0
- package/src/runtime/milady-plugin.ts +180 -0
- package/src/runtime/onboarding-names.ts +76 -0
- package/src/runtime/release-plugin-policy.ts +119 -0
- package/src/runtime/restart.ts +59 -0
- package/src/runtime/trajectory-persistence.ts +2584 -0
- package/src/runtime/version.ts +6 -0
- package/src/security/audit-log.ts +222 -0
- package/src/security/network-policy.ts +91 -0
- package/src/server/index.ts +6 -0
- package/src/services/agent-export.ts +976 -0
- package/src/services/app-manager.ts +755 -0
- package/src/services/browser-capture.ts +215 -0
- package/src/services/coding-agent-context.ts +355 -0
- package/src/services/fallback-training-service.ts +196 -0
- package/src/services/index.ts +17 -0
- package/src/services/mcp-marketplace.ts +327 -0
- package/src/services/plugin-manager-types.ts +185 -0
- package/src/services/privy-wallets.ts +352 -0
- package/src/services/registry-client-app-meta.ts +201 -0
- package/src/services/registry-client-endpoints.ts +253 -0
- package/src/services/registry-client-local.ts +485 -0
- package/src/services/registry-client-network.ts +173 -0
- package/src/services/registry-client-queries.ts +176 -0
- package/src/services/registry-client-types.ts +104 -0
- package/src/services/registry-client.ts +366 -0
- package/src/services/remote-signing-service.ts +261 -0
- package/src/services/sandbox-engine.ts +753 -0
- package/src/services/sandbox-manager.ts +503 -0
- package/src/services/self-updater.ts +213 -0
- package/src/services/signal-pairing.ts +189 -0
- package/src/services/signing-policy.ts +230 -0
- package/src/services/skill-catalog-client.ts +195 -0
- package/src/services/skill-marketplace.ts +909 -0
- package/src/services/stream-manager.ts +707 -0
- package/src/services/tts-stream-bridge.ts +465 -0
- package/src/services/update-checker.ts +163 -0
- package/src/services/version-compat.ts +367 -0
- package/src/services/whatsapp-pairing.ts +279 -0
- package/src/shared/ui-catalog-prompt.ts +1158 -0
- package/src/test-support/process-helpers.ts +35 -0
- package/src/test-support/route-test-helpers.ts +113 -0
- package/src/test-support/test-helpers.ts +304 -0
- package/src/testing/index.ts +3 -0
- package/src/triggers/action.ts +342 -0
- package/src/triggers/runtime.ts +432 -0
- package/src/triggers/scheduling.ts +472 -0
- package/src/triggers/types.ts +133 -0
- package/src/types/app-hyperscape-routes-shim.d.ts +29 -0
- package/src/types/external-modules.d.ts +7 -0
- package/src/utils/exec-safety.ts +23 -0
- package/src/utils/number-parsing.ts +112 -0
- package/src/utils/spoken-text.ts +65 -0
- package/src/version-resolver.ts +60 -0
- package/test/api/agent-admin-routes.test.ts +160 -0
- package/test/api/agent-lifecycle-routes.test.ts +164 -0
- package/test/api/agent-transfer-routes.test.ts +136 -0
- package/test/api/apps-routes.test.ts +140 -0
- package/test/api/auth-routes.test.ts +160 -0
- package/test/api/bug-report-routes.test.ts +88 -0
- package/test/api/knowledge-routes.test.ts +73 -0
- package/test/api/lifecycle.test.ts +342 -0
- package/test/api/memory-routes.test.ts +74 -0
- package/test/api/models-routes.test.ts +112 -0
- package/test/api/nfa-routes.test.ts +78 -0
- package/test/api/permissions-routes.test.ts +185 -0
- package/test/api/registry-routes.test.ts +157 -0
- package/test/api/signal-routes.test.ts +113 -0
- package/test/api/subscription-routes.test.ts +90 -0
- package/test/api/trigger-routes.test.ts +87 -0
- package/test/api/wallet-routes.observability.test.ts +191 -0
- package/test/api/wallet-routes.test.ts +502 -0
- package/test/diagnostics/integration-observability.test.ts +135 -0
- package/test/security/audit-log.test.ts +229 -0
- package/test/security/network-policy.test.ts +143 -0
- package/test/services/version-compat.test.ts +127 -0
- package/tsconfig.build.json +21 -0
- package/tsconfig.json +19 -0
|
@@ -0,0 +1,777 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { parseDurationMs } from "../cli/parse-duration";
|
|
3
|
+
import {
|
|
4
|
+
BlockStreamingChunkSchema,
|
|
5
|
+
BlockStreamingCoalesceSchema,
|
|
6
|
+
CliBackendSchema,
|
|
7
|
+
GroupChatSchema,
|
|
8
|
+
HumanDelaySchema,
|
|
9
|
+
IdentitySchema,
|
|
10
|
+
ToolsLinksSchema,
|
|
11
|
+
ToolsMediaSchema,
|
|
12
|
+
} from "./zod-schema.core";
|
|
13
|
+
|
|
14
|
+
export const HeartbeatSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
every: z.string().optional(),
|
|
17
|
+
activeHours: z
|
|
18
|
+
.object({
|
|
19
|
+
start: z.string().optional(),
|
|
20
|
+
end: z.string().optional(),
|
|
21
|
+
timezone: z.string().optional(),
|
|
22
|
+
})
|
|
23
|
+
.strict()
|
|
24
|
+
.optional(),
|
|
25
|
+
model: z.string().optional(),
|
|
26
|
+
session: z.string().optional(),
|
|
27
|
+
includeReasoning: z.boolean().optional(),
|
|
28
|
+
target: z.string().optional(),
|
|
29
|
+
to: z.string().optional(),
|
|
30
|
+
prompt: z.string().optional(),
|
|
31
|
+
ackMaxChars: z.number().int().nonnegative().optional(),
|
|
32
|
+
})
|
|
33
|
+
.strict()
|
|
34
|
+
.superRefine((val, ctx) => {
|
|
35
|
+
if (!val.every) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
parseDurationMs(val.every, { defaultUnit: "m" });
|
|
40
|
+
} catch {
|
|
41
|
+
ctx.addIssue({
|
|
42
|
+
code: z.ZodIssueCode.custom,
|
|
43
|
+
path: ["every"],
|
|
44
|
+
message: "invalid duration (use ms, s, m, h)",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const active = val.activeHours;
|
|
49
|
+
if (!active) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const timePattern = /^([01]\d|2[0-3]|24):([0-5]\d)$/;
|
|
53
|
+
const validateTime = (
|
|
54
|
+
raw: string | undefined,
|
|
55
|
+
opts: { allow24: boolean },
|
|
56
|
+
path: string,
|
|
57
|
+
) => {
|
|
58
|
+
if (!raw) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!timePattern.test(raw)) {
|
|
62
|
+
ctx.addIssue({
|
|
63
|
+
code: z.ZodIssueCode.custom,
|
|
64
|
+
path: ["activeHours", path],
|
|
65
|
+
message: 'invalid time (use "HH:MM" 24h format)',
|
|
66
|
+
});
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const [hourStr, minuteStr] = raw.split(":");
|
|
70
|
+
const hour = Number(hourStr);
|
|
71
|
+
const minute = Number(minuteStr);
|
|
72
|
+
if (hour === 24 && minute !== 0) {
|
|
73
|
+
ctx.addIssue({
|
|
74
|
+
code: z.ZodIssueCode.custom,
|
|
75
|
+
path: ["activeHours", path],
|
|
76
|
+
message: "invalid time (24:00 is the only allowed 24:xx value)",
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (hour === 24 && !opts.allow24) {
|
|
81
|
+
ctx.addIssue({
|
|
82
|
+
code: z.ZodIssueCode.custom,
|
|
83
|
+
path: ["activeHours", path],
|
|
84
|
+
message: "invalid time (start cannot be 24:00)",
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
validateTime(active.start, { allow24: false }, "start");
|
|
90
|
+
validateTime(active.end, { allow24: true }, "end");
|
|
91
|
+
})
|
|
92
|
+
.optional();
|
|
93
|
+
|
|
94
|
+
export const SandboxDockerSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
image: z.string().optional(),
|
|
97
|
+
containerPrefix: z.string().optional(),
|
|
98
|
+
workdir: z.string().optional(),
|
|
99
|
+
readOnlyRoot: z.boolean().optional(),
|
|
100
|
+
tmpfs: z.array(z.string()).optional(),
|
|
101
|
+
network: z.string().optional(),
|
|
102
|
+
user: z.string().optional(),
|
|
103
|
+
capDrop: z.array(z.string()).optional(),
|
|
104
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
105
|
+
setupCommand: z.string().optional(),
|
|
106
|
+
pidsLimit: z.number().int().positive().optional(),
|
|
107
|
+
memory: z.union([z.string(), z.number()]).optional(),
|
|
108
|
+
memorySwap: z.union([z.string(), z.number()]).optional(),
|
|
109
|
+
cpus: z.number().positive().optional(),
|
|
110
|
+
ulimits: z
|
|
111
|
+
.record(
|
|
112
|
+
z.string(),
|
|
113
|
+
z.union([
|
|
114
|
+
z.string(),
|
|
115
|
+
z.number(),
|
|
116
|
+
z
|
|
117
|
+
.object({
|
|
118
|
+
soft: z.number().int().nonnegative().optional(),
|
|
119
|
+
hard: z.number().int().nonnegative().optional(),
|
|
120
|
+
})
|
|
121
|
+
.strict(),
|
|
122
|
+
]),
|
|
123
|
+
)
|
|
124
|
+
.optional(),
|
|
125
|
+
seccompProfile: z.string().optional(),
|
|
126
|
+
apparmorProfile: z.string().optional(),
|
|
127
|
+
dns: z.array(z.string()).optional(),
|
|
128
|
+
extraHosts: z.array(z.string()).optional(),
|
|
129
|
+
binds: z.array(z.string()).optional(),
|
|
130
|
+
})
|
|
131
|
+
.strict()
|
|
132
|
+
.optional();
|
|
133
|
+
|
|
134
|
+
export const SandboxBrowserSchema = z
|
|
135
|
+
.object({
|
|
136
|
+
enabled: z.boolean().optional(),
|
|
137
|
+
image: z.string().optional(),
|
|
138
|
+
containerPrefix: z.string().optional(),
|
|
139
|
+
cdpPort: z.number().int().positive().optional(),
|
|
140
|
+
vncPort: z.number().int().positive().optional(),
|
|
141
|
+
noVncPort: z.number().int().positive().optional(),
|
|
142
|
+
headless: z.boolean().optional(),
|
|
143
|
+
enableNoVnc: z.boolean().optional(),
|
|
144
|
+
allowHostControl: z.boolean().optional(),
|
|
145
|
+
autoStart: z.boolean().optional(),
|
|
146
|
+
autoStartTimeoutMs: z.number().int().positive().optional(),
|
|
147
|
+
})
|
|
148
|
+
.strict()
|
|
149
|
+
.optional();
|
|
150
|
+
|
|
151
|
+
export const SandboxPruneSchema = z
|
|
152
|
+
.object({
|
|
153
|
+
idleHours: z.number().int().nonnegative().optional(),
|
|
154
|
+
maxAgeDays: z.number().int().nonnegative().optional(),
|
|
155
|
+
})
|
|
156
|
+
.strict()
|
|
157
|
+
.optional();
|
|
158
|
+
|
|
159
|
+
const ToolPolicyBaseSchema = z
|
|
160
|
+
.object({
|
|
161
|
+
allow: z.array(z.string()).optional(),
|
|
162
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
163
|
+
deny: z.array(z.string()).optional(),
|
|
164
|
+
})
|
|
165
|
+
.strict();
|
|
166
|
+
|
|
167
|
+
type ToolPolicyConflictValue = {
|
|
168
|
+
allow?: string[];
|
|
169
|
+
alsoAllow?: string[];
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const validateToolPolicyConflict = (
|
|
173
|
+
scope: string,
|
|
174
|
+
value: ToolPolicyConflictValue,
|
|
175
|
+
ctx: z.RefinementCtx,
|
|
176
|
+
) => {
|
|
177
|
+
if (
|
|
178
|
+
value.allow &&
|
|
179
|
+
value.allow.length > 0 &&
|
|
180
|
+
value.alsoAllow &&
|
|
181
|
+
value.alsoAllow.length > 0
|
|
182
|
+
) {
|
|
183
|
+
ctx.addIssue({
|
|
184
|
+
code: z.ZodIssueCode.custom,
|
|
185
|
+
message: `${scope} cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)`,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
const makeToolPolicySchema = (scope: string) =>
|
|
191
|
+
ToolPolicyBaseSchema.superRefine((value, ctx) => {
|
|
192
|
+
validateToolPolicyConflict(scope, value, ctx);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
export const ToolsWebSearchSchema = z
|
|
196
|
+
.object({
|
|
197
|
+
enabled: z.boolean().optional(),
|
|
198
|
+
provider: z.union([z.literal("brave"), z.literal("perplexity")]).optional(),
|
|
199
|
+
apiKey: z.string().optional(),
|
|
200
|
+
maxResults: z.number().int().positive().optional(),
|
|
201
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
202
|
+
cacheTtlMinutes: z.number().nonnegative().optional(),
|
|
203
|
+
perplexity: z
|
|
204
|
+
.object({
|
|
205
|
+
apiKey: z.string().optional(),
|
|
206
|
+
baseUrl: z.string().optional(),
|
|
207
|
+
model: z.string().optional(),
|
|
208
|
+
})
|
|
209
|
+
.strict()
|
|
210
|
+
.optional(),
|
|
211
|
+
})
|
|
212
|
+
.strict()
|
|
213
|
+
.optional();
|
|
214
|
+
|
|
215
|
+
export const ToolsWebFetchSchema = z
|
|
216
|
+
.object({
|
|
217
|
+
enabled: z.boolean().optional(),
|
|
218
|
+
maxChars: z.number().int().positive().optional(),
|
|
219
|
+
maxCharsCap: z.number().int().positive().optional(),
|
|
220
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
221
|
+
cacheTtlMinutes: z.number().nonnegative().optional(),
|
|
222
|
+
maxRedirects: z.number().int().nonnegative().optional(),
|
|
223
|
+
userAgent: z.string().optional(),
|
|
224
|
+
})
|
|
225
|
+
.strict()
|
|
226
|
+
.optional();
|
|
227
|
+
|
|
228
|
+
export const ToolsWebSchema = z
|
|
229
|
+
.object({
|
|
230
|
+
search: ToolsWebSearchSchema,
|
|
231
|
+
fetch: ToolsWebFetchSchema,
|
|
232
|
+
})
|
|
233
|
+
.strict()
|
|
234
|
+
.optional();
|
|
235
|
+
|
|
236
|
+
export const ToolProfileSchema = z
|
|
237
|
+
.union([
|
|
238
|
+
z.literal("minimal"),
|
|
239
|
+
z.literal("coding"),
|
|
240
|
+
z.literal("messaging"),
|
|
241
|
+
z.literal("full"),
|
|
242
|
+
])
|
|
243
|
+
.optional();
|
|
244
|
+
|
|
245
|
+
export const ToolPolicySchema = makeToolPolicySchema("tools policy").optional();
|
|
246
|
+
|
|
247
|
+
export const ToolPolicyWithProfileSchema = makeToolPolicySchema(
|
|
248
|
+
"tools.byProvider policy",
|
|
249
|
+
)
|
|
250
|
+
.extend({
|
|
251
|
+
profile: ToolProfileSchema,
|
|
252
|
+
})
|
|
253
|
+
.strict();
|
|
254
|
+
|
|
255
|
+
// Provider docking: allowlists keyed by provider id (no schema updates when adding providers).
|
|
256
|
+
export const ElevatedAllowFromSchema = z
|
|
257
|
+
.record(z.string(), z.array(z.union([z.string(), z.number()])))
|
|
258
|
+
.optional();
|
|
259
|
+
|
|
260
|
+
export const AgentSandboxSchema = z
|
|
261
|
+
.object({
|
|
262
|
+
mode: z
|
|
263
|
+
.union([z.literal("off"), z.literal("non-main"), z.literal("all")])
|
|
264
|
+
.optional(),
|
|
265
|
+
workspaceAccess: z
|
|
266
|
+
.union([z.literal("none"), z.literal("ro"), z.literal("rw")])
|
|
267
|
+
.optional(),
|
|
268
|
+
sessionToolsVisibility: z
|
|
269
|
+
.union([z.literal("spawned"), z.literal("all")])
|
|
270
|
+
.optional(),
|
|
271
|
+
scope: z
|
|
272
|
+
.union([z.literal("session"), z.literal("agent"), z.literal("shared")])
|
|
273
|
+
.optional(),
|
|
274
|
+
perSession: z.boolean().optional(),
|
|
275
|
+
workspaceRoot: z.string().optional(),
|
|
276
|
+
docker: SandboxDockerSchema,
|
|
277
|
+
browser: SandboxBrowserSchema,
|
|
278
|
+
prune: SandboxPruneSchema,
|
|
279
|
+
})
|
|
280
|
+
.strict()
|
|
281
|
+
.optional();
|
|
282
|
+
|
|
283
|
+
export const AgentToolsSchema = z
|
|
284
|
+
.object({
|
|
285
|
+
profile: ToolProfileSchema,
|
|
286
|
+
allow: z.array(z.string()).optional(),
|
|
287
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
288
|
+
deny: z.array(z.string()).optional(),
|
|
289
|
+
byProvider: z.record(z.string(), ToolPolicyWithProfileSchema).optional(),
|
|
290
|
+
elevated: z
|
|
291
|
+
.object({
|
|
292
|
+
enabled: z.boolean().optional(),
|
|
293
|
+
allowFrom: ElevatedAllowFromSchema,
|
|
294
|
+
})
|
|
295
|
+
.strict()
|
|
296
|
+
.optional(),
|
|
297
|
+
exec: z
|
|
298
|
+
.object({
|
|
299
|
+
host: z.enum(["sandbox", "gateway", "node"]).optional(),
|
|
300
|
+
security: z.enum(["deny", "allowlist", "full"]).optional(),
|
|
301
|
+
ask: z.enum(["off", "on-miss", "always"]).optional(),
|
|
302
|
+
node: z.string().optional(),
|
|
303
|
+
pathPrepend: z.array(z.string()).optional(),
|
|
304
|
+
safeBins: z.array(z.string()).optional(),
|
|
305
|
+
backgroundMs: z.number().int().positive().optional(),
|
|
306
|
+
timeoutSec: z.number().int().positive().optional(),
|
|
307
|
+
approvalRunningNoticeMs: z.number().int().nonnegative().optional(),
|
|
308
|
+
cleanupMs: z.number().int().positive().optional(),
|
|
309
|
+
notifyOnExit: z.boolean().optional(),
|
|
310
|
+
applyPatch: z
|
|
311
|
+
.object({
|
|
312
|
+
enabled: z.boolean().optional(),
|
|
313
|
+
allowModels: z.array(z.string()).optional(),
|
|
314
|
+
})
|
|
315
|
+
.strict()
|
|
316
|
+
.optional(),
|
|
317
|
+
})
|
|
318
|
+
.strict()
|
|
319
|
+
.optional(),
|
|
320
|
+
sandbox: z
|
|
321
|
+
.object({
|
|
322
|
+
tools: ToolPolicySchema,
|
|
323
|
+
})
|
|
324
|
+
.strict()
|
|
325
|
+
.optional(),
|
|
326
|
+
})
|
|
327
|
+
.strict()
|
|
328
|
+
.superRefine((value, ctx) => {
|
|
329
|
+
validateToolPolicyConflict("agent tools", value, ctx);
|
|
330
|
+
})
|
|
331
|
+
.optional();
|
|
332
|
+
|
|
333
|
+
export const MemorySearchSchema = z
|
|
334
|
+
.object({
|
|
335
|
+
enabled: z.boolean().optional(),
|
|
336
|
+
sources: z
|
|
337
|
+
.array(z.union([z.literal("memory"), z.literal("sessions")]))
|
|
338
|
+
.optional(),
|
|
339
|
+
extraPaths: z.array(z.string()).optional(),
|
|
340
|
+
experimental: z
|
|
341
|
+
.object({
|
|
342
|
+
sessionMemory: z.boolean().optional(),
|
|
343
|
+
})
|
|
344
|
+
.strict()
|
|
345
|
+
.optional(),
|
|
346
|
+
provider: z
|
|
347
|
+
.union([z.literal("openai"), z.literal("local"), z.literal("gemini")])
|
|
348
|
+
.optional(),
|
|
349
|
+
remote: z
|
|
350
|
+
.object({
|
|
351
|
+
baseUrl: z.string().optional(),
|
|
352
|
+
apiKey: z.string().optional(),
|
|
353
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
354
|
+
batch: z
|
|
355
|
+
.object({
|
|
356
|
+
enabled: z.boolean().optional(),
|
|
357
|
+
wait: z.boolean().optional(),
|
|
358
|
+
concurrency: z.number().int().positive().optional(),
|
|
359
|
+
pollIntervalMs: z.number().int().nonnegative().optional(),
|
|
360
|
+
timeoutMinutes: z.number().int().positive().optional(),
|
|
361
|
+
})
|
|
362
|
+
.strict()
|
|
363
|
+
.optional(),
|
|
364
|
+
})
|
|
365
|
+
.strict()
|
|
366
|
+
.optional(),
|
|
367
|
+
fallback: z
|
|
368
|
+
.union([
|
|
369
|
+
z.literal("openai"),
|
|
370
|
+
z.literal("gemini"),
|
|
371
|
+
z.literal("local"),
|
|
372
|
+
z.literal("none"),
|
|
373
|
+
])
|
|
374
|
+
.optional(),
|
|
375
|
+
model: z.string().optional(),
|
|
376
|
+
local: z
|
|
377
|
+
.object({
|
|
378
|
+
modelPath: z.string().optional(),
|
|
379
|
+
modelCacheDir: z.string().optional(),
|
|
380
|
+
})
|
|
381
|
+
.strict()
|
|
382
|
+
.optional(),
|
|
383
|
+
store: z
|
|
384
|
+
.object({
|
|
385
|
+
driver: z.literal("sqlite").optional(),
|
|
386
|
+
path: z.string().optional(),
|
|
387
|
+
vector: z
|
|
388
|
+
.object({
|
|
389
|
+
enabled: z.boolean().optional(),
|
|
390
|
+
extensionPath: z.string().optional(),
|
|
391
|
+
})
|
|
392
|
+
.strict()
|
|
393
|
+
.optional(),
|
|
394
|
+
})
|
|
395
|
+
.strict()
|
|
396
|
+
.optional(),
|
|
397
|
+
chunking: z
|
|
398
|
+
.object({
|
|
399
|
+
tokens: z.number().int().positive().optional(),
|
|
400
|
+
overlap: z.number().int().nonnegative().optional(),
|
|
401
|
+
})
|
|
402
|
+
.strict()
|
|
403
|
+
.optional(),
|
|
404
|
+
sync: z
|
|
405
|
+
.object({
|
|
406
|
+
onSessionStart: z.boolean().optional(),
|
|
407
|
+
onSearch: z.boolean().optional(),
|
|
408
|
+
watch: z.boolean().optional(),
|
|
409
|
+
watchDebounceMs: z.number().int().nonnegative().optional(),
|
|
410
|
+
intervalMinutes: z.number().int().nonnegative().optional(),
|
|
411
|
+
sessions: z
|
|
412
|
+
.object({
|
|
413
|
+
deltaBytes: z.number().int().nonnegative().optional(),
|
|
414
|
+
deltaMessages: z.number().int().nonnegative().optional(),
|
|
415
|
+
})
|
|
416
|
+
.strict()
|
|
417
|
+
.optional(),
|
|
418
|
+
})
|
|
419
|
+
.strict()
|
|
420
|
+
.optional(),
|
|
421
|
+
query: z
|
|
422
|
+
.object({
|
|
423
|
+
maxResults: z.number().int().positive().optional(),
|
|
424
|
+
minScore: z.number().min(0).max(1).optional(),
|
|
425
|
+
hybrid: z
|
|
426
|
+
.object({
|
|
427
|
+
enabled: z.boolean().optional(),
|
|
428
|
+
vectorWeight: z.number().min(0).max(1).optional(),
|
|
429
|
+
textWeight: z.number().min(0).max(1).optional(),
|
|
430
|
+
candidateMultiplier: z.number().int().positive().optional(),
|
|
431
|
+
})
|
|
432
|
+
.strict()
|
|
433
|
+
.optional(),
|
|
434
|
+
})
|
|
435
|
+
.strict()
|
|
436
|
+
.optional(),
|
|
437
|
+
cache: z
|
|
438
|
+
.object({
|
|
439
|
+
enabled: z.boolean().optional(),
|
|
440
|
+
maxEntries: z.number().int().positive().optional(),
|
|
441
|
+
})
|
|
442
|
+
.strict()
|
|
443
|
+
.optional(),
|
|
444
|
+
})
|
|
445
|
+
.strict()
|
|
446
|
+
.optional();
|
|
447
|
+
export const AgentModelSchema = z.union([
|
|
448
|
+
z.string(),
|
|
449
|
+
z
|
|
450
|
+
.object({
|
|
451
|
+
primary: z.string().optional(),
|
|
452
|
+
fallbacks: z.array(z.string()).optional(),
|
|
453
|
+
})
|
|
454
|
+
.strict(),
|
|
455
|
+
]);
|
|
456
|
+
export const AgentEntrySchema = z
|
|
457
|
+
.object({
|
|
458
|
+
id: z.string(),
|
|
459
|
+
default: z.boolean().optional(),
|
|
460
|
+
name: z.string().optional(),
|
|
461
|
+
workspace: z.string().optional(),
|
|
462
|
+
agentDir: z.string().optional(),
|
|
463
|
+
model: AgentModelSchema.optional(),
|
|
464
|
+
skills: z.array(z.string()).optional(),
|
|
465
|
+
memorySearch: MemorySearchSchema,
|
|
466
|
+
humanDelay: HumanDelaySchema.optional(),
|
|
467
|
+
heartbeat: HeartbeatSchema,
|
|
468
|
+
identity: IdentitySchema,
|
|
469
|
+
groupChat: GroupChatSchema,
|
|
470
|
+
subagents: z
|
|
471
|
+
.object({
|
|
472
|
+
allowAgents: z.array(z.string()).optional(),
|
|
473
|
+
model: z
|
|
474
|
+
.union([
|
|
475
|
+
z.string(),
|
|
476
|
+
z
|
|
477
|
+
.object({
|
|
478
|
+
primary: z.string().optional(),
|
|
479
|
+
fallbacks: z.array(z.string()).optional(),
|
|
480
|
+
})
|
|
481
|
+
.strict(),
|
|
482
|
+
])
|
|
483
|
+
.optional(),
|
|
484
|
+
thinking: z.string().optional(),
|
|
485
|
+
})
|
|
486
|
+
.strict()
|
|
487
|
+
.optional(),
|
|
488
|
+
sandbox: AgentSandboxSchema,
|
|
489
|
+
tools: AgentToolsSchema,
|
|
490
|
+
})
|
|
491
|
+
.strict();
|
|
492
|
+
|
|
493
|
+
export const ToolsSchema = z
|
|
494
|
+
.object({
|
|
495
|
+
profile: ToolProfileSchema,
|
|
496
|
+
allow: z.array(z.string()).optional(),
|
|
497
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
498
|
+
deny: z.array(z.string()).optional(),
|
|
499
|
+
byProvider: z.record(z.string(), ToolPolicyWithProfileSchema).optional(),
|
|
500
|
+
web: ToolsWebSchema,
|
|
501
|
+
media: ToolsMediaSchema,
|
|
502
|
+
links: ToolsLinksSchema,
|
|
503
|
+
message: z
|
|
504
|
+
.object({
|
|
505
|
+
allowCrossContextSend: z.boolean().optional(),
|
|
506
|
+
crossContext: z
|
|
507
|
+
.object({
|
|
508
|
+
allowWithinProvider: z.boolean().optional(),
|
|
509
|
+
allowAcrossProviders: z.boolean().optional(),
|
|
510
|
+
marker: z
|
|
511
|
+
.object({
|
|
512
|
+
enabled: z.boolean().optional(),
|
|
513
|
+
prefix: z.string().optional(),
|
|
514
|
+
suffix: z.string().optional(),
|
|
515
|
+
})
|
|
516
|
+
.strict()
|
|
517
|
+
.optional(),
|
|
518
|
+
})
|
|
519
|
+
.strict()
|
|
520
|
+
.optional(),
|
|
521
|
+
broadcast: z
|
|
522
|
+
.object({
|
|
523
|
+
enabled: z.boolean().optional(),
|
|
524
|
+
})
|
|
525
|
+
.strict()
|
|
526
|
+
.optional(),
|
|
527
|
+
})
|
|
528
|
+
.strict()
|
|
529
|
+
.optional(),
|
|
530
|
+
agentToAgent: z
|
|
531
|
+
.object({
|
|
532
|
+
enabled: z.boolean().optional(),
|
|
533
|
+
allow: z.array(z.string()).optional(),
|
|
534
|
+
})
|
|
535
|
+
.strict()
|
|
536
|
+
.optional(),
|
|
537
|
+
elevated: z
|
|
538
|
+
.object({
|
|
539
|
+
enabled: z.boolean().optional(),
|
|
540
|
+
allowFrom: ElevatedAllowFromSchema,
|
|
541
|
+
})
|
|
542
|
+
.strict()
|
|
543
|
+
.optional(),
|
|
544
|
+
exec: z
|
|
545
|
+
.object({
|
|
546
|
+
host: z.enum(["sandbox", "gateway", "node"]).optional(),
|
|
547
|
+
security: z.enum(["deny", "allowlist", "full"]).optional(),
|
|
548
|
+
ask: z.enum(["off", "on-miss", "always"]).optional(),
|
|
549
|
+
node: z.string().optional(),
|
|
550
|
+
pathPrepend: z.array(z.string()).optional(),
|
|
551
|
+
safeBins: z.array(z.string()).optional(),
|
|
552
|
+
backgroundMs: z.number().int().positive().optional(),
|
|
553
|
+
timeoutSec: z.number().int().positive().optional(),
|
|
554
|
+
cleanupMs: z.number().int().positive().optional(),
|
|
555
|
+
notifyOnExit: z.boolean().optional(),
|
|
556
|
+
applyPatch: z
|
|
557
|
+
.object({
|
|
558
|
+
enabled: z.boolean().optional(),
|
|
559
|
+
allowModels: z.array(z.string()).optional(),
|
|
560
|
+
})
|
|
561
|
+
.strict()
|
|
562
|
+
.optional(),
|
|
563
|
+
})
|
|
564
|
+
.strict()
|
|
565
|
+
.optional(),
|
|
566
|
+
subagents: z
|
|
567
|
+
.object({
|
|
568
|
+
tools: ToolPolicySchema,
|
|
569
|
+
})
|
|
570
|
+
.strict()
|
|
571
|
+
.optional(),
|
|
572
|
+
sandbox: z
|
|
573
|
+
.object({
|
|
574
|
+
tools: ToolPolicySchema,
|
|
575
|
+
})
|
|
576
|
+
.strict()
|
|
577
|
+
.optional(),
|
|
578
|
+
})
|
|
579
|
+
.strict()
|
|
580
|
+
.superRefine((value, ctx) => {
|
|
581
|
+
validateToolPolicyConflict("tools", value, ctx);
|
|
582
|
+
})
|
|
583
|
+
.optional();
|
|
584
|
+
|
|
585
|
+
export const AgentDefaultsSchema = z
|
|
586
|
+
.object({
|
|
587
|
+
model: z
|
|
588
|
+
.object({
|
|
589
|
+
primary: z.string().optional(),
|
|
590
|
+
fallbacks: z.array(z.string()).optional(),
|
|
591
|
+
})
|
|
592
|
+
.strict()
|
|
593
|
+
.optional(),
|
|
594
|
+
imageModel: z
|
|
595
|
+
.object({
|
|
596
|
+
primary: z.string().optional(),
|
|
597
|
+
fallbacks: z.array(z.string()).optional(),
|
|
598
|
+
})
|
|
599
|
+
.strict()
|
|
600
|
+
.optional(),
|
|
601
|
+
models: z
|
|
602
|
+
.record(
|
|
603
|
+
z.string(),
|
|
604
|
+
z
|
|
605
|
+
.object({
|
|
606
|
+
alias: z.string().optional(),
|
|
607
|
+
/** Provider-specific API parameters (e.g., GLM-4.7 thinking mode). */
|
|
608
|
+
params: z.record(z.string(), z.unknown()).optional(),
|
|
609
|
+
})
|
|
610
|
+
.strict(),
|
|
611
|
+
)
|
|
612
|
+
.optional(),
|
|
613
|
+
workspace: z.string().optional(),
|
|
614
|
+
adminEntityId: z
|
|
615
|
+
.string()
|
|
616
|
+
.regex(
|
|
617
|
+
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
|
|
618
|
+
"invalid UUID format",
|
|
619
|
+
)
|
|
620
|
+
.optional(),
|
|
621
|
+
repoRoot: z.string().optional(),
|
|
622
|
+
skipBootstrap: z.boolean().optional(),
|
|
623
|
+
bootstrapMaxChars: z.number().int().positive().optional(),
|
|
624
|
+
enableBootstrapProviders: z.boolean().optional(),
|
|
625
|
+
userTimezone: z.string().optional(),
|
|
626
|
+
timeFormat: z
|
|
627
|
+
.union([z.literal("auto"), z.literal("12"), z.literal("24")])
|
|
628
|
+
.optional(),
|
|
629
|
+
envelopeTimezone: z.string().optional(),
|
|
630
|
+
envelopeTimestamp: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
631
|
+
envelopeElapsed: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
632
|
+
contextTokens: z.number().int().positive().optional(),
|
|
633
|
+
cliBackends: z.record(z.string(), CliBackendSchema).optional(),
|
|
634
|
+
memorySearch: MemorySearchSchema,
|
|
635
|
+
contextPruning: z
|
|
636
|
+
.object({
|
|
637
|
+
mode: z.union([z.literal("off"), z.literal("cache-ttl")]).optional(),
|
|
638
|
+
ttl: z.string().optional(),
|
|
639
|
+
keepLastAssistants: z.number().int().nonnegative().optional(),
|
|
640
|
+
softTrimRatio: z.number().min(0).max(1).optional(),
|
|
641
|
+
hardClearRatio: z.number().min(0).max(1).optional(),
|
|
642
|
+
minPrunableToolChars: z.number().int().nonnegative().optional(),
|
|
643
|
+
tools: z
|
|
644
|
+
.object({
|
|
645
|
+
allow: z.array(z.string()).optional(),
|
|
646
|
+
deny: z.array(z.string()).optional(),
|
|
647
|
+
})
|
|
648
|
+
.strict()
|
|
649
|
+
.optional(),
|
|
650
|
+
softTrim: z
|
|
651
|
+
.object({
|
|
652
|
+
maxChars: z.number().int().nonnegative().optional(),
|
|
653
|
+
headChars: z.number().int().nonnegative().optional(),
|
|
654
|
+
tailChars: z.number().int().nonnegative().optional(),
|
|
655
|
+
})
|
|
656
|
+
.strict()
|
|
657
|
+
.optional(),
|
|
658
|
+
hardClear: z
|
|
659
|
+
.object({
|
|
660
|
+
enabled: z.boolean().optional(),
|
|
661
|
+
placeholder: z.string().optional(),
|
|
662
|
+
})
|
|
663
|
+
.strict()
|
|
664
|
+
.optional(),
|
|
665
|
+
})
|
|
666
|
+
.strict()
|
|
667
|
+
.optional(),
|
|
668
|
+
compaction: z
|
|
669
|
+
.object({
|
|
670
|
+
mode: z
|
|
671
|
+
.union([z.literal("default"), z.literal("safeguard")])
|
|
672
|
+
.optional(),
|
|
673
|
+
reserveTokensFloor: z.number().int().nonnegative().optional(),
|
|
674
|
+
maxHistoryShare: z.number().min(0.1).max(0.9).optional(),
|
|
675
|
+
memoryFlush: z
|
|
676
|
+
.object({
|
|
677
|
+
enabled: z.boolean().optional(),
|
|
678
|
+
softThresholdTokens: z.number().int().nonnegative().optional(),
|
|
679
|
+
prompt: z.string().optional(),
|
|
680
|
+
systemPrompt: z.string().optional(),
|
|
681
|
+
})
|
|
682
|
+
.strict()
|
|
683
|
+
.optional(),
|
|
684
|
+
})
|
|
685
|
+
.strict()
|
|
686
|
+
.optional(),
|
|
687
|
+
thinkingDefault: z
|
|
688
|
+
.union([
|
|
689
|
+
z.literal("off"),
|
|
690
|
+
z.literal("minimal"),
|
|
691
|
+
z.literal("low"),
|
|
692
|
+
z.literal("medium"),
|
|
693
|
+
z.literal("high"),
|
|
694
|
+
z.literal("xhigh"),
|
|
695
|
+
])
|
|
696
|
+
.optional(),
|
|
697
|
+
verboseDefault: z
|
|
698
|
+
.union([z.literal("off"), z.literal("on"), z.literal("full")])
|
|
699
|
+
.optional(),
|
|
700
|
+
elevatedDefault: z
|
|
701
|
+
.union([
|
|
702
|
+
z.literal("off"),
|
|
703
|
+
z.literal("on"),
|
|
704
|
+
z.literal("ask"),
|
|
705
|
+
z.literal("full"),
|
|
706
|
+
])
|
|
707
|
+
.optional(),
|
|
708
|
+
blockStreamingDefault: z
|
|
709
|
+
.union([z.literal("off"), z.literal("on")])
|
|
710
|
+
.optional(),
|
|
711
|
+
blockStreamingBreak: z
|
|
712
|
+
.union([z.literal("text_end"), z.literal("message_end")])
|
|
713
|
+
.optional(),
|
|
714
|
+
blockStreamingChunk: BlockStreamingChunkSchema.optional(),
|
|
715
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
716
|
+
humanDelay: HumanDelaySchema.optional(),
|
|
717
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
718
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
719
|
+
typingIntervalSeconds: z.number().int().positive().optional(),
|
|
720
|
+
typingMode: z
|
|
721
|
+
.union([
|
|
722
|
+
z.literal("never"),
|
|
723
|
+
z.literal("instant"),
|
|
724
|
+
z.literal("thinking"),
|
|
725
|
+
z.literal("message"),
|
|
726
|
+
])
|
|
727
|
+
.optional(),
|
|
728
|
+
heartbeat: HeartbeatSchema,
|
|
729
|
+
maxConcurrent: z.number().int().positive().optional(),
|
|
730
|
+
subagents: z
|
|
731
|
+
.object({
|
|
732
|
+
maxConcurrent: z.number().int().positive().optional(),
|
|
733
|
+
archiveAfterMinutes: z.number().int().positive().optional(),
|
|
734
|
+
model: z
|
|
735
|
+
.union([
|
|
736
|
+
z.string(),
|
|
737
|
+
z
|
|
738
|
+
.object({
|
|
739
|
+
primary: z.string().optional(),
|
|
740
|
+
fallbacks: z.array(z.string()).optional(),
|
|
741
|
+
})
|
|
742
|
+
.strict(),
|
|
743
|
+
])
|
|
744
|
+
.optional(),
|
|
745
|
+
thinking: z.string().optional(),
|
|
746
|
+
})
|
|
747
|
+
.strict()
|
|
748
|
+
.optional(),
|
|
749
|
+
sandbox: z
|
|
750
|
+
.object({
|
|
751
|
+
mode: z
|
|
752
|
+
.union([z.literal("off"), z.literal("non-main"), z.literal("all")])
|
|
753
|
+
.optional(),
|
|
754
|
+
workspaceAccess: z
|
|
755
|
+
.union([z.literal("none"), z.literal("ro"), z.literal("rw")])
|
|
756
|
+
.optional(),
|
|
757
|
+
sessionToolsVisibility: z
|
|
758
|
+
.union([z.literal("spawned"), z.literal("all")])
|
|
759
|
+
.optional(),
|
|
760
|
+
scope: z
|
|
761
|
+
.union([
|
|
762
|
+
z.literal("session"),
|
|
763
|
+
z.literal("agent"),
|
|
764
|
+
z.literal("shared"),
|
|
765
|
+
])
|
|
766
|
+
.optional(),
|
|
767
|
+
perSession: z.boolean().optional(),
|
|
768
|
+
workspaceRoot: z.string().optional(),
|
|
769
|
+
docker: SandboxDockerSchema,
|
|
770
|
+
browser: SandboxBrowserSchema,
|
|
771
|
+
prune: SandboxPruneSchema,
|
|
772
|
+
})
|
|
773
|
+
.strict()
|
|
774
|
+
.optional(),
|
|
775
|
+
})
|
|
776
|
+
.strict()
|
|
777
|
+
.optional();
|