@inf-monkeys-tech/monkeys 1.1.41 → 1.1.43

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 (63) hide show
  1. package/lib/contracts/agent-data.d.ts +470 -0
  2. package/lib/contracts/agent-data.d.ts.map +1 -0
  3. package/lib/contracts/agent-data.js +139 -0
  4. package/lib/contracts/agent-data.js.map +1 -0
  5. package/lib/contracts/agent-work.d.ts +52 -0
  6. package/lib/contracts/agent-work.d.ts.map +1 -1
  7. package/lib/contracts/agent-work.js +16 -1
  8. package/lib/contracts/agent-work.js.map +1 -1
  9. package/lib/contracts/declarative-control-http.d.ts +201 -193
  10. package/lib/contracts/declarative-control-http.d.ts.map +1 -1
  11. package/lib/contracts/declarative-control.d.ts +34 -30
  12. package/lib/contracts/declarative-control.d.ts.map +1 -1
  13. package/lib/contracts/declarative-diagnostic.d.ts +2 -2
  14. package/lib/contracts/declarative-document-import.d.ts +2 -2
  15. package/lib/contracts/declarative-publication-job.d.ts +80 -80
  16. package/lib/contracts/file.d.ts +137 -4
  17. package/lib/contracts/file.d.ts.map +1 -1
  18. package/lib/contracts/file.js +62 -6
  19. package/lib/contracts/file.js.map +1 -1
  20. package/lib/contracts/index.d.ts +1 -0
  21. package/lib/contracts/index.d.ts.map +1 -1
  22. package/lib/contracts/index.js +1 -0
  23. package/lib/contracts/index.js.map +1 -1
  24. package/lib/contracts/menu.d.ts +2 -2
  25. package/lib/contracts/page.d.ts +7 -7
  26. package/lib/contracts/render.d.ts +5 -5
  27. package/lib/contracts/semantic.d.ts +2 -2
  28. package/lib/contracts/tenant.d.ts +10 -10
  29. package/lib/esm/{chunk-ZSSYNYLX.mjs → chunk-33OQXBRM.mjs} +53 -4
  30. package/lib/esm/chunk-33OQXBRM.mjs.map +1 -0
  31. package/lib/esm/{chunk-CWB4ZZ52.mjs → chunk-3YISMAL3.mjs} +3 -3
  32. package/lib/esm/{chunk-6REXMVTC.mjs → chunk-UUUHWSYL.mjs} +2 -2
  33. package/lib/esm/{chunk-22EMXUOT.mjs → chunk-WRSX2N7O.mjs} +2 -2
  34. package/lib/esm/{chunk-QCNO3BPY.mjs → chunk-XUWZH2H3.mjs} +548 -490
  35. package/lib/esm/chunk-XUWZH2H3.mjs.map +1 -0
  36. package/lib/esm/chunk-ZH6D5O6Q.mjs +431 -0
  37. package/lib/esm/chunk-ZH6D5O6Q.mjs.map +1 -0
  38. package/lib/esm/contracts/index.mjs +52 -4
  39. package/lib/esm/index.mjs +60 -6
  40. package/lib/esm/index.mjs.map +1 -1
  41. package/lib/esm/runtime/index.mjs +9 -3
  42. package/lib/esm/schemas/index.mjs +3 -3
  43. package/lib/json-schema/page-runtime-bundle.schema.json +1 -0
  44. package/lib/json-schema/page.schema.json +1 -0
  45. package/lib/runtime/file-reference.d.ts +10 -0
  46. package/lib/runtime/file-reference.d.ts.map +1 -0
  47. package/lib/runtime/file-reference.js +66 -0
  48. package/lib/runtime/file-reference.js.map +1 -0
  49. package/lib/runtime/index.d.ts +1 -0
  50. package/lib/runtime/index.d.ts.map +1 -1
  51. package/lib/runtime/index.js +1 -0
  52. package/lib/runtime/index.js.map +1 -1
  53. package/lib/runtime/runtime-definition-wire.d.ts +16 -16
  54. package/lib/schemas/index.d.ts +29 -28
  55. package/lib/schemas/index.d.ts.map +1 -1
  56. package/package.json +1 -1
  57. package/lib/esm/chunk-DR3BUHQG.mjs +0 -255
  58. package/lib/esm/chunk-DR3BUHQG.mjs.map +0 -1
  59. package/lib/esm/chunk-QCNO3BPY.mjs.map +0 -1
  60. package/lib/esm/chunk-ZSSYNYLX.mjs.map +0 -1
  61. /package/lib/esm/{chunk-CWB4ZZ52.mjs.map → chunk-3YISMAL3.mjs.map} +0 -0
  62. /package/lib/esm/{chunk-6REXMVTC.mjs.map → chunk-UUUHWSYL.mjs.map} +0 -0
  63. /package/lib/esm/{chunk-22EMXUOT.mjs.map → chunk-WRSX2N7O.mjs.map} +0 -0
@@ -460,10 +460,10 @@ export declare const ProductDeclarationSchema: z.ZodObject<{
460
460
  action: "action";
461
461
  chat: "chat";
462
462
  agent: "agent";
463
+ view: "view";
463
464
  workspace: "workspace";
464
465
  api: "api";
465
466
  page: "page";
466
- view: "view";
467
467
  overlay: "overlay";
468
468
  preview: "preview";
469
469
  log: "log";
@@ -494,9 +494,9 @@ export declare const ProductDeclarationSchema: z.ZodObject<{
494
494
  record: "record";
495
495
  action: "action";
496
496
  agent: "agent";
497
+ view: "view";
497
498
  workspace: "workspace";
498
499
  page: "page";
499
- view: "view";
500
500
  overlay: "overlay";
501
501
  }>;
502
502
  routeId: z.ZodString;
@@ -453,10 +453,10 @@ export declare const TenantWorkbenchPageEnvelopeSchema: z.ZodObject<{
453
453
  action: "action";
454
454
  chat: "chat";
455
455
  agent: "agent";
456
+ view: "view";
456
457
  workspace: "workspace";
457
458
  api: "api";
458
459
  page: "page";
459
- view: "view";
460
460
  overlay: "overlay";
461
461
  preview: "preview";
462
462
  log: "log";
@@ -487,9 +487,9 @@ export declare const TenantWorkbenchPageEnvelopeSchema: z.ZodObject<{
487
487
  record: "record";
488
488
  action: "action";
489
489
  agent: "agent";
490
+ view: "view";
490
491
  workspace: "workspace";
491
492
  page: "page";
492
- view: "view";
493
493
  overlay: "overlay";
494
494
  }>;
495
495
  routeId: z.ZodString;
@@ -606,10 +606,10 @@ export declare const TenantWorkbenchConfigSchema: z.ZodObject<{
606
606
  action: "action";
607
607
  chat: "chat";
608
608
  agent: "agent";
609
+ view: "view";
609
610
  workspace: "workspace";
610
611
  api: "api";
611
612
  page: "page";
612
- view: "view";
613
613
  overlay: "overlay";
614
614
  preview: "preview";
615
615
  log: "log";
@@ -640,9 +640,9 @@ export declare const TenantWorkbenchConfigSchema: z.ZodObject<{
640
640
  record: "record";
641
641
  action: "action";
642
642
  agent: "agent";
643
+ view: "view";
643
644
  workspace: "workspace";
644
645
  page: "page";
645
- view: "view";
646
646
  overlay: "overlay";
647
647
  }>;
648
648
  routeId: z.ZodString;
@@ -1226,10 +1226,10 @@ export declare const TenantApplicationConfigSchema: z.ZodObject<{
1226
1226
  action: "action";
1227
1227
  chat: "chat";
1228
1228
  agent: "agent";
1229
+ view: "view";
1229
1230
  workspace: "workspace";
1230
1231
  api: "api";
1231
1232
  page: "page";
1232
- view: "view";
1233
1233
  overlay: "overlay";
1234
1234
  preview: "preview";
1235
1235
  log: "log";
@@ -1260,9 +1260,9 @@ export declare const TenantApplicationConfigSchema: z.ZodObject<{
1260
1260
  record: "record";
1261
1261
  action: "action";
1262
1262
  agent: "agent";
1263
+ view: "view";
1263
1264
  workspace: "workspace";
1264
1265
  page: "page";
1265
- view: "view";
1266
1266
  overlay: "overlay";
1267
1267
  }>;
1268
1268
  routeId: z.ZodString;
@@ -2305,10 +2305,10 @@ export declare const TenantProductConfigSchema: z.ZodObject<{
2305
2305
  action: "action";
2306
2306
  chat: "chat";
2307
2307
  agent: "agent";
2308
+ view: "view";
2308
2309
  workspace: "workspace";
2309
2310
  api: "api";
2310
2311
  page: "page";
2311
- view: "view";
2312
2312
  overlay: "overlay";
2313
2313
  preview: "preview";
2314
2314
  log: "log";
@@ -2339,9 +2339,9 @@ export declare const TenantProductConfigSchema: z.ZodObject<{
2339
2339
  record: "record";
2340
2340
  action: "action";
2341
2341
  agent: "agent";
2342
+ view: "view";
2342
2343
  workspace: "workspace";
2343
2344
  page: "page";
2344
- view: "view";
2345
2345
  overlay: "overlay";
2346
2346
  }>;
2347
2347
  routeId: z.ZodString;
@@ -3396,10 +3396,10 @@ export declare const TenantRuntimeConfigSchema: z.ZodObject<{
3396
3396
  action: "action";
3397
3397
  chat: "chat";
3398
3398
  agent: "agent";
3399
+ view: "view";
3399
3400
  workspace: "workspace";
3400
3401
  api: "api";
3401
3402
  page: "page";
3402
- view: "view";
3403
3403
  overlay: "overlay";
3404
3404
  preview: "preview";
3405
3405
  log: "log";
@@ -3430,9 +3430,9 @@ export declare const TenantRuntimeConfigSchema: z.ZodObject<{
3430
3430
  record: "record";
3431
3431
  action: "action";
3432
3432
  agent: "agent";
3433
+ view: "view";
3433
3434
  workspace: "workspace";
3434
3435
  page: "page";
3435
- view: "view";
3436
3436
  overlay: "overlay";
3437
3437
  }>;
3438
3438
  routeId: z.ZodString;
@@ -4,7 +4,7 @@ import {
4
4
  PAGE_STREAM_MAX_FRAME_BYTES,
5
5
  PageStreamDescriptorSchema,
6
6
  PageStreamEventSchema
7
- } from "./chunk-6REXMVTC.mjs";
7
+ } from "./chunk-UUUHWSYL.mjs";
8
8
  import {
9
9
  AccessPolicySchema,
10
10
  ActionProgramDefinitionSchema,
@@ -41,6 +41,7 @@ import {
41
41
  LegacyRouteTakeoverAuthorizationSchema,
42
42
  MENU_ACTIVATION_QUERY_PARAMETER,
43
43
  MENU_CONTRACT_VERSION,
44
+ ManagedFileUriSchema,
44
45
  MaterializedModelProjectionSchema,
45
46
  MenuAccessRequirementSchema,
46
47
  MenuActionRegistrationSchema,
@@ -113,7 +114,7 @@ import {
113
114
  require_validation,
114
115
  require_validation_error,
115
116
  resolveThemeTokens
116
- } from "./chunk-QCNO3BPY.mjs";
117
+ } from "./chunk-XUWZH2H3.mjs";
117
118
  import {
118
119
  __commonJS,
119
120
  __toESM
@@ -7330,6 +7331,51 @@ function compilePageComposition(input) {
7330
7331
  return PageSchema.parse({ ...source.page, contract: "Page", schemaVersion: 1, body: expand(source.body, 0) });
7331
7332
  }
7332
7333
 
7334
+ // src/runtime/file-reference.ts
7335
+ function parseManagedFileReference(value) {
7336
+ const parsed = ManagedFileUriSchema.safeParse(value);
7337
+ if (!parsed.success) return void 0;
7338
+ const [fileId, variant] = parsed.data.slice("file://".length).split("#");
7339
+ return { fileId, ...variant ? { variant } : {} };
7340
+ }
7341
+ function collectManagedFileReferences(value) {
7342
+ const found = /* @__PURE__ */ new Set();
7343
+ const seen = /* @__PURE__ */ new WeakSet();
7344
+ const visit = (item, depth) => {
7345
+ if (depth > 64) throw new Error("File reference nesting exceeds the limit");
7346
+ if (typeof item === "string") {
7347
+ for (const match of item.matchAll(/file:\/\/[A-Za-z0-9][A-Za-z0-9_-]{0,127}(?:#[A-Za-z0-9_-]+)?(?=$|[\s"'`)\]}> ,])/g)) {
7348
+ if (parseManagedFileReference(match[0])) found.add(match[0]);
7349
+ }
7350
+ } else if (item && typeof item === "object" && !seen.has(item)) {
7351
+ seen.add(item);
7352
+ for (const child of Object.values(item)) visit(child, depth + 1);
7353
+ }
7354
+ };
7355
+ visit(value, 0);
7356
+ return [...found].sort();
7357
+ }
7358
+ function resolveFileResourceReference(reference, manifest, documentPath = manifest?.entryPath) {
7359
+ if (parseManagedFileReference(reference)) return reference;
7360
+ if (!manifest || /^[a-z][a-z0-9+.-]*:|^[\/\\]/i.test(reference)) return void 0;
7361
+ let path;
7362
+ try {
7363
+ path = decodeURIComponent(reference.split(/[?#]/, 1)[0]);
7364
+ } catch {
7365
+ return void 0;
7366
+ }
7367
+ if (/^[\/\\]|[\\\u0000-\u001f]/.test(path)) return void 0;
7368
+ const parts = documentPath?.split("/").slice(0, -1) || [];
7369
+ for (const part of path.split("/")) {
7370
+ if (!part || part === ".") continue;
7371
+ if (part === "..") {
7372
+ if (!parts.length) return void 0;
7373
+ parts.pop();
7374
+ } else parts.push(part);
7375
+ }
7376
+ return manifest.resources.find((resource) => resource.path === parts.join("/"))?.uri;
7377
+ }
7378
+
7333
7379
  export {
7334
7380
  extractOpenApiCapabilityManifests,
7335
7381
  createCapabilityRegistrySource,
@@ -7459,6 +7505,9 @@ export {
7459
7505
  runtimeDefinitionEtag,
7460
7506
  PageComponentDefinitionSchema,
7461
7507
  PageCompositionSchema,
7462
- compilePageComposition
7508
+ compilePageComposition,
7509
+ parseManagedFileReference,
7510
+ collectManagedFileReferences,
7511
+ resolveFileResourceReference
7463
7512
  };
7464
- //# sourceMappingURL=chunk-ZSSYNYLX.mjs.map
7513
+ //# sourceMappingURL=chunk-33OQXBRM.mjs.map