@lucern/contracts 0.3.0-alpha.0 → 0.3.0-alpha.10
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 +4 -0
- package/dist/component-boundary.contract.d.ts +14 -0
- package/dist/component-boundary.contract.js +155 -0
- package/dist/component-boundary.contract.js.map +1 -0
- package/dist/component-host-boundary.contract.d.ts +41 -0
- package/dist/component-host-boundary.contract.js +54 -0
- package/dist/component-host-boundary.contract.js.map +1 -0
- package/dist/context-pack.contract.d.ts +5 -3
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/{dsl-BgpoVOVQ.d.ts → dsl-djCRfuWC.d.ts} +1 -1
- package/dist/dsl.d.ts +1 -1
- package/dist/dsl.js +4 -4
- package/dist/dsl.js.map +1 -1
- package/dist/edge-policy-manifest-Dw5IhT1L.d.ts +133 -0
- package/dist/function-registry/beliefs.d.ts +42 -82
- package/dist/function-registry/beliefs.js +1154 -125
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.d.ts +7 -31
- package/dist/function-registry/coding.js +958 -112
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.d.ts +14 -26
- package/dist/function-registry/context.js +923 -97
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.d.ts +4 -16
- package/dist/function-registry/contracts.js +860 -82
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.d.ts +10 -46
- package/dist/function-registry/coordination.js +872 -84
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.d.ts +166 -18
- package/dist/function-registry/edges.js +1188 -97
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.d.ts +42 -74
- package/dist/function-registry/evidence.js +1106 -130
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.d.ts +132 -106
- package/dist/function-registry/graph.js +1006 -100
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.d.ts +8 -10
- package/dist/function-registry/helpers.js +869 -83
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.d.ts +4 -16
- package/dist/function-registry/identity.js +860 -82
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.d.ts +322 -8
- package/dist/function-registry/index.js +1249 -87
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.d.ts +12 -20
- package/dist/function-registry/judgments.js +891 -94
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.d.ts +2 -6
- package/dist/function-registry/legacy.js +860 -82
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.d.ts +18 -34
- package/dist/function-registry/lenses.js +928 -88
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +7 -7
- package/dist/function-registry/manifest.js +19 -2
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/ontologies.d.ts +46 -90
- package/dist/function-registry/ontologies.js +908 -109
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.d.ts +14 -26
- package/dist/function-registry/pipeline.js +880 -85
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.d.ts +50 -98
- package/dist/function-registry/questions.js +1043 -118
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.d.ts +18 -34
- package/dist/function-registry/tasks.js +973 -87
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.d.ts +100 -42
- package/dist/function-registry/topics.js +961 -89
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/types.d.ts +2 -2
- package/dist/function-registry/worktrees.d.ts +116 -74
- package/dist/function-registry/worktrees.js +1124 -115
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/function-registry-input-audit.d.ts +13 -0
- package/dist/function-registry-input-audit.js +166 -0
- package/dist/function-registry-input-audit.js.map +1 -0
- package/dist/gateway.contract.d.ts +2 -0
- package/dist/gateway.contract.js.map +1 -1
- package/dist/generated/convexSchemas.js +8 -6
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/generated/schema-manifest.json +103 -5
- package/dist/generated/tableOwnership.d.ts +4 -2
- package/dist/generated/tableOwnership.js +4 -0
- package/dist/generated/tableOwnership.js.map +1 -1
- package/dist/generated/tier-expectations.json +9 -4
- package/dist/graph-intelligence.contract.d.ts +506 -0
- package/dist/graph-intelligence.contract.js +595 -0
- package/dist/graph-intelligence.contract.js.map +1 -0
- package/dist/graph-types/index.d.ts +5 -1
- package/dist/graph-types/index.js +15 -4
- package/dist/graph-types/index.js.map +1 -1
- package/dist/index-O09U2xHk.d.ts +28 -0
- package/dist/index.d.ts +25 -4
- package/dist/index.js +3989 -236
- package/dist/index.js.map +1 -1
- package/dist/infisical-runtime.contract.d.ts +174 -0
- package/dist/infisical-runtime.contract.js +317 -0
- package/dist/infisical-runtime.contract.js.map +1 -0
- package/dist/lens-filter.contract.js +4 -3
- package/dist/lens-filter.contract.js.map +1 -1
- package/dist/lens-workflow.contract.js +4 -3
- package/dist/lens-workflow.contract.js.map +1 -1
- package/dist/manifests/edge-policy-manifest.d.ts +2 -0
- package/dist/manifests/edge-policy-manifest.data.d.ts +13 -0
- package/dist/manifests/edge-policy-manifest.data.js +26 -0
- package/dist/manifests/edge-policy-manifest.data.js.map +1 -0
- package/dist/manifests/edge-policy-manifest.js +92 -0
- package/dist/manifests/edge-policy-manifest.js.map +1 -0
- package/dist/manifests/infisical-runtime-manifest.d.ts +151 -0
- package/dist/manifests/infisical-runtime-manifest.js +316 -0
- package/dist/manifests/infisical-runtime-manifest.js.map +1 -0
- package/dist/manifests/invariant-manifest.d.ts +65 -0
- package/dist/manifests/invariant-manifest.js +18 -0
- package/dist/manifests/invariant-manifest.js.map +1 -0
- package/dist/manifests/invariants/ast-utils.d.ts +14 -0
- package/dist/manifests/invariants/ast-utils.js +54 -0
- package/dist/manifests/invariants/ast-utils.js.map +1 -0
- package/dist/manifests/invariants/index.d.ts +15 -0
- package/dist/manifests/invariants/index.js +183 -0
- package/dist/manifests/invariants/index.js.map +1 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +12 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +94 -0
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +12 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js +99 -0
- package/dist/manifests/invariants/inv-14-no-silent-transitions.js.map +1 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +12 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +42 -0
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -0
- package/dist/manifests/tenant-client-manifest.d.ts +322 -0
- package/dist/manifests/tenant-client-manifest.js +432 -0
- package/dist/manifests/tenant-client-manifest.js.map +1 -0
- package/dist/mcp-gateway-boundary.contract.d.ts +181 -0
- package/dist/mcp-gateway-boundary.contract.js +43 -0
- package/dist/mcp-gateway-boundary.contract.js.map +1 -0
- package/dist/projections/check-convex-args-shape.d.ts +3 -0
- package/dist/projections/check-convex-args-shape.js +399 -0
- package/dist/projections/check-convex-args-shape.js.map +1 -0
- package/dist/projections/create-evidence.projection.d.ts +176 -0
- package/dist/projections/create-evidence.projection.js +131 -0
- package/dist/projections/create-evidence.projection.js.map +1 -0
- package/dist/projections/index.d.ts +102 -0
- package/dist/projections/index.js +348 -0
- package/dist/projections/index.js.map +1 -0
- package/dist/projections/list-beliefs.projection.d.ts +36 -0
- package/dist/projections/list-beliefs.projection.js +54 -0
- package/dist/projections/list-beliefs.projection.js.map +1 -0
- package/dist/projections/list-tasks.projection.d.ts +32 -0
- package/dist/projections/list-tasks.projection.js +52 -0
- package/dist/projections/list-tasks.projection.js.map +1 -0
- package/dist/projections/modulate-confidence.projection.d.ts +219 -0
- package/dist/projections/modulate-confidence.projection.js +148 -0
- package/dist/projections/modulate-confidence.projection.js.map +1 -0
- package/dist/projections/projection-dsl.d.ts +11 -0
- package/dist/projections/projection-dsl.js +8 -0
- package/dist/projections/projection-dsl.js.map +1 -0
- package/dist/schema-helpers/enumValidation.js +2 -5
- package/dist/schema-helpers/enumValidation.js.map +1 -1
- package/dist/schema-helpers/spine/nodes/decision.js +2 -1
- package/dist/schema-helpers/spine/nodes/decision.js.map +1 -1
- package/dist/schema-helpers/spine/tables/epistemicNodes.js +27 -27
- package/dist/schema-helpers/spine/tables/epistemicNodes.js.map +1 -1
- package/dist/schema-helpers/validators.d.ts +1 -1
- package/dist/schema-helpers/validators.js +1 -1
- package/dist/schema-helpers/validators.js.map +1 -1
- package/dist/schemas/component-table-manifest.d.ts +74 -0
- package/dist/schemas/component-table-manifest.js +26 -0
- package/dist/schemas/component-table-manifest.js.map +1 -0
- package/dist/schemas/enums.d.ts +5 -2
- package/dist/schemas/enums.js +5 -2
- package/dist/schemas/enums.js.map +1 -1
- package/dist/schemas/index.d.ts +3 -1
- package/dist/schemas/index.js +112 -13
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +1154 -949
- package/dist/schemas/manifest.js +80 -12
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/sl-opinion.d.ts +31 -0
- package/dist/schemas/sl-opinion.js +19 -0
- package/dist/schemas/sl-opinion.js.map +1 -0
- package/dist/schemas/tables/identity/platform.d.ts +10 -10
- package/dist/schemas/tables/kernel/epistemic.d.ts +12 -10
- package/dist/schemas/tables/kernel/epistemic.js +6 -4
- package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
- package/dist/schemas/tables/kernel/infra.d.ts +17 -5
- package/dist/schemas/tables/kernel/infra.js +23 -1
- package/dist/schemas/tables/kernel/infra.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +10 -10
- package/dist/schemas/tables/kernel/lens.d.ts +4 -4
- package/dist/schemas/tables/kernel/platform.d.ts +12 -12
- package/dist/schemas/tables/kernel/spine.d.ts +3 -3
- package/dist/schemas/tables/kernel/spine.js +5 -2
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas/tables/kernel/task.d.ts +42 -42
- package/dist/schemas/tables/kernel/topic.js +5 -1
- package/dist/schemas/tables/kernel/topic.js.map +1 -1
- package/dist/schemas/tables/kernel/worktree.d.ts +62 -62
- package/dist/schemas/tables/kernel/worktree.js +6 -4
- package/dist/schemas/tables/kernel/worktree.js.map +1 -1
- package/dist/schemas/tables/mc/identity.d.ts +26 -3
- package/dist/schemas/tables/mc/identity.js +35 -1
- package/dist/schemas/tables/mc/identity.js.map +1 -1
- package/dist/schemas/tables/mc/pack.d.ts +20 -20
- package/dist/schemas/tables/mc/registry.d.ts +4 -4
- package/dist/schemas/tables/mc/runtime.d.ts +1 -1
- package/dist/schemas/tables/mc/runtime.js +1 -1
- package/dist/schemas/tables/mc/runtime.js.map +1 -1
- package/dist/schemas/tables/mc/workspace.d.ts +9 -3
- package/dist/schemas/tables/mc/workspace.js +3 -1
- package/dist/schemas/tables/mc/workspace.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +7 -4
- package/dist/{sdk-tools.contract-C2kQN_Xk.d.ts → sdk-tools.contract-BNklQDfB.d.ts} +2 -2
- package/dist/sdk-tools.contract.d.ts +2 -2
- package/dist/sdk-tools.contract.js +800 -74
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/tenant-bootstrap-seed.contract.d.ts +1101 -0
- package/dist/tenant-bootstrap-seed.contract.js +653 -0
- package/dist/tenant-bootstrap-seed.contract.js.map +1 -0
- package/dist/tenant-bootstrap-seed.defaults.d.ts +16 -0
- package/dist/tenant-bootstrap-seed.defaults.js +303 -0
- package/dist/tenant-bootstrap-seed.defaults.js.map +1 -0
- package/dist/tenant-client.contract.d.ts +349 -0
- package/dist/tenant-client.contract.js +488 -0
- package/dist/tenant-client.contract.js.map +1 -0
- package/dist/{tool-contracts-WCnuE9DW.d.ts → tool-contracts-BevD9Ho2.d.ts} +39 -3
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.js +801 -75
- package/dist/tool-contracts.js.map +1 -1
- package/dist/workflow-runtime.contract.js +1 -1
- package/dist/workflow-runtime.contract.js.map +1 -1
- package/package.json +27 -1
- package/dist/index-DoDXl8KS.d.ts +0 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
// src/function-registry/
|
|
3
|
+
// src/function-registry/edges.ts
|
|
4
4
|
|
|
5
5
|
// src/lens-workflow.contract.ts
|
|
6
6
|
var LENS_PERSPECTIVE_TYPES = [
|
|
@@ -14,7 +14,7 @@ var LENS_PERSPECTIVE_TYPES = [
|
|
|
14
14
|
// src/tool-contracts.ts
|
|
15
15
|
var CREATE_BELIEF = {
|
|
16
16
|
name: "create_belief",
|
|
17
|
-
description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a
|
|
17
|
+
description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; use modulate_confidence to record the first evidential update.",
|
|
18
18
|
parameters: {
|
|
19
19
|
canonicalText: {
|
|
20
20
|
type: "string",
|
|
@@ -26,7 +26,7 @@ var CREATE_BELIEF = {
|
|
|
26
26
|
},
|
|
27
27
|
baseRate: {
|
|
28
28
|
type: "number",
|
|
29
|
-
description: "
|
|
29
|
+
description: "Prior probability used to seed the vacuous opinion `(0, 0, 1, a)` at creation time. Defaults to 0.5 when omitted."
|
|
30
30
|
},
|
|
31
31
|
beliefType: {
|
|
32
32
|
type: "string",
|
|
@@ -37,7 +37,7 @@ var CREATE_BELIEF = {
|
|
|
37
37
|
description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'] } for coding intelligence)"
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
required: ["canonicalText"
|
|
40
|
+
required: ["canonicalText"],
|
|
41
41
|
response: {
|
|
42
42
|
description: "The created canonical belief record",
|
|
43
43
|
fields: {
|
|
@@ -100,7 +100,7 @@ var REFINE_BELIEF = {
|
|
|
100
100
|
};
|
|
101
101
|
var MODULATE_CONFIDENCE = {
|
|
102
102
|
name: "modulate_confidence",
|
|
103
|
-
description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction
|
|
103
|
+
description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Every modulation must cite a truth-bearing artifact: triggeringEvidenceId, triggeringQuestionId, triggeringAnswerId, triggeringContradictionId, or triggeringWorktreeId. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction.",
|
|
104
104
|
parameters: {
|
|
105
105
|
nodeId: { type: "string", description: "The belief to score" },
|
|
106
106
|
belief: {
|
|
@@ -119,9 +119,9 @@ var MODULATE_CONFIDENCE = {
|
|
|
119
119
|
type: "number",
|
|
120
120
|
description: "Subjective-logic base rate `a` in [0, 1]. Required for tuple payloads."
|
|
121
121
|
},
|
|
122
|
-
|
|
123
|
-
type: "
|
|
124
|
-
description: "
|
|
122
|
+
worktreeId: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "Completed worktree that tested this belief when confidence policy requires merge-backed scoring."
|
|
125
125
|
},
|
|
126
126
|
trigger: {
|
|
127
127
|
type: "string",
|
|
@@ -136,17 +136,43 @@ var MODULATE_CONFIDENCE = {
|
|
|
136
136
|
"worktree_completed",
|
|
137
137
|
"fusion",
|
|
138
138
|
"discount",
|
|
139
|
-
"deduction"
|
|
140
|
-
"manual",
|
|
141
|
-
"decay"
|
|
139
|
+
"deduction"
|
|
142
140
|
]
|
|
143
141
|
},
|
|
142
|
+
triggeringEvidenceId: {
|
|
143
|
+
type: "string",
|
|
144
|
+
description: "Evidence node that caused an evidence-triggered modulation"
|
|
145
|
+
},
|
|
146
|
+
triggeringQuestionId: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Answered question whose resolution supports this modulation"
|
|
149
|
+
},
|
|
150
|
+
triggeringAnswerId: {
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "Answer node whose content supports this modulation"
|
|
153
|
+
},
|
|
154
|
+
triggeringContradictionId: {
|
|
155
|
+
type: "string",
|
|
156
|
+
description: "Contradiction record that caused a contradiction-triggered modulation"
|
|
157
|
+
},
|
|
158
|
+
triggeringWorktreeId: {
|
|
159
|
+
type: "string",
|
|
160
|
+
description: "Completed worktree whose outcome caused a worktree-triggered modulation"
|
|
161
|
+
},
|
|
144
162
|
rationale: {
|
|
145
163
|
type: "string",
|
|
146
164
|
description: "Human-readable explanation of why confidence changed"
|
|
147
165
|
}
|
|
148
166
|
},
|
|
149
|
-
required: [
|
|
167
|
+
required: [
|
|
168
|
+
"nodeId",
|
|
169
|
+
"belief",
|
|
170
|
+
"disbelief",
|
|
171
|
+
"uncertainty",
|
|
172
|
+
"baseRate",
|
|
173
|
+
"trigger",
|
|
174
|
+
"rationale"
|
|
175
|
+
],
|
|
150
176
|
response: {
|
|
151
177
|
description: "Confidence modulation result",
|
|
152
178
|
fields: {
|
|
@@ -340,7 +366,7 @@ var ADD_EVIDENCE = {
|
|
|
340
366
|
description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'], failedApproach: true } for coding intelligence)"
|
|
341
367
|
}
|
|
342
368
|
},
|
|
343
|
-
required: ["canonicalText", "targetNodeId"],
|
|
369
|
+
required: ["canonicalText", "targetNodeId", "reasoning"],
|
|
344
370
|
response: {
|
|
345
371
|
description: "The created evidence node and its edge",
|
|
346
372
|
fields: {
|
|
@@ -396,7 +422,22 @@ var ADD_WORKTREE = {
|
|
|
396
422
|
description: "Check out a branch into an active worktree for investigation. Like `git worktree add <branch>` \u2014 creates independent working state on a thematic branch. Beliefs committed within the worktree can be freely amended (draft code on a feature branch). When investigation is complete, `merge` integrates findings into main.",
|
|
397
423
|
parameters: {
|
|
398
424
|
title: { type: "string", description: "Worktree name/objective" },
|
|
399
|
-
|
|
425
|
+
name: {
|
|
426
|
+
type: "string",
|
|
427
|
+
description: "Optional storage-name alias for callers that already use backend naming"
|
|
428
|
+
},
|
|
429
|
+
projectId: {
|
|
430
|
+
type: "string",
|
|
431
|
+
description: "Legacy topicId alias or resolver hint"
|
|
432
|
+
},
|
|
433
|
+
topicId: {
|
|
434
|
+
type: "string",
|
|
435
|
+
description: "Optional topic scope hint for resolver validation"
|
|
436
|
+
},
|
|
437
|
+
topicHint: {
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Natural-language topic hint for automatic topic resolution"
|
|
440
|
+
},
|
|
400
441
|
branchId: {
|
|
401
442
|
type: "string",
|
|
402
443
|
description: "The branch this worktree investigates"
|
|
@@ -409,21 +450,122 @@ var ADD_WORKTREE = {
|
|
|
409
450
|
type: "string",
|
|
410
451
|
description: "The testable claim this worktree investigates"
|
|
411
452
|
},
|
|
453
|
+
rationale: {
|
|
454
|
+
type: "string",
|
|
455
|
+
description: "Why this worktree exists and why it belongs in the campaign"
|
|
456
|
+
},
|
|
457
|
+
worktreeType: {
|
|
458
|
+
type: "string",
|
|
459
|
+
description: "Schema-enum worktree type used by the kernel lifecycle and retrieval layers"
|
|
460
|
+
},
|
|
461
|
+
gate: {
|
|
462
|
+
type: "string",
|
|
463
|
+
description: "Exit gate name for this worktree"
|
|
464
|
+
},
|
|
465
|
+
startDate: {
|
|
466
|
+
type: "number",
|
|
467
|
+
description: "Planned start timestamp in milliseconds since epoch"
|
|
468
|
+
},
|
|
469
|
+
endDate: {
|
|
470
|
+
type: "number",
|
|
471
|
+
description: "Planned end timestamp in milliseconds since epoch"
|
|
472
|
+
},
|
|
473
|
+
durationWeeks: {
|
|
474
|
+
type: "number",
|
|
475
|
+
description: "Planned duration in weeks"
|
|
476
|
+
},
|
|
477
|
+
confidenceImpact: {
|
|
478
|
+
type: "string",
|
|
479
|
+
description: "Expected confidence impact if the worktree succeeds",
|
|
480
|
+
enum: ["high", "medium", "low"]
|
|
481
|
+
},
|
|
482
|
+
beliefFocus: {
|
|
483
|
+
type: "string",
|
|
484
|
+
description: "Natural-language focus spanning the target belief neighborhood"
|
|
485
|
+
},
|
|
412
486
|
beliefIds: {
|
|
413
487
|
type: "array",
|
|
414
|
-
description: "
|
|
488
|
+
description: "Legacy alias for targetBeliefIds"
|
|
489
|
+
},
|
|
490
|
+
beliefs: {
|
|
491
|
+
type: "array",
|
|
492
|
+
description: "Legacy alias for targetBeliefIds"
|
|
493
|
+
},
|
|
494
|
+
targetBeliefIds: {
|
|
495
|
+
type: "array",
|
|
496
|
+
description: "Belief node IDs this worktree is expected to test or update"
|
|
497
|
+
},
|
|
498
|
+
targetQuestionIds: {
|
|
499
|
+
type: "array",
|
|
500
|
+
description: "Question node IDs this worktree is expected to answer"
|
|
501
|
+
},
|
|
502
|
+
keyQuestions: {
|
|
503
|
+
type: "array",
|
|
504
|
+
description: "Inline key question objects with question, optional status, answer, answerConfidence, and linkedQuestionId"
|
|
505
|
+
},
|
|
506
|
+
evidenceSignals: {
|
|
507
|
+
type: "array",
|
|
508
|
+
description: "Evidence signal objects with signal, optional collected state, progress, and notes"
|
|
509
|
+
},
|
|
510
|
+
decisionGate: {
|
|
511
|
+
type: "object",
|
|
512
|
+
description: "Decision gate object with goCriteria, noGoSignals, optional verdict, rationale, decidedAt, and decidedBy"
|
|
513
|
+
},
|
|
514
|
+
goCriteria: {
|
|
515
|
+
type: "array",
|
|
516
|
+
description: "Shorthand go criteria used to build decisionGate"
|
|
517
|
+
},
|
|
518
|
+
noGoSignals: {
|
|
519
|
+
type: "array",
|
|
520
|
+
description: "Shorthand no-go signals used to build decisionGate"
|
|
521
|
+
},
|
|
522
|
+
proofArtifacts: {
|
|
523
|
+
type: "array",
|
|
524
|
+
description: "Expected proof artifacts required to close the worktree"
|
|
415
525
|
},
|
|
416
526
|
autoShape: {
|
|
417
527
|
type: "boolean",
|
|
418
528
|
description: "Whether to invoke inquiry auto-shaping during worktree creation"
|
|
419
529
|
},
|
|
530
|
+
autoFixPolicy: {
|
|
531
|
+
type: "object",
|
|
532
|
+
description: "Policy for permitted automatic remediation inside the worktree"
|
|
533
|
+
},
|
|
420
534
|
domainPackId: {
|
|
421
535
|
type: "string",
|
|
422
536
|
description: "Optional domain pack whose shaping hooks should influence generated questions and tasks"
|
|
423
537
|
},
|
|
424
|
-
|
|
538
|
+
tags: {
|
|
539
|
+
type: "array",
|
|
540
|
+
description: "Additional topic-resolution tags for the worktree"
|
|
541
|
+
},
|
|
542
|
+
touchedPaths: {
|
|
543
|
+
type: "array",
|
|
544
|
+
description: "File paths used as topic-resolution signals"
|
|
545
|
+
},
|
|
546
|
+
sourceRef: {
|
|
547
|
+
type: "string",
|
|
548
|
+
description: "Source reference used as a topic-resolution signal"
|
|
549
|
+
},
|
|
550
|
+
sourceKind: {
|
|
551
|
+
type: "string",
|
|
552
|
+
description: "Source kind used as a topic-resolution signal"
|
|
553
|
+
},
|
|
554
|
+
campaign: {
|
|
555
|
+
type: "number",
|
|
556
|
+
description: "Top-level pipeline campaign number. Campaigns define the outer execution slice."
|
|
557
|
+
},
|
|
558
|
+
lane: {
|
|
559
|
+
type: "string",
|
|
560
|
+
description: "GitButler-aligned workstream lane name inside the campaign."
|
|
561
|
+
},
|
|
562
|
+
laneOrderInCampaign: {
|
|
563
|
+
type: "number",
|
|
564
|
+
description: "Ordering for this lane within its campaign."
|
|
565
|
+
},
|
|
566
|
+
orderInLane: {
|
|
425
567
|
type: "number",
|
|
426
|
-
description: "
|
|
568
|
+
description: "Position of this worktree inside its lane."
|
|
427
569
|
},
|
|
428
570
|
dependsOn: {
|
|
429
571
|
type: "array",
|
|
@@ -433,12 +575,20 @@ var ADD_WORKTREE = {
|
|
|
433
575
|
type: "array",
|
|
434
576
|
description: "Worktree IDs blocked by this worktree"
|
|
435
577
|
},
|
|
436
|
-
|
|
578
|
+
staffingHint: {
|
|
437
579
|
type: "string",
|
|
438
|
-
description: "
|
|
580
|
+
description: "Suggested staffing or agent allocation note"
|
|
581
|
+
},
|
|
582
|
+
lensId: {
|
|
583
|
+
type: "string",
|
|
584
|
+
description: "Lens that scopes this worktree when applicable"
|
|
585
|
+
},
|
|
586
|
+
lastReconciledAt: {
|
|
587
|
+
type: "number",
|
|
588
|
+
description: "Timestamp when worktree metadata was last reconciled"
|
|
439
589
|
}
|
|
440
590
|
},
|
|
441
|
-
required: ["title"
|
|
591
|
+
required: ["title"],
|
|
442
592
|
response: {
|
|
443
593
|
description: "The created worktree",
|
|
444
594
|
fields: {
|
|
@@ -465,7 +615,7 @@ var MERGE = {
|
|
|
465
615
|
worktreeId: { type: "string", description: "The worktree to merge" },
|
|
466
616
|
outcomes: {
|
|
467
617
|
type: "array",
|
|
468
|
-
description: "
|
|
618
|
+
description: "Merge outcomes as key-finding strings, or scoring outcomes for beliefs: { beliefId, confidence, rationale }"
|
|
469
619
|
},
|
|
470
620
|
summary: { type: "string", description: "Overall findings summary" }
|
|
471
621
|
},
|
|
@@ -683,19 +833,23 @@ var FIND_CONTRADICTIONS = {
|
|
|
683
833
|
};
|
|
684
834
|
var CREATE_EDGE = {
|
|
685
835
|
name: "create_edge",
|
|
686
|
-
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.
|
|
836
|
+
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.",
|
|
687
837
|
parameters: {
|
|
688
|
-
|
|
689
|
-
type: "
|
|
690
|
-
description: "Source
|
|
838
|
+
from: {
|
|
839
|
+
type: "object",
|
|
840
|
+
description: "Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }"
|
|
691
841
|
},
|
|
692
|
-
|
|
693
|
-
type: "
|
|
694
|
-
description: "Target
|
|
842
|
+
to: {
|
|
843
|
+
type: "object",
|
|
844
|
+
description: "Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }"
|
|
695
845
|
},
|
|
696
846
|
edgeType: {
|
|
697
847
|
type: "string",
|
|
698
|
-
description: "Relationship type
|
|
848
|
+
description: "Relationship type from the public epistemic edge enum."
|
|
849
|
+
},
|
|
850
|
+
globalId: {
|
|
851
|
+
type: "string",
|
|
852
|
+
description: "Optional idempotent edge global ID."
|
|
699
853
|
},
|
|
700
854
|
weight: {
|
|
701
855
|
type: "number",
|
|
@@ -706,9 +860,13 @@ var CREATE_EDGE = {
|
|
|
706
860
|
type: "string",
|
|
707
861
|
description: "How this was determined",
|
|
708
862
|
enum: ["deductive", "inductive", "abductive", "analogical", "empirical"]
|
|
863
|
+
},
|
|
864
|
+
metadata: {
|
|
865
|
+
type: "object",
|
|
866
|
+
description: "Optional edge metadata."
|
|
709
867
|
}
|
|
710
868
|
},
|
|
711
|
-
required: ["
|
|
869
|
+
required: ["from", "to", "edgeType"],
|
|
712
870
|
response: {
|
|
713
871
|
description: "The created edge",
|
|
714
872
|
fields: {
|
|
@@ -722,6 +880,240 @@ var CREATE_EDGE = {
|
|
|
722
880
|
ontologyPrimitive: "edge",
|
|
723
881
|
tier: "showcase"
|
|
724
882
|
};
|
|
883
|
+
var UPDATE_EDGE = {
|
|
884
|
+
name: "update_edge",
|
|
885
|
+
description: "Amend metadata on an existing graph edge. Like `git commit --amend` \u2014 changes the edge annotation without recreating the relationship.",
|
|
886
|
+
parameters: {
|
|
887
|
+
edgeId: { type: "string", description: "Edge ID or global ID to update" },
|
|
888
|
+
weight: { type: "number", description: "Updated edge weight" },
|
|
889
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
890
|
+
context: { type: "string", description: "Updated human-readable context" },
|
|
891
|
+
derivationType: { type: "string", description: "Updated derivation type" },
|
|
892
|
+
metadata: { type: "object", description: "Updated metadata" }
|
|
893
|
+
},
|
|
894
|
+
required: ["edgeId"],
|
|
895
|
+
response: {
|
|
896
|
+
description: "Edge update result",
|
|
897
|
+
fields: { success: "boolean" }
|
|
898
|
+
},
|
|
899
|
+
ownerModule: "graph-primitives",
|
|
900
|
+
ontologyPrimitive: "edge",
|
|
901
|
+
tier: "workhorse"
|
|
902
|
+
};
|
|
903
|
+
var REMOVE_EDGE = {
|
|
904
|
+
name: "remove_edge",
|
|
905
|
+
description: "Remove one graph edge by ID. Like `git rm` \u2014 deletes a single explicit relationship from the spine.",
|
|
906
|
+
parameters: {
|
|
907
|
+
edgeId: { type: "string", description: "Edge ID or global ID to remove" }
|
|
908
|
+
},
|
|
909
|
+
required: ["edgeId"],
|
|
910
|
+
response: {
|
|
911
|
+
description: "Edge removal result",
|
|
912
|
+
fields: { success: "boolean" }
|
|
913
|
+
},
|
|
914
|
+
ownerModule: "graph-primitives",
|
|
915
|
+
ontologyPrimitive: "edge",
|
|
916
|
+
tier: "workhorse"
|
|
917
|
+
};
|
|
918
|
+
var REMOVE_EDGES_BETWEEN = {
|
|
919
|
+
name: "remove_edges_between",
|
|
920
|
+
description: "Remove graph edges between two nodes. Like `git rm <pathspec>` \u2014 deletes relationships matching a source, target, and optional type.",
|
|
921
|
+
parameters: {
|
|
922
|
+
fromNodeId: { type: "string", description: "Source node ID or global ID" },
|
|
923
|
+
toNodeId: { type: "string", description: "Target node ID or global ID" },
|
|
924
|
+
edgeType: { type: "string", description: "Optional edge type filter" }
|
|
925
|
+
},
|
|
926
|
+
required: ["fromNodeId", "toNodeId"],
|
|
927
|
+
response: {
|
|
928
|
+
description: "Matched edge removal result",
|
|
929
|
+
fields: { deleted: "number" }
|
|
930
|
+
},
|
|
931
|
+
ownerModule: "graph-primitives",
|
|
932
|
+
ontologyPrimitive: "edge",
|
|
933
|
+
tier: "workhorse"
|
|
934
|
+
};
|
|
935
|
+
var BATCH_CREATE_EDGES = {
|
|
936
|
+
name: "batch_create_edges",
|
|
937
|
+
description: "Commit multiple typed graph edges. Like `git commit` with many staged paths \u2014 writes a batch of explicit relationships atomically per edge.",
|
|
938
|
+
parameters: {
|
|
939
|
+
edges: {
|
|
940
|
+
type: "array",
|
|
941
|
+
description: "Edges to create, each with from, to, edgeType, and optional weight/confidence/context."
|
|
942
|
+
},
|
|
943
|
+
skipLayerValidation: {
|
|
944
|
+
type: "boolean",
|
|
945
|
+
description: "Skip kernel layer validation for trusted materialization flows."
|
|
946
|
+
}
|
|
947
|
+
},
|
|
948
|
+
required: ["edges"],
|
|
949
|
+
response: {
|
|
950
|
+
description: "Batch edge creation result",
|
|
951
|
+
fields: {
|
|
952
|
+
created: "number",
|
|
953
|
+
results: "array",
|
|
954
|
+
errors: "array"
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
ownerModule: "graph-primitives",
|
|
958
|
+
ontologyPrimitive: "edge",
|
|
959
|
+
tier: "workhorse"
|
|
960
|
+
};
|
|
961
|
+
var CREATE_EPISTEMIC_NODE = {
|
|
962
|
+
name: "create_epistemic_node",
|
|
963
|
+
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.",
|
|
964
|
+
parameters: {
|
|
965
|
+
globalId: { type: "string", description: "Optional idempotent node global ID" },
|
|
966
|
+
nodeType: { type: "string", description: "Public epistemic node type" },
|
|
967
|
+
canonicalText: { type: "string", description: "Canonical node text" },
|
|
968
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
969
|
+
contentHash: { type: "string", description: "Optional idempotency content hash" },
|
|
970
|
+
sourceType: { type: "string", description: "Source type for provenance" },
|
|
971
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
972
|
+
content: { type: "string", description: "Extended content" },
|
|
973
|
+
title: { type: "string", description: "Display title" },
|
|
974
|
+
metadata: { type: "object", description: "Optional node metadata" }
|
|
975
|
+
},
|
|
976
|
+
required: ["nodeType"],
|
|
977
|
+
response: {
|
|
978
|
+
description: "Created node result",
|
|
979
|
+
fields: {
|
|
980
|
+
nodeId: "string",
|
|
981
|
+
nodeGlobalId: "string",
|
|
982
|
+
isDuplicate: "boolean"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
ownerModule: "reasoning-kernel",
|
|
986
|
+
ontologyPrimitive: "graph",
|
|
987
|
+
tier: "showcase"
|
|
988
|
+
};
|
|
989
|
+
var GET_EPISTEMIC_NODE = {
|
|
990
|
+
name: "get_epistemic_node",
|
|
991
|
+
description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
|
|
992
|
+
parameters: {
|
|
993
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
994
|
+
},
|
|
995
|
+
required: ["nodeId"],
|
|
996
|
+
response: {
|
|
997
|
+
description: "The resolved node",
|
|
998
|
+
fields: { node: "object" }
|
|
999
|
+
},
|
|
1000
|
+
ownerModule: "reasoning-kernel",
|
|
1001
|
+
ontologyPrimitive: "graph",
|
|
1002
|
+
tier: "workhorse"
|
|
1003
|
+
};
|
|
1004
|
+
var LIST_EPISTEMIC_NODES = {
|
|
1005
|
+
name: "list_epistemic_nodes",
|
|
1006
|
+
description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
|
|
1007
|
+
parameters: {
|
|
1008
|
+
topicId: { type: "string", description: "Optional topic scope" },
|
|
1009
|
+
nodeType: { type: "string", description: "Optional node type filter" },
|
|
1010
|
+
status: { type: "string", description: "Optional lifecycle status" },
|
|
1011
|
+
searchQuery: { type: "string", description: "Optional text search query" },
|
|
1012
|
+
limit: { type: "number", description: "Maximum nodes to return" }
|
|
1013
|
+
},
|
|
1014
|
+
required: [],
|
|
1015
|
+
response: {
|
|
1016
|
+
description: "Matching nodes",
|
|
1017
|
+
fields: { nodes: "array" }
|
|
1018
|
+
},
|
|
1019
|
+
ownerModule: "reasoning-kernel",
|
|
1020
|
+
ontologyPrimitive: "graph",
|
|
1021
|
+
tier: "workhorse"
|
|
1022
|
+
};
|
|
1023
|
+
var UPDATE_EPISTEMIC_NODE = {
|
|
1024
|
+
name: "update_epistemic_node",
|
|
1025
|
+
description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
|
|
1026
|
+
parameters: {
|
|
1027
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1028
|
+
canonicalText: { type: "string", description: "Updated canonical text" },
|
|
1029
|
+
text: { type: "string", description: "Alias for canonicalText" },
|
|
1030
|
+
contentHash: { type: "string", description: "Updated content hash" },
|
|
1031
|
+
content: { type: "string", description: "Updated content" },
|
|
1032
|
+
title: { type: "string", description: "Updated display title" },
|
|
1033
|
+
metadata: { type: "object", description: "Updated metadata" },
|
|
1034
|
+
confidence: { type: "number", description: "Updated confidence" },
|
|
1035
|
+
verificationStatus: { type: "string", description: "Updated verification status" },
|
|
1036
|
+
status: { type: "string", description: "Updated lifecycle status" }
|
|
1037
|
+
},
|
|
1038
|
+
required: ["nodeId"],
|
|
1039
|
+
response: {
|
|
1040
|
+
description: "Node update result",
|
|
1041
|
+
fields: { success: "boolean" }
|
|
1042
|
+
},
|
|
1043
|
+
ownerModule: "reasoning-kernel",
|
|
1044
|
+
ontologyPrimitive: "graph",
|
|
1045
|
+
tier: "workhorse"
|
|
1046
|
+
};
|
|
1047
|
+
var ARCHIVE_EPISTEMIC_NODE = {
|
|
1048
|
+
name: "archive_epistemic_node",
|
|
1049
|
+
description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
|
|
1050
|
+
parameters: {
|
|
1051
|
+
nodeId: { type: "string", description: "Node ID or global ID" }
|
|
1052
|
+
},
|
|
1053
|
+
required: ["nodeId"],
|
|
1054
|
+
response: {
|
|
1055
|
+
description: "Archive result",
|
|
1056
|
+
fields: { success: "boolean", effectiveStatus: "string" }
|
|
1057
|
+
},
|
|
1058
|
+
ownerModule: "reasoning-kernel",
|
|
1059
|
+
ontologyPrimitive: "graph",
|
|
1060
|
+
tier: "workhorse"
|
|
1061
|
+
};
|
|
1062
|
+
var VERIFY_EPISTEMIC_NODE = {
|
|
1063
|
+
name: "verify_epistemic_node",
|
|
1064
|
+
description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
|
|
1065
|
+
parameters: {
|
|
1066
|
+
nodeId: { type: "string", description: "Node ID or global ID" },
|
|
1067
|
+
verificationStatus: { type: "string", description: "Verification status" },
|
|
1068
|
+
confidence: { type: "number", description: "Optional confidence update" }
|
|
1069
|
+
},
|
|
1070
|
+
required: ["nodeId", "verificationStatus"],
|
|
1071
|
+
response: {
|
|
1072
|
+
description: "Verification result",
|
|
1073
|
+
fields: { success: "boolean" }
|
|
1074
|
+
},
|
|
1075
|
+
ownerModule: "reasoning-kernel",
|
|
1076
|
+
ontologyPrimitive: "graph",
|
|
1077
|
+
tier: "workhorse"
|
|
1078
|
+
};
|
|
1079
|
+
var SUPERSEDE_EPISTEMIC_NODE = {
|
|
1080
|
+
name: "supersede_epistemic_node",
|
|
1081
|
+
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.",
|
|
1082
|
+
parameters: {
|
|
1083
|
+
oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
|
|
1084
|
+
newGlobalId: { type: "string", description: "Optional replacement global ID" },
|
|
1085
|
+
newCanonicalText: { type: "string", description: "Replacement canonical text" },
|
|
1086
|
+
text: { type: "string", description: "Alias for newCanonicalText" },
|
|
1087
|
+
newContentHash: { type: "string", description: "Optional replacement content hash" },
|
|
1088
|
+
reason: { type: "string", description: "Reason for superseding" }
|
|
1089
|
+
},
|
|
1090
|
+
required: ["oldNodeId"],
|
|
1091
|
+
response: {
|
|
1092
|
+
description: "Supersede result",
|
|
1093
|
+
fields: { oldNodeId: "string", newNodeId: "string" }
|
|
1094
|
+
},
|
|
1095
|
+
ownerModule: "reasoning-kernel",
|
|
1096
|
+
ontologyPrimitive: "graph",
|
|
1097
|
+
tier: "workhorse"
|
|
1098
|
+
};
|
|
1099
|
+
var BATCH_CREATE_EPISTEMIC_NODES = {
|
|
1100
|
+
name: "batch_create_epistemic_nodes",
|
|
1101
|
+
description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
|
|
1102
|
+
parameters: {
|
|
1103
|
+
nodes: {
|
|
1104
|
+
type: "array",
|
|
1105
|
+
description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
required: ["nodes"],
|
|
1109
|
+
response: {
|
|
1110
|
+
description: "Batch node creation result",
|
|
1111
|
+
fields: { created: "number", results: "array" }
|
|
1112
|
+
},
|
|
1113
|
+
ownerModule: "reasoning-kernel",
|
|
1114
|
+
ontologyPrimitive: "graph",
|
|
1115
|
+
tier: "workhorse"
|
|
1116
|
+
};
|
|
725
1117
|
var RECORD_JUDGMENT = {
|
|
726
1118
|
name: "record_judgment",
|
|
727
1119
|
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).",
|
|
@@ -1019,6 +1411,74 @@ var GET_GRAPH_STRUCTURE_ANALYSIS = {
|
|
|
1019
1411
|
ontologyPrimitive: "graph",
|
|
1020
1412
|
tier: "showcase"
|
|
1021
1413
|
};
|
|
1414
|
+
var LIST_GRAPH_INTELLIGENCE_QUERIES = {
|
|
1415
|
+
name: "list_graph_intelligence_queries",
|
|
1416
|
+
description: "List the Graph Intelligence query catalog that powers structural graph analysis experiences. Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.",
|
|
1417
|
+
parameters: {
|
|
1418
|
+
categoryId: {
|
|
1419
|
+
type: "string",
|
|
1420
|
+
description: "Optional category filter, such as problems or strategic"
|
|
1421
|
+
},
|
|
1422
|
+
mode: {
|
|
1423
|
+
type: "string",
|
|
1424
|
+
description: "Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
required: [],
|
|
1428
|
+
response: {
|
|
1429
|
+
description: "Graph Intelligence query catalog and mode-to-tool mapping",
|
|
1430
|
+
fields: {
|
|
1431
|
+
categories: "array \u2014 query categories",
|
|
1432
|
+
queries: "array \u2014 query definitions with prompt templates and tools",
|
|
1433
|
+
quickQueries: "array \u2014 recommended one-click query presets",
|
|
1434
|
+
publicToolNamesByMode: "object \u2014 public tool names available to each Graph Intelligence mode"
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
ownerModule: "graph-intelligence",
|
|
1438
|
+
ontologyPrimitive: "graph",
|
|
1439
|
+
tier: "showcase"
|
|
1440
|
+
};
|
|
1441
|
+
var RUN_GRAPH_INTELLIGENCE_QUERY = {
|
|
1442
|
+
name: "run_graph_intelligence_query",
|
|
1443
|
+
description: "Run a named Graph Intelligence query against a tenant topic graph. Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.",
|
|
1444
|
+
parameters: {
|
|
1445
|
+
topicId: { type: "string", description: "Topic to analyze" },
|
|
1446
|
+
queryId: {
|
|
1447
|
+
type: "string",
|
|
1448
|
+
description: "Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary"
|
|
1449
|
+
},
|
|
1450
|
+
prompt: {
|
|
1451
|
+
type: "string",
|
|
1452
|
+
description: "Optional custom prompt for custom analysis runs"
|
|
1453
|
+
},
|
|
1454
|
+
input: {
|
|
1455
|
+
type: "string",
|
|
1456
|
+
description: "Optional entity, theme, belief, company, or search text for input-driven queries"
|
|
1457
|
+
},
|
|
1458
|
+
mode: {
|
|
1459
|
+
type: "string",
|
|
1460
|
+
description: "Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence"
|
|
1461
|
+
},
|
|
1462
|
+
limit: {
|
|
1463
|
+
type: "number",
|
|
1464
|
+
description: "Maximum graph context rows to return"
|
|
1465
|
+
}
|
|
1466
|
+
},
|
|
1467
|
+
required: ["topicId"],
|
|
1468
|
+
response: {
|
|
1469
|
+
description: "Graph Intelligence query result bundle ready for model or prompt-library synthesis",
|
|
1470
|
+
fields: {
|
|
1471
|
+
query: "object \u2014 selected query definition",
|
|
1472
|
+
prompt: "string \u2014 resolved prompt template",
|
|
1473
|
+
toolPlan: "array \u2014 public tools and args the model can call next",
|
|
1474
|
+
analysis: "object \u2014 structure, coverage, gap, and confirmation-bias analysis",
|
|
1475
|
+
context: "object \u2014 sampled beliefs, questions, evidence, edges, and contradictions"
|
|
1476
|
+
}
|
|
1477
|
+
},
|
|
1478
|
+
ownerModule: "graph-intelligence",
|
|
1479
|
+
ontologyPrimitive: "graph",
|
|
1480
|
+
tier: "showcase"
|
|
1481
|
+
};
|
|
1022
1482
|
var GET_FALSIFICATION_QUESTIONS = {
|
|
1023
1483
|
name: "get_falsification_questions",
|
|
1024
1484
|
description: "Generate Popperian falsification questions for beliefs. Like `git test` \u2014 identifies the questions most likely to disprove current beliefs. Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.",
|
|
@@ -1081,6 +1541,10 @@ var CREATE_EVIDENCE = {
|
|
|
1081
1541
|
type: "object",
|
|
1082
1542
|
description: "Optional metadata merged into the canonical evidence node"
|
|
1083
1543
|
},
|
|
1544
|
+
rationale: {
|
|
1545
|
+
type: "string",
|
|
1546
|
+
description: "Why this evidence should enter the reasoning graph"
|
|
1547
|
+
},
|
|
1084
1548
|
title: { type: "string", description: "Optional short title" },
|
|
1085
1549
|
content: { type: "string", description: "Optional long-form content" },
|
|
1086
1550
|
contentType: {
|
|
@@ -1089,7 +1553,7 @@ var CREATE_EVIDENCE = {
|
|
|
1089
1553
|
},
|
|
1090
1554
|
kind: { type: "string", description: "Optional evidence kind" }
|
|
1091
1555
|
},
|
|
1092
|
-
required: ["text"],
|
|
1556
|
+
required: ["text", "rationale"],
|
|
1093
1557
|
response: {
|
|
1094
1558
|
description: "The created canonical evidence record",
|
|
1095
1559
|
fields: {
|
|
@@ -1137,7 +1601,7 @@ var LIST_EVIDENCE = {
|
|
|
1137
1601
|
limit: { type: "number", description: "Max results" },
|
|
1138
1602
|
cursor: { type: "string", description: "Pagination cursor" }
|
|
1139
1603
|
},
|
|
1140
|
-
required: [],
|
|
1604
|
+
required: ["topicId"],
|
|
1141
1605
|
response: {
|
|
1142
1606
|
description: "Canonical evidence page",
|
|
1143
1607
|
fields: {
|
|
@@ -1322,6 +1786,7 @@ var ANSWER_QUESTION = {
|
|
|
1322
1786
|
description: "Answer a question with optional evidence links. Like `git commit` on the question thread \u2014 records the answer and closes the loop with a canonical answered state.",
|
|
1323
1787
|
parameters: {
|
|
1324
1788
|
id: { type: "string", description: "Canonical question ID" },
|
|
1789
|
+
topicId: { type: "string", description: "Topic scope for the answer" },
|
|
1325
1790
|
text: { type: "string", description: "Answer text" },
|
|
1326
1791
|
confidence: {
|
|
1327
1792
|
type: "string",
|
|
@@ -1334,7 +1799,7 @@ var ANSWER_QUESTION = {
|
|
|
1334
1799
|
},
|
|
1335
1800
|
rationale: { type: "string", description: "Why this answer is credible" }
|
|
1336
1801
|
},
|
|
1337
|
-
required: ["id", "text"],
|
|
1802
|
+
required: ["id", "topicId", "text"],
|
|
1338
1803
|
response: {
|
|
1339
1804
|
description: "Answer result",
|
|
1340
1805
|
fields: {
|
|
@@ -1553,6 +2018,10 @@ var LIST_BELIEFS = {
|
|
|
1553
2018
|
minConfidence: {
|
|
1554
2019
|
type: "number",
|
|
1555
2020
|
description: "Minimum confidence threshold"
|
|
2021
|
+
},
|
|
2022
|
+
limit: {
|
|
2023
|
+
type: "number",
|
|
2024
|
+
description: "Maximum results"
|
|
1556
2025
|
}
|
|
1557
2026
|
},
|
|
1558
2027
|
required: ["topicId"],
|
|
@@ -1569,20 +2038,37 @@ var LIST_BELIEFS = {
|
|
|
1569
2038
|
};
|
|
1570
2039
|
var LIST_WORKTREES = {
|
|
1571
2040
|
name: "list_worktrees",
|
|
1572
|
-
description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with
|
|
2041
|
+
description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with lifecycle phase, pipeline campaign/lane, status, and belief counts.",
|
|
1573
2042
|
parameters: {
|
|
1574
2043
|
topicId: { type: "string", description: "Topic scope" },
|
|
1575
2044
|
status: {
|
|
1576
2045
|
type: "string",
|
|
1577
2046
|
description: "Filter: active, merged, abandoned",
|
|
1578
2047
|
enum: ["active", "merged", "abandoned"]
|
|
2048
|
+
},
|
|
2049
|
+
groupBy: {
|
|
2050
|
+
type: "string",
|
|
2051
|
+
description: "Optional grouping mode for the response.",
|
|
2052
|
+
enum: ["campaign", "lane", "flat"]
|
|
2053
|
+
},
|
|
2054
|
+
lane: {
|
|
2055
|
+
type: "string",
|
|
2056
|
+
description: "Filter by GitButler-aligned lane name."
|
|
2057
|
+
},
|
|
2058
|
+
campaign: {
|
|
2059
|
+
type: "number",
|
|
2060
|
+
description: "Filter by top-level pipeline campaign number."
|
|
2061
|
+
},
|
|
2062
|
+
limit: {
|
|
2063
|
+
type: "number",
|
|
2064
|
+
description: "Maximum results to return."
|
|
1579
2065
|
}
|
|
1580
2066
|
},
|
|
1581
2067
|
required: ["topicId"],
|
|
1582
2068
|
response: {
|
|
1583
|
-
description: "Worktrees with phase, status, belief count, and creation time",
|
|
2069
|
+
description: "Worktrees with lifecycle phase, campaign, lane, status, belief count, and creation time",
|
|
1584
2070
|
fields: {
|
|
1585
|
-
worktrees: "array \u2014 { worktreeId, title, phase, status, beliefCount, createdAt }"
|
|
2071
|
+
worktrees: "array \u2014 { worktreeId, title, phase, campaign, lane, laneOrderInCampaign, orderInLane, status, beliefCount, createdAt }"
|
|
1586
2072
|
}
|
|
1587
2073
|
},
|
|
1588
2074
|
ownerModule: "workflow-engine",
|
|
@@ -1591,7 +2077,7 @@ var LIST_WORKTREES = {
|
|
|
1591
2077
|
};
|
|
1592
2078
|
var LIST_ALL_WORKTREES = {
|
|
1593
2079
|
name: "list_all_worktrees",
|
|
1594
|
-
description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with
|
|
2080
|
+
description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with campaign, lane, lane order, dependencies, and status. Supports filtering by status, lane, and campaign. This is the PM's primary pipeline query \u2014 one call, full picture.",
|
|
1595
2081
|
parameters: {
|
|
1596
2082
|
status: {
|
|
1597
2083
|
type: "string",
|
|
@@ -1609,13 +2095,18 @@ var LIST_ALL_WORKTREES = {
|
|
|
1609
2095
|
"dismissed"
|
|
1610
2096
|
]
|
|
1611
2097
|
},
|
|
1612
|
-
|
|
2098
|
+
lane: {
|
|
1613
2099
|
type: "string",
|
|
1614
|
-
description: "Filter by
|
|
2100
|
+
description: "Filter by lane name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
|
|
1615
2101
|
},
|
|
1616
|
-
|
|
2102
|
+
campaign: {
|
|
1617
2103
|
type: "number",
|
|
1618
|
-
description: "Filter by
|
|
2104
|
+
description: "Filter by campaign number (e.g., 1, 2, 3). Returns only worktrees in that campaign."
|
|
2105
|
+
},
|
|
2106
|
+
groupBy: {
|
|
2107
|
+
type: "string",
|
|
2108
|
+
description: "Optional grouping mode for the response.",
|
|
2109
|
+
enum: ["campaign", "lane", "flat"]
|
|
1619
2110
|
},
|
|
1620
2111
|
limit: {
|
|
1621
2112
|
type: "number",
|
|
@@ -1626,10 +2117,39 @@ var LIST_ALL_WORKTREES = {
|
|
|
1626
2117
|
response: {
|
|
1627
2118
|
description: "All worktrees across all topics with full pipeline metadata",
|
|
1628
2119
|
fields: {
|
|
1629
|
-
worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis,
|
|
2120
|
+
worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate, createdAt }",
|
|
1630
2121
|
total: "number \u2014 total count after filtering",
|
|
1631
|
-
|
|
1632
|
-
|
|
2122
|
+
lanes: "object \u2014 { laneName: count } summary of worktrees per lane",
|
|
2123
|
+
campaigns: "object \u2014 { campaignNumber: count } summary of worktrees per campaign"
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
ownerModule: "workflow-engine",
|
|
2127
|
+
ontologyPrimitive: "worktree",
|
|
2128
|
+
tier: "showcase"
|
|
2129
|
+
};
|
|
2130
|
+
var LIST_CAMPAIGNS = {
|
|
2131
|
+
name: "list_campaigns",
|
|
2132
|
+
description: "List compact pipeline campaigns with their nested lanes. Use this to see the top-level campaign > lane > worktree shape without pulling the full worktree inventory.",
|
|
2133
|
+
parameters: {
|
|
2134
|
+
topicId: {
|
|
2135
|
+
type: "string",
|
|
2136
|
+
description: "Optional topic scope."
|
|
2137
|
+
},
|
|
2138
|
+
status: {
|
|
2139
|
+
type: "string",
|
|
2140
|
+
description: "Optional worktree status filter before grouping campaigns and lanes."
|
|
2141
|
+
},
|
|
2142
|
+
limit: {
|
|
2143
|
+
type: "number",
|
|
2144
|
+
description: "Maximum worktrees to scan before grouping."
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
required: [],
|
|
2148
|
+
response: {
|
|
2149
|
+
description: "Pipeline campaigns with nested lane summaries.",
|
|
2150
|
+
fields: {
|
|
2151
|
+
campaigns: "array \u2014 { campaign, lanes: [{ lane, laneOrderInCampaign, worktreeCount, activeCount, readyCount, blockedCount, completedCount, nextWorktree }] }",
|
|
2152
|
+
totalWorktrees: "number \u2014 total worktrees scanned after filtering"
|
|
1633
2153
|
}
|
|
1634
2154
|
},
|
|
1635
2155
|
ownerModule: "workflow-engine",
|
|
@@ -1692,16 +2212,28 @@ var UPDATE_WORKTREE_TARGETS = {
|
|
|
1692
2212
|
};
|
|
1693
2213
|
var UPDATE_WORKTREE_METADATA = {
|
|
1694
2214
|
name: "update_worktree_metadata",
|
|
1695
|
-
description: "Update worktree sequencing metadata \u2014
|
|
2215
|
+
description: "Update worktree sequencing metadata \u2014 campaign, lane, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
|
|
1696
2216
|
parameters: {
|
|
1697
2217
|
worktreeId: { type: "string", description: "The worktree to update" },
|
|
1698
2218
|
hypothesis: {
|
|
1699
2219
|
type: "string",
|
|
1700
2220
|
description: "Testable claim this worktree investigates"
|
|
1701
2221
|
},
|
|
1702
|
-
|
|
2222
|
+
campaign: {
|
|
2223
|
+
type: "number",
|
|
2224
|
+
description: "Top-level pipeline campaign number."
|
|
2225
|
+
},
|
|
2226
|
+
lane: {
|
|
2227
|
+
type: "string",
|
|
2228
|
+
description: "GitButler-aligned workstream lane name inside the campaign."
|
|
2229
|
+
},
|
|
2230
|
+
laneOrderInCampaign: {
|
|
2231
|
+
type: "number",
|
|
2232
|
+
description: "Ordering for this lane within the campaign."
|
|
2233
|
+
},
|
|
2234
|
+
orderInLane: {
|
|
1703
2235
|
type: "number",
|
|
1704
|
-
description: "
|
|
2236
|
+
description: "Position of this worktree inside its lane."
|
|
1705
2237
|
},
|
|
1706
2238
|
dependsOn: {
|
|
1707
2239
|
type: "array",
|
|
@@ -1739,18 +2271,6 @@ var UPDATE_WORKTREE_METADATA = {
|
|
|
1739
2271
|
type: "object",
|
|
1740
2272
|
description: "Calibrated auto-fix policy controlling dry-run vs safe execution, per-run action caps, and permitted mutation tiers."
|
|
1741
2273
|
},
|
|
1742
|
-
track: {
|
|
1743
|
-
type: "string",
|
|
1744
|
-
description: "Parallel workstream name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity', 'execution-program'). Groups worktrees into named lanes for pipeline visualization and PM analysis."
|
|
1745
|
-
},
|
|
1746
|
-
trackPosition: {
|
|
1747
|
-
type: "number",
|
|
1748
|
-
description: "Position within the track (1-indexed). E.g., TC-A=1, TC-B=2, TC-C=3 within the 'tc-scope' track."
|
|
1749
|
-
},
|
|
1750
|
-
executionBand: {
|
|
1751
|
-
type: "number",
|
|
1752
|
-
description: "Parallel execution band number. All worktrees in the same band can run simultaneously. Band 2 = OE-B + TC-A, Band 3 = TC-B + 11D-R + S2-13A, etc."
|
|
1753
|
-
},
|
|
1754
2274
|
status: {
|
|
1755
2275
|
type: "string",
|
|
1756
2276
|
description: "Override the worktree status. Use for lifecycle transitions like marking a worktree superseded, long-term, or as a raw idea.",
|
|
@@ -1807,15 +2327,15 @@ var IDENTITY_WHOAMI = {
|
|
|
1807
2327
|
};
|
|
1808
2328
|
var COMPILE_CONTEXT = {
|
|
1809
2329
|
name: "compile_context",
|
|
1810
|
-
description: "Compile a focused reasoning context
|
|
2330
|
+
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.",
|
|
1811
2331
|
parameters: {
|
|
1812
2332
|
topicId: {
|
|
1813
2333
|
type: "string",
|
|
1814
|
-
description: "
|
|
2334
|
+
description: "Optional topic scope ID. Omit to resolve the topic from query."
|
|
1815
2335
|
},
|
|
1816
2336
|
query: {
|
|
1817
2337
|
type: "string",
|
|
1818
|
-
description: "
|
|
2338
|
+
description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
|
|
1819
2339
|
},
|
|
1820
2340
|
budget: {
|
|
1821
2341
|
type: "number",
|
|
@@ -1839,7 +2359,7 @@ var COMPILE_CONTEXT = {
|
|
|
1839
2359
|
description: "Include related ontological entities in the compiled result"
|
|
1840
2360
|
}
|
|
1841
2361
|
},
|
|
1842
|
-
required: [
|
|
2362
|
+
required: [],
|
|
1843
2363
|
response: {
|
|
1844
2364
|
description: "Compiled context pack for the requested topic",
|
|
1845
2365
|
fields: {
|
|
@@ -2013,18 +2533,60 @@ var CREATE_TASK = {
|
|
|
2013
2533
|
name: "create_task",
|
|
2014
2534
|
description: "Create an execution task tied to the reasoning state. Like `git task` \u2014 tracks concrete work items (calls to make, data to gather, analyses to run) linked to questions, beliefs, or worktrees.",
|
|
2015
2535
|
parameters: {
|
|
2016
|
-
title: { type: "string", description: "Task
|
|
2536
|
+
title: { type: "string", description: "Task title" },
|
|
2017
2537
|
topicId: { type: "string", description: "Topic scope" },
|
|
2538
|
+
description: {
|
|
2539
|
+
type: "string",
|
|
2540
|
+
description: "Long-form task description"
|
|
2541
|
+
},
|
|
2018
2542
|
taskType: {
|
|
2019
2543
|
type: "string",
|
|
2020
|
-
description: "
|
|
2021
|
-
enum: [
|
|
2544
|
+
description: "Task taxonomy",
|
|
2545
|
+
enum: [
|
|
2546
|
+
"general",
|
|
2547
|
+
"find_evidence",
|
|
2548
|
+
"verify_claim",
|
|
2549
|
+
"research",
|
|
2550
|
+
"review",
|
|
2551
|
+
"interview",
|
|
2552
|
+
"analysis",
|
|
2553
|
+
"track_metrics"
|
|
2554
|
+
]
|
|
2555
|
+
},
|
|
2556
|
+
priority: {
|
|
2557
|
+
type: "string",
|
|
2558
|
+
description: "Priority",
|
|
2559
|
+
enum: ["urgent", "high", "medium", "low"]
|
|
2560
|
+
},
|
|
2561
|
+
status: {
|
|
2562
|
+
type: "string",
|
|
2563
|
+
description: "Initial status (defaults to todo)",
|
|
2564
|
+
enum: ["todo", "in_progress", "blocked", "done"]
|
|
2565
|
+
},
|
|
2566
|
+
linkedWorktreeId: {
|
|
2567
|
+
type: "string",
|
|
2568
|
+
description: "Worktree this task belongs to"
|
|
2569
|
+
},
|
|
2570
|
+
linkedBeliefId: {
|
|
2571
|
+
type: "string",
|
|
2572
|
+
description: "Belief this task supports"
|
|
2022
2573
|
},
|
|
2023
2574
|
linkedQuestionId: {
|
|
2024
2575
|
type: "string",
|
|
2025
2576
|
description: "Question this task addresses"
|
|
2026
2577
|
},
|
|
2027
|
-
|
|
2578
|
+
assigneeId: {
|
|
2579
|
+
type: "string",
|
|
2580
|
+
description: "Principal assigned to the task"
|
|
2581
|
+
},
|
|
2582
|
+
dueDate: {
|
|
2583
|
+
type: "number",
|
|
2584
|
+
description: "Due date as epoch milliseconds"
|
|
2585
|
+
},
|
|
2586
|
+
tags: {
|
|
2587
|
+
type: "array",
|
|
2588
|
+
description: "Free-form string tags"
|
|
2589
|
+
}
|
|
2028
2590
|
},
|
|
2029
2591
|
required: ["title"],
|
|
2030
2592
|
response: {
|
|
@@ -2120,6 +2682,10 @@ var LIST_TASKS = {
|
|
|
2120
2682
|
type: "string",
|
|
2121
2683
|
description: "Filter to tasks linked to this worktree"
|
|
2122
2684
|
},
|
|
2685
|
+
worktreeId: {
|
|
2686
|
+
type: "string",
|
|
2687
|
+
description: "Alias for linkedWorktreeId"
|
|
2688
|
+
},
|
|
2123
2689
|
status: {
|
|
2124
2690
|
type: "string",
|
|
2125
2691
|
description: "Filter by status: todo, in_progress, blocked, done",
|
|
@@ -2140,6 +2706,10 @@ var CREATE_TOPIC = {
|
|
|
2140
2706
|
name: "create_topic",
|
|
2141
2707
|
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.",
|
|
2142
2708
|
parameters: {
|
|
2709
|
+
globalId: {
|
|
2710
|
+
type: "string",
|
|
2711
|
+
description: "Optional idempotent topic global ID"
|
|
2712
|
+
},
|
|
2143
2713
|
name: { type: "string", description: "Topic name" },
|
|
2144
2714
|
type: {
|
|
2145
2715
|
type: "string",
|
|
@@ -2150,6 +2720,18 @@ var CREATE_TOPIC = {
|
|
|
2150
2720
|
type: "string",
|
|
2151
2721
|
description: "Optional parent topic for nesting"
|
|
2152
2722
|
},
|
|
2723
|
+
parentTopicGlobalId: {
|
|
2724
|
+
type: "string",
|
|
2725
|
+
description: "Optional parent topic global ID for nesting"
|
|
2726
|
+
},
|
|
2727
|
+
tenantId: { type: "string", description: "Optional tenant scope" },
|
|
2728
|
+
workspaceId: { type: "string", description: "Optional workspace scope" },
|
|
2729
|
+
visibility: {
|
|
2730
|
+
type: "string",
|
|
2731
|
+
description: "Topic visibility",
|
|
2732
|
+
enum: ["private", "team", "firm", "external", "public"]
|
|
2733
|
+
},
|
|
2734
|
+
metadata: { type: "object", description: "Optional topic metadata" },
|
|
2153
2735
|
createdBy: { type: "string", description: "Who created this topic" }
|
|
2154
2736
|
},
|
|
2155
2737
|
required: ["name", "type"],
|
|
@@ -2158,6 +2740,9 @@ var CREATE_TOPIC = {
|
|
|
2158
2740
|
fields: {
|
|
2159
2741
|
id: "string \u2014 topic ID",
|
|
2160
2742
|
globalId: "string \u2014 globally unique ID",
|
|
2743
|
+
topicGlobalId: "string \u2014 topic global ID",
|
|
2744
|
+
epistemicNodeId: "string \u2014 materialized topic node ID",
|
|
2745
|
+
epistemicNodeGlobalId: "string \u2014 materialized topic node global ID",
|
|
2161
2746
|
depth: "number \u2014 nesting depth"
|
|
2162
2747
|
}
|
|
2163
2748
|
},
|
|
@@ -2207,7 +2792,7 @@ var GET_TOPIC = {
|
|
|
2207
2792
|
description: "Legacy alias for topicId"
|
|
2208
2793
|
}
|
|
2209
2794
|
},
|
|
2210
|
-
required: [],
|
|
2795
|
+
required: ["topicId"],
|
|
2211
2796
|
response: {
|
|
2212
2797
|
description: "Single topic record",
|
|
2213
2798
|
fields: {
|
|
@@ -2288,6 +2873,65 @@ var GET_TOPIC_TREE = {
|
|
|
2288
2873
|
ontologyPrimitive: "graph",
|
|
2289
2874
|
tier: "workhorse"
|
|
2290
2875
|
};
|
|
2876
|
+
var MATERIALIZE_TOPIC_GRAPH = {
|
|
2877
|
+
name: "materialize_topic_graph",
|
|
2878
|
+
description: "Backfill the topic graph spine. Like `git fsck --connectivity-only` with repair enabled \u2014 creates missing topic nodes and parent-child edges idempotently.",
|
|
2879
|
+
parameters: {
|
|
2880
|
+
rootTopicId: {
|
|
2881
|
+
type: "string",
|
|
2882
|
+
description: "Optional root topic for a bounded materialization pass"
|
|
2883
|
+
},
|
|
2884
|
+
dryRun: {
|
|
2885
|
+
type: "boolean",
|
|
2886
|
+
description: "When true, report missing rows without writing them"
|
|
2887
|
+
}
|
|
2888
|
+
},
|
|
2889
|
+
required: [],
|
|
2890
|
+
response: {
|
|
2891
|
+
description: "Topic graph materialization counts",
|
|
2892
|
+
fields: {
|
|
2893
|
+
topicsSeen: "number",
|
|
2894
|
+
nodesCreated: "number",
|
|
2895
|
+
nodesExisting: "number",
|
|
2896
|
+
edgesCreated: "number",
|
|
2897
|
+
edgesExisting: "number",
|
|
2898
|
+
errors: "array"
|
|
2899
|
+
}
|
|
2900
|
+
},
|
|
2901
|
+
ownerModule: "reasoning-kernel",
|
|
2902
|
+
ontologyPrimitive: "graph",
|
|
2903
|
+
tier: "workhorse"
|
|
2904
|
+
};
|
|
2905
|
+
var GET_TOPIC_GRAPH_SPINE = {
|
|
2906
|
+
name: "get_topic_graph_spine",
|
|
2907
|
+
description: "Verify the topic graph spine. Like `git fsck` \u2014 reads topics, materialized topic nodes, parent-child edges, and missing spine rows.",
|
|
2908
|
+
parameters: {
|
|
2909
|
+
rootTopicId: {
|
|
2910
|
+
type: "string",
|
|
2911
|
+
description: "Optional root topic for a bounded verifier pass"
|
|
2912
|
+
},
|
|
2913
|
+
includeTopicBeliefEdges: {
|
|
2914
|
+
type: "boolean",
|
|
2915
|
+
description: "Include topic -> belief edges in the verifier payload"
|
|
2916
|
+
}
|
|
2917
|
+
},
|
|
2918
|
+
required: [],
|
|
2919
|
+
response: {
|
|
2920
|
+
description: "Topic graph spine verification payload",
|
|
2921
|
+
fields: {
|
|
2922
|
+
ok: "boolean",
|
|
2923
|
+
counts: "object",
|
|
2924
|
+
topics: "array",
|
|
2925
|
+
topicNodes: "array",
|
|
2926
|
+
parentEdges: "array",
|
|
2927
|
+
missingTopicNodes: "array",
|
|
2928
|
+
missingParentEdges: "array"
|
|
2929
|
+
}
|
|
2930
|
+
},
|
|
2931
|
+
ownerModule: "reasoning-kernel",
|
|
2932
|
+
ontologyPrimitive: "graph",
|
|
2933
|
+
tier: "workhorse"
|
|
2934
|
+
};
|
|
2291
2935
|
var GET_CODE_CONTEXT = {
|
|
2292
2936
|
name: "get_code_context",
|
|
2293
2937
|
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.",
|
|
@@ -2562,7 +3206,7 @@ var GET_ONTOLOGY = {
|
|
|
2562
3206
|
description: "Tenant scope for key lookup. Omit for platform-level."
|
|
2563
3207
|
}
|
|
2564
3208
|
},
|
|
2565
|
-
required: [],
|
|
3209
|
+
required: ["id"],
|
|
2566
3210
|
response: {
|
|
2567
3211
|
description: "Ontology definition with latest published version",
|
|
2568
3212
|
fields: {
|
|
@@ -2629,7 +3273,7 @@ var MATCH_ENTITY_TYPE = {
|
|
|
2629
3273
|
description: "Optional maximum number of ranked matches to return"
|
|
2630
3274
|
}
|
|
2631
3275
|
},
|
|
2632
|
-
required: ["text"],
|
|
3276
|
+
required: ["text", "ontologyId"],
|
|
2633
3277
|
response: {
|
|
2634
3278
|
description: "Ranked ontology entity type matches",
|
|
2635
3279
|
fields: {
|
|
@@ -2883,7 +3527,7 @@ var RECORD_SCOPE_LEARNING = {
|
|
|
2883
3527
|
};
|
|
2884
3528
|
var PIPELINE_SNAPSHOT = {
|
|
2885
3529
|
name: "pipeline_snapshot",
|
|
2886
|
-
description: "Summarize a topic's worktree pipeline in
|
|
3530
|
+
description: "Summarize a topic's worktree pipeline in campaign-and-lane form. Like `git status --short` for Lucern execution \u2014 returns the hinge worktree, next planned wave, blockers, critical path, superseded work, and graph hygiene debt.",
|
|
2887
3531
|
parameters: {
|
|
2888
3532
|
topicId: { type: "string", description: "Topic scope ID" }
|
|
2889
3533
|
},
|
|
@@ -2893,14 +3537,14 @@ var PIPELINE_SNAPSHOT = {
|
|
|
2893
3537
|
fields: {
|
|
2894
3538
|
topicId: "string",
|
|
2895
3539
|
topicName: "string",
|
|
2896
|
-
|
|
2897
|
-
|
|
3540
|
+
currentCampaign: "number | null",
|
|
3541
|
+
nextCampaign: "number | null",
|
|
2898
3542
|
activeWorktrees: "array \u2014 current hinge worktree(s)",
|
|
2899
|
-
nextWave: "array \u2014 worktrees in the next planned
|
|
3543
|
+
nextWave: "array \u2014 worktrees in the next planned campaign",
|
|
2900
3544
|
readyNow: "array \u2014 planning worktrees with dependencies completed",
|
|
2901
3545
|
blockedBy: "array \u2014 grouped blockers",
|
|
2902
3546
|
criticalPath: "array \u2014 ordered incomplete worktree chain",
|
|
2903
|
-
|
|
3547
|
+
campaigns: "array \u2014 incomplete worktrees grouped by campaign",
|
|
2904
3548
|
superseded: "array \u2014 worktrees marked superseded or not for activation",
|
|
2905
3549
|
graphHygiene: "object \u2014 untargeted and taskless worktree debt",
|
|
2906
3550
|
riskQuestions: "array \u2014 critical/high open questions",
|
|
@@ -3420,6 +4064,69 @@ var GENERATE_SESSION_HANDOFF = {
|
|
|
3420
4064
|
tier: "showcase",
|
|
3421
4065
|
internal: true
|
|
3422
4066
|
};
|
|
4067
|
+
var BEGIN_BUILD_SESSION = {
|
|
4068
|
+
name: "begin_build_session",
|
|
4069
|
+
description: "Bootstrap a coding build session for a Lucern worktree. Like `git worktree add` plus `git status` \u2014 returns the compact context packet an agent needs before editing.",
|
|
4070
|
+
parameters: {
|
|
4071
|
+
worktreeId: {
|
|
4072
|
+
type: "string",
|
|
4073
|
+
description: "The Lucern worktree ID to bootstrap."
|
|
4074
|
+
},
|
|
4075
|
+
branch: {
|
|
4076
|
+
type: "string",
|
|
4077
|
+
description: "Optional git branch name. Auto-generated from the worktree name when omitted."
|
|
4078
|
+
},
|
|
4079
|
+
branchBase: {
|
|
4080
|
+
type: "string",
|
|
4081
|
+
description: 'Base branch for the feature branch. Default: "staging".'
|
|
4082
|
+
},
|
|
4083
|
+
prBase: {
|
|
4084
|
+
type: "string",
|
|
4085
|
+
description: 'Target branch for the PR. Default: "staging".'
|
|
4086
|
+
},
|
|
4087
|
+
sessionMode: {
|
|
4088
|
+
type: "string",
|
|
4089
|
+
description: 'Session mode: "async" for Codex/headless or "interactive" for live sessions.',
|
|
4090
|
+
enum: ["async", "interactive"]
|
|
4091
|
+
},
|
|
4092
|
+
activateIfPlanning: {
|
|
4093
|
+
type: "boolean",
|
|
4094
|
+
description: "When true, automatically activate a planning worktree during bootstrap."
|
|
4095
|
+
}
|
|
4096
|
+
},
|
|
4097
|
+
required: ["worktreeId"],
|
|
4098
|
+
response: {
|
|
4099
|
+
description: "A compact build-session packet with worktree metadata, graph anchors, questions, dependencies, and git defaults.",
|
|
4100
|
+
fields: {
|
|
4101
|
+
topicId: "string \u2014 canonical topic scope",
|
|
4102
|
+
topicName: "string \u2014 human-readable topic name",
|
|
4103
|
+
worktreeId: "string \u2014 worktree ID",
|
|
4104
|
+
worktreeName: "string \u2014 human-readable worktree name",
|
|
4105
|
+
branch: "string \u2014 git branch name",
|
|
4106
|
+
branchBase: "string \u2014 base branch",
|
|
4107
|
+
prBase: "string \u2014 PR target branch",
|
|
4108
|
+
campaign: "number | null \u2014 top-level pipeline campaign",
|
|
4109
|
+
lane: "string \u2014 campaign lane",
|
|
4110
|
+
gate: "string \u2014 exit gate",
|
|
4111
|
+
hypothesis: "string \u2014 worktree hypothesis",
|
|
4112
|
+
focus: "string \u2014 session focus",
|
|
4113
|
+
status: "string \u2014 worktree status after optional activation",
|
|
4114
|
+
sessionMode: "string \u2014 async | interactive",
|
|
4115
|
+
targetBeliefIds: "array \u2014 scoped belief IDs",
|
|
4116
|
+
targetQuestionIds: "array \u2014 scoped question IDs",
|
|
4117
|
+
topBeliefs: "array \u2014 highest-confidence scoped beliefs",
|
|
4118
|
+
openQuestions: "array \u2014 open scoped questions",
|
|
4119
|
+
resolvedDecisions: "array \u2014 answered questions summarized for the session",
|
|
4120
|
+
dependencies: "array \u2014 upstream worktrees",
|
|
4121
|
+
unblocks: "array \u2014 downstream worktrees",
|
|
4122
|
+
mergeOrderNotes: "string \u2014 merge ordering advisory"
|
|
4123
|
+
}
|
|
4124
|
+
},
|
|
4125
|
+
ownerModule: "bootstrap",
|
|
4126
|
+
ontologyPrimitive: "worktree",
|
|
4127
|
+
tier: "showcase",
|
|
4128
|
+
internal: true
|
|
4129
|
+
};
|
|
3423
4130
|
var MCP_TOOL_CONTRACTS = {
|
|
3424
4131
|
// Belief lifecycle (commit, amend, fork, archive)
|
|
3425
4132
|
create_belief: CREATE_BELIEF,
|
|
@@ -3462,11 +4169,26 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3462
4169
|
bisect_confidence: BISECT_CONFIDENCE,
|
|
3463
4170
|
// Edges (commit)
|
|
3464
4171
|
create_edge: CREATE_EDGE,
|
|
4172
|
+
update_edge: UPDATE_EDGE,
|
|
4173
|
+
remove_edge: REMOVE_EDGE,
|
|
4174
|
+
remove_edges_between: REMOVE_EDGES_BETWEEN,
|
|
4175
|
+
batch_create_edges: BATCH_CREATE_EDGES,
|
|
4176
|
+
// Epistemic node spine (commit/amend/show)
|
|
4177
|
+
create_epistemic_node: CREATE_EPISTEMIC_NODE,
|
|
4178
|
+
get_epistemic_node: GET_EPISTEMIC_NODE,
|
|
4179
|
+
list_epistemic_nodes: LIST_EPISTEMIC_NODES,
|
|
4180
|
+
update_epistemic_node: UPDATE_EPISTEMIC_NODE,
|
|
4181
|
+
archive_epistemic_node: ARCHIVE_EPISTEMIC_NODE,
|
|
4182
|
+
verify_epistemic_node: VERIFY_EPISTEMIC_NODE,
|
|
4183
|
+
supersede_epistemic_node: SUPERSEDE_EPISTEMIC_NODE,
|
|
4184
|
+
batch_create_epistemic_nodes: BATCH_CREATE_EPISTEMIC_NODES,
|
|
3465
4185
|
// Judgments (tag)
|
|
3466
4186
|
record_judgment: RECORD_JUDGMENT,
|
|
3467
4187
|
// Graph intelligence (showcase)
|
|
3468
4188
|
detect_confirmation_bias: DETECT_CONFIRMATION_BIAS,
|
|
3469
4189
|
get_graph_structure_analysis: GET_GRAPH_STRUCTURE_ANALYSIS,
|
|
4190
|
+
list_graph_intelligence_queries: LIST_GRAPH_INTELLIGENCE_QUERIES,
|
|
4191
|
+
run_graph_intelligence_query: RUN_GRAPH_INTELLIGENCE_QUERY,
|
|
3470
4192
|
get_falsification_questions: GET_FALSIFICATION_QUESTIONS,
|
|
3471
4193
|
// Evidence operations (workhorse)
|
|
3472
4194
|
search_evidence: SEARCH_EVIDENCE,
|
|
@@ -3489,6 +4211,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3489
4211
|
list_beliefs: LIST_BELIEFS,
|
|
3490
4212
|
list_worktrees: LIST_WORKTREES,
|
|
3491
4213
|
list_all_worktrees: LIST_ALL_WORKTREES,
|
|
4214
|
+
list_campaigns: LIST_CAMPAIGNS,
|
|
3492
4215
|
activate_worktree: ACTIVATE_WORKTREE,
|
|
3493
4216
|
update_worktree_targets: UPDATE_WORKTREE_TARGETS,
|
|
3494
4217
|
update_worktree_metadata: UPDATE_WORKTREE_METADATA,
|
|
@@ -3512,6 +4235,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3512
4235
|
get_agent_inbox: GET_AGENT_INBOX,
|
|
3513
4236
|
claim_files: CLAIM_FILES,
|
|
3514
4237
|
generate_session_handoff: GENERATE_SESSION_HANDOFF,
|
|
4238
|
+
begin_build_session: BEGIN_BUILD_SESSION,
|
|
3515
4239
|
// Policy / ACL (workhorse)
|
|
3516
4240
|
check_permission: CHECK_PERMISSION,
|
|
3517
4241
|
filter_by_permission: FILTER_BY_PERMISSION,
|
|
@@ -3531,6 +4255,8 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
3531
4255
|
get_topic: GET_TOPIC,
|
|
3532
4256
|
update_topic: UPDATE_TOPIC,
|
|
3533
4257
|
get_topic_tree: GET_TOPIC_TREE,
|
|
4258
|
+
materialize_topic_graph: MATERIALIZE_TOPIC_GRAPH,
|
|
4259
|
+
get_topic_graph_spine: GET_TOPIC_GRAPH_SPINE,
|
|
3534
4260
|
// Coding intelligence (code-grounded knowledge)
|
|
3535
4261
|
get_code_context: GET_CODE_CONTEXT,
|
|
3536
4262
|
get_change_history: GET_CHANGE_HISTORY,
|
|
@@ -3635,18 +4361,34 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
3635
4361
|
"find_missing_questions",
|
|
3636
4362
|
"get_high_priority_questions",
|
|
3637
4363
|
"get_falsification_questions",
|
|
4364
|
+
"create_epistemic_node",
|
|
4365
|
+
"get_epistemic_node",
|
|
4366
|
+
"list_epistemic_nodes",
|
|
4367
|
+
"update_epistemic_node",
|
|
4368
|
+
"archive_epistemic_node",
|
|
4369
|
+
"verify_epistemic_node",
|
|
4370
|
+
"supersede_epistemic_node",
|
|
4371
|
+
"batch_create_epistemic_nodes",
|
|
3638
4372
|
"create_topic",
|
|
3639
4373
|
"get_topic",
|
|
3640
4374
|
"list_topics",
|
|
3641
4375
|
"update_topic",
|
|
3642
|
-
"get_topic_tree"
|
|
4376
|
+
"get_topic_tree",
|
|
4377
|
+
"materialize_topic_graph",
|
|
4378
|
+
"get_topic_graph_spine"
|
|
3643
4379
|
];
|
|
3644
4380
|
var MCP_ANALYSIS_PLATFORM_OPERATION_NAMES = [
|
|
3645
4381
|
"create_edge",
|
|
4382
|
+
"update_edge",
|
|
4383
|
+
"remove_edge",
|
|
4384
|
+
"remove_edges_between",
|
|
4385
|
+
"batch_create_edges",
|
|
3646
4386
|
"query_lineage",
|
|
3647
4387
|
"traverse_graph",
|
|
3648
4388
|
"get_graph_neighborhood",
|
|
3649
4389
|
"get_graph_structure_analysis",
|
|
4390
|
+
"list_graph_intelligence_queries",
|
|
4391
|
+
"run_graph_intelligence_query",
|
|
3650
4392
|
"find_contradictions",
|
|
3651
4393
|
"flag_contradiction",
|
|
3652
4394
|
"detect_confirmation_bias",
|
|
@@ -3671,6 +4413,7 @@ var MCP_WORKFLOW_PLATFORM_OPERATION_NAMES = [
|
|
|
3671
4413
|
"activate_worktree",
|
|
3672
4414
|
"list_worktrees",
|
|
3673
4415
|
"list_all_worktrees",
|
|
4416
|
+
"list_campaigns",
|
|
3674
4417
|
"update_worktree_targets",
|
|
3675
4418
|
"update_worktree_metadata",
|
|
3676
4419
|
"create_task",
|
|
@@ -3724,6 +4467,7 @@ var PLATFORM_INTERNAL_OPERATION_NAMES = [
|
|
|
3724
4467
|
"get_change_history",
|
|
3725
4468
|
"get_failure_log",
|
|
3726
4469
|
"record_attempt",
|
|
4470
|
+
"begin_build_session",
|
|
3727
4471
|
"push",
|
|
3728
4472
|
"open_pull_request",
|
|
3729
4473
|
"record_judgment",
|
|
@@ -3778,7 +4522,6 @@ var SDK_ONLY_OPERATION_NAMES = [
|
|
|
3778
4522
|
"find_semantic_orphans"
|
|
3779
4523
|
];
|
|
3780
4524
|
var MCP_ONLY_INTERNAL_OPERATION_NAMES = [
|
|
3781
|
-
"begin_build_session",
|
|
3782
4525
|
"evaluate_engineering_contract",
|
|
3783
4526
|
"evaluate_research_contract"
|
|
3784
4527
|
];
|
|
@@ -3878,6 +4621,7 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
3878
4621
|
|
|
3879
4622
|
// src/function-registry/helpers.ts
|
|
3880
4623
|
var jsonObjectSchema = z.record(z.unknown());
|
|
4624
|
+
var sdkSessionIdSchema = z.string().optional();
|
|
3881
4625
|
function mcpContractShape(contract) {
|
|
3882
4626
|
const required = new Set(contract.required);
|
|
3883
4627
|
return Object.fromEntries(
|
|
@@ -3912,10 +4656,40 @@ function argsSchemaFromMcpContract(contract) {
|
|
|
3912
4656
|
return z.object(mcpContractShape(contract));
|
|
3913
4657
|
}
|
|
3914
4658
|
function inputSchemaFromMcpContract(contract) {
|
|
3915
|
-
return argsSchemaFromMcpContract(contract)
|
|
4659
|
+
return withInternalSurfaceFields(argsSchemaFromMcpContract(contract));
|
|
4660
|
+
}
|
|
4661
|
+
function withInternalSurfaceFields(schema) {
|
|
4662
|
+
return schema.extend({ __sdkSessionId: sdkSessionIdSchema }).strict();
|
|
4663
|
+
}
|
|
4664
|
+
function normalizeInputSchema(schema) {
|
|
4665
|
+
if (schema instanceof z.ZodObject) {
|
|
4666
|
+
return withInternalSurfaceFields(schema);
|
|
4667
|
+
}
|
|
4668
|
+
return schema;
|
|
4669
|
+
}
|
|
4670
|
+
function unwrapObjectSchema(schema) {
|
|
4671
|
+
let current = schema;
|
|
4672
|
+
while (true) {
|
|
4673
|
+
switch (current._def.typeName) {
|
|
4674
|
+
case z.ZodFirstPartyTypeKind.ZodEffects:
|
|
4675
|
+
current = current._def.schema;
|
|
4676
|
+
continue;
|
|
4677
|
+
case z.ZodFirstPartyTypeKind.ZodBranded:
|
|
4678
|
+
current = current._def.type;
|
|
4679
|
+
continue;
|
|
4680
|
+
default:
|
|
4681
|
+
return current instanceof z.ZodObject ? current : void 0;
|
|
4682
|
+
}
|
|
4683
|
+
}
|
|
3916
4684
|
}
|
|
3917
4685
|
function getObjectShape(schema) {
|
|
3918
|
-
const
|
|
4686
|
+
const objectSchema = unwrapObjectSchema(schema);
|
|
4687
|
+
if (!objectSchema) {
|
|
4688
|
+
throw new Error(
|
|
4689
|
+
`Expected a Zod object schema, received ${schema._def.typeName}.`
|
|
4690
|
+
);
|
|
4691
|
+
}
|
|
4692
|
+
const shape = typeof objectSchema._def.shape === "function" ? objectSchema._def.shape() : objectSchema._def.shape;
|
|
3919
4693
|
return shape;
|
|
3920
4694
|
}
|
|
3921
4695
|
function unwrapMcpParameterSchema(schema) {
|
|
@@ -3936,6 +4710,9 @@ function unwrapMcpParameterSchema(schema) {
|
|
|
3936
4710
|
case z.ZodFirstPartyTypeKind.ZodBranded:
|
|
3937
4711
|
current = current._def.type;
|
|
3938
4712
|
continue;
|
|
4713
|
+
case z.ZodFirstPartyTypeKind.ZodEffects:
|
|
4714
|
+
current = current._def.schema;
|
|
4715
|
+
continue;
|
|
3939
4716
|
default:
|
|
3940
4717
|
return { schema: current, required, description: description ?? current.description };
|
|
3941
4718
|
}
|
|
@@ -3955,6 +4732,7 @@ function mcpParameterFromZod(fieldName, schema, contractName) {
|
|
|
3955
4732
|
return { parameter: { type: "array", description }, required };
|
|
3956
4733
|
case z.ZodFirstPartyTypeKind.ZodObject:
|
|
3957
4734
|
case z.ZodFirstPartyTypeKind.ZodRecord:
|
|
4735
|
+
case z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
|
|
3958
4736
|
return { parameter: { type: "object", description }, required };
|
|
3959
4737
|
case z.ZodFirstPartyTypeKind.ZodEnum:
|
|
3960
4738
|
return {
|
|
@@ -3998,9 +4776,7 @@ function mcpContractFromArgsSchema(base, args, contractName) {
|
|
|
3998
4776
|
required: converted.filter(([, field]) => field.required).map(([fieldName]) => fieldName)
|
|
3999
4777
|
};
|
|
4000
4778
|
}
|
|
4001
|
-
|
|
4002
|
-
return contract;
|
|
4003
|
-
}
|
|
4779
|
+
var defineFunctionContract = (contract) => contract;
|
|
4004
4780
|
function authUserId(context) {
|
|
4005
4781
|
return context.userId ?? context.principalId ?? "lucern-agent";
|
|
4006
4782
|
}
|
|
@@ -4010,6 +4786,11 @@ function withCreatedBy(input, context) {
|
|
|
4010
4786
|
createdBy: typeof input.createdBy === "string" ? input.createdBy : authUserId(context)
|
|
4011
4787
|
};
|
|
4012
4788
|
}
|
|
4789
|
+
function compactRecord(input) {
|
|
4790
|
+
return Object.fromEntries(
|
|
4791
|
+
Object.entries(input).filter(([, value]) => value !== void 0)
|
|
4792
|
+
);
|
|
4793
|
+
}
|
|
4013
4794
|
function surfaceMcpContract(name) {
|
|
4014
4795
|
const contract = MCP_TOOL_CONTRACTS[name];
|
|
4015
4796
|
if (!contract) {
|
|
@@ -4054,7 +4835,9 @@ function surfaceContract(args) {
|
|
|
4054
4835
|
const canonicalArgs = args.args ?? argsSchemaFromMcpContract(baseMcp);
|
|
4055
4836
|
const mcp = args.args ? mcpContractFromArgsSchema(baseMcp, canonicalArgs, args.name) : baseMcp;
|
|
4056
4837
|
const canonicalReturns = args.returns ?? jsonObjectSchema;
|
|
4057
|
-
const input =
|
|
4838
|
+
const input = normalizeInputSchema(
|
|
4839
|
+
args.input ?? inputSchemaFromMcpContract(mcp)
|
|
4840
|
+
);
|
|
4058
4841
|
const output = args.output ?? canonicalReturns;
|
|
4059
4842
|
return defineFunctionContract({
|
|
4060
4843
|
name: args.name,
|
|
@@ -4098,7 +4881,167 @@ function surfaceContract(args) {
|
|
|
4098
4881
|
});
|
|
4099
4882
|
}
|
|
4100
4883
|
|
|
4884
|
+
// src/schema-helpers/spine/tables/epistemicNodes.ts
|
|
4885
|
+
var NODE_TYPES = [
|
|
4886
|
+
"decision",
|
|
4887
|
+
"belief",
|
|
4888
|
+
"question",
|
|
4889
|
+
"theme",
|
|
4890
|
+
"deal",
|
|
4891
|
+
"topic",
|
|
4892
|
+
"claim",
|
|
4893
|
+
"evidence",
|
|
4894
|
+
"synthesis",
|
|
4895
|
+
"answer",
|
|
4896
|
+
"atomic_fact",
|
|
4897
|
+
"excerpt",
|
|
4898
|
+
"source",
|
|
4899
|
+
"company",
|
|
4900
|
+
"person",
|
|
4901
|
+
"investor",
|
|
4902
|
+
"function",
|
|
4903
|
+
"value_chain"
|
|
4904
|
+
];
|
|
4905
|
+
new Set(NODE_TYPES);
|
|
4906
|
+
|
|
4907
|
+
// src/types/graph-ref.ts
|
|
4908
|
+
var GRAPH_REF_EXTRA_NODE_TYPES = [
|
|
4909
|
+
"edge",
|
|
4910
|
+
"ontology",
|
|
4911
|
+
"lens",
|
|
4912
|
+
"contradiction"
|
|
4913
|
+
];
|
|
4914
|
+
var GRAPH_REF_NODE_TYPES = [
|
|
4915
|
+
...NODE_TYPES,
|
|
4916
|
+
...GRAPH_REF_EXTRA_NODE_TYPES
|
|
4917
|
+
];
|
|
4918
|
+
var EpistemicNodeTypeSchema = z.enum(
|
|
4919
|
+
GRAPH_REF_NODE_TYPES
|
|
4920
|
+
);
|
|
4921
|
+
var GraphRefSchema = z.discriminatedUnion("kind", [
|
|
4922
|
+
z.object({
|
|
4923
|
+
kind: z.literal("epistemic_node"),
|
|
4924
|
+
nodeId: z.string(),
|
|
4925
|
+
nodeType: EpistemicNodeTypeSchema
|
|
4926
|
+
}),
|
|
4927
|
+
z.object({
|
|
4928
|
+
kind: z.literal("external_belief"),
|
|
4929
|
+
ref: z.object({
|
|
4930
|
+
tenantId: z.string(),
|
|
4931
|
+
beliefId: z.string()
|
|
4932
|
+
})
|
|
4933
|
+
})
|
|
4934
|
+
]);
|
|
4935
|
+
|
|
4936
|
+
// src/manifests/edge-policy-manifest.ts
|
|
4937
|
+
var graphRefKind = z.enum(["epistemic_node", "external_belief"]);
|
|
4938
|
+
var EdgePolicyEntrySchema = z.object({
|
|
4939
|
+
edgeType: z.string(),
|
|
4940
|
+
fromKinds: z.array(graphRefKind),
|
|
4941
|
+
fromNodeTypes: z.array(EpistemicNodeTypeSchema).optional(),
|
|
4942
|
+
toKinds: z.array(graphRefKind),
|
|
4943
|
+
toNodeTypes: z.array(EpistemicNodeTypeSchema).optional(),
|
|
4944
|
+
description: z.string()
|
|
4945
|
+
});
|
|
4946
|
+
z.object({
|
|
4947
|
+
manifestVersion: z.literal("1.0.0"),
|
|
4948
|
+
policies: z.array(EdgePolicyEntrySchema)
|
|
4949
|
+
});
|
|
4950
|
+
function findEdgePolicy(manifest, edgeType) {
|
|
4951
|
+
return manifest.policies.find((policy) => policy.edgeType === edgeType);
|
|
4952
|
+
}
|
|
4953
|
+
function nodeTypeAllowed(allowed, ref) {
|
|
4954
|
+
return ref.kind !== "epistemic_node" || !allowed || allowed.includes(ref.nodeType);
|
|
4955
|
+
}
|
|
4956
|
+
function assertEdgePolicyAllowed(manifest, edgeType, from, to) {
|
|
4957
|
+
const policy = findEdgePolicy(manifest, edgeType);
|
|
4958
|
+
const allowed = Boolean(policy) && policy.fromKinds.includes(from.kind) && policy.toKinds.includes(to.kind) && nodeTypeAllowed(policy.fromNodeTypes, from) && nodeTypeAllowed(policy.toNodeTypes, to);
|
|
4959
|
+
if (!allowed) {
|
|
4960
|
+
const error = new Error(
|
|
4961
|
+
`Edge policy violation for ${edgeType}: ${from.kind} -> ${to.kind}`
|
|
4962
|
+
);
|
|
4963
|
+
error.code = "POLICY_VIOLATION";
|
|
4964
|
+
error.details = { code: "POLICY_VIOLATION", edgeType, from, to };
|
|
4965
|
+
throw error;
|
|
4966
|
+
}
|
|
4967
|
+
}
|
|
4968
|
+
z.enum(["decision", "belief", "question", "theme", "deal", "topic", "claim", "evidence", "synthesis", "answer", "atomic_fact", "excerpt", "source", "company", "person", "investor", "function", "value_chain"]);
|
|
4969
|
+
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"];
|
|
4970
|
+
var STORAGE_EDGE_TYPE_VALUES = [...EDGE_TYPE_VALUES, "extracted_from"];
|
|
4971
|
+
z.enum(EDGE_TYPE_VALUES);
|
|
4972
|
+
z.enum(STORAGE_EDGE_TYPE_VALUES);
|
|
4973
|
+
z.enum(["active", "archived", "watching"]);
|
|
4974
|
+
z.enum(["private", "team", "firm", "external", "public"]);
|
|
4975
|
+
|
|
4976
|
+
// src/manifests/edge-policy-manifest.data.ts
|
|
4977
|
+
var publicEpistemicNodeEdgePolicy = (edgeType) => ({
|
|
4978
|
+
edgeType,
|
|
4979
|
+
fromKinds: ["epistemic_node"],
|
|
4980
|
+
toKinds: ["epistemic_node"],
|
|
4981
|
+
description: "Canonical public create_edge policy for graph-node relationships. The policy layer gates edge-type membership, not endpoint semantics."
|
|
4982
|
+
});
|
|
4983
|
+
var edgePolicyManifest = {
|
|
4984
|
+
policies: EDGE_TYPE_VALUES.map(publicEpistemicNodeEdgePolicy)
|
|
4985
|
+
};
|
|
4986
|
+
|
|
4101
4987
|
// src/function-registry/edges.ts
|
|
4988
|
+
var CREATE_EDGE_TYPES = edgePolicyManifest.policies.map(
|
|
4989
|
+
(policy) => policy.edgeType
|
|
4990
|
+
);
|
|
4991
|
+
var createEdgeArgs = z.object({
|
|
4992
|
+
from: GraphRefSchema,
|
|
4993
|
+
to: GraphRefSchema,
|
|
4994
|
+
edgeType: z.enum(CREATE_EDGE_TYPES),
|
|
4995
|
+
globalId: z.string().optional(),
|
|
4996
|
+
weight: z.number().optional(),
|
|
4997
|
+
confidence: z.number().optional(),
|
|
4998
|
+
context: z.string().optional(),
|
|
4999
|
+
reasoning: z.string().optional(),
|
|
5000
|
+
derivationType: z.string().optional(),
|
|
5001
|
+
metadata: z.record(z.unknown()).optional(),
|
|
5002
|
+
topicId: z.string().optional(),
|
|
5003
|
+
trustedBypassAccessCheck: z.boolean().optional()
|
|
5004
|
+
});
|
|
5005
|
+
var updateEdgeArgs = z.object({
|
|
5006
|
+
edgeId: z.string().describe("Edge ID or global ID."),
|
|
5007
|
+
weight: z.number().optional(),
|
|
5008
|
+
confidence: z.number().optional(),
|
|
5009
|
+
context: z.string().optional(),
|
|
5010
|
+
reasoning: z.string().optional(),
|
|
5011
|
+
derivationType: z.string().optional(),
|
|
5012
|
+
metadata: z.record(z.unknown()).optional(),
|
|
5013
|
+
userId: z.string().optional()
|
|
5014
|
+
});
|
|
5015
|
+
var removeEdgeArgs = z.object({
|
|
5016
|
+
edgeId: z.string().describe("Edge ID or global ID."),
|
|
5017
|
+
userId: z.string().optional()
|
|
5018
|
+
});
|
|
5019
|
+
var removeEdgesBetweenArgs = z.object({
|
|
5020
|
+
from: GraphRefSchema.optional(),
|
|
5021
|
+
to: GraphRefSchema.optional(),
|
|
5022
|
+
fromNodeId: z.string().optional(),
|
|
5023
|
+
toNodeId: z.string().optional(),
|
|
5024
|
+
edgeType: z.enum(CREATE_EDGE_TYPES).optional()
|
|
5025
|
+
});
|
|
5026
|
+
var batchCreateEdgesArgs = z.object({
|
|
5027
|
+
edges: z.array(createEdgeArgs),
|
|
5028
|
+
skipLayerValidation: z.boolean().optional()
|
|
5029
|
+
});
|
|
5030
|
+
var queryLineageArgs = z.object({
|
|
5031
|
+
nodeId: z.string().describe("Starting node to trace from."),
|
|
5032
|
+
startNode: z.string().optional().describe("Starting node alias accepted by traversal callers."),
|
|
5033
|
+
depth: z.number().optional().describe("Traversal depth alias."),
|
|
5034
|
+
maxDepth: z.number().optional().describe("Maximum traversal depth."),
|
|
5035
|
+
mode: z.string().optional().describe("Traversal mode."),
|
|
5036
|
+
minLayer: z.string().optional().describe("Minimum epistemic layer."),
|
|
5037
|
+
maxLayer: z.string().optional().describe("Maximum epistemic layer.")
|
|
5038
|
+
});
|
|
5039
|
+
function graphRefNodeId(ref) {
|
|
5040
|
+
if (ref.kind === "epistemic_node") {
|
|
5041
|
+
return ref.nodeId;
|
|
5042
|
+
}
|
|
5043
|
+
return `external_belief:${ref.ref.tenantId}:${ref.ref.beliefId}`;
|
|
5044
|
+
}
|
|
4102
5045
|
var edgesContracts = [
|
|
4103
5046
|
surfaceContract({
|
|
4104
5047
|
name: "create_edge",
|
|
@@ -4113,16 +5056,160 @@ var edgesContracts = [
|
|
|
4113
5056
|
module: "edges",
|
|
4114
5057
|
functionName: "create",
|
|
4115
5058
|
kind: "mutation",
|
|
4116
|
-
inputProjection: (input, context) =>
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
5059
|
+
inputProjection: (input, context) => {
|
|
5060
|
+
const parsed = createEdgeArgs.parse(input);
|
|
5061
|
+
assertEdgePolicyAllowed(
|
|
5062
|
+
edgePolicyManifest,
|
|
5063
|
+
parsed.edgeType,
|
|
5064
|
+
parsed.from,
|
|
5065
|
+
parsed.to
|
|
5066
|
+
);
|
|
5067
|
+
const fromNodeId = graphRefNodeId(parsed.from);
|
|
5068
|
+
const toNodeId = graphRefNodeId(parsed.to);
|
|
5069
|
+
return withCreatedBy(
|
|
5070
|
+
compactRecord({
|
|
5071
|
+
fromNodeId,
|
|
5072
|
+
toNodeId,
|
|
5073
|
+
edgeType: parsed.edgeType,
|
|
5074
|
+
globalId: parsed.globalId ?? `edge:${fromNodeId}:${toNodeId}:${parsed.edgeType}`,
|
|
5075
|
+
weight: parsed.weight,
|
|
5076
|
+
confidence: parsed.confidence,
|
|
5077
|
+
context: parsed.context ?? parsed.reasoning,
|
|
5078
|
+
derivationType: parsed.derivationType,
|
|
5079
|
+
metadata: parsed.metadata,
|
|
5080
|
+
skipLayerValidation: true,
|
|
5081
|
+
topicId: parsed.topicId,
|
|
5082
|
+
trustedBypassAccessCheck: parsed.trustedBypassAccessCheck
|
|
5083
|
+
}),
|
|
5084
|
+
context
|
|
5085
|
+
);
|
|
5086
|
+
}
|
|
5087
|
+
},
|
|
5088
|
+
args: createEdgeArgs
|
|
5089
|
+
}),
|
|
5090
|
+
surfaceContract({
|
|
5091
|
+
name: "update_edge",
|
|
5092
|
+
kind: "mutation",
|
|
5093
|
+
domain: "edges",
|
|
5094
|
+
surfaceClass: "platform_public",
|
|
5095
|
+
method: "PATCH",
|
|
5096
|
+
path: "/edges",
|
|
5097
|
+
sdkNamespace: "edges",
|
|
5098
|
+
sdkMethod: "updateEdge",
|
|
5099
|
+
summary: "Update an epistemic edge.",
|
|
5100
|
+
convex: {
|
|
5101
|
+
module: "edges",
|
|
5102
|
+
functionName: "update",
|
|
5103
|
+
kind: "mutation",
|
|
5104
|
+
inputProjection: (input, context) => compactRecord({
|
|
5105
|
+
edgeId: input.edgeId,
|
|
5106
|
+
weight: input.weight,
|
|
5107
|
+
confidence: input.confidence,
|
|
5108
|
+
context: input.context ?? input.reasoning,
|
|
5109
|
+
derivationType: input.derivationType,
|
|
5110
|
+
metadata: input.metadata,
|
|
5111
|
+
userId: input.userId ?? context.userId ?? context.principalId
|
|
5112
|
+
})
|
|
5113
|
+
},
|
|
5114
|
+
args: updateEdgeArgs
|
|
5115
|
+
}),
|
|
5116
|
+
surfaceContract({
|
|
5117
|
+
name: "remove_edge",
|
|
5118
|
+
kind: "mutation",
|
|
5119
|
+
domain: "edges",
|
|
5120
|
+
surfaceClass: "platform_public",
|
|
5121
|
+
method: "DELETE",
|
|
5122
|
+
path: "/edges",
|
|
5123
|
+
sdkNamespace: "edges",
|
|
5124
|
+
sdkMethod: "removeEdge",
|
|
5125
|
+
summary: "Remove an epistemic edge.",
|
|
5126
|
+
convex: {
|
|
5127
|
+
module: "edges",
|
|
5128
|
+
functionName: "remove",
|
|
5129
|
+
kind: "mutation",
|
|
5130
|
+
inputProjection: (input, context) => compactRecord({
|
|
5131
|
+
edgeId: input.edgeId,
|
|
5132
|
+
userId: input.userId ?? context.userId ?? context.principalId
|
|
5133
|
+
})
|
|
5134
|
+
},
|
|
5135
|
+
args: removeEdgeArgs
|
|
5136
|
+
}),
|
|
5137
|
+
surfaceContract({
|
|
5138
|
+
name: "remove_edges_between",
|
|
5139
|
+
kind: "mutation",
|
|
5140
|
+
domain: "edges",
|
|
5141
|
+
surfaceClass: "platform_public",
|
|
5142
|
+
method: "DELETE",
|
|
5143
|
+
path: "/edges/between",
|
|
5144
|
+
sdkNamespace: "edges",
|
|
5145
|
+
sdkMethod: "removeEdgesBetween",
|
|
5146
|
+
summary: "Remove epistemic edges between two nodes.",
|
|
5147
|
+
convex: {
|
|
5148
|
+
module: "edges",
|
|
5149
|
+
functionName: "removeBetween",
|
|
5150
|
+
kind: "mutation",
|
|
5151
|
+
inputProjection: (input) => {
|
|
5152
|
+
const parsed = removeEdgesBetweenArgs.parse(input);
|
|
5153
|
+
const fromNodeId = parsed.from ? graphRefNodeId(parsed.from) : parsed.fromNodeId;
|
|
5154
|
+
const toNodeId = parsed.to ? graphRefNodeId(parsed.to) : parsed.toNodeId;
|
|
5155
|
+
if (!fromNodeId || !toNodeId) {
|
|
5156
|
+
throw new Error("from/to or fromNodeId/toNodeId are required.");
|
|
5157
|
+
}
|
|
5158
|
+
return compactRecord({
|
|
5159
|
+
fromNodeId,
|
|
5160
|
+
toNodeId,
|
|
5161
|
+
edgeType: parsed.edgeType
|
|
5162
|
+
});
|
|
5163
|
+
}
|
|
5164
|
+
},
|
|
5165
|
+
args: removeEdgesBetweenArgs
|
|
5166
|
+
}),
|
|
5167
|
+
surfaceContract({
|
|
5168
|
+
name: "batch_create_edges",
|
|
5169
|
+
kind: "mutation",
|
|
5170
|
+
domain: "edges",
|
|
5171
|
+
surfaceClass: "platform_public",
|
|
5172
|
+
path: "/edges/batch",
|
|
5173
|
+
sdkNamespace: "edges",
|
|
5174
|
+
sdkMethod: "batchCreateEdges",
|
|
5175
|
+
summary: "Batch create epistemic edges.",
|
|
5176
|
+
convex: {
|
|
5177
|
+
module: "edges",
|
|
5178
|
+
functionName: "batchCreate",
|
|
5179
|
+
kind: "mutation",
|
|
5180
|
+
inputProjection: (input, context) => {
|
|
5181
|
+
const parsed = batchCreateEdgesArgs.parse(input);
|
|
5182
|
+
return {
|
|
5183
|
+
skipLayerValidation: parsed.skipLayerValidation ?? true,
|
|
5184
|
+
edges: parsed.edges.map((edge) => {
|
|
5185
|
+
assertEdgePolicyAllowed(
|
|
5186
|
+
edgePolicyManifest,
|
|
5187
|
+
edge.edgeType,
|
|
5188
|
+
edge.from,
|
|
5189
|
+
edge.to
|
|
5190
|
+
);
|
|
5191
|
+
const fromNodeId = graphRefNodeId(edge.from);
|
|
5192
|
+
const toNodeId = graphRefNodeId(edge.to);
|
|
5193
|
+
return withCreatedBy(
|
|
5194
|
+
compactRecord({
|
|
5195
|
+
fromNodeId,
|
|
5196
|
+
toNodeId,
|
|
5197
|
+
edgeType: edge.edgeType,
|
|
5198
|
+
globalId: edge.globalId ?? `edge:${fromNodeId}:${toNodeId}:${edge.edgeType}`,
|
|
5199
|
+
weight: edge.weight,
|
|
5200
|
+
confidence: edge.confidence,
|
|
5201
|
+
context: edge.context ?? edge.reasoning,
|
|
5202
|
+
derivationType: edge.derivationType,
|
|
5203
|
+
metadata: edge.metadata,
|
|
5204
|
+
topicId: edge.topicId
|
|
5205
|
+
}),
|
|
5206
|
+
context
|
|
5207
|
+
);
|
|
5208
|
+
})
|
|
5209
|
+
};
|
|
5210
|
+
}
|
|
5211
|
+
},
|
|
5212
|
+
args: batchCreateEdgesArgs
|
|
4126
5213
|
}),
|
|
4127
5214
|
surfaceContract({
|
|
4128
5215
|
name: "query_lineage",
|
|
@@ -4137,11 +5224,15 @@ var edgesContracts = [
|
|
|
4137
5224
|
module: "edges",
|
|
4138
5225
|
functionName: "getLineage",
|
|
4139
5226
|
kind: "query",
|
|
4140
|
-
inputProjection: (input) => ({
|
|
4141
|
-
|
|
4142
|
-
maxDepth: input.maxDepth ?? input.depth
|
|
5227
|
+
inputProjection: (input) => compactRecord({
|
|
5228
|
+
nodeId: input.nodeId ?? input.startNode,
|
|
5229
|
+
maxDepth: input.maxDepth ?? input.depth,
|
|
5230
|
+
mode: input.mode,
|
|
5231
|
+
minLayer: input.minLayer,
|
|
5232
|
+
maxLayer: input.maxLayer
|
|
4143
5233
|
})
|
|
4144
|
-
}
|
|
5234
|
+
},
|
|
5235
|
+
args: queryLineageArgs
|
|
4145
5236
|
})
|
|
4146
5237
|
];
|
|
4147
5238
|
|