@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,782 @@
1
+ // src/tool-contracts.questions-listing.ts
2
+ var CREATE_QUESTION = {
3
+ name: "create_question",
4
+ description: "Commit an investigation question to the reasoning graph. Like `git issue` \u2014 creates a traceable question that drives research and evidence collection. Questions test beliefs and guide worktree investigation.",
5
+ parameters: {
6
+ text: { type: "string", description: "The question text" },
7
+ topicId: { type: "string", description: "Optional topic scope hint" },
8
+ priority: {
9
+ type: "string",
10
+ description: "Priority: urgent, high, medium, low",
11
+ enum: ["urgent", "high", "medium", "low"]
12
+ },
13
+ linkedBeliefId: {
14
+ type: "string",
15
+ description: "Belief this question tests"
16
+ },
17
+ metadata: {
18
+ type: "object",
19
+ description: "Optional metadata merged into the question record"
20
+ }
21
+ },
22
+ required: ["text"],
23
+ response: {
24
+ description: "The created canonical question record",
25
+ fields: {
26
+ id: "string \u2014 canonical question ID",
27
+ nodeId: "string \u2014 canonical question ID",
28
+ questionId: "string \u2014 canonical question ID",
29
+ text: "string",
30
+ status: "string"
31
+ }
32
+ },
33
+ ownerModule: "graph-primitives",
34
+ ontologyPrimitive: "question",
35
+ tier: "workhorse"
36
+ };
37
+ var GET_QUESTION = {
38
+ name: "get_question",
39
+ description: "Read one question by ID. Like `git show` \u2014 resolves the canonical question payload for a single identifier.",
40
+ parameters: {
41
+ id: { type: "string", description: "Canonical question ID" }
42
+ },
43
+ required: ["id"],
44
+ response: {
45
+ description: "The canonical question record",
46
+ fields: {
47
+ id: "string \u2014 canonical question ID",
48
+ nodeId: "string \u2014 canonical question ID",
49
+ questionId: "string \u2014 canonical question ID",
50
+ text: "string",
51
+ status: "string"
52
+ }
53
+ },
54
+ ownerModule: "graph-primitives",
55
+ ontologyPrimitive: "question",
56
+ tier: "workhorse"
57
+ };
58
+ var REFINE_QUESTION = {
59
+ name: "refine_question",
60
+ description: "Refine a question's framing or scope. Like `git commit --amend` for questions \u2014 updates the question text while preserving its identity and linked evidence.",
61
+ parameters: {
62
+ id: { type: "string", description: "The question to refine" },
63
+ text: { type: "string", description: "Updated question text" },
64
+ rationale: {
65
+ type: "string",
66
+ description: "Why the question is being refined"
67
+ }
68
+ },
69
+ required: ["id", "text"],
70
+ response: {
71
+ description: "The refined question",
72
+ fields: {
73
+ id: "string",
74
+ questionId: "string",
75
+ updatedText: "string",
76
+ previousText: "string"
77
+ }
78
+ },
79
+ ownerModule: "graph-primitives",
80
+ ontologyPrimitive: "question",
81
+ tier: "workhorse"
82
+ };
83
+ var LIST_QUESTIONS = {
84
+ name: "list_questions",
85
+ description: "List questions scoped to a topic or worktree. Like `git issue list` \u2014 returns questions with their status, priority, and linked belief context. Supports filtering by status and priority.",
86
+ parameters: {
87
+ topicId: { type: "string", description: "Topic scope" },
88
+ worktreeId: { type: "string", description: "Filter to worktree scope" },
89
+ status: {
90
+ type: "string",
91
+ description: "Filter by canonical question status",
92
+ enum: ["open", "researching", "answered", "parked", "closed"]
93
+ },
94
+ priority: {
95
+ type: "string",
96
+ description: "Filter by canonical question priority",
97
+ enum: ["urgent", "high", "medium", "low"]
98
+ },
99
+ limit: { type: "number", description: "Max results" },
100
+ cursor: { type: "string", description: "Pagination cursor" }
101
+ },
102
+ required: ["topicId"],
103
+ response: {
104
+ description: "Canonical question page",
105
+ fields: {
106
+ questions: "array \u2014 canonical question records",
107
+ nextCursor: "string | null"
108
+ }
109
+ },
110
+ ownerModule: "graph-primitives",
111
+ ontologyPrimitive: "question",
112
+ tier: "workhorse"
113
+ };
114
+ var ANSWER_QUESTION = {
115
+ name: "answer_question",
116
+ description: "Answer a question with optional evidence links. Like `git commit` on the question thread \u2014 records the answer and closes the loop with a canonical answered state.",
117
+ parameters: {
118
+ id: { type: "string", description: "Canonical question ID" },
119
+ topicId: { type: "string", description: "Topic scope for the answer" },
120
+ text: { type: "string", description: "Answer text" },
121
+ confidence: {
122
+ type: "string",
123
+ description: "Optional answer confidence",
124
+ enum: ["weak", "medium", "strong"]
125
+ },
126
+ evidenceIds: {
127
+ type: "array",
128
+ description: "Optional canonical evidence IDs supporting the answer"
129
+ },
130
+ rationale: { type: "string", description: "Why this answer is credible" }
131
+ },
132
+ required: ["id", "topicId", "text"],
133
+ response: {
134
+ description: "Answer result",
135
+ fields: {
136
+ questionId: "string",
137
+ answerId: "string",
138
+ status: "string \u2014 answered"
139
+ }
140
+ },
141
+ ownerModule: "graph-primitives",
142
+ ontologyPrimitive: "question",
143
+ tier: "workhorse"
144
+ };
145
+ var UPDATE_QUESTION_STATUS = {
146
+ name: "update_question_status",
147
+ description: "Transition a question's status through its lifecycle. Like `git issue update` \u2014 moves a question through the canonical reasoning lifecycle. Status transitions preserve history and keep linked evidence intact.",
148
+ parameters: {
149
+ id: { type: "string", description: "The question to update" },
150
+ status: {
151
+ type: "string",
152
+ description: "New status",
153
+ enum: ["open", "researching", "answered", "parked", "closed"]
154
+ },
155
+ rationale: { type: "string", description: "Why the status is changing" }
156
+ },
157
+ required: ["id", "status"],
158
+ response: {
159
+ description: "Updated question status",
160
+ fields: {
161
+ id: "string",
162
+ questionId: "string",
163
+ previousStatus: "string",
164
+ newStatus: "string"
165
+ }
166
+ },
167
+ ownerModule: "graph-primitives",
168
+ ontologyPrimitive: "question",
169
+ tier: "workhorse"
170
+ };
171
+ var ARCHIVE_QUESTION = {
172
+ name: "archive_question",
173
+ description: "Archive a question no longer relevant to current investigation scope. Like `git issue close` \u2014 removes it from active work while preserving audit history. Archived questions keep their existing links to beliefs and evidence.",
174
+ parameters: {
175
+ questionId: { type: "string", description: "The question to archive" },
176
+ reason: {
177
+ type: "string",
178
+ description: "Why the question is being archived"
179
+ }
180
+ },
181
+ required: ["questionId"],
182
+ response: {
183
+ description: "Archive confirmation",
184
+ fields: {
185
+ questionId: "string",
186
+ status: "string \u2014 'archived'",
187
+ archivedAt: "number"
188
+ }
189
+ },
190
+ ownerModule: "graph-primitives",
191
+ ontologyPrimitive: "question",
192
+ tier: "workhorse"
193
+ };
194
+ var LINK_EVIDENCE_TO_QUESTION = {
195
+ name: "link_evidence_to_question",
196
+ description: "Link evidence to the question it helps answer. Like `git notes add` \u2014 attaches supporting detail to an active question. Question-level links improve answer quality and traceability to beliefs.",
197
+ parameters: {
198
+ evidenceId: { type: "string", description: "The evidence to link" },
199
+ questionId: {
200
+ type: "string",
201
+ description: "The question this evidence addresses"
202
+ },
203
+ relevance: { type: "number", description: "Relevance score in [0,1]" },
204
+ rationale: {
205
+ type: "string",
206
+ description: "How this evidence bears on the question"
207
+ }
208
+ },
209
+ required: ["evidenceId", "questionId"],
210
+ response: {
211
+ description: "The created edge",
212
+ fields: {
213
+ edgeId: "string",
214
+ evidenceId: "string",
215
+ questionId: "string",
216
+ relevance: "number"
217
+ }
218
+ },
219
+ ownerModule: "graph-primitives",
220
+ ontologyPrimitive: "edge",
221
+ tier: "workhorse"
222
+ };
223
+ var CREATE_ANSWER = {
224
+ name: "create_answer",
225
+ description: "Create an answer node responding to a question. Like `git commit` for resolved questions \u2014 creates an immutable answer snapshot at L2. New answers supersede old ones, preserving full version history. Answers link to supporting evidence via based_on edges.",
226
+ parameters: {
227
+ questionNodeId: {
228
+ type: "string",
229
+ description: "The question node ID this answers"
230
+ },
231
+ answerText: {
232
+ type: "string",
233
+ description: "The answer content \u2014 the actual response to the question"
234
+ },
235
+ topicId: {
236
+ type: "string",
237
+ description: "Topic scope (optional if question already has topicId)"
238
+ },
239
+ confidence: {
240
+ type: "string",
241
+ description: "Answer confidence: definitive, strong, moderate, weak, speculative"
242
+ },
243
+ evidenceNodeIds: {
244
+ type: "array",
245
+ description: "Supporting evidence node IDs to link via based_on edges"
246
+ },
247
+ answerSource: {
248
+ type: "string",
249
+ description: "How the answer was produced: human, ai_generated, deep_research, synthesis"
250
+ }
251
+ },
252
+ required: ["questionNodeId", "answerText"],
253
+ response: {
254
+ description: "The created answer node with version metadata",
255
+ fields: {
256
+ nodeId: "string \u2014 unique node identifier",
257
+ globalId: "string \u2014 globally unique ID",
258
+ versionNumber: "number \u2014 version of this answer (auto-incremented)",
259
+ questionNodeId: "string \u2014 the question this answers",
260
+ confidence: "string \u2014 answer confidence level"
261
+ }
262
+ },
263
+ ownerModule: "graph-primitives",
264
+ ontologyPrimitive: "evidence",
265
+ tier: "showcase"
266
+ };
267
+ var GET_ANSWER = {
268
+ name: "get_answer",
269
+ description: "Get the latest answer for a question. Like `git show HEAD` for a question's resolution \u2014 returns the active answer snapshot. Returns null if the question is unanswered.",
270
+ parameters: {
271
+ questionNodeId: {
272
+ type: "string",
273
+ description: "The question node ID to get the answer for"
274
+ }
275
+ },
276
+ required: ["questionNodeId"],
277
+ response: {
278
+ description: "The active answer node or null",
279
+ fields: {
280
+ nodeId: "string | null",
281
+ globalId: "string | null",
282
+ answerText: "string | null",
283
+ versionNumber: "number",
284
+ isLatest: "boolean",
285
+ evidenceCount: "number",
286
+ confidence: "string"
287
+ }
288
+ },
289
+ ownerModule: "graph-primitives",
290
+ ontologyPrimitive: "evidence",
291
+ tier: "workhorse"
292
+ };
293
+ var GET_HIGH_PRIORITY_QUESTIONS = {
294
+ name: "get_high_priority_questions",
295
+ description: "Rank open questions by urgency and expected decision impact. Like `git issue list --sort=priority` \u2014 brings the highest-leverage open questions to the top. Ranking accounts for linked belief criticality and evidence gaps.",
296
+ parameters: {
297
+ topicId: { type: "string", description: "Topic scope" },
298
+ limit: { type: "number", description: "Maximum results (default: 20)" },
299
+ includeAnswered: {
300
+ type: "boolean",
301
+ description: "Include answered questions (default: false)"
302
+ }
303
+ },
304
+ required: ["topicId"],
305
+ response: {
306
+ description: "Priority-ranked questions",
307
+ fields: {
308
+ questions: "array \u2014 { questionId, text, priority, urgencyScore, linkedBeliefCount, evidenceGapCount }"
309
+ }
310
+ },
311
+ ownerModule: "graph-search",
312
+ ontologyPrimitive: "question",
313
+ tier: "workhorse"
314
+ };
315
+ var FIND_MISSING_QUESTIONS = {
316
+ name: "find_missing_questions",
317
+ description: "Identify beliefs missing testing questions. Like `git diff --check` \u2014 surfaces reasoning coverage gaps before merge. Returns candidate beliefs that need explicit question coverage.",
318
+ parameters: {
319
+ topicId: { type: "string", description: "Topic scope" },
320
+ minConfidence: {
321
+ type: "number",
322
+ description: "Only check beliefs above this confidence (default: 0)"
323
+ }
324
+ },
325
+ required: ["topicId"],
326
+ response: {
327
+ description: "Beliefs missing testing questions",
328
+ fields: {
329
+ gaps: "array \u2014 { beliefId, canonicalText, confidence, suggestedQuestions }",
330
+ totalGaps: "number"
331
+ }
332
+ },
333
+ ownerModule: "graph-search",
334
+ ontologyPrimitive: "question",
335
+ tier: "workhorse"
336
+ };
337
+ var LIST_BELIEFS = {
338
+ name: "list_beliefs",
339
+ description: "List beliefs scoped to a topic or worktree. Like `git log --oneline` \u2014 returns beliefs with their confidence, status, and scoring state. Supports filtering by status and confidence threshold.",
340
+ parameters: {
341
+ topicId: { type: "string", description: "Topic scope" },
342
+ worktreeId: { type: "string", description: "Filter to worktree scope" },
343
+ status: {
344
+ type: "string",
345
+ description: "Filter: unscored, scored, archived",
346
+ enum: ["unscored", "scored", "archived"]
347
+ },
348
+ minConfidence: {
349
+ type: "number",
350
+ description: "Minimum confidence threshold"
351
+ },
352
+ limit: {
353
+ type: "number",
354
+ description: "Maximum results"
355
+ }
356
+ },
357
+ required: ["topicId"],
358
+ response: {
359
+ description: "Canonical belief page",
360
+ fields: {
361
+ beliefs: "array \u2014 canonical belief records",
362
+ nextCursor: "string | null"
363
+ }
364
+ },
365
+ ownerModule: "graph-primitives",
366
+ ontologyPrimitive: "belief",
367
+ tier: "workhorse"
368
+ };
369
+ var LIST_WORKTREES = {
370
+ name: "list_worktrees",
371
+ description: "List all worktrees for a topic. Like `git worktree list` \u2014 shows active and completed investigation branches with lifecycle phase, pipeline campaign/lane, status, and belief counts.",
372
+ parameters: {
373
+ topicId: { type: "string", description: "Topic scope" },
374
+ status: {
375
+ type: "string",
376
+ description: "Filter: active, merged, abandoned",
377
+ enum: ["active", "merged", "abandoned"]
378
+ },
379
+ groupBy: {
380
+ type: "string",
381
+ description: "Optional grouping mode for the response.",
382
+ enum: ["campaign", "lane", "flat"]
383
+ },
384
+ lane: {
385
+ type: "string",
386
+ description: "Filter by GitButler-aligned lane name."
387
+ },
388
+ campaign: {
389
+ type: "number",
390
+ description: "Filter by top-level pipeline campaign number."
391
+ },
392
+ limit: {
393
+ type: "number",
394
+ description: "Maximum results to return."
395
+ }
396
+ },
397
+ required: ["topicId"],
398
+ response: {
399
+ description: "Worktrees with lifecycle phase, campaign, lane, status, belief count, and creation time",
400
+ fields: {
401
+ worktrees: "array \u2014 { worktreeId, title, phase, campaign, lane, laneOrderInCampaign, orderInLane, status, beliefCount, createdAt }"
402
+ }
403
+ },
404
+ ownerModule: "workflow-engine",
405
+ ontologyPrimitive: "worktree",
406
+ tier: "workhorse"
407
+ };
408
+ var LIST_ALL_WORKTREES = {
409
+ name: "list_all_worktrees",
410
+ description: "List ALL worktrees across ALL topics in one query. No topic scope required. Like `git worktree list --all` \u2014 returns the complete pipeline inventory with campaign, lane, lane order, dependencies, and status. Supports filtering by status, lane, and campaign. This is the PM's primary pipeline query \u2014 one call, full picture.",
411
+ parameters: {
412
+ status: {
413
+ type: "string",
414
+ description: "Filter by status: planning, active, completed, abandoned, superseded, long_term, idea, paused, suggested, dismissed",
415
+ enum: [
416
+ "planning",
417
+ "active",
418
+ "completed",
419
+ "abandoned",
420
+ "superseded",
421
+ "long_term",
422
+ "idea",
423
+ "paused",
424
+ "suggested",
425
+ "dismissed"
426
+ ]
427
+ },
428
+ lane: {
429
+ type: "string",
430
+ description: "Filter by lane name (e.g., 'ontology', 'tc-scope', 'control-plane', 'dev-portal', 'mcp-sdk-parity')"
431
+ },
432
+ campaign: {
433
+ type: "number",
434
+ description: "Filter by campaign number (e.g., 1, 2, 3). Returns only worktrees in that campaign."
435
+ },
436
+ groupBy: {
437
+ type: "string",
438
+ description: "Optional grouping mode for the response.",
439
+ enum: ["campaign", "lane", "flat"]
440
+ },
441
+ limit: {
442
+ type: "number",
443
+ description: "Maximum results to return (default: 500, max: 1000)"
444
+ }
445
+ },
446
+ required: [],
447
+ response: {
448
+ description: "All worktrees across all topics with full pipeline metadata",
449
+ fields: {
450
+ worktrees: "array \u2014 { worktreeId, title, topicId, topicName, phase, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate, createdAt }",
451
+ total: "number \u2014 total count after filtering",
452
+ lanes: "object \u2014 { laneName: count } summary of worktrees per lane",
453
+ campaigns: "object \u2014 { campaignNumber: count } summary of worktrees per campaign"
454
+ }
455
+ },
456
+ ownerModule: "workflow-engine",
457
+ ontologyPrimitive: "worktree",
458
+ tier: "showcase"
459
+ };
460
+ var GET_WORKTREE = {
461
+ name: "get_worktree",
462
+ description: "Get one worktree by ID. Like `git worktree list --porcelain <worktree>` \u2014 inspects one investigation branch without scanning the full pipeline inventory.",
463
+ parameters: {
464
+ worktreeId: { type: "string", description: "Canonical worktree ID to retrieve" },
465
+ id: { type: "string", description: "Legacy alias for worktreeId" }
466
+ },
467
+ required: ["worktreeId"],
468
+ response: {
469
+ description: "Single worktree record with pipeline metadata",
470
+ fields: {
471
+ worktree: "object \u2014 { worktreeId, title, topicId, status, hypothesis, campaign, lane, laneOrderInCampaign, orderInLane, dependsOn, blocks, gate }"
472
+ }
473
+ },
474
+ ownerModule: "workflow-engine",
475
+ ontologyPrimitive: "worktree",
476
+ tier: "workhorse"
477
+ };
478
+ var LIST_CAMPAIGNS = {
479
+ name: "list_campaigns",
480
+ description: "List compact pipeline campaigns with their nested lanes. Use this to see the top-level campaign > lane > worktree shape without pulling the full worktree inventory.",
481
+ parameters: {
482
+ topicId: {
483
+ type: "string",
484
+ description: "Optional topic scope."
485
+ },
486
+ status: {
487
+ type: "string",
488
+ description: "Optional worktree status filter before grouping campaigns and lanes."
489
+ },
490
+ limit: {
491
+ type: "number",
492
+ description: "Maximum worktrees to scan before grouping."
493
+ }
494
+ },
495
+ required: [],
496
+ response: {
497
+ description: "Pipeline campaigns with nested lane summaries.",
498
+ fields: {
499
+ campaigns: "array \u2014 { campaign, lanes: [{ lane, laneOrderInCampaign, worktreeCount, activeCount, readyCount, blockedCount, completedCount, nextWorktree }] }",
500
+ totalWorktrees: "number \u2014 total worktrees scanned after filtering"
501
+ }
502
+ },
503
+ ownerModule: "workflow-engine",
504
+ ontologyPrimitive: "worktree",
505
+ tier: "showcase"
506
+ };
507
+ var ACTIVATE_WORKTREE = {
508
+ name: "activate_worktree",
509
+ description: "Activate a worktree to begin investigation. Like `git checkout <branch>` \u2014 transitions a worktree from planning to active status. Sets the initial phase and enables belief/question editing within the worktree scope.",
510
+ parameters: {
511
+ worktreeId: { type: "string", description: "The worktree to activate" }
512
+ },
513
+ required: ["worktreeId"],
514
+ response: {
515
+ description: "Activation result with initial phase",
516
+ fields: {
517
+ worktreeId: "string",
518
+ status: "string \u2014 'active'",
519
+ phase: "string"
520
+ }
521
+ },
522
+ ownerModule: "workflow-engine",
523
+ ontologyPrimitive: "worktree",
524
+ tier: "workhorse"
525
+ };
526
+ var UPDATE_WORKTREE_TARGETS = {
527
+ name: "update_worktree_targets",
528
+ description: "Update the target beliefs and questions tracked by a worktree. Like `git add/rm <files>` \u2014 stages or unstages beliefs/questions for investigation within the worktree scope. Supports adding and removing targets atomically.",
529
+ parameters: {
530
+ worktreeId: { type: "string", description: "The worktree to update" },
531
+ addBeliefIds: {
532
+ type: "array",
533
+ description: "Belief node IDs to add to the worktree"
534
+ },
535
+ addQuestionIds: {
536
+ type: "array",
537
+ description: "Question node IDs to add to the worktree"
538
+ },
539
+ removeBeliefIds: {
540
+ type: "array",
541
+ description: "Belief node IDs to remove from the worktree"
542
+ },
543
+ removeQuestionIds: {
544
+ type: "array",
545
+ description: "Question node IDs to remove from the worktree"
546
+ }
547
+ },
548
+ required: ["worktreeId"],
549
+ response: {
550
+ description: "Updated target counts",
551
+ fields: {
552
+ worktreeId: "string",
553
+ beliefCount: "number",
554
+ questionCount: "number"
555
+ }
556
+ },
557
+ ownerModule: "workflow-engine",
558
+ ontologyPrimitive: "worktree",
559
+ tier: "workhorse"
560
+ };
561
+ var UPDATE_WORKTREE_METADATA = {
562
+ name: "update_worktree_metadata",
563
+ description: "Update worktree sequencing metadata \u2014 campaign, lane, dependencies, blocking relations, and gates. Like `git config` for a worktree \u2014 sets the scheduling and dependency metadata that determines when this worktree can activate relative to others. Use to backfill or correct sequencing data.",
564
+ parameters: {
565
+ worktreeId: { type: "string", description: "The worktree to update" },
566
+ hypothesis: {
567
+ type: "string",
568
+ description: "Testable claim this worktree investigates"
569
+ },
570
+ campaign: {
571
+ type: "number",
572
+ description: "Top-level pipeline campaign number."
573
+ },
574
+ lane: {
575
+ type: "string",
576
+ description: "GitButler-aligned workstream lane name inside the campaign."
577
+ },
578
+ laneOrderInCampaign: {
579
+ type: "number",
580
+ description: "Ordering for this lane within the campaign."
581
+ },
582
+ orderInLane: {
583
+ type: "number",
584
+ description: "Position of this worktree inside its lane."
585
+ },
586
+ dependsOn: {
587
+ type: "array",
588
+ description: "Worktree IDs that must complete before this one can activate"
589
+ },
590
+ blocks: {
591
+ type: "array",
592
+ description: "Worktree IDs that are blocked until this one completes"
593
+ },
594
+ gate: {
595
+ type: "string",
596
+ description: "Exit gate name (e.g., 'gate:ontology-schema-hardened')"
597
+ },
598
+ rationale: {
599
+ type: "string",
600
+ description: "Why this worktree is sequenced here"
601
+ },
602
+ objective: {
603
+ type: "string",
604
+ description: "What we're trying to learn/prove"
605
+ },
606
+ proofArtifacts: {
607
+ type: "array",
608
+ description: "Typed proof artifacts that define what evidence or deliverables this worktree must emit before it can claim success."
609
+ },
610
+ staffingHint: {
611
+ type: "string",
612
+ description: "Advisory staffing shape for the worktree (for example `backend+tests` or `fullstack`)."
613
+ },
614
+ lastReconciledAt: {
615
+ type: "number",
616
+ description: "Timestamp of the last deterministic workflow reconciliation pass against this worktree."
617
+ },
618
+ autoFixPolicy: {
619
+ type: "object",
620
+ description: "Calibrated auto-fix policy controlling dry-run vs safe execution, per-run action caps, and permitted mutation tiers."
621
+ },
622
+ status: {
623
+ type: "string",
624
+ description: "Override the worktree status. Use for lifecycle transitions like marking a worktree superseded, long-term, or as a raw idea.",
625
+ enum: [
626
+ "suggested",
627
+ "planning",
628
+ "active",
629
+ "paused",
630
+ "completed",
631
+ "dismissed",
632
+ "abandoned",
633
+ "superseded",
634
+ "long_term",
635
+ "idea"
636
+ ]
637
+ },
638
+ topicId: {
639
+ type: "string",
640
+ description: "Reassign this worktree's primary topic. Validates the target topic exists before updating."
641
+ },
642
+ additionalTopicIds: {
643
+ type: "array",
644
+ description: "Set additional topic associations for cross-topic worktrees. Each topic ID is validated before updating. Use when a worktree spans multiple knowledge domains."
645
+ }
646
+ },
647
+ required: ["worktreeId"],
648
+ response: {
649
+ description: "Update confirmation",
650
+ fields: { worktreeId: "string", success: "boolean" }
651
+ },
652
+ ownerModule: "workflow-engine",
653
+ ontologyPrimitive: "worktree",
654
+ tier: "workhorse"
655
+ };
656
+ var IDENTITY_WHOAMI = {
657
+ name: "identity_whoami",
658
+ description: "Read the authenticated identity summary for the current session. Like `git config --get user.name` \u2014 shows who the current MCP session is acting as.",
659
+ parameters: {},
660
+ required: [],
661
+ response: {
662
+ description: "Canonical identity summary for the current session",
663
+ fields: {
664
+ principalId: "string \u2014 canonical principal identifier; for humans this is the Clerk user_... ID",
665
+ principalType: "string \u2014 human, service, agent, group, or external_viewer",
666
+ tenantId: "string | undefined \u2014 resolved tenant scope",
667
+ workspaceId: "string | undefined \u2014 resolved workspace scope",
668
+ scopes: "string[] | undefined \u2014 granted scopes for this session",
669
+ roles: "string[] | undefined \u2014 canonical roles for this session"
670
+ }
671
+ },
672
+ ownerModule: "identity-core",
673
+ ontologyPrimitive: "identity",
674
+ tier: "workhorse"
675
+ };
676
+ var RESOLVE_INTERACTIVE_PRINCIPAL = {
677
+ name: "resolve_interactive_principal",
678
+ description: "Read the Permit-backed Lucern principal context for an authenticated Clerk user. Like `git config --get user.email` plus the repository ACL \u2014 resolves the Clerk subject into tenant/workspace authorization context.",
679
+ parameters: {
680
+ clerkId: {
681
+ type: "string",
682
+ description: "Authenticated Clerk subject (`sub`). Clerk proves identity only; it is not the authorization record."
683
+ },
684
+ tenantId: {
685
+ type: "string",
686
+ description: "Optional tenant scope. Omit only when the Clerk alias is globally unambiguous."
687
+ },
688
+ workspaceId: {
689
+ type: "string",
690
+ description: "Optional workspace scope. Required when the principal has access to multiple workspaces and no default can be inferred."
691
+ },
692
+ providerProjectId: {
693
+ type: "string",
694
+ description: "Optional Clerk project or provider instance id for tenants with multiple identity providers."
695
+ }
696
+ },
697
+ required: ["clerkId"],
698
+ response: {
699
+ description: "Permit-backed Lucern principal context for tenant SDK bootstrap",
700
+ fields: {
701
+ principalId: "string \u2014 canonical Clerk user_... ID for human sessions",
702
+ principalType: "string \u2014 human, service, agent, group, or external_viewer",
703
+ clerkId: "string \u2014 authenticated Clerk subject alias",
704
+ tenantId: "string \u2014 resolved tenant scope",
705
+ workspaceId: "string | null \u2014 resolved workspace scope",
706
+ roles: "string[] \u2014 effective Permit roles",
707
+ scopes: "string[] \u2014 effective scopes derived from Permit/control-plane projection",
708
+ groupIds: "string[] \u2014 active Permit group memberships",
709
+ principalStatus: "string \u2014 active, invited, suspended, disabled, revoked, or missing",
710
+ tenantStatus: "string \u2014 projected tenant resource status",
711
+ workspaceStatus: "string \u2014 projected workspace resource status",
712
+ permit: "object \u2014 Permit subject, tenant, and optional workspace tuple"
713
+ }
714
+ },
715
+ ownerModule: "control-plane",
716
+ ontologyPrimitive: "identity",
717
+ tier: "workhorse"
718
+ };
719
+ var COMPILE_CONTEXT = {
720
+ name: "compile_context",
721
+ description: "Compile a focused reasoning context. If topicId is omitted, Lucern resolves the best topic from the query. Like `git log --graph --decorate` for the reasoning substrate \u2014 returns the canonical Pillar 3 context pack through the public API shape.",
722
+ parameters: {
723
+ topicId: {
724
+ type: "string",
725
+ description: "Optional topic scope ID. Omit to resolve the topic from query."
726
+ },
727
+ query: {
728
+ type: "string",
729
+ description: "Focus query used to resolve the topic and rank context items. Required when topicId is omitted."
730
+ },
731
+ budget: {
732
+ type: "number",
733
+ description: "Token budget for prompt injection planning"
734
+ },
735
+ ranking: {
736
+ type: "string",
737
+ description: "Ranking profile for context ordering",
738
+ enum: ["baseline_v1", "weighted_v1"]
739
+ },
740
+ limit: {
741
+ type: "number",
742
+ description: "Optional per-section item limit"
743
+ },
744
+ maxDepth: {
745
+ type: "number",
746
+ description: "Optional descendant topic depth for neighborhood expansion"
747
+ },
748
+ includeEntities: {
749
+ type: "boolean",
750
+ description: "Include related ontological entities in the compiled result"
751
+ }
752
+ },
753
+ required: [],
754
+ response: {
755
+ description: "Compiled context pack for the requested topic",
756
+ fields: {
757
+ schemaVersion: "string",
758
+ topicId: "string",
759
+ topicName: "string",
760
+ scopedTopicIds: "array \u2014 topic IDs included in the compilation neighborhood",
761
+ generatedAt: "number \u2014 deterministic graph-backed reference timestamp for this compilation",
762
+ ranking: "string \u2014 baseline_v1 | weighted_v1",
763
+ summary: "object \u2014 counts and scoped health signals",
764
+ invariants: "array \u2014 high-confidence invariant beliefs",
765
+ activeBeliefs: "array \u2014 current high-signal beliefs",
766
+ openQuestions: "array \u2014 unresolved questions ranked for this query",
767
+ recentEvidence: "array \u2014 recent evidence ranked for this query",
768
+ contradictions: "array \u2014 unresolved contradiction records",
769
+ relatedEntities: "array | undefined \u2014 ranked ontological entities in scope",
770
+ contextNarrative: "array \u2014 guidance for prompt assembly",
771
+ injectionPolicy: "object \u2014 token-budgeted section selections",
772
+ diagnostics: "object \u2014 scoring and utilization telemetry"
773
+ }
774
+ },
775
+ ownerModule: "reasoning-kernel",
776
+ ontologyPrimitive: "graph",
777
+ tier: "showcase"
778
+ };
779
+
780
+ export { ACTIVATE_WORKTREE, ANSWER_QUESTION, ARCHIVE_QUESTION, COMPILE_CONTEXT, CREATE_ANSWER, CREATE_QUESTION, FIND_MISSING_QUESTIONS, GET_ANSWER, GET_HIGH_PRIORITY_QUESTIONS, GET_QUESTION, GET_WORKTREE, IDENTITY_WHOAMI, LINK_EVIDENCE_TO_QUESTION, LIST_ALL_WORKTREES, LIST_BELIEFS, LIST_CAMPAIGNS, LIST_QUESTIONS, LIST_WORKTREES, REFINE_QUESTION, RESOLVE_INTERACTIVE_PRINCIPAL, UPDATE_QUESTION_STATUS, UPDATE_WORKTREE_METADATA, UPDATE_WORKTREE_TARGETS };
781
+ //# sourceMappingURL=tool-contracts.questions-listing.js.map
782
+ //# sourceMappingURL=tool-contracts.questions-listing.js.map