@itphx/synth-shared 0.10.0 → 0.11.3
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/dist/config/defaults.js +60 -14
- package/dist/config/env-overrides.d.ts +7 -4
- package/dist/config/env-overrides.js +46 -13
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +3 -0
- package/dist/config/loader.d.ts +2 -2
- package/dist/config/loader.js +23 -4
- package/dist/config/proxy.d.ts +415 -0
- package/dist/config/proxy.js +1565 -0
- package/dist/config/resolve.d.ts +77 -10
- package/dist/config/resolve.js +203 -17
- package/dist/config/tls-runtime.d.ts +78 -0
- package/dist/config/tls-runtime.js +356 -0
- package/dist/config/tls.d.ts +215 -0
- package/dist/config/tls.js +394 -0
- package/dist/config/types.d.ts +1820 -334
- package/dist/config/types.js +320 -54
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/index.js +18 -10
- package/dist/index.d.ts +11 -2
- package/dist/index.js +11 -2
- package/dist/interfaces/index.d.ts +3 -3
- package/dist/protocols/index.d.ts +0 -1
- package/dist/schemas/index.d.ts +230 -105
- package/dist/schemas/index.js +121 -74
- package/dist/skills/frontmatter.js +1 -1
- package/dist/types/agent.d.ts +30 -0
- package/dist/types/agent.js +1 -0
- package/dist/types/analytics.d.ts +113 -0
- package/dist/types/analytics.js +61 -0
- package/dist/types/bus-events.d.ts +7 -0
- package/dist/types/bus-events.js +1 -0
- package/dist/types/commands.d.ts +10 -10
- package/dist/types/commands.js +2 -2
- package/dist/types/decision.d.ts +16 -16
- package/dist/types/decision.js +4 -4
- package/dist/types/egress.d.ts +114 -0
- package/dist/types/egress.js +68 -0
- package/dist/types/events.d.ts +22 -23
- package/dist/types/fs.d.ts +55 -0
- package/dist/types/fs.js +27 -0
- package/dist/types/git.d.ts +63 -0
- package/dist/types/git.js +1 -0
- package/dist/types/hooks.d.ts +24 -4
- package/dist/types/index.d.ts +15 -1165
- package/dist/types/index.js +44 -244
- package/dist/types/llm.d.ts +32 -0
- package/dist/types/llm.js +8 -0
- package/dist/types/maintenance.d.ts +39 -0
- package/dist/types/maintenance.js +11 -0
- package/dist/types/mcp.d.ts +169 -0
- package/dist/types/mcp.js +119 -0
- package/dist/types/message.d.ts +63 -0
- package/dist/types/message.js +12 -0
- package/dist/types/permission.d.ts +9 -7
- package/dist/types/permission.js +1 -1
- package/dist/types/project.d.ts +134 -0
- package/dist/types/project.js +67 -0
- package/dist/types/prompt.d.ts +237 -0
- package/dist/types/prompt.js +15 -0
- package/dist/types/provider.d.ts +84 -0
- package/dist/types/provider.js +35 -0
- package/dist/types/schedules.d.ts +8 -8
- package/dist/types/schedules.js +1 -1
- package/dist/types/service-keys.d.ts +10 -10
- package/dist/types/service-keys.js +3 -3
- package/dist/types/session.d.ts +268 -0
- package/dist/types/session.js +13 -0
- package/dist/types/skills.d.ts +11 -11
- package/dist/types/skills.js +6 -6
- package/dist/types/tools.d.ts +3 -3
- package/dist/types/user.d.ts +113 -0
- package/dist/types/user.js +31 -0
- package/dist/types/webhooks.d.ts +6 -6
- package/dist/types/webhooks.js +1 -1
- package/dist/utils/glob.d.ts +1 -1
- package/dist/utils/glob.js +1 -1
- package/dist/utils/index.d.ts +15 -0
- package/dist/utils/index.js +55 -2
- package/dist/utils/workspace.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/schemas/index.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare const sessionSettingsSchema: z.ZodObject<{
|
|
|
63
63
|
planMode: z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>;
|
|
64
64
|
skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
65
65
|
skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
66
|
-
/**
|
|
66
|
+
/** ADR-084: per-session гейт decision-уровня микро-каскада (undefined → config.decision.enabled). */
|
|
67
67
|
decisionFirst: z.ZodOptional<z.ZodBoolean>;
|
|
68
68
|
}, "strip", z.ZodTypeAny, {
|
|
69
69
|
temperature: number;
|
|
@@ -84,7 +84,7 @@ export declare const sessionSettingsSchema: z.ZodObject<{
|
|
|
84
84
|
websocketEnabled: boolean;
|
|
85
85
|
provider?: string | undefined;
|
|
86
86
|
model?: string | undefined;
|
|
87
|
-
reasoningLevel?: "
|
|
87
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
88
88
|
systemPrompt?: string | undefined;
|
|
89
89
|
agentRole?: string | undefined;
|
|
90
90
|
mcpServers?: string[] | undefined;
|
|
@@ -97,7 +97,7 @@ export declare const sessionSettingsSchema: z.ZodObject<{
|
|
|
97
97
|
}, {
|
|
98
98
|
provider?: string | undefined;
|
|
99
99
|
model?: string | undefined;
|
|
100
|
-
reasoningLevel?: "
|
|
100
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
101
101
|
temperature?: number | undefined;
|
|
102
102
|
maxTokens?: number | undefined;
|
|
103
103
|
systemPrompt?: string | undefined;
|
|
@@ -130,7 +130,6 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
130
130
|
icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
|
|
131
131
|
color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
|
|
132
132
|
projectId: z.ZodOptional<z.ZodString>;
|
|
133
|
-
engine: z.ZodDefault<z.ZodEnum<["synth", "opencode", "cline"]>>;
|
|
134
133
|
settings: z.ZodOptional<z.ZodObject<{
|
|
135
134
|
provider: z.ZodOptional<z.ZodString>;
|
|
136
135
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -159,7 +158,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
159
158
|
planMode: z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>;
|
|
160
159
|
skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
161
160
|
skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
162
|
-
/**
|
|
161
|
+
/** ADR-084: per-session гейт decision-уровня микро-каскада (undefined → config.decision.enabled). */
|
|
163
162
|
decisionFirst: z.ZodOptional<z.ZodBoolean>;
|
|
164
163
|
}, "strip", z.ZodTypeAny, {
|
|
165
164
|
temperature: number;
|
|
@@ -180,7 +179,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
180
179
|
websocketEnabled: boolean;
|
|
181
180
|
provider?: string | undefined;
|
|
182
181
|
model?: string | undefined;
|
|
183
|
-
reasoningLevel?: "
|
|
182
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
184
183
|
systemPrompt?: string | undefined;
|
|
185
184
|
agentRole?: string | undefined;
|
|
186
185
|
mcpServers?: string[] | undefined;
|
|
@@ -193,7 +192,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
193
192
|
}, {
|
|
194
193
|
provider?: string | undefined;
|
|
195
194
|
model?: string | undefined;
|
|
196
|
-
reasoningLevel?: "
|
|
195
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
197
196
|
temperature?: number | undefined;
|
|
198
197
|
maxTokens?: number | undefined;
|
|
199
198
|
systemPrompt?: string | undefined;
|
|
@@ -221,10 +220,9 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
221
220
|
decisionFirst?: boolean | undefined;
|
|
222
221
|
}>>;
|
|
223
222
|
}, "strip", z.ZodTypeAny, {
|
|
224
|
-
engine: "synth" | "opencode" | "cline";
|
|
225
223
|
name?: string | undefined;
|
|
226
224
|
title?: string | undefined;
|
|
227
|
-
icon?: "
|
|
225
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
228
226
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
229
227
|
projectId?: string | undefined;
|
|
230
228
|
settings?: {
|
|
@@ -246,7 +244,7 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
246
244
|
websocketEnabled: boolean;
|
|
247
245
|
provider?: string | undefined;
|
|
248
246
|
model?: string | undefined;
|
|
249
|
-
reasoningLevel?: "
|
|
247
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
250
248
|
systemPrompt?: string | undefined;
|
|
251
249
|
agentRole?: string | undefined;
|
|
252
250
|
mcpServers?: string[] | undefined;
|
|
@@ -260,14 +258,13 @@ export declare const sessionCreateSchema: z.ZodObject<{
|
|
|
260
258
|
}, {
|
|
261
259
|
name?: string | undefined;
|
|
262
260
|
title?: string | undefined;
|
|
263
|
-
icon?: "
|
|
261
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
264
262
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
265
263
|
projectId?: string | undefined;
|
|
266
|
-
engine?: "synth" | "opencode" | "cline" | undefined;
|
|
267
264
|
settings?: {
|
|
268
265
|
provider?: string | undefined;
|
|
269
266
|
model?: string | undefined;
|
|
270
|
-
reasoningLevel?: "
|
|
267
|
+
reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
|
|
271
268
|
temperature?: number | undefined;
|
|
272
269
|
maxTokens?: number | undefined;
|
|
273
270
|
systemPrompt?: string | undefined;
|
|
@@ -300,7 +297,6 @@ export declare const sessionUpdateSchema: z.ZodObject<{
|
|
|
300
297
|
icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>>;
|
|
301
298
|
color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
|
|
302
299
|
projectId: z.ZodOptional<z.ZodString>;
|
|
303
|
-
engine: z.ZodOptional<z.ZodEnum<["synth", "opencode", "cline"]>>;
|
|
304
300
|
settings: z.ZodOptional<z.ZodObject<{
|
|
305
301
|
provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
306
302
|
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -391,10 +387,9 @@ export declare const sessionUpdateSchema: z.ZodObject<{
|
|
|
391
387
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
392
388
|
}, "strip", z.ZodTypeAny, {
|
|
393
389
|
name?: string | undefined;
|
|
394
|
-
icon?: "
|
|
390
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
395
391
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
396
392
|
projectId?: string | undefined;
|
|
397
|
-
engine?: "synth" | "opencode" | "cline" | undefined;
|
|
398
393
|
settings?: z.objectOutputType<{
|
|
399
394
|
provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
400
395
|
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -427,10 +422,9 @@ export declare const sessionUpdateSchema: z.ZodObject<{
|
|
|
427
422
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
428
423
|
}, {
|
|
429
424
|
name?: string | undefined;
|
|
430
|
-
icon?: "
|
|
425
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
431
426
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
432
427
|
projectId?: string | undefined;
|
|
433
|
-
engine?: "synth" | "opencode" | "cline" | undefined;
|
|
434
428
|
settings?: z.objectInputType<{
|
|
435
429
|
provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
436
430
|
model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -463,7 +457,7 @@ export declare const sessionUpdateSchema: z.ZodObject<{
|
|
|
463
457
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
464
458
|
}>;
|
|
465
459
|
/**
|
|
466
|
-
*
|
|
460
|
+
* ADR-076: запись реестра git-репозиториев. `path` обязателен, остальные поля
|
|
467
461
|
* опциональны; старые формы (`string` / `{ path }`) принимаются через
|
|
468
462
|
* `normalizeGitRepoConfig` и union в `repos`.
|
|
469
463
|
*/
|
|
@@ -496,7 +490,7 @@ export declare const gitRepoConfigSchema: z.ZodObject<{
|
|
|
496
490
|
lastFetch?: string | undefined;
|
|
497
491
|
}>;
|
|
498
492
|
/**
|
|
499
|
-
*
|
|
493
|
+
* ADR-076: нормализация legacy-значения `repos` к `GitRepoConfig`.
|
|
500
494
|
* `string` → `{ path }`; объект → прогон через `gitRepoConfigSchema`
|
|
501
495
|
* (невалидный → `null`). Всё прочее → `null`.
|
|
502
496
|
*/
|
|
@@ -539,7 +533,7 @@ export declare const projectCreateSchema: z.ZodObject<{
|
|
|
539
533
|
name: string;
|
|
540
534
|
description: string;
|
|
541
535
|
workspace?: string | undefined;
|
|
542
|
-
icon?: "
|
|
536
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
543
537
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
544
538
|
repos?: (string | {
|
|
545
539
|
path: string;
|
|
@@ -554,7 +548,7 @@ export declare const projectCreateSchema: z.ZodObject<{
|
|
|
554
548
|
}, {
|
|
555
549
|
name: string;
|
|
556
550
|
workspace?: string | undefined;
|
|
557
|
-
icon?: "
|
|
551
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
558
552
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
559
553
|
description?: string | undefined;
|
|
560
554
|
repos?: (string | {
|
|
@@ -607,7 +601,7 @@ export declare const projectUpdateSchema: z.ZodObject<{
|
|
|
607
601
|
}, "strip", z.ZodTypeAny, {
|
|
608
602
|
workspace?: string | undefined;
|
|
609
603
|
name?: string | undefined;
|
|
610
|
-
icon?: "
|
|
604
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
611
605
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
612
606
|
description?: string | undefined;
|
|
613
607
|
repos?: (string | {
|
|
@@ -625,7 +619,7 @@ export declare const projectUpdateSchema: z.ZodObject<{
|
|
|
625
619
|
}, {
|
|
626
620
|
workspace?: string | undefined;
|
|
627
621
|
name?: string | undefined;
|
|
628
|
-
icon?: "
|
|
622
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | null | undefined;
|
|
629
623
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
|
|
630
624
|
description?: string | undefined;
|
|
631
625
|
repos?: (string | {
|
|
@@ -641,7 +635,7 @@ export declare const projectUpdateSchema: z.ZodObject<{
|
|
|
641
635
|
currentTask?: string | undefined;
|
|
642
636
|
invariants?: string | undefined;
|
|
643
637
|
}>;
|
|
644
|
-
/**
|
|
638
|
+
/** ADR-076: тело создания SSH-ключа (`POST /api/v2/ssh-keys`). */
|
|
645
639
|
export declare const sshKeyCreateSchema: z.ZodObject<{
|
|
646
640
|
name: z.ZodString;
|
|
647
641
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -661,7 +655,7 @@ export declare const sshKeyCreateSchema: z.ZodObject<{
|
|
|
661
655
|
passphrase?: string | undefined;
|
|
662
656
|
agentIds?: string[] | undefined;
|
|
663
657
|
}>;
|
|
664
|
-
/**
|
|
658
|
+
/** ADR-076: тело обновления SSH-ключа (без id/createdAt). */
|
|
665
659
|
export declare const sshKeyUpdateSchema: z.ZodObject<{
|
|
666
660
|
name: z.ZodOptional<z.ZodString>;
|
|
667
661
|
type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
@@ -682,7 +676,7 @@ export declare const sshKeyUpdateSchema: z.ZodObject<{
|
|
|
682
676
|
agentIds?: string[] | undefined;
|
|
683
677
|
}>;
|
|
684
678
|
/**
|
|
685
|
-
*
|
|
679
|
+
* ADR-071 §2.4: проектный скоуп MCP (ссылки на реестр по имени).
|
|
686
680
|
* PUT-семантика: `undefined` ≠ `[]` — отсутствующее поле сохраняет текущее
|
|
687
681
|
* значение, поэтому `.default([])` здесь недопустим.
|
|
688
682
|
*/
|
|
@@ -697,7 +691,7 @@ export declare const projectMcpUpdateSchema: z.ZodObject<{
|
|
|
697
691
|
defaultOn?: string[] | undefined;
|
|
698
692
|
}>;
|
|
699
693
|
/**
|
|
700
|
-
*
|
|
694
|
+
* ADR-075: тело `PUT /api/v2/settings/workspace-policy` — политика для
|
|
701
695
|
* абсолютного workspace вне `workspacesRoot`.
|
|
702
696
|
*/
|
|
703
697
|
export declare const workspacePolicySchema: z.ZodObject<{
|
|
@@ -719,19 +713,19 @@ export declare const promptRequestSchema: z.ZodObject<{
|
|
|
719
713
|
}, "strip", z.ZodTypeAny, {
|
|
720
714
|
content: string;
|
|
721
715
|
stream: boolean;
|
|
716
|
+
system?: string | undefined;
|
|
722
717
|
provider?: string | undefined;
|
|
723
718
|
model?: string | undefined;
|
|
724
719
|
messageId?: string | undefined;
|
|
725
720
|
agent?: string | undefined;
|
|
726
|
-
system?: string | undefined;
|
|
727
721
|
}, {
|
|
728
722
|
content: string;
|
|
723
|
+
system?: string | undefined;
|
|
729
724
|
provider?: string | undefined;
|
|
730
725
|
model?: string | undefined;
|
|
731
726
|
messageId?: string | undefined;
|
|
732
727
|
stream?: boolean | undefined;
|
|
733
728
|
agent?: string | undefined;
|
|
734
|
-
system?: string | undefined;
|
|
735
729
|
}>;
|
|
736
730
|
export declare const spaLoginSchema: z.ZodObject<{
|
|
737
731
|
apiKey: z.ZodString;
|
|
@@ -775,12 +769,12 @@ export declare const fsWriteBodySchema: z.ZodObject<{
|
|
|
775
769
|
content: z.ZodString;
|
|
776
770
|
}, "strip", z.ZodTypeAny, {
|
|
777
771
|
path: string;
|
|
778
|
-
projectId: string;
|
|
779
772
|
content: string;
|
|
773
|
+
projectId: string;
|
|
780
774
|
}, {
|
|
781
775
|
path: string;
|
|
782
|
-
projectId: string;
|
|
783
776
|
content: string;
|
|
777
|
+
projectId: string;
|
|
784
778
|
}>;
|
|
785
779
|
export declare const fsDeleteQuerySchema: z.ZodObject<{
|
|
786
780
|
project_id: z.ZodString;
|
|
@@ -813,7 +807,7 @@ export declare const fsDownloadQuerySchema: z.ZodObject<{
|
|
|
813
807
|
project_id: string;
|
|
814
808
|
}>;
|
|
815
809
|
/**
|
|
816
|
-
*
|
|
810
|
+
* ADR-075: запрос навигации по корню workspace (`GET /fs/workspace-root/browse`,
|
|
817
811
|
* `GET /fs/workspace-root`). `includeHidden` принимает строковые `true`/`false`
|
|
818
812
|
* (query-параметры) — `z.coerce.boolean()` не подходит, т.к. `'false'` → `true`.
|
|
819
813
|
*/
|
|
@@ -827,7 +821,7 @@ export declare const fsWorkspaceBrowseQuerySchema: z.ZodObject<{
|
|
|
827
821
|
path?: string | undefined;
|
|
828
822
|
includeHidden?: unknown;
|
|
829
823
|
}>;
|
|
830
|
-
/**
|
|
824
|
+
/** ADR-075: тело `POST /fs/workspace-root/mkdir` — создание каталога в корне workspace. */
|
|
831
825
|
export declare const fsWorkspaceMkdirBodySchema: z.ZodObject<{
|
|
832
826
|
path: z.ZodString;
|
|
833
827
|
/** `confirm`-политика: явное подтверждение создания каталога вне `workspacesRoot`. */
|
|
@@ -888,7 +882,7 @@ export declare const gitCloneBodySchema: z.ZodObject<{
|
|
|
888
882
|
branch?: string | undefined;
|
|
889
883
|
}>;
|
|
890
884
|
/**
|
|
891
|
-
*
|
|
885
|
+
* ADR-076: тело `POST /api/v2/git/repos/register` — upsert записи реестра
|
|
892
886
|
* (идемпотентно по `path`). Используется UI для добавления уже существующего
|
|
893
887
|
* локально репозитория.
|
|
894
888
|
*/
|
|
@@ -918,7 +912,7 @@ export declare const gitReposRegisterBodySchema: z.ZodObject<{
|
|
|
918
912
|
sshKeyId?: string | undefined;
|
|
919
913
|
}>;
|
|
920
914
|
/**
|
|
921
|
-
*
|
|
915
|
+
* ADR-076: тело `POST /api/v2/git/repos/remove` — удаление записи реестра;
|
|
922
916
|
* обязателен `id` либо `path`. `deleteLocal` — удалить каталог репозитория.
|
|
923
917
|
*/
|
|
924
918
|
export declare const gitReposRemoveBodySchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -947,7 +941,7 @@ export declare const gitReposRemoveBodySchema: z.ZodEffects<z.ZodObject<{
|
|
|
947
941
|
id?: string | undefined;
|
|
948
942
|
deleteLocal?: boolean | undefined;
|
|
949
943
|
}>;
|
|
950
|
-
/**
|
|
944
|
+
/** ADR-076: тело `POST /api/v2/git/repos/fetch` — обязателен `id` либо `path`. */
|
|
951
945
|
export declare const gitReposFetchBodySchema: z.ZodEffects<z.ZodObject<{
|
|
952
946
|
projectId: z.ZodString;
|
|
953
947
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -996,7 +990,7 @@ export declare const gitCommitQuerySchema: z.ZodObject<{
|
|
|
996
990
|
repo_path?: string | undefined;
|
|
997
991
|
}>;
|
|
998
992
|
/**
|
|
999
|
-
*
|
|
993
|
+
* ADR-071 §2.6: фабрика схемы `tools.disabled` (единый источник значений
|
|
1000
994
|
* на базе `ToolCapability`).
|
|
1001
995
|
*
|
|
1002
996
|
* - `strictCapabilities: true` (API, `PUT /settings/tools-disabled`) — закрытый
|
|
@@ -1008,14 +1002,14 @@ export declare function createToolsDisabledSchema(strictCapabilities: boolean):
|
|
|
1008
1002
|
capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1009
1003
|
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1010
1004
|
}, "strip", z.ZodTypeAny, {
|
|
1011
|
-
capabilities: string[];
|
|
1012
1005
|
tools: string[];
|
|
1006
|
+
capabilities: string[];
|
|
1013
1007
|
}, {
|
|
1014
|
-
capabilities?: string[] | undefined;
|
|
1015
1008
|
tools?: string[] | undefined;
|
|
1009
|
+
capabilities?: string[] | undefined;
|
|
1016
1010
|
}>;
|
|
1017
1011
|
/**
|
|
1018
|
-
*
|
|
1012
|
+
* ADR-071 §2.6: тело `PUT /api/v2/settings/tools-disabled`. Неизвестная
|
|
1019
1013
|
* capability — ошибка (закрытый набор: опечатка молча ничего не отключит).
|
|
1020
1014
|
* Имена инструментов принимаются как строки (реестр динамический — MCP-тулы
|
|
1021
1015
|
* регистрируются лениво); непустые.
|
|
@@ -1024,14 +1018,14 @@ export declare const toolsDisabledSchema: z.ZodObject<{
|
|
|
1024
1018
|
capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1025
1019
|
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1026
1020
|
}, "strip", z.ZodTypeAny, {
|
|
1027
|
-
capabilities: string[];
|
|
1028
1021
|
tools: string[];
|
|
1022
|
+
capabilities: string[];
|
|
1029
1023
|
}, {
|
|
1030
|
-
capabilities?: string[] | undefined;
|
|
1031
1024
|
tools?: string[] | undefined;
|
|
1025
|
+
capabilities?: string[] | undefined;
|
|
1032
1026
|
}>;
|
|
1033
1027
|
/**
|
|
1034
|
-
*
|
|
1028
|
+
* ADR-071 §2.4: базовый контракт MCP-скоупа сессии (ссылки на реестр по имени).
|
|
1035
1029
|
* `undefined` ≠ `[]`: отсутствующее поле сохраняет текущее значение.
|
|
1036
1030
|
*/
|
|
1037
1031
|
export declare const sessionMcpScopeSchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -1051,7 +1045,7 @@ export declare const sessionMcpScopeSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1051
1045
|
mcpDisabledServers?: string[] | undefined;
|
|
1052
1046
|
}>;
|
|
1053
1047
|
/**
|
|
1054
|
-
*
|
|
1048
|
+
* ADR-071 §2.4: тело `PUT /api/v2/sessions/:id/mcp`: точечный toggle
|
|
1055
1049
|
* (`{ name, enabled }`, в т.ч. opt-out системного сервера) или полная/частичная
|
|
1056
1050
|
* замена (`{ mcpServers?, mcpDisabledServers? }`).
|
|
1057
1051
|
*/
|
|
@@ -1108,11 +1102,11 @@ export type GitReposRemoveBody = z.infer<typeof gitReposRemoveBodySchema>;
|
|
|
1108
1102
|
export type GitReposFetchBody = z.infer<typeof gitReposFetchBodySchema>;
|
|
1109
1103
|
export type GitLogQuery = z.infer<typeof gitLogQuerySchema>;
|
|
1110
1104
|
export type GitCommitQuery = z.infer<typeof gitCommitQuerySchema>;
|
|
1111
|
-
/**
|
|
1105
|
+
/** ADR-046 §3.2: имя скилла — 1–64, `^[a-z0-9]+(-[a-z0-9]+)*$`. */
|
|
1112
1106
|
export declare const SKILL_NAME_REGEX: RegExp;
|
|
1113
1107
|
export declare const SKILL_NAME_MIN = 1;
|
|
1114
1108
|
export declare const SKILL_NAME_MAX = 64;
|
|
1115
|
-
/**
|
|
1109
|
+
/** ADR-046 §3.2: длина `description`. */
|
|
1116
1110
|
export declare const SKILL_DESCRIPTION_MIN = 1;
|
|
1117
1111
|
export declare const SKILL_DESCRIPTION_MAX = 1024;
|
|
1118
1112
|
export declare const skillNameSchema: z.ZodString;
|
|
@@ -1164,7 +1158,7 @@ export declare const skillFileWriteSchema: z.ZodObject<{
|
|
|
1164
1158
|
content: string;
|
|
1165
1159
|
}>;
|
|
1166
1160
|
/**
|
|
1167
|
-
*
|
|
1161
|
+
* ADR-046 §4.5: per-session enable/disable скиллов (по образцу MCP-скоупа).
|
|
1168
1162
|
* `undefined` ≠ `[]`: отсутствующее поле сохраняет текущее значение.
|
|
1169
1163
|
*/
|
|
1170
1164
|
export declare const skillSessionOverrideSchema: z.ZodObject<{
|
|
@@ -1181,7 +1175,7 @@ export type SkillCreateRequest = z.infer<typeof skillCreateSchema>;
|
|
|
1181
1175
|
export type SkillUpdateRequest = z.infer<typeof skillUpdateSchema>;
|
|
1182
1176
|
export type SkillFileWriteRequest = z.infer<typeof skillFileWriteSchema>;
|
|
1183
1177
|
export type SkillSessionOverrideRequest = z.infer<typeof skillSessionOverrideSchema>;
|
|
1184
|
-
/**
|
|
1178
|
+
/** ADR-046 §7.3: тело `POST/PATCH /api/v2/skill-bundles` (YAML-группа скиллов). */
|
|
1185
1179
|
export declare const skillBundleSchema: z.ZodObject<{
|
|
1186
1180
|
name: z.ZodString;
|
|
1187
1181
|
description: z.ZodString;
|
|
@@ -1199,7 +1193,7 @@ export declare const skillBundleSchema: z.ZodObject<{
|
|
|
1199
1193
|
instruction?: string | undefined;
|
|
1200
1194
|
}>;
|
|
1201
1195
|
export type SkillBundleRequest = z.infer<typeof skillBundleSchema>;
|
|
1202
|
-
/**
|
|
1196
|
+
/** ADR-046 §7.4: тело `PUT /api/v2/settings/skills-disabled` (группы/имена). */
|
|
1203
1197
|
export declare const skillsDisabledSchema: z.ZodObject<{
|
|
1204
1198
|
categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
1205
1199
|
groups: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1215,7 +1209,7 @@ export declare const skillsDisabledSchema: z.ZodObject<{
|
|
|
1215
1209
|
}>;
|
|
1216
1210
|
export type SkillsDisabledRequest = z.infer<typeof skillsDisabledSchema>;
|
|
1217
1211
|
/**
|
|
1218
|
-
*
|
|
1212
|
+
* ADR-046 §4.5: тело `PUT /api/v2/settings/skills` — системные настройки:
|
|
1219
1213
|
* - `disabled` — hard-gate: скиллы, недоступные НИГДЕ;
|
|
1220
1214
|
* - `disabledForNewProjects` — сид для НОВЫХ проектов (снимок при создании);
|
|
1221
1215
|
* - `policy` — политика доступности (строкой, валидируется роутом).
|
|
@@ -1275,7 +1269,7 @@ export declare const skillsSystemSettingsSchema: z.ZodObject<{
|
|
|
1275
1269
|
}>;
|
|
1276
1270
|
export type SkillsSystemSettingsRequest = z.infer<typeof skillsSystemSettingsSchema>;
|
|
1277
1271
|
/**
|
|
1278
|
-
*
|
|
1272
|
+
* ADR-046 §4.5: тело `PUT /api/v2/sessions/:id/skills`: точечный toggle
|
|
1279
1273
|
* (`{ name, enabled }`) или полная/частичная замена (`{ skills?, skillsDisabled? }`).
|
|
1280
1274
|
*/
|
|
1281
1275
|
export declare const sessionSkillUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
@@ -1304,7 +1298,7 @@ export declare const sessionSkillUpdateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1304
1298
|
name?: string | undefined;
|
|
1305
1299
|
enabled?: boolean | undefined;
|
|
1306
1300
|
}>;
|
|
1307
|
-
/**
|
|
1301
|
+
/** ADR-046 §4.5: тело `PUT /api/v2/projects/:id/skills`. */
|
|
1308
1302
|
export declare const projectSkillUpdateSchema: z.ZodObject<{
|
|
1309
1303
|
enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1310
1304
|
defaultOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -1317,7 +1311,7 @@ export declare const projectSkillUpdateSchema: z.ZodObject<{
|
|
|
1317
1311
|
}>;
|
|
1318
1312
|
export type SessionSkillUpdateRequest = z.infer<typeof sessionSkillUpdateSchema>;
|
|
1319
1313
|
export type ProjectSkillUpdateRequest = z.infer<typeof projectSkillUpdateSchema>;
|
|
1320
|
-
/**
|
|
1314
|
+
/** ADR-089: схема идентичности отправителя внешнего события. */
|
|
1321
1315
|
export declare const eventIdentitySchema: z.ZodObject<{
|
|
1322
1316
|
principalId: z.ZodOptional<z.ZodString>;
|
|
1323
1317
|
chatKey: z.ZodOptional<z.ZodString>;
|
|
@@ -1334,7 +1328,7 @@ export declare const eventIdentitySchema: z.ZodObject<{
|
|
|
1334
1328
|
threadKey?: string | undefined;
|
|
1335
1329
|
roles?: string[] | undefined;
|
|
1336
1330
|
}>;
|
|
1337
|
-
/**
|
|
1331
|
+
/** ADR-089: схема нормализованного внешнего события (`payload` не типизируется). */
|
|
1338
1332
|
export declare const synthEventSchema: z.ZodObject<{
|
|
1339
1333
|
id: z.ZodString;
|
|
1340
1334
|
source: z.ZodString;
|
|
@@ -1385,7 +1379,7 @@ export declare const synthEventSchema: z.ZodObject<{
|
|
|
1385
1379
|
roles?: string[] | undefined;
|
|
1386
1380
|
} | undefined;
|
|
1387
1381
|
}>;
|
|
1388
|
-
/**
|
|
1382
|
+
/** ADR-089: схема устойчивой привязки внешнего адреса к сессии/шаблону. */
|
|
1389
1383
|
export declare const eventBindingSchema: z.ZodObject<{
|
|
1390
1384
|
id: z.ZodString;
|
|
1391
1385
|
source: z.ZodString;
|
|
@@ -1414,7 +1408,7 @@ export declare const eventBindingSchema: z.ZodObject<{
|
|
|
1414
1408
|
agentTemplate?: string | undefined;
|
|
1415
1409
|
project?: string | undefined;
|
|
1416
1410
|
}>;
|
|
1417
|
-
/**
|
|
1411
|
+
/** ADR-089: схема запроса создания/привязки сессии — единый funnel. */
|
|
1418
1412
|
export declare const sessionRequestSchema: z.ZodObject<{
|
|
1419
1413
|
initiator: z.ZodEnum<["user", "agent", "external", "system"]>;
|
|
1420
1414
|
intent: z.ZodEnum<["explicit", "event"]>;
|
|
@@ -1426,20 +1420,18 @@ export declare const sessionRequestSchema: z.ZodObject<{
|
|
|
1426
1420
|
title: z.ZodOptional<z.ZodString>;
|
|
1427
1421
|
icon: z.ZodOptional<z.ZodEnum<["code", "terminal", "rocket", "flask", "gamepad", "briefcase", "home", "globe", "leaf", "shield", "palette", "server", "phone", "database", "lightbulb", "music", "camera", "book", "heart", "folder", "chat", "cpu", "file", "file-code", "docs", "task", "todo", "bug", "robot", "brain", "git", "repo", "test", "chart", "star", "image", "calendar"]>>;
|
|
1428
1422
|
color: z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>;
|
|
1429
|
-
engine: z.ZodOptional<z.ZodEnum<["synth", "opencode", "cline"]>>;
|
|
1430
1423
|
sessionOrigin: z.ZodOptional<z.ZodEnum<["user", "fork", "subagent"]>>;
|
|
1431
1424
|
settings: z.ZodOptional<z.ZodUnknown>;
|
|
1432
1425
|
sourceEventId: z.ZodOptional<z.ZodString>;
|
|
1433
1426
|
dedupKey: z.ZodOptional<z.ZodString>;
|
|
1434
1427
|
}, "strip", z.ZodTypeAny, {
|
|
1435
|
-
initiator: "user" | "
|
|
1428
|
+
initiator: "user" | "system" | "agent" | "external";
|
|
1436
1429
|
intent: "explicit" | "event";
|
|
1437
1430
|
mode?: "bound" | "ephemeral" | "queue" | undefined;
|
|
1438
1431
|
title?: string | undefined;
|
|
1439
|
-
icon?: "
|
|
1432
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | undefined;
|
|
1440
1433
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | undefined;
|
|
1441
1434
|
projectId?: string | undefined;
|
|
1442
|
-
engine?: "synth" | "opencode" | "cline" | undefined;
|
|
1443
1435
|
settings?: unknown;
|
|
1444
1436
|
dedupKey?: string | undefined;
|
|
1445
1437
|
agentTemplate?: string | undefined;
|
|
@@ -1448,14 +1440,13 @@ export declare const sessionRequestSchema: z.ZodObject<{
|
|
|
1448
1440
|
sessionOrigin?: "user" | "fork" | "subagent" | undefined;
|
|
1449
1441
|
sourceEventId?: string | undefined;
|
|
1450
1442
|
}, {
|
|
1451
|
-
initiator: "user" | "
|
|
1443
|
+
initiator: "user" | "system" | "agent" | "external";
|
|
1452
1444
|
intent: "explicit" | "event";
|
|
1453
1445
|
mode?: "bound" | "ephemeral" | "queue" | undefined;
|
|
1454
1446
|
title?: string | undefined;
|
|
1455
|
-
icon?: "
|
|
1447
|
+
icon?: "code" | "chat" | "task" | "terminal" | "rocket" | "flask" | "gamepad" | "briefcase" | "home" | "globe" | "leaf" | "shield" | "palette" | "server" | "phone" | "database" | "lightbulb" | "music" | "camera" | "book" | "heart" | "folder" | "cpu" | "file" | "file-code" | "docs" | "todo" | "bug" | "robot" | "brain" | "git" | "repo" | "test" | "chart" | "star" | "image" | "calendar" | undefined;
|
|
1456
1448
|
color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | undefined;
|
|
1457
1449
|
projectId?: string | undefined;
|
|
1458
|
-
engine?: "synth" | "opencode" | "cline" | undefined;
|
|
1459
1450
|
settings?: unknown;
|
|
1460
1451
|
dedupKey?: string | undefined;
|
|
1461
1452
|
agentTemplate?: string | undefined;
|
|
@@ -1465,7 +1456,7 @@ export declare const sessionRequestSchema: z.ZodObject<{
|
|
|
1465
1456
|
sourceEventId?: string | undefined;
|
|
1466
1457
|
}>;
|
|
1467
1458
|
/**
|
|
1468
|
-
*
|
|
1459
|
+
* ADR-089: вход приёма внешнего события (`POST /api/v2/events`). `id`/`dedupKey`/`ts`
|
|
1469
1460
|
* нормализуются `EventIngress`, поэтому здесь опциональны.
|
|
1470
1461
|
*/
|
|
1471
1462
|
export declare const eventIngestSchema: z.ZodObject<{
|
|
@@ -1516,7 +1507,7 @@ export declare const eventIngestSchema: z.ZodObject<{
|
|
|
1516
1507
|
ts?: string | undefined;
|
|
1517
1508
|
}>;
|
|
1518
1509
|
export type EventIngestRequest = z.infer<typeof eventIngestSchema>;
|
|
1519
|
-
/**
|
|
1510
|
+
/** ADR-089: вход upsert биндинга (`POST /api/v2/events/bindings`) — без `id`. */
|
|
1520
1511
|
export declare const eventBindingInputSchema: z.ZodObject<{
|
|
1521
1512
|
source: z.ZodString;
|
|
1522
1513
|
chatKey: z.ZodOptional<z.ZodString>;
|
|
@@ -1544,7 +1535,7 @@ export declare const eventBindingInputSchema: z.ZodObject<{
|
|
|
1544
1535
|
}>;
|
|
1545
1536
|
export type EventBindingInputRequest = z.infer<typeof eventBindingInputSchema>;
|
|
1546
1537
|
/**
|
|
1547
|
-
*
|
|
1538
|
+
* ADR-089/ADR-052: метаданные API-ключа привязки для приёма событий.
|
|
1548
1539
|
* Секрет (`key`) и его хеш здесь отсутствуют — наружу не отдаются.
|
|
1549
1540
|
*/
|
|
1550
1541
|
export declare const eventBindingApiKeySchema: z.ZodObject<{
|
|
@@ -1585,7 +1576,7 @@ export declare const eventBindingApiKeySchema: z.ZodObject<{
|
|
|
1585
1576
|
revokedAt?: string | undefined;
|
|
1586
1577
|
}>;
|
|
1587
1578
|
export type EventBindingApiKeyMeta = z.infer<typeof eventBindingApiKeySchema>;
|
|
1588
|
-
/**
|
|
1579
|
+
/** ADR-089/ADR-052: тело создания API-ключа привязки — обязательная уникальная `label`. */
|
|
1589
1580
|
export declare const eventBindingApiKeyCreateSchema: z.ZodObject<{
|
|
1590
1581
|
label: z.ZodString;
|
|
1591
1582
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1604,7 +1595,7 @@ export declare const eventBindingApiKeyCreateSchema: z.ZodObject<{
|
|
|
1604
1595
|
}>;
|
|
1605
1596
|
export type EventBindingApiKeyCreateRequest = z.infer<typeof eventBindingApiKeyCreateSchema>;
|
|
1606
1597
|
/**
|
|
1607
|
-
*
|
|
1598
|
+
* ADR-089/ADR-052: тело обновления API-ключа привязки. Все поля опциональны;
|
|
1608
1599
|
* `null` для `description`/`expiresAt`/`rateLimitPerMinute` — сброс значения.
|
|
1609
1600
|
*/
|
|
1610
1601
|
export declare const eventBindingApiKeyUpdateSchema: z.ZodObject<{
|
|
@@ -1624,7 +1615,7 @@ export declare const eventBindingApiKeyUpdateSchema: z.ZodObject<{
|
|
|
1624
1615
|
expiresAt?: string | null | undefined;
|
|
1625
1616
|
}>;
|
|
1626
1617
|
export type EventBindingApiKeyUpdateRequest = z.infer<typeof eventBindingApiKeyUpdateSchema>;
|
|
1627
|
-
/**
|
|
1618
|
+
/** ADR-089: ответ создания ключа — метаданные + plaintext-секрет (единожды). */
|
|
1628
1619
|
export declare const eventBindingApiKeyCreatedSchema: z.ZodObject<{
|
|
1629
1620
|
id: z.ZodString;
|
|
1630
1621
|
bindingId: z.ZodString;
|
|
@@ -1668,7 +1659,7 @@ export declare const eventBindingApiKeyCreatedSchema: z.ZodObject<{
|
|
|
1668
1659
|
}>;
|
|
1669
1660
|
export type EventBindingApiKeyCreatedRequest = z.infer<typeof eventBindingApiKeyCreatedSchema>;
|
|
1670
1661
|
/**
|
|
1671
|
-
*
|
|
1662
|
+
* ADR-089: вход `POST /events` при аутентификации API-ключом привязки. Как
|
|
1672
1663
|
* `eventIngestSchema`, но `source` опционален — источник берётся из привязки.
|
|
1673
1664
|
*/
|
|
1674
1665
|
export declare const eventKeyIngestSchema: z.ZodObject<{
|
|
@@ -1720,12 +1711,12 @@ export declare const eventKeyIngestSchema: z.ZodObject<{
|
|
|
1720
1711
|
}>;
|
|
1721
1712
|
export type EventKeyIngestRequest = z.infer<typeof eventKeyIngestSchema>;
|
|
1722
1713
|
/**
|
|
1723
|
-
*
|
|
1714
|
+
* ADR-052: каталог скоупов service-key + wildcard-семейства. Глобальный `*` не
|
|
1724
1715
|
* принимается (`isKnownScope`).
|
|
1725
1716
|
*/
|
|
1726
1717
|
export declare const serviceScopeSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1727
1718
|
/**
|
|
1728
|
-
*
|
|
1719
|
+
* ADR-052: метаданные service-key (ответы API). Секрет (`key`) и его хеш здесь
|
|
1729
1720
|
* отсутствуют — наружу не отдаются (в списке — `prefix`).
|
|
1730
1721
|
*/
|
|
1731
1722
|
export declare const serviceApiKeySchema: z.ZodObject<{
|
|
@@ -1772,7 +1763,7 @@ export declare const serviceApiKeySchema: z.ZodObject<{
|
|
|
1772
1763
|
allowedProjects?: string[] | undefined;
|
|
1773
1764
|
}>;
|
|
1774
1765
|
export type ServiceApiKeyMeta = z.infer<typeof serviceApiKeySchema>;
|
|
1775
|
-
/**
|
|
1766
|
+
/** ADR-052: тело создания service-key. `roles` не заданы — дефолт хранилища. */
|
|
1776
1767
|
export declare const serviceApiKeyCreateSchema: z.ZodObject<{
|
|
1777
1768
|
label: z.ZodString;
|
|
1778
1769
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1800,7 +1791,7 @@ export declare const serviceApiKeyCreateSchema: z.ZodObject<{
|
|
|
1800
1791
|
}>;
|
|
1801
1792
|
export type ServiceApiKeyCreateRequest = z.infer<typeof serviceApiKeyCreateSchema>;
|
|
1802
1793
|
/**
|
|
1803
|
-
*
|
|
1794
|
+
* ADR-052: тело обновления service-key. Все поля опциональны; `null` для
|
|
1804
1795
|
* `description`/`allowedProjects`/`rateLimitPerMinute`/`expiresAt` — сброс.
|
|
1805
1796
|
*/
|
|
1806
1797
|
export declare const serviceApiKeyUpdateSchema: z.ZodObject<{
|
|
@@ -1829,7 +1820,7 @@ export declare const serviceApiKeyUpdateSchema: z.ZodObject<{
|
|
|
1829
1820
|
allowedProjects?: string[] | null | undefined;
|
|
1830
1821
|
}>;
|
|
1831
1822
|
export type ServiceApiKeyUpdateRequest = z.infer<typeof serviceApiKeyUpdateSchema>;
|
|
1832
|
-
/**
|
|
1823
|
+
/** ADR-052: ответ создания service-key — метаданные + plaintext-секрет (единожды). */
|
|
1833
1824
|
export declare const serviceApiKeyCreatedSchema: z.ZodObject<{
|
|
1834
1825
|
id: z.ZodString;
|
|
1835
1826
|
label: z.ZodString;
|
|
@@ -1878,12 +1869,12 @@ export declare const serviceApiKeyCreatedSchema: z.ZodObject<{
|
|
|
1878
1869
|
allowedProjects?: string[] | undefined;
|
|
1879
1870
|
}>;
|
|
1880
1871
|
export type ServiceApiKeyCreatedRequest = z.infer<typeof serviceApiKeyCreatedSchema>;
|
|
1881
|
-
/**
|
|
1872
|
+
/** ADR-052 (этап II): паттерн события подписки — exact либо `prefix.*`. */
|
|
1882
1873
|
export declare const webhookEventPatternSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1883
|
-
/**
|
|
1874
|
+
/** ADR-052 (этап II): целевой URL — только http/https (SSRF-политика — в core). */
|
|
1884
1875
|
export declare const webhookUrlSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
1885
1876
|
/**
|
|
1886
|
-
*
|
|
1877
|
+
* ADR-052 (этап II): метаданные подписки (ответы API). Секрет (`secret`) и его
|
|
1887
1878
|
* хеш здесь отсутствуют — наружу не отдаются (в списке — `secretPrefix`).
|
|
1888
1879
|
*/
|
|
1889
1880
|
export declare const webhookSubscriptionSchema: z.ZodObject<{
|
|
@@ -1927,7 +1918,7 @@ export declare const webhookSubscriptionSchema: z.ZodObject<{
|
|
|
1927
1918
|
disabledAt?: string | undefined;
|
|
1928
1919
|
}>;
|
|
1929
1920
|
export type WebhookSubscriptionMeta = z.infer<typeof webhookSubscriptionSchema>;
|
|
1930
|
-
/**
|
|
1921
|
+
/** ADR-052 (этап II): тело создания подписки. `enabled` не задан — активна. */
|
|
1931
1922
|
export declare const webhookSubscriptionCreateSchema: z.ZodObject<{
|
|
1932
1923
|
label: z.ZodString;
|
|
1933
1924
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1949,7 +1940,7 @@ export declare const webhookSubscriptionCreateSchema: z.ZodObject<{
|
|
|
1949
1940
|
}>;
|
|
1950
1941
|
export type WebhookSubscriptionCreateRequest = z.infer<typeof webhookSubscriptionCreateSchema>;
|
|
1951
1942
|
/**
|
|
1952
|
-
*
|
|
1943
|
+
* ADR-052 (этап II): тело обновления подписки. Все поля опциональны; `null` для
|
|
1953
1944
|
* `description` — сброс.
|
|
1954
1945
|
*/
|
|
1955
1946
|
export declare const webhookSubscriptionUpdateSchema: z.ZodObject<{
|
|
@@ -1972,7 +1963,7 @@ export declare const webhookSubscriptionUpdateSchema: z.ZodObject<{
|
|
|
1972
1963
|
events?: string[] | undefined;
|
|
1973
1964
|
}>;
|
|
1974
1965
|
export type WebhookSubscriptionUpdateRequest = z.infer<typeof webhookSubscriptionUpdateSchema>;
|
|
1975
|
-
/**
|
|
1966
|
+
/** ADR-052 (этап II): ответ создания/ротации подписки — метаданные + секрет (единожды). */
|
|
1976
1967
|
export declare const webhookSubscriptionCreatedSchema: z.ZodObject<{
|
|
1977
1968
|
id: z.ZodString;
|
|
1978
1969
|
label: z.ZodString;
|
|
@@ -2018,7 +2009,7 @@ export declare const webhookSubscriptionCreatedSchema: z.ZodObject<{
|
|
|
2018
2009
|
disabledAt?: string | undefined;
|
|
2019
2010
|
}>;
|
|
2020
2011
|
export type WebhookSubscriptionCreatedRequest = z.infer<typeof webhookSubscriptionCreatedSchema>;
|
|
2021
|
-
/**
|
|
2012
|
+
/** ADR-052 (этап II): запись журнала доставки. */
|
|
2022
2013
|
export declare const webhookDeliverySchema: z.ZodObject<{
|
|
2023
2014
|
id: z.ZodString;
|
|
2024
2015
|
subscriptionId: z.ZodString;
|
|
@@ -2030,28 +2021,28 @@ export declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
2030
2021
|
createdAt: z.ZodString;
|
|
2031
2022
|
completedAt: z.ZodOptional<z.ZodString>;
|
|
2032
2023
|
}, "strip", z.ZodTypeAny, {
|
|
2033
|
-
status: "
|
|
2024
|
+
status: "pending" | "ok" | "failed";
|
|
2034
2025
|
id: string;
|
|
2035
2026
|
createdAt: string;
|
|
2036
2027
|
subscriptionId: string;
|
|
2037
2028
|
eventType: string;
|
|
2038
2029
|
attempts: number;
|
|
2039
|
-
responseStatus?: number | undefined;
|
|
2040
2030
|
error?: string | undefined;
|
|
2031
|
+
responseStatus?: number | undefined;
|
|
2041
2032
|
completedAt?: string | undefined;
|
|
2042
2033
|
}, {
|
|
2043
|
-
status: "
|
|
2034
|
+
status: "pending" | "ok" | "failed";
|
|
2044
2035
|
id: string;
|
|
2045
2036
|
createdAt: string;
|
|
2046
2037
|
subscriptionId: string;
|
|
2047
2038
|
eventType: string;
|
|
2048
2039
|
attempts: number;
|
|
2049
|
-
responseStatus?: number | undefined;
|
|
2050
2040
|
error?: string | undefined;
|
|
2041
|
+
responseStatus?: number | undefined;
|
|
2051
2042
|
completedAt?: string | undefined;
|
|
2052
2043
|
}>;
|
|
2053
2044
|
export type WebhookDeliveryMeta = z.infer<typeof webhookDeliverySchema>;
|
|
2054
|
-
/**
|
|
2045
|
+
/** ADR-051/ADR-089: цель расписания (дискриминированный союз по `mode`). */
|
|
2055
2046
|
export declare const scheduleTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
2056
2047
|
mode: z.ZodLiteral<"bound">;
|
|
2057
2048
|
sessionId: z.ZodString;
|
|
@@ -2087,7 +2078,7 @@ export declare const scheduleTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.Zo
|
|
|
2087
2078
|
sessionId: string;
|
|
2088
2079
|
}>]>;
|
|
2089
2080
|
/**
|
|
2090
|
-
*
|
|
2081
|
+
* ADR-089: цель правила маршрутизации — дискриминированный союз по `mode`
|
|
2091
2082
|
* (семантика та же, что у `scheduleTargetSchema`).
|
|
2092
2083
|
*/
|
|
2093
2084
|
export declare const eventRouteTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
|
|
@@ -2136,7 +2127,7 @@ export declare const eventRouteTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.
|
|
|
2136
2127
|
agentTemplate?: string | undefined;
|
|
2137
2128
|
project?: string | undefined;
|
|
2138
2129
|
}>]>;
|
|
2139
|
-
/**
|
|
2130
|
+
/** ADR-089: условие срабатывания правила (AND по заполненным полям). */
|
|
2140
2131
|
export declare const eventRouteMatchSchema: z.ZodObject<{
|
|
2141
2132
|
source: z.ZodOptional<z.ZodString>;
|
|
2142
2133
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -2162,7 +2153,7 @@ export declare const eventRouteMatchSchema: z.ZodObject<{
|
|
|
2162
2153
|
label?: string | undefined;
|
|
2163
2154
|
keywords?: string[] | undefined;
|
|
2164
2155
|
}>;
|
|
2165
|
-
/**
|
|
2156
|
+
/** ADR-089: полная сущность правила маршрутизации событий (ответы API). */
|
|
2166
2157
|
export declare const eventRouteRuleSchema: z.ZodObject<{
|
|
2167
2158
|
id: z.ZodString;
|
|
2168
2159
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -2300,7 +2291,7 @@ export declare const eventRouteRuleSchema: z.ZodObject<{
|
|
|
2300
2291
|
enabled?: boolean | undefined;
|
|
2301
2292
|
priority?: number | undefined;
|
|
2302
2293
|
}>;
|
|
2303
|
-
/**
|
|
2294
|
+
/** ADR-089: вход создания/обновления правила (`upsert`) — без `id`. */
|
|
2304
2295
|
export declare const eventRouteRuleInputSchema: z.ZodObject<{
|
|
2305
2296
|
name: z.ZodOptional<z.ZodString>;
|
|
2306
2297
|
priority: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2436,7 +2427,7 @@ export declare const eventRouteRuleInputSchema: z.ZodObject<{
|
|
|
2436
2427
|
priority?: number | undefined;
|
|
2437
2428
|
}>;
|
|
2438
2429
|
/**
|
|
2439
|
-
*
|
|
2430
|
+
* ADR-089: тело upsert-запроса правила — вход + необязательный `id` (обновление
|
|
2440
2431
|
* существующего правила; отсутствие — создание нового `rule_<uuid>`).
|
|
2441
2432
|
*/
|
|
2442
2433
|
export declare const eventRouteRuleUpsertSchema: z.ZodObject<{
|
|
@@ -2580,7 +2571,7 @@ export declare const eventRouteRuleUpsertSchema: z.ZodObject<{
|
|
|
2580
2571
|
export type EventRouteTargetRequest = z.infer<typeof eventRouteTargetSchema>;
|
|
2581
2572
|
export type EventRouteRuleInputRequest = z.infer<typeof eventRouteRuleInputSchema>;
|
|
2582
2573
|
export type EventRouteRuleUpsertRequest = z.infer<typeof eventRouteRuleUpsertSchema>;
|
|
2583
|
-
/**
|
|
2574
|
+
/** ADR-051/ADR-089: вход создания/обновления расписания (`ScheduleInput`). */
|
|
2584
2575
|
export declare const scheduleInputSchema: z.ZodEffects<z.ZodObject<{
|
|
2585
2576
|
name: z.ZodString;
|
|
2586
2577
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2709,7 +2700,7 @@ export declare const scheduleInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2709
2700
|
ownerId?: string | undefined;
|
|
2710
2701
|
catchUp?: "skip" | "once" | undefined;
|
|
2711
2702
|
}>;
|
|
2712
|
-
/**
|
|
2703
|
+
/** ADR-051/ADR-089: полная сущность расписания (ответы API). */
|
|
2713
2704
|
export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
2714
2705
|
id: z.ZodString;
|
|
2715
2706
|
name: z.ZodString;
|
|
@@ -2780,7 +2771,7 @@ export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2780
2771
|
updatedAt: string;
|
|
2781
2772
|
every?: string | undefined;
|
|
2782
2773
|
payload?: Record<string, unknown> | undefined;
|
|
2783
|
-
lastStatus?: "
|
|
2774
|
+
lastStatus?: "error" | "ok" | "skipped" | undefined;
|
|
2784
2775
|
cron?: string | undefined;
|
|
2785
2776
|
prompt?: string | undefined;
|
|
2786
2777
|
ownerId?: string | undefined;
|
|
@@ -2808,7 +2799,7 @@ export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2808
2799
|
updatedAt: string;
|
|
2809
2800
|
every?: string | undefined;
|
|
2810
2801
|
payload?: Record<string, unknown> | undefined;
|
|
2811
|
-
lastStatus?: "
|
|
2802
|
+
lastStatus?: "error" | "ok" | "skipped" | undefined;
|
|
2812
2803
|
cron?: string | undefined;
|
|
2813
2804
|
prompt?: string | undefined;
|
|
2814
2805
|
ownerId?: string | undefined;
|
|
@@ -2836,7 +2827,7 @@ export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2836
2827
|
updatedAt: string;
|
|
2837
2828
|
every?: string | undefined;
|
|
2838
2829
|
payload?: Record<string, unknown> | undefined;
|
|
2839
|
-
lastStatus?: "
|
|
2830
|
+
lastStatus?: "error" | "ok" | "skipped" | undefined;
|
|
2840
2831
|
cron?: string | undefined;
|
|
2841
2832
|
prompt?: string | undefined;
|
|
2842
2833
|
ownerId?: string | undefined;
|
|
@@ -2864,7 +2855,7 @@ export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2864
2855
|
updatedAt: string;
|
|
2865
2856
|
every?: string | undefined;
|
|
2866
2857
|
payload?: Record<string, unknown> | undefined;
|
|
2867
|
-
lastStatus?: "
|
|
2858
|
+
lastStatus?: "error" | "ok" | "skipped" | undefined;
|
|
2868
2859
|
cron?: string | undefined;
|
|
2869
2860
|
prompt?: string | undefined;
|
|
2870
2861
|
ownerId?: string | undefined;
|
|
@@ -2875,9 +2866,9 @@ export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2875
2866
|
}>;
|
|
2876
2867
|
export type ScheduleInputRequest = z.infer<typeof scheduleInputSchema>;
|
|
2877
2868
|
export type ScheduleRequest = z.infer<typeof scheduleSchema>;
|
|
2878
|
-
/**
|
|
2869
|
+
/** ADR-051: триггер срабатывания расписания в Job-истории. */
|
|
2879
2870
|
export declare const scheduleJobTriggerSchema: z.ZodEnum<["cron", "manual", "catchup"]>;
|
|
2880
|
-
/**
|
|
2871
|
+
/** ADR-051: запись Job-истории (ответы `GET /api/v2/schedules/:id/jobs`). */
|
|
2881
2872
|
export declare const scheduleJobSchema: z.ZodObject<{
|
|
2882
2873
|
id: z.ZodString;
|
|
2883
2874
|
scheduleId: z.ZodString;
|
|
@@ -2927,7 +2918,7 @@ export declare const scheduleJobSchema: z.ZodObject<{
|
|
|
2927
2918
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
2928
2919
|
error: z.ZodOptional<z.ZodString>;
|
|
2929
2920
|
}, "strip", z.ZodTypeAny, {
|
|
2930
|
-
status: "
|
|
2921
|
+
status: "error" | "ok" | "skipped";
|
|
2931
2922
|
id: string;
|
|
2932
2923
|
target: {
|
|
2933
2924
|
mode: "bound";
|
|
@@ -2947,13 +2938,13 @@ export declare const scheduleJobSchema: z.ZodObject<{
|
|
|
2947
2938
|
startedAt: string;
|
|
2948
2939
|
finishedAt: string;
|
|
2949
2940
|
durationMs: number;
|
|
2941
|
+
error?: string | undefined;
|
|
2950
2942
|
dedupKey?: string | undefined;
|
|
2951
2943
|
sessionId?: string | undefined;
|
|
2952
|
-
error?: string | undefined;
|
|
2953
2944
|
decision?: "bound" | "ephemeral" | "queue" | "bind" | "drop" | undefined;
|
|
2954
2945
|
reason?: string | undefined;
|
|
2955
2946
|
}, {
|
|
2956
|
-
status: "
|
|
2947
|
+
status: "error" | "ok" | "skipped";
|
|
2957
2948
|
id: string;
|
|
2958
2949
|
target: {
|
|
2959
2950
|
mode: "bound";
|
|
@@ -2973,10 +2964,144 @@ export declare const scheduleJobSchema: z.ZodObject<{
|
|
|
2973
2964
|
startedAt: string;
|
|
2974
2965
|
finishedAt: string;
|
|
2975
2966
|
durationMs: number;
|
|
2967
|
+
error?: string | undefined;
|
|
2976
2968
|
dedupKey?: string | undefined;
|
|
2977
2969
|
sessionId?: string | undefined;
|
|
2978
|
-
error?: string | undefined;
|
|
2979
2970
|
decision?: "bound" | "ephemeral" | "queue" | "bind" | "drop" | undefined;
|
|
2980
2971
|
reason?: string | undefined;
|
|
2981
2972
|
}>;
|
|
2982
2973
|
export type ScheduleJobRequest = z.infer<typeof scheduleJobSchema>;
|
|
2974
|
+
/** PROP-102: семейство роллапов аналитики (`usage`/`activity`/`decision`/`prompt`). */
|
|
2975
|
+
export declare const analyticsFamilySchema: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
|
|
2976
|
+
/** PROP-102: ось измерения роллапа (`day`/`user`/`project`/`model`/`agent`/`provider`). */
|
|
2977
|
+
export declare const analyticsDimensionSchema: z.ZodEnum<["day", "user", "project", "model", "agent", "provider"]>;
|
|
2978
|
+
/** PROP-102: сутки UTC в формате `YYYY-MM-DD`. */
|
|
2979
|
+
export declare const analyticsDaySchema: z.ZodString;
|
|
2980
|
+
/** PROP-102: пред-агрегированный бакет роллапа (запись через порт хранения). */
|
|
2981
|
+
export declare const analyticsRollupBucketSchema: z.ZodObject<{
|
|
2982
|
+
family: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
|
|
2983
|
+
day: z.ZodString;
|
|
2984
|
+
dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2985
|
+
measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
2986
|
+
costByCurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
2987
|
+
}, "strip", z.ZodTypeAny, {
|
|
2988
|
+
day: string;
|
|
2989
|
+
family: "prompt" | "decision" | "usage" | "activity";
|
|
2990
|
+
dimensions: Record<string, string>;
|
|
2991
|
+
measures: Record<string, number>;
|
|
2992
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
2993
|
+
}, {
|
|
2994
|
+
day: string;
|
|
2995
|
+
family: "prompt" | "decision" | "usage" | "activity";
|
|
2996
|
+
measures: Record<string, number>;
|
|
2997
|
+
dimensions?: Record<string, string> | undefined;
|
|
2998
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
2999
|
+
}>;
|
|
3000
|
+
/** PROP-102: запрос среза/серии роллапов (только чтение). */
|
|
3001
|
+
export declare const analyticsRollupQuerySchema: z.ZodObject<{
|
|
3002
|
+
family: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
|
|
3003
|
+
from: z.ZodOptional<z.ZodString>;
|
|
3004
|
+
to: z.ZodOptional<z.ZodString>;
|
|
3005
|
+
dimensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3006
|
+
groupBy: z.ZodOptional<z.ZodArray<z.ZodEnum<["day", "user", "project", "model", "agent", "provider"]>, "many">>;
|
|
3007
|
+
}, "strip", z.ZodTypeAny, {
|
|
3008
|
+
family: "prompt" | "decision" | "usage" | "activity";
|
|
3009
|
+
dimensions?: Record<string, string> | undefined;
|
|
3010
|
+
from?: string | undefined;
|
|
3011
|
+
to?: string | undefined;
|
|
3012
|
+
groupBy?: ("user" | "provider" | "model" | "agent" | "project" | "day")[] | undefined;
|
|
3013
|
+
}, {
|
|
3014
|
+
family: "prompt" | "decision" | "usage" | "activity";
|
|
3015
|
+
dimensions?: Record<string, string> | undefined;
|
|
3016
|
+
from?: string | undefined;
|
|
3017
|
+
to?: string | undefined;
|
|
3018
|
+
groupBy?: ("user" | "provider" | "model" | "agent" | "project" | "day")[] | undefined;
|
|
3019
|
+
}>;
|
|
3020
|
+
export type AnalyticsRollupBucketInput = z.infer<typeof analyticsRollupBucketSchema>;
|
|
3021
|
+
export type AnalyticsRollupQueryInput = z.infer<typeof analyticsRollupQuerySchema>;
|
|
3022
|
+
/**
|
|
3023
|
+
* PROP-102: строка отчёта — оси группировки + меры (сырые счётчики и
|
|
3024
|
+
* дериваты `ANALYTICS_DERIVED_MEASURES`). `costByCurrency` опускается, если пусто.
|
|
3025
|
+
*/
|
|
3026
|
+
export declare const analyticsReportRowSchema: z.ZodObject<{
|
|
3027
|
+
dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3028
|
+
measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3029
|
+
costByCurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3030
|
+
}, "strip", z.ZodTypeAny, {
|
|
3031
|
+
dimensions: Record<string, string>;
|
|
3032
|
+
measures: Record<string, number>;
|
|
3033
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3034
|
+
}, {
|
|
3035
|
+
measures: Record<string, number>;
|
|
3036
|
+
dimensions?: Record<string, string> | undefined;
|
|
3037
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3038
|
+
}>;
|
|
3039
|
+
/** PROP-102: отчёт по семейству за период (только чтение, данные без i18n). */
|
|
3040
|
+
export declare const analyticsReportSchema: z.ZodObject<{
|
|
3041
|
+
report: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
|
|
3042
|
+
from: z.ZodString;
|
|
3043
|
+
to: z.ZodString;
|
|
3044
|
+
groupBy: z.ZodArray<z.ZodEnum<["day", "user", "project", "model", "agent", "provider"]>, "many">;
|
|
3045
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
3046
|
+
dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3047
|
+
measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3048
|
+
costByCurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3049
|
+
}, "strip", z.ZodTypeAny, {
|
|
3050
|
+
dimensions: Record<string, string>;
|
|
3051
|
+
measures: Record<string, number>;
|
|
3052
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3053
|
+
}, {
|
|
3054
|
+
measures: Record<string, number>;
|
|
3055
|
+
dimensions?: Record<string, string> | undefined;
|
|
3056
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3057
|
+
}>, "many">;
|
|
3058
|
+
}, "strip", z.ZodTypeAny, {
|
|
3059
|
+
from: string;
|
|
3060
|
+
to: string;
|
|
3061
|
+
groupBy: ("user" | "provider" | "model" | "agent" | "project" | "day")[];
|
|
3062
|
+
report: "prompt" | "decision" | "usage" | "activity";
|
|
3063
|
+
rows: {
|
|
3064
|
+
dimensions: Record<string, string>;
|
|
3065
|
+
measures: Record<string, number>;
|
|
3066
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3067
|
+
}[];
|
|
3068
|
+
}, {
|
|
3069
|
+
from: string;
|
|
3070
|
+
to: string;
|
|
3071
|
+
groupBy: ("user" | "provider" | "model" | "agent" | "project" | "day")[];
|
|
3072
|
+
report: "prompt" | "decision" | "usage" | "activity";
|
|
3073
|
+
rows: {
|
|
3074
|
+
measures: Record<string, number>;
|
|
3075
|
+
dimensions?: Record<string, string> | undefined;
|
|
3076
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3077
|
+
}[];
|
|
3078
|
+
}>;
|
|
3079
|
+
/** PROP-102: формат выгрузки отчёта (`csv`/`json`; только данные). */
|
|
3080
|
+
export declare const analyticsExportFormatSchema: z.ZodEnum<["csv", "json"]>;
|
|
3081
|
+
/** PROP-102: сводка инстанса за период — агрегаты `usage`/`activity`/`decision`. */
|
|
3082
|
+
export declare const analyticsSummarySchema: z.ZodObject<{
|
|
3083
|
+
from: z.ZodString;
|
|
3084
|
+
to: z.ZodString;
|
|
3085
|
+
usage: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3086
|
+
activity: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3087
|
+
decision: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
3088
|
+
costByCurrency: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
3089
|
+
}, "strip", z.ZodTypeAny, {
|
|
3090
|
+
decision: Record<string, number>;
|
|
3091
|
+
usage: Record<string, number>;
|
|
3092
|
+
activity: Record<string, number>;
|
|
3093
|
+
from: string;
|
|
3094
|
+
to: string;
|
|
3095
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3096
|
+
}, {
|
|
3097
|
+
decision: Record<string, number>;
|
|
3098
|
+
usage: Record<string, number>;
|
|
3099
|
+
activity: Record<string, number>;
|
|
3100
|
+
from: string;
|
|
3101
|
+
to: string;
|
|
3102
|
+
costByCurrency?: Record<string, number> | undefined;
|
|
3103
|
+
}>;
|
|
3104
|
+
export type AnalyticsReportRowInput = z.infer<typeof analyticsReportRowSchema>;
|
|
3105
|
+
export type AnalyticsReportInput = z.infer<typeof analyticsReportSchema>;
|
|
3106
|
+
export type AnalyticsExportFormatInput = z.infer<typeof analyticsExportFormatSchema>;
|
|
3107
|
+
export type AnalyticsSummaryInput = z.infer<typeof analyticsSummarySchema>;
|