@inf-monkeys-tech/monkeys 1.0.53 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/esm/index.mjs CHANGED
@@ -8381,11 +8381,75 @@ var DomainEventSchema = z9.object({
8381
8381
 
8382
8382
  // src/contracts/file.ts
8383
8383
  import { z as z10 } from "zod";
8384
- var FilePurposeSchema = z10.string().trim().min(1).max(64).regex(/^[a-z0-9][a-z0-9-]*$/);
8384
+ var FILE_PURPOSES = [
8385
+ "uploads",
8386
+ "agent-attachments",
8387
+ "agent-artifacts",
8388
+ "agent-edited-images",
8389
+ "agent-workbench",
8390
+ "asset-screenshots",
8391
+ "data-exports",
8392
+ "data-feature-media",
8393
+ "design-assets",
8394
+ "design-board-thumbnails",
8395
+ "design-images",
8396
+ "dev-agent-reference-images",
8397
+ "dev-agent-review-artifacts",
8398
+ "external-delivery-techpacks",
8399
+ "llm-generated-images",
8400
+ "media-generated",
8401
+ "media-uploads",
8402
+ "model-training-files",
8403
+ "models",
8404
+ "models-checkpoints",
8405
+ "models-clip",
8406
+ "models-controlnet",
8407
+ "models-diffusion-models",
8408
+ "models-loras-test",
8409
+ "models-vae",
8410
+ "output-images",
8411
+ "plugin-data-imports",
8412
+ "plugin-runtime",
8413
+ "plugin-runtime-outputs",
8414
+ "step-thumbnails",
8415
+ "techpack-design-intent",
8416
+ "user-files-base",
8417
+ "user-files-design-board-background",
8418
+ "user-files-design-project-cover",
8419
+ "user-files-designs",
8420
+ "user-files-icons",
8421
+ "user-files-import-comfyui-image",
8422
+ "user-files-import-comfyui-json",
8423
+ "user-files-import-comfyui-json-url",
8424
+ "user-files-instruction-input",
8425
+ "user-files-linesheet",
8426
+ "user-files-media",
8427
+ "user-files-other",
8428
+ "user-files-prompt-assistant",
8429
+ "user-files-table-data",
8430
+ "user-files-techpack-attachments",
8431
+ "user-files-text-data-file",
8432
+ "user-files-workflow-input",
8433
+ "workflow-image-mask",
8434
+ "workflow-image-overlay",
8435
+ "workflow-import"
8436
+ ];
8437
+ var FilePurposeSchema = z10.enum(FILE_PURPOSES);
8385
8438
  var FileStatusSchema = z10.enum(["pending", "ready", "failed", "deleted"]);
8386
8439
  var FileVariantStatusSchema = z10.enum(["queued", "processing", "ready", "failed"]);
8440
+ var FILE_USAGE_OWNER_TYPES = [
8441
+ "data-asset",
8442
+ "data-export",
8443
+ "design-board",
8444
+ "external-delivery",
8445
+ "kernel-runtime",
8446
+ "llm-generated-media",
8447
+ "model-training-media",
8448
+ "plugin-run"
8449
+ ];
8450
+ var FileUsageOwnerTypeSchema = z10.enum(FILE_USAGE_OWNER_TYPES);
8387
8451
  var FileUsageSchema = z10.object({
8388
- ownerType: ContractIdentifierSchema,
8452
+ ownerType: FileUsageOwnerTypeSchema,
8389
8453
  ownerId: ContractIdentifierSchema,
8390
8454
  field: ContractIdentifierSchema.optional()
8391
8455
  }).strict();
@@ -8412,6 +8476,8 @@ var FileVariantSchema = z10.object({
8412
8476
  }).strict();
8413
8477
  var FileRecordSchema = z10.object({
8414
8478
  contract: z10.literal("FileRecord"),
8479
+ contractVersion: z10.literal(1),
8480
+ version: z10.number().int().positive(),
8415
8481
  fileId: ContractIdentifierSchema,
8416
8482
  teamId: ContractIdentifierSchema,
8417
8483
  purpose: FilePurposeSchema,
@@ -8482,6 +8548,46 @@ var FileResolveBatchRequestSchema = z10.object({
8482
8548
  var FileResolveBatchResponseSchema = z10.object({
8483
8549
  items: z10.array(ResolvedFileSchema)
8484
8550
  }).strict();
8551
+ var ManagedFileCommandTypeSchema = z10.enum([
8552
+ "create-file",
8553
+ "record-upload",
8554
+ "verify-upload",
8555
+ "delete-file"
8556
+ ]);
8557
+ var ManagedFileCommandSchema = z10.object({
8558
+ contract: z10.literal("ManagedFileCommand"),
8559
+ contractVersion: z10.literal(1),
8560
+ commandId: ContractIdentifierSchema,
8561
+ commandType: ManagedFileCommandTypeSchema,
8562
+ fileId: ContractIdentifierSchema,
8563
+ teamId: ContractIdentifierSchema,
8564
+ expectedVersion: z10.number().int().nonnegative().optional(),
8565
+ actorId: ContractIdentifierSchema.optional(),
8566
+ payload: JsonObjectSchema.default({}),
8567
+ issuedAt: IsoDateTimeSchema
8568
+ }).strict();
8569
+ var ManagedFileEventTypeSchema = z10.enum([
8570
+ "file-created",
8571
+ "file-usage-attached",
8572
+ "storage-operation-queued",
8573
+ "storage-operation-completed",
8574
+ "storage-operation-failed",
8575
+ "file-ready",
8576
+ "file-deleted"
8577
+ ]);
8578
+ var ManagedFileEventSchema = z10.object({
8579
+ contract: z10.literal("ManagedFileEvent"),
8580
+ contractVersion: z10.literal(1),
8581
+ eventId: ContractIdentifierSchema,
8582
+ eventType: ManagedFileEventTypeSchema,
8583
+ fileId: ContractIdentifierSchema,
8584
+ teamId: ContractIdentifierSchema,
8585
+ aggregateVersion: z10.number().int().positive(),
8586
+ commandId: ContractIdentifierSchema,
8587
+ actorId: ContractIdentifierSchema.optional(),
8588
+ payload: JsonObjectSchema.default({}),
8589
+ occurredAt: IsoDateTimeSchema
8590
+ }).strict();
8485
8591
 
8486
8592
  // src/contracts/menu.ts
8487
8593
  import { z as z12 } from "zod";
@@ -11401,7 +11507,8 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
11401
11507
  var DesignTokenFileSourceSchema = z15.object({
11402
11508
  type: z15.literal("file"),
11403
11509
  path: z15.string().trim().min(1).superRefine((source, context) => {
11404
- if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
11510
+ const isWindowsDrivePath = /^[a-z]:[\\/]/i.test(source);
11511
+ if (!isWindowsDrivePath && /^[a-z][a-z\d+.-]*:/i.test(source)) {
11405
11512
  context.addIssue({
11406
11513
  code: "custom",
11407
11514
  message: "Design token file sources must use local file paths."
@@ -15008,6 +15115,8 @@ export {
15008
15115
  EntityRefSchema,
15009
15116
  ExecutionLinkSchema,
15010
15117
  ExpiringAccessGrantSchema,
15118
+ FILE_PURPOSES,
15119
+ FILE_USAGE_OWNER_TYPES,
15011
15120
  FilePurposeSchema,
15012
15121
  FileRecordSchema,
15013
15122
  FileReferenceSchema,
@@ -15018,6 +15127,7 @@ export {
15018
15127
  FileUploadCreateRequestSchema,
15019
15128
  FileUploadCreateResponseSchema,
15020
15129
  FileUploadInstructionSchema,
15130
+ FileUsageOwnerTypeSchema,
15021
15131
  FileUsageSchema,
15022
15132
  FileVariantSchema,
15023
15133
  FileVariantStatusSchema,
@@ -15037,6 +15147,10 @@ export {
15037
15147
  MENU_MAX_NODES,
15038
15148
  MENU_MAX_TREE_DEPTH,
15039
15149
  MONKEYS_REQUIRED_THEME_TOKEN_PATHS,
15150
+ ManagedFileCommandSchema,
15151
+ ManagedFileCommandTypeSchema,
15152
+ ManagedFileEventSchema,
15153
+ ManagedFileEventTypeSchema,
15040
15154
  MenuAccessRequirementSchema,
15041
15155
  MenuActionBehaviorSchema,
15042
15156
  MenuActionRegistrationSchema,