@lucern/sdk 1.0.29 → 1.0.30

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 (191) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/accessControl.d.ts +31 -31
  3. package/dist/accessControl.js +1 -0
  4. package/dist/adminClient.d.ts +74 -74
  5. package/dist/adminClient.js +38 -30
  6. package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
  7. package/dist/{answersClient.js → answers-client.js} +2 -2
  8. package/dist/audience/index.d.ts +12 -12
  9. package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
  10. package/dist/audiences-client.js +107 -0
  11. package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
  12. package/dist/{auditClient.js → audit-client.js} +8 -7
  13. package/dist/authContext.d.ts +26 -26
  14. package/dist/authDeviceClient.d.ts +11 -11
  15. package/dist/authDeviceClient.js +4 -6
  16. package/dist/beliefs/index.d.ts +56 -28
  17. package/dist/beliefs/index.js +2 -1
  18. package/dist/beliefsClient.d.ts +71 -63
  19. package/dist/beliefsClient.js +90 -67
  20. package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
  21. package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
  22. package/dist/client-assembly-types.d.ts +219 -0
  23. package/dist/client-assembly-types.js +2 -0
  24. package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
  25. package/dist/client-config.js +2 -0
  26. package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
  27. package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
  28. package/dist/client.d.ts +1906 -352
  29. package/dist/client.js +34 -30
  30. package/dist/clientGraphNamespaces.d.ts +35 -25
  31. package/dist/clientGraphNamespaces.js +11 -5
  32. package/dist/clientHelpers.js +8 -5
  33. package/dist/clientKnowledgeNamespaces.d.ts +124 -84
  34. package/dist/clientKnowledgeNamespaces.js +35 -34
  35. package/dist/clientLocalHelpers.d.ts +81 -52
  36. package/dist/clientLocalHelpers.js +193 -43
  37. package/dist/clientPlatformNamespaces.d.ts +1541 -150
  38. package/dist/clientPlatformNamespaces.js +10 -5
  39. package/dist/clientRuntime.d.ts +1 -1
  40. package/dist/clientRuntime.js +1 -1
  41. package/dist/clientWorkflowNamespaces.d.ts +211 -97
  42. package/dist/clientWorkflowNamespaces.js +22 -19
  43. package/dist/contextClient.d.ts +2 -2
  44. package/dist/contextClient.js +79 -50
  45. package/dist/contextFacade.d.ts +1 -1
  46. package/dist/contextFacade.js +2 -0
  47. package/dist/contextPackCompiler.d.ts +52 -52
  48. package/dist/contextPackCompiler.js +192 -122
  49. package/dist/contextPackPolicy.d.ts +22 -22
  50. package/dist/contextPackPolicy.js +21 -9
  51. package/dist/contextPackSchema.d.ts +3 -3
  52. package/dist/contextPackSchema.js +1 -0
  53. package/dist/contextTypes.d.ts +155 -155
  54. package/dist/contracts/api-enums.contract.js +2 -11
  55. package/dist/contracts/auth-session.contract.d.ts +16 -16
  56. package/dist/contracts/auth-session.contract.js +3 -2
  57. package/dist/contracts/context-pack.contract.d.ts +216 -216
  58. package/dist/contracts/contextPack.js +2 -0
  59. package/dist/contracts/index.d.ts +1 -1
  60. package/dist/contracts/index.js +2 -1
  61. package/dist/contracts/lens-filter.contract.d.ts +8 -8
  62. package/dist/contracts/lens-filter.contract.js +10 -10
  63. package/dist/contracts/lens-workflow.contract.d.ts +32 -32
  64. package/dist/contracts/lens-workflow.contract.js +2 -1
  65. package/dist/contracts/lensFilter.js +2 -0
  66. package/dist/contracts/lensWorkflow.js +2 -0
  67. package/dist/contracts/mcpTools.d.ts +19 -19
  68. package/dist/contracts/mcpTools.js +3 -1
  69. package/dist/contracts/prompt.contract.d.ts +12 -12
  70. package/dist/contracts/prompt.js +1 -0
  71. package/dist/contracts/sdk-tools.contract.js +1 -0
  72. package/dist/contracts/sdkTools.js +2 -0
  73. package/dist/contracts/tool-contracts.js +1 -0
  74. package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
  75. package/dist/contracts/workflow-runtime.contract.js +1 -5
  76. package/dist/contracts/workflowRuntime.js +2 -0
  77. package/dist/contradictions/index.d.ts +8 -8
  78. package/dist/contradictions/index.js +1 -0
  79. package/dist/control-plane.d.ts +10 -10
  80. package/dist/control-plane.js +2 -2
  81. package/dist/controlObjectOwnership.d.ts +11 -11
  82. package/dist/controlObjectOwnership.js +1 -0
  83. package/dist/coreClient.d.ts +51 -51
  84. package/dist/coreClient.js +269 -101
  85. package/dist/customTools.d.ts +19 -19
  86. package/dist/customTools.js +4 -2
  87. package/dist/decisions/index.d.ts +18 -18
  88. package/dist/decisions/index.js +1 -0
  89. package/dist/decisionsClient.d.ts +4 -4
  90. package/dist/decisionsClient.js +36 -27
  91. package/dist/edges/index.d.ts +20 -18
  92. package/dist/edges/index.js +1 -0
  93. package/dist/embeddingsClient.d.ts +29 -29
  94. package/dist/embeddingsClient.js +15 -8
  95. package/dist/eventingClient.d.ts +27 -27
  96. package/dist/eventingClient.js +10 -5
  97. package/dist/events.d.ts +83 -83
  98. package/dist/events.js +19 -15
  99. package/dist/eventsCore.d.ts +7 -7
  100. package/dist/eventsCore.js +11 -10
  101. package/dist/evidence/index.d.ts +23 -21
  102. package/dist/evidence/index.js +1 -0
  103. package/dist/evidenceClient.d.ts +23 -23
  104. package/dist/evidenceClient.js +10 -6
  105. package/dist/facade/context.d.ts +9 -9
  106. package/dist/facade/context.js +67 -41
  107. package/dist/functionSurface.js +2 -0
  108. package/dist/functionSurfaceClient.js +2 -0
  109. package/dist/gatewayFacades.d.ts +215 -215
  110. package/dist/gatewayFacades.factories.d.ts +23 -44
  111. package/dist/gatewayFacades.factories.js +63 -62
  112. package/dist/gatewayFacades.js +31 -32
  113. package/dist/graphAnalysisClient.d.ts +60 -60
  114. package/dist/graphAnalysisClient.js +19 -18
  115. package/dist/graphClient.d.ts +34 -34
  116. package/dist/graphClient.js +56 -35
  117. package/dist/graphIntel.js +2 -0
  118. package/dist/graphIntelligence.d.ts +2 -2
  119. package/dist/graphIntelligence.js +1 -1
  120. package/dist/graphRecommendationsClient.d.ts +24 -24
  121. package/dist/graphRecommendationsClient.js +12 -7
  122. package/dist/graphStateClassifierClient.d.ts +13 -13
  123. package/dist/graphStateClassifierClient.js +10 -5
  124. package/dist/harnessClient.d.ts +61 -61
  125. package/dist/harnessClient.js +44 -31
  126. package/dist/identityClient.d.ts +33 -59
  127. package/dist/identityClient.js +126 -98
  128. package/dist/index.d.ts +20 -20
  129. package/dist/index.js +20 -19
  130. package/dist/infisicalRuntime.d.ts +11 -11
  131. package/dist/infisicalRuntime.js +20 -14
  132. package/dist/jobsClient.d.ts +28 -28
  133. package/dist/jobsClient.js +6 -3
  134. package/dist/learningClient.js +13 -8
  135. package/dist/lenses/index.d.ts +124 -28
  136. package/dist/lenses/index.js +1 -0
  137. package/dist/mcpClient.d.ts +1 -1
  138. package/dist/mcpClient.js +3 -3
  139. package/dist/modelRuntimeClient.d.ts +27 -27
  140. package/dist/modelRuntimeClient.js +10 -5
  141. package/dist/nodes/index.d.ts +9 -9
  142. package/dist/nodes/index.js +1 -0
  143. package/dist/ontologies/index.d.ts +68 -22
  144. package/dist/ontologies/index.js +1 -0
  145. package/dist/ontologyClient.js +24 -17
  146. package/dist/ontologyLinksClient.d.ts +35 -35
  147. package/dist/ontologyLinksClient.js +9 -6
  148. package/dist/opinion.d.ts +3 -3
  149. package/dist/opinion.js +12 -5
  150. package/dist/orgGraphSearchClient.d.ts +39 -39
  151. package/dist/orgGraphSearchClient.js +22 -13
  152. package/dist/packsClient.d.ts +1 -1
  153. package/dist/packsClient.js +28 -19
  154. package/dist/policyClient.d.ts +79 -68
  155. package/dist/policyClient.js +18 -12
  156. package/dist/proof-attestation.json +1 -1
  157. package/dist/questions/index.d.ts +38 -27
  158. package/dist/questions/index.js +1 -0
  159. package/dist/realtime/index.d.ts +3 -3
  160. package/dist/realtime/index.js +1 -0
  161. package/dist/realtime/refs.d.ts +2 -2
  162. package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
  163. package/dist/{reportsClient.js → reports-client.js} +19 -13
  164. package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
  165. package/dist/{schemaClient.js → schema-client.js} +14 -11
  166. package/dist/sdkSurface.d.ts +12 -12
  167. package/dist/sdkSurface.js +14 -10
  168. package/dist/secrets.d.ts +1 -1
  169. package/dist/secrets.js +2 -1
  170. package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
  171. package/dist/{sourcesClient.js → sources-client.js} +4 -5
  172. package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
  173. package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
  174. package/dist/toolRegistryClient.d.ts +46 -46
  175. package/dist/toolRegistryClient.js +22 -11
  176. package/dist/topics/index.d.ts +23 -23
  177. package/dist/topics/index.js +2 -1
  178. package/dist/topicsClient.d.ts +6 -6
  179. package/dist/topicsClient.js +29 -18
  180. package/dist/types.d.ts +356 -355
  181. package/dist/version.d.ts +1 -1
  182. package/dist/version.js +1 -1
  183. package/dist/workflowClient.d.ts +36 -35
  184. package/dist/workflowClient.js +88 -60
  185. package/dist/worktrees/index.d.ts +118 -32
  186. package/dist/worktrees/index.js +2 -1
  187. package/package.json +45 -5
  188. package/dist/audiencesClient.js +0 -115
  189. package/dist/clientAssemblyTypes.d.ts +0 -33
  190. package/dist/clientAssemblyTypes.js +0 -2
  191. package/dist/clientConfig.js +0 -2
@@ -1,6 +1,6 @@
1
- import { createGatewayRequestClient, LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
1
+ // biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
2
+ import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
2
3
  import { createListResult, mapGatewayData } from "./sdkSurface.js";
3
- export { LucernApiError };
4
4
  function asTopicArray(data) {
5
5
  if (Array.isArray(data)) {
6
6
  return data.filter((row) => Boolean(row) && typeof row === "object");
@@ -54,15 +54,17 @@ export function createPolicyClient(config = {}) {
54
54
  /**
55
55
  * List policy decisions in the current scope.
56
56
  */
57
- async listDecisions(query = {}) {
58
- return gateway.request({
57
+ listDecisions(query = {}) {
58
+ return gateway
59
+ .request({
59
60
  path: `/api/platform/v1/policy/decisions${toQueryString(query)}`,
60
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "decisions")));
61
+ })
62
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "decisions")));
61
63
  },
62
64
  /**
63
65
  * Create a permission grant.
64
66
  */
65
- async grant(input, idempotencyKey) {
67
+ grant(input, idempotencyKey) {
66
68
  return gateway.request({
67
69
  path: "/api/platform/v1/policy/grant",
68
70
  method: "POST",
@@ -73,7 +75,7 @@ export function createPolicyClient(config = {}) {
73
75
  /**
74
76
  * Delete a permission grant by revoking it.
75
77
  */
76
- async revoke(input, idempotencyKey) {
78
+ revoke(input, idempotencyKey) {
77
79
  return gateway.request({
78
80
  path: "/api/platform/v1/policy/revoke",
79
81
  method: "POST",
@@ -111,7 +113,9 @@ export function createPolicyClient(config = {}) {
111
113
  return {
112
114
  ...response,
113
115
  data: {
114
- id: typeof response.data?.id === "string" ? response.data.id : undefined,
116
+ id: typeof response.data?.id === "string"
117
+ ? response.data.id
118
+ : undefined,
115
119
  created: response.data?.created === true,
116
120
  policy: asWritePolicyRecord(response.data?.policy),
117
121
  },
@@ -130,7 +134,9 @@ export function createPolicyClient(config = {}) {
130
134
  return {
131
135
  ...response,
132
136
  data: {
133
- id: typeof response.data?.id === "string" ? response.data.id : undefined,
137
+ id: typeof response.data?.id === "string"
138
+ ? response.data.id
139
+ : undefined,
134
140
  updated: response.data?.updated === true,
135
141
  policy: asWritePolicyRecord(response.data?.policy),
136
142
  },
@@ -139,7 +145,7 @@ export function createPolicyClient(config = {}) {
139
145
  /**
140
146
  * Delete a write policy rule by identifier.
141
147
  */
142
- async deleteWritePolicy(id, scope = {}, idempotencyKey) {
148
+ deleteWritePolicy(id, scope = {}, idempotencyKey) {
143
149
  return gateway.request({
144
150
  path: `/api/platform/v1/policy/write-policies/${encodeURIComponent(id)}${toQueryString(scope)}`,
145
151
  method: "DELETE",
@@ -197,7 +203,7 @@ export function createPolicyClient(config = {}) {
197
203
  /**
198
204
  * Delete a tenant role policy by identifier.
199
205
  */
200
- async deleteRolePolicy(id, scope = {}, idempotencyKey) {
206
+ deleteRolePolicy(id, scope = {}, idempotencyKey) {
201
207
  return gateway.request({
202
208
  path: `/api/platform/v1/policy/roles/${encodeURIComponent(id)}${toQueryString(scope)}`,
203
209
  method: "DELETE",
@@ -207,7 +213,7 @@ export function createPolicyClient(config = {}) {
207
213
  /**
208
214
  * Check a permission decision for a topic or project scope.
209
215
  */
210
- async checkPermission(query) {
216
+ checkPermission(query) {
211
217
  if (!query.topicId) {
212
218
  throw new Error("topicId is required");
213
219
  }
@@ -41,5 +41,5 @@
41
41
  "convex-validators",
42
42
  "proof-attestation"
43
43
  ],
44
- "signedAt": 1781580937826
44
+ "signedAt": 1782180415278
45
45
  }
@@ -10,8 +10,8 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
10
10
  priority?: string;
11
11
  linkedBeliefId?: string;
12
12
  metadata?: import("..").JsonObject;
13
- }) => any;
14
- getQuestion: (questionId: string) => any;
13
+ }) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
14
+ getQuestion: (questionId: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
15
15
  listQuestions: (args: {
16
16
  topicId?: string;
17
17
  status?: string;
@@ -19,30 +19,34 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
19
19
  worktreeId?: string;
20
20
  limit?: number;
21
21
  cursor?: string;
22
- }) => any;
22
+ }) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").QuestionsListResult>>;
23
23
  answerQuestion: (questionId: string, input: {
24
24
  text: string;
25
25
  confidence?: string;
26
26
  evidenceIds?: string[];
27
27
  rationale?: string;
28
- }) => any;
28
+ }) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
29
29
  refineQuestion: (questionId: string, input: string | {
30
30
  text?: string;
31
31
  question?: string;
32
32
  rationale?: string;
33
33
  linkedWorktreeId?: string;
34
- }, refinementReason?: string) => any;
35
- updateQuestionStatus: (questionId: string, status: string, rationale?: string) => any;
36
- archiveQuestion: (questionId: string, reason?: string) => any;
34
+ }, refinementReason?: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
35
+ updateQuestionStatus: (questionId: string, status: string, rationale?: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
36
+ archiveQuestion: (questionId: string, reason?: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
37
37
  getHighPriorityQuestions: (args: {
38
38
  topicId?: string;
39
39
  limit?: number;
40
40
  includeAnswered?: boolean;
41
- }) => any;
41
+ }) => Promise<{
42
+ questions: ({
43
+ priority?: string;
44
+ } & Record<string, unknown>)[];
45
+ }>;
42
46
  findMissingQuestions: (args: {
43
47
  topicId?: string;
44
48
  minConfidence?: number;
45
- }) => Promise<any>;
49
+ }) => Promise<import("../client-config").GatewayDataEnvelope<Record<string, unknown>>>;
46
50
  raw: {
47
51
  create(args: {
48
52
  text: string;
@@ -50,14 +54,14 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
50
54
  priority?: string;
51
55
  linkedBeliefId?: string;
52
56
  metadata?: import("..").JsonObject;
53
- }): any;
54
- get(questionId: string): any;
57
+ }): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
58
+ get(questionId: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
55
59
  refine(questionId: string, input: string | {
56
60
  text?: string;
57
61
  question?: string;
58
62
  rationale?: string;
59
63
  linkedWorktreeId?: string;
60
- }, refinementReason?: string): any;
64
+ }, refinementReason?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
61
65
  list(args: {
62
66
  topicId?: string;
63
67
  status?: string;
@@ -65,39 +69,46 @@ export declare function createQuestionsClient(config?: QuestionsClientConfig): {
65
69
  worktreeId?: string;
66
70
  limit?: number;
67
71
  cursor?: string;
68
- }): any;
69
- updateStatus(questionId: string, status: string, rationale?: string): any;
70
- batchCreate(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
71
- add(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
72
- updatePriority(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
73
- advanceToConviction(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
74
- updateConviction(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
75
- finalizeConviction(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
76
- update(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
77
- delete(input: Parameters<(...args: any[]) => any>[0], idempotencyKey?: string): any;
72
+ }): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").QuestionsListResult>>;
73
+ updateStatus(questionId: string, status: string, rationale?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
74
+ batchCreate(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
75
+ add(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
76
+ updatePriority(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
77
+ advanceToConviction(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
78
+ updateConviction(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
79
+ finalizeConviction(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
80
+ update(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
81
+ delete(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
78
82
  answer(questionId: string, input: {
79
83
  text: string;
80
84
  confidence?: string;
81
85
  evidenceIds?: string[];
82
86
  rationale?: string;
83
- }): any;
84
- archive(questionId: string, reason?: string): any;
87
+ }): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
88
+ archive(questionId: string, reason?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
85
89
  linkEvidence(args: {
86
90
  evidenceId: string;
87
91
  questionId: string;
88
92
  relevance?: number;
89
93
  weight?: number;
90
94
  rationale?: string;
91
- }): any;
95
+ }): Promise<{
96
+ questionId: string;
97
+ relevance: number | undefined;
98
+ }>;
92
99
  getHighPriority(args: {
93
100
  topicId?: string;
94
101
  limit?: number;
95
102
  includeAnswered?: boolean;
96
- }): any;
103
+ }): Promise<{
104
+ questions: ({
105
+ priority?: string;
106
+ } & Record<string, unknown>)[];
107
+ }>;
97
108
  findMissing(args: {
98
109
  topicId?: string;
99
110
  minConfidence?: number;
100
- }): Promise<any>;
111
+ }): Promise<import("../client-config").GatewayDataEnvelope<Record<string, unknown>>>;
101
112
  };
102
113
  };
103
114
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
+ // biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
1
2
  import { createLucernClient } from "../client.js";
2
3
  export * as questionsContracts from "@lucern/contracts/questions/v1";
3
4
  export * as toolSchemas from "@lucern/contracts/tool-contracts";
@@ -1,13 +1,14 @@
1
1
  import { ConvexHttpClient } from "convex/browser";
2
- import type { ConvexReactClientOptions as LucernConvexReactClientOptions } from "convex/react";
2
+ import type { ConvexReactClientOptions } from "convex/react";
3
3
  import { ConvexReactClient, useAction, useConvex, useMutation, useQuery } from "convex/react";
4
+ export type LucernConvexReactClientOptions = ConvexReactClientOptions;
4
5
  /**
5
6
  * Re-export the server-safe ref surface so existing client consumers keep a
6
7
  * single import site. Server code must import from `@lucern/sdk/realtime/refs`
7
8
  * instead, because this module statically pulls in `convex/react` which is
8
9
  * incompatible with the Next.js Edge runtime React shim.
9
10
  */
10
- export { platformApi, type AnyApi } from "./refs";
11
+ export { type AnyApi, platformApi } from "./refs";
11
12
  /**
12
13
  * Opt-in realtime hook surface. These preserve native Convex semantics while
13
14
  * moving the transport boundary behind an SDK subpath export.
@@ -29,5 +30,4 @@ export declare function createLucernRealtimeClient(address: string, options?: Lu
29
30
  * does not import `convex/browser` directly.
30
31
  */
31
32
  export declare function createLucernHttpClient(address: string): LucernHttpClient;
32
- export type { LucernConvexReactClientOptions };
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
+ // biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
1
2
  import { ConvexHttpClient } from "convex/browser";
2
3
  import { ConvexReactClient, useAction, useConvex, useMutation, useQuery, } from "convex/react";
3
4
  /**
@@ -1,4 +1,4 @@
1
- import { type AnyApi } from "convex/server";
1
+ import type { AnyApi } from "convex/server";
2
2
  /**
3
3
  * Server-safe realtime ref surface.
4
4
  *
@@ -10,5 +10,5 @@ import { type AnyApi } from "convex/server";
10
10
  * Client consumers should continue importing from `@lucern/sdk/realtime`.
11
11
  */
12
12
  export declare const platformApi: AnyApi;
13
- export type { AnyApi };
13
+ export type { AnyApi } from "convex/server";
14
14
  //# sourceMappingURL=refs.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type GatewayClientConfig } from "./coreClient";
2
- import type { TopicIdentifierInput, ReportTemplatesResponse, ReportWithSectionsResponse } from "./types";
2
+ import type { ReportTemplatesResponse, ReportWithSectionsResponse, TopicIdentifierInput } from "./types";
3
3
  /** Configuration for the reports client. */
4
4
  export type ReportsClientConfig = GatewayClientConfig;
5
5
  export type { ProjectReportsResponse, ReportTemplatesResponse, ReportWithSectionsResponse, } from "./types";
@@ -32,4 +32,4 @@ export declare function createReportsClient(config?: ReportsClientConfig): {
32
32
  */
33
33
  getReport: (reportId: string) => Promise<import("./coreClient").PlatformGatewaySuccess<ReportWithSectionsResponse>>;
34
34
  };
35
- //# sourceMappingURL=reportsClient.d.ts.map
35
+ //# sourceMappingURL=reports-client.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { createGatewayRequestClient, toQueryString, } from "./coreClient.js";
2
- import { asListItems, createListResult, mapGatewayData, resolveTopicId } from "./sdkSurface.js";
2
+ import { asListItems, createListResult, mapGatewayData, resolveTopicId, } from "./sdkSurface.js";
3
3
  /**
4
4
  * Create the reports client for report templates and generated reports.
5
5
  * @param config - Gateway transport configuration.
@@ -7,30 +7,36 @@ import { asListItems, createListResult, mapGatewayData, resolveTopicId } from ".
7
7
  */
8
8
  export function createReportsClient(config = {}) {
9
9
  const gateway = createGatewayRequestClient(config);
10
- const listTemplates = async (args = {}) => gateway.request({
10
+ const listTemplates = (args = {}) => gateway
11
+ .request({
11
12
  path: `/api/platform/v1/reports/templates${toQueryString({
12
13
  slug: args.slug,
13
14
  })}`,
14
- }).then((response) => mapGatewayData(response, (data) => {
15
+ })
16
+ .then((response) => mapGatewayData(response, (data) => {
15
17
  const rows = asListItems(data, "templates");
16
18
  return createListResult(rows, "templates");
17
19
  }));
18
- const listReports = async (input, args = {}) => {
20
+ const serializeSummary = (value) => {
21
+ if (typeof value !== "boolean") {
22
+ return;
23
+ }
24
+ return value ? "true" : "false";
25
+ };
26
+ const listReports = (input, args = {}) => {
19
27
  const topicId = resolveTopicId(input);
20
28
  if (!topicId) {
21
29
  throw new Error("topicId is required");
22
30
  }
23
- return gateway.request({
31
+ return gateway
32
+ .request({
24
33
  path: `/api/platform/v1/reports/topics/${encodeURIComponent(topicId)}${toQueryString({
25
- summary: typeof args.summary === "boolean"
26
- ? args.summary
27
- ? "true"
28
- : "false"
29
- : undefined,
34
+ summary: serializeSummary(args.summary),
30
35
  })}`,
31
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "reports")));
36
+ })
37
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "reports")));
32
38
  };
33
- const getReport = async (reportId) => gateway.request({
39
+ const getReport = (reportId) => gateway.request({
34
40
  path: `/api/platform/v1/reports/${encodeURIComponent(reportId)}`,
35
41
  });
36
42
  return {
@@ -52,4 +58,4 @@ export function createReportsClient(config = {}) {
52
58
  getReport,
53
59
  };
54
60
  }
55
- //# sourceMappingURL=reportsClient.js.map
61
+ //# sourceMappingURL=reports-client.js.map
@@ -1,6 +1,5 @@
1
- import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
1
+ import { type GatewayClientConfig, type GatewayScope } from "./coreClient";
2
2
  import type { JsonObject } from "./types";
3
- export { LucernApiError };
4
3
  export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
5
4
  /** Configuration for the schema client. */
6
5
  export type SchemaClientConfig = GatewayClientConfig;
@@ -57,4 +56,4 @@ export declare function createSchemaClient(config?: SchemaClientConfig): {
57
56
  */
58
57
  upsertEntitlement: (input: SchemaEntitlementInput, idempotencyKey?: string) => Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
59
58
  };
60
- //# sourceMappingURL=schemaClient.d.ts.map
59
+ //# sourceMappingURL=schema-client.d.ts.map
@@ -1,6 +1,5 @@
1
- import { createGatewayRequestClient, LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
1
+ import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
2
2
  import { createListResult, mapGatewayData } from "./sdkSurface.js";
3
- export { LucernApiError };
4
3
  /**
5
4
  * Create the schema client for pack catalog and entitlement operations.
6
5
  * @param config - Gateway transport configuration.
@@ -18,15 +17,17 @@ export function createSchemaClient(config = {}) {
18
17
  /**
19
18
  * List schema packs.
20
19
  */
21
- async listPacks(scope = {}) {
22
- return gateway.request({
20
+ listPacks(scope = {}) {
21
+ return gateway
22
+ .request({
23
23
  path: `/api/platform/v1/schema/packs${toQueryString(scope)}`,
24
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "packs")));
24
+ })
25
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "packs")));
25
26
  },
26
27
  /**
27
28
  * Install a schema pack.
28
29
  */
29
- async installPack(input, idempotencyKey) {
30
+ installPack(input, idempotencyKey) {
30
31
  return gateway.request({
31
32
  path: "/api/platform/v1/schema/packs",
32
33
  method: "POST",
@@ -37,7 +38,7 @@ export function createSchemaClient(config = {}) {
37
38
  /**
38
39
  * Get a schema pack by identifier.
39
40
  */
40
- async getPack(packId, scope = {}) {
41
+ getPack(packId, scope = {}) {
41
42
  return gateway.request({
42
43
  path: `/api/platform/v1/schema/packs/${encodeURIComponent(packId)}${toQueryString(scope)}`,
43
44
  });
@@ -45,10 +46,12 @@ export function createSchemaClient(config = {}) {
45
46
  /**
46
47
  * List schema entitlements.
47
48
  */
48
- async listEntitlements(scope = {}) {
49
- return gateway.request({
49
+ listEntitlements(scope = {}) {
50
+ return gateway
51
+ .request({
50
52
  path: `/api/platform/v1/schema/entitlements${toQueryString(scope)}`,
51
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "entitlements")));
53
+ })
54
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "entitlements")));
52
55
  },
53
56
  /**
54
57
  * Create a schema entitlement.
@@ -64,4 +67,4 @@ export function createSchemaClient(config = {}) {
64
67
  upsertEntitlement: createEntitlement,
65
68
  };
66
69
  }
67
- //# sourceMappingURL=schemaClient.js.map
70
+ //# sourceMappingURL=schema-client.js.map
@@ -1,13 +1,13 @@
1
1
  import type { PlatformGatewaySuccess } from "./coreClient";
2
2
  import type { JsonObject, ListResult } from "./types";
3
- type TopicScopedValue = {
4
- topicId?: string;
3
+ interface TopicScopedValue {
5
4
  topicGlobalId?: string;
6
- };
7
- type TextScopedValue = {
8
- text?: string;
5
+ topicId?: string;
6
+ }
7
+ interface TextScopedValue {
9
8
  canonicalText?: string;
10
- };
9
+ text?: string;
10
+ }
11
11
  type AnyRecord = Record<string, unknown>;
12
12
  export declare function isRecord(value: unknown): value is AnyRecord;
13
13
  export declare function asRecord(value: unknown): AnyRecord;
@@ -23,24 +23,24 @@ export declare function resolveText(value: TextScopedValue): string | undefined;
23
23
  /**
24
24
  * Attach the topicId to a record.
25
25
  */
26
- export declare function withTopicAlias<T extends AnyRecord>(value: T): T;
26
+ export declare function withTopicAlias<T extends object>(value: T): T;
27
27
  /**
28
28
  * Attach the text/canonicalText alias pair to a record.
29
29
  */
30
- export declare function withTextAlias<T extends AnyRecord>(value: T): T;
30
+ export declare function withTextAlias<T extends object>(value: T): T;
31
31
  /**
32
32
  * Attach topic and text aliases to SDK node-like records.
33
33
  */
34
- export declare function withSdkAliases<T extends AnyRecord>(value: T): T;
34
+ export declare function withSdkAliases<T extends object>(value: T): T;
35
35
  /**
36
36
  * Normalize a belief/question/evidence write payload to the canonical gateway shape.
37
37
  */
38
- export declare function normalizeNodeWriteInput<T extends JsonObject>(value: T): T;
38
+ export declare function normalizeNodeWriteInput<T extends object>(value: T): JsonObject;
39
39
  export declare const normalizeNodeVerificationStatus: typeof normalizeVerificationStatus;
40
40
  /**
41
41
  * Build a topic-aware query object.
42
42
  */
43
- export declare function normalizeTopicQuery<T extends JsonObject>(value: T): T;
43
+ export declare function normalizeTopicQuery<T extends object>(value: T): JsonObject;
44
44
  /**
45
45
  * Extract list items from array or list-envelope payloads.
46
46
  */
@@ -56,6 +56,6 @@ export declare function mapGatewayData<T, U>(response: PlatformGatewaySuccess<T>
56
56
  /**
57
57
  * Apply SDK aliases across all items in a list-like payload.
58
58
  */
59
- export declare function mapAliasedList<TItem extends AnyRecord, LegacyKey extends string>(data: unknown, legacyKey?: LegacyKey): ListResult<TItem, LegacyKey>;
59
+ export declare function mapAliasedList<TItem extends object, LegacyKey extends string>(data: unknown, legacyKey?: LegacyKey): ListResult<TItem, LegacyKey>;
60
60
  export {};
61
61
  //# sourceMappingURL=sdkSurface.d.ts.map
@@ -12,7 +12,7 @@ function cleanString(value) {
12
12
  function normalizeVerificationStatus(value) {
13
13
  const status = cleanString(value);
14
14
  if (!status) {
15
- return undefined;
15
+ return;
16
16
  }
17
17
  if (status === "verified") {
18
18
  return "human_verified";
@@ -41,7 +41,8 @@ export function resolveText(value) {
41
41
  * Attach the topicId to a record.
42
42
  */
43
43
  export function withTopicAlias(value) {
44
- const topicId = cleanString(value.topicId) ?? undefined;
44
+ const record = value;
45
+ const topicId = cleanString(record.topicId) ?? undefined;
45
46
  if (!topicId) {
46
47
  return value;
47
48
  }
@@ -51,7 +52,8 @@ export function withTopicAlias(value) {
51
52
  * Attach the text/canonicalText alias pair to a record.
52
53
  */
53
54
  export function withTextAlias(value) {
54
- const text = cleanString(value.text) ?? cleanString(value.canonicalText) ?? undefined;
55
+ const record = value;
56
+ const text = cleanString(record.text) ?? cleanString(record.canonicalText) ?? undefined;
55
57
  if (!text) {
56
58
  return value;
57
59
  }
@@ -67,10 +69,11 @@ export function withSdkAliases(value) {
67
69
  * Normalize a belief/question/evidence write payload to the canonical gateway shape.
68
70
  */
69
71
  export function normalizeNodeWriteInput(value) {
70
- const topicId = resolveTopicId(value);
71
- const text = resolveText(value);
72
- const verificationStatus = normalizeVerificationStatus(value.verificationStatus);
73
- const next = { ...value };
72
+ const record = value;
73
+ const topicId = resolveTopicId(record);
74
+ const text = resolveText(record);
75
+ const verificationStatus = normalizeVerificationStatus(record.verificationStatus);
76
+ const next = { ...record };
74
77
  if (topicId) {
75
78
  next.topicId = topicId;
76
79
  if (!cleanString(next.topicGlobalId)) {
@@ -91,11 +94,12 @@ export const normalizeNodeVerificationStatus = normalizeVerificationStatus;
91
94
  * Build a topic-aware query object.
92
95
  */
93
96
  export function normalizeTopicQuery(value) {
94
- const topicId = cleanString(value.topicId);
97
+ const record = value;
98
+ const topicId = cleanString(record.topicId);
95
99
  if (!topicId) {
96
- return value;
100
+ return { ...record };
97
101
  }
98
- return { ...value, topicId };
102
+ return { ...record, topicId };
99
103
  }
100
104
  /**
101
105
  * Extract list items from array or list-envelope payloads.
package/dist/secrets.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { SecretResolverError, type SecretResolverErrorCode, type SecretResolverFetch, type BrokeredSecretLeaseRef, type BrokeredSecretRequest, type BrokeredSecretResolverOptions, type BrokeredSecretResolverResult, type SecretBootstrapOptions, type SecretBrokerClient, type SecretResolverOptions, type SecretResolverResult, type McProxyBindingRef, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, } from "@lucern/secrets";
1
+ export { type BrokeredSecretLeaseRef, type BrokeredSecretRequest, type BrokeredSecretResolverOptions, type BrokeredSecretResolverResult, type McProxyBindingRef, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, type SecretBootstrapOptions, type SecretBrokerClient, SecretResolverError, type SecretResolverErrorCode, type SecretResolverFetch, type SecretResolverOptions, type SecretResolverResult, } from "@lucern/secrets";
2
2
  //# sourceMappingURL=secrets.d.ts.map
package/dist/secrets.js CHANGED
@@ -1,2 +1,3 @@
1
- export { SecretResolverError, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, } from "@lucern/secrets";
1
+ // biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
2
+ export { requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, SecretResolverError, } from "@lucern/secrets";
2
3
  //# sourceMappingURL=secrets.js.map
@@ -1,20 +1,19 @@
1
- import { type GatewayClientConfig, LucernApiError } from "./coreClient";
1
+ import { type GatewayClientConfig } from "./coreClient";
2
2
  import type { JsonObject } from "./types";
3
- export { LucernApiError };
4
3
  export type { PlatformGatewaySuccess } from "./coreClient";
5
4
  export type { GetSourceResponse, UpsertSourceResponse } from "./types";
6
5
  export type SourcesClientConfig = GatewayClientConfig;
7
- export type UpsertSourceSpec = {
8
- url?: string;
9
- sha?: string;
6
+ export interface UpsertSourceSpec {
7
+ capturedAt?: number;
10
8
  kind: string;
9
+ metadata?: JsonObject;
10
+ sha?: string;
11
11
  title?: string;
12
- capturedAt?: number;
13
12
  topicId?: string;
14
- metadata?: JsonObject;
15
- };
13
+ url?: string;
14
+ }
16
15
  export declare function createSourcesClient(config?: SourcesClientConfig): {
17
16
  upsert(spec: UpsertSourceSpec, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").PlatformSourceRecord>>;
18
17
  get(sourceId: string): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").PlatformSourceRecord>>;
19
18
  };
20
- //# sourceMappingURL=sourcesClient.d.ts.map
19
+ //# sourceMappingURL=sources-client.d.ts.map
@@ -1,9 +1,8 @@
1
- import { createGatewayRequestClient, LucernApiError, randomIdempotencyKey, } from "./coreClient.js";
2
- export { LucernApiError };
1
+ import { createGatewayRequestClient, randomIdempotencyKey, } from "./coreClient.js";
3
2
  export function createSourcesClient(config = {}) {
4
3
  const gateway = createGatewayRequestClient(config);
5
4
  return {
6
- async upsert(spec, idempotencyKey = randomIdempotencyKey()) {
5
+ upsert(spec, idempotencyKey = randomIdempotencyKey()) {
7
6
  return gateway.request({
8
7
  path: "/api/platform/v1/sources/upsert",
9
8
  method: "POST",
@@ -11,11 +10,11 @@ export function createSourcesClient(config = {}) {
11
10
  idempotencyKey,
12
11
  });
13
12
  },
14
- async get(sourceId) {
13
+ get(sourceId) {
15
14
  return gateway.request({
16
15
  path: `/api/platform/v1/sources/${encodeURIComponent(sourceId)}`,
17
16
  });
18
17
  },
19
18
  };
20
19
  }
21
- //# sourceMappingURL=sourcesClient.js.map
20
+ //# sourceMappingURL=sources-client.js.map