@lucern/contracts 1.0.15 → 1.0.17
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 +6 -0
- package/dist/api-enums.contract.d.ts +2 -2
- package/dist/api-enums.contract.js +2 -8
- package/dist/api-enums.contract.js.map +1 -1
- package/dist/context-pack.contract.d.ts +33 -7
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/function-registry/beliefs.js +113 -115
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +72 -91
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +72 -91
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +72 -91
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +72 -91
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +72 -91
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +186 -125
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +72 -91
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +72 -91
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +72 -91
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.js +72 -91
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +72 -91
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +72 -91
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +72 -91
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +3 -3
- package/dist/function-registry/manifest.js +3 -3
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.js +72 -91
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +72 -91
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +72 -91
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +72 -91
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +72 -91
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +72 -91
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +72 -91
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/generated/convexSchemas.js +2 -2
- package/dist/generated/convexSchemas.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +166 -130
- package/dist/index.js.map +1 -1
- package/dist/manifests/invariant-manifest.d.ts +1 -1
- package/dist/manifests/invariants/index.d.ts +1 -1
- package/dist/manifests/invariants/index.js +1 -1
- package/dist/manifests/invariants/index.js.map +1 -1
- package/dist/manifests/invariants/inv-1-beliefs-append-only.d.ts +1 -1
- package/dist/manifests/invariants/inv-14-no-silent-transitions.d.ts +1 -1
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.d.ts +1 -1
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js +1 -1
- package/dist/manifests/invariants/manifest-1-projections-declare-audit.js.map +1 -1
- package/dist/projections/{modulate-confidence.projection.d.ts → append-sl-scoring.projection.d.ts} +69 -69
- package/dist/projections/{modulate-confidence.projection.js → append-sl-scoring.projection.js} +14 -14
- package/dist/projections/append-sl-scoring.projection.js.map +1 -0
- package/dist/projections/check-convex-args-shape.js +88 -29
- package/dist/projections/check-convex-args-shape.js.map +1 -1
- package/dist/projections/create-evidence.projection.js +76 -17
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +47 -47
- package/dist/projections/index.js +88 -29
- package/dist/projections/index.js.map +1 -1
- package/dist/proof-attestation.json +3 -3
- package/dist/schemas/index.js +6 -4
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/manifest.d.ts +110 -60
- package/dist/schemas/manifest.js +6 -4
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/schemas/tables/kernel/intelligence.d.ts +20 -10
- package/dist/schemas/tables/kernel/intelligence.js +4 -2
- package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
- package/dist/schemas/tables/kernel/spine.d.ts +2 -2
- package/dist/schemas/tables/kernel/spine.js +2 -2
- package/dist/schemas/tables/kernel/spine.js.map +1 -1
- package/dist/schemas.values.js +6 -4
- package/dist/schemas.values.js.map +1 -1
- package/dist/sdk-methods.contract.d.ts +12 -16
- package/dist/sdk-tools.contract.js +69 -88
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +69 -88
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +69 -88
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.d.ts +1 -1
- package/dist/tool-contracts.graph.js +3 -3
- package/dist/tool-contracts.graph.js.map +1 -1
- package/dist/tool-contracts.intelligence-evidence.js +7 -7
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -1
- package/dist/tool-contracts.js +70 -89
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.d.ts +2 -2
- package/dist/tool-contracts.lifecycle.js +49 -68
- package/dist/tool-contracts.lifecycle.js.map +1 -1
- package/dist/tool-contracts.pipeline-coordination.js +1 -1
- package/dist/tool-contracts.pipeline-coordination.js.map +1 -1
- package/dist/tool-contracts.questions-listing.js +9 -9
- package/dist/tool-contracts.questions-listing.js.map +1 -1
- package/dist/{tool-contracts.values-BhxfrXS5.d.ts → tool-contracts.values-CCoI3qQY.d.ts} +3 -3
- package/dist/tool-contracts.values.d.ts +1 -1
- package/dist/tool-contracts.values.js +70 -89
- package/dist/tool-contracts.values.js.map +1 -1
- package/package.json +1 -1
- package/dist/projections/modulate-confidence.projection.js.map +0 -1
|
@@ -43,15 +43,23 @@ export { legacyContracts } from './legacy.js';
|
|
|
43
43
|
// src/tool-contracts.lifecycle.ts
|
|
44
44
|
var CREATE_BELIEF = {
|
|
45
45
|
name: "create_belief",
|
|
46
|
-
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)`; attach supporting or contradicting evidence with create_evidence or link_evidence_to_belief to record evidential updates.",
|
|
46
|
+
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 requires a topic epistemic-node anchor and writes a `scoped_by` edge directly from belief node to topic node; orphan beliefs are invalid. Creation stores the vacuous opinion `(0, 0, 1, a)`; attach supporting or contradicting evidence with create_evidence or link_evidence_to_belief to record evidential updates.",
|
|
47
47
|
parameters: {
|
|
48
48
|
canonicalText: {
|
|
49
49
|
type: "string",
|
|
50
50
|
description: "The belief statement \u2014 what the agent holds to be true"
|
|
51
51
|
},
|
|
52
|
+
topicGlobalId: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "Required globalId (UUID) of the topic node in epistemicNodes that anchors the belief"
|
|
55
|
+
},
|
|
56
|
+
topicNodeId: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
|
|
59
|
+
},
|
|
52
60
|
topicId: {
|
|
53
61
|
type: "string",
|
|
54
|
-
description: "
|
|
62
|
+
description: "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
|
|
55
63
|
},
|
|
56
64
|
baseRate: {
|
|
57
65
|
type: "number",
|
|
@@ -66,7 +74,7 @@ var CREATE_BELIEF = {
|
|
|
66
74
|
description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'] } for coding intelligence)"
|
|
67
75
|
}
|
|
68
76
|
},
|
|
69
|
-
required: ["canonicalText"],
|
|
77
|
+
required: ["canonicalText", "topicGlobalId"],
|
|
70
78
|
response: {
|
|
71
79
|
description: "The created canonical belief record",
|
|
72
80
|
fields: {
|
|
@@ -75,7 +83,7 @@ var CREATE_BELIEF = {
|
|
|
75
83
|
beliefId: "string \u2014 canonical belief ID",
|
|
76
84
|
text: "string \u2014 canonical belief formulation",
|
|
77
85
|
topicId: "string",
|
|
78
|
-
|
|
86
|
+
beliefStatus: "string \u2014 assumption | hypothesis | active | superseded | resolved_true | resolved_false",
|
|
79
87
|
scoringState: "string \u2014 unscored | scored"
|
|
80
88
|
}
|
|
81
89
|
},
|
|
@@ -98,7 +106,7 @@ var GET_BELIEF = {
|
|
|
98
106
|
beliefId: "string \u2014 canonical belief ID",
|
|
99
107
|
text: "string \u2014 canonical belief formulation",
|
|
100
108
|
topicId: "string",
|
|
101
|
-
|
|
109
|
+
beliefStatus: "string \u2014 assumption | hypothesis | active | superseded | resolved_true | resolved_false",
|
|
102
110
|
scoringState: "string \u2014 unscored | scored"
|
|
103
111
|
}
|
|
104
112
|
},
|
|
@@ -127,34 +135,24 @@ var REFINE_BELIEF = {
|
|
|
127
135
|
ontologyPrimitive: "belief",
|
|
128
136
|
tier: "showcase"
|
|
129
137
|
};
|
|
130
|
-
var
|
|
131
|
-
name: "
|
|
132
|
-
description: "Internal
|
|
138
|
+
var APPEND_SL_SCORING = {
|
|
139
|
+
name: "append_sl_scoring",
|
|
140
|
+
description: "Internal evidence-backed Subjective Logic scoring append. This is not a public MCP tool: callers should attach supporting or contradicting evidence, and governed system paths append the derived SL tuple.",
|
|
133
141
|
parameters: {
|
|
134
|
-
nodeId: { type: "string", description: "The belief
|
|
135
|
-
belief: {
|
|
136
|
-
type: "number",
|
|
137
|
-
description: "Subjective-logic belief mass `b` in [0, 1]"
|
|
138
|
-
},
|
|
142
|
+
nodeId: { type: "string", description: "The belief receiving the SL score" },
|
|
143
|
+
belief: { type: "number", description: "Subjective Logic belief mass b" },
|
|
139
144
|
disbelief: {
|
|
140
145
|
type: "number",
|
|
141
|
-
description: "Subjective
|
|
146
|
+
description: "Subjective Logic disbelief mass d"
|
|
142
147
|
},
|
|
143
148
|
uncertainty: {
|
|
144
149
|
type: "number",
|
|
145
|
-
description: "Subjective
|
|
146
|
-
},
|
|
147
|
-
baseRate: {
|
|
148
|
-
type: "number",
|
|
149
|
-
description: "Subjective-logic base rate `a` in [0, 1]. Required for tuple payloads."
|
|
150
|
-
},
|
|
151
|
-
worktreeId: {
|
|
152
|
-
type: "string",
|
|
153
|
-
description: "Completed worktree that tested this belief when confidence policy requires merge-backed scoring."
|
|
150
|
+
description: "Subjective Logic uncertainty mass u"
|
|
154
151
|
},
|
|
152
|
+
baseRate: { type: "number", description: "Subjective Logic base rate a" },
|
|
155
153
|
trigger: {
|
|
156
154
|
type: "string",
|
|
157
|
-
description: "
|
|
155
|
+
description: "Evidence-bearing cause of the scoring event",
|
|
158
156
|
enum: [
|
|
159
157
|
"evidence_added",
|
|
160
158
|
"evidence_removed",
|
|
@@ -165,64 +163,39 @@ var MODULATE_CONFIDENCE = {
|
|
|
165
163
|
"worktree_completed",
|
|
166
164
|
"fusion",
|
|
167
165
|
"discount",
|
|
168
|
-
"deduction"
|
|
166
|
+
"deduction",
|
|
167
|
+
"backfill_synthetic"
|
|
169
168
|
]
|
|
170
169
|
},
|
|
171
|
-
|
|
172
|
-
type: "
|
|
173
|
-
description: "
|
|
174
|
-
},
|
|
175
|
-
triggeringQuestionId: {
|
|
176
|
-
type: "string",
|
|
177
|
-
description: "Answered question whose resolution supports this modulation"
|
|
178
|
-
},
|
|
179
|
-
triggeringAnswerId: {
|
|
180
|
-
type: "string",
|
|
181
|
-
description: "Answer node whose content supports this modulation"
|
|
182
|
-
},
|
|
183
|
-
triggeringContradictionId: {
|
|
184
|
-
type: "string",
|
|
185
|
-
description: "Contradiction record that caused a contradiction-triggered modulation"
|
|
186
|
-
},
|
|
187
|
-
triggeringWorktreeId: {
|
|
188
|
-
type: "string",
|
|
189
|
-
description: "Completed worktree whose outcome caused a worktree-triggered modulation"
|
|
170
|
+
provenance: {
|
|
171
|
+
type: "object",
|
|
172
|
+
description: "At least one of evidence, question, answer, contradiction, or worktree."
|
|
190
173
|
},
|
|
191
174
|
rationale: {
|
|
192
175
|
type: "string",
|
|
193
|
-
description: "
|
|
176
|
+
description: "Why this evidence-bearing event moved the SL tuple"
|
|
194
177
|
}
|
|
195
178
|
},
|
|
196
|
-
required: [
|
|
197
|
-
"nodeId",
|
|
198
|
-
"belief",
|
|
199
|
-
"disbelief",
|
|
200
|
-
"uncertainty",
|
|
201
|
-
"baseRate",
|
|
202
|
-
"trigger",
|
|
203
|
-
"rationale"
|
|
204
|
-
],
|
|
179
|
+
required: ["nodeId", "belief", "disbelief", "uncertainty", "baseRate", "trigger", "rationale"],
|
|
205
180
|
response: {
|
|
206
|
-
description: "
|
|
181
|
+
description: "Internal SL scoring append receipt",
|
|
207
182
|
fields: {
|
|
208
|
-
|
|
209
|
-
nodeId: "string \u2014 canonical belief ID",
|
|
210
|
-
newConfidence: "number",
|
|
183
|
+
nodeId: "string",
|
|
211
184
|
previousConfidence: "number",
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
propagationSummary: "object \u2014 bounded inline cascade summary with totalCandidateTargets, inlineTargets, and remainingTargetCount"
|
|
185
|
+
newConfidence: "number",
|
|
186
|
+
beliefConfidenceId: "string"
|
|
215
187
|
}
|
|
216
188
|
},
|
|
217
189
|
ownerModule: "graph-primitives",
|
|
218
190
|
ontologyPrimitive: "belief",
|
|
219
|
-
tier: "
|
|
191
|
+
tier: "workhorse",
|
|
192
|
+
internal: true
|
|
220
193
|
};
|
|
221
194
|
var FORK_BELIEF = {
|
|
222
195
|
name: "fork_belief",
|
|
223
|
-
description: "Branch off
|
|
196
|
+
description: "Branch off an evidence-bearing belief to create a new formulation. Like `git fork` \u2014 the parent remains immutable with full history, and every fork must cite evidence already attached to the parent through SL scoring. `forkMode=supersede` marks the parent superseded and requires contradicting evidence; `forkMode=branch` preserves the parent and creates a derived child.",
|
|
224
197
|
parameters: {
|
|
225
|
-
nodeId: { type: "string", description: "The
|
|
198
|
+
nodeId: { type: "string", description: "The belief to fork from" },
|
|
226
199
|
newFormulation: {
|
|
227
200
|
type: "string",
|
|
228
201
|
description: "The evolved belief statement"
|
|
@@ -234,12 +207,20 @@ var FORK_BELIEF = {
|
|
|
234
207
|
"refinement",
|
|
235
208
|
"contradiction_response",
|
|
236
209
|
"scope_change",
|
|
237
|
-
"confidence_collapse"
|
|
238
|
-
"manual"
|
|
210
|
+
"confidence_collapse"
|
|
239
211
|
]
|
|
212
|
+
},
|
|
213
|
+
forkMode: {
|
|
214
|
+
type: "string",
|
|
215
|
+
description: "supersede replaces the parent; branch creates a child while preserving the parent.",
|
|
216
|
+
enum: ["supersede", "branch"]
|
|
217
|
+
},
|
|
218
|
+
triggeringEvidenceId: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Evidence already attached to the parent belief that caused the fork."
|
|
240
221
|
}
|
|
241
222
|
},
|
|
242
|
-
required: ["nodeId", "newFormulation", "forkReason"],
|
|
223
|
+
required: ["nodeId", "newFormulation", "forkReason", "triggeringEvidenceId"],
|
|
243
224
|
response: {
|
|
244
225
|
description: "The forked canonical belief record",
|
|
245
226
|
fields: {
|
|
@@ -741,7 +722,7 @@ var REASONING_METHODS = [
|
|
|
741
722
|
// src/tool-contracts.graph.ts
|
|
742
723
|
var QUERY_LINEAGE = {
|
|
743
724
|
name: "query_lineage",
|
|
744
|
-
description: "Trace a belief's full ancestry \u2014 every fork, score, and
|
|
725
|
+
description: "Trace a belief's full ancestry \u2014 every fork, score, and SL scoring event. Like `git log --graph`. Returns the complete evolution chain showing how understanding developed over time. Lineage is permanent and can never be erased (Invariant #3).",
|
|
745
726
|
parameters: {
|
|
746
727
|
nodeId: { type: "string", description: "Starting node to trace from" },
|
|
747
728
|
depth: {
|
|
@@ -940,7 +921,7 @@ var FIND_CONTRADICTIONS = {
|
|
|
940
921
|
};
|
|
941
922
|
var BISECT_CONFIDENCE = {
|
|
942
923
|
name: "bisect_confidence",
|
|
943
|
-
description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through
|
|
924
|
+
description: "Find when a belief's confidence diverged from reality. Like `git bisect` \u2014 binary search through the credence history to find the inflection point. Given a belief that is now known to be wrong (or right), traces back through SL scoring events to identify which evidence or event caused the divergence.",
|
|
944
925
|
parameters: {
|
|
945
926
|
nodeId: { type: "string", description: "The belief to bisect" },
|
|
946
927
|
expectedDirection: {
|
|
@@ -959,7 +940,7 @@ var BISECT_CONFIDENCE = {
|
|
|
959
940
|
fields: {
|
|
960
941
|
beliefId: "string \u2014 canonical belief ID",
|
|
961
942
|
expectedDirection: "string \u2014 overconfident | underconfident",
|
|
962
|
-
inflectionEntry: "object \u2014 the
|
|
943
|
+
inflectionEntry: "object \u2014 the scoring event where divergence began",
|
|
963
944
|
triggerEvent: "string | null \u2014 what caused the divergence",
|
|
964
945
|
confidenceBefore: "number | null",
|
|
965
946
|
confidenceAfter: "number | null",
|
|
@@ -1904,18 +1885,18 @@ var SEARCH_EVIDENCE = {
|
|
|
1904
1885
|
};
|
|
1905
1886
|
var CREATE_EVIDENCE = {
|
|
1906
1887
|
name: "create_evidence",
|
|
1907
|
-
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs.
|
|
1888
|
+
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs. Evidence creation must link to at least one belief and must include a signed impact score. Positive scores support the belief; negative scores contradict it. SL confidence is derived from these weighted evidence relations.",
|
|
1908
1889
|
parameters: {
|
|
1909
1890
|
topicId: { type: "string", description: "Topic scope" },
|
|
1910
1891
|
text: { type: "string", description: "Canonical evidence text" },
|
|
1911
1892
|
source: { type: "string", description: "Source URL or source label" },
|
|
1912
1893
|
targetId: {
|
|
1913
1894
|
type: "string",
|
|
1914
|
-
description: "
|
|
1895
|
+
description: "Belief identifier to link immediately"
|
|
1915
1896
|
},
|
|
1916
1897
|
weight: {
|
|
1917
1898
|
type: "number",
|
|
1918
|
-
description: "
|
|
1899
|
+
description: "Required nonzero signed impact score: -1.0 (contradicts) to +1.0 (supports)."
|
|
1919
1900
|
},
|
|
1920
1901
|
evidenceRelation: {
|
|
1921
1902
|
type: "string",
|
|
@@ -1924,7 +1905,7 @@ var CREATE_EVIDENCE = {
|
|
|
1924
1905
|
},
|
|
1925
1906
|
confidence: {
|
|
1926
1907
|
type: "number",
|
|
1927
|
-
description: "
|
|
1908
|
+
description: "Deprecated hint. Runtime confidence is derived from the signed impact score."
|
|
1928
1909
|
},
|
|
1929
1910
|
beliefRelations: {
|
|
1930
1911
|
type: "array",
|
|
@@ -1946,7 +1927,7 @@ var CREATE_EVIDENCE = {
|
|
|
1946
1927
|
},
|
|
1947
1928
|
kind: { type: "string", description: "Optional evidence kind" }
|
|
1948
1929
|
},
|
|
1949
|
-
required: ["text", "rationale"],
|
|
1930
|
+
required: ["text", "rationale", "weight"],
|
|
1950
1931
|
response: {
|
|
1951
1932
|
description: "The created canonical evidence record",
|
|
1952
1933
|
fields: {
|
|
@@ -2021,7 +2002,7 @@ var LINK_EVIDENCE = {
|
|
|
2021
2002
|
},
|
|
2022
2003
|
rationale: { type: "string", description: "Why this link exists" }
|
|
2023
2004
|
},
|
|
2024
|
-
required: ["evidenceId", "targetId"],
|
|
2005
|
+
required: ["evidenceId", "targetId", "weight"],
|
|
2025
2006
|
response: {
|
|
2026
2007
|
description: "The created canonical evidence edge summary",
|
|
2027
2008
|
fields: {
|
|
@@ -2057,7 +2038,7 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
2057
2038
|
},
|
|
2058
2039
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
2059
2040
|
},
|
|
2060
|
-
required: ["evidenceId", "beliefId"],
|
|
2041
|
+
required: ["evidenceId", "beliefId", "weight"],
|
|
2061
2042
|
response: {
|
|
2062
2043
|
description: "The created edge linking evidence to belief",
|
|
2063
2044
|
fields: {
|
|
@@ -2859,6 +2840,10 @@ var COMPILE_CONTEXT = {
|
|
|
2859
2840
|
type: "number",
|
|
2860
2841
|
description: "Optional per-section item limit"
|
|
2861
2842
|
},
|
|
2843
|
+
contentTopicLimit: {
|
|
2844
|
+
type: "number",
|
|
2845
|
+
description: "Dimension-seeded compiles synthesize every matching worktree but bound raw belief/question/evidence enrichment to this many carrier topics (max 16) so hosted Convex queries remain fast. Receipts report any omitted raw topic enrichment."
|
|
2846
|
+
},
|
|
2862
2847
|
maxDepth: {
|
|
2863
2848
|
type: "number",
|
|
2864
2849
|
description: "Optional descendant topic depth for neighborhood expansion"
|
|
@@ -2872,6 +2857,11 @@ var COMPILE_CONTEXT = {
|
|
|
2872
2857
|
response: {
|
|
2873
2858
|
description: "Compiled context pack for the requested topic",
|
|
2874
2859
|
fields: {
|
|
2860
|
+
contextNarrative: "array \u2014 first field; ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
2861
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, topicsSynthesized, topicsEnriched, topicContentOmitted, enrichmentMode, and blocksEmitted for the narrative",
|
|
2862
|
+
synthesisLints: "array \u2014 inline quality warnings for degenerate synthesis blocks or weak narrative coverage",
|
|
2863
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
2864
|
+
supportingObjects: "object \u2014 raw graph records grouped behind the synthesis: invariants, activeBeliefs, openQuestions, recentEvidence, worktrees, lanes, entities, and contradictions",
|
|
2875
2865
|
schemaVersion: "string",
|
|
2876
2866
|
topicId: "string",
|
|
2877
2867
|
topicName: "string",
|
|
@@ -2879,15 +2869,6 @@ var COMPILE_CONTEXT = {
|
|
|
2879
2869
|
generatedAt: "number \u2014 deterministic graph-backed reference timestamp for this compilation",
|
|
2880
2870
|
ranking: "string \u2014 baseline_v1 | weighted_v1",
|
|
2881
2871
|
summary: "object \u2014 counts and scoped health signals",
|
|
2882
|
-
invariants: "array \u2014 high-confidence invariant beliefs",
|
|
2883
|
-
activeBeliefs: "array \u2014 current high-signal beliefs",
|
|
2884
|
-
openQuestions: "array \u2014 unresolved questions ranked for this query",
|
|
2885
|
-
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
2886
|
-
contradictions: "array \u2014 unresolved contradiction records",
|
|
2887
|
-
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
2888
|
-
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
2889
|
-
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
2890
|
-
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
|
|
2891
2872
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
2892
2873
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
2893
2874
|
}
|
|
@@ -4306,7 +4287,7 @@ var TRIGGER_BELIEF_REVIEW = {
|
|
|
4306
4287
|
};
|
|
4307
4288
|
var EVALUATE_CONTRACT = {
|
|
4308
4289
|
name: "evaluate_contract",
|
|
4309
|
-
description: "Run a contract evaluation and record the append-only result. Like `git test` for a belief binding \u2014 executes the evaluator, logs the result, and applies any allowed
|
|
4290
|
+
description: "Run a contract evaluation and record the append-only result. Like `git test` for a belief binding \u2014 executes the evaluator, logs the result, and applies any allowed SL scoring action.",
|
|
4310
4291
|
parameters: {
|
|
4311
4292
|
contractId: { type: "string", description: "Which contract to evaluate" },
|
|
4312
4293
|
trigger: {
|
|
@@ -4662,7 +4643,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
4662
4643
|
create_belief: CREATE_BELIEF,
|
|
4663
4644
|
get_belief: GET_BELIEF,
|
|
4664
4645
|
refine_belief: REFINE_BELIEF,
|
|
4665
|
-
|
|
4646
|
+
append_sl_scoring: APPEND_SL_SCORING,
|
|
4666
4647
|
fork_belief: FORK_BELIEF,
|
|
4667
4648
|
archive_belief: ARCHIVE_BELIEF,
|
|
4668
4649
|
create_epistemic_contract: CREATE_EPISTEMIC_CONTRACT,
|
|
@@ -5178,12 +5159,12 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
5178
5159
|
internalSystem,
|
|
5179
5160
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
5180
5161
|
),
|
|
5181
|
-
|
|
5182
|
-
name: "
|
|
5162
|
+
append_sl_scoring: {
|
|
5163
|
+
name: "append_sl_scoring",
|
|
5183
5164
|
surfaceClass: "platform_internal",
|
|
5184
5165
|
surfaceIntent: "system",
|
|
5185
5166
|
surfaces: internalSdkRestOnly,
|
|
5186
|
-
rationale: "Internal SL
|
|
5167
|
+
rationale: "Internal SL scoring append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
|
|
5187
5168
|
},
|
|
5188
5169
|
...entries(
|
|
5189
5170
|
LEGACY_COMPAT_OPERATION_NAMES,
|