@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
|
@@ -2,28 +2,28 @@ import { type GatewayClientConfig } from "./coreClient";
|
|
|
2
2
|
import type { JsonObject, ListResult } from "./types";
|
|
3
3
|
export type TelemetryClientConfig = GatewayClientConfig;
|
|
4
4
|
export declare const TELEMETRY_FIELDS: readonly ["tenantId", "workspaceId", "principalId", "topicId", "worktreeId", "eventLevel", "eventType", "message", "toolName", "toolCalls", "decision", "policySubject", "policyAction", "policyResource", "runId", "runType", "status", "durationMs", "error", "metadata", "limit", "cursor"];
|
|
5
|
-
export
|
|
5
|
+
export interface TelemetryRunRecord {
|
|
6
|
+
finishedAt?: number;
|
|
7
|
+
metadata?: JsonObject | null;
|
|
8
|
+
principalId?: string;
|
|
6
9
|
runId: string;
|
|
10
|
+
runType?: string;
|
|
11
|
+
startedAt?: number;
|
|
12
|
+
status?: string;
|
|
7
13
|
tenantId: string;
|
|
8
14
|
workspaceId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface TelemetryScope {
|
|
17
|
+
cursor?: string;
|
|
18
|
+
limit?: number;
|
|
9
19
|
principalId?: string;
|
|
10
20
|
runType?: string;
|
|
11
21
|
status?: string;
|
|
12
|
-
metadata?: JsonObject | null;
|
|
13
|
-
startedAt?: number;
|
|
14
|
-
finishedAt?: number;
|
|
15
|
-
};
|
|
16
|
-
export type TelemetryScope = {
|
|
17
22
|
tenantId: string;
|
|
18
|
-
workspaceId?: string;
|
|
19
|
-
principalId?: string;
|
|
20
23
|
topicId?: string;
|
|
24
|
+
workspaceId?: string;
|
|
21
25
|
worktreeId?: string;
|
|
22
|
-
|
|
23
|
-
status?: string;
|
|
24
|
-
limit?: number;
|
|
25
|
-
cursor?: string;
|
|
26
|
-
};
|
|
26
|
+
}
|
|
27
27
|
export type LogSystemEventInput = TelemetryScope & {
|
|
28
28
|
eventLevel: "debug" | "info" | "warn" | "error" | string;
|
|
29
29
|
eventType: string;
|
|
@@ -84,4 +84,4 @@ export declare function createTelemetryClient(config?: TelemetryClientConfig): {
|
|
|
84
84
|
finishRun(input: FinishTelemetryRunInput, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<TelemetryRunRecord>>;
|
|
85
85
|
listRuns(input: TelemetryScope): Promise<import("./coreClient").PlatformGatewaySuccess<ListResult<TelemetryRunRecord, "runs">>>;
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=
|
|
87
|
+
//# sourceMappingURL=telemetry-client.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundary-client-surface.js";
|
|
1
2
|
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { cleanRequiredString, knownPayload, listResultFromEnvelope, } from "./boundaryClientSurface.js";
|
|
3
3
|
import { mapGatewayData } from "./sdkSurface.js";
|
|
4
4
|
export const TELEMETRY_FIELDS = [
|
|
5
5
|
"tenantId",
|
|
@@ -105,10 +105,12 @@ export function createTelemetryClient(config = {}) {
|
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
107
|
listRuns(input) {
|
|
108
|
-
return gateway
|
|
108
|
+
return gateway
|
|
109
|
+
.request({
|
|
109
110
|
path: `/api/platform/v1/telemetry/runs${toQueryString(query(input))}`,
|
|
110
|
-
})
|
|
111
|
+
})
|
|
112
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "runs")));
|
|
111
113
|
},
|
|
112
114
|
};
|
|
113
115
|
}
|
|
114
|
-
//# sourceMappingURL=
|
|
116
|
+
//# sourceMappingURL=telemetry-client.js.map
|
|
@@ -3,43 +3,43 @@ import type { JsonObject, ListResult } from "./types";
|
|
|
3
3
|
export type ToolRegistryClientConfig = GatewayClientConfig;
|
|
4
4
|
export declare const TOOL_REGISTRY_FIELDS: readonly ["tenantId", "workspaceId", "principalId", "toolName", "packKey", "packVersion", "status", "permissions", "role", "surface", "parameterSchema", "returnSchema", "handlerRef", "executionAdapter", "safetyMetadata", "aclId", "metadata", "limit", "cursor"];
|
|
5
5
|
export type ToolRegistryStatus = "enabled" | "disabled" | "deprecated" | "blocked";
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export interface ToolCatalogEntry {
|
|
7
|
+
executionAdapter?: string;
|
|
8
|
+
handlerRef?: string;
|
|
9
|
+
metadata?: JsonObject | null;
|
|
8
10
|
packKey?: string;
|
|
9
11
|
packVersion?: string;
|
|
10
|
-
status?: ToolRegistryStatus | string;
|
|
11
|
-
permissions?: string[];
|
|
12
|
-
role?: string;
|
|
13
|
-
surface?: string;
|
|
14
12
|
parameterSchema?: JsonObject | null;
|
|
13
|
+
permissions?: string[];
|
|
15
14
|
returnSchema?: JsonObject | null;
|
|
16
|
-
|
|
17
|
-
executionAdapter?: string;
|
|
15
|
+
role?: string;
|
|
18
16
|
safetyMetadata?: JsonObject | null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export type ToolAclRecord = {
|
|
22
|
-
aclId?: string;
|
|
23
|
-
tenantId: string;
|
|
24
|
-
workspaceId?: string;
|
|
25
|
-
principalId?: string;
|
|
17
|
+
status?: ToolRegistryStatus | string;
|
|
18
|
+
surface?: string;
|
|
26
19
|
toolName: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ToolAclRecord {
|
|
22
|
+
aclId?: string;
|
|
23
|
+
createdAt?: number;
|
|
24
|
+
metadata?: JsonObject | null;
|
|
27
25
|
packKey?: string;
|
|
28
26
|
permissions?: string[];
|
|
27
|
+
principalId?: string;
|
|
29
28
|
status?: ToolRegistryStatus | string;
|
|
30
|
-
metadata?: JsonObject | null;
|
|
31
|
-
createdAt?: number;
|
|
32
|
-
updatedAt?: number;
|
|
33
|
-
};
|
|
34
|
-
export type ToolRegistryQuery = {
|
|
35
29
|
tenantId: string;
|
|
30
|
+
toolName: string;
|
|
31
|
+
updatedAt?: number;
|
|
36
32
|
workspaceId?: string;
|
|
37
|
-
|
|
33
|
+
}
|
|
34
|
+
export interface ToolRegistryQuery {
|
|
35
|
+
cursor?: string;
|
|
36
|
+
limit?: number;
|
|
38
37
|
packKey?: string;
|
|
38
|
+
principalId?: string;
|
|
39
39
|
status?: ToolRegistryStatus;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
40
|
+
tenantId: string;
|
|
41
|
+
workspaceId?: string;
|
|
42
|
+
}
|
|
43
43
|
export type EffectiveToolsSessionType = "agent" | "user";
|
|
44
44
|
export type EffectiveToolsQuery = ToolRegistryQuery & {
|
|
45
45
|
callerRole?: string;
|
|
@@ -48,48 +48,48 @@ export type EffectiveToolsQuery = ToolRegistryQuery & {
|
|
|
48
48
|
permittedToolNames?: string[];
|
|
49
49
|
executableOnly?: boolean;
|
|
50
50
|
};
|
|
51
|
-
export
|
|
52
|
-
tenantId: string;
|
|
53
|
-
workspaceId?: string;
|
|
54
|
-
tools: ToolCatalogEntry[];
|
|
51
|
+
export interface UpsertCoreToolsInput {
|
|
55
52
|
metadata?: JsonObject;
|
|
56
|
-
};
|
|
57
|
-
export type SetPackToolsStatusInput = {
|
|
58
53
|
tenantId: string;
|
|
54
|
+
tools: ToolCatalogEntry[];
|
|
59
55
|
workspaceId?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface SetPackToolsStatusInput {
|
|
58
|
+
metadata?: JsonObject;
|
|
60
59
|
packKey: string;
|
|
61
60
|
status: ToolRegistryStatus;
|
|
62
|
-
metadata?: JsonObject;
|
|
63
|
-
};
|
|
64
|
-
export type CreateToolAclInput = {
|
|
65
61
|
tenantId: string;
|
|
66
62
|
workspaceId?: string;
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
}
|
|
64
|
+
export interface CreateToolAclInput {
|
|
65
|
+
metadata?: JsonObject;
|
|
69
66
|
packKey?: string;
|
|
70
67
|
permissions?: string[];
|
|
68
|
+
principalId: string;
|
|
71
69
|
status?: ToolRegistryStatus;
|
|
72
|
-
metadata?: JsonObject;
|
|
73
|
-
};
|
|
74
|
-
export type DeleteToolAclInput = {
|
|
75
70
|
tenantId: string;
|
|
71
|
+
toolName: string;
|
|
76
72
|
workspaceId?: string;
|
|
73
|
+
}
|
|
74
|
+
export interface DeleteToolAclInput {
|
|
77
75
|
aclId: string;
|
|
78
76
|
metadata?: JsonObject;
|
|
79
|
-
};
|
|
80
|
-
export type RegisterCustomToolInput = {
|
|
81
77
|
tenantId: string;
|
|
82
78
|
workspaceId?: string;
|
|
83
|
-
|
|
79
|
+
}
|
|
80
|
+
export interface RegisterCustomToolInput {
|
|
81
|
+
executionAdapter?: string;
|
|
82
|
+
handlerRef?: string;
|
|
83
|
+
metadata?: JsonObject;
|
|
84
84
|
packKey?: string;
|
|
85
85
|
parameterSchema?: JsonObject;
|
|
86
|
+
permissions?: string[];
|
|
86
87
|
returnSchema?: JsonObject;
|
|
87
|
-
handlerRef?: string;
|
|
88
|
-
executionAdapter?: string;
|
|
89
88
|
safetyMetadata?: JsonObject;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
tenantId: string;
|
|
90
|
+
toolName: string;
|
|
91
|
+
workspaceId?: string;
|
|
92
|
+
}
|
|
93
93
|
export type ToolCatalogResponse = ListResult<ToolCatalogEntry, "tools">;
|
|
94
94
|
export type ToolAclResponse = ListResult<ToolAclRecord, "acls">;
|
|
95
95
|
export declare function createToolRegistryClient(config?: ToolRegistryClientConfig): {
|
|
@@ -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 TOOL_REGISTRY_FIELDS = [
|
|
5
6
|
"tenantId",
|
|
@@ -52,23 +53,30 @@ export function createToolRegistryClient(config = {}) {
|
|
|
52
53
|
const gateway = createGatewayRequestClient(config);
|
|
53
54
|
return {
|
|
54
55
|
listCatalog(input) {
|
|
55
|
-
return gateway
|
|
56
|
+
return gateway
|
|
57
|
+
.request({
|
|
56
58
|
path: `/api/platform/v1/tools/catalog${toQueryString(query(input))}`,
|
|
57
|
-
})
|
|
59
|
+
})
|
|
60
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "tools")));
|
|
58
61
|
},
|
|
59
62
|
listExecutable(input) {
|
|
60
|
-
return gateway
|
|
63
|
+
return gateway
|
|
64
|
+
.request({
|
|
61
65
|
path: `/api/platform/v1/tools/executable${toQueryString(query(input))}`,
|
|
62
|
-
})
|
|
66
|
+
})
|
|
67
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "tools")));
|
|
63
68
|
},
|
|
64
69
|
listEffectiveTools(input) {
|
|
65
|
-
return gateway
|
|
70
|
+
return gateway
|
|
71
|
+
.request({
|
|
66
72
|
path: `/api/platform/v1/tools/effective${toQueryString(effectiveToolsQuery(input))}`,
|
|
67
|
-
})
|
|
73
|
+
})
|
|
74
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "tools")));
|
|
68
75
|
},
|
|
69
76
|
upsertCoreTools(input, idempotencyKey) {
|
|
70
77
|
cleanRequiredString(input.tenantId, "tenantId");
|
|
71
|
-
return gateway
|
|
78
|
+
return gateway
|
|
79
|
+
.request({
|
|
72
80
|
path: "/api/platform/v1/tools/core",
|
|
73
81
|
method: "PUT",
|
|
74
82
|
body: {
|
|
@@ -78,17 +86,20 @@ export function createToolRegistryClient(config = {}) {
|
|
|
78
86
|
tools: input.tools,
|
|
79
87
|
},
|
|
80
88
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
81
|
-
})
|
|
89
|
+
})
|
|
90
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "tools")));
|
|
82
91
|
},
|
|
83
92
|
setPackToolsStatus(input, idempotencyKey) {
|
|
84
93
|
cleanRequiredString(input.tenantId, "tenantId");
|
|
85
94
|
cleanRequiredString(input.packKey, "packKey");
|
|
86
|
-
return gateway
|
|
95
|
+
return gateway
|
|
96
|
+
.request({
|
|
87
97
|
path: `/api/platform/v1/tools/packs/${encodeURIComponent(input.packKey)}/status`,
|
|
88
98
|
method: "PATCH",
|
|
89
99
|
body: writeBody(input, "tools.setPackToolsStatus"),
|
|
90
100
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
91
|
-
})
|
|
101
|
+
})
|
|
102
|
+
.then((response) => mapGatewayData(response, (data) => listResultFromEnvelope(data, "tools")));
|
|
92
103
|
},
|
|
93
104
|
createAcl(input, idempotencyKey) {
|
|
94
105
|
cleanRequiredString(input.tenantId, "tenantId");
|
package/dist/topics/index.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { type LucernClientConfig } from "../client";
|
|
2
|
-
export * as topicContracts from "@lucern/contracts/topics/v1";
|
|
3
2
|
export * as toolSchemas from "@lucern/contracts/tool-contracts";
|
|
3
|
+
export * as topicContracts from "@lucern/contracts/topics/v1";
|
|
4
4
|
export type TopicsClientConfig = LucernClientConfig;
|
|
5
5
|
export type TopicsClient = ReturnType<typeof createTopicsClient>;
|
|
6
6
|
export declare function createTopicsClient(config?: TopicsClientConfig): {
|
|
7
|
-
createTopic: (input: Parameters<(
|
|
8
|
-
getTopic: (
|
|
9
|
-
listTopics: (input?: Parameters<(
|
|
10
|
-
updateTopic: (topicId: string, input: Parameters<(
|
|
7
|
+
createTopic: (input: Parameters<(input: import("..").TopicCreateInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>>[0]) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
8
|
+
getTopic: (topicId: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>;
|
|
9
|
+
listTopics: (input?: Parameters<(query?: import("..").TopicListInput) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicListResponse>>>[0]) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicListResponse>>;
|
|
10
|
+
updateTopic: (topicId: string, input: Parameters<(topicId: string, input: import("..").TopicUpdateInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>>[1]) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>;
|
|
11
11
|
getTopicTree: (input: {
|
|
12
12
|
rootId: string;
|
|
13
13
|
maxDepth?: number;
|
|
14
|
-
}) =>
|
|
15
|
-
getTopicCoverage: (topicId: string, query?: Parameters<(
|
|
16
|
-
materializeTopicGraph: (input?: import("..").FunctionSurfaceInput, idempotencyKey?: string) =>
|
|
17
|
-
getTopicGraphSpine: (input?: import("..").FunctionSurfaceInput) =>
|
|
18
|
-
removeTopic: (
|
|
14
|
+
}) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicTreeResponse>>;
|
|
15
|
+
getTopicCoverage: (topicId: string, query?: Parameters<(topicId: string, query?: import("..").TopicCoverageQuery) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicCoverageResponse>>>[1]) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicCoverageResponse>>;
|
|
16
|
+
materializeTopicGraph: (input?: import("..").FunctionSurfaceInput, idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
17
|
+
getTopicGraphSpine: (input?: import("..").FunctionSurfaceInput) => Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
18
|
+
removeTopic: (topicId: string, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
19
19
|
raw: {
|
|
20
|
-
list(input?: Parameters<(
|
|
21
|
-
get: (
|
|
22
|
-
create(input: Parameters<(
|
|
23
|
-
update(topicId: string, input: Parameters<(
|
|
24
|
-
tree(topicId: string, query?: Parameters<(
|
|
20
|
+
list(input?: Parameters<(query?: import("..").TopicListInput) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicListResponse>>>[0]): Promise<import("..").PlatformGatewaySuccess<import("..").TopicListResponse>>;
|
|
21
|
+
get: (topicId: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>;
|
|
22
|
+
create(input: Parameters<(input: import("..").TopicCreateInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>>[0]): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
23
|
+
update(topicId: string, input: Parameters<(topicId: string, input: import("..").TopicUpdateInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>>[1]): Promise<import("..").PlatformGatewaySuccess<import("..").TopicRecord>>;
|
|
24
|
+
tree(topicId: string, query?: Parameters<(topicId: string, query?: import("..").TopicTreeQuery) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicTreeResponse>>>[1]): Promise<import("..").PlatformGatewaySuccess<import("..").TopicTreeResponse>>;
|
|
25
25
|
getTree(input: {
|
|
26
26
|
rootId: string;
|
|
27
27
|
maxDepth?: number;
|
|
28
|
-
}):
|
|
29
|
-
coverage(topicId: string, query?: Parameters<(
|
|
30
|
-
remove: (
|
|
31
|
-
bulkCreate: (
|
|
32
|
-
materializeGraph(input?: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
33
|
-
materializeTopicGraph(input?: import("..").FunctionSurfaceInput, idempotencyKey?: string):
|
|
34
|
-
graphSpine(input?: import("..").FunctionSurfaceInput):
|
|
35
|
-
getTopicGraphSpine(input?: import("..").FunctionSurfaceInput):
|
|
28
|
+
}): Promise<import("..").PlatformGatewaySuccess<import("..").TopicTreeResponse>>;
|
|
29
|
+
coverage(topicId: string, query?: Parameters<(topicId: string, query?: import("..").TopicCoverageQuery) => Promise<import("..").PlatformGatewaySuccess<import("..").TopicCoverageResponse>>>[1]): Promise<import("..").PlatformGatewaySuccess<import("..").TopicCoverageResponse>>;
|
|
30
|
+
remove: (topicId: string, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
31
|
+
bulkCreate: (input: import("..").TopicBulkCreateInput, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
32
|
+
materializeGraph(input?: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
33
|
+
materializeTopicGraph(input?: import("..").FunctionSurfaceInput, idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
34
|
+
graphSpine(input?: import("..").FunctionSurfaceInput): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
35
|
+
getTopicGraphSpine(input?: import("..").FunctionSurfaceInput): Promise<import("../client-config").GatewayDataEnvelope<unknown>>;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/topics/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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
|
-
export * as topicContracts from "@lucern/contracts/topics/v1";
|
|
3
3
|
export * as toolSchemas from "@lucern/contracts/tool-contracts";
|
|
4
|
+
export * as topicContracts from "@lucern/contracts/topics/v1";
|
|
4
5
|
export function createTopicsClient(config = {}) {
|
|
5
6
|
const topics = createLucernClient(config).topics;
|
|
6
7
|
return {
|
package/dist/topicsClient.d.ts
CHANGED
|
@@ -35,16 +35,16 @@ export type TopicUpdateInput = TopicIdentifierInput & {
|
|
|
35
35
|
visibility?: "private" | "team" | "firm" | "external" | "public";
|
|
36
36
|
};
|
|
37
37
|
/** Options for retrieving the topic hierarchy. */
|
|
38
|
-
export
|
|
38
|
+
export interface TopicTreeQuery {
|
|
39
39
|
maxDepth?: number;
|
|
40
|
-
}
|
|
40
|
+
}
|
|
41
41
|
/** Options for retrieving belief/question/evidence coverage across a topic tree. */
|
|
42
|
-
export
|
|
42
|
+
export interface TopicCoverageQuery {
|
|
43
43
|
includeDescendants?: boolean;
|
|
44
44
|
maxDepth?: number;
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
46
|
/** Input for batch-creating topics. */
|
|
47
|
-
export
|
|
47
|
+
export interface TopicBulkCreateInput {
|
|
48
48
|
topics: Array<TopicIdentifierInput & {
|
|
49
49
|
globalId?: string;
|
|
50
50
|
name: string;
|
|
@@ -61,7 +61,7 @@ export type TopicBulkCreateInput = {
|
|
|
61
61
|
metadata?: JsonObject;
|
|
62
62
|
createdBy?: string;
|
|
63
63
|
}>;
|
|
64
|
-
}
|
|
64
|
+
}
|
|
65
65
|
/**
|
|
66
66
|
* Create the topics client for managing hierarchical knowledge containers.
|
|
67
67
|
*
|
package/dist/topicsClient.js
CHANGED
|
@@ -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 { asRecord, createListResult, mapGatewayData, resolveTopicId, withTopicAlias, } from "./sdkSurface.js";
|
|
3
4
|
function cleanString(value) {
|
|
@@ -27,9 +28,10 @@ function normalizeTopicTreeNode(value) {
|
|
|
27
28
|
export function createTopicsClient(config = {}) {
|
|
28
29
|
const gateway = createGatewayRequestClient(config);
|
|
29
30
|
return {
|
|
30
|
-
|
|
31
|
+
list(query = {}) {
|
|
31
32
|
const topicId = resolveTopicId(query);
|
|
32
|
-
return gateway
|
|
33
|
+
return gateway
|
|
34
|
+
.request({
|
|
33
35
|
path: `/api/platform/v1/topics${toQueryString({
|
|
34
36
|
...(topicId ? { topicId } : {}),
|
|
35
37
|
ontologyId: query.ontologyId,
|
|
@@ -37,7 +39,8 @@ export function createTopicsClient(config = {}) {
|
|
|
37
39
|
status: query.status,
|
|
38
40
|
type: query.type,
|
|
39
41
|
})}`,
|
|
40
|
-
})
|
|
42
|
+
})
|
|
43
|
+
.then((response) => mapGatewayData(response, (data) => {
|
|
41
44
|
const record = asRecord(data);
|
|
42
45
|
const items = Array.isArray(record.topics)
|
|
43
46
|
? record.topics.map(normalizeTopicRecord)
|
|
@@ -50,14 +53,17 @@ export function createTopicsClient(config = {}) {
|
|
|
50
53
|
};
|
|
51
54
|
}));
|
|
52
55
|
},
|
|
53
|
-
|
|
54
|
-
return gateway
|
|
56
|
+
get(topicId) {
|
|
57
|
+
return gateway
|
|
58
|
+
.request({
|
|
55
59
|
path: `/api/platform/v1/topics/${encodeURIComponent(topicId)}`,
|
|
56
|
-
})
|
|
60
|
+
})
|
|
61
|
+
.then((response) => mapGatewayData(response, (data) => normalizeTopicRecord(asRecord(data).topic ?? data)));
|
|
57
62
|
},
|
|
58
|
-
|
|
63
|
+
create(input, idempotencyKey) {
|
|
59
64
|
const topicId = resolveTopicId(input);
|
|
60
|
-
return gateway
|
|
65
|
+
return gateway
|
|
66
|
+
.request({
|
|
61
67
|
path: "/api/platform/v1/topics",
|
|
62
68
|
method: "POST",
|
|
63
69
|
body: {
|
|
@@ -66,20 +72,25 @@ export function createTopicsClient(config = {}) {
|
|
|
66
72
|
type: input.type ?? "theme",
|
|
67
73
|
},
|
|
68
74
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
69
|
-
})
|
|
75
|
+
})
|
|
76
|
+
.then((response) => mapGatewayData(response, (data) => normalizeTopicRecord(data)));
|
|
70
77
|
},
|
|
71
|
-
|
|
72
|
-
return gateway
|
|
78
|
+
update(topicId, input, idempotencyKey) {
|
|
79
|
+
return gateway
|
|
80
|
+
.request({
|
|
73
81
|
path: `/api/platform/v1/topics/${encodeURIComponent(topicId)}`,
|
|
74
82
|
method: "PATCH",
|
|
75
83
|
body: input,
|
|
76
84
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
77
|
-
})
|
|
85
|
+
})
|
|
86
|
+
.then((response) => mapGatewayData(response, (data) => normalizeTopicRecord(data)));
|
|
78
87
|
},
|
|
79
|
-
|
|
80
|
-
return gateway
|
|
88
|
+
getTree(topicId, query = {}) {
|
|
89
|
+
return gateway
|
|
90
|
+
.request({
|
|
81
91
|
path: `/api/platform/v1/topics/${encodeURIComponent(topicId)}/tree${toQueryString(query)}`,
|
|
82
|
-
})
|
|
92
|
+
})
|
|
93
|
+
.then((response) => mapGatewayData(response, (data) => {
|
|
83
94
|
const record = asRecord(data);
|
|
84
95
|
return {
|
|
85
96
|
tree: Array.isArray(record.tree)
|
|
@@ -88,12 +99,12 @@ export function createTopicsClient(config = {}) {
|
|
|
88
99
|
};
|
|
89
100
|
}));
|
|
90
101
|
},
|
|
91
|
-
|
|
102
|
+
getCoverage(topicId, query = {}) {
|
|
92
103
|
return gateway.request({
|
|
93
104
|
path: `/api/platform/v1/topics/${encodeURIComponent(topicId)}/coverage${toQueryString(query)}`,
|
|
94
105
|
});
|
|
95
106
|
},
|
|
96
|
-
|
|
107
|
+
remove(topicId, idempotencyKey) {
|
|
97
108
|
return gateway.request({
|
|
98
109
|
path: "/api/platform/v1/topics/remove",
|
|
99
110
|
method: "POST",
|
|
@@ -101,7 +112,7 @@ export function createTopicsClient(config = {}) {
|
|
|
101
112
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
102
113
|
});
|
|
103
114
|
},
|
|
104
|
-
|
|
115
|
+
bulkCreate(input, idempotencyKey) {
|
|
105
116
|
return gateway.request({
|
|
106
117
|
path: "/api/platform/v1/topics/bulk",
|
|
107
118
|
method: "POST",
|