@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.
- package/CHANGELOG.md +12 -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/graphClient.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
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: graphClient preserves this legacy compatibility re-export while package root also exports coreClient.
|
|
4
|
+
LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
5
|
+
import { mapAliasedList, mapGatewayData, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeTopicQuery, withSdkAliases, } from "./sdkSurface.js";
|
|
3
6
|
export { LucernApiError };
|
|
4
7
|
/**
|
|
5
8
|
* Create the low-level graph client for nodes, edges, and graph analytics.
|
|
@@ -12,45 +15,53 @@ export function createGraphClient(config = {}) {
|
|
|
12
15
|
/**
|
|
13
16
|
* List graph nodes matching the provided filters.
|
|
14
17
|
*/
|
|
15
|
-
|
|
16
|
-
return gateway
|
|
18
|
+
listNodes(query) {
|
|
19
|
+
return gateway
|
|
20
|
+
.request({
|
|
17
21
|
path: `/api/platform/v1/graph/nodes${toQueryString(normalizeTopicQuery(query))}`,
|
|
18
|
-
})
|
|
22
|
+
})
|
|
23
|
+
.then((response) => mapGatewayData(response, (data) => mapAliasedList(data, "nodes")));
|
|
19
24
|
},
|
|
20
25
|
/**
|
|
21
26
|
* Retrieve a single graph node by nodeId or globalId.
|
|
22
27
|
*/
|
|
23
|
-
|
|
24
|
-
return gateway
|
|
28
|
+
getNode(query) {
|
|
29
|
+
return gateway
|
|
30
|
+
.request({
|
|
25
31
|
path: `/api/platform/v1/graph/nodes${toQueryString(query)}`,
|
|
26
|
-
})
|
|
32
|
+
})
|
|
33
|
+
.then((response) => mapGatewayData(response, (data) => withSdkAliases(data)));
|
|
27
34
|
},
|
|
28
35
|
/**
|
|
29
36
|
* Create a graph node.
|
|
30
37
|
*/
|
|
31
|
-
|
|
32
|
-
return gateway
|
|
38
|
+
createNode(input, idempotencyKey) {
|
|
39
|
+
return gateway
|
|
40
|
+
.request({
|
|
33
41
|
path: "/api/platform/v1/graph/nodes",
|
|
34
42
|
method: "POST",
|
|
35
43
|
body: normalizeNodeWriteInput(input),
|
|
36
44
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
37
|
-
})
|
|
45
|
+
})
|
|
46
|
+
.then((response) => mapGatewayData(response, (data) => withSdkAliases(data)));
|
|
38
47
|
},
|
|
39
48
|
/**
|
|
40
49
|
* Update a graph node.
|
|
41
50
|
*/
|
|
42
|
-
|
|
43
|
-
return gateway
|
|
51
|
+
updateNode(input, idempotencyKey) {
|
|
52
|
+
return gateway
|
|
53
|
+
.request({
|
|
44
54
|
path: "/api/platform/v1/graph/nodes",
|
|
45
55
|
method: "PUT",
|
|
46
56
|
body: normalizeNodeWriteInput(input),
|
|
47
57
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
48
|
-
})
|
|
58
|
+
})
|
|
59
|
+
.then((response) => mapGatewayData(response, (data) => withSdkAliases(data)));
|
|
49
60
|
},
|
|
50
61
|
/**
|
|
51
62
|
* Batch create graph nodes through the admin route surface.
|
|
52
63
|
*/
|
|
53
|
-
|
|
64
|
+
batchCreateNodes(input, idempotencyKey) {
|
|
54
65
|
return gateway.request({
|
|
55
66
|
path: "/api/platform/v1/graph/nodes/batch",
|
|
56
67
|
method: "POST",
|
|
@@ -63,7 +74,7 @@ export function createGraphClient(config = {}) {
|
|
|
63
74
|
/**
|
|
64
75
|
* Supersede an existing graph node with a new canonical version.
|
|
65
76
|
*/
|
|
66
|
-
|
|
77
|
+
supersedeNode(input, idempotencyKey) {
|
|
67
78
|
return gateway.request({
|
|
68
79
|
path: "/api/platform/v1/graph/nodes/supersede",
|
|
69
80
|
method: "POST",
|
|
@@ -74,7 +85,7 @@ export function createGraphClient(config = {}) {
|
|
|
74
85
|
/**
|
|
75
86
|
* Update a node's verification status.
|
|
76
87
|
*/
|
|
77
|
-
|
|
88
|
+
verifyNode(input, idempotencyKey) {
|
|
78
89
|
const verificationStatus = normalizeNodeVerificationStatus(input.verificationStatus) ??
|
|
79
90
|
input.verificationStatus;
|
|
80
91
|
return gateway.request({
|
|
@@ -90,7 +101,7 @@ export function createGraphClient(config = {}) {
|
|
|
90
101
|
/**
|
|
91
102
|
* Permanently delete a node via the admin-only hard-delete route.
|
|
92
103
|
*/
|
|
93
|
-
|
|
104
|
+
hardDeleteNode(input, idempotencyKey) {
|
|
94
105
|
return gateway.request({
|
|
95
106
|
path: "/api/platform/v1/graph/nodes/hard-delete",
|
|
96
107
|
method: "POST",
|
|
@@ -101,15 +112,17 @@ export function createGraphClient(config = {}) {
|
|
|
101
112
|
/**
|
|
102
113
|
* List graph edges matching the provided filters.
|
|
103
114
|
*/
|
|
104
|
-
|
|
105
|
-
return gateway
|
|
115
|
+
listEdges(query) {
|
|
116
|
+
return gateway
|
|
117
|
+
.request({
|
|
106
118
|
path: `/api/platform/v1/graph/edges${toQueryString(normalizeTopicQuery(query))}`,
|
|
107
|
-
})
|
|
119
|
+
})
|
|
120
|
+
.then((response) => mapGatewayData(response, (data) => mapAliasedList(data, "edges")));
|
|
108
121
|
},
|
|
109
122
|
/**
|
|
110
123
|
* Create a graph edge.
|
|
111
124
|
*/
|
|
112
|
-
|
|
125
|
+
createEdge(input, idempotencyKey) {
|
|
113
126
|
return gateway.request({
|
|
114
127
|
path: "/api/platform/v1/graph/edges",
|
|
115
128
|
method: "POST",
|
|
@@ -120,7 +133,7 @@ export function createGraphClient(config = {}) {
|
|
|
120
133
|
/**
|
|
121
134
|
* Delete one or more edges matching the provided filter.
|
|
122
135
|
*/
|
|
123
|
-
|
|
136
|
+
deleteEdge(query, idempotencyKey) {
|
|
124
137
|
return gateway.request({
|
|
125
138
|
path: `/api/platform/v1/graph/edges${toQueryString(query)}`,
|
|
126
139
|
method: "DELETE",
|
|
@@ -130,7 +143,7 @@ export function createGraphClient(config = {}) {
|
|
|
130
143
|
/**
|
|
131
144
|
* Retrieve a graph neighborhood around a root node.
|
|
132
145
|
*/
|
|
133
|
-
|
|
146
|
+
neighborhood(query) {
|
|
134
147
|
return gateway.request({
|
|
135
148
|
path: `/api/platform/v1/graph/neighborhood${toQueryString(query)}`,
|
|
136
149
|
});
|
|
@@ -138,7 +151,7 @@ export function createGraphClient(config = {}) {
|
|
|
138
151
|
/**
|
|
139
152
|
* Traverse the graph from a starting node.
|
|
140
153
|
*/
|
|
141
|
-
|
|
154
|
+
traverse(query) {
|
|
142
155
|
return gateway.request({
|
|
143
156
|
path: "/api/platform/v1/graph/traverse",
|
|
144
157
|
method: "POST",
|
|
@@ -148,12 +161,16 @@ export function createGraphClient(config = {}) {
|
|
|
148
161
|
/**
|
|
149
162
|
* Analyze graph structure for a topic.
|
|
150
163
|
*/
|
|
151
|
-
|
|
164
|
+
analyze(query = {}) {
|
|
152
165
|
const normalized = normalizeTopicQuery(query);
|
|
153
166
|
return gateway.request({
|
|
154
167
|
path: `/api/platform/v1/graph/analyze${toQueryString({
|
|
155
|
-
topicId: typeof normalized.topicId === "string"
|
|
156
|
-
|
|
168
|
+
topicId: typeof normalized.topicId === "string"
|
|
169
|
+
? normalized.topicId
|
|
170
|
+
: undefined,
|
|
171
|
+
metric: typeof normalized.metric === "string"
|
|
172
|
+
? normalized.metric
|
|
173
|
+
: undefined,
|
|
157
174
|
limit: typeof normalized.limit === "number" ? normalized.limit : undefined,
|
|
158
175
|
})}`,
|
|
159
176
|
});
|
|
@@ -161,11 +178,13 @@ export function createGraphClient(config = {}) {
|
|
|
161
178
|
/**
|
|
162
179
|
* Detect confirmation-bias patterns for a topic graph.
|
|
163
180
|
*/
|
|
164
|
-
|
|
181
|
+
bias(query = {}) {
|
|
165
182
|
const normalized = normalizeTopicQuery(query);
|
|
166
183
|
return gateway.request({
|
|
167
184
|
path: `/api/platform/v1/graph/bias${toQueryString({
|
|
168
|
-
topicId: typeof normalized.topicId === "string"
|
|
185
|
+
topicId: typeof normalized.topicId === "string"
|
|
186
|
+
? normalized.topicId
|
|
187
|
+
: undefined,
|
|
169
188
|
threshold: typeof normalized.threshold === "number"
|
|
170
189
|
? normalized.threshold
|
|
171
190
|
: undefined,
|
|
@@ -176,11 +195,13 @@ export function createGraphClient(config = {}) {
|
|
|
176
195
|
/**
|
|
177
196
|
* Find graph gaps for beliefs that still need testing.
|
|
178
197
|
*/
|
|
179
|
-
|
|
198
|
+
gaps(query) {
|
|
180
199
|
const normalized = normalizeTopicQuery(query);
|
|
181
200
|
return gateway.request({
|
|
182
201
|
path: `/api/platform/v1/graph/gaps${toQueryString({
|
|
183
|
-
topicId: typeof normalized.topicId === "string"
|
|
202
|
+
topicId: typeof normalized.topicId === "string"
|
|
203
|
+
? normalized.topicId
|
|
204
|
+
: undefined,
|
|
184
205
|
minConfidence: typeof normalized.minConfidence === "number"
|
|
185
206
|
? normalized.minConfidence
|
|
186
207
|
: undefined,
|
|
@@ -190,7 +211,7 @@ export function createGraphClient(config = {}) {
|
|
|
190
211
|
/**
|
|
191
212
|
* Search across graph resources within a topic.
|
|
192
213
|
*/
|
|
193
|
-
|
|
214
|
+
search(query) {
|
|
194
215
|
return gateway.request({
|
|
195
216
|
path: "/api/platform/v1/search",
|
|
196
217
|
method: "POST",
|
|
@@ -200,7 +221,7 @@ export function createGraphClient(config = {}) {
|
|
|
200
221
|
/**
|
|
201
222
|
* Retrieve the shortest known path between two graph nodes.
|
|
202
223
|
*/
|
|
203
|
-
|
|
224
|
+
getPath(query) {
|
|
204
225
|
return gateway.request({
|
|
205
226
|
path: `/api/platform/v1/graph/path${toQueryString(query)}`,
|
|
206
227
|
});
|
|
@@ -208,7 +229,7 @@ export function createGraphClient(config = {}) {
|
|
|
208
229
|
/**
|
|
209
230
|
* Retrieve graph analytics for the requested metric.
|
|
210
231
|
*/
|
|
211
|
-
|
|
232
|
+
getAnalytics(query = {}) {
|
|
212
233
|
return gateway.request({
|
|
213
234
|
path: `/api/platform/v1/graph/analytics${toQueryString(query)}`,
|
|
214
235
|
});
|
package/dist/graphIntel.js
CHANGED
|
@@ -1,2 +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.
|
|
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
|
export * from "@lucern/reasoning-kernel/graphIntel";
|
|
2
4
|
//# sourceMappingURL=graphIntel.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from "./graphIntel.js";
|
|
2
|
-
export { fillGraphIntelligencePromptTemplate, getGraphIntelligenceQuery, GRAPH_INTELLIGENCE_MODE_TOOL_NAMES, GRAPH_INTELLIGENCE_PUBLIC_TOOL_NAMES, GRAPH_INTELLIGENCE_QUERIES, GRAPH_INTELLIGENCE_QUERIES_WITH_TOOLS, GRAPH_INTELLIGENCE_QUERY_CATALOG_VERSION, GRAPH_INTELLIGENCE_QUERY_CATEGORIES, GRAPH_INTELLIGENCE_QUERY_MODES, GRAPH_INTELLIGENCE_QUICK_QUERIES, isGraphIntelligenceQueryMode, listGraphIntelligenceQueries, } from "@lucern/contracts/graph-intelligence.contract";
|
|
3
1
|
export type { GraphIntelligenceCatalogFilter, GraphIntelligencePublicToolName, GraphIntelligenceQueryCategory, GraphIntelligenceQueryDefinition, GraphIntelligenceQueryId, GraphIntelligenceQueryInputType, GraphIntelligenceQueryMode, GraphIntelligenceQueryWithTools, GraphIntelligenceQuickQuery, } from "@lucern/contracts/graph-intelligence.contract";
|
|
2
|
+
export { fillGraphIntelligencePromptTemplate, GRAPH_INTELLIGENCE_MODE_TOOL_NAMES, GRAPH_INTELLIGENCE_PUBLIC_TOOL_NAMES, GRAPH_INTELLIGENCE_QUERIES, GRAPH_INTELLIGENCE_QUERIES_WITH_TOOLS, GRAPH_INTELLIGENCE_QUERY_CATALOG_VERSION, GRAPH_INTELLIGENCE_QUERY_CATEGORIES, GRAPH_INTELLIGENCE_QUERY_MODES, GRAPH_INTELLIGENCE_QUICK_QUERIES, getGraphIntelligenceQuery, isGraphIntelligenceQueryMode, listGraphIntelligenceQueries, } from "@lucern/contracts/graph-intelligence.contract";
|
|
3
|
+
export * from "./graphIntel.js";
|
|
4
4
|
//# sourceMappingURL=graphIntelligence.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
+
export { fillGraphIntelligencePromptTemplate, GRAPH_INTELLIGENCE_MODE_TOOL_NAMES, GRAPH_INTELLIGENCE_PUBLIC_TOOL_NAMES, GRAPH_INTELLIGENCE_QUERIES, GRAPH_INTELLIGENCE_QUERIES_WITH_TOOLS, GRAPH_INTELLIGENCE_QUERY_CATALOG_VERSION, GRAPH_INTELLIGENCE_QUERY_CATEGORIES, GRAPH_INTELLIGENCE_QUERY_MODES, GRAPH_INTELLIGENCE_QUICK_QUERIES, getGraphIntelligenceQuery, isGraphIntelligenceQueryMode, listGraphIntelligenceQueries, } from "@lucern/contracts/graph-intelligence.contract";
|
|
1
2
|
export * from "./graphIntel.js";
|
|
2
|
-
export { fillGraphIntelligencePromptTemplate, getGraphIntelligenceQuery, GRAPH_INTELLIGENCE_MODE_TOOL_NAMES, GRAPH_INTELLIGENCE_PUBLIC_TOOL_NAMES, GRAPH_INTELLIGENCE_QUERIES, GRAPH_INTELLIGENCE_QUERIES_WITH_TOOLS, GRAPH_INTELLIGENCE_QUERY_CATALOG_VERSION, GRAPH_INTELLIGENCE_QUERY_CATEGORIES, GRAPH_INTELLIGENCE_QUERY_MODES, GRAPH_INTELLIGENCE_QUICK_QUERIES, isGraphIntelligenceQueryMode, listGraphIntelligenceQueries, } from "@lucern/contracts/graph-intelligence.contract";
|
|
3
3
|
//# sourceMappingURL=graphIntelligence.js.map
|
|
@@ -4,45 +4,45 @@ export type GraphRecommendationsClientConfig = GatewayClientConfig;
|
|
|
4
4
|
export declare const GRAPH_RECOMMENDATION_FIELDS: readonly ["topicId", "projectId", "workspaceId", "limit", "cursor", "status", "findingId", "actionType", "targetNodeIds", "priority", "rationale", "healthScore", "metadata"];
|
|
5
5
|
export type GraphRecommendationStatus = "open" | "accepted" | "dismissed" | "applied" | "superseded";
|
|
6
6
|
export type GraphRecommendationPriority = "P0" | "P1" | "P2" | "P3" | "critical" | "high" | "medium" | "low";
|
|
7
|
-
export
|
|
8
|
-
recommendationId: string;
|
|
9
|
-
topicId?: string;
|
|
10
|
-
workspaceId?: string;
|
|
11
|
-
findingId?: string;
|
|
7
|
+
export interface GraphRecommendationRecord {
|
|
12
8
|
actionType: string;
|
|
13
|
-
|
|
9
|
+
createdAt?: number;
|
|
10
|
+
findingId?: string;
|
|
11
|
+
healthScore?: number;
|
|
12
|
+
metadata?: JsonObject | null;
|
|
14
13
|
priority?: GraphRecommendationPriority | string;
|
|
15
14
|
rationale?: string;
|
|
16
|
-
|
|
15
|
+
recommendationId: string;
|
|
17
16
|
status?: GraphRecommendationStatus;
|
|
18
|
-
|
|
19
|
-
createdAt?: number;
|
|
20
|
-
updatedAt?: number;
|
|
21
|
-
};
|
|
22
|
-
export type GraphRecommendationListInput = {
|
|
17
|
+
targetNodeIds?: string[];
|
|
23
18
|
topicId?: string;
|
|
24
|
-
|
|
25
|
-
projectId?: string;
|
|
19
|
+
updatedAt?: number;
|
|
26
20
|
workspaceId?: string;
|
|
27
|
-
|
|
21
|
+
}
|
|
22
|
+
export interface GraphRecommendationListInput {
|
|
23
|
+
actionType?: string;
|
|
28
24
|
cursor?: string;
|
|
29
|
-
status?: GraphRecommendationStatus;
|
|
30
25
|
findingId?: string;
|
|
31
|
-
|
|
26
|
+
healthScore?: number;
|
|
27
|
+
limit?: number;
|
|
28
|
+
metadata?: JsonObject;
|
|
32
29
|
priority?: GraphRecommendationPriority | string;
|
|
30
|
+
/** @deprecated Use topicId. */
|
|
31
|
+
projectId?: string;
|
|
32
|
+
status?: GraphRecommendationStatus;
|
|
33
33
|
targetNodeIds?: string[];
|
|
34
|
-
|
|
34
|
+
topicId?: string;
|
|
35
|
+
workspaceId?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface MarkGraphRecommendationStatusInput {
|
|
35
38
|
metadata?: JsonObject;
|
|
36
|
-
|
|
37
|
-
export type MarkGraphRecommendationStatusInput = {
|
|
39
|
+
rationale?: string;
|
|
38
40
|
recommendationId: string;
|
|
39
41
|
status: GraphRecommendationStatus;
|
|
40
|
-
|
|
41
|
-
metadata?: JsonObject;
|
|
42
|
-
};
|
|
42
|
+
}
|
|
43
43
|
export type GraphRecommendationListResponse = ListResult<GraphRecommendationRecord, "recommendations">;
|
|
44
44
|
export declare function createGraphRecommendationsClient(config?: GraphRecommendationsClientConfig): {
|
|
45
|
-
listForTopic(input: GraphRecommendationListInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<
|
|
45
|
+
listForTopic(input: GraphRecommendationListInput): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<GraphRecommendationRecord, "recommendations">>>;
|
|
46
46
|
getRecommendation(recommendationId: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphRecommendationRecord>>;
|
|
47
47
|
markRecommendationStatus(input: MarkGraphRecommendationStatusInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<GraphRecommendationRecord>>;
|
|
48
48
|
};
|
|
@@ -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, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
3
|
import { createListResult, mapGatewayData } from "./sdkSurface.js";
|
|
3
4
|
export const GRAPH_RECOMMENDATION_FIELDS = [
|
|
@@ -49,16 +50,20 @@ function listQuery(input) {
|
|
|
49
50
|
}
|
|
50
51
|
export function createGraphRecommendationsClient(config = {}) {
|
|
51
52
|
const gateway = createGatewayRequestClient(config);
|
|
53
|
+
function recommendationRows(data) {
|
|
54
|
+
const record = data;
|
|
55
|
+
if (Array.isArray(record.recommendations)) {
|
|
56
|
+
return record.recommendations;
|
|
57
|
+
}
|
|
58
|
+
return Array.isArray(data) ? data : [];
|
|
59
|
+
}
|
|
52
60
|
return {
|
|
53
61
|
listForTopic(input) {
|
|
54
|
-
return gateway
|
|
62
|
+
return gateway
|
|
63
|
+
.request({
|
|
55
64
|
path: `/api/platform/v1/graph-recommendations${toQueryString(listQuery(input))}`,
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
.recommendations
|
|
59
|
-
: Array.isArray(data)
|
|
60
|
-
? data
|
|
61
|
-
: [], "recommendations")));
|
|
65
|
+
})
|
|
66
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(recommendationRows(data), "recommendations")));
|
|
62
67
|
},
|
|
63
68
|
getRecommendation(recommendationId) {
|
|
64
69
|
return gateway.request({
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
+
import { type TopicProjectAliasInput } from "./boundary-client-surface";
|
|
1
2
|
import { type GatewayClientConfig } from "./coreClient";
|
|
2
|
-
import { type TopicProjectAliasInput } from "./boundaryClientSurface";
|
|
3
3
|
import type { JsonObject, ListResult } from "./types";
|
|
4
4
|
export type GraphStateClassifierClientConfig = GatewayClientConfig;
|
|
5
5
|
export declare const GRAPH_STATE_CLASSIFIER_FIELDS: readonly ["topicId", "projectId", "workspaceId", "nodeId", "epistemicStatus", "beliefMaturity", "answerQuality", "evidenceNetwork", "logicalRole", "questionPriority", "layer", "modelVersion", "limit", "cursor", "metadata"];
|
|
6
|
-
export
|
|
6
|
+
export interface GraphStateClassification {
|
|
7
|
+
answerQuality?: string;
|
|
8
|
+
beliefMaturity?: string;
|
|
7
9
|
classificationId?: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
nodeId?: string;
|
|
10
|
+
confidence?: number;
|
|
11
|
+
createdAt?: number;
|
|
11
12
|
epistemicStatus?: string;
|
|
12
|
-
beliefMaturity?: string;
|
|
13
|
-
answerQuality?: string;
|
|
14
13
|
evidenceNetwork?: string;
|
|
15
|
-
logicalRole?: string;
|
|
16
|
-
questionPriority?: string;
|
|
17
14
|
layer?: string;
|
|
18
|
-
|
|
19
|
-
confidence?: number;
|
|
15
|
+
logicalRole?: string;
|
|
20
16
|
metadata?: JsonObject | null;
|
|
21
|
-
|
|
17
|
+
modelVersion?: string;
|
|
18
|
+
nodeId?: string;
|
|
19
|
+
questionPriority?: string;
|
|
20
|
+
topicId: string;
|
|
22
21
|
updatedAt?: number;
|
|
23
|
-
|
|
22
|
+
workspaceId?: string;
|
|
23
|
+
}
|
|
24
24
|
export type ClassifyNodeInput = TopicProjectAliasInput & {
|
|
25
25
|
workspaceId: string;
|
|
26
26
|
nodeId: string;
|
|
@@ -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, listResultFromEnvelope, requireTopicId, topicPayload, } from "./boundary-client-surface.js";
|
|
1
3
|
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { cleanRequiredString, listResultFromEnvelope, requireTopicId, topicPayload, } from "./boundaryClientSurface.js";
|
|
3
4
|
import { mapGatewayData } from "./sdkSurface.js";
|
|
4
5
|
export const GRAPH_STATE_CLASSIFIER_FIELDS = [
|
|
5
6
|
"topicId",
|
|
@@ -38,15 +39,18 @@ export function createGraphStateClassifierClient(config = {}) {
|
|
|
38
39
|
},
|
|
39
40
|
classifyTopic(input, idempotencyKey) {
|
|
40
41
|
cleanRequiredString(input.workspaceId, "workspaceId");
|
|
41
|
-
return gateway
|
|
42
|
+
return gateway
|
|
43
|
+
.request({
|
|
42
44
|
path: "/api/platform/v1/graph-state-classifier/classify-topic",
|
|
43
45
|
method: "POST",
|
|
44
46
|
body: topicPayload(input, GRAPH_STATE_CLASSIFIER_FIELDS, "graphStateClassifier.classifyTopic"),
|
|
45
47
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
46
|
-
})
|
|
48
|
+
})
|
|
49
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "classifications")));
|
|
47
50
|
},
|
|
48
51
|
listClassifications(input) {
|
|
49
|
-
return gateway
|
|
52
|
+
return gateway
|
|
53
|
+
.request({
|
|
50
54
|
path: `/api/platform/v1/graph-state-classifier/classifications${toQueryString({
|
|
51
55
|
topicId: requireTopicId(input),
|
|
52
56
|
workspaceId: input.workspaceId,
|
|
@@ -57,7 +61,8 @@ export function createGraphStateClassifierClient(config = {}) {
|
|
|
57
61
|
limit: input.limit,
|
|
58
62
|
cursor: input.cursor,
|
|
59
63
|
})}`,
|
|
60
|
-
})
|
|
64
|
+
})
|
|
65
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "classifications")));
|
|
61
66
|
},
|
|
62
67
|
recordClassification(input, idempotencyKey) {
|
|
63
68
|
return gateway.request({
|
package/dist/harnessClient.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
|
|
2
2
|
import type { JsonObject, JsonValue, TopicIdentifierInput } from "./types";
|
|
3
|
-
export { LucernApiError };
|
|
4
3
|
export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
|
|
4
|
+
export { LucernApiError };
|
|
5
5
|
/** Configuration for the harness client. Inherits gateway transport settings. */
|
|
6
6
|
export type HarnessClientConfig = GatewayClientConfig;
|
|
7
|
-
export
|
|
7
|
+
export interface HarnessAgentGuardrails {
|
|
8
|
+
allowedOrigins?: string[];
|
|
9
|
+
allowNetworkEgress?: boolean;
|
|
10
|
+
heartbeatIntervalMs?: number;
|
|
8
11
|
isolationMode?: "direct" | "sandbox";
|
|
9
12
|
maxExecutionMs?: number;
|
|
10
|
-
heartbeatIntervalMs?: number;
|
|
11
13
|
maxToolCalls?: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type HarnessAgentRuntimeConfig = {
|
|
16
|
-
entryPoint?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface HarnessAgentRuntimeConfig {
|
|
16
|
+
auditMode?: "harness" | "master_control";
|
|
17
17
|
callbackUrl?: string;
|
|
18
|
+
entryPoint?: string;
|
|
18
19
|
modelRouting?: "model_machine" | "tenant_proxy" | "bring_your_own";
|
|
19
|
-
|
|
20
|
-
};
|
|
20
|
+
}
|
|
21
21
|
/** Input for creating or updating an agent definition in the harness registry. */
|
|
22
22
|
export type HarnessAgentWriteInput = GatewayScope & {
|
|
23
23
|
agentDefinitionId?: string;
|
|
@@ -78,29 +78,7 @@ export type HarnessExecuteToolInput = GatewayScope & {
|
|
|
78
78
|
version?: string;
|
|
79
79
|
transportKind?: string;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
82
|
-
tool: {
|
|
83
|
-
toolId: string;
|
|
84
|
-
toolName: string;
|
|
85
|
-
version: string;
|
|
86
|
-
status: "active" | "deprecated" | "disabled";
|
|
87
|
-
executionAdapter: "convex_mutation" | "convex_action" | "http_callback" | "mcp_tool" | "sdk_invocation" | "external_observed";
|
|
88
|
-
gateClassification: "core" | "shimmed";
|
|
89
|
-
scopeRequirements: string[];
|
|
90
|
-
safetyMetadata: {
|
|
91
|
-
readOnly: boolean;
|
|
92
|
-
idempotent: boolean;
|
|
93
|
-
sideEffectLevel: "none" | "low" | "high";
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
execution: {
|
|
97
|
-
input: JsonObject;
|
|
98
|
-
transportKind: string;
|
|
99
|
-
startedAt: number;
|
|
100
|
-
completedAt: number;
|
|
101
|
-
durationMs: number;
|
|
102
|
-
};
|
|
103
|
-
envelope: JsonObject | null;
|
|
81
|
+
export interface HarnessExecuteToolResult {
|
|
104
82
|
audit: {
|
|
105
83
|
toolName: string;
|
|
106
84
|
contractName: string;
|
|
@@ -115,12 +93,34 @@ export type HarnessExecuteToolResult = {
|
|
|
115
93
|
policyTraceId?: string | null;
|
|
116
94
|
invariant?: string | null;
|
|
117
95
|
} | null;
|
|
96
|
+
envelope: JsonObject | null;
|
|
97
|
+
execution: {
|
|
98
|
+
input: JsonObject;
|
|
99
|
+
transportKind: string;
|
|
100
|
+
startedAt: number;
|
|
101
|
+
completedAt: number;
|
|
102
|
+
durationMs: number;
|
|
103
|
+
};
|
|
118
104
|
output: {
|
|
119
105
|
isError: boolean;
|
|
120
106
|
parsed: JsonValue;
|
|
121
107
|
raw: JsonValue;
|
|
122
108
|
};
|
|
123
|
-
|
|
109
|
+
tool: {
|
|
110
|
+
toolId: string;
|
|
111
|
+
toolName: string;
|
|
112
|
+
version: string;
|
|
113
|
+
status: "active" | "deprecated" | "disabled";
|
|
114
|
+
executionAdapter: "convex_mutation" | "convex_action" | "http_callback" | "mcp_tool" | "sdk_invocation" | "external_observed";
|
|
115
|
+
gateClassification: "core" | "shimmed";
|
|
116
|
+
scopeRequirements: string[];
|
|
117
|
+
safetyMetadata: {
|
|
118
|
+
readOnly: boolean;
|
|
119
|
+
idempotent: boolean;
|
|
120
|
+
sideEffectLevel: "none" | "low" | "high";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
124
|
/** Input for starting a new harness run (agent execution session). */
|
|
125
125
|
export type HarnessStartRunInput = GatewayScope & {
|
|
126
126
|
agentDefinitionId: string;
|
|
@@ -139,46 +139,46 @@ export type HarnessInvokeManagedAgentInput = GatewayScope & {
|
|
|
139
139
|
metadata?: JsonObject;
|
|
140
140
|
};
|
|
141
141
|
/** Input for reporting a ledger event (tool call, prompt resolution, or policy decision) within a run. */
|
|
142
|
-
export
|
|
143
|
-
reportingToken: string;
|
|
144
|
-
type: "tool_call" | "prompt_resolution" | "policy_decision";
|
|
145
|
-
metadata?: JsonObject;
|
|
146
|
-
toolCallId?: string;
|
|
147
|
-
toolName?: string;
|
|
148
|
-
executionAdapter?: "convex_mutation" | "convex_action" | "http_callback" | "mcp_tool" | "sdk_invocation" | "external_observed";
|
|
149
|
-
policyDecisionId?: string;
|
|
150
|
-
requiredScopes?: string[];
|
|
151
|
-
policyResult?: "allowed" | "denied";
|
|
152
|
-
policyReasonCode?: string;
|
|
153
|
-
inputHash?: string;
|
|
154
|
-
outputHash?: string;
|
|
155
|
-
durationMs?: number;
|
|
156
|
-
success?: boolean;
|
|
157
|
-
startedAt?: number;
|
|
142
|
+
export interface HarnessRunReportInput {
|
|
158
143
|
completedAt?: number;
|
|
159
|
-
input?: JsonObject;
|
|
160
|
-
result?: JsonValue;
|
|
161
|
-
promptKey?: string;
|
|
162
|
-
promptVersion?: string;
|
|
163
144
|
decision?: string;
|
|
164
|
-
|
|
165
|
-
latencyMs?: number;
|
|
145
|
+
durationMs?: number;
|
|
166
146
|
error?: string | {
|
|
167
147
|
code?: string;
|
|
168
148
|
message: string;
|
|
169
149
|
details?: JsonValue;
|
|
170
150
|
};
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
151
|
+
executionAdapter?: "convex_mutation" | "convex_action" | "http_callback" | "mcp_tool" | "sdk_invocation" | "external_observed";
|
|
152
|
+
input?: JsonObject;
|
|
153
|
+
inputHash?: string;
|
|
154
|
+
latencyMs?: number;
|
|
155
|
+
metadata?: JsonObject;
|
|
156
|
+
outputHash?: string;
|
|
157
|
+
policyDecisionId?: string;
|
|
158
|
+
policyReasonCode?: string;
|
|
159
|
+
policyResult?: "allowed" | "denied";
|
|
160
|
+
promptKey?: string;
|
|
161
|
+
promptVersion?: string;
|
|
162
|
+
reasonCode?: string;
|
|
174
163
|
reportingToken: string;
|
|
175
|
-
|
|
164
|
+
requiredScopes?: string[];
|
|
165
|
+
result?: JsonValue;
|
|
166
|
+
startedAt?: number;
|
|
167
|
+
success?: boolean;
|
|
168
|
+
toolCallId?: string;
|
|
169
|
+
toolName?: string;
|
|
170
|
+
type: "tool_call" | "prompt_resolution" | "policy_decision";
|
|
171
|
+
}
|
|
172
|
+
/** Input for completing a harness run with a terminal status. */
|
|
173
|
+
export interface HarnessCompleteRunInput {
|
|
176
174
|
error?: {
|
|
177
175
|
category: "policy_denied" | "tool_execution" | "prompt_resolution" | "model_error" | "timeout" | "heartbeat_timeout" | "input_validation" | "internal" | "external_service";
|
|
178
176
|
message: string;
|
|
179
177
|
code?: string;
|
|
180
178
|
};
|
|
181
|
-
|
|
179
|
+
reportingToken: string;
|
|
180
|
+
status: "completed" | "failed" | "timeout";
|
|
181
|
+
}
|
|
182
182
|
/**
|
|
183
183
|
* Create the harness client for agent and tool registry operations.
|
|
184
184
|
*/
|