@lucern/sdk 1.0.29 → 1.0.31
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 +12 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
package/dist/contextClient.js
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { createGatewayRequestClient, } from "./coreClient.js";
|
|
2
|
+
function deferGatewayRequest(buildRequest) {
|
|
3
|
+
return Promise.resolve().then(buildRequest);
|
|
4
|
+
}
|
|
2
5
|
function cleanString(value) {
|
|
3
6
|
return typeof value === "string" && value.trim().length > 0
|
|
4
7
|
? value.trim()
|
|
5
8
|
: undefined;
|
|
6
9
|
}
|
|
7
10
|
function cleanNumber(value) {
|
|
8
|
-
return typeof value === "number" && Number.isFinite(value)
|
|
11
|
+
return typeof value === "number" && Number.isFinite(value)
|
|
12
|
+
? value
|
|
13
|
+
: undefined;
|
|
9
14
|
}
|
|
10
15
|
function cleanBoolean(value) {
|
|
11
16
|
return typeof value === "boolean" ? value : undefined;
|
|
12
17
|
}
|
|
13
18
|
function cleanStringArray(value) {
|
|
14
19
|
if (!Array.isArray(value)) {
|
|
15
|
-
return
|
|
20
|
+
return;
|
|
16
21
|
}
|
|
17
22
|
const cleaned = value
|
|
18
23
|
.map((item) => cleanString(item))
|
|
@@ -31,96 +36,120 @@ function assignNumber(payload, key, value) {
|
|
|
31
36
|
payload[key] = cleaned;
|
|
32
37
|
}
|
|
33
38
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
function effectiveCompileInput(topicIdOrInput, input) {
|
|
40
|
+
return typeof topicIdOrInput === "string" ? input : topicIdOrInput;
|
|
41
|
+
}
|
|
42
|
+
function assignCompileTopicAndQuery(payload, topicIdOrInput, input) {
|
|
37
43
|
const topicId = typeof topicIdOrInput === "string"
|
|
38
44
|
? cleanString(topicIdOrInput)
|
|
39
|
-
: cleanString(
|
|
45
|
+
: cleanString(input.topicId);
|
|
40
46
|
if (topicId) {
|
|
41
47
|
payload.topicId = topicId;
|
|
42
48
|
}
|
|
43
|
-
const query = cleanString(
|
|
49
|
+
const query = cleanString(input.query);
|
|
44
50
|
if (query) {
|
|
45
51
|
payload.query = query;
|
|
46
52
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
assignString(payload, "
|
|
50
|
-
|
|
53
|
+
}
|
|
54
|
+
function assignCompileStringMetadata(payload, input) {
|
|
55
|
+
assignString(payload, "purpose", input.purpose);
|
|
56
|
+
assignString(payload, "purposePrompt", input.purposePrompt);
|
|
57
|
+
assignString(payload, "topicHint", input.topicHint);
|
|
58
|
+
assignString(payload, "sourceRef", input.sourceRef);
|
|
59
|
+
assignString(payload, "sourceKind", input.sourceKind);
|
|
60
|
+
assignString(payload, "lane", input.lane);
|
|
61
|
+
assignString(payload, "status", input.status);
|
|
62
|
+
assignString(payload, "principalId", input.principalId);
|
|
63
|
+
assignString(payload, "workspaceId", input.workspaceId);
|
|
64
|
+
}
|
|
65
|
+
function assignCompileArrayMetadata(payload, input) {
|
|
66
|
+
const tags = cleanStringArray(input.tags);
|
|
51
67
|
if (tags) {
|
|
52
68
|
payload.tags = tags;
|
|
53
69
|
}
|
|
54
|
-
const touchedPaths = cleanStringArray(
|
|
70
|
+
const touchedPaths = cleanStringArray(input.touchedPaths);
|
|
55
71
|
if (touchedPaths) {
|
|
56
72
|
payload.touchedPaths = touchedPaths;
|
|
57
73
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
assignNumber(payload, "campaign",
|
|
61
|
-
|
|
62
|
-
assignString(payload, "status", effectiveInput.status);
|
|
63
|
-
assignString(payload, "principalId", effectiveInput.principalId);
|
|
64
|
-
assignString(payload, "workspaceId", effectiveInput.workspaceId);
|
|
65
|
-
const budget = cleanNumber(effectiveInput.budget);
|
|
74
|
+
}
|
|
75
|
+
function assignCompileBudgets(payload, input) {
|
|
76
|
+
assignNumber(payload, "campaign", input.campaign);
|
|
77
|
+
const budget = cleanNumber(input.budget);
|
|
66
78
|
if (budget !== undefined) {
|
|
67
79
|
payload.budget = budget;
|
|
68
80
|
}
|
|
69
|
-
const tokenBudget = cleanNumber(
|
|
81
|
+
const tokenBudget = cleanNumber(input.tokenBudget);
|
|
70
82
|
if (tokenBudget !== undefined) {
|
|
71
83
|
payload.tokenBudget = tokenBudget;
|
|
72
84
|
if (budget === undefined) {
|
|
73
85
|
payload.budget = tokenBudget;
|
|
74
86
|
}
|
|
75
87
|
}
|
|
76
|
-
|
|
88
|
+
assignNumber(payload, "contentTopicLimit", input.contentTopicLimit);
|
|
89
|
+
}
|
|
90
|
+
function assignCompileTraversal(payload, input) {
|
|
91
|
+
const ranking = cleanString(input.ranking) ?? cleanString(input.rankingProfile);
|
|
77
92
|
if (ranking) {
|
|
78
93
|
payload.ranking = ranking;
|
|
79
94
|
}
|
|
80
|
-
const limit = cleanNumber(
|
|
95
|
+
const limit = cleanNumber(input.limit);
|
|
81
96
|
if (limit !== undefined) {
|
|
82
97
|
payload.limit = limit;
|
|
83
98
|
}
|
|
84
|
-
|
|
85
|
-
const maxDepth = cleanNumber(effectiveInput.maxDepth);
|
|
99
|
+
const maxDepth = cleanNumber(input.maxDepth);
|
|
86
100
|
if (maxDepth !== undefined) {
|
|
87
101
|
payload.maxDepth = maxDepth;
|
|
88
102
|
}
|
|
89
|
-
const includeEntities = cleanBoolean(
|
|
103
|
+
const includeEntities = cleanBoolean(input.includeEntities);
|
|
90
104
|
if (includeEntities !== undefined) {
|
|
91
105
|
payload.includeEntities = includeEntities;
|
|
92
106
|
}
|
|
93
|
-
const mode = cleanString(
|
|
107
|
+
const mode = cleanString(input.mode);
|
|
94
108
|
if (mode) {
|
|
95
109
|
payload.mode = mode;
|
|
96
110
|
}
|
|
97
|
-
assignString(payload, "traversalMode",
|
|
98
|
-
assignString(payload, "requestedDepth",
|
|
99
|
-
|
|
111
|
+
assignString(payload, "traversalMode", input.traversalMode);
|
|
112
|
+
assignString(payload, "requestedDepth", input.requestedDepth);
|
|
113
|
+
}
|
|
114
|
+
function assignCompileHeartbeat(payload, input) {
|
|
115
|
+
const heartbeat = cleanBoolean(input.heartbeat);
|
|
100
116
|
if (heartbeat !== undefined) {
|
|
101
117
|
payload.heartbeat = heartbeat;
|
|
102
118
|
}
|
|
103
|
-
assignString(payload, "heartbeatIntent",
|
|
104
|
-
assignNumber(payload, "heartbeatBudgetMs",
|
|
105
|
-
assignString(payload, "heartbeatTraceId",
|
|
106
|
-
assignString(payload, "invocationIntent",
|
|
107
|
-
assignString(payload, "receiptIntent",
|
|
108
|
-
|
|
119
|
+
assignString(payload, "heartbeatIntent", input.heartbeatIntent);
|
|
120
|
+
assignNumber(payload, "heartbeatBudgetMs", input.heartbeatBudgetMs);
|
|
121
|
+
assignString(payload, "heartbeatTraceId", input.heartbeatTraceId);
|
|
122
|
+
assignString(payload, "invocationIntent", input.invocationIntent);
|
|
123
|
+
assignString(payload, "receiptIntent", input.receiptIntent);
|
|
124
|
+
}
|
|
125
|
+
function assignCompileOptionalControls(payload, input) {
|
|
126
|
+
const includeFailures = cleanBoolean(input.includeFailures);
|
|
109
127
|
if (includeFailures !== undefined) {
|
|
110
128
|
payload.includeFailures = includeFailures;
|
|
111
129
|
}
|
|
112
|
-
const worktreeId = cleanString(
|
|
130
|
+
const worktreeId = cleanString(input.worktreeId);
|
|
113
131
|
if (worktreeId) {
|
|
114
132
|
payload.worktreeId = worktreeId;
|
|
115
133
|
}
|
|
116
|
-
const sessionId = cleanString(
|
|
134
|
+
const sessionId = cleanString(input.sessionId);
|
|
117
135
|
if (sessionId) {
|
|
118
136
|
payload.sessionId = sessionId;
|
|
119
137
|
}
|
|
120
|
-
if (Array.isArray(
|
|
121
|
-
|
|
122
|
-
payload.packWeightOverrides =
|
|
138
|
+
if (Array.isArray(input.packWeightOverrides) &&
|
|
139
|
+
input.packWeightOverrides.length > 0) {
|
|
140
|
+
payload.packWeightOverrides = input.packWeightOverrides;
|
|
123
141
|
}
|
|
142
|
+
}
|
|
143
|
+
function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
144
|
+
const effectiveInput = effectiveCompileInput(topicIdOrInput, input);
|
|
145
|
+
const payload = {};
|
|
146
|
+
assignCompileTopicAndQuery(payload, topicIdOrInput, effectiveInput);
|
|
147
|
+
assignCompileStringMetadata(payload, effectiveInput);
|
|
148
|
+
assignCompileArrayMetadata(payload, effectiveInput);
|
|
149
|
+
assignCompileBudgets(payload, effectiveInput);
|
|
150
|
+
assignCompileTraversal(payload, effectiveInput);
|
|
151
|
+
assignCompileHeartbeat(payload, effectiveInput);
|
|
152
|
+
assignCompileOptionalControls(payload, effectiveInput);
|
|
124
153
|
return {
|
|
125
154
|
path: "/api/platform/v1/context/compile",
|
|
126
155
|
method: "POST",
|
|
@@ -160,26 +189,26 @@ export function createContextClient(config = {}) {
|
|
|
160
189
|
* @param input - Optional compile parameters (query, budget, ranking, etc.).
|
|
161
190
|
* @returns The compiled context payload with beliefs, questions, and evidence.
|
|
162
191
|
*/
|
|
163
|
-
|
|
192
|
+
compile(topicIdOrInput = {}, input = {}) {
|
|
164
193
|
const request = buildCompileContextRequest(topicIdOrInput, input);
|
|
165
|
-
return gateway.request({
|
|
194
|
+
return deferGatewayRequest(() => gateway.request({
|
|
166
195
|
...request,
|
|
167
196
|
body: request.body,
|
|
168
|
-
});
|
|
197
|
+
}));
|
|
169
198
|
},
|
|
170
|
-
|
|
199
|
+
compileByQuery(input = {}) {
|
|
171
200
|
const request = buildCompileContextRequest(input);
|
|
172
|
-
return gateway.request({
|
|
201
|
+
return deferGatewayRequest(() => gateway.request({
|
|
173
202
|
...request,
|
|
174
203
|
body: request.body,
|
|
175
|
-
});
|
|
204
|
+
}));
|
|
176
205
|
},
|
|
177
|
-
|
|
206
|
+
getCampaignContext(input) {
|
|
178
207
|
const request = buildGetCampaignContextRequest(input);
|
|
179
|
-
return gateway.request({
|
|
208
|
+
return deferGatewayRequest(() => gateway.request({
|
|
180
209
|
...request,
|
|
181
210
|
body: request.body,
|
|
182
|
-
});
|
|
211
|
+
}));
|
|
183
212
|
},
|
|
184
213
|
};
|
|
185
214
|
}
|
package/dist/contextFacade.d.ts
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Added: EK-16 T7.3.4 (2026-04-18).
|
|
9
9
|
*/
|
|
10
|
-
export {
|
|
10
|
+
export { type ContextFacadeConfig, type ContextFacadeTransport, createContextFacade, } from "./facade/context";
|
|
11
11
|
//# sourceMappingURL=contextFacade.d.ts.map
|
package/dist/contextFacade.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
/**
|
|
2
4
|
* Context facade factory exposed for testing / audit tooling.
|
|
3
5
|
*
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import { type ContextCompilationMode, type ContextPackV1, type PackWeightOverride, type ContextRankingProfile } from "./contracts/context-pack.contract";
|
|
2
1
|
import { resolveEffectiveWeights } from "./contextPackPolicy";
|
|
3
|
-
|
|
2
|
+
import { type ContextCompilationMode, type ContextPackV1, type ContextRankingProfile, type PackWeightOverride } from "./contracts/context-pack.contract";
|
|
3
|
+
export interface ContextPackTopicRow {
|
|
4
4
|
_id: string;
|
|
5
|
+
createdAt?: number;
|
|
6
|
+
depth?: number;
|
|
7
|
+
generatedAt?: number;
|
|
5
8
|
name?: string;
|
|
6
9
|
parentTopicId?: string;
|
|
7
|
-
depth?: number;
|
|
8
10
|
status?: string;
|
|
9
11
|
updatedAt?: number;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
type ContextPackBeliefRow = {
|
|
12
|
+
}
|
|
13
|
+
interface ContextPackBeliefRow {
|
|
14
14
|
_id: string;
|
|
15
|
+
beliefType?: string;
|
|
15
16
|
canonicalText?: string;
|
|
16
17
|
confidence?: number;
|
|
17
|
-
|
|
18
|
-
status?: string;
|
|
18
|
+
createdAt?: number;
|
|
19
19
|
metadata?: Record<string, unknown>;
|
|
20
|
+
status?: string;
|
|
20
21
|
updatedAt?: number;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type ContextPackQuestionRow = {
|
|
22
|
+
}
|
|
23
|
+
interface ContextPackQuestionRow {
|
|
24
24
|
_id: string;
|
|
25
25
|
canonicalText?: string;
|
|
26
|
-
|
|
26
|
+
createdAt?: number;
|
|
27
27
|
metadata?: Record<string, unknown>;
|
|
28
|
+
status?: string;
|
|
28
29
|
updatedAt?: number;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
type ContextPackEvidenceRow = {
|
|
30
|
+
}
|
|
31
|
+
interface ContextPackEvidenceRow {
|
|
32
32
|
_id: string;
|
|
33
33
|
canonicalText?: string;
|
|
34
|
-
|
|
34
|
+
createdAt?: number;
|
|
35
35
|
metadata?: Record<string, unknown>;
|
|
36
|
+
sourceUrl?: string;
|
|
36
37
|
updatedAt?: number;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type ContextPackContradictionRow = {
|
|
38
|
+
}
|
|
39
|
+
interface ContextPackContradictionRow {
|
|
40
40
|
_id?: string;
|
|
41
|
-
globalId?: string;
|
|
42
|
-
weight?: number;
|
|
43
41
|
context?: string;
|
|
42
|
+
createdAt?: number;
|
|
44
43
|
description?: string;
|
|
44
|
+
globalId?: string;
|
|
45
45
|
summary?: string;
|
|
46
46
|
updatedAt?: number;
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
47
|
+
weight?: number;
|
|
48
|
+
}
|
|
49
|
+
interface ContextPackEntityRow {
|
|
50
50
|
_id: string;
|
|
51
|
-
nodeType?: string;
|
|
52
|
-
title?: string;
|
|
53
51
|
canonicalText?: string;
|
|
54
52
|
connectedBeliefCount?: number;
|
|
55
53
|
connectedEvidenceCount?: number;
|
|
56
54
|
metadata?: Record<string, unknown>;
|
|
55
|
+
nodeType?: string;
|
|
56
|
+
title?: string;
|
|
57
57
|
updatedAt?: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
58
|
+
}
|
|
59
|
+
interface ContextPackFailureRow {
|
|
60
60
|
_id: string;
|
|
61
61
|
canonicalText?: string;
|
|
62
|
+
createdAt?: number;
|
|
62
63
|
metadata?: Record<string, unknown>;
|
|
63
64
|
updatedAt?: number;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
topicId: string;
|
|
68
|
-
queryText?: string;
|
|
69
|
-
tokens: string[];
|
|
70
|
-
limit: number;
|
|
71
|
-
rankingProfile: ContextRankingProfile;
|
|
72
|
-
tokenBudget: number;
|
|
65
|
+
}
|
|
66
|
+
export interface CompileContextPackPlan {
|
|
67
|
+
compilationMode: ContextCompilationMode;
|
|
73
68
|
descendantDepth: number;
|
|
69
|
+
effectiveWeights: ReturnType<typeof resolveEffectiveWeights>;
|
|
74
70
|
includeEntities: boolean;
|
|
75
|
-
compilationMode: ContextCompilationMode;
|
|
76
71
|
includeFailures: boolean;
|
|
77
|
-
|
|
78
|
-
sessionId?: string;
|
|
72
|
+
limit: number;
|
|
79
73
|
packWeightOverrides?: PackWeightOverride[];
|
|
80
|
-
|
|
74
|
+
queryText?: string;
|
|
75
|
+
rankingProfile: ContextRankingProfile;
|
|
81
76
|
scopedTopicIds: string[];
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
sessionId?: string;
|
|
78
|
+
tokenBudget: number;
|
|
79
|
+
tokens: string[];
|
|
80
|
+
topicId: string;
|
|
81
|
+
worktreeId?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface CompileContextPackPlanInput {
|
|
86
84
|
allTopics: ContextPackTopicRow[];
|
|
87
|
-
|
|
88
|
-
export type CompileContextPackSnapshot = {
|
|
85
|
+
args: Record<string, unknown> | undefined;
|
|
89
86
|
topic: ContextPackTopicRow;
|
|
90
|
-
|
|
87
|
+
}
|
|
88
|
+
export interface CompileContextPackSnapshot {
|
|
91
89
|
beliefs: ContextPackBeliefRow[];
|
|
92
|
-
questions: ContextPackQuestionRow[];
|
|
93
|
-
evidence: ContextPackEvidenceRow[];
|
|
94
90
|
contradictions: ContextPackContradictionRow[];
|
|
95
91
|
entities: ContextPackEntityRow[];
|
|
92
|
+
evidence: ContextPackEvidenceRow[];
|
|
96
93
|
failures?: ContextPackFailureRow[];
|
|
97
|
-
|
|
94
|
+
plan: CompileContextPackPlan;
|
|
95
|
+
questions: ContextPackQuestionRow[];
|
|
96
|
+
topic: ContextPackTopicRow;
|
|
97
|
+
}
|
|
98
98
|
export declare function planContextPackCompilation(input: CompileContextPackPlanInput): CompileContextPackPlan;
|
|
99
99
|
export declare function compileContextPackFromSnapshot(snapshot: CompileContextPackSnapshot): ContextPackV1;
|
|
100
100
|
export {};
|