@lucern/sdk 1.0.29 → 1.0.31

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 +12 -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
package/dist/index.d.ts CHANGED
@@ -6,24 +6,19 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- export { opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, } from "./opinion";
10
- export type { Opinion } from "./opinion";
11
- export * from "./adminClient";
9
+ export { type AxiomTelemetryExporterConfig, createAxiomTelemetryExporter, createCompositeTelemetryExporter, createHttpTelemetryExporter, createMemoryTelemetryExporter, createTelemetryExporterFromEnv, DEFAULT_AXIOM_API_URL, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_TRACES_DATASET, emitTelemetrySignal, type LucernTelemetryEnvironment, type LucernTelemetryExporter, type LucernTelemetryExportPayload, type LucernTelemetrySignal, type ResolvedAxiomTelemetryConfig, renderTelemetryPayload, resolveAxiomTelemetryConfig, sanitizeTelemetrySignal, type TelemetryExportResult, } from "@lucern/transport-core";
12
10
  export * from "./accessControl";
13
- export * from "./answersClient";
14
- export * from "./audiencesClient";
15
- export * from "./auditClient";
11
+ export * from "./adminClient";
12
+ export * from "./answers-client";
13
+ export * from "./audiences-client";
14
+ export * from "./audit-client";
16
15
  export * from "./authContext";
17
16
  export * from "./authDeviceClient";
18
17
  export * from "./beliefsClient";
19
18
  export * from "./client";
19
+ export * from "./contextClient";
20
20
  export * from "./contextFacade";
21
21
  export * from "./contextPackCompiler";
22
- export * from "./controlObjectOwnership";
23
- export * from "./coreClient";
24
- export { DEFAULT_AXIOM_API_URL, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_TRACES_DATASET, createAxiomTelemetryExporter, createCompositeTelemetryExporter, createHttpTelemetryExporter, createMemoryTelemetryExporter, createTelemetryExporterFromEnv, emitTelemetrySignal, renderTelemetryPayload, resolveAxiomTelemetryConfig, sanitizeTelemetrySignal, type AxiomTelemetryExporterConfig, type LucernTelemetryEnvironment, type LucernTelemetryExportPayload, type LucernTelemetryExporter, type LucernTelemetrySignal, type ResolvedAxiomTelemetryConfig, type TelemetryExportResult, } from "@lucern/transport-core";
25
- export * from "./contextClient";
26
- export * from "./control-plane";
27
22
  export * from "./contracts/api-enums.contract";
28
23
  export * from "./contracts/auth-session.contract";
29
24
  export { MAX_ENTITY_LIMIT } from "./contracts/contextPack";
@@ -32,14 +27,18 @@ export * from "./contracts/lensWorkflow";
32
27
  export * from "./contracts/mcpTools";
33
28
  export * from "./contracts/prompt";
34
29
  export * from "./contracts/workflowRuntime";
35
- export * from "./domainContext";
30
+ export * from "./control-plane";
31
+ export * from "./controlObjectOwnership";
32
+ export * from "./coreClient";
36
33
  export * from "./customTools";
37
34
  export * from "./decisionsClient";
35
+ export * from "./domainContext";
38
36
  export * from "./embeddingsClient";
39
- export * from "./evidenceClient";
40
37
  export * from "./eventingClient";
41
38
  export * from "./events";
42
39
  export * from "./eventsCore";
40
+ export * from "./evidenceClient";
41
+ export * from "./generated/functionSurface";
43
42
  export * from "./graphAnalysisClient";
44
43
  export * from "./graphClient";
45
44
  export * from "./graphIntel";
@@ -51,22 +50,23 @@ export * from "./identityClient";
51
50
  export * from "./infisicalRuntime";
52
51
  export * from "./jobsClient";
53
52
  export * from "./learningClient";
54
- export * from "./secrets";
55
- export * from "./generated/functionSurface";
56
53
  export * from "./modelRuntimeClient";
57
54
  export * from "./ontologyClient";
58
55
  export * from "./ontologyLinksClient";
56
+ export type { Opinion } from "./opinion";
57
+ export { opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, } from "./opinion";
59
58
  export * from "./orgGraphSearchClient";
60
59
  export * from "./packRuntime";
61
60
  export * from "./packsClient";
62
61
  export * from "./policyClient";
63
- export * from "./reportsClient";
64
- export * from "./schemaClient";
62
+ export * from "./reports-client";
63
+ export * from "./schema-client";
65
64
  export * from "./sdkSurface";
66
- export * from "./sourcesClient";
67
- export * from "./telemetryClient";
68
- export * from "./topicsClient";
65
+ export * from "./secrets";
66
+ export * from "./sources-client";
67
+ export * from "./telemetry-client";
69
68
  export * from "./toolRegistryClient";
69
+ export * from "./topicsClient";
70
70
  export * from "./types";
71
71
  export * from "./version";
72
72
  export * from "./workflowClient";
package/dist/index.js CHANGED
@@ -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
  /**
2
3
  * @lucern/sdk — The reasoning operating system for AI-native applications.
3
4
  *
@@ -6,24 +7,20 @@
6
7
  *
7
8
  * @packageDocumentation
8
9
  */
9
- export { opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, } from "./opinion.js";
10
- export * from "./adminClient.js";
10
+ export { createAxiomTelemetryExporter, createCompositeTelemetryExporter, createHttpTelemetryExporter, createMemoryTelemetryExporter, createTelemetryExporterFromEnv, DEFAULT_AXIOM_API_URL, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_TRACES_DATASET, emitTelemetrySignal, renderTelemetryPayload, resolveAxiomTelemetryConfig, sanitizeTelemetrySignal, } from "@lucern/transport-core";
11
11
  export * from "./accessControl.js";
12
- export * from "./answersClient.js";
13
- export * from "./audiencesClient.js";
14
- export * from "./auditClient.js";
12
+ export * from "./adminClient.js";
13
+ export * from "./answers-client.js";
14
+ export * from "./audiences-client.js";
15
+ export * from "./audit-client.js";
15
16
  export * from "./authContext.js";
16
17
  export * from "./authDeviceClient.js";
17
18
  // createBeliefsClient exposes beliefs.getOpinionHistory() and the deprecated getConfidenceHistory() alias.
18
19
  export * from "./beliefsClient.js";
19
20
  export * from "./client.js";
21
+ export * from "./contextClient.js";
20
22
  export * from "./contextFacade.js";
21
23
  export * from "./contextPackCompiler.js";
22
- export * from "./controlObjectOwnership.js";
23
- export * from "./coreClient.js";
24
- export { DEFAULT_AXIOM_API_URL, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_TRACES_DATASET, createAxiomTelemetryExporter, createCompositeTelemetryExporter, createHttpTelemetryExporter, createMemoryTelemetryExporter, createTelemetryExporterFromEnv, emitTelemetrySignal, renderTelemetryPayload, resolveAxiomTelemetryConfig, sanitizeTelemetrySignal, } from "@lucern/transport-core";
25
- export * from "./contextClient.js";
26
- export * from "./control-plane.js";
27
24
  export * from "./contracts/api-enums.contract.js";
28
25
  export * from "./contracts/auth-session.contract.js";
29
26
  export { MAX_ENTITY_LIMIT } from "./contracts/contextPack.js";
@@ -32,14 +29,18 @@ export * from "./contracts/lensWorkflow.js";
32
29
  export * from "./contracts/mcpTools.js";
33
30
  export * from "./contracts/prompt.js";
34
31
  export * from "./contracts/workflowRuntime.js";
35
- export * from "./domainContext.js";
32
+ export * from "./control-plane.js";
33
+ export * from "./controlObjectOwnership.js";
34
+ export * from "./coreClient.js";
36
35
  export * from "./customTools.js";
37
36
  export * from "./decisionsClient.js";
37
+ export * from "./domainContext.js";
38
38
  export * from "./embeddingsClient.js";
39
- export * from "./evidenceClient.js";
40
39
  export * from "./eventingClient.js";
41
40
  export * from "./events.js";
42
41
  export * from "./eventsCore.js";
42
+ export * from "./evidenceClient.js";
43
+ export * from "./generated/functionSurface.js";
43
44
  export * from "./graphAnalysisClient.js";
44
45
  export * from "./graphClient.js";
45
46
  export * from "./graphIntel.js";
@@ -51,22 +52,22 @@ export * from "./identityClient.js";
51
52
  export * from "./infisicalRuntime.js";
52
53
  export * from "./jobsClient.js";
53
54
  export * from "./learningClient.js";
54
- export * from "./secrets.js";
55
- export * from "./generated/functionSurface.js";
56
55
  export * from "./modelRuntimeClient.js";
57
56
  export * from "./ontologyClient.js";
58
57
  export * from "./ontologyLinksClient.js";
58
+ export { opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, } from "./opinion.js";
59
59
  export * from "./orgGraphSearchClient.js";
60
60
  export * from "./packRuntime.js";
61
61
  export * from "./packsClient.js";
62
62
  export * from "./policyClient.js";
63
- export * from "./reportsClient.js";
64
- export * from "./schemaClient.js";
63
+ export * from "./reports-client.js";
64
+ export * from "./schema-client.js";
65
65
  export * from "./sdkSurface.js";
66
- export * from "./sourcesClient.js";
67
- export * from "./telemetryClient.js";
68
- export * from "./topicsClient.js";
66
+ export * from "./secrets.js";
67
+ export * from "./sources-client.js";
68
+ export * from "./telemetry-client.js";
69
69
  export * from "./toolRegistryClient.js";
70
+ export * from "./topicsClient.js";
70
71
  export * from "./types.js";
71
72
  export * from "./version.js";
72
73
  export * from "./workflowClient.js";
@@ -1,28 +1,28 @@
1
1
  import { type InfisicalRuntimeEnvironment, type InfisicalRuntimeSurfaceId } from "@lucern/contracts";
2
2
  export type InfisicalRuntimeEnv = Record<string, string | undefined>;
3
3
  export type InfisicalRuntimeFetch = (input: string | URL, init?: RequestInit) => Promise<Response>;
4
- export type InfisicalRuntimeBootstrapConfig = {
4
+ export interface InfisicalRuntimeBootstrapConfig {
5
5
  apiUrl: string;
6
- projectId: string;
7
6
  clientId: string;
8
7
  clientSecret: string;
9
8
  environment: InfisicalRuntimeEnvironment;
10
9
  organizationSlug?: string;
11
- };
12
- export type InfisicalRuntimeHydrateOptions = {
13
- surfaceId: InfisicalRuntimeSurfaceId;
10
+ projectId: string;
11
+ }
12
+ export interface InfisicalRuntimeHydrateOptions {
13
+ bootstrap?: Partial<InfisicalRuntimeBootstrapConfig>;
14
14
  env?: InfisicalRuntimeEnv;
15
15
  fetchImpl?: InfisicalRuntimeFetch;
16
- bootstrap?: Partial<InfisicalRuntimeBootstrapConfig>;
17
16
  includeGeneratedSurfaceVariables?: boolean;
18
- };
19
- export type InfisicalRuntimeHydrationResult = {
20
- status: "disabled" | "hydrated";
21
17
  surfaceId: InfisicalRuntimeSurfaceId;
18
+ }
19
+ export interface InfisicalRuntimeHydrationResult {
22
20
  environment?: InfisicalRuntimeEnvironment;
23
- values: Record<string, string>;
24
21
  sourcePaths: string[];
25
- };
22
+ status: "disabled" | "hydrated";
23
+ surfaceId: InfisicalRuntimeSurfaceId;
24
+ values: Record<string, string>;
25
+ }
26
26
  export declare class InfisicalRuntimeError extends Error {
27
27
  readonly code: string;
28
28
  readonly status?: number;
@@ -1,4 +1,6 @@
1
- import { INFISICAL_RUNTIME_DEFAULT_API_URL, INFISICAL_RUNTIME_DEFAULT_PROJECT_ID, INFISICAL_RUNTIME_MANIFEST, findInfisicalRuntimePath, findInfisicalRuntimeSurface, GENERATED_INFISICAL_RUNTIME_ENV, } from "@lucern/contracts";
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 { findInfisicalRuntimePath, findInfisicalRuntimeSurface, GENERATED_INFISICAL_RUNTIME_ENV, INFISICAL_RUNTIME_DEFAULT_API_URL, INFISICAL_RUNTIME_DEFAULT_PROJECT_ID, INFISICAL_RUNTIME_MANIFEST, } from "@lucern/contracts";
3
+ const TRAILING_SLASH_PATTERN = /\/+$/u;
2
4
  export class InfisicalRuntimeError extends Error {
3
5
  code;
4
6
  status;
@@ -20,7 +22,7 @@ export function readInfisicalRuntimeBootstrap(env = {}, overrides = {}) {
20
22
  if (!hasAuthSignal) {
21
23
  return null;
22
24
  }
23
- if (!clientId || !clientSecret) {
25
+ if (!(clientId && clientSecret)) {
24
26
  throw new InfisicalRuntimeError({
25
27
  code: "INFISICAL_BOOTSTRAP_INCOMPLETE",
26
28
  message: "Infisical runtime bootstrap requires both INFISICAL_CLIENT_ID and INFISICAL_CLIENT_SECRET.",
@@ -43,16 +45,20 @@ export function readInfisicalRuntimeBootstrap(env = {}, overrides = {}) {
43
45
  export function isInfisicalRuntimeDisabled(env = {}) {
44
46
  return INFISICAL_RUNTIME_MANIFEST.bootstrapEnv.disabled.some((name) => isTruthyEnv(env[name]));
45
47
  }
48
+ function normalizeRuntimeBootstrap(env, overrides) {
49
+ const baseBootstrap = readInfisicalRuntimeBootstrap(env, overrides);
50
+ if (!baseBootstrap) {
51
+ return null;
52
+ }
53
+ return {
54
+ ...baseBootstrap,
55
+ ...Object.fromEntries(Object.entries(overrides ?? {}).filter(([, value]) => value !== undefined)),
56
+ apiUrl: trimTrailingSlash(overrides?.apiUrl ?? baseBootstrap.apiUrl),
57
+ };
58
+ }
46
59
  export async function hydrateInfisicalRuntimeEnv(options) {
47
60
  const env = options.env ?? {};
48
- const baseBootstrap = readInfisicalRuntimeBootstrap(env, options.bootstrap);
49
- const bootstrap = baseBootstrap
50
- ? {
51
- ...baseBootstrap,
52
- ...Object.fromEntries(Object.entries(options.bootstrap ?? {}).filter(([, value]) => value !== undefined)),
53
- apiUrl: trimTrailingSlash(options.bootstrap?.apiUrl ?? baseBootstrap.apiUrl),
54
- }
55
- : null;
61
+ const bootstrap = normalizeRuntimeBootstrap(env, options.bootstrap);
56
62
  if (!bootstrap) {
57
63
  return {
58
64
  status: "disabled",
@@ -266,7 +272,7 @@ async function readJson(response) {
266
272
  }
267
273
  catch (error) {
268
274
  debugInfisicalRuntimeFallback("response.json", error);
269
- return undefined;
275
+ return;
270
276
  }
271
277
  }
272
278
  function isRecord(value) {
@@ -275,7 +281,7 @@ function isRecord(value) {
275
281
  function readNestedString(value, path) {
276
282
  let current = value;
277
283
  for (const key of path) {
278
- if (!isRecord(current) || !(key in current)) {
284
+ if (!(isRecord(current) && key in current)) {
279
285
  return null;
280
286
  }
281
287
  current = current[key];
@@ -300,13 +306,13 @@ function readFirst(env, names) {
300
306
  return value;
301
307
  }
302
308
  }
303
- return undefined;
309
+ return;
304
310
  }
305
311
  function isTruthyEnv(value) {
306
312
  return ["1", "true", "yes", "on"].includes(value?.toLowerCase() ?? "");
307
313
  }
308
314
  function trimTrailingSlash(value) {
309
- return value.replace(/\/+$/u, "");
315
+ return value.replace(TRAILING_SLASH_PATTERN, "");
310
316
  }
311
317
  function debugInfisicalRuntimeFallback(message, error) {
312
318
  const env = globalThis.process?.env;
@@ -3,47 +3,47 @@ import type { JsonObject, ListResult } from "./types";
3
3
  export type JobsClientConfig = GatewayClientConfig;
4
4
  export declare const JOBS_FIELDS: readonly ["tenantId", "workspaceId", "principalId", "topicId", "worktreeId", "jobId", "jobType", "payload", "status", "attempt", "runId", "queue", "priority", "error", "metadata", "limit", "cursor"];
5
5
  export type JobStatus = "queued" | "claimed" | "running" | "succeeded" | "failed" | "cancelled";
6
- export type JobRecord = {
6
+ export interface JobRecord {
7
+ attempt?: number;
8
+ createdAt?: number;
9
+ error?: string;
7
10
  jobId: string;
8
- tenantId: string;
9
- workspaceId?: string;
10
- principalId?: string;
11
- topicId?: string;
12
- worktreeId?: string;
13
11
  jobType: string;
12
+ metadata?: JsonObject | null;
14
13
  payload?: JsonObject | null;
15
- status: JobStatus | string;
16
- attempt?: number;
17
- runId?: string;
18
- queue?: string;
14
+ principalId?: string;
19
15
  priority?: string;
20
- error?: string;
21
- metadata?: JsonObject | null;
22
- createdAt?: number;
23
- updatedAt?: number;
24
- };
25
- export type JobRunRecord = {
26
- runId: string;
27
- jobId?: string;
16
+ queue?: string;
17
+ runId?: string;
18
+ status: JobStatus | string;
28
19
  tenantId: string;
20
+ topicId?: string;
21
+ updatedAt?: number;
29
22
  workspaceId?: string;
30
- status: JobStatus | string;
31
- startedAt?: number;
23
+ worktreeId?: string;
24
+ }
25
+ export interface JobRunRecord {
32
26
  finishedAt?: number;
27
+ jobId?: string;
33
28
  metadata?: JsonObject | null;
34
- };
35
- export type JobsScope = {
29
+ runId: string;
30
+ startedAt?: number;
31
+ status: JobStatus | string;
36
32
  tenantId: string;
37
33
  workspaceId?: string;
34
+ }
35
+ export interface JobsScope {
36
+ cursor?: string;
37
+ jobType?: string;
38
+ limit?: number;
38
39
  principalId?: string;
40
+ queue?: string;
41
+ status?: JobStatus;
42
+ tenantId: string;
39
43
  topicId?: string;
44
+ workspaceId?: string;
40
45
  worktreeId?: string;
41
- jobType?: string;
42
- status?: JobStatus;
43
- queue?: string;
44
- limit?: number;
45
- cursor?: string;
46
- };
46
+ }
47
47
  export type EnqueueJobInput = JobsScope & {
48
48
  jobType: string;
49
49
  payload?: JsonObject;
@@ -1,5 +1,6 @@
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 { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundary-client-surface.js";
1
3
  import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
2
- import { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundaryClientSurface.js";
3
4
  import { mapGatewayData } from "./sdkSurface.js";
4
5
  export const JOBS_FIELDS = [
5
6
  "tenantId",
@@ -51,9 +52,11 @@ export function createJobsClient(config = {}) {
51
52
  });
52
53
  },
53
54
  list(input) {
54
- return gateway.request({
55
+ return gateway
56
+ .request({
55
57
  path: `/api/platform/v1/jobs${toQueryString(query(input))}`,
56
- }).then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "jobs")));
58
+ })
59
+ .then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "jobs")));
57
60
  },
58
61
  claim(input, idempotencyKey) {
59
62
  cleanRequiredString(input.tenantId, "tenantId");
@@ -1,5 +1,12 @@
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.
1
2
  import { createGatewayRequestClient, toQueryString, } from "./coreClient.js";
2
- import { createListResult, mapGatewayData, normalizeTopicQuery } from "./sdkSurface.js";
3
+ import { createListResult, mapGatewayData, normalizeTopicQuery, } from "./sdkSurface.js";
4
+ function booleanQueryValue(value) {
5
+ if (typeof value !== "boolean") {
6
+ return;
7
+ }
8
+ return value ? "true" : "false";
9
+ }
3
10
  /**
4
11
  * Create the learning client for execution telemetry reads.
5
12
  * @param config - Gateway transport configuration.
@@ -7,21 +14,19 @@ import { createListResult, mapGatewayData, normalizeTopicQuery } from "./sdkSurf
7
14
  */
8
15
  export function createLearningClient(config = {}) {
9
16
  const gateway = createGatewayRequestClient(config);
10
- const listRecentExecutions = async (args = {}) => gateway.request({
17
+ const listRecentExecutions = async (args = {}) => gateway
18
+ .request({
11
19
  path: `/api/platform/v1/learning/executions/recent${toQueryString({
12
20
  ...normalizeTopicQuery(args),
13
21
  namespace: args.namespace,
14
22
  audienceMode: args.audienceMode,
15
- success: typeof args.success === "boolean"
16
- ? args.success
17
- ? "true"
18
- : "false"
19
- : undefined,
23
+ success: booleanQueryValue(args.success),
20
24
  limit: typeof args.limit === "number" && Number.isFinite(args.limit)
21
25
  ? String(args.limit)
22
26
  : undefined,
23
27
  })}`,
24
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "executions")));
28
+ })
29
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "executions")));
25
30
  const getExecutionStats = async (args = {}) => gateway.request({
26
31
  path: `/api/platform/v1/learning/executions/stats${toQueryString({
27
32
  ...normalizeTopicQuery(args),
@@ -5,40 +5,136 @@ export * as toolSchemas from "@lucern/contracts/tool-contracts";
5
5
  export type LensesClientConfig = LucernClientConfig;
6
6
  export type LensesClient = ReturnType<typeof createLensesClient>;
7
7
  export declare function createLensesClient(config?: LensesClientConfig): {
8
- createLens: (...args: any[]) => any;
9
- listLenses: (...args: any[]) => any;
10
- applyLensToTopic: (...args: any[]) => any;
11
- removeLensFromTopic: (...args: any[]) => any;
8
+ createLens: (input: {
9
+ name: string;
10
+ workspaceId?: string;
11
+ topicId?: string;
12
+ description?: string;
13
+ perspectiveType: import("..").WorkflowLensPerspectiveType;
14
+ promptTemplates?: import("..").LensPromptTemplateReference[];
15
+ workflowTemplates?: import("..").LensWorkflowTemplate[];
16
+ taskTemplates?: import("..").LensTaskTemplate[];
17
+ questionTemplates?: import("..").LensQuestionTemplate[];
18
+ filterCriteria?: import("..").JsonObject;
19
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensRecord>>;
20
+ listLenses: (query: {
21
+ workspaceId?: string;
22
+ topicId?: string;
23
+ status?: import("..").WorkflowLensStatus;
24
+ perspectiveType?: import("..").WorkflowLensPerspectiveType;
25
+ } & import("..").TopicIdentifierInput) => Promise<import("..").PlatformGatewaySuccess<import("..").ListResult<import("..").WorkflowLensRecord, "lenses">>>;
26
+ applyLensToTopic: (input: {
27
+ lensId: string;
28
+ topicId?: string;
29
+ metadata?: import("..").JsonObject;
30
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensBindingRecord>>;
31
+ removeLensFromTopic: (input: {
32
+ lensId: string;
33
+ topicId?: string;
34
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensBindingRecord>>;
12
35
  raw: {
13
- createBranch: (...args: any[]) => any;
14
- createLens: (...args: any[]) => any;
15
- listLenses: (...args: any[]) => any;
16
- applyLensToTopic: (...args: any[]) => any;
17
- removeLensFromTopic: (...args: any[]) => any;
18
- create(input: import("..").AddWorktreeInput): any;
19
- add(input: import("..").AddWorktreeInput): any;
20
- list(query: Parameters<(...args: any[]) => any>[0]): any;
21
- listByTopic(query: Parameters<(...args: any[]) => any>[0]): any;
36
+ createBranch: (input: {
37
+ name: string;
38
+ topicId?: string;
39
+ description?: string;
40
+ metadata?: import("..").JsonObject;
41
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowBranchRecord>>;
42
+ createLens: (input: {
43
+ name: string;
44
+ workspaceId?: string;
45
+ topicId?: string;
46
+ description?: string;
47
+ perspectiveType: import("..").WorkflowLensPerspectiveType;
48
+ promptTemplates?: import("..").LensPromptTemplateReference[];
49
+ workflowTemplates?: import("..").LensWorkflowTemplate[];
50
+ taskTemplates?: import("..").LensTaskTemplate[];
51
+ questionTemplates?: import("..").LensQuestionTemplate[];
52
+ filterCriteria?: import("..").JsonObject;
53
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensRecord>>;
54
+ listLenses: (query: {
55
+ workspaceId?: string;
56
+ topicId?: string;
57
+ status?: import("..").WorkflowLensStatus;
58
+ perspectiveType?: import("..").WorkflowLensPerspectiveType;
59
+ } & import("..").TopicIdentifierInput) => Promise<import("..").PlatformGatewaySuccess<import("..").ListResult<import("..").WorkflowLensRecord, "lenses">>>;
60
+ applyLensToTopic: (input: {
61
+ lensId: string;
62
+ topicId?: string;
63
+ metadata?: import("..").JsonObject;
64
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensBindingRecord>>;
65
+ removeLensFromTopic: (input: {
66
+ lensId: string;
67
+ topicId?: string;
68
+ } & import("..").TopicIdentifierInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowLensBindingRecord>>;
69
+ create(input: import("..").AddWorktreeInput): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
70
+ add(input: import("..").AddWorktreeInput): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
71
+ list(query: Parameters<(query: {
72
+ topicId?: string;
73
+ branchId?: string;
74
+ status?: import("..").WorkflowWorktreeStatus;
75
+ groupBy?: "campaign" | "lane" | "flat";
76
+ lane?: string;
77
+ campaign?: number;
78
+ limit?: number;
79
+ } & import("..").TopicIdentifierInput) => Promise<import("..").PlatformGatewaySuccess<import("..").ListResult<import("..").WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").WorktreesListResult>>;
80
+ listByTopic(query: Parameters<(query: {
81
+ topicId?: string;
82
+ branchId?: string;
83
+ status?: import("..").WorkflowWorktreeStatus;
84
+ groupBy?: "campaign" | "lane" | "flat";
85
+ lane?: string;
86
+ campaign?: number;
87
+ limit?: number;
88
+ } & import("..").TopicIdentifierInput) => Promise<import("..").PlatformGatewaySuccess<import("..").ListResult<import("..").WorkflowWorktreeRecord, "worktrees">>>>[0]): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").WorktreesListResult>>;
22
89
  findByPairedSprint(input: {
23
90
  sprintId: string;
24
91
  topicId?: string;
25
92
  projectId?: string;
26
93
  limit?: number;
27
- }): Promise<any>;
28
- activate(worktreeId: string): any;
29
- updateMetadata(input: import("..").FunctionSurfaceInput): any;
30
- update(input: import("..").FunctionSurfaceInput): any;
31
- updateTargets(input: Parameters<(...args: any[]) => any>[0]): any;
32
- listAll: (...args: any[]) => any;
33
- merge(worktreeId: string, input: import("..").MergeInput): any;
34
- push: (...args: any[]) => any;
35
- openPullRequest: (...args: any[]) => any;
36
- pipelineSnapshot(topicId: string): any;
37
- complete: (...args: any[]) => any;
38
- advancePhase(worktreeId: string, idempotencyKey?: string): any;
39
- setPhase(worktreeId: string, phase: string, idempotencyKey?: string): any;
40
- patchState: (...args: any[]) => any;
41
- bulkCreate: (...args: any[]) => any;
94
+ }): Promise<import("../client-config").GatewayDataEnvelope<Record<string, unknown>>>;
95
+ activate(worktreeId: string): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
96
+ updateMetadata(input: import("..").FunctionSurfaceInput): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
97
+ update(input: import("..").FunctionSurfaceInput): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
98
+ updateTargets(input: Parameters<(input: import("..").UpdateWorktreeTargetsInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").WorkflowWorktreeRecord>>>[0]): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
99
+ listAll: (query?: {
100
+ status?: import("..").WorkflowWorktreeStatus;
101
+ groupBy?: "campaign" | "lane" | "flat";
102
+ lane?: string;
103
+ campaign?: number;
104
+ limit?: number;
105
+ }) => Promise<import("..").PlatformGatewaySuccess<import("..").ListWorktreesResponse>>;
106
+ listCampaigns: (query?: {
107
+ topicId?: string;
108
+ status?: import("..").WorkflowWorktreeStatus;
109
+ limit?: number;
110
+ } & import("..").TopicIdentifierInput) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>>>;
111
+ merge(worktreeId: string, input: import("..").MergeInput): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
112
+ push: (worktreeId: string, input: {
113
+ targetContext: string;
114
+ beliefIds?: string[];
115
+ metadata?: import("..").JsonObject;
116
+ }, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").PushWorktreeResponse>>;
117
+ openPullRequest: (worktreeId: string, input: {
118
+ summary: string;
119
+ reviewers?: string[];
120
+ status?: "pending_review" | "changes_requested" | "approved" | "blocked";
121
+ }, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").OpenPullRequestResponse>>;
122
+ pipelineSnapshot(topicId: string): import("..").FunctionSurfaceResult<unknown>;
123
+ complete: (input: {
124
+ worktreeId: string;
125
+ keyFindings?: string[];
126
+ decisionsReached?: string[];
127
+ nextSteps?: string[];
128
+ }, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
129
+ advancePhase(worktreeId: string, idempotencyKey?: string): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
130
+ setPhase(worktreeId: string, phase: string, idempotencyKey?: string): Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
131
+ patchState: (input: {
132
+ worktreeId: string;
133
+ patch: import("../gatewayFacades").GatewayRecord;
134
+ }, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
135
+ bulkCreate: (input: {
136
+ worktrees: unknown[];
137
+ }, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>;
42
138
  };
43
139
  };
44
140
  //# 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 lensFilterContracts from "@lucern/contracts/lens-filter.contract";
3
4
  export * as lensWorkflowContracts from "@lucern/contracts/lens-workflow.contract";
@@ -1,4 +1,4 @@
1
- import type { McpGatewayBootstrapRequest, McpGatewayBootstrapResponse, McpGatewayBeginBuildSessionRequest, McpGatewayBeginBuildSessionResponse, McpGatewayContractEvaluationResponse, McpGatewayEvaluateEngineeringContractRequest, McpGatewayEvaluateResearchContractRequest, McpGatewayWritePolicyCheckRequest, McpGatewayWritePolicyCheckResponse } from "@lucern/contracts/mcp-gateway-boundary.contract";
1
+ import type { McpGatewayBeginBuildSessionRequest, McpGatewayBeginBuildSessionResponse, McpGatewayBootstrapRequest, McpGatewayBootstrapResponse, McpGatewayContractEvaluationResponse, McpGatewayEvaluateEngineeringContractRequest, McpGatewayEvaluateResearchContractRequest, McpGatewayWritePolicyCheckRequest, McpGatewayWritePolicyCheckResponse } from "@lucern/contracts/mcp-gateway-boundary.contract";
2
2
  import { type GatewayClientConfig, type GatewayScope, type PlatformGatewaySuccess } from "./coreClient";
3
3
  export type McpClientConfig = GatewayClientConfig;
4
4
  export type McpBootstrapSessionInput = GatewayScope & McpGatewayBootstrapRequest;
package/dist/mcpClient.js CHANGED
@@ -2,7 +2,7 @@ import { MCP_GATEWAY_BEGIN_BUILD_SESSION_ENDPOINT, MCP_GATEWAY_BOOTSTRAP_ENDPOIN
2
2
  import { createGatewayRequestClient, toQueryString, } from "./coreClient.js";
3
3
  function toJsonValue(value) {
4
4
  if (value === undefined) {
5
- return undefined;
5
+ return;
6
6
  }
7
7
  const seen = new WeakSet();
8
8
  const json = JSON.stringify(value, (_key, candidate) => {
@@ -12,7 +12,7 @@ function toJsonValue(value) {
12
12
  if (typeof candidate === "function" ||
13
13
  typeof candidate === "symbol" ||
14
14
  typeof candidate === "undefined") {
15
- return undefined;
15
+ return;
16
16
  }
17
17
  if (candidate && typeof candidate === "object") {
18
18
  if (seen.has(candidate)) {
@@ -23,7 +23,7 @@ function toJsonValue(value) {
23
23
  return candidate;
24
24
  });
25
25
  if (json === undefined) {
26
- return undefined;
26
+ return;
27
27
  }
28
28
  return JSON.parse(json);
29
29
  }