@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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to `@lucern/sdk` will be documented in this file.
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
- No unreleased changes yet.
|
|
7
7
|
|
|
8
|
+
## [1.0.31] - 2026-06-23
|
|
9
|
+
- Coherent 1.0.31 bump for lucern-graph tenant adoption after the 1.0.30
|
|
10
|
+
package line exposed a control-plane Convex module-path failure.
|
|
11
|
+
|
|
12
|
+
## [1.0.30] - 2026-06-23
|
|
13
|
+
- Coherent package-line release for the CQ14 quality-ratchet/code-move wave:
|
|
14
|
+
publishes the new SDK subpath exports (`answersClient`, `audiencesClient`,
|
|
15
|
+
`auditClient`, `reportsClient`, `schemaClient`, `sourcesClient`,
|
|
16
|
+
`telemetryClient`, `clientAssemblyTypes`, `clientConfig`, and
|
|
17
|
+
`boundaryClientSurface`) plus the provider-native belief create boundary that
|
|
18
|
+
requires UUIDv7 `topicGlobalId`.
|
|
19
|
+
|
|
8
20
|
## [1.0.29] - 2026-06-15
|
|
9
21
|
- Coherent with `@lucern/reasoning-kernel` 1.0.29: access-control consolidation
|
|
10
22
|
(FR.12e/g singular write gateway + CQ.11 gate de-duplication) plus
|
package/dist/accessControl.d.ts
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { LucernSdkAuthContextError, type LucernSdkAuthContextInput, type LucernSdkAuthFailureReason } from "./authContext";
|
|
2
|
-
import { type GatewayClientConfig } from "./coreClient";
|
|
3
|
-
import { type PolicyDecisionRecord, type PolicyEvaluationInput } from "./identityClient";
|
|
4
2
|
import type { SessionPrincipalType } from "./contracts/auth-session.contract";
|
|
3
|
+
import type { GatewayClientConfig } from "./coreClient";
|
|
4
|
+
import { type PolicyDecisionRecord, type PolicyEvaluationInput } from "./identityClient";
|
|
5
5
|
import type { JsonObject } from "./types";
|
|
6
|
-
export
|
|
6
|
+
export interface ClerkIdentityAliasInput {
|
|
7
|
+
externalSubjectId: string;
|
|
7
8
|
provider?: "clerk" | string;
|
|
8
9
|
providerProjectId?: string | null;
|
|
9
|
-
externalSubjectId: string;
|
|
10
10
|
status?: "active" | "pending" | "revoked" | string;
|
|
11
|
-
}
|
|
12
|
-
export
|
|
13
|
-
principalId?: string | null;
|
|
14
|
-
principalType?: SessionPrincipalType | "user" | "external_viewer" | null;
|
|
11
|
+
}
|
|
12
|
+
export interface CanonicalPrincipalIdentityInput {
|
|
15
13
|
canonicalClerkUserId?: string | null;
|
|
16
14
|
clerkId?: string | null;
|
|
17
15
|
clerkIdentityAliases?: readonly ClerkIdentityAliasInput[];
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
principalId?: string | null;
|
|
17
|
+
principalType?: SessionPrincipalType | "user" | "external_viewer" | null;
|
|
20
18
|
roles?: readonly string[];
|
|
21
19
|
scopes?: readonly string[];
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
tenantId?: string | null;
|
|
21
|
+
workspaceId?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface CanonicalPrincipalIdentityAlias {
|
|
24
|
+
externalSubjectId: string;
|
|
24
25
|
provider: string;
|
|
25
26
|
providerProjectId?: string;
|
|
26
|
-
externalSubjectId: string;
|
|
27
27
|
status?: string;
|
|
28
|
-
}
|
|
29
|
-
export
|
|
30
|
-
principalId: string;
|
|
31
|
-
principalType: SessionPrincipalType;
|
|
28
|
+
}
|
|
29
|
+
export interface CanonicalPrincipalIdentity {
|
|
32
30
|
canonicalClerkUserId?: string;
|
|
33
31
|
clerkIdentityAliases: CanonicalPrincipalIdentityAlias[];
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
principalId: string;
|
|
33
|
+
principalType: SessionPrincipalType;
|
|
36
34
|
roles: string[];
|
|
37
35
|
scopes: string[];
|
|
38
|
-
|
|
36
|
+
tenantId?: string;
|
|
37
|
+
workspaceId?: string;
|
|
38
|
+
}
|
|
39
39
|
export type AccessResourceType = "tenant" | "workspace" | "deployment" | "convex_table" | "secret_scope" | "agent_session" | (string & {});
|
|
40
|
-
export
|
|
41
|
-
type: AccessResourceType;
|
|
40
|
+
export interface AccessResourceDescriptor {
|
|
42
41
|
key: string;
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
type: AccessResourceType;
|
|
43
|
+
}
|
|
44
|
+
export interface RequireAccessInput {
|
|
45
|
+
action: string;
|
|
46
|
+
context?: JsonObject;
|
|
45
47
|
identity?: CanonicalPrincipalIdentityInput | LucernSdkAuthContextInput;
|
|
46
48
|
observedClerkId?: string;
|
|
49
|
+
resource: AccessResourceDescriptor | string;
|
|
47
50
|
tenantId?: string;
|
|
48
51
|
workspaceId?: string;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
export type AccessCheckResult = {
|
|
52
|
+
}
|
|
53
|
+
export interface AccessCheckResult {
|
|
54
|
+
decision: PolicyDecisionRecord;
|
|
54
55
|
identity: CanonicalPrincipalIdentity;
|
|
55
56
|
policyInput: PolicyEvaluationInput;
|
|
56
|
-
|
|
57
|
-
};
|
|
57
|
+
}
|
|
58
58
|
export declare class LucernAccessControlError extends LucernSdkAuthContextError {
|
|
59
59
|
readonly policyDecision?: PolicyDecisionRecord;
|
|
60
60
|
constructor(reason: LucernSdkAuthFailureReason, message: string, policyDecision?: PolicyDecisionRecord);
|
package/dist/accessControl.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 { LucernSdkAuthContextError, normalizeCanonicalLucernAuthContext, } from "./authContext.js";
|
|
2
3
|
import { createIdentityClient, } from "./identityClient.js";
|
|
3
4
|
export class LucernAccessControlError extends LucernSdkAuthContextError {
|
package/dist/adminClient.d.ts
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
|
|
2
1
|
import type { ControlObjectOwnershipContract } from "./controlObjectOwnership";
|
|
2
|
+
import { type GatewayClientConfig, type GatewayScope, LucernApiError } from "./coreClient";
|
|
3
3
|
import type { JsonObject } from "./types";
|
|
4
|
-
export { LucernApiError };
|
|
5
4
|
export type { GatewayScope, PlatformGatewaySuccess } from "./coreClient";
|
|
5
|
+
export { LucernApiError };
|
|
6
6
|
/** Configuration for the admin client. */
|
|
7
7
|
export type AdminClientConfig = GatewayClientConfig;
|
|
8
|
-
export
|
|
8
|
+
export interface TenantApiKeyRecord {
|
|
9
|
+
createdAt?: number;
|
|
10
|
+
createdBy?: string;
|
|
11
|
+
expiresAt?: number;
|
|
12
|
+
hashedKey?: string;
|
|
9
13
|
id?: string;
|
|
10
|
-
tenantId?: string;
|
|
11
|
-
workspaceId?: string;
|
|
12
|
-
label?: string;
|
|
13
14
|
keyPrefix?: string;
|
|
14
|
-
|
|
15
|
-
scopes?: string[];
|
|
16
|
-
status?: string;
|
|
17
|
-
expiresAt?: number;
|
|
15
|
+
label?: string;
|
|
18
16
|
lastUsedAt?: number;
|
|
19
17
|
revokedAt?: number;
|
|
20
18
|
revokedBy?: string;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
updatedAt?: number;
|
|
24
|
-
};
|
|
25
|
-
export type TenantVaultSecretRecord = {
|
|
26
|
-
id?: string;
|
|
19
|
+
scopes?: string[];
|
|
20
|
+
status?: string;
|
|
27
21
|
tenantId?: string;
|
|
22
|
+
updatedAt?: number;
|
|
28
23
|
workspaceId?: string;
|
|
29
|
-
|
|
24
|
+
}
|
|
25
|
+
export interface TenantVaultSecretRecord {
|
|
26
|
+
createdAt?: number;
|
|
27
|
+
createdBy?: string;
|
|
30
28
|
description?: string;
|
|
29
|
+
id?: string;
|
|
31
30
|
lastRotated?: number;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
createdAt?: number;
|
|
31
|
+
name?: string;
|
|
32
|
+
tenantId?: string;
|
|
35
33
|
updatedAt?: number;
|
|
36
|
-
|
|
34
|
+
updatedBy?: string;
|
|
35
|
+
workspaceId?: string;
|
|
36
|
+
}
|
|
37
37
|
export type TenantAuthPolicyMode = "open" | "invite_only" | "sso_required";
|
|
38
38
|
export type TenantTopicVisibility = "private" | "tenant" | "public";
|
|
39
39
|
export type TenantFeatureFlags = Record<string, boolean>;
|
|
40
40
|
export type TenantModelSlotOverrides = Record<string, string>;
|
|
41
|
-
export
|
|
42
|
-
tenantId: string;
|
|
41
|
+
export interface TenantConfigRecord {
|
|
43
42
|
authPolicyMode: TenantAuthPolicyMode;
|
|
43
|
+
defaultModelSlotOverrides: TenantModelSlotOverrides;
|
|
44
44
|
defaultSessionTTL: number;
|
|
45
45
|
defaultTopicVisibility: TenantTopicVisibility;
|
|
46
46
|
featureFlags: TenantFeatureFlags;
|
|
47
47
|
maxWorkspaceCount: number;
|
|
48
|
-
|
|
48
|
+
tenantId: string;
|
|
49
49
|
updatedAt?: number;
|
|
50
50
|
updatedBy?: string;
|
|
51
|
-
}
|
|
52
|
-
export
|
|
53
|
-
slot: string;
|
|
51
|
+
}
|
|
52
|
+
export interface TenantModelRoutingSlotRecord {
|
|
54
53
|
category?: string;
|
|
55
54
|
description?: string;
|
|
55
|
+
enabled?: boolean;
|
|
56
|
+
maxTokens?: number;
|
|
56
57
|
modelKey: string;
|
|
57
58
|
promptName?: string;
|
|
59
|
+
slot: string;
|
|
58
60
|
temperature?: number;
|
|
59
|
-
|
|
61
|
+
}
|
|
62
|
+
export interface TenantModelRoutingModelRecord {
|
|
60
63
|
enabled?: boolean;
|
|
61
|
-
};
|
|
62
|
-
export type TenantModelRoutingModelRecord = {
|
|
63
64
|
key: string;
|
|
64
|
-
name?: string;
|
|
65
65
|
modelId?: string;
|
|
66
|
+
name?: string;
|
|
67
|
+
notes?: string;
|
|
66
68
|
provider?: string;
|
|
67
|
-
enabled?: boolean;
|
|
68
69
|
recommended?: boolean;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
}
|
|
71
|
+
export interface TenantModelRoutingBindingRecord {
|
|
72
|
+
keyHint?: string;
|
|
73
|
+
label?: string;
|
|
73
74
|
providerId: string;
|
|
74
75
|
secretRef: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
};
|
|
76
|
+
slot: string;
|
|
77
|
+
}
|
|
78
78
|
export type TenantModelRouteOverrideStatus = "inherit" | "active" | "blocked_missing_model" | "blocked_missing_binding";
|
|
79
79
|
export type TenantModelRouteBindingState = "ready" | "missing";
|
|
80
80
|
export type TenantModelRouteSource = "platform_default" | "tenant_override";
|
|
81
|
-
export
|
|
82
|
-
|
|
81
|
+
export interface TenantModelRouteRow {
|
|
82
|
+
bindingKeyHint?: string;
|
|
83
|
+
bindingLabel?: string;
|
|
84
|
+
bindingSecretRef?: string;
|
|
85
|
+
bindingState: TenantModelRouteBindingState;
|
|
83
86
|
category: string;
|
|
84
87
|
description?: string;
|
|
85
|
-
promptName?: string;
|
|
86
|
-
slotEnabled: boolean;
|
|
87
|
-
platformModelKey: string;
|
|
88
|
-
platformModelName?: string;
|
|
89
|
-
platformProviderId?: string;
|
|
90
|
-
overrideModelKey?: string;
|
|
91
|
-
overrideModelName?: string;
|
|
92
|
-
overrideProviderId?: string;
|
|
93
88
|
effectiveModelKey: string;
|
|
94
89
|
effectiveModelName?: string;
|
|
95
90
|
effectiveProviderId?: string;
|
|
96
91
|
effectiveSource: TenantModelRouteSource;
|
|
92
|
+
overrideModelKey?: string;
|
|
93
|
+
overrideModelName?: string;
|
|
94
|
+
overrideProviderId?: string;
|
|
97
95
|
overrideStatus: TenantModelRouteOverrideStatus;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
platformModelKey: string;
|
|
97
|
+
platformModelName?: string;
|
|
98
|
+
platformProviderId?: string;
|
|
99
|
+
promptName?: string;
|
|
100
|
+
slot: string;
|
|
101
|
+
slotEnabled: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface TenantModelRoutingSummary {
|
|
106
104
|
activeOverrides: number;
|
|
107
105
|
blockedOverrides: number;
|
|
106
|
+
promptBoundSlots: number;
|
|
108
107
|
readyBindings: number;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
totalSlots: number;
|
|
109
|
+
}
|
|
110
|
+
export interface TenantModelRoutingSnapshot {
|
|
111
|
+
bindings: TenantModelRoutingBindingRecord[];
|
|
112
112
|
defaultModelSlotOverrides: Record<string, string>;
|
|
113
|
-
slots: TenantModelRoutingSlotRecord[];
|
|
114
113
|
models: TenantModelRoutingModelRecord[];
|
|
115
|
-
|
|
114
|
+
notes: string[];
|
|
116
115
|
rows: TenantModelRouteRow[];
|
|
116
|
+
slots: TenantModelRoutingSlotRecord[];
|
|
117
117
|
summary: TenantModelRoutingSummary;
|
|
118
|
-
|
|
119
|
-
}
|
|
118
|
+
tenantId: string;
|
|
119
|
+
}
|
|
120
120
|
/**
|
|
121
121
|
* Create the admin client for tenant, workspace, and membership administration.
|
|
122
122
|
* @param config - Gateway transport configuration.
|
|
@@ -221,10 +221,10 @@ export declare function createAdminClient(config?: AdminClientConfig): {
|
|
|
221
221
|
data: {
|
|
222
222
|
keys: TenantApiKeyRecord[];
|
|
223
223
|
};
|
|
224
|
-
success: true;
|
|
225
224
|
correlationId: string;
|
|
226
|
-
policyTraceId: string | null;
|
|
227
225
|
idempotentReplay: boolean;
|
|
226
|
+
policyTraceId: string | null;
|
|
227
|
+
success: true;
|
|
228
228
|
}>;
|
|
229
229
|
/**
|
|
230
230
|
* Create a tenant API key.
|
|
@@ -238,10 +238,10 @@ export declare function createAdminClient(config?: AdminClientConfig): {
|
|
|
238
238
|
key: TenantApiKeyRecord | null;
|
|
239
239
|
plaintextKey: string | undefined;
|
|
240
240
|
};
|
|
241
|
-
success: true;
|
|
242
241
|
correlationId: string;
|
|
243
|
-
policyTraceId: string | null;
|
|
244
242
|
idempotentReplay: boolean;
|
|
243
|
+
policyTraceId: string | null;
|
|
244
|
+
success: true;
|
|
245
245
|
}>;
|
|
246
246
|
/**
|
|
247
247
|
* Revoke a tenant API key.
|
|
@@ -256,10 +256,10 @@ export declare function createAdminClient(config?: AdminClientConfig): {
|
|
|
256
256
|
data: {
|
|
257
257
|
secrets: TenantVaultSecretRecord[];
|
|
258
258
|
};
|
|
259
|
-
success: true;
|
|
260
259
|
correlationId: string;
|
|
261
|
-
policyTraceId: string | null;
|
|
262
260
|
idempotentReplay: boolean;
|
|
261
|
+
policyTraceId: string | null;
|
|
262
|
+
success: true;
|
|
263
263
|
}>;
|
|
264
264
|
/**
|
|
265
265
|
* Create a tenant vault secret.
|
|
@@ -272,10 +272,10 @@ export declare function createAdminClient(config?: AdminClientConfig): {
|
|
|
272
272
|
data: {
|
|
273
273
|
secret: TenantVaultSecretRecord | null;
|
|
274
274
|
};
|
|
275
|
-
success: true;
|
|
276
275
|
correlationId: string;
|
|
277
|
-
policyTraceId: string | null;
|
|
278
276
|
idempotentReplay: boolean;
|
|
277
|
+
policyTraceId: string | null;
|
|
278
|
+
success: true;
|
|
279
279
|
}>;
|
|
280
280
|
/**
|
|
281
281
|
* Update a tenant vault secret.
|
|
@@ -288,10 +288,10 @@ export declare function createAdminClient(config?: AdminClientConfig): {
|
|
|
288
288
|
data: {
|
|
289
289
|
secret: TenantVaultSecretRecord | null;
|
|
290
290
|
};
|
|
291
|
-
success: true;
|
|
292
291
|
correlationId: string;
|
|
293
|
-
policyTraceId: string | null;
|
|
294
292
|
idempotentReplay: boolean;
|
|
293
|
+
policyTraceId: string | null;
|
|
294
|
+
success: true;
|
|
295
295
|
}>;
|
|
296
296
|
/**
|
|
297
297
|
* Delete a tenant vault secret.
|
package/dist/adminClient.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { createGatewayRequestClient,
|
|
1
|
+
import { createGatewayRequestClient,
|
|
2
|
+
// biome-ignore lint/style/noExportedImports: adminClient preserves this legacy compatibility re-export while package root also exports coreClient.
|
|
3
|
+
LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
4
|
import { createListResult, mapGatewayData } from "./sdkSurface.js";
|
|
3
5
|
export { LucernApiError };
|
|
4
6
|
function asTenantApiKeyRecord(data) {
|
|
@@ -51,15 +53,17 @@ export function createAdminClient(config = {}) {
|
|
|
51
53
|
/**
|
|
52
54
|
* List tenants visible to the current principal.
|
|
53
55
|
*/
|
|
54
|
-
|
|
55
|
-
return gateway
|
|
56
|
+
listTenants(query = {}) {
|
|
57
|
+
return gateway
|
|
58
|
+
.request({
|
|
56
59
|
path: `/api/platform/v1/tenants${toQueryString(query)}`,
|
|
57
|
-
})
|
|
60
|
+
})
|
|
61
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "tenants")));
|
|
58
62
|
},
|
|
59
63
|
/**
|
|
60
64
|
* Create a tenant.
|
|
61
65
|
*/
|
|
62
|
-
|
|
66
|
+
createTenant(input, idempotencyKey) {
|
|
63
67
|
return gateway.request({
|
|
64
68
|
path: "/api/platform/v1/tenants",
|
|
65
69
|
method: "POST",
|
|
@@ -78,15 +82,17 @@ export function createAdminClient(config = {}) {
|
|
|
78
82
|
/**
|
|
79
83
|
* List workspaces for the current admin scope.
|
|
80
84
|
*/
|
|
81
|
-
|
|
82
|
-
return gateway
|
|
85
|
+
listWorkspaces(query = {}) {
|
|
86
|
+
return gateway
|
|
87
|
+
.request({
|
|
83
88
|
path: `/api/platform/v1/workspaces${toQueryString(query)}`,
|
|
84
|
-
})
|
|
89
|
+
})
|
|
90
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "workspaces")));
|
|
85
91
|
},
|
|
86
92
|
/**
|
|
87
93
|
* Create a workspace.
|
|
88
94
|
*/
|
|
89
|
-
|
|
95
|
+
createWorkspace(input, idempotencyKey) {
|
|
90
96
|
return gateway.request({
|
|
91
97
|
path: "/api/platform/v1/workspaces",
|
|
92
98
|
method: "POST",
|
|
@@ -97,10 +103,12 @@ export function createAdminClient(config = {}) {
|
|
|
97
103
|
/**
|
|
98
104
|
* List memberships for the current admin scope.
|
|
99
105
|
*/
|
|
100
|
-
|
|
101
|
-
return gateway
|
|
106
|
+
listMemberships(query = {}) {
|
|
107
|
+
return gateway
|
|
108
|
+
.request({
|
|
102
109
|
path: `/api/platform/v1/memberships${toQueryString(query)}`,
|
|
103
|
-
})
|
|
110
|
+
})
|
|
111
|
+
.then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "memberships")));
|
|
104
112
|
},
|
|
105
113
|
/**
|
|
106
114
|
* Create a membership.
|
|
@@ -151,7 +159,7 @@ export function createAdminClient(config = {}) {
|
|
|
151
159
|
/**
|
|
152
160
|
* Revoke a tenant API key.
|
|
153
161
|
*/
|
|
154
|
-
|
|
162
|
+
revokeTenantApiKey(keyId, input = {}, idempotencyKey) {
|
|
155
163
|
return gateway.request({
|
|
156
164
|
path: `/api/platform/v1/tenant-api-keys/${encodeURIComponent(keyId)}/revoke`,
|
|
157
165
|
method: "POST",
|
|
@@ -210,7 +218,7 @@ export function createAdminClient(config = {}) {
|
|
|
210
218
|
/**
|
|
211
219
|
* Delete a tenant vault secret.
|
|
212
220
|
*/
|
|
213
|
-
|
|
221
|
+
deleteTenantVaultSecret(secretId, scope, idempotencyKey) {
|
|
214
222
|
return gateway.request({
|
|
215
223
|
path: `/api/platform/v1/tenant-vault-secrets/${encodeURIComponent(secretId)}${toQueryString(scope)}`,
|
|
216
224
|
method: "DELETE",
|
|
@@ -220,7 +228,7 @@ export function createAdminClient(config = {}) {
|
|
|
220
228
|
/**
|
|
221
229
|
* List tenant provider secrets.
|
|
222
230
|
*/
|
|
223
|
-
|
|
231
|
+
listTenantSecrets(scope) {
|
|
224
232
|
return gateway.request({
|
|
225
233
|
path: `/api/platform/v1/tenant-secrets${toQueryString(scope)}`,
|
|
226
234
|
});
|
|
@@ -228,7 +236,7 @@ export function createAdminClient(config = {}) {
|
|
|
228
236
|
/**
|
|
229
237
|
* Upsert a tenant provider secret.
|
|
230
238
|
*/
|
|
231
|
-
|
|
239
|
+
upsertTenantSecret(input, idempotencyKey) {
|
|
232
240
|
return gateway.request({
|
|
233
241
|
path: "/api/platform/v1/tenant-secrets",
|
|
234
242
|
method: "POST",
|
|
@@ -239,7 +247,7 @@ export function createAdminClient(config = {}) {
|
|
|
239
247
|
/**
|
|
240
248
|
* Revoke a tenant provider secret.
|
|
241
249
|
*/
|
|
242
|
-
|
|
250
|
+
revokeTenantSecret(secretRef, input, idempotencyKey) {
|
|
243
251
|
return gateway.request({
|
|
244
252
|
path: `/api/platform/v1/tenant-secrets/${encodeURIComponent(secretRef)}/revoke`,
|
|
245
253
|
method: "POST",
|
|
@@ -250,7 +258,7 @@ export function createAdminClient(config = {}) {
|
|
|
250
258
|
/**
|
|
251
259
|
* Get tenant configuration.
|
|
252
260
|
*/
|
|
253
|
-
|
|
261
|
+
getTenantConfig(scope) {
|
|
254
262
|
return gateway.request({
|
|
255
263
|
path: `/api/platform/v1/tenant-config${toQueryString(scope)}`,
|
|
256
264
|
});
|
|
@@ -258,7 +266,7 @@ export function createAdminClient(config = {}) {
|
|
|
258
266
|
/**
|
|
259
267
|
* Get tenant model routing.
|
|
260
268
|
*/
|
|
261
|
-
|
|
269
|
+
getTenantModelRouting(scope) {
|
|
262
270
|
return gateway.request({
|
|
263
271
|
path: `/api/platform/v1/tenant-config/model-routing${toQueryString(scope)}`,
|
|
264
272
|
});
|
|
@@ -266,7 +274,7 @@ export function createAdminClient(config = {}) {
|
|
|
266
274
|
/**
|
|
267
275
|
* Upsert tenant configuration.
|
|
268
276
|
*/
|
|
269
|
-
|
|
277
|
+
upsertTenantConfig(input, idempotencyKey) {
|
|
270
278
|
return gateway.request({
|
|
271
279
|
path: "/api/platform/v1/tenant-config",
|
|
272
280
|
method: "POST",
|
|
@@ -277,7 +285,7 @@ export function createAdminClient(config = {}) {
|
|
|
277
285
|
/**
|
|
278
286
|
* List groups.
|
|
279
287
|
*/
|
|
280
|
-
|
|
288
|
+
listGroups(scope = {}) {
|
|
281
289
|
return gateway.request({
|
|
282
290
|
path: `/api/platform/v1/groups${toQueryString(scope)}`,
|
|
283
291
|
});
|
|
@@ -285,7 +293,7 @@ export function createAdminClient(config = {}) {
|
|
|
285
293
|
/**
|
|
286
294
|
* Create a group.
|
|
287
295
|
*/
|
|
288
|
-
|
|
296
|
+
createGroup(input, idempotencyKey) {
|
|
289
297
|
return gateway.request({
|
|
290
298
|
path: "/api/platform/v1/groups",
|
|
291
299
|
method: "POST",
|
|
@@ -296,7 +304,7 @@ export function createAdminClient(config = {}) {
|
|
|
296
304
|
/**
|
|
297
305
|
* Update a group.
|
|
298
306
|
*/
|
|
299
|
-
|
|
307
|
+
updateGroup(groupId, input, idempotencyKey) {
|
|
300
308
|
return gateway.request({
|
|
301
309
|
path: `/api/platform/v1/groups/${encodeURIComponent(groupId)}`,
|
|
302
310
|
method: "PATCH",
|
|
@@ -307,7 +315,7 @@ export function createAdminClient(config = {}) {
|
|
|
307
315
|
/**
|
|
308
316
|
* Delete a group.
|
|
309
317
|
*/
|
|
310
|
-
|
|
318
|
+
deleteGroup(groupId, input = {}, idempotencyKey) {
|
|
311
319
|
return gateway.request({
|
|
312
320
|
path: `/api/platform/v1/groups/${encodeURIComponent(groupId)}${toQueryString(input)}`,
|
|
313
321
|
method: "DELETE",
|
|
@@ -317,7 +325,7 @@ export function createAdminClient(config = {}) {
|
|
|
317
325
|
/**
|
|
318
326
|
* List group members.
|
|
319
327
|
*/
|
|
320
|
-
|
|
328
|
+
listGroupMembers(query) {
|
|
321
329
|
return gateway.request({
|
|
322
330
|
path: `/api/platform/v1/groups/members${toQueryString(query)}`,
|
|
323
331
|
});
|
|
@@ -325,7 +333,7 @@ export function createAdminClient(config = {}) {
|
|
|
325
333
|
/**
|
|
326
334
|
* Add a group member.
|
|
327
335
|
*/
|
|
328
|
-
|
|
336
|
+
addGroupMember(input, idempotencyKey) {
|
|
329
337
|
return gateway.request({
|
|
330
338
|
path: "/api/platform/v1/groups/members",
|
|
331
339
|
method: "POST",
|
|
@@ -336,7 +344,7 @@ export function createAdminClient(config = {}) {
|
|
|
336
344
|
/**
|
|
337
345
|
* Remove a group member.
|
|
338
346
|
*/
|
|
339
|
-
|
|
347
|
+
removeGroupMember(input, idempotencyKey) {
|
|
340
348
|
return gateway.request({
|
|
341
349
|
path: `/api/platform/v1/groups/members${toQueryString(input)}`,
|
|
342
350
|
method: "DELETE",
|
|
@@ -346,7 +354,7 @@ export function createAdminClient(config = {}) {
|
|
|
346
354
|
/**
|
|
347
355
|
* List pack-to-group assignments.
|
|
348
356
|
*/
|
|
349
|
-
|
|
357
|
+
listPackGroupAssignments(query = {}) {
|
|
350
358
|
return gateway.request({
|
|
351
359
|
path: `/api/platform/v1/groups/packs${toQueryString(query)}`,
|
|
352
360
|
});
|
|
@@ -354,7 +362,7 @@ export function createAdminClient(config = {}) {
|
|
|
354
362
|
/**
|
|
355
363
|
* Assign a pack to a group.
|
|
356
364
|
*/
|
|
357
|
-
|
|
365
|
+
assignPackToGroup(input, idempotencyKey) {
|
|
358
366
|
return gateway.request({
|
|
359
367
|
path: "/api/platform/v1/groups/packs",
|
|
360
368
|
method: "POST",
|
|
@@ -365,7 +373,7 @@ export function createAdminClient(config = {}) {
|
|
|
365
373
|
/**
|
|
366
374
|
* Remove a pack from a group.
|
|
367
375
|
*/
|
|
368
|
-
|
|
376
|
+
removePackFromGroup(input, idempotencyKey) {
|
|
369
377
|
return gateway.request({
|
|
370
378
|
path: `/api/platform/v1/groups/packs${toQueryString(input)}`,
|
|
371
379
|
method: "DELETE",
|
|
@@ -14,4 +14,4 @@ export declare function createAnswersClient(config?: AnswersClientConfig): {
|
|
|
14
14
|
*/
|
|
15
15
|
get(questionId: string): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=answers-client.d.ts.map
|
|
@@ -12,11 +12,11 @@ export function createAnswersClient(config = {}) {
|
|
|
12
12
|
* @param questionId - The question node identifier.
|
|
13
13
|
* @returns The answer record for the given question.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
get(questionId) {
|
|
16
16
|
return gateway.request({
|
|
17
17
|
path: `/api/platform/v1/questions/${encodeURIComponent(questionId)}/answer`,
|
|
18
18
|
});
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=answers-client.js.map
|
package/dist/audience/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
export type AudienceMode = "internal" | "lp" | "public";
|
|
2
2
|
export type AudienceClass = "internal" | "restricted_external" | "public";
|
|
3
|
-
export
|
|
4
|
-
audienceKey: string;
|
|
3
|
+
export interface ResolvedAudience {
|
|
5
4
|
audienceClass: AudienceClass;
|
|
5
|
+
audienceKey: string;
|
|
6
6
|
audienceMode: AudienceMode;
|
|
7
|
-
}
|
|
8
|
-
export
|
|
7
|
+
}
|
|
8
|
+
export interface AllowedAudienceScope {
|
|
9
9
|
allowedAudienceClasses: AudienceClass[];
|
|
10
10
|
allowedAudienceKeys: string[];
|
|
11
11
|
allowedAudienceModes: AudienceMode[];
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
mode: "legacy_open" | "grant_enforced" | "admin_override";
|
|
15
|
-
grantModelEnabled: boolean;
|
|
16
|
-
grantedAudienceKeys: string[];
|
|
17
|
-
grantedAudienceClasses: AudienceClass[];
|
|
18
|
-
allowedAudienceKeys: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface PrincipalAudienceScope {
|
|
19
14
|
allowedAudienceClasses: AudienceClass[];
|
|
15
|
+
allowedAudienceKeys: string[];
|
|
20
16
|
allowedAudienceModes: AudienceMode[];
|
|
21
|
-
|
|
17
|
+
grantedAudienceClasses: AudienceClass[];
|
|
18
|
+
grantedAudienceKeys: string[];
|
|
19
|
+
grantModelEnabled: boolean;
|
|
20
|
+
mode: "legacy_open" | "grant_enforced" | "admin_override";
|
|
21
|
+
}
|
|
22
22
|
export declare const AUDIENCE_CLASS_RANK: Record<AudienceClass, number>;
|
|
23
23
|
declare function normalizeKey(key: string | undefined | null): string;
|
|
24
24
|
export declare const normalizeAudienceKey: typeof normalizeKey;
|
|
@@ -91,4 +91,4 @@ export declare function createAudiencesClient(config?: AudiencesClientConfig): {
|
|
|
91
91
|
*/
|
|
92
92
|
revokeGrant: (input: AudienceGrantRevokeInput, idempotencyKey?: string) => Promise<import("./coreClient").PlatformGatewaySuccess<unknown>>;
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=
|
|
94
|
+
//# sourceMappingURL=audiences-client.d.ts.map
|