@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.
- package/CHANGELOG.md +8 -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/decisions/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
import { createLucernClient } from "../client.js";
|
|
2
3
|
export * as methodSchemas from "@lucern/contracts/sdk-methods.contract";
|
|
3
4
|
export * as toolSchemas from "@lucern/contracts/tool-contracts";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
2
|
import type { GetJudgmentResponse, JudgmentCalibrationResponse, JudgmentReadinessResponse, JudgmentTransitionAuditIntegrityResponse, ListJudgmentsResponse, PendingJudgmentOutcomeRecord, RecordJudgmentOutcomeResponse, RecordJudgmentResponse, TopicIdentifierInput } from "./types";
|
|
3
|
-
export { LucernApiError };
|
|
4
3
|
export type { PlatformGatewaySuccess } from "./coreClient";
|
|
5
4
|
export type { GetJudgmentResponse, JudgmentCalibrationResponse, JudgmentReadinessResponse, JudgmentTransitionAuditIntegrityResponse, ListJudgmentsResponse, PendingJudgmentOutcomeReviewResponse, RecordJudgmentOutcomeResponse, RecordJudgmentResponse, } from "./types";
|
|
5
|
+
export { LucernApiError };
|
|
6
6
|
/** Configuration for the decisions client. */
|
|
7
7
|
export type DecisionsClientConfig = GatewayClientConfig;
|
|
8
8
|
/** Input for recording a new judgment (irreversible decision commitment). */
|
|
@@ -32,11 +32,11 @@ export type ListJudgmentsInput = {
|
|
|
32
32
|
limit?: number;
|
|
33
33
|
} & TopicIdentifierInput;
|
|
34
34
|
/** Input for recording the real-world outcome of a judgment. */
|
|
35
|
-
export
|
|
35
|
+
export interface RecordJudgmentOutcomeInput {
|
|
36
|
+
notes?: string;
|
|
36
37
|
outcome: "pending" | "successful" | "unsuccessful" | "mixed" | "unknown" | "too_early";
|
|
37
38
|
outcomeNotes?: string;
|
|
38
|
-
|
|
39
|
-
};
|
|
39
|
+
}
|
|
40
40
|
/** Input for retrieving judgment calibration analytics. */
|
|
41
41
|
export type GetJudgmentCalibrationInput = {
|
|
42
42
|
topicId?: string;
|
package/dist/decisionsClient.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
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: decisionsClient preserves this legacy compatibility re-export while package root also exports coreClient.
|
|
4
|
+
LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
5
|
import { createListResult, mapGatewayData, normalizeTopicQuery, withTopicAlias, } from "./sdkSurface.js";
|
|
3
6
|
export { LucernApiError };
|
|
7
|
+
function booleanQueryParam(value) {
|
|
8
|
+
if (typeof value !== "boolean") {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
return value ? "true" : "false";
|
|
12
|
+
}
|
|
4
13
|
/**
|
|
5
14
|
* Create the judgments client for decision lifecycle operations.
|
|
6
15
|
* @param config - Gateway transport configuration.
|
|
@@ -12,18 +21,16 @@ export function createDecisionsClient(config = {}) {
|
|
|
12
21
|
/**
|
|
13
22
|
* List judgments for a topic scope.
|
|
14
23
|
*/
|
|
15
|
-
|
|
16
|
-
return gateway
|
|
24
|
+
listJudgments(query) {
|
|
25
|
+
return gateway
|
|
26
|
+
.request({
|
|
17
27
|
path: `/api/platform/v1/graph/judgments${toQueryString({
|
|
18
28
|
...normalizeTopicQuery(query),
|
|
19
|
-
includeArchived:
|
|
20
|
-
? query.includeArchived
|
|
21
|
-
? "true"
|
|
22
|
-
: "false"
|
|
23
|
-
: undefined,
|
|
29
|
+
includeArchived: booleanQueryParam(query.includeArchived),
|
|
24
30
|
limit: query.limit,
|
|
25
31
|
})}`,
|
|
26
|
-
})
|
|
32
|
+
})
|
|
33
|
+
.then((response) => mapGatewayData(response, (data) => {
|
|
27
34
|
const rows = Array.isArray(data) ? data : [];
|
|
28
35
|
const judgments = rows.map((row) => withTopicAlias(row));
|
|
29
36
|
return {
|
|
@@ -34,17 +41,19 @@ export function createDecisionsClient(config = {}) {
|
|
|
34
41
|
/**
|
|
35
42
|
* Get a single judgment by identifier.
|
|
36
43
|
*/
|
|
37
|
-
|
|
38
|
-
return gateway
|
|
44
|
+
getJudgment(judgmentId) {
|
|
45
|
+
return gateway
|
|
46
|
+
.request({
|
|
39
47
|
path: `/api/platform/v1/graph/judgments/${encodeURIComponent(judgmentId)}`,
|
|
40
|
-
})
|
|
48
|
+
})
|
|
49
|
+
.then((response) => mapGatewayData(response, (data) => data && typeof data === "object"
|
|
41
50
|
? withTopicAlias(data)
|
|
42
51
|
: data));
|
|
43
52
|
},
|
|
44
53
|
/**
|
|
45
54
|
* Get readiness signals for creating a judgment.
|
|
46
55
|
*/
|
|
47
|
-
|
|
56
|
+
getJudgmentReadiness(query) {
|
|
48
57
|
return gateway.request({
|
|
49
58
|
path: `/api/platform/v1/graph/judgments/readiness${toQueryString(normalizeTopicQuery(query))}`,
|
|
50
59
|
});
|
|
@@ -52,7 +61,7 @@ export function createDecisionsClient(config = {}) {
|
|
|
52
61
|
/**
|
|
53
62
|
* Get calibration analytics for judgment outcomes.
|
|
54
63
|
*/
|
|
55
|
-
|
|
64
|
+
getJudgmentCalibration(query) {
|
|
56
65
|
return gateway.request({
|
|
57
66
|
path: `/api/platform/v1/graph/judgments/calibration${toQueryString(normalizeTopicQuery(query))}`,
|
|
58
67
|
});
|
|
@@ -60,10 +69,12 @@ export function createDecisionsClient(config = {}) {
|
|
|
60
69
|
/**
|
|
61
70
|
* List judgments still awaiting outcome review.
|
|
62
71
|
*/
|
|
63
|
-
|
|
64
|
-
return gateway
|
|
72
|
+
listPendingOutcomeReviews(query) {
|
|
73
|
+
return gateway
|
|
74
|
+
.request({
|
|
65
75
|
path: `/api/platform/v1/graph/judgments/pending-outcome-review${toQueryString(normalizeTopicQuery(query))}`,
|
|
66
|
-
})
|
|
76
|
+
})
|
|
77
|
+
.then((response) => mapGatewayData(response, (data) => {
|
|
67
78
|
const rows = Array.isArray(data) ? data : [];
|
|
68
79
|
const reviews = rows.map((row) => withTopicAlias(row));
|
|
69
80
|
return createListResult(reviews, "reviews");
|
|
@@ -72,34 +83,32 @@ export function createDecisionsClient(config = {}) {
|
|
|
72
83
|
/**
|
|
73
84
|
* Get audit integrity checks for judgment transitions.
|
|
74
85
|
*/
|
|
75
|
-
|
|
86
|
+
getJudgmentTransitionAuditIntegrity(query) {
|
|
76
87
|
return gateway.request({
|
|
77
88
|
path: `/api/platform/v1/graph/judgments/transition-audit-integrity${toQueryString({
|
|
78
89
|
...normalizeTopicQuery(query),
|
|
79
90
|
judgmentId: query.judgmentId,
|
|
80
|
-
includePassing:
|
|
81
|
-
? query.includePassing
|
|
82
|
-
? "true"
|
|
83
|
-
: "false"
|
|
84
|
-
: undefined,
|
|
91
|
+
includePassing: booleanQueryParam(query.includePassing),
|
|
85
92
|
})}`,
|
|
86
93
|
});
|
|
87
94
|
},
|
|
88
95
|
/**
|
|
89
96
|
* Create a judgment.
|
|
90
97
|
*/
|
|
91
|
-
|
|
92
|
-
return gateway
|
|
98
|
+
createJudgment(input, idempotencyKey) {
|
|
99
|
+
return gateway
|
|
100
|
+
.request({
|
|
93
101
|
path: "/api/platform/v1/graph/judgments",
|
|
94
102
|
method: "POST",
|
|
95
103
|
body: normalizeTopicQuery(input),
|
|
96
104
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
97
|
-
})
|
|
105
|
+
})
|
|
106
|
+
.then((response) => mapGatewayData(response, (data) => withTopicAlias(data)));
|
|
98
107
|
},
|
|
99
108
|
/**
|
|
100
109
|
* Update the outcome for an existing judgment.
|
|
101
110
|
*/
|
|
102
|
-
|
|
111
|
+
updateJudgmentOutcome(judgmentId, input, idempotencyKey) {
|
|
103
112
|
return gateway.request({
|
|
104
113
|
path: `/api/platform/v1/graph/judgments/${encodeURIComponent(judgmentId)}/outcome`,
|
|
105
114
|
method: "POST",
|
package/dist/edges/index.d.ts
CHANGED
|
@@ -16,21 +16,21 @@ export declare function createEdgesClient(config?: EdgesClientConfig): {
|
|
|
16
16
|
weight?: number;
|
|
17
17
|
context?: string;
|
|
18
18
|
reasoning?: string;
|
|
19
|
-
}, idempotencyKey?: string) =>
|
|
19
|
+
}, idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
20
20
|
listEdges: (args: {
|
|
21
21
|
sourceId: string;
|
|
22
22
|
edgeType?: string;
|
|
23
23
|
limit?: number;
|
|
24
24
|
cursor?: string;
|
|
25
|
-
}) =>
|
|
25
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
26
26
|
traverseEdges: (args: {
|
|
27
27
|
startNode: string;
|
|
28
28
|
direction?: string;
|
|
29
29
|
maxDepth?: number;
|
|
30
30
|
topicId?: string;
|
|
31
|
-
}) =>
|
|
32
|
-
updateEdge: (input: import("..").FunctionSurfaceInput, idempotencyKey?: string) =>
|
|
33
|
-
removeEdge: (input: import("..").FunctionSurfaceInput, idempotencyKey?: string) =>
|
|
31
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
32
|
+
updateEdge: (input: import("..").FunctionSurfaceInput, idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
33
|
+
removeEdge: (input: import("..").FunctionSurfaceInput, idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
34
34
|
raw: {
|
|
35
35
|
create(args: import("..").FunctionSurfaceInput & {
|
|
36
36
|
from?: unknown;
|
|
@@ -43,29 +43,31 @@ export declare function createEdgesClient(config?: EdgesClientConfig): {
|
|
|
43
43
|
weight?: number;
|
|
44
44
|
context?: string;
|
|
45
45
|
reasoning?: string;
|
|
46
|
-
}, idempotencyKey?: string):
|
|
47
|
-
createEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
48
|
-
update(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
49
|
-
updateEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
50
|
-
remove(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
51
|
-
removeEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
52
|
-
removeBetween(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
53
|
-
removeEdgesBetween(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
54
|
-
batchCreate(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
55
|
-
batchCreateEdges(input: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
56
|
-
delete(input: Parameters<(
|
|
46
|
+
}, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
47
|
+
createEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
48
|
+
update(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
49
|
+
updateEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
50
|
+
remove(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
51
|
+
removeEdge(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
52
|
+
removeBetween(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
53
|
+
removeEdgesBetween(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
54
|
+
batchCreate(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
55
|
+
batchCreateEdges(input: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
56
|
+
delete(input: Parameters<(input: {
|
|
57
|
+
edgeIds: string[];
|
|
58
|
+
}, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
57
59
|
list(args: {
|
|
58
60
|
sourceId: string;
|
|
59
61
|
edgeType?: string;
|
|
60
62
|
limit?: number;
|
|
61
63
|
cursor?: string;
|
|
62
|
-
}):
|
|
64
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
63
65
|
traverse(args: {
|
|
64
66
|
startNode: string;
|
|
65
67
|
direction?: string;
|
|
66
68
|
maxDepth?: number;
|
|
67
69
|
topicId?: string;
|
|
68
|
-
}):
|
|
70
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/edges/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
import { createLucernClient } from "../client.js";
|
|
2
3
|
export * as graphContracts from "@lucern/contracts/graph/v1";
|
|
3
4
|
export * as methodSchemas from "@lucern/contracts/sdk-methods.contract";
|
|
@@ -1,54 +1,54 @@
|
|
|
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 EmbeddingsClientConfig = GatewayClientConfig;
|
|
5
5
|
export declare const EMBEDDINGS_FIELDS: readonly ["topicId", "projectId", "workspaceId", "nodeIds", "nodeType", "embeddingModel", "includeInactive", "queryText", "queryVector", "minScore", "limit", "cursor", "metadata"];
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export interface EmbeddingProvenance {
|
|
7
|
+
contentHash?: string;
|
|
8
|
+
embeddedAt?: number;
|
|
9
|
+
embeddingModel?: string;
|
|
10
|
+
metadata?: JsonObject | null;
|
|
8
11
|
sourceGlobalId?: string;
|
|
12
|
+
sourceNodeId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface EmbeddingRecord {
|
|
15
|
+
createdAt?: number;
|
|
9
16
|
embeddingModel?: string;
|
|
10
|
-
|
|
11
|
-
|
|
17
|
+
globalId?: string;
|
|
18
|
+
hasEmbedding?: boolean;
|
|
12
19
|
metadata?: JsonObject | null;
|
|
13
|
-
};
|
|
14
|
-
export type EmbeddingRecord = {
|
|
15
20
|
nodeId: string;
|
|
16
|
-
|
|
21
|
+
nodeType?: string;
|
|
22
|
+
provenance?: EmbeddingProvenance;
|
|
17
23
|
topicId?: string;
|
|
24
|
+
updatedAt?: number;
|
|
25
|
+
vectorDimensions?: number;
|
|
18
26
|
workspaceId?: string;
|
|
19
|
-
|
|
27
|
+
}
|
|
28
|
+
export interface MissingEmbeddingCandidate {
|
|
29
|
+
contentHash?: string;
|
|
20
30
|
embeddingModel?: string;
|
|
21
|
-
|
|
22
|
-
hasEmbedding?: boolean;
|
|
23
|
-
provenance?: EmbeddingProvenance;
|
|
31
|
+
globalId?: string;
|
|
24
32
|
metadata?: JsonObject | null;
|
|
25
|
-
createdAt?: number;
|
|
26
|
-
updatedAt?: number;
|
|
27
|
-
};
|
|
28
|
-
export type MissingEmbeddingCandidate = {
|
|
29
33
|
nodeId: string;
|
|
30
|
-
|
|
34
|
+
nodeType?: string;
|
|
35
|
+
reason?: string;
|
|
31
36
|
topicId?: string;
|
|
32
37
|
workspaceId?: string;
|
|
33
|
-
|
|
38
|
+
}
|
|
39
|
+
export interface VectorSearchMatch {
|
|
34
40
|
embeddingModel?: string;
|
|
35
|
-
|
|
36
|
-
contentHash?: string;
|
|
41
|
+
globalId?: string;
|
|
37
42
|
metadata?: JsonObject | null;
|
|
38
|
-
};
|
|
39
|
-
export type VectorSearchMatch = {
|
|
40
43
|
nodeId: string;
|
|
41
|
-
globalId?: string;
|
|
42
|
-
topicId?: string;
|
|
43
|
-
workspaceId?: string;
|
|
44
44
|
nodeType?: string;
|
|
45
|
+
provenance?: EmbeddingProvenance;
|
|
45
46
|
score: number;
|
|
46
47
|
text?: string;
|
|
47
48
|
title?: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
49
|
+
topicId?: string;
|
|
50
|
+
workspaceId?: string;
|
|
51
|
+
}
|
|
52
52
|
export type GetEmbeddingsByNodeIdsInput = TopicProjectAliasInput & {
|
|
53
53
|
workspaceId: string;
|
|
54
54
|
nodeIds: string[];
|
package/dist/embeddingsClient.js
CHANGED
|
@@ -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 EMBEDDINGS_FIELDS = [
|
|
5
6
|
"topicId",
|
|
@@ -37,32 +38,38 @@ export function createEmbeddingsClient(config = {}) {
|
|
|
37
38
|
return {
|
|
38
39
|
getByNodeIds(input) {
|
|
39
40
|
assertNodeIds(input.nodeIds);
|
|
40
|
-
return gateway
|
|
41
|
+
return gateway
|
|
42
|
+
.request({
|
|
41
43
|
path: "/api/platform/v1/embeddings/by-node-ids",
|
|
42
44
|
method: "POST",
|
|
43
45
|
body: topicPayload({
|
|
44
46
|
...input,
|
|
45
47
|
workspaceId: cleanRequiredString(input.workspaceId, "workspaceId"),
|
|
46
48
|
}, EMBEDDINGS_FIELDS, "embeddings.getByNodeIds"),
|
|
47
|
-
})
|
|
49
|
+
})
|
|
50
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "embeddings")));
|
|
48
51
|
},
|
|
49
52
|
listMissingForTopic(input) {
|
|
50
|
-
return gateway
|
|
53
|
+
return gateway
|
|
54
|
+
.request({
|
|
51
55
|
path: `/api/platform/v1/embeddings/missing${toQueryString(missingQuery(input))}`,
|
|
52
|
-
})
|
|
56
|
+
})
|
|
57
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "nodes")));
|
|
53
58
|
},
|
|
54
59
|
vectorSearchByTopic(input) {
|
|
55
|
-
if (!input.queryText
|
|
60
|
+
if (!(input.queryText || input.queryVector)) {
|
|
56
61
|
throw new Error("queryText or queryVector is required");
|
|
57
62
|
}
|
|
58
|
-
return gateway
|
|
63
|
+
return gateway
|
|
64
|
+
.request({
|
|
59
65
|
path: "/api/platform/v1/embeddings/vector-search",
|
|
60
66
|
method: "POST",
|
|
61
67
|
body: topicPayload({
|
|
62
68
|
...input,
|
|
63
69
|
workspaceId: cleanRequiredString(input.workspaceId, "workspaceId"),
|
|
64
70
|
}, EMBEDDINGS_FIELDS, "embeddings.vectorSearchByTopic"),
|
|
65
|
-
})
|
|
71
|
+
})
|
|
72
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "results")));
|
|
66
73
|
},
|
|
67
74
|
markEmbeddingBackfillQueued(input, idempotencyKey) {
|
|
68
75
|
assertNodeIds(input.nodeIds);
|
package/dist/eventingClient.d.ts
CHANGED
|
@@ -3,49 +3,49 @@ import type { JsonObject, ListResult } from "./types";
|
|
|
3
3
|
export type EventingClientConfig = GatewayClientConfig;
|
|
4
4
|
export declare const EVENTING_FIELDS: readonly ["tenantId", "workspaceId", "principalId", "topicId", "eventId", "eventType", "eventPayload", "webhookId", "deliveryId", "status", "attempt", "statusCode", "error", "responseBody", "durationMs", "metadata", "limit", "cursor"];
|
|
5
5
|
export type EventingStatus = "pending" | "delivering" | "succeeded" | "failed" | "dead_letter";
|
|
6
|
-
export
|
|
6
|
+
export interface EventingRecord {
|
|
7
|
+
createdAt?: number;
|
|
7
8
|
eventId: string;
|
|
8
|
-
tenantId: string;
|
|
9
|
-
workspaceId?: string;
|
|
10
|
-
principalId?: string;
|
|
11
|
-
topicId?: string;
|
|
12
|
-
eventType: string;
|
|
13
9
|
eventPayload?: JsonObject | null;
|
|
10
|
+
eventType: string;
|
|
14
11
|
metadata?: JsonObject | null;
|
|
15
|
-
|
|
16
|
-
};
|
|
17
|
-
export type EventingWebhookRecord = {
|
|
18
|
-
webhookId: string;
|
|
12
|
+
principalId?: string;
|
|
19
13
|
tenantId: string;
|
|
20
|
-
workspaceId?: string;
|
|
21
14
|
topicId?: string;
|
|
22
|
-
|
|
15
|
+
workspaceId?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface EventingWebhookRecord {
|
|
23
18
|
events?: string[];
|
|
24
|
-
status?: string;
|
|
25
19
|
metadata?: JsonObject | null;
|
|
26
|
-
|
|
27
|
-
export type EventingDeliveryRecord = {
|
|
28
|
-
deliveryId: string;
|
|
29
|
-
eventId?: string;
|
|
30
|
-
webhookId: string;
|
|
20
|
+
status?: string;
|
|
31
21
|
tenantId: string;
|
|
22
|
+
topicId?: string;
|
|
23
|
+
url?: string;
|
|
24
|
+
webhookId: string;
|
|
32
25
|
workspaceId?: string;
|
|
33
|
-
|
|
26
|
+
}
|
|
27
|
+
export interface EventingDeliveryRecord {
|
|
34
28
|
attempt?: number;
|
|
29
|
+
deliveryId: string;
|
|
30
|
+
eventId?: string;
|
|
35
31
|
metadata?: JsonObject | null;
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
export type EventingScope = {
|
|
32
|
+
status: EventingStatus | string;
|
|
39
33
|
tenantId: string;
|
|
34
|
+
updatedAt?: number;
|
|
35
|
+
webhookId: string;
|
|
40
36
|
workspaceId?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface EventingScope {
|
|
39
|
+
cursor?: string;
|
|
40
|
+
eventType?: string;
|
|
41
|
+
limit?: number;
|
|
41
42
|
principalId?: string;
|
|
43
|
+
status?: EventingStatus;
|
|
44
|
+
tenantId: string;
|
|
42
45
|
topicId?: string;
|
|
43
|
-
eventType?: string;
|
|
44
46
|
webhookId?: string;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
cursor?: string;
|
|
48
|
-
};
|
|
47
|
+
workspaceId?: string;
|
|
48
|
+
}
|
|
49
49
|
export type RecordEventInput = EventingScope & {
|
|
50
50
|
eventId?: string;
|
|
51
51
|
eventType: string;
|
package/dist/eventingClient.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
import { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundary-client-surface.js";
|
|
1
3
|
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundaryClientSurface.js";
|
|
3
4
|
import { mapGatewayData } from "./sdkSurface.js";
|
|
4
5
|
export const EVENTING_FIELDS = [
|
|
5
6
|
"tenantId",
|
|
@@ -51,14 +52,18 @@ export function createEventingClient(config = {}) {
|
|
|
51
52
|
});
|
|
52
53
|
},
|
|
53
54
|
listEvents(input) {
|
|
54
|
-
return gateway
|
|
55
|
+
return gateway
|
|
56
|
+
.request({
|
|
55
57
|
path: `/api/platform/v1/events${toQueryString(query(input))}`,
|
|
56
|
-
})
|
|
58
|
+
})
|
|
59
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "events")));
|
|
57
60
|
},
|
|
58
61
|
listWebhooks(input) {
|
|
59
|
-
return gateway
|
|
62
|
+
return gateway
|
|
63
|
+
.request({
|
|
60
64
|
path: `/api/platform/v1/webhooks${toQueryString(query(input))}`,
|
|
61
|
-
})
|
|
65
|
+
})
|
|
66
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "webhooks")));
|
|
62
67
|
},
|
|
63
68
|
enqueueDelivery(input, idempotencyKey) {
|
|
64
69
|
cleanRequiredString(input.tenantId, "tenantId");
|