@lucern/sdk 1.0.11 → 1.0.12
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 +3 -0
- package/dist/.generated +2 -0
- package/dist/accessControl.d.ts +19 -26
- package/dist/accessControl.js +195 -1423
- package/dist/adminClient.d.ts +52 -59
- package/dist/adminClient.js +364 -1142
- package/dist/answersClient.d.ts +5 -14
- package/dist/answersClient.js +19 -737
- package/dist/audience/index.d.ts +18 -18
- package/dist/audience/index.js +87 -90
- package/dist/audiencesClient.d.ts +19 -27
- package/dist/audiencesClient.js +107 -868
- package/dist/auditClient.d.ts +8 -15
- package/dist/auditClient.js +18 -791
- package/dist/authContext.d.ts +11 -16
- package/dist/authContext.js +122 -154
- package/dist/authDeviceClient.d.ts +8 -17
- package/dist/authDeviceClient.js +113 -102
- package/dist/beliefs/index.d.ts +15 -67
- package/dist/beliefs/index.js +17 -10181
- package/dist/beliefs/lifecycle.d.ts +10 -11
- package/dist/beliefs/lifecycle.js +78 -80
- package/dist/beliefsClient.d.ts +26 -32
- package/dist/beliefsClient.js +250 -990
- package/dist/boundaryClientSurface.d.ts +11 -16
- package/dist/boundaryClientSurface.js +49 -68
- package/dist/client.d.ts +64 -112
- package/dist/client.js +232 -10155
- package/dist/clientAssemblyTypes.d.ts +3 -3
- package/dist/clientAssemblyTypes.js +1 -2
- package/dist/clientConfig.d.ts +45 -59
- package/dist/clientConfig.js +1 -2
- package/dist/clientEvidenceCompat.d.ts +7 -14
- package/dist/clientEvidenceCompat.js +50 -64
- package/dist/clientGraphNamespaces.d.ts +3 -5
- package/dist/clientGraphNamespaces.js +170 -245
- package/dist/clientHelpers.d.ts +20 -25
- package/dist/clientHelpers.js +104 -127
- package/dist/clientKnowledgeNamespaces.d.ts +6 -53
- package/dist/clientKnowledgeNamespaces.js +502 -506
- package/dist/clientLocalHelpers.d.ts +11 -56
- package/dist/clientLocalHelpers.js +503 -732
- package/dist/clientPlatformNamespaces.d.ts +5 -53
- package/dist/clientPlatformNamespaces.js +229 -323
- package/dist/clientRuntime.d.ts +5 -53
- package/dist/clientRuntime.js +26 -30
- package/dist/clientWorkflowNamespaces.d.ts +6 -15
- package/dist/clientWorkflowNamespaces.js +529 -596
- package/dist/contextClient.d.ts +9 -17
- package/dist/contextClient.js +92 -805
- package/dist/contextFacade.d.ts +11 -2
- package/dist/contextFacade.js +10 -81
- package/dist/contextPackCompiler.d.ts +10 -11
- package/dist/contextPackCompiler.js +494 -1040
- package/dist/contextPackPolicy.d.ts +14 -15
- package/dist/contextPackPolicy.js +227 -305
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +169 -176
- package/dist/contextTypes.d.ts +14 -15
- package/dist/contextTypes.js +1 -2
- package/dist/contracts/api-enums.contract.d.ts +29 -30
- package/dist/contracts/api-enums.contract.js +162 -88
- package/dist/contracts/auth-session.contract.d.ts +13 -14
- package/dist/contracts/auth-session.contract.js +55 -52
- package/dist/contracts/context-pack.contract.d.ts +54 -55
- package/dist/contracts/context-pack.contract.js +160 -88
- package/dist/contracts/contextPack.d.ts +2 -1
- package/dist/contracts/contextPack.js +1 -97
- package/dist/contracts/index.d.ts +11 -12
- package/dist/contracts/index.js +10 -854
- package/dist/contracts/lens-filter.contract.d.ts +9 -10
- package/dist/contracts/lens-filter.contract.js +82 -58
- package/dist/contracts/lens-workflow.contract.d.ts +21 -23
- package/dist/contracts/lens-workflow.contract.js +48 -117
- package/dist/contracts/lensFilter.d.ts +2 -1
- package/dist/contracts/lensFilter.js +1 -71
- package/dist/contracts/lensWorkflow.d.ts +2 -2
- package/dist/contracts/lensWorkflow.js +1 -123
- package/dist/contracts/mcpTools.d.ts +16 -18
- package/dist/contracts/mcpTools.js +89 -123
- package/dist/contracts/prompt.contract.d.ts +4 -5
- package/dist/contracts/prompt.contract.js +23 -10
- package/dist/contracts/prompt.d.ts +2 -1
- package/dist/contracts/prompt.js +1 -11
- package/dist/contracts/sdk-tools.contract.d.ts +2 -1
- package/dist/contracts/sdk-tools.contract.js +1 -2
- package/dist/contracts/sdkTools.d.ts +2 -1
- package/dist/contracts/sdkTools.js +1 -26
- package/dist/contracts/tool-contracts.d.ts +2 -1
- package/dist/contracts/tool-contracts.js +1 -2
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -46
- package/dist/contracts/workflow-runtime.contract.js +241 -228
- package/dist/contracts/workflowRuntime.d.ts +2 -1
- package/dist/contracts/workflowRuntime.js +1 -244
- package/dist/contradictions/index.d.ts +8 -60
- package/dist/contradictions/index.js +11 -10175
- package/dist/control-plane.d.ts +17 -24
- package/dist/control-plane.js +124 -840
- package/dist/controlObjectOwnership.d.ts +19 -20
- package/dist/controlObjectOwnership.js +207 -201
- package/dist/coreClient.d.ts +23 -28
- package/dist/coreClient.js +567 -692
- package/dist/customTools.d.ts +17 -21
- package/dist/customTools.js +221 -221
- package/dist/decisions/index.d.ts +7 -58
- package/dist/decisions/index.js +14 -10177
- package/dist/decisionsClient.d.ts +25 -32
- package/dist/decisionsClient.js +113 -913
- package/dist/domainContext.d.ts +2 -1
- package/dist/domainContext.js +1 -2
- package/dist/edges/index.d.ts +21 -73
- package/dist/edges/index.js +12 -10176
- package/dist/embeddingsClient.d.ts +22 -30
- package/dist/embeddingsClient.js +73 -922
- package/dist/eventingClient.d.ts +23 -31
- package/dist/eventingClient.js +89 -918
- package/dist/events.d.ts +48 -49
- package/dist/events.js +257 -241
- package/dist/eventsCore.d.ts +20 -29
- package/dist/eventsCore.js +86 -830
- package/dist/evidence/index.d.ts +9 -60
- package/dist/evidence/index.js +13 -10176
- package/dist/evidenceClient.d.ts +13 -22
- package/dist/evidenceClient.js +34 -751
- package/dist/facade/context.d.ts +7 -8
- package/dist/facade/context.js +73 -72
- package/dist/functionSurface.d.ts +2 -156
- package/dist/functionSurface.js +1 -1460
- package/dist/functionSurfaceClient.d.ts +2 -9
- package/dist/functionSurfaceClient.js +1 -1460
- package/dist/gatewayFacades.d.ts +79 -296
- package/dist/gatewayFacades.factories.d.ts +209 -14
- package/dist/gatewayFacades.factories.js +561 -2227
- package/dist/gatewayFacades.js +284 -2627
- package/dist/generated/functionSurface.d.ts +149 -0
- package/dist/generated/functionSurface.js +749 -0
- package/dist/graphAnalysisClient.d.ts +41 -49
- package/dist/graphAnalysisClient.js +185 -974
- package/dist/graphClient.d.ts +53 -60
- package/dist/graphClient.js +219 -1090
- package/dist/graphIntel.d.ts +2 -4
- package/dist/graphIntel.js +1 -2
- package/dist/graphIntelligence.d.ts +4 -2
- package/dist/graphIntelligence.js +2 -46
- package/dist/graphRecommendationsClient.d.ts +15 -23
- package/dist/graphRecommendationsClient.js +70 -849
- package/dist/graphStateClassifierClient.d.ts +17 -25
- package/dist/graphStateClassifierClient.js +67 -908
- package/dist/harnessClient.d.ts +40 -47
- package/dist/harnessClient.js +198 -993
- package/dist/identityClient.d.ts +25 -33
- package/dist/identityClient.js +245 -1186
- package/dist/index.d.ts +73 -69
- package/dist/index.js +72 -13313
- package/dist/infisicalRuntime.d.ts +12 -14
- package/dist/infisicalRuntime.js +290 -297
- package/dist/jobsClient.d.ts +24 -32
- package/dist/jobsClient.js +101 -916
- package/dist/learningClient.d.ts +8 -16
- package/dist/learningClient.js +45 -809
- package/dist/lenses/index.d.ts +13 -65
- package/dist/lenses/index.js +11 -10175
- package/dist/mcpClient.d.ts +14 -23
- package/dist/mcpClient.js +115 -856
- package/dist/modelRuntimeClient.d.ts +18 -26
- package/dist/modelRuntimeClient.js +74 -894
- package/dist/nodes/index.d.ts +7 -58
- package/dist/nodes/index.js +14 -10177
- package/dist/ontologies/index.d.ts +21 -73
- package/dist/ontologies/index.js +14 -10178
- package/dist/ontologyClient.d.ts +23 -31
- package/dist/ontologyClient.js +138 -924
- package/dist/ontologyLinksClient.d.ts +16 -24
- package/dist/ontologyLinksClient.js +76 -886
- package/dist/opinion.d.ts +5 -6
- package/dist/opinion.js +21 -25
- package/dist/orgGraphSearchClient.d.ts +19 -27
- package/dist/orgGraphSearchClient.js +89 -857
- package/dist/packRuntime.d.ts +2 -2
- package/dist/packRuntime.js +1 -2
- package/dist/packsClient.d.ts +30 -37
- package/dist/packsClient.js +131 -906
- package/dist/policyClient.d.ts +21 -29
- package/dist/policyClient.js +267 -1026
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +9 -60
- package/dist/questions/index.js +15 -10178
- package/dist/realtime/index.d.ts +20 -16
- package/dist/realtime/index.js +30 -19
- package/dist/realtime/refs.d.ts +4 -6
- package/dist/realtime/refs.js +12 -7
- package/dist/realtime-refs.d.ts +1 -0
- package/dist/realtime-refs.js +1 -0
- package/dist/realtime.d.ts +1 -0
- package/dist/realtime.js +1 -0
- package/dist/reportsClient.d.ts +10 -19
- package/dist/reportsClient.js +48 -836
- package/dist/schemaClient.d.ts +16 -23
- package/dist/schemaClient.js +62 -832
- package/dist/sdkSurface.d.ts +18 -25
- package/dist/sdkSurface.js +135 -106
- package/dist/secrets.d.ts +2 -1
- package/dist/secrets.js +1 -2
- package/dist/sourcesClient.d.ts +11 -18
- package/dist/sourcesClient.js +18 -741
- package/dist/telemetryClient.d.ts +22 -30
- package/dist/telemetryClient.js +107 -931
- package/dist/toolRegistryClient.d.ts +27 -35
- package/dist/toolRegistryClient.js +116 -954
- package/dist/topics/index.d.ts +13 -64
- package/dist/topics/index.js +15 -10178
- package/dist/topicsClient.d.ts +19 -27
- package/dist/topicsClient.js +106 -894
- package/dist/types.d.ts +84 -87
- package/dist/types.js +1 -2
- package/dist/version.d.ts +2 -3
- package/dist/version.js +2 -5
- package/dist/workflowClient.d.ts +60 -65
- package/dist/workflowClient.js +343 -1219
- package/dist/worktrees/index.d.ts +16 -68
- package/dist/worktrees/index.js +14 -10178
- package/package.json +6 -6
- package/dist/accessControl.js.map +0 -1
- package/dist/adminClient.js.map +0 -1
- package/dist/answersClient.js.map +0 -1
- package/dist/audience/index.js.map +0 -1
- package/dist/audiencesClient.js.map +0 -1
- package/dist/auditClient.js.map +0 -1
- package/dist/authContext.js.map +0 -1
- package/dist/authDeviceClient.js.map +0 -1
- package/dist/beliefs/index.js.map +0 -1
- package/dist/beliefs/lifecycle.js.map +0 -1
- package/dist/beliefsClient.js.map +0 -1
- package/dist/boundaryClientSurface.js.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/clientAssemblyTypes.js.map +0 -1
- package/dist/clientConfig.js.map +0 -1
- package/dist/clientEvidenceCompat.js.map +0 -1
- package/dist/clientGraphNamespaces.js.map +0 -1
- package/dist/clientHelpers.js.map +0 -1
- package/dist/clientKnowledgeNamespaces.js.map +0 -1
- package/dist/clientLocalHelpers.js.map +0 -1
- package/dist/clientPlatformNamespaces.js.map +0 -1
- package/dist/clientRuntime.js.map +0 -1
- package/dist/clientWorkflowNamespaces.js.map +0 -1
- package/dist/contextClient.js.map +0 -1
- package/dist/contextFacade.js.map +0 -1
- package/dist/contextPackCompiler.js.map +0 -1
- package/dist/contextPackPolicy.js.map +0 -1
- package/dist/contextPackSchema.js.map +0 -1
- package/dist/contextTypes.js.map +0 -1
- package/dist/contracts/api-enums.contract.js.map +0 -1
- package/dist/contracts/auth-session.contract.js.map +0 -1
- package/dist/contracts/context-pack.contract.js.map +0 -1
- package/dist/contracts/contextPack.js.map +0 -1
- package/dist/contracts/index.js.map +0 -1
- package/dist/contracts/lens-filter.contract.js.map +0 -1
- package/dist/contracts/lens-workflow.contract.js.map +0 -1
- package/dist/contracts/lensFilter.js.map +0 -1
- package/dist/contracts/lensWorkflow.js.map +0 -1
- package/dist/contracts/mcpTools.js.map +0 -1
- package/dist/contracts/prompt.contract.js.map +0 -1
- package/dist/contracts/prompt.js.map +0 -1
- package/dist/contracts/sdk-tools.contract.js.map +0 -1
- package/dist/contracts/sdkTools.js.map +0 -1
- package/dist/contracts/tool-contracts.js.map +0 -1
- package/dist/contracts/workflow-runtime.contract.js.map +0 -1
- package/dist/contracts/workflowRuntime.js.map +0 -1
- package/dist/contradictions/index.js.map +0 -1
- package/dist/control-plane.js.map +0 -1
- package/dist/controlObjectOwnership.js.map +0 -1
- package/dist/coreClient.js.map +0 -1
- package/dist/customTools.js.map +0 -1
- package/dist/decisions/index.js.map +0 -1
- package/dist/decisionsClient.js.map +0 -1
- package/dist/domainContext.js.map +0 -1
- package/dist/edges/index.js.map +0 -1
- package/dist/embeddingsClient.js.map +0 -1
- package/dist/eventingClient.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/eventsCore.js.map +0 -1
- package/dist/evidence/index.js.map +0 -1
- package/dist/evidenceClient.js.map +0 -1
- package/dist/facade/context.js.map +0 -1
- package/dist/functionSurface.js.map +0 -1
- package/dist/functionSurfaceClient.js.map +0 -1
- package/dist/gatewayFacades.factories.js.map +0 -1
- package/dist/gatewayFacades.js.map +0 -1
- package/dist/graphAnalysisClient.js.map +0 -1
- package/dist/graphClient.js.map +0 -1
- package/dist/graphIntel.js.map +0 -1
- package/dist/graphIntelligence.js.map +0 -1
- package/dist/graphRecommendationsClient.js.map +0 -1
- package/dist/graphStateClassifierClient.js.map +0 -1
- package/dist/harnessClient.js.map +0 -1
- package/dist/identityClient.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infisicalRuntime.js.map +0 -1
- package/dist/jobsClient.js.map +0 -1
- package/dist/learningClient.js.map +0 -1
- package/dist/lenses/index.js.map +0 -1
- package/dist/mcpClient.js.map +0 -1
- package/dist/modelRuntimeClient.js.map +0 -1
- package/dist/nodes/index.js.map +0 -1
- package/dist/ontologies/index.js.map +0 -1
- package/dist/ontologyClient.js.map +0 -1
- package/dist/ontologyLinksClient.js.map +0 -1
- package/dist/opinion.js.map +0 -1
- package/dist/orgGraphSearchClient.js.map +0 -1
- package/dist/packRuntime.js.map +0 -1
- package/dist/packsClient.js.map +0 -1
- package/dist/policyClient.js.map +0 -1
- package/dist/questions/index.js.map +0 -1
- package/dist/realtime/index.js.map +0 -1
- package/dist/realtime/refs.js.map +0 -1
- package/dist/reportsClient.js.map +0 -1
- package/dist/schemaClient.js.map +0 -1
- package/dist/sdk-tools.contract-B4c1Zr1o.d.ts +0 -22
- package/dist/sdkSurface.js.map +0 -1
- package/dist/secrets.js.map +0 -1
- package/dist/sourcesClient.js.map +0 -1
- package/dist/telemetryClient.js.map +0 -1
- package/dist/tool-contracts-BUiL9P6z.d.ts +0 -22
- package/dist/toolRegistryClient.js.map +0 -1
- package/dist/topics/index.js.map +0 -1
- package/dist/topicsClient.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/version.js.map +0 -1
- package/dist/workflowClient.js.map +0 -1
- package/dist/worktrees/index.js.map +0 -1
package/dist/sdkSurface.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { PlatformGatewaySuccess } from
|
|
2
|
-
import {
|
|
3
|
-
import '@lucern/transport-core';
|
|
4
|
-
import './authContext.js';
|
|
5
|
-
import './contracts/auth-session.contract.js';
|
|
6
|
-
import './contracts/workflow-runtime.contract.js';
|
|
7
|
-
import './contracts/lens-workflow.contract.js';
|
|
8
|
-
import './contracts/lens-filter.contract.js';
|
|
9
|
-
|
|
1
|
+
import type { PlatformGatewaySuccess } from "./coreClient";
|
|
2
|
+
import type { JsonObject, ListResult } from "./types";
|
|
10
3
|
type TopicScopedValue = {
|
|
11
4
|
topicId?: string;
|
|
12
5
|
};
|
|
@@ -15,53 +8,53 @@ type TextScopedValue = {
|
|
|
15
8
|
canonicalText?: string;
|
|
16
9
|
};
|
|
17
10
|
type AnyRecord = Record<string, unknown>;
|
|
18
|
-
declare function isRecord(value: unknown): value is AnyRecord;
|
|
19
|
-
declare function asRecord(value: unknown): AnyRecord;
|
|
11
|
+
export declare function isRecord(value: unknown): value is AnyRecord;
|
|
12
|
+
export declare function asRecord(value: unknown): AnyRecord;
|
|
20
13
|
declare function normalizeVerificationStatus(value: unknown): string | undefined;
|
|
21
14
|
/**
|
|
22
15
|
* Resolve the canonical topic identifier.
|
|
23
16
|
*/
|
|
24
|
-
declare function resolveTopicId(value: TopicScopedValue): string | undefined;
|
|
17
|
+
export declare function resolveTopicId(value: TopicScopedValue): string | undefined;
|
|
25
18
|
/**
|
|
26
19
|
* Resolve the canonical text field from text-first or legacy canonicalText-first inputs.
|
|
27
20
|
*/
|
|
28
|
-
declare function resolveText(value: TextScopedValue): string | undefined;
|
|
21
|
+
export declare function resolveText(value: TextScopedValue): string | undefined;
|
|
29
22
|
/**
|
|
30
23
|
* Attach the topicId to a record.
|
|
31
24
|
*/
|
|
32
|
-
declare function withTopicAlias<T extends AnyRecord>(value: T): T;
|
|
25
|
+
export declare function withTopicAlias<T extends AnyRecord>(value: T): T;
|
|
33
26
|
/**
|
|
34
27
|
* Attach the text/canonicalText alias pair to a record.
|
|
35
28
|
*/
|
|
36
|
-
declare function withTextAlias<T extends AnyRecord>(value: T): T;
|
|
29
|
+
export declare function withTextAlias<T extends AnyRecord>(value: T): T;
|
|
37
30
|
/**
|
|
38
31
|
* Attach topic and text aliases to SDK node-like records.
|
|
39
32
|
*/
|
|
40
|
-
declare function withSdkAliases<T extends AnyRecord>(value: T): T;
|
|
33
|
+
export declare function withSdkAliases<T extends AnyRecord>(value: T): T;
|
|
41
34
|
/**
|
|
42
35
|
* Normalize a belief/question/evidence write payload to the canonical gateway shape.
|
|
43
36
|
*/
|
|
44
|
-
declare function normalizeNodeWriteInput<T extends JsonObject>(value: T): T;
|
|
45
|
-
declare const normalizeNodeVerificationStatus: typeof normalizeVerificationStatus;
|
|
37
|
+
export declare function normalizeNodeWriteInput<T extends JsonObject>(value: T): T;
|
|
38
|
+
export declare const normalizeNodeVerificationStatus: typeof normalizeVerificationStatus;
|
|
46
39
|
/**
|
|
47
40
|
* Build a topic-aware query object.
|
|
48
41
|
*/
|
|
49
|
-
declare function normalizeTopicQuery<T extends JsonObject>(value: T): T;
|
|
42
|
+
export declare function normalizeTopicQuery<T extends JsonObject>(value: T): T;
|
|
50
43
|
/**
|
|
51
44
|
* Extract list items from array or list-envelope payloads.
|
|
52
45
|
*/
|
|
53
|
-
declare function asListItems<T>(data: unknown, legacyKey?: string): T[];
|
|
46
|
+
export declare function asListItems<T>(data: unknown, legacyKey?: string): T[];
|
|
54
47
|
/**
|
|
55
48
|
* Standardize list data to { items, total } while retaining an optional legacy array key.
|
|
56
49
|
*/
|
|
57
|
-
declare function createListResult<T, LegacyKey extends string>(items: T[], legacyKey?: LegacyKey): ListResult<T, LegacyKey>;
|
|
50
|
+
export declare function createListResult<T, LegacyKey extends string>(items: T[], legacyKey?: LegacyKey): ListResult<T, LegacyKey>;
|
|
58
51
|
/**
|
|
59
52
|
* Map a gateway success envelope's data while preserving the transport metadata.
|
|
60
53
|
*/
|
|
61
|
-
declare function mapGatewayData<T, U>(response: PlatformGatewaySuccess<T>, mapper: (data: T) => U): PlatformGatewaySuccess<U>;
|
|
54
|
+
export declare function mapGatewayData<T, U>(response: PlatformGatewaySuccess<T>, mapper: (data: T) => U): PlatformGatewaySuccess<U>;
|
|
62
55
|
/**
|
|
63
56
|
* Apply SDK aliases across all items in a list-like payload.
|
|
64
57
|
*/
|
|
65
|
-
declare function mapAliasedList<TItem extends AnyRecord, LegacyKey extends string>(data: unknown, legacyKey?: LegacyKey): ListResult<TItem, LegacyKey>;
|
|
66
|
-
|
|
67
|
-
|
|
58
|
+
export declare function mapAliasedList<TItem extends AnyRecord, LegacyKey extends string>(data: unknown, legacyKey?: LegacyKey): ListResult<TItem, LegacyKey>;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=sdkSurface.d.ts.map
|
package/dist/sdkSurface.js
CHANGED
|
@@ -1,116 +1,145 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1
|
+
export function isRecord(value) {
|
|
2
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
4
3
|
}
|
|
5
|
-
function asRecord(value) {
|
|
6
|
-
|
|
4
|
+
export function asRecord(value) {
|
|
5
|
+
return isRecord(value) ? value : {};
|
|
7
6
|
}
|
|
8
7
|
function cleanString(value) {
|
|
9
|
-
|
|
8
|
+
return typeof value === "string" && value.trim().length > 0
|
|
9
|
+
? value.trim()
|
|
10
|
+
: undefined;
|
|
10
11
|
}
|
|
11
12
|
function normalizeVerificationStatus(value) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
const status = cleanString(value);
|
|
14
|
+
if (!status) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
if (status === "verified") {
|
|
18
|
+
return "human_verified";
|
|
19
|
+
}
|
|
20
|
+
if (status === "rejected") {
|
|
21
|
+
return "contradicted";
|
|
22
|
+
}
|
|
23
|
+
return status;
|
|
23
24
|
}
|
|
24
25
|
function cloneWith(value, patch) {
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
26
|
+
return { ...value, ...patch };
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the canonical topic identifier.
|
|
30
|
+
*/
|
|
31
|
+
export function resolveTopicId(value) {
|
|
32
|
+
return cleanString(value.topicId);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve the canonical text field from text-first or legacy canonicalText-first inputs.
|
|
36
|
+
*/
|
|
37
|
+
export function resolveText(value) {
|
|
38
|
+
return cleanString(value.text) ?? cleanString(value.canonicalText);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Attach the topicId to a record.
|
|
42
|
+
*/
|
|
43
|
+
export function withTopicAlias(value) {
|
|
44
|
+
const topicId = cleanString(value.topicId) ?? undefined;
|
|
45
|
+
if (!topicId) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return cloneWith(value, { topicId });
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Attach the text/canonicalText alias pair to a record.
|
|
52
|
+
*/
|
|
53
|
+
export function withTextAlias(value) {
|
|
54
|
+
const text = cleanString(value.text) ?? cleanString(value.canonicalText) ?? undefined;
|
|
55
|
+
if (!text) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return cloneWith(value, { text, canonicalText: text });
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Attach topic and text aliases to SDK node-like records.
|
|
62
|
+
*/
|
|
63
|
+
export function withSdkAliases(value) {
|
|
64
|
+
return withTopicAlias(withTextAlias(value));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Normalize a belief/question/evidence write payload to the canonical gateway shape.
|
|
68
|
+
*/
|
|
69
|
+
export function normalizeNodeWriteInput(value) {
|
|
70
|
+
const topicId = resolveTopicId(value);
|
|
71
|
+
const text = resolveText(value);
|
|
72
|
+
const verificationStatus = normalizeVerificationStatus(value.verificationStatus);
|
|
73
|
+
const next = { ...value };
|
|
74
|
+
if (topicId) {
|
|
75
|
+
next.topicId = topicId;
|
|
76
|
+
}
|
|
77
|
+
if (text) {
|
|
78
|
+
next.text = text;
|
|
79
|
+
next.canonicalText = text;
|
|
80
|
+
}
|
|
81
|
+
if (verificationStatus) {
|
|
82
|
+
next.verificationStatus = verificationStatus;
|
|
83
|
+
}
|
|
84
|
+
return next;
|
|
85
|
+
}
|
|
86
|
+
export const normalizeNodeVerificationStatus = normalizeVerificationStatus;
|
|
87
|
+
/**
|
|
88
|
+
* Build a topic-aware query object.
|
|
89
|
+
*/
|
|
90
|
+
export function normalizeTopicQuery(value) {
|
|
91
|
+
const topicId = cleanString(value.topicId);
|
|
92
|
+
if (!topicId) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
return { ...value, topicId };
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Extract list items from array or list-envelope payloads.
|
|
99
|
+
*/
|
|
100
|
+
export function asListItems(data, legacyKey) {
|
|
101
|
+
if (Array.isArray(data)) {
|
|
102
|
+
return data;
|
|
103
|
+
}
|
|
104
|
+
const record = asRecord(data);
|
|
105
|
+
if (Array.isArray(record.items)) {
|
|
106
|
+
return record.items;
|
|
107
|
+
}
|
|
108
|
+
if (legacyKey && Array.isArray(record[legacyKey])) {
|
|
109
|
+
return record[legacyKey];
|
|
110
|
+
}
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Standardize list data to { items, total } while retaining an optional legacy array key.
|
|
115
|
+
*/
|
|
116
|
+
export function createListResult(items, legacyKey) {
|
|
117
|
+
const result = {
|
|
118
|
+
items,
|
|
119
|
+
total: items.length,
|
|
120
|
+
};
|
|
121
|
+
if (legacyKey) {
|
|
122
|
+
return {
|
|
123
|
+
...result,
|
|
124
|
+
[legacyKey]: items,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return result;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Map a gateway success envelope's data while preserving the transport metadata.
|
|
131
|
+
*/
|
|
132
|
+
export function mapGatewayData(response, mapper) {
|
|
94
133
|
return {
|
|
95
|
-
|
|
96
|
-
|
|
134
|
+
...response,
|
|
135
|
+
data: mapper(response.data),
|
|
97
136
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
function mapAliasedList(data, legacyKey) {
|
|
108
|
-
const items = asListItems(data, legacyKey).map(
|
|
109
|
-
(item) => withSdkAliases(item)
|
|
110
|
-
);
|
|
111
|
-
return createListResult(items, legacyKey);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { asListItems, asRecord, createListResult, isRecord, mapAliasedList, mapGatewayData, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeTopicQuery, resolveText, resolveTopicId, withSdkAliases, withTextAlias, withTopicAlias };
|
|
115
|
-
//# sourceMappingURL=sdkSurface.js.map
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Apply SDK aliases across all items in a list-like payload.
|
|
140
|
+
*/
|
|
141
|
+
export function mapAliasedList(data, legacyKey) {
|
|
142
|
+
const items = asListItems(data, legacyKey).map((item) => withSdkAliases(item));
|
|
143
|
+
return createListResult(items, legacyKey);
|
|
144
|
+
}
|
|
116
145
|
//# sourceMappingURL=sdkSurface.js.map
|
package/dist/secrets.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { BrokeredSecretLeaseRef, BrokeredSecretRequest, BrokeredSecretResolverOptions, BrokeredSecretResolverResult,
|
|
1
|
+
export { SecretResolverError, type SecretResolverErrorCode, type SecretResolverFetch, type BrokeredSecretLeaseRef, type BrokeredSecretRequest, type BrokeredSecretResolverOptions, type BrokeredSecretResolverResult, type SecretBootstrapOptions, type SecretBrokerClient, type SecretResolverOptions, type SecretResolverResult, type McProxyBindingRef, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, } from "@lucern/secrets";
|
|
2
|
+
//# sourceMappingURL=secrets.d.ts.map
|
package/dist/secrets.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { SecretResolverError, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding } from
|
|
2
|
-
//# sourceMappingURL=secrets.js.map
|
|
1
|
+
export { SecretResolverError, requestBrokeredInfisicalSecret, resolveInfisicalSecretFromBinding, } from "@lucern/secrets";
|
|
3
2
|
//# sourceMappingURL=secrets.js.map
|
package/dist/sourcesClient.d.ts
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { GatewayClientConfig,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import './contracts/workflow-runtime.contract.js';
|
|
9
|
-
import './contracts/lens-workflow.contract.js';
|
|
10
|
-
import './contracts/lens-filter.contract.js';
|
|
11
|
-
|
|
12
|
-
type SourcesClientConfig = GatewayClientConfig;
|
|
13
|
-
type UpsertSourceSpec = {
|
|
1
|
+
import { type GatewayClientConfig, LucernApiError } from "./coreClient";
|
|
2
|
+
import type { JsonObject } from "./types";
|
|
3
|
+
export { LucernApiError };
|
|
4
|
+
export type { PlatformGatewaySuccess } from "./coreClient";
|
|
5
|
+
export type { GetSourceResponse, UpsertSourceResponse } from "./types";
|
|
6
|
+
export type SourcesClientConfig = GatewayClientConfig;
|
|
7
|
+
export type UpsertSourceSpec = {
|
|
14
8
|
url?: string;
|
|
15
9
|
sha?: string;
|
|
16
10
|
kind: string;
|
|
@@ -19,9 +13,8 @@ type UpsertSourceSpec = {
|
|
|
19
13
|
topicId?: string;
|
|
20
14
|
metadata?: JsonObject;
|
|
21
15
|
};
|
|
22
|
-
declare function createSourcesClient(config?: SourcesClientConfig): {
|
|
23
|
-
upsert(spec: UpsertSourceSpec, idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
|
|
24
|
-
get(sourceId: string): Promise<PlatformGatewaySuccess<PlatformSourceRecord>>;
|
|
16
|
+
export declare function createSourcesClient(config?: SourcesClientConfig): {
|
|
17
|
+
upsert(spec: UpsertSourceSpec, idempotencyKey?: string): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").PlatformSourceRecord>>;
|
|
18
|
+
get(sourceId: string): Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").PlatformSourceRecord>>;
|
|
25
19
|
};
|
|
26
|
-
|
|
27
|
-
export { PlatformGatewaySuccess, type SourcesClientConfig, type UpsertSourceSpec, createSourcesClient };
|
|
20
|
+
//# sourceMappingURL=sourcesClient.d.ts.map
|