@sema-agent/server 1.310.0 → 1.312.0

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.
Files changed (72) hide show
  1. package/dist/auth-keys.d.ts +14 -0
  2. package/dist/auth-keys.js +31 -0
  3. package/dist/brain.d.ts +1 -1
  4. package/dist/capabilities/center-prompts.d.ts +3 -28
  5. package/dist/capabilities/center-prompts.js +2 -107
  6. package/dist/capabilities/select-environment-tool.d.ts +1 -1
  7. package/dist/config-lkg.js +1 -1
  8. package/dist/config-types.d.ts +306 -0
  9. package/dist/config-types.js +2 -0
  10. package/dist/config.d.ts +4 -305
  11. package/dist/config.js +1 -1
  12. package/dist/env-facts.d.ts +1 -1
  13. package/dist/hooks/hook-llm.d.ts +1 -1
  14. package/dist/http/server.d.ts +5 -85
  15. package/dist/http/wire-types.d.ts +84 -0
  16. package/dist/http/wire-types.js +2 -0
  17. package/dist/images/manifest.d.ts +1 -1
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.js +1 -1
  20. package/dist/main.js +134 -143
  21. package/dist/per-task-image.d.ts +2 -2
  22. package/dist/plugins/file-run-store.d.ts +1 -1
  23. package/dist/plugins/local-session-store.d.ts +2 -2
  24. package/dist/plugins/local-session-store.js +1 -1
  25. package/dist/plugins/memory-run-store.d.ts +1 -1
  26. package/dist/plugins/pg-approval-store.js +1 -27
  27. package/dist/plugins/pg-checkpoint-store.js +1 -5
  28. package/dist/plugins/pg-image-bake.d.ts +2 -2
  29. package/dist/plugins/pg-image-bake.js +2 -54
  30. package/dist/plugins/pg-image-index.d.ts +2 -2
  31. package/dist/plugins/pg-image-index.js +1 -44
  32. package/dist/plugins/pg-pool.d.ts +1 -1
  33. package/dist/plugins/pg-run-store.d.ts +1 -1
  34. package/dist/plugins/pg-run-store.js +2 -16
  35. package/dist/plugins/pg-session-storage.d.ts +2 -2
  36. package/dist/plugins/pg-session-storage.js +3 -7
  37. package/dist/plugins/pg-tool-result-store.js +1 -1
  38. package/dist/plugins/session-store.d.ts +1 -1
  39. package/dist/plugins/sql-escape.d.ts +2 -0
  40. package/dist/plugins/sql-escape.js +4 -0
  41. package/dist/plugins/sql-row-helpers.d.ts +7 -0
  42. package/dist/plugins/sql-row-helpers.js +43 -0
  43. package/dist/plugins/store-backend.d.ts +1 -1
  44. package/dist/plugins/store-contracts.d.ts +205 -0
  45. package/dist/plugins/store-contracts.js +61 -0
  46. package/dist/plugins/tidb-approval-store.d.ts +1 -0
  47. package/dist/plugins/tidb-approval-store.js +2 -11
  48. package/dist/plugins/tidb-checkpoint-store.js +1 -5
  49. package/dist/plugins/tidb-image-bake.d.ts +3 -64
  50. package/dist/plugins/tidb-image-bake.js +3 -54
  51. package/dist/plugins/tidb-image-index.d.ts +3 -52
  52. package/dist/plugins/tidb-image-index.js +2 -43
  53. package/dist/plugins/tidb-pool.d.ts +1 -1
  54. package/dist/plugins/tidb-run-store.d.ts +2 -32
  55. package/dist/plugins/tidb-run-store.js +2 -16
  56. package/dist/plugins/tidb-session-storage.js +1 -5
  57. package/dist/plugins/tidb-session-store.d.ts +2 -2
  58. package/dist/plugins/tidb-session-store.js +2 -2
  59. package/dist/plugins/tidb-tool-result-store.d.ts +1 -1
  60. package/dist/plugins/tidb-tool-result-store.js +2 -3
  61. package/dist/prompts-domain-validate.d.ts +29 -0
  62. package/dist/prompts-domain-validate.js +109 -0
  63. package/dist/security.d.ts +6 -16
  64. package/dist/security.js +1 -30
  65. package/dist/sema-registry.d.ts +1 -1
  66. package/dist/session-sync-kernel.d.ts +47 -0
  67. package/dist/session-sync-kernel.js +47 -0
  68. package/dist/session-sync.d.ts +3 -45
  69. package/dist/session-sync.js +2 -46
  70. package/dist/trace/artifacts.d.ts +1 -1
  71. package/dist/trace/project.d.ts +1 -1
  72. package/package.json +1 -1
@@ -0,0 +1,14 @@
1
+ export interface ApprovalHmacKey {
2
+ kid: string;
3
+ key: string;
4
+ status?: "active" | "retiring";
5
+ }
6
+ export declare function parseApprovalHmacKeys(raw: string | undefined): ApprovalHmacKey[];
7
+ export interface PrincipalJwtKey {
8
+ kid: string;
9
+ alg: "EdDSA" | "RS256" | "ES256";
10
+ key: string;
11
+ status?: "active" | "retiring";
12
+ }
13
+ export declare function parsePrincipalJwks(raw: string | undefined): PrincipalJwtKey[];
14
+ //# sourceMappingURL=auth-keys.d.ts.map
@@ -0,0 +1,31 @@
1
+ export function parseApprovalHmacKeys(raw) {
2
+ if (!raw)
3
+ return [];
4
+ try {
5
+ const v = JSON.parse(raw);
6
+ if (!Array.isArray(v))
7
+ return [];
8
+ return v.filter((k) => !!k && typeof k.kid === "string" && typeof k.key === "string");
9
+ }
10
+ catch {
11
+ return [];
12
+ }
13
+ }
14
+ export function parsePrincipalJwks(raw) {
15
+ if (!raw)
16
+ return [];
17
+ const ALGS = new Set(["EdDSA", "RS256", "ES256"]);
18
+ try {
19
+ const v = JSON.parse(raw);
20
+ if (!Array.isArray(v))
21
+ return [];
22
+ return v.filter((k) => {
23
+ const e = k;
24
+ return !!e && typeof e.kid === "string" && typeof e.key === "string" && typeof e.alg === "string" && ALGS.has(e.alg);
25
+ });
26
+ }
27
+ catch {
28
+ return [];
29
+ }
30
+ }
31
+ //# sourceMappingURL=auth-keys.js.map
package/dist/brain.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type Brain, type BreakerState } from "@sema-agent/core";
2
- import type { ServiceConfig } from "./config.js";
2
+ import type { ServiceConfig } from "./config-types.js";
3
3
  export declare function createBrain(config: ServiceConfig, deps?: {
4
4
  fetchImpl?: typeof fetch;
5
5
  breakerState?: BreakerState;
@@ -1,31 +1,6 @@
1
- import { type PromptProvider, type PromptTextDeclaration, type PublishedPromptArtifactEnvelope } from "@sema-agent/core";
2
- export interface EffectiveCenterPrompts {
3
- packId: string;
4
- contentDigest: string;
5
- sections: PromptTextDeclaration[];
6
- scenarioOverrides?: Record<string, PromptTextDeclaration[]>;
7
- }
8
- export declare function validateCenterPrompts(raw: unknown): {
9
- ok: true;
10
- value: EffectiveCenterPrompts;
11
- } | {
12
- ok: false;
13
- error: string;
14
- };
15
- export declare const CORE_ENGINE_VERSION: string;
16
- export interface PromptsDomainFaces {
17
- declarations?: EffectiveCenterPrompts;
18
- catalog?: PublishedPromptArtifactEnvelope;
19
- identity: string;
20
- axes: Array<"declarations" | "catalog">;
21
- }
22
- export declare function validatePromptsDomain(raw: unknown): {
23
- ok: true;
24
- value: PromptsDomainFaces;
25
- } | {
26
- ok: false;
27
- error: string;
28
- };
1
+ import { type PromptProvider, type PublishedPromptArtifactEnvelope } from "@sema-agent/core";
2
+ import { type EffectiveCenterPrompts, type PromptsDomainFaces } from "../prompts-domain-validate.js";
3
+ export { validateCenterPrompts, validatePromptsDomain, CORE_ENGINE_VERSION, type EffectiveCenterPrompts, type PromptsDomainFaces } from "../prompts-domain-validate.js";
29
4
  export declare function withPromptArtifactBackfill(inner: {
30
5
  get(d: string, o: {
31
6
  engineVersion: string;
@@ -1,111 +1,6 @@
1
- import { createHash } from "node:crypto";
2
- import { createRequire } from "node:module";
3
- import { readFileSync } from "node:fs";
4
- import { dirname, join } from "node:path";
5
1
  import { verifyPromptArtifact } from "@sema-agent/core";
6
- const ID_RE = /^[a-z0-9][a-z0-9/._-]*$/;
7
- const SLOTS = new Set(["identity", "scenario", "behavior"]);
8
- const HASH_RE = /^sha256:[0-9a-f]{64}$/;
9
- function declarationIssue(d, where) {
10
- if (d === null || typeof d !== "object")
11
- return `${where}: declaration is not an object`;
12
- const o = d;
13
- if (typeof o.id !== "string" || o.id.length === 0 || o.id.length > 128 || !ID_RE.test(o.id))
14
- return `${where}: bad id`;
15
- if (o.id.startsWith("core/"))
16
- return `${where}: id in the reserved core/ namespace`;
17
- if (typeof o.slot !== "string" || !SLOTS.has(o.slot))
18
- return `${where}: bad slot`;
19
- if (typeof o.text !== "string" || o.text.length === 0)
20
- return `${where}: text must be a non-empty string`;
21
- if (typeof o.contentHash !== "string" || !HASH_RE.test(o.contentHash))
22
- return `${where}: contentHash is required (sha256:<64hex> — the epoch declaration axis needs it for byte-level change detection)`;
23
- const expected = `sha256:${createHash("sha256").update(o.text).digest("hex")}`;
24
- if (o.contentHash !== expected)
25
- return `${where}: contentHash does not match sha256(text) — stale or tampered declaration`;
26
- return undefined;
27
- }
28
- export function validateCenterPrompts(raw) {
29
- if (raw === null || typeof raw !== "object")
30
- return { ok: false, error: "prompts is not an object" };
31
- const p = raw;
32
- if (typeof p.packId !== "string" || !/^center:[0-9a-f]{12}$/.test(p.packId))
33
- return { ok: false, error: "bad packId form (center:<digest12>)" };
34
- if (typeof p.contentDigest !== "string" || !HASH_RE.test(p.contentDigest))
35
- return { ok: false, error: "bad contentDigest form" };
36
- const arrayIssue = (decls, where) => {
37
- if (!Array.isArray(decls))
38
- return `${where} is not an array`;
39
- if (decls.length === 0)
40
- return `${where} is empty (an empty replacement set is not a v1 semantic — omit the key instead)`;
41
- const seen = new Set();
42
- for (let i = 0; i < decls.length; i++) {
43
- const issue = declarationIssue(decls[i], `${where}[${i}]`);
44
- if (issue)
45
- return issue;
46
- const id = decls[i].id;
47
- if (seen.has(id))
48
- return `${where}[${i}]: duplicate id "${id}" (core composer throws on duplicates)`;
49
- seen.add(id);
50
- }
51
- return undefined;
52
- };
53
- const sectionsIssue = arrayIssue(p.sections, "sections");
54
- if (sectionsIssue)
55
- return { ok: false, error: sectionsIssue };
56
- if (p.scenarioOverrides !== undefined) {
57
- if (p.scenarioOverrides === null || typeof p.scenarioOverrides !== "object" || Array.isArray(p.scenarioOverrides)) {
58
- return { ok: false, error: "scenarioOverrides is not an object" };
59
- }
60
- for (const [name, decls] of Object.entries(p.scenarioOverrides)) {
61
- const issue = arrayIssue(decls, `scenarioOverrides[${name}]`);
62
- if (issue)
63
- return { ok: false, error: issue };
64
- }
65
- }
66
- return { ok: true, value: raw };
67
- }
68
- export const CORE_ENGINE_VERSION = (() => {
69
- try {
70
- const entry = createRequire(import.meta.url).resolve("@sema-agent/core");
71
- return JSON.parse(readFileSync(join(dirname(entry), "..", "package.json"), "utf8")).version ?? "0.0.0";
72
- }
73
- catch {
74
- return "0.0.0";
75
- }
76
- })();
77
- export function validatePromptsDomain(raw) {
78
- if (raw === null || typeof raw !== "object")
79
- return { ok: false, error: "prompts is not an object" };
80
- const w = raw;
81
- if (w.schemaVersion === undefined) {
82
- const legacy = validateCenterPrompts(raw);
83
- if (!legacy.ok)
84
- return legacy;
85
- return { ok: true, value: { declarations: legacy.value, identity: `${legacy.value.contentDigest}+-`, axes: ["declarations"] } };
86
- }
87
- if (w.schemaVersion !== 1)
88
- return { ok: false, error: `unsupported prompts schemaVersion ${String(w.schemaVersion)}` };
89
- if (w.declarations === undefined && w.catalog === undefined)
90
- return { ok: false, error: "dual-axis prompts carries neither axis (at least one of declarations|catalog required)" };
91
- const value = { identity: "", axes: [] };
92
- if (w.declarations !== undefined) {
93
- const d = validateCenterPrompts(w.declarations);
94
- if (!d.ok)
95
- return { ok: false, error: `declarations axis: ${d.error}` };
96
- value.declarations = d.value;
97
- value.axes.push("declarations");
98
- }
99
- if (w.catalog !== undefined) {
100
- const c = verifyPromptArtifact(w.catalog, { engineVersion: CORE_ENGINE_VERSION });
101
- if (!c.ok)
102
- return { ok: false, error: `catalog axis: ${c.code}: ${c.reason}` };
103
- value.catalog = w.catalog;
104
- value.axes.push("catalog");
105
- }
106
- value.identity = `${value.declarations?.contentDigest ?? "-"}+${value.catalog?.artifact.artifactDigest ?? "-"}`;
107
- return { ok: true, value };
108
- }
2
+ import { CORE_ENGINE_VERSION } from "../prompts-domain-validate.js";
3
+ export { validateCenterPrompts, validatePromptsDomain, CORE_ENGINE_VERSION } from "../prompts-domain-validate.js";
109
4
  export function withPromptArtifactBackfill(inner, fetchRaw, log) {
110
5
  const inFlight = new Map();
111
6
  return {
@@ -1,6 +1,6 @@
1
1
  import type { ToolSpec } from "@sema-agent/core";
2
2
  import { type SandboxImageResolver } from "../per-task-image.js";
3
- import type { ImageViewer, ImageIndexEntry, ImageListFilter } from "../plugins/tidb-image-index.js";
3
+ import type { ImageViewer, ImageIndexEntry, ImageListFilter } from "../plugins/store-contracts.js";
4
4
  export interface EnvironmentCatalog extends SandboxImageResolver {
5
5
  list(filter: ImageListFilter): Promise<{
6
6
  entries: ImageIndexEntry[];
@@ -2,7 +2,7 @@ import { promises as fs } from "node:fs";
2
2
  import { homedir } from "node:os";
3
3
  import { join, dirname } from "node:path";
4
4
  import { randomBytes } from "node:crypto";
5
- import { validatePromptsDomain } from "./capabilities/center-prompts.js";
5
+ import { validatePromptsDomain } from "./prompts-domain-validate.js";
6
6
  export function defaultSkillCacheDir() {
7
7
  return join(process.env.SEMA_CONFIG_DIR ?? join(homedir(), ".sema"), "skill-cache");
8
8
  }
@@ -0,0 +1,306 @@
1
+ import type { SealedKeyPoison } from "./sealed-key.js";
2
+ import type { McpServerSpec, Model, ModelRoles } from "@sema-agent/core";
3
+ import type { ApprovalHmacKey, PrincipalJwtKey } from "./auth-keys.js";
4
+ import type { ElicitationThrottle } from "./elicitation.js";
5
+ import type { InfraCostRates } from "./finance/cost-taxonomy.js";
6
+ import type { Autonomy, CommandRule } from "./runtime-governance.js";
7
+ export interface ScopedMcpServer {
8
+ scenarios: string[];
9
+ spec: McpServerSpec;
10
+ }
11
+ export interface ImageBakeConfig {
12
+ enabled: boolean;
13
+ runnerPrincipal: string;
14
+ registry: string | null;
15
+ cacheBase: string | null;
16
+ defaultBaseRef: string | null;
17
+ leaseMs: number;
18
+ staleMs: number;
19
+ submitRateMax: number;
20
+ submitRateWindowSec: number;
21
+ }
22
+ export interface ServiceConfig {
23
+ port: number;
24
+ gatewayBaseUrl: string;
25
+ gatewayApiKey?: string;
26
+ gatewayFallbackUrls: string[];
27
+ anthropic?: {
28
+ apiKey?: string;
29
+ authToken?: string;
30
+ baseUrl?: string;
31
+ version?: string;
32
+ cacheBreakpoints: boolean;
33
+ maxRetries: number;
34
+ };
35
+ resilience: {
36
+ connectTimeoutMs: number;
37
+ firstTokenTimeoutMs: number;
38
+ idleTimeoutMs: number;
39
+ circuitBreaker: boolean;
40
+ failureThreshold: number;
41
+ cooldownMs: number;
42
+ };
43
+ model: Model;
44
+ models: Record<string, Model>;
45
+ modelApiKeyEnv: Record<string, string>;
46
+ modelApiKeys: Record<string, string | SealedKeyPoison>;
47
+ modelQuotaWeights: Record<string, number>;
48
+ tiers: Record<string, string>;
49
+ projects: Record<string, {
50
+ displayName?: string;
51
+ gitRemotes?: string[];
52
+ defaultScopes?: string[];
53
+ }>;
54
+ roles: ModelRoles;
55
+ sessionBackend: "memory" | "tidb" | "auto";
56
+ sessionCacheTtlSec: number;
57
+ rewindSnapshotMaxMb?: number;
58
+ memoryEngineEnabled: boolean;
59
+ memoryEngineDir?: string;
60
+ memoryEngineRemoteLaneAllowed: boolean;
61
+ memoryScope?: string;
62
+ memorySync?: {
63
+ url: string;
64
+ token: string;
65
+ scope: string;
66
+ maxPushEntries?: number;
67
+ maxPullEntries?: number;
68
+ };
69
+ remoteExec?: {
70
+ provider: "e2b";
71
+ apiKey: string;
72
+ template?: string;
73
+ timeoutMs?: number;
74
+ livenessMs?: number;
75
+ allowInternetAccess?: boolean;
76
+ sandboxEnv?: Record<string, string>;
77
+ mountPath?: string;
78
+ } | {
79
+ provider: "k8s";
80
+ image: string;
81
+ apiUrl?: string;
82
+ token?: string;
83
+ caCert?: string;
84
+ insecureTls?: boolean;
85
+ namespace?: string;
86
+ runtimeClass?: string;
87
+ mountPath?: string;
88
+ timeoutMs?: number;
89
+ memory?: string;
90
+ cpu?: string;
91
+ s3Snapshot?: {
92
+ endpoint: string;
93
+ bucket: string;
94
+ accessKey: string;
95
+ secretKey: string;
96
+ region?: string;
97
+ keyPrefix?: string;
98
+ presignTtlSec?: number;
99
+ };
100
+ } | {
101
+ provider: "ssh";
102
+ host: string;
103
+ port?: number;
104
+ username: string;
105
+ privateKey: string;
106
+ mountPath?: string;
107
+ } | {
108
+ provider: "adb";
109
+ serial: string;
110
+ adbPath?: string;
111
+ mountPath?: string;
112
+ } | {
113
+ provider: "host";
114
+ workspaceBase?: string;
115
+ commandTimeoutMs?: number;
116
+ } | {
117
+ provider: "local-docker";
118
+ image: string;
119
+ mountPath?: string;
120
+ dockerPath?: string;
121
+ dockerHost?: string;
122
+ memory?: string;
123
+ cpus?: number;
124
+ pidsLimit?: number;
125
+ dropAllCaps?: boolean;
126
+ network?: "none" | "bridge" | "host";
127
+ commandTimeoutMs?: number;
128
+ env?: Record<string, string>;
129
+ };
130
+ worktreeIsolation?: {
131
+ repoRoot: string;
132
+ allowedRoots?: string[];
133
+ commit?: string;
134
+ };
135
+ mcpServers?: ScopedMcpServer[];
136
+ tidb?: {
137
+ host: string;
138
+ port: number;
139
+ user: string;
140
+ password: string;
141
+ database: string;
142
+ connectionLimit?: number;
143
+ };
144
+ dbBackend: "mysql" | "pg" | "local" | "memory";
145
+ dbBackendExplicit: boolean;
146
+ localDataRoot?: string;
147
+ pg?: {
148
+ host: string;
149
+ port: number;
150
+ user: string;
151
+ password: string;
152
+ database: string;
153
+ connectionLimit?: number;
154
+ };
155
+ dbQueryTimeoutMs?: number;
156
+ snapshotBlobStore?: {
157
+ endpoint: string;
158
+ bucket: string;
159
+ accessKey: string;
160
+ secretKey: string;
161
+ region?: string;
162
+ keyPrefix?: string;
163
+ presignTtlSec?: number;
164
+ };
165
+ snapshotBlobSqlMaxBytes?: number;
166
+ snapshotBlobAllowSql: boolean;
167
+ pluginsAllowHosts: string[];
168
+ bindHost?: string;
169
+ attachmentOrphanGraceMs: number;
170
+ workspaceFileMaxBytes: number;
171
+ sendUserFile?: {
172
+ endpoint: string;
173
+ publicEndpoint?: string;
174
+ publicBucket: string;
175
+ privateBucket: string;
176
+ privateKeyPrefix: string;
177
+ sandboxPutEndpoint?: string;
178
+ accessKey: string;
179
+ secretKey: string;
180
+ region?: string;
181
+ defaultTtlSec: number;
182
+ };
183
+ authToken?: string;
184
+ authTokens: Record<string, string>;
185
+ allowUnauthedWrites?: boolean;
186
+ metricsToken?: string;
187
+ traceToken?: string;
188
+ corsOrigins: string[];
189
+ attachmentMaxBytes: number;
190
+ attachmentMimeAllowlist?: string[];
191
+ attachmentUnboundTtlMs: number;
192
+ principalHeader: string;
193
+ requirePrincipal: boolean;
194
+ autonomy?: Autonomy;
195
+ commandPolicy?: CommandRule[];
196
+ approvalRequire: string[];
197
+ operatorPrincipals: string[];
198
+ approvalDeny: string[];
199
+ approvalPollMs: number;
200
+ durableApproval: boolean;
201
+ resourceSuspend: boolean;
202
+ resourceSuspendTtlSec: number;
203
+ approvalAutoBudget: number;
204
+ approvalNeverAuto: string[];
205
+ approvalHmacKeys: ApprovalHmacKey[];
206
+ directApprovalDoor: boolean;
207
+ principalJwtPubkeys: PrincipalJwtKey[];
208
+ principalJwtIss?: string;
209
+ principalJwtAud?: string;
210
+ principalJwtMaxTtlSec: number;
211
+ directDoorActive: boolean;
212
+ infraCostRates: InfraCostRates;
213
+ leaderEnabled: boolean;
214
+ leaderFanoutEnabled: boolean;
215
+ routerEnabled: boolean;
216
+ selfOrchestrationEnabled: boolean;
217
+ forkEnabled: boolean;
218
+ experimentalObserverAgents: boolean;
219
+ selfOrchestrationModels: string[];
220
+ selfOrchestrationWorkerIsolation: boolean;
221
+ workflowRunStoreBackend: "auto" | "file" | "memory";
222
+ workflowOrphanGraceMs: number;
223
+ schedulerEnabled: boolean;
224
+ projectMemoryDisabled: boolean;
225
+ schedulerStorePath?: string;
226
+ configBootFetchBudgetMs: number;
227
+ schedulerSessionWakeup: boolean;
228
+ planModeEnabled: boolean;
229
+ workflowJournalRetentionMs: number;
230
+ workflowRunRetentionMs: number;
231
+ backgroundAgentRetentionMs: number;
232
+ backgroundAgentStaleRunningMs: number;
233
+ backgroundAgentParkClaimStaleMs: number;
234
+ rosterRetentionMs: number;
235
+ scratchpadSweepTtlMs: number;
236
+ sandboxPkgSource?: string;
237
+ sessionAutoTitle: boolean;
238
+ selectEnvironmentTool: boolean;
239
+ envFactsEnabled: boolean;
240
+ sensitiveWritePatterns: string[];
241
+ manualModeShellGate?: "always" | "classify";
242
+ toolDeferLongtail: boolean;
243
+ lspEnabled: boolean;
244
+ lspHostEnabled: boolean;
245
+ drainGraceMs: number;
246
+ sighupIdleGraceMs: number;
247
+ mcpElicitation: {
248
+ enabled: boolean;
249
+ throttle: ElicitationThrottle;
250
+ };
251
+ askQuestionEnabled: boolean;
252
+ toolApprovalEnabled: boolean;
253
+ workflowAgentsReadOnly: boolean;
254
+ imageBakes: ImageBakeConfig;
255
+ toolTrace: boolean;
256
+ traceThinking: boolean;
257
+ logLevel: "debug" | "info" | "warn" | "error";
258
+ rateLimitPerMin: number;
259
+ maxTaskCostUsd: number;
260
+ maxTaskTokens: number;
261
+ maxPrincipalCostUsd: number;
262
+ costQuotaWindowSec: number;
263
+ degrade?: {
264
+ to: string;
265
+ atCostFraction: number;
266
+ reactive: boolean;
267
+ downgradeOn?: ("rate_limit" | "breaker_open")[];
268
+ toSupportsImages: boolean;
269
+ };
270
+ cascadeLadder: string[];
271
+ otel?: {
272
+ endpoint: string;
273
+ intervalMs: number;
274
+ serviceName: string;
275
+ headers: Record<string, string>;
276
+ };
277
+ approvalTimeoutSec: number;
278
+ reapIntervalSec: number;
279
+ toolResultTtlSec: number;
280
+ runStaleSec: number;
281
+ syncImportLeaseStaleSec: number;
282
+ gitApiBaseUrl?: string;
283
+ gitApiToken?: string;
284
+ memoryEngineBackend: "file" | "pg" | "tidb";
285
+ workflowSizeGuideline?: "small" | "medium" | "large" | "unrestricted";
286
+ defaultScenario: string;
287
+ skillsDir: string;
288
+ oaApiBaseUrl?: string;
289
+ oaServiceToken?: string;
290
+ oaIssue?: {
291
+ baseUrl: string;
292
+ owner: string;
293
+ repo: string;
294
+ token: string;
295
+ defaultLabels?: number[];
296
+ };
297
+ configCenter?: {
298
+ baseUrl: string;
299
+ token: string;
300
+ dryRun: boolean;
301
+ worker?: string;
302
+ };
303
+ configProvider?: string;
304
+ configLocalDir?: string;
305
+ }
306
+ //# sourceMappingURL=config-types.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=config-types.js.map