@lucern/sdk 0.2.0-alpha.6 → 0.2.0-alpha.8
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 +13 -0
- package/dist/{lib/platform/sdk/adminClient.d.ts → adminClient.d.ts} +56 -51
- package/dist/adminClient.js +755 -0
- package/dist/adminClient.js.map +1 -0
- package/dist/answersClient.d.ts +23 -0
- package/dist/answersClient.js +333 -0
- package/dist/answersClient.js.map +1 -0
- package/dist/{lib/platform/sdk/audiencesClient.d.ts → audiencesClient.d.ts} +24 -18
- package/dist/audiencesClient.js +472 -0
- package/dist/audiencesClient.js.map +1 -0
- package/dist/auditClient.d.ts +29 -0
- package/dist/auditClient.js +386 -0
- package/dist/auditClient.js.map +1 -0
- package/dist/{lib/platform/sdk/beliefsClient.d.ts → beliefsClient.d.ts} +32 -27
- package/dist/beliefsClient.js +477 -0
- package/dist/beliefsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/client.d.ts → client.d.ts} +404 -395
- package/dist/client.js +6134 -0
- package/dist/client.js.map +1 -0
- package/dist/{lib/platform/sdk/contextClient.d.ts → contextClient.d.ts} +13 -7
- package/dist/contextClient.js +396 -0
- package/dist/contextClient.js.map +1 -0
- package/dist/contextFacade.d.ts +2 -0
- package/dist/contextFacade.js +73 -0
- package/dist/contextFacade.js.map +1 -0
- package/dist/{lib/platform/sdk/contextPackCompiler.d.ts → contextPackCompiler.d.ts} +11 -9
- package/dist/contextPackCompiler.js +1091 -0
- package/dist/contextPackCompiler.js.map +1 -0
- package/dist/contextPackPolicy.d.ts +84 -0
- package/dist/contextPackPolicy.js +347 -0
- package/dist/contextPackPolicy.js.map +1 -0
- package/dist/contextPackSchema.d.ts +7 -0
- package/dist/contextPackSchema.js +203 -0
- package/dist/contextPackSchema.js.map +1 -0
- package/dist/{lib/platform/sdk/contextTypes.d.ts → contextTypes.d.ts} +15 -13
- package/dist/contextTypes.js +3 -0
- package/dist/contextTypes.js.map +1 -0
- package/dist/contracts/api-enums.contract.d.ts +81 -0
- package/dist/contracts/api-enums.contract.js +92 -0
- package/dist/contracts/api-enums.contract.js.map +1 -0
- package/dist/contracts/auth-session.contract.d.ts +55 -0
- package/dist/contracts/auth-session.contract.js +48 -0
- package/dist/contracts/auth-session.contract.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/context-pack.contract.d.ts +56 -58
- package/dist/contracts/context-pack.contract.js +98 -0
- package/dist/contracts/context-pack.contract.js.map +1 -0
- package/dist/contracts/contextPack.d.ts +1 -0
- package/dist/contracts/contextPack.js +98 -0
- package/dist/contracts/contextPack.js.map +1 -0
- package/dist/contracts/index.d.ts +9 -0
- package/dist/contracts/index.js +4892 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/lens-filter.contract.d.ts +10 -8
- package/dist/contracts/lens-filter.contract.js +71 -0
- package/dist/contracts/lens-filter.contract.js.map +1 -0
- package/dist/contracts/lens-workflow.contract.d.ts +87 -0
- package/dist/contracts/lens-workflow.contract.js +123 -0
- package/dist/contracts/lens-workflow.contract.js.map +1 -0
- package/dist/contracts/lensFilter.d.ts +1 -0
- package/dist/contracts/lensFilter.js +71 -0
- package/dist/contracts/lensFilter.js.map +1 -0
- package/dist/contracts/lensWorkflow.d.ts +2 -0
- package/dist/contracts/lensWorkflow.js +123 -0
- package/dist/contracts/lensWorkflow.js.map +1 -0
- package/dist/contracts/mcp-tools.contract.d.ts +1 -0
- package/dist/contracts/mcp-tools.contract.js +2986 -0
- package/dist/contracts/mcp-tools.contract.js.map +1 -0
- package/dist/contracts/mcpTools.d.ts +1 -0
- package/dist/contracts/mcpTools.js +2986 -0
- package/dist/contracts/mcpTools.js.map +1 -0
- package/dist/{lucern/contracts/src → contracts}/prompt.contract.d.ts +5 -3
- package/dist/contracts/prompt.contract.js +12 -0
- package/dist/contracts/prompt.contract.js.map +1 -0
- package/dist/contracts/prompt.d.ts +1 -0
- package/dist/contracts/prompt.js +12 -0
- package/dist/contracts/prompt.js.map +1 -0
- package/dist/contracts/sdk-tools.contract.d.ts +2 -0
- package/dist/contracts/sdk-tools.contract.js +4134 -0
- package/dist/contracts/sdk-tools.contract.js.map +1 -0
- package/dist/contracts/sdkTools.d.ts +2 -0
- package/dist/contracts/sdkTools.js +4134 -0
- package/dist/contracts/sdkTools.js.map +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +163 -0
- package/dist/contracts/workflow-runtime.contract.js +245 -0
- package/dist/contracts/workflow-runtime.contract.js.map +1 -0
- package/dist/contracts/workflowRuntime.d.ts +1 -0
- package/dist/contracts/workflowRuntime.js +245 -0
- package/dist/contracts/workflowRuntime.js.map +1 -0
- package/dist/{lib/platform/sdk/controlObjectOwnership.d.ts → controlObjectOwnership.d.ts} +20 -18
- package/dist/controlObjectOwnership.js +215 -0
- package/dist/controlObjectOwnership.js.map +1 -0
- package/dist/{lib/platform/sdk/coreClient.d.ts → coreClient.d.ts} +19 -14
- package/dist/coreClient.js +339 -0
- package/dist/coreClient.js.map +1 -0
- package/dist/{lib/platform/sdk/customTools.d.ts → customTools.d.ts} +21 -16
- package/dist/customTools.js +248 -0
- package/dist/customTools.js.map +1 -0
- package/dist/{lib/platform/sdk/decisionsClient.d.ts → decisionsClient.d.ts} +29 -24
- package/dist/decisionsClient.js +522 -0
- package/dist/decisionsClient.js.map +1 -0
- package/dist/domainContext.d.ts +1 -0
- package/dist/domainContext.js +3 -0
- package/dist/domainContext.js.map +1 -0
- package/dist/events.d.ts +178 -0
- package/dist/events.js +249 -0
- package/dist/events.js.map +1 -0
- package/dist/eventsCore.d.ts +49 -0
- package/dist/eventsCore.js +429 -0
- package/dist/eventsCore.js.map +1 -0
- package/dist/facade/context.d.ts +18 -0
- package/dist/facade/context.js +73 -0
- package/dist/facade/context.js.map +1 -0
- package/dist/{lib/platform/sdk/gatewayFacades.d.ts → gatewayFacades.d.ts} +31 -26
- package/dist/gatewayFacades.js +1953 -0
- package/dist/gatewayFacades.js.map +1 -0
- package/dist/{lib/platform/sdk/graphClient.d.ts → graphClient.d.ts} +57 -52
- package/dist/graphClient.js +698 -0
- package/dist/graphClient.js.map +1 -0
- package/dist/{lib/platform/sdk/harnessClient.d.ts → harnessClient.d.ts} +44 -39
- package/dist/harnessClient.js +607 -0
- package/dist/harnessClient.js.map +1 -0
- package/dist/{lib/platform/sdk/identityClient.d.ts → identityClient.d.ts} +17 -11
- package/dist/identityClient.js +497 -0
- package/dist/identityClient.js.map +1 -0
- package/dist/index.d.ts +42 -3
- package/dist/index.js +11381 -3
- package/dist/index.js.map +1 -0
- package/dist/{lib/platform/sdk/learningClient.d.ts → learningClient.d.ts} +13 -7
- package/dist/learningClient.js +409 -0
- package/dist/learningClient.js.map +1 -0
- package/dist/{lib/platform/sdk/mcpParityClient.d.ts → mcpParityClient.d.ts} +10 -5
- package/dist/mcpParityClient.js +516 -0
- package/dist/mcpParityClient.js.map +1 -0
- package/dist/mcpParitySurface.d.ts +12 -0
- package/dist/mcpParitySurface.js +65 -0
- package/dist/mcpParitySurface.js.map +1 -0
- package/dist/mcpTools-DPZxowDX.d.ts +254 -0
- package/dist/{lib/platform/sdk/ontologyClient.d.ts → ontologyClient.d.ts} +28 -22
- package/dist/ontologyClient.js +513 -0
- package/dist/ontologyClient.js.map +1 -0
- package/dist/packRuntime.d.ts +2 -0
- package/dist/packRuntime.js +3 -0
- package/dist/packRuntime.js.map +1 -0
- package/dist/{lib/platform/sdk/packsClient.d.ts → packsClient.d.ts} +34 -29
- package/dist/packsClient.js +525 -0
- package/dist/packsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/policyClient.d.ts → policyClient.d.ts} +26 -20
- package/dist/policyClient.js +625 -0
- package/dist/policyClient.js.map +1 -0
- package/dist/realtime/index.d.ts +29 -0
- package/dist/realtime/index.js +23 -0
- package/dist/realtime/index.js.map +1 -0
- package/dist/realtime/refs.d.ts +17 -0
- package/dist/realtime/refs.js +9 -0
- package/dist/realtime/refs.js.map +1 -0
- package/dist/reportsClient.d.ts +41 -0
- package/dist/reportsClient.js +418 -0
- package/dist/reportsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/schemaClient.d.ts → schemaClient.d.ts} +20 -15
- package/dist/schemaClient.js +434 -0
- package/dist/schemaClient.js.map +1 -0
- package/dist/sdkSurface.d.ts +61 -0
- package/dist/sdkSurface.js +112 -0
- package/dist/sdkSurface.js.map +1 -0
- package/dist/sdkTools-CwXJDACb.d.ts +150 -0
- package/dist/{lib/platform/sdk/topicsClient.d.ts → topicsClient.d.ts} +24 -18
- package/dist/topicsClient.js +492 -0
- package/dist/topicsClient.js.map +1 -0
- package/dist/{lib/platform/sdk/types.d.ts → types.d.ts} +84 -80
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +4 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/dist/{lib/platform/sdk/workflowClient.d.ts → workflowClient.d.ts} +60 -57
- package/dist/workflowClient.js +830 -0
- package/dist/workflowClient.js.map +1 -0
- package/package.json +25 -43
- package/dist/.generated +0 -2
- package/dist/lib/platform/auth/credentials.d.ts +0 -5
- package/dist/lib/platform/auth/credentials.js +0 -40
- package/dist/lib/platform/sdk/adminClient.js +0 -384
- package/dist/lib/platform/sdk/answersClient.d.ts +0 -16
- package/dist/lib/platform/sdk/answersClient.js +0 -21
- package/dist/lib/platform/sdk/audiencesClient.js +0 -111
- package/dist/lib/platform/sdk/auditClient.d.ts +0 -24
- package/dist/lib/platform/sdk/auditClient.js +0 -21
- package/dist/lib/platform/sdk/beliefsClient.js +0 -124
- package/dist/lib/platform/sdk/client.js +0 -1831
- package/dist/lib/platform/sdk/contextClient.js +0 -86
- package/dist/lib/platform/sdk/contextFacade.d.ts +0 -10
- package/dist/lib/platform/sdk/contextFacade.js +0 -10
- package/dist/lib/platform/sdk/contextPackCompiler.js +0 -534
- package/dist/lib/platform/sdk/contextTypes.js +0 -1
- package/dist/lib/platform/sdk/controlObjectOwnership.js +0 -220
- package/dist/lib/platform/sdk/coreClient.js +0 -366
- package/dist/lib/platform/sdk/customTools.js +0 -247
- package/dist/lib/platform/sdk/decisionsClient.js +0 -129
- package/dist/lib/platform/sdk/domainContext.d.ts +0 -1
- package/dist/lib/platform/sdk/domainContext.js +0 -1
- package/dist/lib/platform/sdk/events.d.ts +0 -176
- package/dist/lib/platform/sdk/events.js +0 -261
- package/dist/lib/platform/sdk/eventsCore.d.ts +0 -13
- package/dist/lib/platform/sdk/eventsCore.js +0 -13
- package/dist/lib/platform/sdk/gatewayFacades.js +0 -845
- package/dist/lib/platform/sdk/graphClient.js +0 -235
- package/dist/lib/platform/sdk/harnessClient.js +0 -219
- package/dist/lib/platform/sdk/identityClient.js +0 -131
- package/dist/lib/platform/sdk/index.d.ts +0 -49
- package/dist/lib/platform/sdk/index.js +0 -49
- package/dist/lib/platform/sdk/learningClient.js +0 -53
- package/dist/lib/platform/sdk/mcpParityClient.js +0 -196
- package/dist/lib/platform/sdk/mcpParitySurface.d.ts +0 -10
- package/dist/lib/platform/sdk/mcpParitySurface.js +0 -57
- package/dist/lib/platform/sdk/ontologyClient.js +0 -161
- package/dist/lib/platform/sdk/packRuntime.d.ts +0 -1
- package/dist/lib/platform/sdk/packRuntime.js +0 -1
- package/dist/lib/platform/sdk/packsClient.js +0 -157
- package/dist/lib/platform/sdk/policyClient.js +0 -277
- package/dist/lib/platform/sdk/promptCatalog.d.ts +0 -1
- package/dist/lib/platform/sdk/promptCatalog.js +0 -1
- package/dist/lib/platform/sdk/reportsClient.d.ts +0 -34
- package/dist/lib/platform/sdk/reportsClient.js +0 -64
- package/dist/lib/platform/sdk/schemaClient.js +0 -71
- package/dist/lib/platform/sdk/sdkSurface.d.ts +0 -56
- package/dist/lib/platform/sdk/sdkSurface.js +0 -140
- package/dist/lib/platform/sdk/topicsClient.js +0 -118
- package/dist/lib/platform/sdk/types.js +0 -1
- package/dist/lib/platform/sdk/version.d.ts +0 -2
- package/dist/lib/platform/sdk/version.js +0 -2
- package/dist/lib/platform/sdk/workflowClient.js +0 -366
- package/dist/lucern/contracts/src/api-enums.contract.d.ts +0 -58
- package/dist/lucern/contracts/src/api-enums.contract.js +0 -147
- package/dist/lucern/contracts/src/auth-context.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/auth-context.contract.js +0 -8
- package/dist/lucern/contracts/src/auth-session.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/auth-session.contract.js +0 -8
- package/dist/lucern/contracts/src/auth.contract.d.ts +0 -88
- package/dist/lucern/contracts/src/auth.contract.js +0 -57
- package/dist/lucern/contracts/src/context-pack.contract.js +0 -169
- package/dist/lucern/contracts/src/convex-admin.contract.d.ts +0 -5
- package/dist/lucern/contracts/src/convex-admin.contract.js +0 -1
- package/dist/lucern/contracts/src/events-types.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/events-types.contract.js +0 -8
- package/dist/lucern/contracts/src/events.contract.d.ts +0 -176
- package/dist/lucern/contracts/src/events.contract.js +0 -159
- package/dist/lucern/contracts/src/gateway.contract.d.ts +0 -74
- package/dist/lucern/contracts/src/gateway.contract.js +0 -19
- package/dist/lucern/contracts/src/ids.contract.d.ts +0 -7
- package/dist/lucern/contracts/src/ids.contract.js +0 -24
- package/dist/lucern/contracts/src/index.d.ts +0 -29
- package/dist/lucern/contracts/src/index.js +0 -29
- package/dist/lucern/contracts/src/lens-filter.contract.js +0 -95
- package/dist/lucern/contracts/src/lens-workflow.contract.d.ts +0 -84
- package/dist/lucern/contracts/src/lens-workflow.contract.js +0 -54
- package/dist/lucern/contracts/src/mcp-tools.contract.d.ts +0 -151
- package/dist/lucern/contracts/src/mcp-tools.contract.js +0 -3281
- package/dist/lucern/contracts/src/ontology-matching.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/ontology-matching.contract.js +0 -8
- package/dist/lucern/contracts/src/prompt.contract.js +0 -24
- package/dist/lucern/contracts/src/sdk-methods.contract.d.ts +0 -358
- package/dist/lucern/contracts/src/sdk-methods.contract.js +0 -19
- package/dist/lucern/contracts/src/sdk-tools.contract.d.ts +0 -92
- package/dist/lucern/contracts/src/sdk-tools.contract.js +0 -1398
- package/dist/lucern/contracts/src/text-matching.contract.d.ts +0 -53
- package/dist/lucern/contracts/src/text-matching.contract.js +0 -277
- package/dist/lucern/contracts/src/topic-scope.contract.d.ts +0 -8
- package/dist/lucern/contracts/src/topic-scope.contract.js +0 -8
- package/dist/lucern/contracts/src/workflow-runtime.contract.d.ts +0 -161
- package/dist/lucern/contracts/src/workflow-runtime.contract.js +0 -257
- package/dist/realtime-refs.d.ts +0 -1
- package/dist/realtime-refs.js +0 -1
- package/dist/realtime.d.ts +0 -1
- package/dist/realtime.js +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { createGatewayRequestClient, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { createListResult, mapGatewayData, normalizeTopicQuery } from "./sdkSurface.js";
|
|
3
|
-
/**
|
|
4
|
-
* Create the learning client for execution telemetry reads.
|
|
5
|
-
* @param config - Gateway transport configuration.
|
|
6
|
-
* @returns An object with methods to list executions and retrieve stats.
|
|
7
|
-
*/
|
|
8
|
-
export function createLearningClient(config = {}) {
|
|
9
|
-
const gateway = createGatewayRequestClient(config);
|
|
10
|
-
return {
|
|
11
|
-
/**
|
|
12
|
-
* List recent execution records.
|
|
13
|
-
*/
|
|
14
|
-
async listRecentExecutions(args = {}) {
|
|
15
|
-
return gateway.request({
|
|
16
|
-
path: `/api/platform/v1/learning/executions/recent${toQueryString({
|
|
17
|
-
...normalizeTopicQuery(args),
|
|
18
|
-
namespace: args.namespace,
|
|
19
|
-
audienceMode: args.audienceMode,
|
|
20
|
-
success: typeof args.success === "boolean"
|
|
21
|
-
? args.success
|
|
22
|
-
? "true"
|
|
23
|
-
: "false"
|
|
24
|
-
: undefined,
|
|
25
|
-
limit: typeof args.limit === "number" && Number.isFinite(args.limit)
|
|
26
|
-
? String(args.limit)
|
|
27
|
-
: undefined,
|
|
28
|
-
})}`,
|
|
29
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "executions")));
|
|
30
|
-
},
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Use listRecentExecutions.
|
|
33
|
-
*/
|
|
34
|
-
async getRecentExecutions(args = {}) {
|
|
35
|
-
return this.listRecentExecutions(args);
|
|
36
|
-
},
|
|
37
|
-
/**
|
|
38
|
-
* Get aggregate execution statistics.
|
|
39
|
-
*/
|
|
40
|
-
async getExecutionStats(args = {}) {
|
|
41
|
-
return gateway.request({
|
|
42
|
-
path: `/api/platform/v1/learning/executions/stats${toQueryString({
|
|
43
|
-
...normalizeTopicQuery(args),
|
|
44
|
-
namespace: args.namespace,
|
|
45
|
-
audienceMode: args.audienceMode,
|
|
46
|
-
hours: typeof args.hours === "number" && Number.isFinite(args.hours)
|
|
47
|
-
? String(args.hours)
|
|
48
|
-
: undefined,
|
|
49
|
-
})}`,
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
}
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import { createGatewayRequestClient, randomIdempotencyKey, } from "./coreClient.js";
|
|
2
|
-
function withSdkSessionId(args, sessionId) {
|
|
3
|
-
return {
|
|
4
|
-
...(args ?? {}),
|
|
5
|
-
__sdkSessionId: sessionId,
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Thin typed bridge for MCP-only SDK parity methods.
|
|
10
|
-
*
|
|
11
|
-
* These methods map 1:1 to the Lucern MCP handlers and execute through the
|
|
12
|
-
* platform gateway so the SDK can cover the full control-plane surface.
|
|
13
|
-
*/
|
|
14
|
-
export function createMcpParityClient(config = {}) {
|
|
15
|
-
const gateway = createGatewayRequestClient(config);
|
|
16
|
-
const sessionId = crypto.randomUUID();
|
|
17
|
-
function executeRead(toolName, args) {
|
|
18
|
-
return gateway.request({
|
|
19
|
-
path: `/api/platform/v1/mcp-tools/${encodeURIComponent(toolName)}`,
|
|
20
|
-
method: "POST",
|
|
21
|
-
body: withSdkSessionId(args, sessionId),
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function executeMutation(toolName, args, idempotencyKey) {
|
|
25
|
-
return gateway.request({
|
|
26
|
-
path: `/api/platform/v1/mcp-tools/${encodeURIComponent(toolName)}`,
|
|
27
|
-
method: "POST",
|
|
28
|
-
body: withSdkSessionId(args, sessionId),
|
|
29
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
sessionId,
|
|
34
|
-
listTopics(args = {}) {
|
|
35
|
-
return executeRead("list_topics", args);
|
|
36
|
-
},
|
|
37
|
-
createTopic(args, idempotencyKey) {
|
|
38
|
-
return executeMutation("create_topic", args, idempotencyKey);
|
|
39
|
-
},
|
|
40
|
-
getTopic(args) {
|
|
41
|
-
return executeRead("get_topic", args);
|
|
42
|
-
},
|
|
43
|
-
getTopicTree(args) {
|
|
44
|
-
return executeRead("get_topic_tree", args);
|
|
45
|
-
},
|
|
46
|
-
activateWorktree(args, idempotencyKey) {
|
|
47
|
-
return executeMutation("activate_worktree", args, idempotencyKey);
|
|
48
|
-
},
|
|
49
|
-
updateWorktreeMetadata(args, idempotencyKey) {
|
|
50
|
-
return executeMutation("update_worktree_metadata", args, idempotencyKey);
|
|
51
|
-
},
|
|
52
|
-
updateWorktreeTargets(args, idempotencyKey) {
|
|
53
|
-
return executeMutation("update_worktree_targets", args, idempotencyKey);
|
|
54
|
-
},
|
|
55
|
-
listAllWorktrees(args = {}) {
|
|
56
|
-
return executeRead("list_all_worktrees", args);
|
|
57
|
-
},
|
|
58
|
-
pipelineSnapshot(args) {
|
|
59
|
-
return executeRead("pipeline_snapshot", args);
|
|
60
|
-
},
|
|
61
|
-
recordScopeLearning(args, idempotencyKey) {
|
|
62
|
-
return executeMutation("record_scope_learning", args, idempotencyKey);
|
|
63
|
-
},
|
|
64
|
-
discover(args) {
|
|
65
|
-
return executeRead("discover", args);
|
|
66
|
-
},
|
|
67
|
-
analyzeTopicDensity(args) {
|
|
68
|
-
return executeRead("analyze_topic_density", args);
|
|
69
|
-
},
|
|
70
|
-
applyAutoBranching(args, idempotencyKey) {
|
|
71
|
-
return executeMutation("apply_auto_branching", args, idempotencyKey);
|
|
72
|
-
},
|
|
73
|
-
seedBeliefLattice(args = {}, idempotencyKey) {
|
|
74
|
-
return executeMutation("seed_belief_lattice", args, idempotencyKey);
|
|
75
|
-
},
|
|
76
|
-
getLatticeCoverage(args = {}) {
|
|
77
|
-
return executeRead("get_lattice_coverage", args);
|
|
78
|
-
},
|
|
79
|
-
matchEntityType(args) {
|
|
80
|
-
return executeRead("match_entity_type", args);
|
|
81
|
-
},
|
|
82
|
-
discoverEntityConnections(args) {
|
|
83
|
-
return executeRead("discover_entity_connections", args);
|
|
84
|
-
},
|
|
85
|
-
triggerBeliefReview(args, idempotencyKey) {
|
|
86
|
-
return executeMutation("trigger_belief_review", args, idempotencyKey);
|
|
87
|
-
},
|
|
88
|
-
listOntologies(args = {}) {
|
|
89
|
-
return executeRead("list_ontologies", args);
|
|
90
|
-
},
|
|
91
|
-
getOntology(args) {
|
|
92
|
-
return executeRead("get_ontology", args);
|
|
93
|
-
},
|
|
94
|
-
applyOntology(args, idempotencyKey) {
|
|
95
|
-
return executeMutation("apply_ontology", args, idempotencyKey);
|
|
96
|
-
},
|
|
97
|
-
createOntology(args, idempotencyKey) {
|
|
98
|
-
return executeMutation("create_ontology", args, idempotencyKey);
|
|
99
|
-
},
|
|
100
|
-
updateOntology(args, idempotencyKey) {
|
|
101
|
-
return executeMutation("update_ontology", args, idempotencyKey);
|
|
102
|
-
},
|
|
103
|
-
archiveOntology(args, idempotencyKey) {
|
|
104
|
-
return executeMutation("archive_ontology", args, idempotencyKey);
|
|
105
|
-
},
|
|
106
|
-
createOntologyVersion(args, idempotencyKey) {
|
|
107
|
-
return executeMutation("create_ontology_version", args, idempotencyKey);
|
|
108
|
-
},
|
|
109
|
-
publishOntologyVersion(args, idempotencyKey) {
|
|
110
|
-
return executeMutation("publish_ontology_version", args, idempotencyKey);
|
|
111
|
-
},
|
|
112
|
-
deprecateOntologyVersion(args, idempotencyKey) {
|
|
113
|
-
return executeMutation("deprecate_ontology_version", args, idempotencyKey);
|
|
114
|
-
},
|
|
115
|
-
resolveEffectiveOntology(args) {
|
|
116
|
-
return executeRead("resolve_effective_ontology", args);
|
|
117
|
-
},
|
|
118
|
-
registerSession(args = {}, idempotencyKey) {
|
|
119
|
-
return executeMutation("register_session", args, idempotencyKey);
|
|
120
|
-
},
|
|
121
|
-
heartbeatSession(args = {}, idempotencyKey) {
|
|
122
|
-
return executeMutation("heartbeat_session", args, idempotencyKey);
|
|
123
|
-
},
|
|
124
|
-
endSession(args = {}, idempotencyKey) {
|
|
125
|
-
return executeMutation("end_session", args, idempotencyKey);
|
|
126
|
-
},
|
|
127
|
-
listActiveSessions(args = {}) {
|
|
128
|
-
return executeRead("list_active_sessions", args);
|
|
129
|
-
},
|
|
130
|
-
sendAgentMessage(args, idempotencyKey) {
|
|
131
|
-
return executeMutation("send_agent_message", args, idempotencyKey);
|
|
132
|
-
},
|
|
133
|
-
broadcastMessage(args, idempotencyKey) {
|
|
134
|
-
return executeMutation("broadcast_message", args, idempotencyKey);
|
|
135
|
-
},
|
|
136
|
-
getAgentInbox(args = {}) {
|
|
137
|
-
return executeRead("get_agent_inbox", args);
|
|
138
|
-
},
|
|
139
|
-
claimFiles(args, idempotencyKey) {
|
|
140
|
-
return executeMutation("claim_files", args, idempotencyKey);
|
|
141
|
-
},
|
|
142
|
-
listTasks(args) {
|
|
143
|
-
return executeRead("list_tasks", args);
|
|
144
|
-
},
|
|
145
|
-
createAnswer(args, idempotencyKey) {
|
|
146
|
-
return executeMutation("create_answer", args, idempotencyKey);
|
|
147
|
-
},
|
|
148
|
-
getAnswer(args) {
|
|
149
|
-
return executeRead("get_answer", args);
|
|
150
|
-
},
|
|
151
|
-
flagContradiction(args, idempotencyKey) {
|
|
152
|
-
return executeMutation("flag_contradiction", args, idempotencyKey);
|
|
153
|
-
},
|
|
154
|
-
ingestObservation(args, idempotencyKey) {
|
|
155
|
-
return executeMutation("ingest_observation", args, idempotencyKey);
|
|
156
|
-
},
|
|
157
|
-
getObservationContext(args) {
|
|
158
|
-
return executeRead("get_observation_context", args);
|
|
159
|
-
},
|
|
160
|
-
getCodeContext(args) {
|
|
161
|
-
return executeRead("get_code_context", args);
|
|
162
|
-
},
|
|
163
|
-
getChangeHistory(args) {
|
|
164
|
-
return executeRead("get_change_history", args);
|
|
165
|
-
},
|
|
166
|
-
recordAttempt(args, idempotencyKey) {
|
|
167
|
-
return executeMutation("record_attempt", args, idempotencyKey);
|
|
168
|
-
},
|
|
169
|
-
getFailureLog(args) {
|
|
170
|
-
return executeRead("get_failure_log", args);
|
|
171
|
-
},
|
|
172
|
-
createEpistemicContract(args, idempotencyKey) {
|
|
173
|
-
return executeMutation("create_epistemic_contract", args, idempotencyKey);
|
|
174
|
-
},
|
|
175
|
-
evaluateContract(args, idempotencyKey) {
|
|
176
|
-
return executeMutation("evaluate_contract", args, idempotencyKey);
|
|
177
|
-
},
|
|
178
|
-
getContractStatus(args) {
|
|
179
|
-
return executeRead("get_contract_status", args);
|
|
180
|
-
},
|
|
181
|
-
checkPermission(args) {
|
|
182
|
-
return executeRead("check_permission", args);
|
|
183
|
-
},
|
|
184
|
-
filterByPermission(args) {
|
|
185
|
-
return executeRead("filter_by_permission", args);
|
|
186
|
-
},
|
|
187
|
-
manageWritePolicy(args, idempotencyKey) {
|
|
188
|
-
return args.action === "set"
|
|
189
|
-
? executeMutation("manage_write_policy", args, idempotencyKey)
|
|
190
|
-
: executeRead("manage_write_policy", args);
|
|
191
|
-
},
|
|
192
|
-
generateSessionHandoff(args) {
|
|
193
|
-
return executeRead("generate_session_handoff", args);
|
|
194
|
-
},
|
|
195
|
-
};
|
|
196
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** Descriptor mapping an MCP tool name to its SDK method path and read/mutation classification. */
|
|
2
|
-
export type McpParityMethod = {
|
|
3
|
-
toolName: string;
|
|
4
|
-
methodPath: string;
|
|
5
|
-
kind: "read" | "mutation";
|
|
6
|
-
};
|
|
7
|
-
/** Complete registry of MCP tools with SDK parity, mapping tool names to SDK method paths. */
|
|
8
|
-
export declare const SDK_MCP_PARITY_METHODS: readonly McpParityMethod[];
|
|
9
|
-
export declare const SDK_MCP_PARITY_METHOD_PATHS: string[];
|
|
10
|
-
export declare const SDK_MCP_PARITY_TOOL_NAMES: string[];
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/** Complete registry of MCP tools with SDK parity, mapping tool names to SDK method paths. */
|
|
2
|
-
export const SDK_MCP_PARITY_METHODS = [
|
|
3
|
-
{ toolName: "activate_worktree", methodPath: "worktrees.activate", kind: "mutation" },
|
|
4
|
-
{ toolName: "update_worktree_metadata", methodPath: "worktrees.updateMetadata", kind: "mutation" },
|
|
5
|
-
{ toolName: "update_worktree_targets", methodPath: "worktrees.updateTargets", kind: "mutation" },
|
|
6
|
-
{ toolName: "list_all_worktrees", methodPath: "worktrees.listAll", kind: "read" },
|
|
7
|
-
{ toolName: "pipeline_snapshot", methodPath: "worktrees.pipelineSnapshot", kind: "read" },
|
|
8
|
-
{ toolName: "record_scope_learning", methodPath: "context.recordScopeLearning", kind: "mutation" },
|
|
9
|
-
{ toolName: "discover", methodPath: "context.discover", kind: "read" },
|
|
10
|
-
{ toolName: "analyze_topic_density", methodPath: "context.analyzeTopicDensity", kind: "read" },
|
|
11
|
-
{ toolName: "apply_auto_branching", methodPath: "context.applyAutoBranching", kind: "mutation" },
|
|
12
|
-
{ toolName: "seed_belief_lattice", methodPath: "context.seedBeliefLattice", kind: "mutation" },
|
|
13
|
-
{ toolName: "get_lattice_coverage", methodPath: "context.getLatticeCoverage", kind: "read" },
|
|
14
|
-
{ toolName: "match_entity_type", methodPath: "context.matchEntityType", kind: "read" },
|
|
15
|
-
{ toolName: "discover_entity_connections", methodPath: "context.discoverEntityConnections", kind: "read" },
|
|
16
|
-
{ toolName: "trigger_belief_review", methodPath: "context.triggerBeliefReview", kind: "mutation" },
|
|
17
|
-
{ toolName: "list_ontologies", methodPath: "ontologies.list", kind: "read" },
|
|
18
|
-
{ toolName: "get_ontology", methodPath: "ontologies.get", kind: "read" },
|
|
19
|
-
{ toolName: "apply_ontology", methodPath: "ontologies.bind", kind: "mutation" },
|
|
20
|
-
{ toolName: "create_ontology", methodPath: "ontologies.create", kind: "mutation" },
|
|
21
|
-
{ toolName: "update_ontology", methodPath: "ontologies.update", kind: "mutation" },
|
|
22
|
-
{ toolName: "archive_ontology", methodPath: "ontologies.archive", kind: "mutation" },
|
|
23
|
-
{ toolName: "create_ontology_version", methodPath: "ontologies.createVersion", kind: "mutation" },
|
|
24
|
-
{ toolName: "publish_ontology_version", methodPath: "ontologies.publishVersion", kind: "mutation" },
|
|
25
|
-
{ toolName: "deprecate_ontology_version", methodPath: "ontologies.deprecateVersion", kind: "mutation" },
|
|
26
|
-
{ toolName: "resolve_effective_ontology", methodPath: "ontologies.resolveEffective", kind: "read" },
|
|
27
|
-
{ toolName: "register_session", methodPath: "coordination.registerSession", kind: "mutation" },
|
|
28
|
-
{ toolName: "heartbeat_session", methodPath: "coordination.heartbeatSession", kind: "mutation" },
|
|
29
|
-
{ toolName: "end_session", methodPath: "coordination.endSession", kind: "mutation" },
|
|
30
|
-
{ toolName: "list_active_sessions", methodPath: "coordination.listActiveSessions", kind: "read" },
|
|
31
|
-
{ toolName: "send_agent_message", methodPath: "coordination.sendAgentMessage", kind: "mutation" },
|
|
32
|
-
{ toolName: "broadcast_message", methodPath: "coordination.broadcastMessage", kind: "mutation" },
|
|
33
|
-
{ toolName: "get_agent_inbox", methodPath: "coordination.getInbox", kind: "read" },
|
|
34
|
-
{ toolName: "claim_files", methodPath: "coordination.claimFiles", kind: "mutation" },
|
|
35
|
-
{ toolName: "create_topic", methodPath: "topics.create", kind: "mutation" },
|
|
36
|
-
{ toolName: "get_topic", methodPath: "topics.get", kind: "read" },
|
|
37
|
-
{ toolName: "get_topic_tree", methodPath: "topics.getTree", kind: "read" },
|
|
38
|
-
{ toolName: "list_tasks", methodPath: "tasks.list", kind: "read" },
|
|
39
|
-
{ toolName: "create_answer", methodPath: "answers.create", kind: "mutation" },
|
|
40
|
-
{ toolName: "get_answer", methodPath: "answers.get", kind: "read" },
|
|
41
|
-
{ toolName: "flag_contradiction", methodPath: "contradictions.flag", kind: "mutation" },
|
|
42
|
-
{ toolName: "ingest_observation", methodPath: "observations.ingest", kind: "mutation" },
|
|
43
|
-
{ toolName: "get_observation_context", methodPath: "observations.getContext", kind: "read" },
|
|
44
|
-
{ toolName: "get_code_context", methodPath: "coding.getCodeContext", kind: "read" },
|
|
45
|
-
{ toolName: "get_change_history", methodPath: "coding.getChangeHistory", kind: "read" },
|
|
46
|
-
{ toolName: "record_attempt", methodPath: "coding.recordAttempt", kind: "mutation" },
|
|
47
|
-
{ toolName: "get_failure_log", methodPath: "coding.getFailureLog", kind: "read" },
|
|
48
|
-
{ toolName: "create_epistemic_contract", methodPath: "contracts.create", kind: "mutation" },
|
|
49
|
-
{ toolName: "evaluate_contract", methodPath: "contracts.evaluate", kind: "mutation" },
|
|
50
|
-
{ toolName: "get_contract_status", methodPath: "contracts.getStatus", kind: "read" },
|
|
51
|
-
{ toolName: "check_permission", methodPath: "policy.checkPermission", kind: "read" },
|
|
52
|
-
{ toolName: "filter_by_permission", methodPath: "policy.filterByPermission", kind: "read" },
|
|
53
|
-
{ toolName: "manage_write_policy", methodPath: "policy.manageWritePolicy", kind: "mutation" },
|
|
54
|
-
{ toolName: "generate_session_handoff", methodPath: "bootstrap.generateSessionHandoff", kind: "read" },
|
|
55
|
-
];
|
|
56
|
-
export const SDK_MCP_PARITY_METHOD_PATHS = SDK_MCP_PARITY_METHODS.map((entry) => entry.methodPath);
|
|
57
|
-
export const SDK_MCP_PARITY_TOOL_NAMES = SDK_MCP_PARITY_METHODS.map((entry) => entry.toolName);
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { createListResult, mapGatewayData } from "./sdkSurface.js";
|
|
3
|
-
/**
|
|
4
|
-
* Create the ontology client for ontology definitions and versions.
|
|
5
|
-
* @param config - Gateway transport configuration.
|
|
6
|
-
* @returns An object with methods to manage ontology definitions, versions, and bindings.
|
|
7
|
-
*/
|
|
8
|
-
export function createOntologyClient(config = {}) {
|
|
9
|
-
const gateway = createGatewayRequestClient(config);
|
|
10
|
-
return {
|
|
11
|
-
/**
|
|
12
|
-
* List ontology definitions matching optional filters.
|
|
13
|
-
*/
|
|
14
|
-
async list(filters = {}) {
|
|
15
|
-
return gateway
|
|
16
|
-
.request({
|
|
17
|
-
path: `/api/platform/v1/ontologies${toQueryString(filters)}`,
|
|
18
|
-
})
|
|
19
|
-
.then((response) => mapGatewayData(response, (data) => {
|
|
20
|
-
const record = data && typeof data === "object" && !Array.isArray(data)
|
|
21
|
-
? data
|
|
22
|
-
: {};
|
|
23
|
-
const ontologies = Array.isArray(record.ontologies)
|
|
24
|
-
? record.ontologies
|
|
25
|
-
: Array.isArray(record.definitions)
|
|
26
|
-
? record.definitions
|
|
27
|
-
: Array.isArray(data)
|
|
28
|
-
? data
|
|
29
|
-
: [];
|
|
30
|
-
const total = typeof record.total === "number" && Number.isFinite(record.total)
|
|
31
|
-
? record.total
|
|
32
|
-
: ontologies.length;
|
|
33
|
-
return {
|
|
34
|
-
...record,
|
|
35
|
-
...createListResult(ontologies, "definitions"),
|
|
36
|
-
ontologies,
|
|
37
|
-
total,
|
|
38
|
-
};
|
|
39
|
-
}));
|
|
40
|
-
},
|
|
41
|
-
/**
|
|
42
|
-
* Get an ontology definition by identifier.
|
|
43
|
-
*/
|
|
44
|
-
async get(id) {
|
|
45
|
-
return gateway.request({
|
|
46
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(id)}`,
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* Bind an ontology definition to a topic.
|
|
51
|
-
*/
|
|
52
|
-
async bind(input, idempotencyKey) {
|
|
53
|
-
return gateway.request({
|
|
54
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(input.ontologyId)}/bind`,
|
|
55
|
-
method: "POST",
|
|
56
|
-
body: {
|
|
57
|
-
topicId: input.topicId,
|
|
58
|
-
},
|
|
59
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
/**
|
|
63
|
-
* List ontology definitions.
|
|
64
|
-
*/
|
|
65
|
-
async listDefinitions(filters = {}) {
|
|
66
|
-
return this.list(filters);
|
|
67
|
-
},
|
|
68
|
-
/**
|
|
69
|
-
* Get an ontology definition.
|
|
70
|
-
*/
|
|
71
|
-
async getDefinition(id) {
|
|
72
|
-
return this.get(id);
|
|
73
|
-
},
|
|
74
|
-
/**
|
|
75
|
-
* Create an ontology definition.
|
|
76
|
-
*/
|
|
77
|
-
async createDefinition(input, idempotencyKey) {
|
|
78
|
-
return gateway.request({
|
|
79
|
-
path: "/api/platform/v1/ontologies",
|
|
80
|
-
method: "POST",
|
|
81
|
-
body: input,
|
|
82
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
83
|
-
});
|
|
84
|
-
},
|
|
85
|
-
/**
|
|
86
|
-
* Update an ontology definition.
|
|
87
|
-
*/
|
|
88
|
-
async updateDefinition(id, input, idempotencyKey) {
|
|
89
|
-
return gateway.request({
|
|
90
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(id)}`,
|
|
91
|
-
method: "PATCH",
|
|
92
|
-
body: input,
|
|
93
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
94
|
-
});
|
|
95
|
-
},
|
|
96
|
-
/**
|
|
97
|
-
* Archive an ontology definition.
|
|
98
|
-
*/
|
|
99
|
-
async archiveDefinition(id, idempotencyKey) {
|
|
100
|
-
return gateway.request({
|
|
101
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(id)}`,
|
|
102
|
-
method: "DELETE",
|
|
103
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
104
|
-
});
|
|
105
|
-
},
|
|
106
|
-
/**
|
|
107
|
-
* List versions for an ontology definition.
|
|
108
|
-
*/
|
|
109
|
-
async listVersions(ontologyId, filters = {}) {
|
|
110
|
-
return gateway.request({
|
|
111
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(ontologyId)}/versions${toQueryString(filters)}`,
|
|
112
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "versions")));
|
|
113
|
-
},
|
|
114
|
-
/**
|
|
115
|
-
* Create an ontology version.
|
|
116
|
-
*/
|
|
117
|
-
async createVersion(ontologyId, input, idempotencyKey) {
|
|
118
|
-
return gateway.request({
|
|
119
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(ontologyId)}/versions`,
|
|
120
|
-
method: "POST",
|
|
121
|
-
body: input,
|
|
122
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
/**
|
|
126
|
-
* Publish an ontology version.
|
|
127
|
-
*/
|
|
128
|
-
async publishVersion(ontologyId, versionId, idempotencyKey) {
|
|
129
|
-
return gateway.request({
|
|
130
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(ontologyId)}/versions/${encodeURIComponent(versionId)}/publish`,
|
|
131
|
-
method: "POST",
|
|
132
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
133
|
-
});
|
|
134
|
-
},
|
|
135
|
-
/**
|
|
136
|
-
* Deprecate an ontology version.
|
|
137
|
-
*/
|
|
138
|
-
async deprecateVersion(ontologyId, versionId, idempotencyKey) {
|
|
139
|
-
return gateway.request({
|
|
140
|
-
path: `/api/platform/v1/ontologies/${encodeURIComponent(ontologyId)}/versions/${encodeURIComponent(versionId)}/deprecate`,
|
|
141
|
-
method: "POST",
|
|
142
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
/**
|
|
146
|
-
* List topics directly bound to a specific ontology definition.
|
|
147
|
-
* Uses the topics gateway with ontologyId filter.
|
|
148
|
-
*/
|
|
149
|
-
async listTopics(ontologyId) {
|
|
150
|
-
return gateway.request({
|
|
151
|
-
path: `/api/platform/v1/topics?ontologyId=${encodeURIComponent(ontologyId)}`,
|
|
152
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "topics")));
|
|
153
|
-
},
|
|
154
|
-
/**
|
|
155
|
-
* @deprecated Use listTopics.
|
|
156
|
-
*/
|
|
157
|
-
async listTopicsByOntology(ontologyId) {
|
|
158
|
-
return this.listTopics(ontologyId);
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@/lib/platform/packs";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@/lib/platform/packs";
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { createGatewayRequestClient, LucernApiError, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
|
-
import { createListResult, mapGatewayData } from "./sdkSurface.js";
|
|
3
|
-
export { LucernApiError };
|
|
4
|
-
/**
|
|
5
|
-
* Create the packs client for pack catalog, state, and entitlement operations.
|
|
6
|
-
* @param config - Gateway transport configuration.
|
|
7
|
-
* @returns An object with methods to manage pack lifecycle, telemetry, and entitlements.
|
|
8
|
-
*/
|
|
9
|
-
export function createPacksClient(config = {}) {
|
|
10
|
-
const gateway = createGatewayRequestClient(config);
|
|
11
|
-
return {
|
|
12
|
-
/**
|
|
13
|
-
* List catalog entries for available packs.
|
|
14
|
-
*/
|
|
15
|
-
async listCatalog() {
|
|
16
|
-
return gateway.request({
|
|
17
|
-
path: "/api/platform/v1/packs/catalog",
|
|
18
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "catalog")));
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated Use listCatalog.
|
|
22
|
-
*/
|
|
23
|
-
async getCatalog() {
|
|
24
|
-
return this.listCatalog();
|
|
25
|
-
},
|
|
26
|
-
/**
|
|
27
|
-
* Get the discovery catalog for packs.
|
|
28
|
-
*/
|
|
29
|
-
async getDiscoveryCatalog() {
|
|
30
|
-
return gateway.request({
|
|
31
|
-
path: "/api/platform/v1/packs/discovery",
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
/**
|
|
35
|
-
* Get discovery details for a specific pack.
|
|
36
|
-
*/
|
|
37
|
-
async getDiscoveryDetail(packKey) {
|
|
38
|
-
return gateway.request({
|
|
39
|
-
path: `/api/platform/v1/packs/discovery/${encodeURIComponent(packKey)}`,
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
/**
|
|
43
|
-
* List pack states for the current scope.
|
|
44
|
-
*/
|
|
45
|
-
async listStates(query = {}) {
|
|
46
|
-
return gateway.request({
|
|
47
|
-
path: `/api/platform/v1/packs/states${toQueryString(query)}`,
|
|
48
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "states")));
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated Use listStates.
|
|
52
|
-
*/
|
|
53
|
-
async getStates(query = {}) {
|
|
54
|
-
return this.listStates(query);
|
|
55
|
-
},
|
|
56
|
-
/**
|
|
57
|
-
* Get health details for a pack.
|
|
58
|
-
*/
|
|
59
|
-
async getHealth(packKey, query = {}) {
|
|
60
|
-
return gateway.request({
|
|
61
|
-
path: `/api/platform/v1/packs/${encodeURIComponent(packKey)}/health${toQueryString(query)}`,
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
/**
|
|
65
|
-
* List pack telemetry entries.
|
|
66
|
-
*/
|
|
67
|
-
async listTelemetry(query = {}) {
|
|
68
|
-
return gateway.request({
|
|
69
|
-
path: `/api/platform/v1/packs/telemetry${toQueryString(query)}`,
|
|
70
|
-
}).then((response) => mapGatewayData(response, (data) => createListResult(Array.isArray(data) ? data : [], "telemetry")));
|
|
71
|
-
},
|
|
72
|
-
/**
|
|
73
|
-
* @deprecated Use listTelemetry.
|
|
74
|
-
*/
|
|
75
|
-
async getTelemetry(query = {}) {
|
|
76
|
-
return this.listTelemetry(query);
|
|
77
|
-
},
|
|
78
|
-
/**
|
|
79
|
-
* Create a pack entitlement.
|
|
80
|
-
*/
|
|
81
|
-
async createEntitlement(input, idempotencyKey) {
|
|
82
|
-
return gateway.request({
|
|
83
|
-
path: "/api/platform/v1/packs/entitlements",
|
|
84
|
-
method: "POST",
|
|
85
|
-
body: input,
|
|
86
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
87
|
-
});
|
|
88
|
-
},
|
|
89
|
-
/**
|
|
90
|
-
* Update a pack entitlement.
|
|
91
|
-
*/
|
|
92
|
-
async updateEntitlement(input, idempotencyKey) {
|
|
93
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
94
|
-
},
|
|
95
|
-
/**
|
|
96
|
-
* @deprecated Use createEntitlement or updateEntitlement.
|
|
97
|
-
*/
|
|
98
|
-
async upsertEntitlement(input, idempotencyKey) {
|
|
99
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
100
|
-
},
|
|
101
|
-
/**
|
|
102
|
-
* Install a pack.
|
|
103
|
-
*/
|
|
104
|
-
async install(input, idempotencyKey) {
|
|
105
|
-
return gateway.request({
|
|
106
|
-
path: "/api/platform/v1/packs/install",
|
|
107
|
-
method: "POST",
|
|
108
|
-
body: input,
|
|
109
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
110
|
-
});
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
* Enable a pack.
|
|
114
|
-
*/
|
|
115
|
-
async enable(input, idempotencyKey) {
|
|
116
|
-
return gateway.request({
|
|
117
|
-
path: "/api/platform/v1/packs/enable",
|
|
118
|
-
method: "POST",
|
|
119
|
-
body: input,
|
|
120
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
/**
|
|
124
|
-
* Disable a pack.
|
|
125
|
-
*/
|
|
126
|
-
async disable(input, idempotencyKey) {
|
|
127
|
-
return gateway.request({
|
|
128
|
-
path: "/api/platform/v1/packs/disable",
|
|
129
|
-
method: "POST",
|
|
130
|
-
body: input,
|
|
131
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
132
|
-
});
|
|
133
|
-
},
|
|
134
|
-
/**
|
|
135
|
-
* Uninstall a pack.
|
|
136
|
-
*/
|
|
137
|
-
async uninstall(input, idempotencyKey) {
|
|
138
|
-
return gateway.request({
|
|
139
|
-
path: "/api/platform/v1/packs/uninstall",
|
|
140
|
-
method: "POST",
|
|
141
|
-
body: input,
|
|
142
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
/**
|
|
146
|
-
* Upgrade a pack.
|
|
147
|
-
*/
|
|
148
|
-
async upgrade(input, idempotencyKey) {
|
|
149
|
-
return gateway.request({
|
|
150
|
-
path: "/api/platform/v1/packs/upgrade",
|
|
151
|
-
method: "POST",
|
|
152
|
-
body: input,
|
|
153
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey(),
|
|
154
|
-
});
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
}
|