@lucern/sdk 1.0.1 → 1.0.2
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 +4 -0
- package/dist/accessControl.d.ts +1 -0
- package/dist/accessControl.js +213 -26
- package/dist/accessControl.js.map +1 -1
- package/dist/adminClient.d.ts +1 -0
- package/dist/adminClient.js +213 -26
- package/dist/adminClient.js.map +1 -1
- package/dist/answersClient.d.ts +1 -0
- package/dist/answersClient.js +213 -26
- package/dist/answersClient.js.map +1 -1
- package/dist/audiencesClient.d.ts +1 -0
- package/dist/audiencesClient.js +213 -26
- package/dist/audiencesClient.js.map +1 -1
- package/dist/auditClient.d.ts +1 -0
- package/dist/auditClient.js +213 -26
- package/dist/auditClient.js.map +1 -1
- package/dist/authDeviceClient.d.ts +1 -0
- package/dist/beliefs/index.d.ts +1 -0
- package/dist/beliefs/index.js +214 -27
- package/dist/beliefs/index.js.map +1 -1
- package/dist/beliefsClient.d.ts +1 -0
- package/dist/beliefsClient.js +213 -26
- package/dist/beliefsClient.js.map +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +214 -27
- package/dist/client.js.map +1 -1
- package/dist/clientConfig.d.ts +1 -0
- package/dist/clientEvidenceCompat.d.ts +1 -0
- package/dist/clientKnowledgeNamespaces.d.ts +1 -0
- package/dist/clientLocalHelpers.d.ts +1 -0
- package/dist/clientLocalHelpers.js +2 -0
- package/dist/clientLocalHelpers.js.map +1 -1
- package/dist/clientPlatformNamespaces.d.ts +1 -0
- package/dist/clientRuntime.d.ts +1 -0
- package/dist/clientWorkflowNamespaces.d.ts +1 -0
- package/dist/contextClient.d.ts +1 -0
- package/dist/contextClient.js +213 -26
- package/dist/contextClient.js.map +1 -1
- package/dist/contradictions/index.d.ts +1 -0
- package/dist/contradictions/index.js +214 -27
- package/dist/contradictions/index.js.map +1 -1
- package/dist/control-plane.d.ts +1 -0
- package/dist/control-plane.js +213 -26
- package/dist/control-plane.js.map +1 -1
- package/dist/coreClient.d.ts +25 -1
- package/dist/coreClient.js +217 -27
- package/dist/coreClient.js.map +1 -1
- package/dist/decisions/index.d.ts +1 -0
- package/dist/decisions/index.js +214 -27
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisionsClient.d.ts +1 -0
- package/dist/decisionsClient.js +213 -26
- package/dist/decisionsClient.js.map +1 -1
- package/dist/edges/index.d.ts +1 -0
- package/dist/edges/index.js +214 -27
- package/dist/edges/index.js.map +1 -1
- package/dist/embeddingsClient.d.ts +1 -0
- package/dist/embeddingsClient.js +213 -26
- package/dist/embeddingsClient.js.map +1 -1
- package/dist/eventingClient.d.ts +1 -0
- package/dist/eventingClient.js +213 -26
- package/dist/eventingClient.js.map +1 -1
- package/dist/eventsCore.d.ts +1 -0
- package/dist/eventsCore.js +213 -26
- package/dist/eventsCore.js.map +1 -1
- package/dist/evidence/index.d.ts +1 -0
- package/dist/evidence/index.js +214 -27
- package/dist/evidence/index.js.map +1 -1
- package/dist/evidenceClient.d.ts +1 -0
- package/dist/evidenceClient.js +213 -26
- package/dist/evidenceClient.js.map +1 -1
- package/dist/functionSurface.d.ts +1 -0
- package/dist/functionSurface.js +213 -26
- package/dist/functionSurface.js.map +1 -1
- package/dist/functionSurfaceClient.d.ts +1 -0
- package/dist/functionSurfaceClient.js +213 -26
- package/dist/functionSurfaceClient.js.map +1 -1
- package/dist/gatewayFacades.d.ts +1 -0
- package/dist/gatewayFacades.factories.d.ts +1 -0
- package/dist/gatewayFacades.factories.js +213 -26
- package/dist/gatewayFacades.factories.js.map +1 -1
- package/dist/gatewayFacades.js +213 -26
- package/dist/gatewayFacades.js.map +1 -1
- package/dist/graphAnalysisClient.d.ts +1 -0
- package/dist/graphAnalysisClient.js +213 -26
- package/dist/graphAnalysisClient.js.map +1 -1
- package/dist/graphClient.d.ts +1 -0
- package/dist/graphClient.js +213 -26
- package/dist/graphClient.js.map +1 -1
- package/dist/graphRecommendationsClient.d.ts +1 -0
- package/dist/graphRecommendationsClient.js +213 -26
- package/dist/graphRecommendationsClient.js.map +1 -1
- package/dist/graphStateClassifierClient.d.ts +1 -0
- package/dist/graphStateClassifierClient.js +213 -26
- package/dist/graphStateClassifierClient.js.map +1 -1
- package/dist/harnessClient.d.ts +1 -0
- package/dist/harnessClient.js +213 -26
- package/dist/harnessClient.js.map +1 -1
- package/dist/identityClient.d.ts +1 -0
- package/dist/identityClient.js +213 -26
- package/dist/identityClient.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +237 -28
- package/dist/index.js.map +1 -1
- package/dist/jobsClient.d.ts +1 -0
- package/dist/jobsClient.js +213 -26
- package/dist/jobsClient.js.map +1 -1
- package/dist/learningClient.d.ts +1 -0
- package/dist/learningClient.js +213 -26
- package/dist/learningClient.js.map +1 -1
- package/dist/lenses/index.d.ts +1 -0
- package/dist/lenses/index.js +214 -27
- package/dist/lenses/index.js.map +1 -1
- package/dist/mcpClient.d.ts +1 -0
- package/dist/mcpClient.js +213 -26
- package/dist/mcpClient.js.map +1 -1
- package/dist/modelRuntimeClient.d.ts +1 -0
- package/dist/modelRuntimeClient.js +213 -26
- package/dist/modelRuntimeClient.js.map +1 -1
- package/dist/nodes/index.d.ts +1 -0
- package/dist/nodes/index.js +214 -27
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.d.ts +1 -0
- package/dist/ontologies/index.js +214 -27
- package/dist/ontologies/index.js.map +1 -1
- package/dist/ontologyClient.d.ts +1 -0
- package/dist/ontologyClient.js +213 -26
- package/dist/ontologyClient.js.map +1 -1
- package/dist/ontologyLinksClient.d.ts +1 -0
- package/dist/ontologyLinksClient.js +213 -26
- package/dist/ontologyLinksClient.js.map +1 -1
- package/dist/orgGraphSearchClient.d.ts +1 -0
- package/dist/orgGraphSearchClient.js +213 -26
- package/dist/orgGraphSearchClient.js.map +1 -1
- package/dist/packsClient.d.ts +1 -0
- package/dist/packsClient.js +213 -26
- package/dist/packsClient.js.map +1 -1
- package/dist/policyClient.d.ts +1 -0
- package/dist/policyClient.js +213 -26
- package/dist/policyClient.js.map +1 -1
- package/dist/questions/index.d.ts +1 -0
- package/dist/questions/index.js +214 -27
- package/dist/questions/index.js.map +1 -1
- package/dist/reportsClient.d.ts +1 -0
- package/dist/reportsClient.js +213 -26
- package/dist/reportsClient.js.map +1 -1
- package/dist/schemaClient.d.ts +1 -0
- package/dist/schemaClient.js +213 -26
- package/dist/schemaClient.js.map +1 -1
- package/dist/sdkSurface.d.ts +1 -0
- package/dist/sourcesClient.d.ts +1 -0
- package/dist/sourcesClient.js +213 -26
- package/dist/sourcesClient.js.map +1 -1
- package/dist/telemetryClient.d.ts +1 -0
- package/dist/telemetryClient.js +213 -26
- package/dist/telemetryClient.js.map +1 -1
- package/dist/toolRegistryClient.d.ts +1 -0
- package/dist/toolRegistryClient.js +213 -26
- package/dist/toolRegistryClient.js.map +1 -1
- package/dist/topics/index.d.ts +1 -0
- package/dist/topics/index.js +214 -27
- package/dist/topics/index.js.map +1 -1
- package/dist/topicsClient.d.ts +1 -0
- package/dist/topicsClient.js +213 -26
- 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 +1 -0
- package/dist/workflowClient.js +213 -26
- package/dist/workflowClient.js.map +1 -1
- package/dist/worktrees/index.d.ts +1 -0
- package/dist/worktrees/index.js +214 -27
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +6 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { sanitizeTelemetrySignal, resolveAxiomTelemetryConfig, renderTelemetryPayload, emitTelemetrySignal, createTelemetryExporterFromEnv, createMemoryTelemetryExporter, createHttpTelemetryExporter, createCompositeTelemetryExporter, createAxiomTelemetryExporter, DEFAULT_AXIOM_TRACES_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_API_URL } from '@lucern/transport-core';
|
|
2
|
+
export { DEFAULT_AXIOM_API_URL, DEFAULT_AXIOM_EVENTS_DATASET, DEFAULT_AXIOM_LOGS_DATASET, DEFAULT_AXIOM_METRICS_DATASET, DEFAULT_AXIOM_TRACES_DATASET, createAxiomTelemetryExporter, createCompositeTelemetryExporter, createHttpTelemetryExporter, createMemoryTelemetryExporter, createTelemetryExporterFromEnv, emitTelemetrySignal, renderTelemetryPayload, resolveAxiomTelemetryConfig, sanitizeTelemetrySignal } from '@lucern/transport-core';
|
|
1
3
|
import { redactDiagnosticValue } from '@lucern/transport-core/redaction';
|
|
2
4
|
import { classifyRetry } from '@lucern/transport-core/transport';
|
|
5
|
+
import { Effect, Exit, Cause } from 'effect';
|
|
3
6
|
import { z } from 'zod';
|
|
4
7
|
import { MCP_GATEWAY_EVALUATE_RESEARCH_CONTRACT_ENDPOINT, MCP_GATEWAY_EVALUATE_ENGINEERING_CONTRACT_ENDPOINT, MCP_GATEWAY_BEGIN_BUILD_SESSION_ENDPOINT, MCP_GATEWAY_WRITE_POLICY_CHECK_ENDPOINT, MCP_GATEWAY_BOOTSTRAP_ENDPOINT } from '@lucern/contracts/mcp-gateway-boundary.contract';
|
|
5
8
|
import * as tool_contracts_star from '@lucern/contracts/tool-contracts';
|
|
@@ -47,6 +50,11 @@ __export(src_exports, {
|
|
|
47
50
|
CONTROL_OBJECT_OWNERSHIP_ROWS: () => CONTROL_OBJECT_OWNERSHIP_ROWS,
|
|
48
51
|
CONTROL_OBJECT_OWNER_SCOPES: () => CONTROL_OBJECT_OWNER_SCOPES,
|
|
49
52
|
CustomToolRegistryError: () => CustomToolRegistryError,
|
|
53
|
+
DEFAULT_AXIOM_API_URL: () => DEFAULT_AXIOM_API_URL,
|
|
54
|
+
DEFAULT_AXIOM_EVENTS_DATASET: () => DEFAULT_AXIOM_EVENTS_DATASET,
|
|
55
|
+
DEFAULT_AXIOM_LOGS_DATASET: () => DEFAULT_AXIOM_LOGS_DATASET,
|
|
56
|
+
DEFAULT_AXIOM_METRICS_DATASET: () => DEFAULT_AXIOM_METRICS_DATASET,
|
|
57
|
+
DEFAULT_AXIOM_TRACES_DATASET: () => DEFAULT_AXIOM_TRACES_DATASET,
|
|
50
58
|
DEFAULT_TIER_APPROVAL_MODE: () => DEFAULT_TIER_APPROVAL_MODE,
|
|
51
59
|
DEFAULT_WORKFLOW_AUTO_FIX_POLICY: () => DEFAULT_WORKFLOW_AUTO_FIX_POLICY,
|
|
52
60
|
DEFEAT_TYPES: () => DEFEAT_TYPES,
|
|
@@ -74,6 +82,8 @@ __export(src_exports, {
|
|
|
74
82
|
GRAPH_INTELLIGENCE_QUICK_QUERIES: () => GRAPH_INTELLIGENCE_QUICK_QUERIES,
|
|
75
83
|
GRAPH_RECOMMENDATION_FIELDS: () => GRAPH_RECOMMENDATION_FIELDS,
|
|
76
84
|
GRAPH_STATE_CLASSIFIER_FIELDS: () => GRAPH_STATE_CLASSIFIER_FIELDS,
|
|
85
|
+
GatewayTimeoutError: () => GatewayTimeoutError,
|
|
86
|
+
GatewayTransportError: () => GatewayTransportError,
|
|
77
87
|
InfisicalRuntimeError: () => InfisicalRuntimeError,
|
|
78
88
|
JOBS_FIELDS: () => JOBS_FIELDS,
|
|
79
89
|
JUDGMENT_TYPES: () => JUDGMENT_TYPES,
|
|
@@ -137,8 +147,10 @@ __export(src_exports, {
|
|
|
137
147
|
createAudiencesClient: () => createAudiencesClient,
|
|
138
148
|
createAuditClient: () => createAuditClient,
|
|
139
149
|
createAuthDeviceClient: () => createAuthDeviceClient,
|
|
150
|
+
createAxiomTelemetryExporter: () => createAxiomTelemetryExporter,
|
|
140
151
|
createBeliefsClient: () => createBeliefsClient,
|
|
141
152
|
createCanonicalAuthHeaders: () => createCanonicalAuthHeaders,
|
|
153
|
+
createCompositeTelemetryExporter: () => createCompositeTelemetryExporter,
|
|
142
154
|
createContextClient: () => createContextClient,
|
|
143
155
|
createContextFacade: () => createContextFacade,
|
|
144
156
|
createControlPlaneClient: () => createControlPlaneClient,
|
|
@@ -156,11 +168,13 @@ __export(src_exports, {
|
|
|
156
168
|
createGraphRecommendationsClient: () => createGraphRecommendationsClient,
|
|
157
169
|
createGraphStateClassifierClient: () => createGraphStateClassifierClient,
|
|
158
170
|
createHarnessClient: () => createHarnessClient,
|
|
171
|
+
createHttpTelemetryExporter: () => createHttpTelemetryExporter,
|
|
159
172
|
createIdentityClient: () => createIdentityClient,
|
|
160
173
|
createJobsClient: () => createJobsClient,
|
|
161
174
|
createLearningClient: () => createLearningClient,
|
|
162
175
|
createListResult: () => createListResult,
|
|
163
176
|
createLucernClient: () => createLucernClient,
|
|
177
|
+
createMemoryTelemetryExporter: () => createMemoryTelemetryExporter,
|
|
164
178
|
createModelRuntimeClient: () => createModelRuntimeClient,
|
|
165
179
|
createOntologyClient: () => createOntologyClient,
|
|
166
180
|
createOntologyLinksClient: () => createOntologyLinksClient,
|
|
@@ -171,12 +185,14 @@ __export(src_exports, {
|
|
|
171
185
|
createSchemaClient: () => createSchemaClient,
|
|
172
186
|
createSourcesClient: () => createSourcesClient,
|
|
173
187
|
createTelemetryClient: () => createTelemetryClient,
|
|
188
|
+
createTelemetryExporterFromEnv: () => createTelemetryExporterFromEnv,
|
|
174
189
|
createToolRegistryClient: () => createToolRegistryClient,
|
|
175
190
|
createTopicsClient: () => createTopicsClient,
|
|
176
191
|
createWebhooksClientCore: () => createWebhooksClientCore,
|
|
177
192
|
createWorkflowClient: () => createWorkflowClient,
|
|
178
193
|
decodeEventCursor: () => decodeEventCursor,
|
|
179
194
|
emitDomainEvent: () => emitDomainEvent,
|
|
195
|
+
emitTelemetrySignal: () => emitTelemetrySignal,
|
|
180
196
|
encodeEventCursor: () => encodeEventCursor,
|
|
181
197
|
eventPatternToRegExp: () => eventPatternToRegExp,
|
|
182
198
|
fillGraphIntelligencePromptTemplate: () => fillGraphIntelligencePromptTemplate,
|
|
@@ -191,6 +207,8 @@ __export(src_exports, {
|
|
|
191
207
|
inferSessionPrincipalType: () => inferSessionPrincipalType,
|
|
192
208
|
invokeRegisteredCustomTool: () => invokeRegisteredCustomTool,
|
|
193
209
|
isAfterCursor: () => isAfterCursor,
|
|
210
|
+
isGatewayRecoverableError: () => isGatewayRecoverableError,
|
|
211
|
+
isGatewayRetryableError: () => isGatewayRetryableError,
|
|
194
212
|
isGraphIntelligenceQueryMode: () => isGraphIntelligenceQueryMode,
|
|
195
213
|
isInfisicalRuntimeDisabled: () => isInfisicalRuntimeDisabled,
|
|
196
214
|
isLensFilterCriteria: () => isLensFilterCriteria,
|
|
@@ -227,11 +245,14 @@ __export(src_exports, {
|
|
|
227
245
|
randomIdempotencyKey: () => randomIdempotencyKey,
|
|
228
246
|
readInfisicalRuntimeBootstrap: () => readInfisicalRuntimeBootstrap,
|
|
229
247
|
registerCustomTool: () => registerCustomTool,
|
|
248
|
+
renderTelemetryPayload: () => renderTelemetryPayload,
|
|
230
249
|
requestBrokeredInfisicalSecret: () => requestBrokeredInfisicalSecret,
|
|
250
|
+
resolveAxiomTelemetryConfig: () => resolveAxiomTelemetryConfig,
|
|
231
251
|
resolveDeliveryFailureStatus: () => resolveDeliveryFailureStatus,
|
|
232
252
|
resolveInfisicalSecretFromBinding: () => resolveInfisicalSecretFromBinding,
|
|
233
253
|
resolveText: () => resolveText,
|
|
234
254
|
resolveTopicId: () => resolveTopicId,
|
|
255
|
+
sanitizeTelemetrySignal: () => sanitizeTelemetrySignal,
|
|
235
256
|
sanitizeWebhookRecord: () => sanitizeWebhookRecord,
|
|
236
257
|
sortEventsByCursor: () => sortEventsByCursor,
|
|
237
258
|
toQueryString: () => toQueryString,
|
|
@@ -443,6 +464,36 @@ function createCanonicalAuthHeaders(authContext) {
|
|
|
443
464
|
}
|
|
444
465
|
|
|
445
466
|
// src/coreClient.ts
|
|
467
|
+
var DEFAULT_GATEWAY_TIMEOUT_MS = 15e3;
|
|
468
|
+
var DEFAULT_GATEWAY_MAX_RETRIES = 2;
|
|
469
|
+
var DEFAULT_ENV_TIMEOUT_MS = "LUCERN_REQUEST_TIMEOUT_MS";
|
|
470
|
+
var DEFAULT_ENV_MAX_RETRIES = "LUCERN_GATEWAY_MAX_RETRIES";
|
|
471
|
+
var ENV_TIMEOUT_BY_METHOD_PREFIX = "LUCERN_REQUEST_TIMEOUT_MS_";
|
|
472
|
+
var GatewayTimeoutError = class extends Error {
|
|
473
|
+
retryable = true;
|
|
474
|
+
timeoutMs;
|
|
475
|
+
constructor(timeoutMs) {
|
|
476
|
+
super(`Request timed out after ${timeoutMs}ms`);
|
|
477
|
+
this.name = "AbortError";
|
|
478
|
+
this.timeoutMs = timeoutMs;
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
var GatewayTransportError = class extends Error {
|
|
482
|
+
retryable;
|
|
483
|
+
cause;
|
|
484
|
+
constructor(message, options) {
|
|
485
|
+
super(message);
|
|
486
|
+
this.name = "GatewayTransportError";
|
|
487
|
+
this.retryable = options?.retryable ?? true;
|
|
488
|
+
this.cause = options?.cause;
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
function isGatewayRecoverableError(error) {
|
|
492
|
+
return error instanceof GatewayTimeoutError || error instanceof GatewayTransportError;
|
|
493
|
+
}
|
|
494
|
+
function isGatewayRetryableError(error) {
|
|
495
|
+
return error instanceof GatewayTimeoutError && error.retryable || error instanceof GatewayTransportError && error.retryable || false;
|
|
496
|
+
}
|
|
446
497
|
var LucernApiError = class extends Error {
|
|
447
498
|
code;
|
|
448
499
|
status;
|
|
@@ -509,6 +560,99 @@ function generatePortableRequestId() {
|
|
|
509
560
|
8
|
|
510
561
|
).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
|
|
511
562
|
}
|
|
563
|
+
function resolveEnvironment() {
|
|
564
|
+
const processEnv = typeof globalThis === "object" && globalThis !== null && "process" in globalThis ? globalThis.process : void 0;
|
|
565
|
+
const env = processEnv !== void 0 && typeof processEnv === "object" && processEnv !== null && typeof processEnv.env === "object" ? processEnv.env : void 0;
|
|
566
|
+
return {
|
|
567
|
+
get: (name) => {
|
|
568
|
+
const value = env?.[name];
|
|
569
|
+
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
function telemetryEnvironmentRecord(environment) {
|
|
574
|
+
const names = [
|
|
575
|
+
"LUCERN_TELEMETRY_ENABLED",
|
|
576
|
+
"AXIOM_TELEMETRY_ENABLED",
|
|
577
|
+
"LUCERN_AXIOM_TOKEN",
|
|
578
|
+
"AXIOM_TOKEN",
|
|
579
|
+
"LUCERN_AXIOM_EVENTS_DATASET",
|
|
580
|
+
"LUCERN_AXIOM_DATASET",
|
|
581
|
+
"AXIOM_EVENTS_DATASET",
|
|
582
|
+
"AXIOM_DATASET",
|
|
583
|
+
"LUCERN_AXIOM_API_URL",
|
|
584
|
+
"AXIOM_URL",
|
|
585
|
+
"LUCERN_ENVIRONMENT",
|
|
586
|
+
"NODE_ENV",
|
|
587
|
+
"LUCERN_RELEASE",
|
|
588
|
+
"SENTRY_RELEASE",
|
|
589
|
+
"VERCEL_GIT_COMMIT_SHA"
|
|
590
|
+
];
|
|
591
|
+
return Object.fromEntries(
|
|
592
|
+
names.map((name) => [name, environment.get(name)])
|
|
593
|
+
);
|
|
594
|
+
}
|
|
595
|
+
function resolveRequestProfile(config, environment) {
|
|
596
|
+
const requestIdFactory = config.requestIdFactory ?? (() => generatePortableRequestId());
|
|
597
|
+
const parsedMaxRetries = parseIntegerFromString(
|
|
598
|
+
config.maxRetries,
|
|
599
|
+
environment.get(DEFAULT_ENV_MAX_RETRIES)
|
|
600
|
+
);
|
|
601
|
+
const parsedTimeoutMs = parseIntegerFromString(
|
|
602
|
+
config.timeoutMs,
|
|
603
|
+
environment.get(DEFAULT_ENV_TIMEOUT_MS)
|
|
604
|
+
);
|
|
605
|
+
const methodTimeouts = {
|
|
606
|
+
...config.timeoutMsByMethod
|
|
607
|
+
};
|
|
608
|
+
for (const method of ["GET", "POST", "PUT", "PATCH", "DELETE"]) {
|
|
609
|
+
const envKey = `${ENV_TIMEOUT_BY_METHOD_PREFIX}${method}`;
|
|
610
|
+
const raw = environment.get(envKey);
|
|
611
|
+
if (!raw || methodTimeouts[method] !== void 0) {
|
|
612
|
+
continue;
|
|
613
|
+
}
|
|
614
|
+
const parsed = parseIntegerFromString(void 0, raw);
|
|
615
|
+
if (typeof parsed === "number") {
|
|
616
|
+
methodTimeouts[method] = parsed;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return {
|
|
620
|
+
maxRetries: parsedMaxRetries ?? DEFAULT_GATEWAY_MAX_RETRIES,
|
|
621
|
+
timeoutMs: parsedTimeoutMs ?? DEFAULT_GATEWAY_TIMEOUT_MS,
|
|
622
|
+
timeoutMsByMethod: methodTimeouts,
|
|
623
|
+
requestIdFactory
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
function createGatewayRuntime(config, environment) {
|
|
627
|
+
return {
|
|
628
|
+
fetch: config.fetchImpl ?? fetch,
|
|
629
|
+
now: () => Date.now(),
|
|
630
|
+
sleep: (ms) => delay(ms),
|
|
631
|
+
env: environment,
|
|
632
|
+
redaction: resolveRequestRedactionValue,
|
|
633
|
+
profile: resolveRequestProfile(config, environment)
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
function parseIntegerFromString(value, rawValue) {
|
|
637
|
+
if (typeof value === "number" && Number.isInteger(value) && value >= 0) {
|
|
638
|
+
return value;
|
|
639
|
+
}
|
|
640
|
+
if (typeof rawValue !== "string" || !rawValue.trim()) {
|
|
641
|
+
return void 0;
|
|
642
|
+
}
|
|
643
|
+
const parsed = Number.parseInt(rawValue, 10);
|
|
644
|
+
return Number.isInteger(parsed) && parsed >= 0 ? parsed : void 0;
|
|
645
|
+
}
|
|
646
|
+
function resolveRequestRedactionValue(value) {
|
|
647
|
+
return redactDiagnosticValue(value);
|
|
648
|
+
}
|
|
649
|
+
function resolveGatewayBaseUrl(configBaseUrl, environment) {
|
|
650
|
+
const envBaseUrl = environment.get("LUCERN_API_URL") ?? environment.get("LUCERN_BASE_URL") ?? environment.get("LUCERN_GATEWAY_BASE_URL");
|
|
651
|
+
return (configBaseUrl ?? envBaseUrl ?? "").replace(/\/+$/, "");
|
|
652
|
+
}
|
|
653
|
+
function normalizeGatewayEnvironment(value) {
|
|
654
|
+
return value === "sandbox" || value === "production" ? value : void 0;
|
|
655
|
+
}
|
|
512
656
|
var randomIdempotencyKey = generatePortableRequestId;
|
|
513
657
|
function fallbackErrorCode(status) {
|
|
514
658
|
if (status === 401) {
|
|
@@ -548,10 +692,8 @@ function computeRetryDelayMs(args) {
|
|
|
548
692
|
const jitterWindow = Math.max(250, Math.round(baseDelay * 0.25));
|
|
549
693
|
return baseDelay + Math.round(Math.random() * jitterWindow);
|
|
550
694
|
}
|
|
551
|
-
function
|
|
552
|
-
|
|
553
|
-
error.name = "AbortError";
|
|
554
|
-
return error;
|
|
695
|
+
function classifyGatewayErrorForRetry(error) {
|
|
696
|
+
return isGatewayRetryableError(error) || classifyRetry({ error }).retryable;
|
|
555
697
|
}
|
|
556
698
|
function isRecord(value) {
|
|
557
699
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -606,10 +748,18 @@ function cleanHeaderValue(value) {
|
|
|
606
748
|
return normalized ? normalized : void 0;
|
|
607
749
|
}
|
|
608
750
|
function createGatewayRequestClient(config = {}) {
|
|
609
|
-
const
|
|
610
|
-
const
|
|
611
|
-
const
|
|
612
|
-
const
|
|
751
|
+
const env = resolveEnvironment();
|
|
752
|
+
const runtime = createGatewayRuntime(config, env);
|
|
753
|
+
const baseUrl = resolveGatewayBaseUrl(config.baseUrl, env);
|
|
754
|
+
const maxRetries = runtime.profile.maxRetries;
|
|
755
|
+
const requestIdFactory = runtime.profile.requestIdFactory;
|
|
756
|
+
const requestTimeoutByMethod = runtime.profile.timeoutMsByMethod;
|
|
757
|
+
const defaultRequestTimeoutMs = runtime.profile.timeoutMs;
|
|
758
|
+
const normalizedEnvironment = normalizeGatewayEnvironment(config.environment);
|
|
759
|
+
const telemetryExporter = config.telemetryEnabled === false ? null : config.telemetryExporter ?? createTelemetryExporterFromEnv(telemetryEnvironmentRecord(env), {
|
|
760
|
+
service: "lucern-sdk",
|
|
761
|
+
environment: normalizedEnvironment
|
|
762
|
+
});
|
|
613
763
|
async function resolveAuthHeaders() {
|
|
614
764
|
const provided = config.getAuthHeaders ? await config.getAuthHeaders() : {};
|
|
615
765
|
const headers = new Headers(provided);
|
|
@@ -621,7 +771,7 @@ function createGatewayRequestClient(config = {}) {
|
|
|
621
771
|
};
|
|
622
772
|
setIfAbsent("x-lucern-key", config.apiKey);
|
|
623
773
|
setIfAbsent("x-lucern-session-token", config.userToken);
|
|
624
|
-
setIfAbsent("x-lucern-environment",
|
|
774
|
+
setIfAbsent("x-lucern-environment", normalizedEnvironment);
|
|
625
775
|
setIfAbsent("x-lucern-clerk-id", config.clerkId);
|
|
626
776
|
setIfAbsent("x-lucern-user-id", config.userId ?? config.clerkId);
|
|
627
777
|
setIfAbsent("x-lucern-deployment-host", config.deploymentHost);
|
|
@@ -636,19 +786,73 @@ function createGatewayRequestClient(config = {}) {
|
|
|
636
786
|
return mergeHeaderRecord(base, createCanonicalAuthHeaders(authContext));
|
|
637
787
|
}
|
|
638
788
|
async function fetchWithTimeout(url, init, timeoutMs) {
|
|
789
|
+
const normalizeTransportError = (error, isTimeout) => {
|
|
790
|
+
if (isTimeout) {
|
|
791
|
+
return new GatewayTimeoutError(timeoutMs);
|
|
792
|
+
}
|
|
793
|
+
return error instanceof GatewayTimeoutError || error instanceof GatewayTransportError ? error : new GatewayTransportError(
|
|
794
|
+
error instanceof Error ? error.message : "Gateway transport error",
|
|
795
|
+
{
|
|
796
|
+
cause: error,
|
|
797
|
+
retryable: classifyGatewayErrorForRetry(error)
|
|
798
|
+
}
|
|
799
|
+
);
|
|
800
|
+
};
|
|
639
801
|
const controller = new AbortController();
|
|
640
802
|
const timer = setTimeout(() => controller.abort(), timeoutMs);
|
|
803
|
+
const requestEffect = Effect.tryPromise({
|
|
804
|
+
try: () => runtime.fetch(url, { ...init, signal: controller.signal }),
|
|
805
|
+
catch: (error) => normalizeTransportError(error, controller.signal.aborted)
|
|
806
|
+
});
|
|
641
807
|
try {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
throw timeoutError(timeoutMs);
|
|
808
|
+
const exit = await Effect.runPromiseExit(requestEffect);
|
|
809
|
+
if (Exit.isSuccess(exit)) {
|
|
810
|
+
return exit.value;
|
|
646
811
|
}
|
|
647
|
-
|
|
812
|
+
const failure = Array.from(Cause.failures(exit.cause))[0];
|
|
813
|
+
if (failure !== void 0) {
|
|
814
|
+
throw failure;
|
|
815
|
+
}
|
|
816
|
+
throw Cause.squash(exit.cause);
|
|
648
817
|
} finally {
|
|
649
818
|
clearTimeout(timer);
|
|
650
819
|
}
|
|
651
820
|
}
|
|
821
|
+
async function emitSdkResponseTelemetry(context) {
|
|
822
|
+
const retry = classifyRetry({
|
|
823
|
+
status: context.status,
|
|
824
|
+
error: context.error,
|
|
825
|
+
retryAfter: context.retryAfterMs !== null && context.retryAfterMs !== void 0 ? String(context.retryAfterMs / 1e3) : void 0
|
|
826
|
+
});
|
|
827
|
+
await emitTelemetrySignal(telemetryExporter, {
|
|
828
|
+
signalType: "trace",
|
|
829
|
+
surface: "sdk-retry",
|
|
830
|
+
eventName: context.willRetry ? "sdk.retry" : context.error ? "sdk.request.error" : "sdk.request.complete",
|
|
831
|
+
severity: context.error ? context.willRetry ? "warn" : "error" : "info",
|
|
832
|
+
durationMs: context.durationMs,
|
|
833
|
+
metricName: "sdk.request.duration_ms",
|
|
834
|
+
metricValue: context.durationMs,
|
|
835
|
+
correlationId: context.correlationId ?? context.requestId,
|
|
836
|
+
policyTraceId: context.policyTraceId ?? null,
|
|
837
|
+
tenantId: context.headers.get("x-lucern-tenant-id") ?? context.headers.get("x-lucern-tenant") ?? void 0,
|
|
838
|
+
workspaceId: context.headers.get("x-lucern-workspace-id") ?? context.headers.get("x-lucern-workspace") ?? void 0,
|
|
839
|
+
attributes: {
|
|
840
|
+
service: "lucern-sdk",
|
|
841
|
+
operation: "gateway.request",
|
|
842
|
+
path: context.path,
|
|
843
|
+
httpMethod: context.method,
|
|
844
|
+
httpStatus: context.status,
|
|
845
|
+
attempt: context.attempt,
|
|
846
|
+
maxRetries: context.maxRetries,
|
|
847
|
+
retryReason: retry.reason,
|
|
848
|
+
retryAfterMs: context.retryAfterMs ?? retry.retryAfterMs,
|
|
849
|
+
willRetry: context.willRetry,
|
|
850
|
+
retryable: retry.retryable,
|
|
851
|
+
errorName: context.error instanceof Error ? context.error.name : void 0,
|
|
852
|
+
errorMessage: context.error instanceof Error ? context.error.message : void 0
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}
|
|
652
856
|
async function parsePayload(response) {
|
|
653
857
|
const text = await response.text();
|
|
654
858
|
if (!text) {
|
|
@@ -664,11 +868,11 @@ function createGatewayRequestClient(config = {}) {
|
|
|
664
868
|
if (typeof requestTimeoutMs === "number") {
|
|
665
869
|
return requestTimeoutMs;
|
|
666
870
|
}
|
|
667
|
-
const methodTimeoutMs =
|
|
871
|
+
const methodTimeoutMs = requestTimeoutByMethod?.[method];
|
|
668
872
|
if (typeof methodTimeoutMs === "number") {
|
|
669
873
|
return methodTimeoutMs;
|
|
670
874
|
}
|
|
671
|
-
return
|
|
875
|
+
return defaultRequestTimeoutMs;
|
|
672
876
|
}
|
|
673
877
|
function tryParseGatewayEnvelopeJson(text) {
|
|
674
878
|
const trimmed = text.trim();
|
|
@@ -689,8 +893,8 @@ function createGatewayRequestClient(config = {}) {
|
|
|
689
893
|
const legacyError = failure && isRecord(failure.error) ? failure.error : failure?.legacyError;
|
|
690
894
|
const correlationId = failure?.correlationId ?? args.response.headers.get("x-lucern-correlation-id")?.trim() ?? args.requestId;
|
|
691
895
|
const policyTraceId = failure?.policyTraceId ?? args.response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null;
|
|
692
|
-
const details =
|
|
693
|
-
failure?.details ?? legacyError?.details
|
|
896
|
+
const details = runtime.redaction(
|
|
897
|
+
redactJsonDiagnosticValue(failure?.details ?? legacyError?.details)
|
|
694
898
|
);
|
|
695
899
|
const policySummary = readPolicySummaryFromDetails(details);
|
|
696
900
|
const failureMessage = typeof failure?.error === "string" ? failure.error : legacyError?.message;
|
|
@@ -760,7 +964,7 @@ function createGatewayRequestClient(config = {}) {
|
|
|
760
964
|
failure
|
|
761
965
|
});
|
|
762
966
|
const willRetry = attempt < maxRetries && retry.retryable;
|
|
763
|
-
|
|
967
|
+
const responseContext2 = {
|
|
764
968
|
...hookRequestContext,
|
|
765
969
|
durationMs: Date.now() - startedAt,
|
|
766
970
|
status: response.status,
|
|
@@ -770,7 +974,9 @@ function createGatewayRequestClient(config = {}) {
|
|
|
770
974
|
policyTraceId: apiError.policyTraceId ?? null,
|
|
771
975
|
retryAfterMs,
|
|
772
976
|
willRetry
|
|
773
|
-
}
|
|
977
|
+
};
|
|
978
|
+
await config.onResponse?.(responseContext2);
|
|
979
|
+
await emitSdkResponseTelemetry(responseContext2);
|
|
774
980
|
if (willRetry) {
|
|
775
981
|
lastError = apiError;
|
|
776
982
|
await delay(
|
|
@@ -785,7 +991,7 @@ function createGatewayRequestClient(config = {}) {
|
|
|
785
991
|
throw apiError;
|
|
786
992
|
}
|
|
787
993
|
const successPayload = payload;
|
|
788
|
-
|
|
994
|
+
const responseContext = {
|
|
789
995
|
...hookRequestContext,
|
|
790
996
|
durationMs: Date.now() - startedAt,
|
|
791
997
|
status: response.status,
|
|
@@ -795,22 +1001,25 @@ function createGatewayRequestClient(config = {}) {
|
|
|
795
1001
|
idempotentReplay: successPayload.idempotentReplay,
|
|
796
1002
|
retryAfterMs,
|
|
797
1003
|
willRetry: false
|
|
798
|
-
}
|
|
1004
|
+
};
|
|
1005
|
+
await config.onResponse?.(responseContext);
|
|
1006
|
+
await emitSdkResponseTelemetry(responseContext);
|
|
799
1007
|
return successPayload;
|
|
800
1008
|
} catch (fetchError) {
|
|
801
1009
|
if (fetchError instanceof LucernApiError) {
|
|
802
1010
|
throw fetchError;
|
|
803
1011
|
}
|
|
804
|
-
const
|
|
805
|
-
const
|
|
806
|
-
await config.onResponse?.({
|
|
1012
|
+
const willRetry = attempt < maxRetries && classifyGatewayErrorForRetry(fetchError);
|
|
1013
|
+
const responseContext = {
|
|
807
1014
|
...hookRequestContext,
|
|
808
1015
|
durationMs: Date.now() - startedAt,
|
|
809
1016
|
error: fetchError,
|
|
810
1017
|
correlationId: requestId,
|
|
811
1018
|
policyTraceId: null,
|
|
812
1019
|
willRetry
|
|
813
|
-
}
|
|
1020
|
+
};
|
|
1021
|
+
await config.onResponse?.(responseContext);
|
|
1022
|
+
await emitSdkResponseTelemetry(responseContext);
|
|
814
1023
|
lastError = fetchError;
|
|
815
1024
|
if (willRetry) {
|
|
816
1025
|
await delay(computeRetryDelayMs({ attempt }));
|
|
@@ -9732,7 +9941,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
9732
9941
|
}
|
|
9733
9942
|
|
|
9734
9943
|
// src/version.ts
|
|
9735
|
-
var LUCERN_SDK_VERSION = "1.0.
|
|
9944
|
+
var LUCERN_SDK_VERSION = "1.0.2";
|
|
9736
9945
|
|
|
9737
9946
|
// src/workflowClient.ts
|
|
9738
9947
|
function normalizeLensQuery(value) {
|
|
@@ -13039,6 +13248,6 @@ function formatInfisicalRuntimeError(error) {
|
|
|
13039
13248
|
return "Unknown Infisical runtime error shape";
|
|
13040
13249
|
}
|
|
13041
13250
|
|
|
13042
|
-
export { BELIEF_STATUSES, BRANCH_DEPRECATION_MESSAGE, CANONICAL_WORKFLOW_DEFINITIONS, CONFIDENCE_TRIGGERS, CONTRADICTION_SEVERITIES, CONTRADICTION_STATUSES, CONTROL_OBJECT_BLAST_RADII, CONTROL_OBJECT_EDIT_SURFACES, CONTROL_OBJECT_INHERITANCE_RULES, CONTROL_OBJECT_KINDS, CONTROL_OBJECT_OWNERSHIP_CONTRACT, CONTROL_OBJECT_OWNERSHIP_MATRIX, CONTROL_OBJECT_OWNERSHIP_ROWS, CONTROL_OBJECT_OWNER_SCOPES, CustomToolRegistryError, DEFAULT_TIER_APPROVAL_MODE, DEFAULT_WORKFLOW_AUTO_FIX_POLICY, DEFEAT_TYPES, DOMAIN_EVENT_TYPES, DOMAIN_EVENT_VERSION, DeviceAuthorizationError, EDGE_TYPES, EMBEDDINGS_FIELDS, EPISTEMIC_EDGE_TYPES, EPISTEMIC_LAYERS, EVENTING_FIELDS, EVENT_RETENTION_DEFAULT_DAYS, FORK_REASONS, FUNCTION_SURFACE_METHOD_PATHS, GRAPH_ANALYSIS_ANALYSIS_FIELDS, GRAPH_ANALYSIS_COMPUTE_FIELDS, GRAPH_ANALYSIS_SUGGESTION_FIELDS, GRAPH_RECOMMENDATION_FIELDS, GRAPH_STATE_CLASSIFIER_FIELDS, InfisicalRuntimeError, JOBS_FIELDS, JUDGMENT_TYPES, LENS_PERSPECTIVE_TYPES, LENS_STATUSES, LENS_TASK_TEMPLATE_PRIORITIES, LUCERN_SDK_VERSION, LucernAccessControlError, LucernApiError, LucernControlPlaneIdentityError, LucernSdkAuthContextError, MAX_ENTITY_LIMIT, MCP_ALWAYS_ALLOWED_TOOL_NAMES, MERGE_OUTCOMES, MODEL_RUNTIME_FIELDS, MORNING_BRIEF_WORKFLOW_ID, NIGHTLY_RECONCILIATION_WORKFLOW_ID, ONTOLOGY_LINK_FIELDS, ORG_GRAPH_SEARCH_FIELDS, REASONING_METHODS, SESSION_AUTH_MODES, SESSION_LIFECYCLE_STATUSES, SESSION_PRINCIPAL_TYPES, STRUCTURAL_EDGE_TYPES, TELEMETRY_FIELDS, TENANT_IDENTITY_FIELDS, TOOL_REGISTRY_FIELDS, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_MS, WORKFLOW_ACTION_KINDS, WORKFLOW_APPROVAL_MODES, WORKFLOW_AUTO_FIX_MODES, WORKFLOW_HOOK_EVENTS, WORKFLOW_INTEGRITY_CHECKS, WORKFLOW_MUTATION_TIERS, WORKFLOW_OUTPUT_KINDS, WORKFLOW_PROOF_ARTIFACT_KINDS, WORKFLOW_RUNTIME_SCHEMA_VERSION, WORKFLOW_RUN_STATUSES, WORKFLOW_STAFFING_HINTS, WORKFLOW_TRIGGER_KINDS, WORKTREE_PHASES, applyInfisicalRuntimeEnv, asListItems, asRecord, assertPermitAllowed, assertValidWebhookSecret, assertValidWebhookUrl, buildDeprecatedBranchMetadata, buildDomainEvent, buildMcpToolContracts, buildMcpToolManifest, clearRegisteredCustomTools, compareEventCursor, compileContextPackFromSnapshot, computeWebhookSignature, createAccessControlClient, createAdminClient, createAnswersClient, createAudiencesClient, createAuditClient, createAuthDeviceClient, createBeliefsClient, createCanonicalAuthHeaders, createContextClient, createContextFacade, createControlPlaneClient, createControlPlaneIdentityClient, createDecisionsClient, createEmbeddingsClient, createEventId, createEventingClient, createEventsClientCore, createEvidenceClient, createFunctionSurfaceClient, createGatewayRequestClient, createGraphAnalysisClient, createGraphClient, createGraphRecommendationsClient, createGraphStateClassifierClient, createHarnessClient, createIdentityClient, createJobsClient, createLearningClient, createListResult, createLucernClient, createModelRuntimeClient, createOntologyClient, createOntologyLinksClient, createOrgGraphSearchClient, createPacksClient, createPolicyClient, createReportsClient, createSchemaClient, createSourcesClient, createTelemetryClient, createToolRegistryClient, createTopicsClient, createWebhooksClientCore, createWorkflowClient, decodeEventCursor, emitDomainEvent, encodeEventCursor, eventPatternToRegExp, formatPermitResource, getControlObjectOwnershipCase, getMcpToolExposure, getRegisteredCustomTool, hydrateInfisicalRuntimeEnv, inferActorType, inferLensPerspectiveTypeFromBranchSchema, inferSessionPrincipalType, invokeRegisteredCustomTool, isAfterCursor, isInfisicalRuntimeDisabled, isLensFilterCriteria, isLucernPrompt, isMcpToolAllowed, isRecord2 as isRecord, isTaxonomyFilterCriteriaV1, lastDelegator, listControlObjectOwnershipCases, listRegisteredCustomTools, mapAliasedList, mapGatewayData, mapOpinionHistoryEntriesFromGatewayData, matchesAnyEventPattern, matchesEventPattern, mcpContractToInputSchema, mcpContractToManifestEntry, migrateBranchToLens, nextDeliveryAttemptAt, normalizeCanonicalLucernAuthContext, normalizeCanonicalPrincipalIdentity, normalizeDelegationChain, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeResolvedInteractivePrincipal, normalizeRetentionDays, normalizeTopicQuery, normalizeWebhookPatterns, opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, planContextPackCompilation, randomIdempotencyKey, readInfisicalRuntimeBootstrap, registerCustomTool, resolveDeliveryFailureStatus, resolveText, resolveTopicId, sanitizeWebhookRecord, sortEventsByCursor, toQueryString, truncateWebhookResponseBody, unregisterCustomTool, validateFilterCriteria, withSdkAliases, withTextAlias, withTopicAlias };
|
|
13251
|
+
export { BELIEF_STATUSES, BRANCH_DEPRECATION_MESSAGE, CANONICAL_WORKFLOW_DEFINITIONS, CONFIDENCE_TRIGGERS, CONTRADICTION_SEVERITIES, CONTRADICTION_STATUSES, CONTROL_OBJECT_BLAST_RADII, CONTROL_OBJECT_EDIT_SURFACES, CONTROL_OBJECT_INHERITANCE_RULES, CONTROL_OBJECT_KINDS, CONTROL_OBJECT_OWNERSHIP_CONTRACT, CONTROL_OBJECT_OWNERSHIP_MATRIX, CONTROL_OBJECT_OWNERSHIP_ROWS, CONTROL_OBJECT_OWNER_SCOPES, CustomToolRegistryError, DEFAULT_TIER_APPROVAL_MODE, DEFAULT_WORKFLOW_AUTO_FIX_POLICY, DEFEAT_TYPES, DOMAIN_EVENT_TYPES, DOMAIN_EVENT_VERSION, DeviceAuthorizationError, EDGE_TYPES, EMBEDDINGS_FIELDS, EPISTEMIC_EDGE_TYPES, EPISTEMIC_LAYERS, EVENTING_FIELDS, EVENT_RETENTION_DEFAULT_DAYS, FORK_REASONS, FUNCTION_SURFACE_METHOD_PATHS, GRAPH_ANALYSIS_ANALYSIS_FIELDS, GRAPH_ANALYSIS_COMPUTE_FIELDS, GRAPH_ANALYSIS_SUGGESTION_FIELDS, GRAPH_RECOMMENDATION_FIELDS, GRAPH_STATE_CLASSIFIER_FIELDS, GatewayTimeoutError, GatewayTransportError, InfisicalRuntimeError, JOBS_FIELDS, JUDGMENT_TYPES, LENS_PERSPECTIVE_TYPES, LENS_STATUSES, LENS_TASK_TEMPLATE_PRIORITIES, LUCERN_SDK_VERSION, LucernAccessControlError, LucernApiError, LucernControlPlaneIdentityError, LucernSdkAuthContextError, MAX_ENTITY_LIMIT, MCP_ALWAYS_ALLOWED_TOOL_NAMES, MERGE_OUTCOMES, MODEL_RUNTIME_FIELDS, MORNING_BRIEF_WORKFLOW_ID, NIGHTLY_RECONCILIATION_WORKFLOW_ID, ONTOLOGY_LINK_FIELDS, ORG_GRAPH_SEARCH_FIELDS, REASONING_METHODS, SESSION_AUTH_MODES, SESSION_LIFECYCLE_STATUSES, SESSION_PRINCIPAL_TYPES, STRUCTURAL_EDGE_TYPES, TELEMETRY_FIELDS, TENANT_IDENTITY_FIELDS, TOOL_REGISTRY_FIELDS, WEBHOOK_MAX_ATTEMPTS, WEBHOOK_RETRY_DELAYS_MS, WORKFLOW_ACTION_KINDS, WORKFLOW_APPROVAL_MODES, WORKFLOW_AUTO_FIX_MODES, WORKFLOW_HOOK_EVENTS, WORKFLOW_INTEGRITY_CHECKS, WORKFLOW_MUTATION_TIERS, WORKFLOW_OUTPUT_KINDS, WORKFLOW_PROOF_ARTIFACT_KINDS, WORKFLOW_RUNTIME_SCHEMA_VERSION, WORKFLOW_RUN_STATUSES, WORKFLOW_STAFFING_HINTS, WORKFLOW_TRIGGER_KINDS, WORKTREE_PHASES, applyInfisicalRuntimeEnv, asListItems, asRecord, assertPermitAllowed, assertValidWebhookSecret, assertValidWebhookUrl, buildDeprecatedBranchMetadata, buildDomainEvent, buildMcpToolContracts, buildMcpToolManifest, clearRegisteredCustomTools, compareEventCursor, compileContextPackFromSnapshot, computeWebhookSignature, createAccessControlClient, createAdminClient, createAnswersClient, createAudiencesClient, createAuditClient, createAuthDeviceClient, createBeliefsClient, createCanonicalAuthHeaders, createContextClient, createContextFacade, createControlPlaneClient, createControlPlaneIdentityClient, createDecisionsClient, createEmbeddingsClient, createEventId, createEventingClient, createEventsClientCore, createEvidenceClient, createFunctionSurfaceClient, createGatewayRequestClient, createGraphAnalysisClient, createGraphClient, createGraphRecommendationsClient, createGraphStateClassifierClient, createHarnessClient, createIdentityClient, createJobsClient, createLearningClient, createListResult, createLucernClient, createModelRuntimeClient, createOntologyClient, createOntologyLinksClient, createOrgGraphSearchClient, createPacksClient, createPolicyClient, createReportsClient, createSchemaClient, createSourcesClient, createTelemetryClient, createToolRegistryClient, createTopicsClient, createWebhooksClientCore, createWorkflowClient, decodeEventCursor, emitDomainEvent, encodeEventCursor, eventPatternToRegExp, formatPermitResource, getControlObjectOwnershipCase, getMcpToolExposure, getRegisteredCustomTool, hydrateInfisicalRuntimeEnv, inferActorType, inferLensPerspectiveTypeFromBranchSchema, inferSessionPrincipalType, invokeRegisteredCustomTool, isAfterCursor, isGatewayRecoverableError, isGatewayRetryableError, isInfisicalRuntimeDisabled, isLensFilterCriteria, isLucernPrompt, isMcpToolAllowed, isRecord2 as isRecord, isTaxonomyFilterCriteriaV1, lastDelegator, listControlObjectOwnershipCases, listRegisteredCustomTools, mapAliasedList, mapGatewayData, mapOpinionHistoryEntriesFromGatewayData, matchesAnyEventPattern, matchesEventPattern, mcpContractToInputSchema, mcpContractToManifestEntry, migrateBranchToLens, nextDeliveryAttemptAt, normalizeCanonicalLucernAuthContext, normalizeCanonicalPrincipalIdentity, normalizeDelegationChain, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeResolvedInteractivePrincipal, normalizeRetentionDays, normalizeTopicQuery, normalizeWebhookPatterns, opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, planContextPackCompilation, randomIdempotencyKey, readInfisicalRuntimeBootstrap, registerCustomTool, resolveDeliveryFailureStatus, resolveText, resolveTopicId, sanitizeWebhookRecord, sortEventsByCursor, toQueryString, truncateWebhookResponseBody, unregisterCustomTool, validateFilterCriteria, withSdkAliases, withTextAlias, withTopicAlias };
|
|
13043
13252
|
//# sourceMappingURL=index.js.map
|
|
13044
13253
|
//# sourceMappingURL=index.js.map
|