@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
package/dist/tool-contracts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpToolContract } from './tool-contracts.types.js';
|
|
2
2
|
export { McpParameterDef, McpResponseDef } from './tool-contracts.types.js';
|
|
3
|
-
export { ADD_EVIDENCE, ARCHIVE_BELIEF, CREATE_BELIEF, CREATE_EPISTEMIC_CONTRACT, FLAG_CONTRADICTION, FORK_BELIEF, GET_BELIEF,
|
|
3
|
+
export { ADD_EVIDENCE, APPEND_SL_SCORING, ARCHIVE_BELIEF, CREATE_BELIEF, CREATE_EPISTEMIC_CONTRACT, FLAG_CONTRADICTION, FORK_BELIEF, GET_BELIEF, REFINE_BELIEF } from './tool-contracts.lifecycle.js';
|
|
4
4
|
export { ADD_WORKTREE, MERGE, OPEN_PULL_REQUEST, PUSH } from './tool-contracts.worktrees.js';
|
|
5
5
|
export { BATCH_CREATE_EDGES, BISECT_CONFIDENCE, CREATE_EDGE, FIND_CONTRADICTIONS, GET_AUDIT_TRAIL, GET_CONFIDENCE_HISTORY, GET_GRAPH_NEIGHBORHOOD, QUERY_LINEAGE, REMOVE_EDGE, REMOVE_EDGES_BETWEEN, SEARCH_BELIEFS, TRACE_ENTITY_IMPACT, TRAVERSE_GRAPH, UPDATE_EDGE } from './tool-contracts.graph.js';
|
|
6
6
|
export { GET_EMBEDDINGS_BY_NODE_IDS, LIST_MISSING_EMBEDDINGS, QUEUE_EMBEDDING_BACKFILL, SEARCH_EMBEDDINGS } from './tool-contracts.embeddings.js';
|
|
@@ -15,7 +15,7 @@ var REASONING_METHODS = [
|
|
|
15
15
|
// src/tool-contracts.graph.ts
|
|
16
16
|
var QUERY_LINEAGE = {
|
|
17
17
|
name: "query_lineage",
|
|
18
|
-
description: "Trace a belief's full ancestry \u2014 every fork, score, and
|
|
18
|
+
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).",
|
|
19
19
|
parameters: {
|
|
20
20
|
nodeId: { type: "string", description: "Starting node to trace from" },
|
|
21
21
|
depth: {
|
|
@@ -214,7 +214,7 @@ var FIND_CONTRADICTIONS = {
|
|
|
214
214
|
};
|
|
215
215
|
var BISECT_CONFIDENCE = {
|
|
216
216
|
name: "bisect_confidence",
|
|
217
|
-
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
|
|
217
|
+
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.",
|
|
218
218
|
parameters: {
|
|
219
219
|
nodeId: { type: "string", description: "The belief to bisect" },
|
|
220
220
|
expectedDirection: {
|
|
@@ -233,7 +233,7 @@ var BISECT_CONFIDENCE = {
|
|
|
233
233
|
fields: {
|
|
234
234
|
beliefId: "string \u2014 canonical belief ID",
|
|
235
235
|
expectedDirection: "string \u2014 overconfident | underconfident",
|
|
236
|
-
inflectionEntry: "object \u2014 the
|
|
236
|
+
inflectionEntry: "object \u2014 the scoring event where divergence began",
|
|
237
237
|
triggerEvent: "string | null \u2014 what caused the divergence",
|
|
238
238
|
confidenceBefore: "number | null",
|
|
239
239
|
confidenceAfter: "number | null",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/reasoning-method.ts","../src/tool-contracts.graph.ts"],"names":[],"mappings":";AACO,IAAM,iBAAA,GAAoB;AAAA,EAC/B,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA;;;ACTO,IAAM,aAAA,GAAiC;AAAA,EAC5C,IAAA,EAAM,eAAA;AAAA,EACN,WAAA,EACE,8PAAA;AAAA,EAIF,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,6BAAA,EAA8B;AAAA,IACrE,KAAA,EA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U,CAAA;AAAA,EACnC,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,6BAAA;AAAA,IACb,MAAA,EAAQ,EAAE,OAAA,EAAS,QAAA;AAAS,GAC9B;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,IAAA,EAAM;AACR;AAEO,IAAM,kBAAA,GAAsC;AAAA,EACjD,IAAA,EAAM,oBAAA;AAAA,EACN,WAAA,EACE,kJAAA;AAAA,EAEF,UAAA,EAAY;AAAA,IACV,KAAA,EAAO;AAAA,MACL,IAAA,EAAM,OAAA;AAAA,MACN,WAAA,EACE;AAAA,KACJ;AAAA,IACA,mBAAA,EAAqB;AAAA,MACnB,IAAA,EAAM,SAAA;AAAA,MACN,WAAA,EAAa;AAAA;AACf,GACF;AAAA,EACA,QAAA,EAAU,CAAC,OAAO,CAAA;AAAA,EAClB,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,4BAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,OAAA,EAAS,QAAA;AAAA,MACT,OAAA,EAAS,OAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,IAAA,EAAM;AACR","file":"tool-contracts.graph.js","sourcesContent":["/** Reasoning methods supported by the kernel edge schema. */\nexport const REASONING_METHODS = [\n \"deductive\",\n \"inductive\",\n \"abductive\",\n \"analogical\",\n \"causal\",\n \"correlational\",\n \"testimonial\",\n \"statistical\",\n \"implicit\",\n \"pattern_match\",\n] as const;\n\nexport type ReasoningMethod = (typeof REASONING_METHODS)[number];\n","import type { McpToolContract } from \"./tool-contracts.types\";\nimport { REASONING_METHODS } from \"./api-enums.contract\";\n\nexport const QUERY_LINEAGE: McpToolContract = {\n name: \"query_lineage\",\n description:\n \"Trace a belief's full ancestry — every fork, score, and confidence modulation. \" +\n \"Like `git log --graph`. \" +\n \"Returns the complete evolution chain showing how understanding developed over time. \" +\n \"Lineage is permanent and can never be erased (Invariant #3).\",\n parameters: {\n nodeId: { type: \"string\", description: \"Starting node to trace from\" },\n depth: {\n type: \"number\",\n description: \"How many generations to traverse (default: 5)\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Canonical lineage result\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n lineage: \"array — ancestry entries with beliefId, nodeId, formulation, forkReason, and createdAt\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const GET_CONFIDENCE_HISTORY: McpToolContract = {\n name: \"get_confidence_history\",\n description:\n \"Get the full confidence history for a belief. \" +\n \"Each entry records the confidence level, trigger, rationale, and actor. \" +\n \"Like `git log` for a single metric — append-only, never overwritten.\",\n parameters: {\n nodeId: { type: \"string\", description: \"The belief to get history for\" },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Confidence history entries\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n entries: \"array — { confidence, trigger, rationale, timestamp, userId }\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const GET_AUDIT_TRAIL: McpToolContract = {\n name: \"get_audit_trail\",\n description:\n \"Get the full audit trail for a node — every mutation, who made it, when, and why. \" +\n \"Like `git blame` for knowledge. \" +\n \"All state transitions are explicit, attributable, and permanently queryable. \" +\n \"No silent changes are possible (Invariant #14).\",\n parameters: {\n nodeId: { type: \"string\", description: \"The node to audit\" },\n limit: {\n type: \"number\",\n description: \"Maximum entries to return (default: 50)\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Audit trail entries\",\n fields: {\n entries: \"array — { action, actor, timestamp, before, after, rationale }\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// GRAPH QUERY TOOLS\n// =============================================================================\n\nexport const TRAVERSE_GRAPH: McpToolContract = {\n name: \"traverse_graph\",\n description:\n \"Walk the reasoning graph from a starting node. \" +\n \"Like `git log --graph` — traverses connected lineage across nodes and edges. \" +\n \"Traversal follows epistemic layers: L4 (judgments) → L3 (beliefs, questions) → L2 (evidence) → L1 (sources). \" +\n \"Never skips layers. \" +\n \"Use direction 'up' to trace what a piece of evidence supports, 'down' to trace what supports a judgment.\",\n parameters: {\n startNode: { type: \"string\", description: \"Node to start traversal from\" },\n direction: {\n type: \"string\",\n description: \"Traversal direction\",\n enum: [\"up\", \"down\", \"both\"],\n },\n maxDepth: {\n type: \"number\",\n description: \"Maximum traversal depth (default: 3)\",\n },\n },\n required: [\"startNode\"],\n response: {\n description: \"Subgraph of traversed nodes and edges\",\n fields: {\n nodes: \"array — traversed nodes\",\n edges: \"array — traversed edges\",\n depth: \"number\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const GET_GRAPH_NEIGHBORHOOD: McpToolContract = {\n name: \"get_graph_neighborhood\",\n description:\n \"Retrieve the local neighborhood around one or more graph nodes. \" +\n \"Like `git log --graph --boundary` for a focused reasoning window. \" +\n \"Returns the canonical neighborhood payload shared by HTTP and SDK graph surfaces.\",\n parameters: {\n globalId: {\n type: \"string\",\n description: \"Single root node global identifier.\",\n },\n globalIds: {\n type: \"array\",\n description: \"Optional list of root node global identifiers.\",\n },\n maxDepth: {\n type: \"number\",\n description: \"Maximum traversal depth (default: 2).\",\n },\n },\n required: [],\n response: {\n description: \"Canonical graph neighborhood payload\",\n fields: {\n nodes: \"array — graph nodes in the returned neighborhood\",\n edges: \"array — graph edges in the returned neighborhood\",\n depth: \"number — deepest traversed node depth\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const TRACE_ENTITY_IMPACT: McpToolContract = {\n name: \"trace_entity_impact\",\n description:\n \"Returns code-grounded beliefs, contracts, migration states, and failed attempts \" +\n \"anchored to a specific file or function path. \" +\n \"Like `git log -- <path>` — filters the knowledge graph to nodes anchored to a file path \" +\n \"via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, \" +\n \"migrations, patterns, deprecations, and failures.\",\n parameters: {\n nodeId: {\n type: \"string\",\n description: \"Entity node ID to trace impact from\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description:\n \"Entity impact trace: direct beliefs, evidence, and indirect belief reach\",\n fields: {\n entityNodeId: \"string — the traced entity\",\n entityType: \"string — nodeType of the entity\",\n directBeliefConnections:\n \"array — beliefs directly connected via bridge edges\",\n evidenceConnections: \"array — evidence referencing this entity\",\n indirectBeliefConnections: \"array — beliefs reached through evidence\",\n totalBeliefReach: \"number — total unique beliefs impacted\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const SEARCH_BELIEFS: McpToolContract = {\n name: \"search_beliefs\",\n description:\n \"Search for beliefs in the reasoning graph. \" +\n \"Like `git grep` — finds relevant beliefs across the full history and active state. \" +\n \"Supports semantic search, filtering by status (unscored, scored, archived), \" +\n \"confidence thresholds, and topic scope. \" +\n \"Returns beliefs with their current confidence, lineage depth, and contradiction count.\",\n parameters: {\n query: { type: \"string\", description: \"Semantic search query\" },\n status: {\n type: \"string\",\n description: \"Filter by belief status\",\n enum: [\"unscored\", \"scored\", \"archived\"],\n },\n minConfidence: {\n type: \"number\",\n description: \"Minimum confidence threshold (0-1)\",\n },\n topicId: { type: \"string\", description: \"Filter by topic\" },\n limit: { type: \"number\", description: \"Maximum results (default: 10)\" },\n },\n required: [\"query\"],\n response: {\n description: \"Matching beliefs with metadata\",\n fields: {\n results:\n \"array — { nodeId, canonicalText, confidence, status, contradictionCount }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const FIND_CONTRADICTIONS: McpToolContract = {\n name: \"find_contradictions\",\n description:\n \"Find contradictions in the reasoning graph — beliefs that are in tension with each other. \" +\n \"Like a merge conflict in `git` — surfaces incompatible states that require explicit resolution. \" +\n \"Contradictions are first-class objects that may remain permanently unresolved. \" +\n \"They can block judgments, trigger forks, or collapse confidence. \" +\n \"Filter by project, status (unresolved, resolved, accepted), and severity.\",\n parameters: {\n topicId: { type: \"string\", description: \"Filter by topic\" },\n nodeId: {\n type: \"string\",\n description: \"Find contradictions involving a specific belief\",\n },\n status: {\n type: \"string\",\n description: \"Filter by status\",\n enum: [\"unresolved\", \"resolved\", \"accepted\"],\n },\n },\n required: [],\n response: {\n description: \"Contradiction objects\",\n fields: {\n contradictions:\n \"array — { beliefA, beliefB, description, severity, status, defeatType }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// EDGE TOOLS\n// =============================================================================\n\nexport const BISECT_CONFIDENCE: McpToolContract = {\n name: \"bisect_confidence\",\n description:\n \"Find when a belief's confidence diverged from reality. \" +\n \"Like `git bisect` — binary search through the credence history to find the inflection point. \" +\n \"Given a belief that is now known to be wrong (or right), traces back through \" +\n \"confidence modulations to identify which evidence or event caused the divergence.\",\n parameters: {\n nodeId: { type: \"string\", description: \"The belief to bisect\" },\n expectedDirection: {\n type: \"string\",\n description: \"Was confidence too high or too low?\",\n enum: [\"overconfident\", \"underconfident\"],\n },\n timeRange: {\n type: \"object\",\n description:\n \"Optional time range to search within: { start: number, end: number }\",\n },\n },\n required: [\"nodeId\", \"expectedDirection\"],\n response: {\n description: \"The inflection point in confidence history\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n expectedDirection: \"string — overconfident | underconfident\",\n inflectionEntry:\n \"object — the confidence modulation where divergence began\",\n triggerEvent: \"string | null — what caused the divergence\",\n confidenceBefore: \"number | null\",\n confidenceAfter: \"number | null\",\n totalEntries: \"number\",\n inflectionIndex: \"number | null\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// GRAPH INTELLIGENCE TOOLS\n// =============================================================================\n\nexport const CREATE_EDGE: McpToolContract = {\n name: \"create_edge\",\n description:\n \"Commit a typed relationship between two nodes in the reasoning graph. \" +\n \"Like `git commit` — an atomic write that declares a dependency between nodes. \" +\n \"Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.\",\n parameters: {\n from: {\n type: \"object\",\n description:\n \"Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }\",\n },\n to: {\n type: \"object\",\n description:\n \"Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }\",\n },\n edgeType: {\n type: \"string\",\n description:\n \"Relationship type from the public epistemic edge enum.\",\n },\n globalId: {\n type: \"string\",\n description: \"Optional idempotent edge global ID.\",\n },\n weight: {\n type: \"number\",\n description:\n \"Edge weight: -1.0 to +1.0 for informs edges, 0-1 for structural\",\n },\n reasoning: { type: \"string\", description: \"Why this relationship exists\" },\n reasoningMethod: {\n type: \"string\",\n description: \"How this was determined\",\n enum: [...REASONING_METHODS],\n },\n metadata: {\n type: \"object\",\n description: \"Optional edge metadata.\",\n },\n },\n required: [\"from\", \"to\", \"edgeType\"],\n response: {\n description: \"The created edge\",\n fields: {\n globalId: \"string — edge identifier\",\n edgeType: \"string\",\n fromLayer: \"string\",\n toLayer: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"showcase\",\n};\n\nexport const UPDATE_EDGE: McpToolContract = {\n name: \"update_edge\",\n description:\n \"Amend metadata on an existing graph edge. \" +\n \"Like `git commit --amend` — changes the edge annotation without recreating the relationship.\",\n parameters: {\n edgeId: { type: \"string\", description: \"Edge ID or global ID to update\" },\n weight: { type: \"number\", description: \"Updated edge weight\" },\n confidence: { type: \"number\", description: \"Updated confidence\" },\n context: { type: \"string\", description: \"Updated human-readable context\" },\n derivationType: { type: \"string\", description: \"Updated derivation type\" },\n metadata: { type: \"object\", description: \"Updated metadata\" },\n },\n required: [\"edgeId\"],\n response: {\n description: \"Edge update result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const REMOVE_EDGE: McpToolContract = {\n name: \"remove_edge\",\n description:\n \"Remove one graph edge by ID. \" +\n \"Like `git rm` — deletes a single explicit relationship from the spine.\",\n parameters: {\n edgeId: { type: \"string\", description: \"Edge ID or global ID to remove\" },\n },\n required: [\"edgeId\"],\n response: {\n description: \"Edge removal result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const REMOVE_EDGES_BETWEEN: McpToolContract = {\n name: \"remove_edges_between\",\n description:\n \"Remove graph edges between two nodes. \" +\n \"Like `git rm <pathspec>` — deletes relationships matching a source, target, and optional type.\",\n parameters: {\n fromNodeId: { type: \"string\", description: \"Source node ID or global ID\" },\n toNodeId: { type: \"string\", description: \"Target node ID or global ID\" },\n edgeType: { type: \"string\", description: \"Optional edge type filter\" },\n },\n required: [\"fromNodeId\", \"toNodeId\"],\n response: {\n description: \"Matched edge removal result\",\n fields: { deleted: \"number\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const BATCH_CREATE_EDGES: McpToolContract = {\n name: \"batch_create_edges\",\n description:\n \"Commit multiple typed graph edges. \" +\n \"Like `git commit` with many staged paths — writes a batch of explicit relationships atomically per edge.\",\n parameters: {\n edges: {\n type: \"array\",\n description:\n \"Edges to create, each with from, to, edgeType, and optional weight/confidence/context.\",\n },\n skipLayerValidation: {\n type: \"boolean\",\n description: \"Skip kernel layer validation for trusted materialization flows.\",\n },\n },\n required: [\"edges\"],\n response: {\n description: \"Batch edge creation result\",\n fields: {\n created: \"number\",\n results: \"array\",\n errors: \"array\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// EPISTEMIC NODE TOOLS\n// =============================================================================\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/reasoning-method.ts","../src/tool-contracts.graph.ts"],"names":[],"mappings":";AACO,IAAM,iBAAA,GAAoB;AAAA,EAC/B,WAAA;AAAA,EACA,WAAA;AAAA,EACA,WAAA;AAAA,EACA,YAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,aAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF,CAAA;;;ACTO,IAAM,aAAA,GAAiC;AAAA,EAC5C,IAAA,EAAM,eAAA;AAAA,EACN,WAAA,EACE,yPAAA;AAAA,EAIF,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,6BAAA,EAA8B;AAAA,IACrE,KAAA,EAAO;AAAA,MACL,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA;AACf,GACF;AAAA,EACA,QAAA,EAAU,CAAC,QAAQ,CAAA;AAAA,EACnB,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,0BAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,QAAA,EAAU,mCAAA;AAAA,MACV,OAAA,EAAS;AAAA;AACX,GACF;AAAA,EACA,WAAA,EAAa,cAAA;AAAA,EACb,iBAAA,EAAmB,QAAA;AAAA,EACnB,IAAA,EAAM;AACR;AAEO,IAAM,sBAAA,GAA0C;AAAA,EACrD,IAAA,EAAM,wBAAA;AAAA,EACN,WAAA,EACE,iMAAA;AAAA,EAGF,UAAA,EAAY;AAAA,IACV,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,+BAAA;AAAgC,GACzE;AAAA,EACA,QAAA,EAAU,CAAC,QAAQ,CAAA;AAAA,EACnB,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,4BAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,QA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AAS,OAAA;AAAA,MACT,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,IAAA,EAAM;AACR","file":"tool-contracts.graph.js","sourcesContent":["/** Reasoning methods supported by the kernel edge schema. */\nexport const REASONING_METHODS = [\n \"deductive\",\n \"inductive\",\n \"abductive\",\n \"analogical\",\n \"causal\",\n \"correlational\",\n \"testimonial\",\n \"statistical\",\n \"implicit\",\n \"pattern_match\",\n] as const;\n\nexport type ReasoningMethod = (typeof REASONING_METHODS)[number];\n","import type { McpToolContract } from \"./tool-contracts.types\";\nimport { REASONING_METHODS } from \"./api-enums.contract\";\n\nexport const QUERY_LINEAGE: McpToolContract = {\n name: \"query_lineage\",\n description:\n \"Trace a belief's full ancestry — every fork, score, and SL scoring event. \" +\n \"Like `git log --graph`. \" +\n \"Returns the complete evolution chain showing how understanding developed over time. \" +\n \"Lineage is permanent and can never be erased (Invariant #3).\",\n parameters: {\n nodeId: { type: \"string\", description: \"Starting node to trace from\" },\n depth: {\n type: \"number\",\n description: \"How many generations to traverse (default: 5)\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Canonical lineage result\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n lineage: \"array — ancestry entries with beliefId, nodeId, formulation, forkReason, and createdAt\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const GET_CONFIDENCE_HISTORY: McpToolContract = {\n name: \"get_confidence_history\",\n description:\n \"Get the full confidence history for a belief. \" +\n \"Each entry records the confidence level, trigger, rationale, and actor. \" +\n \"Like `git log` for a single metric — append-only, never overwritten.\",\n parameters: {\n nodeId: { type: \"string\", description: \"The belief to get history for\" },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Confidence history entries\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n entries: \"array — { confidence, trigger, rationale, timestamp, userId }\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const GET_AUDIT_TRAIL: McpToolContract = {\n name: \"get_audit_trail\",\n description:\n \"Get the full audit trail for a node — every mutation, who made it, when, and why. \" +\n \"Like `git blame` for knowledge. \" +\n \"All state transitions are explicit, attributable, and permanently queryable. \" +\n \"No silent changes are possible (Invariant #14).\",\n parameters: {\n nodeId: { type: \"string\", description: \"The node to audit\" },\n limit: {\n type: \"number\",\n description: \"Maximum entries to return (default: 50)\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Audit trail entries\",\n fields: {\n entries: \"array — { action, actor, timestamp, before, after, rationale }\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// GRAPH QUERY TOOLS\n// =============================================================================\n\nexport const TRAVERSE_GRAPH: McpToolContract = {\n name: \"traverse_graph\",\n description:\n \"Walk the reasoning graph from a starting node. \" +\n \"Like `git log --graph` — traverses connected lineage across nodes and edges. \" +\n \"Traversal follows epistemic layers: L4 (judgments) → L3 (beliefs, questions) → L2 (evidence) → L1 (sources). \" +\n \"Never skips layers. \" +\n \"Use direction 'up' to trace what a piece of evidence supports, 'down' to trace what supports a judgment.\",\n parameters: {\n startNode: { type: \"string\", description: \"Node to start traversal from\" },\n direction: {\n type: \"string\",\n description: \"Traversal direction\",\n enum: [\"up\", \"down\", \"both\"],\n },\n maxDepth: {\n type: \"number\",\n description: \"Maximum traversal depth (default: 3)\",\n },\n },\n required: [\"startNode\"],\n response: {\n description: \"Subgraph of traversed nodes and edges\",\n fields: {\n nodes: \"array — traversed nodes\",\n edges: \"array — traversed edges\",\n depth: \"number\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const GET_GRAPH_NEIGHBORHOOD: McpToolContract = {\n name: \"get_graph_neighborhood\",\n description:\n \"Retrieve the local neighborhood around one or more graph nodes. \" +\n \"Like `git log --graph --boundary` for a focused reasoning window. \" +\n \"Returns the canonical neighborhood payload shared by HTTP and SDK graph surfaces.\",\n parameters: {\n globalId: {\n type: \"string\",\n description: \"Single root node global identifier.\",\n },\n globalIds: {\n type: \"array\",\n description: \"Optional list of root node global identifiers.\",\n },\n maxDepth: {\n type: \"number\",\n description: \"Maximum traversal depth (default: 2).\",\n },\n },\n required: [],\n response: {\n description: \"Canonical graph neighborhood payload\",\n fields: {\n nodes: \"array — graph nodes in the returned neighborhood\",\n edges: \"array — graph edges in the returned neighborhood\",\n depth: \"number — deepest traversed node depth\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const TRACE_ENTITY_IMPACT: McpToolContract = {\n name: \"trace_entity_impact\",\n description:\n \"Returns code-grounded beliefs, contracts, migration states, and failed attempts \" +\n \"anchored to a specific file or function path. \" +\n \"Like `git log -- <path>` — filters the knowledge graph to nodes anchored to a file path \" +\n \"via metadata.codeAnchors. Results are separated by coding belief type: decisions, contracts, \" +\n \"migrations, patterns, deprecations, and failures.\",\n parameters: {\n nodeId: {\n type: \"string\",\n description: \"Entity node ID to trace impact from\",\n },\n },\n required: [\"nodeId\"],\n response: {\n description:\n \"Entity impact trace: direct beliefs, evidence, and indirect belief reach\",\n fields: {\n entityNodeId: \"string — the traced entity\",\n entityType: \"string — nodeType of the entity\",\n directBeliefConnections:\n \"array — beliefs directly connected via bridge edges\",\n evidenceConnections: \"array — evidence referencing this entity\",\n indirectBeliefConnections: \"array — beliefs reached through evidence\",\n totalBeliefReach: \"number — total unique beliefs impacted\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const SEARCH_BELIEFS: McpToolContract = {\n name: \"search_beliefs\",\n description:\n \"Search for beliefs in the reasoning graph. \" +\n \"Like `git grep` — finds relevant beliefs across the full history and active state. \" +\n \"Supports semantic search, filtering by status (unscored, scored, archived), \" +\n \"confidence thresholds, and topic scope. \" +\n \"Returns beliefs with their current confidence, lineage depth, and contradiction count.\",\n parameters: {\n query: { type: \"string\", description: \"Semantic search query\" },\n status: {\n type: \"string\",\n description: \"Filter by belief status\",\n enum: [\"unscored\", \"scored\", \"archived\"],\n },\n minConfidence: {\n type: \"number\",\n description: \"Minimum confidence threshold (0-1)\",\n },\n topicId: { type: \"string\", description: \"Filter by topic\" },\n limit: { type: \"number\", description: \"Maximum results (default: 10)\" },\n },\n required: [\"query\"],\n response: {\n description: \"Matching beliefs with metadata\",\n fields: {\n results:\n \"array — { nodeId, canonicalText, confidence, status, contradictionCount }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"workhorse\",\n};\n\nexport const FIND_CONTRADICTIONS: McpToolContract = {\n name: \"find_contradictions\",\n description:\n \"Find contradictions in the reasoning graph — beliefs that are in tension with each other. \" +\n \"Like a merge conflict in `git` — surfaces incompatible states that require explicit resolution. \" +\n \"Contradictions are first-class objects that may remain permanently unresolved. \" +\n \"They can block judgments, trigger forks, or collapse confidence. \" +\n \"Filter by project, status (unresolved, resolved, accepted), and severity.\",\n parameters: {\n topicId: { type: \"string\", description: \"Filter by topic\" },\n nodeId: {\n type: \"string\",\n description: \"Find contradictions involving a specific belief\",\n },\n status: {\n type: \"string\",\n description: \"Filter by status\",\n enum: [\"unresolved\", \"resolved\", \"accepted\"],\n },\n },\n required: [],\n response: {\n description: \"Contradiction objects\",\n fields: {\n contradictions:\n \"array — { beliefA, beliefB, description, severity, status, defeatType }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// EDGE TOOLS\n// =============================================================================\n\nexport const BISECT_CONFIDENCE: McpToolContract = {\n name: \"bisect_confidence\",\n description:\n \"Find when a belief's confidence diverged from reality. \" +\n \"Like `git bisect` — binary search through the credence history to find the inflection point. \" +\n \"Given a belief that is now known to be wrong (or right), traces back through \" +\n \"SL scoring events to identify which evidence or event caused the divergence.\",\n parameters: {\n nodeId: { type: \"string\", description: \"The belief to bisect\" },\n expectedDirection: {\n type: \"string\",\n description: \"Was confidence too high or too low?\",\n enum: [\"overconfident\", \"underconfident\"],\n },\n timeRange: {\n type: \"object\",\n description:\n \"Optional time range to search within: { start: number, end: number }\",\n },\n },\n required: [\"nodeId\", \"expectedDirection\"],\n response: {\n description: \"The inflection point in confidence history\",\n fields: {\n beliefId: \"string — canonical belief ID\",\n expectedDirection: \"string — overconfident | underconfident\",\n inflectionEntry: \"object — the scoring event where divergence began\",\n triggerEvent: \"string | null — what caused the divergence\",\n confidenceBefore: \"number | null\",\n confidenceAfter: \"number | null\",\n totalEntries: \"number\",\n inflectionIndex: \"number | null\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"belief\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// GRAPH INTELLIGENCE TOOLS\n// =============================================================================\n\nexport const CREATE_EDGE: McpToolContract = {\n name: \"create_edge\",\n description:\n \"Commit a typed relationship between two nodes in the reasoning graph. \" +\n \"Like `git commit` — an atomic write that declares a dependency between nodes. \" +\n \"Accepts any public epistemic edge type between public graph node refs so agents can author the full spine.\",\n parameters: {\n from: {\n type: \"object\",\n description:\n \"Source graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'topic' }\",\n },\n to: {\n type: \"object\",\n description:\n \"Target graph ref, e.g. { kind: 'epistemic_node', nodeId: '...', nodeType: 'belief' }\",\n },\n edgeType: {\n type: \"string\",\n description:\n \"Relationship type from the public epistemic edge enum.\",\n },\n globalId: {\n type: \"string\",\n description: \"Optional idempotent edge global ID.\",\n },\n weight: {\n type: \"number\",\n description:\n \"Edge weight: -1.0 to +1.0 for informs edges, 0-1 for structural\",\n },\n reasoning: { type: \"string\", description: \"Why this relationship exists\" },\n reasoningMethod: {\n type: \"string\",\n description: \"How this was determined\",\n enum: [...REASONING_METHODS],\n },\n metadata: {\n type: \"object\",\n description: \"Optional edge metadata.\",\n },\n },\n required: [\"from\", \"to\", \"edgeType\"],\n response: {\n description: \"The created edge\",\n fields: {\n globalId: \"string — edge identifier\",\n edgeType: \"string\",\n fromLayer: \"string\",\n toLayer: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"showcase\",\n};\n\nexport const UPDATE_EDGE: McpToolContract = {\n name: \"update_edge\",\n description:\n \"Amend metadata on an existing graph edge. \" +\n \"Like `git commit --amend` — changes the edge annotation without recreating the relationship.\",\n parameters: {\n edgeId: { type: \"string\", description: \"Edge ID or global ID to update\" },\n weight: { type: \"number\", description: \"Updated edge weight\" },\n confidence: { type: \"number\", description: \"Updated confidence\" },\n context: { type: \"string\", description: \"Updated human-readable context\" },\n derivationType: { type: \"string\", description: \"Updated derivation type\" },\n metadata: { type: \"object\", description: \"Updated metadata\" },\n },\n required: [\"edgeId\"],\n response: {\n description: \"Edge update result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const REMOVE_EDGE: McpToolContract = {\n name: \"remove_edge\",\n description:\n \"Remove one graph edge by ID. \" +\n \"Like `git rm` — deletes a single explicit relationship from the spine.\",\n parameters: {\n edgeId: { type: \"string\", description: \"Edge ID or global ID to remove\" },\n },\n required: [\"edgeId\"],\n response: {\n description: \"Edge removal result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const REMOVE_EDGES_BETWEEN: McpToolContract = {\n name: \"remove_edges_between\",\n description:\n \"Remove graph edges between two nodes. \" +\n \"Like `git rm <pathspec>` — deletes relationships matching a source, target, and optional type.\",\n parameters: {\n fromNodeId: { type: \"string\", description: \"Source node ID or global ID\" },\n toNodeId: { type: \"string\", description: \"Target node ID or global ID\" },\n edgeType: { type: \"string\", description: \"Optional edge type filter\" },\n },\n required: [\"fromNodeId\", \"toNodeId\"],\n response: {\n description: \"Matched edge removal result\",\n fields: { deleted: \"number\" },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const BATCH_CREATE_EDGES: McpToolContract = {\n name: \"batch_create_edges\",\n description:\n \"Commit multiple typed graph edges. \" +\n \"Like `git commit` with many staged paths — writes a batch of explicit relationships atomically per edge.\",\n parameters: {\n edges: {\n type: \"array\",\n description:\n \"Edges to create, each with from, to, edgeType, and optional weight/confidence/context.\",\n },\n skipLayerValidation: {\n type: \"boolean\",\n description: \"Skip kernel layer validation for trusted materialization flows.\",\n },\n },\n required: [\"edges\"],\n response: {\n description: \"Batch edge creation result\",\n fields: {\n created: \"number\",\n results: \"array\",\n errors: \"array\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// EPISTEMIC NODE TOOLS\n// =============================================================================\n"]}
|
|
@@ -152,18 +152,18 @@ var SEARCH_EVIDENCE = {
|
|
|
152
152
|
};
|
|
153
153
|
var CREATE_EVIDENCE = {
|
|
154
154
|
name: "create_evidence",
|
|
155
|
-
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs.
|
|
155
|
+
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.",
|
|
156
156
|
parameters: {
|
|
157
157
|
topicId: { type: "string", description: "Topic scope" },
|
|
158
158
|
text: { type: "string", description: "Canonical evidence text" },
|
|
159
159
|
source: { type: "string", description: "Source URL or source label" },
|
|
160
160
|
targetId: {
|
|
161
161
|
type: "string",
|
|
162
|
-
description: "
|
|
162
|
+
description: "Belief identifier to link immediately"
|
|
163
163
|
},
|
|
164
164
|
weight: {
|
|
165
165
|
type: "number",
|
|
166
|
-
description: "
|
|
166
|
+
description: "Required nonzero signed impact score: -1.0 (contradicts) to +1.0 (supports)."
|
|
167
167
|
},
|
|
168
168
|
evidenceRelation: {
|
|
169
169
|
type: "string",
|
|
@@ -172,7 +172,7 @@ var CREATE_EVIDENCE = {
|
|
|
172
172
|
},
|
|
173
173
|
confidence: {
|
|
174
174
|
type: "number",
|
|
175
|
-
description: "
|
|
175
|
+
description: "Deprecated hint. Runtime confidence is derived from the signed impact score."
|
|
176
176
|
},
|
|
177
177
|
beliefRelations: {
|
|
178
178
|
type: "array",
|
|
@@ -194,7 +194,7 @@ var CREATE_EVIDENCE = {
|
|
|
194
194
|
},
|
|
195
195
|
kind: { type: "string", description: "Optional evidence kind" }
|
|
196
196
|
},
|
|
197
|
-
required: ["text", "rationale"],
|
|
197
|
+
required: ["text", "rationale", "weight"],
|
|
198
198
|
response: {
|
|
199
199
|
description: "The created canonical evidence record",
|
|
200
200
|
fields: {
|
|
@@ -269,7 +269,7 @@ var LINK_EVIDENCE = {
|
|
|
269
269
|
},
|
|
270
270
|
rationale: { type: "string", description: "Why this link exists" }
|
|
271
271
|
},
|
|
272
|
-
required: ["evidenceId", "targetId"],
|
|
272
|
+
required: ["evidenceId", "targetId", "weight"],
|
|
273
273
|
response: {
|
|
274
274
|
description: "The created canonical evidence edge summary",
|
|
275
275
|
fields: {
|
|
@@ -305,7 +305,7 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
305
305
|
},
|
|
306
306
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
307
307
|
},
|
|
308
|
-
required: ["evidenceId", "beliefId"],
|
|
308
|
+
required: ["evidenceId", "beliefId", "weight"],
|
|
309
309
|
response: {
|
|
310
310
|
description: "The created edge linking evidence to belief",
|
|
311
311
|
fields: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tool-contracts.intelligence-evidence.ts"],"names":[],"mappings":";AAEO,IAAM,wBAAA,GAA4C;AAAA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AAAA,EACnB,IAAA,EAAM;AACR","file":"tool-contracts.intelligence-evidence.js","sourcesContent":["import type { McpToolContract } from \"./tool-contracts.types\";\n\nexport const DETECT_CONFIRMATION_BIAS: McpToolContract = {\n name: \"detect_confirmation_bias\",\n description:\n \"Detect confirmation bias in the evidence graph. \" +\n \"Like `git diff --stat` for reasoning — analyzes the ratio of supporting vs challenging evidence \" +\n \"per belief and flags beliefs where the evidence is suspiciously one-sided. \" +\n \"Returns risk classification (critical/high/moderate/healthy).\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n threshold: {\n type: \"number\",\n description: \"Bias threshold (0-1, default 0.7)\",\n },\n },\n required: [\"topicId\"],\n response: {\n description: \"Beliefs with bias scores, risk levels, and evidence counts\",\n fields: {\n beliefs:\n \"array — { nodeId, biasScore, riskLevel, supportingCount, challengingCount }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const GET_GRAPH_STRUCTURE_ANALYSIS: McpToolContract = {\n name: \"get_graph_structure_analysis\",\n description:\n \"Run comprehensive structural analysis on the knowledge graph. \" +\n \"Like `git fsck` combined with PageRank — runs 14 algorithmic detectors including \" +\n \"PageRank centrality, Louvain community detection, Tarjan SCC, Fiedler vector spectral analysis, \" +\n \"Bayesian surprise, and overconfidence detection.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Structural analysis with detector results and recommendations\",\n fields: {\n topicId: \"string — canonical topic scope\",\n metric: \"string — analysis metric identifier\",\n payload: \"object — detector results, recommendations, graph metrics\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const LIST_GRAPH_INTELLIGENCE_QUERIES: McpToolContract = {\n name: \"list_graph_intelligence_queries\",\n description:\n \"List the Graph Intelligence query catalog that powers structural graph analysis experiences. \" +\n \"Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.\",\n parameters: {\n categoryId: {\n type: \"string\",\n description: \"Optional category filter, such as problems or strategic\",\n },\n mode: {\n type: \"string\",\n description:\n \"Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence\",\n },\n },\n required: [],\n response: {\n description:\n \"Graph Intelligence query catalog and mode-to-tool mapping\",\n fields: {\n categories: \"array — query categories\",\n queries: \"array — query definitions with prompt templates and tools\",\n quickQueries: \"array — recommended one-click query presets\",\n publicToolNamesByMode:\n \"object — public tool names available to each Graph Intelligence mode\",\n },\n },\n ownerModule: \"graph-intelligence\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const RUN_GRAPH_INTELLIGENCE_QUERY: McpToolContract = {\n name: \"run_graph_intelligence_query\",\n description:\n \"Run a named Graph Intelligence query against a tenant topic graph. \" +\n \"Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n queryId: {\n type: \"string\",\n description:\n \"Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary\",\n },\n prompt: {\n type: \"string\",\n description: \"Optional custom prompt for custom analysis runs\",\n },\n input: {\n type: \"string\",\n description:\n \"Optional entity, theme, belief, company, or search text for input-driven queries\",\n },\n mode: {\n type: \"string\",\n description:\n \"Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum graph context rows to return\",\n },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Graph Intelligence query result bundle ready for model or prompt-library synthesis\",\n fields: {\n query: \"object — selected query definition\",\n prompt: \"string — resolved prompt template\",\n toolPlan: \"array — public tools and args the model can call next\",\n analysis:\n \"object — structure, coverage, gap, and confirmation-bias analysis\",\n context: \"object — sampled beliefs, questions, evidence, edges, and contradictions\",\n },\n },\n ownerModule: \"graph-intelligence\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const GET_FALSIFICATION_QUESTIONS: McpToolContract = {\n name: \"get_falsification_questions\",\n description:\n \"Generate Popperian falsification questions for beliefs. \" +\n \"Like `git test` — identifies the questions most likely to disprove current beliefs. \" +\n \"Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n beliefIds: { type: \"array\", description: \"Specific beliefs to target\" },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Questions with falsification potential scores and target beliefs\",\n fields: {\n questions:\n \"array — { questionText, falsificationPotential, targetBeliefId, targetBeliefText }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"question\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// EVIDENCE OPERATION TOOLS\n// =============================================================================\n\nexport const SEARCH_EVIDENCE: McpToolContract = {\n name: \"search_evidence\",\n description:\n \"Search for evidence across the reasoning graph. \" +\n \"Like `git grep` — returns the evidence records that best match a textual query. \" +\n \"Results share the same canonical semantics as the HTTP and SDK evidence search surface.\",\n parameters: {\n q: { type: \"string\", description: \"Search text\" },\n topicId: { type: \"string\", description: \"Topic scope filter\" },\n targetId: {\n type: \"string\",\n description: \"Optional belief or question identifier to scope the search\",\n },\n limit: { type: \"number\", description: \"Max results\" },\n cursor: { type: \"string\", description: \"Pagination cursor\" },\n },\n required: [\"q\"],\n response: {\n description: \"Canonical evidence search results page\",\n fields: {\n results:\n \"array — { evidenceId, nodeId, globalId?, text, source?, kind?, relevanceScore }\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const CREATE_EVIDENCE: McpToolContract = {\n name: \"create_evidence\",\n description:\n \"Commit evidence to the reasoning graph. \" +\n \"Like `git commit` — creates a traceable evidence record with canonical public IDs. \" +\n \"Optionally links the evidence to a belief or question in the same operation. \" +\n \"When evidence bears on beliefs, state whether it supports or contradicts; SL confidence is derived from these evidence relations.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic scope\" },\n text: { type: \"string\", description: \"Canonical evidence text\" },\n source: { type: \"string\", description: \"Source URL or source label\" },\n targetId: {\n type: \"string\",\n description: \"Optional belief or question identifier to link immediately\",\n },\n weight: {\n type: \"number\",\n description:\n \"Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight.\",\n },\n evidenceRelation: {\n type: \"string\",\n enum: [\"supports\", \"contradicts\"],\n description:\n \"Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference.\",\n },\n confidence: {\n type: \"number\",\n description: \"Confidence in the evidence relation, 0.0 to 1.0\",\n },\n beliefRelations: {\n type: \"array\",\n description:\n \"Optional additional belief relations: [{ beliefId|beliefNodeId|targetId, evidenceRelation|relation, confidence?, weight?, rationale? }]. Use one evidence node with multiple relations when the same fact supports or contradicts several beliefs.\",\n },\n metadata: {\n type: \"object\",\n description: \"Optional metadata merged into the canonical evidence node\",\n },\n rationale: {\n type: \"string\",\n description: \"Why this evidence should enter the reasoning graph\",\n },\n title: { type: \"string\", description: \"Optional short title\" },\n content: { type: \"string\", description: \"Optional long-form content\" },\n contentType: {\n type: \"string\",\n description: \"Optional content format or MIME hint\",\n },\n kind: { type: \"string\", description: \"Optional evidence kind\" },\n },\n required: [\"text\", \"rationale\"],\n response: {\n description: \"The created canonical evidence record\",\n fields: {\n id: \"string — canonical evidence ID\",\n nodeId: \"string — canonical evidence ID\",\n evidenceId: \"string — canonical evidence ID\",\n text: \"string\",\n topicId: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const GET_EVIDENCE: McpToolContract = {\n name: \"get_evidence\",\n description:\n \"Read one evidence record by ID. \" +\n \"Like `git show` — resolves the canonical evidence payload for a single identifier.\",\n parameters: {\n id: { type: \"string\", description: \"Canonical evidence ID\" },\n },\n required: [\"id\"],\n response: {\n description: \"The canonical evidence record\",\n fields: {\n id: \"string — canonical evidence ID\",\n nodeId: \"string — canonical evidence ID\",\n evidenceId: \"string — canonical evidence ID\",\n text: \"string\",\n topicId: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const LIST_EVIDENCE: McpToolContract = {\n name: \"list_evidence\",\n description:\n \"List evidence records within a topic or linked to a target. \" +\n \"Like `git log -- path` — returns the canonical evidence page for a topic, belief, or question scope.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic scope filter\" },\n targetId: {\n type: \"string\",\n description: \"Optional belief or question identifier to scope by linkage\",\n },\n limit: { type: \"number\", description: \"Max results\" },\n cursor: { type: \"string\", description: \"Pagination cursor\" },\n },\n required: [\"topicId\"],\n response: {\n description: \"Canonical evidence page\",\n fields: {\n evidence: \"array — canonical evidence records\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const LINK_EVIDENCE: McpToolContract = {\n name: \"link_evidence\",\n description:\n \"Link evidence to a belief or question. \" +\n \"Like `git notes add` — attaches a supporting or contradicting edge without rewriting the evidence itself.\",\n parameters: {\n evidenceId: { type: \"string\", description: \"Canonical evidence ID\" },\n targetId: {\n type: \"string\",\n description: \"Canonical belief or question ID\",\n },\n weight: {\n type: \"number\",\n description: \"Support weight: -1.0 (contradicts) to +1.0 (supports)\",\n },\n rationale: { type: \"string\", description: \"Why this link exists\" },\n },\n required: [\"evidenceId\", \"targetId\"],\n response: {\n description: \"The created canonical evidence edge summary\",\n fields: {\n edgeId: \"string\",\n evidenceId: \"string\",\n targetId: \"string\",\n targetType: \"string — belief | question\",\n weight: \"number\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const LINK_EVIDENCE_TO_BELIEF: McpToolContract = {\n name: \"link_evidence_to_belief\",\n description:\n \"Link evidence to a belief with a support weight. \" +\n \"Like `git add` — stages evidence in support of (or against) a belief. \" +\n \"The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports). \" +\n \"This relation appends to the SL confidence ledger; do not hand-write confidence separately.\",\n parameters: {\n evidenceId: { type: \"string\", description: \"The evidence node ID\" },\n beliefId: { type: \"string\", description: \"The belief node ID\" },\n weight: {\n type: \"number\",\n description: \"Support weight: -1.0 (contradicts) to +1.0 (supports)\",\n },\n evidenceRelation: {\n type: \"string\",\n enum: [\"supports\", \"contradicts\"],\n description:\n \"Canonical semantic relation. If omitted, the sign of weight is used.\",\n },\n confidence: {\n type: \"number\",\n description: \"Confidence in this evidence-to-belief relation, 0.0 to 1.0\",\n },\n rationale: { type: \"string\", description: \"Why this evidence is relevant\" },\n },\n required: [\"evidenceId\", \"beliefId\"],\n response: {\n description: \"The created edge linking evidence to belief\",\n fields: {\n edgeId: \"string\",\n evidenceId: \"string\",\n beliefId: \"string\",\n weight: \"number\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// QUESTION OPERATION TOOLS\n// =============================================================================\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/tool-contracts.intelligence-evidence.ts"],"names":[],"mappings":";AAEO,IAAM,wBAAA,GAA4C;AAAA,EACvD,IAAA,EAAM,0BAAA;AAAA,EACN,WAAA,EACE,+RAAA;AAAA,EAIF,UAAA,EAAY;AAAA,IACV,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,kBAAA,EAAmB;AAAA,IAC3D,SAAA,EAAW;AAAA,MACT,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA;AACf,GACF;AAAA,EACA,QAAA,EAAU,CAAC,SAAS,CAAA;AAAA,EACpB,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,4DAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,OAAA,EACE;AAAA;AACJ,GACF;AAAA,EACA,WAAA,EAAa,cAAA;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QAAA,EAAU,aAAa,sBAAA,EAAuB;AAAA,IAClE,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,oBAAA,EAAqB;AAAA,IAC9D,MAAA,EAAQ;AAAA,MACN,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA,KACf;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,IAAA,EAAM,QAAA;AAAA,MACN,IAAA,EAAM,CAAC,UAAA,EAAY,aAAa,CAAA;AAAA,MAChC,WAAA,EACE;AAAA,KACJ;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,QAAA;AAAA,MACN,WAAA,EAAa;AAAA,KACf;AAAA,IACA,SAAA,EAAW,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,+BAAA;AAAgC,GAC5E;AAAA,EACA,QAAA,EAAU,CAAC,YAAA,EAAc,UAAA,EAAY,QAAQ,CAAA;AAAA,EAC7C,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,6CAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,MAAA,EAAQ,QAAA;AAAA,MACR,UAAA,EAAY,QAAA;AAAA,MACZ,QAAA,EAAU,QAAA;AAAA,MACV,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,WAAA,EAAa,kBAAA;AAAA,EACb,iBAAA,EAAmB,MAAA;AAAA,EACnB,IAAA,EAAM;AACR","file":"tool-contracts.intelligence-evidence.js","sourcesContent":["import type { McpToolContract } from \"./tool-contracts.types\";\n\nexport const DETECT_CONFIRMATION_BIAS: McpToolContract = {\n name: \"detect_confirmation_bias\",\n description:\n \"Detect confirmation bias in the evidence graph. \" +\n \"Like `git diff --stat` for reasoning — analyzes the ratio of supporting vs challenging evidence \" +\n \"per belief and flags beliefs where the evidence is suspiciously one-sided. \" +\n \"Returns risk classification (critical/high/moderate/healthy).\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n threshold: {\n type: \"number\",\n description: \"Bias threshold (0-1, default 0.7)\",\n },\n },\n required: [\"topicId\"],\n response: {\n description: \"Beliefs with bias scores, risk levels, and evidence counts\",\n fields: {\n beliefs:\n \"array — { nodeId, biasScore, riskLevel, supportingCount, challengingCount }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const GET_GRAPH_STRUCTURE_ANALYSIS: McpToolContract = {\n name: \"get_graph_structure_analysis\",\n description:\n \"Run comprehensive structural analysis on the knowledge graph. \" +\n \"Like `git fsck` combined with PageRank — runs 14 algorithmic detectors including \" +\n \"PageRank centrality, Louvain community detection, Tarjan SCC, Fiedler vector spectral analysis, \" +\n \"Bayesian surprise, and overconfidence detection.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Structural analysis with detector results and recommendations\",\n fields: {\n topicId: \"string — canonical topic scope\",\n metric: \"string — analysis metric identifier\",\n payload: \"object — detector results, recommendations, graph metrics\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const LIST_GRAPH_INTELLIGENCE_QUERIES: McpToolContract = {\n name: \"list_graph_intelligence_queries\",\n description:\n \"List the Graph Intelligence query catalog that powers structural graph analysis experiences. \" +\n \"Returns categories, query IDs, prompt templates, modes, and the public tool plan each query can use.\",\n parameters: {\n categoryId: {\n type: \"string\",\n description: \"Optional category filter, such as problems or strategic\",\n },\n mode: {\n type: \"string\",\n description:\n \"Optional mode filter: core, bias, stress, operational, alpha, semantic, or evidence\",\n },\n },\n required: [],\n response: {\n description:\n \"Graph Intelligence query catalog and mode-to-tool mapping\",\n fields: {\n categories: \"array — query categories\",\n queries: \"array — query definitions with prompt templates and tools\",\n quickQueries: \"array — recommended one-click query presets\",\n publicToolNamesByMode:\n \"object — public tool names available to each Graph Intelligence mode\",\n },\n },\n ownerModule: \"graph-intelligence\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const RUN_GRAPH_INTELLIGENCE_QUERY: McpToolContract = {\n name: \"run_graph_intelligence_query\",\n description:\n \"Run a named Graph Intelligence query against a tenant topic graph. \" +\n \"Returns the selected query, prompt, deterministic graph-analysis bundle, graph context, and public tool plan for model synthesis.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n queryId: {\n type: \"string\",\n description:\n \"Graph Intelligence query ID, such as confirmation-bias, pre-mortem, or thesis-summary\",\n },\n prompt: {\n type: \"string\",\n description: \"Optional custom prompt for custom analysis runs\",\n },\n input: {\n type: \"string\",\n description:\n \"Optional entity, theme, belief, company, or search text for input-driven queries\",\n },\n mode: {\n type: \"string\",\n description:\n \"Optional mode override: core, bias, stress, operational, alpha, semantic, or evidence\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum graph context rows to return\",\n },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Graph Intelligence query result bundle ready for model or prompt-library synthesis\",\n fields: {\n query: \"object — selected query definition\",\n prompt: \"string — resolved prompt template\",\n toolPlan: \"array — public tools and args the model can call next\",\n analysis:\n \"object — structure, coverage, gap, and confirmation-bias analysis\",\n context: \"object — sampled beliefs, questions, evidence, edges, and contradictions\",\n },\n },\n ownerModule: \"graph-intelligence\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const GET_FALSIFICATION_QUESTIONS: McpToolContract = {\n name: \"get_falsification_questions\",\n description:\n \"Generate Popperian falsification questions for beliefs. \" +\n \"Like `git test` — identifies the questions most likely to disprove current beliefs. \" +\n \"Karl Popper as a tool: surfaces what would need to be true to invalidate each belief.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic to analyze\" },\n beliefIds: { type: \"array\", description: \"Specific beliefs to target\" },\n },\n required: [\"topicId\"],\n response: {\n description:\n \"Questions with falsification potential scores and target beliefs\",\n fields: {\n questions:\n \"array — { questionText, falsificationPotential, targetBeliefId, targetBeliefText }\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"question\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// EVIDENCE OPERATION TOOLS\n// =============================================================================\n\nexport const SEARCH_EVIDENCE: McpToolContract = {\n name: \"search_evidence\",\n description:\n \"Search for evidence across the reasoning graph. \" +\n \"Like `git grep` — returns the evidence records that best match a textual query. \" +\n \"Results share the same canonical semantics as the HTTP and SDK evidence search surface.\",\n parameters: {\n q: { type: \"string\", description: \"Search text\" },\n topicId: { type: \"string\", description: \"Topic scope filter\" },\n targetId: {\n type: \"string\",\n description: \"Optional belief or question identifier to scope the search\",\n },\n limit: { type: \"number\", description: \"Max results\" },\n cursor: { type: \"string\", description: \"Pagination cursor\" },\n },\n required: [\"q\"],\n response: {\n description: \"Canonical evidence search results page\",\n fields: {\n results:\n \"array — { evidenceId, nodeId, globalId?, text, source?, kind?, relevanceScore }\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-search\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const CREATE_EVIDENCE: McpToolContract = {\n name: \"create_evidence\",\n description:\n \"Commit evidence to the reasoning graph. \" +\n \"Like `git commit` — creates a traceable evidence record with canonical public IDs. \" +\n \"Evidence creation must link to at least one belief and must include a signed impact score. \" +\n \"Positive scores support the belief; negative scores contradict it. SL confidence is derived from these weighted evidence relations.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic scope\" },\n text: { type: \"string\", description: \"Canonical evidence text\" },\n source: { type: \"string\", description: \"Source URL or source label\" },\n targetId: {\n type: \"string\",\n description: \"Belief identifier to link immediately\",\n },\n weight: {\n type: \"number\",\n description:\n \"Required nonzero signed impact score: -1.0 (contradicts) to +1.0 (supports).\",\n },\n evidenceRelation: {\n type: \"string\",\n enum: [\"supports\", \"contradicts\"],\n description:\n \"Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference.\",\n },\n confidence: {\n type: \"number\",\n description:\n \"Deprecated hint. Runtime confidence is derived from the signed impact score.\",\n },\n beliefRelations: {\n type: \"array\",\n description:\n \"Optional additional belief relations: [{ beliefId|beliefNodeId|targetId, evidenceRelation|relation, confidence?, weight?, rationale? }]. Use one evidence node with multiple relations when the same fact supports or contradicts several beliefs.\",\n },\n metadata: {\n type: \"object\",\n description: \"Optional metadata merged into the canonical evidence node\",\n },\n rationale: {\n type: \"string\",\n description: \"Why this evidence should enter the reasoning graph\",\n },\n title: { type: \"string\", description: \"Optional short title\" },\n content: { type: \"string\", description: \"Optional long-form content\" },\n contentType: {\n type: \"string\",\n description: \"Optional content format or MIME hint\",\n },\n kind: { type: \"string\", description: \"Optional evidence kind\" },\n },\n required: [\"text\", \"rationale\", \"weight\"],\n response: {\n description: \"The created canonical evidence record\",\n fields: {\n id: \"string — canonical evidence ID\",\n nodeId: \"string — canonical evidence ID\",\n evidenceId: \"string — canonical evidence ID\",\n text: \"string\",\n topicId: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const GET_EVIDENCE: McpToolContract = {\n name: \"get_evidence\",\n description:\n \"Read one evidence record by ID. \" +\n \"Like `git show` — resolves the canonical evidence payload for a single identifier.\",\n parameters: {\n id: { type: \"string\", description: \"Canonical evidence ID\" },\n },\n required: [\"id\"],\n response: {\n description: \"The canonical evidence record\",\n fields: {\n id: \"string — canonical evidence ID\",\n nodeId: \"string — canonical evidence ID\",\n evidenceId: \"string — canonical evidence ID\",\n text: \"string\",\n topicId: \"string\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const LIST_EVIDENCE: McpToolContract = {\n name: \"list_evidence\",\n description:\n \"List evidence records within a topic or linked to a target. \" +\n \"Like `git log -- path` — returns the canonical evidence page for a topic, belief, or question scope.\",\n parameters: {\n topicId: { type: \"string\", description: \"Topic scope filter\" },\n targetId: {\n type: \"string\",\n description: \"Optional belief or question identifier to scope by linkage\",\n },\n limit: { type: \"number\", description: \"Max results\" },\n cursor: { type: \"string\", description: \"Pagination cursor\" },\n },\n required: [\"topicId\"],\n response: {\n description: \"Canonical evidence page\",\n fields: {\n evidence: \"array — canonical evidence records\",\n nextCursor: \"string | null\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"evidence\",\n tier: \"workhorse\",\n};\n\nexport const LINK_EVIDENCE: McpToolContract = {\n name: \"link_evidence\",\n description:\n \"Link evidence to a belief or question. \" +\n \"Like `git notes add` — attaches a supporting or contradicting edge without rewriting the evidence itself.\",\n parameters: {\n evidenceId: { type: \"string\", description: \"Canonical evidence ID\" },\n targetId: {\n type: \"string\",\n description: \"Canonical belief or question ID\",\n },\n weight: {\n type: \"number\",\n description: \"Support weight: -1.0 (contradicts) to +1.0 (supports)\",\n },\n rationale: { type: \"string\", description: \"Why this link exists\" },\n },\n required: [\"evidenceId\", \"targetId\", \"weight\"],\n response: {\n description: \"The created canonical evidence edge summary\",\n fields: {\n edgeId: \"string\",\n evidenceId: \"string\",\n targetId: \"string\",\n targetType: \"string — belief | question\",\n weight: \"number\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\nexport const LINK_EVIDENCE_TO_BELIEF: McpToolContract = {\n name: \"link_evidence_to_belief\",\n description:\n \"Link evidence to a belief with a support weight. \" +\n \"Like `git add` — stages evidence in support of (or against) a belief. \" +\n \"The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports). \" +\n \"This relation appends to the SL confidence ledger; do not hand-write confidence separately.\",\n parameters: {\n evidenceId: { type: \"string\", description: \"The evidence node ID\" },\n beliefId: { type: \"string\", description: \"The belief node ID\" },\n weight: {\n type: \"number\",\n description: \"Support weight: -1.0 (contradicts) to +1.0 (supports)\",\n },\n evidenceRelation: {\n type: \"string\",\n enum: [\"supports\", \"contradicts\"],\n description:\n \"Canonical semantic relation. If omitted, the sign of weight is used.\",\n },\n confidence: {\n type: \"number\",\n description: \"Confidence in this evidence-to-belief relation, 0.0 to 1.0\",\n },\n rationale: { type: \"string\", description: \"Why this evidence is relevant\" },\n },\n required: [\"evidenceId\", \"beliefId\", \"weight\"],\n response: {\n description: \"The created edge linking evidence to belief\",\n fields: {\n edgeId: \"string\",\n evidenceId: \"string\",\n beliefId: \"string\",\n weight: \"number\",\n },\n },\n ownerModule: \"graph-primitives\",\n ontologyPrimitive: \"edge\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// QUESTION OPERATION TOOLS\n// =============================================================================\n"]}
|