@lucern/sdk 1.0.28 → 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.
- package/CHANGELOG.md +15 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
package/dist/gatewayFacades.js
CHANGED
|
@@ -1,13 +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.
|
|
2
|
+
// 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
3
|
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
4
|
import { createTopicsClient, } from "./topicsClient.js";
|
|
3
|
-
|
|
4
|
-
return Array.isArray(types) && types.length > 0 ? types.join(",") : undefined;
|
|
5
|
-
}
|
|
6
|
-
export { createBeliefsFacade, createContradictionsFacade, createEdgesFacade, createEvidenceFacade, createEventsFacade, createGraphFacade, createIdentityFacade, createOntologiesFacade, createQuestionsFacade } from "./gatewayFacades.factories.js";
|
|
5
|
+
export { createBeliefsFacade, createContradictionsFacade, createEdgesFacade, createEventsFacade, createEvidenceFacade, createGraphFacade, createIdentityFacade, createOntologiesFacade, createQuestionsFacade, } from "./gatewayFacades.factories.js";
|
|
7
6
|
export function createSearchFacade(config = {}) {
|
|
8
7
|
const gateway = createGatewayRequestClient(config);
|
|
9
8
|
return {
|
|
10
|
-
|
|
9
|
+
query(input) {
|
|
11
10
|
return gateway.request({
|
|
12
11
|
path: "/api/platform/v1/search",
|
|
13
12
|
method: "POST",
|
|
@@ -19,7 +18,7 @@ export function createSearchFacade(config = {}) {
|
|
|
19
18
|
export function createTasksFacade(config = {}) {
|
|
20
19
|
const gateway = createGatewayRequestClient(config);
|
|
21
20
|
return {
|
|
22
|
-
|
|
21
|
+
create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
23
22
|
return gateway.request({
|
|
24
23
|
path: "/api/platform/v1/tasks",
|
|
25
24
|
method: "POST",
|
|
@@ -27,7 +26,7 @@ export function createTasksFacade(config = {}) {
|
|
|
27
26
|
idempotencyKey,
|
|
28
27
|
});
|
|
29
28
|
},
|
|
30
|
-
|
|
29
|
+
update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
31
30
|
return gateway.request({
|
|
32
31
|
path: `/api/platform/v1/tasks/${encodeURIComponent(input.id)}`,
|
|
33
32
|
method: "PATCH",
|
|
@@ -46,7 +45,7 @@ export function createTasksFacade(config = {}) {
|
|
|
46
45
|
idempotencyKey,
|
|
47
46
|
});
|
|
48
47
|
},
|
|
49
|
-
|
|
48
|
+
complete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
50
49
|
return gateway.request({
|
|
51
50
|
path: `/api/platform/v1/tasks/${encodeURIComponent(input.id)}/complete`,
|
|
52
51
|
method: "POST",
|
|
@@ -56,7 +55,7 @@ export function createTasksFacade(config = {}) {
|
|
|
56
55
|
idempotencyKey,
|
|
57
56
|
});
|
|
58
57
|
},
|
|
59
|
-
|
|
58
|
+
list(query) {
|
|
60
59
|
return gateway.request({
|
|
61
60
|
path: `/api/platform/v1/tasks${toQueryString({
|
|
62
61
|
topicId: query.topicId,
|
|
@@ -74,16 +73,16 @@ export function createTopicsFacade(config = {}) {
|
|
|
74
73
|
create: topicsClient.create,
|
|
75
74
|
get: topicsClient.get,
|
|
76
75
|
list: topicsClient.list,
|
|
77
|
-
|
|
76
|
+
update(input, idempotencyKey) {
|
|
78
77
|
const { id, ...rest } = input;
|
|
79
78
|
return topicsClient.update(id, rest, idempotencyKey);
|
|
80
79
|
},
|
|
81
|
-
|
|
80
|
+
tree(input) {
|
|
82
81
|
return topicsClient.getTree(input.id, {
|
|
83
82
|
maxDepth: input.maxDepth,
|
|
84
83
|
});
|
|
85
84
|
},
|
|
86
|
-
|
|
85
|
+
coverage(input) {
|
|
87
86
|
return topicsClient.getCoverage(input.id, {
|
|
88
87
|
includeDescendants: input.includeDescendants,
|
|
89
88
|
maxDepth: input.maxDepth,
|
|
@@ -96,7 +95,7 @@ export function createTopicsFacade(config = {}) {
|
|
|
96
95
|
export function createWebhooksFacade(config = {}) {
|
|
97
96
|
const gateway = createGatewayRequestClient(config);
|
|
98
97
|
return {
|
|
99
|
-
|
|
98
|
+
create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
100
99
|
return gateway.request({
|
|
101
100
|
path: "/api/platform/v1/webhooks",
|
|
102
101
|
method: "POST",
|
|
@@ -104,19 +103,19 @@ export function createWebhooksFacade(config = {}) {
|
|
|
104
103
|
idempotencyKey,
|
|
105
104
|
});
|
|
106
105
|
},
|
|
107
|
-
|
|
106
|
+
list(query = {}) {
|
|
108
107
|
return gateway.request({
|
|
109
108
|
path: `/api/platform/v1/webhooks${toQueryString({
|
|
110
109
|
topicId: query.topicId,
|
|
111
110
|
})}`,
|
|
112
111
|
});
|
|
113
112
|
},
|
|
114
|
-
|
|
113
|
+
get(id) {
|
|
115
114
|
return gateway.request({
|
|
116
115
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
117
116
|
});
|
|
118
117
|
},
|
|
119
|
-
|
|
118
|
+
update(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
120
119
|
return gateway.request({
|
|
121
120
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
122
121
|
method: "PATCH",
|
|
@@ -124,14 +123,14 @@ export function createWebhooksFacade(config = {}) {
|
|
|
124
123
|
idempotencyKey,
|
|
125
124
|
});
|
|
126
125
|
},
|
|
127
|
-
|
|
126
|
+
delete(id, idempotencyKey = randomIdempotencyKey()) {
|
|
128
127
|
return gateway.request({
|
|
129
128
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}`,
|
|
130
129
|
method: "DELETE",
|
|
131
130
|
idempotencyKey,
|
|
132
131
|
});
|
|
133
132
|
},
|
|
134
|
-
|
|
133
|
+
test(id, input = {}, idempotencyKey = randomIdempotencyKey()) {
|
|
135
134
|
return gateway.request({
|
|
136
135
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/test`,
|
|
137
136
|
method: "POST",
|
|
@@ -139,14 +138,14 @@ export function createWebhooksFacade(config = {}) {
|
|
|
139
138
|
idempotencyKey,
|
|
140
139
|
});
|
|
141
140
|
},
|
|
142
|
-
|
|
141
|
+
deliveries(id, query = {}) {
|
|
143
142
|
return gateway.request({
|
|
144
143
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/deliveries${toQueryString({
|
|
145
144
|
limit: query.limit,
|
|
146
145
|
})}`,
|
|
147
146
|
});
|
|
148
147
|
},
|
|
149
|
-
|
|
148
|
+
health(id) {
|
|
150
149
|
return gateway.request({
|
|
151
150
|
path: `/api/platform/v1/webhooks/${encodeURIComponent(id)}/health`,
|
|
152
151
|
});
|
|
@@ -156,7 +155,7 @@ export function createWebhooksFacade(config = {}) {
|
|
|
156
155
|
export function createWorktreesFacade(config = {}) {
|
|
157
156
|
const gateway = createGatewayRequestClient(config);
|
|
158
157
|
return {
|
|
159
|
-
|
|
158
|
+
create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
160
159
|
return gateway.request({
|
|
161
160
|
path: "/api/platform/v1/worktrees",
|
|
162
161
|
method: "POST",
|
|
@@ -164,7 +163,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
164
163
|
idempotencyKey,
|
|
165
164
|
});
|
|
166
165
|
},
|
|
167
|
-
|
|
166
|
+
list(query) {
|
|
168
167
|
return gateway.request({
|
|
169
168
|
path: `/api/platform/v1/worktrees${toQueryString({
|
|
170
169
|
topicId: query.topicId,
|
|
@@ -176,7 +175,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
176
175
|
})}`,
|
|
177
176
|
});
|
|
178
177
|
},
|
|
179
|
-
|
|
178
|
+
listCampaigns(query = {}) {
|
|
180
179
|
return gateway.request({
|
|
181
180
|
path: `/api/platform/v1/worktrees/campaigns${toQueryString({
|
|
182
181
|
topicId: query.topicId,
|
|
@@ -185,7 +184,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
185
184
|
})}`,
|
|
186
185
|
});
|
|
187
186
|
},
|
|
188
|
-
|
|
187
|
+
activate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
189
188
|
return gateway.request({
|
|
190
189
|
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/activate`,
|
|
191
190
|
method: "POST",
|
|
@@ -193,7 +192,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
193
192
|
idempotencyKey,
|
|
194
193
|
});
|
|
195
194
|
},
|
|
196
|
-
|
|
195
|
+
update(input, idempotencyKey = randomIdempotencyKey()) {
|
|
197
196
|
return gateway.request({
|
|
198
197
|
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}`,
|
|
199
198
|
method: "PATCH",
|
|
@@ -220,7 +219,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
220
219
|
idempotencyKey,
|
|
221
220
|
});
|
|
222
221
|
},
|
|
223
|
-
|
|
222
|
+
merge(input, idempotencyKey = randomIdempotencyKey()) {
|
|
224
223
|
return gateway.request({
|
|
225
224
|
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/merge`,
|
|
226
225
|
method: "POST",
|
|
@@ -231,7 +230,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
231
230
|
idempotencyKey,
|
|
232
231
|
});
|
|
233
232
|
},
|
|
234
|
-
|
|
233
|
+
updateTargets(input, idempotencyKey = randomIdempotencyKey()) {
|
|
235
234
|
return gateway.request({
|
|
236
235
|
path: `/api/platform/v1/worktrees/${encodeURIComponent(input.id)}/targets`,
|
|
237
236
|
method: "POST",
|
|
@@ -244,7 +243,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
244
243
|
idempotencyKey,
|
|
245
244
|
});
|
|
246
245
|
},
|
|
247
|
-
|
|
246
|
+
complete(input, idempotencyKey = randomIdempotencyKey()) {
|
|
248
247
|
return gateway.request({
|
|
249
248
|
path: "/api/platform/v1/worktrees/complete",
|
|
250
249
|
method: "POST",
|
|
@@ -252,7 +251,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
252
251
|
idempotencyKey,
|
|
253
252
|
});
|
|
254
253
|
},
|
|
255
|
-
|
|
254
|
+
advancePhase(input, idempotencyKey = randomIdempotencyKey()) {
|
|
256
255
|
return gateway.request({
|
|
257
256
|
path: "/api/platform/v1/worktrees/advance-phase",
|
|
258
257
|
method: "POST",
|
|
@@ -260,7 +259,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
260
259
|
idempotencyKey,
|
|
261
260
|
});
|
|
262
261
|
},
|
|
263
|
-
|
|
262
|
+
setPhase(input, idempotencyKey = randomIdempotencyKey()) {
|
|
264
263
|
return gateway.request({
|
|
265
264
|
path: "/api/platform/v1/worktrees/set-phase",
|
|
266
265
|
method: "POST",
|
|
@@ -268,7 +267,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
268
267
|
idempotencyKey,
|
|
269
268
|
});
|
|
270
269
|
},
|
|
271
|
-
|
|
270
|
+
patchState(input, idempotencyKey = randomIdempotencyKey()) {
|
|
272
271
|
return gateway.request({
|
|
273
272
|
path: "/api/platform/v1/worktrees/patch-state",
|
|
274
273
|
method: "POST",
|
|
@@ -276,7 +275,7 @@ export function createWorktreesFacade(config = {}) {
|
|
|
276
275
|
idempotencyKey,
|
|
277
276
|
});
|
|
278
277
|
},
|
|
279
|
-
|
|
278
|
+
bulkCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
280
279
|
return gateway.request({
|
|
281
280
|
path: "/api/platform/v1/worktrees/bulk",
|
|
282
281
|
method: "POST",
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
+
import type { GraphIntelligenceQueryMode, GraphIntelligenceQueryWithTools } from "@lucern/contracts";
|
|
1
2
|
import { type GatewayClientConfig } from "./coreClient";
|
|
2
3
|
import type { JsonObject, ListResult } from "./types";
|
|
3
|
-
import type { GraphIntelligenceQueryMode, GraphIntelligenceQueryWithTools } from "@lucern/contracts";
|
|
4
4
|
export type GraphAnalysisClientConfig = GatewayClientConfig;
|
|
5
5
|
export declare const GRAPH_ANALYSIS_ANALYSIS_FIELDS: readonly ["topicId", "projectId", "workspaceId", "analysisType", "healthScore", "findings", "suggestions", "sourceNodeIds", "sourceEdgeIds", "detectorVersions", "metadata"];
|
|
6
6
|
export declare const GRAPH_ANALYSIS_SUGGESTION_FIELDS: readonly ["topicId", "projectId", "workspaceId", "analysisId", "suggestions", "metadata"];
|
|
7
7
|
export declare const GRAPH_ANALYSIS_COMPUTE_FIELDS: readonly ["topicId", "projectId", "workspaceId", "analysisType", "sourceNodeIds", "sourceEdgeIds", "detectorVersions", "metadata"];
|
|
8
|
-
export
|
|
9
|
-
id?: string;
|
|
10
|
-
severity?: "critical" | "warning" | "info" | string;
|
|
8
|
+
export interface GraphAnalysisFinding {
|
|
11
9
|
category?: string;
|
|
12
|
-
title: string;
|
|
13
10
|
description?: string;
|
|
14
|
-
nodeIds?: string[];
|
|
15
|
-
nodeLabels?: string[];
|
|
16
11
|
detector?: string;
|
|
12
|
+
id?: string;
|
|
17
13
|
importance?: number;
|
|
18
|
-
totalCount?: number;
|
|
19
14
|
metadata?: JsonObject;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
nodeIds?: string[];
|
|
16
|
+
nodeLabels?: string[];
|
|
17
|
+
severity?: "critical" | "warning" | "info" | string;
|
|
18
|
+
title: string;
|
|
19
|
+
totalCount?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface GraphAnalysisSuggestion {
|
|
24
22
|
actionType: string;
|
|
25
|
-
|
|
23
|
+
findingId?: string;
|
|
24
|
+
healthScore?: number;
|
|
25
|
+
metadata?: JsonObject;
|
|
26
26
|
priority?: "P0" | "P1" | "P2" | "P3" | string;
|
|
27
27
|
rationale?: string;
|
|
28
28
|
status?: GraphAnalysisSuggestionStatus;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
29
|
+
suggestionId?: string;
|
|
30
|
+
targetNodeIds?: string[];
|
|
31
|
+
}
|
|
32
32
|
export type GraphAnalysisSuggestionStatus = "open" | "accepted" | "dismissed" | "applied" | "superseded";
|
|
33
|
-
export
|
|
33
|
+
export interface GraphAnalysisRecord {
|
|
34
34
|
analysisId?: string;
|
|
35
|
-
topicId: string;
|
|
36
|
-
workspaceId: string;
|
|
37
35
|
analysisType: string;
|
|
38
|
-
|
|
39
|
-
findings?: GraphAnalysisFinding[];
|
|
40
|
-
suggestions?: GraphAnalysisSuggestion[];
|
|
41
|
-
sourceNodeIds?: string[];
|
|
42
|
-
sourceEdgeIds?: string[];
|
|
36
|
+
createdAt?: number;
|
|
43
37
|
detectorVersions?: Record<string, string>;
|
|
38
|
+
findings?: GraphAnalysisFinding[];
|
|
39
|
+
healthScore?: number;
|
|
44
40
|
metadata?: JsonObject | null;
|
|
45
|
-
|
|
41
|
+
sourceEdgeIds?: string[];
|
|
42
|
+
sourceNodeIds?: string[];
|
|
43
|
+
suggestions?: GraphAnalysisSuggestion[];
|
|
44
|
+
topicId: string;
|
|
46
45
|
updatedAt?: number;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
workspaceId: string;
|
|
47
|
+
}
|
|
48
|
+
export interface GraphAnalysisChangeRecord {
|
|
50
49
|
analysisId?: string;
|
|
51
|
-
|
|
52
|
-
workspaceId?: string;
|
|
50
|
+
changeId?: string;
|
|
53
51
|
changeType?: string;
|
|
54
|
-
|
|
52
|
+
createdAt?: number;
|
|
55
53
|
edgeIds?: string[];
|
|
56
|
-
summary?: string;
|
|
57
54
|
metadata?: JsonObject | null;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
export type TopicProjectAliasInput = {
|
|
55
|
+
nodeIds?: string[];
|
|
56
|
+
summary?: string;
|
|
61
57
|
topicId?: string;
|
|
58
|
+
workspaceId?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface TopicProjectAliasInput {
|
|
62
61
|
/** @deprecated Use topicId. */
|
|
63
62
|
projectId?: string;
|
|
64
|
-
|
|
63
|
+
topicId?: string;
|
|
64
|
+
}
|
|
65
65
|
export type SaveGraphAnalysisInput = TopicProjectAliasInput & {
|
|
66
66
|
workspaceId: string;
|
|
67
67
|
analysisType: string;
|
|
@@ -89,12 +89,12 @@ export type SaveGraphSuggestionsInput = TopicProjectAliasInput & {
|
|
|
89
89
|
suggestions: GraphAnalysisSuggestion[];
|
|
90
90
|
metadata?: JsonObject;
|
|
91
91
|
};
|
|
92
|
-
export
|
|
93
|
-
suggestionId: string;
|
|
94
|
-
status: GraphAnalysisSuggestionStatus;
|
|
95
|
-
rationale?: string;
|
|
92
|
+
export interface UpdateGraphSuggestionStatusInput {
|
|
96
93
|
metadata?: JsonObject;
|
|
97
|
-
|
|
94
|
+
rationale?: string;
|
|
95
|
+
status: GraphAnalysisSuggestionStatus;
|
|
96
|
+
suggestionId: string;
|
|
97
|
+
}
|
|
98
98
|
export type ListGraphSuggestionsInput = TopicProjectAliasInput & {
|
|
99
99
|
workspaceId?: string;
|
|
100
100
|
analysisId?: string;
|
|
@@ -128,10 +128,10 @@ export type ComputeOrRequestGraphAnalysisInput = TopicProjectAliasInput & {
|
|
|
128
128
|
export type GraphAnalysisListResponse = ListResult<GraphAnalysisRecord, "analyses">;
|
|
129
129
|
export type GraphAnalysisSuggestionsResponse = ListResult<GraphAnalysisSuggestion, "suggestions">;
|
|
130
130
|
export type GraphAnalysisChangesResponse = ListResult<GraphAnalysisChangeRecord, "changes">;
|
|
131
|
-
export
|
|
131
|
+
export interface ListGraphIntelligenceQueriesInput {
|
|
132
132
|
categoryId?: string;
|
|
133
133
|
mode?: GraphIntelligenceQueryMode;
|
|
134
|
-
}
|
|
134
|
+
}
|
|
135
135
|
export type RunGraphIntelligenceQueryInput = TopicProjectAliasInput & {
|
|
136
136
|
queryId?: string;
|
|
137
137
|
prompt?: string;
|
|
@@ -143,43 +143,43 @@ export type RunGraphIntelligenceQueryInput = TopicProjectAliasInput & {
|
|
|
143
143
|
maxDepth?: number;
|
|
144
144
|
beliefIds?: string[];
|
|
145
145
|
};
|
|
146
|
-
export
|
|
147
|
-
schemaVersion: string;
|
|
146
|
+
export interface GraphIntelligenceQueryCatalogResponse {
|
|
148
147
|
catalogVersion: string;
|
|
149
148
|
categories: unknown[];
|
|
150
149
|
modes: readonly GraphIntelligenceQueryMode[];
|
|
150
|
+
publicToolNamesByMode: Record<string, readonly string[]>;
|
|
151
151
|
queries: GraphIntelligenceQueryWithTools[];
|
|
152
152
|
quickQueries: unknown[];
|
|
153
|
-
publicToolNamesByMode: Record<string, readonly string[]>;
|
|
154
|
-
totalQueries: number;
|
|
155
|
-
};
|
|
156
|
-
export type GraphIntelligenceQueryRunResponse = {
|
|
157
153
|
schemaVersion: string;
|
|
154
|
+
totalQueries: number;
|
|
155
|
+
}
|
|
156
|
+
export interface GraphIntelligenceQueryRunResponse {
|
|
157
|
+
analysis: JsonObject;
|
|
158
158
|
catalogVersion: string;
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
context: JsonObject;
|
|
160
|
+
guidance: JsonObject;
|
|
161
|
+
input: string | null;
|
|
162
162
|
mode: GraphIntelligenceQueryMode;
|
|
163
163
|
prompt: string;
|
|
164
|
-
|
|
164
|
+
query: GraphIntelligenceQueryWithTools | JsonObject;
|
|
165
|
+
requestedTopicId?: string;
|
|
166
|
+
schemaVersion: string;
|
|
165
167
|
toolPlan: Array<{
|
|
166
168
|
toolName: string;
|
|
167
169
|
args: JsonObject;
|
|
168
170
|
}>;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
guidance: JsonObject;
|
|
172
|
-
};
|
|
171
|
+
topicId: string;
|
|
172
|
+
}
|
|
173
173
|
export declare function createGraphAnalysisClient(config?: GraphAnalysisClientConfig): {
|
|
174
174
|
listGraphIntelligenceQueries(input?: ListGraphIntelligenceQueriesInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphIntelligenceQueryCatalogResponse>>;
|
|
175
175
|
runGraphIntelligenceQuery(input: RunGraphIntelligenceQueryInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphIntelligenceQueryRunResponse>>;
|
|
176
176
|
saveAnalysis(input: SaveGraphAnalysisInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalysisRecord>>;
|
|
177
|
-
listAnalyses(input: ListGraphAnalysesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<
|
|
177
|
+
listAnalyses(input: ListGraphAnalysesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<GraphAnalysisRecord, "analyses">>>;
|
|
178
178
|
getLatestAnalysis(input: GetLatestGraphAnalysisInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalysisRecord>>;
|
|
179
179
|
saveSuggestions(input: SaveGraphSuggestionsInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalysisSuggestionsResponse>>;
|
|
180
180
|
updateSuggestionStatus(input: UpdateGraphSuggestionStatusInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalysisSuggestion>>;
|
|
181
|
-
listSuggestions(input: ListGraphSuggestionsInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<
|
|
182
|
-
listGraphChanges(input: ListGraphChangesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<
|
|
181
|
+
listSuggestions(input: ListGraphSuggestionsInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<GraphAnalysisSuggestion, "suggestions">>>;
|
|
182
|
+
listGraphChanges(input: ListGraphChangesInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<GraphAnalysisChangeRecord, "changes">>>;
|
|
183
183
|
computeOrRequestAnalysis(input: ComputeOrRequestGraphAnalysisInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalysisRecord>>;
|
|
184
184
|
};
|
|
185
185
|
//# sourceMappingURL=graphAnalysisClient.d.ts.map
|
|
@@ -88,6 +88,13 @@ function normalizeRunQueryPayload(input) {
|
|
|
88
88
|
projectId: undefined,
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
+
function readGatewayList(data, key) {
|
|
92
|
+
if (data && typeof data === "object" && key in data) {
|
|
93
|
+
const candidate = data[key];
|
|
94
|
+
return Array.isArray(candidate) ? candidate : [];
|
|
95
|
+
}
|
|
96
|
+
return Array.isArray(data) ? data : [];
|
|
97
|
+
}
|
|
91
98
|
export function createGraphAnalysisClient(config = {}) {
|
|
92
99
|
const gateway = createGatewayRequestClient(config);
|
|
93
100
|
return {
|
|
@@ -117,13 +124,11 @@ export function createGraphAnalysisClient(config = {}) {
|
|
|
117
124
|
});
|
|
118
125
|
},
|
|
119
126
|
listAnalyses(input) {
|
|
120
|
-
return gateway
|
|
127
|
+
return gateway
|
|
128
|
+
.request({
|
|
121
129
|
path: `/api/platform/v1/graph-analysis/analyses${toQueryString(graphAnalysisQuery(input))}`,
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
: Array.isArray(data)
|
|
125
|
-
? data
|
|
126
|
-
: [], "analyses")));
|
|
130
|
+
})
|
|
131
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(readGatewayList(data, "analyses"), "analyses")));
|
|
127
132
|
},
|
|
128
133
|
getLatestAnalysis(input) {
|
|
129
134
|
return gateway.request({
|
|
@@ -155,7 +160,8 @@ export function createGraphAnalysisClient(config = {}) {
|
|
|
155
160
|
});
|
|
156
161
|
},
|
|
157
162
|
listSuggestions(input) {
|
|
158
|
-
return gateway
|
|
163
|
+
return gateway
|
|
164
|
+
.request({
|
|
159
165
|
path: `/api/platform/v1/graph-analysis/suggestions${toQueryString({
|
|
160
166
|
topicId: requireTopicId(input),
|
|
161
167
|
workspaceId: input.workspaceId,
|
|
@@ -165,14 +171,12 @@ export function createGraphAnalysisClient(config = {}) {
|
|
|
165
171
|
limit: input.limit,
|
|
166
172
|
cursor: input.cursor,
|
|
167
173
|
})}`,
|
|
168
|
-
})
|
|
169
|
-
|
|
170
|
-
: Array.isArray(data)
|
|
171
|
-
? data
|
|
172
|
-
: [], "suggestions")));
|
|
174
|
+
})
|
|
175
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(readGatewayList(data, "suggestions"), "suggestions")));
|
|
173
176
|
},
|
|
174
177
|
listGraphChanges(input) {
|
|
175
|
-
return gateway
|
|
178
|
+
return gateway
|
|
179
|
+
.request({
|
|
176
180
|
path: `/api/platform/v1/graph-analysis/changes${toQueryString({
|
|
177
181
|
topicId: requireTopicId(input),
|
|
178
182
|
workspaceId: input.workspaceId,
|
|
@@ -188,11 +192,8 @@ export function createGraphAnalysisClient(config = {}) {
|
|
|
188
192
|
limit: input.limit,
|
|
189
193
|
cursor: input.cursor,
|
|
190
194
|
})}`,
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
: Array.isArray(data)
|
|
194
|
-
? data
|
|
195
|
-
: [], "changes")));
|
|
195
|
+
})
|
|
196
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(readGatewayList(data, "changes"), "changes")));
|
|
196
197
|
},
|
|
197
198
|
computeOrRequestAnalysis(input, idempotencyKey) {
|
|
198
199
|
return gateway.request({
|
package/dist/graphClient.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
2
|
import type { DeleteEdgeResponse, GraphAnalyticsMetric, GraphAnalyticsResponse, GraphNeighborhoodResponse, GraphPathResponse, JsonObject, ListResult, PlatformGraphEdge, PlatformGraphNode, TextAliasInput, TopicIdentifierInput } from "./types";
|
|
3
|
-
export { LucernApiError };
|
|
4
3
|
export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
|
|
5
4
|
export type { CreateEdgeResponse, CreateNodeResponse, DeleteEdgeResponse, GraphAnalyticsMetric, GraphAnalyticsResponse, GraphNeighborhoodResponse, GraphPathResponse, ListResult, QueryEdgesResponse, QueryNodesResponse, UpdateNodeResponse, } from "./types";
|
|
5
|
+
export { LucernApiError };
|
|
6
6
|
/** Configuration for the graph client. */
|
|
7
7
|
export type GraphClientConfig = GatewayClientConfig;
|
|
8
8
|
/** Filter parameters for listing graph nodes. */
|
|
@@ -52,10 +52,10 @@ export type UpdateNodeInput = {
|
|
|
52
52
|
verificationStatus?: string;
|
|
53
53
|
} & TextAliasInput;
|
|
54
54
|
/** Input for retrieving a single graph node by canonical identifier. */
|
|
55
|
-
export
|
|
56
|
-
nodeId?: string;
|
|
55
|
+
export interface GetNodeInput {
|
|
57
56
|
globalId?: string;
|
|
58
|
-
|
|
57
|
+
nodeId?: string;
|
|
58
|
+
}
|
|
59
59
|
/** Filter parameters for listing graph edges. */
|
|
60
60
|
export type ListEdgesInput = {
|
|
61
61
|
edgeId?: string;
|
|
@@ -83,58 +83,58 @@ export type CreateEdgeInput = {
|
|
|
83
83
|
derivationType?: string;
|
|
84
84
|
} & TopicIdentifierInput;
|
|
85
85
|
/** Filter for selecting edges to delete. */
|
|
86
|
-
export
|
|
86
|
+
export interface DeleteEdgeInput {
|
|
87
87
|
edgeId?: string;
|
|
88
|
+
edgeType?: string;
|
|
88
89
|
fromNodeId?: string;
|
|
89
90
|
toNodeId?: string;
|
|
90
|
-
|
|
91
|
-
};
|
|
91
|
+
}
|
|
92
92
|
/** Input for batch-creating multiple graph nodes. */
|
|
93
|
-
export
|
|
94
|
-
nodes:
|
|
95
|
-
}
|
|
93
|
+
export interface BatchCreateNodesInput {
|
|
94
|
+
nodes: CreateNodeInput[];
|
|
95
|
+
}
|
|
96
96
|
/** Input for superseding an existing graph node with a new version. */
|
|
97
|
-
export
|
|
98
|
-
oldNodeId?: string;
|
|
99
|
-
nodeId?: string;
|
|
100
|
-
newGlobalId?: string;
|
|
101
|
-
newCanonicalText?: string;
|
|
102
|
-
text?: string;
|
|
97
|
+
export interface SupersedeNodeInput {
|
|
103
98
|
canonicalText?: string;
|
|
99
|
+
newCanonicalText?: string;
|
|
104
100
|
newContentHash?: string;
|
|
101
|
+
newGlobalId?: string;
|
|
102
|
+
nodeId?: string;
|
|
103
|
+
oldNodeId?: string;
|
|
105
104
|
reason?: string;
|
|
106
|
-
|
|
105
|
+
text?: string;
|
|
106
|
+
}
|
|
107
107
|
/** Input for updating a node's verification state. */
|
|
108
|
-
export
|
|
109
|
-
|
|
108
|
+
export interface VerifyNodeInput {
|
|
109
|
+
confidence?: number;
|
|
110
110
|
id?: string;
|
|
111
|
+
nodeId?: string;
|
|
111
112
|
verificationStatus: string;
|
|
112
|
-
|
|
113
|
-
};
|
|
113
|
+
}
|
|
114
114
|
/** Input for permanently deleting a node via admin-only API. */
|
|
115
|
-
export
|
|
116
|
-
|
|
115
|
+
export interface HardDeleteNodeInput {
|
|
116
|
+
allowBeliefHardDelete?: boolean;
|
|
117
117
|
id?: string;
|
|
118
|
+
nodeId?: string;
|
|
118
119
|
reason: string;
|
|
119
|
-
|
|
120
|
-
};
|
|
120
|
+
}
|
|
121
121
|
/** Input for retrieving the local neighborhood around a graph node. */
|
|
122
|
-
export
|
|
122
|
+
export interface NeighborhoodInput {
|
|
123
123
|
globalId?: string;
|
|
124
124
|
globalIds?: string;
|
|
125
125
|
maxDepth?: number;
|
|
126
|
-
}
|
|
126
|
+
}
|
|
127
127
|
/** Input for finding the shortest path between two graph nodes. */
|
|
128
|
-
export
|
|
128
|
+
export interface PathInput {
|
|
129
129
|
fromGlobalId: string;
|
|
130
|
-
toGlobalId: string;
|
|
131
130
|
maxDepth?: number;
|
|
132
|
-
|
|
131
|
+
toGlobalId: string;
|
|
132
|
+
}
|
|
133
133
|
/** Input for retrieving a specific graph analytics metric. */
|
|
134
|
-
export
|
|
135
|
-
metric?: GraphAnalyticsMetric;
|
|
134
|
+
export interface AnalyticsInput {
|
|
136
135
|
limit?: number;
|
|
137
|
-
|
|
136
|
+
metric?: GraphAnalyticsMetric;
|
|
137
|
+
}
|
|
138
138
|
/** Input for traversing the graph from a starting node. */
|
|
139
139
|
export type TraverseInput = {
|
|
140
140
|
startNode: string;
|
|
@@ -251,7 +251,7 @@ export declare function createGraphClient(config?: GraphClientConfig): {
|
|
|
251
251
|
/**
|
|
252
252
|
* Retrieve graph analytics for the requested metric.
|
|
253
253
|
*/
|
|
254
|
-
getAnalytics(query?: AnalyticsInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalyticsResponse
|
|
254
|
+
getAnalytics(query?: AnalyticsInput): Promise<import("./coreClient").PlatformGatewaySuccess<GraphAnalyticsResponse<GraphAnalyticsMetric>>>;
|
|
255
255
|
} & {
|
|
256
256
|
queryNodes: (query: ListNodesInput) => Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphNode, "nodes">>>;
|
|
257
257
|
queryEdges: (query: ListEdgesInput) => Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<PlatformGraphEdge, "edges">>>;
|