@lucern/contracts 1.0.11 → 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.
Files changed (123) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/function-registry/beliefs.d.ts +1 -1
  3. package/dist/function-registry/beliefs.js +126 -10
  4. package/dist/function-registry/beliefs.js.map +1 -1
  5. package/dist/function-registry/coding.d.ts +1 -1
  6. package/dist/function-registry/coding.js +124 -8
  7. package/dist/function-registry/coding.js.map +1 -1
  8. package/dist/function-registry/context.d.ts +44 -4
  9. package/dist/function-registry/context.js +146 -8
  10. package/dist/function-registry/context.js.map +1 -1
  11. package/dist/function-registry/contracts.d.ts +1 -1
  12. package/dist/function-registry/contracts.js +124 -8
  13. package/dist/function-registry/contracts.js.map +1 -1
  14. package/dist/function-registry/coordination.d.ts +1 -1
  15. package/dist/function-registry/coordination.js +124 -8
  16. package/dist/function-registry/coordination.js.map +1 -1
  17. package/dist/function-registry/edges.d.ts +1 -1
  18. package/dist/function-registry/edges.js +124 -8
  19. package/dist/function-registry/edges.js.map +1 -1
  20. package/dist/function-registry/evidence.d.ts +1 -1
  21. package/dist/function-registry/evidence.js +309 -40
  22. package/dist/function-registry/evidence.js.map +1 -1
  23. package/dist/function-registry/graph.d.ts +1 -1
  24. package/dist/function-registry/graph.js +126 -12
  25. package/dist/function-registry/graph.js.map +1 -1
  26. package/dist/function-registry/helpers.js +124 -8
  27. package/dist/function-registry/helpers.js.map +1 -1
  28. package/dist/function-registry/identity.d.ts +1 -1
  29. package/dist/function-registry/identity.js +124 -8
  30. package/dist/function-registry/identity.js.map +1 -1
  31. package/dist/function-registry/index.js +124 -8
  32. package/dist/function-registry/index.js.map +1 -1
  33. package/dist/function-registry/judgments.d.ts +1 -1
  34. package/dist/function-registry/judgments.js +124 -8
  35. package/dist/function-registry/judgments.js.map +1 -1
  36. package/dist/function-registry/legacy.d.ts +1 -1
  37. package/dist/function-registry/legacy.js +124 -8
  38. package/dist/function-registry/legacy.js.map +1 -1
  39. package/dist/function-registry/lenses.d.ts +1 -1
  40. package/dist/function-registry/lenses.js +124 -8
  41. package/dist/function-registry/lenses.js.map +1 -1
  42. package/dist/function-registry/manifest.d.ts +10 -4
  43. package/dist/function-registry/manifest.js +14 -1
  44. package/dist/function-registry/manifest.js.map +1 -1
  45. package/dist/function-registry/nodes.d.ts +1 -1
  46. package/dist/function-registry/nodes.js +124 -8
  47. package/dist/function-registry/nodes.js.map +1 -1
  48. package/dist/function-registry/ontologies.d.ts +1 -1
  49. package/dist/function-registry/ontologies.js +124 -8
  50. package/dist/function-registry/ontologies.js.map +1 -1
  51. package/dist/function-registry/pipeline.d.ts +1 -1
  52. package/dist/function-registry/pipeline.js +124 -8
  53. package/dist/function-registry/pipeline.js.map +1 -1
  54. package/dist/function-registry/questions.d.ts +1 -1
  55. package/dist/function-registry/questions.js +124 -8
  56. package/dist/function-registry/questions.js.map +1 -1
  57. package/dist/function-registry/tasks.d.ts +1 -1
  58. package/dist/function-registry/tasks.js +124 -8
  59. package/dist/function-registry/tasks.js.map +1 -1
  60. package/dist/function-registry/topics.d.ts +1 -1
  61. package/dist/function-registry/topics.js +126 -12
  62. package/dist/function-registry/topics.js.map +1 -1
  63. package/dist/function-registry/types.d.ts +1 -1
  64. package/dist/function-registry/worktrees.d.ts +1 -1
  65. package/dist/function-registry/worktrees.js +124 -8
  66. package/dist/function-registry/worktrees.js.map +1 -1
  67. package/dist/generated/infisicalRuntimeEnv.js +536 -1
  68. package/dist/generated/infisicalRuntimeEnv.js.map +1 -1
  69. package/dist/index.d.ts +2 -1
  70. package/dist/index.js +941 -14
  71. package/dist/index.js.map +1 -1
  72. package/dist/infisical-runtime.base.d.ts +42 -1
  73. package/dist/infisical-runtime.base.js +50 -1
  74. package/dist/infisical-runtime.base.js.map +1 -1
  75. package/dist/infisical-runtime.contract.d.ts +102 -0
  76. package/dist/infisical-runtime.contract.js +170 -1
  77. package/dist/infisical-runtime.contract.js.map +1 -1
  78. package/dist/infisical-runtime.platform-secrets.d.ts +102 -0
  79. package/dist/infisical-runtime.platform-secrets.js +120 -0
  80. package/dist/infisical-runtime.platform-secrets.js.map +1 -1
  81. package/dist/infisical-runtime.tenant-secrets.js.map +1 -1
  82. package/dist/manifests/infisical-runtime-manifest.d.ts +144 -1
  83. package/dist/manifests/infisical-runtime-manifest.js +170 -1
  84. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  85. package/dist/manifests/invariants/index.js +24 -5
  86. package/dist/manifests/invariants/index.js.map +1 -1
  87. package/dist/manifests/invariants/inv-1-beliefs-append-only.js +24 -5
  88. package/dist/manifests/invariants/inv-1-beliefs-append-only.js.map +1 -1
  89. package/dist/projections/check-convex-args-shape.js +138 -5
  90. package/dist/projections/check-convex-args-shape.js.map +1 -1
  91. package/dist/projections/create-evidence.projection.d.ts +168 -0
  92. package/dist/projections/create-evidence.projection.js +138 -5
  93. package/dist/projections/create-evidence.projection.js.map +1 -1
  94. package/dist/projections/index.d.ts +28 -0
  95. package/dist/projections/index.js +138 -5
  96. package/dist/projections/index.js.map +1 -1
  97. package/dist/proof-attestation.json +1 -1
  98. package/dist/schemas/manifest.d.ts +20 -20
  99. package/dist/schemas/tables/kernel/platform.d.ts +4 -4
  100. package/dist/sdk-methods.contract.d.ts +3 -2
  101. package/dist/sdk-tools.contract.js +110 -7
  102. package/dist/sdk-tools.contract.js.map +1 -1
  103. package/dist/sdk-tools.contract.registry.js +110 -7
  104. package/dist/sdk-tools.contract.registry.js.map +1 -1
  105. package/dist/sdk-tools.contract.values.js +110 -7
  106. package/dist/sdk-tools.contract.values.js.map +1 -1
  107. package/dist/tool-contracts.context-orientation.d.ts +5 -0
  108. package/dist/tool-contracts.context-orientation.js +57 -0
  109. package/dist/tool-contracts.context-orientation.js.map +1 -0
  110. package/dist/tool-contracts.d.ts +1 -0
  111. package/dist/tool-contracts.intelligence-evidence.js +26 -4
  112. package/dist/tool-contracts.intelligence-evidence.js.map +1 -1
  113. package/dist/tool-contracts.js +111 -8
  114. package/dist/tool-contracts.js.map +1 -1
  115. package/dist/tool-contracts.lifecycle.js +2 -2
  116. package/dist/tool-contracts.lifecycle.js.map +1 -1
  117. package/dist/tool-contracts.questions-listing.js +27 -1
  118. package/dist/tool-contracts.questions-listing.js.map +1 -1
  119. package/dist/{tool-contracts.values-DjctSW7S.d.ts → tool-contracts.values-BhxfrXS5.d.ts} +3 -1
  120. package/dist/tool-contracts.values.d.ts +1 -0
  121. package/dist/tool-contracts.values.js +111 -8
  122. package/dist/tool-contracts.values.js.map +1 -1
  123. package/package.json +1 -1
@@ -69,7 +69,7 @@ type FunctionConvexTarget = {
69
69
  outputProjection?: ContractOutputProjection;
70
70
  };
71
71
  type FunctionGatewayTarget = {
72
- handler: "identity.whoami" | "beliefs.list" | "evidence.list" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete";
72
+ handler: "identity.whoami" | "beliefs.list" | "evidence.get" | "evidence.list" | "evidence.search" | "questions.list" | "worktrees.get" | "tasks.create" | "tasks.list" | "tasks.update" | "tasks.complete" | "context.lucernOrient" | "graph.listIntelligenceQueries" | "topics.graphSpine";
73
73
  };
74
74
 
75
75
  declare const contextContracts: readonly [{
@@ -100,7 +100,7 @@ declare const contextContracts: readonly [{
100
100
  };
101
101
  auth: {
102
102
  scopes: string[];
103
- allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
103
+ allowedPrincipalTypes: ("agent" | "user" | "service" | "group" | "external_viewer")[];
104
104
  };
105
105
  convex: FunctionConvexTarget | undefined;
106
106
  gateway: FunctionGatewayTarget | undefined;
@@ -140,7 +140,7 @@ declare const contextContracts: readonly [{
140
140
  };
141
141
  auth: {
142
142
  scopes: string[];
143
- allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
143
+ allowedPrincipalTypes: ("agent" | "user" | "service" | "group" | "external_viewer")[];
144
144
  };
145
145
  convex: FunctionConvexTarget | undefined;
146
146
  gateway: FunctionGatewayTarget | undefined;
@@ -180,7 +180,47 @@ declare const contextContracts: readonly [{
180
180
  };
181
181
  auth: {
182
182
  scopes: string[];
183
- allowedPrincipalTypes: ("user" | "service" | "agent" | "group" | "external_viewer")[];
183
+ allowedPrincipalTypes: ("agent" | "user" | "service" | "group" | "external_viewer")[];
184
+ };
185
+ convex: FunctionConvexTarget | undefined;
186
+ gateway: FunctionGatewayTarget | undefined;
187
+ args: z.ZodTypeAny;
188
+ returns: z.ZodTypeAny;
189
+ input: z.ZodTypeAny;
190
+ output: z.ZodTypeAny;
191
+ openapi: {
192
+ summary: string;
193
+ tags: string[];
194
+ };
195
+ }, {
196
+ name: string;
197
+ kind: FunctionKind;
198
+ idempotent: FunctionIdempotency;
199
+ effects: readonly FunctionEffect[];
200
+ invariants: readonly string[] | undefined;
201
+ surfaceIntent: FunctionSurfaceIntent;
202
+ domain: string;
203
+ surfaceClass: SurfaceClass;
204
+ surfaces: FunctionSurfaceMap;
205
+ replacedBy: string | undefined;
206
+ rest: {
207
+ method: "GET" | "POST" | "PATCH" | "DELETE";
208
+ path: string;
209
+ };
210
+ sdk: {
211
+ namespace: string;
212
+ method: string;
213
+ };
214
+ mcp: {
215
+ exposed: boolean;
216
+ toolName: string;
217
+ } & McpToolContract & {
218
+ exposed: boolean;
219
+ toolName: string;
220
+ };
221
+ auth: {
222
+ scopes: string[];
223
+ allowedPrincipalTypes: ("agent" | "user" | "service" | "group" | "external_viewer")[];
184
224
  };
185
225
  convex: FunctionConvexTarget | undefined;
186
226
  gateway: FunctionGatewayTarget | undefined;
@@ -5,7 +5,7 @@ import { z } from 'zod';
5
5
  // src/tool-contracts.lifecycle.ts
6
6
  var CREATE_BELIEF = {
7
7
  name: "create_belief",
8
- 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)`; use modulate_confidence to record the first evidential update.",
8
+ 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.",
9
9
  parameters: {
10
10
  canonicalText: {
11
11
  type: "string",
@@ -91,7 +91,7 @@ var REFINE_BELIEF = {
91
91
  };
92
92
  var MODULATE_CONFIDENCE = {
93
93
  name: "modulate_confidence",
94
- description: "Record a confidence change for a belief. Like `git commit` to the credence log \u2014 an atomic, append-only write. Each modulation is a new entry in the history, not an overwrite. Scoring happens via merge; this tool records the individual data points. Pass the full subjective-logic tuple (`belief`, `disbelief`, `uncertainty`, `baseRate`) directly. If a caller only has a scalar probability, use `@lucern/sdk` helpers `opinionFromBaseRate`, `opinionFromDogmatic`, or `opinionFromProjected` to name the intended interpretation before calling this tool. Every modulation must cite a truth-bearing artifact: triggeringEvidenceId, triggeringQuestionId, triggeringAnswerId, triggeringContradictionId, or triggeringWorktreeId. Triggers: evidence_added, evidence_removed, contradiction_detected, contradiction_resolved, agent_assessment, worktree_outcome, worktree_completed, fusion, discount, deduction.",
94
+ 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.",
95
95
  parameters: {
96
96
  nodeId: { type: "string", description: "The belief to score" },
97
97
  belief: {
@@ -1658,6 +1658,60 @@ var REMOVE_LENS_FROM_TOPIC = {
1658
1658
  tier: "workhorse"
1659
1659
  };
1660
1660
 
1661
+ // src/tool-contracts.context-orientation.ts
1662
+ var LUCERN_ORIENT = {
1663
+ name: "lucern_orient",
1664
+ description: "Load the Lucern reasoning grammar before operating. Like `git help` plus a repository CONTRIBUTING guide for reasoning state - teaches the git-shaped model of topics, campaigns, lanes, worktrees, beliefs, questions, evidence, receipts, gates, and merges.",
1665
+ parameters: {
1666
+ audience: {
1667
+ type: "string",
1668
+ description: "Audience for the primer: agent, human, operator, or developer.",
1669
+ enum: ["agent", "human", "operator", "developer"]
1670
+ },
1671
+ depth: {
1672
+ type: "string",
1673
+ description: "Orientation depth: quick, standard, or deep.",
1674
+ enum: ["quick", "standard", "deep"]
1675
+ },
1676
+ situation: {
1677
+ type: "string",
1678
+ description: "Optional task or query context used to tailor suggested next calls."
1679
+ },
1680
+ includeExamples: {
1681
+ type: "boolean",
1682
+ description: "Whether to include concrete tool-call examples."
1683
+ },
1684
+ includeToolMap: {
1685
+ type: "boolean",
1686
+ description: "Whether to include situation-to-tool routing guidance."
1687
+ },
1688
+ includeFuture: {
1689
+ type: "boolean",
1690
+ description: "Whether to include future exemplar, gauntlet, and training-data capabilities."
1691
+ }
1692
+ },
1693
+ required: [],
1694
+ response: {
1695
+ description: "Canonical operator primer for Lucern's git-shaped reasoning substrate.",
1696
+ fields: {
1697
+ schemaVersion: "string - lucern_orientation.v1",
1698
+ canonicalMentalModel: "object - concise model of Lucern as git-shaped reasoning state",
1699
+ workflow: "array - recommended branch -> investigate -> prove gate -> merge workflow",
1700
+ grammarMap: "array - primitive-to-git-analogy map for topics, campaigns, worktrees, beliefs, questions, evidence, edges, contradictions, and gates",
1701
+ firstMoves: "array - recommended first tools for a cold-start agent",
1702
+ receiptRules: "array - how to interpret candidateCounts, broadening, coverageWarning, narrativeCoverage, synthesisLints, and noDefaultGlobalScan",
1703
+ safetyRules: "array - mutation and completion rules that preserve reasoning lineage",
1704
+ toolMap: "array | undefined - situation-to-tool routing map when requested",
1705
+ examples: "array | undefined - concrete tool-call examples when requested",
1706
+ futureCapabilities: "array | undefined - exemplar, gauntlet, trace-corpus, and native-model-training capabilities when requested",
1707
+ suggestedNextCalls: "array - safe next tool calls for the current situation"
1708
+ }
1709
+ },
1710
+ ownerModule: "reasoning-kernel",
1711
+ ontologyPrimitive: "graph",
1712
+ tier: "showcase"
1713
+ };
1714
+
1661
1715
  // src/tool-contracts.intelligence-evidence.ts
1662
1716
  var DETECT_CONFIRMATION_BIAS = {
1663
1717
  name: "detect_confirmation_bias",
@@ -1812,7 +1866,7 @@ var SEARCH_EVIDENCE = {
1812
1866
  };
1813
1867
  var CREATE_EVIDENCE = {
1814
1868
  name: "create_evidence",
1815
- 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.",
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. When evidence bears on beliefs, state whether it supports or contradicts; SL confidence is derived from these evidence relations.",
1816
1870
  parameters: {
1817
1871
  topicId: { type: "string", description: "Topic scope" },
1818
1872
  text: { type: "string", description: "Canonical evidence text" },
@@ -1823,7 +1877,20 @@ var CREATE_EVIDENCE = {
1823
1877
  },
1824
1878
  weight: {
1825
1879
  type: "number",
1826
- description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
1880
+ description: "Optional support weight: -1.0 (contradicts) to +1.0 (supports). If omitted, evidenceRelation + confidence determine the weight."
1881
+ },
1882
+ evidenceRelation: {
1883
+ type: "string",
1884
+ enum: ["supports", "contradicts"],
1885
+ description: "Canonical relation to targetId/linkedBeliefNodeId. Prefer this over relying on signed weight inference."
1886
+ },
1887
+ confidence: {
1888
+ type: "number",
1889
+ description: "Confidence in the evidence relation, 0.0 to 1.0"
1890
+ },
1891
+ beliefRelations: {
1892
+ type: "array",
1893
+ 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."
1827
1894
  },
1828
1895
  metadata: {
1829
1896
  type: "object",
@@ -1933,7 +2000,7 @@ var LINK_EVIDENCE = {
1933
2000
  };
1934
2001
  var LINK_EVIDENCE_TO_BELIEF = {
1935
2002
  name: "link_evidence_to_belief",
1936
- 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).",
2003
+ 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.",
1937
2004
  parameters: {
1938
2005
  evidenceId: { type: "string", description: "The evidence node ID" },
1939
2006
  beliefId: { type: "string", description: "The belief node ID" },
@@ -1941,9 +2008,18 @@ var LINK_EVIDENCE_TO_BELIEF = {
1941
2008
  type: "number",
1942
2009
  description: "Support weight: -1.0 (contradicts) to +1.0 (supports)"
1943
2010
  },
2011
+ evidenceRelation: {
2012
+ type: "string",
2013
+ enum: ["supports", "contradicts"],
2014
+ description: "Canonical semantic relation. If omitted, the sign of weight is used."
2015
+ },
2016
+ confidence: {
2017
+ type: "number",
2018
+ description: "Confidence in this evidence-to-belief relation, 0.0 to 1.0"
2019
+ },
1944
2020
  rationale: { type: "string", description: "Why this evidence is relevant" }
1945
2021
  },
1946
- required: ["evidenceId", "beliefId", "weight"],
2022
+ required: ["evidenceId", "beliefId"],
1947
2023
  response: {
1948
2024
  description: "The created edge linking evidence to belief",
1949
2025
  fields: {
@@ -2708,10 +2784,34 @@ var COMPILE_CONTEXT = {
2708
2784
  type: "string",
2709
2785
  description: "Optional source kind used as a resolver signal, such as cli, worktree, commit, or docs."
2710
2786
  },
2787
+ campaign: {
2788
+ type: "number",
2789
+ description: "Optional campaign dimension seed. When supplied without topicId, the compiler fans out across all carrier topics for that campaign instead of resolving a single topic."
2790
+ },
2791
+ lane: {
2792
+ type: "string",
2793
+ description: "Optional lane dimension seed. When supplied without topicId, the compiler reads all matching worktrees and their carrier topics."
2794
+ },
2795
+ status: {
2796
+ type: "string",
2797
+ description: "Optional state/status dimension seed for worktrees and graph rows."
2798
+ },
2799
+ principalId: {
2800
+ type: "string",
2801
+ description: "Optional principal seed for work authored, touched, or owned by a human, agent, group, or service principal."
2802
+ },
2803
+ workspaceId: {
2804
+ type: "string",
2805
+ description: "Optional workspace seed used by hosted MCP and SDK clients when compiling tenant-scoped context."
2806
+ },
2711
2807
  budget: {
2712
2808
  type: "number",
2713
2809
  description: "Token budget for prompt injection planning"
2714
2810
  },
2811
+ tokenBudget: {
2812
+ type: "number",
2813
+ description: "Compatibility alias for budget. External MCP clients may send tokenBudget when requesting prompt injection planning."
2814
+ },
2715
2815
  ranking: {
2716
2816
  type: "string",
2717
2817
  description: "Ranking profile for context ordering",
@@ -2747,7 +2847,9 @@ var COMPILE_CONTEXT = {
2747
2847
  recentEvidence: "array \u2014 recent evidence ranked for this query",
2748
2848
  contradictions: "array \u2014 unresolved contradiction records",
2749
2849
  relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
2750
- contextNarrative: "array \u2014 guidance for prompt assembly",
2850
+ contextNarrative: "array \u2014 ordered synthesis blocks with kind/text, starting with executive_summary and canonical narrative blocks before raw objects",
2851
+ retrievalReceipt: "object \u2014 candidateCounts, coverageWarning, narrativeCoverage, synthesisLints, and suggestedNextActions",
2852
+ narrativeCoverage: "object \u2014 recordsSynthesized, recordsNamed, recordsOmitted, and blocksEmitted for the narrative",
2751
2853
  injectionPolicy: "object \u2014 token-budgeted section selections",
2752
2854
  diagnostics: "object \u2014 scoring and utilization telemetry"
2753
2855
  }
@@ -4618,6 +4720,7 @@ var MCP_TOOL_CONTRACTS = {
4618
4720
  update_worktree_metadata: UPDATE_WORKTREE_METADATA,
4619
4721
  identity_whoami: IDENTITY_WHOAMI,
4620
4722
  resolve_interactive_principal: RESOLVE_INTERACTIVE_PRINCIPAL,
4723
+ lucern_orient: LUCERN_ORIENT,
4621
4724
  compile_context: COMPILE_CONTEXT,
4622
4725
  record_scope_learning: RECORD_SCOPE_LEARNING,
4623
4726
  pipeline_snapshot: PIPELINE_SNAPSHOT,
@@ -4694,6 +4797,12 @@ var internalSystem = {
4694
4797
  mcp: "internal",
4695
4798
  cli: "internal"
4696
4799
  };
4800
+ var internalSdkRestOnly = {
4801
+ sdk: "internal",
4802
+ rest: "internal",
4803
+ mcp: "none",
4804
+ cli: "none"
4805
+ };
4697
4806
  var publicWithInternalMcp = {
4698
4807
  sdk: "public",
4699
4808
  rest: "public",
@@ -4733,6 +4842,7 @@ function entries(names, surfaceClass, surfaceIntent, surfaces, rationale) {
4733
4842
  );
4734
4843
  }
4735
4844
  var MCP_CORE_OPERATION_NAMES = [
4845
+ "lucern_orient",
4736
4846
  "compile_context",
4737
4847
  "identity_whoami",
4738
4848
  "resolve_interactive_principal",
@@ -4742,7 +4852,6 @@ var MCP_CORE_OPERATION_NAMES = [
4742
4852
  "get_belief",
4743
4853
  "list_beliefs",
4744
4854
  "refine_belief",
4745
- "modulate_confidence",
4746
4855
  "fork_belief",
4747
4856
  "archive_belief",
4748
4857
  "search_beliefs",
@@ -5010,6 +5119,13 @@ var LUCERN_OPERATION_MANIFEST = {
5010
5119
  internalSystem,
5011
5120
  "Lucern system/background operation. Available to platform code paths, hidden from public MCP discovery."
5012
5121
  ),
5122
+ modulate_confidence: {
5123
+ name: "modulate_confidence",
5124
+ surfaceClass: "platform_internal",
5125
+ surfaceIntent: "system",
5126
+ surfaces: internalSdkRestOnly,
5127
+ rationale: "Internal SL ledger append primitive. Public callers attach evidence or contradiction relations; confidence is derived algorithmically."
5128
+ },
5013
5129
  ...entries(
5014
5130
  LEGACY_COMPAT_OPERATION_NAMES,
5015
5131
  "legacy_compat",
@@ -5346,6 +5462,14 @@ var observationContextArgs = z.object({
5346
5462
  limit: z.number().optional().describe("Maximum observations to return."),
5347
5463
  status: z.string().optional().describe("Observation status filter.")
5348
5464
  });
5465
+ var lucernOrientArgs = z.object({
5466
+ audience: z.enum(["agent", "human", "operator", "developer"]).optional().describe("Audience for the orientation primer."),
5467
+ depth: z.enum(["quick", "standard", "deep"]).optional().describe("How much orientation detail to include."),
5468
+ situation: z.string().optional().describe("Optional task or query context for suggested next calls."),
5469
+ includeExamples: z.boolean().optional().describe("Include concrete tool-call examples."),
5470
+ includeToolMap: z.boolean().optional().describe("Include situation-to-tool routing guidance."),
5471
+ includeFuture: z.boolean().optional().describe("Include future training and pedagogy capabilities.")
5472
+ });
5349
5473
  function isRecord(value) {
5350
5474
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
5351
5475
  }
@@ -5373,6 +5497,20 @@ var observationInput = (input, context) => withUserId(
5373
5497
  context
5374
5498
  );
5375
5499
  var contextContracts = [
5500
+ surfaceContract({
5501
+ name: "lucern_orient",
5502
+ kind: "query",
5503
+ domain: "context",
5504
+ surfaceClass: "platform_public",
5505
+ path: "/context/orient",
5506
+ sdkNamespace: "context",
5507
+ sdkMethod: "lucernOrient",
5508
+ summary: "Return the canonical Lucern operator orientation primer.",
5509
+ gateway: {
5510
+ handler: "context.lucernOrient"
5511
+ },
5512
+ args: lucernOrientArgs
5513
+ }),
5376
5514
  surfaceContract({
5377
5515
  name: "compile_context",
5378
5516
  kind: "query",