@lucern/contracts 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/function-registry/beliefs.js +48 -11
- package/dist/function-registry/beliefs.js.map +1 -1
- package/dist/function-registry/coding.js +46 -9
- package/dist/function-registry/coding.js.map +1 -1
- package/dist/function-registry/context.js +46 -9
- package/dist/function-registry/context.js.map +1 -1
- package/dist/function-registry/contracts.js +46 -9
- package/dist/function-registry/contracts.js.map +1 -1
- package/dist/function-registry/coordination.js +46 -9
- package/dist/function-registry/coordination.js.map +1 -1
- package/dist/function-registry/edges.js +46 -9
- package/dist/function-registry/edges.js.map +1 -1
- package/dist/function-registry/evidence.js +166 -17
- package/dist/function-registry/evidence.js.map +1 -1
- package/dist/function-registry/graph.js +46 -9
- package/dist/function-registry/graph.js.map +1 -1
- package/dist/function-registry/helpers.js +46 -9
- package/dist/function-registry/helpers.js.map +1 -1
- package/dist/function-registry/identity.js +46 -9
- package/dist/function-registry/identity.js.map +1 -1
- package/dist/function-registry/index.js +46 -9
- package/dist/function-registry/index.js.map +1 -1
- package/dist/function-registry/judgments.js +46 -9
- package/dist/function-registry/judgments.js.map +1 -1
- package/dist/function-registry/legacy.js +46 -9
- package/dist/function-registry/legacy.js.map +1 -1
- package/dist/function-registry/lenses.js +46 -9
- package/dist/function-registry/lenses.js.map +1 -1
- package/dist/function-registry/manifest.d.ts +10 -4
- package/dist/function-registry/manifest.js +13 -1
- package/dist/function-registry/manifest.js.map +1 -1
- package/dist/function-registry/nodes.js +46 -9
- package/dist/function-registry/nodes.js.map +1 -1
- package/dist/function-registry/ontologies.js +46 -9
- package/dist/function-registry/ontologies.js.map +1 -1
- package/dist/function-registry/pipeline.js +46 -9
- package/dist/function-registry/pipeline.js.map +1 -1
- package/dist/function-registry/questions.js +46 -9
- package/dist/function-registry/questions.js.map +1 -1
- package/dist/function-registry/tasks.js +46 -9
- package/dist/function-registry/tasks.js.map +1 -1
- package/dist/function-registry/topics.js +46 -9
- package/dist/function-registry/topics.js.map +1 -1
- package/dist/function-registry/worktrees.js +46 -9
- package/dist/function-registry/worktrees.js.map +1 -1
- package/dist/index.js +111 -11
- package/dist/index.js.map +1 -1
- package/dist/manifests/invariants/index.js +24 -5
- package/dist/manifests/invariants/index.js.map +1 -1
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js +24 -5
- package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -1
- package/dist/projections/check-convex-args-shape.js +78 -3
- package/dist/projections/check-convex-args-shape.js.map +1 -1
- package/dist/projections/create-evidence.projection.d.ts +168 -0
- package/dist/projections/create-evidence.projection.js +78 -3
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +28 -0
- package/dist/projections/index.js +78 -3
- package/dist/projections/index.js.map +1 -1
- package/dist/proof-attestation.json +1 -1
- package/dist/sdk-methods.contract.d.ts +3 -2
- package/dist/sdk-tools.contract.js +33 -8
- package/dist/sdk-tools.contract.js.map +1 -1
- package/dist/sdk-tools.contract.registry.js +33 -8
- package/dist/sdk-tools.contract.registry.js.map +1 -1
- package/dist/sdk-tools.contract.values.js +33 -8
- package/dist/sdk-tools.contract.values.js.map +1 -1
- package/dist/tool-contracts.context-orientation.js +2 -1
- package/dist/tool-contracts.context-orientation.js.map +1 -1
- package/dist/tool-contracts.intelligence-evidence.js +26 -4
- package/dist/tool-contracts.intelligence-evidence.js.map +1 -1
- package/dist/tool-contracts.js +33 -8
- package/dist/tool-contracts.js.map +1 -1
- package/dist/tool-contracts.lifecycle.js +2 -2
- package/dist/tool-contracts.lifecycle.js.map +1 -1
- package/dist/tool-contracts.questions-listing.js +3 -1
- package/dist/tool-contracts.questions-listing.js.map +1 -1
- package/dist/tool-contracts.values.js +33 -8
- package/dist/tool-contracts.values.js.map +1 -1
- package/package.json +1 -1
|
@@ -43,7 +43,7 @@ export { legacyContracts } from './legacy.js';
|
|
|
43
43
|
// src/tool-contracts.lifecycle.ts
|
|
44
44
|
var CREATE_BELIEF = {
|
|
45
45
|
name: "create_belief",
|
|
46
|
-
description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`;
|
|
46
|
+
description: "Commit a new belief (knowledge unit) to the reasoning graph. Like `git commit` \u2014 creates an atomic, traceable knowledge object with a prior. Creation stores the vacuous opinion `(0, 0, 1, a)`; attach supporting or contradicting evidence with create_evidence or link_evidence_to_belief to record evidential updates.",
|
|
47
47
|
parameters: {
|
|
48
48
|
canonicalText: {
|
|
49
49
|
type: "string",
|
|
@@ -129,7 +129,7 @@ var REFINE_BELIEF = {
|
|
|
129
129
|
};
|
|
130
130
|
var MODULATE_CONFIDENCE = {
|
|
131
131
|
name: "modulate_confidence",
|
|
132
|
-
description: "
|
|
132
|
+
description: "Internal-only subjective-logic ledger append. Like `git commit` to the credence log for the scoring engine \u2014 never an operator-facing way to assert confidence. Agents, SDK callers, CLI users, and MCP clients must instead create or link evidence with `evidenceRelation: supports|contradicts`; the kernel derives the next opinion from that evidence. This compatibility primitive is reserved for governed system scoring paths that already hold a full subjective-logic tuple and truth-bearing provenance.",
|
|
133
133
|
parameters: {
|
|
134
134
|
nodeId: { type: "string", description: "The belief to score" },
|
|
135
135
|
belief: {
|
|
@@ -1737,10 +1737,11 @@ var LUCERN_ORIENT = {
|
|
|
1737
1737
|
workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
|
|
1738
1738
|
grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
|
|
1739
1739
|
firstMoves: "array - recommended first tools for a cold-start agent",
|
|
1740
|
-
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, and noDefaultGlobalScan",
|
|
1740
|
+
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
|
|
1741
1741
|
safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
|
|
1742
1742
|
toolMap: "array | undefined - situation-to-tool routing map when requested",
|
|
1743
1743
|
examples: "array | undefined - concrete tool-call examples when requested",
|
|
1744
|
+
futureCapabilities: "array | undefined - exemplar, gauntlet, trace-corpus, and native-model-training capabilities when requested",
|
|
1744
1745
|
suggestedNextCalls: "array - safe next tool calls for the current situation"
|
|
1745
1746
|
}
|
|
1746
1747
|
},
|
|
@@ -1903,7 +1904,7 @@ var SEARCH_EVIDENCE = {
|
|
|
1903
1904
|
};
|
|
1904
1905
|
var CREATE_EVIDENCE = {
|
|
1905
1906
|
name: "create_evidence",
|
|
1906
|
-
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs. Optionally links the evidence to a belief or question in the same operation.",
|
|
1907
|
+
description: "Commit evidence to the reasoning graph. Like `git commit` \u2014 creates a traceable evidence record with canonical public IDs. Optionally links the evidence to a belief or question in the same operation. When evidence bears on beliefs, state whether it supports or contradicts; SL confidence is derived from these evidence relations.",
|
|
1907
1908
|
parameters: {
|
|
1908
1909
|
topicId: { type: "string", description: "Topic scope" },
|
|
1909
1910
|
text: { type: "string", description: "Canonical evidence text" },
|
|
@@ -1914,7 +1915,20 @@ var CREATE_EVIDENCE = {
|
|
|
1914
1915
|
},
|
|
1915
1916
|
weight: {
|
|
1916
1917
|
type: "number",
|
|
1917
|
-
description: "
|
|
1918
|
+
description: "Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight."
|
|
1919
|
+
},
|
|
1920
|
+
evidenceRelation: {
|
|
1921
|
+
type: "string",
|
|
1922
|
+
enum: ["supports", "contradicts"],
|
|
1923
|
+
description: "Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference."
|
|
1924
|
+
},
|
|
1925
|
+
confidence: {
|
|
1926
|
+
type: "number",
|
|
1927
|
+
description: "Confidence in the evidence relation, 0.0 to 1.0"
|
|
1928
|
+
},
|
|
1929
|
+
beliefRelations: {
|
|
1930
|
+
type: "array",
|
|
1931
|
+
description: "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."
|
|
1918
1932
|
},
|
|
1919
1933
|
metadata: {
|
|
1920
1934
|
type: "object",
|
|
@@ -2024,7 +2038,7 @@ var LINK_EVIDENCE = {
|
|
|
2024
2038
|
};
|
|
2025
2039
|
var LINK_EVIDENCE_TO_BELIEF = {
|
|
2026
2040
|
name: "link_evidence_to_belief",
|
|
2027
|
-
description: "Link evidence to a belief with a support weight. Like `git add` \u2014 stages evidence in support of (or against) a belief. The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports).",
|
|
2041
|
+
description: "Link evidence to a belief with a support weight. Like `git add` \u2014 stages evidence in support of (or against) a belief. The weight ranges from -1.0 (strongly contradicts) to +1.0 (strongly supports). This relation appends to the SL confidence ledger; do not hand-write confidence separately.",
|
|
2028
2042
|
parameters: {
|
|
2029
2043
|
evidenceId: { type: "string", description: "The evidence node ID" },
|
|
2030
2044
|
beliefId: { type: "string", description: "The belief node ID" },
|
|
@@ -2032,9 +2046,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
2032
2046
|
type: "number",
|
|
2033
2047
|
description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
|
|
2034
2048
|
},
|
|
2049
|
+
evidenceRelation: {
|
|
2050
|
+
type: "string",
|
|
2051
|
+
enum: ["supports", "contradicts"],
|
|
2052
|
+
description: "Canonical semantic relation. If omitted, the sign of weight is used."
|
|
2053
|
+
},
|
|
2054
|
+
confidence: {
|
|
2055
|
+
type: "number",
|
|
2056
|
+
description: "Confidence in this evidence-to-belief relation, 0.0 to 1.0"
|
|
2057
|
+
},
|
|
2035
2058
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
2036
2059
|
},
|
|
2037
|
-
required: ["evidenceId", "beliefId"
|
|
2060
|
+
required: ["evidenceId", "beliefId"],
|
|
2038
2061
|
response: {
|
|
2039
2062
|
description: "The created edge linking evidence to belief",
|
|
2040
2063
|
fields: {
|
|
@@ -2862,7 +2885,9 @@ var COMPILE_CONTEXT = {
|
|
|
2862
2885
|
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
2863
2886
|
contradictions: "array \u2014 unresolved contradiction records",
|
|
2864
2887
|
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
2865
|
-
contextNarrative: "array \u2014
|
|
2888
|
+
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
2889
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
2890
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
|
|
2866
2891
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
2867
2892
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
2868
2893
|
}
|
|
@@ -4810,6 +4835,12 @@ var internalSystem = {
|
|
|
4810
4835
|
mcp: "internal",
|
|
4811
4836
|
cli: "internal"
|
|
4812
4837
|
};
|
|
4838
|
+
var internalSdkRestOnly = {
|
|
4839
|
+
sdk: "internal",
|
|
4840
|
+
rest: "internal",
|
|
4841
|
+
mcp: "none",
|
|
4842
|
+
cli: "none"
|
|
4843
|
+
};
|
|
4813
4844
|
var publicWithInternalMcp = {
|
|
4814
4845
|
sdk: "public",
|
|
4815
4846
|
rest: "public",
|
|
@@ -4859,7 +4890,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4859
4890
|
"get_belief",
|
|
4860
4891
|
"list_beliefs",
|
|
4861
4892
|
"refine_belief",
|
|
4862
|
-
"modulate_confidence",
|
|
4863
4893
|
"fork_belief",
|
|
4864
4894
|
"archive_belief",
|
|
4865
4895
|
"search_beliefs",
|
|
@@ -5148,6 +5178,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
5148
5178
|
internalSystem,
|
|
5149
5179
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
5150
5180
|
),
|
|
5181
|
+
modulate_confidence: {
|
|
5182
|
+
name: "modulate_confidence",
|
|
5183
|
+
surfaceClass: "platform_internal",
|
|
5184
|
+
surfaceIntent: "system",
|
|
5185
|
+
surfaces: internalSdkRestOnly,
|
|
5186
|
+
rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
|
|
5187
|
+
},
|
|
5151
5188
|
...entries(
|
|
5152
5189
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
5153
5190
|
"legacy_compat",
|