@lucern/sdk 0.3.0-alpha.7 → 0.3.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/README.md +4 -4
- package/dist/beliefs/index.js +31 -19
- package/dist/beliefs/index.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +31 -19
- package/dist/client.js.map +1 -1
- package/dist/contextClient.d.ts +4 -3
- package/dist/contextClient.js +30 -18
- package/dist/contextClient.js.map +1 -1
- package/dist/contextFacade.js +25 -16
- package/dist/contextFacade.js.map +1 -1
- package/dist/contextTypes.d.ts +2 -0
- package/dist/contradictions/index.js +31 -19
- package/dist/contradictions/index.js.map +1 -1
- package/dist/decisions/index.js +31 -19
- package/dist/decisions/index.js.map +1 -1
- package/dist/edges/index.js +31 -19
- package/dist/edges/index.js.map +1 -1
- package/dist/evidence/index.js +31 -19
- package/dist/evidence/index.js.map +1 -1
- package/dist/facade/context.d.ts +2 -1
- package/dist/facade/context.js +25 -16
- package/dist/facade/context.js.map +1 -1
- package/dist/index.js +56 -35
- package/dist/index.js.map +1 -1
- package/dist/lenses/index.js +31 -19
- package/dist/lenses/index.js.map +1 -1
- package/dist/nodes/index.js +31 -19
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.js +31 -19
- package/dist/ontologies/index.js.map +1 -1
- package/dist/questions/index.js +31 -19
- package/dist/questions/index.js.map +1 -1
- package/dist/topics/index.js +31 -19
- package/dist/topics/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/worktrees/index.js +31 -19
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +4 -4
package/dist/client.d.ts
CHANGED
|
@@ -1124,7 +1124,7 @@ declare function createLucernClient(config?: LucernClientConfig): {
|
|
|
1124
1124
|
};
|
|
1125
1125
|
context: {
|
|
1126
1126
|
listTopics(query?: Parameters<(query?: TopicListInput) => Promise<PlatformGatewaySuccess<TopicListResponse>>>[0]): Promise<PlatformGatewaySuccess<TopicListResponse>>;
|
|
1127
|
-
compile: (
|
|
1127
|
+
compile: (topicIdOrInput?: string | CompileContextInput, input?: CompileContextInput) => Promise<PlatformGatewaySuccess<PublicCompiledContext>>;
|
|
1128
1128
|
recordScopeLearning: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
|
|
1129
1129
|
discover(input: FunctionSurfaceInput): Promise<GatewayDataEnvelope<Record<string, unknown>>>;
|
|
1130
1130
|
analyzeTopicDensity: (input?: FunctionSurfaceInput, idempotencyKey?: string) => FunctionSurfaceResult<unknown>;
|
package/dist/client.js
CHANGED
|
@@ -3908,50 +3908,55 @@ function cleanNumber(value) {
|
|
|
3908
3908
|
function cleanBoolean(value) {
|
|
3909
3909
|
return typeof value === "boolean" ? value : void 0;
|
|
3910
3910
|
}
|
|
3911
|
-
function buildCompileContextRequest(
|
|
3912
|
-
const
|
|
3913
|
-
const
|
|
3911
|
+
function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
3912
|
+
const effectiveInput = typeof topicIdOrInput === "string" ? input : topicIdOrInput;
|
|
3913
|
+
const payload = {};
|
|
3914
|
+
const topicId = typeof topicIdOrInput === "string" ? cleanString4(topicIdOrInput) : cleanString4(effectiveInput.topicId);
|
|
3915
|
+
if (topicId) {
|
|
3916
|
+
payload.topicId = topicId;
|
|
3917
|
+
}
|
|
3918
|
+
const query5 = cleanString4(effectiveInput.query);
|
|
3914
3919
|
if (query5) {
|
|
3915
3920
|
payload.query = query5;
|
|
3916
3921
|
}
|
|
3917
|
-
const budget = cleanNumber(
|
|
3922
|
+
const budget = cleanNumber(effectiveInput.budget) ?? cleanNumber(effectiveInput.tokenBudget);
|
|
3918
3923
|
if (budget !== void 0) {
|
|
3919
3924
|
payload.budget = budget;
|
|
3920
3925
|
}
|
|
3921
|
-
const ranking = cleanString4(
|
|
3926
|
+
const ranking = cleanString4(effectiveInput.ranking) ?? cleanString4(effectiveInput.rankingProfile);
|
|
3922
3927
|
if (ranking) {
|
|
3923
3928
|
payload.ranking = ranking;
|
|
3924
3929
|
}
|
|
3925
|
-
const limit = cleanNumber(
|
|
3930
|
+
const limit = cleanNumber(effectiveInput.limit);
|
|
3926
3931
|
if (limit !== void 0) {
|
|
3927
3932
|
payload.limit = limit;
|
|
3928
3933
|
}
|
|
3929
|
-
const maxDepth = cleanNumber(
|
|
3934
|
+
const maxDepth = cleanNumber(effectiveInput.maxDepth);
|
|
3930
3935
|
if (maxDepth !== void 0) {
|
|
3931
3936
|
payload.maxDepth = maxDepth;
|
|
3932
3937
|
}
|
|
3933
|
-
const includeEntities = cleanBoolean(
|
|
3938
|
+
const includeEntities = cleanBoolean(effectiveInput.includeEntities);
|
|
3934
3939
|
if (includeEntities !== void 0) {
|
|
3935
3940
|
payload.includeEntities = includeEntities;
|
|
3936
3941
|
}
|
|
3937
|
-
const mode = cleanString4(
|
|
3942
|
+
const mode = cleanString4(effectiveInput.mode);
|
|
3938
3943
|
if (mode) {
|
|
3939
3944
|
payload.mode = mode;
|
|
3940
3945
|
}
|
|
3941
|
-
const includeFailures = cleanBoolean(
|
|
3946
|
+
const includeFailures = cleanBoolean(effectiveInput.includeFailures);
|
|
3942
3947
|
if (includeFailures !== void 0) {
|
|
3943
3948
|
payload.includeFailures = includeFailures;
|
|
3944
3949
|
}
|
|
3945
|
-
const worktreeId = cleanString4(
|
|
3950
|
+
const worktreeId = cleanString4(effectiveInput.worktreeId);
|
|
3946
3951
|
if (worktreeId) {
|
|
3947
3952
|
payload.worktreeId = worktreeId;
|
|
3948
3953
|
}
|
|
3949
|
-
const sessionId = cleanString4(
|
|
3954
|
+
const sessionId = cleanString4(effectiveInput.sessionId);
|
|
3950
3955
|
if (sessionId) {
|
|
3951
3956
|
payload.sessionId = sessionId;
|
|
3952
3957
|
}
|
|
3953
|
-
if (Array.isArray(
|
|
3954
|
-
payload.packWeightOverrides =
|
|
3958
|
+
if (Array.isArray(effectiveInput.packWeightOverrides) && effectiveInput.packWeightOverrides.length > 0) {
|
|
3959
|
+
payload.packWeightOverrides = effectiveInput.packWeightOverrides;
|
|
3955
3960
|
}
|
|
3956
3961
|
return {
|
|
3957
3962
|
path: "/api/platform/v1/context/compile",
|
|
@@ -3963,13 +3968,20 @@ function createContextClient(config = {}) {
|
|
|
3963
3968
|
const gateway = createGatewayRequestClient(config);
|
|
3964
3969
|
return {
|
|
3965
3970
|
/**
|
|
3966
|
-
* Compile a focused reasoning context pack
|
|
3967
|
-
* @param
|
|
3971
|
+
* Compile a focused reasoning context pack.
|
|
3972
|
+
* @param topicIdOrInput - Optional topic ID, or compile input for query-first resolution.
|
|
3968
3973
|
* @param input - Optional compile parameters (query, budget, ranking, etc.).
|
|
3969
3974
|
* @returns The compiled context payload with beliefs, questions, and evidence.
|
|
3970
3975
|
*/
|
|
3971
|
-
async compile(
|
|
3972
|
-
const request = buildCompileContextRequest(
|
|
3976
|
+
async compile(topicIdOrInput = {}, input = {}) {
|
|
3977
|
+
const request = buildCompileContextRequest(topicIdOrInput, input);
|
|
3978
|
+
return gateway.request({
|
|
3979
|
+
...request,
|
|
3980
|
+
body: request.body
|
|
3981
|
+
});
|
|
3982
|
+
},
|
|
3983
|
+
async compileByQuery(input = {}) {
|
|
3984
|
+
const request = buildCompileContextRequest(input);
|
|
3973
3985
|
return gateway.request({
|
|
3974
3986
|
...request,
|
|
3975
3987
|
body: request.body
|
|
@@ -6621,7 +6633,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
6621
6633
|
}
|
|
6622
6634
|
|
|
6623
6635
|
// src/version.ts
|
|
6624
|
-
var LUCERN_SDK_VERSION = "0.3.0-alpha.
|
|
6636
|
+
var LUCERN_SDK_VERSION = "0.3.0-alpha.8";
|
|
6625
6637
|
|
|
6626
6638
|
// src/workflowClient.ts
|
|
6627
6639
|
function normalizeLensQuery(value) {
|