@lucern/contracts 1.0.0 → 1.0.1

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 (213) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/dist/dsl.d.ts +75 -4
  3. package/dist/dsl.values-rhsroqi0.d.ts +21 -0
  4. package/dist/dsl.values.d.ts +5 -0
  5. package/dist/dsl.values.js +675 -0
  6. package/dist/dsl.values.js.map +1 -0
  7. package/dist/function-registry/beliefs.d.ts +1 -17
  8. package/dist/function-registry/beliefs.js +155 -117
  9. package/dist/function-registry/beliefs.js.map +1 -1
  10. package/dist/function-registry/coding.d.ts +1 -17
  11. package/dist/function-registry/coding.js +155 -117
  12. package/dist/function-registry/coding.js.map +1 -1
  13. package/dist/function-registry/context.d.ts +1 -17
  14. package/dist/function-registry/context.js +155 -117
  15. package/dist/function-registry/context.js.map +1 -1
  16. package/dist/function-registry/contracts.d.ts +1 -17
  17. package/dist/function-registry/contracts.js +155 -117
  18. package/dist/function-registry/contracts.js.map +1 -1
  19. package/dist/function-registry/coordination.d.ts +1 -17
  20. package/dist/function-registry/coordination.js +155 -117
  21. package/dist/function-registry/coordination.js.map +1 -1
  22. package/dist/function-registry/edges.d.ts +1 -17
  23. package/dist/function-registry/edges.js +155 -117
  24. package/dist/function-registry/edges.js.map +1 -1
  25. package/dist/function-registry/evidence.d.ts +1 -17
  26. package/dist/function-registry/evidence.js +155 -117
  27. package/dist/function-registry/evidence.js.map +1 -1
  28. package/dist/function-registry/graph.d.ts +1 -17
  29. package/dist/function-registry/graph.js +155 -117
  30. package/dist/function-registry/graph.js.map +1 -1
  31. package/dist/function-registry/helpers.d.ts +1 -1
  32. package/dist/function-registry/helpers.js +155 -117
  33. package/dist/function-registry/helpers.js.map +1 -1
  34. package/dist/function-registry/identity.d.ts +1 -17
  35. package/dist/function-registry/identity.js +155 -117
  36. package/dist/function-registry/identity.js.map +1 -1
  37. package/dist/function-registry/index.d.ts +1 -1
  38. package/dist/function-registry/index.js +158 -118
  39. package/dist/function-registry/index.js.map +1 -1
  40. package/dist/function-registry/judgments.d.ts +1 -17
  41. package/dist/function-registry/judgments.js +155 -117
  42. package/dist/function-registry/judgments.js.map +1 -1
  43. package/dist/function-registry/legacy.d.ts +1 -17
  44. package/dist/function-registry/legacy.js +155 -117
  45. package/dist/function-registry/legacy.js.map +1 -1
  46. package/dist/function-registry/lenses.d.ts +1 -17
  47. package/dist/function-registry/lenses.js +155 -117
  48. package/dist/function-registry/lenses.js.map +1 -1
  49. package/dist/function-registry/manifest.d.ts +3 -3
  50. package/dist/function-registry/manifest.js +1 -0
  51. package/dist/function-registry/manifest.js.map +1 -1
  52. package/dist/function-registry/nodes.d.ts +1 -17
  53. package/dist/function-registry/nodes.js +155 -117
  54. package/dist/function-registry/nodes.js.map +1 -1
  55. package/dist/function-registry/ontologies.d.ts +1 -17
  56. package/dist/function-registry/ontologies.js +155 -117
  57. package/dist/function-registry/ontologies.js.map +1 -1
  58. package/dist/function-registry/pipeline.d.ts +1 -17
  59. package/dist/function-registry/pipeline.js +155 -117
  60. package/dist/function-registry/pipeline.js.map +1 -1
  61. package/dist/function-registry/questions.d.ts +1 -17
  62. package/dist/function-registry/questions.js +155 -117
  63. package/dist/function-registry/questions.js.map +1 -1
  64. package/dist/function-registry/tasks.d.ts +1 -17
  65. package/dist/function-registry/tasks.js +155 -117
  66. package/dist/function-registry/tasks.js.map +1 -1
  67. package/dist/function-registry/topics.d.ts +1 -17
  68. package/dist/function-registry/topics.js +155 -117
  69. package/dist/function-registry/topics.js.map +1 -1
  70. package/dist/function-registry/types.d.ts +2 -2
  71. package/dist/function-registry/worktrees.d.ts +41 -17
  72. package/dist/function-registry/worktrees.js +174 -117
  73. package/dist/function-registry/worktrees.js.map +1 -1
  74. package/dist/generated/lucernWebPublicEnv.js.map +1 -1
  75. package/dist/generated/lucernWebServerEnv.js.map +1 -1
  76. package/dist/{idOf-DR8tkhQS.d.ts → idOf-BmkVDhD8.d.ts} +1 -1
  77. package/dist/index.d.ts +47 -8
  78. package/dist/index.js +45072 -45005
  79. package/dist/index.js.map +1 -1
  80. package/dist/infisical-runtime.base.d.ts +444 -0
  81. package/dist/infisical-runtime.base.js +640 -0
  82. package/dist/infisical-runtime.base.js.map +1 -0
  83. package/dist/infisical-runtime.contract.d.ts +9 -440
  84. package/dist/infisical-runtime.contract.js +14 -1
  85. package/dist/infisical-runtime.contract.js.map +1 -1
  86. package/dist/infisical-runtime.platform-ops-secrets.d.ts +743 -0
  87. package/dist/infisical-runtime.platform-ops-secrets.js +962 -0
  88. package/dist/infisical-runtime.platform-ops-secrets.js.map +1 -0
  89. package/dist/infisical-runtime.platform-secrets.d.ts +598 -0
  90. package/dist/infisical-runtime.platform-secrets.js +726 -0
  91. package/dist/infisical-runtime.platform-secrets.js.map +1 -0
  92. package/dist/infisical-runtime.tenant-secrets.d.ts +486 -0
  93. package/dist/infisical-runtime.tenant-secrets.js +1131 -0
  94. package/dist/infisical-runtime.tenant-secrets.js.map +1 -0
  95. package/dist/manifests/edge-policy-manifest.d.ts +1 -1
  96. package/dist/manifests/infisical-runtime-manifest.d.ts +1 -1
  97. package/dist/manifests/infisical-runtime-manifest.js +14 -1
  98. package/dist/manifests/infisical-runtime-manifest.js.map +1 -1
  99. package/dist/manifests/tenant-client-manifest.d.ts +5 -1
  100. package/dist/manifests/tenant-client-manifest.js +5 -0
  101. package/dist/manifests/tenant-client-manifest.js.map +1 -1
  102. package/dist/proof-attestation.json +1 -1
  103. package/dist/schemas/index.d.ts +1 -1
  104. package/dist/schemas/index.js.map +1 -1
  105. package/dist/schemas/manifest.d.ts +61 -61
  106. package/dist/schemas/manifest.js.map +1 -1
  107. package/dist/schemas/tables/kernel/config.js.map +1 -1
  108. package/dist/schemas/tables/kernel/coordination.js.map +1 -1
  109. package/dist/schemas/tables/kernel/decision.d.ts +1 -1
  110. package/dist/schemas/tables/kernel/decision.js.map +1 -1
  111. package/dist/schemas/tables/kernel/embedding.d.ts +1 -1
  112. package/dist/schemas/tables/kernel/embedding.js.map +1 -1
  113. package/dist/schemas/tables/kernel/epistemic.d.ts +1 -1
  114. package/dist/schemas/tables/kernel/epistemic.js.map +1 -1
  115. package/dist/schemas/tables/kernel/idempotency.js.map +1 -1
  116. package/dist/schemas/tables/kernel/infra.js.map +1 -1
  117. package/dist/schemas/tables/kernel/intelligence.d.ts +1 -1
  118. package/dist/schemas/tables/kernel/intelligence.js.map +1 -1
  119. package/dist/schemas/tables/kernel/lens.d.ts +5 -5
  120. package/dist/schemas/tables/kernel/lens.js.map +1 -1
  121. package/dist/schemas/tables/kernel/ontology.d.ts +1 -1
  122. package/dist/schemas/tables/kernel/ontology.js.map +1 -1
  123. package/dist/schemas/tables/kernel/platform.js.map +1 -1
  124. package/dist/schemas/tables/kernel/spine.d.ts +1 -1
  125. package/dist/schemas/tables/kernel/spine.js.map +1 -1
  126. package/dist/schemas/tables/kernel/task.d.ts +1 -1
  127. package/dist/schemas/tables/kernel/task.js.map +1 -1
  128. package/dist/schemas/tables/kernel/topic.d.ts +1 -1
  129. package/dist/schemas/tables/kernel/topic.js.map +1 -1
  130. package/dist/schemas/tables/kernel/workflow.d.ts +1 -1
  131. package/dist/schemas/tables/kernel/workflow.js.map +1 -1
  132. package/dist/schemas/tables/kernel/worktree.d.ts +1 -1
  133. package/dist/schemas/tables/kernel/worktree.js.map +1 -1
  134. package/dist/schemas/tables/mc/identity.d.ts +1 -1
  135. package/dist/schemas/tables/mc/methodology.d.ts +1 -1
  136. package/dist/schemas/tables/mc/pack.d.ts +9 -9
  137. package/dist/schemas/tables/mc/policy.d.ts +1 -1
  138. package/dist/schemas/tables/mc/registry.d.ts +1 -1
  139. package/dist/schemas/tables/mc/runtime.d.ts +1 -1
  140. package/dist/schemas/tables/mc/tenant.d.ts +1 -1
  141. package/dist/schemas/tables/mc/workspace.d.ts +1 -1
  142. package/dist/schemas.values-5J5oIK7z.d.ts +26 -0
  143. package/dist/schemas.values.d.ts +7 -0
  144. package/dist/schemas.values.js +5324 -0
  145. package/dist/schemas.values.js.map +1 -0
  146. package/dist/sdk-tools.contract.analytics.d.ts +27 -0
  147. package/dist/sdk-tools.contract.analytics.js +616 -0
  148. package/dist/sdk-tools.contract.analytics.js.map +1 -0
  149. package/dist/sdk-tools.contract.d.ts +43 -2
  150. package/dist/sdk-tools.contract.graph.d.ts +11 -0
  151. package/dist/sdk-tools.contract.graph.js +156 -0
  152. package/dist/sdk-tools.contract.graph.js.map +1 -0
  153. package/dist/sdk-tools.contract.js +4107 -4062
  154. package/dist/sdk-tools.contract.js.map +1 -1
  155. package/dist/sdk-tools.contract.registry.d.ts +25 -0
  156. package/dist/sdk-tools.contract.registry.js +5504 -0
  157. package/dist/sdk-tools.contract.registry.js.map +1 -0
  158. package/dist/sdk-tools.contract.types.d.ts +15 -0
  159. package/dist/sdk-tools.contract.types.js +3 -0
  160. package/dist/sdk-tools.contract.types.js.map +1 -0
  161. package/dist/sdk-tools.contract.values-LuBh95zg.d.ts +58 -0
  162. package/dist/sdk-tools.contract.values.d.ts +7 -0
  163. package/dist/sdk-tools.contract.values.js +5581 -0
  164. package/dist/sdk-tools.contract.values.js.map +1 -0
  165. package/dist/sdk-tools.contract.workflow.d.ts +17 -0
  166. package/dist/sdk-tools.contract.workflow.js +287 -0
  167. package/dist/sdk-tools.contract.workflow.js.map +1 -0
  168. package/dist/tenant-client.contract.d.ts +5 -1
  169. package/dist/tenant-client.contract.js +5 -0
  170. package/dist/tenant-client.contract.js.map +1 -1
  171. package/dist/tool-contracts.d.ts +34 -1
  172. package/dist/tool-contracts.graph.d.ts +18 -0
  173. package/dist/tool-contracts.graph.js +378 -0
  174. package/dist/tool-contracts.graph.js.map +1 -0
  175. package/dist/tool-contracts.intelligence-evidence.d.ts +15 -0
  176. package/dist/tool-contracts.intelligence-evidence.js +303 -0
  177. package/dist/tool-contracts.intelligence-evidence.js.map +1 -0
  178. package/dist/tool-contracts.js +155 -118
  179. package/dist/tool-contracts.js.map +1 -1
  180. package/dist/tool-contracts.lifecycle.d.ts +13 -0
  181. package/dist/tool-contracts.lifecycle.js +410 -0
  182. package/dist/tool-contracts.lifecycle.js.map +1 -0
  183. package/dist/tool-contracts.nodes-lenses.d.ts +17 -0
  184. package/dist/tool-contracts.nodes-lenses.js +334 -0
  185. package/dist/tool-contracts.nodes-lenses.js.map +1 -0
  186. package/dist/tool-contracts.ontology.d.ts +16 -0
  187. package/dist/tool-contracts.ontology.js +344 -0
  188. package/dist/tool-contracts.ontology.js.map +1 -0
  189. package/dist/tool-contracts.pipeline-coordination.d.ts +25 -0
  190. package/dist/tool-contracts.pipeline-coordination.js +684 -0
  191. package/dist/tool-contracts.pipeline-coordination.js.map +1 -0
  192. package/dist/tool-contracts.policy-observation-task-topic.d.ts +25 -0
  193. package/dist/tool-contracts.policy-observation-task-topic.js +740 -0
  194. package/dist/tool-contracts.policy-observation-task-topic.js.map +1 -0
  195. package/dist/tool-contracts.questions-listing.d.ts +27 -0
  196. package/dist/tool-contracts.questions-listing.js +782 -0
  197. package/dist/tool-contracts.questions-listing.js.map +1 -0
  198. package/dist/tool-contracts.types.d.ts +34 -0
  199. package/dist/tool-contracts.types.js +3 -0
  200. package/dist/tool-contracts.types.js.map +1 -0
  201. package/dist/tool-contracts.values-DjctSW7S.d.ts +147 -0
  202. package/dist/tool-contracts.values.d.ts +11 -0
  203. package/dist/tool-contracts.values.js +4398 -0
  204. package/dist/tool-contracts.values.js.map +1 -0
  205. package/dist/tool-contracts.worktrees.d.ts +8 -0
  206. package/dist/tool-contracts.worktrees.js +280 -0
  207. package/dist/tool-contracts.worktrees.js.map +1 -0
  208. package/package.json +3 -11
  209. package/dist/dsl-DVPthQGY.d.ts +0 -110
  210. package/dist/index-CM1Pl_vI.d.ts +0 -28
  211. package/dist/sdk-tools.contract-CKmSsrZ2.d.ts +0 -146
  212. package/dist/tool-contracts-C_xvM9q2.d.ts +0 -326
  213. package/dist/{edge-policy-manifest-Dw5IhT1L.d.ts → edge-policy-manifest-4KOSP4nk.d.ts} +2 -2
@@ -0,0 +1,334 @@
1
+ // src/lens-workflow.contract.ts
2
+ var LENS_PERSPECTIVE_TYPES = [
3
+ "investigation",
4
+ "monitoring",
5
+ "analysis",
6
+ "comparison",
7
+ "taxonomy"
8
+ ];
9
+
10
+ // src/tool-contracts.nodes-lenses.ts
11
+ var CREATE_EPISTEMIC_NODE = {
12
+ name: "create_epistemic_node",
13
+ description: "Commit a generic epistemic graph node. Like `git commit` \u2014 creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.",
14
+ parameters: {
15
+ globalId: { type: "string", description: "Optional idempotent node global ID" },
16
+ nodeType: { type: "string", description: "Public epistemic node type" },
17
+ canonicalText: { type: "string", description: "Canonical node text" },
18
+ text: { type: "string", description: "Alias for canonicalText" },
19
+ contentHash: { type: "string", description: "Optional idempotency content hash" },
20
+ sourceType: { type: "string", description: "Source type for provenance" },
21
+ topicId: { type: "string", description: "Optional topic scope" },
22
+ content: { type: "string", description: "Extended content" },
23
+ title: { type: "string", description: "Display title" },
24
+ metadata: { type: "object", description: "Optional node metadata" }
25
+ },
26
+ required: ["nodeType"],
27
+ response: {
28
+ description: "Created node result",
29
+ fields: {
30
+ nodeId: "string",
31
+ nodeGlobalId: "string",
32
+ isDuplicate: "boolean"
33
+ }
34
+ },
35
+ ownerModule: "reasoning-kernel",
36
+ ontologyPrimitive: "graph",
37
+ tier: "showcase"
38
+ };
39
+ var GET_EPISTEMIC_NODE = {
40
+ name: "get_epistemic_node",
41
+ description: "Read one epistemic graph node. Like `git show` \u2014 resolves a canonical spine node by ID or global ID.",
42
+ parameters: {
43
+ nodeId: { type: "string", description: "Node ID or global ID" }
44
+ },
45
+ required: ["nodeId"],
46
+ response: {
47
+ description: "The resolved node",
48
+ fields: { node: "object" }
49
+ },
50
+ ownerModule: "reasoning-kernel",
51
+ ontologyPrimitive: "graph",
52
+ tier: "workhorse"
53
+ };
54
+ var LIST_EPISTEMIC_NODES = {
55
+ name: "list_epistemic_nodes",
56
+ description: "List epistemic graph nodes. Like `git ls-tree` \u2014 lists canonical spine nodes by topic, type, status, or search query.",
57
+ parameters: {
58
+ topicId: { type: "string", description: "Optional topic scope" },
59
+ nodeType: { type: "string", description: "Optional node type filter" },
60
+ status: { type: "string", description: "Optional lifecycle status" },
61
+ searchQuery: { type: "string", description: "Optional text search query" },
62
+ limit: { type: "number", description: "Maximum nodes to return" }
63
+ },
64
+ required: [],
65
+ response: {
66
+ description: "Matching nodes",
67
+ fields: { nodes: "array" }
68
+ },
69
+ ownerModule: "reasoning-kernel",
70
+ ontologyPrimitive: "graph",
71
+ tier: "workhorse"
72
+ };
73
+ var UPDATE_EPISTEMIC_NODE = {
74
+ name: "update_epistemic_node",
75
+ description: "Amend an epistemic graph node. Like `git commit --amend` \u2014 updates mutable node metadata, text, status, or verification fields.",
76
+ parameters: {
77
+ nodeId: { type: "string", description: "Node ID or global ID" },
78
+ canonicalText: { type: "string", description: "Updated canonical text" },
79
+ text: { type: "string", description: "Alias for canonicalText" },
80
+ contentHash: { type: "string", description: "Updated content hash" },
81
+ content: { type: "string", description: "Updated content" },
82
+ title: { type: "string", description: "Updated display title" },
83
+ metadata: { type: "object", description: "Updated metadata" },
84
+ confidence: { type: "number", description: "Updated confidence" },
85
+ verificationStatus: { type: "string", description: "Updated verification status" },
86
+ status: { type: "string", description: "Updated lifecycle status" }
87
+ },
88
+ required: ["nodeId"],
89
+ response: {
90
+ description: "Node update result",
91
+ fields: { success: "boolean" }
92
+ },
93
+ ownerModule: "reasoning-kernel",
94
+ ontologyPrimitive: "graph",
95
+ tier: "workhorse"
96
+ };
97
+ var ARCHIVE_EPISTEMIC_NODE = {
98
+ name: "archive_epistemic_node",
99
+ description: "Archive an epistemic graph node. Like `git rm --cached` \u2014 removes a node from active traversal without hard-deleting it.",
100
+ parameters: {
101
+ nodeId: { type: "string", description: "Node ID or global ID" }
102
+ },
103
+ required: ["nodeId"],
104
+ response: {
105
+ description: "Archive result",
106
+ fields: { success: "boolean", effectiveStatus: "string" }
107
+ },
108
+ ownerModule: "reasoning-kernel",
109
+ ontologyPrimitive: "graph",
110
+ tier: "workhorse"
111
+ };
112
+ var VERIFY_EPISTEMIC_NODE = {
113
+ name: "verify_epistemic_node",
114
+ description: "Record verification state on an epistemic graph node. Like `git tag` \u2014 marks the node with a reviewed verification state.",
115
+ parameters: {
116
+ nodeId: { type: "string", description: "Node ID or global ID" },
117
+ verificationStatus: { type: "string", description: "Verification status" },
118
+ confidence: { type: "number", description: "Optional confidence update" }
119
+ },
120
+ required: ["nodeId", "verificationStatus"],
121
+ response: {
122
+ description: "Verification result",
123
+ fields: { success: "boolean" }
124
+ },
125
+ ownerModule: "reasoning-kernel",
126
+ ontologyPrimitive: "graph",
127
+ tier: "workhorse"
128
+ };
129
+ var SUPERSEDE_EPISTEMIC_NODE = {
130
+ name: "supersede_epistemic_node",
131
+ description: "Supersede an epistemic graph node with a new version. Like `git commit --amend` on an immutable history branch \u2014 creates the replacement and marks the old node superseded.",
132
+ parameters: {
133
+ oldNodeId: { type: "string", description: "Node ID or global ID to supersede" },
134
+ newGlobalId: { type: "string", description: "Optional replacement global ID" },
135
+ newCanonicalText: { type: "string", description: "Replacement canonical text" },
136
+ text: { type: "string", description: "Alias for newCanonicalText" },
137
+ newContentHash: { type: "string", description: "Optional replacement content hash" },
138
+ reason: { type: "string", description: "Reason for superseding" }
139
+ },
140
+ required: ["oldNodeId"],
141
+ response: {
142
+ description: "Supersede result",
143
+ fields: { oldNodeId: "string", newNodeId: "string" }
144
+ },
145
+ ownerModule: "reasoning-kernel",
146
+ ontologyPrimitive: "graph",
147
+ tier: "workhorse"
148
+ };
149
+ var BATCH_CREATE_EPISTEMIC_NODES = {
150
+ name: "batch_create_epistemic_nodes",
151
+ description: "Commit multiple epistemic graph nodes. Like `git commit` with many staged files \u2014 writes a batch of canonical spine nodes.",
152
+ parameters: {
153
+ nodes: {
154
+ type: "array",
155
+ description: "Nodes to create with nodeType, canonicalText/text, and optional metadata."
156
+ }
157
+ },
158
+ required: ["nodes"],
159
+ response: {
160
+ description: "Batch node creation result",
161
+ fields: { created: "number", results: "array" }
162
+ },
163
+ ownerModule: "reasoning-kernel",
164
+ ontologyPrimitive: "graph",
165
+ tier: "workhorse"
166
+ };
167
+ var RECORD_JUDGMENT = {
168
+ name: "record_judgment",
169
+ description: "Record a judgment \u2014 an irreversible commitment based on the current epistemic state. Like a `git tag` marking a release. A judgment synthesizes beliefs, evidence, and uncertainties into a determination. Once issued, a judgment is evaluated against the epistemic state that existed when it was made (knowledge horizon evaluation, Invariant #10).",
170
+ parameters: {
171
+ title: { type: "string", description: "Short judgment statement" },
172
+ rationale: {
173
+ type: "string",
174
+ description: "Full reasoning behind the judgment"
175
+ },
176
+ topicId: { type: "string", description: "Topic scope" },
177
+ beliefIds: {
178
+ type: "array",
179
+ description: "Beliefs that warrant this judgment"
180
+ },
181
+ confidence: {
182
+ type: "number",
183
+ description: "Confidence in the judgment (0-1)"
184
+ }
185
+ },
186
+ required: ["title", "rationale"],
187
+ response: {
188
+ description: "The recorded judgment",
189
+ fields: {
190
+ judgmentId: "string",
191
+ title: "string",
192
+ status: "string \u2014 'issued'"
193
+ }
194
+ },
195
+ ownerModule: "decisions",
196
+ ontologyPrimitive: "judgment",
197
+ tier: "showcase"
198
+ };
199
+ var CREATE_LENS = {
200
+ name: "create_lens",
201
+ description: "Create a reusable lens that overlays a workspace topic with a specific analytical perspective. Like `git branch <name>` for operational scaffolding \u2014 a lens persists across worktrees and carries prompts, workflows, and task templates. Multiple topics in the same workspace can reuse the same lens.",
202
+ parameters: {
203
+ name: {
204
+ type: "string",
205
+ description: "Lens name (e.g., 'market dynamics', 'team quality')"
206
+ },
207
+ workspaceId: {
208
+ type: "string",
209
+ description: "Workspace scope for the lens. Required unless topicId resolves to a workspace-scoped topic."
210
+ },
211
+ topicId: {
212
+ type: "string",
213
+ description: "Optional originating topic scope. Lenses remain reusable across topics even when this is set."
214
+ },
215
+ description: {
216
+ type: "string",
217
+ description: "What this lens is designed to investigate or monitor"
218
+ },
219
+ perspectiveType: {
220
+ type: "string",
221
+ description: "Perspective type for the lens. Validated against schemaEnumConfig category 'lens_perspective_type'.",
222
+ enum: [...LENS_PERSPECTIVE_TYPES]
223
+ },
224
+ promptTemplates: {
225
+ type: "array",
226
+ description: "Langfuse prompt references used when operating through this lens"
227
+ },
228
+ workflowTemplates: {
229
+ type: "array",
230
+ description: "Guided workflow templates for lens-driven investigations"
231
+ },
232
+ taskTemplates: {
233
+ type: "array",
234
+ description: "Default task templates instantiated when the lens is applied"
235
+ },
236
+ filterCriteria: {
237
+ type: "object",
238
+ description: "Belief/evidence filtering rules applied by the lens"
239
+ }
240
+ },
241
+ required: ["name", "perspectiveType"],
242
+ response: {
243
+ description: "The created lens",
244
+ fields: {
245
+ lensId: "string",
246
+ name: "string",
247
+ workspaceId: "string",
248
+ status: "string \u2014 'active'"
249
+ }
250
+ },
251
+ ownerModule: "reasoning-kernel",
252
+ ontologyPrimitive: "lens",
253
+ tier: "showcase"
254
+ };
255
+ var LIST_LENSES = {
256
+ name: "list_lenses",
257
+ description: "List reusable lenses for a workspace, optionally scored by whether they are active on a topic. Like `git branch --list` \u2014 shows the available named frames you can activate. When topicId is provided, the response can indicate which lenses are already applied there.",
258
+ parameters: {
259
+ workspaceId: {
260
+ type: "string",
261
+ description: "Workspace scope to list lenses from"
262
+ },
263
+ topicId: {
264
+ type: "string",
265
+ description: "Optional topic scope used to derive workspace and annotate applied lenses"
266
+ },
267
+ status: {
268
+ type: "string",
269
+ description: "Filter by lens lifecycle status",
270
+ enum: ["draft", "active", "archived"]
271
+ },
272
+ perspectiveType: {
273
+ type: "string",
274
+ description: "Filter by perspective type",
275
+ enum: [...LENS_PERSPECTIVE_TYPES]
276
+ }
277
+ },
278
+ required: [],
279
+ response: {
280
+ description: "Available lenses",
281
+ fields: {
282
+ lenses: "array \u2014 each item includes lensId, name, workspaceId, perspectiveType, status, and optional isAppliedToTopic"
283
+ }
284
+ },
285
+ ownerModule: "reasoning-kernel",
286
+ ontologyPrimitive: "lens",
287
+ tier: "workhorse"
288
+ };
289
+ var APPLY_LENS_TO_TOPIC = {
290
+ name: "apply_lens_to_topic",
291
+ description: "Apply a lens to a topic so it becomes an active perspective overlay. Like `git checkout <branch>` for a reusable frame \u2014 the topic keeps its knowledge, but the active lens shapes guidance and retrieval. Multiple active lenses can coexist on the same topic.",
292
+ parameters: {
293
+ lensId: { type: "string", description: "Lens to activate on the topic" },
294
+ topicId: { type: "string", description: "Topic that should receive the lens" }
295
+ },
296
+ required: ["lensId", "topicId"],
297
+ response: {
298
+ description: "Lens activation result",
299
+ fields: {
300
+ bindingId: "string",
301
+ lensId: "string",
302
+ topicId: "string",
303
+ status: "string \u2014 'active'"
304
+ }
305
+ },
306
+ ownerModule: "reasoning-kernel",
307
+ ontologyPrimitive: "lens",
308
+ tier: "workhorse"
309
+ };
310
+ var REMOVE_LENS_FROM_TOPIC = {
311
+ name: "remove_lens_from_topic",
312
+ description: "Remove an active lens overlay from a topic. Like `git switch` away from a frame \u2014 the topic remains, but the lens stops shaping the investigation context. Historical binding state is preserved for auditability.",
313
+ parameters: {
314
+ lensId: { type: "string", description: "Lens to remove from the topic" },
315
+ topicId: { type: "string", description: "Topic that currently has the lens applied" }
316
+ },
317
+ required: ["lensId", "topicId"],
318
+ response: {
319
+ description: "Lens removal result",
320
+ fields: {
321
+ bindingId: "string",
322
+ lensId: "string",
323
+ topicId: "string",
324
+ status: "string \u2014 'removed'"
325
+ }
326
+ },
327
+ ownerModule: "reasoning-kernel",
328
+ ontologyPrimitive: "lens",
329
+ tier: "workhorse"
330
+ };
331
+
332
+ export { APPLY_LENS_TO_TOPIC, ARCHIVE_EPISTEMIC_NODE, BATCH_CREATE_EPISTEMIC_NODES, CREATE_EPISTEMIC_NODE, CREATE_LENS, GET_EPISTEMIC_NODE, LIST_EPISTEMIC_NODES, LIST_LENSES, RECORD_JUDGMENT, REMOVE_LENS_FROM_TOPIC, SUPERSEDE_EPISTEMIC_NODE, UPDATE_EPISTEMIC_NODE, VERIFY_EPISTEMIC_NODE };
333
+ //# sourceMappingURL=tool-contracts.nodes-lenses.js.map
334
+ //# sourceMappingURL=tool-contracts.nodes-lenses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lens-workflow.contract.ts","../src/tool-contracts.nodes-lenses.ts"],"names":[],"mappings":";AAkBO,IAAM,sBAAA,GAAyB;AAAA,EACpC,eAAA;AAAA,EACA,YAAA;AAAA,EACA,UAAA;AAAA,EACA,YAAA;AAAA,EACA;AACF,CAAA;;;ACrBO,IAAM,qBAAA,GAAyC;AAAA,EACpD,IAAA,EAAM,uBAAA;AAAA,EACN,WAAA,EACE,wLAAA;AAAA,EAEF,UAAA,EAAY;AAAA,IACV,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,oCAAA,EAAqC;AAAA,IAC9E,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,4BAAA,EAA6B;AAAA,IACtE,aAAA,EAAe,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,qBAAA,EAAsB;AAAA,IACpE,IAAA,EAAM,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,yBAAA,EAA0B;AAAA,IAC/D,WAAA,EAAa,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,mCAAA,EAAoC;AAAA,IAChF,UAAA,EAAY,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,4BAAA,EAA6B;AAAA,IACxE,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,sBAAA,EAAuB;AAAA,IAC/D,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,kBAAA,EAAmB;AAAA,IAC3D,KAAA,EAAO,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,eAAA,EAAgB;AAAA,IACtD,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,wBAAA;AAAyB,GACpE;AAAA,E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MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,+BAAA,EAAgC;AAAA,IACvE,OAAA,EAAS,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,2CAAA;AAA4C,GACtF;AAAA,EACA,QAAA,EAAU,CAAC,QAAA,EAAU,SAAS,CAAA;AAAA,EAC9B,QAAA,EAAU;AAAA,IACR,WAAA,EAAa,qBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,SAAA,EAAW,QAAA;AAAA,MACX,MAAA,EAAQ,QAAA;AAAA,MACR,OAAA,EAAS,QAAA;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.nodes-lenses.js","sourcesContent":["/**\n * Canonical lens workflow contract shared across schema, SDK, and MCP surfaces.\n */\n\n// Re-export filter criteria types for consumers who import from lens-workflow\nexport type {\n LensFilterCriteria,\n TaxonomyFilterCriteriaV1,\n EntityTypeFilterV1,\n OntologyScope,\n FilterValidationResult,\n} from \"./lens-filter.contract\";\nexport {\n validateFilterCriteria,\n isLensFilterCriteria,\n isTaxonomyFilterCriteriaV1,\n} from \"./lens-filter.contract\";\n\nexport const LENS_PERSPECTIVE_TYPES = [\n \"investigation\",\n \"monitoring\",\n \"analysis\",\n \"comparison\",\n \"taxonomy\",\n] as const;\n\nexport type LensPerspectiveType = (typeof LENS_PERSPECTIVE_TYPES)[number];\n\nexport const LENS_STATUSES = [\"draft\", \"active\", \"archived\"] as const;\n\nexport type LensStatus = (typeof LENS_STATUSES)[number];\n\nexport const LENS_TASK_TEMPLATE_PRIORITIES = [\n \"critical\",\n \"high\",\n \"medium\",\n \"low\",\n] as const;\n\nexport type LensTaskTemplatePriority =\n (typeof LENS_TASK_TEMPLATE_PRIORITIES)[number];\n\nexport type LensLooseMetadata = Record<string, unknown>;\n\nexport type LensPromptTemplateReference = {\n key: string;\n promptRef: string;\n phase?: string;\n role?: string;\n version?: string;\n required?: boolean;\n metadata?: LensLooseMetadata;\n};\n\nexport type LensWorkflowStepTemplate = {\n key: string;\n title: string;\n description?: string;\n promptTemplateKey?: string;\n taskTemplateKeys?: string[];\n metadata?: LensLooseMetadata;\n};\n\nexport type LensWorkflowTemplate = {\n key: string;\n name: string;\n description?: string;\n steps: LensWorkflowStepTemplate[];\n metadata?: LensLooseMetadata;\n};\n\nexport type LensTaskTemplate = {\n key: string;\n title: string;\n description?: string;\n priority?: LensTaskTemplatePriority;\n phase?: string;\n metadata?: LensLooseMetadata;\n};\n\nexport type LensQuestionTemplate = {\n key: string;\n text: string;\n priority?: LensTaskTemplatePriority;\n linkedBeliefKey?: string;\n metadata?: LensLooseMetadata;\n};\n\nexport type LensBranchMigrationSuggestion = {\n recommendedTool: \"create_lens\";\n perspectiveType: LensPerspectiveType;\n message: string;\n suggestedPayload: {\n name: string;\n description?: string;\n topicId?: string;\n workspaceId?: string;\n perspectiveType: LensPerspectiveType;\n };\n};\n\nexport const BRANCH_DEPRECATION_MESSAGE =\n \"Branches are deprecated for operational framing. Create a workspace-scoped lens instead.\";\n\nexport type DeprecatedBranchMetadata = {\n deprecated: true;\n deprecationMessage: string;\n lensSuggestion: LensBranchMigrationSuggestion;\n};\n\nexport function inferLensPerspectiveTypeFromBranchSchema(\n schema?: string | null\n): LensPerspectiveType {\n const normalized = schema?.trim().toLowerCase();\n if (normalized === \"phase\") {\n return \"monitoring\";\n }\n if (normalized === \"axis\" || normalized === \"dimension\") {\n return \"comparison\";\n }\n if (normalized === \"track\") {\n return \"investigation\";\n }\n return \"analysis\";\n}\n\nexport function migrateBranchToLens(args: {\n name: string;\n description?: string;\n topicId?: string;\n workspaceId?: string;\n schema?: string | null;\n}): LensBranchMigrationSuggestion {\n const perspectiveType = inferLensPerspectiveTypeFromBranchSchema(args.schema);\n return {\n recommendedTool: \"create_lens\",\n perspectiveType,\n message:\n \"Branches are deprecated for operational framing. Create a workspace-scoped lens with the suggested payload instead.\",\n suggestedPayload: {\n name: args.name,\n description: args.description,\n topicId: args.topicId,\n workspaceId: args.workspaceId,\n perspectiveType,\n },\n };\n}\n\nexport function buildDeprecatedBranchMetadata(args: {\n name: string;\n description?: string;\n topicId?: string;\n workspaceId?: string;\n schema?: string | null;\n}): DeprecatedBranchMetadata {\n return {\n deprecated: true,\n deprecationMessage: BRANCH_DEPRECATION_MESSAGE,\n lensSuggestion: migrateBranchToLens(args),\n };\n}\n","import type { McpToolContract } from \"./tool-contracts.types\";\nimport { LENS_PERSPECTIVE_TYPES } from \"./lens-workflow.contract\";\n\nexport const CREATE_EPISTEMIC_NODE: McpToolContract = {\n name: \"create_epistemic_node\",\n description:\n \"Commit a generic epistemic graph node. \" +\n \"Like `git commit` — creates a canonical node in the public spine for topics, beliefs, evidence, questions, answers, sources, and entities.\",\n parameters: {\n globalId: { type: \"string\", description: \"Optional idempotent node global ID\" },\n nodeType: { type: \"string\", description: \"Public epistemic node type\" },\n canonicalText: { type: \"string\", description: \"Canonical node text\" },\n text: { type: \"string\", description: \"Alias for canonicalText\" },\n contentHash: { type: \"string\", description: \"Optional idempotency content hash\" },\n sourceType: { type: \"string\", description: \"Source type for provenance\" },\n topicId: { type: \"string\", description: \"Optional topic scope\" },\n content: { type: \"string\", description: \"Extended content\" },\n title: { type: \"string\", description: \"Display title\" },\n metadata: { type: \"object\", description: \"Optional node metadata\" },\n },\n required: [\"nodeType\"],\n response: {\n description: \"Created node result\",\n fields: {\n nodeId: \"string\",\n nodeGlobalId: \"string\",\n isDuplicate: \"boolean\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"showcase\",\n};\n\nexport const GET_EPISTEMIC_NODE: McpToolContract = {\n name: \"get_epistemic_node\",\n description:\n \"Read one epistemic graph node. \" +\n \"Like `git show` — resolves a canonical spine node by ID or global ID.\",\n parameters: {\n nodeId: { type: \"string\", description: \"Node ID or global ID\" },\n },\n required: [\"nodeId\"],\n response: {\n description: \"The resolved node\",\n fields: { node: \"object\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const LIST_EPISTEMIC_NODES: McpToolContract = {\n name: \"list_epistemic_nodes\",\n description:\n \"List epistemic graph nodes. \" +\n \"Like `git ls-tree` — lists canonical spine nodes by topic, type, status, or search query.\",\n parameters: {\n topicId: { type: \"string\", description: \"Optional topic scope\" },\n nodeType: { type: \"string\", description: \"Optional node type filter\" },\n status: { type: \"string\", description: \"Optional lifecycle status\" },\n searchQuery: { type: \"string\", description: \"Optional text search query\" },\n limit: { type: \"number\", description: \"Maximum nodes to return\" },\n },\n required: [],\n response: {\n description: \"Matching nodes\",\n fields: { nodes: \"array\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const UPDATE_EPISTEMIC_NODE: McpToolContract = {\n name: \"update_epistemic_node\",\n description:\n \"Amend an epistemic graph node. \" +\n \"Like `git commit --amend` — updates mutable node metadata, text, status, or verification fields.\",\n parameters: {\n nodeId: { type: \"string\", description: \"Node ID or global ID\" },\n canonicalText: { type: \"string\", description: \"Updated canonical text\" },\n text: { type: \"string\", description: \"Alias for canonicalText\" },\n contentHash: { type: \"string\", description: \"Updated content hash\" },\n content: { type: \"string\", description: \"Updated content\" },\n title: { type: \"string\", description: \"Updated display title\" },\n metadata: { type: \"object\", description: \"Updated metadata\" },\n confidence: { type: \"number\", description: \"Updated confidence\" },\n verificationStatus: { type: \"string\", description: \"Updated verification status\" },\n status: { type: \"string\", description: \"Updated lifecycle status\" },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Node update result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const ARCHIVE_EPISTEMIC_NODE: McpToolContract = {\n name: \"archive_epistemic_node\",\n description:\n \"Archive an epistemic graph node. \" +\n \"Like `git rm --cached` — removes a node from active traversal without hard-deleting it.\",\n parameters: {\n nodeId: { type: \"string\", description: \"Node ID or global ID\" },\n },\n required: [\"nodeId\"],\n response: {\n description: \"Archive result\",\n fields: { success: \"boolean\", effectiveStatus: \"string\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const VERIFY_EPISTEMIC_NODE: McpToolContract = {\n name: \"verify_epistemic_node\",\n description:\n \"Record verification state on an epistemic graph node. \" +\n \"Like `git tag` — marks the node with a reviewed verification state.\",\n parameters: {\n nodeId: { type: \"string\", description: \"Node ID or global ID\" },\n verificationStatus: { type: \"string\", description: \"Verification status\" },\n confidence: { type: \"number\", description: \"Optional confidence update\" },\n },\n required: [\"nodeId\", \"verificationStatus\"],\n response: {\n description: \"Verification result\",\n fields: { success: \"boolean\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const SUPERSEDE_EPISTEMIC_NODE: McpToolContract = {\n name: \"supersede_epistemic_node\",\n description:\n \"Supersede an epistemic graph node with a new version. \" +\n \"Like `git commit --amend` on an immutable history branch — creates the replacement and marks the old node superseded.\",\n parameters: {\n oldNodeId: { type: \"string\", description: \"Node ID or global ID to supersede\" },\n newGlobalId: { type: \"string\", description: \"Optional replacement global ID\" },\n newCanonicalText: { type: \"string\", description: \"Replacement canonical text\" },\n text: { type: \"string\", description: \"Alias for newCanonicalText\" },\n newContentHash: { type: \"string\", description: \"Optional replacement content hash\" },\n reason: { type: \"string\", description: \"Reason for superseding\" },\n },\n required: [\"oldNodeId\"],\n response: {\n description: \"Supersede result\",\n fields: { oldNodeId: \"string\", newNodeId: \"string\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\nexport const BATCH_CREATE_EPISTEMIC_NODES: McpToolContract = {\n name: \"batch_create_epistemic_nodes\",\n description:\n \"Commit multiple epistemic graph nodes. \" +\n \"Like `git commit` with many staged files — writes a batch of canonical spine nodes.\",\n parameters: {\n nodes: {\n type: \"array\",\n description: \"Nodes to create with nodeType, canonicalText/text, and optional metadata.\",\n },\n },\n required: [\"nodes\"],\n response: {\n description: \"Batch node creation result\",\n fields: { created: \"number\", results: \"array\" },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"graph\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// JUDGMENT TOOLS (Phase 1: new vocabulary, aliased to decision implementation)\n// =============================================================================\n\nexport const RECORD_JUDGMENT: McpToolContract = {\n name: \"record_judgment\",\n description:\n \"Record a judgment — an irreversible commitment based on the current epistemic state. \" +\n \"Like a `git tag` marking a release. \" +\n \"A judgment synthesizes beliefs, evidence, and uncertainties into a determination. \" +\n \"Once issued, a judgment is evaluated against the epistemic state that existed when it was made \" +\n \"(knowledge horizon evaluation, Invariant #10).\",\n parameters: {\n title: { type: \"string\", description: \"Short judgment statement\" },\n rationale: {\n type: \"string\",\n description: \"Full reasoning behind the judgment\",\n },\n topicId: { type: \"string\", description: \"Topic scope\" },\n beliefIds: {\n type: \"array\",\n description: \"Beliefs that warrant this judgment\",\n },\n confidence: {\n type: \"number\",\n description: \"Confidence in the judgment (0-1)\",\n },\n },\n required: [\"title\", \"rationale\"],\n response: {\n description: \"The recorded judgment\",\n fields: {\n judgmentId: \"string\",\n title: \"string\",\n status: \"string — 'issued'\",\n },\n },\n ownerModule: \"decisions\",\n ontologyPrimitive: \"judgment\",\n tier: \"showcase\",\n};\n\n// =============================================================================\n// LENS TOOLS (workspace-scoped operational frames)\n// =============================================================================\n\nexport const CREATE_LENS: McpToolContract = {\n name: \"create_lens\",\n description:\n \"Create a reusable lens that overlays a workspace topic with a specific analytical perspective. \" +\n \"Like `git branch <name>` for operational scaffolding — a lens persists across worktrees and carries prompts, workflows, and task templates. \" +\n \"Multiple topics in the same workspace can reuse the same lens.\",\n parameters: {\n name: {\n type: \"string\",\n description: \"Lens name (e.g., 'market dynamics', 'team quality')\",\n },\n workspaceId: {\n type: \"string\",\n description:\n \"Workspace scope for the lens. Required unless topicId resolves to a workspace-scoped topic.\",\n },\n topicId: {\n type: \"string\",\n description:\n \"Optional originating topic scope. Lenses remain reusable across topics even when this is set.\",\n },\n description: {\n type: \"string\",\n description: \"What this lens is designed to investigate or monitor\",\n },\n perspectiveType: {\n type: \"string\",\n description:\n \"Perspective type for the lens. Validated against schemaEnumConfig category 'lens_perspective_type'.\",\n enum: [...LENS_PERSPECTIVE_TYPES],\n },\n promptTemplates: {\n type: \"array\",\n description: \"Langfuse prompt references used when operating through this lens\",\n },\n workflowTemplates: {\n type: \"array\",\n description: \"Guided workflow templates for lens-driven investigations\",\n },\n taskTemplates: {\n type: \"array\",\n description: \"Default task templates instantiated when the lens is applied\",\n },\n filterCriteria: {\n type: \"object\",\n description: \"Belief/evidence filtering rules applied by the lens\",\n },\n },\n required: [\"name\", \"perspectiveType\"],\n response: {\n description: \"The created lens\",\n fields: {\n lensId: \"string\",\n name: \"string\",\n workspaceId: \"string\",\n status: \"string — 'active'\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"lens\",\n tier: \"showcase\",\n};\n\nexport const LIST_LENSES: McpToolContract = {\n name: \"list_lenses\",\n description:\n \"List reusable lenses for a workspace, optionally scored by whether they are active on a topic. \" +\n \"Like `git branch --list` — shows the available named frames you can activate. \" +\n \"When topicId is provided, the response can indicate which lenses are already applied there.\",\n parameters: {\n workspaceId: {\n type: \"string\",\n description: \"Workspace scope to list lenses from\",\n },\n topicId: {\n type: \"string\",\n description:\n \"Optional topic scope used to derive workspace and annotate applied lenses\",\n },\n status: {\n type: \"string\",\n description: \"Filter by lens lifecycle status\",\n enum: [\"draft\", \"active\", \"archived\"],\n },\n perspectiveType: {\n type: \"string\",\n description: \"Filter by perspective type\",\n enum: [...LENS_PERSPECTIVE_TYPES],\n },\n },\n required: [],\n response: {\n description: \"Available lenses\",\n fields: {\n lenses:\n \"array — each item includes lensId, name, workspaceId, perspectiveType, status, and optional isAppliedToTopic\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"lens\",\n tier: \"workhorse\",\n};\n\nexport const APPLY_LENS_TO_TOPIC: McpToolContract = {\n name: \"apply_lens_to_topic\",\n description:\n \"Apply a lens to a topic so it becomes an active perspective overlay. \" +\n \"Like `git checkout <branch>` for a reusable frame — the topic keeps its knowledge, but the active lens shapes guidance and retrieval. \" +\n \"Multiple active lenses can coexist on the same topic.\",\n parameters: {\n lensId: { type: \"string\", description: \"Lens to activate on the topic\" },\n topicId: { type: \"string\", description: \"Topic that should receive the lens\" },\n },\n required: [\"lensId\", \"topicId\"],\n response: {\n description: \"Lens activation result\",\n fields: {\n bindingId: \"string\",\n lensId: \"string\",\n topicId: \"string\",\n status: \"string — 'active'\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"lens\",\n tier: \"workhorse\",\n};\n\nexport const REMOVE_LENS_FROM_TOPIC: McpToolContract = {\n name: \"remove_lens_from_topic\",\n description:\n \"Remove an active lens overlay from a topic. \" +\n \"Like `git switch` away from a frame — the topic remains, but the lens stops shaping the investigation context. \" +\n \"Historical binding state is preserved for auditability.\",\n parameters: {\n lensId: { type: \"string\", description: \"Lens to remove from the topic\" },\n topicId: { type: \"string\", description: \"Topic that currently has the lens applied\" },\n },\n required: [\"lensId\", \"topicId\"],\n response: {\n description: \"Lens removal result\",\n fields: {\n bindingId: \"string\",\n lensId: \"string\",\n topicId: \"string\",\n status: \"string — 'removed'\",\n },\n },\n ownerModule: \"reasoning-kernel\",\n ontologyPrimitive: \"lens\",\n tier: \"workhorse\",\n};\n\n// =============================================================================\n// PUSH TOOLS (git push)\n// =============================================================================\n"]}
@@ -0,0 +1,16 @@
1
+ import { McpToolContract } from './tool-contracts.types.js';
2
+
3
+ declare const MANAGE_WRITE_POLICY: McpToolContract;
4
+ declare const LIST_ONTOLOGIES: McpToolContract;
5
+ declare const GET_ONTOLOGY: McpToolContract;
6
+ declare const APPLY_ONTOLOGY: McpToolContract;
7
+ declare const MATCH_ENTITY_TYPE: McpToolContract;
8
+ declare const CREATE_ONTOLOGY: McpToolContract;
9
+ declare const UPDATE_ONTOLOGY: McpToolContract;
10
+ declare const ARCHIVE_ONTOLOGY: McpToolContract;
11
+ declare const CREATE_ONTOLOGY_VERSION: McpToolContract;
12
+ declare const PUBLISH_ONTOLOGY_VERSION: McpToolContract;
13
+ declare const DEPRECATE_ONTOLOGY_VERSION: McpToolContract;
14
+ declare const RESOLVE_EFFECTIVE_ONTOLOGY: McpToolContract;
15
+
16
+ export { APPLY_ONTOLOGY, ARCHIVE_ONTOLOGY, CREATE_ONTOLOGY, CREATE_ONTOLOGY_VERSION, DEPRECATE_ONTOLOGY_VERSION, GET_ONTOLOGY, LIST_ONTOLOGIES, MANAGE_WRITE_POLICY, MATCH_ENTITY_TYPE, PUBLISH_ONTOLOGY_VERSION, RESOLVE_EFFECTIVE_ONTOLOGY, UPDATE_ONTOLOGY };