@lucern/sdk 0.2.0-alpha.5 → 0.2.0-alpha.7
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/.turbo/turbo-build.log +7 -0
- package/.turbo/turbo-typecheck.log +4 -0
- package/CHANGELOG.md +13 -0
- package/examples/README.md +69 -0
- package/examples/contradiction.ts +94 -0
- package/examples/investigation-context.ts +118 -0
- package/examples/questions-and-tasks.ts +55 -0
- package/examples/quickstart.ts +97 -0
- package/examples/shared.ts +318 -0
- package/examples/strict-public-types.ts +143 -0
- package/examples/worktree-lifecycle.ts +79 -0
- package/package.json +16 -59
- package/src/README.md +6 -0
- package/src/adminClient.ts +789 -0
- package/{dist/lib/platform/sdk/answersClient.d.ts → src/answersClient.ts} +17 -4
- package/src/audiencesClient.ts +209 -0
- package/src/auditClient.ts +50 -0
- package/src/beliefsClient.ts +319 -0
- package/src/client.ts +2647 -0
- package/src/contextClient.ts +130 -0
- package/src/contextFacade.ts +15 -0
- package/src/contextPackCompiler.ts +828 -0
- package/src/contextPackSchema.ts +251 -0
- package/src/contextTypes.ts +153 -0
- package/src/contracts/api-enums.contract.ts +202 -0
- package/src/contracts/auth-session.contract.ts +109 -0
- package/src/contracts/context-pack.contract.ts +700 -0
- package/src/contracts/contextPack.ts +1 -0
- package/src/contracts/index.ts +10 -0
- package/src/contracts/lens-filter.contract.ts +183 -0
- package/src/contracts/lens-workflow.contract.ts +162 -0
- package/src/contracts/lensFilter.ts +1 -0
- package/src/contracts/lensWorkflow.ts +1 -0
- package/src/contracts/mcp-tools.contract.ts +3636 -0
- package/src/contracts/mcpTools.ts +1 -0
- package/src/contracts/prompt.contract.ts +50 -0
- package/src/contracts/prompt.ts +1 -0
- package/src/contracts/sdk-tools.contract.ts +1457 -0
- package/src/contracts/sdkTools.ts +1 -0
- package/src/contracts/workflow-runtime.contract.ts +440 -0
- package/src/contracts/workflowRuntime.ts +1 -0
- package/src/controlObjectOwnership.ts +286 -0
- package/src/coreClient.ts +570 -0
- package/src/customTools.ts +398 -0
- package/src/decisionsClient.ts +286 -0
- package/src/domainContext.ts +15 -0
- package/src/events.ts +531 -0
- package/src/eventsCore.ts +168 -0
- package/src/facade/beliefs.ts +83 -0
- package/src/facade/context.ts +110 -0
- package/src/facade/contradictions.ts +29 -0
- package/src/facade/edges.ts +30 -0
- package/src/facade/events.ts +23 -0
- package/src/facade/evidence.ts +41 -0
- package/src/facade/graph.ts +38 -0
- package/src/facade/identity.ts +16 -0
- package/src/facade/ontologies.ts +34 -0
- package/src/facade/questions.ts +59 -0
- package/src/facade/search.ts +16 -0
- package/src/facade/tasks.ts +37 -0
- package/src/facade/topics.ts +42 -0
- package/src/facade/webhooks.ts +58 -0
- package/src/facade/worktrees.ts +51 -0
- package/src/gatewayFacades.ts +1666 -0
- package/src/graphClient.ts +529 -0
- package/src/harnessClient.ts +585 -0
- package/src/identityClient.ts +278 -0
- package/{dist/lib/platform/sdk/index.d.ts → src/index.ts} +3 -0
- package/src/learningClient.ts +95 -0
- package/src/mcpParityClient.ts +240 -0
- package/src/mcpParitySurface.ts +70 -0
- package/src/ontologyClient.ts +275 -0
- package/src/packRuntime.ts +3 -0
- package/src/packsClient.ts +260 -0
- package/src/policyClient.ts +572 -0
- package/src/promptCatalog.ts +1 -0
- package/src/realtime/index.ts +51 -0
- package/src/realtime/refs.ts +17 -0
- package/src/reportsClient.ts +99 -0
- package/src/schemaClient.ts +129 -0
- package/src/sdkSurface.ts +190 -0
- package/src/topicsClient.ts +243 -0
- package/src/types.ts +807 -0
- package/src/workflowClient.ts +826 -0
- package/tsconfig.json +9 -0
- package/dist/.generated +0 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -3
- 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.d.ts +0 -404
- package/dist/lib/platform/sdk/adminClient.js +0 -384
- package/dist/lib/platform/sdk/answersClient.js +0 -21
- package/dist/lib/platform/sdk/audiencesClient.d.ts +0 -93
- 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.d.ts +0 -157
- package/dist/lib/platform/sdk/beliefsClient.js +0 -124
- package/dist/lib/platform/sdk/client.d.ts +0 -2369
- package/dist/lib/platform/sdk/client.js +0 -1831
- package/dist/lib/platform/sdk/contextClient.d.ts +0 -21
- package/dist/lib/platform/sdk/contextClient.js +0 -86
- package/dist/lib/platform/sdk/contextPackCompiler.d.ts +0 -100
- package/dist/lib/platform/sdk/contextPackCompiler.js +0 -534
- package/dist/lib/platform/sdk/contextTypes.d.ts +0 -133
- package/dist/lib/platform/sdk/contextTypes.js +0 -1
- package/dist/lib/platform/sdk/controlObjectOwnership.d.ts +0 -308
- package/dist/lib/platform/sdk/controlObjectOwnership.js +0 -220
- package/dist/lib/platform/sdk/coreClient.d.ts +0 -139
- package/dist/lib/platform/sdk/coreClient.js +0 -366
- package/dist/lib/platform/sdk/customTools.d.ts +0 -83
- package/dist/lib/platform/sdk/customTools.js +0 -247
- package/dist/lib/platform/sdk/decisionsClient.d.ts +0 -106
- 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/gatewayFacades.d.ts +0 -586
- package/dist/lib/platform/sdk/gatewayFacades.js +0 -845
- package/dist/lib/platform/sdk/graphClient.d.ts +0 -266
- package/dist/lib/platform/sdk/graphClient.js +0 -235
- package/dist/lib/platform/sdk/harnessClient.d.ts +0 -309
- package/dist/lib/platform/sdk/harnessClient.js +0 -219
- package/dist/lib/platform/sdk/identityClient.d.ts +0 -134
- package/dist/lib/platform/sdk/identityClient.js +0 -131
- package/dist/lib/platform/sdk/index.js +0 -46
- package/dist/lib/platform/sdk/learningClient.d.ts +0 -40
- package/dist/lib/platform/sdk/learningClient.js +0 -53
- package/dist/lib/platform/sdk/mcpParityClient.d.ts +0 -69
- 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.d.ts +0 -131
- 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.d.ts +0 -126
- package/dist/lib/platform/sdk/packsClient.js +0 -157
- package/dist/lib/platform/sdk/policyClient.d.ts +0 -293
- 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.d.ts +0 -59
- 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.d.ts +0 -78
- package/dist/lib/platform/sdk/topicsClient.js +0 -118
- package/dist/lib/platform/sdk/types.d.ts +0 -692
- package/dist/lib/platform/sdk/types.js +0 -1
- package/dist/lib/platform/sdk/version.d.ts +0 -2
- package/dist/lib/platform/sdk/workflowClient.d.ts +0 -313
- 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/lens-filter.contract.d.ts +0 -70
- 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/lib/platform/sdk/version.js → src/version.ts} +0 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createBeliefsClientCore,
|
|
3
|
+
type BeliefsClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/beliefs";
|
|
5
|
+
|
|
6
|
+
export type BeliefsFacadeConfig = BeliefsClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createBeliefsFacade(config: BeliefsFacadeConfig = {}) {
|
|
9
|
+
const beliefsClient = createBeliefsClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof beliefsClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof beliefsClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return beliefsClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async get(id: string) {
|
|
20
|
+
return beliefsClient.get(id);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async list(query: Parameters<typeof beliefsClient.list>[0]) {
|
|
24
|
+
return beliefsClient.list(query);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async refine(
|
|
28
|
+
id: string,
|
|
29
|
+
input: Parameters<typeof beliefsClient.refine>[1],
|
|
30
|
+
idempotencyKey?: Parameters<typeof beliefsClient.refine>[2]
|
|
31
|
+
) {
|
|
32
|
+
return beliefsClient.refine(id, input, idempotencyKey);
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
async fork(
|
|
36
|
+
id: string,
|
|
37
|
+
input: Parameters<typeof beliefsClient.fork>[1],
|
|
38
|
+
idempotencyKey?: Parameters<typeof beliefsClient.fork>[2]
|
|
39
|
+
) {
|
|
40
|
+
return beliefsClient.fork(id, input, idempotencyKey);
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
async updateConfidence(
|
|
44
|
+
id: string,
|
|
45
|
+
input: Parameters<typeof beliefsClient.updateConfidence>[1],
|
|
46
|
+
idempotencyKey?: Parameters<typeof beliefsClient.updateConfidence>[2]
|
|
47
|
+
) {
|
|
48
|
+
return beliefsClient.updateConfidence(id, input, idempotencyKey);
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
async archive(
|
|
52
|
+
id: string,
|
|
53
|
+
input?: Parameters<typeof beliefsClient.archive>[1],
|
|
54
|
+
idempotencyKey?: Parameters<typeof beliefsClient.archive>[2]
|
|
55
|
+
) {
|
|
56
|
+
return beliefsClient.archive(id, input, idempotencyKey);
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
async lineage(id: string) {
|
|
60
|
+
return beliefsClient.lineage(id);
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
async confidenceHistory(id: string) {
|
|
64
|
+
return beliefsClient.confidenceHistory(id);
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
async createContract(
|
|
68
|
+
id: string,
|
|
69
|
+
input: Parameters<typeof beliefsClient.createContract>[1],
|
|
70
|
+
idempotencyKey?: Parameters<typeof beliefsClient.createContract>[2]
|
|
71
|
+
) {
|
|
72
|
+
return beliefsClient.createContract(id, input, idempotencyKey);
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
async bisect(
|
|
76
|
+
id: string,
|
|
77
|
+
input: Parameters<typeof beliefsClient.bisect>[1],
|
|
78
|
+
idempotencyKey?: Parameters<typeof beliefsClient.bisect>[2]
|
|
79
|
+
) {
|
|
80
|
+
return beliefsClient.bisect(id, input, idempotencyKey);
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { CompileContextInput, PublicCompiledContext } from "../contextTypes";
|
|
2
|
+
|
|
3
|
+
export type ContextClientRequest = {
|
|
4
|
+
path: "/api/platform/v1/context/compile";
|
|
5
|
+
method: "POST";
|
|
6
|
+
body: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type ContextFacadeTransport = {
|
|
10
|
+
request<T>(request: ContextClientRequest): Promise<T>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type ContextFacadeConfig = {
|
|
14
|
+
transport: ContextFacadeTransport;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function cleanString(value: unknown): string | undefined {
|
|
18
|
+
return typeof value === "string" && value.trim().length > 0
|
|
19
|
+
? value.trim()
|
|
20
|
+
: undefined;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function cleanNumber(value: unknown): number | undefined {
|
|
24
|
+
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function cleanBoolean(value: unknown): boolean | undefined {
|
|
28
|
+
return typeof value === "boolean" ? value : undefined;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function buildCompileContextRequest(
|
|
32
|
+
topicId: string,
|
|
33
|
+
input: CompileContextInput = {}
|
|
34
|
+
): ContextClientRequest {
|
|
35
|
+
const payload: Record<string, unknown> = { topicId };
|
|
36
|
+
|
|
37
|
+
const query = cleanString(input.query);
|
|
38
|
+
if (query) {
|
|
39
|
+
payload.query = query;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const budget = cleanNumber(input.budget) ?? cleanNumber(input.tokenBudget);
|
|
43
|
+
if (budget !== undefined) {
|
|
44
|
+
payload.budget = budget;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const ranking = cleanString(input.ranking) ?? cleanString(input.rankingProfile);
|
|
48
|
+
if (ranking) {
|
|
49
|
+
payload.ranking = ranking;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const limit = cleanNumber(input.limit);
|
|
53
|
+
if (limit !== undefined) {
|
|
54
|
+
payload.limit = limit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const maxDepth = cleanNumber(input.maxDepth);
|
|
58
|
+
if (maxDepth !== undefined) {
|
|
59
|
+
payload.maxDepth = maxDepth;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const includeEntities = cleanBoolean(input.includeEntities);
|
|
63
|
+
if (includeEntities !== undefined) {
|
|
64
|
+
payload.includeEntities = includeEntities;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const mode = cleanString(input.mode);
|
|
68
|
+
if (mode) {
|
|
69
|
+
payload.mode = mode;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const includeFailures = cleanBoolean(input.includeFailures);
|
|
73
|
+
if (includeFailures !== undefined) {
|
|
74
|
+
payload.includeFailures = includeFailures;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const worktreeId = cleanString(input.worktreeId);
|
|
78
|
+
if (worktreeId) {
|
|
79
|
+
payload.worktreeId = worktreeId;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const sessionId = cleanString(input.sessionId);
|
|
83
|
+
if (sessionId) {
|
|
84
|
+
payload.sessionId = sessionId;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (
|
|
88
|
+
Array.isArray(input.packWeightOverrides) &&
|
|
89
|
+
input.packWeightOverrides.length > 0
|
|
90
|
+
) {
|
|
91
|
+
payload.packWeightOverrides = input.packWeightOverrides;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
path: "/api/platform/v1/context/compile",
|
|
96
|
+
method: "POST",
|
|
97
|
+
body: payload,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function createContextFacade(config: ContextFacadeConfig) {
|
|
102
|
+
return {
|
|
103
|
+
compile(topicId: string, input: CompileContextInput = {}) {
|
|
104
|
+
const request = buildCompileContextRequest(topicId, input);
|
|
105
|
+
return config.transport.request<PublicCompiledContext>(request);
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export type { CompileContextInput, PublicCompiledContext };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createContradictionsClient,
|
|
3
|
+
type ContradictionsClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/contradictions";
|
|
5
|
+
|
|
6
|
+
export type ContradictionsFacadeConfig = ContradictionsClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createContradictionsFacade(
|
|
9
|
+
config: ContradictionsFacadeConfig = {}
|
|
10
|
+
) {
|
|
11
|
+
const contradictionsClient = createContradictionsClient(config);
|
|
12
|
+
|
|
13
|
+
return {
|
|
14
|
+
async flag(
|
|
15
|
+
input: Parameters<typeof contradictionsClient.flag>[0],
|
|
16
|
+
idempotencyKey?: Parameters<typeof contradictionsClient.flag>[1]
|
|
17
|
+
) {
|
|
18
|
+
return contradictionsClient.flag(input, idempotencyKey);
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
async list(query: Parameters<typeof contradictionsClient.list>[0]) {
|
|
22
|
+
return contradictionsClient.list(query);
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
async get(id: string) {
|
|
26
|
+
return contradictionsClient.get(id);
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEdgesClient,
|
|
3
|
+
type EdgesClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/edges";
|
|
5
|
+
|
|
6
|
+
export type EdgesFacadeConfig = EdgesClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createEdgesFacade(config: EdgesFacadeConfig = {}) {
|
|
9
|
+
const edgesClient = createEdgesClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof edgesClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof edgesClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return edgesClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async list(query: Parameters<typeof edgesClient.list>[0]) {
|
|
20
|
+
return edgesClient.list(query);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async traverse(
|
|
24
|
+
input: Parameters<typeof edgesClient.traverse>[0],
|
|
25
|
+
idempotencyKey?: Parameters<typeof edgesClient.traverse>[1]
|
|
26
|
+
) {
|
|
27
|
+
return edgesClient.traverse(input, idempotencyKey);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEventsClientCore,
|
|
3
|
+
type EventsClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/events";
|
|
5
|
+
|
|
6
|
+
export type EventsFacadeConfig = EventsClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createEventsFacade(config: EventsFacadeConfig = {}) {
|
|
9
|
+
const eventsClient = createEventsClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async list(query: Parameters<typeof eventsClient.list>[0]) {
|
|
13
|
+
return eventsClient.list(query);
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
async replay(
|
|
17
|
+
input: Parameters<typeof eventsClient.replay>[0],
|
|
18
|
+
idempotencyKey?: Parameters<typeof eventsClient.replay>[1]
|
|
19
|
+
) {
|
|
20
|
+
return eventsClient.replay(input, idempotencyKey);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createEvidenceClient,
|
|
3
|
+
type EvidenceClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/evidence";
|
|
5
|
+
|
|
6
|
+
export type EvidenceFacadeConfig = EvidenceClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createEvidenceFacade(config: EvidenceFacadeConfig = {}) {
|
|
9
|
+
const evidenceClient = createEvidenceClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof evidenceClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof evidenceClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return evidenceClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async get(id: string) {
|
|
20
|
+
return evidenceClient.get(id);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async list(query: Parameters<typeof evidenceClient.list>[0]) {
|
|
24
|
+
return evidenceClient.list(query);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async link(
|
|
28
|
+
input: Parameters<typeof evidenceClient.link>[0],
|
|
29
|
+
idempotencyKey?: Parameters<typeof evidenceClient.link>[1]
|
|
30
|
+
) {
|
|
31
|
+
return evidenceClient.link(input, idempotencyKey);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
async search(
|
|
35
|
+
query: Parameters<typeof evidenceClient.search>[0],
|
|
36
|
+
idempotencyKey?: Parameters<typeof evidenceClient.search>[1]
|
|
37
|
+
) {
|
|
38
|
+
return evidenceClient.search(query, idempotencyKey);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGraphClient,
|
|
3
|
+
type GraphClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/graph";
|
|
5
|
+
|
|
6
|
+
export type GraphFacadeConfig = GraphClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createGraphFacade(config: GraphFacadeConfig = {}) {
|
|
9
|
+
const graphClient = createGraphClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async neighborhood(
|
|
13
|
+
input: Parameters<typeof graphClient.neighborhood>[0]
|
|
14
|
+
) {
|
|
15
|
+
return graphClient.neighborhood(input);
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
async traverse(input: Parameters<typeof graphClient.traverse>[0]) {
|
|
19
|
+
return graphClient.traverse(input);
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
async analyze(input: Parameters<typeof graphClient.analyze>[0]) {
|
|
23
|
+
return graphClient.analyze(input);
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async bias(input: Parameters<typeof graphClient.bias>[0]) {
|
|
27
|
+
return graphClient.bias(input);
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
async gaps(input: Parameters<typeof graphClient.gaps>[0]) {
|
|
31
|
+
return graphClient.gaps(input);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
async falsify(input: Parameters<typeof graphClient.falsify>[0]) {
|
|
35
|
+
return graphClient.falsify(input);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createIdentityWhoamiClient,
|
|
3
|
+
type IdentityClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/identity";
|
|
5
|
+
|
|
6
|
+
export type IdentityFacadeConfig = IdentityClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createIdentityFacade(config: IdentityFacadeConfig = {}) {
|
|
9
|
+
const identityClient = createIdentityWhoamiClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async whoami() {
|
|
13
|
+
return identityClient.whoami();
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createOntologiesClientCore,
|
|
3
|
+
type OntologiesClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/ontologies";
|
|
5
|
+
|
|
6
|
+
export type OntologiesFacadeConfig = OntologiesClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createOntologiesFacade(config: OntologiesFacadeConfig = {}) {
|
|
9
|
+
const ontologiesClient = createOntologiesClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async get(id: string) {
|
|
13
|
+
return ontologiesClient.get(id);
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
async list(query: Parameters<typeof ontologiesClient.list>[0] = {}) {
|
|
17
|
+
return ontologiesClient.list(query);
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
async bind(
|
|
21
|
+
input: Parameters<typeof ontologiesClient.bind>[0],
|
|
22
|
+
idempotencyKey?: Parameters<typeof ontologiesClient.bind>[1]
|
|
23
|
+
) {
|
|
24
|
+
return ontologiesClient.bind(input, idempotencyKey);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async match(
|
|
28
|
+
input: Parameters<typeof ontologiesClient.match>[0],
|
|
29
|
+
idempotencyKey?: Parameters<typeof ontologiesClient.match>[1]
|
|
30
|
+
) {
|
|
31
|
+
return ontologiesClient.match(input, idempotencyKey);
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createQuestionsClient,
|
|
3
|
+
type QuestionsClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/questions";
|
|
5
|
+
|
|
6
|
+
export type QuestionsFacadeConfig = QuestionsClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createQuestionsFacade(config: QuestionsFacadeConfig = {}) {
|
|
9
|
+
const questionsClient = createQuestionsClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof questionsClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof questionsClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return questionsClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async get(id: string) {
|
|
20
|
+
return questionsClient.get(id);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async list(query: Parameters<typeof questionsClient.list>[0]) {
|
|
24
|
+
return questionsClient.list(query);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async answer(
|
|
28
|
+
id: string,
|
|
29
|
+
input: Parameters<typeof questionsClient.answer>[1],
|
|
30
|
+
idempotencyKey?: Parameters<typeof questionsClient.answer>[2]
|
|
31
|
+
) {
|
|
32
|
+
return questionsClient.answer(id, input, idempotencyKey);
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
async refine(
|
|
36
|
+
id: string,
|
|
37
|
+
input: Parameters<typeof questionsClient.refine>[1],
|
|
38
|
+
idempotencyKey?: Parameters<typeof questionsClient.refine>[2]
|
|
39
|
+
) {
|
|
40
|
+
return questionsClient.refine(id, input, idempotencyKey);
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
async archive(
|
|
44
|
+
id: string,
|
|
45
|
+
input?: Parameters<typeof questionsClient.archive>[1],
|
|
46
|
+
idempotencyKey?: Parameters<typeof questionsClient.archive>[2]
|
|
47
|
+
) {
|
|
48
|
+
return questionsClient.archive(id, input, idempotencyKey);
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
async updateStatus(
|
|
52
|
+
id: string,
|
|
53
|
+
input: Parameters<typeof questionsClient.updateStatus>[1],
|
|
54
|
+
idempotencyKey?: Parameters<typeof questionsClient.updateStatus>[2]
|
|
55
|
+
) {
|
|
56
|
+
return questionsClient.updateStatus(id, input, idempotencyKey);
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createSearchClient,
|
|
3
|
+
type SearchClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/search";
|
|
5
|
+
|
|
6
|
+
export type SearchFacadeConfig = SearchClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createSearchFacade(config: SearchFacadeConfig = {}) {
|
|
9
|
+
const searchClient = createSearchClient(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async query(input: Parameters<typeof searchClient.query>[0]) {
|
|
13
|
+
return searchClient.query(input);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createTasksClientCore,
|
|
3
|
+
type TasksClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/tasks";
|
|
5
|
+
|
|
6
|
+
export type TasksFacadeConfig = TasksClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createTasksFacade(config: TasksFacadeConfig = {}) {
|
|
9
|
+
const tasksClient = createTasksClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof tasksClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof tasksClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return tasksClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async update(
|
|
20
|
+
input: Parameters<typeof tasksClient.update>[0],
|
|
21
|
+
idempotencyKey?: Parameters<typeof tasksClient.update>[1]
|
|
22
|
+
) {
|
|
23
|
+
return tasksClient.update(input, idempotencyKey);
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async complete(
|
|
27
|
+
input: Parameters<typeof tasksClient.complete>[0],
|
|
28
|
+
idempotencyKey?: Parameters<typeof tasksClient.complete>[1]
|
|
29
|
+
) {
|
|
30
|
+
return tasksClient.complete(input, idempotencyKey);
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
async list(query: Parameters<typeof tasksClient.list>[0]) {
|
|
34
|
+
return tasksClient.list(query);
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createTopicsClientCore,
|
|
3
|
+
type TopicsClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/topics";
|
|
5
|
+
|
|
6
|
+
export type TopicsFacadeConfig = TopicsClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createTopicsFacade(config: TopicsFacadeConfig = {}) {
|
|
9
|
+
const topicsClient = createTopicsClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof topicsClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof topicsClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return topicsClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async get(id: string) {
|
|
20
|
+
return topicsClient.get(id);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async list(query: Parameters<typeof topicsClient.list>[0] = {}) {
|
|
24
|
+
return topicsClient.list(query);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async update(
|
|
28
|
+
input: Parameters<typeof topicsClient.update>[0],
|
|
29
|
+
idempotencyKey?: Parameters<typeof topicsClient.update>[1]
|
|
30
|
+
) {
|
|
31
|
+
return topicsClient.update(input, idempotencyKey);
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
async tree(input: Parameters<typeof topicsClient.tree>[0]) {
|
|
35
|
+
return topicsClient.tree(input);
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
async coverage(input: Parameters<typeof topicsClient.coverage>[0]) {
|
|
39
|
+
return topicsClient.coverage(input);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWebhooksClientCore,
|
|
3
|
+
type WebhooksClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/webhooks";
|
|
5
|
+
|
|
6
|
+
export type WebhooksFacadeConfig = WebhooksClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createWebhooksFacade(config: WebhooksFacadeConfig = {}) {
|
|
9
|
+
const webhooksClient = createWebhooksClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof webhooksClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof webhooksClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return webhooksClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async list(query?: Parameters<typeof webhooksClient.list>[0]) {
|
|
20
|
+
return webhooksClient.list(query);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async get(id: string) {
|
|
24
|
+
return webhooksClient.get(id);
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
async update(
|
|
28
|
+
id: string,
|
|
29
|
+
input: Parameters<typeof webhooksClient.update>[1],
|
|
30
|
+
idempotencyKey?: Parameters<typeof webhooksClient.update>[2]
|
|
31
|
+
) {
|
|
32
|
+
return webhooksClient.update(id, input, idempotencyKey);
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
async delete(id: string, idempotencyKey?: Parameters<typeof webhooksClient.delete>[1]) {
|
|
36
|
+
return webhooksClient.delete(id, idempotencyKey);
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
async test(
|
|
40
|
+
id: string,
|
|
41
|
+
input?: Parameters<typeof webhooksClient.test>[1],
|
|
42
|
+
idempotencyKey?: Parameters<typeof webhooksClient.test>[2]
|
|
43
|
+
) {
|
|
44
|
+
return webhooksClient.test(id, input, idempotencyKey);
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
async deliveries(
|
|
48
|
+
id: string,
|
|
49
|
+
query?: Parameters<typeof webhooksClient.deliveries>[1]
|
|
50
|
+
) {
|
|
51
|
+
return webhooksClient.deliveries(id, query);
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
async health(id: string) {
|
|
55
|
+
return webhooksClient.health(id);
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createWorktreesClientCore,
|
|
3
|
+
type WorktreesClientCoreConfig,
|
|
4
|
+
} from "@/lucern/packages/client-core/src/worktrees";
|
|
5
|
+
|
|
6
|
+
export type WorktreesFacadeConfig = WorktreesClientCoreConfig;
|
|
7
|
+
|
|
8
|
+
export function createWorktreesFacade(config: WorktreesFacadeConfig = {}) {
|
|
9
|
+
const worktreesClient = createWorktreesClientCore(config);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
async create(
|
|
13
|
+
input: Parameters<typeof worktreesClient.create>[0],
|
|
14
|
+
idempotencyKey?: Parameters<typeof worktreesClient.create>[1]
|
|
15
|
+
) {
|
|
16
|
+
return worktreesClient.create(input, idempotencyKey);
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
async list(query: Parameters<typeof worktreesClient.list>[0]) {
|
|
20
|
+
return worktreesClient.list(query);
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
async activate(
|
|
24
|
+
input: Parameters<typeof worktreesClient.activate>[0],
|
|
25
|
+
idempotencyKey?: Parameters<typeof worktreesClient.activate>[1]
|
|
26
|
+
) {
|
|
27
|
+
return worktreesClient.activate(input, idempotencyKey);
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
async update(
|
|
31
|
+
input: Parameters<typeof worktreesClient.update>[0],
|
|
32
|
+
idempotencyKey?: Parameters<typeof worktreesClient.update>[1]
|
|
33
|
+
) {
|
|
34
|
+
return worktreesClient.update(input, idempotencyKey);
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
async merge(
|
|
38
|
+
input: Parameters<typeof worktreesClient.merge>[0],
|
|
39
|
+
idempotencyKey?: Parameters<typeof worktreesClient.merge>[1]
|
|
40
|
+
) {
|
|
41
|
+
return worktreesClient.merge(input, idempotencyKey);
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
async updateTargets(
|
|
45
|
+
input: Parameters<typeof worktreesClient.updateTargets>[0],
|
|
46
|
+
idempotencyKey?: Parameters<typeof worktreesClient.updateTargets>[1]
|
|
47
|
+
) {
|
|
48
|
+
return worktreesClient.updateTargets(input, idempotencyKey);
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|