@lucern/contracts 0.3.0-alpha.10 → 0.3.0-alpha.12

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 (234) hide show
  1. package/dist/api-enums.contract.d.ts +5 -3
  2. package/dist/api-enums.contract.js +14 -12
  3. package/dist/api-enums.contract.js.map +1 -1
  4. package/dist/component-boundary.contract.d.ts +1 -1
  5. package/dist/component-boundary.contract.js +45 -26
  6. package/dist/component-boundary.contract.js.map +1 -1
  7. package/dist/component-host-boundary.contract.d.ts +10 -5
  8. package/dist/component-host-boundary.contract.js +10 -4
  9. package/dist/component-host-boundary.contract.js.map +1 -1
  10. package/dist/{defineTable-CBQ03FXl.d.ts → defineTable-t1wr5wgn.d.ts} +1 -1
  11. package/dist/{dsl-djCRfuWC.d.ts → dsl-DVPthQGY.d.ts} +1 -1
  12. package/dist/dsl.d.ts +2 -2
  13. package/dist/dsl.js.map +1 -1
  14. package/dist/function-registry/beliefs.d.ts +13 -0
  15. package/dist/function-registry/beliefs.js +50 -7
  16. package/dist/function-registry/beliefs.js.map +1 -1
  17. package/dist/function-registry/coding.d.ts +9 -0
  18. package/dist/function-registry/coding.js +117 -8
  19. package/dist/function-registry/coding.js.map +1 -1
  20. package/dist/function-registry/context.d.ts +6 -0
  21. package/dist/function-registry/context.js +50 -7
  22. package/dist/function-registry/context.js.map +1 -1
  23. package/dist/function-registry/contracts.d.ts +6 -0
  24. package/dist/function-registry/contracts.js +50 -7
  25. package/dist/function-registry/contracts.js.map +1 -1
  26. package/dist/function-registry/coordination.d.ts +12 -0
  27. package/dist/function-registry/coordination.js +50 -7
  28. package/dist/function-registry/coordination.js.map +1 -1
  29. package/dist/function-registry/edges.d.ts +9 -0
  30. package/dist/function-registry/edges.js +54 -14
  31. package/dist/function-registry/edges.js.map +1 -1
  32. package/dist/function-registry/evidence.d.ts +11 -0
  33. package/dist/function-registry/evidence.js +53 -11
  34. package/dist/function-registry/evidence.js.map +1 -1
  35. package/dist/function-registry/graph.d.ts +18 -0
  36. package/dist/function-registry/graph.js +50 -7
  37. package/dist/function-registry/graph.js.map +1 -1
  38. package/dist/function-registry/helpers.d.ts +4 -1
  39. package/dist/function-registry/helpers.js +51 -8
  40. package/dist/function-registry/helpers.js.map +1 -1
  41. package/dist/function-registry/identity.d.ts +6 -0
  42. package/dist/function-registry/identity.js +50 -7
  43. package/dist/function-registry/identity.js.map +1 -1
  44. package/dist/function-registry/index.d.ts +8 -320
  45. package/dist/function-registry/index.js +54 -384
  46. package/dist/function-registry/index.js.map +1 -1
  47. package/dist/function-registry/judgments.d.ts +5 -0
  48. package/dist/function-registry/judgments.js +50 -7
  49. package/dist/function-registry/judgments.js.map +1 -1
  50. package/dist/function-registry/legacy.d.ts +4 -0
  51. package/dist/function-registry/legacy.js +50 -7
  52. package/dist/function-registry/legacy.js.map +1 -1
  53. package/dist/function-registry/lenses.d.ts +7 -0
  54. package/dist/function-registry/lenses.js +50 -7
  55. package/dist/function-registry/lenses.js.map +1 -1
  56. package/dist/function-registry/nodes.d.ts +412 -0
  57. package/dist/function-registry/nodes.js +5303 -0
  58. package/dist/function-registry/nodes.js.map +1 -0
  59. package/dist/function-registry/ontologies.d.ts +14 -0
  60. package/dist/function-registry/ontologies.js +50 -7
  61. package/dist/function-registry/ontologies.js.map +1 -1
  62. package/dist/function-registry/pipeline.d.ts +6 -0
  63. package/dist/function-registry/pipeline.js +50 -7
  64. package/dist/function-registry/pipeline.js.map +1 -1
  65. package/dist/function-registry/questions.d.ts +15 -0
  66. package/dist/function-registry/questions.js +50 -7
  67. package/dist/function-registry/questions.js.map +1 -1
  68. package/dist/function-registry/tasks.d.ts +7 -0
  69. package/dist/function-registry/tasks.js +69 -16
  70. package/dist/function-registry/tasks.js.map +1 -1
  71. package/dist/function-registry/topics.d.ts +10 -0
  72. package/dist/function-registry/topics.js +50 -7
  73. package/dist/function-registry/topics.js.map +1 -1
  74. package/dist/function-registry/types.d.ts +5 -1
  75. package/dist/function-registry/worktrees.d.ts +14 -0
  76. package/dist/function-registry/worktrees.js +50 -7
  77. package/dist/function-registry/worktrees.js.map +1 -1
  78. package/dist/gateway.contract.d.ts +3 -0
  79. package/dist/gateway.contract.js.map +1 -1
  80. package/dist/generated/convexSchemas.d.ts +3 -3
  81. package/dist/generated/convexSchemas.js +35 -16
  82. package/dist/generated/convexSchemas.js.map +1 -1
  83. package/dist/generated/infisicalRuntimeEnv.d.ts +70 -0
  84. package/dist/generated/infisicalRuntimeEnv.js +26818 -0
  85. package/dist/generated/infisicalRuntimeEnv.js.map +1 -0
  86. package/dist/generated/lucernGatewayEnv.d.ts +17 -0
  87. package/dist/generated/lucernGatewayEnv.js +38 -0
  88. package/dist/generated/lucernGatewayEnv.js.map +1 -0
  89. package/dist/generated/lucernWebPublicEnv.d.ts +26 -0
  90. package/dist/generated/lucernWebPublicEnv.js +32 -0
  91. package/dist/generated/lucernWebPublicEnv.js.map +1 -0
  92. package/dist/generated/lucernWebServerEnv.d.ts +33 -0
  93. package/dist/generated/lucernWebServerEnv.js +51 -0
  94. package/dist/generated/lucernWebServerEnv.js.map +1 -0
  95. package/dist/generated/schema-manifest.json +1165 -150
  96. package/dist/generated/tableOwnership.d.ts +46 -27
  97. package/dist/generated/tableOwnership.js +64 -26
  98. package/dist/generated/tableOwnership.js.map +1 -1
  99. package/dist/generated/tier-expectations.json +60 -8
  100. package/dist/{index-O09U2xHk.d.ts → index-CM1Pl_vI.d.ts} +3 -3
  101. package/dist/index.d.ts +9 -4
  102. package/dist/index.js +31371 -381
  103. package/dist/index.js.map +1 -1
  104. package/dist/infisical-runtime.contract.d.ts +1623 -3
  105. package/dist/infisical-runtime.contract.js +2819 -12
  106. package/dist/infisical-runtime.contract.js.map +1 -1
  107. package/dist/manifests/infisical-runtime-manifest.d.ts +1550 -3
  108. package/dist/manifests/infisical-runtime-manifest.js +2672 -9
  109. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  110. package/dist/manifests/tenant-client-manifest.d.ts +11 -11
  111. package/dist/manifests/tenant-client-manifest.js +11 -11
  112. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  113. package/dist/mcp-gateway-boundary.contract.d.ts +23 -3
  114. package/dist/mcp-gateway-boundary.contract.js +2 -0
  115. package/dist/mcp-gateway-boundary.contract.js.map +1 -1
  116. package/dist/permit-principal-projection.contract.d.ts +74 -0
  117. package/dist/permit-principal-projection.contract.js +161 -0
  118. package/dist/permit-principal-projection.contract.js.map +1 -0
  119. package/dist/projections/check-convex-args-shape.js +10 -6
  120. package/dist/projections/check-convex-args-shape.js.map +1 -1
  121. package/dist/projections/create-evidence.projection.d.ts +6 -6
  122. package/dist/projections/create-evidence.projection.js +2 -3
  123. package/dist/projections/create-evidence.projection.js.map +1 -1
  124. package/dist/projections/index.d.ts +3 -3
  125. package/dist/projections/index.js +10 -6
  126. package/dist/projections/index.js.map +1 -1
  127. package/dist/projections/list-tasks.projection.d.ts +20 -8
  128. package/dist/projections/list-tasks.projection.js +8 -3
  129. package/dist/projections/list-tasks.projection.js.map +1 -1
  130. package/dist/proof-attestation.json +45 -0
  131. package/dist/schemas/component-table-manifest.d.ts +6 -6
  132. package/dist/schemas/component-table-manifest.js +2 -2
  133. package/dist/schemas/component-table-manifest.js.map +1 -1
  134. package/dist/schemas/index.d.ts +2 -2
  135. package/dist/schemas/index.js +1088 -137
  136. package/dist/schemas/index.js.map +1 -1
  137. package/dist/schemas/manifest.d.ts +2010 -120
  138. package/dist/schemas/manifest.js +1086 -135
  139. package/dist/schemas/manifest.js.map +1 -1
  140. package/dist/schemas/tables/controlPlane/accessControl.d.ts +260 -0
  141. package/dist/schemas/tables/controlPlane/accessControl.js +655 -0
  142. package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -0
  143. package/dist/schemas/tables/{identity → controlPlane}/agent.d.ts +1 -1
  144. package/dist/schemas/tables/{identity → controlPlane}/agent.js +3 -3
  145. package/dist/schemas/tables/controlPlane/agent.js.map +1 -0
  146. package/dist/schemas/tables/{identity → controlPlane}/epistemic.d.ts +1 -1
  147. package/dist/schemas/tables/{identity → controlPlane}/epistemic.js +3 -3
  148. package/dist/schemas/tables/controlPlane/epistemic.js.map +1 -0
  149. package/dist/schemas/tables/{identity → controlPlane}/model.d.ts +1 -1
  150. package/dist/schemas/tables/{identity → controlPlane}/model.js +6 -6
  151. package/dist/schemas/tables/controlPlane/model.js.map +1 -0
  152. package/dist/schemas/tables/{identity → controlPlane}/platform.d.ts +1 -1
  153. package/dist/schemas/tables/{identity → controlPlane}/platform.js +18 -18
  154. package/dist/schemas/tables/controlPlane/platform.js.map +1 -0
  155. package/dist/schemas/tables/{identity → controlPlane}/project.d.ts +1 -1
  156. package/dist/schemas/tables/{identity → controlPlane}/project.js +3 -3
  157. package/dist/schemas/tables/controlPlane/project.js.map +1 -0
  158. package/dist/schemas/tables/{identity → controlPlane}/user.d.ts +1 -1
  159. package/dist/schemas/tables/{identity → controlPlane}/user.js +3 -3
  160. package/dist/schemas/tables/controlPlane/user.js.map +1 -0
  161. package/dist/schemas/tables/kernel/config.d.ts +1 -1
  162. package/dist/schemas/tables/kernel/config.js.map +1 -1
  163. package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
  164. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  165. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  166. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  167. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  168. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  169. package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
  170. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  171. package/dist/schemas/tables/kernel/idempotency.d.ts +1 -1
  172. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  173. package/dist/schemas/tables/kernel/infra.d.ts +1 -1
  174. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  175. package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
  176. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  177. package/dist/schemas/tables/kernel/lens.d.ts +1 -1
  178. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  179. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  180. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  181. package/dist/schemas/tables/kernel/platform.d.ts +1 -1
  182. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  183. package/dist/schemas/tables/kernel/spine.d.ts +2 -1
  184. package/dist/schemas/tables/kernel/spine.js +1 -0
  185. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  186. package/dist/schemas/tables/kernel/task.d.ts +1 -1
  187. package/dist/schemas/tables/kernel/task.js.map +1 -1
  188. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  189. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  190. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  191. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  192. package/dist/schemas/tables/kernel/worktree.d.ts +5 -5
  193. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  194. package/dist/schemas/tables/mc/identity.d.ts +19 -2
  195. package/dist/schemas/tables/mc/identity.js +32 -1
  196. package/dist/schemas/tables/mc/identity.js.map +1 -1
  197. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  198. package/dist/schemas/tables/mc/methodology.js.map +1 -1
  199. package/dist/schemas/tables/mc/pack.d.ts +1 -1
  200. package/dist/schemas/tables/mc/pack.js.map +1 -1
  201. package/dist/schemas/tables/mc/policy.d.ts +2 -2
  202. package/dist/schemas/tables/mc/policy.js +1 -1
  203. package/dist/schemas/tables/mc/policy.js.map +1 -1
  204. package/dist/schemas/tables/mc/registry.d.ts +1 -1
  205. package/dist/schemas/tables/mc/registry.js.map +1 -1
  206. package/dist/schemas/tables/mc/runtime.d.ts +109 -3
  207. package/dist/schemas/tables/mc/runtime.js +330 -104
  208. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  209. package/dist/schemas/tables/mc/tenant.d.ts +3 -2
  210. package/dist/schemas/tables/mc/tenant.js +2 -1
  211. package/dist/schemas/tables/mc/tenant.js.map +1 -1
  212. package/dist/schemas/tables/mc/workspace.d.ts +22 -5
  213. package/dist/schemas/tables/mc/workspace.js +34 -2
  214. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  215. package/dist/sdk-tools.contract.js +26 -1
  216. package/dist/sdk-tools.contract.js.map +1 -1
  217. package/dist/tenant-bootstrap-seed.contract.d.ts +226 -58
  218. package/dist/tenant-bootstrap-seed.contract.js +126 -28
  219. package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
  220. package/dist/tenant-bootstrap-seed.defaults.d.ts +1 -1
  221. package/dist/tenant-bootstrap-seed.defaults.js +1 -1
  222. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
  223. package/dist/tenant-client.contract.d.ts +12 -12
  224. package/dist/tenant-client.contract.js +11 -11
  225. package/dist/tenant-client.contract.js.map +1 -1
  226. package/dist/tool-contracts.js +26 -1
  227. package/dist/tool-contracts.js.map +1 -1
  228. package/package.json +22 -1
  229. package/dist/schemas/tables/identity/agent.js.map +0 -1
  230. package/dist/schemas/tables/identity/epistemic.js.map +0 -1
  231. package/dist/schemas/tables/identity/model.js.map +0 -1
  232. package/dist/schemas/tables/identity/platform.js.map +0 -1
  233. package/dist/schemas/tables/identity/project.js.map +0 -1
  234. package/dist/schemas/tables/identity/user.js.map +0 -1
@@ -19,10 +19,10 @@ var TENANT_BOOTSTRAP_SEED_COMPONENTS = {
19
19
  prod: "cool-badger-368"
20
20
  }
21
21
  },
22
- identity: {
23
- componentName: "identity",
24
- migrationModule: "migration",
25
- templateService: "services/identity-template",
22
+ "control-plane": {
23
+ componentName: "controlPlane",
24
+ migrationModule: "dist/migration",
25
+ templateService: "services/control-plane-template",
26
26
  templateDeployments: {
27
27
  staging: "industrious-cheetah-864",
28
28
  prod: "combative-beagle-879"
@@ -431,14 +431,14 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
431
431
  description: "Worktrees are tenant/runtime planning data."
432
432
  },
433
433
  {
434
- component: "identity",
434
+ component: "control-plane",
435
435
  table: "agents",
436
436
  prepopulation: "runtime_bootstrap",
437
437
  copyMode: "none",
438
438
  description: "Service agents are provisioned per tenant or service, not copied."
439
439
  },
440
440
  {
441
- component: "identity",
441
+ component: "control-plane",
442
442
  table: "mcpWritePolicy",
443
443
  prepopulation: "required_template",
444
444
  copyMode: "template_global",
@@ -447,14 +447,14 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
447
447
  description: "Global write policy defaults govern service and interactive MCP writes."
448
448
  },
449
449
  {
450
- component: "identity",
450
+ component: "control-plane",
451
451
  table: "modelCallLogs",
452
452
  prepopulation: "runtime_log",
453
453
  copyMode: "none",
454
454
  description: "Model call logs are runtime telemetry."
455
455
  },
456
456
  {
457
- component: "identity",
457
+ component: "control-plane",
458
458
  table: "modelFunctionSlots",
459
459
  prepopulation: "required_template",
460
460
  copyMode: "template_global",
@@ -463,7 +463,7 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
463
463
  description: "Function-to-model slots are required by model runtime resolution."
464
464
  },
465
465
  {
466
- component: "identity",
466
+ component: "control-plane",
467
467
  table: "modelRegistry",
468
468
  prepopulation: "required_template",
469
469
  copyMode: "template_global",
@@ -472,7 +472,7 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
472
472
  description: "Model catalog defaults are required by model runtime clients."
473
473
  },
474
474
  {
475
- component: "identity",
475
+ component: "control-plane",
476
476
  table: "modelSlotConfigs",
477
477
  prepopulation: "required_template",
478
478
  copyMode: "template_global",
@@ -481,14 +481,105 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
481
481
  description: "Slot-level defaults are required before tenant overrides exist."
482
482
  },
483
483
  {
484
- component: "identity",
484
+ component: "control-plane",
485
+ table: "permitAccessReviewItems",
486
+ prepopulation: "runtime_data",
487
+ copyMode: "none",
488
+ description: "Permit access-review item rows are tenant review data projected from Permit."
489
+ },
490
+ {
491
+ component: "control-plane",
492
+ table: "permitAccessReviews",
493
+ prepopulation: "runtime_data",
494
+ copyMode: "none",
495
+ description: "Permit access-review campaigns are tenant review data projected from Permit."
496
+ },
497
+ {
498
+ component: "control-plane",
499
+ table: "permitAttributeBindings",
500
+ prepopulation: "runtime_data",
501
+ copyMode: "none",
502
+ description: "Permit ABAC attribute bindings are tenant policy projection rows."
503
+ },
504
+ {
505
+ component: "control-plane",
506
+ table: "permitGroups",
507
+ prepopulation: "runtime_data",
508
+ copyMode: "none",
509
+ description: "Permit groups are tenant-defined policy subjects, not template data."
510
+ },
511
+ {
512
+ component: "control-plane",
513
+ table: "permitGroupMemberships",
514
+ prepopulation: "runtime_data",
515
+ copyMode: "none",
516
+ description: "Permit group memberships are tenant-specific policy projection rows."
517
+ },
518
+ {
519
+ component: "control-plane",
520
+ table: "permitPolicyBundles",
521
+ prepopulation: "runtime_derived",
522
+ copyMode: "none",
523
+ description: "Permit policy bundles are derived from the Permit control plane."
524
+ },
525
+ {
526
+ component: "control-plane",
527
+ table: "permitPolicyDecisionReceipts",
528
+ prepopulation: "runtime_log",
529
+ copyMode: "none",
530
+ description: "Permit decision receipts are runtime authorization audit logs."
531
+ },
532
+ {
533
+ component: "control-plane",
534
+ table: "permitPrincipalAliases",
535
+ prepopulation: "runtime_data",
536
+ copyMode: "none",
537
+ description: "Permit principal aliases are tenant-specific identity projection rows."
538
+ },
539
+ {
540
+ component: "control-plane",
541
+ table: "permitPrincipals",
542
+ prepopulation: "runtime_data",
543
+ copyMode: "none",
544
+ description: "Permit principals are projected from Clerk, Permit, and tenant onboarding flows."
545
+ },
546
+ {
547
+ component: "control-plane",
548
+ table: "permitProjectionOutbox",
549
+ prepopulation: "runtime_queue",
550
+ copyMode: "none",
551
+ description: "Permit projection outbox rows are runtime sync queue data."
552
+ },
553
+ {
554
+ component: "control-plane",
555
+ table: "permitRelationshipTuples",
556
+ prepopulation: "runtime_data",
557
+ copyMode: "none",
558
+ description: "Permit ReBAC relationship tuples are tenant policy projection rows."
559
+ },
560
+ {
561
+ component: "control-plane",
562
+ table: "permitResourceInstances",
563
+ prepopulation: "runtime_data",
564
+ copyMode: "none",
565
+ description: "Permit resource instances are tenant/workspace graph and deployment projection rows."
566
+ },
567
+ {
568
+ component: "control-plane",
569
+ table: "permitRoleAssignments",
570
+ prepopulation: "runtime_data",
571
+ copyMode: "none",
572
+ description: "Permit role assignments are tenant-specific policy projection rows."
573
+ },
574
+ {
575
+ component: "control-plane",
485
576
  table: "platformAudienceGrants",
486
577
  prepopulation: "runtime_data",
487
578
  copyMode: "none",
488
579
  description: "Audience grants are principal/group-specific access rows."
489
580
  },
490
581
  {
491
- component: "identity",
582
+ component: "control-plane",
492
583
  table: "platformAudiences",
493
584
  prepopulation: "required_template",
494
585
  copyMode: "template_tenant_rewrite",
@@ -497,35 +588,35 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
497
588
  description: "Default tenant audience taxonomy rows are rewritten into each tenant."
498
589
  },
499
590
  {
500
- component: "identity",
591
+ component: "control-plane",
501
592
  table: "platformPolicyDecisionLogs",
502
593
  prepopulation: "runtime_log",
503
594
  copyMode: "none",
504
595
  description: "Policy decisions are runtime audit logs."
505
596
  },
506
597
  {
507
- component: "identity",
598
+ component: "control-plane",
508
599
  table: "projectGrants",
509
600
  prepopulation: "runtime_data",
510
601
  copyMode: "none",
511
602
  description: "Project/topic grants are principal or group-specific access rows."
512
603
  },
513
604
  {
514
- component: "identity",
605
+ component: "control-plane",
515
606
  table: "reasoningPermissions",
516
607
  prepopulation: "runtime_data",
517
608
  copyMode: "none",
518
609
  description: "Reasoning permissions are principal-specific policy rows."
519
610
  },
520
611
  {
521
- component: "identity",
612
+ component: "control-plane",
522
613
  table: "tenantApiKeys",
523
614
  prepopulation: "runtime_secret",
524
615
  copyMode: "none",
525
616
  description: "API keys are tenant credentials and must never be copied."
526
617
  },
527
618
  {
528
- component: "identity",
619
+ component: "control-plane",
529
620
  table: "tenantConfig",
530
621
  prepopulation: "required_template",
531
622
  copyMode: "template_tenant_rewrite",
@@ -534,7 +625,7 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
534
625
  description: "Tenant-local config defaults are rewritten during bootstrap."
535
626
  },
536
627
  {
537
- component: "identity",
628
+ component: "control-plane",
538
629
  table: "tenantIntegrations",
539
630
  prepopulation: "required_template",
540
631
  copyMode: "template_tenant_rewrite",
@@ -543,14 +634,21 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
543
634
  description: "Non-secret integration descriptors are rewritten into each tenant."
544
635
  },
545
636
  {
546
- component: "identity",
637
+ component: "control-plane",
547
638
  table: "tenantModelSlotBindings",
548
639
  prepopulation: "runtime_secret",
549
640
  copyMode: "none",
550
641
  description: "Tenant model slot bindings reference provider secrets and are runtime-only."
551
642
  },
552
643
  {
553
- component: "identity",
644
+ component: "control-plane",
645
+ table: "tenantPermitSyncStates",
646
+ prepopulation: "runtime_derived",
647
+ copyMode: "none",
648
+ description: "Tenant Permit sync state rows are runtime reconciliation state."
649
+ },
650
+ {
651
+ component: "control-plane",
554
652
  table: "tenantPolicies",
555
653
  prepopulation: "required_template",
556
654
  copyMode: "template_tenant_rewrite",
@@ -559,42 +657,42 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
559
657
  description: "Default tenant policy roles are rewritten during bootstrap."
560
658
  },
561
659
  {
562
- component: "identity",
660
+ component: "control-plane",
563
661
  table: "tenantProviderSecrets",
564
662
  prepopulation: "runtime_secret",
565
663
  copyMode: "none",
566
664
  description: "Provider secrets are credentials and must never be copied."
567
665
  },
568
666
  {
569
- component: "identity",
667
+ component: "control-plane",
570
668
  table: "tenantProxyGatewayUsage",
571
669
  prepopulation: "runtime_log",
572
670
  copyMode: "none",
573
671
  description: "Proxy gateway usage rows are runtime telemetry."
574
672
  },
575
673
  {
576
- component: "identity",
674
+ component: "control-plane",
577
675
  table: "tenantProxyTokenMints",
578
676
  prepopulation: "runtime_secret",
579
677
  copyMode: "none",
580
678
  description: "Proxy token mints are ephemeral secret-bearing runtime rows."
581
679
  },
582
680
  {
583
- component: "identity",
681
+ component: "control-plane",
584
682
  table: "tenantSandboxAuditEvents",
585
683
  prepopulation: "runtime_log",
586
684
  copyMode: "none",
587
685
  description: "Sandbox audit rows are runtime security logs."
588
686
  },
589
687
  {
590
- component: "identity",
688
+ component: "control-plane",
591
689
  table: "tenantSecrets",
592
690
  prepopulation: "runtime_secret",
593
691
  copyMode: "none",
594
692
  description: "Tenant secrets are credentials and must never be copied."
595
693
  },
596
694
  {
597
- component: "identity",
695
+ component: "control-plane",
598
696
  table: "toolAcls",
599
697
  prepopulation: "required_template",
600
698
  copyMode: "template_global",
@@ -603,7 +701,7 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
603
701
  description: "Default role-to-tool grants are required for SDK/MCP tool access."
604
702
  },
605
703
  {
606
- component: "identity",
704
+ component: "control-plane",
607
705
  table: "toolRegistry",
608
706
  prepopulation: "required_template",
609
707
  copyMode: "template_global",
@@ -612,7 +710,7 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
612
710
  description: "Core tool catalog rows are required before pack or tenant tools exist."
613
711
  },
614
712
  {
615
- component: "identity",
713
+ component: "control-plane",
616
714
  table: "users",
617
715
  prepopulation: "runtime_bootstrap",
618
716
  copyMode: "none",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tenant-bootstrap-seed.contract.ts"],"names":[],"mappings":";AAUO,IAAM,sCAAA,GAAyC;AAE/C,IAAM,0CAAA,GAA6C;AAAA,EACxD,UAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF;AAIO,IAAM,gCAAA,GAAmC;AAAA,EAC9C,MAAA,EAAQ;AAAA,IACN,aAAA,EAAe,QAAA;AAAA,IACf,eAAA,EAAiB,oBAAA;AAAA,IACjB,eAAA,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CAAA,CAAoC,MAAA;AAAA,EAClC,CAAC,KAAA,KAAU,CAAC,yBAAA,CAA0B,KAAK;AAC7C,CAAA,CAAE,GAAA,CAAI,CAAC,KAAA,KAAU,KAAA,CAAM,KAAK;AAIvB,IAAM,8BAAA,GAAiC;AAAA,EAC5C,eAAA,EAAiB,sCAAA;AAAA,EACjB,kBAAA,EAAoB,0CAAA;AAAA,EACpB,UAAA,EAAY,gCAAA;AAAA,EACZ,iBAAA,EAAmB,mCAAA;AAAA,EACnB,MAAA,EAAQ,4BAAA;AAAA,EACR,eAAA,EAAiB;AACnB;AAEO,SAAS,oCACd,KAAA,EAC6C;AAC7C,EAAA,OAAO,mCAAA,CAAoC,IAAA;AAAA,IACzC,CAAC,KAAA,KAAU,KAAA,CAAM,KAAA,KAAU;AAAA,GAC7B;AACF;AAEO,SAAS,6BACd,KAAA,EACsC;AACtC,EAAA,OAAO,6BAA6B,IAAA,CAAK,CAAC,KAAA,KAAU,KAAA,CAAM,UAAU,KAAK,CAAA;AAC3E;AAEO,SAAS,2BAA2B,KAAA,EAAwB;AACjE,EAAA,OAAO,OAAA,CAAQ,4BAAA,CAA6B,KAAK,CAAC,CAAA;AACpD;AAEO,SAAS,oCAAoC,KAAA,EAAwB;AAC1E,EAAA,OAAO,sCAAA,CAAuC,IAAA,CAAK,CAAC,KAAA,KAAU,UAAU,KAAK,CAAA;AAC/E","file":"tenant-bootstrap-seed.contract.js","sourcesContent":["/**\n * Tenant bootstrap seed contract.\n *\n * Fresh tenant deployments install the Lucern kernel and identity components\n * from npm, then copy canonical template rows for non-secret runtime defaults.\n * This contract is intentionally exhaustive for the K/I tables: it separates\n * rows that must be carried by the template deployments from rows that are\n * runtime data, runtime credentials, logs, queues, or derived caches.\n */\n\nexport const TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION = \"2026-04-30\" as const;\n\nexport const TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS = [\n \"tenantId\",\n \"workspaceId\",\n \"principalId\",\n \"role\",\n \"authMode\",\n \"correlationId\",\n \"auditMetadata\",\n] as const;\nexport type TenantBootstrapSeedAuthMetadataField =\n (typeof TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS)[number];\n\nexport const TENANT_BOOTSTRAP_SEED_COMPONENTS = {\n kernel: {\n componentName: \"lucern\",\n migrationModule: \"adapters/migration\",\n templateService: \"services/kernel-template\",\n templateDeployments: {\n staging: \"kindly-goldfish-162\",\n prod: \"cool-badger-368\",\n },\n },\n identity: {\n componentName: \"identity\",\n migrationModule: \"migration\",\n templateService: \"services/identity-template\",\n templateDeployments: {\n staging: \"industrious-cheetah-864\",\n prod: \"combative-beagle-879\",\n },\n },\n} as const;\nexport type TenantBootstrapSeedComponent =\n keyof typeof TENANT_BOOTSTRAP_SEED_COMPONENTS;\n\nexport type TenantBootstrapSeedScope = \"global\" | \"tenant\";\n\nexport type TenantBootstrapPrepopulation =\n | \"required_template\"\n | \"optional_template\"\n | \"runtime_bootstrap\"\n | \"runtime_data\"\n | \"runtime_log\"\n | \"runtime_secret\"\n | \"runtime_derived\"\n | \"runtime_queue\";\n\nexport type TenantBootstrapCopyMode =\n | \"template_global\"\n | \"template_tenant_rewrite\"\n | \"template_reference_remap\"\n | \"none\";\n\nexport type TenantBootstrapTableRequirement = {\n component: TenantBootstrapSeedComponent;\n table: string;\n prepopulation: TenantBootstrapPrepopulation;\n copyMode: TenantBootstrapCopyMode;\n scope?: TenantBootstrapSeedScope;\n uniqueKey?: readonly string[];\n dependsOn?: readonly string[];\n description: string;\n};\n\nexport type TenantBootstrapSeedTable = TenantBootstrapTableRequirement & {\n copyMode:\n | \"template_global\"\n | \"template_tenant_rewrite\"\n | \"template_reference_remap\";\n scope: TenantBootstrapSeedScope;\n uniqueKey: readonly string[];\n};\n\nfunction isCopyableSeedRequirement(\n entry: TenantBootstrapTableRequirement\n): entry is TenantBootstrapSeedTable {\n return (\n (entry.copyMode === \"template_global\" ||\n entry.copyMode === \"template_tenant_rewrite\" ||\n entry.copyMode === \"template_reference_remap\") &&\n Boolean(entry.scope) &&\n Array.isArray(entry.uniqueKey) &&\n entry.uniqueKey.length > 0\n );\n}\n\nexport const TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [\n {\n component: \"kernel\",\n table: \"agentMessages\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Agent coordination messages are session data, not template data.\",\n },\n {\n component: \"kernel\",\n table: \"agentSessions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Agent coordination sessions are created by active clients.\",\n },\n {\n component: \"kernel\",\n table: \"autofixJobs\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Autofix work items are runtime queue rows.\",\n },\n {\n component: \"kernel\",\n table: \"backgroundJobRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Background job executions are runtime logs.\",\n },\n {\n component: \"kernel\",\n table: \"backgroundJobSettings\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"jobKey\"],\n description: \"Default job enablement settings must come from the K template.\",\n },\n {\n component: \"kernel\",\n table: \"beliefConfidence\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief confidence rows are created with tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"beliefEvidenceLinks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief-to-evidence links are tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefHistory\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief history is append-only tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefScenarios\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Scenario rows are tenant-authored reasoning data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefVotes\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision belief votes are tenant-authored data.\",\n },\n {\n component: \"kernel\",\n table: \"calibrationScores\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Calibration scores are computed from tenant outcomes.\",\n },\n {\n component: \"kernel\",\n table: \"contractEvaluations\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Contract evaluation rows are runtime computation logs.\",\n },\n {\n component: \"kernel\",\n table: \"contradictions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Contradictions are tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"crossProjectConnections\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Cross-topic connections are tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"decisionComputedSummaries\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Decision summaries are derived tenant outputs.\",\n },\n {\n component: \"kernel\",\n table: \"decisionEvents\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision events are lifecycle data.\",\n },\n {\n component: \"kernel\",\n table: \"decisionParticipants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision participants are tenant-selected actors.\",\n },\n {\n component: \"kernel\",\n table: \"decisionRiskLedger\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision risk rows are tenant decision data.\",\n },\n {\n component: \"kernel\",\n table: \"decisionSnapshots\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Decision snapshots are derived from tenant state.\",\n },\n {\n component: \"kernel\",\n table: \"deliberationContributions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Deliberation contributions are tenant-authored data.\",\n },\n {\n component: \"kernel\",\n table: \"deliberationSessions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Deliberation sessions are created by tenant workflows.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicAudit\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Epistemic audit rows are append-only runtime audit data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicContracts\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Epistemic contracts are tenant-authored governance data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicEdges\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Edges are tenant reasoning graph data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicNodeEmbeddings\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Embeddings are derived from tenant graph nodes.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicNodes\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Nodes are tenant reasoning graph data.\",\n },\n {\n component: \"kernel\",\n table: \"graphAnalysisCache\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph analysis cache rows are derived from tenant graph state.\",\n },\n {\n component: \"kernel\",\n table: \"graphAnalysisResults\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph analysis result rows are derived tenant outputs.\",\n },\n {\n component: \"kernel\",\n table: \"graphSuggestions\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph suggestions are derived recommendations.\",\n },\n {\n component: \"kernel\",\n table: \"harnessReplays\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness replay rows are runtime verification logs.\",\n },\n {\n component: \"kernel\",\n table: \"harnessRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness run rows are runtime verification logs.\",\n },\n {\n component: \"kernel\",\n table: \"idempotencyTokens\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Idempotency tokens are request-scoped runtime guards.\",\n },\n {\n component: \"kernel\",\n table: \"lenses\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n description:\n \"Reusable lens templates may live in K templates, but workspace-specific copies are not required for core SDK boot.\",\n },\n {\n component: \"kernel\",\n table: \"lensTopicBindings\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Lens bindings attach runtime topics to runtime/workspace lenses.\",\n },\n {\n component: \"kernel\",\n table: \"neo4jSyncQueue\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Neo4j sync queue rows are runtime work items.\",\n },\n {\n component: \"kernel\",\n table: \"ontologyDefinitions\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"ontologyKey\"],\n description: \"Platform ontology definitions power taxonomy reads and effective ontology resolution.\",\n },\n {\n component: \"kernel\",\n table: \"ontologyVersions\",\n prepopulation: \"required_template\",\n copyMode: \"template_reference_remap\",\n scope: \"global\",\n uniqueKey: [\"ontologyKey\", \"version\"],\n dependsOn: [\"ontologyDefinitions\"],\n description: \"Ontology versions must be copied with ontologyDefinition ID remapping.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunPolicyDecisions\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run policy decisions are audit logs.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunPromptResolutions\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run prompt resolution rows are runtime logs.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent runs are runtime execution records.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunToolCalls\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run tool calls are runtime execution records.\",\n },\n {\n component: \"kernel\",\n table: \"platformHarnessShadowAudit\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness shadow audit rows are runtime audit records.\",\n },\n {\n component: \"kernel\",\n table: \"publicationRules\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"name\"],\n description: \"Default publication policy rules are rewritten into each tenant.\",\n },\n {\n component: \"kernel\",\n table: \"questionEvidenceLinks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Question-to-evidence links are tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"researchJobs\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Research job rows are runtime queue items.\",\n },\n {\n component: \"kernel\",\n table: \"schemaEnumConfig\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"category\", \"value\"],\n description: \"Runtime-extensible enum defaults required by SDK graph APIs.\",\n },\n {\n component: \"kernel\",\n table: \"stakeholderGroups\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Stakeholder groups are tenant decision data.\",\n },\n {\n component: \"kernel\",\n table: \"systemLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"System logs are runtime telemetry.\",\n },\n {\n component: \"kernel\",\n table: \"tasks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Tasks are tenant-authored work items.\",\n },\n {\n component: \"kernel\",\n table: \"topics\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Default topics are created by tenant provisioning, not copied from templates.\",\n },\n {\n component: \"kernel\",\n table: \"workflowDefinitions\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n description:\n \"Table-driven workflow definitions can be template data after the workflow engine leaves legacy mode.\",\n },\n {\n component: \"kernel\",\n table: \"workflowPullRequests\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Workflow pull requests are tenant workflow data.\",\n },\n {\n component: \"kernel\",\n table: \"workflowStages\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n dependsOn: [\"workflowDefinitions\"],\n description:\n \"Workflow stages can be template data after workflowDefinitions are enabled for bootstrap copying.\",\n },\n {\n component: \"kernel\",\n table: \"worktreeBeliefCluster\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Worktree cluster rows link runtime worktrees to runtime beliefs.\",\n },\n {\n component: \"kernel\",\n table: \"worktrees\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Worktrees are tenant/runtime planning data.\",\n },\n {\n component: \"identity\",\n table: \"agents\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Service agents are provisioned per tenant or service, not copied.\",\n },\n {\n component: \"identity\",\n table: \"mcpWritePolicy\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"topicId\", \"role\", \"toolCategory\"],\n description: \"Global write policy defaults govern service and interactive MCP writes.\",\n },\n {\n component: \"identity\",\n table: \"modelCallLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Model call logs are runtime telemetry.\",\n },\n {\n component: \"identity\",\n table: \"modelFunctionSlots\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"slot\"],\n description: \"Function-to-model slots are required by model runtime resolution.\",\n },\n {\n component: \"identity\",\n table: \"modelRegistry\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"key\"],\n description: \"Model catalog defaults are required by model runtime clients.\",\n },\n {\n component: \"identity\",\n table: \"modelSlotConfigs\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"slot\"],\n description: \"Slot-level defaults are required before tenant overrides exist.\",\n },\n {\n component: \"identity\",\n table: \"platformAudienceGrants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Audience grants are principal/group-specific access rows.\",\n },\n {\n component: \"identity\",\n table: \"platformAudiences\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"audienceKey\"],\n description: \"Default tenant audience taxonomy rows are rewritten into each tenant.\",\n },\n {\n component: \"identity\",\n table: \"platformPolicyDecisionLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Policy decisions are runtime audit logs.\",\n },\n {\n component: \"identity\",\n table: \"projectGrants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Project/topic grants are principal or group-specific access rows.\",\n },\n {\n component: \"identity\",\n table: \"reasoningPermissions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Reasoning permissions are principal-specific policy rows.\",\n },\n {\n component: \"identity\",\n table: \"tenantApiKeys\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"API keys are tenant credentials and must never be copied.\",\n },\n {\n component: \"identity\",\n table: \"tenantConfig\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\"],\n description: \"Tenant-local config defaults are rewritten during bootstrap.\",\n },\n {\n component: \"identity\",\n table: \"tenantIntegrations\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"integrationKey\"],\n description: \"Non-secret integration descriptors are rewritten into each tenant.\",\n },\n {\n component: \"identity\",\n table: \"tenantModelSlotBindings\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Tenant model slot bindings reference provider secrets and are runtime-only.\",\n },\n {\n component: \"identity\",\n table: \"tenantPolicies\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"roleName\"],\n description: \"Default tenant policy roles are rewritten during bootstrap.\",\n },\n {\n component: \"identity\",\n table: \"tenantProviderSecrets\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Provider secrets are credentials and must never be copied.\",\n },\n {\n component: \"identity\",\n table: \"tenantProxyGatewayUsage\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Proxy gateway usage rows are runtime telemetry.\",\n },\n {\n component: \"identity\",\n table: \"tenantProxyTokenMints\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Proxy token mints are ephemeral secret-bearing runtime rows.\",\n },\n {\n component: \"identity\",\n table: \"tenantSandboxAuditEvents\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Sandbox audit rows are runtime security logs.\",\n },\n {\n component: \"identity\",\n table: \"tenantSecrets\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Tenant secrets are credentials and must never be copied.\",\n },\n {\n component: \"identity\",\n table: \"toolAcls\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"role\", \"toolName\"],\n description: \"Default role-to-tool grants are required for SDK/MCP tool access.\",\n },\n {\n component: \"identity\",\n table: \"toolRegistry\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"toolName\"],\n description: \"Core tool catalog rows are required before pack or tenant tools exist.\",\n },\n {\n component: \"identity\",\n table: \"users\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Users are created from Clerk/MC principal resolution, not copied.\",\n },\n] as const satisfies readonly TenantBootstrapTableRequirement[];\n\nexport const TENANT_BOOTSTRAP_SEED_TABLES =\n TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(\n isCopyableSeedRequirement\n ) as readonly TenantBootstrapSeedTable[];\n\nexport type TenantBootstrapSeedTableName =\n (typeof TENANT_BOOTSTRAP_SEED_TABLES)[number][\"table\"];\n\nexport const TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES =\n TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(\n (entry) => !isCopyableSeedRequirement(entry)\n ).map((entry) => entry.table) as readonly string[];\nexport type TenantBootstrapForbiddenSeedTable =\n (typeof TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES)[number];\n\nexport const TENANT_BOOTSTRAP_SEED_MANIFEST = {\n contractVersion: TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION,\n authMetadataFields: TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS,\n components: TENANT_BOOTSTRAP_SEED_COMPONENTS,\n tableRequirements: TENANT_BOOTSTRAP_TABLE_REQUIREMENTS,\n tables: TENANT_BOOTSTRAP_SEED_TABLES,\n forbiddenTables: TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES,\n} as const;\n\nexport function findTenantBootstrapTableRequirement(\n table: string\n): TenantBootstrapTableRequirement | undefined {\n return TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.find(\n (entry) => entry.table === table\n );\n}\n\nexport function findTenantBootstrapSeedTable(\n table: string\n): TenantBootstrapSeedTable | undefined {\n return TENANT_BOOTSTRAP_SEED_TABLES.find((entry) => entry.table === table);\n}\n\nexport function isTenantBootstrapSeedTable(table: string): boolean {\n return Boolean(findTenantBootstrapSeedTable(table));\n}\n\nexport function isTenantBootstrapForbiddenSeedTable(table: string): boolean {\n return TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES.some((entry) => entry === table);\n}\n"]}
1
+ {"version":3,"sources":["../src/tenant-bootstrap-seed.contract.ts"],"names":[],"mappings":";AAUO,IAAM,sCAAA,GAAyC;AAE/C,IAAM,0CAAA,GAA6C;AAAA,EACxD,UAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,MAAA;AAAA,EACA,UAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF;AAIO,IAAM,gCAAA,GAAmC;AAAA,EAC9C,MAAA,EAAQ;AAAA,IACN,aAAA,EAAe,QAAA;AAAA,IACf,eAAA,EAAiB,oBAAA;AAAA,IACjB,eAAA,EAAiB,0BAAA;AAAA,IACjB,mBAAA,EAAqB;AAAA,MACnB,OAAA,EAAS,qBAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,aAAA,EAAe,cAAA;AAAA,IACf,eAAA,EAAiB,gBAAA;AAAA,IACjB,eAAA,EAAiB,iCAAA;AAAA,IACjB,mBAAA,EAAq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KAAA,KAAU,KAAA,CAAM,KAAA,KAAU;AAAA,GAC7B;AACF;AAEO,SAAS,6BACd,KAAA,EACsC;AACtC,EAAA,OAAO,6BAA6B,IAAA,CAAK,CAAC,KAAA,KAAU,KAAA,CAAM,UAAU,KAAK,CAAA;AAC3E;AAEO,SAAS,2BAA2B,KAAA,EAAwB;AACjE,EAAA,OAAO,OAAA,CAAQ,4BAAA,CAA6B,KAAK,CAAC,CAAA;AACpD;AAEO,SAAS,oCAAoC,KAAA,EAAwB;AAC1E,EAAA,OAAO,sCAAA,CAAuC,IAAA,CAAK,CAAC,KAAA,KAAU,UAAU,KAAK,CAAA;AAC/E","file":"tenant-bootstrap-seed.contract.js","sourcesContent":["/**\n * Tenant bootstrap seed contract.\n *\n * Fresh tenant deployments install the Lucern kernel and control-plane components\n * from npm, then copy canonical template rows for non-secret runtime defaults.\n * This contract is intentionally exhaustive for the K/CP tables: it separates\n * rows that must be carried by the template deployments from rows that are\n * runtime data, runtime credentials, logs, queues, or derived caches.\n */\n\nexport const TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION = \"2026-04-30\" as const;\n\nexport const TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS = [\n \"tenantId\",\n \"workspaceId\",\n \"principalId\",\n \"role\",\n \"authMode\",\n \"correlationId\",\n \"auditMetadata\",\n] as const;\nexport type TenantBootstrapSeedAuthMetadataField =\n (typeof TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS)[number];\n\nexport const TENANT_BOOTSTRAP_SEED_COMPONENTS = {\n kernel: {\n componentName: \"lucern\",\n migrationModule: \"adapters/migration\",\n templateService: \"services/kernel-template\",\n templateDeployments: {\n staging: \"kindly-goldfish-162\",\n prod: \"cool-badger-368\",\n },\n },\n \"control-plane\": {\n componentName: \"controlPlane\",\n migrationModule: \"dist/migration\",\n templateService: \"services/control-plane-template\",\n templateDeployments: {\n staging: \"industrious-cheetah-864\",\n prod: \"combative-beagle-879\",\n },\n },\n} as const;\nexport type TenantBootstrapSeedComponent =\n keyof typeof TENANT_BOOTSTRAP_SEED_COMPONENTS;\n\nexport type TenantBootstrapSeedScope = \"global\" | \"tenant\";\n\nexport type TenantBootstrapPrepopulation =\n | \"required_template\"\n | \"optional_template\"\n | \"runtime_bootstrap\"\n | \"runtime_data\"\n | \"runtime_log\"\n | \"runtime_secret\"\n | \"runtime_derived\"\n | \"runtime_queue\";\n\nexport type TenantBootstrapCopyMode =\n | \"template_global\"\n | \"template_tenant_rewrite\"\n | \"template_reference_remap\"\n | \"none\";\n\nexport type TenantBootstrapTableRequirement = {\n component: TenantBootstrapSeedComponent;\n table: string;\n prepopulation: TenantBootstrapPrepopulation;\n copyMode: TenantBootstrapCopyMode;\n scope?: TenantBootstrapSeedScope;\n uniqueKey?: readonly string[];\n dependsOn?: readonly string[];\n description: string;\n};\n\nexport type TenantBootstrapSeedTable = TenantBootstrapTableRequirement & {\n copyMode:\n | \"template_global\"\n | \"template_tenant_rewrite\"\n | \"template_reference_remap\";\n scope: TenantBootstrapSeedScope;\n uniqueKey: readonly string[];\n};\n\nfunction isCopyableSeedRequirement(\n entry: TenantBootstrapTableRequirement\n): entry is TenantBootstrapSeedTable {\n return (\n (entry.copyMode === \"template_global\" ||\n entry.copyMode === \"template_tenant_rewrite\" ||\n entry.copyMode === \"template_reference_remap\") &&\n Boolean(entry.scope) &&\n Array.isArray(entry.uniqueKey) &&\n entry.uniqueKey.length > 0\n );\n}\n\nexport const TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [\n {\n component: \"kernel\",\n table: \"agentMessages\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Agent coordination messages are session data, not template data.\",\n },\n {\n component: \"kernel\",\n table: \"agentSessions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Agent coordination sessions are created by active clients.\",\n },\n {\n component: \"kernel\",\n table: \"autofixJobs\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Autofix work items are runtime queue rows.\",\n },\n {\n component: \"kernel\",\n table: \"backgroundJobRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Background job executions are runtime logs.\",\n },\n {\n component: \"kernel\",\n table: \"backgroundJobSettings\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"jobKey\"],\n description: \"Default job enablement settings must come from the K template.\",\n },\n {\n component: \"kernel\",\n table: \"beliefConfidence\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief confidence rows are created with tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"beliefEvidenceLinks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief-to-evidence links are tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefHistory\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Belief history is append-only tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefScenarios\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Scenario rows are tenant-authored reasoning data.\",\n },\n {\n component: \"kernel\",\n table: \"beliefVotes\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision belief votes are tenant-authored data.\",\n },\n {\n component: \"kernel\",\n table: \"calibrationScores\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Calibration scores are computed from tenant outcomes.\",\n },\n {\n component: \"kernel\",\n table: \"contractEvaluations\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Contract evaluation rows are runtime computation logs.\",\n },\n {\n component: \"kernel\",\n table: \"contradictions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Contradictions are tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"crossProjectConnections\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Cross-topic connections are tenant graph facts.\",\n },\n {\n component: \"kernel\",\n table: \"decisionComputedSummaries\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Decision summaries are derived tenant outputs.\",\n },\n {\n component: \"kernel\",\n table: \"decisionEvents\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision events are lifecycle data.\",\n },\n {\n component: \"kernel\",\n table: \"decisionParticipants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision participants are tenant-selected actors.\",\n },\n {\n component: \"kernel\",\n table: \"decisionRiskLedger\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Decision risk rows are tenant decision data.\",\n },\n {\n component: \"kernel\",\n table: \"decisionSnapshots\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Decision snapshots are derived from tenant state.\",\n },\n {\n component: \"kernel\",\n table: \"deliberationContributions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Deliberation contributions are tenant-authored data.\",\n },\n {\n component: \"kernel\",\n table: \"deliberationSessions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Deliberation sessions are created by tenant workflows.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicAudit\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Epistemic audit rows are append-only runtime audit data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicContracts\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Epistemic contracts are tenant-authored governance data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicEdges\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Edges are tenant reasoning graph data.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicNodeEmbeddings\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Embeddings are derived from tenant graph nodes.\",\n },\n {\n component: \"kernel\",\n table: \"epistemicNodes\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Nodes are tenant reasoning graph data.\",\n },\n {\n component: \"kernel\",\n table: \"graphAnalysisCache\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph analysis cache rows are derived from tenant graph state.\",\n },\n {\n component: \"kernel\",\n table: \"graphAnalysisResults\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph analysis result rows are derived tenant outputs.\",\n },\n {\n component: \"kernel\",\n table: \"graphSuggestions\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Graph suggestions are derived recommendations.\",\n },\n {\n component: \"kernel\",\n table: \"harnessReplays\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness replay rows are runtime verification logs.\",\n },\n {\n component: \"kernel\",\n table: \"harnessRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness run rows are runtime verification logs.\",\n },\n {\n component: \"kernel\",\n table: \"idempotencyTokens\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Idempotency tokens are request-scoped runtime guards.\",\n },\n {\n component: \"kernel\",\n table: \"lenses\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n description:\n \"Reusable lens templates may live in K templates, but workspace-specific copies are not required for core SDK boot.\",\n },\n {\n component: \"kernel\",\n table: \"lensTopicBindings\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Lens bindings attach runtime topics to runtime/workspace lenses.\",\n },\n {\n component: \"kernel\",\n table: \"neo4jSyncQueue\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Neo4j sync queue rows are runtime work items.\",\n },\n {\n component: \"kernel\",\n table: \"ontologyDefinitions\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"ontologyKey\"],\n description: \"Platform ontology definitions power taxonomy reads and effective ontology resolution.\",\n },\n {\n component: \"kernel\",\n table: \"ontologyVersions\",\n prepopulation: \"required_template\",\n copyMode: \"template_reference_remap\",\n scope: \"global\",\n uniqueKey: [\"ontologyKey\", \"version\"],\n dependsOn: [\"ontologyDefinitions\"],\n description: \"Ontology versions must be copied with ontologyDefinition ID remapping.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunPolicyDecisions\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run policy decisions are audit logs.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunPromptResolutions\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run prompt resolution rows are runtime logs.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRuns\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent runs are runtime execution records.\",\n },\n {\n component: \"kernel\",\n table: \"platformAgentRunToolCalls\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Agent-run tool calls are runtime execution records.\",\n },\n {\n component: \"kernel\",\n table: \"platformHarnessShadowAudit\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Harness shadow audit rows are runtime audit records.\",\n },\n {\n component: \"kernel\",\n table: \"publicationRules\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"name\"],\n description: \"Default publication policy rules are rewritten into each tenant.\",\n },\n {\n component: \"kernel\",\n table: \"questionEvidenceLinks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Question-to-evidence links are tenant graph data.\",\n },\n {\n component: \"kernel\",\n table: \"researchJobs\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Research job rows are runtime queue items.\",\n },\n {\n component: \"kernel\",\n table: \"schemaEnumConfig\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"category\", \"value\"],\n description: \"Runtime-extensible enum defaults required by SDK graph APIs.\",\n },\n {\n component: \"kernel\",\n table: \"stakeholderGroups\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Stakeholder groups are tenant decision data.\",\n },\n {\n component: \"kernel\",\n table: \"systemLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"System logs are runtime telemetry.\",\n },\n {\n component: \"kernel\",\n table: \"tasks\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Tasks are tenant-authored work items.\",\n },\n {\n component: \"kernel\",\n table: \"topics\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Default topics are created by tenant provisioning, not copied from templates.\",\n },\n {\n component: \"kernel\",\n table: \"workflowDefinitions\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n description:\n \"Table-driven workflow definitions can be template data after the workflow engine leaves legacy mode.\",\n },\n {\n component: \"kernel\",\n table: \"workflowPullRequests\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Workflow pull requests are tenant workflow data.\",\n },\n {\n component: \"kernel\",\n table: \"workflowStages\",\n prepopulation: \"optional_template\",\n copyMode: \"none\",\n dependsOn: [\"workflowDefinitions\"],\n description:\n \"Workflow stages can be template data after workflowDefinitions are enabled for bootstrap copying.\",\n },\n {\n component: \"kernel\",\n table: \"worktreeBeliefCluster\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Worktree cluster rows link runtime worktrees to runtime beliefs.\",\n },\n {\n component: \"kernel\",\n table: \"worktrees\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Worktrees are tenant/runtime planning data.\",\n },\n {\n component: \"control-plane\",\n table: \"agents\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Service agents are provisioned per tenant or service, not copied.\",\n },\n {\n component: \"control-plane\",\n table: \"mcpWritePolicy\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"topicId\", \"role\", \"toolCategory\"],\n description: \"Global write policy defaults govern service and interactive MCP writes.\",\n },\n {\n component: \"control-plane\",\n table: \"modelCallLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Model call logs are runtime telemetry.\",\n },\n {\n component: \"control-plane\",\n table: \"modelFunctionSlots\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"slot\"],\n description: \"Function-to-model slots are required by model runtime resolution.\",\n },\n {\n component: \"control-plane\",\n table: \"modelRegistry\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"key\"],\n description: \"Model catalog defaults are required by model runtime clients.\",\n },\n {\n component: \"control-plane\",\n table: \"modelSlotConfigs\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"slot\"],\n description: \"Slot-level defaults are required before tenant overrides exist.\",\n },\n {\n component: \"control-plane\",\n table: \"permitAccessReviewItems\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit access-review item rows are tenant review data projected from Permit.\",\n },\n {\n component: \"control-plane\",\n table: \"permitAccessReviews\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit access-review campaigns are tenant review data projected from Permit.\",\n },\n {\n component: \"control-plane\",\n table: \"permitAttributeBindings\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit ABAC attribute bindings are tenant policy projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitGroups\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit groups are tenant-defined policy subjects, not template data.\",\n },\n {\n component: \"control-plane\",\n table: \"permitGroupMemberships\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit group memberships are tenant-specific policy projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitPolicyBundles\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Permit policy bundles are derived from the Permit control plane.\",\n },\n {\n component: \"control-plane\",\n table: \"permitPolicyDecisionReceipts\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Permit decision receipts are runtime authorization audit logs.\",\n },\n {\n component: \"control-plane\",\n table: \"permitPrincipalAliases\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit principal aliases are tenant-specific identity projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitPrincipals\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit principals are projected from Clerk, Permit, and tenant onboarding flows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitProjectionOutbox\",\n prepopulation: \"runtime_queue\",\n copyMode: \"none\",\n description: \"Permit projection outbox rows are runtime sync queue data.\",\n },\n {\n component: \"control-plane\",\n table: \"permitRelationshipTuples\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit ReBAC relationship tuples are tenant policy projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitResourceInstances\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit resource instances are tenant/workspace graph and deployment projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"permitRoleAssignments\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Permit role assignments are tenant-specific policy projection rows.\",\n },\n {\n component: \"control-plane\",\n table: \"platformAudienceGrants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Audience grants are principal/group-specific access rows.\",\n },\n {\n component: \"control-plane\",\n table: \"platformAudiences\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"audienceKey\"],\n description: \"Default tenant audience taxonomy rows are rewritten into each tenant.\",\n },\n {\n component: \"control-plane\",\n table: \"platformPolicyDecisionLogs\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Policy decisions are runtime audit logs.\",\n },\n {\n component: \"control-plane\",\n table: \"projectGrants\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Project/topic grants are principal or group-specific access rows.\",\n },\n {\n component: \"control-plane\",\n table: \"reasoningPermissions\",\n prepopulation: \"runtime_data\",\n copyMode: \"none\",\n description: \"Reasoning permissions are principal-specific policy rows.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantApiKeys\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"API keys are tenant credentials and must never be copied.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantConfig\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\"],\n description: \"Tenant-local config defaults are rewritten during bootstrap.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantIntegrations\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"integrationKey\"],\n description: \"Non-secret integration descriptors are rewritten into each tenant.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantModelSlotBindings\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Tenant model slot bindings reference provider secrets and are runtime-only.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantPermitSyncStates\",\n prepopulation: \"runtime_derived\",\n copyMode: \"none\",\n description: \"Tenant Permit sync state rows are runtime reconciliation state.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantPolicies\",\n prepopulation: \"required_template\",\n copyMode: \"template_tenant_rewrite\",\n scope: \"tenant\",\n uniqueKey: [\"tenantId\", \"workspaceId\", \"roleName\"],\n description: \"Default tenant policy roles are rewritten during bootstrap.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantProviderSecrets\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Provider secrets are credentials and must never be copied.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantProxyGatewayUsage\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Proxy gateway usage rows are runtime telemetry.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantProxyTokenMints\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Proxy token mints are ephemeral secret-bearing runtime rows.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantSandboxAuditEvents\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description: \"Sandbox audit rows are runtime security logs.\",\n },\n {\n component: \"control-plane\",\n table: \"tenantSecrets\",\n prepopulation: \"runtime_secret\",\n copyMode: \"none\",\n description: \"Tenant secrets are credentials and must never be copied.\",\n },\n {\n component: \"control-plane\",\n table: \"toolAcls\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"role\", \"toolName\"],\n description: \"Default role-to-tool grants are required for SDK/MCP tool access.\",\n },\n {\n component: \"control-plane\",\n table: \"toolRegistry\",\n prepopulation: \"required_template\",\n copyMode: \"template_global\",\n scope: \"global\",\n uniqueKey: [\"toolName\"],\n description: \"Core tool catalog rows are required before pack or tenant tools exist.\",\n },\n {\n component: \"control-plane\",\n table: \"users\",\n prepopulation: \"runtime_bootstrap\",\n copyMode: \"none\",\n description: \"Users are created from Clerk/MC principal resolution, not copied.\",\n },\n] as const satisfies readonly TenantBootstrapTableRequirement[];\n\nexport const TENANT_BOOTSTRAP_SEED_TABLES =\n TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(\n isCopyableSeedRequirement\n ) as readonly TenantBootstrapSeedTable[];\n\nexport type TenantBootstrapSeedTableName =\n (typeof TENANT_BOOTSTRAP_SEED_TABLES)[number][\"table\"];\n\nexport const TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES =\n TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.filter(\n (entry) => !isCopyableSeedRequirement(entry)\n ).map((entry) => entry.table) as readonly string[];\nexport type TenantBootstrapForbiddenSeedTable =\n (typeof TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES)[number];\n\nexport const TENANT_BOOTSTRAP_SEED_MANIFEST = {\n contractVersion: TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION,\n authMetadataFields: TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS,\n components: TENANT_BOOTSTRAP_SEED_COMPONENTS,\n tableRequirements: TENANT_BOOTSTRAP_TABLE_REQUIREMENTS,\n tables: TENANT_BOOTSTRAP_SEED_TABLES,\n forbiddenTables: TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES,\n} as const;\n\nexport function findTenantBootstrapTableRequirement(\n table: string\n): TenantBootstrapTableRequirement | undefined {\n return TENANT_BOOTSTRAP_TABLE_REQUIREMENTS.find(\n (entry) => entry.table === table\n );\n}\n\nexport function findTenantBootstrapSeedTable(\n table: string\n): TenantBootstrapSeedTable | undefined {\n return TENANT_BOOTSTRAP_SEED_TABLES.find((entry) => entry.table === table);\n}\n\nexport function isTenantBootstrapSeedTable(table: string): boolean {\n return Boolean(findTenantBootstrapSeedTable(table));\n}\n\nexport function isTenantBootstrapForbiddenSeedTable(table: string): boolean {\n return TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES.some((entry) => entry === table);\n}\n"]}
@@ -3,7 +3,7 @@ declare const TENANT_BOOTSTRAP_TEMPLATE_TENANT_ID: "tenant_template";
3
3
  declare const TENANT_BOOTSTRAP_TEMPLATE_ACTOR: "system:lucern-template-seed";
4
4
  type TenantBootstrapTemplateSeedRows = {
5
5
  kernel: Record<string, Array<Record<string, unknown>>>;
6
- identity: Record<string, Array<Record<string, unknown>>>;
6
+ "control-plane": Record<string, Array<Record<string, unknown>>>;
7
7
  };
8
8
  type TenantBootstrapTemplateSeedOptions = {
9
9
  now?: number;
@@ -275,7 +275,7 @@ function buildTenantBootstrapTemplateSeedRows(options = {}) {
275
275
  ],
276
276
  schemaEnumConfig: schemaEnumRows(ctx.now)
277
277
  },
278
- identity: {
278
+ "control-plane": {
279
279
  mcpWritePolicy: buildMcpWritePolicy(ctx.now, ctx.actor),
280
280
  modelFunctionSlots: modelFunctionSlotRows(ctx.now),
281
281
  modelRegistry: modelRegistryRows(ctx.now),