@inf-monkeys-tech/monkeys 1.1.42 → 1.1.44

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 (59) 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 +2 -0
  6. package/lib/contracts/agent-work.d.ts.map +1 -1
  7. package/lib/contracts/agent-work.js +2 -0
  8. package/lib/contracts/agent-work.js.map +1 -1
  9. package/lib/contracts/declarative-control-http.d.ts +176 -175
  10. package/lib/contracts/declarative-control-http.d.ts.map +1 -1
  11. package/lib/contracts/declarative-control-http.js +1 -0
  12. package/lib/contracts/declarative-control-http.js.map +1 -1
  13. package/lib/contracts/declarative-control.d.ts +30 -30
  14. package/lib/contracts/declarative-diagnostic.d.ts +2 -2
  15. package/lib/contracts/declarative-document-import.d.ts +2 -2
  16. package/lib/contracts/declarative-publication-job.d.ts +72 -72
  17. package/lib/contracts/declarative-publication-verification.d.ts +209 -0
  18. package/lib/contracts/declarative-publication-verification.d.ts.map +1 -0
  19. package/lib/contracts/declarative-publication-verification.js +56 -0
  20. package/lib/contracts/declarative-publication-verification.js.map +1 -0
  21. package/lib/contracts/index.d.ts +2 -0
  22. package/lib/contracts/index.d.ts.map +1 -1
  23. package/lib/contracts/index.js +2 -0
  24. package/lib/contracts/index.js.map +1 -1
  25. package/lib/contracts/menu.d.ts +2 -2
  26. package/lib/contracts/page.d.ts +7 -7
  27. package/lib/contracts/render.d.ts +5 -5
  28. package/lib/contracts/semantic.d.ts +2 -2
  29. package/lib/contracts/tenant.d.ts +10 -10
  30. package/lib/esm/{chunk-3YISMAL3.mjs → chunk-AYNGVVND.mjs} +7 -3
  31. package/lib/esm/chunk-AYNGVVND.mjs.map +1 -0
  32. package/lib/esm/{chunk-UUUHWSYL.mjs → chunk-DFALYXAY.mjs} +2 -2
  33. package/lib/esm/{chunk-XUWZH2H3.mjs → chunk-QPFYQ24T.mjs} +2 -1
  34. package/lib/esm/{chunk-XUWZH2H3.mjs.map → chunk-QPFYQ24T.mjs.map} +1 -1
  35. package/lib/esm/chunk-TKIVZQ6V.mjs +431 -0
  36. package/lib/esm/chunk-TKIVZQ6V.mjs.map +1 -0
  37. package/lib/esm/{chunk-33OQXBRM.mjs → chunk-UY2ZSIR2.mjs} +3 -3
  38. package/lib/esm/{chunk-WRSX2N7O.mjs → chunk-WYV3EFUS.mjs} +258 -204
  39. package/lib/esm/chunk-WYV3EFUS.mjs.map +1 -0
  40. package/lib/esm/contracts/index.mjs +50 -4
  41. package/lib/esm/index.mjs +52 -6
  42. package/lib/esm/index.mjs.map +1 -1
  43. package/lib/esm/runtime/index.mjs +3 -3
  44. package/lib/esm/schemas/index.mjs +3 -3
  45. package/lib/json-schema/declarative-publication-verification-request.schema.json +338 -0
  46. package/lib/json-schema/declarative-publication-verification.schema.json +462 -0
  47. package/lib/json-schema/index.json +2 -0
  48. package/lib/runtime/runtime-definition-wire.d.ts +14 -14
  49. package/lib/schemas/index.d.ts +223 -28
  50. package/lib/schemas/index.d.ts.map +1 -1
  51. package/lib/schemas/index.js +3 -0
  52. package/lib/schemas/index.js.map +1 -1
  53. package/package.json +1 -1
  54. package/lib/esm/chunk-3YISMAL3.mjs.map +0 -1
  55. package/lib/esm/chunk-NTHT6LZF.mjs +0 -270
  56. package/lib/esm/chunk-NTHT6LZF.mjs.map +0 -1
  57. package/lib/esm/chunk-WRSX2N7O.mjs.map +0 -1
  58. /package/lib/esm/{chunk-UUUHWSYL.mjs.map → chunk-DFALYXAY.mjs.map} +0 -0
  59. /package/lib/esm/{chunk-33OQXBRM.mjs.map → chunk-UY2ZSIR2.mjs.map} +0 -0
@@ -13,7 +13,7 @@ import {
13
13
  RevisionRefSchema,
14
14
  Sha256Schema,
15
15
  TenantScopeSchema
16
- } from "./chunk-XUWZH2H3.mjs";
16
+ } from "./chunk-QPFYQ24T.mjs";
17
17
 
18
18
  // src/contracts/artifact.ts
19
19
  import { z } from "zod";
@@ -312,12 +312,61 @@ var ExpiringAccessGrantSchema = z4.object({
312
312
  revokedAt: IsoDateTimeSchema.optional()
313
313
  }).strict().refine((value) => Date.parse(value.expiresAt) > Date.parse(value.issuedAt), "expiresAt must be after issuedAt");
314
314
 
315
- // src/contracts/declarative-document-import.ts
315
+ // src/contracts/declarative-publication-verification.ts
316
316
  import { z as z5 } from "zod";
317
+ var DECLARATIVE_PUBLICATION_SCOPE_HEADER = "x-monkeys-declarative-scope";
318
+ var DECLARATIVE_PUBLICATION_SURFACE_HEADER = "x-monkeys-declarative-surface";
319
+ var DeclarativePublicationScopeSchema = z5.discriminatedUnion("kind", [
320
+ z5.object({ kind: z5.literal("global") }).strict(),
321
+ z5.object({
322
+ kind: z5.literal("team"),
323
+ teamId: ContractIdentifierSchema.refine((value) => value !== "0", "Use global scope for the reserved namespace.")
324
+ }).strict()
325
+ ]);
326
+ var DeclarativePublicationVerificationRequestSchema = z5.object({
327
+ resourceKind: z5.enum(["page", "navigation", "workbench"]),
328
+ resourceId: ContractIdentifierSchema,
329
+ releaseSlotId: ContractIdentifierSchema,
330
+ releaseVersion: z5.number().int().positive().optional(),
331
+ expectedReleaseRevisionRef: RevisionRefSchema.optional(),
332
+ expectedDefinitionRevisionRef: RevisionRefSchema.optional(),
333
+ idempotencyKey: z5.string().trim().min(1).max(256).optional(),
334
+ audience: z5.object({
335
+ teamId: ContractIdentifierSchema.optional(),
336
+ path: z5.string().trim().min(1).max(4096).optional()
337
+ }).strict().optional()
338
+ }).strict();
339
+ var DeclarativePublicationVerificationSchema = z5.object({
340
+ contract: z5.literal("DeclarativePublicationVerification"),
341
+ schemaVersion: z5.literal(1),
342
+ resourceKind: z5.enum(["page", "navigation", "workbench"]),
343
+ resourceId: ContractIdentifierSchema,
344
+ scope: DeclarativePublicationScopeSchema,
345
+ publication: z5.enum(["committed", "unknown"]),
346
+ activation: z5.enum(["active", "superseded", "deactivated", "unavailable"]),
347
+ integrity: z5.enum(["verified", "unverified", "failed"]),
348
+ runtime: z5.enum(["not-requested", "verified", "context-required", "forbidden", "failed"]),
349
+ retryable: z5.boolean().default(false),
350
+ releaseRevisionRef: RevisionRefSchema.optional(),
351
+ definitionRevisionRef: RevisionRefSchema.optional(),
352
+ runtimeContentHash: z5.string().regex(/^[a-f0-9]{64}$/).optional(),
353
+ requestId: z5.string().max(256).optional(),
354
+ diagnostics: z5.array(DeclarativeDiagnosticSchema).max(32)
355
+ }).strict().superRefine((value, context) => {
356
+ if ((value.integrity === "verified" || value.runtime === "verified") && (value.publication !== "committed" || value.activation !== "active" || !value.releaseRevisionRef || !value.definitionRevisionRef)) {
357
+ context.addIssue({ code: "custom", path: ["integrity"], message: "Verification requires an exact committed active Release and definition." });
358
+ }
359
+ if (value.runtime === "verified" && value.integrity !== "verified") {
360
+ context.addIssue({ code: "custom", path: ["runtime"], message: "Audience verification requires publication integrity." });
361
+ }
362
+ });
363
+
364
+ // src/contracts/declarative-document-import.ts
365
+ import { z as z6 } from "zod";
317
366
  var sameScope = (left, right) => ["tenantRef", "dataSpaceRef", "teamRef"].every(
318
367
  (key) => left[key]?.kind === right[key]?.kind && left[key]?.id === right[key]?.id && left[key]?.ownerRepo === right[key]?.ownerRepo
319
368
  );
320
- var DeclarativeImportDocumentSchema = z5.union([
369
+ var DeclarativeImportDocumentSchema = z6.union([
321
370
  PageSchema,
322
371
  NavigationSchema
323
372
  ]);
@@ -329,34 +378,34 @@ var requestShape = {
329
378
  function supportsSurface(value) {
330
379
  return value.document.contract === "Page" ? value.document.surface === value.surface : value.document.supportedSurfaces.includes(value.surface);
331
380
  }
332
- var DeclarativeDocumentImportRequestSchema = z5.object(requestShape).strict().refine(supportsSurface, {
381
+ var DeclarativeDocumentImportRequestSchema = z6.object(requestShape).strict().refine(supportsSurface, {
333
382
  path: ["surface"],
334
383
  message: "The document does not support the selected surface."
335
384
  });
336
- var DeclarativeDocumentImportIntentSchema = z5.object({
385
+ var DeclarativeDocumentImportIntentSchema = z6.object({
337
386
  ...requestShape,
338
- expectedVersion: z5.number().int().nonnegative(),
387
+ expectedVersion: z6.number().int().nonnegative(),
339
388
  expectedPlanHash: Sha256Schema,
340
- idempotencyKey: z5.string().trim().min(1).max(256)
389
+ idempotencyKey: z6.string().trim().min(1).max(256)
341
390
  }).strict().refine(supportsSurface, {
342
391
  path: ["surface"],
343
392
  message: "The document does not support the selected surface."
344
393
  });
345
- var DeclarativeDocumentImportPlanSchema = z5.object({
346
- contract: z5.literal("DeclarativeDocumentImportPlan"),
347
- schemaVersion: z5.literal(1),
348
- resourceKind: z5.enum(["page", "navigation"]),
394
+ var DeclarativeDocumentImportPlanSchema = z6.object({
395
+ contract: z6.literal("DeclarativeDocumentImportPlan"),
396
+ schemaVersion: z6.literal(1),
397
+ resourceKind: z6.enum(["page", "navigation"]),
349
398
  resourceId: ContractIdentifierSchema,
350
399
  surface: ProductSurfaceSchema,
351
400
  sourceContentHash: Sha256Schema,
352
401
  environmentRevisionRef: RevisionRefSchema,
353
402
  document: DeclarativeImportDocumentSchema,
354
403
  tenantScope: TenantScopeSchema.nullable(),
355
- requiresInitialization: z5.boolean(),
356
- expectedVersion: z5.number().int().nonnegative(),
404
+ requiresInitialization: z6.boolean(),
405
+ expectedVersion: z6.number().int().nonnegative(),
357
406
  currentContentHash: Sha256Schema.nullable(),
358
- changed: z5.boolean(),
359
- diagnostics: z5.array(DeclarativeDiagnosticSchema),
407
+ changed: z6.boolean(),
408
+ diagnostics: z6.array(DeclarativeDiagnosticSchema),
360
409
  dependencyContentHash: Sha256Schema,
361
410
  planHash: Sha256Schema
362
411
  }).strict().superRefine((value, context) => {
@@ -387,9 +436,9 @@ var DeclarativeDocumentImportPlanSchema = z5.object({
387
436
  message: "The plan and bound document must belong to the same scope."
388
437
  });
389
438
  });
390
- var DeclarativeDocumentImportResultSchema = z5.object({
391
- action: z5.literal("import"),
392
- changed: z5.boolean(),
439
+ var DeclarativeDocumentImportResultSchema = z6.object({
440
+ action: z6.literal("import"),
441
+ changed: z6.boolean(),
393
442
  plan: DeclarativeDocumentImportPlanSchema,
394
443
  revisionRef: RevisionRefSchema
395
444
  }).strict().superRefine((value, context) => {
@@ -403,227 +452,227 @@ var DeclarativeDocumentImportResultSchema = z5.object({
403
452
  });
404
453
 
405
454
  // src/contracts/trend.ts
406
- import { z as z6 } from "zod";
407
- var RadarDecisionMetricsSchema = z6.object({
408
- currentSales: z6.number().finite(),
409
- forecastSales: z6.number().finite(),
410
- searchHeat: z6.number().finite(),
411
- socialHeat: z6.number().finite(),
412
- confidence: z6.number().min(0).max(1)
413
- }).strict();
414
- var TrendSourceSchema = z6.object({
455
+ import { z as z7 } from "zod";
456
+ var RadarDecisionMetricsSchema = z7.object({
457
+ currentSales: z7.number().finite(),
458
+ forecastSales: z7.number().finite(),
459
+ searchHeat: z7.number().finite(),
460
+ socialHeat: z7.number().finite(),
461
+ confidence: z7.number().min(0).max(1)
462
+ }).strict();
463
+ var TrendSourceSchema = z7.object({
415
464
  sourceId: ContractIdentifierSchema,
416
465
  provider: ContractIdentifierSchema,
417
- channel: z6.enum(["trend", "ecommerce", "social", "search", "internal"]),
466
+ channel: z7.enum(["trend", "ecommerce", "social", "search", "internal"]),
418
467
  collectedAt: IsoDateTimeSchema,
419
- sourceUrl: z6.string().url().optional(),
420
- evidenceRefs: z6.array(EntityRefSchema).default([])
468
+ sourceUrl: z7.string().url().optional(),
469
+ evidenceRefs: z7.array(EntityRefSchema).default([])
421
470
  }).strict();
422
- var TrendIngestRunSchema = z6.object({
423
- contract: z6.literal("TrendIngestRun"),
471
+ var TrendIngestRunSchema = z7.object({
472
+ contract: z7.literal("TrendIngestRun"),
424
473
  ingestRunId: ContractIdentifierSchema,
425
474
  sourceId: ContractIdentifierSchema,
426
475
  requestId: ContractIdentifierSchema,
427
476
  idempotencyKey: ContractIdentifierSchema,
428
- status: z6.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
429
- recordCount: z6.number().int().nonnegative(),
430
- errorCount: z6.number().int().nonnegative(),
477
+ status: z7.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
478
+ recordCount: z7.number().int().nonnegative(),
479
+ errorCount: z7.number().int().nonnegative(),
431
480
  startedAt: IsoDateTimeSchema,
432
481
  completedAt: IsoDateTimeSchema.optional()
433
482
  }).strict();
434
- var TrendSourceRecordSchema = z6.object({
435
- contract: z6.literal("TrendSourceRecord"),
483
+ var TrendSourceRecordSchema = z7.object({
484
+ contract: z7.literal("TrendSourceRecord"),
436
485
  sourceRecordId: ContractIdentifierSchema,
437
486
  source: TrendSourceSchema,
438
487
  ingestRunRef: EntityRefSchema,
439
- recordVersion: z6.number().int().positive(),
488
+ recordVersion: z7.number().int().positive(),
440
489
  contentHash: Sha256Schema,
441
490
  payload: JsonValueSchema,
442
491
  idempotencyKey: ContractIdentifierSchema,
443
492
  collectedAt: IsoDateTimeSchema
444
493
  }).strict();
445
- var HotwordBodySchema = z6.object({
446
- contract: z6.literal("HotwordBody"),
494
+ var HotwordBodySchema = z7.object({
495
+ contract: z7.literal("HotwordBody"),
447
496
  hotwordId: ContractIdentifierSchema,
448
- label: z6.string().trim().min(1),
449
- normalizedLabel: z6.string().trim().min(1),
450
- categories: z6.array(ContractIdentifierSchema).default([]),
451
- sourceRefs: z6.array(TrendSourceSchema).min(1),
452
- relationRefs: z6.array(EntityRefSchema).default([]),
497
+ label: z7.string().trim().min(1),
498
+ normalizedLabel: z7.string().trim().min(1),
499
+ categories: z7.array(ContractIdentifierSchema).default([]),
500
+ sourceRefs: z7.array(TrendSourceSchema).min(1),
501
+ relationRefs: z7.array(EntityRefSchema).default([]),
453
502
  createdAt: IsoDateTimeSchema,
454
503
  updatedAt: IsoDateTimeSchema
455
504
  }).strict();
456
505
  var CommerceBodyFieldsSchema = {
457
- displayName: z6.string().trim().min(1),
458
- normalizedName: z6.string().trim().min(1),
459
- categories: z6.array(ContractIdentifierSchema).default([]),
460
- sourceRefs: z6.array(EntityRefSchema).min(1),
461
- relationRefs: z6.array(EntityRefSchema).default([]),
506
+ displayName: z7.string().trim().min(1),
507
+ normalizedName: z7.string().trim().min(1),
508
+ categories: z7.array(ContractIdentifierSchema).default([]),
509
+ sourceRefs: z7.array(EntityRefSchema).min(1),
510
+ relationRefs: z7.array(EntityRefSchema).default([]),
462
511
  createdAt: IsoDateTimeSchema,
463
512
  updatedAt: IsoDateTimeSchema
464
513
  };
465
- var BrandBodySchema = z6.object({
466
- contract: z6.literal("BrandBody"),
514
+ var BrandBodySchema = z7.object({
515
+ contract: z7.literal("BrandBody"),
467
516
  brandId: ContractIdentifierSchema,
468
517
  ...CommerceBodyFieldsSchema
469
518
  }).strict();
470
- var ProductBodySchema = z6.object({
471
- contract: z6.literal("ProductBody"),
519
+ var ProductBodySchema = z7.object({
520
+ contract: z7.literal("ProductBody"),
472
521
  productId: ContractIdentifierSchema,
473
522
  brandRef: EntityRefSchema.optional(),
474
523
  ...CommerceBodyFieldsSchema
475
524
  }).strict();
476
- var TrendMetricSnapshotSchema = z6.object({
477
- contract: z6.literal("TrendMetricSnapshot"),
525
+ var TrendMetricSnapshotSchema = z7.object({
526
+ contract: z7.literal("TrendMetricSnapshot"),
478
527
  snapshotId: ContractIdentifierSchema,
479
528
  subjectRef: EntityRefSchema,
480
529
  observedAt: IsoDateTimeSchema,
481
- metrics: z6.record(z6.string(), z6.number().finite()),
482
- confidence: z6.number().min(0).max(1),
483
- evidenceRefs: z6.array(EntityRefSchema).min(1)
530
+ metrics: z7.record(z7.string(), z7.number().finite()),
531
+ confidence: z7.number().min(0).max(1),
532
+ evidenceRefs: z7.array(EntityRefSchema).min(1)
484
533
  }).strict();
485
- var RadarScoreModelBodySchema = z6.object({
486
- contract: z6.literal("RadarScoreModelBody"),
534
+ var RadarScoreModelBodySchema = z7.object({
535
+ contract: z7.literal("RadarScoreModelBody"),
487
536
  modelId: ContractIdentifierSchema,
488
- version: z6.number().int().positive(),
537
+ version: z7.number().int().positive(),
489
538
  weights: RadarDecisionMetricsSchema,
490
- thresholds: z6.record(z6.string(), z6.number().finite()).default({}),
491
- explanationRules: z6.record(z6.string(), z6.string().trim().min(1)).default({}),
539
+ thresholds: z7.record(z7.string(), z7.number().finite()).default({}),
540
+ explanationRules: z7.record(z7.string(), z7.string().trim().min(1)).default({}),
492
541
  createdAt: IsoDateTimeSchema
493
542
  }).strict();
494
- var RadarScoreProjectionSchema = z6.object({
495
- contract: z6.literal("RadarScoreProjection"),
543
+ var RadarScoreProjectionSchema = z7.object({
544
+ contract: z7.literal("RadarScoreProjection"),
496
545
  projectionId: ContractIdentifierSchema,
497
546
  subjectRef: EntityRefSchema,
498
547
  modelRef: EntityRefSchema,
499
- totalScore: z6.number().finite(),
548
+ totalScore: z7.number().finite(),
500
549
  dimensions: RadarDecisionMetricsSchema,
501
- evidenceRefs: z6.array(EntityRefSchema).min(1),
550
+ evidenceRefs: z7.array(EntityRefSchema).min(1),
502
551
  freshnessAt: IsoDateTimeSchema
503
552
  }).strict();
504
- var RadarPanoramaNodeSchema = z6.object({
553
+ var RadarPanoramaNodeSchema = z7.object({
505
554
  ref: EntityRefSchema,
506
- label: z6.string().trim().min(1),
507
- categories: z6.array(ContractIdentifierSchema).default([]),
508
- score: z6.number().finite().optional(),
555
+ label: z7.string().trim().min(1),
556
+ categories: z7.array(ContractIdentifierSchema).default([]),
557
+ score: z7.number().finite().optional(),
509
558
  freshnessAt: IsoDateTimeSchema.optional()
510
559
  }).strict();
511
- var RadarPanoramaEdgeSchema = z6.object({
560
+ var RadarPanoramaEdgeSchema = z7.object({
512
561
  sourceRef: EntityRefSchema,
513
562
  targetRef: EntityRefSchema,
514
563
  relation: ContractIdentifierSchema,
515
- evidenceRefs: z6.array(EntityRefSchema).default([])
564
+ evidenceRefs: z7.array(EntityRefSchema).default([])
516
565
  }).strict();
517
- var RadarPanoramaSchema = z6.object({
518
- contract: z6.literal("RadarPanorama"),
519
- nodes: z6.array(RadarPanoramaNodeSchema),
520
- edges: z6.array(RadarPanoramaEdgeSchema),
566
+ var RadarPanoramaSchema = z7.object({
567
+ contract: z7.literal("RadarPanorama"),
568
+ nodes: z7.array(RadarPanoramaNodeSchema),
569
+ edges: z7.array(RadarPanoramaEdgeSchema),
521
570
  generatedAt: IsoDateTimeSchema
522
571
  }).strict();
523
- var BrandGeneticsProfileSchema = z6.object({
524
- contract: z6.literal("BrandGeneticsProfile"),
572
+ var BrandGeneticsProfileSchema = z7.object({
573
+ contract: z7.literal("BrandGeneticsProfile"),
525
574
  brandRef: EntityRefSchema,
526
- categories: z6.array(ContractIdentifierSchema).default([]),
527
- signature: z6.record(ContractIdentifierSchema, z6.number().finite()),
528
- relatedRefs: z6.array(EntityRefSchema).default([]),
529
- evidenceRefs: z6.array(EntityRefSchema).default([]),
575
+ categories: z7.array(ContractIdentifierSchema).default([]),
576
+ signature: z7.record(ContractIdentifierSchema, z7.number().finite()),
577
+ relatedRefs: z7.array(EntityRefSchema).default([]),
578
+ evidenceRefs: z7.array(EntityRefSchema).default([]),
530
579
  computedAt: IsoDateTimeSchema
531
580
  }).strict();
532
- var RadarOpportunityMatrixPointSchema = z6.object({
581
+ var RadarOpportunityMatrixPointSchema = z7.object({
533
582
  subjectRef: EntityRefSchema,
534
- label: z6.string().trim().min(1),
535
- x: z6.number().finite(),
536
- y: z6.number().finite(),
537
- score: z6.number().finite(),
538
- evidenceRefs: z6.array(EntityRefSchema).default([])
539
- }).strict();
540
- var RadarOpportunityMatrixSchema = z6.object({
541
- contract: z6.literal("RadarOpportunityMatrix"),
542
- xMetric: z6.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
543
- yMetric: z6.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
544
- points: z6.array(RadarOpportunityMatrixPointSchema),
583
+ label: z7.string().trim().min(1),
584
+ x: z7.number().finite(),
585
+ y: z7.number().finite(),
586
+ score: z7.number().finite(),
587
+ evidenceRefs: z7.array(EntityRefSchema).default([])
588
+ }).strict();
589
+ var RadarOpportunityMatrixSchema = z7.object({
590
+ contract: z7.literal("RadarOpportunityMatrix"),
591
+ xMetric: z7.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
592
+ yMetric: z7.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
593
+ points: z7.array(RadarOpportunityMatrixPointSchema),
545
594
  computedAt: IsoDateTimeSchema
546
595
  }).strict();
547
- var RadarQueryBodySchema = z6.object({
548
- contract: z6.literal("RadarQueryBody"),
596
+ var RadarQueryBodySchema = z7.object({
597
+ contract: z7.literal("RadarQueryBody"),
549
598
  queryId: ContractIdentifierSchema,
550
- filters: z6.record(z6.string(), JsonValueSchema).default({}),
551
- sort: z6.object({
599
+ filters: z7.record(z7.string(), JsonValueSchema).default({}),
600
+ sort: z7.object({
552
601
  field: ContractIdentifierSchema,
553
- direction: z6.enum(["asc", "desc"])
602
+ direction: z7.enum(["asc", "desc"])
554
603
  }).strict(),
555
- pageSize: z6.number().int().min(1).max(200),
604
+ pageSize: z7.number().int().min(1).max(200),
556
605
  updatedAt: IsoDateTimeSchema
557
606
  }).strict();
558
- var SavedRadarQuerySchema = z6.object({
559
- contract: z6.literal("SavedRadarQuery"),
607
+ var SavedRadarQuerySchema = z7.object({
608
+ contract: z7.literal("SavedRadarQuery"),
560
609
  savedQueryId: ContractIdentifierSchema,
561
610
  teamId: ContractIdentifierSchema,
562
611
  ownerRef: EntityRefSchema,
563
- name: z6.string().trim().min(1),
612
+ name: z7.string().trim().min(1),
564
613
  queryRef: EntityRefSchema,
565
- expectedVersion: z6.number().int().nonnegative(),
614
+ expectedVersion: z7.number().int().nonnegative(),
566
615
  updatedAt: IsoDateTimeSchema
567
616
  }).strict();
568
- var RadarSelectionSchema = z6.object({
569
- contract: z6.literal("RadarSelection"),
617
+ var RadarSelectionSchema = z7.object({
618
+ contract: z7.literal("RadarSelection"),
570
619
  selectionId: ContractIdentifierSchema,
571
620
  teamId: ContractIdentifierSchema,
572
621
  ownerRef: EntityRefSchema,
573
- subjectRefs: z6.array(EntityRefSchema),
574
- status: z6.enum(["stashed", "selected", "rejected", "archived"]),
575
- note: z6.string().optional(),
576
- expectedVersion: z6.number().int().nonnegative(),
622
+ subjectRefs: z7.array(EntityRefSchema),
623
+ status: z7.enum(["stashed", "selected", "rejected", "archived"]),
624
+ note: z7.string().optional(),
625
+ expectedVersion: z7.number().int().nonnegative(),
577
626
  updatedAt: IsoDateTimeSchema
578
627
  }).strict();
579
628
  var versionedRefFields = {
580
629
  id: ContractIdentifierSchema,
581
- version: z6.union([z6.number().int().positive(), z6.string().trim().min(1)]).optional(),
630
+ version: z7.union([z7.number().int().positive(), z7.string().trim().min(1)]).optional(),
582
631
  ownerRepo: ContractIdentifierSchema.optional()
583
632
  };
584
- var TrendRadarCollectionAssetRefSchema = z6.object({
585
- kind: z6.literal("asset"),
633
+ var TrendRadarCollectionAssetRefSchema = z7.object({
634
+ kind: z7.literal("asset"),
586
635
  ...versionedRefFields
587
636
  }).strict();
588
- var TrendRadarCollectionSelectionRefSchema = z6.object({
589
- kind: z6.literal("radar-selection"),
637
+ var TrendRadarCollectionSelectionRefSchema = z7.object({
638
+ kind: z7.literal("radar-selection"),
590
639
  ...versionedRefFields
591
640
  }).strict();
592
- var TrendRadarCollectionRunRefSchema = z6.object({
593
- kind: z6.literal("radar-analysis-run"),
641
+ var TrendRadarCollectionRunRefSchema = z7.object({
642
+ kind: z7.literal("radar-analysis-run"),
594
643
  ...versionedRefFields
595
644
  }).strict();
596
- var TrendRadarCollectionSubjectRefSchema = z6.object({
597
- kind: z6.literal("hotword"),
645
+ var TrendRadarCollectionSubjectRefSchema = z7.object({
646
+ kind: z7.literal("hotword"),
598
647
  ...versionedRefFields
599
648
  }).strict();
600
- var TrendRadarCollectionArtifactRefSchema = z6.object({
601
- kind: z6.literal("artifact"),
649
+ var TrendRadarCollectionArtifactRefSchema = z7.object({
650
+ kind: z7.literal("artifact"),
602
651
  ...versionedRefFields
603
652
  }).strict();
604
- var TrendRadarCollectionRecipeEntrySchema = z6.object({
653
+ var TrendRadarCollectionRecipeEntrySchema = z7.object({
605
654
  subjectRef: TrendRadarCollectionSubjectRefSchema,
606
- label: z6.string().trim().min(1).max(200)
655
+ label: z7.string().trim().min(1).max(200)
607
656
  }).strict();
608
- var TrendRadarCollectionRecipeSchema = z6.object({
609
- category: z6.array(TrendRadarCollectionRecipeEntrySchema),
610
- design: z6.array(TrendRadarCollectionRecipeEntrySchema),
611
- audience: z6.array(TrendRadarCollectionRecipeEntrySchema)
657
+ var TrendRadarCollectionRecipeSchema = z7.object({
658
+ category: z7.array(TrendRadarCollectionRecipeEntrySchema),
659
+ design: z7.array(TrendRadarCollectionRecipeEntrySchema),
660
+ audience: z7.array(TrendRadarCollectionRecipeEntrySchema)
612
661
  }).strict().refine(
613
662
  (recipe) => recipe.category.length + recipe.design.length + recipe.audience.length > 0,
614
663
  "A Trend Radar collection recipe must contain at least one subject."
615
664
  );
616
- var TrendRadarCollectionDecisionAxisSchema = z6.object({
665
+ var TrendRadarCollectionDecisionAxisSchema = z7.object({
617
666
  key: ContractIdentifierSchema,
618
- label: z6.string().trim().min(1).max(200).optional(),
619
- value: z6.number().finite()
620
- }).strict();
621
- var TrendRadarCollectionDecisionProjectionSchema = z6.object({
622
- axes: z6.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
623
- overallScore: z6.number().finite().optional(),
624
- itemRank: z6.number().finite().optional(),
625
- sourceRefs: z6.array(EntityRefSchema).optional(),
626
- outputRefs: z6.array(EntityRefSchema).optional()
667
+ label: z7.string().trim().min(1).max(200).optional(),
668
+ value: z7.number().finite()
669
+ }).strict();
670
+ var TrendRadarCollectionDecisionProjectionSchema = z7.object({
671
+ axes: z7.array(TrendRadarCollectionDecisionAxisSchema).max(32).optional(),
672
+ overallScore: z7.number().finite().optional(),
673
+ itemRank: z7.number().finite().optional(),
674
+ sourceRefs: z7.array(EntityRefSchema).optional(),
675
+ outputRefs: z7.array(EntityRefSchema).optional()
627
676
  }).strict().superRefine((projection, context) => {
628
677
  const hasProjection = Boolean(
629
678
  projection.axes?.length || projection.overallScore !== void 0 || projection.itemRank !== void 0 || projection.sourceRefs?.length || projection.outputRefs?.length
@@ -646,20 +695,20 @@ var TrendRadarCollectionDecisionProjectionSchema = z6.object({
646
695
  seenAxisKeys.add(axis.key);
647
696
  });
648
697
  });
649
- var TrendRadarCollectionArtifactProjectionSchema = z6.object({
698
+ var TrendRadarCollectionArtifactProjectionSchema = z7.object({
650
699
  artifactRef: TrendRadarCollectionArtifactRefSchema,
651
- url: z6.string().url().optional(),
652
- thumbnailUrl: z6.string().url().optional(),
653
- mimeType: z6.string().trim().min(1).optional(),
700
+ url: z7.string().url().optional(),
701
+ thumbnailUrl: z7.string().url().optional(),
702
+ mimeType: z7.string().trim().min(1).optional(),
654
703
  metadata: JsonObjectSchema.optional()
655
704
  }).strict();
656
- var TrendRadarCollectionProjectionWritebackSchema = z6.object({
657
- status: z6.enum(["PENDING", "APPLIED", "FAILED"]),
705
+ var TrendRadarCollectionProjectionWritebackSchema = z7.object({
706
+ status: z7.enum(["PENDING", "APPLIED", "FAILED"]),
658
707
  updatedAt: IsoDateTimeSchema,
659
- error: z6.object({
708
+ error: z7.object({
660
709
  code: ContractIdentifierSchema,
661
- message: z6.string().trim().min(1),
662
- retryable: z6.boolean()
710
+ message: z7.string().trim().min(1),
711
+ retryable: z7.boolean()
663
712
  }).strict().optional()
664
713
  }).strict().superRefine((writeback, context) => {
665
714
  if (writeback.status === "FAILED" && !writeback.error) {
@@ -677,12 +726,12 @@ var TrendRadarCollectionProjectionWritebackSchema = z6.object({
677
726
  });
678
727
  }
679
728
  });
680
- var TrendRadarCollectionItemSchema = z6.object({
681
- contract: z6.literal("TrendRadarCollectionItem"),
682
- schemaVersion: z6.literal(1),
729
+ var TrendRadarCollectionItemSchema = z7.object({
730
+ contract: z7.literal("TrendRadarCollectionItem"),
731
+ schemaVersion: z7.literal(1),
683
732
  selectionRef: TrendRadarCollectionSelectionRefSchema,
684
733
  recipe: TrendRadarCollectionRecipeSchema,
685
- status: z6.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
734
+ status: z7.enum(["SAVED", "QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
686
735
  latestRunRef: TrendRadarCollectionRunRefSchema.optional(),
687
736
  decisionProjection: TrendRadarCollectionDecisionProjectionSchema.optional(),
688
737
  artifactProjection: TrendRadarCollectionArtifactProjectionSchema.optional(),
@@ -690,8 +739,8 @@ var TrendRadarCollectionItemSchema = z6.object({
690
739
  updatedAt: IsoDateTimeSchema,
691
740
  generatedAt: IsoDateTimeSchema.optional()
692
741
  }).strict();
693
- var RadarAnalysisRunSchema = z6.object({
694
- contract: z6.literal("RadarAnalysisRun"),
742
+ var RadarAnalysisRunSchema = z7.object({
743
+ contract: z7.literal("RadarAnalysisRun"),
695
744
  runId: ContractIdentifierSchema,
696
745
  teamId: ContractIdentifierSchema,
697
746
  selectionRef: EntityRefSchema,
@@ -702,79 +751,79 @@ var RadarAnalysisRunSchema = z6.object({
702
751
  collectionAssetRef: TrendRadarCollectionAssetRefSchema.optional(),
703
752
  collectionProjectionWriteback: TrendRadarCollectionProjectionWritebackSchema.optional(),
704
753
  workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
705
- workflowInput: z6.record(z6.string(), JsonValueSchema).default({}),
706
- createDesignProject: z6.boolean().default(true),
707
- designProjectName: z6.string().trim().min(1).max(200).optional(),
754
+ workflowInput: z7.record(z7.string(), JsonValueSchema).default({}),
755
+ createDesignProject: z7.boolean().default(true),
756
+ designProjectName: z7.string().trim().min(1).max(200).optional(),
708
757
  modelRef: EntityRefSchema,
709
758
  requestId: ContractIdentifierSchema,
710
759
  idempotencyKey: ContractIdentifierSchema,
711
- status: z6.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
712
- outputRefs: z6.array(EntityRefSchema).default([]),
713
- error: z6.object({
760
+ status: z7.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
761
+ outputRefs: z7.array(EntityRefSchema).default([]),
762
+ error: z7.object({
714
763
  code: ContractIdentifierSchema,
715
- message: z6.string().trim().min(1),
716
- retryable: z6.boolean()
764
+ message: z7.string().trim().min(1),
765
+ retryable: z7.boolean()
717
766
  }).strict().optional(),
718
767
  startedAt: IsoDateTimeSchema.optional(),
719
768
  completedAt: IsoDateTimeSchema.optional(),
720
769
  createdAt: IsoDateTimeSchema
721
770
  }).strict();
722
- var RadarAnalysisAssetSchema = z6.object({
771
+ var RadarAnalysisAssetSchema = z7.object({
723
772
  artifactRef: EntityRefSchema,
724
773
  kind: ContractIdentifierSchema,
725
- mimeType: z6.string().trim().min(1).optional(),
726
- url: z6.string().url(),
727
- metadata: z6.record(z6.string(), JsonValueSchema).default({}),
774
+ mimeType: z7.string().trim().min(1).optional(),
775
+ url: z7.string().url(),
776
+ metadata: z7.record(z7.string(), JsonValueSchema).default({}),
728
777
  createdAt: IsoDateTimeSchema
729
778
  }).strict();
730
- var RadarAnalysisDetailSchema = z6.object({
731
- contract: z6.literal("RadarAnalysisDetail"),
779
+ var RadarAnalysisDetailSchema = z7.object({
780
+ contract: z7.literal("RadarAnalysisDetail"),
732
781
  run: RadarAnalysisRunSchema,
733
- runVersion: z6.number().int().positive(),
782
+ runVersion: z7.number().int().positive(),
734
783
  selection: RadarSelectionSchema,
735
- outputs: z6.array(OutputRecordSchema),
736
- assets: z6.array(RadarAnalysisAssetSchema),
737
- lineage: z6.array(LineageRecordSchema)
784
+ outputs: z7.array(OutputRecordSchema),
785
+ assets: z7.array(RadarAnalysisAssetSchema),
786
+ lineage: z7.array(LineageRecordSchema)
738
787
  }).strict();
739
- var RadarActionRecordSchema = z6.object({
740
- contract: z6.literal("RadarActionRecord"),
788
+ var RadarActionRecordSchema = z7.object({
789
+ contract: z7.literal("RadarActionRecord"),
741
790
  actionId: ContractIdentifierSchema,
742
791
  teamId: ContractIdentifierSchema,
743
792
  actorRef: EntityRefSchema,
744
- action: z6.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
793
+ action: z7.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
745
794
  targetRef: EntityRefSchema,
746
795
  requestId: ContractIdentifierSchema,
747
796
  idempotencyKey: ContractIdentifierSchema,
748
- expectedVersion: z6.number().int().nonnegative(),
797
+ expectedVersion: z7.number().int().nonnegative(),
749
798
  occurredAt: IsoDateTimeSchema
750
799
  }).strict();
751
- var RadarWritebackRecordSchema = z6.object({
752
- contract: z6.literal("RadarWritebackRecord"),
800
+ var RadarWritebackRecordSchema = z7.object({
801
+ contract: z7.literal("RadarWritebackRecord"),
753
802
  writebackId: ContractIdentifierSchema,
754
803
  actionRef: EntityRefSchema,
755
804
  targetRef: EntityRefSchema,
756
- status: z6.enum(["PENDING", "APPLIED", "FAILED"]),
757
- resultingVersion: z6.number().int().nonnegative().optional(),
758
- error: z6.string().trim().min(1).optional(),
805
+ status: z7.enum(["PENDING", "APPLIED", "FAILED"]),
806
+ resultingVersion: z7.number().int().nonnegative().optional(),
807
+ error: z7.string().trim().min(1).optional(),
759
808
  recordedAt: IsoDateTimeSchema
760
809
  }).strict();
761
810
 
762
811
  // src/contracts/workflow-runtime.ts
763
- import { z as z7 } from "zod";
764
- var WorkflowCatalogEntrySchema = z7.object({
765
- contract: z7.literal("WorkflowCatalogEntry"),
812
+ import { z as z8 } from "zod";
813
+ var WorkflowCatalogEntrySchema = z8.object({
814
+ contract: z8.literal("WorkflowCatalogEntry"),
766
815
  workflowId: ContractIdentifierSchema,
767
816
  teamId: ContractIdentifierSchema,
768
817
  creatorRef: EntityRefSchema,
769
818
  currentDefinitionRef: EntityRefSchema,
770
- lifecycle: z7.enum(["ACTIVE", "DELETED"]),
771
- asset: z7.object({
772
- preset: z7.boolean(),
773
- marketplacePublished: z7.boolean(),
819
+ lifecycle: z8.enum(["ACTIVE", "DELETED"]),
820
+ asset: z8.object({
821
+ preset: z8.boolean(),
822
+ marketplacePublished: z8.boolean(),
774
823
  publishConfig: JsonObjectSchema.optional(),
775
- sort: z7.number().int(),
824
+ sort: z8.number().int(),
776
825
  forkFromRef: EntityRefSchema.optional(),
777
- notAuthorized: z7.boolean()
826
+ notAuthorized: z8.boolean()
778
827
  }).strict(),
779
828
  createdAt: IsoDateTimeSchema,
780
829
  updatedAt: IsoDateTimeSchema,
@@ -809,17 +858,17 @@ var WorkflowCatalogEntrySchema = z7.object({
809
858
  });
810
859
  }
811
860
  });
812
- var WorkflowPublicationSchema = z7.object({
813
- contract: z7.literal("WorkflowPublication"),
861
+ var WorkflowPublicationSchema = z8.object({
862
+ contract: z8.literal("WorkflowPublication"),
814
863
  publicationId: ContractIdentifierSchema,
815
864
  definitionRef: EntityRefSchema,
816
865
  runtimeDefinitionRef: EntityRefSchema,
817
866
  sourceHash: Sha256Schema,
818
867
  compiledHash: Sha256Schema,
819
- status: z7.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
868
+ status: z8.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
820
869
  publisherRef: EntityRefSchema,
821
870
  publishedAt: IsoDateTimeSchema.optional(),
822
- failureReason: z7.string().trim().min(1).optional()
871
+ failureReason: z8.string().trim().min(1).optional()
823
872
  }).strict().superRefine((publication, context) => {
824
873
  if (publication.definitionRef.kind !== "workflow-definition") {
825
874
  context.addIssue({
@@ -850,12 +899,12 @@ var WorkflowPublicationSchema = z7.object({
850
899
  });
851
900
  }
852
901
  });
853
- var WorkflowCompletionCommitSchema = z7.object({
854
- contract: z7.literal("WorkflowCompletionCommit"),
902
+ var WorkflowCompletionCommitSchema = z8.object({
903
+ contract: z8.literal("WorkflowCompletionCommit"),
855
904
  commitId: ContractIdentifierSchema,
856
905
  run: ApplicationRunSchema,
857
- outputs: z7.array(OutputRecordSchema),
858
- artifacts: z7.array(ArtifactManifestSchema),
906
+ outputs: z8.array(OutputRecordSchema),
907
+ artifacts: z8.array(ArtifactManifestSchema),
859
908
  lineage: LineageRecordSchema,
860
909
  completedAt: IsoDateTimeSchema
861
910
  }).strict().superRefine((commit, context) => {
@@ -897,15 +946,15 @@ var WorkflowCompletionCommitSchema = z7.object({
897
946
  }
898
947
  });
899
948
  });
900
- var WorkflowCompletionReceiptSchema = z7.object({
901
- contract: z7.literal("WorkflowCompletionReceipt"),
949
+ var WorkflowCompletionReceiptSchema = z8.object({
950
+ contract: z8.literal("WorkflowCompletionReceipt"),
902
951
  commitId: ContractIdentifierSchema,
903
952
  runRef: EntityRefSchema,
904
- outputRefs: z7.array(EntityRefSchema),
905
- artifactRefs: z7.array(EntityRefSchema),
953
+ outputRefs: z8.array(EntityRefSchema),
954
+ artifactRefs: z8.array(EntityRefSchema),
906
955
  contentHash: Sha256Schema,
907
956
  committedAt: IsoDateTimeSchema,
908
- idempotentReplay: z7.boolean()
957
+ idempotentReplay: z8.boolean()
909
958
  }).strict().superRefine((receipt, context) => {
910
959
  if (receipt.runRef.kind !== "application-run") {
911
960
  context.addIssue({
@@ -960,6 +1009,11 @@ export {
960
1009
  BodyRelationRecordSchema,
961
1010
  ApplicationRunSchema,
962
1011
  ExpiringAccessGrantSchema,
1012
+ DECLARATIVE_PUBLICATION_SCOPE_HEADER,
1013
+ DECLARATIVE_PUBLICATION_SURFACE_HEADER,
1014
+ DeclarativePublicationScopeSchema,
1015
+ DeclarativePublicationVerificationRequestSchema,
1016
+ DeclarativePublicationVerificationSchema,
963
1017
  DeclarativeImportDocumentSchema,
964
1018
  DeclarativeDocumentImportRequestSchema,
965
1019
  DeclarativeDocumentImportIntentSchema,
@@ -1006,4 +1060,4 @@ export {
1006
1060
  WorkflowCompletionCommitSchema,
1007
1061
  WorkflowCompletionReceiptSchema
1008
1062
  };
1009
- //# sourceMappingURL=chunk-WRSX2N7O.mjs.map
1063
+ //# sourceMappingURL=chunk-WYV3EFUS.mjs.map