@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.
- 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/component-boundary.contract.d.ts +1 -1
- package/dist/component-boundary.contract.js +45 -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 +13 -0
- package/dist/function-registry/beliefs.js +50 -7
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +9 -0
- package/dist/function-registry/coding.js +117 -8
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +6 -0
- package/dist/function-registry/context.js +50 -7
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +6 -0
- package/dist/function-registry/contracts.js +50 -7
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +12 -0
- package/dist/function-registry/coordination.js +50 -7
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +9 -0
- package/dist/function-registry/edges.js +54 -14
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +11 -0
- package/dist/function-registry/evidence.js +53 -11
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +18 -0
- package/dist/function-registry/graph.js +50 -7
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +4 -1
- package/dist/function-registry/helpers.js +51 -8
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +6 -0
- package/dist/function-registry/identity.js +50 -7
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +8 -320
- package/dist/function-registry/index.js +54 -384
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +5 -0
- package/dist/function-registry/judgments.js +50 -7
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +4 -0
- package/dist/function-registry/legacy.js +50 -7
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +7 -0
- package/dist/function-registry/lenses.js +50 -7
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/nodes.d.ts +412 -0
- package/dist/function-registry/nodes.js +5303 -0
- package/dist/function-registry/nodes.js.map +1 -0
- package/dist/function-registry/ontologies.d.ts +14 -0
- package/dist/function-registry/ontologies.js +50 -7
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +6 -0
- package/dist/function-registry/pipeline.js +50 -7
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +15 -0
- package/dist/function-registry/questions.js +50 -7
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +7 -0
- package/dist/function-registry/tasks.js +69 -16
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +10 -0
- package/dist/function-registry/topics.js +50 -7
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +5 -1
- package/dist/function-registry/worktrees.d.ts +14 -0
- package/dist/function-registry/worktrees.js +50 -7
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/gateway.contract.d.ts +3 -0
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.d.ts +3 -3
- package/dist/generated/convexSchemas.js +35 -16
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/infisicalRuntimeEnv.d.ts +70 -0
- package/dist/generated/infisicalRuntimeEnv.js +26572 -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 +1165 -150
- package/dist/generated/tableOwnership.d.ts +46 -27
- package/dist/generated/tableOwnership.js +64 -26
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +60 -8
- package/dist/{index-O09U2xHk.d.ts → index-CM1Pl_vI.d.ts} +3 -3
- package/dist/index.d.ts +8 -4
- package/dist/index.js +30959 -406
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +1597 -3
- package/dist/infisical-runtime.contract.js +2788 -12
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +1524 -3
- package/dist/manifests/infisical-runtime-manifest.js +2641 -9
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
- package/dist/manifests/tenant-client-manifest.d.ts +11 -11
- package/dist/manifests/tenant-client-manifest.js +11 -11
- 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/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 +1086 -137
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +2010 -120
- package/dist/schemas/manifest.js +1084 -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 +653 -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/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.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 +5 -5
- 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 +3 -2
- package/dist/schemas/tables/mc/tenant.js +2 -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.js +26 -1
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +226 -58
- package/dist/tenant-bootstrap-seed.contract.js +126 -28
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.defaults.d.ts +1 -1
- package/dist/tenant-bootstrap-seed.defaults.js +1 -1
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -1
- package/dist/tenant-client.contract.d.ts +12 -12
- package/dist/tenant-client.contract.js +11 -11
- package/dist/tenant-client.contract.js.map +1 -1
- package/dist/tool-contracts.js +26 -1
- 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
|
@@ -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: [
|
|
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 {
|
|
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 {
|
|
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(
|
|
4769
|
-
fieldName,
|
|
4770
|
-
|
|
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"
|
|
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"
|
|
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."),
|