@lucern/sdk 1.0.21 → 1.0.23
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/contextClient.d.ts +4 -2
- package/dist/contextClient.js +85 -1
- package/dist/contextTypes.d.ts +134 -44
- package/dist/contracts/context-pack.contract.d.ts +14 -2
- package/dist/facade/context.d.ts +4 -3
- package/dist/facade/context.js +82 -1
- package/dist/generated/functionSurface.d.ts +6 -1
- package/dist/generated/functionSurface.js +25 -0
- package/dist/proof-attestation.json +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to `@lucern/sdk` will be documented in this file.
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
- No unreleased changes yet.
|
|
7
7
|
|
|
8
|
+
## [1.0.23] - 2026-06-12
|
|
9
|
+
- Activation release for the reasoning-tenant writeback surface. Carries the
|
|
10
|
+
RR.1-5 kernel write substrate and the FR lane's writeback ergonomics so
|
|
11
|
+
graph-writing agents stop fighting deployed-surface drift.
|
|
12
|
+
- FR.1: one-call `record_scope_learning` accepting signed `linkedBeliefs`
|
|
13
|
+
weights in `[-1, 1]`; FR.2: CLI coherence with the fixed record-merge path;
|
|
14
|
+
FR.4: `refine_belief`, archive surface, belief-id/`text`/`globalId` aliases,
|
|
15
|
+
and `flag_contradiction` explicit `topicId`.
|
|
16
|
+
- `worktreeType` is tightened to the canonical schema enum (#1303).
|
|
17
|
+
|
|
18
|
+
## [1.0.22] - 2026-06-08
|
|
19
|
+
- Release notes pending.
|
|
20
|
+
|
|
8
21
|
## [1.0.21] - 2026-06-06
|
|
9
22
|
- Release notes pending.
|
|
10
23
|
|
package/dist/contextClient.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type GatewayClientConfig } from "./coreClient";
|
|
2
|
-
import type { CompileContextInput, PublicCompiledContext } from "./contextTypes";
|
|
2
|
+
import type { CompileContextInput, GetCampaignContextInput, PublicCampaignContext, PublicCompiledContext } from "./contextTypes";
|
|
3
3
|
/** Configuration for the context client. */
|
|
4
4
|
export type ContextClientConfig = GatewayClientConfig;
|
|
5
5
|
/** Alias for the compiled context payload returned by the gateway. */
|
|
6
6
|
export type CompileContextResponse = PublicCompiledContext;
|
|
7
|
+
export type GetCampaignContextResponse = PublicCampaignContext;
|
|
7
8
|
/**
|
|
8
9
|
* Create the context client for compiling reasoning context packs.
|
|
9
10
|
* @param config - Gateway transport configuration.
|
|
@@ -18,6 +19,7 @@ export declare function createContextClient(config?: ContextClientConfig): {
|
|
|
18
19
|
*/
|
|
19
20
|
compile(topicIdOrInput?: string | CompileContextInput, input?: CompileContextInput): Promise<import("./coreClient").PlatformGatewaySuccess<PublicCompiledContext>>;
|
|
20
21
|
compileByQuery(input?: CompileContextInput): Promise<import("./coreClient").PlatformGatewaySuccess<PublicCompiledContext>>;
|
|
22
|
+
getCampaignContext(input: GetCampaignContextInput): Promise<import("./coreClient").PlatformGatewaySuccess<PublicCampaignContext>>;
|
|
21
23
|
};
|
|
22
|
-
export type { CompileContextInput, PublicCompiledContext } from "./contextTypes";
|
|
24
|
+
export type { CampaignContextPurpose, CompileContextInput, ContextHeartbeatIntent, GetCampaignContextInput, PublicContextHeartbeatReceipt, PublicCampaignContext, PublicCompiledContext, } from "./contextTypes";
|
|
23
25
|
//# sourceMappingURL=contextClient.d.ts.map
|
package/dist/contextClient.js
CHANGED
|
@@ -10,6 +10,27 @@ function cleanNumber(value) {
|
|
|
10
10
|
function cleanBoolean(value) {
|
|
11
11
|
return typeof value === "boolean" ? value : undefined;
|
|
12
12
|
}
|
|
13
|
+
function cleanStringArray(value) {
|
|
14
|
+
if (!Array.isArray(value)) {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
const cleaned = value
|
|
18
|
+
.map((item) => cleanString(item))
|
|
19
|
+
.filter((item) => Boolean(item));
|
|
20
|
+
return cleaned.length > 0 ? cleaned : undefined;
|
|
21
|
+
}
|
|
22
|
+
function assignString(payload, key, value) {
|
|
23
|
+
const cleaned = cleanString(value);
|
|
24
|
+
if (cleaned) {
|
|
25
|
+
payload[key] = cleaned;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function assignNumber(payload, key, value) {
|
|
29
|
+
const cleaned = cleanNumber(value);
|
|
30
|
+
if (cleaned !== undefined) {
|
|
31
|
+
payload[key] = cleaned;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
13
34
|
function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
14
35
|
const effectiveInput = typeof topicIdOrInput === "string" ? input : topicIdOrInput;
|
|
15
36
|
const payload = {};
|
|
@@ -23,10 +44,35 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
23
44
|
if (query) {
|
|
24
45
|
payload.query = query;
|
|
25
46
|
}
|
|
26
|
-
|
|
47
|
+
assignString(payload, "purpose", effectiveInput.purpose);
|
|
48
|
+
assignString(payload, "purposePrompt", effectiveInput.purposePrompt);
|
|
49
|
+
assignString(payload, "topicHint", effectiveInput.topicHint);
|
|
50
|
+
const tags = cleanStringArray(effectiveInput.tags);
|
|
51
|
+
if (tags) {
|
|
52
|
+
payload.tags = tags;
|
|
53
|
+
}
|
|
54
|
+
const touchedPaths = cleanStringArray(effectiveInput.touchedPaths);
|
|
55
|
+
if (touchedPaths) {
|
|
56
|
+
payload.touchedPaths = touchedPaths;
|
|
57
|
+
}
|
|
58
|
+
assignString(payload, "sourceRef", effectiveInput.sourceRef);
|
|
59
|
+
assignString(payload, "sourceKind", effectiveInput.sourceKind);
|
|
60
|
+
assignNumber(payload, "campaign", effectiveInput.campaign);
|
|
61
|
+
assignString(payload, "lane", effectiveInput.lane);
|
|
62
|
+
assignString(payload, "status", effectiveInput.status);
|
|
63
|
+
assignString(payload, "principalId", effectiveInput.principalId);
|
|
64
|
+
assignString(payload, "workspaceId", effectiveInput.workspaceId);
|
|
65
|
+
const budget = cleanNumber(effectiveInput.budget);
|
|
27
66
|
if (budget !== undefined) {
|
|
28
67
|
payload.budget = budget;
|
|
29
68
|
}
|
|
69
|
+
const tokenBudget = cleanNumber(effectiveInput.tokenBudget);
|
|
70
|
+
if (tokenBudget !== undefined) {
|
|
71
|
+
payload.tokenBudget = tokenBudget;
|
|
72
|
+
if (budget === undefined) {
|
|
73
|
+
payload.budget = tokenBudget;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
30
76
|
const ranking = cleanString(effectiveInput.ranking) ?? cleanString(effectiveInput.rankingProfile);
|
|
31
77
|
if (ranking) {
|
|
32
78
|
payload.ranking = ranking;
|
|
@@ -35,6 +81,7 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
35
81
|
if (limit !== undefined) {
|
|
36
82
|
payload.limit = limit;
|
|
37
83
|
}
|
|
84
|
+
assignNumber(payload, "contentTopicLimit", effectiveInput.contentTopicLimit);
|
|
38
85
|
const maxDepth = cleanNumber(effectiveInput.maxDepth);
|
|
39
86
|
if (maxDepth !== undefined) {
|
|
40
87
|
payload.maxDepth = maxDepth;
|
|
@@ -47,6 +94,17 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
47
94
|
if (mode) {
|
|
48
95
|
payload.mode = mode;
|
|
49
96
|
}
|
|
97
|
+
assignString(payload, "traversalMode", effectiveInput.traversalMode);
|
|
98
|
+
assignString(payload, "requestedDepth", effectiveInput.requestedDepth);
|
|
99
|
+
const heartbeat = cleanBoolean(effectiveInput.heartbeat);
|
|
100
|
+
if (heartbeat !== undefined) {
|
|
101
|
+
payload.heartbeat = heartbeat;
|
|
102
|
+
}
|
|
103
|
+
assignString(payload, "heartbeatIntent", effectiveInput.heartbeatIntent);
|
|
104
|
+
assignNumber(payload, "heartbeatBudgetMs", effectiveInput.heartbeatBudgetMs);
|
|
105
|
+
assignString(payload, "heartbeatTraceId", effectiveInput.heartbeatTraceId);
|
|
106
|
+
assignString(payload, "invocationIntent", effectiveInput.invocationIntent);
|
|
107
|
+
assignString(payload, "receiptIntent", effectiveInput.receiptIntent);
|
|
50
108
|
const includeFailures = cleanBoolean(effectiveInput.includeFailures);
|
|
51
109
|
if (includeFailures !== undefined) {
|
|
52
110
|
payload.includeFailures = includeFailures;
|
|
@@ -69,6 +127,25 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
69
127
|
body: payload,
|
|
70
128
|
};
|
|
71
129
|
}
|
|
130
|
+
function buildGetCampaignContextRequest(input) {
|
|
131
|
+
const payload = {};
|
|
132
|
+
assignNumber(payload, "campaign", input.campaign);
|
|
133
|
+
assignString(payload, "purpose", input.purpose);
|
|
134
|
+
assignString(payload, "purposePrompt", input.purposePrompt);
|
|
135
|
+
assignString(payload, "lane", input.lane);
|
|
136
|
+
assignString(payload, "status", input.status);
|
|
137
|
+
assignString(payload, "principalId", input.principalId);
|
|
138
|
+
assignString(payload, "workspaceId", input.workspaceId);
|
|
139
|
+
assignNumber(payload, "worktreeLimit", input.worktreeLimit);
|
|
140
|
+
assignNumber(payload, "sourceSpanLimit", input.sourceSpanLimit);
|
|
141
|
+
assignNumber(payload, "scanLimit", input.scanLimit);
|
|
142
|
+
assignNumber(payload, "tokenBudget", input.tokenBudget);
|
|
143
|
+
return {
|
|
144
|
+
path: "/api/platform/v1/context/campaign",
|
|
145
|
+
method: "POST",
|
|
146
|
+
body: payload,
|
|
147
|
+
};
|
|
148
|
+
}
|
|
72
149
|
/**
|
|
73
150
|
* Create the context client for compiling reasoning context packs.
|
|
74
151
|
* @param config - Gateway transport configuration.
|
|
@@ -97,6 +174,13 @@ export function createContextClient(config = {}) {
|
|
|
97
174
|
body: request.body,
|
|
98
175
|
});
|
|
99
176
|
},
|
|
177
|
+
async getCampaignContext(input) {
|
|
178
|
+
const request = buildGetCampaignContextRequest(input);
|
|
179
|
+
return gateway.request({
|
|
180
|
+
...request,
|
|
181
|
+
body: request.body,
|
|
182
|
+
});
|
|
183
|
+
},
|
|
100
184
|
};
|
|
101
185
|
}
|
|
102
186
|
//# sourceMappingURL=contextClient.js.map
|
package/dist/contextTypes.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import type { PublicCompiledContext as ContractPublicCompiledContext } from "./contracts/context-pack.contract";
|
|
1
2
|
export type ContextRankingProfile = "baseline_v1" | "hybrid_v1" | "weighted_v1";
|
|
2
3
|
export type ContextCompilationMode = "standard" | "delta";
|
|
4
|
+
export type ContextTraversalMode = "anchored_ranked" | "bounded_exploration" | "contradiction_scan" | "pattern_recall" | "forensic_replay";
|
|
5
|
+
export type ContextRequestedDepth = "low" | "medium" | "high" | "extra-high";
|
|
6
|
+
export type ContextHeartbeatIntent = "pre_write" | "pre_closeout" | "research_loop" | "status_check";
|
|
3
7
|
export type ContextPackSectionKey = "invariants" | "activeBeliefs" | "openQuestions" | "recentEvidence" | "contradictions";
|
|
4
8
|
export type RankingWeightVector = {
|
|
5
9
|
query: number;
|
|
@@ -17,6 +21,18 @@ export type CompileContextInput = {
|
|
|
17
21
|
/** Optional explicit topic. Omit to resolve by query. */
|
|
18
22
|
topicId?: string;
|
|
19
23
|
query?: string;
|
|
24
|
+
purpose?: CampaignContextPurpose;
|
|
25
|
+
purposePrompt?: string;
|
|
26
|
+
topicHint?: string;
|
|
27
|
+
tags?: string[];
|
|
28
|
+
touchedPaths?: string[];
|
|
29
|
+
sourceRef?: string;
|
|
30
|
+
sourceKind?: string;
|
|
31
|
+
campaign?: number;
|
|
32
|
+
lane?: string;
|
|
33
|
+
status?: string;
|
|
34
|
+
principalId?: string;
|
|
35
|
+
workspaceId?: string;
|
|
20
36
|
budget?: number;
|
|
21
37
|
ranking?: ContextRankingProfile;
|
|
22
38
|
limit?: number;
|
|
@@ -26,6 +42,12 @@ export type CompileContextInput = {
|
|
|
26
42
|
includeFailures?: boolean;
|
|
27
43
|
worktreeId?: string;
|
|
28
44
|
sessionId?: string;
|
|
45
|
+
heartbeat?: boolean;
|
|
46
|
+
heartbeatIntent?: ContextHeartbeatIntent;
|
|
47
|
+
heartbeatBudgetMs?: number;
|
|
48
|
+
heartbeatTraceId?: string;
|
|
49
|
+
invocationIntent?: string;
|
|
50
|
+
receiptIntent?: string;
|
|
29
51
|
packWeightOverrides?: PackWeightOverride[];
|
|
30
52
|
tokenBudget?: number;
|
|
31
53
|
rankingProfile?: ContextRankingProfile;
|
|
@@ -36,6 +58,22 @@ export type CompileContextInput = {
|
|
|
36
58
|
* enrichment in the returned pack.
|
|
37
59
|
*/
|
|
38
60
|
contentTopicLimit?: number;
|
|
61
|
+
traversalMode?: ContextTraversalMode;
|
|
62
|
+
requestedDepth?: ContextRequestedDepth;
|
|
63
|
+
};
|
|
64
|
+
export type CampaignContextPurpose = "campaign_status" | "avatar_tree_foundation" | "clean_prod_reset" | "graph_v2_readiness" | "custom";
|
|
65
|
+
export type GetCampaignContextInput = {
|
|
66
|
+
campaign: number;
|
|
67
|
+
purpose?: CampaignContextPurpose;
|
|
68
|
+
purposePrompt?: string;
|
|
69
|
+
lane?: string;
|
|
70
|
+
status?: string;
|
|
71
|
+
principalId?: string;
|
|
72
|
+
workspaceId?: string;
|
|
73
|
+
worktreeLimit?: number;
|
|
74
|
+
sourceSpanLimit?: number;
|
|
75
|
+
scanLimit?: number;
|
|
76
|
+
tokenBudget?: number;
|
|
39
77
|
};
|
|
40
78
|
export type PublicContextBelief = {
|
|
41
79
|
beliefId: string;
|
|
@@ -100,6 +138,76 @@ export type PublicContextNarrativeBlock = {
|
|
|
100
138
|
kind: string;
|
|
101
139
|
text: string;
|
|
102
140
|
recordsNamed?: number;
|
|
141
|
+
narrativeId?: string;
|
|
142
|
+
narrative_id?: string;
|
|
143
|
+
scope?: Record<string, unknown>;
|
|
144
|
+
childNarratives?: Array<{
|
|
145
|
+
narrativeId: string;
|
|
146
|
+
narrative_id?: string;
|
|
147
|
+
scope: Record<string, unknown>;
|
|
148
|
+
title: string;
|
|
149
|
+
summary: string;
|
|
150
|
+
recordsNamed?: number;
|
|
151
|
+
}>;
|
|
152
|
+
};
|
|
153
|
+
export type PublicContextNarrativeCoverage = {
|
|
154
|
+
recordsSynthesized?: number;
|
|
155
|
+
recordsNamed?: number;
|
|
156
|
+
recordsOmitted?: number;
|
|
157
|
+
topicsSynthesized?: number;
|
|
158
|
+
topicsEnriched?: number;
|
|
159
|
+
topicContentOmitted?: number;
|
|
160
|
+
enrichmentMode?: string;
|
|
161
|
+
blocksEmitted?: number;
|
|
162
|
+
[key: string]: unknown;
|
|
163
|
+
};
|
|
164
|
+
export type PublicContextSynthesisLint = {
|
|
165
|
+
code?: string;
|
|
166
|
+
severity?: string;
|
|
167
|
+
message?: string;
|
|
168
|
+
path?: string[];
|
|
169
|
+
[key: string]: unknown;
|
|
170
|
+
};
|
|
171
|
+
export type PublicContextRetrievalReceipt = {
|
|
172
|
+
candidateCounts?: Record<string, number>;
|
|
173
|
+
coverageWarning?: string | null;
|
|
174
|
+
narrativeCoverage?: PublicContextNarrativeCoverage;
|
|
175
|
+
synthesisLints?: PublicContextSynthesisLint[];
|
|
176
|
+
heartbeatReceipt?: PublicContextHeartbeatReceipt;
|
|
177
|
+
suggestedNextActions?: string[];
|
|
178
|
+
[key: string]: unknown;
|
|
179
|
+
};
|
|
180
|
+
export type PublicContextHeartbeatReceipt = {
|
|
181
|
+
schemaVersion: "compile_context_heartbeat.v1";
|
|
182
|
+
intent: string;
|
|
183
|
+
sessionId?: string;
|
|
184
|
+
traceId?: string;
|
|
185
|
+
startedAt?: number;
|
|
186
|
+
completedAt?: number;
|
|
187
|
+
measuredDurationMs: number;
|
|
188
|
+
requestedBudgetMs: number;
|
|
189
|
+
cachedP50BudgetMs: number;
|
|
190
|
+
synthesizedP50BudgetMs: number;
|
|
191
|
+
hardTimeoutMs?: number;
|
|
192
|
+
budgetStatus: "within_budget" | "over_budget" | string;
|
|
193
|
+
traceMetric: "context_before_write" | string;
|
|
194
|
+
contextBeforeWrite: boolean;
|
|
195
|
+
preWriteReady: boolean;
|
|
196
|
+
lintsBlockingPreWrite?: number;
|
|
197
|
+
coverageWarning?: boolean;
|
|
198
|
+
[key: string]: unknown;
|
|
199
|
+
};
|
|
200
|
+
export type PublicContextAssemblyReceipt = {
|
|
201
|
+
receiptVersion?: string;
|
|
202
|
+
receiptUuid?: string;
|
|
203
|
+
traceId?: string;
|
|
204
|
+
included?: Array<Record<string, unknown>>;
|
|
205
|
+
omitted?: Array<Record<string, unknown>>;
|
|
206
|
+
rankingInputs?: Record<string, unknown>;
|
|
207
|
+
policyClipping?: Record<string, unknown>;
|
|
208
|
+
synthesisLints?: PublicContextSynthesisLint[];
|
|
209
|
+
axiomTelemetry?: Record<string, unknown>;
|
|
210
|
+
[key: string]: unknown;
|
|
103
211
|
};
|
|
104
212
|
export type PublicContextSupportingObjects = {
|
|
105
213
|
invariants?: PublicContextBelief[];
|
|
@@ -112,53 +220,35 @@ export type PublicContextSupportingObjects = {
|
|
|
112
220
|
lanes?: string[];
|
|
113
221
|
entities?: unknown[];
|
|
114
222
|
};
|
|
115
|
-
export type PublicCompiledContext = {
|
|
223
|
+
export type PublicCompiledContext = ContractPublicCompiledContext & {
|
|
224
|
+
narrativeIndex?: Record<string, unknown>;
|
|
225
|
+
};
|
|
226
|
+
export type PublicCampaignContextPayload = {
|
|
227
|
+
mission?: Record<string, unknown>;
|
|
228
|
+
laneOrder?: Array<Record<string, unknown>>;
|
|
229
|
+
blockers?: Array<Record<string, unknown>>;
|
|
230
|
+
risks?: Array<Record<string, unknown>>;
|
|
231
|
+
openQuestions?: Array<Record<string, unknown>>;
|
|
232
|
+
evidencePosture?: Record<string, unknown>;
|
|
233
|
+
sourceSpans?: Array<Record<string, unknown>>;
|
|
234
|
+
purposeNarrative?: Record<string, unknown>;
|
|
235
|
+
[key: string]: unknown;
|
|
236
|
+
};
|
|
237
|
+
export type PublicCampaignContext = {
|
|
116
238
|
contextNarrative: Array<string | PublicContextNarrativeBlock>;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
239
|
+
campaignContext: PublicCampaignContextPayload;
|
|
240
|
+
purposeNarrative?: Record<string, unknown>;
|
|
241
|
+
narrativeCoverage?: PublicContextNarrativeCoverage;
|
|
242
|
+
synthesisLints?: PublicContextSynthesisLint[];
|
|
243
|
+
retrievalReceipt?: PublicContextRetrievalReceipt;
|
|
244
|
+
synthesisReceipt?: Record<string, unknown>;
|
|
245
|
+
supportingObjects?: PublicContextSupportingObjects & {
|
|
246
|
+
sourceSpans?: Array<Record<string, unknown>>;
|
|
247
|
+
};
|
|
248
|
+
schemaVersion: "campaign_context.v1" | string;
|
|
249
|
+
campaign: number;
|
|
126
250
|
generatedAt: number;
|
|
127
|
-
ranking: ContextRankingProfile;
|
|
128
251
|
summary: Record<string, unknown>;
|
|
129
|
-
invariants?: PublicContextBelief[];
|
|
130
|
-
activeBeliefs?: PublicContextBelief[];
|
|
131
|
-
openQuestions?: PublicContextQuestion[];
|
|
132
|
-
recentEvidence?: PublicContextEvidence[];
|
|
133
|
-
contradictions?: PublicContextContradiction[];
|
|
134
|
-
relatedEntities?: PublicContextEntity[];
|
|
135
|
-
injectionPolicy: PublicContextInjectionPolicy;
|
|
136
252
|
diagnostics: Record<string, unknown>;
|
|
137
|
-
compilationMode?: string;
|
|
138
|
-
failureContext?: {
|
|
139
|
-
failures: Array<{
|
|
140
|
-
attemptId: string;
|
|
141
|
-
approach: string;
|
|
142
|
-
outcome: string;
|
|
143
|
-
recordedAt: number;
|
|
144
|
-
score: number;
|
|
145
|
-
}>;
|
|
146
|
-
suppressedIds: string[];
|
|
147
|
-
};
|
|
148
|
-
deltaReport?: {
|
|
149
|
-
changedItems: Array<{
|
|
150
|
-
id: string;
|
|
151
|
-
section: string;
|
|
152
|
-
changeType: string;
|
|
153
|
-
summary: string;
|
|
154
|
-
}>;
|
|
155
|
-
verificationObligations: Array<{
|
|
156
|
-
description: string;
|
|
157
|
-
source: string;
|
|
158
|
-
severity: "critical" | "high" | "medium" | "low";
|
|
159
|
-
}>;
|
|
160
|
-
referencePoint: string;
|
|
161
|
-
};
|
|
162
|
-
appliedWeightOverrides?: unknown[];
|
|
163
253
|
};
|
|
164
254
|
//# sourceMappingURL=contextTypes.d.ts.map
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* - Changing section budget ratios or ranking weights is NON-breaking (tuning)
|
|
14
14
|
* - Changing the version string is BREAKING (consumers check it)
|
|
15
15
|
*/
|
|
16
|
+
import type { SynthesisQualityLint } from "@lucern/contracts";
|
|
16
17
|
/** Canonical version string. Consumers MUST check this field for compatibility. */
|
|
17
18
|
export declare const CONTEXT_PACK_SCHEMA_VERSION: "1.0.0";
|
|
18
19
|
/**
|
|
@@ -353,6 +354,17 @@ export type PublicContextNarrativeBlock = {
|
|
|
353
354
|
kind: string;
|
|
354
355
|
text: string;
|
|
355
356
|
recordsNamed?: number;
|
|
357
|
+
narrativeId?: string;
|
|
358
|
+
narrative_id?: string;
|
|
359
|
+
scope?: Record<string, unknown>;
|
|
360
|
+
childNarratives?: Array<{
|
|
361
|
+
narrativeId: string;
|
|
362
|
+
narrative_id?: string;
|
|
363
|
+
scope: Record<string, unknown>;
|
|
364
|
+
title: string;
|
|
365
|
+
summary: string;
|
|
366
|
+
recordsNamed?: number;
|
|
367
|
+
}>;
|
|
356
368
|
};
|
|
357
369
|
export type PublicContextSupportingObjects = {
|
|
358
370
|
invariants?: PublicContextBelief[];
|
|
@@ -368,7 +380,7 @@ export type PublicContextSupportingObjects = {
|
|
|
368
380
|
export type PublicCompiledContext = {
|
|
369
381
|
contextNarrative: Array<string | PublicContextNarrativeBlock>;
|
|
370
382
|
narrativeCoverage?: Record<string, unknown>;
|
|
371
|
-
synthesisLints?:
|
|
383
|
+
synthesisLints?: SynthesisQualityLint[];
|
|
372
384
|
retrievalReceipt?: Record<string, unknown>;
|
|
373
385
|
assemblyReceipt?: Record<string, unknown>;
|
|
374
386
|
supportingObjects?: PublicContextSupportingObjects;
|
|
@@ -453,7 +465,7 @@ export type ContextPackV1 = {
|
|
|
453
465
|
*/
|
|
454
466
|
relatedEntities?: ContextPackEntity[];
|
|
455
467
|
/** Concise instructions for agent context injection. */
|
|
456
|
-
contextNarrative: string
|
|
468
|
+
contextNarrative: Array<string | PublicContextNarrativeBlock>;
|
|
457
469
|
/** Token-budgeted injection selections. */
|
|
458
470
|
injectionPolicy: ContextPackInjectionPolicy;
|
|
459
471
|
/** Assembly telemetry. */
|
package/dist/facade/context.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CompileContextInput, PublicCompiledContext } from "../contextTypes";
|
|
1
|
+
import type { CompileContextInput, GetCampaignContextInput, PublicCampaignContext, PublicCompiledContext } from "../contextTypes";
|
|
2
2
|
export type ContextClientRequest = {
|
|
3
|
-
path: "/api/platform/v1/context/compile";
|
|
3
|
+
path: "/api/platform/v1/context/compile" | "/api/platform/v1/context/campaign";
|
|
4
4
|
method: "POST";
|
|
5
5
|
body: Record<string, unknown>;
|
|
6
6
|
};
|
|
@@ -13,6 +13,7 @@ export type ContextFacadeConfig = {
|
|
|
13
13
|
export declare function createContextFacade(config: ContextFacadeConfig): {
|
|
14
14
|
compile(topicIdOrInput?: string | CompileContextInput, input?: CompileContextInput): Promise<PublicCompiledContext>;
|
|
15
15
|
compileByQuery(input?: CompileContextInput): Promise<PublicCompiledContext>;
|
|
16
|
+
getCampaignContext(input: GetCampaignContextInput): Promise<PublicCampaignContext>;
|
|
16
17
|
};
|
|
17
|
-
export type { CompileContextInput, PublicCompiledContext };
|
|
18
|
+
export type { CampaignContextPurpose, CompileContextInput, ContextHeartbeatIntent, GetCampaignContextInput, PublicContextHeartbeatReceipt, PublicCampaignContext, PublicCompiledContext, } from "../contextTypes";
|
|
18
19
|
//# sourceMappingURL=context.d.ts.map
|
package/dist/facade/context.js
CHANGED
|
@@ -9,6 +9,27 @@ function cleanNumber(value) {
|
|
|
9
9
|
function cleanBoolean(value) {
|
|
10
10
|
return typeof value === "boolean" ? value : undefined;
|
|
11
11
|
}
|
|
12
|
+
function cleanStringArray(value) {
|
|
13
|
+
if (!Array.isArray(value)) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
const cleaned = value
|
|
17
|
+
.map((item) => cleanString(item))
|
|
18
|
+
.filter((item) => Boolean(item));
|
|
19
|
+
return cleaned.length > 0 ? cleaned : undefined;
|
|
20
|
+
}
|
|
21
|
+
function assignString(payload, key, value) {
|
|
22
|
+
const cleaned = cleanString(value);
|
|
23
|
+
if (cleaned) {
|
|
24
|
+
payload[key] = cleaned;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function assignNumber(payload, key, value) {
|
|
28
|
+
const cleaned = cleanNumber(value);
|
|
29
|
+
if (cleaned !== undefined) {
|
|
30
|
+
payload[key] = cleaned;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
12
33
|
function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
13
34
|
const effectiveInput = typeof topicIdOrInput === "string" ? input : topicIdOrInput;
|
|
14
35
|
const payload = {};
|
|
@@ -22,10 +43,35 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
22
43
|
if (query) {
|
|
23
44
|
payload.query = query;
|
|
24
45
|
}
|
|
25
|
-
|
|
46
|
+
assignString(payload, "purpose", effectiveInput.purpose);
|
|
47
|
+
assignString(payload, "purposePrompt", effectiveInput.purposePrompt);
|
|
48
|
+
assignString(payload, "topicHint", effectiveInput.topicHint);
|
|
49
|
+
const tags = cleanStringArray(effectiveInput.tags);
|
|
50
|
+
if (tags) {
|
|
51
|
+
payload.tags = tags;
|
|
52
|
+
}
|
|
53
|
+
const touchedPaths = cleanStringArray(effectiveInput.touchedPaths);
|
|
54
|
+
if (touchedPaths) {
|
|
55
|
+
payload.touchedPaths = touchedPaths;
|
|
56
|
+
}
|
|
57
|
+
assignString(payload, "sourceRef", effectiveInput.sourceRef);
|
|
58
|
+
assignString(payload, "sourceKind", effectiveInput.sourceKind);
|
|
59
|
+
assignNumber(payload, "campaign", effectiveInput.campaign);
|
|
60
|
+
assignString(payload, "lane", effectiveInput.lane);
|
|
61
|
+
assignString(payload, "status", effectiveInput.status);
|
|
62
|
+
assignString(payload, "principalId", effectiveInput.principalId);
|
|
63
|
+
assignString(payload, "workspaceId", effectiveInput.workspaceId);
|
|
64
|
+
const budget = cleanNumber(effectiveInput.budget);
|
|
26
65
|
if (budget !== undefined) {
|
|
27
66
|
payload.budget = budget;
|
|
28
67
|
}
|
|
68
|
+
const tokenBudget = cleanNumber(effectiveInput.tokenBudget);
|
|
69
|
+
if (tokenBudget !== undefined) {
|
|
70
|
+
payload.tokenBudget = tokenBudget;
|
|
71
|
+
if (budget === undefined) {
|
|
72
|
+
payload.budget = tokenBudget;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
29
75
|
const ranking = cleanString(effectiveInput.ranking) ?? cleanString(effectiveInput.rankingProfile);
|
|
30
76
|
if (ranking) {
|
|
31
77
|
payload.ranking = ranking;
|
|
@@ -34,6 +80,7 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
34
80
|
if (limit !== undefined) {
|
|
35
81
|
payload.limit = limit;
|
|
36
82
|
}
|
|
83
|
+
assignNumber(payload, "contentTopicLimit", effectiveInput.contentTopicLimit);
|
|
37
84
|
const maxDepth = cleanNumber(effectiveInput.maxDepth);
|
|
38
85
|
if (maxDepth !== undefined) {
|
|
39
86
|
payload.maxDepth = maxDepth;
|
|
@@ -46,6 +93,17 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
46
93
|
if (mode) {
|
|
47
94
|
payload.mode = mode;
|
|
48
95
|
}
|
|
96
|
+
assignString(payload, "traversalMode", effectiveInput.traversalMode);
|
|
97
|
+
assignString(payload, "requestedDepth", effectiveInput.requestedDepth);
|
|
98
|
+
const heartbeat = cleanBoolean(effectiveInput.heartbeat);
|
|
99
|
+
if (heartbeat !== undefined) {
|
|
100
|
+
payload.heartbeat = heartbeat;
|
|
101
|
+
}
|
|
102
|
+
assignString(payload, "heartbeatIntent", effectiveInput.heartbeatIntent);
|
|
103
|
+
assignNumber(payload, "heartbeatBudgetMs", effectiveInput.heartbeatBudgetMs);
|
|
104
|
+
assignString(payload, "heartbeatTraceId", effectiveInput.heartbeatTraceId);
|
|
105
|
+
assignString(payload, "invocationIntent", effectiveInput.invocationIntent);
|
|
106
|
+
assignString(payload, "receiptIntent", effectiveInput.receiptIntent);
|
|
49
107
|
const includeFailures = cleanBoolean(effectiveInput.includeFailures);
|
|
50
108
|
if (includeFailures !== undefined) {
|
|
51
109
|
payload.includeFailures = includeFailures;
|
|
@@ -68,6 +126,25 @@ function buildCompileContextRequest(topicIdOrInput = {}, input = {}) {
|
|
|
68
126
|
body: payload,
|
|
69
127
|
};
|
|
70
128
|
}
|
|
129
|
+
function buildGetCampaignContextRequest(input) {
|
|
130
|
+
const payload = {};
|
|
131
|
+
assignNumber(payload, "campaign", input.campaign);
|
|
132
|
+
assignString(payload, "purpose", input.purpose);
|
|
133
|
+
assignString(payload, "purposePrompt", input.purposePrompt);
|
|
134
|
+
assignString(payload, "lane", input.lane);
|
|
135
|
+
assignString(payload, "status", input.status);
|
|
136
|
+
assignString(payload, "principalId", input.principalId);
|
|
137
|
+
assignString(payload, "workspaceId", input.workspaceId);
|
|
138
|
+
assignNumber(payload, "worktreeLimit", input.worktreeLimit);
|
|
139
|
+
assignNumber(payload, "sourceSpanLimit", input.sourceSpanLimit);
|
|
140
|
+
assignNumber(payload, "scanLimit", input.scanLimit);
|
|
141
|
+
assignNumber(payload, "tokenBudget", input.tokenBudget);
|
|
142
|
+
return {
|
|
143
|
+
path: "/api/platform/v1/context/campaign",
|
|
144
|
+
method: "POST",
|
|
145
|
+
body: payload,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
71
148
|
export function createContextFacade(config) {
|
|
72
149
|
return {
|
|
73
150
|
compile(topicIdOrInput = {}, input = {}) {
|
|
@@ -78,6 +155,10 @@ export function createContextFacade(config) {
|
|
|
78
155
|
const request = buildCompileContextRequest(input);
|
|
79
156
|
return config.transport.request(request);
|
|
80
157
|
},
|
|
158
|
+
getCampaignContext(input) {
|
|
159
|
+
const request = buildGetCampaignContextRequest(input);
|
|
160
|
+
return config.transport.request(request);
|
|
161
|
+
},
|
|
81
162
|
};
|
|
82
163
|
}
|
|
83
164
|
//# sourceMappingURL=context.js.map
|
|
@@ -3,7 +3,7 @@ import type { JsonObject } from "../types";
|
|
|
3
3
|
export type FunctionSurfaceClientConfig = GatewayClientConfig;
|
|
4
4
|
export type FunctionSurfaceInput = JsonObject;
|
|
5
5
|
export type FunctionSurfaceResult<T = unknown> = Promise<PlatformGatewaySuccess<T>>;
|
|
6
|
-
export declare const FUNCTION_SURFACE_METHOD_PATHS: readonly ["answers.answerQuestion", "answers.createAnswer", "answers.getAnswer", "beliefs.appendSlScoring", "beliefs.archiveBelief", "beliefs.bisectConfidence", "beliefs.createBelief", "beliefs.forkBelief", "beliefs.getBelief", "beliefs.getConfidenceHistory", "beliefs.listBeliefs", "beliefs.refineBelief", "beliefs.searchBeliefs", "bootstrap.generateSessionHandoff", "coding.getChangeHistory", "coding.getCodeContext", "coding.getFailureLog", "coding.recordAttempt", "context.analyzeTopicDensity", "context.applyAutoBranching", "context.compileContext", "context.discover", "context.discoverEntityConnections", "context.getLatticeCoverage", "context.lucernOrient", "context.recordScopeLearning", "context.seedBeliefLattice", "context.triggerBeliefReview", "contracts.createEpistemicContract", "contracts.evaluateContract", "contracts.getContractStatus", "contradictions.flagContradiction", "controlPlane.identity.resolveInteractivePrincipal", "coordination.broadcastMessage", "coordination.claimFiles", "coordination.endSession", "coordination.getAgentInbox", "coordination.heartbeatSession", "coordination.listActiveSessions", "coordination.registerSession", "coordination.sendAgentMessage", "edges.batchCreateEdges", "edges.createEdge", "edges.queryAnchorHistory", "edges.queryLineage", "edges.removeEdge", "edges.removeEdgesBetween", "edges.updateEdge", "embeddings.getByNodeIds", "embeddings.listMissingForTopic", "embeddings.markEmbeddingBackfillQueued", "embeddings.vectorSearchByTopic", "evidence.addEvidence", "evidence.archiveEvidence", "evidence.createEvidence", "evidence.getEvidence", "evidence.linkEvidence", "evidence.linkEvidenceToBelief", "evidence.linkEvidenceToQuestion", "evidence.listEvidence", "evidence.searchEvidence", "graph.detectConfirmationBias", "graph.findContradictions", "graph.getGraphGaps", "graph.getGraphNeighborhood", "graph.getGraphStructureAnalysis", "graph.getTopicCoverage", "graph.traceEntityImpact", "graph.traverseGraph", "graphAnalysis.listGraphIntelligenceQueries", "graphAnalysis.runGraphIntelligenceQuery", "hybrid.analyzeGraphImpact", "hybrid.detectGraphDrift", "hybrid.expandGraphNeighborhood", "hybrid.findRelatedNodes", "hybrid.hybridDiscover", "hybrid.resolveTopicSemantic", "identity.checkPermission", "identity.filterByPermission", "identity.whoami", "judgments.getAuditTrail", "judgments.recordJudgment", "lenses.applyLensToTopic", "lenses.createLens", "lenses.listLenses", "lenses.removeLensFromTopic", "nodes.archiveEpistemicNode", "nodes.batchCreateEpistemicNodes", "nodes.createEpistemicNode", "nodes.getEpistemicNode", "nodes.listEpistemicNodes", "nodes.supersedeEpistemicNode", "nodes.updateEpistemicNode", "nodes.verifyEpistemicNode", "observations.getObservationContext", "observations.ingestObservation", "ontologies.applyOntology", "ontologies.archiveOntology", "ontologies.createOntology", "ontologies.createOntologyVersion", "ontologies.deprecateOntologyVersion", "ontologies.getOntology", "ontologies.listOntologies", "ontologies.matchEntityType", "ontologies.publishOntologyVersion", "ontologies.resolveEffectiveOntology", "ontologies.updateOntology", "policy.compileCapabilitySlice", "policy.manageWritePolicy", "questions.archiveQuestion", "questions.createQuestion", "questions.findMissingQuestions", "questions.getFalsificationQuestions", "questions.getHighPriorityQuestions", "questions.getQuestion", "questions.listQuestions", "questions.refineQuestion", "questions.updateQuestionStatus", "tasks.completeTask", "tasks.createTask", "tasks.listTasks", "tasks.updateTask", "topics.createTopic", "topics.getTopic", "topics.getTopicGraphSpine", "topics.getTopicTree", "topics.listTopics", "topics.materializeTopicGraph", "topics.updateTopic", "worktrees.activateWorktree", "worktrees.addWorktree", "worktrees.beginBuildSession", "worktrees.getWorktree", "worktrees.listAllWorktrees", "worktrees.listCampaigns", "worktrees.listWorktrees", "worktrees.listWorktreesByBelief", "worktrees.merge", "worktrees.openPullRequest", "worktrees.pipelineSnapshot", "worktrees.push", "worktrees.updateWorktreeMetadata", "worktrees.updateWorktreeTargets"];
|
|
6
|
+
export declare const FUNCTION_SURFACE_METHOD_PATHS: readonly ["answers.answerQuestion", "answers.createAnswer", "answers.getAnswer", "beliefs.appendSlScoring", "beliefs.archiveBelief", "beliefs.bisectConfidence", "beliefs.createBelief", "beliefs.forkBelief", "beliefs.getBelief", "beliefs.getConfidenceHistory", "beliefs.listBeliefs", "beliefs.refineBelief", "beliefs.searchBeliefs", "bootstrap.generateSessionHandoff", "coding.getChangeHistory", "coding.getCodeContext", "coding.getFailureLog", "coding.recordAttempt", "context.analyzeTopicDensity", "context.applyAutoBranching", "context.compileContext", "context.discover", "context.discoverEntityConnections", "context.expandNarrative", "context.getCampaignContext", "context.getLatticeCoverage", "context.getLoadBearingNodes", "context.getOperatorGauntlet", "context.getReasoningExemplars", "context.lucernOrient", "context.recordScopeLearning", "context.seedBeliefLattice", "context.triggerBeliefReview", "contracts.createEpistemicContract", "contracts.evaluateContract", "contracts.getContractStatus", "contradictions.flagContradiction", "controlPlane.identity.resolveInteractivePrincipal", "coordination.broadcastMessage", "coordination.claimFiles", "coordination.endSession", "coordination.getAgentInbox", "coordination.heartbeatSession", "coordination.listActiveSessions", "coordination.registerSession", "coordination.sendAgentMessage", "edges.batchCreateEdges", "edges.createEdge", "edges.queryAnchorHistory", "edges.queryLineage", "edges.removeEdge", "edges.removeEdgesBetween", "edges.updateEdge", "embeddings.getByNodeIds", "embeddings.listMissingForTopic", "embeddings.markEmbeddingBackfillQueued", "embeddings.vectorSearchByTopic", "evidence.addEvidence", "evidence.archiveEvidence", "evidence.createEvidence", "evidence.getEvidence", "evidence.linkEvidence", "evidence.linkEvidenceToBelief", "evidence.linkEvidenceToQuestion", "evidence.listEvidence", "evidence.searchEvidence", "graph.detectConfirmationBias", "graph.findContradictions", "graph.getGraphGaps", "graph.getGraphNeighborhood", "graph.getGraphStructureAnalysis", "graph.getTopicCoverage", "graph.traceEntityImpact", "graph.traverseGraph", "graphAnalysis.listGraphIntelligenceQueries", "graphAnalysis.runGraphIntelligenceQuery", "hybrid.analyzeGraphImpact", "hybrid.detectGraphDrift", "hybrid.expandGraphNeighborhood", "hybrid.findRelatedNodes", "hybrid.hybridDiscover", "hybrid.resolveTopicSemantic", "identity.checkPermission", "identity.filterByPermission", "identity.whoami", "judgments.getAuditTrail", "judgments.recordJudgment", "lenses.applyLensToTopic", "lenses.createLens", "lenses.listLenses", "lenses.removeLensFromTopic", "nodes.archiveEpistemicNode", "nodes.batchCreateEpistemicNodes", "nodes.createEpistemicNode", "nodes.getEpistemicNode", "nodes.listEpistemicNodes", "nodes.supersedeEpistemicNode", "nodes.updateEpistemicNode", "nodes.verifyEpistemicNode", "observations.getObservationContext", "observations.ingestObservation", "ontologies.applyOntology", "ontologies.archiveOntology", "ontologies.createOntology", "ontologies.createOntologyVersion", "ontologies.deprecateOntologyVersion", "ontologies.getOntology", "ontologies.listOntologies", "ontologies.matchEntityType", "ontologies.publishOntologyVersion", "ontologies.resolveEffectiveOntology", "ontologies.updateOntology", "policy.compileCapabilitySlice", "policy.manageWritePolicy", "questions.archiveQuestion", "questions.createQuestion", "questions.findMissingQuestions", "questions.getFalsificationQuestions", "questions.getHighPriorityQuestions", "questions.getQuestion", "questions.listQuestions", "questions.refineQuestion", "questions.updateQuestionStatus", "tasks.completeTask", "tasks.createTask", "tasks.listTasks", "tasks.updateTask", "topics.createTopic", "topics.getTopic", "topics.getTopicGraphSpine", "topics.getTopicTree", "topics.listTopics", "topics.materializeTopicGraph", "topics.updateTopic", "worktrees.activateWorktree", "worktrees.addWorktree", "worktrees.beginBuildSession", "worktrees.getWorktree", "worktrees.listAllWorktrees", "worktrees.listCampaigns", "worktrees.listWorktrees", "worktrees.listWorktreesByBelief", "worktrees.merge", "worktrees.openPullRequest", "worktrees.pipelineSnapshot", "worktrees.push", "worktrees.updateWorktreeMetadata", "worktrees.updateWorktreeTargets"];
|
|
7
7
|
export declare function createFunctionSurfaceClient(config?: FunctionSurfaceClientConfig): {
|
|
8
8
|
sessionId: string;
|
|
9
9
|
activateWorktree(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
@@ -51,6 +51,7 @@ export declare function createFunctionSurfaceClient(config?: FunctionSurfaceClie
|
|
|
51
51
|
endSession(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
52
52
|
evaluateContract(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
53
53
|
expandGraphNeighborhood(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
54
|
+
expandNarrative(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
54
55
|
filterByPermission(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
55
56
|
findContradictions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
56
57
|
findMissingQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
@@ -62,6 +63,7 @@ export declare function createFunctionSurfaceClient(config?: FunctionSurfaceClie
|
|
|
62
63
|
getAnswer(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
63
64
|
getAuditTrail(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
64
65
|
getBelief(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
66
|
+
getCampaignContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
65
67
|
getChangeHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
66
68
|
getCodeContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
67
69
|
getConfidenceHistory(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
@@ -76,9 +78,12 @@ export declare function createFunctionSurfaceClient(config?: FunctionSurfaceClie
|
|
|
76
78
|
getGraphStructureAnalysis(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
77
79
|
getHighPriorityQuestions(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
78
80
|
getLatticeCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
81
|
+
getLoadBearingNodes(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
79
82
|
getObservationContext(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
80
83
|
getOntology(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
84
|
+
getOperatorGauntlet(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
81
85
|
getQuestion(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
86
|
+
getReasoningExemplars(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
82
87
|
getTopic(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
83
88
|
getTopicCoverage(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
84
89
|
getTopicGraphSpine(input?: FunctionSurfaceInput, idempotencyKey?: string): FunctionSurfaceResult<unknown>;
|
|
@@ -24,7 +24,12 @@ export const FUNCTION_SURFACE_METHOD_PATHS = [
|
|
|
24
24
|
"context.compileContext",
|
|
25
25
|
"context.discover",
|
|
26
26
|
"context.discoverEntityConnections",
|
|
27
|
+
"context.expandNarrative",
|
|
28
|
+
"context.getCampaignContext",
|
|
27
29
|
"context.getLatticeCoverage",
|
|
30
|
+
"context.getLoadBearingNodes",
|
|
31
|
+
"context.getOperatorGauntlet",
|
|
32
|
+
"context.getReasoningExemplars",
|
|
28
33
|
"context.lucernOrient",
|
|
29
34
|
"context.recordScopeLearning",
|
|
30
35
|
"context.seedBeliefLattice",
|
|
@@ -191,6 +196,7 @@ const CONTRACTS = {
|
|
|
191
196
|
"end_session": { method: "POST", path: "/coordination/end-session", kind: "mutation", idempotent: true, surfaceIntent: "system" },
|
|
192
197
|
"evaluate_contract": { method: "POST", path: "/contracts/evaluate", kind: "mutation", idempotent: true, surfaceIntent: "mcp_governance" },
|
|
193
198
|
"expand_graph_neighborhood": { method: "POST", path: "/hybrid/neighborhood", kind: "action", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
199
|
+
"expand_narrative": { method: "POST", path: "/context/narratives/expand", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
194
200
|
"filter_by_permission": { method: "POST", path: "/identity/filter-by-permission", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
195
201
|
"find_contradictions": { method: "POST", path: "/graph/contradictions", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
196
202
|
"find_missing_questions": { method: "POST", path: "/questions/missing", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
@@ -202,6 +208,7 @@ const CONTRACTS = {
|
|
|
202
208
|
"get_answer": { method: "GET", path: "/answers/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
203
209
|
"get_audit_trail": { method: "POST", path: "/judgments/audit-trail", kind: "query", idempotent: false, surfaceIntent: "system" },
|
|
204
210
|
"get_belief": { method: "GET", path: "/beliefs/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
211
|
+
"get_campaign_context": { method: "POST", path: "/context/campaign", kind: "action", idempotent: false, surfaceIntent: "mcp_core" },
|
|
205
212
|
"get_change_history": { method: "POST", path: "/coding/change-history", kind: "query", idempotent: false, surfaceIntent: "system" },
|
|
206
213
|
"get_code_context": { method: "POST", path: "/coding/context", kind: "query", idempotent: false, surfaceIntent: "system" },
|
|
207
214
|
"get_confidence_history": { method: "POST", path: "/beliefs/confidence-history", kind: "query", idempotent: false, surfaceIntent: "compatibility" },
|
|
@@ -216,9 +223,12 @@ const CONTRACTS = {
|
|
|
216
223
|
"get_graph_structure_analysis": { method: "POST", path: "/graph/structure-analysis", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
217
224
|
"get_high_priority_questions": { method: "POST", path: "/questions/high-priority", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
218
225
|
"get_lattice_coverage": { method: "POST", path: "/scope/belief-lattice/coverage", kind: "query", idempotent: false, surfaceIntent: "system" },
|
|
226
|
+
"get_load_bearing_nodes": { method: "POST", path: "/context/load-bearing-nodes", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
219
227
|
"get_observation_context": { method: "POST", path: "/observations/context", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
220
228
|
"get_ontology": { method: "GET", path: "/ontologies/get", kind: "query", idempotent: false, surfaceIntent: "mcp_workflow" },
|
|
229
|
+
"get_operator_gauntlet": { method: "POST", path: "/context/operator-gauntlet", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
221
230
|
"get_question": { method: "GET", path: "/questions/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
231
|
+
"get_reasoning_exemplars": { method: "POST", path: "/context/reasoning-exemplars", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
222
232
|
"get_topic": { method: "GET", path: "/topics/get", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
223
233
|
"get_topic_coverage": { method: "POST", path: "/graph/topic-coverage", kind: "query", idempotent: false, surfaceIntent: "mcp_analysis" },
|
|
224
234
|
"get_topic_graph_spine": { method: "GET", path: "/topics/graph-spine", kind: "query", idempotent: false, surfaceIntent: "mcp_core" },
|
|
@@ -470,6 +480,9 @@ export function createFunctionSurfaceClient(config = {}) {
|
|
|
470
480
|
expandGraphNeighborhood(input = {}, idempotencyKey) {
|
|
471
481
|
return execute("expand_graph_neighborhood", input, idempotencyKey);
|
|
472
482
|
},
|
|
483
|
+
expandNarrative(input = {}, idempotencyKey) {
|
|
484
|
+
return execute("expand_narrative", input, idempotencyKey);
|
|
485
|
+
},
|
|
473
486
|
filterByPermission(input = {}, idempotencyKey) {
|
|
474
487
|
return execute("filter_by_permission", input, idempotencyKey);
|
|
475
488
|
},
|
|
@@ -503,6 +516,9 @@ export function createFunctionSurfaceClient(config = {}) {
|
|
|
503
516
|
getBelief(input = {}, idempotencyKey) {
|
|
504
517
|
return execute("get_belief", input, idempotencyKey);
|
|
505
518
|
},
|
|
519
|
+
getCampaignContext(input = {}, idempotencyKey) {
|
|
520
|
+
return execute("get_campaign_context", input, idempotencyKey);
|
|
521
|
+
},
|
|
506
522
|
getChangeHistory(input = {}, idempotencyKey) {
|
|
507
523
|
return execute("get_change_history", input, idempotencyKey);
|
|
508
524
|
},
|
|
@@ -545,15 +561,24 @@ export function createFunctionSurfaceClient(config = {}) {
|
|
|
545
561
|
getLatticeCoverage(input = {}, idempotencyKey) {
|
|
546
562
|
return execute("get_lattice_coverage", input, idempotencyKey);
|
|
547
563
|
},
|
|
564
|
+
getLoadBearingNodes(input = {}, idempotencyKey) {
|
|
565
|
+
return execute("get_load_bearing_nodes", input, idempotencyKey);
|
|
566
|
+
},
|
|
548
567
|
getObservationContext(input = {}, idempotencyKey) {
|
|
549
568
|
return execute("get_observation_context", input, idempotencyKey);
|
|
550
569
|
},
|
|
551
570
|
getOntology(input = {}, idempotencyKey) {
|
|
552
571
|
return execute("get_ontology", input, idempotencyKey);
|
|
553
572
|
},
|
|
573
|
+
getOperatorGauntlet(input = {}, idempotencyKey) {
|
|
574
|
+
return execute("get_operator_gauntlet", input, idempotencyKey);
|
|
575
|
+
},
|
|
554
576
|
getQuestion(input = {}, idempotencyKey) {
|
|
555
577
|
return execute("get_question", input, idempotencyKey);
|
|
556
578
|
},
|
|
579
|
+
getReasoningExemplars(input = {}, idempotencyKey) {
|
|
580
|
+
return execute("get_reasoning_exemplars", input, idempotencyKey);
|
|
581
|
+
},
|
|
557
582
|
getTopic(input = {}, idempotencyKey) {
|
|
558
583
|
return execute("get_topic", input, idempotencyKey);
|
|
559
584
|
},
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucern/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -113,10 +113,10 @@
|
|
|
113
113
|
"typecheck": "tsc --project tsconfig.typecheck.json --noEmit"
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"@lucern/contracts": "1.0.
|
|
117
|
-
"@lucern/reasoning-kernel": "1.0.
|
|
118
|
-
"@lucern/secrets": "1.0.
|
|
119
|
-
"@lucern/transport-core": "1.0.
|
|
116
|
+
"@lucern/contracts": "1.0.23",
|
|
117
|
+
"@lucern/reasoning-kernel": "1.0.23",
|
|
118
|
+
"@lucern/secrets": "1.0.23",
|
|
119
|
+
"@lucern/transport-core": "1.0.23",
|
|
120
120
|
"effect": "^3.21.2",
|
|
121
121
|
"zod": "^3.25.76"
|
|
122
122
|
},
|