@lucern/contracts 1.0.12 → 1.0.14
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 +7 -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 +227 -25
- 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 +160 -16
- 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 +127 -8
- 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 +127 -8
- package/dist/projections/create-evidence.projection.js.map +1 -1
- package/dist/projections/index.d.ts +28 -0
- package/dist/projections/index.js +127 -8
- 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
|
@@ -6,7 +6,7 @@ import { v } from 'convex/values';
|
|
|
6
6
|
// src/tool-contracts.lifecycle.ts
|
|
7
7
|
var CREATE_BELIEF = {
|
|
8
8
|
name: "create_belief",
|
|
9
|
-
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)`;
|
|
9
|
+
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.",
|
|
10
10
|
parameters: {
|
|
11
11
|
canonicalText: {
|
|
12
12
|
type: "string",
|
|
@@ -92,7 +92,7 @@ var REFINE_BELIEF = {
|
|
|
92
92
|
};
|
|
93
93
|
var MODULATE_CONFIDENCE = {
|
|
94
94
|
name: "modulate_confidence",
|
|
95
|
-
description: "
|
|
95
|
+
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.",
|
|
96
96
|
parameters: {
|
|
97
97
|
nodeId: { type: "string", description: "The belief to score" },
|
|
98
98
|
belief: {
|
|
@@ -1700,10 +1700,11 @@ var LUCERN_ORIENT = {
|
|
|
1700
1700
|
workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
|
|
1701
1701
|
grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
|
|
1702
1702
|
firstMoves: "array - recommended first tools for a cold-start agent",
|
|
1703
|
-
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, and noDefaultGlobalScan",
|
|
1703
|
+
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
|
|
1704
1704
|
safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
|
|
1705
1705
|
toolMap: "array | undefined - situation-to-tool routing map when requested",
|
|
1706
1706
|
examples: "array | undefined - concrete tool-call examples when requested",
|
|
1707
|
+
futureCapabilities: "array | undefined - exemplar, gauntlet, trace-corpus, and native-model-training capabilities when requested",
|
|
1707
1708
|
suggestedNextCalls: "array - safe next tool calls for the current situation"
|
|
1708
1709
|
}
|
|
1709
1710
|
},
|
|
@@ -1866,7 +1867,7 @@ var SEARCH_EVIDENCE = {
|
|
|
1866
1867
|
};
|
|
1867
1868
|
var CREATE_EVIDENCE = {
|
|
1868
1869
|
name: "create_evidence",
|
|
1869
|
-
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.",
|
|
1870
|
+
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.",
|
|
1870
1871
|
parameters: {
|
|
1871
1872
|
topicId: { type: "string", description: "Topic scope" },
|
|
1872
1873
|
text: { type: "string", description: "Canonical evidence text" },
|
|
@@ -1877,7 +1878,20 @@ var CREATE_EVIDENCE = {
|
|
|
1877
1878
|
},
|
|
1878
1879
|
weight: {
|
|
1879
1880
|
type: "number",
|
|
1880
|
-
description: "
|
|
1881
|
+
description: "Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight."
|
|
1882
|
+
},
|
|
1883
|
+
evidenceRelation: {
|
|
1884
|
+
type: "string",
|
|
1885
|
+
enum: ["supports", "contradicts"],
|
|
1886
|
+
description: "Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference."
|
|
1887
|
+
},
|
|
1888
|
+
confidence: {
|
|
1889
|
+
type: "number",
|
|
1890
|
+
description: "Confidence in the evidence relation, 0.0 to 1.0"
|
|
1891
|
+
},
|
|
1892
|
+
beliefRelations: {
|
|
1893
|
+
type: "array",
|
|
1894
|
+
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."
|
|
1881
1895
|
},
|
|
1882
1896
|
metadata: {
|
|
1883
1897
|
type: "object",
|
|
@@ -1987,7 +2001,7 @@ var LINK_EVIDENCE = {
|
|
|
1987
2001
|
};
|
|
1988
2002
|
var LINK_EVIDENCE_TO_BELIEF = {
|
|
1989
2003
|
name: "link_evidence_to_belief",
|
|
1990
|
-
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).",
|
|
2004
|
+
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.",
|
|
1991
2005
|
parameters: {
|
|
1992
2006
|
evidenceId: { type: "string", description: "The evidence node ID" },
|
|
1993
2007
|
beliefId: { type: "string", description: "The belief node ID" },
|
|
@@ -1995,9 +2009,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
1995
2009
|
type: "number",
|
|
1996
2010
|
description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
|
|
1997
2011
|
},
|
|
2012
|
+
evidenceRelation: {
|
|
2013
|
+
type: "string",
|
|
2014
|
+
enum: ["supports", "contradicts"],
|
|
2015
|
+
description: "Canonical semantic relation. If omitted, the sign of weight is used."
|
|
2016
|
+
},
|
|
2017
|
+
confidence: {
|
|
2018
|
+
type: "number",
|
|
2019
|
+
description: "Confidence in this evidence-to-belief relation, 0.0 to 1.0"
|
|
2020
|
+
},
|
|
1998
2021
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
1999
2022
|
},
|
|
2000
|
-
required: ["evidenceId", "beliefId"
|
|
2023
|
+
required: ["evidenceId", "beliefId"],
|
|
2001
2024
|
response: {
|
|
2002
2025
|
description: "The created edge linking evidence to belief",
|
|
2003
2026
|
fields: {
|
|
@@ -2825,7 +2848,9 @@ var COMPILE_CONTEXT = {
|
|
|
2825
2848
|
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
2826
2849
|
contradictions: "array \u2014 unresolved contradiction records",
|
|
2827
2850
|
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
2828
|
-
contextNarrative: "array \u2014
|
|
2851
|
+
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
2852
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
2853
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
|
|
2829
2854
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
2830
2855
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
2831
2856
|
}
|
|
@@ -4773,6 +4798,12 @@ var internalSystem = {
|
|
|
4773
4798
|
mcp: "internal",
|
|
4774
4799
|
cli: "internal"
|
|
4775
4800
|
};
|
|
4801
|
+
var internalSdkRestOnly = {
|
|
4802
|
+
sdk: "internal",
|
|
4803
|
+
rest: "internal",
|
|
4804
|
+
mcp: "none",
|
|
4805
|
+
cli: "none"
|
|
4806
|
+
};
|
|
4776
4807
|
var publicWithInternalMcp = {
|
|
4777
4808
|
sdk: "public",
|
|
4778
4809
|
rest: "public",
|
|
@@ -4822,7 +4853,6 @@ var MCP_CORE_OPERATION_NAMES = [
|
|
|
4822
4853
|
"get_belief",
|
|
4823
4854
|
"list_beliefs",
|
|
4824
4855
|
"refine_belief",
|
|
4825
|
-
"modulate_confidence",
|
|
4826
4856
|
"fork_belief",
|
|
4827
4857
|
"archive_belief",
|
|
4828
4858
|
"search_beliefs",
|
|
@@ -5090,6 +5120,13 @@ var LUCERN_OPERATION_MANIFEST = {
|
|
|
5090
5120
|
internalSystem,
|
|
5091
5121
|
"Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
|
|
5092
5122
|
),
|
|
5123
|
+
modulate_confidence: {
|
|
5124
|
+
name: "modulate_confidence",
|
|
5125
|
+
surfaceClass: "platform_internal",
|
|
5126
|
+
surfaceIntent: "system",
|
|
5127
|
+
surfaces: internalSdkRestOnly,
|
|
5128
|
+
rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
|
|
5129
|
+
},
|
|
5093
5130
|
...entries(
|
|
5094
5131
|
LEGACY_COMPAT_OPERATION_NAMES,
|
|
5095
5132
|
"legacy_compat",
|