@inf-monkeys-tech/monkeys 1.1.44 → 1.1.45

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 (48) 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-publication-job.d.ts +11 -11
  10. package/lib/contracts/file.d.ts +21 -18
  11. package/lib/contracts/file.d.ts.map +1 -1
  12. package/lib/contracts/file.js +1 -0
  13. package/lib/contracts/file.js.map +1 -1
  14. package/lib/contracts/index.d.ts +1 -0
  15. package/lib/contracts/index.d.ts.map +1 -1
  16. package/lib/contracts/index.js +1 -0
  17. package/lib/contracts/index.js.map +1 -1
  18. package/lib/contracts/markdown-document.d.ts +311 -0
  19. package/lib/contracts/markdown-document.d.ts.map +1 -0
  20. package/lib/contracts/markdown-document.js +97 -0
  21. package/lib/contracts/markdown-document.js.map +1 -0
  22. package/lib/contracts/tenant.d.ts +4 -4
  23. package/lib/esm/{chunk-DFALYXAY.mjs → chunk-4NESF77F.mjs} +2 -2
  24. package/lib/esm/{chunk-UY2ZSIR2.mjs → chunk-DC6UVTII.mjs} +3 -3
  25. package/lib/esm/{chunk-AYNGVVND.mjs → chunk-KRC5B425.mjs} +3 -3
  26. package/lib/esm/{chunk-QPFYQ24T.mjs → chunk-QODKWH56.mjs} +584 -582
  27. package/lib/esm/chunk-QODKWH56.mjs.map +1 -0
  28. package/lib/esm/{chunk-WYV3EFUS.mjs → chunk-WB4LSU25.mjs} +2 -2
  29. package/lib/esm/{chunk-TKIVZQ6V.mjs → chunk-WWALIVTO.mjs} +131 -16
  30. package/lib/esm/chunk-WWALIVTO.mjs.map +1 -0
  31. package/lib/esm/contracts/index.mjs +36 -4
  32. package/lib/esm/index.mjs +38 -6
  33. package/lib/esm/index.mjs.map +1 -1
  34. package/lib/esm/runtime/index.mjs +3 -3
  35. package/lib/esm/schemas/index.mjs +3 -3
  36. package/lib/json-schema/agent-session-event.schema.json +4 -0
  37. package/lib/json-schema/agent-session-run-event.schema.json +4 -0
  38. package/lib/json-schema/agent-session-view-model.schema.json +4 -0
  39. package/lib/runtime/runtime-definition-wire.d.ts +2 -2
  40. package/lib/schemas/index.d.ts +52 -49
  41. package/lib/schemas/index.d.ts.map +1 -1
  42. package/package.json +1 -1
  43. package/lib/esm/chunk-QPFYQ24T.mjs.map +0 -1
  44. package/lib/esm/chunk-TKIVZQ6V.mjs.map +0 -1
  45. /package/lib/esm/{chunk-DFALYXAY.mjs.map → chunk-4NESF77F.mjs.map} +0 -0
  46. /package/lib/esm/{chunk-UY2ZSIR2.mjs.map → chunk-DC6UVTII.mjs.map} +0 -0
  47. /package/lib/esm/{chunk-AYNGVVND.mjs.map → chunk-KRC5B425.mjs.map} +0 -0
  48. /package/lib/esm/{chunk-WYV3EFUS.mjs.map → chunk-WB4LSU25.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 MarkdownDocument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ownDocumentSaveResultSchema = 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":"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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";
@@ -2,7 +2,7 @@ import {
2
2
  DECLARATIVE_CONTROL_API_PREFIX,
3
3
  IsoDateTimeSchema,
4
4
  JsonObjectSchema
5
- } from "./chunk-QPFYQ24T.mjs";
5
+ } from "./chunk-QODKWH56.mjs";
6
6
 
7
7
  // src/contracts/page-stream.ts
8
8
  import { z } from "zod";
@@ -75,4 +75,4 @@ export {
75
75
  pageStreamRoutes,
76
76
  PageStreamControlResultSchema
77
77
  };
78
- //# sourceMappingURL=chunk-DFALYXAY.mjs.map
78
+ //# sourceMappingURL=chunk-4NESF77F.mjs.map
@@ -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-4NESF77F.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-QODKWH56.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-DC6UVTII.mjs.map
@@ -36,7 +36,7 @@ import {
36
36
  WorkflowCompletionCommitSchema,
37
37
  WorkflowCompletionReceiptSchema,
38
38
  WorkflowPublicationSchema
39
- } from "./chunk-WYV3EFUS.mjs";
39
+ } from "./chunk-WB4LSU25.mjs";
40
40
  import {
41
41
  ActionProgramArtifactSchema,
42
42
  ActionProgramDefinitionSchema,
@@ -101,7 +101,7 @@ import {
101
101
  WorkbenchSchema,
102
102
  WorkflowColumnBindingSchema,
103
103
  WorkflowDefinitionSchema
104
- } from "./chunk-QPFYQ24T.mjs";
104
+ } from "./chunk-QODKWH56.mjs";
105
105
 
106
106
  // src/schemas/index.ts
107
107
  var canonicalContractSchemas = {
@@ -210,4 +210,4 @@ var canonicalContractSchemas = {
210
210
  export {
211
211
  canonicalContractSchemas
212
212
  };
213
- //# sourceMappingURL=chunk-AYNGVVND.mjs.map
213
+ //# sourceMappingURL=chunk-KRC5B425.mjs.map