@lucern/sdk 0.2.0-alpha.6 → 0.2.0-alpha.7

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 (206) hide show
  1. package/.turbo/turbo-build.log +7 -0
  2. package/.turbo/turbo-typecheck.log +4 -0
  3. package/CHANGELOG.md +13 -0
  4. package/examples/README.md +69 -0
  5. package/examples/contradiction.ts +94 -0
  6. package/examples/investigation-context.ts +118 -0
  7. package/examples/questions-and-tasks.ts +55 -0
  8. package/examples/quickstart.ts +97 -0
  9. package/examples/shared.ts +318 -0
  10. package/examples/strict-public-types.ts +143 -0
  11. package/examples/worktree-lifecycle.ts +79 -0
  12. package/package.json +16 -58
  13. package/src/README.md +6 -0
  14. package/src/adminClient.ts +789 -0
  15. package/{dist/lib/platform/sdk/answersClient.d.ts → src/answersClient.ts} +17 -4
  16. package/src/audiencesClient.ts +209 -0
  17. package/src/auditClient.ts +50 -0
  18. package/src/beliefsClient.ts +319 -0
  19. package/src/client.ts +2647 -0
  20. package/src/contextClient.ts +130 -0
  21. package/{dist/lib/platform/sdk/contextFacade.d.ts → src/contextFacade.ts} +6 -1
  22. package/src/contextPackCompiler.ts +828 -0
  23. package/src/contextPackSchema.ts +251 -0
  24. package/src/contextTypes.ts +153 -0
  25. package/src/contracts/api-enums.contract.ts +202 -0
  26. package/src/contracts/auth-session.contract.ts +109 -0
  27. package/src/contracts/context-pack.contract.ts +700 -0
  28. package/src/contracts/contextPack.ts +1 -0
  29. package/src/contracts/index.ts +10 -0
  30. package/src/contracts/lens-filter.contract.ts +183 -0
  31. package/src/contracts/lens-workflow.contract.ts +162 -0
  32. package/src/contracts/lensFilter.ts +1 -0
  33. package/src/contracts/lensWorkflow.ts +1 -0
  34. package/src/contracts/mcp-tools.contract.ts +3636 -0
  35. package/src/contracts/mcpTools.ts +1 -0
  36. package/src/contracts/prompt.contract.ts +50 -0
  37. package/src/contracts/prompt.ts +1 -0
  38. package/src/contracts/sdk-tools.contract.ts +1457 -0
  39. package/src/contracts/sdkTools.ts +1 -0
  40. package/src/contracts/workflow-runtime.contract.ts +440 -0
  41. package/src/contracts/workflowRuntime.ts +1 -0
  42. package/src/controlObjectOwnership.ts +286 -0
  43. package/src/coreClient.ts +570 -0
  44. package/src/customTools.ts +398 -0
  45. package/src/decisionsClient.ts +286 -0
  46. package/src/domainContext.ts +15 -0
  47. package/src/events.ts +531 -0
  48. package/src/eventsCore.ts +168 -0
  49. package/src/facade/beliefs.ts +83 -0
  50. package/src/facade/context.ts +110 -0
  51. package/src/facade/contradictions.ts +29 -0
  52. package/src/facade/edges.ts +30 -0
  53. package/src/facade/events.ts +23 -0
  54. package/src/facade/evidence.ts +41 -0
  55. package/src/facade/graph.ts +38 -0
  56. package/src/facade/identity.ts +16 -0
  57. package/src/facade/ontologies.ts +34 -0
  58. package/src/facade/questions.ts +59 -0
  59. package/src/facade/search.ts +16 -0
  60. package/src/facade/tasks.ts +37 -0
  61. package/src/facade/topics.ts +42 -0
  62. package/src/facade/webhooks.ts +58 -0
  63. package/src/facade/worktrees.ts +51 -0
  64. package/src/gatewayFacades.ts +1666 -0
  65. package/src/graphClient.ts +529 -0
  66. package/src/harnessClient.ts +585 -0
  67. package/src/identityClient.ts +278 -0
  68. package/src/learningClient.ts +95 -0
  69. package/src/mcpParityClient.ts +240 -0
  70. package/src/mcpParitySurface.ts +70 -0
  71. package/src/ontologyClient.ts +275 -0
  72. package/src/packRuntime.ts +3 -0
  73. package/src/packsClient.ts +260 -0
  74. package/src/policyClient.ts +572 -0
  75. package/src/realtime/index.ts +51 -0
  76. package/src/realtime/refs.ts +17 -0
  77. package/src/reportsClient.ts +99 -0
  78. package/src/schemaClient.ts +129 -0
  79. package/src/sdkSurface.ts +190 -0
  80. package/src/topicsClient.ts +243 -0
  81. package/src/types.ts +807 -0
  82. package/src/workflowClient.ts +826 -0
  83. package/tsconfig.json +9 -0
  84. package/dist/.generated +0 -2
  85. package/dist/index.d.ts +0 -3
  86. package/dist/index.js +0 -3
  87. package/dist/lib/platform/auth/credentials.d.ts +0 -5
  88. package/dist/lib/platform/auth/credentials.js +0 -40
  89. package/dist/lib/platform/sdk/adminClient.d.ts +0 -404
  90. package/dist/lib/platform/sdk/adminClient.js +0 -384
  91. package/dist/lib/platform/sdk/answersClient.js +0 -21
  92. package/dist/lib/platform/sdk/audiencesClient.d.ts +0 -93
  93. package/dist/lib/platform/sdk/audiencesClient.js +0 -111
  94. package/dist/lib/platform/sdk/auditClient.d.ts +0 -24
  95. package/dist/lib/platform/sdk/auditClient.js +0 -21
  96. package/dist/lib/platform/sdk/beliefsClient.d.ts +0 -157
  97. package/dist/lib/platform/sdk/beliefsClient.js +0 -124
  98. package/dist/lib/platform/sdk/client.d.ts +0 -2369
  99. package/dist/lib/platform/sdk/client.js +0 -1831
  100. package/dist/lib/platform/sdk/contextClient.d.ts +0 -21
  101. package/dist/lib/platform/sdk/contextClient.js +0 -86
  102. package/dist/lib/platform/sdk/contextFacade.js +0 -10
  103. package/dist/lib/platform/sdk/contextPackCompiler.d.ts +0 -100
  104. package/dist/lib/platform/sdk/contextPackCompiler.js +0 -534
  105. package/dist/lib/platform/sdk/contextTypes.d.ts +0 -133
  106. package/dist/lib/platform/sdk/contextTypes.js +0 -1
  107. package/dist/lib/platform/sdk/controlObjectOwnership.d.ts +0 -308
  108. package/dist/lib/platform/sdk/controlObjectOwnership.js +0 -220
  109. package/dist/lib/platform/sdk/coreClient.d.ts +0 -139
  110. package/dist/lib/platform/sdk/coreClient.js +0 -366
  111. package/dist/lib/platform/sdk/customTools.d.ts +0 -83
  112. package/dist/lib/platform/sdk/customTools.js +0 -247
  113. package/dist/lib/platform/sdk/decisionsClient.d.ts +0 -106
  114. package/dist/lib/platform/sdk/decisionsClient.js +0 -129
  115. package/dist/lib/platform/sdk/domainContext.d.ts +0 -1
  116. package/dist/lib/platform/sdk/domainContext.js +0 -1
  117. package/dist/lib/platform/sdk/events.d.ts +0 -176
  118. package/dist/lib/platform/sdk/events.js +0 -261
  119. package/dist/lib/platform/sdk/eventsCore.d.ts +0 -13
  120. package/dist/lib/platform/sdk/eventsCore.js +0 -13
  121. package/dist/lib/platform/sdk/gatewayFacades.d.ts +0 -586
  122. package/dist/lib/platform/sdk/gatewayFacades.js +0 -845
  123. package/dist/lib/platform/sdk/graphClient.d.ts +0 -266
  124. package/dist/lib/platform/sdk/graphClient.js +0 -235
  125. package/dist/lib/platform/sdk/harnessClient.d.ts +0 -309
  126. package/dist/lib/platform/sdk/harnessClient.js +0 -219
  127. package/dist/lib/platform/sdk/identityClient.d.ts +0 -134
  128. package/dist/lib/platform/sdk/identityClient.js +0 -131
  129. package/dist/lib/platform/sdk/index.js +0 -49
  130. package/dist/lib/platform/sdk/learningClient.d.ts +0 -40
  131. package/dist/lib/platform/sdk/learningClient.js +0 -53
  132. package/dist/lib/platform/sdk/mcpParityClient.d.ts +0 -69
  133. package/dist/lib/platform/sdk/mcpParityClient.js +0 -196
  134. package/dist/lib/platform/sdk/mcpParitySurface.d.ts +0 -10
  135. package/dist/lib/platform/sdk/mcpParitySurface.js +0 -57
  136. package/dist/lib/platform/sdk/ontologyClient.d.ts +0 -131
  137. package/dist/lib/platform/sdk/ontologyClient.js +0 -161
  138. package/dist/lib/platform/sdk/packRuntime.d.ts +0 -1
  139. package/dist/lib/platform/sdk/packRuntime.js +0 -1
  140. package/dist/lib/platform/sdk/packsClient.d.ts +0 -126
  141. package/dist/lib/platform/sdk/packsClient.js +0 -157
  142. package/dist/lib/platform/sdk/policyClient.d.ts +0 -293
  143. package/dist/lib/platform/sdk/policyClient.js +0 -277
  144. package/dist/lib/platform/sdk/promptCatalog.js +0 -1
  145. package/dist/lib/platform/sdk/reportsClient.d.ts +0 -34
  146. package/dist/lib/platform/sdk/reportsClient.js +0 -64
  147. package/dist/lib/platform/sdk/schemaClient.d.ts +0 -59
  148. package/dist/lib/platform/sdk/schemaClient.js +0 -71
  149. package/dist/lib/platform/sdk/sdkSurface.d.ts +0 -56
  150. package/dist/lib/platform/sdk/sdkSurface.js +0 -140
  151. package/dist/lib/platform/sdk/topicsClient.d.ts +0 -78
  152. package/dist/lib/platform/sdk/topicsClient.js +0 -118
  153. package/dist/lib/platform/sdk/types.d.ts +0 -692
  154. package/dist/lib/platform/sdk/types.js +0 -1
  155. package/dist/lib/platform/sdk/version.d.ts +0 -2
  156. package/dist/lib/platform/sdk/workflowClient.d.ts +0 -313
  157. package/dist/lib/platform/sdk/workflowClient.js +0 -366
  158. package/dist/lucern/contracts/src/api-enums.contract.d.ts +0 -58
  159. package/dist/lucern/contracts/src/api-enums.contract.js +0 -147
  160. package/dist/lucern/contracts/src/auth-context.contract.d.ts +0 -8
  161. package/dist/lucern/contracts/src/auth-context.contract.js +0 -8
  162. package/dist/lucern/contracts/src/auth-session.contract.d.ts +0 -8
  163. package/dist/lucern/contracts/src/auth-session.contract.js +0 -8
  164. package/dist/lucern/contracts/src/auth.contract.d.ts +0 -88
  165. package/dist/lucern/contracts/src/auth.contract.js +0 -57
  166. package/dist/lucern/contracts/src/context-pack.contract.d.ts +0 -494
  167. package/dist/lucern/contracts/src/context-pack.contract.js +0 -169
  168. package/dist/lucern/contracts/src/convex-admin.contract.d.ts +0 -5
  169. package/dist/lucern/contracts/src/convex-admin.contract.js +0 -1
  170. package/dist/lucern/contracts/src/events-types.contract.d.ts +0 -8
  171. package/dist/lucern/contracts/src/events-types.contract.js +0 -8
  172. package/dist/lucern/contracts/src/events.contract.d.ts +0 -176
  173. package/dist/lucern/contracts/src/events.contract.js +0 -159
  174. package/dist/lucern/contracts/src/gateway.contract.d.ts +0 -74
  175. package/dist/lucern/contracts/src/gateway.contract.js +0 -19
  176. package/dist/lucern/contracts/src/ids.contract.d.ts +0 -7
  177. package/dist/lucern/contracts/src/ids.contract.js +0 -24
  178. package/dist/lucern/contracts/src/index.d.ts +0 -29
  179. package/dist/lucern/contracts/src/index.js +0 -29
  180. package/dist/lucern/contracts/src/lens-filter.contract.d.ts +0 -70
  181. package/dist/lucern/contracts/src/lens-filter.contract.js +0 -95
  182. package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
  183. package/dist/lucern/contracts/src/lens-workflow.contract.js +0 -54
  184. package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
  185. package/dist/lucern/contracts/src/mcp-tools.contract.js +0 -3281
  186. package/dist/lucern/contracts/src/ontology-matching.contract.d.ts +0 -8
  187. package/dist/lucern/contracts/src/ontology-matching.contract.js +0 -8
  188. package/dist/lucern/contracts/src/prompt.contract.d.ts +0 -24
  189. package/dist/lucern/contracts/src/prompt.contract.js +0 -24
  190. package/dist/lucern/contracts/src/sdk-methods.contract.d.ts +0 -358
  191. package/dist/lucern/contracts/src/sdk-methods.contract.js +0 -19
  192. package/dist/lucern/contracts/src/sdk-tools.contract.d.ts +0 -92
  193. package/dist/lucern/contracts/src/sdk-tools.contract.js +0 -1398
  194. package/dist/lucern/contracts/src/text-matching.contract.d.ts +0 -53
  195. package/dist/lucern/contracts/src/text-matching.contract.js +0 -277
  196. package/dist/lucern/contracts/src/topic-scope.contract.d.ts +0 -8
  197. package/dist/lucern/contracts/src/topic-scope.contract.js +0 -8
  198. package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +0 -161
  199. package/dist/lucern/contracts/src/workflow-runtime.contract.js +0 -257
  200. package/dist/realtime-refs.d.ts +0 -1
  201. package/dist/realtime-refs.js +0 -1
  202. package/dist/realtime.d.ts +0 -1
  203. package/dist/realtime.js +0 -1
  204. /package/{dist/lib/platform/sdk/index.d.ts → src/index.ts} +0 -0
  205. /package/{dist/lib/platform/sdk/promptCatalog.d.ts → src/promptCatalog.ts} +0 -0
  206. /package/{dist/lib/platform/sdk/version.js → src/version.ts} +0 -0
@@ -1,13 +0,0 @@
1
- /**
2
- * Internal events/webhooks client factories exposed for testing / audit.
3
- *
4
- * These core factories live in `@lucern/client-core` and are bundled
5
- * into `@lucern/sdk` at build time via the tsup alias map. Re-exported
6
- * here so downstream test/audit tooling can import them from the
7
- * public `@lucern/sdk` entry point instead of reaching into the
8
- * package internals directly.
9
- *
10
- * Added: EK-16 T7.3.4 (2026-04-18).
11
- */
12
- export { createEventsClientCore, type EventsClientCoreConfig, } from "@/lucern/packages/client-core/src/events";
13
- export { createWebhooksClientCore, type WebhooksClientCoreConfig, } from "@/lucern/packages/client-core/src/webhooks";
@@ -1,13 +0,0 @@
1
- /**
2
- * Internal events/webhooks client factories exposed for testing / audit.
3
- *
4
- * These core factories live in `@lucern/client-core` and are bundled
5
- * into `@lucern/sdk` at build time via the tsup alias map. Re-exported
6
- * here so downstream test/audit tooling can import them from the
7
- * public `@lucern/sdk` entry point instead of reaching into the
8
- * package internals directly.
9
- *
10
- * Added: EK-16 T7.3.4 (2026-04-18).
11
- */
12
- export { createEventsClientCore, } from "@/lucern/packages/client-core/src/events";
13
- export { createWebhooksClientCore, } from "@/lucern/packages/client-core/src/webhooks";
@@ -1,586 +0,0 @@
1
- import { type GatewayClientConfig, type PlatformGatewaySuccess } from "./coreClient";
2
- import { type OntologyBindingInput } from "./ontologyClient";
3
- import { type TopicBulkCreateInput, type TopicCreateInput, type TopicCoverageQuery, type TopicListInput, type TopicTreeQuery, type TopicUpdateInput } from "./topicsClient";
4
- import type { GraphAnalyticsMetric, JsonObject } from "./types";
5
- type GatewayRecord = Record<string, unknown>;
6
- type GatewayList = GatewayRecord & {
7
- cursor?: string;
8
- total?: number;
9
- };
10
- type BeliefRecord = GatewayRecord & {
11
- id?: string;
12
- beliefId?: string;
13
- nodeId?: string;
14
- };
15
- type BeliefsListResult = GatewayList & {
16
- beliefs?: BeliefRecord[];
17
- };
18
- type BeliefsLineageResult = GatewayRecord & {
19
- beliefId?: string;
20
- lineage?: GatewayRecord[];
21
- };
22
- type SearchResult = GatewayList & {
23
- beliefs?: GatewayRecord[];
24
- results?: GatewayRecord[];
25
- };
26
- type GraphNeighborhoodInput = {
27
- globalId?: string;
28
- globalIds?: string | string[];
29
- maxDepth?: number;
30
- };
31
- type GraphTraverseInput = {
32
- startNode: string;
33
- direction?: string;
34
- maxDepth?: number;
35
- topicId?: string;
36
- };
37
- type GraphAnalyzeInput = {
38
- topicId?: string;
39
- metric?: GraphAnalyticsMetric;
40
- limit?: number;
41
- };
42
- type GraphBiasInput = {
43
- topicId?: string;
44
- threshold?: number;
45
- limit?: number;
46
- };
47
- type GraphGapsInput = {
48
- topicId?: string;
49
- minConfidence?: number;
50
- };
51
- type GraphFalsifyInput = {
52
- topicId?: string;
53
- beliefId?: string;
54
- beliefIds?: string[];
55
- minConfidence?: number;
56
- };
57
- type EventsListResult = GatewayList & {
58
- events?: GatewayRecord[];
59
- };
60
- type WebhooksListResult = GatewayList & {
61
- webhooks?: GatewayRecord[];
62
- };
63
- type QuestionsListResult = GatewayList & {
64
- questions?: Array<GatewayRecord & {
65
- priority?: string;
66
- }>;
67
- };
68
- type ContradictionsListResult = GatewayList & {
69
- contradictions?: GatewayRecord[];
70
- };
71
- type WorktreesListResult = GatewayList & {
72
- worktrees?: GatewayRecord[];
73
- };
74
- type TaskListResult = GatewayList & {
75
- tasks?: GatewayRecord[];
76
- };
77
- type EvidenceCreateResult = GatewayRecord & {
78
- id?: string;
79
- };
80
- type EvidenceLinkResult = GatewayRecord & {
81
- edgeId?: string;
82
- };
83
- type BeliefCreateInput = {
84
- topicId: string;
85
- text: string;
86
- rationale?: string;
87
- worktreeId?: string;
88
- pillar?: string;
89
- sourceBeliefIds?: string[];
90
- sourceType?: string;
91
- beliefType?: string;
92
- reversibility?: string;
93
- predictionMeta?: JsonObject;
94
- metadata?: JsonObject;
95
- };
96
- type BeliefsListQuery = {
97
- topicId?: string;
98
- status?: string;
99
- worktreeId?: string;
100
- minConfidence?: number;
101
- limit?: number;
102
- cursor?: string;
103
- };
104
- type BeliefRefineInput = {
105
- text: string;
106
- rationale?: string;
107
- };
108
- type BeliefForkInput = {
109
- text: string;
110
- forkReason?: string;
111
- rationale?: string;
112
- };
113
- type BeliefConfidenceInput = {
114
- confidence: number;
115
- trigger?: string;
116
- rationale: string;
117
- certainty?: number;
118
- maxInlinePropagationTargets?: number;
119
- };
120
- type BeliefArchiveInput = {
121
- reason?: string;
122
- rationale?: string;
123
- };
124
- type BeliefContractInput = GatewayRecord;
125
- type BeliefBisectInput = {
126
- expectedDirection: "overconfident" | "underconfident";
127
- timeRange?: {
128
- start: number;
129
- end: number;
130
- };
131
- };
132
- type EdgeCreateInput = {
133
- sourceId: string;
134
- targetId: string;
135
- edgeType: string;
136
- topicId?: string;
137
- confidence?: number;
138
- weight?: number;
139
- context?: string;
140
- reasoning?: string;
141
- };
142
- type EdgeListQuery = {
143
- sourceId?: string;
144
- edgeType?: string;
145
- limit?: number;
146
- cursor?: string;
147
- };
148
- type EdgeTraverseInput = {
149
- startNode: string;
150
- direction?: string;
151
- maxDepth?: number;
152
- topicId?: string;
153
- };
154
- type EvidenceCreateInput = {
155
- topicId: string;
156
- text: string;
157
- source?: string;
158
- targetId?: string;
159
- weight?: number;
160
- metadata?: JsonObject;
161
- title?: string;
162
- content?: string;
163
- contentType?: string;
164
- kind?: string;
165
- };
166
- type EvidenceListQuery = {
167
- topicId?: string;
168
- targetId?: string;
169
- limit?: number;
170
- cursor?: string;
171
- };
172
- type EvidenceSearchInput = {
173
- q: string;
174
- topicId?: string;
175
- targetId?: string;
176
- methodology?: string;
177
- limit?: number;
178
- cursor?: string;
179
- };
180
- type EvidenceLinkInput = {
181
- evidenceId: string;
182
- targetId: string;
183
- targetType?: "belief" | "question";
184
- weight?: number;
185
- rationale?: string;
186
- };
187
- type QuestionsListQuery = {
188
- topicId?: string;
189
- status?: string;
190
- priority?: string;
191
- worktreeId?: string;
192
- limit?: number;
193
- cursor?: string;
194
- };
195
- type QuestionCreateInput = {
196
- topicId: string;
197
- text: string;
198
- priority?: string;
199
- linkedBeliefId?: string;
200
- metadata?: JsonObject;
201
- };
202
- type QuestionAnswerInput = {
203
- text: string;
204
- confidence?: string;
205
- evidenceIds?: string[];
206
- rationale?: string;
207
- };
208
- type QuestionRefineInput = {
209
- text: string;
210
- rationale?: string;
211
- };
212
- type QuestionArchiveInput = {
213
- reason?: string;
214
- rationale?: string;
215
- };
216
- type QuestionStatusInput = {
217
- status: string;
218
- rationale?: string;
219
- };
220
- type SearchQueryInput = {
221
- q?: string;
222
- query?: string;
223
- topicId?: string;
224
- types?: string[];
225
- status?: string;
226
- minConfidence?: number;
227
- limit?: number;
228
- cursor?: string;
229
- };
230
- type TaskCreateInput = {
231
- topicId?: string;
232
- title: string;
233
- description?: string;
234
- taskType?: string;
235
- priority?: string;
236
- linkedBeliefId?: string;
237
- linkedQuestionId?: string;
238
- linkedWorktreeId?: string;
239
- };
240
- type TaskUpdateInput = {
241
- id: string;
242
- title?: string;
243
- description?: string;
244
- priority?: string;
245
- status?: string;
246
- linkedBeliefId?: string;
247
- linkedQuestionId?: string;
248
- linkedWorktreeId?: string;
249
- metadata?: JsonObject;
250
- };
251
- type TaskCompleteInput = {
252
- id: string;
253
- outputSummary: string;
254
- };
255
- type TaskListQuery = {
256
- topicId?: string;
257
- worktreeId?: string;
258
- status?: string;
259
- limit?: number;
260
- };
261
- type WorktreeCreateInput = {
262
- title: string;
263
- topicId?: string;
264
- objective?: string;
265
- hypothesis?: string;
266
- beliefIds?: string[];
267
- autoShape?: boolean;
268
- domainPackId?: string;
269
- executionOrder?: number;
270
- dependsOn?: string[];
271
- blocks?: string[];
272
- gate?: string;
273
- proofArtifacts?: unknown[];
274
- staffingHint?: string;
275
- lastReconciledAt?: number;
276
- autoFixPolicy?: unknown;
277
- };
278
- type WorktreeListQuery = {
279
- topicId?: string;
280
- status?: string;
281
- limit?: number;
282
- };
283
- type WorktreeActivateInput = {
284
- id: string;
285
- };
286
- type WorktreeUpdateInput = {
287
- id: string;
288
- objective?: string;
289
- hypothesis?: string;
290
- rationale?: string;
291
- track?: string;
292
- trackPosition?: number;
293
- executionBand?: number;
294
- executionOrder?: number;
295
- dependsOn?: string[];
296
- blocks?: string[];
297
- gate?: string;
298
- status?: string;
299
- topicId?: string;
300
- additionalTopicIds?: string[];
301
- proofArtifacts?: unknown[];
302
- staffingHint?: string;
303
- lastReconciledAt?: number;
304
- autoFixPolicy?: unknown;
305
- lensId?: string;
306
- };
307
- type WorktreeMergeInput = {
308
- id: string;
309
- summary?: string;
310
- outcomes: Array<{
311
- beliefId: string;
312
- confidence: number;
313
- rationale: string;
314
- }>;
315
- };
316
- type WorktreeTargetsInput = {
317
- id: string;
318
- addBeliefIds?: string[];
319
- addQuestionIds?: string[];
320
- removeBeliefIds?: string[];
321
- removeQuestionIds?: string[];
322
- };
323
- type OntologyListInput = {
324
- tenantId?: string;
325
- tier?: string;
326
- status?: string;
327
- };
328
- type OntologyMatchInput = GatewayRecord;
329
- type WebhookCreateInput = GatewayRecord;
330
- type WebhookUpdateInput = GatewayRecord;
331
- type WebhookListQuery = {
332
- topicId?: string;
333
- };
334
- type WebhookTestInput = {
335
- topicId?: string;
336
- };
337
- type WebhookDeliveriesQuery = {
338
- limit?: number;
339
- };
340
- type EventsListQuery = {
341
- topicId?: string;
342
- after?: string;
343
- types?: string[];
344
- startTime?: number;
345
- endTime?: number;
346
- limit?: number;
347
- };
348
- type ReplayEventsInput = GatewayRecord;
349
- export declare function createBeliefsFacade(config?: GatewayClientConfig): {
350
- create(input: BeliefCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<BeliefRecord>>;
351
- get(id: string): Promise<PlatformGatewaySuccess<BeliefRecord>>;
352
- list(query: BeliefsListQuery): Promise<PlatformGatewaySuccess<BeliefsListResult>>;
353
- refine(id: string, input: BeliefRefineInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<BeliefRecord>>;
354
- fork(id: string, input: BeliefForkInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<BeliefRecord>>;
355
- updateConfidence(id: string, input: BeliefConfidenceInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
356
- updateStatus(input: {
357
- id?: string;
358
- nodeId?: string;
359
- beliefId?: string;
360
- status: "active" | "superseded" | "archived";
361
- reason?: string;
362
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
363
- updateRationale(input: {
364
- id?: string;
365
- nodeId?: string;
366
- beliefId?: string;
367
- rationale?: string;
368
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
369
- linkBeliefs(input: {
370
- fromNodeId: string;
371
- toNodeId: string;
372
- edgeType: string;
373
- weight?: number;
374
- context?: string;
375
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
376
- unlinkEvidence(input: {
377
- beliefNodeId?: string;
378
- beliefId?: string;
379
- insightId?: string;
380
- evidenceId?: string;
381
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
382
- updateCriticality(input: {
383
- id?: string;
384
- nodeId?: string;
385
- beliefId?: string;
386
- criticality: string;
387
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
388
- batchUpdateCriticality(input: {
389
- updates: GatewayRecord[];
390
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
391
- reassignTopic(input: {
392
- beliefNodeIds?: string[];
393
- beliefIds?: string[];
394
- targetTopicId: string;
395
- reason?: string;
396
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
397
- archive(id: string, input?: BeliefArchiveInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
398
- lineage(id: string): Promise<PlatformGatewaySuccess<BeliefsLineageResult>>;
399
- confidenceHistory(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
400
- createContract(id: string, input: BeliefContractInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
401
- bisect(id: string, input: BeliefBisectInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
402
- };
403
- export declare function createContradictionsFacade(config?: GatewayClientConfig): {
404
- flag(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
405
- list(query: {
406
- topicId?: string;
407
- status?: string;
408
- limit?: number;
409
- cursor?: string;
410
- }): Promise<PlatformGatewaySuccess<ContradictionsListResult>>;
411
- get(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
412
- };
413
- export declare function createEdgesFacade(config?: GatewayClientConfig): {
414
- create(input: EdgeCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
415
- list(query: EdgeListQuery): Promise<PlatformGatewaySuccess<GatewayList>>;
416
- traverse(input: EdgeTraverseInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
417
- update(input: {
418
- edgeId: string;
419
- weight?: number;
420
- confidence?: number;
421
- context?: string;
422
- derivationType?: string;
423
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
424
- remove(input: {
425
- edgeId: string;
426
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
427
- removeBetween(input: {
428
- fromNodeId: string;
429
- toNodeId: string;
430
- edgeType?: string;
431
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
432
- batchCreate(input: {
433
- edges: GatewayRecord[];
434
- skipLayerValidation?: boolean;
435
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
436
- delete(input: {
437
- edgeIds: string[];
438
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
439
- };
440
- export declare function createEvidenceFacade(config?: GatewayClientConfig): {
441
- create(input: EvidenceCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EvidenceCreateResult>>;
442
- get(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
443
- list(query: EvidenceListQuery): Promise<PlatformGatewaySuccess<GatewayList>>;
444
- link(input: EvidenceLinkInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<EvidenceLinkResult>>;
445
- search(query: EvidenceSearchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayList>>;
446
- updateStatus(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
447
- update(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
448
- flagIncorrect(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
449
- remove(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
450
- updateVerificationStatus(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
451
- };
452
- export declare function createEventsFacade(config?: GatewayClientConfig): {
453
- list(query?: EventsListQuery): Promise<PlatformGatewaySuccess<EventsListResult>>;
454
- replay(input: ReplayEventsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
455
- };
456
- export declare function createGraphFacade(config?: GatewayClientConfig): {
457
- neighborhood(input: GraphNeighborhoodInput): Promise<PlatformGatewaySuccess<import("./types").GraphNeighborhoodResponse>>;
458
- traverse(input: GraphTraverseInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
459
- analyze(input?: GraphAnalyzeInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
460
- bias(input?: GraphBiasInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
461
- gaps(input: GraphGapsInput): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
462
- falsify(input: GraphFalsifyInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
463
- };
464
- export declare function createIdentityFacade(config?: GatewayClientConfig): {
465
- whoami(): Promise<PlatformGatewaySuccess<{
466
- principalId: string;
467
- principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
468
- tenantId: string | null;
469
- workspaceId: string | null;
470
- scopes: string[];
471
- roles: string[];
472
- isPlatformAdmin: boolean;
473
- isTenantAdmin: boolean;
474
- isWorkspaceAdmin: boolean;
475
- authMode: string | undefined;
476
- sessionId: string | undefined;
477
- delegatedBy: string | undefined;
478
- expiresAt: number | undefined;
479
- }> & {
480
- principalId: string;
481
- principalType: "user" | "human" | "service" | "group" | "external_viewer" | "agent";
482
- tenantId: string | null;
483
- workspaceId: string | null;
484
- scopes: string[];
485
- roles: string[];
486
- isPlatformAdmin: boolean;
487
- isTenantAdmin: boolean;
488
- isWorkspaceAdmin: boolean;
489
- authMode: string | undefined;
490
- sessionId: string | undefined;
491
- delegatedBy: string | undefined;
492
- expiresAt: number | undefined;
493
- }>;
494
- };
495
- export declare function createOntologiesFacade(config?: GatewayClientConfig): {
496
- get(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
497
- list(query?: OntologyListInput): Promise<PlatformGatewaySuccess<{
498
- ontologies: any[];
499
- total: number;
500
- items: any[];
501
- definitions: any[];
502
- }>>;
503
- bind(input: OntologyBindingInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
504
- match(input: OntologyMatchInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
505
- };
506
- export declare function createQuestionsFacade(config?: GatewayClientConfig): {
507
- create(input: QuestionCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
508
- get(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
509
- list(query: QuestionsListQuery): Promise<PlatformGatewaySuccess<QuestionsListResult>>;
510
- answer(id: string, input: QuestionAnswerInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
511
- refine(id: string, input: QuestionRefineInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
512
- archive(id: string, input?: QuestionArchiveInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
513
- updateStatus(id: string, input: QuestionStatusInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
514
- batchCreate(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
515
- add(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
516
- updatePriority(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
517
- advanceToConviction(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
518
- updateConviction(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
519
- finalizeConviction(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
520
- update(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
521
- delete(input: GatewayRecord, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
522
- };
523
- export declare function createSearchFacade(config?: GatewayClientConfig): {
524
- query(input: SearchQueryInput): Promise<PlatformGatewaySuccess<SearchResult>>;
525
- };
526
- export declare function createTasksFacade(config?: GatewayClientConfig): {
527
- create(input: TaskCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
528
- update(input: TaskUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
529
- complete(input: TaskCompleteInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
530
- list(query: TaskListQuery): Promise<PlatformGatewaySuccess<TaskListResult>>;
531
- };
532
- export declare function createTopicsFacade(config?: GatewayClientConfig): {
533
- create(input: TopicCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<import("./types").TopicRecord>>;
534
- get(id: string): Promise<PlatformGatewaySuccess<import("./types").TopicRecord>>;
535
- list(query?: TopicListInput): Promise<PlatformGatewaySuccess<import("./types").TopicListResponse>>;
536
- update(input: TopicUpdateInput & {
537
- id: string;
538
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<import("./types").TopicRecord>>;
539
- tree(input: TopicTreeQuery & {
540
- id: string;
541
- }): Promise<PlatformGatewaySuccess<import("./types").TopicTreeResponse>>;
542
- coverage(input: TopicCoverageQuery & {
543
- id: string;
544
- }): Promise<PlatformGatewaySuccess<import("./types").TopicCoverageResponse>>;
545
- remove(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
546
- bulkCreate(input: TopicBulkCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
547
- };
548
- export declare function createWebhooksFacade(config?: GatewayClientConfig): {
549
- create(input: WebhookCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
550
- list(query?: WebhookListQuery): Promise<PlatformGatewaySuccess<WebhooksListResult>>;
551
- get(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
552
- update(id: string, input: WebhookUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
553
- delete(id: string, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
554
- test(id: string, input?: WebhookTestInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
555
- deliveries(id: string, query?: WebhookDeliveriesQuery): Promise<PlatformGatewaySuccess<GatewayRecord>>;
556
- health(id: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
557
- };
558
- export declare function createWorktreesFacade(config?: GatewayClientConfig): {
559
- create(input: WorktreeCreateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
560
- list(query: WorktreeListQuery): Promise<PlatformGatewaySuccess<WorktreesListResult>>;
561
- activate(input: WorktreeActivateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
562
- update(input: WorktreeUpdateInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
563
- merge(input: WorktreeMergeInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
564
- updateTargets(input: WorktreeTargetsInput, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
565
- complete(input: {
566
- worktreeId: string;
567
- keyFindings?: string[];
568
- decisionsReached?: string[];
569
- nextSteps?: string[];
570
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
571
- advancePhase(input: {
572
- worktreeId: string;
573
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
574
- setPhase(input: {
575
- worktreeId: string;
576
- phase: string;
577
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
578
- patchState(input: {
579
- worktreeId: string;
580
- patch: GatewayRecord;
581
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
582
- bulkCreate(input: {
583
- worktrees: unknown[];
584
- }, idempotencyKey?: string): Promise<PlatformGatewaySuccess<GatewayRecord>>;
585
- };
586
- export {};