@lucern/contracts 1.0.16 → 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 +3 -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 +27 -7
- package/dist/context-pack.contract.js.map +1 -1
- package/dist/function-registry/beliefs.js +109 -115
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +68 -91
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +68 -91
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +68 -91
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +68 -91
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +68 -91
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +182 -125
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +68 -91
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +68 -91
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +68 -91
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.js +68 -91
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +68 -91
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +68 -91
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +68 -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 +68 -91
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +68 -91
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +68 -91
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +68 -91
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +68 -91
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +68 -91
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +68 -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 +162 -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 +6 -16
- package/dist/sdk-tools.contract.js +65 -88
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +65 -88
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +65 -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 +66 -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 +5 -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 +66 -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
|
@@ -54,29 +54,21 @@ type RefineBeliefInput = {
|
|
|
54
54
|
canonicalText: string;
|
|
55
55
|
rationale?: string;
|
|
56
56
|
};
|
|
57
|
-
/** @deprecated Public callers attach evidence; internal scorers derive SL confidence. */
|
|
58
|
-
type ModulateConfidenceInput = {
|
|
59
|
-
confidence: number;
|
|
60
|
-
trigger: ConfidenceTrigger;
|
|
61
|
-
rationale: string;
|
|
62
|
-
};
|
|
63
|
-
/** @deprecated Public callers attach evidence; internal scorers derive SL confidence. */
|
|
64
|
-
type ConfidenceResult = {
|
|
65
|
-
nodeId: string;
|
|
66
|
-
newConfidence: number;
|
|
67
|
-
previousConfidence: number | null;
|
|
68
|
-
trigger: ConfidenceTrigger;
|
|
69
|
-
};
|
|
70
57
|
/** Input to forkBelief() */
|
|
71
58
|
type ForkBeliefInput = {
|
|
72
59
|
newFormulation: string;
|
|
73
60
|
forkReason: ForkReason;
|
|
61
|
+
forkMode?: "supersede" | "branch";
|
|
62
|
+
triggeringEvidenceId: string;
|
|
63
|
+
rationale?: string;
|
|
74
64
|
};
|
|
75
65
|
/** Result of forkBelief() */
|
|
76
66
|
type ForkResult = {
|
|
77
67
|
nodeId: string;
|
|
78
68
|
parentNodeId: string;
|
|
79
69
|
forkReason: ForkReason;
|
|
70
|
+
forkMode?: "supersede" | "branch";
|
|
71
|
+
triggeringEvidenceId?: string;
|
|
80
72
|
canonicalText: string;
|
|
81
73
|
};
|
|
82
74
|
/** Input to addEvidence() */
|
|
@@ -310,8 +302,6 @@ type BisectResult = {
|
|
|
310
302
|
type LucernGraphMethods = {
|
|
311
303
|
createBelief(client: LucernClient, input: CreateBeliefInput): Promise<BeliefResult>;
|
|
312
304
|
refineBelief(client: LucernClient, nodeId: string, input: RefineBeliefInput): Promise<BeliefResult>;
|
|
313
|
-
/** @deprecated Public callers attach evidence; internal scorers derive SL confidence. */
|
|
314
|
-
modulateConfidence(client: LucernClient, nodeId: string, input: ModulateConfidenceInput): Promise<ConfidenceResult>;
|
|
315
305
|
forkBelief(client: LucernClient, nodeId: string, input: ForkBeliefInput): Promise<ForkResult>;
|
|
316
306
|
archiveBelief(client: LucernClient, nodeId: string, rationale?: string): Promise<{
|
|
317
307
|
nodeId: string;
|
|
@@ -388,4 +378,4 @@ type LucernWorkflowMethods = {
|
|
|
388
378
|
push(client: LucernClient, worktreeId: string, input: PushInput): Promise<PushResult>;
|
|
389
379
|
};
|
|
390
380
|
|
|
391
|
-
export type { AddEvidenceInput, AddWorktreeInput, BeliefResult, BisectConfidenceInput, BisectResult, BranchResult, CompileContextInput, CompiledContextResult,
|
|
381
|
+
export type { AddEvidenceInput, AddWorktreeInput, BeliefResult, BisectConfidenceInput, BisectResult, BranchResult, CompileContextInput, CompiledContextResult, ContradictionResult, CreateBeliefInput, CreateBranchInput, CreateEdgeInput, EdgeResult, EvidenceResult, FlagContradictionInput, ForkBeliefInput, ForkResult, JudgmentResult, LineageResult, LucernClient, LucernClientConfig, LucernGraphMethods, LucernWorkflowMethods, MergeInput, MergeResult, OpenPullRequestInput, PullRequestResult, PushInput, PushResult, QueryLineageInput, RecordJudgmentInput, RefineBeliefInput, SearchBeliefsInput, WorktreeResult };
|
|
@@ -1051,15 +1051,23 @@ var FIND_SEMANTIC_ORPHANS = {
|
|
|
1051
1051
|
// src/tool-contracts.lifecycle.ts
|
|
1052
1052
|
var CREATE_BELIEF = {
|
|
1053
1053
|
name: "create_belief",
|
|
1054
|
-
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.",
|
|
1054
|
+
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.",
|
|
1055
1055
|
parameters: {
|
|
1056
1056
|
canonicalText: {
|
|
1057
1057
|
type: "string",
|
|
1058
1058
|
description: "The belief statement \u2014 what the agent holds to be true"
|
|
1059
1059
|
},
|
|
1060
|
+
topicGlobalId: {
|
|
1061
|
+
type: "string",
|
|
1062
|
+
description: "Required globalId (UUID) of the topic node in epistemicNodes that anchors the belief"
|
|
1063
|
+
},
|
|
1064
|
+
topicNodeId: {
|
|
1065
|
+
type: "string",
|
|
1066
|
+
description: "Optional internal epistemicNodes _id for the topic anchor. Prefer topicGlobalId for public callers."
|
|
1067
|
+
},
|
|
1060
1068
|
topicId: {
|
|
1061
1069
|
type: "string",
|
|
1062
|
-
description: "
|
|
1070
|
+
description: "Deprecated compatibility alias for topicGlobalId. Must identify a topic epistemicNode, not a legacy topics-table row."
|
|
1063
1071
|
},
|
|
1064
1072
|
baseRate: {
|
|
1065
1073
|
type: "number",
|
|
@@ -1074,7 +1082,7 @@ var CREATE_BELIEF = {
|
|
|
1074
1082
|
description: "Optional extra metadata merged into the node (e.g., { codeAnchors: ['path/to/file.ts'] } for coding intelligence)"
|
|
1075
1083
|
}
|
|
1076
1084
|
},
|
|
1077
|
-
required: ["canonicalText"],
|
|
1085
|
+
required: ["canonicalText", "topicGlobalId"],
|
|
1078
1086
|
response: {
|
|
1079
1087
|
description: "The created canonical belief record",
|
|
1080
1088
|
fields: {
|
|
@@ -1083,7 +1091,7 @@ var CREATE_BELIEF = {
|
|
|
1083
1091
|
beliefId: "string \u2014 canonical belief ID",
|
|
1084
1092
|
text: "string \u2014 canonical belief formulation",
|
|
1085
1093
|
topicId: "string",
|
|
1086
|
-
|
|
1094
|
+
beliefStatus: "string \u2014 assumption | hypothesis | active | superseded | resolved_true | resolved_false",
|
|
1087
1095
|
scoringState: "string \u2014 unscored | scored"
|
|
1088
1096
|
}
|
|
1089
1097
|
},
|
|
@@ -1106,7 +1114,7 @@ var GET_BELIEF = {
|
|
|
1106
1114
|
beliefId: "string \u2014 canonical belief ID",
|
|
1107
1115
|
text: "string \u2014 canonical belief formulation",
|
|
1108
1116
|
topicId: "string",
|
|
1109
|
-
|
|
1117
|
+
beliefStatus: "string \u2014 assumption | hypothesis | active | superseded | resolved_true | resolved_false",
|
|
1110
1118
|
scoringState: "string \u2014 unscored | scored"
|
|
1111
1119
|
}
|
|
1112
1120
|
},
|
|
@@ -1135,34 +1143,24 @@ var REFINE_BELIEF = {
|
|
|
1135
1143
|
ontologyPrimitive: "belief",
|
|
1136
1144
|
tier: "showcase"
|
|
1137
1145
|
};
|
|
1138
|
-
var
|
|
1139
|
-
name: "
|
|
1140
|
-
description: "Internal
|
|
1146
|
+
var APPEND_SL_SCORING = {
|
|
1147
|
+
name: "append_sl_scoring",
|
|
1148
|
+
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.",
|
|
1141
1149
|
parameters: {
|
|
1142
|
-
nodeId: { type: "string", description: "The belief
|
|
1143
|
-
belief: {
|
|
1144
|
-
type: "number",
|
|
1145
|
-
description: "Subjective-logic belief mass `b` in [0, 1]"
|
|
1146
|
-
},
|
|
1150
|
+
nodeId: { type: "string", description: "The belief receiving the SL score" },
|
|
1151
|
+
belief: { type: "number", description: "Subjective Logic belief mass b" },
|
|
1147
1152
|
disbelief: {
|
|
1148
1153
|
type: "number",
|
|
1149
|
-
description: "Subjective
|
|
1154
|
+
description: "Subjective Logic disbelief mass d"
|
|
1150
1155
|
},
|
|
1151
1156
|
uncertainty: {
|
|
1152
1157
|
type: "number",
|
|
1153
|
-
description: "Subjective
|
|
1154
|
-
},
|
|
1155
|
-
baseRate: {
|
|
1156
|
-
type: "number",
|
|
1157
|
-
description: "Subjective-logic base rate `a` in [0, 1]. Required for tuple payloads."
|
|
1158
|
-
},
|
|
1159
|
-
worktreeId: {
|
|
1160
|
-
type: "string",
|
|
1161
|
-
description: "Completed worktree that tested this belief when confidence policy requires merge-backed scoring."
|
|
1158
|
+
description: "Subjective Logic uncertainty mass u"
|
|
1162
1159
|
},
|
|
1160
|
+
baseRate: { type: "number", description: "Subjective Logic base rate a" },
|
|
1163
1161
|
trigger: {
|
|
1164
1162
|
type: "string",
|
|
1165
|
-
description: "
|
|
1163
|
+
description: "Evidence-bearing cause of the scoring event",
|
|
1166
1164
|
enum: [
|
|
1167
1165
|
"evidence_added",
|
|
1168
1166
|
"evidence_removed",
|
|
@@ -1173,64 +1171,39 @@ var MODULATE_CONFIDENCE = {
|
|
|
1173
1171
|
"worktree_completed",
|
|
1174
1172
|
"fusion",
|
|
1175
1173
|
"discount",
|
|
1176
|
-
"deduction"
|
|
1174
|
+
"deduction",
|
|
1175
|
+
"backfill_synthetic"
|
|
1177
1176
|
]
|
|
1178
1177
|
},
|
|
1179
|
-
|
|
1180
|
-
type: "
|
|
1181
|
-
description: "
|
|
1182
|
-
},
|
|
1183
|
-
triggeringQuestionId: {
|
|
1184
|
-
type: "string",
|
|
1185
|
-
description: "Answered question whose resolution supports this modulation"
|
|
1186
|
-
},
|
|
1187
|
-
triggeringAnswerId: {
|
|
1188
|
-
type: "string",
|
|
1189
|
-
description: "Answer node whose content supports this modulation"
|
|
1190
|
-
},
|
|
1191
|
-
triggeringContradictionId: {
|
|
1192
|
-
type: "string",
|
|
1193
|
-
description: "Contradiction record that caused a contradiction-triggered modulation"
|
|
1194
|
-
},
|
|
1195
|
-
triggeringWorktreeId: {
|
|
1196
|
-
type: "string",
|
|
1197
|
-
description: "Completed worktree whose outcome caused a worktree-triggered modulation"
|
|
1178
|
+
provenance: {
|
|
1179
|
+
type: "object",
|
|
1180
|
+
description: "At least one of evidence, question, answer, contradiction, or worktree."
|
|
1198
1181
|
},
|
|
1199
1182
|
rationale: {
|
|
1200
1183
|
type: "string",
|
|
1201
|
-
description: "
|
|
1184
|
+
description: "Why this evidence-bearing event moved the SL tuple"
|
|
1202
1185
|
}
|
|
1203
1186
|
},
|
|
1204
|
-
required: [
|
|
1205
|
-
"nodeId",
|
|
1206
|
-
"belief",
|
|
1207
|
-
"disbelief",
|
|
1208
|
-
"uncertainty",
|
|
1209
|
-
"baseRate",
|
|
1210
|
-
"trigger",
|
|
1211
|
-
"rationale"
|
|
1212
|
-
],
|
|
1187
|
+
required: ["nodeId", "belief", "disbelief", "uncertainty", "baseRate", "trigger", "rationale"],
|
|
1213
1188
|
response: {
|
|
1214
|
-
description: "
|
|
1189
|
+
description: "Internal SL scoring append receipt",
|
|
1215
1190
|
fields: {
|
|
1216
|
-
|
|
1217
|
-
nodeId: "string \u2014 canonical belief ID",
|
|
1218
|
-
newConfidence: "number",
|
|
1191
|
+
nodeId: "string",
|
|
1219
1192
|
previousConfidence: "number",
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
propagationSummary: "object \u2014 bounded inline cascade summary with totalCandidateTargets, inlineTargets, and remainingTargetCount"
|
|
1193
|
+
newConfidence: "number",
|
|
1194
|
+
beliefConfidenceId: "string"
|
|
1223
1195
|
}
|
|
1224
1196
|
},
|
|
1225
1197
|
ownerModule: "graph-primitives",
|
|
1226
1198
|
ontologyPrimitive: "belief",
|
|
1227
|
-
tier: "
|
|
1199
|
+
tier: "workhorse",
|
|
1200
|
+
internal: true
|
|
1228
1201
|
};
|
|
1229
1202
|
var FORK_BELIEF = {
|
|
1230
1203
|
name: "fork_belief",
|
|
1231
|
-
description: "Branch off
|
|
1204
|
+
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.",
|
|
1232
1205
|
parameters: {
|
|
1233
|
-
nodeId: { type: "string", description: "The
|
|
1206
|
+
nodeId: { type: "string", description: "The belief to fork from" },
|
|
1234
1207
|
newFormulation: {
|
|
1235
1208
|
type: "string",
|
|
1236
1209
|
description: "The evolved belief statement"
|
|
@@ -1242,12 +1215,20 @@ var FORK_BELIEF = {
|
|
|
1242
1215
|
"refinement",
|
|
1243
1216
|
"contradiction_response",
|
|
1244
1217
|
"scope_change",
|
|
1245
|
-
"confidence_collapse"
|
|
1246
|
-
"manual"
|
|
1218
|
+
"confidence_collapse"
|
|
1247
1219
|
]
|
|
1220
|
+
},
|
|
1221
|
+
forkMode: {
|
|
1222
|
+
type: "string",
|
|
1223
|
+
description: "supersede replaces the parent; branch creates a child while preserving the parent.",
|
|
1224
|
+
enum: ["supersede", "branch"]
|
|
1225
|
+
},
|
|
1226
|
+
triggeringEvidenceId: {
|
|
1227
|
+
type: "string",
|
|
1228
|
+
description: "Evidence already attached to the parent belief that caused the fork."
|
|
1248
1229
|
}
|
|
1249
1230
|
},
|
|
1250
|
-
required: ["nodeId", "newFormulation", "forkReason"],
|
|
1231
|
+
required: ["nodeId", "newFormulation", "forkReason", "triggeringEvidenceId"],
|
|
1251
1232
|
response: {
|
|
1252
1233
|
description: "The forked canonical belief record",
|
|
1253
1234
|
fields: {
|
|
@@ -1749,7 +1730,7 @@ var REASONING_METHODS = [
|
|
|
1749
1730
|
// src/tool-contracts.graph.ts
|
|
1750
1731
|
var QUERY_LINEAGE = {
|
|
1751
1732
|
name: "query_lineage",
|
|
1752
|
-
description: "Trace a belief's full ancestry \u2014 every fork, score, and
|
|
1733
|
+
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).",
|
|
1753
1734
|
parameters: {
|
|
1754
1735
|
nodeId: { type: "string", description: "Starting node to trace from" },
|
|
1755
1736
|
depth: {
|
|
@@ -1948,7 +1929,7 @@ var FIND_CONTRADICTIONS = {
|
|
|
1948
1929
|
};
|
|
1949
1930
|
var BISECT_CONFIDENCE = {
|
|
1950
1931
|
name: "bisect_confidence",
|
|
1951
|
-
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
|
|
1932
|
+
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.",
|
|
1952
1933
|
parameters: {
|
|
1953
1934
|
nodeId: { type: "string", description: "The belief to bisect" },
|
|
1954
1935
|
expectedDirection: {
|
|
@@ -1967,7 +1948,7 @@ var BISECT_CONFIDENCE = {
|
|
|
1967
1948
|
fields: {
|
|
1968
1949
|
beliefId: "string \u2014 canonical belief ID",
|
|
1969
1950
|
expectedDirection: "string \u2014 overconfident | underconfident",
|
|
1970
|
-
inflectionEntry: "object \u2014 the
|
|
1951
|
+
inflectionEntry: "object \u2014 the scoring event where divergence began",
|
|
1971
1952
|
triggerEvent: "string | null \u2014 what caused the divergence",
|
|
1972
1953
|
confidenceBefore: "number | null",
|
|
1973
1954
|
confidenceAfter: "number | null",
|
|
@@ -2912,18 +2893,18 @@ var SEARCH_EVIDENCE = {
|
|
|
2912
2893
|
};
|
|
2913
2894
|
var CREATE_EVIDENCE = {
|
|
2914
2895
|
name: "create_evidence",
|
|
2915
|
-
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs.
|
|
2896
|
+
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.",
|
|
2916
2897
|
parameters: {
|
|
2917
2898
|
topicId: { type: "string", description: "Topic scope" },
|
|
2918
2899
|
text: { type: "string", description: "Canonical evidence text" },
|
|
2919
2900
|
source: { type: "string", description: "Source URL or source label" },
|
|
2920
2901
|
targetId: {
|
|
2921
2902
|
type: "string",
|
|
2922
|
-
description: "
|
|
2903
|
+
description: "Belief identifier to link immediately"
|
|
2923
2904
|
},
|
|
2924
2905
|
weight: {
|
|
2925
2906
|
type: "number",
|
|
2926
|
-
description: "
|
|
2907
|
+
description: "Required nonzero signed impact score: -1.0 (contradicts) to +1.0 (supports)."
|
|
2927
2908
|
},
|
|
2928
2909
|
evidenceRelation: {
|
|
2929
2910
|
type: "string",
|
|
@@ -2932,7 +2913,7 @@ var CREATE_EVIDENCE = {
|
|
|
2932
2913
|
},
|
|
2933
2914
|
confidence: {
|
|
2934
2915
|
type: "number",
|
|
2935
|
-
description: "
|
|
2916
|
+
description: "Deprecated hint. Runtime confidence is derived from the signed impact score."
|
|
2936
2917
|
},
|
|
2937
2918
|
beliefRelations: {
|
|
2938
2919
|
type: "array",
|
|
@@ -2954,7 +2935,7 @@ var CREATE_EVIDENCE = {
|
|
|
2954
2935
|
},
|
|
2955
2936
|
kind: { type: "string", description: "Optional evidence kind" }
|
|
2956
2937
|
},
|
|
2957
|
-
required: ["text", "rationale"],
|
|
2938
|
+
required: ["text", "rationale", "weight"],
|
|
2958
2939
|
response: {
|
|
2959
2940
|
description: "The created canonical evidence record",
|
|
2960
2941
|
fields: {
|
|
@@ -3029,7 +3010,7 @@ var LINK_EVIDENCE = {
|
|
|
3029
3010
|
},
|
|
3030
3011
|
rationale: { type: "string", description: "Why this link exists" }
|
|
3031
3012
|
},
|
|
3032
|
-
required: ["evidenceId", "targetId"],
|
|
3013
|
+
required: ["evidenceId", "targetId", "weight"],
|
|
3033
3014
|
response: {
|
|
3034
3015
|
description: "The created canonical evidence edge summary",
|
|
3035
3016
|
fields: {
|
|
@@ -3065,7 +3046,7 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
3065
3046
|
},
|
|
3066
3047
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
3067
3048
|
},
|
|
3068
|
-
required: ["evidenceId", "beliefId"],
|
|
3049
|
+
required: ["evidenceId", "beliefId", "weight"],
|
|
3069
3050
|
response: {
|
|
3070
3051
|
description: "The created edge linking evidence to belief",
|
|
3071
3052
|
fields: {
|
|
@@ -3884,6 +3865,11 @@ var COMPILE_CONTEXT = {
|
|
|
3884
3865
|
response: {
|
|
3885
3866
|
description: "Compiled context pack for the requested topic",
|
|
3886
3867
|
fields: {
|
|
3868
|
+
contextNarrative: "array \u2014 first field; ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
3869
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, topicsSynthesized, topicsEnriched, topicContentOmitted, enrichmentMode, and blocksEmitted for the narrative",
|
|
3870
|
+
synthesisLints: "array \u2014 inline quality warnings for degenerate synthesis blocks or weak narrative coverage",
|
|
3871
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
3872
|
+
supportingObjects: "object \u2014 raw graph records grouped behind the synthesis: invariants, activeBeliefs, openQuestions, recentEvidence, worktrees, lanes, entities, and contradictions",
|
|
3887
3873
|
schemaVersion: "string",
|
|
3888
3874
|
topicId: "string",
|
|
3889
3875
|
topicName: "string",
|
|
@@ -3891,15 +3877,6 @@ var COMPILE_CONTEXT = {
|
|
|
3891
3877
|
generatedAt: "number \u2014 deterministic graph-backed reference timestamp for this compilation",
|
|
3892
3878
|
ranking: "string \u2014 baseline_v1 | weighted_v1",
|
|
3893
3879
|
summary: "object \u2014 counts and scoped health signals",
|
|
3894
|
-
invariants: "array \u2014 high-confidence invariant beliefs",
|
|
3895
|
-
activeBeliefs: "array \u2014 current high-signal beliefs",
|
|
3896
|
-
openQuestions: "array \u2014 unresolved questions ranked for this query",
|
|
3897
|
-
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
3898
|
-
contradictions: "array \u2014 unresolved contradiction records",
|
|
3899
|
-
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
3900
|
-
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
3901
|
-
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
3902
|
-
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, topicsSynthesized, topicsEnriched, topicContentOmitted, enrichmentMode, and blocksEmitted for the narrative",
|
|
3903
3880
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
3904
3881
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
3905
3882
|
}
|
|
@@ -5318,7 +5295,7 @@ var TRIGGER_BELIEF_REVIEW = {
|
|
|
5318
5295
|
};
|
|
5319
5296
|
var EVALUATE_CONTRACT = {
|
|
5320
5297
|
name: "evaluate_contract",
|
|
5321
|
-
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
|
|
5298
|
+
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.",
|
|
5322
5299
|
parameters: {
|
|
5323
5300
|
contractId: { type: "string", description: "Which contract to evaluate" },
|
|
5324
5301
|
trigger: {
|
|
@@ -5674,7 +5651,7 @@ var MCP_TOOL_CONTRACTS = {
|
|
|
5674
5651
|
create_belief: CREATE_BELIEF,
|
|
5675
5652
|
get_belief: GET_BELIEF,
|
|
5676
5653
|
refine_belief: REFINE_BELIEF,
|
|
5677
|
-
|
|
5654
|
+
append_sl_scoring: APPEND_SL_SCORING,
|
|
5678
5655
|
fork_belief: FORK_BELIEF,
|
|
5679
5656
|
archive_belief: ARCHIVE_BELIEF,
|
|
5680
5657
|
create_epistemic_contract: CREATE_EPISTEMIC_CONTRACT,
|