@lucern/sdk 0.3.0-alpha.14 → 0.3.0-alpha.16
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 +5 -0
- package/README.md +8 -0
- package/dist/accessControl.js +19 -1
- package/dist/accessControl.js.map +1 -1
- package/dist/adminClient.js +19 -1
- package/dist/adminClient.js.map +1 -1
- package/dist/answersClient.js +19 -1
- package/dist/answersClient.js.map +1 -1
- package/dist/audiencesClient.js +19 -1
- package/dist/audiencesClient.js.map +1 -1
- package/dist/auditClient.js +19 -1
- package/dist/auditClient.js.map +1 -1
- package/dist/beliefs/index.js +29 -15
- package/dist/beliefs/index.js.map +1 -1
- package/dist/beliefsClient.js +19 -1
- package/dist/beliefsClient.js.map +1 -1
- package/dist/client.d.ts +15 -10
- package/dist/client.js +29 -15
- package/dist/client.js.map +1 -1
- package/dist/contextClient.js +19 -1
- package/dist/contextClient.js.map +1 -1
- package/dist/contradictions/index.js +29 -15
- package/dist/contradictions/index.js.map +1 -1
- package/dist/control-plane.js +19 -1
- package/dist/control-plane.js.map +1 -1
- package/dist/coreClient.d.ts +17 -1
- package/dist/coreClient.js +19 -1
- package/dist/coreClient.js.map +1 -1
- package/dist/decisions/index.js +29 -15
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisionsClient.js +19 -1
- package/dist/decisionsClient.js.map +1 -1
- package/dist/edges/index.js +29 -15
- package/dist/edges/index.js.map +1 -1
- package/dist/embeddingsClient.js +19 -1
- package/dist/embeddingsClient.js.map +1 -1
- package/dist/eventingClient.js +19 -1
- package/dist/eventingClient.js.map +1 -1
- package/dist/eventsCore.js +19 -1
- package/dist/eventsCore.js.map +1 -1
- package/dist/evidence/index.js +29 -15
- package/dist/evidence/index.js.map +1 -1
- package/dist/evidenceClient.js +19 -1
- package/dist/evidenceClient.js.map +1 -1
- package/dist/functionSurface.js +19 -1
- package/dist/functionSurface.js.map +1 -1
- package/dist/functionSurfaceClient.js +19 -1
- package/dist/functionSurfaceClient.js.map +1 -1
- package/dist/gatewayFacades.d.ts +2 -0
- package/dist/gatewayFacades.js +21 -1
- package/dist/gatewayFacades.js.map +1 -1
- package/dist/graphAnalysisClient.js +19 -1
- package/dist/graphAnalysisClient.js.map +1 -1
- package/dist/graphClient.js +19 -1
- package/dist/graphClient.js.map +1 -1
- package/dist/graphRecommendationsClient.js +19 -1
- package/dist/graphRecommendationsClient.js.map +1 -1
- package/dist/graphStateClassifierClient.js +19 -1
- package/dist/graphStateClassifierClient.js.map +1 -1
- package/dist/harnessClient.js +19 -1
- package/dist/harnessClient.js.map +1 -1
- package/dist/identityClient.js +19 -1
- package/dist/identityClient.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -17
- package/dist/index.js.map +1 -1
- package/dist/jobsClient.js +19 -1
- package/dist/jobsClient.js.map +1 -1
- package/dist/learningClient.js +19 -1
- package/dist/learningClient.js.map +1 -1
- package/dist/lenses/index.js +29 -15
- package/dist/lenses/index.js.map +1 -1
- package/dist/mcpClient.js +19 -1
- package/dist/mcpClient.js.map +1 -1
- package/dist/modelRuntimeClient.js +19 -1
- package/dist/modelRuntimeClient.js.map +1 -1
- package/dist/nodes/index.js +29 -15
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.js +29 -15
- package/dist/ontologies/index.js.map +1 -1
- package/dist/ontologyClient.js +19 -1
- package/dist/ontologyClient.js.map +1 -1
- package/dist/ontologyLinksClient.js +19 -1
- package/dist/ontologyLinksClient.js.map +1 -1
- package/dist/orgGraphSearchClient.js +19 -1
- package/dist/orgGraphSearchClient.js.map +1 -1
- package/dist/packsClient.js +19 -1
- package/dist/packsClient.js.map +1 -1
- package/dist/policyClient.js +19 -1
- package/dist/policyClient.js.map +1 -1
- package/dist/questions/index.js +29 -15
- package/dist/questions/index.js.map +1 -1
- package/dist/reportsClient.js +19 -1
- package/dist/reportsClient.js.map +1 -1
- package/dist/schemaClient.js +19 -1
- package/dist/schemaClient.js.map +1 -1
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +1 -1
- package/dist/sourcesClient.js +19 -1
- package/dist/sourcesClient.js.map +1 -1
- package/dist/telemetryClient.js +19 -1
- package/dist/telemetryClient.js.map +1 -1
- package/dist/toolRegistryClient.js +19 -1
- package/dist/toolRegistryClient.js.map +1 -1
- package/dist/topics/index.js +29 -15
- package/dist/topics/index.js.map +1 -1
- package/dist/topicsClient.js +19 -1
- package/dist/topicsClient.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/workflowClient.d.ts +2 -0
- package/dist/workflowClient.js +19 -1
- package/dist/workflowClient.js.map +1 -1
- package/dist/worktrees/index.js +29 -15
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to `@lucern/sdk` will be documented in this file.
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
- No unreleased changes yet.
|
|
7
7
|
|
|
8
|
+
## [0.3.0-alpha.16] - 2026-05-14
|
|
9
|
+
- Adds the exact-row reasoning-kernel migration surface required for tenant identity/scope repairs.
|
|
10
|
+
- Keeps the coherent Lucern package line aligned for StackOS and reasoning-environment adoption.
|
|
11
|
+
|
|
12
|
+
|
|
8
13
|
## [0.3.0-alpha.7] - 2026-05-03
|
|
9
14
|
- Rebuild the coherent Lucern package line after Campaign 1 SDK hardening fixes.
|
|
10
15
|
|
package/README.md
CHANGED
|
@@ -42,6 +42,9 @@ code should stay on `@lucern/sdk`, `@lucern/react`, `@lucern/mcp`,
|
|
|
42
42
|
- Build applications, automations, and backend integrations against the SDK first.
|
|
43
43
|
- Treat `/api/platform/v1/*` as the transport mirror of the SDK surface.
|
|
44
44
|
- Treat MCP as an agent-facing client of the same surface, not as a privileged bypass around SDK or HTTP semantics.
|
|
45
|
+
- Treat REST, SDK, CLI, and MCP as projections of the same manifest. New
|
|
46
|
+
control-plane operations must be added to the manifest first, then exposed
|
|
47
|
+
through the generated surfaces.
|
|
45
48
|
|
|
46
49
|
IA-7 closes the remaining SDK surface gaps needed for SDK-first clients:
|
|
47
50
|
|
|
@@ -118,6 +121,11 @@ they must not call `components.controlPlane.migration` from application code.
|
|
|
118
121
|
Provisioning and backfills can use migration APIs; runtime bootstrapping uses
|
|
119
122
|
`controlPlane.identity.resolveInteractivePrincipal(...)`.
|
|
120
123
|
|
|
124
|
+
StackOS, Lucern Graph, and Stack Engineering should use this bootstrap path
|
|
125
|
+
before calling morning brief, graph session, MCP, or CLI-backed runtime flows.
|
|
126
|
+
`/api/platform/v1/users/:clerkId` may be a profile facade, but it is not an
|
|
127
|
+
authorization source.
|
|
128
|
+
|
|
121
129
|
## The Full Developer Journey
|
|
122
130
|
|
|
123
131
|
This walkthrough mirrors what a developer building an AI-powered code review system would experience in a real coding session. Every API call is something you would actually use.
|
package/dist/accessControl.js
CHANGED
|
@@ -342,13 +342,31 @@ function mergeHeaderRecord(base, addition) {
|
|
|
342
342
|
}
|
|
343
343
|
return Object.fromEntries(headers.entries());
|
|
344
344
|
}
|
|
345
|
+
function cleanHeaderValue(value) {
|
|
346
|
+
const normalized = value?.trim();
|
|
347
|
+
return normalized ? normalized : void 0;
|
|
348
|
+
}
|
|
345
349
|
function createGatewayRequestClient(config = {}) {
|
|
346
350
|
const fetchImpl = config.fetchImpl ?? fetch;
|
|
347
351
|
const baseUrl = config.baseUrl?.replace(/\/+$/, "") ?? "";
|
|
348
352
|
const maxRetries = config.maxRetries ?? 2;
|
|
349
353
|
const requestIdFactory = config.requestIdFactory ?? (() => generatePortableRequestId());
|
|
350
354
|
async function resolveAuthHeaders() {
|
|
351
|
-
const
|
|
355
|
+
const provided = config.getAuthHeaders ? await config.getAuthHeaders() : {};
|
|
356
|
+
const headers = new Headers(provided);
|
|
357
|
+
const setIfAbsent = (name, value) => {
|
|
358
|
+
const normalized = cleanHeaderValue(value);
|
|
359
|
+
if (normalized && !headers.has(name)) {
|
|
360
|
+
headers.set(name, normalized);
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
setIfAbsent("x-lucern-key", config.apiKey);
|
|
364
|
+
setIfAbsent("x-lucern-session-token", config.userToken);
|
|
365
|
+
setIfAbsent("x-lucern-environment", config.environment);
|
|
366
|
+
setIfAbsent("x-lucern-clerk-id", config.clerkId);
|
|
367
|
+
setIfAbsent("x-lucern-user-id", config.userId ?? config.clerkId);
|
|
368
|
+
setIfAbsent("x-lucern-deployment-host", config.deploymentHost);
|
|
369
|
+
const base = Object.fromEntries(headers.entries());
|
|
352
370
|
const authContextInput = await resolveConfiguredAuthContext(
|
|
353
371
|
config.authContext
|
|
354
372
|
);
|