@inf-monkeys-tech/monkeys 1.1.44 → 1.1.47

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 (50) hide show
  1. package/lib/contracts/agent-data.d.ts +7 -7
  2. package/lib/contracts/agent-native-runtime.d.ts +1 -1
  3. package/lib/contracts/agent.d.ts +75 -72
  4. package/lib/contracts/agent.d.ts.map +1 -1
  5. package/lib/contracts/agent.js +2 -0
  6. package/lib/contracts/agent.js.map +1 -1
  7. package/lib/contracts/declarative-control-http.d.ts +26 -26
  8. package/lib/contracts/declarative-control.d.ts +4 -4
  9. package/lib/contracts/declarative-control.js +2 -2
  10. package/lib/contracts/declarative-control.js.map +1 -1
  11. package/lib/contracts/declarative-publication-job.d.ts +11 -11
  12. package/lib/contracts/file.d.ts +21 -18
  13. package/lib/contracts/file.d.ts.map +1 -1
  14. package/lib/contracts/file.js +1 -0
  15. package/lib/contracts/file.js.map +1 -1
  16. package/lib/contracts/index.d.ts +1 -0
  17. package/lib/contracts/index.d.ts.map +1 -1
  18. package/lib/contracts/index.js +1 -0
  19. package/lib/contracts/index.js.map +1 -1
  20. package/lib/contracts/markdown-document.d.ts +311 -0
  21. package/lib/contracts/markdown-document.d.ts.map +1 -0
  22. package/lib/contracts/markdown-document.js +97 -0
  23. package/lib/contracts/markdown-document.js.map +1 -0
  24. package/lib/contracts/tenant.d.ts +4 -4
  25. package/lib/esm/{chunk-UY2ZSIR2.mjs → chunk-47IYYBR4.mjs} +3 -3
  26. package/lib/esm/{chunk-TKIVZQ6V.mjs → chunk-5IZFPLHB.mjs} +131 -16
  27. package/lib/esm/chunk-5IZFPLHB.mjs.map +1 -0
  28. package/lib/esm/{chunk-WYV3EFUS.mjs → chunk-B4OT6FRP.mjs} +2 -2
  29. package/lib/esm/{chunk-QPFYQ24T.mjs → chunk-DVKZ3G6M.mjs} +586 -584
  30. package/lib/esm/chunk-DVKZ3G6M.mjs.map +1 -0
  31. package/lib/esm/{chunk-AYNGVVND.mjs → chunk-KLSJHH23.mjs} +3 -3
  32. package/lib/esm/{chunk-DFALYXAY.mjs → chunk-Z6F4MXV2.mjs} +2 -2
  33. package/lib/esm/contracts/index.mjs +36 -4
  34. package/lib/esm/index.mjs +38 -6
  35. package/lib/esm/index.mjs.map +1 -1
  36. package/lib/esm/runtime/index.mjs +3 -3
  37. package/lib/esm/schemas/index.mjs +3 -3
  38. package/lib/json-schema/agent-session-event.schema.json +4 -0
  39. package/lib/json-schema/agent-session-run-event.schema.json +4 -0
  40. package/lib/json-schema/agent-session-view-model.schema.json +4 -0
  41. package/lib/runtime/runtime-definition-wire.d.ts +2 -2
  42. package/lib/schemas/index.d.ts +52 -49
  43. package/lib/schemas/index.d.ts.map +1 -1
  44. package/package.json +1 -1
  45. package/lib/esm/chunk-QPFYQ24T.mjs.map +0 -1
  46. package/lib/esm/chunk-TKIVZQ6V.mjs.map +0 -1
  47. /package/lib/esm/{chunk-UY2ZSIR2.mjs.map → chunk-47IYYBR4.mjs.map} +0 -0
  48. /package/lib/esm/{chunk-WYV3EFUS.mjs.map → chunk-B4OT6FRP.mjs.map} +0 -0
  49. /package/lib/esm/{chunk-AYNGVVND.mjs.map → chunk-KLSJHH23.mjs.map} +0 -0
  50. /package/lib/esm/{chunk-DFALYXAY.mjs.map → chunk-Z6F4MXV2.mjs.map} +0 -0
@@ -0,0 +1,311 @@
1
+ import { z } from 'zod';
2
+ export declare const MARKDOWN_DOCUMENT_MAX_BYTES: number;
3
+ export declare const MarkdownDocumentSourceSchema: z.ZodObject<{
4
+ agentId: z.ZodString;
5
+ threadId: z.ZodString;
6
+ artifactId: z.ZodString;
7
+ fileUri: z.ZodString;
8
+ }, z.core.$strict>;
9
+ export declare const MarkdownDocumentFileSchema: z.ZodObject<{
10
+ uri: z.ZodString;
11
+ sha256: z.ZodString;
12
+ byteSize: z.ZodNumber;
13
+ }, z.core.$strict>;
14
+ /** Persisted content is an immutable managed file; editor values never enter this record. */
15
+ export declare const MarkdownDocumentRecordSchema: z.ZodObject<{
16
+ contract: z.ZodLiteral<"MarkdownDocument">;
17
+ schemaVersion: z.ZodLiteral<1>;
18
+ documentId: z.ZodString;
19
+ source: z.ZodObject<{
20
+ agentId: z.ZodString;
21
+ threadId: z.ZodString;
22
+ artifactId: z.ZodString;
23
+ fileUri: z.ZodString;
24
+ }, z.core.$strict>;
25
+ file: z.ZodObject<{
26
+ uri: z.ZodString;
27
+ sha256: z.ZodString;
28
+ byteSize: z.ZodNumber;
29
+ }, z.core.$strict>;
30
+ resources: z.ZodArray<z.ZodString>;
31
+ }, z.core.$strict>;
32
+ export declare const MarkdownDocumentSaveSchema: z.ZodObject<{
33
+ source: z.ZodObject<{
34
+ agentId: z.ZodString;
35
+ threadId: z.ZodString;
36
+ artifactId: z.ZodString;
37
+ fileUri: z.ZodString;
38
+ }, z.core.$strict>;
39
+ contentFileUri: z.ZodString;
40
+ expectedHeadCommitId: z.ZodString;
41
+ requestId: z.ZodString;
42
+ }, z.core.$strict>;
43
+ export declare const MarkdownDocumentRestoreSchema: z.ZodObject<{
44
+ source: z.ZodObject<{
45
+ agentId: z.ZodString;
46
+ threadId: z.ZodString;
47
+ artifactId: z.ZodString;
48
+ fileUri: z.ZodString;
49
+ }, z.core.$strict>;
50
+ targetCommitId: z.ZodString;
51
+ expectedHeadCommitId: z.ZodString;
52
+ requestId: z.ZodString;
53
+ }, z.core.$strict>;
54
+ export declare const MarkdownDocumentPolicySchema: z.ZodObject<{
55
+ autoSave: z.ZodBoolean;
56
+ idleMs: z.ZodNumber;
57
+ maxWaitMs: z.ZodNumber;
58
+ }, z.core.$strict>;
59
+ export declare const MarkdownDocumentViewSchema: z.ZodObject<{
60
+ documentId: z.ZodString;
61
+ name: z.ZodString;
62
+ source: z.ZodObject<{
63
+ agentId: z.ZodString;
64
+ threadId: z.ZodString;
65
+ artifactId: z.ZodString;
66
+ fileUri: z.ZodString;
67
+ }, z.core.$strict>;
68
+ record: z.ZodNullable<z.ZodObject<{
69
+ contract: z.ZodLiteral<"MarkdownDocument">;
70
+ schemaVersion: z.ZodLiteral<1>;
71
+ documentId: z.ZodString;
72
+ source: z.ZodObject<{
73
+ agentId: z.ZodString;
74
+ threadId: z.ZodString;
75
+ artifactId: z.ZodString;
76
+ fileUri: z.ZodString;
77
+ }, z.core.$strict>;
78
+ file: z.ZodObject<{
79
+ uri: z.ZodString;
80
+ sha256: z.ZodString;
81
+ byteSize: z.ZodNumber;
82
+ }, z.core.$strict>;
83
+ resources: z.ZodArray<z.ZodString>;
84
+ }, z.core.$strict>>;
85
+ headCommitId: z.ZodString;
86
+ savedAt: z.ZodNullable<z.ZodString>;
87
+ canEdit: z.ZodBoolean;
88
+ maxBytes: z.ZodNumber;
89
+ }, z.core.$strict>;
90
+ export declare const MarkdownDocumentVersionSchema: z.ZodObject<{
91
+ commitId: z.ZodString;
92
+ createdAt: z.ZodString;
93
+ actorId: z.ZodString;
94
+ operation: z.ZodEnum<{
95
+ save: "save";
96
+ restore: "restore";
97
+ }>;
98
+ record: z.ZodObject<{
99
+ contract: z.ZodLiteral<"MarkdownDocument">;
100
+ schemaVersion: z.ZodLiteral<1>;
101
+ documentId: z.ZodString;
102
+ source: z.ZodObject<{
103
+ agentId: z.ZodString;
104
+ threadId: z.ZodString;
105
+ artifactId: z.ZodString;
106
+ fileUri: z.ZodString;
107
+ }, z.core.$strict>;
108
+ file: z.ZodObject<{
109
+ uri: z.ZodString;
110
+ sha256: z.ZodString;
111
+ byteSize: z.ZodNumber;
112
+ }, z.core.$strict>;
113
+ resources: z.ZodArray<z.ZodString>;
114
+ }, z.core.$strict>;
115
+ }, z.core.$strict>;
116
+ export declare const MarkdownDocumentHistoryQuerySchema: z.ZodObject<{
117
+ source: z.ZodObject<{
118
+ agentId: z.ZodString;
119
+ threadId: z.ZodString;
120
+ artifactId: z.ZodString;
121
+ fileUri: z.ZodString;
122
+ }, z.core.$strict>;
123
+ pageSize: z.ZodNumber;
124
+ pageToken: z.ZodOptional<z.ZodString>;
125
+ }, z.core.$strict>;
126
+ export declare const MarkdownDocumentHistorySchema: z.ZodObject<{
127
+ items: z.ZodArray<z.ZodObject<{
128
+ commitId: z.ZodString;
129
+ createdAt: z.ZodString;
130
+ actorId: z.ZodString;
131
+ operation: z.ZodEnum<{
132
+ save: "save";
133
+ restore: "restore";
134
+ }>;
135
+ record: z.ZodObject<{
136
+ contract: z.ZodLiteral<"MarkdownDocument">;
137
+ schemaVersion: z.ZodLiteral<1>;
138
+ documentId: z.ZodString;
139
+ source: z.ZodObject<{
140
+ agentId: z.ZodString;
141
+ threadId: z.ZodString;
142
+ artifactId: z.ZodString;
143
+ fileUri: z.ZodString;
144
+ }, z.core.$strict>;
145
+ file: z.ZodObject<{
146
+ uri: z.ZodString;
147
+ sha256: z.ZodString;
148
+ byteSize: z.ZodNumber;
149
+ }, z.core.$strict>;
150
+ resources: z.ZodArray<z.ZodString>;
151
+ }, z.core.$strict>;
152
+ }, z.core.$strict>>;
153
+ nextPageToken: z.ZodNullable<z.ZodString>;
154
+ }, z.core.$strict>;
155
+ export declare const MarkdownDocumentReceiptSchema: z.ZodObject<{
156
+ commitId: z.ZodString;
157
+ file: z.ZodObject<{
158
+ uri: z.ZodString;
159
+ sha256: z.ZodString;
160
+ byteSize: z.ZodNumber;
161
+ }, z.core.$strict>;
162
+ savedAt: z.ZodString;
163
+ }, z.core.$strict>;
164
+ export declare const MarkdownDocumentWorkspaceQuerySchema: z.ZodObject<{
165
+ source: z.ZodObject<{
166
+ agentId: z.ZodString;
167
+ threadId: z.ZodString;
168
+ artifactId: z.ZodString;
169
+ fileUri: z.ZodString;
170
+ }, z.core.$strict>;
171
+ receiptRequestId: z.ZodDefault<z.ZodString>;
172
+ }, z.core.$strict>;
173
+ export declare const MarkdownDocumentWorkspaceSchema: z.ZodObject<{
174
+ document: z.ZodObject<{
175
+ documentId: z.ZodString;
176
+ name: z.ZodString;
177
+ source: z.ZodObject<{
178
+ agentId: z.ZodString;
179
+ threadId: z.ZodString;
180
+ artifactId: z.ZodString;
181
+ fileUri: z.ZodString;
182
+ }, z.core.$strict>;
183
+ record: z.ZodNullable<z.ZodObject<{
184
+ contract: z.ZodLiteral<"MarkdownDocument">;
185
+ schemaVersion: z.ZodLiteral<1>;
186
+ documentId: z.ZodString;
187
+ source: z.ZodObject<{
188
+ agentId: z.ZodString;
189
+ threadId: z.ZodString;
190
+ artifactId: z.ZodString;
191
+ fileUri: z.ZodString;
192
+ }, z.core.$strict>;
193
+ file: z.ZodObject<{
194
+ uri: z.ZodString;
195
+ sha256: z.ZodString;
196
+ byteSize: z.ZodNumber;
197
+ }, z.core.$strict>;
198
+ resources: z.ZodArray<z.ZodString>;
199
+ }, z.core.$strict>>;
200
+ headCommitId: z.ZodString;
201
+ savedAt: z.ZodNullable<z.ZodString>;
202
+ canEdit: z.ZodBoolean;
203
+ maxBytes: z.ZodNumber;
204
+ }, z.core.$strict>;
205
+ history: z.ZodObject<{
206
+ items: z.ZodArray<z.ZodObject<{
207
+ commitId: z.ZodString;
208
+ createdAt: z.ZodString;
209
+ actorId: z.ZodString;
210
+ operation: z.ZodEnum<{
211
+ save: "save";
212
+ restore: "restore";
213
+ }>;
214
+ record: z.ZodObject<{
215
+ contract: z.ZodLiteral<"MarkdownDocument">;
216
+ schemaVersion: z.ZodLiteral<1>;
217
+ documentId: z.ZodString;
218
+ source: z.ZodObject<{
219
+ agentId: z.ZodString;
220
+ threadId: z.ZodString;
221
+ artifactId: z.ZodString;
222
+ fileUri: z.ZodString;
223
+ }, z.core.$strict>;
224
+ file: z.ZodObject<{
225
+ uri: z.ZodString;
226
+ sha256: z.ZodString;
227
+ byteSize: z.ZodNumber;
228
+ }, z.core.$strict>;
229
+ resources: z.ZodArray<z.ZodString>;
230
+ }, z.core.$strict>;
231
+ }, z.core.$strict>>;
232
+ nextPageToken: z.ZodNullable<z.ZodString>;
233
+ }, z.core.$strict>;
234
+ receipt: z.ZodNullable<z.ZodObject<{
235
+ commitId: z.ZodString;
236
+ file: z.ZodObject<{
237
+ uri: z.ZodString;
238
+ sha256: z.ZodString;
239
+ byteSize: z.ZodNumber;
240
+ }, z.core.$strict>;
241
+ savedAt: z.ZodString;
242
+ }, z.core.$strict>>;
243
+ }, z.core.$strict>;
244
+ export declare const MarkdownDocumentSaveResultSchema: z.ZodObject<{
245
+ view: z.ZodObject<{
246
+ documentId: z.ZodString;
247
+ name: z.ZodString;
248
+ source: z.ZodObject<{
249
+ agentId: z.ZodString;
250
+ threadId: z.ZodString;
251
+ artifactId: z.ZodString;
252
+ fileUri: z.ZodString;
253
+ }, z.core.$strict>;
254
+ record: z.ZodNullable<z.ZodObject<{
255
+ contract: z.ZodLiteral<"MarkdownDocument">;
256
+ schemaVersion: z.ZodLiteral<1>;
257
+ documentId: z.ZodString;
258
+ source: z.ZodObject<{
259
+ agentId: z.ZodString;
260
+ threadId: z.ZodString;
261
+ artifactId: z.ZodString;
262
+ fileUri: z.ZodString;
263
+ }, z.core.$strict>;
264
+ file: z.ZodObject<{
265
+ uri: z.ZodString;
266
+ sha256: z.ZodString;
267
+ byteSize: z.ZodNumber;
268
+ }, z.core.$strict>;
269
+ resources: z.ZodArray<z.ZodString>;
270
+ }, z.core.$strict>>;
271
+ headCommitId: z.ZodString;
272
+ savedAt: z.ZodNullable<z.ZodString>;
273
+ canEdit: z.ZodBoolean;
274
+ maxBytes: z.ZodNumber;
275
+ }, z.core.$strict>;
276
+ receipt: z.ZodObject<{
277
+ commitId: z.ZodString;
278
+ file: z.ZodObject<{
279
+ uri: z.ZodString;
280
+ sha256: z.ZodString;
281
+ byteSize: z.ZodNumber;
282
+ }, z.core.$strict>;
283
+ savedAt: z.ZodString;
284
+ }, z.core.$strict>;
285
+ }, z.core.$strict>;
286
+ export declare const MarkdownDocumentErrorCodeSchema: z.ZodEnum<{
287
+ MARKDOWN_DOCUMENT_FORBIDDEN: "MARKDOWN_DOCUMENT_FORBIDDEN";
288
+ MARKDOWN_DOCUMENT_SOURCE_UNAVAILABLE: "MARKDOWN_DOCUMENT_SOURCE_UNAVAILABLE";
289
+ MARKDOWN_DOCUMENT_INVALID: "MARKDOWN_DOCUMENT_INVALID";
290
+ MARKDOWN_DOCUMENT_TOO_LARGE: "MARKDOWN_DOCUMENT_TOO_LARGE";
291
+ MARKDOWN_DOCUMENT_RESOURCE_UNAVAILABLE: "MARKDOWN_DOCUMENT_RESOURCE_UNAVAILABLE";
292
+ MARKDOWN_DOCUMENT_CONFLICT: "MARKDOWN_DOCUMENT_CONFLICT";
293
+ MARKDOWN_DOCUMENT_REQUEST_REUSED: "MARKDOWN_DOCUMENT_REQUEST_REUSED";
294
+ MARKDOWN_DOCUMENT_SAVE_UNCONFIRMED: "MARKDOWN_DOCUMENT_SAVE_UNCONFIRMED";
295
+ MARKDOWN_DOCUMENT_UNAVAILABLE: "MARKDOWN_DOCUMENT_UNAVAILABLE";
296
+ }>;
297
+ export type MarkdownDocumentSource = z.infer<typeof MarkdownDocumentSourceSchema>;
298
+ export type MarkdownDocumentFile = z.infer<typeof MarkdownDocumentFileSchema>;
299
+ export type MarkdownDocumentRecord = z.infer<typeof MarkdownDocumentRecordSchema>;
300
+ export type MarkdownDocumentSave = z.infer<typeof MarkdownDocumentSaveSchema>;
301
+ export type MarkdownDocumentRestore = z.infer<typeof MarkdownDocumentRestoreSchema>;
302
+ export type MarkdownDocumentPolicy = z.infer<typeof MarkdownDocumentPolicySchema>;
303
+ export type MarkdownDocumentView = z.infer<typeof MarkdownDocumentViewSchema>;
304
+ export type MarkdownDocumentVersion = z.infer<typeof MarkdownDocumentVersionSchema>;
305
+ export type MarkdownDocumentHistoryQuery = z.infer<typeof MarkdownDocumentHistoryQuerySchema>;
306
+ export type MarkdownDocumentHistory = z.infer<typeof MarkdownDocumentHistorySchema>;
307
+ export type MarkdownDocumentWorkspaceQuery = z.infer<typeof MarkdownDocumentWorkspaceQuerySchema>;
308
+ export type MarkdownDocumentWorkspace = z.infer<typeof MarkdownDocumentWorkspaceSchema>;
309
+ export type MarkdownDocumentSaveResult = z.infer<typeof MarkdownDocumentSaveResultSchema>;
310
+ export type MarkdownDocumentErrorCode = z.infer<typeof MarkdownDocumentErrorCodeSchema>;
311
+ //# sourceMappingURL=markdown-document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-document.d.ts","sourceRoot":"","sources":["../../src/contracts/markdown-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,2BAA2B,QAAkB,CAAC;AAC3D,eAAO,MAAM,4BAA4B;;;;;kBAK9B,CAAC;AAEZ,eAAO,MAAM,0BAA0B;;;;kBAI5B,CAAC;AAEZ,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;kBAUvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;kBAK5B,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;;;;;;;;kBAK/B,CAAC;AAEZ,eAAO,MAAM,4BAA4B;;;;kBAOvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAS5B,CAAC;AAEZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;kBAM/B,CAAC;AAEZ,eAAO,MAAM,kCAAkC;;;;;;;;;kBAIpC,CAAC;AACZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAG/B,CAAC;AACZ,eAAO,MAAM,6BAA6B;;;;;;;;kBAI/B,CAAC;AACZ,eAAO,MAAM,oCAAoC;;;;;;;;kBAAiH,CAAC;AACnK,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAIjC,CAAC;AAEZ,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAGlC,CAAC;AAEZ,eA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
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MarkdownDocumentErrorCodeSchema = exports.MarkdownDocumentSaveResultSchema = exports.MarkdownDocumentWorkspaceSchema = exports.MarkdownDocumentWorkspaceQuerySchema = exports.MarkdownDocumentReceiptSchema = exports.MarkdownDocumentHistorySchema = exports.MarkdownDocumentHistoryQuerySchema = exports.MarkdownDocumentVersionSchema = exports.MarkdownDocumentViewSchema = exports.MarkdownDocumentPolicySchema = exports.MarkdownDocumentRestoreSchema = exports.MarkdownDocumentSaveSchema = exports.MarkdownDocumentRecordSchema = exports.MarkdownDocumentFileSchema = exports.MarkdownDocumentSourceSchema = exports.MARKDOWN_DOCUMENT_MAX_BYTES = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("./common");
6
+ const file_1 = require("./file");
7
+ exports.MARKDOWN_DOCUMENT_MAX_BYTES = 2 * 1024 * 1024;
8
+ exports.MarkdownDocumentSourceSchema = zod_1.z.object({
9
+ agentId: common_1.ContractIdentifierSchema,
10
+ threadId: common_1.ContractIdentifierSchema,
11
+ artifactId: zod_1.z.string().min(1).max(512),
12
+ fileUri: file_1.ManagedFileUriSchema,
13
+ }).strict();
14
+ exports.MarkdownDocumentFileSchema = zod_1.z.object({
15
+ uri: file_1.ManagedFileUriSchema,
16
+ sha256: common_1.Sha256Schema,
17
+ byteSize: zod_1.z.number().int().nonnegative().max(exports.MARKDOWN_DOCUMENT_MAX_BYTES),
18
+ }).strict();
19
+ /** Persisted content is an immutable managed file; editor values never enter this record. */
20
+ exports.MarkdownDocumentRecordSchema = zod_1.z.object({
21
+ contract: zod_1.z.literal('MarkdownDocument'),
22
+ schemaVersion: zod_1.z.literal(1),
23
+ documentId: common_1.ContractIdentifierSchema,
24
+ source: exports.MarkdownDocumentSourceSchema,
25
+ file: exports.MarkdownDocumentFileSchema,
26
+ resources: zod_1.z.array(file_1.ManagedFileUriSchema).max(1000),
27
+ }).strict().superRefine((value, context) => {
28
+ if (new Set(value.resources).size !== value.resources.length)
29
+ context.addIssue({ code: 'custom', path: ['resources'], message: 'Document resource references must be unique.' });
30
+ });
31
+ exports.MarkdownDocumentSaveSchema = zod_1.z.object({
32
+ source: exports.MarkdownDocumentSourceSchema,
33
+ contentFileUri: file_1.ManagedFileUriSchema,
34
+ expectedHeadCommitId: zod_1.z.string().max(128),
35
+ requestId: common_1.ContractIdentifierSchema,
36
+ }).strict();
37
+ exports.MarkdownDocumentRestoreSchema = zod_1.z.object({
38
+ source: exports.MarkdownDocumentSourceSchema,
39
+ targetCommitId: common_1.ContractIdentifierSchema,
40
+ expectedHeadCommitId: common_1.ContractIdentifierSchema,
41
+ requestId: common_1.ContractIdentifierSchema,
42
+ }).strict();
43
+ exports.MarkdownDocumentPolicySchema = zod_1.z.object({
44
+ autoSave: zod_1.z.boolean(),
45
+ idleMs: zod_1.z.number().int().min(1000).max(30000),
46
+ maxWaitMs: zod_1.z.number().int().min(1000).max(120000),
47
+ }).strict().superRefine((value, context) => {
48
+ if (value.maxWaitMs < value.idleMs)
49
+ context.addIssue({ code: 'custom', path: ['maxWaitMs'], message: 'Maximum save wait must include the idle interval.' });
50
+ });
51
+ exports.MarkdownDocumentViewSchema = zod_1.z.object({
52
+ documentId: common_1.ContractIdentifierSchema,
53
+ name: zod_1.z.string().min(1).max(500),
54
+ source: exports.MarkdownDocumentSourceSchema,
55
+ record: exports.MarkdownDocumentRecordSchema.nullable(),
56
+ headCommitId: zod_1.z.string().max(128),
57
+ savedAt: common_1.IsoDateTimeSchema.nullable(),
58
+ canEdit: zod_1.z.boolean(),
59
+ maxBytes: zod_1.z.number().int().positive().max(exports.MARKDOWN_DOCUMENT_MAX_BYTES),
60
+ }).strict();
61
+ exports.MarkdownDocumentVersionSchema = zod_1.z.object({
62
+ commitId: common_1.ContractIdentifierSchema,
63
+ createdAt: common_1.IsoDateTimeSchema,
64
+ actorId: zod_1.z.string().max(256),
65
+ operation: zod_1.z.enum(['save', 'restore']),
66
+ record: exports.MarkdownDocumentRecordSchema,
67
+ }).strict();
68
+ exports.MarkdownDocumentHistoryQuerySchema = zod_1.z.object({
69
+ source: exports.MarkdownDocumentSourceSchema,
70
+ pageSize: zod_1.z.number().int().min(1).max(50),
71
+ pageToken: zod_1.z.string().max(4096).optional(),
72
+ }).strict();
73
+ exports.MarkdownDocumentHistorySchema = zod_1.z.object({
74
+ items: zod_1.z.array(exports.MarkdownDocumentVersionSchema).max(50),
75
+ nextPageToken: zod_1.z.string().max(4096).nullable(),
76
+ }).strict();
77
+ exports.MarkdownDocumentReceiptSchema = zod_1.z.object({
78
+ commitId: common_1.ContractIdentifierSchema,
79
+ file: exports.MarkdownDocumentFileSchema,
80
+ savedAt: common_1.IsoDateTimeSchema,
81
+ }).strict();
82
+ exports.MarkdownDocumentWorkspaceQuerySchema = zod_1.z.object({ source: exports.MarkdownDocumentSourceSchema, receiptRequestId: zod_1.z.string().max(256).default('') }).strict();
83
+ exports.MarkdownDocumentWorkspaceSchema = zod_1.z.object({
84
+ document: exports.MarkdownDocumentViewSchema,
85
+ history: exports.MarkdownDocumentHistorySchema,
86
+ receipt: exports.MarkdownDocumentReceiptSchema.nullable(),
87
+ }).strict();
88
+ exports.MarkdownDocumentSaveResultSchema = zod_1.z.object({
89
+ view: exports.MarkdownDocumentViewSchema,
90
+ receipt: exports.MarkdownDocumentReceiptSchema,
91
+ }).strict();
92
+ exports.MarkdownDocumentErrorCodeSchema = zod_1.z.enum([
93
+ 'MARKDOWN_DOCUMENT_FORBIDDEN', 'MARKDOWN_DOCUMENT_SOURCE_UNAVAILABLE', 'MARKDOWN_DOCUMENT_INVALID',
94
+ 'MARKDOWN_DOCUMENT_TOO_LARGE', 'MARKDOWN_DOCUMENT_RESOURCE_UNAVAILABLE', 'MARKDOWN_DOCUMENT_CONFLICT',
95
+ 'MARKDOWN_DOCUMENT_REQUEST_REUSED', 'MARKDOWN_DOCUMENT_SAVE_UNCONFIRMED', 'MARKDOWN_DOCUMENT_UNAVAILABLE',
96
+ ]);
97
+ //# sourceMappingURL=markdown-document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-document.js","sourceRoot":"","sources":["../../src/contracts/markdown-document.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qCAAqF;AACrF,iCAA8C;AAEjC,QAAA,2BAA2B,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,iCAAwB;IACjC,QAAQ,EAAE,iCAAwB;IAClC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtC,OAAO,EAAE,2BAAoB;CAC9B,CAAC,CAAC,MAAM,EAAE,CAAC;AAEC,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,2BAAoB;IACzB,MAAM,EAAE,qBAAY;IACpB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,mCAA2B,CAAC;CAC1E,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,6FAA6F;AAChF,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,QAAQ,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IACvC,aAAa,EAAE,OAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,UAAU,EAAE,iCAAwB;IACpC,MAAM,EAAE,oCAA4B;IACpC,IAAI,EAAE,kCAA0B;IAChC,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAoB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;CACnD,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACzC,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,SA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@@ export declare const TenantAgentThemeConfigSchema: z.ZodObject<{
174
174
  description: z.ZodOptional<z.ZodString>;
175
175
  prompt: z.ZodString;
176
176
  action: z.ZodDefault<z.ZodEnum<{
177
- prompt: "prompt";
178
177
  upload: "upload";
178
+ prompt: "prompt";
179
179
  }>>;
180
180
  icon: z.ZodOptional<z.ZodEnum<{
181
181
  code: "code";
@@ -1507,8 +1507,8 @@ export declare const TenantApplicationConfigSchema: z.ZodObject<{
1507
1507
  description: z.ZodOptional<z.ZodString>;
1508
1508
  prompt: z.ZodString;
1509
1509
  action: z.ZodDefault<z.ZodEnum<{
1510
- prompt: "prompt";
1511
1510
  upload: "upload";
1511
+ prompt: "prompt";
1512
1512
  }>>;
1513
1513
  icon: z.ZodOptional<z.ZodEnum<{
1514
1514
  code: "code";
@@ -2586,8 +2586,8 @@ export declare const TenantProductConfigSchema: z.ZodObject<{
2586
2586
  description: z.ZodOptional<z.ZodString>;
2587
2587
  prompt: z.ZodString;
2588
2588
  action: z.ZodDefault<z.ZodEnum<{
2589
- prompt: "prompt";
2590
2589
  upload: "upload";
2590
+ prompt: "prompt";
2591
2591
  }>>;
2592
2592
  icon: z.ZodOptional<z.ZodEnum<{
2593
2593
  code: "code";
@@ -3677,8 +3677,8 @@ export declare const TenantRuntimeConfigSchema: z.ZodObject<{
3677
3677
  description: z.ZodOptional<z.ZodString>;
3678
3678
  prompt: z.ZodString;
3679
3679
  action: z.ZodDefault<z.ZodEnum<{
3680
- prompt: "prompt";
3681
3680
  upload: "upload";
3681
+ prompt: "prompt";
3682
3682
  }>>;
3683
3683
  icon: z.ZodOptional<z.ZodEnum<{
3684
3684
  code: "code";
@@ -4,7 +4,7 @@ import {
4
4
  PAGE_STREAM_MAX_FRAME_BYTES,
5
5
  PageStreamDescriptorSchema,
6
6
  PageStreamEventSchema
7
- } from "./chunk-DFALYXAY.mjs";
7
+ } from "./chunk-Z6F4MXV2.mjs";
8
8
  import {
9
9
  AccessPolicySchema,
10
10
  ActionProgramDefinitionSchema,
@@ -114,7 +114,7 @@ import {
114
114
  require_validation,
115
115
  require_validation_error,
116
116
  resolveThemeTokens
117
- } from "./chunk-QPFYQ24T.mjs";
117
+ } from "./chunk-DVKZ3G6M.mjs";
118
118
  import {
119
119
  __commonJS,
120
120
  __toESM
@@ -7510,4 +7510,4 @@ export {
7510
7510
  collectManagedFileReferences,
7511
7511
  resolveFileResourceReference
7512
7512
  };
7513
- //# sourceMappingURL=chunk-UY2ZSIR2.mjs.map
7513
+ //# sourceMappingURL=chunk-47IYYBR4.mjs.map
@@ -11,9 +11,10 @@ import {
11
11
  IsoDateTimeSchema,
12
12
  JsonObjectSchema,
13
13
  JsonValueSchema,
14
+ ManagedFileUriSchema,
14
15
  RevisionRefSchema,
15
16
  Sha256Schema
16
- } from "./chunk-QPFYQ24T.mjs";
17
+ } from "./chunk-DVKZ3G6M.mjs";
17
18
 
18
19
  // src/contracts/agent-data.ts
19
20
  import { z } from "zod";
@@ -344,36 +345,134 @@ var DeclarativePublicationJobSchema = z4.object({
344
345
  updatedAt: z4.string().datetime({ offset: true })
345
346
  }).strict();
346
347
 
347
- // src/contracts/action-program-http.ts
348
+ // src/contracts/markdown-document.ts
348
349
  import { z as z5 } from "zod";
349
- var PrepareActionProgramRequestSchema = z5.object({
350
+ var MARKDOWN_DOCUMENT_MAX_BYTES = 2 * 1024 * 1024;
351
+ var MarkdownDocumentSourceSchema = z5.object({
352
+ agentId: ContractIdentifierSchema,
353
+ threadId: ContractIdentifierSchema,
354
+ artifactId: z5.string().min(1).max(512),
355
+ fileUri: ManagedFileUriSchema
356
+ }).strict();
357
+ var MarkdownDocumentFileSchema = z5.object({
358
+ uri: ManagedFileUriSchema,
359
+ sha256: Sha256Schema,
360
+ byteSize: z5.number().int().nonnegative().max(MARKDOWN_DOCUMENT_MAX_BYTES)
361
+ }).strict();
362
+ var MarkdownDocumentRecordSchema = z5.object({
363
+ contract: z5.literal("MarkdownDocument"),
364
+ schemaVersion: z5.literal(1),
365
+ documentId: ContractIdentifierSchema,
366
+ source: MarkdownDocumentSourceSchema,
367
+ file: MarkdownDocumentFileSchema,
368
+ resources: z5.array(ManagedFileUriSchema).max(1e3)
369
+ }).strict().superRefine((value, context) => {
370
+ if (new Set(value.resources).size !== value.resources.length)
371
+ context.addIssue({ code: "custom", path: ["resources"], message: "Document resource references must be unique." });
372
+ });
373
+ var MarkdownDocumentSaveSchema = z5.object({
374
+ source: MarkdownDocumentSourceSchema,
375
+ contentFileUri: ManagedFileUriSchema,
376
+ expectedHeadCommitId: z5.string().max(128),
377
+ requestId: ContractIdentifierSchema
378
+ }).strict();
379
+ var MarkdownDocumentRestoreSchema = z5.object({
380
+ source: MarkdownDocumentSourceSchema,
381
+ targetCommitId: ContractIdentifierSchema,
382
+ expectedHeadCommitId: ContractIdentifierSchema,
383
+ requestId: ContractIdentifierSchema
384
+ }).strict();
385
+ var MarkdownDocumentPolicySchema = z5.object({
386
+ autoSave: z5.boolean(),
387
+ idleMs: z5.number().int().min(1e3).max(3e4),
388
+ maxWaitMs: z5.number().int().min(1e3).max(12e4)
389
+ }).strict().superRefine((value, context) => {
390
+ if (value.maxWaitMs < value.idleMs)
391
+ context.addIssue({ code: "custom", path: ["maxWaitMs"], message: "Maximum save wait must include the idle interval." });
392
+ });
393
+ var MarkdownDocumentViewSchema = z5.object({
394
+ documentId: ContractIdentifierSchema,
395
+ name: z5.string().min(1).max(500),
396
+ source: MarkdownDocumentSourceSchema,
397
+ record: MarkdownDocumentRecordSchema.nullable(),
398
+ headCommitId: z5.string().max(128),
399
+ savedAt: IsoDateTimeSchema.nullable(),
400
+ canEdit: z5.boolean(),
401
+ maxBytes: z5.number().int().positive().max(MARKDOWN_DOCUMENT_MAX_BYTES)
402
+ }).strict();
403
+ var MarkdownDocumentVersionSchema = z5.object({
404
+ commitId: ContractIdentifierSchema,
405
+ createdAt: IsoDateTimeSchema,
406
+ actorId: z5.string().max(256),
407
+ operation: z5.enum(["save", "restore"]),
408
+ record: MarkdownDocumentRecordSchema
409
+ }).strict();
410
+ var MarkdownDocumentHistoryQuerySchema = z5.object({
411
+ source: MarkdownDocumentSourceSchema,
412
+ pageSize: z5.number().int().min(1).max(50),
413
+ pageToken: z5.string().max(4096).optional()
414
+ }).strict();
415
+ var MarkdownDocumentHistorySchema = z5.object({
416
+ items: z5.array(MarkdownDocumentVersionSchema).max(50),
417
+ nextPageToken: z5.string().max(4096).nullable()
418
+ }).strict();
419
+ var MarkdownDocumentReceiptSchema = z5.object({
420
+ commitId: ContractIdentifierSchema,
421
+ file: MarkdownDocumentFileSchema,
422
+ savedAt: IsoDateTimeSchema
423
+ }).strict();
424
+ var MarkdownDocumentWorkspaceQuerySchema = z5.object({ source: MarkdownDocumentSourceSchema, receiptRequestId: z5.string().max(256).default("") }).strict();
425
+ var MarkdownDocumentWorkspaceSchema = z5.object({
426
+ document: MarkdownDocumentViewSchema,
427
+ history: MarkdownDocumentHistorySchema,
428
+ receipt: MarkdownDocumentReceiptSchema.nullable()
429
+ }).strict();
430
+ var MarkdownDocumentSaveResultSchema = z5.object({
431
+ view: MarkdownDocumentViewSchema,
432
+ receipt: MarkdownDocumentReceiptSchema
433
+ }).strict();
434
+ var MarkdownDocumentErrorCodeSchema = z5.enum([
435
+ "MARKDOWN_DOCUMENT_FORBIDDEN",
436
+ "MARKDOWN_DOCUMENT_SOURCE_UNAVAILABLE",
437
+ "MARKDOWN_DOCUMENT_INVALID",
438
+ "MARKDOWN_DOCUMENT_TOO_LARGE",
439
+ "MARKDOWN_DOCUMENT_RESOURCE_UNAVAILABLE",
440
+ "MARKDOWN_DOCUMENT_CONFLICT",
441
+ "MARKDOWN_DOCUMENT_REQUEST_REUSED",
442
+ "MARKDOWN_DOCUMENT_SAVE_UNCONFIRMED",
443
+ "MARKDOWN_DOCUMENT_UNAVAILABLE"
444
+ ]);
445
+
446
+ // src/contracts/action-program-http.ts
447
+ import { z as z6 } from "zod";
448
+ var PrepareActionProgramRequestSchema = z6.object({
350
449
  artifact: ActionProgramArtifactSchema,
351
- expectedVersion: z5.number().int().min(0)
450
+ expectedVersion: z6.number().int().min(0)
352
451
  }).strict();
353
452
  var RegisterActionProgramRequestSchema = PrepareActionProgramRequestSchema.extend({
354
453
  planHash: Sha256Schema,
355
454
  idempotencyKey: ContractIdentifierSchema
356
455
  }).strict();
357
- var ReadActionProgramRequestSchema = z5.object({ revisionRef: RevisionRefSchema }).strict();
358
- var RuntimeProgramLoadRequestSchema = z5.object({
456
+ var ReadActionProgramRequestSchema = z6.object({ revisionRef: RevisionRefSchema }).strict();
457
+ var RuntimeProgramLoadRequestSchema = z6.object({
359
458
  context: DeclarativeRuntimeActionExecuteIntentSchema
360
459
  }).strict();
361
460
  var RuntimeProgramCallRequestSchema = RuntimeProgramLoadRequestSchema.extend({
362
- kind: z5.enum(["query", "command"]),
461
+ kind: z6.enum(["query", "command"]),
363
462
  dependencyId: ContractIdentifierSchema,
364
463
  args: JsonObjectSchema,
365
- stepKey: z5.string().min(1).max(128),
366
- recoveryOnly: z5.literal(true).optional()
464
+ stepKey: z6.string().min(1).max(128),
465
+ recoveryOnly: z6.literal(true).optional()
367
466
  }).strict();
368
- var RuntimeProgramLoadResultSchema = z5.object({
467
+ var RuntimeProgramLoadResultSchema = z6.object({
369
468
  artifact: ActionProgramArtifactSchema,
370
469
  input: JsonObjectSchema,
371
- schemas: z5.array(z5.object({ revisionRef: RevisionRefSchema, document: JsonObjectSchema }).strict()).max(512)
470
+ schemas: z6.array(z6.object({ revisionRef: RevisionRefSchema, document: JsonObjectSchema }).strict()).max(512)
372
471
  }).strict();
373
- var RuntimeProgramCallResultSchema = z5.object({ value: JsonObjectSchema }).strict();
374
- var RuntimeProgramDownloadResultSchema = z5.discriminatedUnion("kind", [
375
- z5.object({ kind: z5.literal("native"), download: DeclarativeNativeDownloadSchema }).strict(),
376
- z5.object({ kind: z5.literal("text-artifact"), fileName: z5.string().min(1).max(255), mimeType: z5.enum(["application/json", "text/plain", "text/csv"]), content: z5.string().max(1048576) }).strict()
472
+ var RuntimeProgramCallResultSchema = z6.object({ value: JsonObjectSchema }).strict();
473
+ var RuntimeProgramDownloadResultSchema = z6.discriminatedUnion("kind", [
474
+ z6.object({ kind: z6.literal("native"), download: DeclarativeNativeDownloadSchema }).strict(),
475
+ z6.object({ kind: z6.literal("text-artifact"), fileName: z6.string().min(1).max(255), mimeType: z6.enum(["application/json", "text/plain", "text/csv"]), content: z6.string().max(1048576) }).strict()
377
476
  ]);
378
477
 
379
478
  export {
@@ -419,6 +518,22 @@ export {
419
518
  DeclarativePublicationJobScopeSchema,
420
519
  DeclarativePublicationJobReconciliationSchema,
421
520
  DeclarativePublicationJobSchema,
521
+ MARKDOWN_DOCUMENT_MAX_BYTES,
522
+ MarkdownDocumentSourceSchema,
523
+ MarkdownDocumentFileSchema,
524
+ MarkdownDocumentRecordSchema,
525
+ MarkdownDocumentSaveSchema,
526
+ MarkdownDocumentRestoreSchema,
527
+ MarkdownDocumentPolicySchema,
528
+ MarkdownDocumentViewSchema,
529
+ MarkdownDocumentVersionSchema,
530
+ MarkdownDocumentHistoryQuerySchema,
531
+ MarkdownDocumentHistorySchema,
532
+ MarkdownDocumentReceiptSchema,
533
+ MarkdownDocumentWorkspaceQuerySchema,
534
+ MarkdownDocumentWorkspaceSchema,
535
+ MarkdownDocumentSaveResultSchema,
536
+ MarkdownDocumentErrorCodeSchema,
422
537
  PrepareActionProgramRequestSchema,
423
538
  RegisterActionProgramRequestSchema,
424
539
  ReadActionProgramRequestSchema,
@@ -428,4 +543,4 @@ export {
428
543
  RuntimeProgramCallResultSchema,
429
544
  RuntimeProgramDownloadResultSchema
430
545
  };
431
- //# sourceMappingURL=chunk-TKIVZQ6V.mjs.map
546
+ //# sourceMappingURL=chunk-5IZFPLHB.mjs.map