@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
@@ -4,23 +4,16 @@ export type OrgGraphSearchClientConfig = GatewayClientConfig;
4
4
  export declare const ORG_GRAPH_SEARCH_FIELDS: readonly ["tenantId", "workspaceId", "query", "nodeTypes", "minConfidence", "limit", "cursor", "provenanceScope"];
5
5
  export type OrgGraphProvenanceScope = "canonical" | "published" | "own_workspace" | "cross_workspace";
6
6
  export type OrgGraphVisibility = "private" | "workspace" | "tenant" | "public";
7
- export type OrgGraphSearchProvenance = {
7
+ export interface OrgGraphSearchProvenance {
8
+ metadata?: JsonObject | null;
9
+ publishedAt?: number;
10
+ publishedByPrincipalId?: string;
8
11
  scope?: OrgGraphProvenanceScope | string;
9
12
  source?: string;
10
13
  sourceNodeId?: string;
11
14
  sourceWorkspaceId?: string;
12
- publishedAt?: number;
13
- publishedByPrincipalId?: string;
14
- metadata?: JsonObject | null;
15
- };
16
- export type OrgGraphSearchResult = {
17
- nodeId: string;
18
- globalId?: string;
19
- topicId?: string;
20
- sourceWorkspaceId?: string;
21
- publishedAt?: number;
22
- publishedByPrincipalId?: string;
23
- visibility?: OrgGraphVisibility | string;
15
+ }
16
+ export interface OrgGraphSearchResult {
24
17
  confidence?: number | null;
25
18
  confidenceHistory?: Array<{
26
19
  confidence?: number;
@@ -28,46 +21,53 @@ export type OrgGraphSearchResult = {
28
21
  rationale?: string;
29
22
  trigger?: string;
30
23
  }>;
31
- provenance?: OrgGraphSearchProvenance;
24
+ globalId?: string;
25
+ metadata?: JsonObject | null;
26
+ nodeId: string;
32
27
  nodeType?: string;
28
+ provenance?: OrgGraphSearchProvenance;
29
+ publishedAt?: number;
30
+ publishedByPrincipalId?: string;
31
+ sourceWorkspaceId?: string;
33
32
  text?: string;
34
33
  title?: string;
35
- metadata?: JsonObject | null;
36
- };
37
- export type OrgGraphSearchInput = {
38
- tenantId: string;
39
- workspaceId: string;
40
- query: string;
41
- nodeTypes?: string[];
42
- minConfidence?: number;
43
- limit?: number;
34
+ topicId?: string;
35
+ visibility?: OrgGraphVisibility | string;
36
+ }
37
+ export interface OrgGraphSearchInput {
44
38
  cursor?: string;
39
+ limit?: number;
40
+ minConfidence?: number;
41
+ nodeTypes?: string[];
45
42
  provenanceScope?: OrgGraphProvenanceScope;
46
- };
47
- export type GetOrgGraphNodeInput = {
43
+ query: string;
48
44
  tenantId: string;
49
45
  workspaceId: string;
50
- nodeId?: string;
46
+ }
47
+ export interface GetOrgGraphNodeInput {
51
48
  globalId?: string;
52
- };
53
- export type ListOrgGraphByProvenanceInput = {
49
+ nodeId?: string;
54
50
  tenantId: string;
55
51
  workspaceId: string;
56
- provenanceScope: OrgGraphProvenanceScope;
57
- nodeTypes?: string[];
58
- minConfidence?: number;
59
- limit?: number;
52
+ }
53
+ export interface ListOrgGraphByProvenanceInput {
60
54
  cursor?: string;
61
- };
62
- export type ListPublishedFromWorkspaceInput = {
55
+ limit?: number;
56
+ minConfidence?: number;
57
+ nodeTypes?: string[];
58
+ provenanceScope: OrgGraphProvenanceScope;
63
59
  tenantId: string;
64
60
  workspaceId: string;
65
- sourceWorkspaceId?: string;
66
- nodeTypes?: string[];
67
- minConfidence?: number;
68
- limit?: number;
61
+ }
62
+ export interface ListPublishedFromWorkspaceInput {
69
63
  cursor?: string;
70
- };
64
+ limit?: number;
65
+ minConfidence?: number;
66
+ nodeTypes?: string[];
67
+ sourceWorkspaceId?: string;
68
+ tenantId: string;
69
+ workspaceId: string;
70
+ }
71
71
  export type OrgGraphSearchResponse = ListResult<OrgGraphSearchResult, "results">;
72
72
  export declare function createOrgGraphSearchClient(config?: OrgGraphSearchClientConfig): {
73
73
  search(input: OrgGraphSearchInput): Promise<import("./coreClient").PlatformGatewaySuccess<OrgGraphSearchResponse>>;
@@ -1,3 +1,4 @@
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
3
  import { createListResult, mapGatewayData } from "./sdkSurface.js";
3
4
  export const ORG_GRAPH_SEARCH_FIELDS = [
@@ -47,28 +48,32 @@ function listQuery(input) {
47
48
  cursor: input.cursor,
48
49
  };
49
50
  }
50
- function mapResults(data) {
51
+ function orgGraphSearchRows(data) {
51
52
  const record = data && typeof data === "object" ? data : {};
52
- return createListResult(Array.isArray(record.results)
53
- ? record.results
54
- : Array.isArray(data)
55
- ? data
56
- : [], "results");
53
+ if (Array.isArray(record.results)) {
54
+ return record.results;
55
+ }
56
+ return Array.isArray(data) ? data : [];
57
+ }
58
+ function mapResults(data) {
59
+ return createListResult(orgGraphSearchRows(data), "results");
57
60
  }
58
61
  export function createOrgGraphSearchClient(config = {}) {
59
62
  const gateway = createGatewayRequestClient(config);
60
63
  return {
61
64
  search(input) {
62
- return gateway.request({
65
+ return gateway
66
+ .request({
63
67
  path: "/api/platform/v1/org-graph-search/search",
64
68
  method: "POST",
65
69
  body: searchBody(input),
66
- }).then((response) => mapGatewayData(response, mapResults));
70
+ })
71
+ .then((response) => mapGatewayData(response, mapResults));
67
72
  },
68
73
  getNode(input) {
69
74
  const nodeId = input.nodeId?.trim();
70
75
  const globalId = input.globalId?.trim();
71
- if (!nodeId && !globalId) {
76
+ if (!(nodeId || globalId)) {
72
77
  throw new Error("nodeId or globalId is required");
73
78
  }
74
79
  const nodePath = encodeURIComponent(nodeId ?? globalId ?? "");
@@ -81,20 +86,24 @@ export function createOrgGraphSearchClient(config = {}) {
81
86
  });
82
87
  },
83
88
  listByProvenance(input) {
84
- return gateway.request({
89
+ return gateway
90
+ .request({
85
91
  path: `/api/platform/v1/org-graph-search/provenance${toQueryString({
86
92
  ...listQuery(input),
87
93
  provenanceScope: input.provenanceScope,
88
94
  })}`,
89
- }).then((response) => mapGatewayData(response, mapResults));
95
+ })
96
+ .then((response) => mapGatewayData(response, mapResults));
90
97
  },
91
98
  listPublishedFromWorkspace(input) {
92
- return gateway.request({
99
+ return gateway
100
+ .request({
93
101
  path: `/api/platform/v1/org-graph-search/published${toQueryString({
94
102
  ...listQuery(input),
95
103
  sourceWorkspaceId: input.sourceWorkspaceId,
96
104
  })}`,
97
- }).then((response) => mapGatewayData(response, mapResults));
105
+ })
106
+ .then((response) => mapGatewayData(response, mapResults));
98
107
  },
99
108
  };
100
109
  }
@@ -1,7 +1,7 @@
1
1
  import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
2
2
  import type { JsonObject } from "./types";
3
- export { LucernApiError };
4
3
  export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
4
+ export { LucernApiError };
5
5
  /** Configuration for the packs client. */
6
6
  export type PacksClientConfig = GatewayClientConfig;
7
7
  /** Input for installing a pack into a tenant or workspace scope. */
@@ -1,4 +1,7 @@
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,
3
+ // biome-ignore lint/style/noExportedImports: packsClient preserves this legacy compatibility re-export while package root also exports coreClient.
4
+ LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
2
5
  import { createListResult, mapGatewayData } from "./sdkSurface.js";
3
6
  export { LucernApiError };
4
7
  /**
@@ -12,15 +15,17 @@ export function createPacksClient(config = {}) {
12
15
  /**
13
16
  * List catalog entries for available packs.
14
17
  */
15
- async listCatalog() {
16
- return gateway.request({
18
+ listCatalog() {
19
+ return gateway
20
+ .request({
17
21
  path: "/api/platform/v1/packs/catalog",
18
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "catalog")));
22
+ })
23
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "catalog")));
19
24
  },
20
25
  /**
21
26
  * Get the discovery catalog for packs.
22
27
  */
23
- async getDiscoveryCatalog() {
28
+ getDiscoveryCatalog() {
24
29
  return gateway.request({
25
30
  path: "/api/platform/v1/packs/discovery",
26
31
  });
@@ -28,7 +33,7 @@ export function createPacksClient(config = {}) {
28
33
  /**
29
34
  * Get discovery details for a specific pack.
30
35
  */
31
- async getDiscoveryDetail(packKey) {
36
+ getDiscoveryDetail(packKey) {
32
37
  return gateway.request({
33
38
  path: `/api/platform/v1/packs/discovery/${encodeURIComponent(packKey)}`,
34
39
  });
@@ -36,15 +41,17 @@ export function createPacksClient(config = {}) {
36
41
  /**
37
42
  * List pack states for the current scope.
38
43
  */
39
- async listStates(query = {}) {
40
- return gateway.request({
44
+ listStates(query = {}) {
45
+ return gateway
46
+ .request({
41
47
  path: `/api/platform/v1/packs/states${toQueryString(query)}`,
42
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "states")));
48
+ })
49
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "states")));
43
50
  },
44
51
  /**
45
52
  * Get health details for a pack.
46
53
  */
47
- async getHealth(packKey, query = {}) {
54
+ getHealth(packKey, query = {}) {
48
55
  return gateway.request({
49
56
  path: `/api/platform/v1/packs/${encodeURIComponent(packKey)}/health${toQueryString(query)}`,
50
57
  });
@@ -52,15 +59,17 @@ export function createPacksClient(config = {}) {
52
59
  /**
53
60
  * List pack telemetry entries.
54
61
  */
55
- async listTelemetry(query = {}) {
56
- return gateway.request({
62
+ listTelemetry(query = {}) {
63
+ return gateway
64
+ .request({
57
65
  path: `/api/platform/v1/packs/telemetry${toQueryString(query)}`,
58
- }).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "telemetry")));
66
+ })
67
+ .then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "telemetry")));
59
68
  },
60
69
  /**
61
70
  * Create a pack entitlement.
62
71
  */
63
- async createEntitlement(input, idempotencyKey) {
72
+ createEntitlement(input, idempotencyKey) {
64
73
  return gateway.request({
65
74
  path: "/api/platform/v1/packs/entitlements",
66
75
  method: "POST",
@@ -71,7 +80,7 @@ export function createPacksClient(config = {}) {
71
80
  /**
72
81
  * Install a pack.
73
82
  */
74
- async install(input, idempotencyKey) {
83
+ install(input, idempotencyKey) {
75
84
  return gateway.request({
76
85
  path: "/api/platform/v1/packs/install",
77
86
  method: "POST",
@@ -82,7 +91,7 @@ export function createPacksClient(config = {}) {
82
91
  /**
83
92
  * Enable a pack.
84
93
  */
85
- async enable(input, idempotencyKey) {
94
+ enable(input, idempotencyKey) {
86
95
  return gateway.request({
87
96
  path: "/api/platform/v1/packs/enable",
88
97
  method: "POST",
@@ -93,7 +102,7 @@ export function createPacksClient(config = {}) {
93
102
  /**
94
103
  * Disable a pack.
95
104
  */
96
- async disable(input, idempotencyKey) {
105
+ disable(input, idempotencyKey) {
97
106
  return gateway.request({
98
107
  path: "/api/platform/v1/packs/disable",
99
108
  method: "POST",
@@ -104,7 +113,7 @@ export function createPacksClient(config = {}) {
104
113
  /**
105
114
  * Uninstall a pack.
106
115
  */
107
- async uninstall(input, idempotencyKey) {
116
+ uninstall(input, idempotencyKey) {
108
117
  return gateway.request({
109
118
  path: "/api/platform/v1/packs/uninstall",
110
119
  method: "POST",
@@ -115,7 +124,7 @@ export function createPacksClient(config = {}) {
115
124
  /**
116
125
  * Upgrade a pack.
117
126
  */
118
- async upgrade(input, idempotencyKey) {
127
+ upgrade(input, idempotencyKey) {
119
128
  return gateway.request({
120
129
  path: "/api/platform/v1/packs/upgrade",
121
130
  method: "POST",
@@ -1,5 +1,4 @@
1
- import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
2
- export { LucernApiError };
1
+ import { type GatewayClientConfig, type GatewayScope } from "./coreClient";
3
2
  export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
4
3
  /** Configuration for the policy client. */
5
4
  export type PolicyClientConfig = GatewayClientConfig;
@@ -7,16 +6,16 @@ export type PolicyClientConfig = GatewayClientConfig;
7
6
  export type PermissionKind = "read" | "write";
8
7
  /** Permission level for a write policy rule. */
9
8
  export type WritePolicyPermission = "allow" | "deny" | "review_required";
10
- type TopicRecord = {
11
- topicId?: string;
9
+ /** Topic row returned from policy-scoped topic filters. */
10
+ export interface PolicyTopicRecord {
11
+ isOwner?: boolean;
12
12
  name?: string;
13
+ topicId?: string;
13
14
  type?: string;
14
- isOwner?: boolean;
15
15
  [key: string]: unknown;
16
- };
16
+ }
17
17
  /** Structured explanation of how a policy decision was derived. */
18
- export type PolicyDecisionExplanation = {
19
- summary?: string;
18
+ export interface PolicyDecisionExplanation {
20
19
  matchedReasonCode?: string;
21
20
  steps?: Array<{
22
21
  stage?: string;
@@ -24,36 +23,37 @@ export type PolicyDecisionExplanation = {
24
23
  reasonCode?: string;
25
24
  detail?: string;
26
25
  }>;
26
+ summary?: string;
27
27
  [key: string]: unknown;
28
- };
28
+ }
29
29
  /** Result of a permission check against the policy engine. */
30
- export type PermissionDecision = {
30
+ export interface PermissionDecision {
31
31
  allowed?: boolean;
32
32
  decision?: string;
33
- reasonCode?: string;
34
- principalId?: string;
35
- topicId?: string;
33
+ explanation?: PolicyDecisionExplanation;
36
34
  permission?: string;
37
35
  policyVersion?: string;
36
+ principalId?: string;
37
+ reasonCode?: string;
38
+ topicId?: string;
38
39
  traceId?: string | null;
39
- explanation?: PolicyDecisionExplanation;
40
- };
40
+ }
41
41
  /** A persisted write policy rule controlling mutation access. */
42
- export type WritePolicyRecord = {
42
+ export interface WritePolicyRecord {
43
+ createdAt?: number;
44
+ createdBy?: string;
45
+ enabled?: boolean;
43
46
  id?: string;
44
- topicId?: string;
45
- role?: string;
46
- toolCategory?: string;
47
- permission?: WritePolicyPermission;
48
47
  maxWritesPerSession?: number;
49
- enabled?: boolean;
48
+ permission?: WritePolicyPermission;
50
49
  rationale?: string;
51
- createdAt?: number;
52
- updatedAt?: number;
53
- createdBy?: string;
54
50
  resolution?: string;
51
+ role?: string;
52
+ toolCategory?: string;
53
+ topicId?: string;
54
+ updatedAt?: number;
55
55
  [key: string]: unknown;
56
- };
56
+ }
57
57
  /** Input for creating a write policy rule. */
58
58
  export type WritePolicyCreateInput = GatewayScope & {
59
59
  topicId?: string;
@@ -78,56 +78,67 @@ export type WritePolicyUpdateInput = GatewayScope & {
78
78
  rationale?: string;
79
79
  clearRationale?: boolean;
80
80
  };
81
- export type TenantPolicyPermission = {
82
- resource: string;
81
+ export interface TenantPolicyPermission {
83
82
  actions: string[];
84
- };
83
+ resource: string;
84
+ }
85
85
  export type TenantPolicyKind = "role" | "object_classification";
86
86
  export type TenantPolicyExternalAccess = "allowed" | "summaries" | "omitted";
87
- export type TenantPolicyClassificationFields = {
88
- policyKind?: TenantPolicyKind;
89
- profileKey?: string;
90
- objectTypes?: string[];
87
+ export interface TenantPolicyClassificationFields {
91
88
  accessTier?: string;
92
- exportClass?: string;
93
89
  classificationKey?: string;
94
90
  classificationLabels?: string[];
95
- policyTags?: string[];
91
+ exportClass?: string;
96
92
  externalAccess?: TenantPolicyExternalAccess;
97
- requiredGroupKey?: string;
98
- };
99
- export type TenantPolicyRecord = {
100
- id?: string;
101
- tenantId: string;
102
- workspaceId?: string;
93
+ objectTypes?: string[];
103
94
  policyKind?: TenantPolicyKind;
104
- roleName: string;
105
- description?: string;
106
- permissions: TenantPolicyPermission[];
107
- groupBindings: string[];
95
+ policyTags?: string[];
108
96
  profileKey?: string;
109
- objectTypes?: string[];
97
+ requiredGroupKey?: string;
98
+ }
99
+ export interface TenantPolicyRecord {
110
100
  accessTier?: string;
111
- exportClass?: string;
112
101
  classificationKey?: string;
113
102
  classificationLabels?: string[];
114
- policyTags?: string[];
103
+ createdAt?: number;
104
+ createdBy?: string;
105
+ description?: string;
106
+ exportClass?: string;
115
107
  externalAccess?: TenantPolicyExternalAccess;
108
+ groupBindings: string[];
109
+ id?: string;
110
+ objectTypes?: string[];
111
+ permissions: TenantPolicyPermission[];
112
+ policyKind?: TenantPolicyKind;
113
+ policyTags?: string[];
114
+ profileKey?: string;
116
115
  requiredGroupKey?: string;
117
- createdAt?: number;
116
+ roleName: string;
117
+ tenantId: string;
118
118
  updatedAt?: number;
119
- createdBy?: string;
120
119
  updatedBy?: string;
121
- };
122
- type FilterByPermissionResponse = {
120
+ workspaceId?: string;
121
+ }
122
+ /** Response envelope for accessible-topic policy queries. */
123
+ export interface AccessibleTopicsResponse {
124
+ deniedTopics: Array<{
125
+ topicId: string;
126
+ reasonCode: string;
127
+ }>;
123
128
  permission: PermissionKind;
129
+ topics: PolicyTopicRecord[];
130
+ total: number;
131
+ }
132
+ /** Response envelope for topic permission filters. */
133
+ export interface FilterByPermissionResponse {
124
134
  allowedTopicIds: string[];
135
+ count: number;
125
136
  deniedTopics: Array<{
126
137
  topicId: string;
127
138
  reasonCode: string;
128
139
  }>;
129
- count: number;
130
- };
140
+ permission: PermissionKind;
141
+ }
131
142
  /**
132
143
  * Create the policy client for permission checks, grants, and write policies.
133
144
  * @param config - Gateway transport configuration.
@@ -179,10 +190,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
179
190
  data: {
180
191
  policies: WritePolicyRecord[];
181
192
  };
182
- success: true;
183
193
  correlationId: string;
184
- policyTraceId: string | null;
185
194
  idempotentReplay: boolean;
195
+ policyTraceId: string | null;
196
+ success: true;
186
197
  }>;
187
198
  /**
188
199
  * Create a write policy rule.
@@ -193,10 +204,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
193
204
  created: boolean;
194
205
  policy: WritePolicyRecord | null;
195
206
  };
196
- success: true;
197
207
  correlationId: string;
198
- policyTraceId: string | null;
199
208
  idempotentReplay: boolean;
209
+ policyTraceId: string | null;
210
+ success: true;
200
211
  }>;
201
212
  /**
202
213
  * Update an existing write policy rule by identifier.
@@ -207,10 +218,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
207
218
  updated: boolean;
208
219
  policy: WritePolicyRecord | null;
209
220
  };
210
- success: true;
211
221
  correlationId: string;
212
- policyTraceId: string | null;
213
222
  idempotentReplay: boolean;
223
+ policyTraceId: string | null;
224
+ success: true;
214
225
  }>;
215
226
  /**
216
227
  * Delete a write policy rule by identifier.
@@ -226,10 +237,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
226
237
  data: {
227
238
  policies: TenantPolicyRecord[];
228
239
  };
229
- success: true;
230
240
  correlationId: string;
231
- policyTraceId: string | null;
232
241
  idempotentReplay: boolean;
242
+ policyTraceId: string | null;
243
+ success: true;
233
244
  }>;
234
245
  /**
235
246
  * Create a tenant role policy.
@@ -243,10 +254,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
243
254
  data: {
244
255
  policy: TenantPolicyRecord | null;
245
256
  };
246
- success: true;
247
257
  correlationId: string;
248
- policyTraceId: string | null;
249
258
  idempotentReplay: boolean;
259
+ policyTraceId: string | null;
260
+ success: true;
250
261
  }>;
251
262
  /**
252
263
  * Update a tenant role policy by identifier.
@@ -260,10 +271,10 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
260
271
  data: {
261
272
  policy: TenantPolicyRecord | null;
262
273
  };
263
- success: true;
264
274
  correlationId: string;
265
- policyTraceId: string | null;
266
275
  idempotentReplay: boolean;
276
+ policyTraceId: string | null;
277
+ success: true;
267
278
  }>;
268
279
  /**
269
280
  * Delete a tenant role policy by identifier.
@@ -291,17 +302,17 @@ export declare function createPolicyClient(config?: PolicyClientConfig): {
291
302
  }): Promise<{
292
303
  data: {
293
304
  permission: PermissionKind;
294
- topics: TopicRecord[];
305
+ topics: PolicyTopicRecord[];
295
306
  total: number;
296
307
  deniedTopics: {
297
308
  topicId: string;
298
309
  reasonCode: string;
299
310
  }[];
300
311
  };
301
- success: true;
302
312
  correlationId: string;
303
- policyTraceId: string | null;
304
313
  idempotentReplay: boolean;
314
+ policyTraceId: string | null;
315
+ success: true;
305
316
  }>;
306
317
  /**
307
318
  * Filter topic identifiers by permission.