@lucern/sdk 0.2.0-alpha.1 → 0.2.0-alpha.11

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 (317) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +691 -61
  3. package/dist/adminClient.d.ts +409 -0
  4. package/dist/adminClient.js +755 -0
  5. package/dist/adminClient.js.map +1 -0
  6. package/dist/answersClient.d.ts +23 -0
  7. package/dist/answersClient.js +333 -0
  8. package/dist/answersClient.js.map +1 -0
  9. package/dist/audience/index.d.ts +38 -0
  10. package/dist/audience/index.js +110 -0
  11. package/dist/audience/index.js.map +1 -0
  12. package/dist/{packages/sdk/src/audiencesClient.d.ts → audiencesClient.d.ts} +30 -18
  13. package/dist/audiencesClient.js +472 -0
  14. package/dist/audiencesClient.js.map +1 -0
  15. package/dist/auditClient.d.ts +29 -0
  16. package/dist/auditClient.js +386 -0
  17. package/dist/auditClient.js.map +1 -0
  18. package/dist/beliefs/index.d.ts +465 -0
  19. package/dist/beliefs/index.js +6433 -0
  20. package/dist/beliefs/index.js.map +1 -0
  21. package/dist/beliefs/lifecycle.d.ts +24 -0
  22. package/dist/beliefs/lifecycle.js +98 -0
  23. package/dist/beliefs/lifecycle.js.map +1 -0
  24. package/dist/beliefsClient.d.ts +241 -0
  25. package/dist/beliefsClient.js +646 -0
  26. package/dist/beliefsClient.js.map +1 -0
  27. package/dist/client.d.ts +2398 -0
  28. package/dist/client.js +6411 -0
  29. package/dist/client.js.map +1 -0
  30. package/dist/contextClient.d.ts +27 -0
  31. package/dist/contextClient.js +396 -0
  32. package/dist/contextClient.js.map +1 -0
  33. package/dist/contextFacade.d.ts +2 -0
  34. package/dist/contextFacade.js +73 -0
  35. package/dist/contextFacade.js.map +1 -0
  36. package/dist/{lucern/packages/domain-context/src/context-pack-compiler.d.ts → contextPackCompiler.d.ts} +11 -10
  37. package/dist/contextPackCompiler.js +1091 -0
  38. package/dist/contextPackCompiler.js.map +1 -0
  39. package/dist/contextPackPolicy.d.ts +84 -0
  40. package/dist/contextPackPolicy.js +347 -0
  41. package/dist/contextPackPolicy.js.map +1 -0
  42. package/dist/contextPackSchema.d.ts +7 -0
  43. package/dist/contextPackSchema.js +203 -0
  44. package/dist/contextPackSchema.js.map +1 -0
  45. package/dist/contextTypes.d.ts +135 -0
  46. package/dist/contextTypes.js +3 -0
  47. package/dist/contextTypes.js.map +1 -0
  48. package/dist/contracts/api-enums.contract.d.ts +81 -0
  49. package/dist/contracts/api-enums.contract.js +98 -0
  50. package/dist/contracts/api-enums.contract.js.map +1 -0
  51. package/dist/{lucern/contracts/src → contracts}/auth-session.contract.d.ts +14 -12
  52. package/dist/contracts/auth-session.contract.js +48 -0
  53. package/dist/contracts/auth-session.contract.js.map +1 -0
  54. package/dist/{lucern/contracts/src → contracts}/context-pack.contract.d.ts +56 -58
  55. package/dist/contracts/context-pack.contract.js +98 -0
  56. package/dist/contracts/context-pack.contract.js.map +1 -0
  57. package/dist/contracts/contextPack.d.ts +1 -0
  58. package/dist/contracts/contextPack.js +98 -0
  59. package/dist/contracts/contextPack.js.map +1 -0
  60. package/dist/contracts/index.d.ts +9 -0
  61. package/dist/contracts/index.js +4928 -0
  62. package/dist/contracts/index.js.map +1 -0
  63. package/dist/{lucern/contracts/src → contracts}/lens-filter.contract.d.ts +10 -8
  64. package/dist/contracts/lens-filter.contract.js +71 -0
  65. package/dist/contracts/lens-filter.contract.js.map +1 -0
  66. package/dist/contracts/lens-workflow.contract.d.ts +87 -0
  67. package/dist/contracts/lens-workflow.contract.js +123 -0
  68. package/dist/contracts/lens-workflow.contract.js.map +1 -0
  69. package/dist/contracts/lensFilter.d.ts +1 -0
  70. package/dist/contracts/lensFilter.js +71 -0
  71. package/dist/contracts/lensFilter.js.map +1 -0
  72. package/dist/contracts/lensWorkflow.d.ts +2 -0
  73. package/dist/contracts/lensWorkflow.js +123 -0
  74. package/dist/contracts/lensWorkflow.js.map +1 -0
  75. package/dist/contracts/mcp-tools.contract.d.ts +1 -0
  76. package/dist/contracts/mcp-tools.contract.js +3016 -0
  77. package/dist/contracts/mcp-tools.contract.js.map +1 -0
  78. package/dist/contracts/mcpTools.d.ts +1 -0
  79. package/dist/contracts/mcpTools.js +3016 -0
  80. package/dist/contracts/mcpTools.js.map +1 -0
  81. package/dist/contracts/prompt.contract.d.ts +26 -0
  82. package/dist/contracts/prompt.contract.js +12 -0
  83. package/dist/contracts/prompt.contract.js.map +1 -0
  84. package/dist/contracts/prompt.d.ts +1 -0
  85. package/dist/contracts/prompt.js +12 -0
  86. package/dist/contracts/prompt.js.map +1 -0
  87. package/dist/contracts/sdk-tools.contract.d.ts +2 -0
  88. package/dist/contracts/sdk-tools.contract.js +4164 -0
  89. package/dist/contracts/sdk-tools.contract.js.map +1 -0
  90. package/dist/contracts/sdkTools.d.ts +2 -0
  91. package/dist/contracts/sdkTools.js +4164 -0
  92. package/dist/contracts/sdkTools.js.map +1 -0
  93. package/dist/contracts/workflow-runtime.contract.d.ts +163 -0
  94. package/dist/contracts/workflow-runtime.contract.js +245 -0
  95. package/dist/contracts/workflow-runtime.contract.js.map +1 -0
  96. package/dist/contracts/workflowRuntime.d.ts +1 -0
  97. package/dist/contracts/workflowRuntime.js +245 -0
  98. package/dist/contracts/workflowRuntime.js.map +1 -0
  99. package/dist/contradictions/index.d.ts +158 -0
  100. package/dist/contradictions/index.js +6427 -0
  101. package/dist/contradictions/index.js.map +1 -0
  102. package/dist/{packages/sdk/src/controlObjectOwnership.d.ts → controlObjectOwnership.d.ts} +35 -18
  103. package/dist/controlObjectOwnership.js +215 -0
  104. package/dist/controlObjectOwnership.js.map +1 -0
  105. package/dist/{packages/sdk/src/coreClient.d.ts → coreClient.d.ts} +38 -14
  106. package/dist/coreClient.js +339 -0
  107. package/dist/coreClient.js.map +1 -0
  108. package/dist/customTools.d.ts +88 -0
  109. package/dist/customTools.js +248 -0
  110. package/dist/customTools.js.map +1 -0
  111. package/dist/decisions/index.d.ts +68 -0
  112. package/dist/decisions/index.js +6429 -0
  113. package/dist/decisions/index.js.map +1 -0
  114. package/dist/decisionsClient.d.ts +111 -0
  115. package/dist/decisionsClient.js +522 -0
  116. package/dist/decisionsClient.js.map +1 -0
  117. package/dist/domainContext.d.ts +1 -0
  118. package/dist/domainContext.js +3 -0
  119. package/dist/domainContext.js.map +1 -0
  120. package/dist/edges/index.d.ts +204 -0
  121. package/dist/edges/index.js +6428 -0
  122. package/dist/edges/index.js.map +1 -0
  123. package/dist/events.d.ts +178 -0
  124. package/dist/events.js +251 -0
  125. package/dist/events.js.map +1 -0
  126. package/dist/eventsCore.d.ts +49 -0
  127. package/dist/eventsCore.js +429 -0
  128. package/dist/eventsCore.js.map +1 -0
  129. package/dist/evidence/index.d.ts +295 -0
  130. package/dist/evidence/index.js +6428 -0
  131. package/dist/evidence/index.js.map +1 -0
  132. package/dist/evidenceClient.d.ts +119 -0
  133. package/dist/evidenceClient.js +350 -0
  134. package/dist/evidenceClient.js.map +1 -0
  135. package/dist/facade/context.d.ts +18 -0
  136. package/dist/facade/context.js +73 -0
  137. package/dist/facade/context.js.map +1 -0
  138. package/dist/gatewayFacades.d.ts +589 -0
  139. package/dist/gatewayFacades.js +2006 -0
  140. package/dist/gatewayFacades.js.map +1 -0
  141. package/dist/graphClient.d.ts +271 -0
  142. package/dist/graphClient.js +698 -0
  143. package/dist/graphClient.js.map +1 -0
  144. package/dist/{packages/sdk/src/harnessClient.d.ts → harnessClient.d.ts} +127 -35
  145. package/dist/harnessClient.js +607 -0
  146. package/dist/harnessClient.js.map +1 -0
  147. package/dist/identityClient.d.ts +140 -0
  148. package/dist/identityClient.js +497 -0
  149. package/dist/identityClient.js.map +1 -0
  150. package/dist/index.d.ts +45 -0
  151. package/dist/index.js +5284 -2568
  152. package/dist/index.js.map +1 -1
  153. package/dist/learningClient.d.ts +46 -0
  154. package/dist/learningClient.js +409 -0
  155. package/dist/learningClient.js.map +1 -0
  156. package/dist/lenses/index.d.ts +194 -0
  157. package/dist/lenses/index.js +6427 -0
  158. package/dist/lenses/index.js.map +1 -0
  159. package/dist/{packages/sdk/src/mcpParityClient.d.ts → mcpParityClient.d.ts} +11 -5
  160. package/dist/mcpParityClient.js +516 -0
  161. package/dist/mcpParityClient.js.map +1 -0
  162. package/dist/mcpParitySurface.d.ts +12 -0
  163. package/dist/mcpParitySurface.js +65 -0
  164. package/dist/mcpParitySurface.js.map +1 -0
  165. package/dist/mcpTools-DPZxowDX.d.ts +254 -0
  166. package/dist/nodes/index.d.ts +62 -0
  167. package/dist/nodes/index.js +6429 -0
  168. package/dist/nodes/index.js.map +1 -0
  169. package/dist/ontologies/index.d.ts +178 -0
  170. package/dist/ontologies/index.js +6430 -0
  171. package/dist/ontologies/index.js.map +1 -0
  172. package/dist/{packages/sdk/src/ontologyClient.d.ts → ontologyClient.d.ts} +44 -22
  173. package/dist/ontologyClient.js +513 -0
  174. package/dist/ontologyClient.js.map +1 -0
  175. package/dist/opinion.d.ts +11 -0
  176. package/dist/opinion.js +35 -0
  177. package/dist/opinion.js.map +1 -0
  178. package/dist/packRuntime.d.ts +2 -0
  179. package/dist/packRuntime.js +3 -0
  180. package/dist/packRuntime.js.map +1 -0
  181. package/dist/packsClient.d.ts +131 -0
  182. package/dist/packsClient.js +525 -0
  183. package/dist/packsClient.js.map +1 -0
  184. package/dist/{packages/sdk/src/policyClient.d.ts → policyClient.d.ts} +113 -18
  185. package/dist/policyClient.js +625 -0
  186. package/dist/policyClient.js.map +1 -0
  187. package/dist/questions/index.d.ts +297 -0
  188. package/dist/questions/index.js +6430 -0
  189. package/dist/questions/index.js.map +1 -0
  190. package/dist/realtime/index.d.ts +29 -0
  191. package/dist/realtime/index.js +23 -0
  192. package/dist/realtime/index.js.map +1 -0
  193. package/dist/realtime/refs.d.ts +17 -0
  194. package/dist/realtime/refs.js +9 -0
  195. package/dist/realtime/refs.js.map +1 -0
  196. package/dist/reportsClient.d.ts +41 -0
  197. package/dist/reportsClient.js +418 -0
  198. package/dist/reportsClient.js.map +1 -0
  199. package/dist/schemaClient.d.ts +64 -0
  200. package/dist/schemaClient.js +434 -0
  201. package/dist/schemaClient.js.map +1 -0
  202. package/dist/sdkSurface.d.ts +61 -0
  203. package/dist/sdkSurface.js +112 -0
  204. package/dist/sdkSurface.js.map +1 -0
  205. package/dist/sdkTools-CwXJDACb.d.ts +150 -0
  206. package/dist/sourcesClient.d.ts +24 -0
  207. package/dist/sourcesClient.js +339 -0
  208. package/dist/sourcesClient.js.map +1 -0
  209. package/dist/topics/index.d.ts +68 -0
  210. package/dist/topics/index.js +6428 -0
  211. package/dist/topics/index.js.map +1 -0
  212. package/dist/topicsClient.d.ts +84 -0
  213. package/dist/topicsClient.js +492 -0
  214. package/dist/topicsClient.js.map +1 -0
  215. package/dist/types.d.ts +715 -0
  216. package/dist/types.js +3 -0
  217. package/dist/types.js.map +1 -0
  218. package/dist/version.d.ts +4 -0
  219. package/dist/version.js +6 -0
  220. package/dist/version.js.map +1 -0
  221. package/dist/workflowClient.d.ts +316 -0
  222. package/dist/workflowClient.js +830 -0
  223. package/dist/workflowClient.js.map +1 -0
  224. package/dist/worktrees/index.d.ts +210 -0
  225. package/dist/worktrees/index.js +6430 -0
  226. package/dist/worktrees/index.js.map +1 -0
  227. package/package.json +92 -37
  228. package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
  229. package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
  230. package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +0 -161
  231. package/dist/lucern/mcp-server/src/context-pack-policy.d.ts +0 -119
  232. package/dist/lucern/mcp-server/src/context-pack-schema.d.ts +0 -18
  233. package/dist/lucern/modules/graph-primitives/src/ontology-matching.d.ts +0 -78
  234. package/dist/lucern/modules/graph-primitives/src/text-matching.d.ts +0 -53
  235. package/dist/lucern/packages/client-core/src/beliefs.d.ts +0 -30
  236. package/dist/lucern/packages/client-core/src/context.d.ts +0 -29
  237. package/dist/lucern/packages/client-core/src/contradictions.d.ts +0 -11
  238. package/dist/lucern/packages/client-core/src/edges.d.ts +0 -11
  239. package/dist/lucern/packages/client-core/src/events.d.ts +0 -9
  240. package/dist/lucern/packages/client-core/src/evidence.d.ts +0 -21
  241. package/dist/lucern/packages/client-core/src/graph.d.ts +0 -17
  242. package/dist/lucern/packages/client-core/src/identity.d.ts +0 -7
  243. package/dist/lucern/packages/client-core/src/ids.d.ts +0 -7
  244. package/dist/lucern/packages/client-core/src/ontologies.d.ts +0 -13
  245. package/dist/lucern/packages/client-core/src/questions.d.ts +0 -39
  246. package/dist/lucern/packages/client-core/src/search.d.ts +0 -7
  247. package/dist/lucern/packages/client-core/src/tasks.d.ts +0 -13
  248. package/dist/lucern/packages/client-core/src/topics.d.ts +0 -17
  249. package/dist/lucern/packages/client-core/src/webhooks.d.ts +0 -35
  250. package/dist/lucern/packages/client-core/src/worktrees.d.ts +0 -17
  251. package/dist/lucern/packages/domain-beliefs/src/beliefs.d.ts +0 -283
  252. package/dist/lucern/packages/domain-beliefs/src/index.d.ts +0 -1
  253. package/dist/lucern/packages/domain-context/src/compile.d.ts +0 -11
  254. package/dist/lucern/packages/domain-context/src/index.d.ts +0 -4
  255. package/dist/lucern/packages/domain-context/src/ports.d.ts +0 -58
  256. package/dist/lucern/packages/domain-context/src/public-types.d.ts +0 -1
  257. package/dist/lucern/packages/domain-edges/src/contradictions.d.ts +0 -59
  258. package/dist/lucern/packages/domain-edges/src/edges.d.ts +0 -91
  259. package/dist/lucern/packages/domain-edges/src/index.d.ts +0 -2
  260. package/dist/lucern/packages/domain-evidence/src/evidence.d.ts +0 -115
  261. package/dist/lucern/packages/domain-evidence/src/index.d.ts +0 -1
  262. package/dist/lucern/packages/domain-graph/src/graph.d.ts +0 -150
  263. package/dist/lucern/packages/domain-identity/src/index.d.ts +0 -1
  264. package/dist/lucern/packages/domain-identity/src/whoami.d.ts +0 -13
  265. package/dist/lucern/packages/domain-ontologies/src/ontologies.d.ts +0 -123
  266. package/dist/lucern/packages/domain-questions/src/index.d.ts +0 -1
  267. package/dist/lucern/packages/domain-questions/src/questions.d.ts +0 -147
  268. package/dist/lucern/packages/domain-search/src/search.d.ts +0 -97
  269. package/dist/lucern/packages/domain-tasks/src/index.d.ts +0 -1
  270. package/dist/lucern/packages/domain-tasks/src/tasks.d.ts +0 -102
  271. package/dist/lucern/packages/domain-topics/src/index.d.ts +0 -1
  272. package/dist/lucern/packages/domain-topics/src/topics.d.ts +0 -147
  273. package/dist/lucern/packages/domain-worktrees/src/index.d.ts +0 -1
  274. package/dist/lucern/packages/domain-worktrees/src/worktrees.d.ts +0 -185
  275. package/dist/lucern/packages/events/src/index.d.ts +0 -4
  276. package/dist/lucern/packages/events/src/matching.d.ts +0 -3
  277. package/dist/lucern/packages/events/src/outbox.d.ts +0 -15
  278. package/dist/lucern/packages/events/src/types.d.ts +0 -151
  279. package/dist/lucern/packages/events/src/webhooks.d.ts +0 -9
  280. package/dist/lucern/packages/sdk-typescript/src/facade/beliefs.d.ts +0 -15
  281. package/dist/lucern/packages/sdk-typescript/src/facade/context.d.ts +0 -12
  282. package/dist/lucern/packages/sdk-typescript/src/facade/contradictions.d.ts +0 -7
  283. package/dist/lucern/packages/sdk-typescript/src/facade/edges.d.ts +0 -7
  284. package/dist/lucern/packages/sdk-typescript/src/facade/events.d.ts +0 -6
  285. package/dist/lucern/packages/sdk-typescript/src/facade/evidence.d.ts +0 -21
  286. package/dist/lucern/packages/sdk-typescript/src/facade/graph.d.ts +0 -10
  287. package/dist/lucern/packages/sdk-typescript/src/facade/identity.d.ts +0 -5
  288. package/dist/lucern/packages/sdk-typescript/src/facade/ontologies.d.ts +0 -8
  289. package/dist/lucern/packages/sdk-typescript/src/facade/questions.d.ts +0 -39
  290. package/dist/lucern/packages/sdk-typescript/src/facade/search.d.ts +0 -5
  291. package/dist/lucern/packages/sdk-typescript/src/facade/tasks.d.ts +0 -8
  292. package/dist/lucern/packages/sdk-typescript/src/facade/topics.d.ts +0 -10
  293. package/dist/lucern/packages/sdk-typescript/src/facade/webhooks.d.ts +0 -16
  294. package/dist/lucern/packages/sdk-typescript/src/facade/worktrees.d.ts +0 -10
  295. package/dist/lucern/packages/sdk-typescript/src/index.d.ts +0 -28
  296. package/dist/packages/sdk/src/adminClient.d.ts +0 -89
  297. package/dist/packages/sdk/src/answersClient.d.ts +0 -5
  298. package/dist/packages/sdk/src/auditClient.d.ts +0 -23
  299. package/dist/packages/sdk/src/beliefsClient.d.ts +0 -54
  300. package/dist/packages/sdk/src/client.d.ts +0 -1610
  301. package/dist/packages/sdk/src/contextClient.d.ts +0 -9
  302. package/dist/packages/sdk/src/contracts/api-enums.contract.d.ts +0 -58
  303. package/dist/packages/sdk/src/customTools.d.ts +0 -65
  304. package/dist/packages/sdk/src/decisionsClient.d.ts +0 -110
  305. package/dist/packages/sdk/src/graphClient.d.ts +0 -209
  306. package/dist/packages/sdk/src/identityClient.d.ts +0 -104
  307. package/dist/packages/sdk/src/index.d.ts +0 -28
  308. package/dist/packages/sdk/src/learningClient.d.ts +0 -43
  309. package/dist/packages/sdk/src/mcpParitySurface.d.ts +0 -8
  310. package/dist/packages/sdk/src/packsClient.d.ts +0 -101
  311. package/dist/packages/sdk/src/reportsClient.d.ts +0 -31
  312. package/dist/packages/sdk/src/schemaClient.d.ts +0 -54
  313. package/dist/packages/sdk/src/sdkSurface.d.ts +0 -56
  314. package/dist/packages/sdk/src/topicsClient.d.ts +0 -45
  315. package/dist/packages/sdk/src/types.d.ts +0 -489
  316. package/dist/packages/sdk/src/version.d.ts +0 -2
  317. package/dist/packages/sdk/src/workflowClient.d.ts +0 -274
@@ -1,150 +0,0 @@
1
- type GraphDirection = "up" | "down" | "both";
2
- type GraphNodeRecord = Record<string, unknown>;
3
- type GraphEdgeRecord = Record<string, unknown>;
4
- type GraphBeliefGapRecord = {
5
- beliefId: string;
6
- text: string;
7
- confidence: number | null;
8
- suggestedQuestions: string[];
9
- };
10
- export type GraphNeighborhoodInput = {
11
- globalId?: string;
12
- globalIds?: string[];
13
- maxDepth?: number;
14
- };
15
- export type GraphNeighborhoodResult = {
16
- nodes: GraphNodeRecord[];
17
- edges: GraphEdgeRecord[];
18
- depth: number;
19
- };
20
- export type GraphTraverseInput = {
21
- startNode: string;
22
- direction?: string;
23
- maxDepth?: number;
24
- topicId?: string;
25
- };
26
- export type GraphTraverseResult = {
27
- startNode: string;
28
- direction: GraphDirection;
29
- maxDepth: number;
30
- nodes: GraphNodeRecord[];
31
- edges: GraphEdgeRecord[];
32
- depth: number;
33
- topicId?: string;
34
- };
35
- export type GraphAnalyzeInput = {
36
- topicId: string;
37
- metric?: string;
38
- limit?: number;
39
- };
40
- export type GraphAnalyzeResult = {
41
- topicId: string;
42
- metric: string;
43
- payload: Record<string, unknown>;
44
- };
45
- export type GraphBiasInput = {
46
- topicId: string;
47
- threshold?: number;
48
- limit?: number;
49
- };
50
- export type GraphBiasBelief = {
51
- nodeId: string;
52
- biasScore: number;
53
- riskLevel: string;
54
- supportingCount: number;
55
- challengingCount: number;
56
- };
57
- export type GraphBiasResult = {
58
- topicId: string;
59
- metric: "confirmation_bias";
60
- threshold: number;
61
- beliefs: GraphBiasBelief[];
62
- payload: Record<string, unknown>;
63
- };
64
- export type GraphGapsInput = {
65
- topicId: string;
66
- minConfidence?: number;
67
- };
68
- export type GraphGapsResult = {
69
- topicId: string;
70
- gaps: GraphBeliefGapRecord[];
71
- totalGaps: number;
72
- };
73
- type GraphBeliefRecord = {
74
- beliefId?: string;
75
- nodeId?: string;
76
- topicId?: string;
77
- text?: string;
78
- canonicalText?: string;
79
- confidence?: number | null;
80
- };
81
- type GraphQuestionRecord = {
82
- questionId?: string;
83
- nodeId?: string;
84
- linkedBeliefId?: string;
85
- };
86
- type GraphTestingEdgeRecord = {
87
- fromNodeId?: string;
88
- toNodeId?: string;
89
- edgeType?: string;
90
- };
91
- export type GraphFalsifyInput = {
92
- topicId?: string;
93
- beliefId?: string;
94
- beliefIds?: string[];
95
- minConfidence?: number;
96
- };
97
- export type GraphFalsificationQuestion = {
98
- questionText: string;
99
- falsificationPotential: number;
100
- targetBeliefId: string;
101
- targetBeliefText: string;
102
- };
103
- export type GraphFalsifyResult = {
104
- topicId: string;
105
- questions: GraphFalsificationQuestion[];
106
- };
107
- export type GraphPort = {
108
- neighborhood: (input: {
109
- globalIds: string[];
110
- maxDepth: number;
111
- }) => Promise<unknown>;
112
- traverse: (input: {
113
- startNode: string;
114
- direction: GraphDirection;
115
- maxDepth: number;
116
- topicId?: string;
117
- }) => Promise<unknown>;
118
- analyze: (input: {
119
- topicId: string;
120
- metric: string;
121
- limit?: number;
122
- }) => Promise<unknown>;
123
- bias: (input: {
124
- topicId: string;
125
- threshold: number;
126
- limit?: number;
127
- }) => Promise<unknown>;
128
- listBeliefs: (input: {
129
- topicId: string;
130
- minConfidence?: number;
131
- limit?: number;
132
- }) => Promise<GraphBeliefRecord[]>;
133
- fetchBelief: (input: {
134
- beliefId: string;
135
- }) => Promise<GraphBeliefRecord | null>;
136
- listQuestions: (input: {
137
- topicId: string;
138
- limit?: number;
139
- }) => Promise<GraphQuestionRecord[]>;
140
- listTestingEdges: (input: {
141
- topicId: string;
142
- }) => Promise<GraphTestingEdgeRecord[]>;
143
- };
144
- export declare function graphNeighborhood(deps: GraphPort, input: GraphNeighborhoodInput): Promise<GraphNeighborhoodResult>;
145
- export declare function graphTraverse(deps: GraphPort, input: GraphTraverseInput): Promise<GraphTraverseResult>;
146
- export declare function graphAnalyze(deps: GraphPort, input: GraphAnalyzeInput): Promise<GraphAnalyzeResult>;
147
- export declare function graphBias(deps: GraphPort, input: GraphBiasInput): Promise<GraphBiasResult>;
148
- export declare function graphGaps(deps: GraphPort, input: GraphGapsInput): Promise<GraphGapsResult>;
149
- export declare function graphFalsify(deps: GraphPort, input: GraphFalsifyInput): Promise<GraphFalsifyResult>;
150
- export {};
@@ -1 +0,0 @@
1
- export * from "./whoami";
@@ -1,13 +0,0 @@
1
- export type IdentitySummary = {
2
- principalId: string;
3
- principalType: string;
4
- tenantId?: string;
5
- workspaceId?: string;
6
- scopes?: string[];
7
- roles?: string[];
8
- };
9
- export type WhoamiPort = {
10
- resolveIdentitySummary: (() => IdentitySummary) | (() => Promise<IdentitySummary>);
11
- };
12
- export declare function normalizeIdentitySummary(value: IdentitySummary): IdentitySummary;
13
- export declare function whoami(deps: WhoamiPort): Promise<IdentitySummary>;
@@ -1,123 +0,0 @@
1
- type OntologyTier = "platform" | "pack" | "tenant";
2
- type OntologyStatus = "draft" | "active" | "deprecated" | "archived";
3
- type OntologyVersionStatus = "draft" | "published" | "deprecated";
4
- export type OntologyEntitySubtype = {
5
- value: string;
6
- label: string;
7
- description?: string;
8
- };
9
- export type OntologyEntityType = {
10
- value: string;
11
- label: string;
12
- description?: string;
13
- schema?: unknown;
14
- subtypes?: OntologyEntitySubtype[];
15
- };
16
- export type OntologyEdgeType = {
17
- value: string;
18
- label: string;
19
- description?: string;
20
- sourceTypes?: string[];
21
- targetTypes?: string[];
22
- constraintSeverity?: "warn" | "info";
23
- };
24
- export type OntologyPublishedVersion = {
25
- id: string;
26
- version: string;
27
- status: OntologyVersionStatus;
28
- entityTypes: OntologyEntityType[];
29
- edgeTypes: OntologyEdgeType[];
30
- releaseNotes?: string;
31
- publishedAt?: number;
32
- publishedBy?: string;
33
- };
34
- export type OntologyRecord = {
35
- id: string;
36
- ontologyId: string;
37
- ontologyKey: string;
38
- name: string;
39
- description?: string;
40
- tier?: OntologyTier;
41
- status?: OntologyStatus;
42
- tenantId?: string;
43
- parentOntologyId?: string;
44
- createdBy?: string;
45
- createdAt?: number;
46
- updatedAt?: number;
47
- publishedVersion: OntologyPublishedVersion | null;
48
- };
49
- export type OntologyListQuery = {
50
- tenantId?: string;
51
- tier?: OntologyTier | string;
52
- status?: OntologyStatus | string;
53
- };
54
- export type OntologyListResult = {
55
- ontologies: OntologyRecord[];
56
- total: number;
57
- };
58
- export type GetOntologyInput = {
59
- id?: string;
60
- ontologyKey?: string;
61
- tenantId?: string;
62
- };
63
- export type BindOntologyInput = {
64
- ontologyId: string;
65
- topicId: string;
66
- };
67
- export type OntologyBindingResult = {
68
- applied: true;
69
- source: "direct";
70
- ontologyId: string;
71
- ontologyKey: string;
72
- ontologyName: string;
73
- topicId: string;
74
- topicName?: string;
75
- updatedAt?: number;
76
- };
77
- export type OntologyTypeMatch = {
78
- entityType: string;
79
- label: string;
80
- score: number;
81
- reason: string;
82
- };
83
- export type OntologyMatchInput = {
84
- text: string;
85
- topicId?: string;
86
- ontologyId?: string;
87
- minScore?: number;
88
- limit?: number;
89
- };
90
- export type OntologyMatchResult = {
91
- text: string;
92
- matchCount: number;
93
- matches: OntologyTypeMatch[];
94
- ontologyId?: string;
95
- message?: string;
96
- };
97
- export type OntologiesPort = {
98
- fetchOntology: (rawId: string) => Promise<unknown | null>;
99
- fetchOntologyByKey?: (ontologyKey: string, tenantId?: string) => Promise<unknown | null>;
100
- listOntologies: (query: {
101
- tenantId?: string;
102
- tier?: OntologyTier;
103
- status?: OntologyStatus;
104
- }) => Promise<unknown[]>;
105
- fetchPublishedVersion: (ontologyRawId: string) => Promise<unknown | null>;
106
- bindOntologyToTopic: (args: {
107
- ontologyRawId: string;
108
- topicRawId: string;
109
- }) => Promise<unknown>;
110
- fetchTopic: (topicRawId: string) => Promise<unknown | null>;
111
- resolveMatchVocabulary: (input: {
112
- ontologyRawId?: string;
113
- topicRawId?: string;
114
- }) => Promise<{
115
- ontologyRawId?: string;
116
- entityTypes: OntologyEntityType[];
117
- } | null>;
118
- };
119
- export declare function listOntologies(deps: OntologiesPort, query?: OntologyListQuery): Promise<OntologyListResult>;
120
- export declare function getOntology(deps: OntologiesPort, input: GetOntologyInput): Promise<OntologyRecord>;
121
- export declare function bindOntology(deps: OntologiesPort, input: BindOntologyInput): Promise<OntologyBindingResult>;
122
- export declare function matchOntology(deps: OntologiesPort, input: OntologyMatchInput): Promise<OntologyMatchResult>;
123
- export {};
@@ -1 +0,0 @@
1
- export * from "./questions";
@@ -1,147 +0,0 @@
1
- type QuestionStatus = "open" | "researching" | "answered" | "parked" | "closed";
2
- type QuestionPriority = "low" | "medium" | "high" | "urgent";
3
- type AnswerConfidence = "weak" | "medium" | "strong";
4
- export type QuestionRecord = {
5
- id: string;
6
- nodeId: string;
7
- questionId: string;
8
- globalId?: string;
9
- topicId?: string;
10
- text: string;
11
- status: QuestionStatus;
12
- priority: QuestionPriority;
13
- category?: string;
14
- linkedBeliefId?: string;
15
- linkedWorktreeId?: string;
16
- answer?: string;
17
- createdAt?: number;
18
- updatedAt?: number;
19
- metadata?: Record<string, unknown>;
20
- };
21
- export type QuestionListResult = {
22
- questions: QuestionRecord[];
23
- nextCursor: null;
24
- };
25
- export type QuestionAnswerResult = {
26
- questionId: string;
27
- answerId: string;
28
- status: "answered";
29
- };
30
- export type QuestionArchiveResult = QuestionRecord & {
31
- previousStatus: string;
32
- newStatus: "archived";
33
- };
34
- export type CreateQuestionInput = {
35
- topicId: string;
36
- text: string;
37
- priority?: string;
38
- linkedBeliefId?: string;
39
- metadata?: Record<string, unknown>;
40
- };
41
- export type ListQuestionsQuery = {
42
- topicId?: string;
43
- status?: string;
44
- priority?: string;
45
- worktreeId?: string;
46
- limit?: number;
47
- cursor?: string;
48
- };
49
- type QuestionCreatePortInput = {
50
- topicId: string;
51
- text: string;
52
- priority?: QuestionPriority;
53
- linkedBeliefRawId?: string;
54
- metadata?: Record<string, unknown>;
55
- };
56
- type QuestionRefinePortInput = {
57
- questionRawId: string;
58
- text: string;
59
- rationale?: string;
60
- };
61
- type QuestionStatusPortInput = {
62
- questionRawId: string;
63
- status: QuestionStatus;
64
- rationale?: string;
65
- };
66
- type QuestionAnswerPortInput = {
67
- questionRawId: string;
68
- topicId: string;
69
- text: string;
70
- confidence?: AnswerConfidence;
71
- evidenceRawIds?: string[];
72
- rationale?: string;
73
- };
74
- export type QuestionsPort = {
75
- fetchQuestion: (rawId: string) => Promise<unknown | null>;
76
- listQuestionsByTopic: (args: {
77
- topicId: string;
78
- limit?: number;
79
- }) => Promise<unknown[]>;
80
- createQuestion: (input: QuestionCreatePortInput) => Promise<unknown>;
81
- refineQuestion: (input: QuestionRefinePortInput) => Promise<unknown>;
82
- updateQuestionStatus: (input: QuestionStatusPortInput) => Promise<unknown>;
83
- createAnswer: (input: QuestionAnswerPortInput) => Promise<unknown>;
84
- };
85
- export declare function createQuestion(deps: QuestionsPort, input: CreateQuestionInput): Promise<QuestionRecord>;
86
- export declare function getQuestion(deps: QuestionsPort, input: {
87
- id: string;
88
- }): Promise<QuestionRecord>;
89
- export declare function listQuestions(deps: QuestionsPort, query: ListQuestionsQuery): Promise<QuestionListResult>;
90
- export declare function refineQuestion(deps: QuestionsPort, input: {
91
- id: string;
92
- text: string;
93
- rationale?: string;
94
- }): Promise<{
95
- previousText: string;
96
- updatedText: string;
97
- id: string;
98
- nodeId: string;
99
- questionId: string;
100
- globalId?: string;
101
- topicId?: string;
102
- text: string;
103
- status: QuestionStatus;
104
- priority: QuestionPriority;
105
- category?: string;
106
- linkedBeliefId?: string;
107
- linkedWorktreeId?: string;
108
- answer?: string;
109
- createdAt?: number;
110
- updatedAt?: number;
111
- metadata?: Record<string, unknown>;
112
- }>;
113
- export declare function updateQuestionStatus(deps: QuestionsPort, input: {
114
- id: string;
115
- status: string;
116
- rationale?: string;
117
- }): Promise<{
118
- previousStatus: QuestionStatus;
119
- newStatus: QuestionStatus;
120
- id: string;
121
- nodeId: string;
122
- questionId: string;
123
- globalId?: string;
124
- topicId?: string;
125
- text: string;
126
- status: QuestionStatus;
127
- priority: QuestionPriority;
128
- category?: string;
129
- linkedBeliefId?: string;
130
- linkedWorktreeId?: string;
131
- answer?: string;
132
- createdAt?: number;
133
- updatedAt?: number;
134
- metadata?: Record<string, unknown>;
135
- }>;
136
- export declare function archiveQuestion(deps: QuestionsPort, input: {
137
- id: string;
138
- rationale?: string;
139
- }): Promise<QuestionArchiveResult>;
140
- export declare function answerQuestion(deps: QuestionsPort, input: {
141
- id: string;
142
- text: string;
143
- confidence?: string;
144
- evidenceIds?: string[];
145
- rationale?: string;
146
- }): Promise<QuestionAnswerResult>;
147
- export {};
@@ -1,97 +0,0 @@
1
- type SearchResourceType = "belief" | "evidence" | "question";
2
- type SearchBeliefRecord = {
3
- beliefId?: string;
4
- nodeId?: string;
5
- globalId?: string;
6
- text?: string;
7
- canonicalText?: string;
8
- confidence?: number | null;
9
- status?: string;
10
- };
11
- type SearchEvidenceRecord = {
12
- evidenceId?: string;
13
- nodeId?: string;
14
- globalId?: string;
15
- text?: string;
16
- source?: string;
17
- kind?: string;
18
- relevanceScore?: number;
19
- };
20
- type SearchQuestionRecord = {
21
- questionId?: string;
22
- nodeId?: string;
23
- globalId?: string;
24
- text?: string;
25
- status?: string;
26
- priority?: string;
27
- linkedBeliefId?: string;
28
- };
29
- export type SearchInput = {
30
- q: string;
31
- topicId: string;
32
- types?: SearchResourceType[];
33
- status?: string;
34
- minConfidence?: number;
35
- limit?: number;
36
- cursor?: string;
37
- };
38
- export type SearchBeliefHit = {
39
- type: "belief";
40
- beliefId: string;
41
- nodeId: string;
42
- globalId?: string;
43
- text: string;
44
- confidence: number | null;
45
- status?: string;
46
- relevanceScore: number;
47
- };
48
- export type SearchEvidenceHit = {
49
- type: "evidence";
50
- evidenceId: string;
51
- nodeId: string;
52
- globalId?: string;
53
- text: string;
54
- source?: string;
55
- kind?: string;
56
- relevanceScore: number;
57
- };
58
- export type SearchQuestionHit = {
59
- type: "question";
60
- questionId: string;
61
- nodeId: string;
62
- globalId?: string;
63
- text: string;
64
- status?: string;
65
- priority?: string;
66
- linkedBeliefId?: string;
67
- relevanceScore: number;
68
- };
69
- export type SearchResult = SearchBeliefHit | SearchEvidenceHit | SearchQuestionHit;
70
- export type SearchResponse = {
71
- q: string;
72
- topicId: string;
73
- types: SearchResourceType[];
74
- results: SearchResult[];
75
- beliefs: SearchBeliefHit[];
76
- evidence: SearchEvidenceHit[];
77
- questions: SearchQuestionHit[];
78
- };
79
- export type SearchPort = {
80
- listBeliefs: (input: {
81
- topicId: string;
82
- status?: string;
83
- minConfidence?: number;
84
- limit?: number;
85
- }) => Promise<SearchBeliefRecord[]>;
86
- searchEvidence: (input: {
87
- q: string;
88
- topicId: string;
89
- limit?: number;
90
- }) => Promise<SearchEvidenceRecord[]>;
91
- listQuestions: (input: {
92
- topicId: string;
93
- limit?: number;
94
- }) => Promise<SearchQuestionRecord[]>;
95
- };
96
- export declare function searchResources(deps: SearchPort, input: SearchInput): Promise<SearchResponse>;
97
- export {};
@@ -1 +0,0 @@
1
- export * from "./tasks";
@@ -1,102 +0,0 @@
1
- type TaskStatus = "todo" | "in_progress" | "blocked" | "done";
2
- type TaskPriority = "low" | "medium" | "high" | "urgent";
3
- type TaskType = "research" | "interview" | "analysis" | "data_collection" | "general";
4
- export type TaskRecord = {
5
- id: string;
6
- taskId: string;
7
- topicId?: string;
8
- title: string;
9
- description?: string;
10
- status: TaskStatus;
11
- priority: TaskPriority;
12
- taskType: TaskType;
13
- linkedBeliefId?: string;
14
- linkedQuestionId?: string;
15
- linkedWorktreeId?: string;
16
- outputSummary?: string;
17
- createdAt?: number;
18
- updatedAt?: number;
19
- completedAt?: number;
20
- metadata?: Record<string, unknown>;
21
- };
22
- export type TaskListResult = {
23
- tasks: TaskRecord[];
24
- count: number;
25
- };
26
- export type CreateTaskInput = {
27
- topicId: string;
28
- title: string;
29
- description?: string;
30
- taskType?: string;
31
- priority?: string;
32
- linkedBeliefId?: string;
33
- linkedQuestionId?: string;
34
- linkedWorktreeId?: string;
35
- metadata?: Record<string, unknown>;
36
- };
37
- export type UpdateTaskInput = {
38
- id: string;
39
- title?: string;
40
- description?: string;
41
- priority?: string;
42
- status?: string;
43
- linkedBeliefId?: string;
44
- linkedQuestionId?: string;
45
- linkedWorktreeId?: string;
46
- metadata?: Record<string, unknown>;
47
- };
48
- export type CompleteTaskInput = {
49
- id: string;
50
- outputSummary?: string;
51
- };
52
- export type ListTasksQuery = {
53
- topicId?: string;
54
- worktreeId?: string;
55
- status?: string;
56
- limit?: number;
57
- };
58
- type TaskCreatePortInput = {
59
- topicId: string;
60
- title: string;
61
- description?: string;
62
- taskType: TaskType;
63
- priority: TaskPriority;
64
- linkedBeliefId?: string;
65
- linkedQuestionId?: string;
66
- linkedWorktreeId?: string;
67
- metadata?: Record<string, unknown>;
68
- };
69
- type TaskUpdatePortInput = {
70
- taskRawId: string;
71
- title?: string;
72
- description?: string;
73
- priority?: TaskPriority;
74
- status?: TaskStatus;
75
- linkedBeliefId?: string;
76
- linkedQuestionId?: string;
77
- linkedWorktreeId?: string;
78
- metadata?: Record<string, unknown>;
79
- };
80
- type TaskCompletePortInput = {
81
- taskRawId: string;
82
- outputSummary?: string;
83
- };
84
- export type TasksPort = {
85
- fetchTask: (rawId: string) => Promise<unknown | null>;
86
- listTasksByTopic: (args: {
87
- topicId: string;
88
- status?: TaskStatus;
89
- limit?: number;
90
- }) => Promise<unknown[]>;
91
- listTasksByWorktree: (args: {
92
- worktreeId: string;
93
- }) => Promise<unknown[]>;
94
- createTask: (input: TaskCreatePortInput) => Promise<unknown>;
95
- updateTask: (input: TaskUpdatePortInput) => Promise<unknown>;
96
- completeTask: (input: TaskCompletePortInput) => Promise<unknown>;
97
- };
98
- export declare function createTask(deps: TasksPort, input: CreateTaskInput): Promise<TaskRecord>;
99
- export declare function updateTask(deps: TasksPort, input: UpdateTaskInput): Promise<TaskRecord>;
100
- export declare function completeTask(deps: TasksPort, input: CompleteTaskInput): Promise<TaskRecord>;
101
- export declare function listTasks(deps: TasksPort, query: ListTasksQuery): Promise<TaskListResult>;
102
- export {};
@@ -1 +0,0 @@
1
- export * from "./topics";