@lucern/contracts 0.3.0-alpha.3 → 0.3.0-alpha.5
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/component-host-boundary.contract.d.ts +41 -0
- package/dist/component-host-boundary.contract.js +54 -0
- package/dist/component-host-boundary.contract.js.map +1 -0
- package/dist/edge-policy-manifest-DpmTtjmm.d.ts +132 -0
- package/dist/function-registry/beliefs.d.ts +41 -41
- package/dist/function-registry/beliefs.js +274 -8
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +259 -8
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +13 -13
- package/dist/function-registry/context.js +259 -9
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +230 -5
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +230 -5
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +241 -6
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +33 -33
- package/dist/function-registry/evidence.js +274 -9
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +131 -53
- package/dist/function-registry/graph.js +346 -12
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +1 -1
- package/dist/function-registry/helpers.js +230 -5
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +230 -5
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +1 -1
- package/dist/function-registry/index.js +230 -5
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +9 -9
- package/dist/function-registry/judgments.js +242 -8
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +230 -5
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +17 -17
- package/dist/function-registry/lenses.js +253 -8
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +5 -5
- package/dist/function-registry/manifest.js +3 -1
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +45 -45
- package/dist/function-registry/ontologies.js +248 -11
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +13 -13
- package/dist/function-registry/pipeline.js +239 -8
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +49 -49
- package/dist/function-registry/questions.js +327 -13
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +230 -5
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +21 -21
- package/dist/function-registry/topics.js +244 -8
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +1 -1
- package/dist/function-registry/worktrees.d.ts +80 -41
- package/dist/function-registry/worktrees.js +364 -17
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/function-registry-input-audit.d.ts +13 -0
- package/dist/function-registry-input-audit.js +164 -0
- package/dist/function-registry-input-audit.js.map +1 -0
- package/dist/gateway.contract.d.ts +1 -0
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.js +2 -2
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/graph-intelligence.contract.d.ts +506 -0
- package/dist/graph-intelligence.contract.js +595 -0
- package/dist/graph-intelligence.contract.js.map +1 -0
- package/dist/graph-types/index.d.ts +5 -1
- package/dist/graph-types/index.js +15 -4
- package/dist/graph-types/index.js.map +1 -1
- package/dist/{index-CV-0_VWJ.d.ts → index-O09U2xHk.d.ts} +5 -2
- package/dist/index.d.ts +21 -667
- package/dist/index.js +2139 -52
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +174 -0
- package/dist/infisical-runtime.contract.js +312 -0
- package/dist/infisical-runtime.contract.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.d.ts +2 -0
- package/dist/manifests/edge-policy-manifest.data.d.ts +27 -0
- package/dist/manifests/edge-policy-manifest.data.js +34 -0
- package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.js +65 -0
- package/dist/manifests/edge-policy-manifest.js.map +1 -0
- package/dist/manifests/infisical-runtime-manifest.d.ts +151 -0
- package/dist/manifests/infisical-runtime-manifest.js +311 -0
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
- package/dist/manifests/invariant-manifest.d.ts +65 -0
- package/dist/manifests/invariant-manifest.js +18 -0
- package/dist/manifests/invariant-manifest.js.map +1 -0
- package/dist/manifests/invariants/ast-utils.d.ts +14 -0
- package/dist/manifests/invariants/ast-utils.js +54 -0
- package/dist/manifests/invariants/ast-utils.js.map +1 -0
- package/dist/manifests/invariants/index.d.ts +15 -0
- package/dist/manifests/invariants/index.js +183 -0
- package/dist/manifests/invariants/index.js.map +1 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
- package/dist/manifests/tenant-client-manifest.d.ts +303 -0
- package/dist/manifests/tenant-client-manifest.js +409 -0
- package/dist/manifests/tenant-client-manifest.js.map +1 -0
- package/dist/projections/check-convex-args-shape.d.ts +3 -0
- package/dist/projections/check-convex-args-shape.js +396 -0
- package/dist/projections/check-convex-args-shape.js.map +1 -0
- package/dist/projections/create-evidence.projection.d.ts +176 -0
- package/dist/projections/create-evidence.projection.js +128 -0
- package/dist/projections/create-evidence.projection.js.map +1 -0
- package/dist/projections/index.d.ts +102 -0
- package/dist/projections/index.js +345 -0
- package/dist/projections/index.js.map +1 -0
- package/dist/projections/list-beliefs.projection.d.ts +36 -0
- package/dist/projections/list-beliefs.projection.js +54 -0
- package/dist/projections/list-beliefs.projection.js.map +1 -0
- package/dist/projections/list-tasks.projection.d.ts +32 -0
- package/dist/projections/list-tasks.projection.js +52 -0
- package/dist/projections/list-tasks.projection.js.map +1 -0
- package/dist/projections/modulate-confidence.projection.d.ts +219 -0
- package/dist/projections/modulate-confidence.projection.js +148 -0
- package/dist/projections/modulate-confidence.projection.js.map +1 -0
- package/dist/projections/projection-dsl.d.ts +11 -0
- package/dist/projections/projection-dsl.js +8 -0
- package/dist/projections/projection-dsl.js.map +1 -0
- package/dist/schemas/enums.d.ts +5 -2
- package/dist/schemas/enums.js +5 -2
- package/dist/schemas/enums.js.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +9 -4
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +940 -910
- package/dist/schemas/manifest.js +8 -3
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/sl-opinion.d.ts +4 -4
- package/dist/schemas/tables/identity/platform.d.ts +10 -10
- package/dist/schemas/tables/kernel/epistemic.d.ts +6 -6
- package/dist/schemas/tables/kernel/infra.d.ts +4 -4
- package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
- package/dist/schemas/tables/kernel/lens.d.ts +4 -4
- package/dist/schemas/tables/kernel/platform.d.ts +12 -12
- package/dist/schemas/tables/kernel/spine.d.ts +3 -3
- package/dist/schemas/tables/kernel/spine.js +5 -2
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +42 -42
- package/dist/schemas/tables/kernel/topic.js +4 -1
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +62 -62
- package/dist/schemas/tables/mc/identity.d.ts +2 -2
- package/dist/schemas/tables/mc/pack.d.ts +20 -20
- package/dist/schemas/tables/mc/registry.d.ts +4 -4
- package/dist/schemas/tables/mc/workspace.d.ts +9 -3
- package/dist/schemas/tables/mc/workspace.js +3 -1
- package/dist/schemas/tables/mc/workspace.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +1 -1
- package/dist/{sdk-tools.contract-S4ia0TTo.d.ts → sdk-tools.contract-Ng8ULxjr.d.ts} +1 -1
- package/dist/sdk-tools.contract.d.ts +2 -2
- package/dist/sdk-tools.contract.js +227 -4
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +1101 -0
- package/dist/tenant-bootstrap-seed.contract.js +653 -0
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
- package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
- package/dist/tenant-bootstrap-seed.defaults.js +303 -0
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
- package/dist/tenant-client.contract.d.ts +69 -5
- package/dist/tenant-client.contract.js +65 -4
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/{tool-contracts-C92-9ueT.d.ts → tool-contracts-CYXVPN4K.d.ts} +8 -2
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +228 -5
- package/dist/tool-contracts.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component host persistence boundary
|
|
3
|
+
*
|
|
4
|
+
* Host deployments may call component APIs, but they must not create or mutate
|
|
5
|
+
* component-owned tables directly through top-level ctx.db. This contract keeps
|
|
6
|
+
* tenant SDK clients from accidentally recreating Lucern kernel/identity tables
|
|
7
|
+
* as host "ghost tables".
|
|
8
|
+
*/
|
|
9
|
+
declare const COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION: "2026-04-28";
|
|
10
|
+
declare const COMPONENT_HOST_PROTECTED_TABLES: readonly ["backgroundJobRuns", "backgroundJobSettings", "systemLogs", "epistemicAudit", "platformPolicyDecisionLogs", "tenantApiKeys", "projectGrants", "userSessions"];
|
|
11
|
+
type ComponentHostProtectedTable = (typeof COMPONENT_HOST_PROTECTED_TABLES)[number];
|
|
12
|
+
declare const COMPONENT_HOST_PROTECTED_TABLE_OWNERS: {
|
|
13
|
+
readonly backgroundJobRuns: "kernel_component";
|
|
14
|
+
readonly backgroundJobSettings: "kernel_component";
|
|
15
|
+
readonly systemLogs: "kernel_component";
|
|
16
|
+
readonly epistemicAudit: "reasoning_kernel_component";
|
|
17
|
+
readonly platformPolicyDecisionLogs: "identity_component";
|
|
18
|
+
readonly tenantApiKeys: "identity_component";
|
|
19
|
+
readonly projectGrants: "identity_component";
|
|
20
|
+
readonly userSessions: "tenant_or_control_plane_schema";
|
|
21
|
+
};
|
|
22
|
+
declare const COMPONENT_HOST_DB_WRITE_OPERATIONS: readonly ["insert", "patch", "replace", "delete"];
|
|
23
|
+
type ComponentHostDbWriteOperation = (typeof COMPONENT_HOST_DB_WRITE_OPERATIONS)[number];
|
|
24
|
+
declare const COMPONENT_HOST_DB_READ_OPERATIONS: readonly ["query"];
|
|
25
|
+
type ComponentHostDbReadOperation = (typeof COMPONENT_HOST_DB_READ_OPERATIONS)[number];
|
|
26
|
+
type ComponentHostDbOperation = ComponentHostDbWriteOperation | ComponentHostDbReadOperation;
|
|
27
|
+
declare const COMPONENT_HOST_WRITE_AUDIT_ROOTS: readonly ["apps/web/convex", "packages/server-core/src", "services/kernel-template/convex", "services/identity-template/convex", "services/master-control/convex"];
|
|
28
|
+
type ComponentHostWriteAuditRoot = (typeof COMPONENT_HOST_WRITE_AUDIT_ROOTS)[number];
|
|
29
|
+
declare const COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS: readonly [{
|
|
30
|
+
readonly file: "services/master-control/convex/userSessions.ts";
|
|
31
|
+
readonly table: "userSessions";
|
|
32
|
+
readonly operation: "insert";
|
|
33
|
+
readonly reason: "Master Control declares and owns its own userSessions table for gateway session validation.";
|
|
34
|
+
}, {
|
|
35
|
+
readonly file: "services/master-control/convex/userSessions.ts";
|
|
36
|
+
readonly table: "userSessions";
|
|
37
|
+
readonly operation: "query";
|
|
38
|
+
readonly reason: "Master Control declares and owns its own userSessions table for gateway session validation.";
|
|
39
|
+
}];
|
|
40
|
+
|
|
41
|
+
export { COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION, COMPONENT_HOST_DB_READ_OPERATIONS, COMPONENT_HOST_DB_WRITE_OPERATIONS, COMPONENT_HOST_PROTECTED_TABLES, COMPONENT_HOST_PROTECTED_TABLE_OWNERS, COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS, COMPONENT_HOST_WRITE_AUDIT_ROOTS, type ComponentHostDbOperation, type ComponentHostDbReadOperation, type ComponentHostDbWriteOperation, type ComponentHostProtectedTable, type ComponentHostWriteAuditRoot };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/component-host-boundary.contract.ts
|
|
2
|
+
var COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION = "2026-04-28";
|
|
3
|
+
var COMPONENT_HOST_PROTECTED_TABLES = [
|
|
4
|
+
"backgroundJobRuns",
|
|
5
|
+
"backgroundJobSettings",
|
|
6
|
+
"systemLogs",
|
|
7
|
+
"epistemicAudit",
|
|
8
|
+
"platformPolicyDecisionLogs",
|
|
9
|
+
"tenantApiKeys",
|
|
10
|
+
"projectGrants",
|
|
11
|
+
"userSessions"
|
|
12
|
+
];
|
|
13
|
+
var COMPONENT_HOST_PROTECTED_TABLE_OWNERS = {
|
|
14
|
+
backgroundJobRuns: "kernel_component",
|
|
15
|
+
backgroundJobSettings: "kernel_component",
|
|
16
|
+
systemLogs: "kernel_component",
|
|
17
|
+
epistemicAudit: "reasoning_kernel_component",
|
|
18
|
+
platformPolicyDecisionLogs: "identity_component",
|
|
19
|
+
tenantApiKeys: "identity_component",
|
|
20
|
+
projectGrants: "identity_component",
|
|
21
|
+
userSessions: "tenant_or_control_plane_schema"
|
|
22
|
+
};
|
|
23
|
+
var COMPONENT_HOST_DB_WRITE_OPERATIONS = [
|
|
24
|
+
"insert",
|
|
25
|
+
"patch",
|
|
26
|
+
"replace",
|
|
27
|
+
"delete"
|
|
28
|
+
];
|
|
29
|
+
var COMPONENT_HOST_DB_READ_OPERATIONS = ["query"];
|
|
30
|
+
var COMPONENT_HOST_WRITE_AUDIT_ROOTS = [
|
|
31
|
+
"apps/web/convex",
|
|
32
|
+
"packages/server-core/src",
|
|
33
|
+
"services/kernel-template/convex",
|
|
34
|
+
"services/identity-template/convex",
|
|
35
|
+
"services/master-control/convex"
|
|
36
|
+
];
|
|
37
|
+
var COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS = [
|
|
38
|
+
{
|
|
39
|
+
file: "services/master-control/convex/userSessions.ts",
|
|
40
|
+
table: "userSessions",
|
|
41
|
+
operation: "insert",
|
|
42
|
+
reason: "Master Control declares and owns its own userSessions table for gateway session validation."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
file: "services/master-control/convex/userSessions.ts",
|
|
46
|
+
table: "userSessions",
|
|
47
|
+
operation: "query",
|
|
48
|
+
reason: "Master Control declares and owns its own userSessions table for gateway session validation."
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
export { COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION, COMPONENT_HOST_DB_READ_OPERATIONS, COMPONENT_HOST_DB_WRITE_OPERATIONS, COMPONENT_HOST_PROTECTED_TABLES, COMPONENT_HOST_PROTECTED_TABLE_OWNERS, COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS, COMPONENT_HOST_WRITE_AUDIT_ROOTS };
|
|
53
|
+
//# sourceMappingURL=component-host-boundary.contract.js.map
|
|
54
|
+
//# sourceMappingURL=component-host-boundary.contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/component-host-boundary.contract.ts"],"names":[],"mappings":";AASO,IAAM,wCAAA,GAA2C;AAEjD,IAAM,+BAAA,GAAkC;AAAA,EAC7C,mBAAA;AAAA,EACA,uBAAA;AAAA,EACA,YAAA;AAAA,EACA,gBAAA;AAAA,EACA,4BAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA;AACF;AAIO,IAAM,qCAAA,GAAwC;AAAA,EACnD,iBAAA,EAAmB,kBAAA;AAAA,EACnB,qBAAA,EAAuB,kBAAA;AAAA,EACvB,UAAA,EAAY,kBAAA;AAAA,EACZ,cAAA,EAAgB,4BAAA;AAAA,EAChB,0BAAA,EAA4B,oBAAA;AAAA,EAC5B,aAAA,EAAe,oBAAA;AAAA,EACf,aAAA,EAAe,oBAAA;AAAA,EACf,YAAA,EAAc;AAChB;AAEO,IAAM,kCAAA,GAAqC;AAAA,EAChD,QAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA;AACF;AAIO,IAAM,iCAAA,GAAoC,CAAC,OAAO;AAQlD,IAAM,gCAAA,GAAmC;AAAA,EAC9C,iBAAA;AAAA,EACA,0BAAA;AAAA,EACA,iCAAA;AAAA,EACA,mCAAA;AAAA,EACA;AACF;AAIO,IAAM,uCAAA,GAA0C;AAAA,EACrD;AAAA,IACE,IAAA,EAAM,gDAAA;AAAA,IACN,KAAA,EAAO,cAAA;AAAA,IACP,SAAA,EAAW,QAAA;AAAA,IACX,MAAA,EACE;AAAA,GACJ;AAAA,EACA;AAAA,IACE,IAAA,EAAM,gDAAA;AAAA,IACN,KAAA,EAAO,cAAA;AAAA,IACP,SAAA,EAAW,OAAA;AAAA,IACX,MAAA,EACE;AAAA;AAEN","file":"component-host-boundary.contract.js","sourcesContent":["/**\n * Component host persistence boundary\n *\n * Host deployments may call component APIs, but they must not create or mutate\n * component-owned tables directly through top-level ctx.db. This contract keeps\n * tenant SDK clients from accidentally recreating Lucern kernel/identity tables\n * as host \"ghost tables\".\n */\n\nexport const COMPONENT_HOST_BOUNDARY_CONTRACT_VERSION = \"2026-04-28\" as const;\n\nexport const COMPONENT_HOST_PROTECTED_TABLES = [\n \"backgroundJobRuns\",\n \"backgroundJobSettings\",\n \"systemLogs\",\n \"epistemicAudit\",\n \"platformPolicyDecisionLogs\",\n \"tenantApiKeys\",\n \"projectGrants\",\n \"userSessions\",\n] as const;\nexport type ComponentHostProtectedTable =\n (typeof COMPONENT_HOST_PROTECTED_TABLES)[number];\n\nexport const COMPONENT_HOST_PROTECTED_TABLE_OWNERS = {\n backgroundJobRuns: \"kernel_component\",\n backgroundJobSettings: \"kernel_component\",\n systemLogs: \"kernel_component\",\n epistemicAudit: \"reasoning_kernel_component\",\n platformPolicyDecisionLogs: \"identity_component\",\n tenantApiKeys: \"identity_component\",\n projectGrants: \"identity_component\",\n userSessions: \"tenant_or_control_plane_schema\",\n} as const satisfies Record<ComponentHostProtectedTable, string>;\n\nexport const COMPONENT_HOST_DB_WRITE_OPERATIONS = [\n \"insert\",\n \"patch\",\n \"replace\",\n \"delete\",\n] as const;\nexport type ComponentHostDbWriteOperation =\n (typeof COMPONENT_HOST_DB_WRITE_OPERATIONS)[number];\n\nexport const COMPONENT_HOST_DB_READ_OPERATIONS = [\"query\"] as const;\nexport type ComponentHostDbReadOperation =\n (typeof COMPONENT_HOST_DB_READ_OPERATIONS)[number];\n\nexport type ComponentHostDbOperation =\n | ComponentHostDbWriteOperation\n | ComponentHostDbReadOperation;\n\nexport const COMPONENT_HOST_WRITE_AUDIT_ROOTS = [\n \"apps/web/convex\",\n \"packages/server-core/src\",\n \"services/kernel-template/convex\",\n \"services/identity-template/convex\",\n \"services/master-control/convex\",\n] as const;\nexport type ComponentHostWriteAuditRoot =\n (typeof COMPONENT_HOST_WRITE_AUDIT_ROOTS)[number];\n\nexport const COMPONENT_HOST_WRITE_ALLOWED_EXCEPTIONS = [\n {\n file: \"services/master-control/convex/userSessions.ts\",\n table: \"userSessions\",\n operation: \"insert\",\n reason:\n \"Master Control declares and owns its own userSessions table for gateway session validation.\",\n },\n {\n file: \"services/master-control/convex/userSessions.ts\",\n table: \"userSessions\",\n operation: \"query\",\n reason:\n \"Master Control declares and owns its own userSessions table for gateway session validation.\",\n },\n] as const satisfies ReadonlyArray<{\n file: string;\n table: ComponentHostProtectedTable;\n operation: ComponentHostDbOperation;\n reason: string;\n}>;\n"]}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const EpistemicNodeTypeSchema: z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>;
|
|
4
|
+
type EpistemicNodeType = z.infer<typeof EpistemicNodeTypeSchema>;
|
|
5
|
+
type GraphRef = {
|
|
6
|
+
kind: "epistemic_node";
|
|
7
|
+
nodeId: string;
|
|
8
|
+
nodeType: EpistemicNodeType;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "external_belief";
|
|
11
|
+
ref: {
|
|
12
|
+
tenantId: string;
|
|
13
|
+
beliefId: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const GraphRefSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"epistemic_node">;
|
|
18
|
+
nodeId: z.ZodString;
|
|
19
|
+
nodeType: z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
kind: "epistemic_node";
|
|
22
|
+
nodeId: string;
|
|
23
|
+
nodeType: "belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer";
|
|
24
|
+
}, {
|
|
25
|
+
kind: "epistemic_node";
|
|
26
|
+
nodeId: string;
|
|
27
|
+
nodeType: "belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer";
|
|
28
|
+
}>, z.ZodObject<{
|
|
29
|
+
kind: z.ZodLiteral<"external_belief">;
|
|
30
|
+
ref: z.ZodObject<{
|
|
31
|
+
tenantId: z.ZodString;
|
|
32
|
+
beliefId: z.ZodString;
|
|
33
|
+
}, "strip", z.ZodTypeAny, {
|
|
34
|
+
tenantId: string;
|
|
35
|
+
beliefId: string;
|
|
36
|
+
}, {
|
|
37
|
+
tenantId: string;
|
|
38
|
+
beliefId: string;
|
|
39
|
+
}>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
kind: "external_belief";
|
|
42
|
+
ref: {
|
|
43
|
+
tenantId: string;
|
|
44
|
+
beliefId: string;
|
|
45
|
+
};
|
|
46
|
+
}, {
|
|
47
|
+
kind: "external_belief";
|
|
48
|
+
ref: {
|
|
49
|
+
tenantId: string;
|
|
50
|
+
beliefId: string;
|
|
51
|
+
};
|
|
52
|
+
}>]>;
|
|
53
|
+
|
|
54
|
+
declare const EdgePolicyEntrySchema: z.ZodObject<{
|
|
55
|
+
edgeType: z.ZodString;
|
|
56
|
+
fromKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
|
|
57
|
+
fromNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
|
|
58
|
+
toKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
|
|
59
|
+
toNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
|
|
60
|
+
description: z.ZodString;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
description: string;
|
|
63
|
+
edgeType: string;
|
|
64
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
65
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
66
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
67
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
description: string;
|
|
70
|
+
edgeType: string;
|
|
71
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
72
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
73
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
74
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
declare const EdgePolicyManifestSchema: z.ZodObject<{
|
|
77
|
+
manifestVersion: z.ZodLiteral<"1.0.0">;
|
|
78
|
+
policies: z.ZodArray<z.ZodObject<{
|
|
79
|
+
edgeType: z.ZodString;
|
|
80
|
+
fromKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
|
|
81
|
+
fromNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
|
|
82
|
+
toKinds: z.ZodArray<z.ZodEnum<["epistemic_node", "external_belief"]>, "many">;
|
|
83
|
+
toNodeTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["belief", "evidence", "question", "answer", "topic", "edge", "ontology", "lens", "contradiction"]>, "many">>;
|
|
84
|
+
description: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
description: string;
|
|
87
|
+
edgeType: string;
|
|
88
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
89
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
90
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
91
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
92
|
+
}, {
|
|
93
|
+
description: string;
|
|
94
|
+
edgeType: string;
|
|
95
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
96
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
97
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
98
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
99
|
+
}>, "many">;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
policies: {
|
|
102
|
+
description: string;
|
|
103
|
+
edgeType: string;
|
|
104
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
105
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
106
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
107
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
108
|
+
}[];
|
|
109
|
+
manifestVersion: "1.0.0";
|
|
110
|
+
}, {
|
|
111
|
+
policies: {
|
|
112
|
+
description: string;
|
|
113
|
+
edgeType: string;
|
|
114
|
+
fromKinds: ("epistemic_node" | "external_belief")[];
|
|
115
|
+
toKinds: ("epistemic_node" | "external_belief")[];
|
|
116
|
+
fromNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
117
|
+
toNodeTypes?: ("belief" | "evidence" | "question" | "edge" | "contradiction" | "topic" | "ontology" | "lens" | "answer")[] | undefined;
|
|
118
|
+
}[];
|
|
119
|
+
manifestVersion: "1.0.0";
|
|
120
|
+
}>;
|
|
121
|
+
type EdgePolicyEntry = z.infer<typeof EdgePolicyEntrySchema>;
|
|
122
|
+
type EdgePolicyManifest = z.infer<typeof EdgePolicyManifestSchema>;
|
|
123
|
+
type EdgePolicyViolation = {
|
|
124
|
+
code: "POLICY_VIOLATION";
|
|
125
|
+
edgeType: string;
|
|
126
|
+
from: GraphRef;
|
|
127
|
+
to: GraphRef;
|
|
128
|
+
};
|
|
129
|
+
declare function findEdgePolicy(manifest: EdgePolicyManifest, edgeType: string): EdgePolicyEntry | undefined;
|
|
130
|
+
declare function assertEdgePolicyAllowed(manifest: EdgePolicyManifest, edgeType: string, from: GraphRef, to: GraphRef): void;
|
|
131
|
+
|
|
132
|
+
export { EpistemicNodeTypeSchema as E, type GraphRef as G, type EpistemicNodeType as a, GraphRefSchema as b, EdgePolicyEntrySchema as c, EdgePolicyManifestSchema as d, type EdgePolicyEntry as e, type EdgePolicyManifest as f, type EdgePolicyViolation as g, findEdgePolicy as h, assertEdgePolicyAllowed as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* MCP Tool Contract Definitions
|
|
@@ -115,10 +115,10 @@ declare const beliefsContracts: readonly [{
|
|
|
115
115
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
116
116
|
};
|
|
117
117
|
convex: FunctionConvexTarget | undefined;
|
|
118
|
-
args:
|
|
119
|
-
returns:
|
|
120
|
-
input:
|
|
121
|
-
output:
|
|
118
|
+
args: z.ZodTypeAny;
|
|
119
|
+
returns: z.ZodTypeAny;
|
|
120
|
+
input: z.ZodTypeAny;
|
|
121
|
+
output: z.ZodTypeAny;
|
|
122
122
|
openapi: {
|
|
123
123
|
summary: string;
|
|
124
124
|
tags: string[];
|
|
@@ -154,10 +154,10 @@ declare const beliefsContracts: readonly [{
|
|
|
154
154
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
155
155
|
};
|
|
156
156
|
convex: FunctionConvexTarget | undefined;
|
|
157
|
-
args:
|
|
158
|
-
returns:
|
|
159
|
-
input:
|
|
160
|
-
output:
|
|
157
|
+
args: z.ZodTypeAny;
|
|
158
|
+
returns: z.ZodTypeAny;
|
|
159
|
+
input: z.ZodTypeAny;
|
|
160
|
+
output: z.ZodTypeAny;
|
|
161
161
|
openapi: {
|
|
162
162
|
summary: string;
|
|
163
163
|
tags: string[];
|
|
@@ -193,10 +193,10 @@ declare const beliefsContracts: readonly [{
|
|
|
193
193
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
194
194
|
};
|
|
195
195
|
convex: FunctionConvexTarget | undefined;
|
|
196
|
-
args:
|
|
197
|
-
returns:
|
|
198
|
-
input:
|
|
199
|
-
output:
|
|
196
|
+
args: z.ZodTypeAny;
|
|
197
|
+
returns: z.ZodTypeAny;
|
|
198
|
+
input: z.ZodTypeAny;
|
|
199
|
+
output: z.ZodTypeAny;
|
|
200
200
|
openapi: {
|
|
201
201
|
summary: string;
|
|
202
202
|
tags: string[];
|
|
@@ -232,10 +232,10 @@ declare const beliefsContracts: readonly [{
|
|
|
232
232
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
233
233
|
};
|
|
234
234
|
convex: FunctionConvexTarget | undefined;
|
|
235
|
-
args:
|
|
236
|
-
returns:
|
|
237
|
-
input:
|
|
238
|
-
output:
|
|
235
|
+
args: z.ZodTypeAny;
|
|
236
|
+
returns: z.ZodTypeAny;
|
|
237
|
+
input: z.ZodTypeAny;
|
|
238
|
+
output: z.ZodTypeAny;
|
|
239
239
|
openapi: {
|
|
240
240
|
summary: string;
|
|
241
241
|
tags: string[];
|
|
@@ -271,10 +271,10 @@ declare const beliefsContracts: readonly [{
|
|
|
271
271
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
272
272
|
};
|
|
273
273
|
convex: FunctionConvexTarget | undefined;
|
|
274
|
-
args:
|
|
275
|
-
returns:
|
|
276
|
-
input:
|
|
277
|
-
output:
|
|
274
|
+
args: z.ZodTypeAny;
|
|
275
|
+
returns: z.ZodTypeAny;
|
|
276
|
+
input: z.ZodTypeAny;
|
|
277
|
+
output: z.ZodTypeAny;
|
|
278
278
|
openapi: {
|
|
279
279
|
summary: string;
|
|
280
280
|
tags: string[];
|
|
@@ -310,10 +310,10 @@ declare const beliefsContracts: readonly [{
|
|
|
310
310
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
311
311
|
};
|
|
312
312
|
convex: FunctionConvexTarget | undefined;
|
|
313
|
-
args:
|
|
314
|
-
returns:
|
|
315
|
-
input:
|
|
316
|
-
output:
|
|
313
|
+
args: z.ZodTypeAny;
|
|
314
|
+
returns: z.ZodTypeAny;
|
|
315
|
+
input: z.ZodTypeAny;
|
|
316
|
+
output: z.ZodTypeAny;
|
|
317
317
|
openapi: {
|
|
318
318
|
summary: string;
|
|
319
319
|
tags: string[];
|
|
@@ -349,10 +349,10 @@ declare const beliefsContracts: readonly [{
|
|
|
349
349
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
350
350
|
};
|
|
351
351
|
convex: FunctionConvexTarget | undefined;
|
|
352
|
-
args:
|
|
353
|
-
returns:
|
|
354
|
-
input:
|
|
355
|
-
output:
|
|
352
|
+
args: z.ZodTypeAny;
|
|
353
|
+
returns: z.ZodTypeAny;
|
|
354
|
+
input: z.ZodTypeAny;
|
|
355
|
+
output: z.ZodTypeAny;
|
|
356
356
|
openapi: {
|
|
357
357
|
summary: string;
|
|
358
358
|
tags: string[];
|
|
@@ -388,10 +388,10 @@ declare const beliefsContracts: readonly [{
|
|
|
388
388
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
389
389
|
};
|
|
390
390
|
convex: FunctionConvexTarget | undefined;
|
|
391
|
-
args:
|
|
392
|
-
returns:
|
|
393
|
-
input:
|
|
394
|
-
output:
|
|
391
|
+
args: z.ZodTypeAny;
|
|
392
|
+
returns: z.ZodTypeAny;
|
|
393
|
+
input: z.ZodTypeAny;
|
|
394
|
+
output: z.ZodTypeAny;
|
|
395
395
|
openapi: {
|
|
396
396
|
summary: string;
|
|
397
397
|
tags: string[];
|
|
@@ -427,10 +427,10 @@ declare const beliefsContracts: readonly [{
|
|
|
427
427
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
428
428
|
};
|
|
429
429
|
convex: FunctionConvexTarget | undefined;
|
|
430
|
-
args:
|
|
431
|
-
returns:
|
|
432
|
-
input:
|
|
433
|
-
output:
|
|
430
|
+
args: z.ZodTypeAny;
|
|
431
|
+
returns: z.ZodTypeAny;
|
|
432
|
+
input: z.ZodTypeAny;
|
|
433
|
+
output: z.ZodTypeAny;
|
|
434
434
|
openapi: {
|
|
435
435
|
summary: string;
|
|
436
436
|
tags: string[];
|
|
@@ -466,10 +466,10 @@ declare const beliefsContracts: readonly [{
|
|
|
466
466
|
allowedPrincipalTypes: ("user" | "service" | "agent")[];
|
|
467
467
|
};
|
|
468
468
|
convex: FunctionConvexTarget | undefined;
|
|
469
|
-
args:
|
|
470
|
-
returns:
|
|
471
|
-
input:
|
|
472
|
-
output:
|
|
469
|
+
args: z.ZodTypeAny;
|
|
470
|
+
returns: z.ZodTypeAny;
|
|
471
|
+
input: z.ZodTypeAny;
|
|
472
|
+
output: z.ZodTypeAny;
|
|
473
473
|
openapi: {
|
|
474
474
|
summary: string;
|
|
475
475
|
tags: string[];
|