@lucern/sdk 0.3.0-alpha.3 → 0.3.0-alpha.5
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/README.md +47 -0
- package/dist/adminClient.js +4 -3
- package/dist/adminClient.js.map +1 -1
- package/dist/answersClient.js +4 -3
- package/dist/answersClient.js.map +1 -1
- package/dist/audiencesClient.js +4 -3
- package/dist/audiencesClient.js.map +1 -1
- package/dist/auditClient.js +4 -3
- package/dist/auditClient.js.map +1 -1
- package/dist/authContext.js +4 -3
- package/dist/authContext.js.map +1 -1
- package/dist/beliefs/index.d.ts +3 -1
- package/dist/beliefs/index.js +333 -7
- package/dist/beliefs/index.js.map +1 -1
- package/dist/beliefsClient.js +4 -3
- package/dist/beliefsClient.js.map +1 -1
- package/dist/client.d.ts +2981 -40
- package/dist/client.js +333 -7
- package/dist/client.js.map +1 -1
- package/dist/contextClient.js +4 -3
- package/dist/contextClient.js.map +1 -1
- package/dist/contracts/api-enums.contract.d.ts +1 -1
- package/dist/contracts/api-enums.contract.js.map +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/contradictions/index.d.ts +3 -1
- package/dist/contradictions/index.js +333 -7
- package/dist/contradictions/index.js.map +1 -1
- package/dist/coreClient.js +4 -3
- package/dist/coreClient.js.map +1 -1
- package/dist/decisions/index.d.ts +3 -1
- package/dist/decisions/index.js +333 -7
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisionsClient.js +4 -3
- package/dist/decisionsClient.js.map +1 -1
- package/dist/edges/index.d.ts +3 -1
- package/dist/edges/index.js +333 -7
- package/dist/edges/index.js.map +1 -1
- package/dist/embeddingsClient.js +4 -3
- package/dist/embeddingsClient.js.map +1 -1
- package/dist/eventingClient.js +4 -3
- package/dist/eventingClient.js.map +1 -1
- package/dist/eventsCore.js +4 -3
- package/dist/eventsCore.js.map +1 -1
- package/dist/evidence/index.d.ts +3 -1
- package/dist/evidence/index.js +333 -7
- package/dist/evidence/index.js.map +1 -1
- package/dist/evidenceClient.js +4 -3
- package/dist/evidenceClient.js.map +1 -1
- package/dist/functionSurface.d.ts +129 -0
- package/dist/functionSurface.js +1118 -0
- package/dist/functionSurface.js.map +1 -0
- package/dist/functionSurfaceClient.d.ts +8 -0
- package/dist/functionSurfaceClient.js +1118 -0
- package/dist/functionSurfaceClient.js.map +1 -0
- package/dist/gatewayFacades.d.ts +34 -1
- package/dist/gatewayFacades.js +4 -3
- package/dist/gatewayFacades.js.map +1 -1
- package/dist/graphAnalysisClient.d.ts +53 -1
- package/dist/graphAnalysisClient.js +31 -4
- package/dist/graphAnalysisClient.js.map +1 -1
- package/dist/graphClient.js +4 -3
- package/dist/graphClient.js.map +1 -1
- package/dist/graphIntel.d.ts +3 -0
- package/dist/graphIntel.js +3 -0
- package/dist/graphIntel.js.map +1 -0
- package/dist/graphIntelligence.d.ts +2 -0
- package/dist/graphIntelligence.js +47 -0
- package/dist/graphIntelligence.js.map +1 -0
- package/dist/graphRecommendationsClient.js +4 -3
- package/dist/graphRecommendationsClient.js.map +1 -1
- package/dist/graphStateClassifierClient.js +4 -3
- package/dist/graphStateClassifierClient.js.map +1 -1
- package/dist/harnessClient.js +4 -3
- package/dist/harnessClient.js.map +1 -1
- package/dist/identityClient.js +4 -3
- package/dist/identityClient.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.js +670 -8
- package/dist/index.js.map +1 -1
- package/dist/infisicalRuntime.d.ts +42 -0
- package/dist/infisicalRuntime.js +291 -0
- package/dist/infisicalRuntime.js.map +1 -0
- package/dist/jobsClient.js +4 -3
- package/dist/jobsClient.js.map +1 -1
- package/dist/learningClient.js +4 -3
- package/dist/learningClient.js.map +1 -1
- package/dist/lenses/index.d.ts +28 -2
- package/dist/lenses/index.js +333 -7
- package/dist/lenses/index.js.map +1 -1
- package/dist/mcpClient.js +4 -3
- package/dist/mcpClient.js.map +1 -1
- package/dist/modelRuntimeClient.js +4 -3
- package/dist/modelRuntimeClient.js.map +1 -1
- package/dist/nodes/index.d.ts +21 -1
- package/dist/nodes/index.js +333 -7
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.d.ts +3 -1
- package/dist/ontologies/index.js +333 -7
- package/dist/ontologies/index.js.map +1 -1
- package/dist/ontologyClient.js +4 -3
- package/dist/ontologyClient.js.map +1 -1
- package/dist/ontologyLinksClient.js +4 -3
- package/dist/ontologyLinksClient.js.map +1 -1
- package/dist/orgGraphSearchClient.js +4 -3
- package/dist/orgGraphSearchClient.js.map +1 -1
- package/dist/packRuntime.d.ts +2 -1
- package/dist/packsClient.js +4 -3
- package/dist/packsClient.js.map +1 -1
- package/dist/policyClient.js +4 -3
- package/dist/policyClient.js.map +1 -1
- package/dist/questions/index.d.ts +3 -1
- package/dist/questions/index.js +333 -7
- package/dist/questions/index.js.map +1 -1
- package/dist/reportsClient.js +4 -3
- package/dist/reportsClient.js.map +1 -1
- package/dist/schemaClient.js +4 -3
- package/dist/schemaClient.js.map +1 -1
- package/dist/sourcesClient.js +4 -3
- package/dist/sourcesClient.js.map +1 -1
- package/dist/telemetryClient.js +4 -3
- package/dist/telemetryClient.js.map +1 -1
- package/dist/toolRegistryClient.js +4 -3
- package/dist/toolRegistryClient.js.map +1 -1
- package/dist/topics/index.d.ts +3 -1
- package/dist/topics/index.js +333 -7
- package/dist/topics/index.js.map +1 -1
- package/dist/topicsClient.js +4 -3
- package/dist/topicsClient.js.map +1 -1
- package/dist/workflowClient.d.ts +41 -7
- package/dist/workflowClient.js +4 -3
- package/dist/workflowClient.js.map +1 -1
- package/dist/worktrees/index.d.ts +29 -3
- package/dist/worktrees/index.js +333 -7
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +12 -3
- package/dist/client-EiG9nJOY.d.ts +0 -2911
package/dist/nodes/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlatformGatewaySuccess } from '../coreClient.js';
|
|
2
2
|
import { PlatformGraphNode, ListResult } from '../types.js';
|
|
3
3
|
import { CreateNodeInput, GetNodeInput, ListNodesInput, UpdateNodeInput, BatchCreateNodesInput, SupersedeNodeInput, VerifyNodeInput, HardDeleteNodeInput } from '../graphClient.js';
|
|
4
|
-
import {
|
|
4
|
+
import { LucernClientConfig } from '../client.js';
|
|
5
5
|
import * as v1 from '@lucern/contracts/graph/v1';
|
|
6
6
|
export { v1 as graphContracts };
|
|
7
7
|
import * as sdkMethods_contract from '@lucern/contracts/sdk-methods.contract';
|
|
@@ -36,11 +36,13 @@ import '../ontologyLinksClient.js';
|
|
|
36
36
|
import '../orgGraphSearchClient.js';
|
|
37
37
|
import '../graphRecommendationsClient.js';
|
|
38
38
|
import '../graphAnalysisClient.js';
|
|
39
|
+
import '@lucern/contracts';
|
|
39
40
|
import '../embeddingsClient.js';
|
|
40
41
|
import '../policyClient.js';
|
|
41
42
|
import '../ontologyClient.js';
|
|
42
43
|
import '../contextTypes.js';
|
|
43
44
|
import '../topicsClient.js';
|
|
45
|
+
import '../functionSurface.js';
|
|
44
46
|
import '../answersClient.js';
|
|
45
47
|
import '../auditClient.js';
|
|
46
48
|
import '../contextClient.js';
|
|
@@ -69,6 +71,24 @@ declare function createNodesClient(config?: NodesClientConfig): {
|
|
|
69
71
|
create(input: Parameters<(input: CreateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
|
|
70
72
|
update(input: Parameters<(input: UpdateNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<PlatformGraphNode>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<PlatformGraphNode>>;
|
|
71
73
|
batchCreate(input: Parameters<(input: BatchCreateNodesInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
74
|
+
listByTopicAndType(input: {
|
|
75
|
+
topicId?: string;
|
|
76
|
+
projectId?: string;
|
|
77
|
+
nodeType?: string;
|
|
78
|
+
nodeTypes?: string[];
|
|
79
|
+
query?: string;
|
|
80
|
+
sourceText?: string;
|
|
81
|
+
limit?: number;
|
|
82
|
+
cursor?: string;
|
|
83
|
+
}): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
84
|
+
countByTopicAndType(input: {
|
|
85
|
+
topicId?: string;
|
|
86
|
+
projectId?: string;
|
|
87
|
+
nodeType?: string;
|
|
88
|
+
nodeTypes?: string[];
|
|
89
|
+
query?: string;
|
|
90
|
+
limit?: number;
|
|
91
|
+
}): Promise<PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
72
92
|
supersede(input: Parameters<(input: SupersedeNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
73
93
|
verify(input: Parameters<(input: VerifyNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
|
|
74
94
|
hardDelete(input: Parameters<(input: HardDeleteNodeInput, idempotencyKey?: string) => Promise<PlatformGatewaySuccess<Record<string, unknown>>>>[0], idempotencyKey?: string): Promise<PlatformGatewaySuccess<Record<string, unknown>>>;
|
package/dist/nodes/index.js
CHANGED
|
@@ -89,14 +89,15 @@ function normalizeCanonicalLucernAuthContext(input) {
|
|
|
89
89
|
);
|
|
90
90
|
const roles = cleanStringList(input.roles);
|
|
91
91
|
const scopes = cleanStringList(input.scopes);
|
|
92
|
-
|
|
92
|
+
const principalType = requirePrincipalType(input.principalType);
|
|
93
|
+
const authMode = requireAuthMode(input.authMode);
|
|
94
|
+
const roleBasedInteractiveAuth = authMode === "interactive_user" && roles.length > 0;
|
|
95
|
+
if (roles.length === 0 || scopes.length === 0 && !roleBasedInteractiveAuth) {
|
|
93
96
|
throw new LucernSdkAuthContextError(
|
|
94
97
|
"membership_missing",
|
|
95
98
|
"Canonical Lucern SDK auth context requires non-empty roles and scopes."
|
|
96
99
|
);
|
|
97
100
|
}
|
|
98
|
-
const principalType = requirePrincipalType(input.principalType);
|
|
99
|
-
const authMode = requireAuthMode(input.authMode);
|
|
100
101
|
const subject = cleanString(input.permit?.subject) ?? principalId;
|
|
101
102
|
const tenant = cleanString(input.permit?.tenant) ?? tenantId;
|
|
102
103
|
const workspace = cleanString(input.permit?.workspace) ?? workspaceId;
|
|
@@ -4119,9 +4120,33 @@ function graphAnalysisQuery(input) {
|
|
|
4119
4120
|
cursor: input.cursor
|
|
4120
4121
|
};
|
|
4121
4122
|
}
|
|
4123
|
+
function normalizeRunQueryPayload(input) {
|
|
4124
|
+
return {
|
|
4125
|
+
...input,
|
|
4126
|
+
topicId: requireTopicId2(input),
|
|
4127
|
+
projectId: void 0
|
|
4128
|
+
};
|
|
4129
|
+
}
|
|
4122
4130
|
function createGraphAnalysisClient(config = {}) {
|
|
4123
4131
|
const gateway = createGatewayRequestClient(config);
|
|
4124
4132
|
return {
|
|
4133
|
+
listGraphIntelligenceQueries(input = {}) {
|
|
4134
|
+
return gateway.request({
|
|
4135
|
+
path: "/api/platform/v1/graph-intelligence/queries",
|
|
4136
|
+
method: "POST",
|
|
4137
|
+
body: {
|
|
4138
|
+
categoryId: input.categoryId,
|
|
4139
|
+
mode: input.mode
|
|
4140
|
+
}
|
|
4141
|
+
});
|
|
4142
|
+
},
|
|
4143
|
+
runGraphIntelligenceQuery(input) {
|
|
4144
|
+
return gateway.request({
|
|
4145
|
+
path: "/api/platform/v1/graph-intelligence/run",
|
|
4146
|
+
method: "POST",
|
|
4147
|
+
body: normalizeRunQueryPayload(input)
|
|
4148
|
+
});
|
|
4149
|
+
},
|
|
4125
4150
|
saveAnalysis(input, idempotencyKey) {
|
|
4126
4151
|
return gateway.request({
|
|
4127
4152
|
path: "/api/platform/v1/graph-analysis/analyses",
|
|
@@ -4203,7 +4228,9 @@ function createGraphAnalysisClient(config = {}) {
|
|
|
4203
4228
|
topicId: requireTopicId2(input),
|
|
4204
4229
|
workspaceId: input.workspaceId,
|
|
4205
4230
|
analysisId: input.analysisId,
|
|
4206
|
-
|
|
4231
|
+
minimumCreatedAt: input.minimumCreatedAt ?? input.since ?? input.createdAt ?? input.analysisCreatedAt,
|
|
4232
|
+
sourceNodeIds: input.sourceNodeIds?.join(",") ?? (input.nodeId ? input.nodeId : void 0),
|
|
4233
|
+
sourceEdgeIds: input.sourceEdgeIds?.join(",") ?? (input.edgeId ? input.edgeId : void 0),
|
|
4207
4234
|
limit: input.limit,
|
|
4208
4235
|
cursor: input.cursor
|
|
4209
4236
|
})}`
|
|
@@ -4959,6 +4986,7 @@ var CONTRACTS = {
|
|
|
4959
4986
|
"archive_belief": { method: "DELETE", path: "/beliefs", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
|
|
4960
4987
|
"archive_ontology": { method: "DELETE", path: "/ontologies", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
|
|
4961
4988
|
"archive_question": { method: "DELETE", path: "/questions", kind: "mutation", idempotent: true, surfaceIntent: "mcp_core" },
|
|
4989
|
+
"begin_build_session": { method: "POST", path: "/mcp/build-session/begin", kind: "mutation", idempotent: true, surfaceIntent: "system" },
|
|
4962
4990
|
"bisect_confidence": { method: "POST", path: "/beliefs/confidence/bisect", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
4963
4991
|
"broadcast_message": { method: "POST", path: "/coordination/messages/broadcast", kind: "mutation", idempotent: true, surfaceIntent: "system" },
|
|
4964
4992
|
"check_permission": { method: "POST", path: "/identity/check-permission", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
@@ -5021,6 +5049,7 @@ var CONTRACTS = {
|
|
|
5021
5049
|
"list_beliefs": { method: "GET", path: "/beliefs", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
5022
5050
|
"list_campaigns": { method: "GET", path: "/worktrees/campaigns", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
5023
5051
|
"list_evidence": { method: "GET", path: "/evidence", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
5052
|
+
"list_graph_intelligence_queries": { method: "POST", path: "/graph-intelligence/queries", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
5024
5053
|
"list_lenses": { method: "GET", path: "/lenses", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
5025
5054
|
"list_ontologies": { method: "GET", path: "/ontologies", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
5026
5055
|
"list_questions": { method: "GET", path: "/questions", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
@@ -5044,6 +5073,7 @@ var CONTRACTS = {
|
|
|
5044
5073
|
"register_session": { method: "POST", path: "/coordination/register-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
|
|
5045
5074
|
"remove_lens_from_topic": { method: "DELETE", path: "/lenses/apply", kind: "mutation", idempotent: true, surfaceIntent: "mcp_workflow" },
|
|
5046
5075
|
"resolve_effective_ontology": { method: "POST", path: "/ontologies/effective", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
5076
|
+
"run_graph_intelligence_query": { method: "POST", path: "/graph-intelligence/run", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
5047
5077
|
"search_beliefs": { method: "POST", path: "/beliefs/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
5048
5078
|
"search_evidence": { method: "POST", path: "/evidence/search", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
5049
5079
|
"seed_belief_lattice": { method: "POST", path: "/scope/belief-lattice/seed", kind: "mutation", idempotent: true, surfaceIntent: "system" },
|
|
@@ -5130,6 +5160,9 @@ function createFunctionSurfaceClient(config = {}) {
|
|
|
5130
5160
|
archiveQuestion(input = {}, idempotencyKey) {
|
|
5131
5161
|
return execute("archive_question", input, idempotencyKey);
|
|
5132
5162
|
},
|
|
5163
|
+
beginBuildSession(input = {}, idempotencyKey) {
|
|
5164
|
+
return execute("begin_build_session", input, idempotencyKey);
|
|
5165
|
+
},
|
|
5133
5166
|
bisectConfidence(input = {}, idempotencyKey) {
|
|
5134
5167
|
return execute("bisect_confidence", input, idempotencyKey);
|
|
5135
5168
|
},
|
|
@@ -5316,6 +5349,9 @@ function createFunctionSurfaceClient(config = {}) {
|
|
|
5316
5349
|
listEvidence(input = {}, idempotencyKey) {
|
|
5317
5350
|
return execute("list_evidence", input, idempotencyKey);
|
|
5318
5351
|
},
|
|
5352
|
+
listGraphIntelligenceQueries(input = {}, idempotencyKey) {
|
|
5353
|
+
return execute("list_graph_intelligence_queries", input, idempotencyKey);
|
|
5354
|
+
},
|
|
5319
5355
|
listLenses(input = {}, idempotencyKey) {
|
|
5320
5356
|
return execute("list_lenses", input, idempotencyKey);
|
|
5321
5357
|
},
|
|
@@ -5385,6 +5421,9 @@ function createFunctionSurfaceClient(config = {}) {
|
|
|
5385
5421
|
resolveEffectiveOntology(input = {}, idempotencyKey) {
|
|
5386
5422
|
return execute("resolve_effective_ontology", input, idempotencyKey);
|
|
5387
5423
|
},
|
|
5424
|
+
runGraphIntelligenceQuery(input = {}, idempotencyKey) {
|
|
5425
|
+
return execute("run_graph_intelligence_query", input, idempotencyKey);
|
|
5426
|
+
},
|
|
5388
5427
|
searchBeliefs(input = {}, idempotencyKey) {
|
|
5389
5428
|
return execute("search_beliefs", input, idempotencyKey);
|
|
5390
5429
|
},
|
|
@@ -7064,6 +7103,13 @@ function requireTopicId4(args) {
|
|
|
7064
7103
|
}
|
|
7065
7104
|
return topicId;
|
|
7066
7105
|
}
|
|
7106
|
+
function requireTopicOrProjectId(args) {
|
|
7107
|
+
const topicId = args.topicId?.trim() || args.projectId?.trim() || void 0;
|
|
7108
|
+
if (!topicId) {
|
|
7109
|
+
throw new Error("topicId is required");
|
|
7110
|
+
}
|
|
7111
|
+
return topicId;
|
|
7112
|
+
}
|
|
7067
7113
|
var AUDIT_NODE_REFERENCE_KEY_PATTERN = /(^|_)(id|nodeid|beliefid|resourceid|targetid|sourceid|subjectid|globalid|entityid|recordid|fromnodeid|tonodeid|linkednodeid|linkedbeliefid|nodeids|beliefids|resourceids)$/i;
|
|
7068
7114
|
function matchesAuditNodeReference(value, nodeId) {
|
|
7069
7115
|
if (Array.isArray(value)) {
|
|
@@ -7099,6 +7145,23 @@ function requireBaseRate(args) {
|
|
|
7099
7145
|
function exposeGatewayData(response) {
|
|
7100
7146
|
return Object.assign({}, response, response.data);
|
|
7101
7147
|
}
|
|
7148
|
+
function sdkQueryString(input) {
|
|
7149
|
+
const params = new URLSearchParams();
|
|
7150
|
+
for (const [key, value] of Object.entries(input)) {
|
|
7151
|
+
if (value === void 0 || value === null) {
|
|
7152
|
+
continue;
|
|
7153
|
+
}
|
|
7154
|
+
if (Array.isArray(value)) {
|
|
7155
|
+
if (value.length > 0) {
|
|
7156
|
+
params.set(key, value.join(","));
|
|
7157
|
+
}
|
|
7158
|
+
continue;
|
|
7159
|
+
}
|
|
7160
|
+
params.set(key, String(value));
|
|
7161
|
+
}
|
|
7162
|
+
const serialized = params.toString();
|
|
7163
|
+
return serialized ? `?${serialized}` : "";
|
|
7164
|
+
}
|
|
7102
7165
|
function createLucernClient(config = {}) {
|
|
7103
7166
|
const gatewayConfig = toGatewayConfig(config);
|
|
7104
7167
|
const beliefsClient = createBeliefsClient(gatewayConfig);
|
|
@@ -7519,6 +7582,30 @@ function createLucernClient(config = {}) {
|
|
|
7519
7582
|
batchCreate(input, idempotencyKey) {
|
|
7520
7583
|
return graphClient.batchCreateNodes(input, idempotencyKey);
|
|
7521
7584
|
},
|
|
7585
|
+
listByTopicAndType(input) {
|
|
7586
|
+
return gateway.request({
|
|
7587
|
+
path: `/api/platform/v1/nodes${sdkQueryString({
|
|
7588
|
+
topicId: requireTopicOrProjectId(input),
|
|
7589
|
+
nodeType: input.nodeType,
|
|
7590
|
+
nodeTypes: input.nodeTypes,
|
|
7591
|
+
query: input.query,
|
|
7592
|
+
sourceText: input.sourceText,
|
|
7593
|
+
limit: input.limit,
|
|
7594
|
+
cursor: input.cursor
|
|
7595
|
+
})}`
|
|
7596
|
+
}).then(exposeGatewayData);
|
|
7597
|
+
},
|
|
7598
|
+
countByTopicAndType(input) {
|
|
7599
|
+
return gateway.request({
|
|
7600
|
+
path: `/api/platform/v1/nodes/count${sdkQueryString({
|
|
7601
|
+
topicId: requireTopicOrProjectId(input),
|
|
7602
|
+
nodeType: input.nodeType,
|
|
7603
|
+
nodeTypes: input.nodeTypes,
|
|
7604
|
+
query: input.query,
|
|
7605
|
+
limit: input.limit
|
|
7606
|
+
})}`
|
|
7607
|
+
}).then(exposeGatewayData);
|
|
7608
|
+
},
|
|
7522
7609
|
supersede(input, idempotencyKey) {
|
|
7523
7610
|
return graphClient.supersedeNode(input, idempotencyKey);
|
|
7524
7611
|
},
|
|
@@ -7529,6 +7616,78 @@ function createLucernClient(config = {}) {
|
|
|
7529
7616
|
return graphClient.hardDeleteNode(input, idempotencyKey);
|
|
7530
7617
|
}
|
|
7531
7618
|
};
|
|
7619
|
+
const publicationNamespace = {
|
|
7620
|
+
create(input, idempotencyKey) {
|
|
7621
|
+
return gateway.request({
|
|
7622
|
+
path: "/api/platform/v1/publication",
|
|
7623
|
+
method: "POST",
|
|
7624
|
+
body: input,
|
|
7625
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
7626
|
+
}).then(exposeGatewayData);
|
|
7627
|
+
},
|
|
7628
|
+
update(publicationId, input, idempotencyKey) {
|
|
7629
|
+
return gateway.request({
|
|
7630
|
+
path: `/api/platform/v1/publication/${encodeURIComponent(
|
|
7631
|
+
publicationId
|
|
7632
|
+
)}`,
|
|
7633
|
+
method: "PATCH",
|
|
7634
|
+
body: input,
|
|
7635
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
7636
|
+
}).then(exposeGatewayData);
|
|
7637
|
+
},
|
|
7638
|
+
list(input = {}) {
|
|
7639
|
+
return gateway.request({
|
|
7640
|
+
path: `/api/platform/v1/publication${sdkQueryString(input)}`
|
|
7641
|
+
}).then(exposeGatewayData);
|
|
7642
|
+
},
|
|
7643
|
+
getByTopic(input) {
|
|
7644
|
+
const topicId = typeof input === "string" ? input : input.topicId;
|
|
7645
|
+
const workspaceId = typeof input === "string" ? void 0 : input.workspaceId;
|
|
7646
|
+
return gateway.request({
|
|
7647
|
+
path: `/api/platform/v1/publication/by-topic/${encodeURIComponent(
|
|
7648
|
+
topicId
|
|
7649
|
+
)}${sdkQueryString({ workspaceId })}`
|
|
7650
|
+
}).then(exposeGatewayData);
|
|
7651
|
+
},
|
|
7652
|
+
publish(publicationId, input = {}, idempotencyKey) {
|
|
7653
|
+
return gateway.request({
|
|
7654
|
+
path: `/api/platform/v1/publication/${encodeURIComponent(
|
|
7655
|
+
publicationId
|
|
7656
|
+
)}/publish`,
|
|
7657
|
+
method: "POST",
|
|
7658
|
+
body: input,
|
|
7659
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
7660
|
+
}).then(exposeGatewayData);
|
|
7661
|
+
},
|
|
7662
|
+
unpublish(publicationId, input = {}, idempotencyKey) {
|
|
7663
|
+
return gateway.request({
|
|
7664
|
+
path: `/api/platform/v1/publication/${encodeURIComponent(
|
|
7665
|
+
publicationId
|
|
7666
|
+
)}/unpublish`,
|
|
7667
|
+
method: "POST",
|
|
7668
|
+
body: input,
|
|
7669
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
7670
|
+
}).then(exposeGatewayData);
|
|
7671
|
+
},
|
|
7672
|
+
remove(publicationId, input = {}) {
|
|
7673
|
+
return gateway.request({
|
|
7674
|
+
path: `/api/platform/v1/publication/${encodeURIComponent(
|
|
7675
|
+
publicationId
|
|
7676
|
+
)}${sdkQueryString(input)}`,
|
|
7677
|
+
method: "DELETE"
|
|
7678
|
+
}).then(exposeGatewayData);
|
|
7679
|
+
}
|
|
7680
|
+
};
|
|
7681
|
+
const ontologyLinksNamespace = {
|
|
7682
|
+
...ontologyLinksClient,
|
|
7683
|
+
resolveThemeSource(input) {
|
|
7684
|
+
return gateway.request({
|
|
7685
|
+
path: "/api/platform/v1/ontology-links/theme-source",
|
|
7686
|
+
method: "POST",
|
|
7687
|
+
body: input
|
|
7688
|
+
}).then(exposeGatewayData);
|
|
7689
|
+
}
|
|
7690
|
+
};
|
|
7532
7691
|
return {
|
|
7533
7692
|
config,
|
|
7534
7693
|
version: LUCERN_SDK_VERSION,
|
|
@@ -8010,6 +8169,54 @@ function createLucernClient(config = {}) {
|
|
|
8010
8169
|
}));
|
|
8011
8170
|
}
|
|
8012
8171
|
},
|
|
8172
|
+
themes: {
|
|
8173
|
+
listByTopic(input) {
|
|
8174
|
+
return gateway.request({
|
|
8175
|
+
path: `/api/platform/v1/themes${sdkQueryString({
|
|
8176
|
+
topicId: requireTopicOrProjectId(input),
|
|
8177
|
+
query: input.query,
|
|
8178
|
+
limit: input.limit,
|
|
8179
|
+
cursor: input.cursor
|
|
8180
|
+
})}`
|
|
8181
|
+
}).then(exposeGatewayData);
|
|
8182
|
+
}
|
|
8183
|
+
},
|
|
8184
|
+
graphSearch: {
|
|
8185
|
+
keywordSearchNodes(input) {
|
|
8186
|
+
return gateway.request({
|
|
8187
|
+
path: "/api/platform/v1/graph-search/keyword-nodes",
|
|
8188
|
+
method: "POST",
|
|
8189
|
+
body: {
|
|
8190
|
+
...input,
|
|
8191
|
+
topicId: requireTopicOrProjectId(input),
|
|
8192
|
+
projectId: void 0
|
|
8193
|
+
}
|
|
8194
|
+
}).then(exposeGatewayData);
|
|
8195
|
+
}
|
|
8196
|
+
},
|
|
8197
|
+
classifiers: {
|
|
8198
|
+
listBeliefCandidates(input) {
|
|
8199
|
+
return gateway.request({
|
|
8200
|
+
path: `/api/platform/v1/classifiers/belief-candidates${sdkQueryString({
|
|
8201
|
+
topicId: requireTopicOrProjectId(input),
|
|
8202
|
+
classifierKey: input.classifierKey,
|
|
8203
|
+
query: input.query,
|
|
8204
|
+
limit: input.limit,
|
|
8205
|
+
cursor: input.cursor
|
|
8206
|
+
})}`
|
|
8207
|
+
}).then(exposeGatewayData);
|
|
8208
|
+
}
|
|
8209
|
+
},
|
|
8210
|
+
archetypes: {
|
|
8211
|
+
getJudgmentSignature(input) {
|
|
8212
|
+
return gateway.request({
|
|
8213
|
+
path: `/api/platform/v1/archetypes/judgment-signature${sdkQueryString({
|
|
8214
|
+
topicId: requireTopicOrProjectId(input),
|
|
8215
|
+
principalId: input.principalId
|
|
8216
|
+
})}`
|
|
8217
|
+
}).then(exposeGatewayData);
|
|
8218
|
+
}
|
|
8219
|
+
},
|
|
8013
8220
|
judgments: {
|
|
8014
8221
|
create(input) {
|
|
8015
8222
|
return decisionsClient.createJudgment(input);
|
|
@@ -8051,6 +8258,52 @@ function createLucernClient(config = {}) {
|
|
|
8051
8258
|
});
|
|
8052
8259
|
}
|
|
8053
8260
|
},
|
|
8261
|
+
decisions: {
|
|
8262
|
+
create(input) {
|
|
8263
|
+
return decisionsClient.createJudgment(input);
|
|
8264
|
+
},
|
|
8265
|
+
record(input) {
|
|
8266
|
+
return decisionsClient.recordJudgment(input);
|
|
8267
|
+
},
|
|
8268
|
+
list(query5) {
|
|
8269
|
+
return decisionsClient.listJudgments(query5);
|
|
8270
|
+
},
|
|
8271
|
+
get(decisionId) {
|
|
8272
|
+
return decisionsClient.getJudgment(decisionId);
|
|
8273
|
+
},
|
|
8274
|
+
recordOutcome(decisionId, input) {
|
|
8275
|
+
return decisionsClient.recordJudgmentOutcome(decisionId, input);
|
|
8276
|
+
},
|
|
8277
|
+
lessons(decisionId, input, idempotencyKey) {
|
|
8278
|
+
return gateway.request({
|
|
8279
|
+
path: `/api/platform/v1/decisions/${encodeURIComponent(
|
|
8280
|
+
decisionId
|
|
8281
|
+
)}/lessons`,
|
|
8282
|
+
method: "POST",
|
|
8283
|
+
body: input,
|
|
8284
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
8285
|
+
}).then(exposeGatewayData);
|
|
8286
|
+
},
|
|
8287
|
+
archive(decisionId, input = {}, idempotencyKey) {
|
|
8288
|
+
return gateway.request({
|
|
8289
|
+
path: `/api/platform/v1/decisions/${encodeURIComponent(
|
|
8290
|
+
decisionId
|
|
8291
|
+
)}/archive`,
|
|
8292
|
+
method: "POST",
|
|
8293
|
+
body: input,
|
|
8294
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
8295
|
+
}).then(exposeGatewayData);
|
|
8296
|
+
},
|
|
8297
|
+
readiness(topicId) {
|
|
8298
|
+
return decisionsClient.getJudgmentReadiness({ topicId });
|
|
8299
|
+
},
|
|
8300
|
+
calibration(topicId) {
|
|
8301
|
+
return decisionsClient.getJudgmentCalibration({ topicId });
|
|
8302
|
+
},
|
|
8303
|
+
pendingOutcomeReview(topicId) {
|
|
8304
|
+
return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
|
|
8305
|
+
}
|
|
8306
|
+
},
|
|
8054
8307
|
worktrees: {
|
|
8055
8308
|
createBranch(input) {
|
|
8056
8309
|
return workflowClient.createBranch(input);
|
|
@@ -8073,7 +8326,21 @@ function createLucernClient(config = {}) {
|
|
|
8073
8326
|
topicId: requireTopicId4(input),
|
|
8074
8327
|
objective: input.objective,
|
|
8075
8328
|
hypothesis: input.hypothesis,
|
|
8329
|
+
rationale: input.rationale,
|
|
8330
|
+
worktreeType: input.worktreeType,
|
|
8331
|
+
startDate: input.startDate,
|
|
8332
|
+
endDate: input.endDate,
|
|
8333
|
+
durationWeeks: input.durationWeeks,
|
|
8334
|
+
confidenceImpact: input.confidenceImpact,
|
|
8335
|
+
beliefFocus: input.beliefFocus,
|
|
8076
8336
|
beliefIds: input.beliefIds,
|
|
8337
|
+
targetBeliefIds: input.targetBeliefIds,
|
|
8338
|
+
targetQuestionIds: input.targetQuestionIds,
|
|
8339
|
+
keyQuestions: input.keyQuestions,
|
|
8340
|
+
evidenceSignals: input.evidenceSignals,
|
|
8341
|
+
decisionGate: input.decisionGate,
|
|
8342
|
+
goCriteria: input.goCriteria,
|
|
8343
|
+
noGoSignals: input.noGoSignals,
|
|
8077
8344
|
autoShape: input.autoShape,
|
|
8078
8345
|
domainPackId: input.domainPackId,
|
|
8079
8346
|
campaign: input.campaign,
|
|
@@ -8086,7 +8353,8 @@ function createLucernClient(config = {}) {
|
|
|
8086
8353
|
proofArtifacts: input.proofArtifacts,
|
|
8087
8354
|
staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
|
|
8088
8355
|
lastReconciledAt: input.lastReconciledAt,
|
|
8089
|
-
autoFixPolicy: input.autoFixPolicy
|
|
8356
|
+
autoFixPolicy: input.autoFixPolicy,
|
|
8357
|
+
lensId: input.lensId
|
|
8090
8358
|
});
|
|
8091
8359
|
},
|
|
8092
8360
|
add(input) {
|
|
@@ -8095,7 +8363,21 @@ function createLucernClient(config = {}) {
|
|
|
8095
8363
|
topicId: requireTopicId4(input),
|
|
8096
8364
|
objective: input.objective,
|
|
8097
8365
|
hypothesis: input.hypothesis,
|
|
8366
|
+
rationale: input.rationale,
|
|
8367
|
+
worktreeType: input.worktreeType,
|
|
8368
|
+
startDate: input.startDate,
|
|
8369
|
+
endDate: input.endDate,
|
|
8370
|
+
durationWeeks: input.durationWeeks,
|
|
8371
|
+
confidenceImpact: input.confidenceImpact,
|
|
8372
|
+
beliefFocus: input.beliefFocus,
|
|
8098
8373
|
beliefIds: input.beliefIds,
|
|
8374
|
+
targetBeliefIds: input.targetBeliefIds,
|
|
8375
|
+
targetQuestionIds: input.targetQuestionIds,
|
|
8376
|
+
keyQuestions: input.keyQuestions,
|
|
8377
|
+
evidenceSignals: input.evidenceSignals,
|
|
8378
|
+
decisionGate: input.decisionGate,
|
|
8379
|
+
goCriteria: input.goCriteria,
|
|
8380
|
+
noGoSignals: input.noGoSignals,
|
|
8099
8381
|
autoShape: input.autoShape,
|
|
8100
8382
|
domainPackId: input.domainPackId,
|
|
8101
8383
|
campaign: input.campaign,
|
|
@@ -8108,7 +8390,8 @@ function createLucernClient(config = {}) {
|
|
|
8108
8390
|
proofArtifacts: input.proofArtifacts,
|
|
8109
8391
|
staffingHint: typeof input.staffingHint === "string" ? input.staffingHint : void 0,
|
|
8110
8392
|
lastReconciledAt: input.lastReconciledAt,
|
|
8111
|
-
autoFixPolicy: input.autoFixPolicy
|
|
8393
|
+
autoFixPolicy: input.autoFixPolicy,
|
|
8394
|
+
lensId: input.lensId
|
|
8112
8395
|
});
|
|
8113
8396
|
},
|
|
8114
8397
|
list(query5) {
|
|
@@ -8118,6 +8401,22 @@ function createLucernClient(config = {}) {
|
|
|
8118
8401
|
limit: query5.limit
|
|
8119
8402
|
});
|
|
8120
8403
|
},
|
|
8404
|
+
listByTopic(query5) {
|
|
8405
|
+
return worktreesFacade.list({
|
|
8406
|
+
topicId: requireTopicId4(query5),
|
|
8407
|
+
status: query5.status,
|
|
8408
|
+
limit: query5.limit
|
|
8409
|
+
});
|
|
8410
|
+
},
|
|
8411
|
+
findByPairedSprint(input) {
|
|
8412
|
+
return gateway.request({
|
|
8413
|
+
path: `/api/platform/v1/worktrees/paired-sprint${sdkQueryString({
|
|
8414
|
+
sprintId: input.sprintId,
|
|
8415
|
+
topicId: input.topicId ?? input.projectId,
|
|
8416
|
+
limit: input.limit
|
|
8417
|
+
})}`
|
|
8418
|
+
}).then(exposeGatewayData);
|
|
8419
|
+
},
|
|
8121
8420
|
activate(worktreeId) {
|
|
8122
8421
|
return worktreesFacade.activate({ id: worktreeId });
|
|
8123
8422
|
},
|
|
@@ -8269,6 +8568,31 @@ function createLucernClient(config = {}) {
|
|
|
8269
8568
|
status: typeof input.status === "string" ? input.status : void 0,
|
|
8270
8569
|
limit: typeof input.limit === "number" ? input.limit : void 0
|
|
8271
8570
|
});
|
|
8571
|
+
},
|
|
8572
|
+
listByTopic(input) {
|
|
8573
|
+
return tasksFacade.list({
|
|
8574
|
+
topicId: requireTopicId4(input),
|
|
8575
|
+
status: typeof input.status === "string" ? input.status : void 0,
|
|
8576
|
+
limit: typeof input.limit === "number" ? input.limit : void 0
|
|
8577
|
+
});
|
|
8578
|
+
},
|
|
8579
|
+
listByWorktree(input) {
|
|
8580
|
+
return tasksFacade.list({
|
|
8581
|
+
topicId: typeof input.topicId === "string" ? input.topicId : void 0,
|
|
8582
|
+
worktreeId: input.worktreeId,
|
|
8583
|
+
status: typeof input.status === "string" ? input.status : void 0,
|
|
8584
|
+
limit: typeof input.limit === "number" ? input.limit : void 0
|
|
8585
|
+
});
|
|
8586
|
+
},
|
|
8587
|
+
linkChat(taskId, input, idempotencyKey) {
|
|
8588
|
+
return gateway.request({
|
|
8589
|
+
path: `/api/platform/v1/tasks/${encodeURIComponent(
|
|
8590
|
+
taskId
|
|
8591
|
+
)}/link-chat`,
|
|
8592
|
+
method: "POST",
|
|
8593
|
+
body: input,
|
|
8594
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
8595
|
+
}).then(exposeGatewayData);
|
|
8272
8596
|
}
|
|
8273
8597
|
},
|
|
8274
8598
|
topics: {
|
|
@@ -8553,11 +8877,13 @@ function createLucernClient(config = {}) {
|
|
|
8553
8877
|
graphAnalysis: graphAnalysisClient,
|
|
8554
8878
|
graphRecommendations: graphRecommendationsClient,
|
|
8555
8879
|
orgGraphSearch: orgGraphSearchClient,
|
|
8556
|
-
ontologyLinks:
|
|
8880
|
+
ontologyLinks: ontologyLinksNamespace,
|
|
8557
8881
|
graphStateClassifier: graphStateClassifierClient,
|
|
8558
8882
|
modelRuntime: modelRuntimeClient,
|
|
8559
8883
|
jobs: jobsClient,
|
|
8560
8884
|
telemetry: telemetryClient,
|
|
8885
|
+
publication: publicationNamespace,
|
|
8886
|
+
contentPublication: publicationNamespace,
|
|
8561
8887
|
tools: {
|
|
8562
8888
|
listCatalog: toolRegistryClient.listCatalog,
|
|
8563
8889
|
listExecutable: toolRegistryClient.listExecutable,
|