@lucern/contracts 0.3.0-alpha.12 → 0.3.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth-context.contract.js +13 -1
- package/dist/auth-context.contract.js.map +1 -1
- package/dist/auth-session.contract.js +13 -1
- package/dist/auth-session.contract.js.map +1 -1
- package/dist/auth.contract.d.ts +1 -1
- package/dist/auth.contract.js +13 -1
- package/dist/auth.contract.js.map +1 -1
- package/dist/component-boundary.contract.js +1 -0
- package/dist/component-boundary.contract.js.map +1 -1
- package/dist/function-registry/beliefs.d.ts +10 -10
- package/dist/function-registry/beliefs.js +53 -2
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +6 -6
- package/dist/function-registry/coding.js +53 -2
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +3 -3
- package/dist/function-registry/context.js +53 -2
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +3 -3
- package/dist/function-registry/contracts.js +53 -2
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +9 -9
- package/dist/function-registry/coordination.js +53 -2
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +6 -6
- package/dist/function-registry/edges.js +53 -2
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +8 -8
- package/dist/function-registry/evidence.js +53 -2
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +15 -15
- package/dist/function-registry/graph.js +53 -2
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +2 -2
- package/dist/function-registry/helpers.js +53 -2
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +56 -16
- package/dist/function-registry/identity.js +75 -4
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +1 -1
- package/dist/function-registry/index.js +53 -2
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +2 -2
- package/dist/function-registry/judgments.js +53 -2
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +1 -1
- package/dist/function-registry/legacy.js +53 -2
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +4 -4
- package/dist/function-registry/lenses.js +53 -2
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +3 -3
- package/dist/function-registry/manifest.js +1 -0
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +8 -8
- package/dist/function-registry/nodes.js +53 -2
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +11 -11
- package/dist/function-registry/ontologies.js +53 -2
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +3 -3
- package/dist/function-registry/pipeline.js +53 -2
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +12 -12
- package/dist/function-registry/questions.js +53 -2
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +4 -4
- package/dist/function-registry/tasks.js +53 -2
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +7 -7
- package/dist/function-registry/topics.js +53 -2
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +2 -2
- package/dist/function-registry/worktrees.d.ts +11 -11
- package/dist/function-registry/worktrees.js +53 -2
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/convexSchemas.js +2 -1
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/infisicalRuntimeEnv.js +111 -0
- package/dist/generated/infisicalRuntimeEnv.js.map +1 -1
- package/dist/generated/schema-manifest.json +88 -3
- package/dist/generated/tableOwnership.d.ts +2 -1
- package/dist/generated/tableOwnership.js +2 -0
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +6 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +290 -20
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +18 -0
- package/dist/infisical-runtime.contract.js +21 -0
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +18 -0
- package/dist/manifests/infisical-runtime-manifest.js +21 -0
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/manifests/tenant-client-manifest.d.ts +8 -3
- package/dist/manifests/tenant-client-manifest.js +18 -1
- package/dist/manifests/tenant-client-manifest.js.map +1 -1
- package/dist/permit-principal-projection.contract.js +2 -3
- package/dist/permit-principal-projection.contract.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/schemas/index.js +33 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +75 -0
- package/dist/schemas/manifest.js +33 -0
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/controlPlane/accessControl.js +3 -0
- package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -1
- package/dist/schemas/tables/kernel/events.d.ts +21 -0
- package/dist/schemas/tables/kernel/events.js +43 -0
- package/dist/schemas/tables/kernel/events.js.map +1 -0
- package/dist/{sdk-tools.contract-BNklQDfB.d.ts → sdk-tools.contract-CKmSsrZ2.d.ts} +1 -1
- package/dist/sdk-tools.contract.d.ts +2 -2
- package/dist/sdk-tools.contract.js +45 -1
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +22 -2
- package/dist/tenant-bootstrap-seed.contract.js +15 -2
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.defaults.d.ts +1 -1
- package/dist/tenant-bootstrap-seed.defaults.js +30 -12
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
- package/dist/tenant-client.contract.d.ts +8 -3
- package/dist/tenant-client.contract.js +18 -1
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/{tool-contracts-BevD9Ho2.d.ts → tool-contracts-C_xvM9q2.d.ts} +4 -2
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +46 -2
- package/dist/tool-contracts.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,8 @@ declare const TENANT_BOOTSTRAP_SEED_COMPONENTS: {
|
|
|
14
14
|
readonly kernel: {
|
|
15
15
|
readonly componentName: "lucern";
|
|
16
16
|
readonly migrationModule: "adapters/migration";
|
|
17
|
+
readonly templateMigrationModule: "dist/adapters/migration";
|
|
18
|
+
readonly tenantMigrationModule: "adapters/migration";
|
|
17
19
|
readonly templateService: "services/kernel-template";
|
|
18
20
|
readonly templateDeployments: {
|
|
19
21
|
readonly staging: "kindly-goldfish-162";
|
|
@@ -22,7 +24,9 @@ declare const TENANT_BOOTSTRAP_SEED_COMPONENTS: {
|
|
|
22
24
|
};
|
|
23
25
|
readonly "control-plane": {
|
|
24
26
|
readonly componentName: "controlPlane";
|
|
25
|
-
readonly migrationModule: "
|
|
27
|
+
readonly migrationModule: "migration";
|
|
28
|
+
readonly templateMigrationModule: "dist/migration";
|
|
29
|
+
readonly tenantMigrationModule: "migration";
|
|
26
30
|
readonly templateService: "services/control-plane-template";
|
|
27
31
|
readonly templateDeployments: {
|
|
28
32
|
readonly staging: "industrious-cheetah-864";
|
|
@@ -177,6 +181,12 @@ declare const TENANT_BOOTSTRAP_TABLE_REQUIREMENTS: readonly [{
|
|
|
177
181
|
readonly prepopulation: "runtime_data";
|
|
178
182
|
readonly copyMode: "none";
|
|
179
183
|
readonly description: "Deliberation sessions are created by tenant workflows.";
|
|
184
|
+
}, {
|
|
185
|
+
readonly component: "kernel";
|
|
186
|
+
readonly table: "domainEvents";
|
|
187
|
+
readonly prepopulation: "runtime_log";
|
|
188
|
+
readonly copyMode: "none";
|
|
189
|
+
readonly description: "Domain event rows are append-only runtime audit/exhaust data.";
|
|
180
190
|
}, {
|
|
181
191
|
readonly component: "kernel";
|
|
182
192
|
readonly table: "epistemicAudit";
|
|
@@ -651,6 +661,8 @@ declare const TENANT_BOOTSTRAP_SEED_MANIFEST: {
|
|
|
651
661
|
readonly kernel: {
|
|
652
662
|
readonly componentName: "lucern";
|
|
653
663
|
readonly migrationModule: "adapters/migration";
|
|
664
|
+
readonly templateMigrationModule: "dist/adapters/migration";
|
|
665
|
+
readonly tenantMigrationModule: "adapters/migration";
|
|
654
666
|
readonly templateService: "services/kernel-template";
|
|
655
667
|
readonly templateDeployments: {
|
|
656
668
|
readonly staging: "kindly-goldfish-162";
|
|
@@ -659,7 +671,9 @@ declare const TENANT_BOOTSTRAP_SEED_MANIFEST: {
|
|
|
659
671
|
};
|
|
660
672
|
readonly "control-plane": {
|
|
661
673
|
readonly componentName: "controlPlane";
|
|
662
|
-
readonly migrationModule: "
|
|
674
|
+
readonly migrationModule: "migration";
|
|
675
|
+
readonly templateMigrationModule: "dist/migration";
|
|
676
|
+
readonly tenantMigrationModule: "migration";
|
|
663
677
|
readonly templateService: "services/control-plane-template";
|
|
664
678
|
readonly templateDeployments: {
|
|
665
679
|
readonly staging: "industrious-cheetah-864";
|
|
@@ -795,6 +809,12 @@ declare const TENANT_BOOTSTRAP_SEED_MANIFEST: {
|
|
|
795
809
|
readonly prepopulation: "runtime_data";
|
|
796
810
|
readonly copyMode: "none";
|
|
797
811
|
readonly description: "Deliberation sessions are created by tenant workflows.";
|
|
812
|
+
}, {
|
|
813
|
+
readonly component: "kernel";
|
|
814
|
+
readonly table: "domainEvents";
|
|
815
|
+
readonly prepopulation: "runtime_log";
|
|
816
|
+
readonly copyMode: "none";
|
|
817
|
+
readonly description: "Domain event rows are append-only runtime audit/exhaust data.";
|
|
798
818
|
}, {
|
|
799
819
|
readonly component: "kernel";
|
|
800
820
|
readonly table: "epistemicAudit";
|
|
@@ -13,6 +13,8 @@ var TENANT_BOOTSTRAP_SEED_COMPONENTS = {
|
|
|
13
13
|
kernel: {
|
|
14
14
|
componentName: "lucern",
|
|
15
15
|
migrationModule: "adapters/migration",
|
|
16
|
+
templateMigrationModule: "dist/adapters/migration",
|
|
17
|
+
tenantMigrationModule: "adapters/migration",
|
|
16
18
|
templateService: "services/kernel-template",
|
|
17
19
|
templateDeployments: {
|
|
18
20
|
staging: "kindly-goldfish-162",
|
|
@@ -21,7 +23,9 @@ var TENANT_BOOTSTRAP_SEED_COMPONENTS = {
|
|
|
21
23
|
},
|
|
22
24
|
"control-plane": {
|
|
23
25
|
componentName: "controlPlane",
|
|
24
|
-
migrationModule: "
|
|
26
|
+
migrationModule: "migration",
|
|
27
|
+
templateMigrationModule: "dist/migration",
|
|
28
|
+
tenantMigrationModule: "migration",
|
|
25
29
|
templateService: "services/control-plane-template",
|
|
26
30
|
templateDeployments: {
|
|
27
31
|
staging: "industrious-cheetah-864",
|
|
@@ -182,6 +186,13 @@ var TENANT_BOOTSTRAP_TABLE_REQUIREMENTS = [
|
|
|
182
186
|
copyMode: "none",
|
|
183
187
|
description: "Deliberation sessions are created by tenant workflows."
|
|
184
188
|
},
|
|
189
|
+
{
|
|
190
|
+
component: "kernel",
|
|
191
|
+
table: "domainEvents",
|
|
192
|
+
prepopulation: "runtime_log",
|
|
193
|
+
copyMode: "none",
|
|
194
|
+
description: "Domain event rows are append-only runtime audit/exhaust data."
|
|
195
|
+
},
|
|
185
196
|
{
|
|
186
197
|
component: "kernel",
|
|
187
198
|
table: "epistemicAudit",
|
|
@@ -743,7 +754,9 @@ function isTenantBootstrapSeedTable(table) {
|
|
|
743
754
|
return Boolean(findTenantBootstrapSeedTable(table));
|
|
744
755
|
}
|
|
745
756
|
function isTenantBootstrapForbiddenSeedTable(table) {
|
|
746
|
-
return TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES.some(
|
|
757
|
+
return TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES.some(
|
|
758
|
+
(entry) => entry === table
|
|
759
|
+
);
|
|
747
760
|
}
|
|
748
761
|
|
|
749
762
|
export { TENANT_BOOTSTRAP_FORBIDDEN_SEED_TABLES, TENANT_BOOTSTRAP_SEED_AUTH_METADATA_FIELDS, TENANT_BOOTSTRAP_SEED_COMPONENTS, TENANT_BOOTSTRAP_SEED_CONTRACT_VERSION, TENANT_BOOTSTRAP_SEED_MANIFEST, TENANT_BOOTSTRAP_SEED_TABLES, TENANT_BOOTSTRAP_TABLE_REQUIREMENTS, findTenantBootstrapSeedTable, findTenantBootstrapTableRequirement, isTenantBootstrapForbiddenSeedTable, isTenantBootstrapSeedTable };
|
|
@@ -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,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,EAAqB;AAAA,MACnB,OAAA,EAAS,yBAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AA0CA,SAAS,0BACP,KAAA,EACmC;AACnC,EAAA,OAAA,CACG,KAAA,CAAM,aAAa,iBAAA,IAClB,KAAA,CAAM,aAAa,yBAAA,IACnB,KAAA,CAAM,aAAa,0BAAA,KACrB,OAAA,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,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"]}
|
|
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,uBAAA,EAAyB,yBAAA;AAAA,IACzB,qBAAA,EAAuB,oBAAA;AAAA,IACvB,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,WAAA;AAAA,IACjB,uBAAA,EAAyB,gBAAA;AAAA,IACzB,qBAAA,EAAuB,WAAA;AAAA,IACvB,eAAA,EAAiB,iCAAA;AAAA,IACjB,mBAAA,EAAqB;AAAA,MACnB,OAAA,EAAS,yBAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AA0CA,SAAS,0BACP,KA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6C;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;AAAA,IAC5C,CAAC,UAAU,KAAA,KAAU;AAAA,GACvB;AACF","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 templateMigrationModule: \"dist/adapters/migration\",\n tenantMigrationModule: \"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: \"migration\",\n templateMigrationModule: \"dist/migration\",\n tenantMigrationModule: \"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:\n \"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:\n \"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: \"domainEvents\",\n prepopulation: \"runtime_log\",\n copyMode: \"none\",\n description:\n \"Domain event rows are append-only runtime audit/exhaust data.\",\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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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:\n \"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(\n (entry) => entry === table,\n );\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const TENANT_BOOTSTRAP_TEMPLATE_SEED_VERSION: "2026-
|
|
1
|
+
declare const TENANT_BOOTSTRAP_TEMPLATE_SEED_VERSION: "2026-05-11";
|
|
2
2
|
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 = {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ALL_FUNCTION_CONTRACTS } from './function-registry/index.js';
|
|
2
2
|
|
|
3
3
|
// src/tenant-bootstrap-seed.defaults.ts
|
|
4
|
-
var TENANT_BOOTSTRAP_TEMPLATE_SEED_VERSION = "2026-
|
|
4
|
+
var TENANT_BOOTSTRAP_TEMPLATE_SEED_VERSION = "2026-05-11";
|
|
5
5
|
var TENANT_BOOTSTRAP_TEMPLATE_TENANT_ID = "tenant_template";
|
|
6
6
|
var TENANT_BOOTSTRAP_TEMPLATE_ACTOR = "system:lucern-template-seed";
|
|
7
7
|
var DEFAULT_SEED_TIME = Date.UTC(2026, 3, 30);
|
|
8
|
+
var TEMPLATE_SEED_METADATA_SOURCE = "lucern-template";
|
|
8
9
|
var ROLE_GRANTS = {
|
|
9
10
|
viewer: ["viewer", "auditor", "editor", "workspace_admin", "tenant_admin", "platform_admin", "service_agent"],
|
|
10
11
|
auditor: ["auditor", "tenant_admin", "platform_admin", "service_agent"],
|
|
@@ -15,7 +16,7 @@ var ROLE_GRANTS = {
|
|
|
15
16
|
service_agent: ["service_agent"]
|
|
16
17
|
};
|
|
17
18
|
var ENUM_VALUES = {
|
|
18
|
-
topic_type: ["
|
|
19
|
+
topic_type: ["generic"],
|
|
19
20
|
branch_schema: ["pillar", "track", "dimension", "axis", "phase"],
|
|
20
21
|
belief_type: ["belief", "hypothesis", "principle", "invariant", "assumption", "tenet", "prior", "preference", "goal", "forecast", "decision", "constraint", "tradeoff", "policy", "implementation_choice", "implementation_decision", "interface_contract", "migration_state", "code_pattern", "deprecation_notice"],
|
|
21
22
|
edge_type: ["supports", "informs", "depends_on", "derived_from", "contains", "tests", "supersedes", "responds_to", "belongs_to", "relates_to_thesis", "works_at", "invested_in", "competes_with", "participates_in", "founded_by", "evaluates", "performs", "function_in", "impacts", "raised_from", "mentioned_in", "perspective_on", "plays_theme"],
|
|
@@ -59,6 +60,13 @@ var MODEL_SLOTS = [
|
|
|
59
60
|
function labelFor(value) {
|
|
60
61
|
return value.split(/[_-]/).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
|
|
61
62
|
}
|
|
63
|
+
function templateSeedMetadata(version) {
|
|
64
|
+
return {
|
|
65
|
+
seedSource: TEMPLATE_SEED_METADATA_SOURCE,
|
|
66
|
+
seedVersion: version,
|
|
67
|
+
seedType: "template-default"
|
|
68
|
+
};
|
|
69
|
+
}
|
|
62
70
|
function seedContext(options) {
|
|
63
71
|
return {
|
|
64
72
|
now: options.now ?? DEFAULT_SEED_TIME,
|
|
@@ -198,7 +206,7 @@ function modelRegistryRows(now) {
|
|
|
198
206
|
updatedAt: now
|
|
199
207
|
}));
|
|
200
208
|
}
|
|
201
|
-
function modelFunctionSlotRows(now) {
|
|
209
|
+
function modelFunctionSlotRows(now, version) {
|
|
202
210
|
return MODEL_SLOTS.map(([slot, category, description, modelKey, promptName, temperature, maxTokens, requiredCapabilities]) => ({
|
|
203
211
|
slot,
|
|
204
212
|
category,
|
|
@@ -210,24 +218,24 @@ function modelFunctionSlotRows(now) {
|
|
|
210
218
|
requiredCapabilities,
|
|
211
219
|
enabled: true,
|
|
212
220
|
isDefault: true,
|
|
213
|
-
notes: `Seeded by ${
|
|
221
|
+
notes: `Seeded by ${version}.`,
|
|
214
222
|
createdAt: now,
|
|
215
223
|
updatedAt: now
|
|
216
224
|
}));
|
|
217
225
|
}
|
|
218
|
-
function modelSlotConfigRows(now) {
|
|
226
|
+
function modelSlotConfigRows(now, version) {
|
|
219
227
|
return MODEL_SLOTS.map(([slot, , , modelKey, , temperature, maxTokens]) => ({
|
|
220
228
|
slot,
|
|
221
229
|
modelKey,
|
|
222
230
|
temperature,
|
|
223
231
|
maxTokens,
|
|
224
232
|
enabled: true,
|
|
225
|
-
notes: `Default routing for ${slot}.`,
|
|
233
|
+
notes: `Default routing for ${slot}. Seeded by ${version}.`,
|
|
226
234
|
createdAt: now,
|
|
227
235
|
updatedAt: now
|
|
228
236
|
}));
|
|
229
237
|
}
|
|
230
|
-
function schemaEnumRows(now) {
|
|
238
|
+
function schemaEnumRows(now, version) {
|
|
231
239
|
return Object.entries(ENUM_VALUES).flatMap(
|
|
232
240
|
([category, values]) => values.map((value, index) => ({
|
|
233
241
|
category,
|
|
@@ -235,7 +243,7 @@ function schemaEnumRows(now) {
|
|
|
235
243
|
label: labelFor(value),
|
|
236
244
|
description: `${labelFor(value)} ${category} value.`,
|
|
237
245
|
tier: "platform",
|
|
238
|
-
metadata:
|
|
246
|
+
metadata: templateSeedMetadata(version),
|
|
239
247
|
isDefault: index === 0,
|
|
240
248
|
sortOrder: index + 1,
|
|
241
249
|
status: "active",
|
|
@@ -273,18 +281,28 @@ function buildTenantBootstrapTemplateSeedRows(options = {}) {
|
|
|
273
281
|
publicationRules: [
|
|
274
282
|
{ tenantId: ctx.templateTenantId, name: "publish-high-confidence-beliefs", description: "Publish high-confidence beliefs to tenant-level consumers.", conditionType: "confidence_threshold", conditions: { minConfidence: 0.85 }, enabled: true, priority: 100, createdBy: ctx.actor, createdAt: ctx.now, updatedAt: ctx.now }
|
|
275
283
|
],
|
|
276
|
-
schemaEnumConfig: schemaEnumRows(ctx.now)
|
|
284
|
+
schemaEnumConfig: schemaEnumRows(ctx.now, ctx.version)
|
|
277
285
|
},
|
|
278
286
|
"control-plane": {
|
|
279
287
|
mcpWritePolicy: buildMcpWritePolicy(ctx.now, ctx.actor),
|
|
280
|
-
modelFunctionSlots: modelFunctionSlotRows(ctx.now),
|
|
288
|
+
modelFunctionSlots: modelFunctionSlotRows(ctx.now, ctx.version),
|
|
281
289
|
modelRegistry: modelRegistryRows(ctx.now),
|
|
282
|
-
modelSlotConfigs: modelSlotConfigRows(ctx.now),
|
|
290
|
+
modelSlotConfigs: modelSlotConfigRows(ctx.now, ctx.version),
|
|
283
291
|
platformAudiences: [
|
|
284
292
|
["internal", "Internal", "internal"],
|
|
285
293
|
["lp", "Limited Partners", "restricted_external"],
|
|
286
294
|
["public", "Public", "public"]
|
|
287
|
-
].map(([audienceKey, audienceLabel, audienceClass]) => ({
|
|
295
|
+
].map(([audienceKey, audienceLabel, audienceClass]) => ({
|
|
296
|
+
tenantId: ctx.templateTenantId,
|
|
297
|
+
audienceKey,
|
|
298
|
+
audienceLabel,
|
|
299
|
+
audienceClass,
|
|
300
|
+
status: "active",
|
|
301
|
+
metadata: templateSeedMetadata(ctx.version),
|
|
302
|
+
createdBy: ctx.actor,
|
|
303
|
+
createdAt: ctx.now,
|
|
304
|
+
updatedAt: ctx.now
|
|
305
|
+
})),
|
|
288
306
|
tenantConfig: [
|
|
289
307
|
{ tenantId: ctx.templateTenantId, authPolicyMode: "open", defaultSessionTTL: 28800, defaultTopicVisibility: "tenant", featureFlags: { sdkBootstrapSeeds: true, interactiveRoleAuth: true }, maxWorkspaceCount: 25, defaultModelSlotOverrides: {}, updatedAt: ctx.now, updatedBy: ctx.actor }
|
|
290
308
|
],
|