@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/evidence/index.js
CHANGED
|
@@ -3912,50 +3912,55 @@ function cleanNumber(value) {
|
|
|
3912
3912
|
function cleanBoolean(value) {
|
|
3913
3913
|
return typeof value === "boolean" ? value : void 0;
|
|
3914
3914
|
}
|
|
3915
|
-
function buildCompileContextRequest(
|
|
3916
|
-
const
|
|
3917
|
-
const
|
|
3915
|
+
function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
3916
|
+
const effectiveInput = typeof topicIdOrInput === "string" ? input : topicIdOrInput;
|
|
3917
|
+
const payload = {};
|
|
3918
|
+
const topicId = typeof topicIdOrInput === "string" ? cleanString4(topicIdOrInput) : cleanString4(effectiveInput.topicId);
|
|
3919
|
+
if (topicId) {
|
|
3920
|
+
payload.topicId = topicId;
|
|
3921
|
+
}
|
|
3922
|
+
const query5 = cleanString4(effectiveInput.query);
|
|
3918
3923
|
if (query5) {
|
|
3919
3924
|
payload.query = query5;
|
|
3920
3925
|
}
|
|
3921
|
-
const budget = cleanNumber(
|
|
3926
|
+
const budget = cleanNumber(effectiveInput.budget) ?? cleanNumber(effectiveInput.tokenBudget);
|
|
3922
3927
|
if (budget !== void 0) {
|
|
3923
3928
|
payload.budget = budget;
|
|
3924
3929
|
}
|
|
3925
|
-
const ranking = cleanString4(
|
|
3930
|
+
const ranking = cleanString4(effectiveInput.ranking) ?? cleanString4(effectiveInput.rankingProfile);
|
|
3926
3931
|
if (ranking) {
|
|
3927
3932
|
payload.ranking = ranking;
|
|
3928
3933
|
}
|
|
3929
|
-
const limit = cleanNumber(
|
|
3934
|
+
const limit = cleanNumber(effectiveInput.limit);
|
|
3930
3935
|
if (limit !== void 0) {
|
|
3931
3936
|
payload.limit = limit;
|
|
3932
3937
|
}
|
|
3933
|
-
const maxDepth = cleanNumber(
|
|
3938
|
+
const maxDepth = cleanNumber(effectiveInput.maxDepth);
|
|
3934
3939
|
if (maxDepth !== void 0) {
|
|
3935
3940
|
payload.maxDepth = maxDepth;
|
|
3936
3941
|
}
|
|
3937
|
-
const includeEntities = cleanBoolean(
|
|
3942
|
+
const includeEntities = cleanBoolean(effectiveInput.includeEntities);
|
|
3938
3943
|
if (includeEntities !== void 0) {
|
|
3939
3944
|
payload.includeEntities = includeEntities;
|
|
3940
3945
|
}
|
|
3941
|
-
const mode = cleanString4(
|
|
3946
|
+
const mode = cleanString4(effectiveInput.mode);
|
|
3942
3947
|
if (mode) {
|
|
3943
3948
|
payload.mode = mode;
|
|
3944
3949
|
}
|
|
3945
|
-
const includeFailures = cleanBoolean(
|
|
3950
|
+
const includeFailures = cleanBoolean(effectiveInput.includeFailures);
|
|
3946
3951
|
if (includeFailures !== void 0) {
|
|
3947
3952
|
payload.includeFailures = includeFailures;
|
|
3948
3953
|
}
|
|
3949
|
-
const worktreeId = cleanString4(
|
|
3954
|
+
const worktreeId = cleanString4(effectiveInput.worktreeId);
|
|
3950
3955
|
if (worktreeId) {
|
|
3951
3956
|
payload.worktreeId = worktreeId;
|
|
3952
3957
|
}
|
|
3953
|
-
const sessionId = cleanString4(
|
|
3958
|
+
const sessionId = cleanString4(effectiveInput.sessionId);
|
|
3954
3959
|
if (sessionId) {
|
|
3955
3960
|
payload.sessionId = sessionId;
|
|
3956
3961
|
}
|
|
3957
|
-
if (Array.isArray(
|
|
3958
|
-
payload.packWeightOverrides =
|
|
3962
|
+
if (Array.isArray(effectiveInput.packWeightOverrides) && effectiveInput.packWeightOverrides.length > 0) {
|
|
3963
|
+
payload.packWeightOverrides = effectiveInput.packWeightOverrides;
|
|
3959
3964
|
}
|
|
3960
3965
|
return {
|
|
3961
3966
|
path: "/api/platform/v1/context/compile",
|
|
@@ -3967,13 +3972,20 @@ function createContextClient(config = {}) {
|
|
|
3967
3972
|
const gateway = createGatewayRequestClient(config);
|
|
3968
3973
|
return {
|
|
3969
3974
|
/**
|
|
3970
|
-
* Compile a focused reasoning context pack
|
|
3971
|
-
* @param
|
|
3975
|
+
* Compile a focused reasoning context pack.
|
|
3976
|
+
* @param topicIdOrInput - Optional topic ID, or compile input for query-first resolution.
|
|
3972
3977
|
* @param input - Optional compile parameters (query, budget, ranking, etc.).
|
|
3973
3978
|
* @returns The compiled context payload with beliefs, questions, and evidence.
|
|
3974
3979
|
*/
|
|
3975
|
-
async compile(
|
|
3976
|
-
const request = buildCompileContextRequest(
|
|
3980
|
+
async compile(topicIdOrInput = {}, input = {}) {
|
|
3981
|
+
const request = buildCompileContextRequest(topicIdOrInput, input);
|
|
3982
|
+
return gateway.request({
|
|
3983
|
+
...request,
|
|
3984
|
+
body: request.body
|
|
3985
|
+
});
|
|
3986
|
+
},
|
|
3987
|
+
async compileByQuery(input = {}) {
|
|
3988
|
+
const request = buildCompileContextRequest(input);
|
|
3977
3989
|
return gateway.request({
|
|
3978
3990
|
...request,
|
|
3979
3991
|
body: request.body
|
|
@@ -6625,7 +6637,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
6625
6637
|
}
|
|
6626
6638
|
|
|
6627
6639
|
// src/version.ts
|
|
6628
|
-
var LUCERN_SDK_VERSION = "0.3.0-alpha.
|
|
6640
|
+
var LUCERN_SDK_VERSION = "0.3.0-alpha.8";
|
|
6629
6641
|
|
|
6630
6642
|
// src/workflowClient.ts
|
|
6631
6643
|
function normalizeLensQuery(value) {
|