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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/api-enums.contract.d.ts +5 -3
  2. package/dist/api-enums.contract.js +14 -12
  3. package/dist/api-enums.contract.js.map +1 -1
  4. package/dist/component-boundary.contract.d.ts +1 -1
  5. package/dist/component-boundary.contract.js +45 -26
  6. package/dist/component-boundary.contract.js.map +1 -1
  7. package/dist/component-host-boundary.contract.d.ts +10 -5
  8. package/dist/component-host-boundary.contract.js +10 -4
  9. package/dist/component-host-boundary.contract.js.map +1 -1
  10. package/dist/{defineTable-CBQ03FXl.d.ts → defineTable-t1wr5wgn.d.ts} +1 -1
  11. package/dist/{dsl-djCRfuWC.d.ts → dsl-DVPthQGY.d.ts} +1 -1
  12. package/dist/dsl.d.ts +2 -2
  13. package/dist/dsl.js.map +1 -1
  14. package/dist/function-registry/beliefs.d.ts +13 -0
  15. package/dist/function-registry/beliefs.js +50 -7
  16. package/dist/function-registry/beliefs.js.map +1 -1
  17. package/dist/function-registry/coding.d.ts +9 -0
  18. package/dist/function-registry/coding.js +117 -8
  19. package/dist/function-registry/coding.js.map +1 -1
  20. package/dist/function-registry/context.d.ts +6 -0
  21. package/dist/function-registry/context.js +50 -7
  22. package/dist/function-registry/context.js.map +1 -1
  23. package/dist/function-registry/contracts.d.ts +6 -0
  24. package/dist/function-registry/contracts.js +50 -7
  25. package/dist/function-registry/contracts.js.map +1 -1
  26. package/dist/function-registry/coordination.d.ts +12 -0
  27. package/dist/function-registry/coordination.js +50 -7
  28. package/dist/function-registry/coordination.js.map +1 -1
  29. package/dist/function-registry/edges.d.ts +9 -0
  30. package/dist/function-registry/edges.js +54 -14
  31. package/dist/function-registry/edges.js.map +1 -1
  32. package/dist/function-registry/evidence.d.ts +11 -0
  33. package/dist/function-registry/evidence.js +53 -11
  34. package/dist/function-registry/evidence.js.map +1 -1
  35. package/dist/function-registry/graph.d.ts +18 -0
  36. package/dist/function-registry/graph.js +50 -7
  37. package/dist/function-registry/graph.js.map +1 -1
  38. package/dist/function-registry/helpers.d.ts +4 -1
  39. package/dist/function-registry/helpers.js +51 -8
  40. package/dist/function-registry/helpers.js.map +1 -1
  41. package/dist/function-registry/identity.d.ts +6 -0
  42. package/dist/function-registry/identity.js +50 -7
  43. package/dist/function-registry/identity.js.map +1 -1
  44. package/dist/function-registry/index.d.ts +8 -320
  45. package/dist/function-registry/index.js +54 -384
  46. package/dist/function-registry/index.js.map +1 -1
  47. package/dist/function-registry/judgments.d.ts +5 -0
  48. package/dist/function-registry/judgments.js +50 -7
  49. package/dist/function-registry/judgments.js.map +1 -1
  50. package/dist/function-registry/legacy.d.ts +4 -0
  51. package/dist/function-registry/legacy.js +50 -7
  52. package/dist/function-registry/legacy.js.map +1 -1
  53. package/dist/function-registry/lenses.d.ts +7 -0
  54. package/dist/function-registry/lenses.js +50 -7
  55. package/dist/function-registry/lenses.js.map +1 -1
  56. package/dist/function-registry/nodes.d.ts +412 -0
  57. package/dist/function-registry/nodes.js +5303 -0
  58. package/dist/function-registry/nodes.js.map +1 -0
  59. package/dist/function-registry/ontologies.d.ts +14 -0
  60. package/dist/function-registry/ontologies.js +50 -7
  61. package/dist/function-registry/ontologies.js.map +1 -1
  62. package/dist/function-registry/pipeline.d.ts +6 -0
  63. package/dist/function-registry/pipeline.js +50 -7
  64. package/dist/function-registry/pipeline.js.map +1 -1
  65. package/dist/function-registry/questions.d.ts +15 -0
  66. package/dist/function-registry/questions.js +50 -7
  67. package/dist/function-registry/questions.js.map +1 -1
  68. package/dist/function-registry/tasks.d.ts +7 -0
  69. package/dist/function-registry/tasks.js +69 -16
  70. package/dist/function-registry/tasks.js.map +1 -1
  71. package/dist/function-registry/topics.d.ts +10 -0
  72. package/dist/function-registry/topics.js +50 -7
  73. package/dist/function-registry/topics.js.map +1 -1
  74. package/dist/function-registry/types.d.ts +5 -1
  75. package/dist/function-registry/worktrees.d.ts +14 -0
  76. package/dist/function-registry/worktrees.js +50 -7
  77. package/dist/function-registry/worktrees.js.map +1 -1
  78. package/dist/gateway.contract.d.ts +3 -0
  79. package/dist/gateway.contract.js.map +1 -1
  80. package/dist/generated/convexSchemas.d.ts +3 -3
  81. package/dist/generated/convexSchemas.js +35 -16
  82. package/dist/generated/convexSchemas.js.map +1 -1
  83. package/dist/generated/infisicalRuntimeEnv.d.ts +70 -0
  84. package/dist/generated/infisicalRuntimeEnv.js +26572 -0
  85. package/dist/generated/infisicalRuntimeEnv.js.map +1 -0
  86. package/dist/generated/lucernGatewayEnv.d.ts +17 -0
  87. package/dist/generated/lucernGatewayEnv.js +38 -0
  88. package/dist/generated/lucernGatewayEnv.js.map +1 -0
  89. package/dist/generated/lucernWebPublicEnv.d.ts +26 -0
  90. package/dist/generated/lucernWebPublicEnv.js +32 -0
  91. package/dist/generated/lucernWebPublicEnv.js.map +1 -0
  92. package/dist/generated/lucernWebServerEnv.d.ts +33 -0
  93. package/dist/generated/lucernWebServerEnv.js +51 -0
  94. package/dist/generated/lucernWebServerEnv.js.map +1 -0
  95. package/dist/generated/schema-manifest.json +1165 -150
  96. package/dist/generated/tableOwnership.d.ts +46 -27
  97. package/dist/generated/tableOwnership.js +64 -26
  98. package/dist/generated/tableOwnership.js.map +1 -1
  99. package/dist/generated/tier-expectations.json +60 -8
  100. package/dist/{index-O09U2xHk.d.ts → index-CM1Pl_vI.d.ts} +3 -3
  101. package/dist/index.d.ts +8 -4
  102. package/dist/index.js +30959 -406
  103. package/dist/index.js.map +1 -1
  104. package/dist/infisical-runtime.contract.d.ts +1597 -3
  105. package/dist/infisical-runtime.contract.js +2788 -12
  106. package/dist/infisical-runtime.contract.js.map +1 -1
  107. package/dist/manifests/infisical-runtime-manifest.d.ts +1524 -3
  108. package/dist/manifests/infisical-runtime-manifest.js +2641 -9
  109. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  110. package/dist/manifests/tenant-client-manifest.d.ts +11 -11
  111. package/dist/manifests/tenant-client-manifest.js +11 -11
  112. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  113. package/dist/mcp-gateway-boundary.contract.d.ts +23 -3
  114. package/dist/mcp-gateway-boundary.contract.js +2 -0
  115. package/dist/mcp-gateway-boundary.contract.js.map +1 -1
  116. package/dist/projections/check-convex-args-shape.js +10 -6
  117. package/dist/projections/check-convex-args-shape.js.map +1 -1
  118. package/dist/projections/create-evidence.projection.d.ts +6 -6
  119. package/dist/projections/create-evidence.projection.js +2 -3
  120. package/dist/projections/create-evidence.projection.js.map +1 -1
  121. package/dist/projections/index.d.ts +3 -3
  122. package/dist/projections/index.js +10 -6
  123. package/dist/projections/index.js.map +1 -1
  124. package/dist/projections/list-tasks.projection.d.ts +20 -8
  125. package/dist/projections/list-tasks.projection.js +8 -3
  126. package/dist/projections/list-tasks.projection.js.map +1 -1
  127. package/dist/proof-attestation.json +45 -0
  128. package/dist/schemas/component-table-manifest.d.ts +6 -6
  129. package/dist/schemas/component-table-manifest.js +2 -2
  130. package/dist/schemas/component-table-manifest.js.map +1 -1
  131. package/dist/schemas/index.d.ts +2 -2
  132. package/dist/schemas/index.js +1086 -137
  133. package/dist/schemas/index.js.map +1 -1
  134. package/dist/schemas/manifest.d.ts +2010 -120
  135. package/dist/schemas/manifest.js +1084 -135
  136. package/dist/schemas/manifest.js.map +1 -1
  137. package/dist/schemas/tables/controlPlane/accessControl.d.ts +260 -0
  138. package/dist/schemas/tables/controlPlane/accessControl.js +653 -0
  139. package/dist/schemas/tables/controlPlane/accessControl.js.map +1 -0
  140. package/dist/schemas/tables/{identity → controlPlane}/agent.d.ts +1 -1
  141. package/dist/schemas/tables/{identity → controlPlane}/agent.js +3 -3
  142. package/dist/schemas/tables/controlPlane/agent.js.map +1 -0
  143. package/dist/schemas/tables/{identity → controlPlane}/epistemic.d.ts +1 -1
  144. package/dist/schemas/tables/{identity → controlPlane}/epistemic.js +3 -3
  145. package/dist/schemas/tables/controlPlane/epistemic.js.map +1 -0
  146. package/dist/schemas/tables/{identity → controlPlane}/model.d.ts +1 -1
  147. package/dist/schemas/tables/{identity → controlPlane}/model.js +6 -6
  148. package/dist/schemas/tables/controlPlane/model.js.map +1 -0
  149. package/dist/schemas/tables/{identity → controlPlane}/platform.d.ts +1 -1
  150. package/dist/schemas/tables/{identity → controlPlane}/platform.js +18 -18
  151. package/dist/schemas/tables/controlPlane/platform.js.map +1 -0
  152. package/dist/schemas/tables/{identity → controlPlane}/project.d.ts +1 -1
  153. package/dist/schemas/tables/{identity → controlPlane}/project.js +3 -3
  154. package/dist/schemas/tables/controlPlane/project.js.map +1 -0
  155. package/dist/schemas/tables/{identity → controlPlane}/user.d.ts +1 -1
  156. package/dist/schemas/tables/{identity → controlPlane}/user.js +3 -3
  157. package/dist/schemas/tables/controlPlane/user.js.map +1 -0
  158. package/dist/schemas/tables/kernel/config.d.ts +1 -1
  159. package/dist/schemas/tables/kernel/config.js.map +1 -1
  160. package/dist/schemas/tables/kernel/coordination.d.ts +1 -1
  161. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  162. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  163. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  164. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  165. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  166. package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
  167. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  168. package/dist/schemas/tables/kernel/idempotency.d.ts +1 -1
  169. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  170. package/dist/schemas/tables/kernel/infra.d.ts +1 -1
  171. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  172. package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
  173. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  174. package/dist/schemas/tables/kernel/lens.d.ts +1 -1
  175. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  176. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  177. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  178. package/dist/schemas/tables/kernel/platform.d.ts +1 -1
  179. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  180. package/dist/schemas/tables/kernel/spine.d.ts +2 -1
  181. package/dist/schemas/tables/kernel/spine.js +1 -0
  182. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  183. package/dist/schemas/tables/kernel/task.d.ts +1 -1
  184. package/dist/schemas/tables/kernel/task.js.map +1 -1
  185. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  186. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  187. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  188. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  189. package/dist/schemas/tables/kernel/worktree.d.ts +5 -5
  190. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  191. package/dist/schemas/tables/mc/identity.d.ts +19 -2
  192. package/dist/schemas/tables/mc/identity.js +32 -1
  193. package/dist/schemas/tables/mc/identity.js.map +1 -1
  194. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  195. package/dist/schemas/tables/mc/methodology.js.map +1 -1
  196. package/dist/schemas/tables/mc/pack.d.ts +1 -1
  197. package/dist/schemas/tables/mc/pack.js.map +1 -1
  198. package/dist/schemas/tables/mc/policy.d.ts +2 -2
  199. package/dist/schemas/tables/mc/policy.js +1 -1
  200. package/dist/schemas/tables/mc/policy.js.map +1 -1
  201. package/dist/schemas/tables/mc/registry.d.ts +1 -1
  202. package/dist/schemas/tables/mc/registry.js.map +1 -1
  203. package/dist/schemas/tables/mc/runtime.d.ts +109 -3
  204. package/dist/schemas/tables/mc/runtime.js +330 -104
  205. package/dist/schemas/tables/mc/runtime.js.map +1 -1
  206. package/dist/schemas/tables/mc/tenant.d.ts +3 -2
  207. package/dist/schemas/tables/mc/tenant.js +2 -1
  208. package/dist/schemas/tables/mc/tenant.js.map +1 -1
  209. package/dist/schemas/tables/mc/workspace.d.ts +22 -5
  210. package/dist/schemas/tables/mc/workspace.js +34 -2
  211. package/dist/schemas/tables/mc/workspace.js.map +1 -1
  212. package/dist/sdk-tools.contract.js +26 -1
  213. package/dist/sdk-tools.contract.js.map +1 -1
  214. package/dist/tenant-bootstrap-seed.contract.d.ts +226 -58
  215. package/dist/tenant-bootstrap-seed.contract.js +126 -28
  216. package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
  217. package/dist/tenant-bootstrap-seed.defaults.d.ts +1 -1
  218. package/dist/tenant-bootstrap-seed.defaults.js +1 -1
  219. package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
  220. package/dist/tenant-client.contract.d.ts +12 -12
  221. package/dist/tenant-client.contract.js +11 -11
  222. package/dist/tenant-client.contract.js.map +1 -1
  223. package/dist/tool-contracts.js +26 -1
  224. package/dist/tool-contracts.js.map +1 -1
  225. package/package.json +22 -1
  226. package/dist/schemas/tables/identity/agent.js.map +0 -1
  227. package/dist/schemas/tables/identity/epistemic.js.map +0 -1
  228. package/dist/schemas/tables/identity/model.js.map +0 -1
  229. package/dist/schemas/tables/identity/platform.js.map +0 -1
  230. package/dist/schemas/tables/identity/project.js.map +0 -1
  231. package/dist/schemas/tables/identity/user.js.map +0 -1
@@ -83,6 +83,9 @@ type FunctionConvexTarget = {
83
83
  inputProjection?: ContractInputProjection;
84
84
  outputProjection?: ContractOutputProjection;
85
85
  };
86
+ type FunctionGatewayTarget = {
87
+ handler: "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
88
+ };
86
89
 
87
90
  declare const evidenceContracts: readonly [{
88
91
  name: string;
@@ -115,6 +118,7 @@ declare const evidenceContracts: readonly [{
115
118
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
116
119
  };
117
120
  convex: FunctionConvexTarget | undefined;
121
+ gateway: FunctionGatewayTarget | undefined;
118
122
  args: z.ZodTypeAny;
119
123
  returns: z.ZodTypeAny;
120
124
  input: z.ZodTypeAny;
@@ -154,6 +158,7 @@ declare const evidenceContracts: readonly [{
154
158
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
155
159
  };
156
160
  convex: FunctionConvexTarget | undefined;
161
+ gateway: FunctionGatewayTarget | undefined;
157
162
  args: z.ZodTypeAny;
158
163
  returns: z.ZodTypeAny;
159
164
  input: z.ZodTypeAny;
@@ -193,6 +198,7 @@ declare const evidenceContracts: readonly [{
193
198
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
194
199
  };
195
200
  convex: FunctionConvexTarget | undefined;
201
+ gateway: FunctionGatewayTarget | undefined;
196
202
  args: z.ZodTypeAny;
197
203
  returns: z.ZodTypeAny;
198
204
  input: z.ZodTypeAny;
@@ -232,6 +238,7 @@ declare const evidenceContracts: readonly [{
232
238
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
233
239
  };
234
240
  convex: FunctionConvexTarget | undefined;
241
+ gateway: FunctionGatewayTarget | undefined;
235
242
  args: z.ZodTypeAny;
236
243
  returns: z.ZodTypeAny;
237
244
  input: z.ZodTypeAny;
@@ -271,6 +278,7 @@ declare const evidenceContracts: readonly [{
271
278
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
272
279
  };
273
280
  convex: FunctionConvexTarget | undefined;
281
+ gateway: FunctionGatewayTarget | undefined;
274
282
  args: z.ZodTypeAny;
275
283
  returns: z.ZodTypeAny;
276
284
  input: z.ZodTypeAny;
@@ -310,6 +318,7 @@ declare const evidenceContracts: readonly [{
310
318
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
311
319
  };
312
320
  convex: FunctionConvexTarget | undefined;
321
+ gateway: FunctionGatewayTarget | undefined;
313
322
  args: z.ZodTypeAny;
314
323
  returns: z.ZodTypeAny;
315
324
  input: z.ZodTypeAny;
@@ -349,6 +358,7 @@ declare const evidenceContracts: readonly [{
349
358
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
350
359
  };
351
360
  convex: FunctionConvexTarget | undefined;
361
+ gateway: FunctionGatewayTarget | undefined;
352
362
  args: z.ZodTypeAny;
353
363
  returns: z.ZodTypeAny;
354
364
  input: z.ZodTypeAny;
@@ -388,6 +398,7 @@ declare const evidenceContracts: readonly [{
388
398
  allowedPrincipalTypes: ("user" | "service" | "agent")[];
389
399
  };
390
400
  convex: FunctionConvexTarget | undefined;
401
+ gateway: FunctionGatewayTarget | undefined;
391
402
  args: z.ZodTypeAny;
392
403
  returns: z.ZodTypeAny;
393
404
  input: z.ZodTypeAny;
@@ -3,6 +3,20 @@ import { v } from 'convex/values';
3
3
 
4
4
  // src/function-registry/helpers.ts
5
5
 
6
+ // src/types/reasoning-method.ts
7
+ var REASONING_METHODS = [
8
+ "deductive",
9
+ "inductive",
10
+ "abductive",
11
+ "analogical",
12
+ "causal",
13
+ "correlational",
14
+ "testimonial",
15
+ "statistical",
16
+ "implicit",
17
+ "pattern_match"
18
+ ];
19
+
6
20
  // src/lens-workflow.contract.ts
7
21
  var LENS_PERSPECTIVE_TYPES = [
8
22
  "investigation",
@@ -860,7 +874,7 @@ var CREATE_EDGE = {
860
874
  reasoningMethod: {
861
875
  type: "string",
862
876
  description: "How this was determined",
863
- enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
877
+ enum: [...REASONING_METHODS]
864
878
  },
865
879
  metadata: {
866
880
  type: "object",
@@ -2587,6 +2601,10 @@ var CREATE_TASK = {
2587
2601
  tags: {
2588
2602
  type: "array",
2589
2603
  description: "Free-form string tags"
2604
+ },
2605
+ metadata: {
2606
+ type: "object",
2607
+ description: "Structured task metadata for handoff context and routing hints"
2590
2608
  }
2591
2609
  },
2592
2610
  required: ["title"],
@@ -2660,6 +2678,10 @@ var UPDATE_TASK = {
2660
2678
  type: "string",
2661
2679
  description: "Updated status",
2662
2680
  enum: ["todo", "in_progress", "blocked", "done"]
2681
+ },
2682
+ metadata: {
2683
+ type: "object",
2684
+ description: "Structured task metadata to replace or refine"
2663
2685
  }
2664
2686
  },
2665
2687
  required: ["taskId"],
@@ -4115,6 +4137,9 @@ var BEGIN_BUILD_SESSION = {
4115
4137
  sessionMode: "string \u2014 async | interactive",
4116
4138
  targetBeliefIds: "array \u2014 scoped belief IDs",
4117
4139
  targetQuestionIds: "array \u2014 scoped question IDs",
4140
+ taskIds: "array \u2014 assigned task IDs for this worktree",
4141
+ incompleteTaskIds: "array \u2014 assigned task IDs that still require done/deferred/blocked proof",
4142
+ tasks: "array \u2014 assigned task packet with id, title, status, priority, links, and summaries",
4118
4143
  topBeliefs: "array \u2014 highest-confidence scoped beliefs",
4119
4144
  openQuestions: "array \u2014 open scoped questions",
4120
4145
  resolvedDecisions: "array \u2014 answered questions summarized for the session",
@@ -4619,6 +4644,13 @@ var LUCERN_OPERATION_MANIFEST = {
4619
4644
  "Lucern MCP-only platform operation for local agent/bootstrap or verification workflows. Hidden from public discovery."
4620
4645
  )
4621
4646
  };
4647
+ z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
4648
+ 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"];
4649
+ var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
4650
+ z.enum(EDGE_TYPE_VALUES);
4651
+ z.enum(STORAGE_EDGE_TYPE_VALUES);
4652
+ z.enum(["active", "archived", "watching"]);
4653
+ z.enum(["private", "team", "firm", "external", "public"]);
4622
4654
 
4623
4655
  // src/function-registry/helpers.ts
4624
4656
  var jsonObjectSchema = z.record(z.unknown());
@@ -4715,12 +4747,20 @@ function unwrapMcpParameterSchema(schema) {
4715
4747
  current = current._def.schema;
4716
4748
  continue;
4717
4749
  default:
4718
- return { schema: current, required, description: description ?? current.description };
4750
+ return {
4751
+ schema: current,
4752
+ required,
4753
+ description: description ?? current.description
4754
+ };
4719
4755
  }
4720
4756
  }
4721
4757
  }
4722
4758
  function mcpParameterFromZod(fieldName, schema, contractName) {
4723
- const { schema: unwrapped, required, description: schemaDescription } = unwrapMcpParameterSchema(schema);
4759
+ const {
4760
+ schema: unwrapped,
4761
+ required,
4762
+ description: schemaDescription
4763
+ } = unwrapMcpParameterSchema(schema);
4724
4764
  const description = schemaDescription ?? unwrapped.description ?? fieldName;
4725
4765
  switch (unwrapped._def.typeName) {
4726
4766
  case z.ZodFirstPartyTypeKind.ZodString:
@@ -4765,10 +4805,12 @@ function mcpContractFromArgsSchema(base, args, contractName) {
4765
4805
  const entries2 = Object.entries(getObjectShape(args)).sort(
4766
4806
  ([left], [right]) => left.localeCompare(right)
4767
4807
  );
4768
- const converted = entries2.map(([fieldName, schema]) => [
4769
- fieldName,
4770
- mcpParameterFromZod(fieldName, schema, contractName)
4771
- ]);
4808
+ const converted = entries2.map(
4809
+ ([fieldName, schema]) => [
4810
+ fieldName,
4811
+ mcpParameterFromZod(fieldName, schema, contractName)
4812
+ ]
4813
+ );
4772
4814
  return {
4773
4815
  ...base,
4774
4816
  parameters: Object.fromEntries(
@@ -4880,6 +4922,7 @@ function surfaceContract(args) {
4880
4922
  allowedPrincipalTypes: ["user", "service", "agent"]
4881
4923
  },
4882
4924
  convex: args.convex,
4925
+ gateway: args.gateway,
4883
4926
  args: canonicalArgs,
4884
4927
  returns: canonicalReturns,
4885
4928
  input,
@@ -4919,7 +4962,7 @@ var createEvidenceInputSchemaBase = z.object({
4919
4962
  targetId: z.string().optional(),
4920
4963
  targetNodeId: z.string().optional(),
4921
4964
  linkedBeliefNodeId: z.string().optional(),
4922
- evidenceRelation: z.enum(["supports", "contradicts", "neutral"]).optional(),
4965
+ evidenceRelation: z.enum(["supports", "contradicts"]).optional(),
4923
4966
  confidence: z.number().optional(),
4924
4967
  weight: z.number().optional(),
4925
4968
  reasoning: z.string().optional(),
@@ -5004,8 +5047,7 @@ var createEvidenceProjection = defineProjection({
5004
5047
  evidenceRelation: v.optional(
5005
5048
  v.union(
5006
5049
  v.literal("supports"),
5007
- v.literal("contradicts"),
5008
- v.literal("neutral")
5050
+ v.literal("contradicts")
5009
5051
  )
5010
5052
  ),
5011
5053
  confidence: v.optional(v.number()),
@@ -5014,7 +5056,7 @@ var createEvidenceProjection = defineProjection({
5014
5056
  })
5015
5057
  });
5016
5058
  var jsonRecordSchema2 = z.record(z.unknown());
5017
- var evidenceRelationSchema = z.enum(["supports", "contradicts", "neutral"]);
5059
+ var evidenceRelationSchema = z.enum(["supports", "contradicts"]);
5018
5060
  var createEvidenceArgs = z.object({
5019
5061
  topicId: z.string().optional().describe("Topic scope for the evidence."),
5020
5062
  text: z.string().describe("Canonical evidence text."),