@lucern/mcp 0.3.0-alpha.8 → 0.3.0-alpha.9

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/runtime.js CHANGED
@@ -4924,17 +4924,44 @@ z.object({
4924
4924
  message: "SL invariant b+d+u=1 violated at API boundary"
4925
4925
  }
4926
4926
  );
4927
- var EpistemicNodeTypeSchema = z.enum([
4927
+
4928
+ // ../contracts/src/schema-helpers/spine/tables/epistemicNodes.ts
4929
+ var NODE_TYPES = [
4930
+ "decision",
4928
4931
  "belief",
4929
- "evidence",
4930
4932
  "question",
4931
- "answer",
4933
+ "theme",
4934
+ "deal",
4932
4935
  "topic",
4936
+ "claim",
4937
+ "evidence",
4938
+ "synthesis",
4939
+ "answer",
4940
+ "atomic_fact",
4941
+ "excerpt",
4942
+ "source",
4943
+ "company",
4944
+ "person",
4945
+ "investor",
4946
+ "function",
4947
+ "value_chain"
4948
+ ];
4949
+ new Set(NODE_TYPES);
4950
+
4951
+ // ../contracts/src/types/graph-ref.ts
4952
+ var GRAPH_REF_EXTRA_NODE_TYPES = [
4933
4953
  "edge",
4934
4954
  "ontology",
4935
4955
  "lens",
4936
4956
  "contradiction"
4937
- ]);
4957
+ ];
4958
+ var GRAPH_REF_NODE_TYPES = [
4959
+ ...NODE_TYPES,
4960
+ ...GRAPH_REF_EXTRA_NODE_TYPES
4961
+ ];
4962
+ var EpistemicNodeTypeSchema = z.enum(
4963
+ GRAPH_REF_NODE_TYPES
4964
+ );
4938
4965
  var GraphRefSchema = z.discriminatedUnion("kind", [
4939
4966
  z.object({
4940
4967
  kind: z.literal("epistemic_node"),
@@ -4982,33 +5009,14 @@ function assertEdgePolicyAllowed(manifest, edgeType, from, to) {
4982
5009
  }
4983
5010
 
4984
5011
  // ../contracts/src/manifests/edge-policy-manifest.data.ts
5012
+ var publicEpistemicNodeEdgePolicy = (edgeType) => ({
5013
+ edgeType,
5014
+ fromKinds: ["epistemic_node"],
5015
+ toKinds: ["epistemic_node"],
5016
+ description: "Canonical public create_edge policy for graph-node relationships. The policy layer gates edge-type membership, not endpoint semantics."
5017
+ });
4985
5018
  var edgePolicyManifest = {
4986
- policies: [
4987
- {
4988
- edgeType: "evidence_derived_from_evidence",
4989
- fromKinds: ["epistemic_node"],
4990
- fromNodeTypes: ["evidence"],
4991
- toKinds: ["epistemic_node"],
4992
- toNodeTypes: ["evidence"],
4993
- description: "Evidence E2 was synthesized from evidence E1 by a transformation. Provides chain-of-evidence lineage."
4994
- },
4995
- {
4996
- edgeType: "evidence_supports_belief",
4997
- fromKinds: ["epistemic_node"],
4998
- fromNodeTypes: ["evidence"],
4999
- toKinds: ["epistemic_node"],
5000
- toNodeTypes: ["belief"],
5001
- description: "Existing link_evidence_to_belief semantics promoted to the create_edge policy source."
5002
- },
5003
- {
5004
- edgeType: "evidence_supports_question",
5005
- fromKinds: ["epistemic_node"],
5006
- fromNodeTypes: ["evidence"],
5007
- toKinds: ["epistemic_node"],
5008
- toNodeTypes: ["question"],
5009
- description: "Existing link_evidence_to_question semantics promoted to the create_edge policy source."
5010
- }
5011
- ]
5019
+ policies: EDGE_TYPE_VALUES.map(publicEpistemicNodeEdgePolicy)
5012
5020
  };
5013
5021
 
5014
5022
  // ../contracts/src/tenant-client.contract.ts
@@ -10630,12 +10638,12 @@ var linkEvidenceToBeliefEdgeInput = (input, context) => withCreatedBy(
10630
10638
  compactRecord4({
10631
10639
  fromNodeId: input.insightId ?? input.evidenceNodeId ?? input.evidenceId,
10632
10640
  toNodeId: input.beliefNodeId ?? input.beliefId ?? input.targetId,
10633
- edgeType: "evidence_supports_belief",
10641
+ edgeType: "informs",
10634
10642
  globalId: input.globalId ?? `edge:${String(
10635
10643
  input.insightId ?? input.evidenceNodeId ?? input.evidenceId
10636
10644
  )}:${String(
10637
10645
  input.beliefNodeId ?? input.beliefId ?? input.targetId
10638
- )}:evidence_supports_belief`,
10646
+ )}:informs`,
10639
10647
  weight: typeof input.weight === "number" ? input.weight : input.type === "contradicting" ? -1 : 1,
10640
10648
  context: input.rationale ?? input.context,
10641
10649
  skipLayerValidation: true,
@@ -10648,12 +10656,12 @@ var linkEvidenceToQuestionEdgeInput = (input, context) => withCreatedBy(
10648
10656
  compactRecord4({
10649
10657
  fromNodeId: input.insightId ?? input.evidenceNodeId ?? input.evidenceId,
10650
10658
  toNodeId: input.questionId ?? input.questionNodeId ?? input.targetId,
10651
- edgeType: "evidence_supports_question",
10659
+ edgeType: "responds_to",
10652
10660
  globalId: input.globalId ?? `edge:${String(
10653
10661
  input.insightId ?? input.evidenceNodeId ?? input.evidenceId
10654
10662
  )}:${String(
10655
10663
  input.questionId ?? input.questionNodeId ?? input.targetId
10656
- )}:evidence_supports_question`,
10664
+ )}:responds_to`,
10657
10665
  weight: input.impactScore ?? input.weight,
10658
10666
  context: input.rationale ?? input.context,
10659
10667
  skipLayerValidation: true,
@@ -12158,10 +12166,13 @@ var tasksContracts = [
12158
12166
  }
12159
12167
  })
12160
12168
  ];
12169
+ var CREATE_EDGE_TYPES = edgePolicyManifest.policies.map(
12170
+ (policy) => policy.edgeType
12171
+ );
12161
12172
  var createEdgeArgs = z.object({
12162
12173
  from: GraphRefSchema,
12163
12174
  to: GraphRefSchema,
12164
- edgeType: z.string(),
12175
+ edgeType: z.enum(CREATE_EDGE_TYPES),
12165
12176
  globalId: z.string().optional(),
12166
12177
  weight: z.number().optional(),
12167
12178
  confidence: z.number().optional(),