@lucern/contracts 0.3.0-alpha.10 → 0.3.0-alpha.12
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 +26818 -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 +9 -4
- package/dist/index.js +31371 -381
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +1623 -3
- package/dist/infisical-runtime.contract.js +2819 -12
- package/dist/infisical-runtime.contract.js.map +1 -1
- package/dist/manifests/infisical-runtime-manifest.d.ts +1550 -3
- package/dist/manifests/infisical-runtime-manifest.js +2672 -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/permit-principal-projection.contract.d.ts +74 -0
- package/dist/permit-principal-projection.contract.js +161 -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 +1088 -137
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +2010 -120
- package/dist/schemas/manifest.js +1086 -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 +655 -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 tasksContracts: readonly [{
|
|
88
91
|
name: string;
|
|
@@ -115,6 +118,7 @@ declare const tasksContracts: 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 tasksContracts: 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 tasksContracts: 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 tasksContracts: 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;
|
|
@@ -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(
|
|
@@ -4862,6 +4904,7 @@ function surfaceContract(args) {
|
|
|
4862
4904
|
allowedPrincipalTypes: ["user", "service", "agent"]
|
|
4863
4905
|
},
|
|
4864
4906
|
convex: args.convex,
|
|
4907
|
+
gateway: args.gateway,
|
|
4865
4908
|
args: canonicalArgs,
|
|
4866
4909
|
returns: canonicalReturns,
|
|
4867
4910
|
input,
|
|
@@ -4881,12 +4924,17 @@ function defineProjection(def) {
|
|
|
4881
4924
|
// src/projections/list-tasks.projection.ts
|
|
4882
4925
|
var taskStatusSchema = z.enum(["todo", "in_progress", "blocked", "done"]).optional().describe("Filter by task status");
|
|
4883
4926
|
var listTasksInputSchema = z.object({
|
|
4884
|
-
topicId: z.string().describe("Topic scope"),
|
|
4927
|
+
topicId: z.string().optional().describe("Topic scope"),
|
|
4885
4928
|
worktreeId: z.string().optional().describe("Alias for linkedWorktreeId"),
|
|
4886
4929
|
linkedWorktreeId: z.string().optional().describe("Filter to tasks linked to this worktree"),
|
|
4887
4930
|
status: taskStatusSchema,
|
|
4888
4931
|
limit: z.number().optional().describe("Maximum results")
|
|
4889
|
-
})
|
|
4932
|
+
}).refine(
|
|
4933
|
+
(input) => Boolean(input.topicId || input.worktreeId || input.linkedWorktreeId),
|
|
4934
|
+
{
|
|
4935
|
+
message: "topicId or worktreeId is required"
|
|
4936
|
+
}
|
|
4937
|
+
);
|
|
4890
4938
|
function compactRecord2(input) {
|
|
4891
4939
|
return Object.fromEntries(
|
|
4892
4940
|
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
@@ -4903,7 +4951,7 @@ var listTasksProjection = defineProjection({
|
|
|
4903
4951
|
linkedWorktreeId: input.linkedWorktreeId ?? input.worktreeId
|
|
4904
4952
|
}),
|
|
4905
4953
|
convexArgsValidator: v.object({
|
|
4906
|
-
topicId: v.string(),
|
|
4954
|
+
topicId: v.optional(v.string()),
|
|
4907
4955
|
status: v.optional(
|
|
4908
4956
|
v.union(
|
|
4909
4957
|
v.literal("todo"),
|
|
@@ -4942,7 +4990,8 @@ var createTaskArgs = z.object({
|
|
|
4942
4990
|
linkedQuestionId: z.string().optional().describe("Question this task addresses."),
|
|
4943
4991
|
assigneeId: z.string().optional().describe("Principal assigned to the task."),
|
|
4944
4992
|
dueDate: z.number().optional().describe("Due date as epoch milliseconds."),
|
|
4945
|
-
tags: z.array(z.string()).optional().describe("Free-form tags.")
|
|
4993
|
+
tags: z.array(z.string()).optional().describe("Free-form tags."),
|
|
4994
|
+
metadata: z.record(z.unknown()).optional().describe("Structured task metadata for handoff context and routing hints.")
|
|
4946
4995
|
});
|
|
4947
4996
|
var createTaskInput = (input) => compactRecord({
|
|
4948
4997
|
title: input.title,
|
|
@@ -4956,7 +5005,8 @@ var createTaskInput = (input) => compactRecord({
|
|
|
4956
5005
|
linkedQuestionId: input.linkedQuestionId,
|
|
4957
5006
|
assigneeId: input.assigneeId,
|
|
4958
5007
|
dueDate: input.dueDate,
|
|
4959
|
-
tags: input.tags
|
|
5008
|
+
tags: input.tags,
|
|
5009
|
+
metadata: input.metadata
|
|
4960
5010
|
});
|
|
4961
5011
|
var taskInput = (input) => compactRecord({
|
|
4962
5012
|
...input,
|
|
@@ -4973,8 +5023,7 @@ var taskTopicInput = (input) => {
|
|
|
4973
5023
|
};
|
|
4974
5024
|
var completeTaskInput = (input) => compactRecord({
|
|
4975
5025
|
taskId: input.taskId ?? input.id,
|
|
4976
|
-
outputSummary: input.outputSummary ?? input.summary
|
|
4977
|
-
userId: input.userId
|
|
5026
|
+
outputSummary: input.outputSummary ?? input.summary
|
|
4978
5027
|
});
|
|
4979
5028
|
var tasksContracts = [
|
|
4980
5029
|
surfaceContract({
|
|
@@ -4992,6 +5041,7 @@ var tasksContracts = [
|
|
|
4992
5041
|
kind: "mutation",
|
|
4993
5042
|
inputProjection: createTaskInput
|
|
4994
5043
|
},
|
|
5044
|
+
gateway: { handler: "tasks.create" },
|
|
4995
5045
|
args: createTaskArgs
|
|
4996
5046
|
}),
|
|
4997
5047
|
surfaceContract({
|
|
@@ -5010,6 +5060,7 @@ var tasksContracts = [
|
|
|
5010
5060
|
kind: "query",
|
|
5011
5061
|
inputProjection: taskTopicInput
|
|
5012
5062
|
},
|
|
5063
|
+
gateway: { handler: "tasks.list" },
|
|
5013
5064
|
args: listTasksInputSchema
|
|
5014
5065
|
}),
|
|
5015
5066
|
surfaceContract({
|
|
@@ -5027,7 +5078,8 @@ var tasksContracts = [
|
|
|
5027
5078
|
functionName: "update",
|
|
5028
5079
|
kind: "mutation",
|
|
5029
5080
|
inputProjection: taskInput
|
|
5030
|
-
}
|
|
5081
|
+
},
|
|
5082
|
+
gateway: { handler: "tasks.update" }
|
|
5031
5083
|
}),
|
|
5032
5084
|
surfaceContract({
|
|
5033
5085
|
name: "complete_task",
|
|
@@ -5043,7 +5095,8 @@ var tasksContracts = [
|
|
|
5043
5095
|
functionName: "complete",
|
|
5044
5096
|
kind: "mutation",
|
|
5045
5097
|
inputProjection: completeTaskInput
|
|
5046
|
-
}
|
|
5098
|
+
},
|
|
5099
|
+
gateway: { handler: "tasks.complete" }
|
|
5047
5100
|
})
|
|
5048
5101
|
];
|
|
5049
5102
|
|