@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
|
@@ -767,7 +767,7 @@ var GRAPH_AWARE_SEARCH = {
|
|
|
767
767
|
// src/tool-contracts.lifecycle.ts
|
|
768
768
|
var CREATE_BELIEF = {
|
|
769
769
|
name: "create_belief",
|
|
770
|
-
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)`;
|
|
770
|
+
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.",
|
|
771
771
|
parameters: {
|
|
772
772
|
canonicalText: {
|
|
773
773
|
type: "string",
|
|
@@ -853,7 +853,7 @@ var REFINE_BELIEF = {
|
|
|
853
853
|
};
|
|
854
854
|
var MODULATE_CONFIDENCE = {
|
|
855
855
|
name: "modulate_confidence",
|
|
856
|
-
description: "
|
|
856
|
+
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.",
|
|
857
857
|
parameters: {
|
|
858
858
|
nodeId: { type: "string", description: "The belief to score" },
|
|
859
859
|
belief: {
|
|
@@ -2461,10 +2461,11 @@ var LUCERN_ORIENT = {
|
|
|
2461
2461
|
workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
|
|
2462
2462
|
grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
|
|
2463
2463
|
firstMoves: "array - recommended first tools for a cold-start agent",
|
|
2464
|
-
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, and noDefaultGlobalScan",
|
|
2464
|
+
receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
|
|
2465
2465
|
safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
|
|
2466
2466
|
toolMap: "array | undefined - situation-to-tool routing map when requested",
|
|
2467
2467
|
examples: "array | undefined - concrete tool-call examples when requested",
|
|
2468
|
+
futureCapabilities: "array | undefined - exemplar, gauntlet, trace-corpus, and native-model-training capabilities when requested",
|
|
2468
2469
|
suggestedNextCalls: "array - safe next tool calls for the current situation"
|
|
2469
2470
|
}
|
|
2470
2471
|
},
|
|
@@ -2627,7 +2628,7 @@ var SEARCH_EVIDENCE = {
|
|
|
2627
2628
|
};
|
|
2628
2629
|
var CREATE_EVIDENCE = {
|
|
2629
2630
|
name: "create_evidence",
|
|
2630
|
-
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.",
|
|
2631
|
+
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.",
|
|
2631
2632
|
parameters: {
|
|
2632
2633
|
topicId: { type: "string", description: "Topic scope" },
|
|
2633
2634
|
text: { type: "string", description: "Canonical evidence text" },
|
|
@@ -2638,7 +2639,20 @@ var CREATE_EVIDENCE = {
|
|
|
2638
2639
|
},
|
|
2639
2640
|
weight: {
|
|
2640
2641
|
type: "number",
|
|
2641
|
-
description: "
|
|
2642
|
+
description: "Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight."
|
|
2643
|
+
},
|
|
2644
|
+
evidenceRelation: {
|
|
2645
|
+
type: "string",
|
|
2646
|
+
enum: ["supports", "contradicts"],
|
|
2647
|
+
description: "Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference."
|
|
2648
|
+
},
|
|
2649
|
+
confidence: {
|
|
2650
|
+
type: "number",
|
|
2651
|
+
description: "Confidence in the evidence relation, 0.0 to 1.0"
|
|
2652
|
+
},
|
|
2653
|
+
beliefRelations: {
|
|
2654
|
+
type: "array",
|
|
2655
|
+
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."
|
|
2642
2656
|
},
|
|
2643
2657
|
metadata: {
|
|
2644
2658
|
type: "object",
|
|
@@ -2748,7 +2762,7 @@ var LINK_EVIDENCE = {
|
|
|
2748
2762
|
};
|
|
2749
2763
|
var LINK_EVIDENCE_TO_BELIEF = {
|
|
2750
2764
|
name: "link_evidence_to_belief",
|
|
2751
|
-
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).",
|
|
2765
|
+
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.",
|
|
2752
2766
|
parameters: {
|
|
2753
2767
|
evidenceId: { type: "string", description: "The evidence node ID" },
|
|
2754
2768
|
beliefId: { type: "string", description: "The belief node ID" },
|
|
@@ -2756,9 +2770,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
|
|
|
2756
2770
|
type: "number",
|
|
2757
2771
|
description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
|
|
2758
2772
|
},
|
|
2773
|
+
evidenceRelation: {
|
|
2774
|
+
type: "string",
|
|
2775
|
+
enum: ["supports", "contradicts"],
|
|
2776
|
+
description: "Canonical semantic relation. If omitted, the sign of weight is used."
|
|
2777
|
+
},
|
|
2778
|
+
confidence: {
|
|
2779
|
+
type: "number",
|
|
2780
|
+
description: "Confidence in this evidence-to-belief relation, 0.0 to 1.0"
|
|
2781
|
+
},
|
|
2759
2782
|
rationale: { type: "string", description: "Why this evidence is relevant" }
|
|
2760
2783
|
},
|
|
2761
|
-
required: ["evidenceId", "beliefId"
|
|
2784
|
+
required: ["evidenceId", "beliefId"],
|
|
2762
2785
|
response: {
|
|
2763
2786
|
description: "The created edge linking evidence to belief",
|
|
2764
2787
|
fields: {
|
|
@@ -3586,7 +3609,9 @@ var COMPILE_CONTEXT = {
|
|
|
3586
3609
|
recentEvidence: "array \u2014 recent evidence ranked for this query",
|
|
3587
3610
|
contradictions: "array \u2014 unresolved contradiction records",
|
|
3588
3611
|
relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
|
|
3589
|
-
contextNarrative: "array \u2014
|
|
3612
|
+
contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
|
|
3613
|
+
retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
|
|
3614
|
+
narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
|
|
3590
3615
|
injectionPolicy: "object \u2014 token-budgeted section selections",
|
|
3591
3616
|
diagnostics: "object \u2014 scoring and utilization telemetry"
|
|
3592
3617
|
}
|