@lucern/sdk 1.0.29 → 1.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
package/dist/client.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { createAdminClient } from "./adminClient.js";
|
|
2
1
|
import { createAccessControlClient } from "./accessControl.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { createAdminClient } from "./adminClient.js";
|
|
3
|
+
import { createAnswersClient } from "./answers-client.js";
|
|
4
|
+
import { createAudiencesClient } from "./audiences-client.js";
|
|
5
|
+
import { createAuditClient } from "./audit-client.js";
|
|
6
6
|
import { createAuthDeviceClient } from "./authDeviceClient.js";
|
|
7
|
-
import { createBeliefsClient
|
|
7
|
+
import { createBeliefsClient } from "./beliefsClient.js";
|
|
8
8
|
import { createClientGraphNamespaces } from "./clientGraphNamespaces.js";
|
|
9
|
+
import { buildBeliefsArchivePayload, buildBeliefsRefinePayload, requireBaseRate, requireText, requireTopicId, requireTopicOrProjectId, resolveCustomToolFullName, sdkQueryString, } from "./clientHelpers.js";
|
|
9
10
|
import { createClientKnowledgeNamespaces } from "./clientKnowledgeNamespaces.js";
|
|
10
11
|
import { createClientLocalHelpers } from "./clientLocalHelpers.js";
|
|
11
12
|
import { createClientPlatformNamespaces } from "./clientPlatformNamespaces.js";
|
|
12
|
-
import { createClientWorkflowNamespaces } from "./clientWorkflowNamespaces.js";
|
|
13
13
|
import { exposeGatewayData, toGatewayConfig } from "./clientRuntime.js";
|
|
14
|
-
import {
|
|
14
|
+
import { createClientWorkflowNamespaces } from "./clientWorkflowNamespaces.js";
|
|
15
|
+
import { createContextClient } from "./contextClient.js";
|
|
16
|
+
import { createControlPlaneClient } from "./control-plane.js";
|
|
15
17
|
import { createGatewayRequestClient, LucernApiError, randomIdempotencyKey, } from "./coreClient.js";
|
|
16
|
-
import { buildBeliefsArchivePayload, buildBeliefsRefinePayload, requireBaseRate, requireText, requireTopicId, requireTopicOrProjectId, resolveCustomToolFullName, sdkQueryString, } from "./clientHelpers.js";
|
|
17
|
-
import { createControlPlaneClient, } from "./control-plane.js";
|
|
18
18
|
import { clearRegisteredCustomTools, listRegisteredCustomTools, registerCustomTool, unregisterCustomTool, } from "./customTools.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { createContextClient, } from "./contextClient.js";
|
|
23
|
-
import { createEventingClient, } from "./eventingClient.js";
|
|
19
|
+
import { createDecisionsClient } from "./decisionsClient.js";
|
|
20
|
+
import { createEmbeddingsClient } from "./embeddingsClient.js";
|
|
21
|
+
import { createEventingClient } from "./eventingClient.js";
|
|
24
22
|
import { createEvidenceClient } from "./evidenceClient.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
23
|
+
import { createBeliefsFacade, createContradictionsFacade, createEdgesFacade, createEventsFacade, createEvidenceFacade, createGraphFacade, createIdentityFacade, createOntologiesFacade, createQuestionsFacade, createSearchFacade, createTasksFacade, createTopicsFacade, createWebhooksFacade, createWorktreesFacade, } from "./gatewayFacades.js";
|
|
24
|
+
import { createFunctionSurfaceClient } from "./generated/functionSurface.js";
|
|
25
|
+
import { createGraphAnalysisClient } from "./graphAnalysisClient.js";
|
|
27
26
|
import { createGraphClient } from "./graphClient.js";
|
|
28
|
-
import { createGraphRecommendationsClient
|
|
29
|
-
import { createGraphStateClassifierClient
|
|
27
|
+
import { createGraphRecommendationsClient } from "./graphRecommendationsClient.js";
|
|
28
|
+
import { createGraphStateClassifierClient } from "./graphStateClassifierClient.js";
|
|
30
29
|
import { createHarnessClient } from "./harnessClient.js";
|
|
31
|
-
import { createIdentityClient
|
|
30
|
+
import { createIdentityClient } from "./identityClient.js";
|
|
32
31
|
import { createJobsClient } from "./jobsClient.js";
|
|
33
|
-
import { createLearningClient
|
|
32
|
+
import { createLearningClient } from "./learningClient.js";
|
|
34
33
|
import { createMcpClient } from "./mcpClient.js";
|
|
35
|
-
import { createModelRuntimeClient
|
|
36
|
-
import { createOntologyClient
|
|
37
|
-
import { createOntologyLinksClient
|
|
38
|
-
import { createOrgGraphSearchClient
|
|
34
|
+
import { createModelRuntimeClient } from "./modelRuntimeClient.js";
|
|
35
|
+
import { createOntologyClient } from "./ontologyClient.js";
|
|
36
|
+
import { createOntologyLinksClient } from "./ontologyLinksClient.js";
|
|
37
|
+
import { createOrgGraphSearchClient } from "./orgGraphSearchClient.js";
|
|
39
38
|
import { createPacksClient } from "./packsClient.js";
|
|
40
39
|
import { createPolicyClient } from "./policyClient.js";
|
|
41
|
-
import { createReportsClient } from "./
|
|
42
|
-
import { createSchemaClient } from "./
|
|
40
|
+
import { createReportsClient } from "./reports-client.js";
|
|
41
|
+
import { createSchemaClient } from "./schema-client.js";
|
|
43
42
|
import { resolveTopicId } from "./sdkSurface.js";
|
|
44
|
-
import {
|
|
43
|
+
import { createSourcesClient } from "./sources-client.js";
|
|
44
|
+
import { createTelemetryClient } from "./telemetry-client.js";
|
|
45
|
+
import { createToolRegistryClient } from "./toolRegistryClient.js";
|
|
45
46
|
import { createTopicsClient } from "./topicsClient.js";
|
|
46
|
-
import { createToolRegistryClient, } from "./toolRegistryClient.js";
|
|
47
47
|
import { LUCERN_SDK_VERSION } from "./version.js";
|
|
48
|
-
import { createWorkflowClient
|
|
48
|
+
import { createWorkflowClient } from "./workflowClient.js";
|
|
49
49
|
/**
|
|
50
50
|
* Create the high-level Lucern SDK client with all domain namespaces.
|
|
51
51
|
*
|
|
@@ -117,8 +117,12 @@ export function createLucernClient(config = {}) {
|
|
|
117
117
|
}
|
|
118
118
|
const installPromise = (async () => {
|
|
119
119
|
try {
|
|
120
|
+
const packKey = config.packKey;
|
|
121
|
+
if (!packKey) {
|
|
122
|
+
throw new Error("packKey is required");
|
|
123
|
+
}
|
|
120
124
|
await packsClient.install({
|
|
121
|
-
packKey
|
|
125
|
+
packKey,
|
|
122
126
|
autoEnable: true,
|
|
123
127
|
});
|
|
124
128
|
packInstalled = true;
|
|
@@ -1,50 +1,60 @@
|
|
|
1
|
-
import type { ClientNamespaceContext } from "./
|
|
1
|
+
import type { ClientNamespaceContext } from "./client-assembly-types";
|
|
2
2
|
export declare function createClientGraphNamespaces(ctx: ClientNamespaceContext): {
|
|
3
3
|
graph: {
|
|
4
|
-
nodes:
|
|
5
|
-
createEdge: (
|
|
6
|
-
neighborhood(args: Parameters<(
|
|
7
|
-
queryLineage:
|
|
8
|
-
getConfidenceHistory:
|
|
9
|
-
getOpinionHistory:
|
|
10
|
-
getAuditTrail:
|
|
4
|
+
nodes: import("./client-assembly-types").ClientNodesNamespace;
|
|
5
|
+
createEdge: (input: import("./graphClient").CreateEdgeInput, idempotencyKey?: string) => Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").PlatformGraphEdge>>;
|
|
6
|
+
neighborhood(args: Parameters<(query: import("./graphClient").NeighborhoodInput) => Promise<import("./coreClient").PlatformGatewaySuccess<import("./types").GraphNeighborhoodResponse>>>[0]): Promise<import("./client-config").GatewayDataEnvelope<import("./types").GraphNeighborhoodResponse>>;
|
|
7
|
+
queryLineage: (args_0: string, args_1?: number | undefined) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
8
|
+
getConfidenceHistory: (args_0: string) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
9
|
+
getOpinionHistory: (args_0: string) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
10
|
+
getAuditTrail: (nodeId: string, limit?: number) => Promise<{
|
|
11
|
+
entries: import("./client-assembly-types").AuditTrailEntry[];
|
|
12
|
+
}>;
|
|
11
13
|
traverse(args: {
|
|
12
14
|
startNode: string;
|
|
13
15
|
direction?: string;
|
|
14
16
|
maxDepth?: number;
|
|
15
17
|
topicId?: string;
|
|
16
|
-
}):
|
|
18
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
17
19
|
analyze(args: {
|
|
18
20
|
topicId?: string;
|
|
19
21
|
limit?: number;
|
|
20
22
|
metric?: string;
|
|
21
|
-
}):
|
|
23
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
22
24
|
bias(args: {
|
|
23
25
|
topicId?: string;
|
|
24
26
|
threshold?: number;
|
|
25
27
|
limit?: number;
|
|
26
|
-
}):
|
|
28
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
27
29
|
gaps(args: {
|
|
28
30
|
topicId?: string;
|
|
29
31
|
minConfidence?: number;
|
|
30
|
-
}):
|
|
32
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
31
33
|
falsify(args: {
|
|
32
34
|
topicId?: string;
|
|
33
35
|
beliefId?: string;
|
|
34
36
|
beliefIds?: string[];
|
|
35
37
|
minConfidence?: number;
|
|
36
|
-
}):
|
|
38
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<import("./gatewayFacades").GatewayRecord>>;
|
|
37
39
|
traceEntityImpact(args: {
|
|
38
40
|
nodeId: string;
|
|
39
41
|
topicId?: string;
|
|
40
|
-
}):
|
|
41
|
-
searchBeliefs:
|
|
42
|
-
findContradictions:
|
|
43
|
-
bisectConfidence:
|
|
44
|
-
listBeliefs:
|
|
45
|
-
detectConfirmationBias(topicId: string, threshold?: number):
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
}): Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
43
|
+
searchBeliefs: (args_0: import("./types").JsonObject) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
44
|
+
findContradictions: (args_0: import("./types").JsonObject) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
45
|
+
bisectConfidence: (args_0: import("./types").JsonObject) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
46
|
+
listBeliefs: (args_0: import("./types").JsonObject) => Promise<import("./coreClient").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
47
|
+
detectConfirmationBias(topicId: string, threshold?: number): Promise<{
|
|
48
|
+
topicId: string;
|
|
49
|
+
threshold: number;
|
|
50
|
+
}>;
|
|
51
|
+
getStructureAnalysis(topicId: string): Promise<{
|
|
52
|
+
topicId: string;
|
|
53
|
+
}>;
|
|
54
|
+
getFalsificationQuestions(topicId: string, beliefIds?: string[]): Promise<{
|
|
55
|
+
topicId: string;
|
|
56
|
+
questions: unknown;
|
|
57
|
+
}>;
|
|
48
58
|
};
|
|
49
59
|
themes: {
|
|
50
60
|
listByTopic(input: {
|
|
@@ -53,7 +63,7 @@ export declare function createClientGraphNamespaces(ctx: ClientNamespaceContext)
|
|
|
53
63
|
query?: string;
|
|
54
64
|
limit?: number;
|
|
55
65
|
cursor?: string;
|
|
56
|
-
}): Promise<
|
|
66
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
57
67
|
};
|
|
58
68
|
graphSearch: {
|
|
59
69
|
keywordSearchNodes(input: {
|
|
@@ -65,7 +75,7 @@ export declare function createClientGraphNamespaces(ctx: ClientNamespaceContext)
|
|
|
65
75
|
nodeTypes?: string[];
|
|
66
76
|
limit?: number;
|
|
67
77
|
cursor?: string;
|
|
68
|
-
}): Promise<
|
|
78
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
69
79
|
};
|
|
70
80
|
classifiers: {
|
|
71
81
|
listBeliefCandidates(input: {
|
|
@@ -75,14 +85,14 @@ export declare function createClientGraphNamespaces(ctx: ClientNamespaceContext)
|
|
|
75
85
|
query?: string;
|
|
76
86
|
limit?: number;
|
|
77
87
|
cursor?: string;
|
|
78
|
-
}): Promise<
|
|
88
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
79
89
|
};
|
|
80
90
|
archetypes: {
|
|
81
91
|
getJudgmentSignature(input: {
|
|
82
92
|
topicId?: string;
|
|
83
93
|
projectId?: string;
|
|
84
94
|
principalId?: string;
|
|
85
|
-
}): Promise<
|
|
95
|
+
}): Promise<import("./client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
86
96
|
};
|
|
87
97
|
};
|
|
88
98
|
//# sourceMappingURL=clientGraphNamespaces.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function createClientGraphNamespaces(ctx) {
|
|
2
|
-
const {
|
|
2
|
+
const { bisectConfidence, exposeGatewayData, findContradictions, gateway, getAuditTrail, getConfidenceHistory, getOpinionHistory, graphClient, graphFacade, listBeliefs, nodesNamespace, queryLineage, requireTopicId, requireTopicOrProjectId, sdkQueryString, searchBeliefs, traceEntityImpactCompat, } = ctx;
|
|
3
3
|
return {
|
|
4
4
|
graph: {
|
|
5
5
|
nodes: nodesNamespace,
|
|
@@ -79,21 +79,27 @@ export function createClientGraphNamespaces(ctx) {
|
|
|
79
79
|
bisectConfidence,
|
|
80
80
|
listBeliefs,
|
|
81
81
|
detectConfirmationBias(topicId, threshold) {
|
|
82
|
-
return graphFacade
|
|
82
|
+
return graphFacade
|
|
83
|
+
.bias({
|
|
83
84
|
topicId,
|
|
84
85
|
threshold,
|
|
85
86
|
limit: 200,
|
|
86
|
-
})
|
|
87
|
+
})
|
|
88
|
+
.then(exposeGatewayData)
|
|
89
|
+
.then((response) => ({
|
|
87
90
|
...response,
|
|
88
91
|
topicId,
|
|
89
92
|
threshold: threshold ?? 0.7,
|
|
90
93
|
}));
|
|
91
94
|
},
|
|
92
95
|
getStructureAnalysis(topicId) {
|
|
93
|
-
return graphFacade
|
|
96
|
+
return graphFacade
|
|
97
|
+
.analyze({
|
|
94
98
|
topicId,
|
|
95
99
|
limit: 200,
|
|
96
|
-
})
|
|
100
|
+
})
|
|
101
|
+
.then(exposeGatewayData)
|
|
102
|
+
.then((response) => ({
|
|
97
103
|
...response,
|
|
98
104
|
topicId,
|
|
99
105
|
}));
|
package/dist/clientHelpers.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 { asListItems, resolveText, resolveTopicId } from "./sdkSurface.js";
|
|
2
3
|
export function normalizeCustomNamespace(namespace) {
|
|
3
4
|
return namespace.trim() || "custom";
|
|
@@ -16,11 +17,13 @@ export function buildBeliefsRefinePayload(textOrInput, rationale) {
|
|
|
16
17
|
: { text: textOrInput.text, rationale: textOrInput.rationale };
|
|
17
18
|
}
|
|
18
19
|
export function buildBeliefsArchivePayload(input) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
if (typeof input === "string") {
|
|
21
|
+
return { reason: input };
|
|
22
|
+
}
|
|
23
|
+
if (input) {
|
|
24
|
+
return { reason: input.reason ?? input.rationale };
|
|
25
|
+
}
|
|
26
|
+
return;
|
|
24
27
|
}
|
|
25
28
|
export function asNodeArray(data) {
|
|
26
29
|
const rows = asListItems(data, "nodes");
|