@itphx/synth-shared 0.11.3 → 0.12.4

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 (92) hide show
  1. package/dist/config/defaults.js +126 -3
  2. package/dist/config/env-overrides.d.ts +29 -0
  3. package/dist/config/env-overrides.js +155 -2
  4. package/dist/config/execution.d.ts +66 -0
  5. package/dist/config/execution.js +146 -0
  6. package/dist/config/index.d.ts +1 -0
  7. package/dist/config/index.js +1 -0
  8. package/dist/config/proxy.js +3 -1
  9. package/dist/config/resolve.d.ts +8 -8
  10. package/dist/config/resolve.js +7 -7
  11. package/dist/config/types.d.ts +1287 -4037
  12. package/dist/config/types.js +461 -68
  13. package/dist/i18n/index.d.ts +1 -1
  14. package/dist/i18n/index.js +277 -0
  15. package/dist/index.d.ts +14 -2
  16. package/dist/index.js +16 -2
  17. package/dist/model-metadata.d.ts +10 -0
  18. package/dist/schemas/index.d.ts +980 -2322
  19. package/dist/schemas/index.js +183 -22
  20. package/dist/types/analytics.d.ts +6 -6
  21. package/dist/types/analytics.js +4 -4
  22. package/dist/types/authority.d.ts +464 -0
  23. package/dist/types/authority.js +445 -0
  24. package/dist/types/background.d.ts +96 -0
  25. package/dist/types/background.js +24 -0
  26. package/dist/types/bus-events.d.ts +23 -1
  27. package/dist/types/catalog.d.ts +349 -0
  28. package/dist/types/catalog.js +393 -0
  29. package/dist/types/decision.d.ts +28 -337
  30. package/dist/types/egress.d.ts +1 -1
  31. package/dist/types/egress.js +1 -1
  32. package/dist/types/events.d.ts +54 -1
  33. package/dist/types/external-credentials.d.ts +352 -0
  34. package/dist/types/external-credentials.js +200 -0
  35. package/dist/types/hooks.d.ts +33 -12
  36. package/dist/types/index.d.ts +20 -0
  37. package/dist/types/index.js +50 -1
  38. package/dist/types/llm-filters.d.ts +150 -0
  39. package/dist/types/llm-filters.js +54 -0
  40. package/dist/types/mcp.d.ts +33 -2
  41. package/dist/types/mcp.js +44 -1
  42. package/dist/types/message.d.ts +45 -1
  43. package/dist/types/pack.d.ts +1102 -0
  44. package/dist/types/pack.js +1003 -0
  45. package/dist/types/permission.d.ts +25 -11
  46. package/dist/types/permission.js +1 -1
  47. package/dist/types/pipeline-engine.d.ts +453 -0
  48. package/dist/types/pipeline-engine.js +440 -0
  49. package/dist/types/pipeline.d.ts +275 -0
  50. package/dist/types/pipeline.js +212 -0
  51. package/dist/types/plugin-audit.d.ts +110 -0
  52. package/dist/types/plugin-audit.js +185 -0
  53. package/dist/types/plugin-hybrid.d.ts +85 -0
  54. package/dist/types/plugin-hybrid.js +68 -0
  55. package/dist/types/plugin-lock.d.ts +95 -0
  56. package/dist/types/plugin-lock.js +1 -0
  57. package/dist/types/plugin-protocol.d.ts +221 -0
  58. package/dist/types/plugin-protocol.js +322 -0
  59. package/dist/types/plugin-runtime.d.ts +25 -0
  60. package/dist/types/plugin-runtime.js +11 -0
  61. package/dist/types/plugin-scan.d.ts +159 -0
  62. package/dist/types/plugin-scan.js +166 -0
  63. package/dist/types/plugin-tools.d.ts +51 -0
  64. package/dist/types/plugin-tools.js +72 -0
  65. package/dist/types/project.d.ts +14 -0
  66. package/dist/types/prompt-blocks.d.ts +102 -0
  67. package/dist/types/prompt-blocks.js +24 -0
  68. package/dist/types/prompt.d.ts +45 -3
  69. package/dist/types/provider.d.ts +11 -0
  70. package/dist/types/question.d.ts +153 -0
  71. package/dist/types/question.js +65 -0
  72. package/dist/types/schedules.d.ts +26 -3
  73. package/dist/types/semver.d.ts +48 -0
  74. package/dist/types/semver.js +218 -0
  75. package/dist/types/service-keys.d.ts +41 -3
  76. package/dist/types/service-keys.js +44 -2
  77. package/dist/types/session.d.ts +54 -0
  78. package/dist/types/steering.d.ts +74 -0
  79. package/dist/types/steering.js +75 -0
  80. package/dist/types/tools.d.ts +125 -5
  81. package/dist/types/tools.js +75 -0
  82. package/dist/types/trust.d.ts +31 -0
  83. package/dist/types/trust.js +27 -0
  84. package/dist/types/worktree.d.ts +170 -0
  85. package/dist/types/worktree.js +101 -0
  86. package/dist/utils/index.d.ts +31 -1
  87. package/dist/utils/index.js +92 -12
  88. package/dist/utils/reasoning.d.ts +16 -0
  89. package/dist/utils/reasoning.js +37 -0
  90. package/dist/version.d.ts +1 -1
  91. package/dist/version.js +1 -1
  92. package/package.json +2 -2
@@ -1,13 +1,77 @@
1
1
  import { z } from 'zod';
2
2
  import { MessageRole, GlobalRole, ProjectRole, StatusMessageType } from '../types/index.js';
3
- import type { GitRepoConfig, ProjectIconKey, ProjectColorKey } from '../types/index.js';
4
- export declare const messageRoleSchema: z.ZodNativeEnum<typeof MessageRole>;
5
- export declare const globalRoleSchema: z.ZodNativeEnum<typeof GlobalRole>;
6
- export declare const projectRoleSchema: z.ZodNativeEnum<typeof ProjectRole>;
7
- export declare const statusMessageTypeSchema: z.ZodNativeEnum<typeof StatusMessageType>;
3
+ import type { GitRepoConfig, ProjectIconKey, ProjectColorKey, SessionParticipantRole } from '../types/index.js';
4
+ /**
5
+ * Экземпляр zod, которым построены **все** схемы этого пакета.
6
+ *
7
+ * В zod 4 `extendZodWithOpenApi` навешивает `.openapi()` на прототип
8
+ * **конкретного** экземпляра модуля (а не глобально). Потребителю, который
9
+ * расширяет zod (публичный OpenAPI в core), нужно расширять ровно тот экземпляр,
10
+ * которым созданы shared-схемы, — иначе у них не будет `.openapi()`.
11
+ */
12
+ export { z as sharedZod };
13
+ export declare const messageRoleSchema: z.ZodEnum<typeof MessageRole>;
14
+ export declare const globalRoleSchema: z.ZodEnum<typeof GlobalRole>;
15
+ export declare const projectRoleSchema: z.ZodEnum<typeof ProjectRole>;
16
+ export declare const statusMessageTypeSchema: z.ZodEnum<typeof StatusMessageType>;
8
17
  /** Zod-схемы канонических ключей иконок/цветов (единые для project и session). */
9
- export declare const projectIconKeySchema: 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"]>;
10
- export declare const projectColorKeySchema: z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>;
18
+ export declare const projectIconKeySchema: z.ZodEnum<{
19
+ file: "file";
20
+ git: "git";
21
+ chat: "chat";
22
+ image: "image";
23
+ task: "task";
24
+ code: "code";
25
+ terminal: "terminal";
26
+ rocket: "rocket";
27
+ flask: "flask";
28
+ gamepad: "gamepad";
29
+ briefcase: "briefcase";
30
+ home: "home";
31
+ globe: "globe";
32
+ leaf: "leaf";
33
+ shield: "shield";
34
+ palette: "palette";
35
+ server: "server";
36
+ phone: "phone";
37
+ database: "database";
38
+ lightbulb: "lightbulb";
39
+ music: "music";
40
+ camera: "camera";
41
+ book: "book";
42
+ heart: "heart";
43
+ folder: "folder";
44
+ cpu: "cpu";
45
+ "file-code": "file-code";
46
+ docs: "docs";
47
+ todo: "todo";
48
+ bug: "bug";
49
+ robot: "robot";
50
+ brain: "brain";
51
+ repo: "repo";
52
+ test: "test";
53
+ chart: "chart";
54
+ star: "star";
55
+ calendar: "calendar";
56
+ }>;
57
+ export declare const projectColorKeySchema: z.ZodEnum<{
58
+ a1: "a1";
59
+ a2: "a2";
60
+ a3: "a3";
61
+ a4: "a4";
62
+ a5: "a5";
63
+ a6: "a6";
64
+ a7: "a7";
65
+ a8: "a8";
66
+ a9: "a9";
67
+ a10: "a10";
68
+ a11: "a11";
69
+ a12: "a12";
70
+ a13: "a13";
71
+ a14: "a14";
72
+ a15: "a15";
73
+ a16: "a16";
74
+ }>;
11
75
  /** true, если значение — канонический ключ иконки (для записи и чтения). */
12
76
  export declare function isProjectIconKey(value: unknown): value is ProjectIconKey;
13
77
  /** true, если значение — канонический ключ цвета (без алиасов; для записи и чтения). */
@@ -22,37 +86,65 @@ export declare function normalizeIconKey(value: unknown): ProjectIconKey | undef
22
86
  * прочее (включая legacy-алиасы) → `undefined`.
23
87
  */
24
88
  export declare function normalizeColorKey(value: unknown): ProjectColorKey | undefined;
89
+ /**
90
+ * ADR-106 Ф4: нормализация роли участника сессии. Каноническая роль → как
91
+ * есть; всё прочее — **fail-closed** (`viewer`, только чтение).
92
+ */
93
+ export declare function normalizeSessionParticipantRole(value: unknown): SessionParticipantRole;
25
94
  export declare const tokenUsageSchema: z.ZodObject<{
26
95
  inputTokens: z.ZodNumber;
27
96
  outputTokens: z.ZodNumber;
28
97
  totalTokens: z.ZodNumber;
29
- }, "strip", z.ZodTypeAny, {
30
- inputTokens: number;
31
- outputTokens: number;
32
- totalTokens: number;
33
- }, {
34
- inputTokens: number;
35
- outputTokens: number;
36
- totalTokens: number;
98
+ }, z.core.$strip>;
99
+ /**
100
+ * Патч-схема объекта: как `.partial()`, но **без дефолтов**.
101
+ *
102
+ * Для PATCH отсутствующий ключ означает «не менять», а `.partial()` в zod 4
103
+ * протекает дефолтами: `pluginsConfigSchema.partial().parse({})` возвращает
104
+ * объект со всеми значениями по умолчанию, и частичный патч затирает чужие
105
+ * настройки. Поэтому поля берутся из `shape`, у каждого снимается дефолт и
106
+ * навешивается `.optional()`. Набор ключей и правила валидации остаются из
107
+ * исходной схемы (единственный источник правды). `.strict()` вызывается
108
+ * потребителем, если нужен отказ на неизвестный ключ.
109
+ */
110
+ export declare function patchObjectSchema<S extends z.ZodRawShape>(schema: z.ZodObject<S>): z.ZodObject<{
111
+ [K in keyof S]: z.ZodOptional<S[K]>;
37
112
  }>;
38
113
  export declare const sessionSettingsSchema: z.ZodObject<{
39
114
  provider: z.ZodOptional<z.ZodString>;
40
115
  model: z.ZodOptional<z.ZodString>;
41
- reasoningLevel: z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>;
116
+ reasoningLevel: z.ZodOptional<z.ZodEnum<{
117
+ default: "default";
118
+ high: "high";
119
+ medium: "medium";
120
+ low: "low";
121
+ none: "none";
122
+ }>>;
42
123
  temperature: z.ZodDefault<z.ZodNumber>;
43
124
  maxTokens: z.ZodDefault<z.ZodNumber>;
44
125
  systemPrompt: z.ZodOptional<z.ZodString>;
45
126
  debugEnabled: z.ZodDefault<z.ZodBoolean>;
46
127
  streamEnabled: z.ZodDefault<z.ZodBoolean>;
47
128
  agentRole: z.ZodOptional<z.ZodString>;
48
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49
- mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
50
- contextOptimization: z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>;
51
- slidingWindowMode: z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>;
129
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
130
+ mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
131
+ contextOptimization: z.ZodDefault<z.ZodEnum<{
132
+ none: "none";
133
+ sliding_window: "sliding_window";
134
+ summarization: "summarization";
135
+ sticky_notes: "sticky_notes";
136
+ }>>;
137
+ slidingWindowMode: z.ZodDefault<z.ZodEnum<{
138
+ messages: "messages";
139
+ tokens: "tokens";
140
+ }>>;
52
141
  slidingWindowMessageLimit: z.ZodDefault<z.ZodNumber>;
53
142
  slidingWindowTokenThreshold: z.ZodDefault<z.ZodNumber>;
54
143
  summarizationEnabled: z.ZodDefault<z.ZodBoolean>;
55
- summarizationTriggerMode: z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>;
144
+ summarizationTriggerMode: z.ZodDefault<z.ZodEnum<{
145
+ messages: "messages";
146
+ tokens: "tokens";
147
+ }>>;
56
148
  summarizeAfterN: z.ZodDefault<z.ZodNumber>;
57
149
  summarizeTokenThreshold: z.ZodDefault<z.ZodNumber>;
58
150
  summarizationHeadMessages: z.ZodDefault<z.ZodNumber>;
@@ -60,94 +152,111 @@ export declare const sessionSettingsSchema: z.ZodObject<{
60
152
  showInterview: z.ZodDefault<z.ZodBoolean>;
61
153
  websocketEnabled: z.ZodDefault<z.ZodBoolean>;
62
154
  language: z.ZodOptional<z.ZodString>;
63
- planMode: z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>;
64
- skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
65
- skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
- /** ADR-084: per-session гейт decision-уровня микро-каскада (undefined → config.decision.enabled). */
155
+ planMode: z.ZodOptional<z.ZodEnum<{
156
+ auto: "auto";
157
+ strict: "strict";
158
+ off: "off";
159
+ }>>;
160
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
+ skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
162
  decisionFirst: z.ZodOptional<z.ZodBoolean>;
68
- }, "strip", z.ZodTypeAny, {
69
- temperature: number;
70
- maxTokens: number;
71
- debugEnabled: boolean;
72
- streamEnabled: boolean;
73
- contextOptimization: "none" | "sliding_window" | "summarization" | "sticky_notes";
74
- slidingWindowMode: "messages" | "tokens";
75
- slidingWindowMessageLimit: number;
76
- slidingWindowTokenThreshold: number;
77
- summarizationEnabled: boolean;
78
- summarizationTriggerMode: "messages" | "tokens";
79
- summarizeAfterN: number;
80
- summarizeTokenThreshold: number;
81
- summarizationHeadMessages: number;
82
- summarizationTailMessages: number;
83
- showInterview: boolean;
84
- websocketEnabled: boolean;
85
- provider?: string | undefined;
86
- model?: string | undefined;
87
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
88
- systemPrompt?: string | undefined;
89
- agentRole?: string | undefined;
90
- mcpServers?: string[] | undefined;
91
- mcpDisabledServers?: string[] | undefined;
92
- language?: string | undefined;
93
- planMode?: "auto" | "strict" | "off" | undefined;
94
- skills?: string[] | undefined;
95
- skillsDisabled?: string[] | undefined;
96
- decisionFirst?: boolean | undefined;
97
- }, {
98
- provider?: string | undefined;
99
- model?: string | undefined;
100
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
101
- temperature?: number | undefined;
102
- maxTokens?: number | undefined;
103
- systemPrompt?: string | undefined;
104
- debugEnabled?: boolean | undefined;
105
- streamEnabled?: boolean | undefined;
106
- agentRole?: string | undefined;
107
- mcpServers?: string[] | undefined;
108
- mcpDisabledServers?: string[] | undefined;
109
- contextOptimization?: "none" | "sliding_window" | "summarization" | "sticky_notes" | undefined;
110
- slidingWindowMode?: "messages" | "tokens" | undefined;
111
- slidingWindowMessageLimit?: number | undefined;
112
- slidingWindowTokenThreshold?: number | undefined;
113
- summarizationEnabled?: boolean | undefined;
114
- summarizationTriggerMode?: "messages" | "tokens" | undefined;
115
- summarizeAfterN?: number | undefined;
116
- summarizeTokenThreshold?: number | undefined;
117
- summarizationHeadMessages?: number | undefined;
118
- summarizationTailMessages?: number | undefined;
119
- showInterview?: boolean | undefined;
120
- websocketEnabled?: boolean | undefined;
121
- language?: string | undefined;
122
- planMode?: "auto" | "strict" | "off" | undefined;
123
- skills?: string[] | undefined;
124
- skillsDisabled?: string[] | undefined;
125
- decisionFirst?: boolean | undefined;
126
- }>;
163
+ }, z.core.$strip>;
127
164
  export declare const sessionCreateSchema: z.ZodObject<{
128
165
  name: z.ZodOptional<z.ZodString>;
129
166
  title: z.ZodOptional<z.ZodString>;
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
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
167
+ icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
168
+ file: "file";
169
+ git: "git";
170
+ chat: "chat";
171
+ image: "image";
172
+ task: "task";
173
+ code: "code";
174
+ terminal: "terminal";
175
+ rocket: "rocket";
176
+ flask: "flask";
177
+ gamepad: "gamepad";
178
+ briefcase: "briefcase";
179
+ home: "home";
180
+ globe: "globe";
181
+ leaf: "leaf";
182
+ shield: "shield";
183
+ palette: "palette";
184
+ server: "server";
185
+ phone: "phone";
186
+ database: "database";
187
+ lightbulb: "lightbulb";
188
+ music: "music";
189
+ camera: "camera";
190
+ book: "book";
191
+ heart: "heart";
192
+ folder: "folder";
193
+ cpu: "cpu";
194
+ "file-code": "file-code";
195
+ docs: "docs";
196
+ todo: "todo";
197
+ bug: "bug";
198
+ robot: "robot";
199
+ brain: "brain";
200
+ repo: "repo";
201
+ test: "test";
202
+ chart: "chart";
203
+ star: "star";
204
+ calendar: "calendar";
205
+ }>>>;
206
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
207
+ a1: "a1";
208
+ a2: "a2";
209
+ a3: "a3";
210
+ a4: "a4";
211
+ a5: "a5";
212
+ a6: "a6";
213
+ a7: "a7";
214
+ a8: "a8";
215
+ a9: "a9";
216
+ a10: "a10";
217
+ a11: "a11";
218
+ a12: "a12";
219
+ a13: "a13";
220
+ a14: "a14";
221
+ a15: "a15";
222
+ a16: "a16";
223
+ }>>>;
132
224
  projectId: z.ZodOptional<z.ZodString>;
133
225
  settings: z.ZodOptional<z.ZodObject<{
134
226
  provider: z.ZodOptional<z.ZodString>;
135
227
  model: z.ZodOptional<z.ZodString>;
136
- reasoningLevel: z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>;
228
+ reasoningLevel: z.ZodOptional<z.ZodEnum<{
229
+ default: "default";
230
+ high: "high";
231
+ medium: "medium";
232
+ low: "low";
233
+ none: "none";
234
+ }>>;
137
235
  temperature: z.ZodDefault<z.ZodNumber>;
138
236
  maxTokens: z.ZodDefault<z.ZodNumber>;
139
237
  systemPrompt: z.ZodOptional<z.ZodString>;
140
238
  debugEnabled: z.ZodDefault<z.ZodBoolean>;
141
239
  streamEnabled: z.ZodDefault<z.ZodBoolean>;
142
240
  agentRole: z.ZodOptional<z.ZodString>;
143
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
144
- mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
145
- contextOptimization: z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>;
146
- slidingWindowMode: z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>;
241
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
242
+ mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
243
+ contextOptimization: z.ZodDefault<z.ZodEnum<{
244
+ none: "none";
245
+ sliding_window: "sliding_window";
246
+ summarization: "summarization";
247
+ sticky_notes: "sticky_notes";
248
+ }>>;
249
+ slidingWindowMode: z.ZodDefault<z.ZodEnum<{
250
+ messages: "messages";
251
+ tokens: "tokens";
252
+ }>>;
147
253
  slidingWindowMessageLimit: z.ZodDefault<z.ZodNumber>;
148
254
  slidingWindowTokenThreshold: z.ZodDefault<z.ZodNumber>;
149
255
  summarizationEnabled: z.ZodDefault<z.ZodBoolean>;
150
- summarizationTriggerMode: z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>;
256
+ summarizationTriggerMode: z.ZodDefault<z.ZodEnum<{
257
+ messages: "messages";
258
+ tokens: "tokens";
259
+ }>>;
151
260
  summarizeAfterN: z.ZodDefault<z.ZodNumber>;
152
261
  summarizeTokenThreshold: z.ZodDefault<z.ZodNumber>;
153
262
  summarizationHeadMessages: z.ZodDefault<z.ZodNumber>;
@@ -155,166 +264,111 @@ export declare const sessionCreateSchema: z.ZodObject<{
155
264
  showInterview: z.ZodDefault<z.ZodBoolean>;
156
265
  websocketEnabled: z.ZodDefault<z.ZodBoolean>;
157
266
  language: z.ZodOptional<z.ZodString>;
158
- planMode: z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>;
159
- skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
160
- skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
161
- /** ADR-084: per-session гейт decision-уровня микро-каскада (undefined → config.decision.enabled). */
267
+ planMode: z.ZodOptional<z.ZodEnum<{
268
+ auto: "auto";
269
+ strict: "strict";
270
+ off: "off";
271
+ }>>;
272
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
273
+ skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
274
  decisionFirst: z.ZodOptional<z.ZodBoolean>;
163
- }, "strip", z.ZodTypeAny, {
164
- temperature: number;
165
- maxTokens: number;
166
- debugEnabled: boolean;
167
- streamEnabled: boolean;
168
- contextOptimization: "none" | "sliding_window" | "summarization" | "sticky_notes";
169
- slidingWindowMode: "messages" | "tokens";
170
- slidingWindowMessageLimit: number;
171
- slidingWindowTokenThreshold: number;
172
- summarizationEnabled: boolean;
173
- summarizationTriggerMode: "messages" | "tokens";
174
- summarizeAfterN: number;
175
- summarizeTokenThreshold: number;
176
- summarizationHeadMessages: number;
177
- summarizationTailMessages: number;
178
- showInterview: boolean;
179
- websocketEnabled: boolean;
180
- provider?: string | undefined;
181
- model?: string | undefined;
182
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
183
- systemPrompt?: string | undefined;
184
- agentRole?: string | undefined;
185
- mcpServers?: string[] | undefined;
186
- mcpDisabledServers?: string[] | undefined;
187
- language?: string | undefined;
188
- planMode?: "auto" | "strict" | "off" | undefined;
189
- skills?: string[] | undefined;
190
- skillsDisabled?: string[] | undefined;
191
- decisionFirst?: boolean | undefined;
192
- }, {
193
- provider?: string | undefined;
194
- model?: string | undefined;
195
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
196
- temperature?: number | undefined;
197
- maxTokens?: number | undefined;
198
- systemPrompt?: string | undefined;
199
- debugEnabled?: boolean | undefined;
200
- streamEnabled?: boolean | undefined;
201
- agentRole?: string | undefined;
202
- mcpServers?: string[] | undefined;
203
- mcpDisabledServers?: string[] | undefined;
204
- contextOptimization?: "none" | "sliding_window" | "summarization" | "sticky_notes" | undefined;
205
- slidingWindowMode?: "messages" | "tokens" | undefined;
206
- slidingWindowMessageLimit?: number | undefined;
207
- slidingWindowTokenThreshold?: number | undefined;
208
- summarizationEnabled?: boolean | undefined;
209
- summarizationTriggerMode?: "messages" | "tokens" | undefined;
210
- summarizeAfterN?: number | undefined;
211
- summarizeTokenThreshold?: number | undefined;
212
- summarizationHeadMessages?: number | undefined;
213
- summarizationTailMessages?: number | undefined;
214
- showInterview?: boolean | undefined;
215
- websocketEnabled?: boolean | undefined;
216
- language?: string | undefined;
217
- planMode?: "auto" | "strict" | "off" | undefined;
218
- skills?: string[] | undefined;
219
- skillsDisabled?: string[] | undefined;
220
- decisionFirst?: boolean | undefined;
221
- }>>;
222
- }, "strip", z.ZodTypeAny, {
223
- name?: string | undefined;
224
- title?: string | undefined;
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;
226
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
227
- projectId?: string | undefined;
228
- settings?: {
229
- temperature: number;
230
- maxTokens: number;
231
- debugEnabled: boolean;
232
- streamEnabled: boolean;
233
- contextOptimization: "none" | "sliding_window" | "summarization" | "sticky_notes";
234
- slidingWindowMode: "messages" | "tokens";
235
- slidingWindowMessageLimit: number;
236
- slidingWindowTokenThreshold: number;
237
- summarizationEnabled: boolean;
238
- summarizationTriggerMode: "messages" | "tokens";
239
- summarizeAfterN: number;
240
- summarizeTokenThreshold: number;
241
- summarizationHeadMessages: number;
242
- summarizationTailMessages: number;
243
- showInterview: boolean;
244
- websocketEnabled: boolean;
245
- provider?: string | undefined;
246
- model?: string | undefined;
247
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
248
- systemPrompt?: string | undefined;
249
- agentRole?: string | undefined;
250
- mcpServers?: string[] | undefined;
251
- mcpDisabledServers?: string[] | undefined;
252
- language?: string | undefined;
253
- planMode?: "auto" | "strict" | "off" | undefined;
254
- skills?: string[] | undefined;
255
- skillsDisabled?: string[] | undefined;
256
- decisionFirst?: boolean | undefined;
257
- } | undefined;
258
- }, {
259
- name?: string | undefined;
260
- title?: string | undefined;
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;
262
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
263
- projectId?: string | undefined;
264
- settings?: {
265
- provider?: string | undefined;
266
- model?: string | undefined;
267
- reasoningLevel?: "high" | "medium" | "low" | "default" | "none" | undefined;
268
- temperature?: number | undefined;
269
- maxTokens?: number | undefined;
270
- systemPrompt?: string | undefined;
271
- debugEnabled?: boolean | undefined;
272
- streamEnabled?: boolean | undefined;
273
- agentRole?: string | undefined;
274
- mcpServers?: string[] | undefined;
275
- mcpDisabledServers?: string[] | undefined;
276
- contextOptimization?: "none" | "sliding_window" | "summarization" | "sticky_notes" | undefined;
277
- slidingWindowMode?: "messages" | "tokens" | undefined;
278
- slidingWindowMessageLimit?: number | undefined;
279
- slidingWindowTokenThreshold?: number | undefined;
280
- summarizationEnabled?: boolean | undefined;
281
- summarizationTriggerMode?: "messages" | "tokens" | undefined;
282
- summarizeAfterN?: number | undefined;
283
- summarizeTokenThreshold?: number | undefined;
284
- summarizationHeadMessages?: number | undefined;
285
- summarizationTailMessages?: number | undefined;
286
- showInterview?: boolean | undefined;
287
- websocketEnabled?: boolean | undefined;
288
- language?: string | undefined;
289
- planMode?: "auto" | "strict" | "off" | undefined;
290
- skills?: string[] | undefined;
291
- skillsDisabled?: string[] | undefined;
292
- decisionFirst?: boolean | undefined;
293
- } | undefined;
294
- }>;
275
+ }, z.core.$strip>>;
276
+ }, z.core.$strip>;
295
277
  export declare const sessionUpdateSchema: z.ZodObject<{
296
278
  name: z.ZodOptional<z.ZodString>;
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"]>>>;
298
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
279
+ icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
280
+ file: "file";
281
+ git: "git";
282
+ chat: "chat";
283
+ image: "image";
284
+ task: "task";
285
+ code: "code";
286
+ terminal: "terminal";
287
+ rocket: "rocket";
288
+ flask: "flask";
289
+ gamepad: "gamepad";
290
+ briefcase: "briefcase";
291
+ home: "home";
292
+ globe: "globe";
293
+ leaf: "leaf";
294
+ shield: "shield";
295
+ palette: "palette";
296
+ server: "server";
297
+ phone: "phone";
298
+ database: "database";
299
+ lightbulb: "lightbulb";
300
+ music: "music";
301
+ camera: "camera";
302
+ book: "book";
303
+ heart: "heart";
304
+ folder: "folder";
305
+ cpu: "cpu";
306
+ "file-code": "file-code";
307
+ docs: "docs";
308
+ todo: "todo";
309
+ bug: "bug";
310
+ robot: "robot";
311
+ brain: "brain";
312
+ repo: "repo";
313
+ test: "test";
314
+ chart: "chart";
315
+ star: "star";
316
+ calendar: "calendar";
317
+ }>>>;
318
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
319
+ a1: "a1";
320
+ a2: "a2";
321
+ a3: "a3";
322
+ a4: "a4";
323
+ a5: "a5";
324
+ a6: "a6";
325
+ a7: "a7";
326
+ a8: "a8";
327
+ a9: "a9";
328
+ a10: "a10";
329
+ a11: "a11";
330
+ a12: "a12";
331
+ a13: "a13";
332
+ a14: "a14";
333
+ a15: "a15";
334
+ a16: "a16";
335
+ }>>>;
299
336
  projectId: z.ZodOptional<z.ZodString>;
300
337
  settings: z.ZodOptional<z.ZodObject<{
301
338
  provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
302
339
  model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
303
- reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>>;
340
+ reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
341
+ default: "default";
342
+ high: "high";
343
+ medium: "medium";
344
+ low: "low";
345
+ none: "none";
346
+ }>>>;
304
347
  temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
305
348
  maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
306
349
  systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
307
350
  debugEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
308
351
  streamEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
309
352
  agentRole: z.ZodOptional<z.ZodOptional<z.ZodString>>;
310
- mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
311
- mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
312
- contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>>;
313
- slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
353
+ mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
354
+ mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
355
+ contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
356
+ none: "none";
357
+ sliding_window: "sliding_window";
358
+ summarization: "summarization";
359
+ sticky_notes: "sticky_notes";
360
+ }>>>;
361
+ slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
362
+ messages: "messages";
363
+ tokens: "tokens";
364
+ }>>>;
314
365
  slidingWindowMessageLimit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
315
366
  slidingWindowTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
316
367
  summarizationEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
317
- summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
368
+ summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
369
+ messages: "messages";
370
+ tokens: "tokens";
371
+ }>>>;
318
372
  summarizeAfterN: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
319
373
  summarizeTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
320
374
  summarizationHeadMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
@@ -322,140 +376,16 @@ export declare const sessionUpdateSchema: z.ZodObject<{
322
376
  showInterview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
323
377
  websocketEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
324
378
  language: z.ZodOptional<z.ZodOptional<z.ZodString>>;
325
- planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>>;
326
- skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
327
- skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
379
+ planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
380
+ auto: "auto";
381
+ strict: "strict";
382
+ off: "off";
383
+ }>>>;
384
+ skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
385
+ skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
328
386
  decisionFirst: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
329
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
330
- provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
331
- model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
332
- reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>>;
333
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
334
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
335
- systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
336
- debugEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
337
- streamEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
338
- agentRole: z.ZodOptional<z.ZodOptional<z.ZodString>>;
339
- mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
340
- mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
341
- contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>>;
342
- slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
343
- slidingWindowMessageLimit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
344
- slidingWindowTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
345
- summarizationEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
346
- summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
347
- summarizeAfterN: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
348
- summarizeTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
349
- summarizationHeadMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
350
- summarizationTailMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
351
- showInterview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
352
- websocketEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
353
- language: z.ZodOptional<z.ZodOptional<z.ZodString>>;
354
- planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>>;
355
- skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
356
- skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
357
- decisionFirst: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
358
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
359
- provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
360
- model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
361
- reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>>;
362
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
363
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
364
- systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
365
- debugEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
366
- streamEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
367
- agentRole: z.ZodOptional<z.ZodOptional<z.ZodString>>;
368
- mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
369
- mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
370
- contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>>;
371
- slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
372
- slidingWindowMessageLimit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
373
- slidingWindowTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
374
- summarizationEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
375
- summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
376
- summarizeAfterN: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
377
- summarizeTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
378
- summarizationHeadMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
379
- summarizationTailMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
380
- showInterview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
381
- websocketEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
382
- language: z.ZodOptional<z.ZodOptional<z.ZodString>>;
383
- planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>>;
384
- skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
385
- skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
386
- decisionFirst: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
387
- }, z.ZodTypeAny, "passthrough">>>;
388
- }, "strip", z.ZodTypeAny, {
389
- name?: string | undefined;
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;
391
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
392
- projectId?: string | undefined;
393
- settings?: z.objectOutputType<{
394
- provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
395
- model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
396
- reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>>;
397
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
398
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
399
- systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
400
- debugEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
401
- streamEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
402
- agentRole: z.ZodOptional<z.ZodOptional<z.ZodString>>;
403
- mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
404
- mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
405
- contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>>;
406
- slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
407
- slidingWindowMessageLimit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
408
- slidingWindowTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
409
- summarizationEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
410
- summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
411
- summarizeAfterN: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
412
- summarizeTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
413
- summarizationHeadMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
414
- summarizationTailMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
415
- showInterview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
416
- websocketEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
417
- language: z.ZodOptional<z.ZodOptional<z.ZodString>>;
418
- planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>>;
419
- skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
420
- skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
421
- decisionFirst: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
422
- }, z.ZodTypeAny, "passthrough"> | undefined;
423
- }, {
424
- name?: string | undefined;
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;
426
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
427
- projectId?: string | undefined;
428
- settings?: z.objectInputType<{
429
- provider: z.ZodOptional<z.ZodOptional<z.ZodString>>;
430
- model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
431
- reasoningLevel: z.ZodOptional<z.ZodOptional<z.ZodEnum<["default", "none", "low", "medium", "high"]>>>;
432
- temperature: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
433
- maxTokens: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
434
- systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
435
- debugEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
436
- streamEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
437
- agentRole: z.ZodOptional<z.ZodOptional<z.ZodString>>;
438
- mcpServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
439
- mcpDisabledServers: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
440
- contextOptimization: z.ZodOptional<z.ZodDefault<z.ZodEnum<["none", "sliding_window", "summarization", "sticky_notes"]>>>;
441
- slidingWindowMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
442
- slidingWindowMessageLimit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
443
- slidingWindowTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
444
- summarizationEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
445
- summarizationTriggerMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["messages", "tokens"]>>>;
446
- summarizeAfterN: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
447
- summarizeTokenThreshold: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
448
- summarizationHeadMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
449
- summarizationTailMessages: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
450
- showInterview: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
451
- websocketEnabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
452
- language: z.ZodOptional<z.ZodOptional<z.ZodString>>;
453
- planMode: z.ZodOptional<z.ZodOptional<z.ZodEnum<["auto", "strict", "off"]>>>;
454
- skills: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
455
- skillsDisabled: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
456
- decisionFirst: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
457
- }, z.ZodTypeAny, "passthrough"> | undefined;
458
- }>;
387
+ }, z.core.$loose>>;
388
+ }, z.core.$strip>;
459
389
  /**
460
390
  * ADR-076: запись реестра git-репозиториев. `path` обязателен, остальные поля
461
391
  * опциональны; старые формы (`string` / `{ path }`) принимаются через
@@ -465,30 +395,15 @@ export declare const gitRepoConfigSchema: z.ZodObject<{
465
395
  id: z.ZodOptional<z.ZodString>;
466
396
  name: z.ZodOptional<z.ZodString>;
467
397
  url: z.ZodOptional<z.ZodString>;
468
- type: z.ZodOptional<z.ZodEnum<["https", "ssh"]>>;
398
+ type: z.ZodOptional<z.ZodEnum<{
399
+ https: "https";
400
+ ssh: "ssh";
401
+ }>>;
469
402
  path: z.ZodString;
470
403
  defaultBranch: z.ZodOptional<z.ZodString>;
471
404
  sshKeyId: z.ZodOptional<z.ZodString>;
472
405
  lastFetch: z.ZodOptional<z.ZodString>;
473
- }, "strip", z.ZodTypeAny, {
474
- path: string;
475
- type?: "https" | "ssh" | undefined;
476
- name?: string | undefined;
477
- id?: string | undefined;
478
- url?: string | undefined;
479
- defaultBranch?: string | undefined;
480
- sshKeyId?: string | undefined;
481
- lastFetch?: string | undefined;
482
- }, {
483
- path: string;
484
- type?: "https" | "ssh" | undefined;
485
- name?: string | undefined;
486
- id?: string | undefined;
487
- url?: string | undefined;
488
- defaultBranch?: string | undefined;
489
- sshKeyId?: string | undefined;
490
- lastFetch?: string | undefined;
491
- }>;
406
+ }, z.core.$strip>;
492
407
  /**
493
408
  * ADR-076: нормализация legacy-значения `repos` к `GitRepoConfig`.
494
409
  * `string` → `{ path }`; объект → прогон через `gitRepoConfigSchema`
@@ -498,209 +413,197 @@ export declare function normalizeGitRepoConfig(raw: unknown): GitRepoConfig | nu
498
413
  export declare const projectCreateSchema: z.ZodObject<{
499
414
  name: z.ZodString;
500
415
  description: z.ZodDefault<z.ZodString>;
501
- 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"]>>>;
502
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
416
+ icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
417
+ file: "file";
418
+ git: "git";
419
+ chat: "chat";
420
+ image: "image";
421
+ task: "task";
422
+ code: "code";
423
+ terminal: "terminal";
424
+ rocket: "rocket";
425
+ flask: "flask";
426
+ gamepad: "gamepad";
427
+ briefcase: "briefcase";
428
+ home: "home";
429
+ globe: "globe";
430
+ leaf: "leaf";
431
+ shield: "shield";
432
+ palette: "palette";
433
+ server: "server";
434
+ phone: "phone";
435
+ database: "database";
436
+ lightbulb: "lightbulb";
437
+ music: "music";
438
+ camera: "camera";
439
+ book: "book";
440
+ heart: "heart";
441
+ folder: "folder";
442
+ cpu: "cpu";
443
+ "file-code": "file-code";
444
+ docs: "docs";
445
+ todo: "todo";
446
+ bug: "bug";
447
+ robot: "robot";
448
+ brain: "brain";
449
+ repo: "repo";
450
+ test: "test";
451
+ chart: "chart";
452
+ star: "star";
453
+ calendar: "calendar";
454
+ }>>>;
455
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
456
+ a1: "a1";
457
+ a2: "a2";
458
+ a3: "a3";
459
+ a4: "a4";
460
+ a5: "a5";
461
+ a6: "a6";
462
+ a7: "a7";
463
+ a8: "a8";
464
+ a9: "a9";
465
+ a10: "a10";
466
+ a11: "a11";
467
+ a12: "a12";
468
+ a13: "a13";
469
+ a14: "a14";
470
+ a15: "a15";
471
+ a16: "a16";
472
+ }>>>;
503
473
  workspace: z.ZodOptional<z.ZodString>;
504
- repos: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
474
+ repos: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
505
475
  id: z.ZodOptional<z.ZodString>;
506
476
  name: z.ZodOptional<z.ZodString>;
507
477
  url: z.ZodOptional<z.ZodString>;
508
- type: z.ZodOptional<z.ZodEnum<["https", "ssh"]>>;
478
+ type: z.ZodOptional<z.ZodEnum<{
479
+ https: "https";
480
+ ssh: "ssh";
481
+ }>>;
509
482
  path: z.ZodString;
510
483
  defaultBranch: z.ZodOptional<z.ZodString>;
511
484
  sshKeyId: z.ZodOptional<z.ZodString>;
512
485
  lastFetch: z.ZodOptional<z.ZodString>;
513
- }, "strip", z.ZodTypeAny, {
514
- path: string;
515
- type?: "https" | "ssh" | undefined;
516
- name?: string | undefined;
517
- id?: string | undefined;
518
- url?: string | undefined;
519
- defaultBranch?: string | undefined;
520
- sshKeyId?: string | undefined;
521
- lastFetch?: string | undefined;
522
- }, {
523
- path: string;
524
- type?: "https" | "ssh" | undefined;
525
- name?: string | undefined;
526
- id?: string | undefined;
527
- url?: string | undefined;
528
- defaultBranch?: string | undefined;
529
- sshKeyId?: string | undefined;
530
- lastFetch?: string | undefined;
531
- }>]>, "many">>;
532
- }, "strip", z.ZodTypeAny, {
533
- name: string;
534
- description: string;
535
- workspace?: string | undefined;
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;
537
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
538
- repos?: (string | {
539
- path: string;
540
- type?: "https" | "ssh" | undefined;
541
- name?: string | undefined;
542
- id?: string | undefined;
543
- url?: string | undefined;
544
- defaultBranch?: string | undefined;
545
- sshKeyId?: string | undefined;
546
- lastFetch?: string | undefined;
547
- })[] | undefined;
548
- }, {
549
- name: string;
550
- workspace?: string | undefined;
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;
552
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
553
- description?: string | undefined;
554
- repos?: (string | {
555
- path: string;
556
- type?: "https" | "ssh" | undefined;
557
- name?: string | undefined;
558
- id?: string | undefined;
559
- url?: string | undefined;
560
- defaultBranch?: string | undefined;
561
- sshKeyId?: string | undefined;
562
- lastFetch?: string | undefined;
563
- })[] | undefined;
564
- }>;
486
+ }, z.core.$strip>]>>>;
487
+ }, z.core.$strip>;
488
+ /** ADR-107: проектная политика памяти (undefined — не менять). */
489
+ export declare const projectMemoryUpdateSchema: z.ZodObject<{
490
+ enabled: z.ZodOptional<z.ZodBoolean>;
491
+ }, z.core.$strip>;
565
492
  export declare const projectUpdateSchema: z.ZodObject<{
566
493
  name: z.ZodOptional<z.ZodString>;
567
494
  description: z.ZodOptional<z.ZodString>;
568
495
  currentTask: z.ZodOptional<z.ZodString>;
569
496
  invariants: z.ZodOptional<z.ZodString>;
570
- 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"]>>>;
571
- color: z.ZodNullable<z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>>;
497
+ icon: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
498
+ file: "file";
499
+ git: "git";
500
+ chat: "chat";
501
+ image: "image";
502
+ task: "task";
503
+ code: "code";
504
+ terminal: "terminal";
505
+ rocket: "rocket";
506
+ flask: "flask";
507
+ gamepad: "gamepad";
508
+ briefcase: "briefcase";
509
+ home: "home";
510
+ globe: "globe";
511
+ leaf: "leaf";
512
+ shield: "shield";
513
+ palette: "palette";
514
+ server: "server";
515
+ phone: "phone";
516
+ database: "database";
517
+ lightbulb: "lightbulb";
518
+ music: "music";
519
+ camera: "camera";
520
+ book: "book";
521
+ heart: "heart";
522
+ folder: "folder";
523
+ cpu: "cpu";
524
+ "file-code": "file-code";
525
+ docs: "docs";
526
+ todo: "todo";
527
+ bug: "bug";
528
+ robot: "robot";
529
+ brain: "brain";
530
+ repo: "repo";
531
+ test: "test";
532
+ chart: "chart";
533
+ star: "star";
534
+ calendar: "calendar";
535
+ }>>>;
536
+ color: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
537
+ a1: "a1";
538
+ a2: "a2";
539
+ a3: "a3";
540
+ a4: "a4";
541
+ a5: "a5";
542
+ a6: "a6";
543
+ a7: "a7";
544
+ a8: "a8";
545
+ a9: "a9";
546
+ a10: "a10";
547
+ a11: "a11";
548
+ a12: "a12";
549
+ a13: "a13";
550
+ a14: "a14";
551
+ a15: "a15";
552
+ a16: "a16";
553
+ }>>>;
572
554
  workspace: z.ZodOptional<z.ZodString>;
573
- repos: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
555
+ repos: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
574
556
  id: z.ZodOptional<z.ZodString>;
575
557
  name: z.ZodOptional<z.ZodString>;
576
558
  url: z.ZodOptional<z.ZodString>;
577
- type: z.ZodOptional<z.ZodEnum<["https", "ssh"]>>;
559
+ type: z.ZodOptional<z.ZodEnum<{
560
+ https: "https";
561
+ ssh: "ssh";
562
+ }>>;
578
563
  path: z.ZodString;
579
564
  defaultBranch: z.ZodOptional<z.ZodString>;
580
565
  sshKeyId: z.ZodOptional<z.ZodString>;
581
566
  lastFetch: z.ZodOptional<z.ZodString>;
582
- }, "strip", z.ZodTypeAny, {
583
- path: string;
584
- type?: "https" | "ssh" | undefined;
585
- name?: string | undefined;
586
- id?: string | undefined;
587
- url?: string | undefined;
588
- defaultBranch?: string | undefined;
589
- sshKeyId?: string | undefined;
590
- lastFetch?: string | undefined;
591
- }, {
592
- path: string;
593
- type?: "https" | "ssh" | undefined;
594
- name?: string | undefined;
595
- id?: string | undefined;
596
- url?: string | undefined;
597
- defaultBranch?: string | undefined;
598
- sshKeyId?: string | undefined;
599
- lastFetch?: string | undefined;
600
- }>]>, "many">>;
601
- }, "strip", z.ZodTypeAny, {
602
- workspace?: string | undefined;
603
- name?: string | undefined;
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;
605
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
606
- description?: string | undefined;
607
- repos?: (string | {
608
- path: string;
609
- type?: "https" | "ssh" | undefined;
610
- name?: string | undefined;
611
- id?: string | undefined;
612
- url?: string | undefined;
613
- defaultBranch?: string | undefined;
614
- sshKeyId?: string | undefined;
615
- lastFetch?: string | undefined;
616
- })[] | undefined;
617
- currentTask?: string | undefined;
618
- invariants?: string | undefined;
619
- }, {
620
- workspace?: string | undefined;
621
- name?: string | undefined;
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;
623
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | null | undefined;
624
- description?: string | undefined;
625
- repos?: (string | {
626
- path: string;
627
- type?: "https" | "ssh" | undefined;
628
- name?: string | undefined;
629
- id?: string | undefined;
630
- url?: string | undefined;
631
- defaultBranch?: string | undefined;
632
- sshKeyId?: string | undefined;
633
- lastFetch?: string | undefined;
634
- })[] | undefined;
635
- currentTask?: string | undefined;
636
- invariants?: string | undefined;
637
- }>;
567
+ }, z.core.$strip>]>>>;
568
+ memory: z.ZodOptional<z.ZodObject<{
569
+ enabled: z.ZodOptional<z.ZodBoolean>;
570
+ }, z.core.$strip>>;
571
+ }, z.core.$strip>;
638
572
  /** ADR-076: тело создания SSH-ключа (`POST /api/v2/ssh-keys`). */
639
573
  export declare const sshKeyCreateSchema: z.ZodObject<{
640
574
  name: z.ZodString;
641
575
  type: z.ZodOptional<z.ZodString>;
642
576
  privateKey: z.ZodString;
643
577
  passphrase: z.ZodOptional<z.ZodString>;
644
- agentIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
645
- }, "strip", z.ZodTypeAny, {
646
- name: string;
647
- privateKey: string;
648
- type?: string | undefined;
649
- passphrase?: string | undefined;
650
- agentIds?: string[] | undefined;
651
- }, {
652
- name: string;
653
- privateKey: string;
654
- type?: string | undefined;
655
- passphrase?: string | undefined;
656
- agentIds?: string[] | undefined;
657
- }>;
578
+ agentIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
579
+ }, z.core.$strip>;
658
580
  /** ADR-076: тело обновления SSH-ключа (без id/createdAt). */
659
581
  export declare const sshKeyUpdateSchema: z.ZodObject<{
660
582
  name: z.ZodOptional<z.ZodString>;
661
583
  type: z.ZodOptional<z.ZodOptional<z.ZodString>>;
662
584
  privateKey: z.ZodOptional<z.ZodString>;
663
585
  passphrase: z.ZodOptional<z.ZodOptional<z.ZodString>>;
664
- agentIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
665
- }, "strip", z.ZodTypeAny, {
666
- type?: string | undefined;
667
- name?: string | undefined;
668
- privateKey?: string | undefined;
669
- passphrase?: string | undefined;
670
- agentIds?: string[] | undefined;
671
- }, {
672
- type?: string | undefined;
673
- name?: string | undefined;
674
- privateKey?: string | undefined;
675
- passphrase?: string | undefined;
676
- agentIds?: string[] | undefined;
677
- }>;
586
+ agentIds: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
587
+ }, z.core.$strip>;
678
588
  /**
679
589
  * ADR-071 §2.4: проектный скоуп MCP (ссылки на реестр по имени).
680
590
  * PUT-семантика: `undefined` ≠ `[]` — отсутствующее поле сохраняет текущее
681
591
  * значение, поэтому `.default([])` здесь недопустим.
682
592
  */
683
593
  export declare const projectMcpUpdateSchema: z.ZodObject<{
684
- enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
685
- defaultOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
686
- }, "strip", z.ZodTypeAny, {
687
- enabled?: string[] | undefined;
688
- defaultOn?: string[] | undefined;
689
- }, {
690
- enabled?: string[] | undefined;
691
- defaultOn?: string[] | undefined;
692
- }>;
594
+ enabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
595
+ defaultOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
596
+ }, z.core.$strip>;
693
597
  /**
694
598
  * ADR-075: тело `PUT /api/v2/settings/workspace-policy` — политика для
695
599
  * абсолютного workspace вне `workspacesRoot`.
696
600
  */
697
601
  export declare const workspacePolicySchema: z.ZodObject<{
698
- outsideRoot: z.ZodEnum<["confirm", "deny"]>;
699
- }, "strip", z.ZodTypeAny, {
700
- outsideRoot: "deny" | "confirm";
701
- }, {
702
- outsideRoot: "deny" | "confirm";
703
- }>;
602
+ outsideRoot: z.ZodEnum<{
603
+ deny: "deny";
604
+ confirm: "confirm";
605
+ }>;
606
+ }, z.core.$strip>;
704
607
  export type WorkspacePolicyRequest = z.infer<typeof workspacePolicySchema>;
705
608
  export declare const promptRequestSchema: z.ZodObject<{
706
609
  messageId: z.ZodOptional<z.ZodString>;
@@ -710,102 +613,44 @@ export declare const promptRequestSchema: z.ZodObject<{
710
613
  provider: z.ZodOptional<z.ZodString>;
711
614
  agent: z.ZodOptional<z.ZodString>;
712
615
  system: z.ZodOptional<z.ZodString>;
713
- }, "strip", z.ZodTypeAny, {
714
- content: string;
715
- stream: boolean;
716
- system?: string | undefined;
717
- provider?: string | undefined;
718
- model?: string | undefined;
719
- messageId?: string | undefined;
720
- agent?: string | undefined;
721
- }, {
722
- content: string;
723
- system?: string | undefined;
724
- provider?: string | undefined;
725
- model?: string | undefined;
726
- messageId?: string | undefined;
727
- stream?: boolean | undefined;
728
- agent?: string | undefined;
729
- }>;
616
+ mode: z.ZodDefault<z.ZodEnum<{
617
+ queue: "queue";
618
+ steer: "steer";
619
+ interrupt: "interrupt";
620
+ }>>;
621
+ attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
622
+ }, z.core.$strip>;
730
623
  export declare const spaLoginSchema: z.ZodObject<{
731
624
  apiKey: z.ZodString;
732
625
  username: z.ZodOptional<z.ZodString>;
733
- }, "strip", z.ZodTypeAny, {
734
- apiKey: string;
735
- username?: string | undefined;
736
- }, {
737
- apiKey: string;
738
- username?: string | undefined;
739
- }>;
626
+ }, z.core.$strip>;
740
627
  export declare const fsListQuerySchema: z.ZodObject<{
741
628
  project_id: z.ZodString;
742
629
  path: z.ZodDefault<z.ZodString>;
743
- maxDepth: z.ZodOptional<z.ZodNumber>;
744
- includeHidden: z.ZodOptional<z.ZodBoolean>;
745
- }, "strip", z.ZodTypeAny, {
746
- path: string;
747
- project_id: string;
748
- maxDepth?: number | undefined;
749
- includeHidden?: boolean | undefined;
750
- }, {
751
- project_id: string;
752
- path?: string | undefined;
753
- maxDepth?: number | undefined;
754
- includeHidden?: boolean | undefined;
755
- }>;
630
+ maxDepth: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
631
+ includeHidden: z.ZodOptional<z.ZodCoercedBoolean<unknown>>;
632
+ }, z.core.$strip>;
756
633
  export declare const fsReadQuerySchema: z.ZodObject<{
757
634
  project_id: z.ZodString;
758
635
  path: z.ZodString;
759
- }, "strip", z.ZodTypeAny, {
760
- path: string;
761
- project_id: string;
762
- }, {
763
- path: string;
764
- project_id: string;
765
- }>;
636
+ }, z.core.$strip>;
766
637
  export declare const fsWriteBodySchema: z.ZodObject<{
767
638
  projectId: z.ZodString;
768
639
  path: z.ZodString;
769
640
  content: z.ZodString;
770
- }, "strip", z.ZodTypeAny, {
771
- path: string;
772
- content: string;
773
- projectId: string;
774
- }, {
775
- path: string;
776
- content: string;
777
- projectId: string;
778
- }>;
641
+ }, z.core.$strip>;
779
642
  export declare const fsDeleteQuerySchema: z.ZodObject<{
780
643
  project_id: z.ZodString;
781
644
  path: z.ZodString;
782
- }, "strip", z.ZodTypeAny, {
783
- path: string;
784
- project_id: string;
785
- }, {
786
- path: string;
787
- project_id: string;
788
- }>;
645
+ }, z.core.$strip>;
789
646
  export declare const fsMkdirBodySchema: z.ZodObject<{
790
647
  projectId: z.ZodString;
791
648
  path: z.ZodString;
792
- }, "strip", z.ZodTypeAny, {
793
- path: string;
794
- projectId: string;
795
- }, {
796
- path: string;
797
- projectId: string;
798
- }>;
649
+ }, z.core.$strip>;
799
650
  export declare const fsDownloadQuerySchema: z.ZodObject<{
800
651
  project_id: z.ZodString;
801
652
  path: z.ZodString;
802
- }, "strip", z.ZodTypeAny, {
803
- path: string;
804
- project_id: string;
805
- }, {
806
- path: string;
807
- project_id: string;
808
- }>;
653
+ }, z.core.$strip>;
809
654
  /**
810
655
  * ADR-075: запрос навигации по корню workspace (`GET /fs/workspace-root/browse`,
811
656
  * `GET /fs/workspace-root`). `includeHidden` принимает строковые `true`/`false`
@@ -813,52 +658,23 @@ export declare const fsDownloadQuerySchema: z.ZodObject<{
813
658
  */
814
659
  export declare const fsWorkspaceBrowseQuerySchema: z.ZodObject<{
815
660
  path: z.ZodDefault<z.ZodString>;
816
- includeHidden: z.ZodDefault<z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>>;
817
- }, "strip", z.ZodTypeAny, {
818
- path: string;
819
- includeHidden: boolean;
820
- }, {
821
- path?: string | undefined;
822
- includeHidden?: unknown;
823
- }>;
661
+ includeHidden: z.ZodDefault<z.ZodPreprocess<z.ZodOptional<z.ZodBoolean>, unknown>>;
662
+ }, z.core.$strip>;
824
663
  /** ADR-075: тело `POST /fs/workspace-root/mkdir` — создание каталога в корне workspace. */
825
664
  export declare const fsWorkspaceMkdirBodySchema: z.ZodObject<{
826
665
  path: z.ZodString;
827
- /** `confirm`-политика: явное подтверждение создания каталога вне `workspacesRoot`. */
828
666
  confirmOutsideRoot: z.ZodOptional<z.ZodBoolean>;
829
- }, "strip", z.ZodTypeAny, {
830
- path: string;
831
- confirmOutsideRoot?: boolean | undefined;
832
- }, {
833
- path: string;
834
- confirmOutsideRoot?: boolean | undefined;
835
- }>;
667
+ }, z.core.$strip>;
836
668
  export declare const gitScanBodySchema: z.ZodObject<{
837
669
  projectId: z.ZodString;
838
- }, "strip", z.ZodTypeAny, {
839
- projectId: string;
840
- }, {
841
- projectId: string;
842
- }>;
670
+ }, z.core.$strip>;
843
671
  export declare const gitInitBodySchema: z.ZodObject<{
844
672
  projectId: z.ZodString;
845
673
  path: z.ZodString;
846
674
  defaultBranch: z.ZodOptional<z.ZodString>;
847
675
  name: z.ZodOptional<z.ZodString>;
848
676
  sshKeyId: z.ZodOptional<z.ZodString>;
849
- }, "strip", z.ZodTypeAny, {
850
- path: string;
851
- projectId: string;
852
- name?: string | undefined;
853
- defaultBranch?: string | undefined;
854
- sshKeyId?: string | undefined;
855
- }, {
856
- path: string;
857
- projectId: string;
858
- name?: string | undefined;
859
- defaultBranch?: string | undefined;
860
- sshKeyId?: string | undefined;
861
- }>;
677
+ }, z.core.$strip>;
862
678
  export declare const gitCloneBodySchema: z.ZodObject<{
863
679
  projectId: z.ZodString;
864
680
  url: z.ZodString;
@@ -866,21 +682,7 @@ export declare const gitCloneBodySchema: z.ZodObject<{
866
682
  branch: z.ZodOptional<z.ZodString>;
867
683
  name: z.ZodOptional<z.ZodString>;
868
684
  sshKeyId: z.ZodOptional<z.ZodString>;
869
- }, "strip", z.ZodTypeAny, {
870
- projectId: string;
871
- url: string;
872
- path?: string | undefined;
873
- name?: string | undefined;
874
- sshKeyId?: string | undefined;
875
- branch?: string | undefined;
876
- }, {
877
- projectId: string;
878
- url: string;
879
- path?: string | undefined;
880
- name?: string | undefined;
881
- sshKeyId?: string | undefined;
882
- branch?: string | undefined;
883
- }>;
685
+ }, z.core.$strip>;
884
686
  /**
885
687
  * ADR-076: тело `POST /api/v2/git/repos/register` — upsert записи реестра
886
688
  * (идемпотентно по `path`). Используется UI для добавления уже существующего
@@ -891,104 +693,39 @@ export declare const gitReposRegisterBodySchema: z.ZodObject<{
891
693
  path: z.ZodString;
892
694
  name: z.ZodOptional<z.ZodString>;
893
695
  url: z.ZodOptional<z.ZodString>;
894
- type: z.ZodOptional<z.ZodEnum<["https", "ssh"]>>;
696
+ type: z.ZodOptional<z.ZodEnum<{
697
+ https: "https";
698
+ ssh: "ssh";
699
+ }>>;
895
700
  defaultBranch: z.ZodOptional<z.ZodString>;
896
701
  sshKeyId: z.ZodOptional<z.ZodString>;
897
- }, "strip", z.ZodTypeAny, {
898
- path: string;
899
- projectId: string;
900
- type?: "https" | "ssh" | undefined;
901
- name?: string | undefined;
902
- url?: string | undefined;
903
- defaultBranch?: string | undefined;
904
- sshKeyId?: string | undefined;
905
- }, {
906
- path: string;
907
- projectId: string;
908
- type?: "https" | "ssh" | undefined;
909
- name?: string | undefined;
910
- url?: string | undefined;
911
- defaultBranch?: string | undefined;
912
- sshKeyId?: string | undefined;
913
- }>;
702
+ }, z.core.$strip>;
914
703
  /**
915
704
  * ADR-076: тело `POST /api/v2/git/repos/remove` — удаление записи реестра;
916
705
  * обязателен `id` либо `path`. `deleteLocal` — удалить каталог репозитория.
917
706
  */
918
- export declare const gitReposRemoveBodySchema: z.ZodEffects<z.ZodObject<{
707
+ export declare const gitReposRemoveBodySchema: z.ZodObject<{
919
708
  projectId: z.ZodString;
920
709
  id: z.ZodOptional<z.ZodString>;
921
710
  path: z.ZodOptional<z.ZodString>;
922
711
  deleteLocal: z.ZodOptional<z.ZodBoolean>;
923
- }, "strip", z.ZodTypeAny, {
924
- projectId: string;
925
- path?: string | undefined;
926
- id?: string | undefined;
927
- deleteLocal?: boolean | undefined;
928
- }, {
929
- projectId: string;
930
- path?: string | undefined;
931
- id?: string | undefined;
932
- deleteLocal?: boolean | undefined;
933
- }>, {
934
- projectId: string;
935
- path?: string | undefined;
936
- id?: string | undefined;
937
- deleteLocal?: boolean | undefined;
938
- }, {
939
- projectId: string;
940
- path?: string | undefined;
941
- id?: string | undefined;
942
- deleteLocal?: boolean | undefined;
943
- }>;
712
+ }, z.core.$strip>;
944
713
  /** ADR-076: тело `POST /api/v2/git/repos/fetch` — обязателен `id` либо `path`. */
945
- export declare const gitReposFetchBodySchema: z.ZodEffects<z.ZodObject<{
714
+ export declare const gitReposFetchBodySchema: z.ZodObject<{
946
715
  projectId: z.ZodString;
947
716
  id: z.ZodOptional<z.ZodString>;
948
717
  path: z.ZodOptional<z.ZodString>;
949
- }, "strip", z.ZodTypeAny, {
950
- projectId: string;
951
- path?: string | undefined;
952
- id?: string | undefined;
953
- }, {
954
- projectId: string;
955
- path?: string | undefined;
956
- id?: string | undefined;
957
- }>, {
958
- projectId: string;
959
- path?: string | undefined;
960
- id?: string | undefined;
961
- }, {
962
- projectId: string;
963
- path?: string | undefined;
964
- id?: string | undefined;
965
- }>;
718
+ }, z.core.$strip>;
966
719
  export declare const gitLogQuerySchema: z.ZodObject<{
967
720
  project_id: z.ZodString;
968
721
  repo_path: z.ZodDefault<z.ZodString>;
969
- max_count: z.ZodOptional<z.ZodNumber>;
970
- }, "strip", z.ZodTypeAny, {
971
- project_id: string;
972
- repo_path: string;
973
- max_count?: number | undefined;
974
- }, {
975
- project_id: string;
976
- repo_path?: string | undefined;
977
- max_count?: number | undefined;
978
- }>;
722
+ max_count: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
723
+ }, z.core.$strip>;
979
724
  export declare const gitCommitQuerySchema: z.ZodObject<{
980
725
  project_id: z.ZodString;
981
726
  repo_path: z.ZodDefault<z.ZodString>;
982
727
  hash: z.ZodString;
983
- }, "strip", z.ZodTypeAny, {
984
- project_id: string;
985
- repo_path: string;
986
- hash: string;
987
- }, {
988
- project_id: string;
989
- hash: string;
990
- repo_path?: string | undefined;
991
- }>;
728
+ }, z.core.$strip>;
992
729
  /**
993
730
  * ADR-071 §2.6: фабрика схемы `tools.disabled` (единый источник значений
994
731
  * на базе `ToolCapability`).
@@ -999,15 +736,11 @@ export declare const gitCommitQuerySchema: z.ZodObject<{
999
736
  * (конфиг может опережать версию ядра).
1000
737
  */
1001
738
  export declare function createToolsDisabledSchema(strictCapabilities: boolean): z.ZodObject<{
1002
- capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1003
- tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1004
- }, "strip", z.ZodTypeAny, {
1005
- tools: string[];
1006
- capabilities: string[];
1007
- }, {
1008
- tools?: string[] | undefined;
1009
- capabilities?: string[] | undefined;
1010
- }>;
739
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString>> | z.ZodDefault<z.ZodArray<z.ZodEnum<{
740
+ [x: string]: string;
741
+ }>>>;
742
+ tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
743
+ }, z.core.$strip>;
1011
744
  /**
1012
745
  * ADR-071 §2.6: тело `PUT /api/v2/settings/tools-disabled`. Неизвестная
1013
746
  * capability — ошибка (закрытый набор: опечатка молча ничего не отключит).
@@ -1015,66 +748,30 @@ export declare function createToolsDisabledSchema(strictCapabilities: boolean):
1015
748
  * регистрируются лениво); непустые.
1016
749
  */
1017
750
  export declare const toolsDisabledSchema: z.ZodObject<{
1018
- capabilities: z.ZodDefault<z.ZodArray<z.ZodEnum<[string, ...string[]]>, "many">> | z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1019
- tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1020
- }, "strip", z.ZodTypeAny, {
1021
- tools: string[];
1022
- capabilities: string[];
1023
- }, {
1024
- tools?: string[] | undefined;
1025
- capabilities?: string[] | undefined;
1026
- }>;
751
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString>> | z.ZodDefault<z.ZodArray<z.ZodEnum<{
752
+ [x: string]: string;
753
+ }>>>;
754
+ tools: z.ZodDefault<z.ZodArray<z.ZodString>>;
755
+ }, z.core.$strip>;
1027
756
  /**
1028
757
  * ADR-071 §2.4: базовый контракт MCP-скоупа сессии (ссылки на реестр по имени).
1029
758
  * `undefined` ≠ `[]`: отсутствующее поле сохраняет текущее значение.
1030
759
  */
1031
- export declare const sessionMcpScopeSchema: z.ZodEffects<z.ZodObject<{
1032
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1033
- mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1034
- }, "strip", z.ZodTypeAny, {
1035
- mcpServers?: string[] | undefined;
1036
- mcpDisabledServers?: string[] | undefined;
1037
- }, {
1038
- mcpServers?: string[] | undefined;
1039
- mcpDisabledServers?: string[] | undefined;
1040
- }>, {
1041
- mcpServers?: string[] | undefined;
1042
- mcpDisabledServers?: string[] | undefined;
1043
- }, {
1044
- mcpServers?: string[] | undefined;
1045
- mcpDisabledServers?: string[] | undefined;
1046
- }>;
760
+ export declare const sessionMcpScopeSchema: z.ZodObject<{
761
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
762
+ mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
763
+ }, z.core.$strip>;
1047
764
  /**
1048
765
  * ADR-071 §2.4: тело `PUT /api/v2/sessions/:id/mcp`: точечный toggle
1049
766
  * (`{ name, enabled }`, в т.ч. opt-out системного сервера) или полная/частичная
1050
767
  * замена (`{ mcpServers?, mcpDisabledServers? }`).
1051
768
  */
1052
- export declare const sessionMcpUpdateSchema: z.ZodEffects<z.ZodObject<{
769
+ export declare const sessionMcpUpdateSchema: z.ZodObject<{
1053
770
  name: z.ZodOptional<z.ZodString>;
1054
771
  enabled: z.ZodOptional<z.ZodBoolean>;
1055
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1056
- mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1057
- }, "strip", z.ZodTypeAny, {
1058
- mcpServers?: string[] | undefined;
1059
- mcpDisabledServers?: string[] | undefined;
1060
- name?: string | undefined;
1061
- enabled?: boolean | undefined;
1062
- }, {
1063
- mcpServers?: string[] | undefined;
1064
- mcpDisabledServers?: string[] | undefined;
1065
- name?: string | undefined;
1066
- enabled?: boolean | undefined;
1067
- }>, {
1068
- mcpServers?: string[] | undefined;
1069
- mcpDisabledServers?: string[] | undefined;
1070
- name?: string | undefined;
1071
- enabled?: boolean | undefined;
1072
- }, {
1073
- mcpServers?: string[] | undefined;
1074
- mcpDisabledServers?: string[] | undefined;
1075
- name?: string | undefined;
1076
- enabled?: boolean | undefined;
1077
- }>;
772
+ mcpServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
773
+ mcpDisabledServers: z.ZodOptional<z.ZodArray<z.ZodString>>;
774
+ }, z.core.$strip>;
1078
775
  export type SessionMcpScopeRequest = z.infer<typeof sessionMcpScopeSchema>;
1079
776
  export type SessionMcpUpdateRequest = z.infer<typeof sessionMcpUpdateSchema>;
1080
777
  export type ProjectMcpUpdateRequest = z.infer<typeof projectMcpUpdateSchema>;
@@ -1085,6 +782,11 @@ export type ProjectUpdateRequest = z.infer<typeof projectUpdateSchema>;
1085
782
  export type SSHKeyCreateRequest = z.infer<typeof sshKeyCreateSchema>;
1086
783
  export type SSHKeyUpdateRequest = z.infer<typeof sshKeyUpdateSchema>;
1087
784
  export type PromptRequest = z.infer<typeof promptRequestSchema>;
785
+ /**
786
+ * Форма ВХОДА схемы промпта: поля с серверным `default` (`stream`, `mode`)
787
+ * необязательны — сервер подставит значение. Для тела запроса SDK.
788
+ */
789
+ export type PromptRequestInput = z.input<typeof promptRequestSchema>;
1088
790
  export type SpaLoginRequest = z.infer<typeof spaLoginSchema>;
1089
791
  export type FsListQuery = z.infer<typeof fsListQuerySchema>;
1090
792
  export type FsReadQuery = z.infer<typeof fsReadQuerySchema>;
@@ -1113,64 +815,25 @@ export declare const skillNameSchema: z.ZodString;
1113
815
  export declare const skillCreateSchema: z.ZodObject<{
1114
816
  name: z.ZodString;
1115
817
  description: z.ZodString;
1116
- /** Тело Markdown (без frontmatter). */
1117
818
  body: z.ZodOptional<z.ZodString>;
1118
- /** Дополнительные supporting-файлы (относительный путь → содержимое). */
1119
819
  files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1120
- }, "strip", z.ZodTypeAny, {
1121
- name: string;
1122
- description: string;
1123
- body?: string | undefined;
1124
- files?: Record<string, string> | undefined;
1125
- }, {
1126
- name: string;
1127
- description: string;
1128
- body?: string | undefined;
1129
- files?: Record<string, string> | undefined;
1130
- }>;
1131
- export declare const skillUpdateSchema: z.ZodEffects<z.ZodObject<{
820
+ }, z.core.$strip>;
821
+ export declare const skillUpdateSchema: z.ZodObject<{
1132
822
  description: z.ZodOptional<z.ZodString>;
1133
823
  body: z.ZodOptional<z.ZodString>;
1134
- /** Толерантный контейнер (неизвестные ключи сохраняются). */
1135
824
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1136
- }, "strip", z.ZodTypeAny, {
1137
- description?: string | undefined;
1138
- body?: string | undefined;
1139
- metadata?: Record<string, unknown> | undefined;
1140
- }, {
1141
- description?: string | undefined;
1142
- body?: string | undefined;
1143
- metadata?: Record<string, unknown> | undefined;
1144
- }>, {
1145
- description?: string | undefined;
1146
- body?: string | undefined;
1147
- metadata?: Record<string, unknown> | undefined;
1148
- }, {
1149
- description?: string | undefined;
1150
- body?: string | undefined;
1151
- metadata?: Record<string, unknown> | undefined;
1152
- }>;
825
+ }, z.core.$strip>;
1153
826
  export declare const skillFileWriteSchema: z.ZodObject<{
1154
827
  content: z.ZodString;
1155
- }, "strip", z.ZodTypeAny, {
1156
- content: string;
1157
- }, {
1158
- content: string;
1159
- }>;
828
+ }, z.core.$strip>;
1160
829
  /**
1161
830
  * ADR-046 §4.5: per-session enable/disable скиллов (по образцу MCP-скоупа).
1162
831
  * `undefined` ≠ `[]`: отсутствующее поле сохраняет текущее значение.
1163
832
  */
1164
833
  export declare const skillSessionOverrideSchema: z.ZodObject<{
1165
- skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1166
- skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1167
- }, "strip", z.ZodTypeAny, {
1168
- skills?: string[] | undefined;
1169
- skillsDisabled?: string[] | undefined;
1170
- }, {
1171
- skills?: string[] | undefined;
1172
- skillsDisabled?: string[] | undefined;
1173
- }>;
834
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
835
+ skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
836
+ }, z.core.$strip>;
1174
837
  export type SkillCreateRequest = z.infer<typeof skillCreateSchema>;
1175
838
  export type SkillUpdateRequest = z.infer<typeof skillUpdateSchema>;
1176
839
  export type SkillFileWriteRequest = z.infer<typeof skillFileWriteSchema>;
@@ -1179,34 +842,16 @@ export type SkillSessionOverrideRequest = z.infer<typeof skillSessionOverrideSch
1179
842
  export declare const skillBundleSchema: z.ZodObject<{
1180
843
  name: z.ZodString;
1181
844
  description: z.ZodString;
1182
- skills: z.ZodArray<z.ZodString, "many">;
845
+ skills: z.ZodArray<z.ZodString>;
1183
846
  instruction: z.ZodOptional<z.ZodString>;
1184
- }, "strip", z.ZodTypeAny, {
1185
- skills: string[];
1186
- name: string;
1187
- description: string;
1188
- instruction?: string | undefined;
1189
- }, {
1190
- skills: string[];
1191
- name: string;
1192
- description: string;
1193
- instruction?: string | undefined;
1194
- }>;
847
+ }, z.core.$strip>;
1195
848
  export type SkillBundleRequest = z.infer<typeof skillBundleSchema>;
1196
849
  /** ADR-046 §7.4: тело `PUT /api/v2/settings/skills-disabled` (группы/имена). */
1197
850
  export declare const skillsDisabledSchema: z.ZodObject<{
1198
- categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1199
- groups: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1200
- skills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1201
- }, "strip", z.ZodTypeAny, {
1202
- skills: string[];
1203
- categories: string[];
1204
- groups: string[];
1205
- }, {
1206
- skills?: string[] | undefined;
1207
- categories?: string[] | undefined;
1208
- groups?: string[] | undefined;
1209
- }>;
851
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
852
+ groups: z.ZodDefault<z.ZodArray<z.ZodString>>;
853
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
854
+ }, z.core.$strip>;
1210
855
  export type SkillsDisabledRequest = z.infer<typeof skillsDisabledSchema>;
1211
856
  /**
1212
857
  * ADR-046 §4.5: тело `PUT /api/v2/settings/skills` — системные настройки:
@@ -1216,99 +861,33 @@ export type SkillsDisabledRequest = z.infer<typeof skillsDisabledSchema>;
1216
861
  */
1217
862
  export declare const skillsSystemSettingsSchema: z.ZodObject<{
1218
863
  disabled: z.ZodOptional<z.ZodObject<{
1219
- categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1220
- groups: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1221
- skills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1222
- }, "strip", z.ZodTypeAny, {
1223
- skills: string[];
1224
- categories: string[];
1225
- groups: string[];
1226
- }, {
1227
- skills?: string[] | undefined;
1228
- categories?: string[] | undefined;
1229
- groups?: string[] | undefined;
1230
- }>>;
864
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
865
+ groups: z.ZodDefault<z.ZodArray<z.ZodString>>;
866
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
867
+ }, z.core.$strip>>;
1231
868
  disabledForNewProjects: z.ZodOptional<z.ZodObject<{
1232
- categories: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1233
- groups: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1234
- skills: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1235
- }, "strip", z.ZodTypeAny, {
1236
- skills: string[];
1237
- categories: string[];
1238
- groups: string[];
1239
- }, {
1240
- skills?: string[] | undefined;
1241
- categories?: string[] | undefined;
1242
- groups?: string[] | undefined;
1243
- }>>;
869
+ categories: z.ZodDefault<z.ZodArray<z.ZodString>>;
870
+ groups: z.ZodDefault<z.ZodArray<z.ZodString>>;
871
+ skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
872
+ }, z.core.$strip>>;
1244
873
  policy: z.ZodOptional<z.ZodString>;
1245
- }, "strip", z.ZodTypeAny, {
1246
- disabled?: {
1247
- skills: string[];
1248
- categories: string[];
1249
- groups: string[];
1250
- } | undefined;
1251
- disabledForNewProjects?: {
1252
- skills: string[];
1253
- categories: string[];
1254
- groups: string[];
1255
- } | undefined;
1256
- policy?: string | undefined;
1257
- }, {
1258
- disabled?: {
1259
- skills?: string[] | undefined;
1260
- categories?: string[] | undefined;
1261
- groups?: string[] | undefined;
1262
- } | undefined;
1263
- disabledForNewProjects?: {
1264
- skills?: string[] | undefined;
1265
- categories?: string[] | undefined;
1266
- groups?: string[] | undefined;
1267
- } | undefined;
1268
- policy?: string | undefined;
1269
- }>;
874
+ }, z.core.$strip>;
1270
875
  export type SkillsSystemSettingsRequest = z.infer<typeof skillsSystemSettingsSchema>;
1271
876
  /**
1272
877
  * ADR-046 §4.5: тело `PUT /api/v2/sessions/:id/skills`: точечный toggle
1273
878
  * (`{ name, enabled }`) или полная/частичная замена (`{ skills?, skillsDisabled? }`).
1274
879
  */
1275
- export declare const sessionSkillUpdateSchema: z.ZodEffects<z.ZodObject<{
880
+ export declare const sessionSkillUpdateSchema: z.ZodObject<{
1276
881
  name: z.ZodOptional<z.ZodString>;
1277
882
  enabled: z.ZodOptional<z.ZodBoolean>;
1278
- skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1279
- skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1280
- }, "strip", z.ZodTypeAny, {
1281
- skills?: string[] | undefined;
1282
- skillsDisabled?: string[] | undefined;
1283
- name?: string | undefined;
1284
- enabled?: boolean | undefined;
1285
- }, {
1286
- skills?: string[] | undefined;
1287
- skillsDisabled?: string[] | undefined;
1288
- name?: string | undefined;
1289
- enabled?: boolean | undefined;
1290
- }>, {
1291
- skills?: string[] | undefined;
1292
- skillsDisabled?: string[] | undefined;
1293
- name?: string | undefined;
1294
- enabled?: boolean | undefined;
1295
- }, {
1296
- skills?: string[] | undefined;
1297
- skillsDisabled?: string[] | undefined;
1298
- name?: string | undefined;
1299
- enabled?: boolean | undefined;
1300
- }>;
883
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
884
+ skillsDisabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
885
+ }, z.core.$strip>;
1301
886
  /** ADR-046 §4.5: тело `PUT /api/v2/projects/:id/skills`. */
1302
887
  export declare const projectSkillUpdateSchema: z.ZodObject<{
1303
- enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1304
- defaultOn: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1305
- }, "strip", z.ZodTypeAny, {
1306
- enabled?: string[] | undefined;
1307
- defaultOn?: string[] | undefined;
1308
- }, {
1309
- enabled?: string[] | undefined;
1310
- defaultOn?: string[] | undefined;
1311
- }>;
888
+ enabled: z.ZodOptional<z.ZodArray<z.ZodString>>;
889
+ defaultOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
890
+ }, z.core.$strip>;
1312
891
  export type SessionSkillUpdateRequest = z.infer<typeof sessionSkillUpdateSchema>;
1313
892
  export type ProjectSkillUpdateRequest = z.infer<typeof projectSkillUpdateSchema>;
1314
893
  /** ADR-089: схема идентичности отправителя внешнего события. */
@@ -1316,69 +895,44 @@ export declare const eventIdentitySchema: z.ZodObject<{
1316
895
  principalId: z.ZodOptional<z.ZodString>;
1317
896
  chatKey: z.ZodOptional<z.ZodString>;
1318
897
  threadKey: z.ZodOptional<z.ZodString>;
1319
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1320
- }, "strip", z.ZodTypeAny, {
1321
- principalId?: string | undefined;
1322
- chatKey?: string | undefined;
1323
- threadKey?: string | undefined;
1324
- roles?: string[] | undefined;
1325
- }, {
1326
- principalId?: string | undefined;
1327
- chatKey?: string | undefined;
1328
- threadKey?: string | undefined;
1329
- roles?: string[] | undefined;
1330
- }>;
898
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
899
+ }, z.core.$strip>;
900
+ /**
901
+ * ADR-115 × ADR-089: ссылка на вложение внешнего события.
902
+ *
903
+ * `blobPath` ограничен контуром вложений (`attachments/…`) — через событие нельзя
904
+ * сослаться на произвольный объект blob-хранилища (артефакты, логи, скиллы).
905
+ * `sha256` — 64 hex-символа (content-addressed адрес), `mime`/`size` — непустые.
906
+ */
907
+ export declare const eventAttachmentRefSchema: z.ZodObject<{
908
+ blobPath: z.ZodString;
909
+ sha256: z.ZodString;
910
+ mime: z.ZodString;
911
+ size: z.ZodNumber;
912
+ name: z.ZodOptional<z.ZodString>;
913
+ }, z.core.$strip>;
1331
914
  /** ADR-089: схема нормализованного внешнего события (`payload` не типизируется). */
1332
915
  export declare const synthEventSchema: z.ZodObject<{
1333
916
  id: z.ZodString;
1334
917
  source: z.ZodString;
1335
918
  type: z.ZodString;
1336
919
  payload: z.ZodUnknown;
1337
- identity: z.ZodDefault<z.ZodObject<{
920
+ identity: z.ZodPrefault<z.ZodObject<{
1338
921
  principalId: z.ZodOptional<z.ZodString>;
1339
922
  chatKey: z.ZodOptional<z.ZodString>;
1340
923
  threadKey: z.ZodOptional<z.ZodString>;
1341
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1342
- }, "strip", z.ZodTypeAny, {
1343
- principalId?: string | undefined;
1344
- chatKey?: string | undefined;
1345
- threadKey?: string | undefined;
1346
- roles?: string[] | undefined;
1347
- }, {
1348
- principalId?: string | undefined;
1349
- chatKey?: string | undefined;
1350
- threadKey?: string | undefined;
1351
- roles?: string[] | undefined;
1352
- }>>;
924
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
925
+ }, z.core.$strip>>;
1353
926
  dedupKey: z.ZodString;
1354
927
  ts: z.ZodString;
1355
- }, "strip", z.ZodTypeAny, {
1356
- type: string;
1357
- id: string;
1358
- source: string;
1359
- identity: {
1360
- principalId?: string | undefined;
1361
- chatKey?: string | undefined;
1362
- threadKey?: string | undefined;
1363
- roles?: string[] | undefined;
1364
- };
1365
- dedupKey: string;
1366
- ts: string;
1367
- payload?: unknown;
1368
- }, {
1369
- type: string;
1370
- id: string;
1371
- source: string;
1372
- dedupKey: string;
1373
- ts: string;
1374
- payload?: unknown;
1375
- identity?: {
1376
- principalId?: string | undefined;
1377
- chatKey?: string | undefined;
1378
- threadKey?: string | undefined;
1379
- roles?: string[] | undefined;
1380
- } | undefined;
1381
- }>;
928
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
929
+ blobPath: z.ZodString;
930
+ sha256: z.ZodString;
931
+ mime: z.ZodString;
932
+ size: z.ZodNumber;
933
+ name: z.ZodOptional<z.ZodString>;
934
+ }, z.core.$strip>>>;
935
+ }, z.core.$strip>;
1382
936
  /** ADR-089: схема устойчивой привязки внешнего адреса к сессии/шаблону. */
1383
937
  export declare const eventBindingSchema: z.ZodObject<{
1384
938
  id: z.ZodString;
@@ -1386,79 +940,102 @@ export declare const eventBindingSchema: z.ZodObject<{
1386
940
  chatKey: z.ZodOptional<z.ZodString>;
1387
941
  threadKey: z.ZodOptional<z.ZodString>;
1388
942
  sessionId: z.ZodOptional<z.ZodString>;
1389
- mode: z.ZodEnum<["bound", "ephemeral", "queue"]>;
943
+ mode: z.ZodEnum<{
944
+ queue: "queue";
945
+ bound: "bound";
946
+ ephemeral: "ephemeral";
947
+ }>;
1390
948
  agentTemplate: z.ZodOptional<z.ZodString>;
1391
949
  project: z.ZodOptional<z.ZodString>;
1392
- }, "strip", z.ZodTypeAny, {
1393
- mode: "bound" | "ephemeral" | "queue";
1394
- id: string;
1395
- source: string;
1396
- chatKey?: string | undefined;
1397
- threadKey?: string | undefined;
1398
- sessionId?: string | undefined;
1399
- agentTemplate?: string | undefined;
1400
- project?: string | undefined;
1401
- }, {
1402
- mode: "bound" | "ephemeral" | "queue";
1403
- id: string;
1404
- source: string;
1405
- chatKey?: string | undefined;
1406
- threadKey?: string | undefined;
1407
- sessionId?: string | undefined;
1408
- agentTemplate?: string | undefined;
1409
- project?: string | undefined;
1410
- }>;
950
+ }, z.core.$strip>;
1411
951
  /** ADR-089: схема запроса создания/привязки сессии — единый funnel. */
1412
952
  export declare const sessionRequestSchema: z.ZodObject<{
1413
- initiator: z.ZodEnum<["user", "agent", "external", "system"]>;
1414
- intent: z.ZodEnum<["explicit", "event"]>;
953
+ initiator: z.ZodEnum<{
954
+ user: "user";
955
+ system: "system";
956
+ agent: "agent";
957
+ external: "external";
958
+ }>;
959
+ intent: z.ZodEnum<{
960
+ event: "event";
961
+ explicit: "explicit";
962
+ }>;
1415
963
  projectId: z.ZodOptional<z.ZodString>;
1416
964
  parentId: z.ZodOptional<z.ZodString>;
1417
965
  agentTemplate: z.ZodOptional<z.ZodString>;
1418
- mode: z.ZodOptional<z.ZodEnum<["bound", "ephemeral", "queue"]>>;
966
+ mode: z.ZodOptional<z.ZodEnum<{
967
+ queue: "queue";
968
+ bound: "bound";
969
+ ephemeral: "ephemeral";
970
+ }>>;
1419
971
  ttl: z.ZodOptional<z.ZodString>;
1420
972
  title: z.ZodOptional<z.ZodString>;
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"]>>;
1422
- color: z.ZodOptional<z.ZodEnum<["a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "a10", "a11", "a12", "a13", "a14", "a15", "a16"]>>;
1423
- sessionOrigin: z.ZodOptional<z.ZodEnum<["user", "fork", "subagent"]>>;
973
+ icon: z.ZodOptional<z.ZodEnum<{
974
+ file: "file";
975
+ git: "git";
976
+ chat: "chat";
977
+ image: "image";
978
+ task: "task";
979
+ code: "code";
980
+ terminal: "terminal";
981
+ rocket: "rocket";
982
+ flask: "flask";
983
+ gamepad: "gamepad";
984
+ briefcase: "briefcase";
985
+ home: "home";
986
+ globe: "globe";
987
+ leaf: "leaf";
988
+ shield: "shield";
989
+ palette: "palette";
990
+ server: "server";
991
+ phone: "phone";
992
+ database: "database";
993
+ lightbulb: "lightbulb";
994
+ music: "music";
995
+ camera: "camera";
996
+ book: "book";
997
+ heart: "heart";
998
+ folder: "folder";
999
+ cpu: "cpu";
1000
+ "file-code": "file-code";
1001
+ docs: "docs";
1002
+ todo: "todo";
1003
+ bug: "bug";
1004
+ robot: "robot";
1005
+ brain: "brain";
1006
+ repo: "repo";
1007
+ test: "test";
1008
+ chart: "chart";
1009
+ star: "star";
1010
+ calendar: "calendar";
1011
+ }>>;
1012
+ color: z.ZodOptional<z.ZodEnum<{
1013
+ a1: "a1";
1014
+ a2: "a2";
1015
+ a3: "a3";
1016
+ a4: "a4";
1017
+ a5: "a5";
1018
+ a6: "a6";
1019
+ a7: "a7";
1020
+ a8: "a8";
1021
+ a9: "a9";
1022
+ a10: "a10";
1023
+ a11: "a11";
1024
+ a12: "a12";
1025
+ a13: "a13";
1026
+ a14: "a14";
1027
+ a15: "a15";
1028
+ a16: "a16";
1029
+ }>>;
1030
+ sessionOrigin: z.ZodOptional<z.ZodEnum<{
1031
+ user: "user";
1032
+ fork: "fork";
1033
+ subagent: "subagent";
1034
+ }>>;
1424
1035
  settings: z.ZodOptional<z.ZodUnknown>;
1425
1036
  sourceEventId: z.ZodOptional<z.ZodString>;
1426
1037
  dedupKey: z.ZodOptional<z.ZodString>;
1427
- }, "strip", z.ZodTypeAny, {
1428
- initiator: "user" | "system" | "agent" | "external";
1429
- intent: "explicit" | "event";
1430
- mode?: "bound" | "ephemeral" | "queue" | undefined;
1431
- title?: string | undefined;
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;
1433
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | undefined;
1434
- projectId?: string | undefined;
1435
- settings?: unknown;
1436
- dedupKey?: string | undefined;
1437
- agentTemplate?: string | undefined;
1438
- parentId?: string | undefined;
1439
- ttl?: string | undefined;
1440
- sessionOrigin?: "user" | "fork" | "subagent" | undefined;
1441
- sourceEventId?: string | undefined;
1442
- }, {
1443
- initiator: "user" | "system" | "agent" | "external";
1444
- intent: "explicit" | "event";
1445
- mode?: "bound" | "ephemeral" | "queue" | undefined;
1446
- title?: string | undefined;
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;
1448
- color?: "a1" | "a2" | "a3" | "a4" | "a5" | "a6" | "a7" | "a8" | "a9" | "a10" | "a11" | "a12" | "a13" | "a14" | "a15" | "a16" | undefined;
1449
- projectId?: string | undefined;
1450
- settings?: unknown;
1451
- dedupKey?: string | undefined;
1452
- agentTemplate?: string | undefined;
1453
- parentId?: string | undefined;
1454
- ttl?: string | undefined;
1455
- sessionOrigin?: "user" | "fork" | "subagent" | undefined;
1456
- sourceEventId?: string | undefined;
1457
- }>;
1458
- /**
1459
- * ADR-089: вход приёма внешнего события (`POST /api/v2/events`). `id`/`dedupKey`/`ts`
1460
- * нормализуются `EventIngress`, поэтому здесь опциональны.
1461
- */
1038
+ }, z.core.$strip>;
1462
1039
  export declare const eventIngestSchema: z.ZodObject<{
1463
1040
  source: z.ZodString;
1464
1041
  type: z.ZodString;
@@ -1467,45 +1044,18 @@ export declare const eventIngestSchema: z.ZodObject<{
1467
1044
  principalId: z.ZodOptional<z.ZodString>;
1468
1045
  chatKey: z.ZodOptional<z.ZodString>;
1469
1046
  threadKey: z.ZodOptional<z.ZodString>;
1470
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1471
- }, "strip", z.ZodTypeAny, {
1472
- principalId?: string | undefined;
1473
- chatKey?: string | undefined;
1474
- threadKey?: string | undefined;
1475
- roles?: string[] | undefined;
1476
- }, {
1477
- principalId?: string | undefined;
1478
- chatKey?: string | undefined;
1479
- threadKey?: string | undefined;
1480
- roles?: string[] | undefined;
1481
- }>>;
1047
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1048
+ }, z.core.$strip>>;
1482
1049
  dedupKey: z.ZodOptional<z.ZodString>;
1483
1050
  ts: z.ZodOptional<z.ZodString>;
1484
- }, "strip", z.ZodTypeAny, {
1485
- type: string;
1486
- source: string;
1487
- payload?: unknown;
1488
- identity?: {
1489
- principalId?: string | undefined;
1490
- chatKey?: string | undefined;
1491
- threadKey?: string | undefined;
1492
- roles?: string[] | undefined;
1493
- } | undefined;
1494
- dedupKey?: string | undefined;
1495
- ts?: string | undefined;
1496
- }, {
1497
- type: string;
1498
- source: string;
1499
- payload?: unknown;
1500
- identity?: {
1501
- principalId?: string | undefined;
1502
- chatKey?: string | undefined;
1503
- threadKey?: string | undefined;
1504
- roles?: string[] | undefined;
1505
- } | undefined;
1506
- dedupKey?: string | undefined;
1507
- ts?: string | undefined;
1508
- }>;
1051
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1052
+ blobPath: z.ZodString;
1053
+ sha256: z.ZodString;
1054
+ mime: z.ZodString;
1055
+ size: z.ZodNumber;
1056
+ name: z.ZodOptional<z.ZodString>;
1057
+ }, z.core.$strip>>>;
1058
+ }, z.core.$strip>;
1509
1059
  export type EventIngestRequest = z.infer<typeof eventIngestSchema>;
1510
1060
  /** ADR-089: вход upsert биндинга (`POST /api/v2/events/bindings`) — без `id`. */
1511
1061
  export declare const eventBindingInputSchema: z.ZodObject<{
@@ -1513,26 +1063,14 @@ export declare const eventBindingInputSchema: z.ZodObject<{
1513
1063
  chatKey: z.ZodOptional<z.ZodString>;
1514
1064
  threadKey: z.ZodOptional<z.ZodString>;
1515
1065
  sessionId: z.ZodOptional<z.ZodString>;
1516
- mode: z.ZodEnum<["bound", "ephemeral", "queue"]>;
1066
+ mode: z.ZodEnum<{
1067
+ queue: "queue";
1068
+ bound: "bound";
1069
+ ephemeral: "ephemeral";
1070
+ }>;
1517
1071
  agentTemplate: z.ZodOptional<z.ZodString>;
1518
1072
  project: z.ZodOptional<z.ZodString>;
1519
- }, "strip", z.ZodTypeAny, {
1520
- mode: "bound" | "ephemeral" | "queue";
1521
- source: string;
1522
- chatKey?: string | undefined;
1523
- threadKey?: string | undefined;
1524
- sessionId?: string | undefined;
1525
- agentTemplate?: string | undefined;
1526
- project?: string | undefined;
1527
- }, {
1528
- mode: "bound" | "ephemeral" | "queue";
1529
- source: string;
1530
- chatKey?: string | undefined;
1531
- threadKey?: string | undefined;
1532
- sessionId?: string | undefined;
1533
- agentTemplate?: string | undefined;
1534
- project?: string | undefined;
1535
- }>;
1073
+ }, z.core.$strip>;
1536
1074
  export type EventBindingInputRequest = z.infer<typeof eventBindingInputSchema>;
1537
1075
  /**
1538
1076
  * ADR-089/ADR-052: метаданные API-ключа привязки для приёма событий.
@@ -1550,31 +1088,7 @@ export declare const eventBindingApiKeySchema: z.ZodObject<{
1550
1088
  prefix: z.ZodString;
1551
1089
  expiresAt: z.ZodOptional<z.ZodString>;
1552
1090
  revokedAt: z.ZodOptional<z.ZodString>;
1553
- }, "strip", z.ZodTypeAny, {
1554
- id: string;
1555
- bindingId: string;
1556
- label: string;
1557
- createdBy: string;
1558
- createdAt: string;
1559
- prefix: string;
1560
- description?: string | undefined;
1561
- rateLimitPerMinute?: number | undefined;
1562
- lastUsedAt?: string | undefined;
1563
- expiresAt?: string | undefined;
1564
- revokedAt?: string | undefined;
1565
- }, {
1566
- id: string;
1567
- bindingId: string;
1568
- label: string;
1569
- createdBy: string;
1570
- createdAt: string;
1571
- prefix: string;
1572
- description?: string | undefined;
1573
- rateLimitPerMinute?: number | undefined;
1574
- lastUsedAt?: string | undefined;
1575
- expiresAt?: string | undefined;
1576
- revokedAt?: string | undefined;
1577
- }>;
1091
+ }, z.core.$strip>;
1578
1092
  export type EventBindingApiKeyMeta = z.infer<typeof eventBindingApiKeySchema>;
1579
1093
  /** ADR-089/ADR-052: тело создания API-ключа привязки — обязательная уникальная `label`. */
1580
1094
  export declare const eventBindingApiKeyCreateSchema: z.ZodObject<{
@@ -1582,17 +1096,7 @@ export declare const eventBindingApiKeyCreateSchema: z.ZodObject<{
1582
1096
  description: z.ZodOptional<z.ZodString>;
1583
1097
  expiresAt: z.ZodOptional<z.ZodString>;
1584
1098
  rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
1585
- }, "strip", z.ZodTypeAny, {
1586
- label: string;
1587
- description?: string | undefined;
1588
- rateLimitPerMinute?: number | undefined;
1589
- expiresAt?: string | undefined;
1590
- }, {
1591
- label: string;
1592
- description?: string | undefined;
1593
- rateLimitPerMinute?: number | undefined;
1594
- expiresAt?: string | undefined;
1595
- }>;
1099
+ }, z.core.$strip>;
1596
1100
  export type EventBindingApiKeyCreateRequest = z.infer<typeof eventBindingApiKeyCreateSchema>;
1597
1101
  /**
1598
1102
  * ADR-089/ADR-052: тело обновления API-ключа привязки. Все поля опциональны;
@@ -1603,17 +1107,7 @@ export declare const eventBindingApiKeyUpdateSchema: z.ZodObject<{
1603
1107
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1604
1108
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1605
1109
  rateLimitPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1606
- }, "strip", z.ZodTypeAny, {
1607
- description?: string | null | undefined;
1608
- label?: string | undefined;
1609
- rateLimitPerMinute?: number | null | undefined;
1610
- expiresAt?: string | null | undefined;
1611
- }, {
1612
- description?: string | null | undefined;
1613
- label?: string | undefined;
1614
- rateLimitPerMinute?: number | null | undefined;
1615
- expiresAt?: string | null | undefined;
1616
- }>;
1110
+ }, z.core.$strip>;
1617
1111
  export type EventBindingApiKeyUpdateRequest = z.infer<typeof eventBindingApiKeyUpdateSchema>;
1618
1112
  /** ADR-089: ответ создания ключа — метаданные + plaintext-секрет (единожды). */
1619
1113
  export declare const eventBindingApiKeyCreatedSchema: z.ZodObject<{
@@ -1628,93 +1122,40 @@ export declare const eventBindingApiKeyCreatedSchema: z.ZodObject<{
1628
1122
  prefix: z.ZodString;
1629
1123
  expiresAt: z.ZodOptional<z.ZodString>;
1630
1124
  revokedAt: z.ZodOptional<z.ZodString>;
1631
- } & {
1632
1125
  key: z.ZodString;
1633
- }, "strip", z.ZodTypeAny, {
1634
- id: string;
1635
- bindingId: string;
1636
- label: string;
1637
- createdBy: string;
1638
- createdAt: string;
1639
- prefix: string;
1640
- key: string;
1641
- description?: string | undefined;
1642
- rateLimitPerMinute?: number | undefined;
1643
- lastUsedAt?: string | undefined;
1644
- expiresAt?: string | undefined;
1645
- revokedAt?: string | undefined;
1646
- }, {
1647
- id: string;
1648
- bindingId: string;
1649
- label: string;
1650
- createdBy: string;
1651
- createdAt: string;
1652
- prefix: string;
1653
- key: string;
1654
- description?: string | undefined;
1655
- rateLimitPerMinute?: number | undefined;
1656
- lastUsedAt?: string | undefined;
1657
- expiresAt?: string | undefined;
1658
- revokedAt?: string | undefined;
1659
- }>;
1126
+ }, z.core.$strip>;
1660
1127
  export type EventBindingApiKeyCreatedRequest = z.infer<typeof eventBindingApiKeyCreatedSchema>;
1661
1128
  /**
1662
1129
  * ADR-089: вход `POST /events` при аутентификации API-ключом привязки. Как
1663
1130
  * `eventIngestSchema`, но `source` опционален — источник берётся из привязки.
1131
+ * ADR-115 × ADR-089: правило «вложения требуют `dedupKey`» действует и здесь.
1664
1132
  */
1665
1133
  export declare const eventKeyIngestSchema: z.ZodObject<{
1666
- type: z.ZodString;
1667
1134
  source: z.ZodOptional<z.ZodString>;
1135
+ type: z.ZodString;
1668
1136
  payload: z.ZodOptional<z.ZodUnknown>;
1669
1137
  identity: z.ZodOptional<z.ZodObject<{
1670
1138
  principalId: z.ZodOptional<z.ZodString>;
1671
1139
  chatKey: z.ZodOptional<z.ZodString>;
1672
1140
  threadKey: z.ZodOptional<z.ZodString>;
1673
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1674
- }, "strip", z.ZodTypeAny, {
1675
- principalId?: string | undefined;
1676
- chatKey?: string | undefined;
1677
- threadKey?: string | undefined;
1678
- roles?: string[] | undefined;
1679
- }, {
1680
- principalId?: string | undefined;
1681
- chatKey?: string | undefined;
1682
- threadKey?: string | undefined;
1683
- roles?: string[] | undefined;
1684
- }>>;
1141
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
1142
+ }, z.core.$strip>>;
1685
1143
  dedupKey: z.ZodOptional<z.ZodString>;
1686
1144
  ts: z.ZodOptional<z.ZodString>;
1687
- }, "strip", z.ZodTypeAny, {
1688
- type: string;
1689
- source?: string | undefined;
1690
- payload?: unknown;
1691
- identity?: {
1692
- principalId?: string | undefined;
1693
- chatKey?: string | undefined;
1694
- threadKey?: string | undefined;
1695
- roles?: string[] | undefined;
1696
- } | undefined;
1697
- dedupKey?: string | undefined;
1698
- ts?: string | undefined;
1699
- }, {
1700
- type: string;
1701
- source?: string | undefined;
1702
- payload?: unknown;
1703
- identity?: {
1704
- principalId?: string | undefined;
1705
- chatKey?: string | undefined;
1706
- threadKey?: string | undefined;
1707
- roles?: string[] | undefined;
1708
- } | undefined;
1709
- dedupKey?: string | undefined;
1710
- ts?: string | undefined;
1711
- }>;
1145
+ attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1146
+ blobPath: z.ZodString;
1147
+ sha256: z.ZodString;
1148
+ mime: z.ZodString;
1149
+ size: z.ZodNumber;
1150
+ name: z.ZodOptional<z.ZodString>;
1151
+ }, z.core.$strip>>>;
1152
+ }, z.core.$strip>;
1712
1153
  export type EventKeyIngestRequest = z.infer<typeof eventKeyIngestSchema>;
1713
1154
  /**
1714
1155
  * ADR-052: каталог скоупов service-key + wildcard-семейства. Глобальный `*` не
1715
1156
  * принимается (`isKnownScope`).
1716
1157
  */
1717
- export declare const serviceScopeSchema: z.ZodEffects<z.ZodString, string, string>;
1158
+ export declare const serviceScopeSchema: z.ZodString;
1718
1159
  /**
1719
1160
  * ADR-052: метаданные service-key (ответы API). Секрет (`key`) и его хеш здесь
1720
1161
  * отсутствуют — наружу не отдаются (в списке — `prefix`).
@@ -1723,9 +1164,9 @@ export declare const serviceApiKeySchema: z.ZodObject<{
1723
1164
  id: z.ZodString;
1724
1165
  label: z.ZodString;
1725
1166
  description: z.ZodOptional<z.ZodString>;
1726
- roles: z.ZodArray<z.ZodNativeEnum<typeof GlobalRole>, "many">;
1727
- scopes: z.ZodArray<z.ZodString, "many">;
1728
- allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1167
+ roles: z.ZodArray<z.ZodEnum<typeof GlobalRole>>;
1168
+ scopes: z.ZodArray<z.ZodString>;
1169
+ allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString>>;
1729
1170
  rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
1730
1171
  expiresAt: z.ZodOptional<z.ZodString>;
1731
1172
  revokedAt: z.ZodOptional<z.ZodString>;
@@ -1733,62 +1174,18 @@ export declare const serviceApiKeySchema: z.ZodObject<{
1733
1174
  createdAt: z.ZodString;
1734
1175
  lastUsedAt: z.ZodOptional<z.ZodString>;
1735
1176
  prefix: z.ZodString;
1736
- }, "strip", z.ZodTypeAny, {
1737
- id: string;
1738
- roles: GlobalRole[];
1739
- label: string;
1740
- createdBy: string;
1741
- createdAt: string;
1742
- prefix: string;
1743
- scopes: string[];
1744
- description?: string | undefined;
1745
- rateLimitPerMinute?: number | undefined;
1746
- lastUsedAt?: string | undefined;
1747
- expiresAt?: string | undefined;
1748
- revokedAt?: string | undefined;
1749
- allowedProjects?: string[] | undefined;
1750
- }, {
1751
- id: string;
1752
- roles: GlobalRole[];
1753
- label: string;
1754
- createdBy: string;
1755
- createdAt: string;
1756
- prefix: string;
1757
- scopes: string[];
1758
- description?: string | undefined;
1759
- rateLimitPerMinute?: number | undefined;
1760
- lastUsedAt?: string | undefined;
1761
- expiresAt?: string | undefined;
1762
- revokedAt?: string | undefined;
1763
- allowedProjects?: string[] | undefined;
1764
- }>;
1177
+ }, z.core.$strip>;
1765
1178
  export type ServiceApiKeyMeta = z.infer<typeof serviceApiKeySchema>;
1766
1179
  /** ADR-052: тело создания service-key. `roles` не заданы — дефолт хранилища. */
1767
1180
  export declare const serviceApiKeyCreateSchema: z.ZodObject<{
1768
1181
  label: z.ZodString;
1769
1182
  description: z.ZodOptional<z.ZodString>;
1770
- roles: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GlobalRole>, "many">>;
1771
- scopes: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1772
- allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1183
+ roles: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof GlobalRole>>>;
1184
+ scopes: z.ZodArray<z.ZodString>;
1185
+ allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString>>;
1773
1186
  rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
1774
1187
  expiresAt: z.ZodOptional<z.ZodString>;
1775
- }, "strip", z.ZodTypeAny, {
1776
- label: string;
1777
- scopes: string[];
1778
- description?: string | undefined;
1779
- roles?: GlobalRole[] | undefined;
1780
- rateLimitPerMinute?: number | undefined;
1781
- expiresAt?: string | undefined;
1782
- allowedProjects?: string[] | undefined;
1783
- }, {
1784
- label: string;
1785
- scopes: string[];
1786
- description?: string | undefined;
1787
- roles?: GlobalRole[] | undefined;
1788
- rateLimitPerMinute?: number | undefined;
1789
- expiresAt?: string | undefined;
1790
- allowedProjects?: string[] | undefined;
1791
- }>;
1188
+ }, z.core.$strip>;
1792
1189
  export type ServiceApiKeyCreateRequest = z.infer<typeof serviceApiKeyCreateSchema>;
1793
1190
  /**
1794
1191
  * ADR-052: тело обновления service-key. Все поля опциональны; `null` для
@@ -1797,37 +1194,21 @@ export type ServiceApiKeyCreateRequest = z.infer<typeof serviceApiKeyCreateSchem
1797
1194
  export declare const serviceApiKeyUpdateSchema: z.ZodObject<{
1798
1195
  label: z.ZodOptional<z.ZodString>;
1799
1196
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1800
- roles: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof GlobalRole>, "many">>;
1801
- scopes: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1802
- allowedProjects: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
1197
+ roles: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof GlobalRole>>>;
1198
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
1199
+ allowedProjects: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
1803
1200
  rateLimitPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1804
1201
  expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1805
- }, "strip", z.ZodTypeAny, {
1806
- description?: string | null | undefined;
1807
- roles?: GlobalRole[] | undefined;
1808
- label?: string | undefined;
1809
- rateLimitPerMinute?: number | null | undefined;
1810
- expiresAt?: string | null | undefined;
1811
- scopes?: string[] | undefined;
1812
- allowedProjects?: string[] | null | undefined;
1813
- }, {
1814
- description?: string | null | undefined;
1815
- roles?: GlobalRole[] | undefined;
1816
- label?: string | undefined;
1817
- rateLimitPerMinute?: number | null | undefined;
1818
- expiresAt?: string | null | undefined;
1819
- scopes?: string[] | undefined;
1820
- allowedProjects?: string[] | null | undefined;
1821
- }>;
1202
+ }, z.core.$strip>;
1822
1203
  export type ServiceApiKeyUpdateRequest = z.infer<typeof serviceApiKeyUpdateSchema>;
1823
1204
  /** ADR-052: ответ создания service-key — метаданные + plaintext-секрет (единожды). */
1824
1205
  export declare const serviceApiKeyCreatedSchema: z.ZodObject<{
1825
1206
  id: z.ZodString;
1826
1207
  label: z.ZodString;
1827
1208
  description: z.ZodOptional<z.ZodString>;
1828
- roles: z.ZodArray<z.ZodNativeEnum<typeof GlobalRole>, "many">;
1829
- scopes: z.ZodArray<z.ZodString, "many">;
1830
- allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1209
+ roles: z.ZodArray<z.ZodEnum<typeof GlobalRole>>;
1210
+ scopes: z.ZodArray<z.ZodString>;
1211
+ allowedProjects: z.ZodOptional<z.ZodArray<z.ZodString>>;
1831
1212
  rateLimitPerMinute: z.ZodOptional<z.ZodNumber>;
1832
1213
  expiresAt: z.ZodOptional<z.ZodString>;
1833
1214
  revokedAt: z.ZodOptional<z.ZodString>;
@@ -1835,44 +1216,13 @@ export declare const serviceApiKeyCreatedSchema: z.ZodObject<{
1835
1216
  createdAt: z.ZodString;
1836
1217
  lastUsedAt: z.ZodOptional<z.ZodString>;
1837
1218
  prefix: z.ZodString;
1838
- } & {
1839
1219
  key: z.ZodString;
1840
- }, "strip", z.ZodTypeAny, {
1841
- id: string;
1842
- roles: GlobalRole[];
1843
- label: string;
1844
- createdBy: string;
1845
- createdAt: string;
1846
- prefix: string;
1847
- key: string;
1848
- scopes: string[];
1849
- description?: string | undefined;
1850
- rateLimitPerMinute?: number | undefined;
1851
- lastUsedAt?: string | undefined;
1852
- expiresAt?: string | undefined;
1853
- revokedAt?: string | undefined;
1854
- allowedProjects?: string[] | undefined;
1855
- }, {
1856
- id: string;
1857
- roles: GlobalRole[];
1858
- label: string;
1859
- createdBy: string;
1860
- createdAt: string;
1861
- prefix: string;
1862
- key: string;
1863
- scopes: string[];
1864
- description?: string | undefined;
1865
- rateLimitPerMinute?: number | undefined;
1866
- lastUsedAt?: string | undefined;
1867
- expiresAt?: string | undefined;
1868
- revokedAt?: string | undefined;
1869
- allowedProjects?: string[] | undefined;
1870
- }>;
1220
+ }, z.core.$strip>;
1871
1221
  export type ServiceApiKeyCreatedRequest = z.infer<typeof serviceApiKeyCreatedSchema>;
1872
1222
  /** ADR-052 (этап II): паттерн события подписки — exact либо `prefix.*`. */
1873
- export declare const webhookEventPatternSchema: z.ZodEffects<z.ZodString, string, string>;
1223
+ export declare const webhookEventPatternSchema: z.ZodString;
1874
1224
  /** ADR-052 (этап II): целевой URL — только http/https (SSRF-политика — в core). */
1875
- export declare const webhookUrlSchema: z.ZodEffects<z.ZodString, string, string>;
1225
+ export declare const webhookUrlSchema: z.ZodString;
1876
1226
  /**
1877
1227
  * ADR-052 (этап II): метаданные подписки (ответы API). Секрет (`secret`) и его
1878
1228
  * хеш здесь отсутствуют — наружу не отдаются (в списке — `secretPrefix`).
@@ -1881,63 +1231,28 @@ export declare const webhookSubscriptionSchema: z.ZodObject<{
1881
1231
  id: z.ZodString;
1882
1232
  label: z.ZodString;
1883
1233
  description: z.ZodOptional<z.ZodString>;
1884
- url: z.ZodEffects<z.ZodString, string, string>;
1885
- events: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1234
+ url: z.ZodString;
1235
+ events: z.ZodArray<z.ZodString>;
1886
1236
  enabled: z.ZodBoolean;
1887
1237
  secretPrefix: z.ZodString;
1888
1238
  createdBy: z.ZodString;
1889
1239
  createdAt: z.ZodString;
1890
1240
  lastDeliveryAt: z.ZodOptional<z.ZodString>;
1891
- lastStatus: z.ZodOptional<z.ZodEnum<["ok", "failed"]>>;
1241
+ lastStatus: z.ZodOptional<z.ZodEnum<{
1242
+ ok: "ok";
1243
+ failed: "failed";
1244
+ }>>;
1892
1245
  disabledAt: z.ZodOptional<z.ZodString>;
1893
- }, "strip", z.ZodTypeAny, {
1894
- id: string;
1895
- url: string;
1896
- enabled: boolean;
1897
- label: string;
1898
- createdBy: string;
1899
- createdAt: string;
1900
- events: string[];
1901
- secretPrefix: string;
1902
- description?: string | undefined;
1903
- lastDeliveryAt?: string | undefined;
1904
- lastStatus?: "ok" | "failed" | undefined;
1905
- disabledAt?: string | undefined;
1906
- }, {
1907
- id: string;
1908
- url: string;
1909
- enabled: boolean;
1910
- label: string;
1911
- createdBy: string;
1912
- createdAt: string;
1913
- events: string[];
1914
- secretPrefix: string;
1915
- description?: string | undefined;
1916
- lastDeliveryAt?: string | undefined;
1917
- lastStatus?: "ok" | "failed" | undefined;
1918
- disabledAt?: string | undefined;
1919
- }>;
1246
+ }, z.core.$strip>;
1920
1247
  export type WebhookSubscriptionMeta = z.infer<typeof webhookSubscriptionSchema>;
1921
1248
  /** ADR-052 (этап II): тело создания подписки. `enabled` не задан — активна. */
1922
1249
  export declare const webhookSubscriptionCreateSchema: z.ZodObject<{
1923
1250
  label: z.ZodString;
1924
1251
  description: z.ZodOptional<z.ZodString>;
1925
- url: z.ZodEffects<z.ZodString, string, string>;
1926
- events: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1252
+ url: z.ZodString;
1253
+ events: z.ZodOptional<z.ZodArray<z.ZodString>>;
1927
1254
  enabled: z.ZodOptional<z.ZodBoolean>;
1928
- }, "strip", z.ZodTypeAny, {
1929
- url: string;
1930
- label: string;
1931
- description?: string | undefined;
1932
- enabled?: boolean | undefined;
1933
- events?: string[] | undefined;
1934
- }, {
1935
- url: string;
1936
- label: string;
1937
- description?: string | undefined;
1938
- enabled?: boolean | undefined;
1939
- events?: string[] | undefined;
1940
- }>;
1255
+ }, z.core.$strip>;
1941
1256
  export type WebhookSubscriptionCreateRequest = z.infer<typeof webhookSubscriptionCreateSchema>;
1942
1257
  /**
1943
1258
  * ADR-052 (этап II): тело обновления подписки. Все поля опциональны; `null` для
@@ -1946,187 +1261,109 @@ export type WebhookSubscriptionCreateRequest = z.infer<typeof webhookSubscriptio
1946
1261
  export declare const webhookSubscriptionUpdateSchema: z.ZodObject<{
1947
1262
  label: z.ZodOptional<z.ZodString>;
1948
1263
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1949
- url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1950
- events: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
1264
+ url: z.ZodOptional<z.ZodString>;
1265
+ events: z.ZodOptional<z.ZodArray<z.ZodString>>;
1951
1266
  enabled: z.ZodOptional<z.ZodBoolean>;
1952
- }, "strip", z.ZodTypeAny, {
1953
- url?: string | undefined;
1954
- description?: string | null | undefined;
1955
- enabled?: boolean | undefined;
1956
- label?: string | undefined;
1957
- events?: string[] | undefined;
1958
- }, {
1959
- url?: string | undefined;
1960
- description?: string | null | undefined;
1961
- enabled?: boolean | undefined;
1962
- label?: string | undefined;
1963
- events?: string[] | undefined;
1964
- }>;
1267
+ }, z.core.$strip>;
1965
1268
  export type WebhookSubscriptionUpdateRequest = z.infer<typeof webhookSubscriptionUpdateSchema>;
1966
1269
  /** ADR-052 (этап II): ответ создания/ротации подписки — метаданные + секрет (единожды). */
1967
1270
  export declare const webhookSubscriptionCreatedSchema: z.ZodObject<{
1968
1271
  id: z.ZodString;
1969
1272
  label: z.ZodString;
1970
1273
  description: z.ZodOptional<z.ZodString>;
1971
- url: z.ZodEffects<z.ZodString, string, string>;
1972
- events: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1274
+ url: z.ZodString;
1275
+ events: z.ZodArray<z.ZodString>;
1973
1276
  enabled: z.ZodBoolean;
1974
1277
  secretPrefix: z.ZodString;
1975
1278
  createdBy: z.ZodString;
1976
1279
  createdAt: z.ZodString;
1977
1280
  lastDeliveryAt: z.ZodOptional<z.ZodString>;
1978
- lastStatus: z.ZodOptional<z.ZodEnum<["ok", "failed"]>>;
1281
+ lastStatus: z.ZodOptional<z.ZodEnum<{
1282
+ ok: "ok";
1283
+ failed: "failed";
1284
+ }>>;
1979
1285
  disabledAt: z.ZodOptional<z.ZodString>;
1980
- } & {
1981
1286
  secret: z.ZodString;
1982
- }, "strip", z.ZodTypeAny, {
1983
- id: string;
1984
- url: string;
1985
- enabled: boolean;
1986
- label: string;
1987
- createdBy: string;
1988
- createdAt: string;
1989
- events: string[];
1990
- secretPrefix: string;
1991
- secret: string;
1992
- description?: string | undefined;
1993
- lastDeliveryAt?: string | undefined;
1994
- lastStatus?: "ok" | "failed" | undefined;
1995
- disabledAt?: string | undefined;
1996
- }, {
1997
- id: string;
1998
- url: string;
1999
- enabled: boolean;
2000
- label: string;
2001
- createdBy: string;
2002
- createdAt: string;
2003
- events: string[];
2004
- secretPrefix: string;
2005
- secret: string;
2006
- description?: string | undefined;
2007
- lastDeliveryAt?: string | undefined;
2008
- lastStatus?: "ok" | "failed" | undefined;
2009
- disabledAt?: string | undefined;
2010
- }>;
1287
+ }, z.core.$strip>;
2011
1288
  export type WebhookSubscriptionCreatedRequest = z.infer<typeof webhookSubscriptionCreatedSchema>;
2012
1289
  /** ADR-052 (этап II): запись журнала доставки. */
2013
1290
  export declare const webhookDeliverySchema: z.ZodObject<{
2014
1291
  id: z.ZodString;
2015
1292
  subscriptionId: z.ZodString;
2016
1293
  eventType: z.ZodString;
2017
- status: z.ZodEnum<["ok", "failed", "pending"]>;
1294
+ status: z.ZodEnum<{
1295
+ pending: "pending";
1296
+ ok: "ok";
1297
+ failed: "failed";
1298
+ }>;
2018
1299
  attempts: z.ZodNumber;
2019
1300
  responseStatus: z.ZodOptional<z.ZodNumber>;
2020
1301
  error: z.ZodOptional<z.ZodString>;
2021
1302
  createdAt: z.ZodString;
2022
1303
  completedAt: z.ZodOptional<z.ZodString>;
2023
- }, "strip", z.ZodTypeAny, {
2024
- status: "pending" | "ok" | "failed";
2025
- id: string;
2026
- createdAt: string;
2027
- subscriptionId: string;
2028
- eventType: string;
2029
- attempts: number;
2030
- error?: string | undefined;
2031
- responseStatus?: number | undefined;
2032
- completedAt?: string | undefined;
2033
- }, {
2034
- status: "pending" | "ok" | "failed";
2035
- id: string;
2036
- createdAt: string;
2037
- subscriptionId: string;
2038
- eventType: string;
2039
- attempts: number;
2040
- error?: string | undefined;
2041
- responseStatus?: number | undefined;
2042
- completedAt?: string | undefined;
2043
- }>;
1304
+ }, z.core.$strip>;
2044
1305
  export type WebhookDeliveryMeta = z.infer<typeof webhookDeliverySchema>;
2045
1306
  /** ADR-051/ADR-089: цель расписания (дискриминированный союз по `mode`). */
2046
- export declare const scheduleTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1307
+ export declare const scheduleTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2047
1308
  mode: z.ZodLiteral<"bound">;
2048
1309
  sessionId: z.ZodString;
2049
- }, "strip", z.ZodTypeAny, {
2050
- mode: "bound";
2051
- sessionId: string;
2052
- }, {
2053
- mode: "bound";
2054
- sessionId: string;
2055
- }>, z.ZodObject<{
1310
+ }, z.core.$strip>, z.ZodObject<{
2056
1311
  mode: z.ZodLiteral<"ephemeral">;
2057
1312
  agentTemplate: z.ZodOptional<z.ZodString>;
2058
1313
  project: z.ZodOptional<z.ZodString>;
2059
1314
  ttl: z.ZodOptional<z.ZodString>;
2060
- }, "strip", z.ZodTypeAny, {
2061
- mode: "ephemeral";
2062
- agentTemplate?: string | undefined;
2063
- project?: string | undefined;
2064
- ttl?: string | undefined;
2065
- }, {
2066
- mode: "ephemeral";
2067
- agentTemplate?: string | undefined;
2068
- project?: string | undefined;
2069
- ttl?: string | undefined;
2070
- }>, z.ZodObject<{
1315
+ }, z.core.$strip>, z.ZodObject<{
2071
1316
  mode: z.ZodLiteral<"queue">;
2072
1317
  sessionId: z.ZodString;
2073
- }, "strip", z.ZodTypeAny, {
2074
- mode: "queue";
2075
- sessionId: string;
2076
- }, {
2077
- mode: "queue";
2078
- sessionId: string;
2079
- }>]>;
1318
+ }, z.core.$strip>, z.ZodObject<{
1319
+ mode: z.ZodLiteral<"pipeline">;
1320
+ projectId: z.ZodString;
1321
+ pipelineId: z.ZodString;
1322
+ version: z.ZodOptional<z.ZodNumber>;
1323
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1324
+ }, z.core.$strip>], "mode">;
1325
+ /**
1326
+ * ADR-089: ссылка на шаг пайплайна — «эта сессия — шаг `step` пайплайна `id`».
1327
+ * Допустима только в целях `ephemeral`/`bind` (там, где решение порождает
1328
+ * сессию); в `bound`/`queue` сессия фиксирована — поле там отвергается.
1329
+ */
1330
+ export declare const pipelineRefSchema: z.ZodObject<{
1331
+ id: z.ZodString;
1332
+ step: z.ZodString;
1333
+ }, z.core.$strip>;
2080
1334
  /**
2081
1335
  * ADR-089: цель правила маршрутизации — дискриминированный союз по `mode`
2082
1336
  * (семантика та же, что у `scheduleTargetSchema`).
1337
+ *
1338
+ * `pipeline` (ссылка на шаг пайплайна) допустим только в `ephemeral`/`bind`;
1339
+ * в `bound`/`queue` сессия фиксирована, поэтому варианты **строгие**
1340
+ * (`.strict()`): лишние поля (в т.ч. `pipeline`) там **отвергаются**, а не
1341
+ * игнорируются — иначе ошибка конфигурации правила проходила бы молча.
2083
1342
  */
2084
- export declare const eventRouteTargetSchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1343
+ export declare const eventRouteTargetSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2085
1344
  mode: z.ZodLiteral<"bound">;
2086
1345
  sessionId: z.ZodString;
2087
- }, "strip", z.ZodTypeAny, {
2088
- mode: "bound";
2089
- sessionId: string;
2090
- }, {
2091
- mode: "bound";
2092
- sessionId: string;
2093
- }>, z.ZodObject<{
1346
+ }, z.core.$strict>, z.ZodObject<{
2094
1347
  mode: z.ZodLiteral<"ephemeral">;
2095
1348
  agentTemplate: z.ZodOptional<z.ZodString>;
2096
1349
  project: z.ZodOptional<z.ZodString>;
2097
1350
  ttl: z.ZodOptional<z.ZodString>;
2098
- }, "strip", z.ZodTypeAny, {
2099
- mode: "ephemeral";
2100
- agentTemplate?: string | undefined;
2101
- project?: string | undefined;
2102
- ttl?: string | undefined;
2103
- }, {
2104
- mode: "ephemeral";
2105
- agentTemplate?: string | undefined;
2106
- project?: string | undefined;
2107
- ttl?: string | undefined;
2108
- }>, z.ZodObject<{
1351
+ pipeline: z.ZodOptional<z.ZodObject<{
1352
+ id: z.ZodString;
1353
+ step: z.ZodString;
1354
+ }, z.core.$strip>>;
1355
+ }, z.core.$strip>, z.ZodObject<{
2109
1356
  mode: z.ZodLiteral<"queue">;
2110
1357
  sessionId: z.ZodString;
2111
- }, "strip", z.ZodTypeAny, {
2112
- mode: "queue";
2113
- sessionId: string;
2114
- }, {
2115
- mode: "queue";
2116
- sessionId: string;
2117
- }>, z.ZodObject<{
1358
+ }, z.core.$strict>, z.ZodObject<{
2118
1359
  mode: z.ZodLiteral<"bind">;
2119
1360
  agentTemplate: z.ZodOptional<z.ZodString>;
2120
1361
  project: z.ZodOptional<z.ZodString>;
2121
- }, "strip", z.ZodTypeAny, {
2122
- mode: "bind";
2123
- agentTemplate?: string | undefined;
2124
- project?: string | undefined;
2125
- }, {
2126
- mode: "bind";
2127
- agentTemplate?: string | undefined;
2128
- project?: string | undefined;
2129
- }>]>;
1362
+ pipeline: z.ZodOptional<z.ZodObject<{
1363
+ id: z.ZodString;
1364
+ step: z.ZodString;
1365
+ }, z.core.$strip>>;
1366
+ }, z.core.$strip>], "mode">;
2130
1367
  /** ADR-089: условие срабатывания правила (AND по заполненным полям). */
2131
1368
  export declare const eventRouteMatchSchema: z.ZodObject<{
2132
1369
  source: z.ZodOptional<z.ZodString>;
@@ -2135,24 +1372,8 @@ export declare const eventRouteMatchSchema: z.ZodObject<{
2135
1372
  threadKey: z.ZodOptional<z.ZodString>;
2136
1373
  principalId: z.ZodOptional<z.ZodString>;
2137
1374
  label: z.ZodOptional<z.ZodString>;
2138
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2139
- }, "strip", z.ZodTypeAny, {
2140
- type?: string | undefined;
2141
- principalId?: string | undefined;
2142
- chatKey?: string | undefined;
2143
- threadKey?: string | undefined;
2144
- source?: string | undefined;
2145
- label?: string | undefined;
2146
- keywords?: string[] | undefined;
2147
- }, {
2148
- type?: string | undefined;
2149
- principalId?: string | undefined;
2150
- chatKey?: string | undefined;
2151
- threadKey?: string | undefined;
2152
- source?: string | undefined;
2153
- label?: string | undefined;
2154
- keywords?: string[] | undefined;
2155
- }>;
1375
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1376
+ }, z.core.$strip>;
2156
1377
  /** ADR-089: полная сущность правила маршрутизации событий (ответы API). */
2157
1378
  export declare const eventRouteRuleSchema: z.ZodObject<{
2158
1379
  id: z.ZodString;
@@ -2166,131 +1387,33 @@ export declare const eventRouteRuleSchema: z.ZodObject<{
2166
1387
  threadKey: z.ZodOptional<z.ZodString>;
2167
1388
  principalId: z.ZodOptional<z.ZodString>;
2168
1389
  label: z.ZodOptional<z.ZodString>;
2169
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2170
- }, "strip", z.ZodTypeAny, {
2171
- type?: string | undefined;
2172
- principalId?: string | undefined;
2173
- chatKey?: string | undefined;
2174
- threadKey?: string | undefined;
2175
- source?: string | undefined;
2176
- label?: string | undefined;
2177
- keywords?: string[] | undefined;
2178
- }, {
2179
- type?: string | undefined;
2180
- principalId?: string | undefined;
2181
- chatKey?: string | undefined;
2182
- threadKey?: string | undefined;
2183
- source?: string | undefined;
2184
- label?: string | undefined;
2185
- keywords?: string[] | undefined;
2186
- }>;
2187
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1390
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1391
+ }, z.core.$strip>;
1392
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2188
1393
  mode: z.ZodLiteral<"bound">;
2189
1394
  sessionId: z.ZodString;
2190
- }, "strip", z.ZodTypeAny, {
2191
- mode: "bound";
2192
- sessionId: string;
2193
- }, {
2194
- mode: "bound";
2195
- sessionId: string;
2196
- }>, z.ZodObject<{
1395
+ }, z.core.$strict>, z.ZodObject<{
2197
1396
  mode: z.ZodLiteral<"ephemeral">;
2198
1397
  agentTemplate: z.ZodOptional<z.ZodString>;
2199
1398
  project: z.ZodOptional<z.ZodString>;
2200
1399
  ttl: z.ZodOptional<z.ZodString>;
2201
- }, "strip", z.ZodTypeAny, {
2202
- mode: "ephemeral";
2203
- agentTemplate?: string | undefined;
2204
- project?: string | undefined;
2205
- ttl?: string | undefined;
2206
- }, {
2207
- mode: "ephemeral";
2208
- agentTemplate?: string | undefined;
2209
- project?: string | undefined;
2210
- ttl?: string | undefined;
2211
- }>, z.ZodObject<{
1400
+ pipeline: z.ZodOptional<z.ZodObject<{
1401
+ id: z.ZodString;
1402
+ step: z.ZodString;
1403
+ }, z.core.$strip>>;
1404
+ }, z.core.$strip>, z.ZodObject<{
2212
1405
  mode: z.ZodLiteral<"queue">;
2213
1406
  sessionId: z.ZodString;
2214
- }, "strip", z.ZodTypeAny, {
2215
- mode: "queue";
2216
- sessionId: string;
2217
- }, {
2218
- mode: "queue";
2219
- sessionId: string;
2220
- }>, z.ZodObject<{
1407
+ }, z.core.$strict>, z.ZodObject<{
2221
1408
  mode: z.ZodLiteral<"bind">;
2222
1409
  agentTemplate: z.ZodOptional<z.ZodString>;
2223
1410
  project: z.ZodOptional<z.ZodString>;
2224
- }, "strip", z.ZodTypeAny, {
2225
- mode: "bind";
2226
- agentTemplate?: string | undefined;
2227
- project?: string | undefined;
2228
- }, {
2229
- mode: "bind";
2230
- agentTemplate?: string | undefined;
2231
- project?: string | undefined;
2232
- }>]>;
2233
- }, "strip", z.ZodTypeAny, {
2234
- id: string;
2235
- enabled: boolean;
2236
- priority: number;
2237
- match: {
2238
- type?: string | undefined;
2239
- principalId?: string | undefined;
2240
- chatKey?: string | undefined;
2241
- threadKey?: string | undefined;
2242
- source?: string | undefined;
2243
- label?: string | undefined;
2244
- keywords?: string[] | undefined;
2245
- };
2246
- target: {
2247
- mode: "bound";
2248
- sessionId: string;
2249
- } | {
2250
- mode: "ephemeral";
2251
- agentTemplate?: string | undefined;
2252
- project?: string | undefined;
2253
- ttl?: string | undefined;
2254
- } | {
2255
- mode: "queue";
2256
- sessionId: string;
2257
- } | {
2258
- mode: "bind";
2259
- agentTemplate?: string | undefined;
2260
- project?: string | undefined;
2261
- };
2262
- name?: string | undefined;
2263
- }, {
2264
- id: string;
2265
- match: {
2266
- type?: string | undefined;
2267
- principalId?: string | undefined;
2268
- chatKey?: string | undefined;
2269
- threadKey?: string | undefined;
2270
- source?: string | undefined;
2271
- label?: string | undefined;
2272
- keywords?: string[] | undefined;
2273
- };
2274
- target: {
2275
- mode: "bound";
2276
- sessionId: string;
2277
- } | {
2278
- mode: "ephemeral";
2279
- agentTemplate?: string | undefined;
2280
- project?: string | undefined;
2281
- ttl?: string | undefined;
2282
- } | {
2283
- mode: "queue";
2284
- sessionId: string;
2285
- } | {
2286
- mode: "bind";
2287
- agentTemplate?: string | undefined;
2288
- project?: string | undefined;
2289
- };
2290
- name?: string | undefined;
2291
- enabled?: boolean | undefined;
2292
- priority?: number | undefined;
2293
- }>;
1411
+ pipeline: z.ZodOptional<z.ZodObject<{
1412
+ id: z.ZodString;
1413
+ step: z.ZodString;
1414
+ }, z.core.$strip>>;
1415
+ }, z.core.$strip>], "mode">;
1416
+ }, z.core.$strip>;
2294
1417
  /** ADR-089: вход создания/обновления правила (`upsert`) — без `id`. */
2295
1418
  export declare const eventRouteRuleInputSchema: z.ZodObject<{
2296
1419
  name: z.ZodOptional<z.ZodString>;
@@ -2303,129 +1426,33 @@ export declare const eventRouteRuleInputSchema: z.ZodObject<{
2303
1426
  threadKey: z.ZodOptional<z.ZodString>;
2304
1427
  principalId: z.ZodOptional<z.ZodString>;
2305
1428
  label: z.ZodOptional<z.ZodString>;
2306
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2307
- }, "strip", z.ZodTypeAny, {
2308
- type?: string | undefined;
2309
- principalId?: string | undefined;
2310
- chatKey?: string | undefined;
2311
- threadKey?: string | undefined;
2312
- source?: string | undefined;
2313
- label?: string | undefined;
2314
- keywords?: string[] | undefined;
2315
- }, {
2316
- type?: string | undefined;
2317
- principalId?: string | undefined;
2318
- chatKey?: string | undefined;
2319
- threadKey?: string | undefined;
2320
- source?: string | undefined;
2321
- label?: string | undefined;
2322
- keywords?: string[] | undefined;
2323
- }>;
2324
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1429
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1430
+ }, z.core.$strip>;
1431
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2325
1432
  mode: z.ZodLiteral<"bound">;
2326
1433
  sessionId: z.ZodString;
2327
- }, "strip", z.ZodTypeAny, {
2328
- mode: "bound";
2329
- sessionId: string;
2330
- }, {
2331
- mode: "bound";
2332
- sessionId: string;
2333
- }>, z.ZodObject<{
1434
+ }, z.core.$strict>, z.ZodObject<{
2334
1435
  mode: z.ZodLiteral<"ephemeral">;
2335
1436
  agentTemplate: z.ZodOptional<z.ZodString>;
2336
1437
  project: z.ZodOptional<z.ZodString>;
2337
1438
  ttl: z.ZodOptional<z.ZodString>;
2338
- }, "strip", z.ZodTypeAny, {
2339
- mode: "ephemeral";
2340
- agentTemplate?: string | undefined;
2341
- project?: string | undefined;
2342
- ttl?: string | undefined;
2343
- }, {
2344
- mode: "ephemeral";
2345
- agentTemplate?: string | undefined;
2346
- project?: string | undefined;
2347
- ttl?: string | undefined;
2348
- }>, z.ZodObject<{
1439
+ pipeline: z.ZodOptional<z.ZodObject<{
1440
+ id: z.ZodString;
1441
+ step: z.ZodString;
1442
+ }, z.core.$strip>>;
1443
+ }, z.core.$strip>, z.ZodObject<{
2349
1444
  mode: z.ZodLiteral<"queue">;
2350
1445
  sessionId: z.ZodString;
2351
- }, "strip", z.ZodTypeAny, {
2352
- mode: "queue";
2353
- sessionId: string;
2354
- }, {
2355
- mode: "queue";
2356
- sessionId: string;
2357
- }>, z.ZodObject<{
1446
+ }, z.core.$strict>, z.ZodObject<{
2358
1447
  mode: z.ZodLiteral<"bind">;
2359
1448
  agentTemplate: z.ZodOptional<z.ZodString>;
2360
1449
  project: z.ZodOptional<z.ZodString>;
2361
- }, "strip", z.ZodTypeAny, {
2362
- mode: "bind";
2363
- agentTemplate?: string | undefined;
2364
- project?: string | undefined;
2365
- }, {
2366
- mode: "bind";
2367
- agentTemplate?: string | undefined;
2368
- project?: string | undefined;
2369
- }>]>;
2370
- }, "strip", z.ZodTypeAny, {
2371
- enabled: boolean;
2372
- priority: number;
2373
- match: {
2374
- type?: string | undefined;
2375
- principalId?: string | undefined;
2376
- chatKey?: string | undefined;
2377
- threadKey?: string | undefined;
2378
- source?: string | undefined;
2379
- label?: string | undefined;
2380
- keywords?: string[] | undefined;
2381
- };
2382
- target: {
2383
- mode: "bound";
2384
- sessionId: string;
2385
- } | {
2386
- mode: "ephemeral";
2387
- agentTemplate?: string | undefined;
2388
- project?: string | undefined;
2389
- ttl?: string | undefined;
2390
- } | {
2391
- mode: "queue";
2392
- sessionId: string;
2393
- } | {
2394
- mode: "bind";
2395
- agentTemplate?: string | undefined;
2396
- project?: string | undefined;
2397
- };
2398
- name?: string | undefined;
2399
- }, {
2400
- match: {
2401
- type?: string | undefined;
2402
- principalId?: string | undefined;
2403
- chatKey?: string | undefined;
2404
- threadKey?: string | undefined;
2405
- source?: string | undefined;
2406
- label?: string | undefined;
2407
- keywords?: string[] | undefined;
2408
- };
2409
- target: {
2410
- mode: "bound";
2411
- sessionId: string;
2412
- } | {
2413
- mode: "ephemeral";
2414
- agentTemplate?: string | undefined;
2415
- project?: string | undefined;
2416
- ttl?: string | undefined;
2417
- } | {
2418
- mode: "queue";
2419
- sessionId: string;
2420
- } | {
2421
- mode: "bind";
2422
- agentTemplate?: string | undefined;
2423
- project?: string | undefined;
2424
- };
2425
- name?: string | undefined;
2426
- enabled?: boolean | undefined;
2427
- priority?: number | undefined;
2428
- }>;
1450
+ pipeline: z.ZodOptional<z.ZodObject<{
1451
+ id: z.ZodString;
1452
+ step: z.ZodString;
1453
+ }, z.core.$strip>>;
1454
+ }, z.core.$strip>], "mode">;
1455
+ }, z.core.$strip>;
2429
1456
  /**
2430
1457
  * ADR-089: тело upsert-запроса правила — вход + необязательный `id` (обновление
2431
1458
  * существующего правила; отсутствие — создание нового `rule_<uuid>`).
@@ -2441,644 +1468,264 @@ export declare const eventRouteRuleUpsertSchema: z.ZodObject<{
2441
1468
  threadKey: z.ZodOptional<z.ZodString>;
2442
1469
  principalId: z.ZodOptional<z.ZodString>;
2443
1470
  label: z.ZodOptional<z.ZodString>;
2444
- keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2445
- }, "strip", z.ZodTypeAny, {
2446
- type?: string | undefined;
2447
- principalId?: string | undefined;
2448
- chatKey?: string | undefined;
2449
- threadKey?: string | undefined;
2450
- source?: string | undefined;
2451
- label?: string | undefined;
2452
- keywords?: string[] | undefined;
2453
- }, {
2454
- type?: string | undefined;
2455
- principalId?: string | undefined;
2456
- chatKey?: string | undefined;
2457
- threadKey?: string | undefined;
2458
- source?: string | undefined;
2459
- label?: string | undefined;
2460
- keywords?: string[] | undefined;
2461
- }>;
2462
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1471
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
1472
+ }, z.core.$strip>;
1473
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2463
1474
  mode: z.ZodLiteral<"bound">;
2464
1475
  sessionId: z.ZodString;
2465
- }, "strip", z.ZodTypeAny, {
2466
- mode: "bound";
2467
- sessionId: string;
2468
- }, {
2469
- mode: "bound";
2470
- sessionId: string;
2471
- }>, z.ZodObject<{
1476
+ }, z.core.$strict>, z.ZodObject<{
2472
1477
  mode: z.ZodLiteral<"ephemeral">;
2473
1478
  agentTemplate: z.ZodOptional<z.ZodString>;
2474
1479
  project: z.ZodOptional<z.ZodString>;
2475
1480
  ttl: z.ZodOptional<z.ZodString>;
2476
- }, "strip", z.ZodTypeAny, {
2477
- mode: "ephemeral";
2478
- agentTemplate?: string | undefined;
2479
- project?: string | undefined;
2480
- ttl?: string | undefined;
2481
- }, {
2482
- mode: "ephemeral";
2483
- agentTemplate?: string | undefined;
2484
- project?: string | undefined;
2485
- ttl?: string | undefined;
2486
- }>, z.ZodObject<{
1481
+ pipeline: z.ZodOptional<z.ZodObject<{
1482
+ id: z.ZodString;
1483
+ step: z.ZodString;
1484
+ }, z.core.$strip>>;
1485
+ }, z.core.$strip>, z.ZodObject<{
2487
1486
  mode: z.ZodLiteral<"queue">;
2488
1487
  sessionId: z.ZodString;
2489
- }, "strip", z.ZodTypeAny, {
2490
- mode: "queue";
2491
- sessionId: string;
2492
- }, {
2493
- mode: "queue";
2494
- sessionId: string;
2495
- }>, z.ZodObject<{
1488
+ }, z.core.$strict>, z.ZodObject<{
2496
1489
  mode: z.ZodLiteral<"bind">;
2497
1490
  agentTemplate: z.ZodOptional<z.ZodString>;
2498
1491
  project: z.ZodOptional<z.ZodString>;
2499
- }, "strip", z.ZodTypeAny, {
2500
- mode: "bind";
2501
- agentTemplate?: string | undefined;
2502
- project?: string | undefined;
2503
- }, {
2504
- mode: "bind";
2505
- agentTemplate?: string | undefined;
2506
- project?: string | undefined;
2507
- }>]>;
2508
- } & {
1492
+ pipeline: z.ZodOptional<z.ZodObject<{
1493
+ id: z.ZodString;
1494
+ step: z.ZodString;
1495
+ }, z.core.$strip>>;
1496
+ }, z.core.$strip>], "mode">;
2509
1497
  id: z.ZodOptional<z.ZodString>;
2510
- }, "strip", z.ZodTypeAny, {
2511
- enabled: boolean;
2512
- priority: number;
2513
- match: {
2514
- type?: string | undefined;
2515
- principalId?: string | undefined;
2516
- chatKey?: string | undefined;
2517
- threadKey?: string | undefined;
2518
- source?: string | undefined;
2519
- label?: string | undefined;
2520
- keywords?: string[] | undefined;
2521
- };
2522
- target: {
2523
- mode: "bound";
2524
- sessionId: string;
2525
- } | {
2526
- mode: "ephemeral";
2527
- agentTemplate?: string | undefined;
2528
- project?: string | undefined;
2529
- ttl?: string | undefined;
2530
- } | {
2531
- mode: "queue";
2532
- sessionId: string;
2533
- } | {
2534
- mode: "bind";
2535
- agentTemplate?: string | undefined;
2536
- project?: string | undefined;
2537
- };
2538
- name?: string | undefined;
2539
- id?: string | undefined;
2540
- }, {
2541
- match: {
2542
- type?: string | undefined;
2543
- principalId?: string | undefined;
2544
- chatKey?: string | undefined;
2545
- threadKey?: string | undefined;
2546
- source?: string | undefined;
2547
- label?: string | undefined;
2548
- keywords?: string[] | undefined;
2549
- };
2550
- target: {
2551
- mode: "bound";
2552
- sessionId: string;
2553
- } | {
2554
- mode: "ephemeral";
2555
- agentTemplate?: string | undefined;
2556
- project?: string | undefined;
2557
- ttl?: string | undefined;
2558
- } | {
2559
- mode: "queue";
2560
- sessionId: string;
2561
- } | {
2562
- mode: "bind";
2563
- agentTemplate?: string | undefined;
2564
- project?: string | undefined;
2565
- };
2566
- name?: string | undefined;
2567
- id?: string | undefined;
2568
- enabled?: boolean | undefined;
2569
- priority?: number | undefined;
2570
- }>;
1498
+ }, z.core.$strip>;
2571
1499
  export type EventRouteTargetRequest = z.infer<typeof eventRouteTargetSchema>;
2572
1500
  export type EventRouteRuleInputRequest = z.infer<typeof eventRouteRuleInputSchema>;
2573
1501
  export type EventRouteRuleUpsertRequest = z.infer<typeof eventRouteRuleUpsertSchema>;
2574
1502
  /** ADR-051/ADR-089: вход создания/обновления расписания (`ScheduleInput`). */
2575
- export declare const scheduleInputSchema: z.ZodEffects<z.ZodObject<{
1503
+ export declare const scheduleInputSchema: z.ZodObject<{
2576
1504
  name: z.ZodString;
2577
1505
  enabled: z.ZodDefault<z.ZodBoolean>;
2578
1506
  cron: z.ZodOptional<z.ZodString>;
2579
1507
  every: z.ZodOptional<z.ZodString>;
2580
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1508
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2581
1509
  mode: z.ZodLiteral<"bound">;
2582
1510
  sessionId: z.ZodString;
2583
- }, "strip", z.ZodTypeAny, {
2584
- mode: "bound";
2585
- sessionId: string;
2586
- }, {
2587
- mode: "bound";
2588
- sessionId: string;
2589
- }>, z.ZodObject<{
1511
+ }, z.core.$strip>, z.ZodObject<{
2590
1512
  mode: z.ZodLiteral<"ephemeral">;
2591
1513
  agentTemplate: z.ZodOptional<z.ZodString>;
2592
1514
  project: z.ZodOptional<z.ZodString>;
2593
1515
  ttl: z.ZodOptional<z.ZodString>;
2594
- }, "strip", z.ZodTypeAny, {
2595
- mode: "ephemeral";
2596
- agentTemplate?: string | undefined;
2597
- project?: string | undefined;
2598
- ttl?: string | undefined;
2599
- }, {
2600
- mode: "ephemeral";
2601
- agentTemplate?: string | undefined;
2602
- project?: string | undefined;
2603
- ttl?: string | undefined;
2604
- }>, z.ZodObject<{
1516
+ }, z.core.$strip>, z.ZodObject<{
2605
1517
  mode: z.ZodLiteral<"queue">;
2606
1518
  sessionId: z.ZodString;
2607
- }, "strip", z.ZodTypeAny, {
2608
- mode: "queue";
2609
- sessionId: string;
2610
- }, {
2611
- mode: "queue";
2612
- sessionId: string;
2613
- }>]>;
1519
+ }, z.core.$strip>, z.ZodObject<{
1520
+ mode: z.ZodLiteral<"pipeline">;
1521
+ projectId: z.ZodString;
1522
+ pipelineId: z.ZodString;
1523
+ version: z.ZodOptional<z.ZodNumber>;
1524
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1525
+ }, z.core.$strip>], "mode">;
2614
1526
  prompt: z.ZodOptional<z.ZodString>;
2615
1527
  payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2616
1528
  ownerId: z.ZodOptional<z.ZodString>;
2617
- catchUp: z.ZodOptional<z.ZodEnum<["skip", "once"]>>;
2618
- }, "strip", z.ZodTypeAny, {
2619
- name: string;
2620
- enabled: boolean;
2621
- target: {
2622
- mode: "bound";
2623
- sessionId: string;
2624
- } | {
2625
- mode: "ephemeral";
2626
- agentTemplate?: string | undefined;
2627
- project?: string | undefined;
2628
- ttl?: string | undefined;
2629
- } | {
2630
- mode: "queue";
2631
- sessionId: string;
2632
- };
2633
- every?: string | undefined;
2634
- payload?: Record<string, unknown> | undefined;
2635
- cron?: string | undefined;
2636
- prompt?: string | undefined;
2637
- ownerId?: string | undefined;
2638
- catchUp?: "skip" | "once" | undefined;
2639
- }, {
2640
- name: string;
2641
- target: {
2642
- mode: "bound";
2643
- sessionId: string;
2644
- } | {
2645
- mode: "ephemeral";
2646
- agentTemplate?: string | undefined;
2647
- project?: string | undefined;
2648
- ttl?: string | undefined;
2649
- } | {
2650
- mode: "queue";
2651
- sessionId: string;
2652
- };
2653
- every?: string | undefined;
2654
- enabled?: boolean | undefined;
2655
- payload?: Record<string, unknown> | undefined;
2656
- cron?: string | undefined;
2657
- prompt?: string | undefined;
2658
- ownerId?: string | undefined;
2659
- catchUp?: "skip" | "once" | undefined;
2660
- }>, {
2661
- name: string;
2662
- enabled: boolean;
2663
- target: {
2664
- mode: "bound";
2665
- sessionId: string;
2666
- } | {
2667
- mode: "ephemeral";
2668
- agentTemplate?: string | undefined;
2669
- project?: string | undefined;
2670
- ttl?: string | undefined;
2671
- } | {
2672
- mode: "queue";
2673
- sessionId: string;
2674
- };
2675
- every?: string | undefined;
2676
- payload?: Record<string, unknown> | undefined;
2677
- cron?: string | undefined;
2678
- prompt?: string | undefined;
2679
- ownerId?: string | undefined;
2680
- catchUp?: "skip" | "once" | undefined;
2681
- }, {
2682
- name: string;
2683
- target: {
2684
- mode: "bound";
2685
- sessionId: string;
2686
- } | {
2687
- mode: "ephemeral";
2688
- agentTemplate?: string | undefined;
2689
- project?: string | undefined;
2690
- ttl?: string | undefined;
2691
- } | {
2692
- mode: "queue";
2693
- sessionId: string;
2694
- };
2695
- every?: string | undefined;
2696
- enabled?: boolean | undefined;
2697
- payload?: Record<string, unknown> | undefined;
2698
- cron?: string | undefined;
2699
- prompt?: string | undefined;
2700
- ownerId?: string | undefined;
2701
- catchUp?: "skip" | "once" | undefined;
2702
- }>;
1529
+ catchUp: z.ZodOptional<z.ZodEnum<{
1530
+ once: "once";
1531
+ skip: "skip";
1532
+ }>>;
1533
+ }, z.core.$strip>;
2703
1534
  /** ADR-051/ADR-089: полная сущность расписания (ответы API). */
2704
- export declare const scheduleSchema: z.ZodEffects<z.ZodObject<{
1535
+ export declare const scheduleSchema: z.ZodObject<{
2705
1536
  id: z.ZodString;
2706
1537
  name: z.ZodString;
2707
1538
  enabled: z.ZodBoolean;
2708
1539
  cron: z.ZodOptional<z.ZodString>;
2709
1540
  every: z.ZodOptional<z.ZodString>;
2710
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1541
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2711
1542
  mode: z.ZodLiteral<"bound">;
2712
1543
  sessionId: z.ZodString;
2713
- }, "strip", z.ZodTypeAny, {
2714
- mode: "bound";
2715
- sessionId: string;
2716
- }, {
2717
- mode: "bound";
2718
- sessionId: string;
2719
- }>, z.ZodObject<{
1544
+ }, z.core.$strip>, z.ZodObject<{
2720
1545
  mode: z.ZodLiteral<"ephemeral">;
2721
1546
  agentTemplate: z.ZodOptional<z.ZodString>;
2722
1547
  project: z.ZodOptional<z.ZodString>;
2723
1548
  ttl: z.ZodOptional<z.ZodString>;
2724
- }, "strip", z.ZodTypeAny, {
2725
- mode: "ephemeral";
2726
- agentTemplate?: string | undefined;
2727
- project?: string | undefined;
2728
- ttl?: string | undefined;
2729
- }, {
2730
- mode: "ephemeral";
2731
- agentTemplate?: string | undefined;
2732
- project?: string | undefined;
2733
- ttl?: string | undefined;
2734
- }>, z.ZodObject<{
1549
+ }, z.core.$strip>, z.ZodObject<{
2735
1550
  mode: z.ZodLiteral<"queue">;
2736
1551
  sessionId: z.ZodString;
2737
- }, "strip", z.ZodTypeAny, {
2738
- mode: "queue";
2739
- sessionId: string;
2740
- }, {
2741
- mode: "queue";
2742
- sessionId: string;
2743
- }>]>;
1552
+ }, z.core.$strip>, z.ZodObject<{
1553
+ mode: z.ZodLiteral<"pipeline">;
1554
+ projectId: z.ZodString;
1555
+ pipelineId: z.ZodString;
1556
+ version: z.ZodOptional<z.ZodNumber>;
1557
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1558
+ }, z.core.$strip>], "mode">;
2744
1559
  prompt: z.ZodOptional<z.ZodString>;
2745
1560
  payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2746
1561
  ownerId: z.ZodOptional<z.ZodString>;
2747
- catchUp: z.ZodOptional<z.ZodEnum<["skip", "once"]>>;
1562
+ catchUp: z.ZodOptional<z.ZodEnum<{
1563
+ once: "once";
1564
+ skip: "skip";
1565
+ }>>;
2748
1566
  createdAt: z.ZodString;
2749
1567
  updatedAt: z.ZodString;
2750
1568
  lastRunAt: z.ZodOptional<z.ZodString>;
2751
1569
  nextRunAt: z.ZodOptional<z.ZodString>;
2752
- lastStatus: z.ZodOptional<z.ZodEnum<["ok", "error", "skipped"]>>;
1570
+ lastStatus: z.ZodOptional<z.ZodEnum<{
1571
+ error: "error";
1572
+ ok: "ok";
1573
+ skipped: "skipped";
1574
+ }>>;
2753
1575
  lastError: z.ZodOptional<z.ZodString>;
2754
- }, "strip", z.ZodTypeAny, {
2755
- name: string;
2756
- id: string;
2757
- enabled: boolean;
2758
- createdAt: string;
2759
- target: {
2760
- mode: "bound";
2761
- sessionId: string;
2762
- } | {
2763
- mode: "ephemeral";
2764
- agentTemplate?: string | undefined;
2765
- project?: string | undefined;
2766
- ttl?: string | undefined;
2767
- } | {
2768
- mode: "queue";
2769
- sessionId: string;
2770
- };
2771
- updatedAt: string;
2772
- every?: string | undefined;
2773
- payload?: Record<string, unknown> | undefined;
2774
- lastStatus?: "error" | "ok" | "skipped" | undefined;
2775
- cron?: string | undefined;
2776
- prompt?: string | undefined;
2777
- ownerId?: string | undefined;
2778
- catchUp?: "skip" | "once" | undefined;
2779
- lastRunAt?: string | undefined;
2780
- nextRunAt?: string | undefined;
2781
- lastError?: string | undefined;
2782
- }, {
2783
- name: string;
2784
- id: string;
2785
- enabled: boolean;
2786
- createdAt: string;
2787
- target: {
2788
- mode: "bound";
2789
- sessionId: string;
2790
- } | {
2791
- mode: "ephemeral";
2792
- agentTemplate?: string | undefined;
2793
- project?: string | undefined;
2794
- ttl?: string | undefined;
2795
- } | {
2796
- mode: "queue";
2797
- sessionId: string;
2798
- };
2799
- updatedAt: string;
2800
- every?: string | undefined;
2801
- payload?: Record<string, unknown> | undefined;
2802
- lastStatus?: "error" | "ok" | "skipped" | undefined;
2803
- cron?: string | undefined;
2804
- prompt?: string | undefined;
2805
- ownerId?: string | undefined;
2806
- catchUp?: "skip" | "once" | undefined;
2807
- lastRunAt?: string | undefined;
2808
- nextRunAt?: string | undefined;
2809
- lastError?: string | undefined;
2810
- }>, {
2811
- name: string;
2812
- id: string;
2813
- enabled: boolean;
2814
- createdAt: string;
2815
- target: {
2816
- mode: "bound";
2817
- sessionId: string;
2818
- } | {
2819
- mode: "ephemeral";
2820
- agentTemplate?: string | undefined;
2821
- project?: string | undefined;
2822
- ttl?: string | undefined;
2823
- } | {
2824
- mode: "queue";
2825
- sessionId: string;
2826
- };
2827
- updatedAt: string;
2828
- every?: string | undefined;
2829
- payload?: Record<string, unknown> | undefined;
2830
- lastStatus?: "error" | "ok" | "skipped" | undefined;
2831
- cron?: string | undefined;
2832
- prompt?: string | undefined;
2833
- ownerId?: string | undefined;
2834
- catchUp?: "skip" | "once" | undefined;
2835
- lastRunAt?: string | undefined;
2836
- nextRunAt?: string | undefined;
2837
- lastError?: string | undefined;
2838
- }, {
2839
- name: string;
2840
- id: string;
2841
- enabled: boolean;
2842
- createdAt: string;
2843
- target: {
2844
- mode: "bound";
2845
- sessionId: string;
2846
- } | {
2847
- mode: "ephemeral";
2848
- agentTemplate?: string | undefined;
2849
- project?: string | undefined;
2850
- ttl?: string | undefined;
2851
- } | {
2852
- mode: "queue";
2853
- sessionId: string;
2854
- };
2855
- updatedAt: string;
2856
- every?: string | undefined;
2857
- payload?: Record<string, unknown> | undefined;
2858
- lastStatus?: "error" | "ok" | "skipped" | undefined;
2859
- cron?: string | undefined;
2860
- prompt?: string | undefined;
2861
- ownerId?: string | undefined;
2862
- catchUp?: "skip" | "once" | undefined;
2863
- lastRunAt?: string | undefined;
2864
- nextRunAt?: string | undefined;
2865
- lastError?: string | undefined;
2866
- }>;
1576
+ }, z.core.$strip>;
2867
1577
  export type ScheduleInputRequest = z.infer<typeof scheduleInputSchema>;
2868
1578
  export type ScheduleRequest = z.infer<typeof scheduleSchema>;
2869
1579
  /** ADR-051: триггер срабатывания расписания в Job-истории. */
2870
- export declare const scheduleJobTriggerSchema: z.ZodEnum<["cron", "manual", "catchup"]>;
1580
+ export declare const scheduleJobTriggerSchema: z.ZodEnum<{
1581
+ cron: "cron";
1582
+ manual: "manual";
1583
+ catchup: "catchup";
1584
+ }>;
2871
1585
  /** ADR-051: запись Job-истории (ответы `GET /api/v2/schedules/:id/jobs`). */
2872
1586
  export declare const scheduleJobSchema: z.ZodObject<{
2873
1587
  id: z.ZodString;
2874
1588
  scheduleId: z.ZodString;
2875
1589
  scheduleName: z.ZodString;
2876
- trigger: z.ZodEnum<["cron", "manual", "catchup"]>;
2877
- status: z.ZodEnum<["ok", "error", "skipped"]>;
1590
+ trigger: z.ZodEnum<{
1591
+ cron: "cron";
1592
+ manual: "manual";
1593
+ catchup: "catchup";
1594
+ }>;
1595
+ status: z.ZodEnum<{
1596
+ error: "error";
1597
+ ok: "ok";
1598
+ skipped: "skipped";
1599
+ }>;
2878
1600
  startedAt: z.ZodString;
2879
1601
  finishedAt: z.ZodString;
2880
1602
  durationMs: z.ZodNumber;
2881
- target: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
1603
+ target: z.ZodDiscriminatedUnion<[z.ZodObject<{
2882
1604
  mode: z.ZodLiteral<"bound">;
2883
1605
  sessionId: z.ZodString;
2884
- }, "strip", z.ZodTypeAny, {
2885
- mode: "bound";
2886
- sessionId: string;
2887
- }, {
2888
- mode: "bound";
2889
- sessionId: string;
2890
- }>, z.ZodObject<{
1606
+ }, z.core.$strip>, z.ZodObject<{
2891
1607
  mode: z.ZodLiteral<"ephemeral">;
2892
1608
  agentTemplate: z.ZodOptional<z.ZodString>;
2893
1609
  project: z.ZodOptional<z.ZodString>;
2894
1610
  ttl: z.ZodOptional<z.ZodString>;
2895
- }, "strip", z.ZodTypeAny, {
2896
- mode: "ephemeral";
2897
- agentTemplate?: string | undefined;
2898
- project?: string | undefined;
2899
- ttl?: string | undefined;
2900
- }, {
2901
- mode: "ephemeral";
2902
- agentTemplate?: string | undefined;
2903
- project?: string | undefined;
2904
- ttl?: string | undefined;
2905
- }>, z.ZodObject<{
1611
+ }, z.core.$strip>, z.ZodObject<{
2906
1612
  mode: z.ZodLiteral<"queue">;
2907
1613
  sessionId: z.ZodString;
2908
- }, "strip", z.ZodTypeAny, {
2909
- mode: "queue";
2910
- sessionId: string;
2911
- }, {
2912
- mode: "queue";
2913
- sessionId: string;
2914
- }>]>;
1614
+ }, z.core.$strip>, z.ZodObject<{
1615
+ mode: z.ZodLiteral<"pipeline">;
1616
+ projectId: z.ZodString;
1617
+ pipelineId: z.ZodString;
1618
+ version: z.ZodOptional<z.ZodNumber>;
1619
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1620
+ }, z.core.$strip>], "mode">;
2915
1621
  dedupKey: z.ZodOptional<z.ZodString>;
2916
- decision: z.ZodOptional<z.ZodEnum<["bound", "queue", "ephemeral", "bind", "drop"]>>;
1622
+ decision: z.ZodOptional<z.ZodEnum<{
1623
+ pipeline: "pipeline";
1624
+ queue: "queue";
1625
+ bound: "bound";
1626
+ ephemeral: "ephemeral";
1627
+ bind: "bind";
1628
+ drop: "drop";
1629
+ }>>;
2917
1630
  reason: z.ZodOptional<z.ZodString>;
2918
1631
  sessionId: z.ZodOptional<z.ZodString>;
1632
+ pipelineId: z.ZodOptional<z.ZodString>;
1633
+ runId: z.ZodOptional<z.ZodString>;
2919
1634
  error: z.ZodOptional<z.ZodString>;
2920
- }, "strip", z.ZodTypeAny, {
2921
- status: "error" | "ok" | "skipped";
2922
- id: string;
2923
- target: {
2924
- mode: "bound";
2925
- sessionId: string;
2926
- } | {
2927
- mode: "ephemeral";
2928
- agentTemplate?: string | undefined;
2929
- project?: string | undefined;
2930
- ttl?: string | undefined;
2931
- } | {
2932
- mode: "queue";
2933
- sessionId: string;
2934
- };
2935
- scheduleId: string;
2936
- scheduleName: string;
2937
- trigger: "cron" | "manual" | "catchup";
2938
- startedAt: string;
2939
- finishedAt: string;
2940
- durationMs: number;
2941
- error?: string | undefined;
2942
- dedupKey?: string | undefined;
2943
- sessionId?: string | undefined;
2944
- decision?: "bound" | "ephemeral" | "queue" | "bind" | "drop" | undefined;
2945
- reason?: string | undefined;
2946
- }, {
2947
- status: "error" | "ok" | "skipped";
2948
- id: string;
2949
- target: {
2950
- mode: "bound";
2951
- sessionId: string;
2952
- } | {
2953
- mode: "ephemeral";
2954
- agentTemplate?: string | undefined;
2955
- project?: string | undefined;
2956
- ttl?: string | undefined;
2957
- } | {
2958
- mode: "queue";
2959
- sessionId: string;
2960
- };
2961
- scheduleId: string;
2962
- scheduleName: string;
2963
- trigger: "cron" | "manual" | "catchup";
2964
- startedAt: string;
2965
- finishedAt: string;
2966
- durationMs: number;
2967
- error?: string | undefined;
2968
- dedupKey?: string | undefined;
2969
- sessionId?: string | undefined;
2970
- decision?: "bound" | "ephemeral" | "queue" | "bind" | "drop" | undefined;
2971
- reason?: string | undefined;
2972
- }>;
1635
+ }, z.core.$strip>;
2973
1636
  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`. */
1637
+ /** ADR-102: семейство роллапов аналитики (`usage`/`activity`/`decision`/`prompt`). */
1638
+ export declare const analyticsFamilySchema: z.ZodEnum<{
1639
+ prompt: "prompt";
1640
+ decision: "decision";
1641
+ usage: "usage";
1642
+ activity: "activity";
1643
+ }>;
1644
+ /** ADR-102: ось измерения роллапа (`day`/`user`/`project`/`model`/`agent`/`provider`). */
1645
+ export declare const analyticsDimensionSchema: z.ZodEnum<{
1646
+ user: "user";
1647
+ agent: "agent";
1648
+ project: "project";
1649
+ provider: "provider";
1650
+ model: "model";
1651
+ day: "day";
1652
+ }>;
1653
+ /** ADR-102: сутки UTC в формате `YYYY-MM-DD`. */
2979
1654
  export declare const analyticsDaySchema: z.ZodString;
2980
- /** PROP-102: пред-агрегированный бакет роллапа (запись через порт хранения). */
1655
+ /** ADR-102: пред-агрегированный бакет роллапа (запись через порт хранения). */
2981
1656
  export declare const analyticsRollupBucketSchema: z.ZodObject<{
2982
- family: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
1657
+ family: z.ZodEnum<{
1658
+ prompt: "prompt";
1659
+ decision: "decision";
1660
+ usage: "usage";
1661
+ activity: "activity";
1662
+ }>;
2983
1663
  day: z.ZodString;
2984
- dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1664
+ dimensions: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
2985
1665
  measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
2986
1666
  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: запрос среза/серии роллапов (только чтение). */
1667
+ }, z.core.$strip>;
1668
+ /** ADR-102: запрос среза/серии роллапов (только чтение). */
3001
1669
  export declare const analyticsRollupQuerySchema: z.ZodObject<{
3002
- family: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
1670
+ family: z.ZodEnum<{
1671
+ prompt: "prompt";
1672
+ decision: "decision";
1673
+ usage: "usage";
1674
+ activity: "activity";
1675
+ }>;
3003
1676
  from: z.ZodOptional<z.ZodString>;
3004
1677
  to: z.ZodOptional<z.ZodString>;
3005
1678
  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
- }>;
1679
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodEnum<{
1680
+ user: "user";
1681
+ agent: "agent";
1682
+ project: "project";
1683
+ provider: "provider";
1684
+ model: "model";
1685
+ day: "day";
1686
+ }>>>;
1687
+ }, z.core.$strip>;
3020
1688
  export type AnalyticsRollupBucketInput = z.infer<typeof analyticsRollupBucketSchema>;
3021
1689
  export type AnalyticsRollupQueryInput = z.infer<typeof analyticsRollupQuerySchema>;
3022
1690
  /**
3023
- * PROP-102: строка отчёта — оси группировки + меры (сырые счётчики и
1691
+ * ADR-102: строка отчёта — оси группировки + меры (сырые счётчики и
3024
1692
  * дериваты `ANALYTICS_DERIVED_MEASURES`). `costByCurrency` опускается, если пусто.
3025
1693
  */
3026
1694
  export declare const analyticsReportRowSchema: z.ZodObject<{
3027
- dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1695
+ dimensions: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
3028
1696
  measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
3029
1697
  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). */
1698
+ }, z.core.$strip>;
1699
+ /** ADR-102: отчёт по семейству за период (только чтение, данные без i18n). */
3040
1700
  export declare const analyticsReportSchema: z.ZodObject<{
3041
- report: z.ZodEnum<["usage", "activity", "decision", "prompt"]>;
1701
+ report: z.ZodEnum<{
1702
+ prompt: "prompt";
1703
+ decision: "decision";
1704
+ usage: "usage";
1705
+ activity: "activity";
1706
+ }>;
3042
1707
  from: z.ZodString;
3043
1708
  to: z.ZodString;
3044
- groupBy: z.ZodArray<z.ZodEnum<["day", "user", "project", "model", "agent", "provider"]>, "many">;
1709
+ groupBy: z.ZodArray<z.ZodEnum<{
1710
+ user: "user";
1711
+ agent: "agent";
1712
+ project: "project";
1713
+ provider: "provider";
1714
+ model: "model";
1715
+ day: "day";
1716
+ }>>;
3045
1717
  rows: z.ZodArray<z.ZodObject<{
3046
- dimensions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
1718
+ dimensions: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
3047
1719
  measures: z.ZodRecord<z.ZodString, z.ZodNumber>;
3048
1720
  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`. */
1721
+ }, z.core.$strip>>;
1722
+ }, z.core.$strip>;
1723
+ /** ADR-102: формат выгрузки отчёта (`csv`/`json`; только данные). */
1724
+ export declare const analyticsExportFormatSchema: z.ZodEnum<{
1725
+ csv: "csv";
1726
+ json: "json";
1727
+ }>;
1728
+ /** ADR-102: сводка инстанса за период — агрегаты `usage`/`activity`/`decision`. */
3082
1729
  export declare const analyticsSummarySchema: z.ZodObject<{
3083
1730
  from: z.ZodString;
3084
1731
  to: z.ZodString;
@@ -3086,22 +1733,33 @@ export declare const analyticsSummarySchema: z.ZodObject<{
3086
1733
  activity: z.ZodRecord<z.ZodString, z.ZodNumber>;
3087
1734
  decision: z.ZodRecord<z.ZodString, z.ZodNumber>;
3088
1735
  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
- }>;
1736
+ }, z.core.$strip>;
3104
1737
  export type AnalyticsReportRowInput = z.infer<typeof analyticsReportRowSchema>;
3105
1738
  export type AnalyticsReportInput = z.infer<typeof analyticsReportSchema>;
3106
1739
  export type AnalyticsExportFormatInput = z.infer<typeof analyticsExportFormatSchema>;
3107
1740
  export type AnalyticsSummaryInput = z.infer<typeof analyticsSummarySchema>;
1741
+ /** Медиа-типы части сообщения (ADR-115) — вложение. */
1742
+ export declare const mediaPartTypeSchema: z.ZodEnum<{
1743
+ file: "file";
1744
+ image: "image";
1745
+ audio: "audio";
1746
+ video: "video";
1747
+ }>;
1748
+ /**
1749
+ * ADR-115 §«Модель контента»: данные медиа-части — ссылка на blob в
1750
+ * blob-хранилище + метаданные. Обязательны `blobPath`/`sha256`/`mime`/`size`;
1751
+ * остальное — необязательные метаданные (имя, размеры, длительность,
1752
+ * текстовая расшифровка).
1753
+ */
1754
+ export declare const mediaPartSchema: z.ZodObject<{
1755
+ blobPath: z.ZodString;
1756
+ sha256: z.ZodString;
1757
+ mime: z.ZodString;
1758
+ size: z.ZodNumber;
1759
+ name: z.ZodOptional<z.ZodString>;
1760
+ width: z.ZodOptional<z.ZodNumber>;
1761
+ height: z.ZodOptional<z.ZodNumber>;
1762
+ durationMs: z.ZodOptional<z.ZodNumber>;
1763
+ transcript: z.ZodOptional<z.ZodString>;
1764
+ }, z.core.$strip>;
1765
+ export type MediaPartInput = z.infer<typeof mediaPartSchema>;