@lucern/contracts 0.3.0-alpha.9 → 1.0.0
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/CHANGELOG.md +7 -0
- package/dist/api-enums.contract.d.ts +5 -3
- package/dist/api-enums.contract.js +14 -12
- package/dist/api-enums.contract.js.map +1 -1
- package/dist/auth-context.contract.js +14 -2
- package/dist/auth-context.contract.js.map +1 -1
- package/dist/auth-session.contract.js +14 -2
- package/dist/auth-session.contract.js.map +1 -1
- package/dist/auth.contract.d.ts +1 -1
- package/dist/auth.contract.js +14 -2
- package/dist/auth.contract.js.map +1 -1
- package/dist/component-boundary.contract.d.ts +1 -1
- package/dist/component-boundary.contract.js +46 -26
- package/dist/component-boundary.contract.js.map +1 -1
- package/dist/component-host-boundary.contract.d.ts +10 -5
- package/dist/component-host-boundary.contract.js +10 -4
- package/dist/component-host-boundary.contract.js.map +1 -1
- package/dist/{defineTable-CBQ03FXl.d.ts → defineTable-t1wr5wgn.d.ts} +1 -1
- package/dist/{dsl-djCRfuWC.d.ts → dsl-DVPthQGY.d.ts} +1 -1
- package/dist/dsl.d.ts +2 -2
- package/dist/dsl.js.map +1 -1
- package/dist/function-registry/beliefs.d.ts +23 -10
- package/dist/function-registry/beliefs.js +467 -36
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +15 -6
- package/dist/function-registry/coding.js +531 -22
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +9 -3
- package/dist/function-registry/context.js +464 -21
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +9 -3
- package/dist/function-registry/contracts.js +464 -21
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +21 -9
- package/dist/function-registry/coordination.js +464 -21
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +167 -2
- package/dist/function-registry/edges.js +619 -28
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +19 -8
- package/dist/function-registry/evidence.js +469 -36
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +33 -15
- package/dist/function-registry/graph.js +464 -21
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +6 -3
- package/dist/function-registry/helpers.js +465 -22
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +62 -16
- package/dist/function-registry/identity.js +487 -27
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +4 -2
- package/dist/function-registry/index.js +468 -22
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +7 -2
- package/dist/function-registry/judgments.js +464 -21
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +5 -1
- package/dist/function-registry/legacy.js +464 -21
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +11 -4
- package/dist/function-registry/lenses.js +464 -21
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +4 -4
- package/dist/function-registry/manifest.js +16 -1
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +412 -0
- package/dist/function-registry/nodes.js +5354 -0
- package/dist/function-registry/nodes.js.map +1 -0
- package/dist/function-registry/ontologies.d.ts +25 -11
- package/dist/function-registry/ontologies.js +464 -21
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +9 -3
- package/dist/function-registry/pipeline.js +464 -21
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +27 -12
- package/dist/function-registry/questions.js +466 -26
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +11 -4
- package/dist/function-registry/tasks.js +497 -30
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +93 -5
- package/dist/function-registry/topics.js +534 -24
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +7 -3
- package/dist/function-registry/worktrees.d.ts +25 -11
- package/dist/function-registry/worktrees.js +480 -21
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/gateway.contract.d.ts +4 -0
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.d.ts +3 -3
- package/dist/generated/convexSchemas.js +37 -17
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/infisicalRuntimeEnv.d.ts +70 -0
- package/dist/generated/infisicalRuntimeEnv.js +27585 -0
- package/dist/generated/infisicalRuntimeEnv.js.map +1 -0
- package/dist/generated/lucernGatewayEnv.d.ts +17 -0
- package/dist/generated/lucernGatewayEnv.js +38 -0
- package/dist/generated/lucernGatewayEnv.js.map +1 -0
- package/dist/generated/lucernWebPublicEnv.d.ts +26 -0
- package/dist/generated/lucernWebPublicEnv.js +32 -0
- package/dist/generated/lucernWebPublicEnv.js.map +1 -0
- package/dist/generated/lucernWebServerEnv.d.ts +33 -0
- package/dist/generated/lucernWebServerEnv.js +51 -0
- package/dist/generated/lucernWebServerEnv.js.map +1 -0
- package/dist/generated/schema-manifest.json +1221 -114
- package/dist/generated/tableOwnership.d.ts +48 -28
- package/dist/generated/tableOwnership.js +66 -26
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +64 -9
- package/dist/{index-O09U2xHk.d.ts → index-CM1Pl_vI.d.ts} +3 -3
- package/dist/index.d.ts +11 -6
- package/dist/index.js +32838 -413
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +1763 -6
- package/dist/infisical-runtime.contract.js +2994 -15
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +1689 -6
- package/dist/manifests/infisical-runtime-manifest.js +2847 -12
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/manifests/tenant-client-manifest.d.ts +19 -14
- package/dist/manifests/tenant-client-manifest.js +29 -12
- package/dist/manifests/tenant-client-manifest.js.map +1 -1
- package/dist/mcp-gateway-boundary.contract.d.ts +23 -3
- package/dist/mcp-gateway-boundary.contract.js +2 -0
- package/dist/mcp-gateway-boundary.contract.js.map +1 -1
- package/dist/permit-principal-projection.contract.d.ts +74 -0
- package/dist/permit-principal-projection.contract.js +167 -0
- package/dist/permit-principal-projection.contract.js.map +1 -0
- package/dist/projections/check-convex-args-shape.js +10 -6
- package/dist/projections/check-convex-args-shape.js.map +1 -1
- package/dist/projections/create-evidence.projection.d.ts +6 -6
- package/dist/projections/create-evidence.projection.js +2 -3
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +3 -3
- package/dist/projections/index.js +10 -6
- package/dist/projections/index.js.map +1 -1
- package/dist/projections/list-tasks.projection.d.ts +20 -8
- package/dist/projections/list-tasks.projection.js +8 -3
- package/dist/projections/list-tasks.projection.js.map +1 -1
- package/dist/proof-attestation.json +45 -0
- package/dist/schemas/component-table-manifest.d.ts +6 -6
- package/dist/schemas/component-table-manifest.js +2 -2
- package/dist/schemas/component-table-manifest.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.js +1123 -137
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +2102 -132
- package/dist/schemas/manifest.js +1121 -135
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/controlPlane/accessControl.d.ts +260 -0
- package/dist/schemas/tables/controlPlane/accessControl.js +658 -0
- package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/agent.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/agent.js +3 -3
- package/dist/schemas/tables/controlPlane/agent.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/epistemic.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/epistemic.js +3 -3
- package/dist/schemas/tables/controlPlane/epistemic.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/model.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/model.js +6 -6
- package/dist/schemas/tables/controlPlane/model.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/platform.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/platform.js +18 -18
- package/dist/schemas/tables/controlPlane/platform.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/project.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/project.js +3 -3
- package/dist/schemas/tables/controlPlane/project.js.map +1 -0
- package/dist/schemas/tables/{identity → controlPlane}/user.d.ts +1 -1
- package/dist/schemas/tables/{identity → controlPlane}/user.js +3 -3
- package/dist/schemas/tables/controlPlane/user.js.map +1 -0
- package/dist/schemas/tables/kernel/config.d.ts +1 -1
- package/dist/schemas/tables/kernel/config.js.map +1 -1
- package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
- package/dist/schemas/tables/kernel/coordination.js.map +1 -1
- package/dist/schemas/tables/kernel/decision.d.ts +1 -1
- package/dist/schemas/tables/kernel/decision.js.map +1 -1
- package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
- package/dist/schemas/tables/kernel/embedding.js.map +1 -1
- package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
- package/dist/schemas/tables/kernel/epistemic.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/schemas/tables/kernel/idempotency.d.ts +1 -1
- package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
- package/dist/schemas/tables/kernel/infra.d.ts +1 -1
- package/dist/schemas/tables/kernel/infra.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
- package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
- package/dist/schemas/tables/kernel/lens.d.ts +1 -1
- package/dist/schemas/tables/kernel/lens.js.map +1 -1
- package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
- package/dist/schemas/tables/kernel/ontology.js.map +1 -1
- package/dist/schemas/tables/kernel/platform.d.ts +1 -1
- package/dist/schemas/tables/kernel/platform.js.map +1 -1
- package/dist/schemas/tables/kernel/spine.d.ts +2 -1
- package/dist/schemas/tables/kernel/spine.js +1 -0
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +1 -1
- package/dist/schemas/tables/kernel/task.js.map +1 -1
- package/dist/schemas/tables/kernel/topic.d.ts +1 -1
- package/dist/schemas/tables/kernel/topic.js +1 -0
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
- package/dist/schemas/tables/kernel/workflow.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +17 -17
- package/dist/schemas/tables/kernel/worktree.js.map +1 -1
- package/dist/schemas/tables/mc/identity.d.ts +19 -2
- package/dist/schemas/tables/mc/identity.js +32 -1
- package/dist/schemas/tables/mc/identity.js.map +1 -1
- package/dist/schemas/tables/mc/methodology.d.ts +1 -1
- package/dist/schemas/tables/mc/methodology.js.map +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +1 -1
- package/dist/schemas/tables/mc/pack.js.map +1 -1
- package/dist/schemas/tables/mc/policy.d.ts +2 -2
- package/dist/schemas/tables/mc/policy.js +1 -1
- package/dist/schemas/tables/mc/policy.js.map +1 -1
- package/dist/schemas/tables/mc/registry.d.ts +1 -1
- package/dist/schemas/tables/mc/registry.js.map +1 -1
- package/dist/schemas/tables/mc/runtime.d.ts +109 -3
- package/dist/schemas/tables/mc/runtime.js +330 -104
- package/dist/schemas/tables/mc/runtime.js.map +1 -1
- package/dist/schemas/tables/mc/tenant.d.ts +4 -2
- package/dist/schemas/tables/mc/tenant.js +3 -1
- package/dist/schemas/tables/mc/tenant.js.map +1 -1
- package/dist/schemas/tables/mc/workspace.d.ts +22 -5
- package/dist/schemas/tables/mc/workspace.js +34 -2
- package/dist/schemas/tables/mc/workspace.js.map +1 -1
- package/dist/{sdk-tools.contract-Ci8bkoai.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 +417 -13
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +244 -56
- package/dist/tenant-bootstrap-seed.contract.js +139 -28
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.defaults.d.ts +2 -2
- package/dist/tenant-bootstrap-seed.defaults.js +31 -13
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
- package/dist/tenant-client.contract.d.ts +20 -15
- package/dist/tenant-client.contract.js +29 -12
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/{tool-contracts-B4iWhejG.d.ts → tool-contracts-C_xvM9q2.d.ts} +32 -2
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +418 -14
- package/dist/tool-contracts.js.map +1 -1
- package/package.json +22 -1
- package/dist/schemas/tables/identity/agent.js.map +0 -1
- package/dist/schemas/tables/identity/epistemic.js.map +0 -1
- package/dist/schemas/tables/identity/model.js.map +0 -1
- package/dist/schemas/tables/identity/platform.js.map +0 -1
- package/dist/schemas/tables/identity/project.js.map +0 -1
- package/dist/schemas/tables/identity/user.js.map +0 -1
|
@@ -10,6 +10,8 @@ import { questionsContracts } from './questions.js';
|
|
|
10
10
|
export { questionsContracts } from './questions.js';
|
|
11
11
|
import { topicsContracts } from './topics.js';
|
|
12
12
|
export { topicsContracts } from './topics.js';
|
|
13
|
+
import { nodesContracts } from './nodes.js';
|
|
14
|
+
export { nodesContracts } from './nodes.js';
|
|
13
15
|
import { lensesContracts } from './lenses.js';
|
|
14
16
|
export { lensesContracts } from './lenses.js';
|
|
15
17
|
import { ontologiesContracts } from './ontologies.js';
|
|
@@ -38,6 +40,20 @@ import { z } from 'zod';
|
|
|
38
40
|
|
|
39
41
|
// src/function-registry/index.ts
|
|
40
42
|
|
|
43
|
+
// src/types/reasoning-method.ts
|
|
44
|
+
var REASONING_METHODS = [
|
|
45
|
+
"deductive",
|
|
46
|
+
"inductive",
|
|
47
|
+
"abductive",
|
|
48
|
+
"analogical",
|
|
49
|
+
"causal",
|
|
50
|
+
"correlational",
|
|
51
|
+
"testimonial",
|
|
52
|
+
"statistical",
|
|
53
|
+
"implicit",
|
|
54
|
+
"pattern_match"
|
|
55
|
+
];
|
|
56
|
+
|
|
41
57
|
// src/lens-workflow.contract.ts
|
|
42
58
|
var LENS_PERSPECTIVE_TYPES = [
|
|
43
59
|
"investigation",
|
|
@@ -869,19 +885,23 @@ var FIND_CONTRADICTIONS = {
|
|
|
869
885
|
};
|
|
870
886
|
var CREATE_EDGE = {
|
|
871
887
|
name: "create_edge",
|
|
872
|
-
description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes.
|
|
888
|
+
description: "Commit a typed relationship between two nodes in the reasoning graph. Like `git commit` \u2014 an atomic write that declares a dependency between nodes. Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.",
|
|
873
889
|
parameters: {
|
|
874
|
-
|
|
875
|
-
type: "
|
|
876
|
-
description: "Source
|
|
890
|
+
from: {
|
|
891
|
+
type: "object",
|
|
892
|
+
description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
|
|
877
893
|
},
|
|
878
|
-
|
|
879
|
-
type: "
|
|
880
|
-
description: "Target
|
|
894
|
+
to: {
|
|
895
|
+
type: "object",
|
|
896
|
+
description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
|
|
881
897
|
},
|
|
882
898
|
edgeType: {
|
|
883
899
|
type: "string",
|
|
884
|
-
description: "Relationship type
|
|
900
|
+
description: "Relationship type from the public epistemic edge enum."
|
|
901
|
+
},
|
|
902
|
+
globalId: {
|
|
903
|
+
type: "string",
|
|
904
|
+
description: "Optional idempotent edge global ID."
|
|
885
905
|
},
|
|
886
906
|
weight: {
|
|
887
907
|
type: "number",
|
|
@@ -891,10 +911,14 @@ var CREATE_EDGE = {
|
|
|
891
911
|
reasoningMethod: {
|
|
892
912
|
type: "string",
|
|
893
913
|
description: "How this was determined",
|
|
894
|
-
enum: [
|
|
914
|
+
enum: [...REASONING_METHODS]
|
|
915
|
+
},
|
|
916
|
+
metadata: {
|
|
917
|
+
type: "object",
|
|
918
|
+
description: "Optional edge metadata."
|
|
895
919
|
}
|
|
896
920
|
},
|
|
897
|
-
required: ["
|
|
921
|
+
required: ["from", "to", "edgeType"],
|
|
898
922
|
response: {
|
|
899
923
|
description: "The created edge",
|
|
900
924
|
fields: {
|
|
@@ -908,6 +932,240 @@ var CREATE_EDGE = {
|
|
|
908
932
|
ontologyPrimitive: "edge",
|
|
909
933
|
tier: "showcase"
|
|
910
934
|
};
|
|
935
|
+
var UPDATE_EDGE = {
|
|
936
|
+
name: "update_edge",
|
|
937
|
+
description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
|
|
938
|
+
parameters: {
|
|
939
|
+
edgeId: { type: "string", description: "Edge ID or global ID to update" },
|
|
940
|
+
weight: { type: "number", description: "Updated edge weight" },
|
|
941
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
942
|
+
context: { type: "string", description: "Updated human-readable context" },
|
|
943
|
+
derivationType: { type: "string", description: "Updated derivation type" },
|
|
944
|
+
metadata: { type: "object", description: "Updated metadata" }
|
|
945
|
+
},
|
|
946
|
+
required: ["edgeId"],
|
|
947
|
+
response: {
|
|
948
|
+
description: "Edge update result",
|
|
949
|
+
fields: { success: "boolean" }
|
|
950
|
+
},
|
|
951
|
+
ownerModule: "graph-primitives",
|
|
952
|
+
ontologyPrimitive: "edge",
|
|
953
|
+
tier: "workhorse"
|
|
954
|
+
};
|
|
955
|
+
var REMOVE_EDGE = {
|
|
956
|
+
name: "remove_edge",
|
|
957
|
+
description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
|
|
958
|
+
parameters: {
|
|
959
|
+
edgeId: { type: "string", description: "Edge ID or global ID to remove" }
|
|
960
|
+
},
|
|
961
|
+
required: ["edgeId"],
|
|
962
|
+
response: {
|
|
963
|
+
description: "Edge removal result",
|
|
964
|
+
fields: { success: "boolean" }
|
|
965
|
+
},
|
|
966
|
+
ownerModule: "graph-primitives",
|
|
967
|
+
ontologyPrimitive: "edge",
|
|
968
|
+
tier: "workhorse"
|
|
969
|
+
};
|
|
970
|
+
var REMOVE_EDGES_BETWEEN = {
|
|
971
|
+
name: "remove_edges_between",
|
|
972
|
+
description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
|
|
973
|
+
parameters: {
|
|
974
|
+
fromNodeId: { type: "string", description: "Source node ID or global ID" },
|
|
975
|
+
toNodeId: { type: "string", description: "Target node ID or global ID" },
|
|
976
|
+
edgeType: { type: "string", description: "Optional edge type filter" }
|
|
977
|
+
},
|
|
978
|
+
required: ["fromNodeId", "toNodeId"],
|
|
979
|
+
response: {
|
|
980
|
+
description: "Matched edge removal result",
|
|
981
|
+
fields: { deleted: "number" }
|
|
982
|
+
},
|
|
983
|
+
ownerModule: "graph-primitives",
|
|
984
|
+
ontologyPrimitive: "edge",
|
|
985
|
+
tier: "workhorse"
|
|
986
|
+
};
|
|
987
|
+
var BATCH_CREATE_EDGES = {
|
|
988
|
+
name: "batch_create_edges",
|
|
989
|
+
description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
|
|
990
|
+
parameters: {
|
|
991
|
+
edges: {
|
|
992
|
+
type: "array",
|
|
993
|
+
description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
|
|
994
|
+
},
|
|
995
|
+
skipLayerValidation: {
|
|
996
|
+
type: "boolean",
|
|
997
|
+
description: "Skip kernel layer validation for trusted materialization flows."
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
required: ["edges"],
|
|
1001
|
+
response: {
|
|
1002
|
+
description: "Batch edge creation result",
|
|
1003
|
+
fields: {
|
|
1004
|
+
created: "number",
|
|
1005
|
+
results: "array",
|
|
1006
|
+
errors: "array"
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
ownerModule: "graph-primitives",
|
|
1010
|
+
ontologyPrimitive: "edge",
|
|
1011
|
+
tier: "workhorse"
|
|
1012
|
+
};
|
|
1013
|
+
var CREATE_EPISTEMIC_NODE = {
|
|
1014
|
+
name: "create_epistemic_node",
|
|
1015
|
+
description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
|
|
1016
|
+
parameters: {
|
|
1017
|
+
globalId: { type: "string", description: "Optional idempotent node global ID" },
|
|
1018
|
+
nodeType: { type: "string", description: "Public epistemic node type" },
|
|
1019
|
+
canonicalText: { type: "string", description: "Canonical node text" },
|
|
1020
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1021
|
+
contentHash: { type: "string", description: "Optional idempotency content hash" },
|
|
1022
|
+
sourceType: { type: "string", description: "Source type for provenance" },
|
|
1023
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1024
|
+
content: { type: "string", description: "Extended content" },
|
|
1025
|
+
title: { type: "string", description: "Display title" },
|
|
1026
|
+
metadata: { type: "object", description: "Optional node metadata" }
|
|
1027
|
+
},
|
|
1028
|
+
required: ["nodeType"],
|
|
1029
|
+
response: {
|
|
1030
|
+
description: "Created node result",
|
|
1031
|
+
fields: {
|
|
1032
|
+
nodeId: "string",
|
|
1033
|
+
nodeGlobalId: "string",
|
|
1034
|
+
isDuplicate: "boolean"
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
ownerModule: "reasoning-kernel",
|
|
1038
|
+
ontologyPrimitive: "graph",
|
|
1039
|
+
tier: "showcase"
|
|
1040
|
+
};
|
|
1041
|
+
var GET_EPISTEMIC_NODE = {
|
|
1042
|
+
name: "get_epistemic_node",
|
|
1043
|
+
description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
|
|
1044
|
+
parameters: {
|
|
1045
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1046
|
+
},
|
|
1047
|
+
required: ["nodeId"],
|
|
1048
|
+
response: {
|
|
1049
|
+
description: "The resolved node",
|
|
1050
|
+
fields: { node: "object" }
|
|
1051
|
+
},
|
|
1052
|
+
ownerModule: "reasoning-kernel",
|
|
1053
|
+
ontologyPrimitive: "graph",
|
|
1054
|
+
tier: "workhorse"
|
|
1055
|
+
};
|
|
1056
|
+
var LIST_EPISTEMIC_NODES = {
|
|
1057
|
+
name: "list_epistemic_nodes",
|
|
1058
|
+
description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
|
|
1059
|
+
parameters: {
|
|
1060
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1061
|
+
nodeType: { type: "string", description: "Optional node type filter" },
|
|
1062
|
+
status: { type: "string", description: "Optional lifecycle status" },
|
|
1063
|
+
searchQuery: { type: "string", description: "Optional text search query" },
|
|
1064
|
+
limit: { type: "number", description: "Maximum nodes to return" }
|
|
1065
|
+
},
|
|
1066
|
+
required: [],
|
|
1067
|
+
response: {
|
|
1068
|
+
description: "Matching nodes",
|
|
1069
|
+
fields: { nodes: "array" }
|
|
1070
|
+
},
|
|
1071
|
+
ownerModule: "reasoning-kernel",
|
|
1072
|
+
ontologyPrimitive: "graph",
|
|
1073
|
+
tier: "workhorse"
|
|
1074
|
+
};
|
|
1075
|
+
var UPDATE_EPISTEMIC_NODE = {
|
|
1076
|
+
name: "update_epistemic_node",
|
|
1077
|
+
description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
|
|
1078
|
+
parameters: {
|
|
1079
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1080
|
+
canonicalText: { type: "string", description: "Updated canonical text" },
|
|
1081
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1082
|
+
contentHash: { type: "string", description: "Updated content hash" },
|
|
1083
|
+
content: { type: "string", description: "Updated content" },
|
|
1084
|
+
title: { type: "string", description: "Updated display title" },
|
|
1085
|
+
metadata: { type: "object", description: "Updated metadata" },
|
|
1086
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
1087
|
+
verificationStatus: { type: "string", description: "Updated verification status" },
|
|
1088
|
+
status: { type: "string", description: "Updated lifecycle status" }
|
|
1089
|
+
},
|
|
1090
|
+
required: ["nodeId"],
|
|
1091
|
+
response: {
|
|
1092
|
+
description: "Node update result",
|
|
1093
|
+
fields: { success: "boolean" }
|
|
1094
|
+
},
|
|
1095
|
+
ownerModule: "reasoning-kernel",
|
|
1096
|
+
ontologyPrimitive: "graph",
|
|
1097
|
+
tier: "workhorse"
|
|
1098
|
+
};
|
|
1099
|
+
var ARCHIVE_EPISTEMIC_NODE = {
|
|
1100
|
+
name: "archive_epistemic_node",
|
|
1101
|
+
description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
|
|
1102
|
+
parameters: {
|
|
1103
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1104
|
+
},
|
|
1105
|
+
required: ["nodeId"],
|
|
1106
|
+
response: {
|
|
1107
|
+
description: "Archive result",
|
|
1108
|
+
fields: { success: "boolean", effectiveStatus: "string" }
|
|
1109
|
+
},
|
|
1110
|
+
ownerModule: "reasoning-kernel",
|
|
1111
|
+
ontologyPrimitive: "graph",
|
|
1112
|
+
tier: "workhorse"
|
|
1113
|
+
};
|
|
1114
|
+
var VERIFY_EPISTEMIC_NODE = {
|
|
1115
|
+
name: "verify_epistemic_node",
|
|
1116
|
+
description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
|
|
1117
|
+
parameters: {
|
|
1118
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1119
|
+
verificationStatus: { type: "string", description: "Verification status" },
|
|
1120
|
+
confidence: { type: "number", description: "Optional confidence update" }
|
|
1121
|
+
},
|
|
1122
|
+
required: ["nodeId", "verificationStatus"],
|
|
1123
|
+
response: {
|
|
1124
|
+
description: "Verification result",
|
|
1125
|
+
fields: { success: "boolean" }
|
|
1126
|
+
},
|
|
1127
|
+
ownerModule: "reasoning-kernel",
|
|
1128
|
+
ontologyPrimitive: "graph",
|
|
1129
|
+
tier: "workhorse"
|
|
1130
|
+
};
|
|
1131
|
+
var SUPERSEDE_EPISTEMIC_NODE = {
|
|
1132
|
+
name: "supersede_epistemic_node",
|
|
1133
|
+
description: "Supersede an epistemic graph node with a new version. Like `git commit --amend` on an immutable history branch \u2014 creates the replacement and marks the old node superseded.",
|
|
1134
|
+
parameters: {
|
|
1135
|
+
oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
|
|
1136
|
+
newGlobalId: { type: "string", description: "Optional replacement global ID" },
|
|
1137
|
+
newCanonicalText: { type: "string", description: "Replacement canonical text" },
|
|
1138
|
+
text: { type: "string", description: "Alias for newCanonicalText" },
|
|
1139
|
+
newContentHash: { type: "string", description: "Optional replacement content hash" },
|
|
1140
|
+
reason: { type: "string", description: "Reason for superseding" }
|
|
1141
|
+
},
|
|
1142
|
+
required: ["oldNodeId"],
|
|
1143
|
+
response: {
|
|
1144
|
+
description: "Supersede result",
|
|
1145
|
+
fields: { oldNodeId: "string", newNodeId: "string" }
|
|
1146
|
+
},
|
|
1147
|
+
ownerModule: "reasoning-kernel",
|
|
1148
|
+
ontologyPrimitive: "graph",
|
|
1149
|
+
tier: "workhorse"
|
|
1150
|
+
};
|
|
1151
|
+
var BATCH_CREATE_EPISTEMIC_NODES = {
|
|
1152
|
+
name: "batch_create_epistemic_nodes",
|
|
1153
|
+
description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
|
|
1154
|
+
parameters: {
|
|
1155
|
+
nodes: {
|
|
1156
|
+
type: "array",
|
|
1157
|
+
description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
|
|
1158
|
+
}
|
|
1159
|
+
},
|
|
1160
|
+
required: ["nodes"],
|
|
1161
|
+
response: {
|
|
1162
|
+
description: "Batch node creation result",
|
|
1163
|
+
fields: { created: "number", results: "array" }
|
|
1164
|
+
},
|
|
1165
|
+
ownerModule: "reasoning-kernel",
|
|
1166
|
+
ontologyPrimitive: "graph",
|
|
1167
|
+
tier: "workhorse"
|
|
1168
|
+
};
|
|
911
1169
|
var RECORD_JUDGMENT = {
|
|
912
1170
|
name: "record_judgment",
|
|
913
1171
|
description: "Record a judgment \u2014 an irreversible commitment based on the current epistemic state. Like a `git tag` marking a release. A judgment synthesizes beliefs, evidence, and uncertainties into a determination. Once issued, a judgment is evaluated against the epistemic state that existed when it was made (knowledge horizon evaluation, Invariant #10).",
|
|
@@ -2107,8 +2365,8 @@ var IDENTITY_WHOAMI = {
|
|
|
2107
2365
|
response: {
|
|
2108
2366
|
description: "Canonical identity summary for the current session",
|
|
2109
2367
|
fields: {
|
|
2110
|
-
principalId: "string \u2014 canonical
|
|
2111
|
-
principalType: "string \u2014 human, service, or
|
|
2368
|
+
principalId: "string \u2014 canonical principal identifier; for humans this is the Clerk user_... ID",
|
|
2369
|
+
principalType: "string \u2014 human, service, agent, group, or external_viewer",
|
|
2112
2370
|
tenantId: "string | undefined \u2014 resolved tenant scope",
|
|
2113
2371
|
workspaceId: "string | undefined \u2014 resolved workspace scope",
|
|
2114
2372
|
scopes: "string[] | undefined \u2014 granted scopes for this session",
|
|
@@ -2119,6 +2377,49 @@ var IDENTITY_WHOAMI = {
|
|
|
2119
2377
|
ontologyPrimitive: "identity",
|
|
2120
2378
|
tier: "workhorse"
|
|
2121
2379
|
};
|
|
2380
|
+
var RESOLVE_INTERACTIVE_PRINCIPAL = {
|
|
2381
|
+
name: "resolve_interactive_principal",
|
|
2382
|
+
description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the Clerk subject into tenant/workspace authorization context.",
|
|
2383
|
+
parameters: {
|
|
2384
|
+
clerkId: {
|
|
2385
|
+
type: "string",
|
|
2386
|
+
description: "Authenticated Clerk subject (`sub`). Clerk proves identity only; it is not the authorization record."
|
|
2387
|
+
},
|
|
2388
|
+
tenantId: {
|
|
2389
|
+
type: "string",
|
|
2390
|
+
description: "Optional tenant scope. Omit only when the Clerk alias is globally unambiguous."
|
|
2391
|
+
},
|
|
2392
|
+
workspaceId: {
|
|
2393
|
+
type: "string",
|
|
2394
|
+
description: "Optional workspace scope. Required when the principal has access to multiple workspaces and no default can be inferred."
|
|
2395
|
+
},
|
|
2396
|
+
providerProjectId: {
|
|
2397
|
+
type: "string",
|
|
2398
|
+
description: "Optional Clerk project or provider instance id for tenants with multiple identity providers."
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
required: ["clerkId"],
|
|
2402
|
+
response: {
|
|
2403
|
+
description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
|
|
2404
|
+
fields: {
|
|
2405
|
+
principalId: "string \u2014 canonical Clerk user_... ID for human sessions",
|
|
2406
|
+
principalType: "string \u2014 human, service, agent, group, or external_viewer",
|
|
2407
|
+
clerkId: "string \u2014 authenticated Clerk subject alias",
|
|
2408
|
+
tenantId: "string \u2014 resolved tenant scope",
|
|
2409
|
+
workspaceId: "string | null \u2014 resolved workspace scope",
|
|
2410
|
+
roles: "string[] \u2014 effective Permit roles",
|
|
2411
|
+
scopes: "string[] \u2014 effective scopes derived from Permit/control-plane projection",
|
|
2412
|
+
groupIds: "string[] \u2014 active Permit group memberships",
|
|
2413
|
+
principalStatus: "string \u2014 active, invited, suspended, disabled, revoked, or missing",
|
|
2414
|
+
tenantStatus: "string \u2014 projected tenant resource status",
|
|
2415
|
+
workspaceStatus: "string \u2014 projected workspace resource status",
|
|
2416
|
+
permit: "object \u2014 Permit subject, tenant, and optional workspace tuple"
|
|
2417
|
+
}
|
|
2418
|
+
},
|
|
2419
|
+
ownerModule: "control-plane",
|
|
2420
|
+
ontologyPrimitive: "identity",
|
|
2421
|
+
tier: "workhorse"
|
|
2422
|
+
};
|
|
2122
2423
|
var COMPILE_CONTEXT = {
|
|
2123
2424
|
name: "compile_context",
|
|
2124
2425
|
description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
|
|
@@ -2380,6 +2681,10 @@ var CREATE_TASK = {
|
|
|
2380
2681
|
tags: {
|
|
2381
2682
|
type: "array",
|
|
2382
2683
|
description: "Free-form string tags"
|
|
2684
|
+
},
|
|
2685
|
+
metadata: {
|
|
2686
|
+
type: "object",
|
|
2687
|
+
description: "Structured task metadata for handoff context and routing hints"
|
|
2383
2688
|
}
|
|
2384
2689
|
},
|
|
2385
2690
|
required: ["title"],
|
|
@@ -2453,6 +2758,10 @@ var UPDATE_TASK = {
|
|
|
2453
2758
|
type: "string",
|
|
2454
2759
|
description: "Updated status",
|
|
2455
2760
|
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2761
|
+
},
|
|
2762
|
+
metadata: {
|
|
2763
|
+
type: "object",
|
|
2764
|
+
description: "Structured task metadata to replace or refine"
|
|
2456
2765
|
}
|
|
2457
2766
|
},
|
|
2458
2767
|
required: ["taskId"],
|
|
@@ -2500,6 +2809,10 @@ var CREATE_TOPIC = {
|
|
|
2500
2809
|
name: "create_topic",
|
|
2501
2810
|
description: "Create a new topic container for scoping knowledge. Like `git init` \u2014 initializes a new repository for a knowledge domain. Topics are hierarchical: a deal topic can nest under a theme topic. Types: domain, theme, deal, strategy, constitution, project, portfolio.",
|
|
2502
2811
|
parameters: {
|
|
2812
|
+
globalId: {
|
|
2813
|
+
type: "string",
|
|
2814
|
+
description: "Optional idempotent topic global ID"
|
|
2815
|
+
},
|
|
2503
2816
|
name: { type: "string", description: "Topic name" },
|
|
2504
2817
|
type: {
|
|
2505
2818
|
type: "string",
|
|
@@ -2510,6 +2823,18 @@ var CREATE_TOPIC = {
|
|
|
2510
2823
|
type: "string",
|
|
2511
2824
|
description: "Optional parent topic for nesting"
|
|
2512
2825
|
},
|
|
2826
|
+
parentTopicGlobalId: {
|
|
2827
|
+
type: "string",
|
|
2828
|
+
description: "Optional parent topic global ID for nesting"
|
|
2829
|
+
},
|
|
2830
|
+
tenantId: { type: "string", description: "Optional tenant scope" },
|
|
2831
|
+
workspaceId: { type: "string", description: "Optional workspace scope" },
|
|
2832
|
+
visibility: {
|
|
2833
|
+
type: "string",
|
|
2834
|
+
description: "Topic visibility",
|
|
2835
|
+
enum: ["private", "team", "firm", "external", "public"]
|
|
2836
|
+
},
|
|
2837
|
+
metadata: { type: "object", description: "Optional topic metadata" },
|
|
2513
2838
|
createdBy: { type: "string", description: "Who created this topic" }
|
|
2514
2839
|
},
|
|
2515
2840
|
required: ["name", "type"],
|
|
@@ -2518,6 +2843,9 @@ var CREATE_TOPIC = {
|
|
|
2518
2843
|
fields: {
|
|
2519
2844
|
id: "string \u2014 topic ID",
|
|
2520
2845
|
globalId: "string \u2014 globally unique ID",
|
|
2846
|
+
topicGlobalId: "string \u2014 topic global ID",
|
|
2847
|
+
epistemicNodeId: "string \u2014 materialized topic node ID",
|
|
2848
|
+
epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
|
|
2521
2849
|
depth: "number \u2014 nesting depth"
|
|
2522
2850
|
}
|
|
2523
2851
|
},
|
|
@@ -2648,6 +2976,65 @@ var GET_TOPIC_TREE = {
|
|
|
2648
2976
|
ontologyPrimitive: "graph",
|
|
2649
2977
|
tier: "workhorse"
|
|
2650
2978
|
};
|
|
2979
|
+
var MATERIALIZE_TOPIC_GRAPH = {
|
|
2980
|
+
name: "materialize_topic_graph",
|
|
2981
|
+
description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
|
|
2982
|
+
parameters: {
|
|
2983
|
+
rootTopicId: {
|
|
2984
|
+
type: "string",
|
|
2985
|
+
description: "Optional root topic for a bounded materialization pass"
|
|
2986
|
+
},
|
|
2987
|
+
dryRun: {
|
|
2988
|
+
type: "boolean",
|
|
2989
|
+
description: "When true, report missing rows without writing them"
|
|
2990
|
+
}
|
|
2991
|
+
},
|
|
2992
|
+
required: [],
|
|
2993
|
+
response: {
|
|
2994
|
+
description: "Topic graph materialization counts",
|
|
2995
|
+
fields: {
|
|
2996
|
+
topicsSeen: "number",
|
|
2997
|
+
nodesCreated: "number",
|
|
2998
|
+
nodesExisting: "number",
|
|
2999
|
+
edgesCreated: "number",
|
|
3000
|
+
edgesExisting: "number",
|
|
3001
|
+
errors: "array"
|
|
3002
|
+
}
|
|
3003
|
+
},
|
|
3004
|
+
ownerModule: "reasoning-kernel",
|
|
3005
|
+
ontologyPrimitive: "graph",
|
|
3006
|
+
tier: "workhorse"
|
|
3007
|
+
};
|
|
3008
|
+
var GET_TOPIC_GRAPH_SPINE = {
|
|
3009
|
+
name: "get_topic_graph_spine",
|
|
3010
|
+
description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
|
|
3011
|
+
parameters: {
|
|
3012
|
+
rootTopicId: {
|
|
3013
|
+
type: "string",
|
|
3014
|
+
description: "Optional root topic for a bounded verifier pass"
|
|
3015
|
+
},
|
|
3016
|
+
includeTopicBeliefEdges: {
|
|
3017
|
+
type: "boolean",
|
|
3018
|
+
description: "Include topic -> belief edges in the verifier payload"
|
|
3019
|
+
}
|
|
3020
|
+
},
|
|
3021
|
+
required: [],
|
|
3022
|
+
response: {
|
|
3023
|
+
description: "Topic graph spine verification payload",
|
|
3024
|
+
fields: {
|
|
3025
|
+
ok: "boolean",
|
|
3026
|
+
counts: "object",
|
|
3027
|
+
topics: "array",
|
|
3028
|
+
topicNodes: "array",
|
|
3029
|
+
parentEdges: "array",
|
|
3030
|
+
missingTopicNodes: "array",
|
|
3031
|
+
missingParentEdges: "array"
|
|
3032
|
+
}
|
|
3033
|
+
},
|
|
3034
|
+
ownerModule: "reasoning-kernel",
|
|
3035
|
+
ontologyPrimitive: "graph",
|
|
3036
|
+
tier: "workhorse"
|
|
3037
|
+
};
|
|
2651
3038
|
var GET_CODE_CONTEXT = {
|
|
2652
3039
|
name: "get_code_context",
|
|
2653
3040
|
description: "Returns code-grounded beliefs, contracts, migration states, and failed attempts anchored to a specific file or function path. Like `git log -- <path>` \u2014 filters the knowledge graph to nodes anchored to a file path via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, migrations, patterns, deprecations, and failures.",
|
|
@@ -2843,7 +3230,7 @@ var MANAGE_WRITE_POLICY = {
|
|
|
2843
3230
|
},
|
|
2844
3231
|
role: {
|
|
2845
3232
|
type: "string",
|
|
2846
|
-
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal'
|
|
3233
|
+
description: "Role to set policy for (required for 'set'). E.g. 'agent:internal' or a Permit role key such as 'workspace_admin'."
|
|
2847
3234
|
},
|
|
2848
3235
|
permission: {
|
|
2849
3236
|
type: "string",
|
|
@@ -3830,6 +4217,9 @@ var BEGIN_BUILD_SESSION = {
|
|
|
3830
4217
|
sessionMode: "string \u2014 async | interactive",
|
|
3831
4218
|
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
3832
4219
|
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
4220
|
+
taskIds: "array \u2014 assigned task IDs for this worktree",
|
|
4221
|
+
incompleteTaskIds: "array \u2014 assigned task IDs that still require done/deferred/blocked proof",
|
|
4222
|
+
tasks: "array \u2014 assigned task packet with id, title, status, priority, links, and summaries",
|
|
3833
4223
|
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
3834
4224
|
openQuestions: "array \u2014 open scoped questions",
|
|
3835
4225
|
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
@@ -3885,6 +4275,19 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3885
4275
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
3886
4276
|
// Edges (commit)
|
|
3887
4277
|
create_edge: CREATE_EDGE,
|
|
4278
|
+
update_edge: UPDATE_EDGE,
|
|
4279
|
+
remove_edge: REMOVE_EDGE,
|
|
4280
|
+
remove_edges_between: REMOVE_EDGES_BETWEEN,
|
|
4281
|
+
batch_create_edges: BATCH_CREATE_EDGES,
|
|
4282
|
+
// Epistemic node spine (commit/amend/show)
|
|
4283
|
+
create_epistemic_node: CREATE_EPISTEMIC_NODE,
|
|
4284
|
+
get_epistemic_node: GET_EPISTEMIC_NODE,
|
|
4285
|
+
list_epistemic_nodes: LIST_EPISTEMIC_NODES,
|
|
4286
|
+
update_epistemic_node: UPDATE_EPISTEMIC_NODE,
|
|
4287
|
+
archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
|
|
4288
|
+
verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
|
|
4289
|
+
supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
|
|
4290
|
+
batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
|
|
3888
4291
|
// Judgments (tag)
|
|
3889
4292
|
record_judgment: RECORD_JUDGMENT,
|
|
3890
4293
|
// Graph intelligence (showcase)
|
|
@@ -3919,6 +4322,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3919
4322
|
update_worktree_targets: UPDATE_WORKTREE_TARGETS,
|
|
3920
4323
|
update_worktree_metadata: UPDATE_WORKTREE_METADATA,
|
|
3921
4324
|
identity_whoami: IDENTITY_WHOAMI,
|
|
4325
|
+
resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
|
|
3922
4326
|
compile_context: COMPILE_CONTEXT,
|
|
3923
4327
|
record_scope_learning: RECORD_SCOPE_LEARNING,
|
|
3924
4328
|
pipeline_snapshot: PIPELINE_SNAPSHOT,
|
|
@@ -3958,6 +4362,8 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3958
4362
|
get_topic: GET_TOPIC,
|
|
3959
4363
|
update_topic: UPDATE_TOPIC,
|
|
3960
4364
|
get_topic_tree: GET_TOPIC_TREE,
|
|
4365
|
+
materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
|
|
4366
|
+
get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
|
|
3961
4367
|
// Coding intelligence (code-grounded knowledge)
|
|
3962
4368
|
get_code_context: GET_CODE_CONTEXT,
|
|
3963
4369
|
get_change_history: GET_CHANGE_HISTORY,
|
|
@@ -4034,6 +4440,7 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
|
|
|
4034
4440
|
var MCP_CORE_OPERATION_NAMES = [
|
|
4035
4441
|
"compile_context",
|
|
4036
4442
|
"identity_whoami",
|
|
4443
|
+
"resolve_interactive_principal",
|
|
4037
4444
|
"check_permission",
|
|
4038
4445
|
"filter_by_permission",
|
|
4039
4446
|
"create_belief",
|
|
@@ -4062,14 +4469,28 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4062
4469
|
"find_missing_questions",
|
|
4063
4470
|
"get_high_priority_questions",
|
|
4064
4471
|
"get_falsification_questions",
|
|
4472
|
+
"create_epistemic_node",
|
|
4473
|
+
"get_epistemic_node",
|
|
4474
|
+
"list_epistemic_nodes",
|
|
4475
|
+
"update_epistemic_node",
|
|
4476
|
+
"archive_epistemic_node",
|
|
4477
|
+
"verify_epistemic_node",
|
|
4478
|
+
"supersede_epistemic_node",
|
|
4479
|
+
"batch_create_epistemic_nodes",
|
|
4065
4480
|
"create_topic",
|
|
4066
4481
|
"get_topic",
|
|
4067
4482
|
"list_topics",
|
|
4068
4483
|
"update_topic",
|
|
4069
|
-
"get_topic_tree"
|
|
4484
|
+
"get_topic_tree",
|
|
4485
|
+
"materialize_topic_graph",
|
|
4486
|
+
"get_topic_graph_spine"
|
|
4070
4487
|
];
|
|
4071
4488
|
var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
|
|
4072
4489
|
"create_edge",
|
|
4490
|
+
"update_edge",
|
|
4491
|
+
"remove_edge",
|
|
4492
|
+
"remove_edges_between",
|
|
4493
|
+
"batch_create_edges",
|
|
4073
4494
|
"query_lineage",
|
|
4074
4495
|
"traverse_graph",
|
|
4075
4496
|
"get_graph_neighborhood",
|
|
@@ -4345,6 +4766,13 @@ function surfaceIntentGateViolations(entry) {
|
|
|
4345
4766
|
}
|
|
4346
4767
|
return violations;
|
|
4347
4768
|
}
|
|
4769
|
+
var NODE_TYPE = z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
|
|
4770
|
+
var EDGE_TYPE_VALUES = ["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", "answers", "explores", "qualifies", "based_on", "based_on_belief", "based_on_question", "blocked_by_contradiction", "informed_by_theme", "same_as", "reinforces", "parent_of", "child_of", "falsified_by", "exclusive_with", "collapses_if", "cascade_from", "counterfactual_of", "cascade_to", "mutually_exclusive", "correlates_with", "amplifies", "precondition_for", "in_tension_with", "strengthened_by", "weakened_by", "alternative_to", "subsumes", "validated_by", "required_for", "blocks", "prerequisite_for", "parallel_to", "corroborates", "extends", "same_source_as", "same_theme_as", "assumes", "would_predict", "analogous_to", "independent_of", "implements", "violates", "co_changes_with", "migrating_from", "migrating_to", "scoped_by", "about_entity", "entity_referenced_in", "contradicts", "cites", "summarizes", "related_to", "partially_answers", "refines", "branches_from"];
|
|
4771
|
+
var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
|
|
4772
|
+
z.enum(EDGE_TYPE_VALUES);
|
|
4773
|
+
z.enum(STORAGE_EDGE_TYPE_VALUES);
|
|
4774
|
+
z.enum(["active", "archived", "watching"]);
|
|
4775
|
+
z.enum(["private", "team", "firm", "external", "public"]);
|
|
4348
4776
|
|
|
4349
4777
|
// src/function-registry/helpers.ts
|
|
4350
4778
|
var jsonObjectSchema = z.record(z.unknown());
|
|
@@ -4441,12 +4869,20 @@ function unwrapMcpParameterSchema(schema) {
|
|
|
4441
4869
|
current = current._def.schema;
|
|
4442
4870
|
continue;
|
|
4443
4871
|
default:
|
|
4444
|
-
return {
|
|
4872
|
+
return {
|
|
4873
|
+
schema: current,
|
|
4874
|
+
required,
|
|
4875
|
+
description: description ?? current.description
|
|
4876
|
+
};
|
|
4445
4877
|
}
|
|
4446
4878
|
}
|
|
4447
4879
|
}
|
|
4448
4880
|
function mcpParameterFromZod(fieldName, schema, contractName) {
|
|
4449
|
-
const {
|
|
4881
|
+
const {
|
|
4882
|
+
schema: unwrapped,
|
|
4883
|
+
required,
|
|
4884
|
+
description: schemaDescription
|
|
4885
|
+
} = unwrapMcpParameterSchema(schema);
|
|
4450
4886
|
const description = schemaDescription ?? unwrapped.description ?? fieldName;
|
|
4451
4887
|
switch (unwrapped._def.typeName) {
|
|
4452
4888
|
case z.ZodFirstPartyTypeKind.ZodString:
|
|
@@ -4491,10 +4927,12 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
4491
4927
|
const entries2 = Object.entries(getObjectShape(args)).sort(
|
|
4492
4928
|
([left], [right]) => left.localeCompare(right)
|
|
4493
4929
|
);
|
|
4494
|
-
const converted = entries2.map(
|
|
4495
|
-
fieldName,
|
|
4496
|
-
|
|
4497
|
-
|
|
4930
|
+
const converted = entries2.map(
|
|
4931
|
+
([fieldName, schema]) => [
|
|
4932
|
+
fieldName,
|
|
4933
|
+
mcpParameterFromZod(fieldName, schema, contractName)
|
|
4934
|
+
]
|
|
4935
|
+
);
|
|
4498
4936
|
return {
|
|
4499
4937
|
...base,
|
|
4500
4938
|
parameters: Object.fromEntries(
|
|
@@ -4609,9 +5047,16 @@ function surfaceContract(args) {
|
|
|
4609
5047
|
scopes: args.scopes ?? [
|
|
4610
5048
|
args.kind === "query" ? `${args.domain}.read` : `${args.domain}.write`
|
|
4611
5049
|
],
|
|
4612
|
-
allowedPrincipalTypes: [
|
|
5050
|
+
allowedPrincipalTypes: [
|
|
5051
|
+
"user",
|
|
5052
|
+
"service",
|
|
5053
|
+
"agent",
|
|
5054
|
+
"group",
|
|
5055
|
+
"external_viewer"
|
|
5056
|
+
]
|
|
4613
5057
|
},
|
|
4614
5058
|
convex: args.convex,
|
|
5059
|
+
gateway: args.gateway,
|
|
4615
5060
|
args: canonicalArgs,
|
|
4616
5061
|
returns: canonicalReturns,
|
|
4617
5062
|
input,
|
|
@@ -4645,6 +5090,7 @@ var ALL_FUNCTION_CONTRACTS = [
|
|
|
4645
5090
|
...evidenceContracts,
|
|
4646
5091
|
...questionsContracts,
|
|
4647
5092
|
...topicsContracts,
|
|
5093
|
+
...nodesContracts,
|
|
4648
5094
|
...lensesContracts,
|
|
4649
5095
|
...ontologiesContracts,
|
|
4650
5096
|
...worktreesContracts,
|
|
@@ -4667,6 +5113,6 @@ var getFunctionContract = FUNCTION_CONTRACTS_BY_NAME.get.bind(
|
|
|
4667
5113
|
FUNCTION_CONTRACTS_BY_NAME
|
|
4668
5114
|
);
|
|
4669
5115
|
|
|
4670
|
-
export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, getFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, withCreatedBy, withUserId };
|
|
5116
|
+
export { ALL_FUNCTION_CONTRACTS, DUPLICATE_OPERATION_NAMES, FORBIDDEN_APPLICATION_OPERATION_NAMES, FUNCTION_CONTRACTS_BY_NAME, FUNCTION_SURFACE_CONTRACTS, LEGACY_COMPAT_OPERATION_NAMES, LUCERN_OPERATION_MANIFEST, MCP_ANALYSIS_PLATFORM_OPERATION_NAMES, MCP_ANALYSIS_TENANT_OPERATION_NAMES, MCP_AUTOMATION_OPERATION_NAMES, MCP_CORE_OPERATION_NAMES, MCP_GOVERNANCE_PLATFORM_OPERATION_NAMES, MCP_GOVERNANCE_TENANT_OPERATION_NAMES, MCP_ONLY_INTERNAL_OPERATION_NAMES, MCP_WORKFLOW_PLATFORM_OPERATION_NAMES, MCP_WORKFLOW_TENANT_OPERATION_NAMES, NODE_TYPE, PLATFORM_INTERNAL_OPERATION_NAMES, PLATFORM_PUBLIC_OPERATION_NAMES, SDK_ONLY_OPERATION_NAMES, TENANT_PUBLIC_OPERATION_NAMES, argsSchemaFromMcpContract, assertSurfaceCoverage, authUserId, classifyContract, compactRecord, defineFunctionContract, getFunctionContract, inputSchemaFromMcpContract, jsonObjectSchema, recordValue, surfaceContract, surfaceEnabled, surfaceIntentGateViolations, surfaceMcpContract, withCreatedBy, withUserId };
|
|
4671
5117
|
//# sourceMappingURL=index.js.map
|
|
4672
5118
|
//# sourceMappingURL=index.js.map
|