@lucern/sdk 0.3.0-alpha.6 → 0.3.0-alpha.7
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 +3 -0
- package/dist/adminClient.d.ts +8 -8
- package/dist/adminClient.js +47 -36
- package/dist/adminClient.js.map +1 -1
- package/dist/answersClient.js +26 -8
- package/dist/answersClient.js.map +1 -1
- package/dist/audience/index.d.ts +2 -1
- package/dist/audience/index.js +1 -3
- package/dist/audience/index.js.map +1 -1
- package/dist/audiencesClient.d.ts +16 -16
- package/dist/audiencesClient.js +102 -87
- package/dist/audiencesClient.js.map +1 -1
- package/dist/auditClient.js +30 -10
- package/dist/auditClient.js.map +1 -1
- package/dist/authDeviceClient.js +16 -3
- package/dist/authDeviceClient.js.map +1 -1
- package/dist/beliefs/index.d.ts +3 -3
- package/dist/beliefs/index.js +513 -758
- package/dist/beliefs/index.js.map +1 -1
- package/dist/beliefsClient.d.ts +2 -2
- package/dist/beliefsClient.js +31 -19
- package/dist/beliefsClient.js.map +1 -1
- package/dist/boundaryClientSurface.js +10 -3
- package/dist/boundaryClientSurface.js.map +1 -1
- package/dist/client.d.ts +247 -270
- package/dist/client.js +513 -758
- package/dist/client.js.map +1 -1
- package/dist/clientHelpers.d.ts +29 -0
- package/dist/clientHelpers.js +122 -0
- package/dist/clientHelpers.js.map +1 -0
- package/dist/contextClient.js +26 -8
- package/dist/contextClient.js.map +1 -1
- package/dist/contextPackCompiler.js +19 -30
- package/dist/contextPackCompiler.js.map +1 -1
- package/dist/contextPackPolicy.js +7 -17
- package/dist/contextPackPolicy.js.map +1 -1
- package/dist/contracts/index.js +4 -3
- package/dist/contracts/index.js.map +1 -1
- package/dist/contracts/lens-filter.contract.js +4 -3
- package/dist/contracts/lens-filter.contract.js.map +1 -1
- package/dist/contracts/lens-workflow.contract.js +4 -3
- package/dist/contracts/lens-workflow.contract.js.map +1 -1
- package/dist/contracts/lensFilter.js +4 -3
- package/dist/contracts/lensFilter.js.map +1 -1
- package/dist/contracts/lensWorkflow.js +4 -3
- package/dist/contracts/lensWorkflow.js.map +1 -1
- package/dist/contradictions/index.d.ts +2 -2
- package/dist/contradictions/index.js +513 -758
- package/dist/contradictions/index.js.map +1 -1
- package/dist/coreClient.d.ts +2 -1
- package/dist/coreClient.js +27 -11
- package/dist/coreClient.js.map +1 -1
- package/dist/decisions/index.d.ts +12 -12
- package/dist/decisions/index.js +513 -758
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisionsClient.d.ts +4 -12
- package/dist/decisionsClient.js +37 -31
- package/dist/decisionsClient.js.map +1 -1
- package/dist/edges/index.d.ts +2 -2
- package/dist/edges/index.js +513 -758
- package/dist/edges/index.js.map +1 -1
- package/dist/embeddingsClient.js +37 -14
- package/dist/embeddingsClient.js.map +1 -1
- package/dist/eventingClient.js +37 -14
- package/dist/eventingClient.js.map +1 -1
- package/dist/events.js +6 -3
- package/dist/events.js.map +1 -1
- package/dist/eventsCore.d.ts +1 -1
- package/dist/eventsCore.js +27 -11
- package/dist/eventsCore.js.map +1 -1
- package/dist/evidence/index.d.ts +2 -2
- package/dist/evidence/index.js +513 -758
- package/dist/evidence/index.js.map +1 -1
- package/dist/evidenceClient.js +27 -11
- package/dist/evidenceClient.js.map +1 -1
- package/dist/functionSurface.js +27 -11
- package/dist/functionSurface.js.map +1 -1
- package/dist/functionSurfaceClient.js +27 -11
- package/dist/functionSurfaceClient.js.map +1 -1
- package/dist/gatewayFacades.d.ts +27 -45
- package/dist/gatewayFacades.js +92 -118
- package/dist/gatewayFacades.js.map +1 -1
- package/dist/graphAnalysisClient.js +31 -12
- package/dist/graphAnalysisClient.js.map +1 -1
- package/dist/graphClient.d.ts +5 -13
- package/dist/graphClient.js +42 -35
- package/dist/graphClient.js.map +1 -1
- package/dist/graphRecommendationsClient.js +31 -13
- package/dist/graphRecommendationsClient.js.map +1 -1
- package/dist/graphStateClassifierClient.js +37 -15
- package/dist/graphStateClassifierClient.js.map +1 -1
- package/dist/harnessClient.d.ts +13 -24
- package/dist/harnessClient.js +38 -37
- package/dist/harnessClient.js.map +1 -1
- package/dist/identityClient.d.ts +8 -8
- package/dist/identityClient.js +48 -31
- package/dist/identityClient.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +592 -819
- package/dist/index.js.map +1 -1
- package/dist/infisicalRuntime.js +47 -24
- package/dist/infisicalRuntime.js.map +1 -1
- package/dist/jobsClient.js +37 -15
- package/dist/jobsClient.js.map +1 -1
- package/dist/learningClient.d.ts +6 -6
- package/dist/learningClient.js +55 -39
- package/dist/learningClient.js.map +1 -1
- package/dist/lenses/index.d.ts +29 -35
- package/dist/lenses/index.js +513 -758
- package/dist/lenses/index.js.map +1 -1
- package/dist/mcpClient.js +26 -8
- package/dist/mcpClient.js.map +1 -1
- package/dist/modelRuntimeClient.js +37 -14
- package/dist/modelRuntimeClient.js.map +1 -1
- package/dist/nodes/index.d.ts +17 -17
- package/dist/nodes/index.js +513 -758
- package/dist/nodes/index.js.map +1 -1
- package/dist/ontologies/index.d.ts +31 -30
- package/dist/ontologies/index.js +513 -758
- package/dist/ontologies/index.js.map +1 -1
- package/dist/ontologyClient.d.ts +17 -25
- package/dist/ontologyClient.js +63 -37
- package/dist/ontologyClient.js.map +1 -1
- package/dist/ontologyLinksClient.js +37 -15
- package/dist/ontologyLinksClient.js.map +1 -1
- package/dist/orgGraphSearchClient.js +30 -10
- package/dist/orgGraphSearchClient.js.map +1 -1
- package/dist/packsClient.d.ts +9 -23
- package/dist/packsClient.js +39 -43
- package/dist/packsClient.js.map +1 -1
- package/dist/policyClient.d.ts +11 -10
- package/dist/policyClient.js +48 -22
- package/dist/policyClient.js.map +1 -1
- package/dist/questions/index.d.ts +2 -2
- package/dist/questions/index.js +513 -758
- package/dist/questions/index.js.map +1 -1
- package/dist/realtime/index.d.ts +1 -1
- package/dist/reportsClient.d.ts +7 -7
- package/dist/reportsClient.js +84 -48
- package/dist/reportsClient.js.map +1 -1
- package/dist/schemaClient.d.ts +3 -3
- package/dist/schemaClient.js +40 -26
- package/dist/schemaClient.js.map +1 -1
- package/dist/sdkSurface.d.ts +6 -3
- package/dist/sdkSurface.js +10 -6
- package/dist/sdkSurface.js.map +1 -1
- package/dist/sourcesClient.js +27 -11
- package/dist/sourcesClient.js.map +1 -1
- package/dist/telemetryClient.js +37 -15
- package/dist/telemetryClient.js.map +1 -1
- package/dist/toolRegistryClient.d.ts +10 -2
- package/dist/toolRegistryClient.js +50 -16
- package/dist/toolRegistryClient.js.map +1 -1
- package/dist/topics/index.d.ts +5 -5
- package/dist/topics/index.js +513 -758
- package/dist/topics/index.js.map +1 -1
- package/dist/topicsClient.js +37 -16
- 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 +15 -33
- package/dist/workflowClient.js +43 -50
- package/dist/workflowClient.js.map +1 -1
- package/dist/worktrees/index.d.ts +22 -30
- package/dist/worktrees/index.js +513 -758
- package/dist/worktrees/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -112,6 +112,7 @@ __export(src_exports, {
|
|
|
112
112
|
WORKTREE_PHASES: () => WORKTREE_PHASES,
|
|
113
113
|
applyInfisicalRuntimeEnv: () => applyInfisicalRuntimeEnv,
|
|
114
114
|
asListItems: () => asListItems,
|
|
115
|
+
asRecord: () => asRecord,
|
|
115
116
|
assertValidWebhookSecret: () => assertValidWebhookSecret,
|
|
116
117
|
assertValidWebhookUrl: () => assertValidWebhookUrl,
|
|
117
118
|
buildDeprecatedBranchMetadata: () => buildDeprecatedBranchMetadata,
|
|
@@ -183,6 +184,7 @@ __export(src_exports, {
|
|
|
183
184
|
isLensFilterCriteria: () => isLensFilterCriteria,
|
|
184
185
|
isLucernPrompt: () => isLucernPrompt,
|
|
185
186
|
isMcpToolAllowed: () => isMcpToolAllowed,
|
|
187
|
+
isRecord: () => isRecord2,
|
|
186
188
|
isTaxonomyFilterCriteriaV1: () => isTaxonomyFilterCriteriaV1,
|
|
187
189
|
lastDelegator: () => lastDelegator,
|
|
188
190
|
listControlObjectOwnershipCases: () => listControlObjectOwnershipCases,
|
|
@@ -491,9 +493,7 @@ function generatePortableRequestId() {
|
|
|
491
493
|
8
|
|
492
494
|
).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
|
|
493
495
|
}
|
|
494
|
-
|
|
495
|
-
return generatePortableRequestId();
|
|
496
|
-
}
|
|
496
|
+
var randomIdempotencyKey = generatePortableRequestId;
|
|
497
497
|
function isRetryableStatus(status) {
|
|
498
498
|
return status >= 500 || status === 408 || status === 429;
|
|
499
499
|
}
|
|
@@ -558,8 +558,11 @@ function timeoutError(timeoutMs) {
|
|
|
558
558
|
error.name = "AbortError";
|
|
559
559
|
return error;
|
|
560
560
|
}
|
|
561
|
+
function isRecord(value) {
|
|
562
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
563
|
+
}
|
|
561
564
|
function readPolicySummaryFromDetails(details) {
|
|
562
|
-
if (!
|
|
565
|
+
if (!isRecord(details)) {
|
|
563
566
|
return null;
|
|
564
567
|
}
|
|
565
568
|
const directSummary = details.summary;
|
|
@@ -567,11 +570,11 @@ function readPolicySummaryFromDetails(details) {
|
|
|
567
570
|
return directSummary.trim();
|
|
568
571
|
}
|
|
569
572
|
const policy = details.policy;
|
|
570
|
-
if (!
|
|
573
|
+
if (!isRecord(policy)) {
|
|
571
574
|
return null;
|
|
572
575
|
}
|
|
573
576
|
const explanation = policy.explanation;
|
|
574
|
-
if (!
|
|
577
|
+
if (!isRecord(explanation)) {
|
|
575
578
|
return null;
|
|
576
579
|
}
|
|
577
580
|
const nestedSummary = explanation.summary;
|
|
@@ -635,11 +638,11 @@ function createGatewayRequestClient(config = {}) {
|
|
|
635
638
|
if (!text) {
|
|
636
639
|
return null;
|
|
637
640
|
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
} catch {
|
|
641
|
+
const parsed = tryParseGatewayEnvelopeJson(text);
|
|
642
|
+
if (!parsed.ok) {
|
|
641
643
|
return null;
|
|
642
644
|
}
|
|
645
|
+
return isRecord(parsed.value) ? parsed.value : null;
|
|
643
646
|
}
|
|
644
647
|
function resolveTimeoutMs(method, requestTimeoutMs) {
|
|
645
648
|
if (typeof requestTimeoutMs === "number") {
|
|
@@ -651,16 +654,31 @@ function createGatewayRequestClient(config = {}) {
|
|
|
651
654
|
}
|
|
652
655
|
return config.timeoutMs ?? 15e3;
|
|
653
656
|
}
|
|
657
|
+
function tryParseGatewayEnvelopeJson(text) {
|
|
658
|
+
const trimmed = text.trim();
|
|
659
|
+
if (!trimmed.startsWith("{") && !trimmed.startsWith("[")) {
|
|
660
|
+
return { ok: false, reason: "non-json" };
|
|
661
|
+
}
|
|
662
|
+
try {
|
|
663
|
+
return { ok: true, value: JSON.parse(trimmed) };
|
|
664
|
+
} catch (error) {
|
|
665
|
+
if (error instanceof SyntaxError) {
|
|
666
|
+
return { ok: false, reason: "invalid-json", error };
|
|
667
|
+
}
|
|
668
|
+
throw error;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
654
671
|
function buildApiError(args) {
|
|
655
672
|
const failure = args.failure;
|
|
656
|
-
const legacyError = failure &&
|
|
673
|
+
const legacyError = failure && isRecord(failure.error) ? failure.error : failure?.legacyError;
|
|
657
674
|
const correlationId = failure?.correlationId ?? args.response.headers.get("x-lucern-correlation-id")?.trim() ?? args.requestId;
|
|
658
675
|
const policyTraceId = failure?.policyTraceId ?? args.response.headers.get("x-lucern-policy-trace-id")?.trim() ?? null;
|
|
659
676
|
const details = failure?.details ?? legacyError?.details;
|
|
660
677
|
const policySummary = readPolicySummaryFromDetails(details);
|
|
678
|
+
const failureMessage = typeof failure?.error === "string" ? failure.error : legacyError?.message;
|
|
661
679
|
return new LucernApiError({
|
|
662
680
|
code: failure?.code ?? legacyError?.code ?? fallbackErrorCode(args.response.status),
|
|
663
|
-
message: policySummary ??
|
|
681
|
+
message: policySummary ?? failureMessage ?? (args.response.ok ? "Platform API returned an invalid success payload." : "Platform API request failed."),
|
|
664
682
|
status: args.response.status,
|
|
665
683
|
invariant: failure?.invariant,
|
|
666
684
|
suggestion: failure?.suggestion,
|
|
@@ -786,8 +804,11 @@ function createGatewayRequestClient(config = {}) {
|
|
|
786
804
|
}
|
|
787
805
|
|
|
788
806
|
// src/sdkSurface.ts
|
|
807
|
+
function isRecord2(value) {
|
|
808
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
809
|
+
}
|
|
789
810
|
function asRecord(value) {
|
|
790
|
-
return value
|
|
811
|
+
return isRecord2(value) ? value : {};
|
|
791
812
|
}
|
|
792
813
|
function cleanString2(value) {
|
|
793
814
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
@@ -848,9 +869,7 @@ function normalizeNodeWriteInput(value) {
|
|
|
848
869
|
}
|
|
849
870
|
return next;
|
|
850
871
|
}
|
|
851
|
-
|
|
852
|
-
return normalizeVerificationStatus(value);
|
|
853
|
-
}
|
|
872
|
+
var normalizeNodeVerificationStatus = normalizeVerificationStatus;
|
|
854
873
|
function normalizeTopicQuery(value) {
|
|
855
874
|
const topicId = cleanString2(value.topicId);
|
|
856
875
|
if (!topicId) {
|
|
@@ -877,7 +896,10 @@ function createListResult(items, legacyKey) {
|
|
|
877
896
|
total: items.length
|
|
878
897
|
};
|
|
879
898
|
if (legacyKey) {
|
|
880
|
-
|
|
899
|
+
return {
|
|
900
|
+
...result,
|
|
901
|
+
[legacyKey]: items
|
|
902
|
+
};
|
|
881
903
|
}
|
|
882
904
|
return result;
|
|
883
905
|
}
|
|
@@ -921,6 +943,17 @@ function asTenantVaultSecretArray(data) {
|
|
|
921
943
|
}
|
|
922
944
|
function createAdminClient(config = {}) {
|
|
923
945
|
const gateway = createGatewayRequestClient(config);
|
|
946
|
+
const getControlObjectOwnership = async () => gateway.request({
|
|
947
|
+
path: "/api/platform/v1/admin/control-ownership"
|
|
948
|
+
});
|
|
949
|
+
const createMembership = async (input, idempotencyKey) => gateway.request({
|
|
950
|
+
path: "/api/platform/v1/memberships",
|
|
951
|
+
method: "POST",
|
|
952
|
+
body: input,
|
|
953
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
954
|
+
});
|
|
955
|
+
const updateMembership = createMembership;
|
|
956
|
+
const upsertMembership = createMembership;
|
|
924
957
|
return {
|
|
925
958
|
/**
|
|
926
959
|
* List tenants visible to the current principal.
|
|
@@ -952,19 +985,11 @@ function createAdminClient(config = {}) {
|
|
|
952
985
|
/**
|
|
953
986
|
* Get the control-object ownership contract.
|
|
954
987
|
*/
|
|
955
|
-
|
|
956
|
-
return gateway.request({
|
|
957
|
-
path: "/api/platform/v1/admin/control-ownership"
|
|
958
|
-
});
|
|
959
|
-
},
|
|
988
|
+
getControlObjectOwnership,
|
|
960
989
|
/**
|
|
961
990
|
* @deprecated Use getControlObjectOwnership.
|
|
962
991
|
*/
|
|
963
|
-
|
|
964
|
-
return gateway.request({
|
|
965
|
-
path: "/api/platform/v1/admin/control-ownership"
|
|
966
|
-
});
|
|
967
|
-
},
|
|
992
|
+
getControlObjectOwnershipContract: getControlObjectOwnership,
|
|
968
993
|
/**
|
|
969
994
|
* List workspaces for the current admin scope.
|
|
970
995
|
*/
|
|
@@ -1011,26 +1036,15 @@ function createAdminClient(config = {}) {
|
|
|
1011
1036
|
/**
|
|
1012
1037
|
* Create a membership.
|
|
1013
1038
|
*/
|
|
1014
|
-
|
|
1015
|
-
return gateway.request({
|
|
1016
|
-
path: "/api/platform/v1/memberships",
|
|
1017
|
-
method: "POST",
|
|
1018
|
-
body: input,
|
|
1019
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1020
|
-
});
|
|
1021
|
-
},
|
|
1039
|
+
createMembership,
|
|
1022
1040
|
/**
|
|
1023
1041
|
* Update a membership.
|
|
1024
1042
|
*/
|
|
1025
|
-
|
|
1026
|
-
return this.createMembership(input, idempotencyKey);
|
|
1027
|
-
},
|
|
1043
|
+
updateMembership,
|
|
1028
1044
|
/**
|
|
1029
1045
|
* @deprecated Use createMembership or updateMembership.
|
|
1030
1046
|
*/
|
|
1031
|
-
|
|
1032
|
-
return this.createMembership(input, idempotencyKey);
|
|
1033
|
-
},
|
|
1047
|
+
upsertMembership,
|
|
1034
1048
|
/**
|
|
1035
1049
|
* List tenant API keys in the current admin scope.
|
|
1036
1050
|
*/
|
|
@@ -1312,115 +1326,111 @@ function createAnswersClient(config = {}) {
|
|
|
1312
1326
|
// src/audiencesClient.ts
|
|
1313
1327
|
function createAudiencesClient(config = {}) {
|
|
1314
1328
|
const gateway = createGatewayRequestClient(config);
|
|
1329
|
+
const listRegistry = async (query5 = {}) => {
|
|
1330
|
+
return gateway.request({
|
|
1331
|
+
path: `/api/platform/v1/audiences/registry${toQueryString({
|
|
1332
|
+
...query5,
|
|
1333
|
+
effective: typeof query5.effective === "boolean" ? query5.effective ? "true" : "false" : void 0,
|
|
1334
|
+
status: query5.status
|
|
1335
|
+
})}`
|
|
1336
|
+
}).then(
|
|
1337
|
+
(response) => mapGatewayData(
|
|
1338
|
+
response,
|
|
1339
|
+
(data) => createListResult(Array.isArray(data) ? data : [], "registryEntries")
|
|
1340
|
+
)
|
|
1341
|
+
);
|
|
1342
|
+
};
|
|
1343
|
+
const createRegistryEntry = async (input, idempotencyKey) => {
|
|
1344
|
+
return gateway.request({
|
|
1345
|
+
path: "/api/platform/v1/audiences/registry",
|
|
1346
|
+
method: "POST",
|
|
1347
|
+
body: input,
|
|
1348
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1349
|
+
});
|
|
1350
|
+
};
|
|
1351
|
+
const updateRegistryEntry = createRegistryEntry;
|
|
1352
|
+
const upsertRegistry = createRegistryEntry;
|
|
1353
|
+
const getRegistry = listRegistry;
|
|
1354
|
+
const listGrants = async (query5 = {}) => {
|
|
1355
|
+
return gateway.request({
|
|
1356
|
+
path: `/api/platform/v1/audiences/grants${toQueryString({
|
|
1357
|
+
...query5,
|
|
1358
|
+
audienceKey: query5.audienceKey,
|
|
1359
|
+
principalId: query5.principalId,
|
|
1360
|
+
groupId: query5.groupId,
|
|
1361
|
+
status: query5.status
|
|
1362
|
+
})}`
|
|
1363
|
+
}).then(
|
|
1364
|
+
(response) => mapGatewayData(
|
|
1365
|
+
response,
|
|
1366
|
+
(data) => createListResult(Array.isArray(data) ? data : [], "grants")
|
|
1367
|
+
)
|
|
1368
|
+
);
|
|
1369
|
+
};
|
|
1370
|
+
const createGrant = async (input, idempotencyKey) => {
|
|
1371
|
+
return gateway.request({
|
|
1372
|
+
path: "/api/platform/v1/audiences/grants",
|
|
1373
|
+
method: "POST",
|
|
1374
|
+
body: input,
|
|
1375
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1376
|
+
});
|
|
1377
|
+
};
|
|
1378
|
+
const getGrants = listGrants;
|
|
1379
|
+
const grant = createGrant;
|
|
1380
|
+
const deleteGrant = async (input, idempotencyKey) => {
|
|
1381
|
+
return gateway.request({
|
|
1382
|
+
path: "/api/platform/v1/audiences/grants/revoke",
|
|
1383
|
+
method: "POST",
|
|
1384
|
+
body: input,
|
|
1385
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1386
|
+
});
|
|
1387
|
+
};
|
|
1388
|
+
const revokeGrant = deleteGrant;
|
|
1315
1389
|
return {
|
|
1316
1390
|
/**
|
|
1317
1391
|
* List audience registry entries.
|
|
1318
1392
|
*/
|
|
1319
|
-
|
|
1320
|
-
return gateway.request({
|
|
1321
|
-
path: `/api/platform/v1/audiences/registry${toQueryString({
|
|
1322
|
-
...query5,
|
|
1323
|
-
effective: typeof query5.effective === "boolean" ? query5.effective ? "true" : "false" : void 0,
|
|
1324
|
-
status: query5.status
|
|
1325
|
-
})}`
|
|
1326
|
-
}).then(
|
|
1327
|
-
(response) => mapGatewayData(
|
|
1328
|
-
response,
|
|
1329
|
-
(data) => createListResult(
|
|
1330
|
-
Array.isArray(data) ? data : [],
|
|
1331
|
-
"registryEntries"
|
|
1332
|
-
)
|
|
1333
|
-
)
|
|
1334
|
-
);
|
|
1335
|
-
},
|
|
1393
|
+
listRegistry,
|
|
1336
1394
|
/**
|
|
1337
1395
|
* @deprecated Use listRegistry.
|
|
1338
1396
|
*/
|
|
1339
|
-
|
|
1340
|
-
return this.listRegistry(query5);
|
|
1341
|
-
},
|
|
1397
|
+
getRegistry,
|
|
1342
1398
|
/**
|
|
1343
1399
|
* Create an audience registry entry.
|
|
1344
1400
|
*/
|
|
1345
|
-
|
|
1346
|
-
return gateway.request({
|
|
1347
|
-
path: "/api/platform/v1/audiences/registry",
|
|
1348
|
-
method: "POST",
|
|
1349
|
-
body: input,
|
|
1350
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1351
|
-
});
|
|
1352
|
-
},
|
|
1401
|
+
createRegistryEntry,
|
|
1353
1402
|
/**
|
|
1354
1403
|
* Update an audience registry entry.
|
|
1355
1404
|
*/
|
|
1356
|
-
|
|
1357
|
-
return this.createRegistryEntry(input, idempotencyKey);
|
|
1358
|
-
},
|
|
1405
|
+
updateRegistryEntry,
|
|
1359
1406
|
/**
|
|
1360
1407
|
* @deprecated Use createRegistryEntry or updateRegistryEntry.
|
|
1361
1408
|
*/
|
|
1362
|
-
|
|
1363
|
-
return this.createRegistryEntry(input, idempotencyKey);
|
|
1364
|
-
},
|
|
1409
|
+
upsertRegistry,
|
|
1365
1410
|
/**
|
|
1366
1411
|
* List audience grants.
|
|
1367
1412
|
*/
|
|
1368
|
-
|
|
1369
|
-
return gateway.request({
|
|
1370
|
-
path: `/api/platform/v1/audiences/grants${toQueryString({
|
|
1371
|
-
...query5,
|
|
1372
|
-
audienceKey: query5.audienceKey,
|
|
1373
|
-
principalId: query5.principalId,
|
|
1374
|
-
groupId: query5.groupId,
|
|
1375
|
-
status: query5.status
|
|
1376
|
-
})}`
|
|
1377
|
-
}).then(
|
|
1378
|
-
(response) => mapGatewayData(
|
|
1379
|
-
response,
|
|
1380
|
-
(data) => createListResult(Array.isArray(data) ? data : [], "grants")
|
|
1381
|
-
)
|
|
1382
|
-
);
|
|
1383
|
-
},
|
|
1413
|
+
listGrants,
|
|
1384
1414
|
/**
|
|
1385
1415
|
* @deprecated Use listGrants.
|
|
1386
1416
|
*/
|
|
1387
|
-
|
|
1388
|
-
return this.listGrants(query5);
|
|
1389
|
-
},
|
|
1417
|
+
getGrants,
|
|
1390
1418
|
/**
|
|
1391
1419
|
* Create an audience grant.
|
|
1392
1420
|
*/
|
|
1393
|
-
|
|
1394
|
-
return gateway.request({
|
|
1395
|
-
path: "/api/platform/v1/audiences/grants",
|
|
1396
|
-
method: "POST",
|
|
1397
|
-
body: input,
|
|
1398
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1399
|
-
});
|
|
1400
|
-
},
|
|
1421
|
+
createGrant,
|
|
1401
1422
|
/**
|
|
1402
1423
|
* @deprecated Use createGrant.
|
|
1403
1424
|
*/
|
|
1404
|
-
|
|
1405
|
-
return this.createGrant(input, idempotencyKey);
|
|
1406
|
-
},
|
|
1425
|
+
grant,
|
|
1407
1426
|
/**
|
|
1408
1427
|
* Delete an audience grant by revoking it.
|
|
1409
1428
|
*/
|
|
1410
|
-
|
|
1411
|
-
return gateway.request({
|
|
1412
|
-
path: "/api/platform/v1/audiences/grants/revoke",
|
|
1413
|
-
method: "POST",
|
|
1414
|
-
body: input,
|
|
1415
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1416
|
-
});
|
|
1417
|
-
},
|
|
1429
|
+
deleteGrant,
|
|
1418
1430
|
/**
|
|
1419
1431
|
* @deprecated Use deleteGrant.
|
|
1420
1432
|
*/
|
|
1421
|
-
|
|
1422
|
-
return this.deleteGrant(input, idempotencyKey);
|
|
1423
|
-
}
|
|
1433
|
+
revokeGrant
|
|
1424
1434
|
};
|
|
1425
1435
|
}
|
|
1426
1436
|
|
|
@@ -1461,8 +1471,18 @@ function authBaseUrl(config) {
|
|
|
1461
1471
|
return config.baseUrl?.replace(/\/+$/, "") ?? "";
|
|
1462
1472
|
}
|
|
1463
1473
|
async function readJson(response) {
|
|
1464
|
-
|
|
1465
|
-
|
|
1474
|
+
try {
|
|
1475
|
+
const payload = await response.json();
|
|
1476
|
+
return isRecord3(payload) ? payload : {};
|
|
1477
|
+
} catch (error) {
|
|
1478
|
+
return unreadableJsonBodyFallback();
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
function unreadableJsonBodyFallback(_error) {
|
|
1482
|
+
return {};
|
|
1483
|
+
}
|
|
1484
|
+
function isRecord3(value) {
|
|
1485
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
1466
1486
|
}
|
|
1467
1487
|
function readString(value) {
|
|
1468
1488
|
const normalized = typeof value === "string" ? value.trim() : "";
|
|
@@ -1504,7 +1524,10 @@ function assertDeviceTokenResponse(payload) {
|
|
|
1504
1524
|
tenant_id: tenantId,
|
|
1505
1525
|
workspace_id: readString(payload.workspace_id),
|
|
1506
1526
|
principal_id: principalId,
|
|
1507
|
-
user: payload.user && typeof payload.user === "
|
|
1527
|
+
user: isRecord3(payload.user) && typeof payload.user.id === "string" && typeof payload.user.principalId === "string" ? {
|
|
1528
|
+
id: payload.user.id,
|
|
1529
|
+
principalId: payload.user.principalId
|
|
1530
|
+
} : void 0
|
|
1508
1531
|
};
|
|
1509
1532
|
}
|
|
1510
1533
|
function maybeThrowDeviceError(payload) {
|
|
@@ -1652,12 +1675,12 @@ function createBeliefsClient(config = {}) {
|
|
|
1652
1675
|
body: normalizeModulateConfidenceInput(input),
|
|
1653
1676
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
1654
1677
|
});
|
|
1655
|
-
async
|
|
1678
|
+
const getOpinionHistory = async (beliefId) => {
|
|
1656
1679
|
const response = await gateway.request({
|
|
1657
1680
|
path: `/api/platform/v1/beliefs/${encodeURIComponent(beliefId)}/confidence-history`
|
|
1658
1681
|
});
|
|
1659
1682
|
return mapOpinionHistoryEntriesFromGatewayData(response.data);
|
|
1660
|
-
}
|
|
1683
|
+
};
|
|
1661
1684
|
return {
|
|
1662
1685
|
/**
|
|
1663
1686
|
* Create a belief within a topic scope.
|
|
@@ -1702,13 +1725,9 @@ function createBeliefsClient(config = {}) {
|
|
|
1702
1725
|
* trigger = cause of the score change
|
|
1703
1726
|
* triggeringRef = optional pointer to the evidence or worktree that drove the change
|
|
1704
1727
|
*/
|
|
1705
|
-
|
|
1706
|
-
return getOpinionHistory(beliefId);
|
|
1707
|
-
},
|
|
1728
|
+
getOpinionHistory,
|
|
1708
1729
|
/** @deprecated Use getOpinionHistory(). */
|
|
1709
|
-
|
|
1710
|
-
return getOpinionHistory(beliefId);
|
|
1711
|
-
},
|
|
1730
|
+
getConfidenceHistory: getOpinionHistory,
|
|
1712
1731
|
/**
|
|
1713
1732
|
* Fork a scored belief into a new formulation.
|
|
1714
1733
|
*/
|
|
@@ -1856,6 +1875,9 @@ function cleanOptionalString(value) {
|
|
|
1856
1875
|
const normalized = value?.trim();
|
|
1857
1876
|
return normalized ? normalized : void 0;
|
|
1858
1877
|
}
|
|
1878
|
+
function isRecord4(value) {
|
|
1879
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1880
|
+
}
|
|
1859
1881
|
function cleanRequiredString(value, label) {
|
|
1860
1882
|
const normalized = cleanOptionalString(value);
|
|
1861
1883
|
if (!normalized) {
|
|
@@ -1895,9 +1917,10 @@ function topicPayload(input, allowed, operation) {
|
|
|
1895
1917
|
};
|
|
1896
1918
|
}
|
|
1897
1919
|
function listResultFromEnvelope(data, legacyKey) {
|
|
1898
|
-
const record = data
|
|
1920
|
+
const record = isRecord4(data) ? data : {};
|
|
1921
|
+
const legacyItems = record[legacyKey];
|
|
1899
1922
|
return createListResult(
|
|
1900
|
-
Array.isArray(
|
|
1923
|
+
Array.isArray(legacyItems) ? legacyItems : Array.isArray(data) ? data : [],
|
|
1901
1924
|
legacyKey
|
|
1902
1925
|
);
|
|
1903
1926
|
}
|
|
@@ -2269,7 +2292,7 @@ async function invokeRegisteredCustomTool(fullName, params, context) {
|
|
|
2269
2292
|
// src/ontologyClient.ts
|
|
2270
2293
|
function createOntologyClient(config = {}) {
|
|
2271
2294
|
const gateway = createGatewayRequestClient(config);
|
|
2272
|
-
|
|
2295
|
+
const client = {
|
|
2273
2296
|
/**
|
|
2274
2297
|
* List ontology definitions matching optional filters.
|
|
2275
2298
|
*/
|
|
@@ -2278,13 +2301,14 @@ function createOntologyClient(config = {}) {
|
|
|
2278
2301
|
path: `/api/platform/v1/ontologies${toQueryString(filters)}`
|
|
2279
2302
|
}).then(
|
|
2280
2303
|
(response) => mapGatewayData(response, (data) => {
|
|
2281
|
-
const record =
|
|
2282
|
-
const ontologies =
|
|
2283
|
-
const
|
|
2304
|
+
const record = asRecord(data);
|
|
2305
|
+
const ontologies = asListItems(data, "ontologies");
|
|
2306
|
+
const definitions = ontologies.length > 0 ? ontologies : asListItems(data, "definitions");
|
|
2307
|
+
const total = typeof record.total === "number" && Number.isFinite(record.total) ? record.total : definitions.length;
|
|
2284
2308
|
return {
|
|
2285
2309
|
...record,
|
|
2286
|
-
...createListResult(
|
|
2287
|
-
ontologies,
|
|
2310
|
+
...createListResult(definitions, "definitions"),
|
|
2311
|
+
ontologies: definitions,
|
|
2288
2312
|
total
|
|
2289
2313
|
};
|
|
2290
2314
|
})
|
|
@@ -2311,18 +2335,6 @@ function createOntologyClient(config = {}) {
|
|
|
2311
2335
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
2312
2336
|
});
|
|
2313
2337
|
},
|
|
2314
|
-
/**
|
|
2315
|
-
* List ontology definitions.
|
|
2316
|
-
*/
|
|
2317
|
-
async listDefinitions(filters = {}) {
|
|
2318
|
-
return this.list(filters);
|
|
2319
|
-
},
|
|
2320
|
-
/**
|
|
2321
|
-
* Get an ontology definition.
|
|
2322
|
-
*/
|
|
2323
|
-
async getDefinition(id) {
|
|
2324
|
-
return this.get(id);
|
|
2325
|
-
},
|
|
2326
2338
|
/**
|
|
2327
2339
|
* Create an ontology definition.
|
|
2328
2340
|
*/
|
|
@@ -2364,7 +2376,7 @@ function createOntologyClient(config = {}) {
|
|
|
2364
2376
|
}).then(
|
|
2365
2377
|
(response) => mapGatewayData(
|
|
2366
2378
|
response,
|
|
2367
|
-
(data) => createListResult(
|
|
2379
|
+
(data) => createListResult(asListItems(data, "versions"), "versions")
|
|
2368
2380
|
)
|
|
2369
2381
|
);
|
|
2370
2382
|
},
|
|
@@ -2412,20 +2424,19 @@ function createOntologyClient(config = {}) {
|
|
|
2412
2424
|
(data) => createListResult(Array.isArray(data) ? data : [], "topics")
|
|
2413
2425
|
)
|
|
2414
2426
|
);
|
|
2415
|
-
},
|
|
2416
|
-
/**
|
|
2417
|
-
* @deprecated Use listTopics.
|
|
2418
|
-
*/
|
|
2419
|
-
async listTopicsByOntology(ontologyId) {
|
|
2420
|
-
return this.listTopics(ontologyId);
|
|
2421
2427
|
}
|
|
2422
2428
|
};
|
|
2429
|
+
return Object.assign(client, {
|
|
2430
|
+
listDefinitions: client.list,
|
|
2431
|
+
getDefinition: client.get,
|
|
2432
|
+
listTopicsByOntology: client.listTopics
|
|
2433
|
+
});
|
|
2423
2434
|
}
|
|
2424
2435
|
|
|
2425
2436
|
// src/graphClient.ts
|
|
2426
2437
|
function createGraphClient(config = {}) {
|
|
2427
2438
|
const gateway = createGatewayRequestClient(config);
|
|
2428
|
-
|
|
2439
|
+
const client = {
|
|
2429
2440
|
/**
|
|
2430
2441
|
* List graph nodes matching the provided filters.
|
|
2431
2442
|
*/
|
|
@@ -2438,12 +2449,6 @@ function createGraphClient(config = {}) {
|
|
|
2438
2449
|
(response) => mapGatewayData(response, (data) => mapAliasedList(data, "nodes"))
|
|
2439
2450
|
);
|
|
2440
2451
|
},
|
|
2441
|
-
/**
|
|
2442
|
-
* @deprecated Use listNodes.
|
|
2443
|
-
*/
|
|
2444
|
-
async queryNodes(query5) {
|
|
2445
|
-
return this.listNodes(query5);
|
|
2446
|
-
},
|
|
2447
2452
|
/**
|
|
2448
2453
|
* Retrieve a single graph node by nodeId or globalId.
|
|
2449
2454
|
*/
|
|
@@ -2554,12 +2559,6 @@ function createGraphClient(config = {}) {
|
|
|
2554
2559
|
)
|
|
2555
2560
|
);
|
|
2556
2561
|
},
|
|
2557
|
-
/**
|
|
2558
|
-
* @deprecated Use listEdges.
|
|
2559
|
-
*/
|
|
2560
|
-
async queryEdges(query5) {
|
|
2561
|
-
return this.listEdges(query5);
|
|
2562
|
-
},
|
|
2563
2562
|
/**
|
|
2564
2563
|
* Create a graph edge.
|
|
2565
2564
|
*/
|
|
@@ -2647,12 +2646,6 @@ function createGraphClient(config = {}) {
|
|
|
2647
2646
|
body: normalizeTopicQuery(query5)
|
|
2648
2647
|
});
|
|
2649
2648
|
},
|
|
2650
|
-
/**
|
|
2651
|
-
* Retrieve a graph neighborhood around a root node.
|
|
2652
|
-
*/
|
|
2653
|
-
async getNeighborhood(query5) {
|
|
2654
|
-
return this.neighborhood(query5);
|
|
2655
|
-
},
|
|
2656
2649
|
/**
|
|
2657
2650
|
* Retrieve the shortest known path between two graph nodes.
|
|
2658
2651
|
*/
|
|
@@ -2670,6 +2663,11 @@ function createGraphClient(config = {}) {
|
|
|
2670
2663
|
});
|
|
2671
2664
|
}
|
|
2672
2665
|
};
|
|
2666
|
+
return Object.assign(client, {
|
|
2667
|
+
queryNodes: client.listNodes,
|
|
2668
|
+
queryEdges: client.listEdges,
|
|
2669
|
+
getNeighborhood: client.neighborhood
|
|
2670
|
+
});
|
|
2673
2671
|
}
|
|
2674
2672
|
|
|
2675
2673
|
// src/identityClient.ts
|
|
@@ -2723,6 +2721,13 @@ function createIdentityClient(config = {}) {
|
|
|
2723
2721
|
body: input,
|
|
2724
2722
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
2725
2723
|
});
|
|
2724
|
+
const updatePrincipal = (input, idempotencyKey) => requestPrincipalWrite("PATCH", input, idempotencyKey);
|
|
2725
|
+
const deleteKey = (keyId, input = {}, idempotencyKey) => gateway.request({
|
|
2726
|
+
path: `/api/platform/v1/identity/keys/${encodeURIComponent(keyId)}/revoke`,
|
|
2727
|
+
method: "POST",
|
|
2728
|
+
body: input,
|
|
2729
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
2730
|
+
});
|
|
2726
2731
|
return {
|
|
2727
2732
|
/**
|
|
2728
2733
|
* Resolve the current authenticated identity summary.
|
|
@@ -2771,15 +2776,11 @@ function createIdentityClient(config = {}) {
|
|
|
2771
2776
|
/**
|
|
2772
2777
|
* Update a principal.
|
|
2773
2778
|
*/
|
|
2774
|
-
|
|
2775
|
-
return requestPrincipalWrite("PATCH", input, idempotencyKey);
|
|
2776
|
-
},
|
|
2779
|
+
updatePrincipal,
|
|
2777
2780
|
/**
|
|
2778
2781
|
* @deprecated Use createPrincipal or updatePrincipal.
|
|
2779
2782
|
*/
|
|
2780
|
-
|
|
2781
|
-
return requestPrincipalWrite("PATCH", input, idempotencyKey);
|
|
2782
|
-
},
|
|
2783
|
+
upsertPrincipal: updatePrincipal,
|
|
2783
2784
|
/**
|
|
2784
2785
|
* List keys in the current identity scope.
|
|
2785
2786
|
*/
|
|
@@ -2818,20 +2819,11 @@ function createIdentityClient(config = {}) {
|
|
|
2818
2819
|
/**
|
|
2819
2820
|
* Delete an API key by revoking it.
|
|
2820
2821
|
*/
|
|
2821
|
-
|
|
2822
|
-
return gateway.request({
|
|
2823
|
-
path: `/api/platform/v1/identity/keys/${encodeURIComponent(keyId)}/revoke`,
|
|
2824
|
-
method: "POST",
|
|
2825
|
-
body: input,
|
|
2826
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
2827
|
-
});
|
|
2828
|
-
},
|
|
2822
|
+
deleteKey,
|
|
2829
2823
|
/**
|
|
2830
2824
|
* @deprecated Use deleteKey.
|
|
2831
2825
|
*/
|
|
2832
|
-
|
|
2833
|
-
return this.deleteKey(keyId, input, idempotencyKey);
|
|
2834
|
-
},
|
|
2826
|
+
revokeKey: deleteKey,
|
|
2835
2827
|
/**
|
|
2836
2828
|
* Search Clerk users by email or display attributes.
|
|
2837
2829
|
*/
|
|
@@ -2947,14 +2939,11 @@ function createIdentityClient(config = {}) {
|
|
|
2947
2939
|
}
|
|
2948
2940
|
|
|
2949
2941
|
// src/topicsClient.ts
|
|
2950
|
-
function asRecord3(value) {
|
|
2951
|
-
return value && typeof value === "object" ? value : {};
|
|
2952
|
-
}
|
|
2953
2942
|
function cleanString3(value) {
|
|
2954
2943
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : void 0;
|
|
2955
2944
|
}
|
|
2956
2945
|
function normalizeTopicRecord(value) {
|
|
2957
|
-
const record =
|
|
2946
|
+
const record = asRecord(value);
|
|
2958
2947
|
const topicId = cleanString3(record.topicId) ?? cleanString3(record.id) ?? cleanString3(record._id);
|
|
2959
2948
|
return withTopicAlias({
|
|
2960
2949
|
...record,
|
|
@@ -2979,7 +2968,7 @@ function createTopicsClient(config = {}) {
|
|
|
2979
2968
|
})}`
|
|
2980
2969
|
}).then(
|
|
2981
2970
|
(response) => mapGatewayData(response, (data) => {
|
|
2982
|
-
const record =
|
|
2971
|
+
const record = asRecord(data);
|
|
2983
2972
|
const items = Array.isArray(record.topics) ? record.topics.map(normalizeTopicRecord) : [];
|
|
2984
2973
|
return {
|
|
2985
2974
|
...createListResult(items, "topics"),
|
|
@@ -2996,7 +2985,7 @@ function createTopicsClient(config = {}) {
|
|
|
2996
2985
|
}).then(
|
|
2997
2986
|
(response) => mapGatewayData(
|
|
2998
2987
|
response,
|
|
2999
|
-
(data) => normalizeTopicRecord(
|
|
2988
|
+
(data) => normalizeTopicRecord(asRecord(data).topic ?? data)
|
|
3000
2989
|
)
|
|
3001
2990
|
);
|
|
3002
2991
|
},
|
|
@@ -3032,7 +3021,7 @@ function createTopicsClient(config = {}) {
|
|
|
3032
3021
|
)}`
|
|
3033
3022
|
}).then(
|
|
3034
3023
|
(response) => mapGatewayData(response, (data) => {
|
|
3035
|
-
const record =
|
|
3024
|
+
const record = asRecord(data);
|
|
3036
3025
|
return {
|
|
3037
3026
|
tree: Array.isArray(record.tree) ? record.tree.map(normalizeTopicTreeNode) : []
|
|
3038
3027
|
};
|
|
@@ -3451,7 +3440,7 @@ function createEventsFacade(config = {}) {
|
|
|
3451
3440
|
function createGraphFacade(config = {}) {
|
|
3452
3441
|
const graphClient = createGraphClient(config);
|
|
3453
3442
|
const gateway = createGatewayRequestClient(config);
|
|
3454
|
-
|
|
3443
|
+
const graphFacade = {
|
|
3455
3444
|
async neighborhood(input) {
|
|
3456
3445
|
return graphClient.neighborhood({
|
|
3457
3446
|
globalId: input.globalId,
|
|
@@ -3459,18 +3448,6 @@ function createGraphFacade(config = {}) {
|
|
|
3459
3448
|
maxDepth: input.maxDepth
|
|
3460
3449
|
});
|
|
3461
3450
|
},
|
|
3462
|
-
async traverse(input) {
|
|
3463
|
-
return graphClient.traverse(input);
|
|
3464
|
-
},
|
|
3465
|
-
async analyze(input = {}) {
|
|
3466
|
-
return graphClient.analyze(input);
|
|
3467
|
-
},
|
|
3468
|
-
async bias(input = {}) {
|
|
3469
|
-
return graphClient.bias(input);
|
|
3470
|
-
},
|
|
3471
|
-
async gaps(input) {
|
|
3472
|
-
return graphClient.gaps(input);
|
|
3473
|
-
},
|
|
3474
3451
|
async falsify(input, idempotencyKey = randomIdempotencyKey()) {
|
|
3475
3452
|
return gateway.request({
|
|
3476
3453
|
path: "/api/platform/v1/graph/falsify",
|
|
@@ -3480,6 +3457,12 @@ function createGraphFacade(config = {}) {
|
|
|
3480
3457
|
});
|
|
3481
3458
|
}
|
|
3482
3459
|
};
|
|
3460
|
+
return Object.assign(graphFacade, {
|
|
3461
|
+
traverse: graphClient.traverse,
|
|
3462
|
+
analyze: graphClient.analyze,
|
|
3463
|
+
bias: graphClient.bias,
|
|
3464
|
+
gaps: graphClient.gaps
|
|
3465
|
+
});
|
|
3483
3466
|
}
|
|
3484
3467
|
function createIdentityFacade(config = {}) {
|
|
3485
3468
|
const identityClient = createIdentityClient(config);
|
|
@@ -3493,15 +3476,12 @@ function createIdentityFacade(config = {}) {
|
|
|
3493
3476
|
function createOntologiesFacade(config = {}) {
|
|
3494
3477
|
const ontologyClient = createOntologyClient(config);
|
|
3495
3478
|
const gateway = createGatewayRequestClient(config);
|
|
3496
|
-
|
|
3479
|
+
const ontologyFacade = {
|
|
3497
3480
|
async get(id) {
|
|
3498
3481
|
return gateway.request({
|
|
3499
3482
|
path: `/api/platform/v1/ontologies/${encodeURIComponent(id)}`
|
|
3500
3483
|
});
|
|
3501
3484
|
},
|
|
3502
|
-
async list(query5 = {}) {
|
|
3503
|
-
return ontologyClient.list(query5);
|
|
3504
|
-
},
|
|
3505
3485
|
async bind(input, idempotencyKey) {
|
|
3506
3486
|
return gateway.request({
|
|
3507
3487
|
path: `/api/platform/v1/ontologies/${encodeURIComponent(input.ontologyId)}/bind`,
|
|
@@ -3521,6 +3501,9 @@ function createOntologiesFacade(config = {}) {
|
|
|
3521
3501
|
});
|
|
3522
3502
|
}
|
|
3523
3503
|
};
|
|
3504
|
+
return Object.assign(ontologyFacade, {
|
|
3505
|
+
list: ontologyClient.list
|
|
3506
|
+
});
|
|
3524
3507
|
}
|
|
3525
3508
|
function createQuestionsFacade(config = {}) {
|
|
3526
3509
|
const gateway = createGatewayRequestClient(config);
|
|
@@ -3713,15 +3696,9 @@ function createTasksFacade(config = {}) {
|
|
|
3713
3696
|
function createTopicsFacade(config = {}) {
|
|
3714
3697
|
const topicsClient = createTopicsClient(config);
|
|
3715
3698
|
return {
|
|
3716
|
-
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
async get(id) {
|
|
3720
|
-
return topicsClient.get(id);
|
|
3721
|
-
},
|
|
3722
|
-
async list(query5 = {}) {
|
|
3723
|
-
return topicsClient.list(query5);
|
|
3724
|
-
},
|
|
3699
|
+
create: topicsClient.create,
|
|
3700
|
+
get: topicsClient.get,
|
|
3701
|
+
list: topicsClient.list,
|
|
3725
3702
|
async update(input, idempotencyKey) {
|
|
3726
3703
|
const { id, ...rest } = input;
|
|
3727
3704
|
return topicsClient.update(id, rest, idempotencyKey);
|
|
@@ -3737,12 +3714,8 @@ function createTopicsFacade(config = {}) {
|
|
|
3737
3714
|
maxDepth: input.maxDepth
|
|
3738
3715
|
});
|
|
3739
3716
|
},
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
},
|
|
3743
|
-
async bulkCreate(input, idempotencyKey = randomIdempotencyKey()) {
|
|
3744
|
-
return topicsClient.bulkCreate(input, idempotencyKey);
|
|
3745
|
-
}
|
|
3717
|
+
remove: topicsClient.remove,
|
|
3718
|
+
bulkCreate: topicsClient.bulkCreate
|
|
3746
3719
|
};
|
|
3747
3720
|
}
|
|
3748
3721
|
function createWebhooksFacade(config = {}) {
|
|
@@ -3942,7 +3915,7 @@ function createWorktreesFacade(config = {}) {
|
|
|
3942
3915
|
// src/decisionsClient.ts
|
|
3943
3916
|
function createDecisionsClient(config = {}) {
|
|
3944
3917
|
const gateway = createGatewayRequestClient(config);
|
|
3945
|
-
|
|
3918
|
+
const client = {
|
|
3946
3919
|
/**
|
|
3947
3920
|
* List judgments for a topic scope.
|
|
3948
3921
|
*/
|
|
@@ -4020,12 +3993,6 @@ function createDecisionsClient(config = {}) {
|
|
|
4020
3993
|
})
|
|
4021
3994
|
);
|
|
4022
3995
|
},
|
|
4023
|
-
/**
|
|
4024
|
-
* @deprecated Use listPendingOutcomeReviews.
|
|
4025
|
-
*/
|
|
4026
|
-
async listPendingJudgmentOutcomeReview(query5) {
|
|
4027
|
-
return this.listPendingOutcomeReviews(query5);
|
|
4028
|
-
},
|
|
4029
3996
|
/**
|
|
4030
3997
|
* Get audit integrity checks for judgment transitions.
|
|
4031
3998
|
*/
|
|
@@ -4058,12 +4025,6 @@ function createDecisionsClient(config = {}) {
|
|
|
4058
4025
|
)
|
|
4059
4026
|
);
|
|
4060
4027
|
},
|
|
4061
|
-
/**
|
|
4062
|
-
* @deprecated Use createJudgment.
|
|
4063
|
-
*/
|
|
4064
|
-
async recordJudgment(input, idempotencyKey) {
|
|
4065
|
-
return this.createJudgment(input, idempotencyKey);
|
|
4066
|
-
},
|
|
4067
4028
|
/**
|
|
4068
4029
|
* Update the outcome for an existing judgment.
|
|
4069
4030
|
*/
|
|
@@ -4074,14 +4035,13 @@ function createDecisionsClient(config = {}) {
|
|
|
4074
4035
|
body: input,
|
|
4075
4036
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
4076
4037
|
});
|
|
4077
|
-
},
|
|
4078
|
-
/**
|
|
4079
|
-
* @deprecated Use updateJudgmentOutcome.
|
|
4080
|
-
*/
|
|
4081
|
-
async recordJudgmentOutcome(judgmentId, input, idempotencyKey) {
|
|
4082
|
-
return this.updateJudgmentOutcome(judgmentId, input, idempotencyKey);
|
|
4083
4038
|
}
|
|
4084
4039
|
};
|
|
4040
|
+
return Object.assign(client, {
|
|
4041
|
+
listPendingJudgmentOutcomeReview: client.listPendingOutcomeReviews,
|
|
4042
|
+
recordJudgment: client.createJudgment,
|
|
4043
|
+
recordJudgmentOutcome: client.updateJudgmentOutcome
|
|
4044
|
+
});
|
|
4085
4045
|
}
|
|
4086
4046
|
|
|
4087
4047
|
// src/embeddingsClient.ts
|
|
@@ -4705,7 +4665,7 @@ function createGraphStateClassifierClient(config = {}) {
|
|
|
4705
4665
|
// src/harnessClient.ts
|
|
4706
4666
|
function createHarnessClient(config = {}) {
|
|
4707
4667
|
const gateway = createGatewayRequestClient(config);
|
|
4708
|
-
|
|
4668
|
+
const client = {
|
|
4709
4669
|
/**
|
|
4710
4670
|
* List agent definitions.
|
|
4711
4671
|
*/
|
|
@@ -4738,12 +4698,6 @@ function createHarnessClient(config = {}) {
|
|
|
4738
4698
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
4739
4699
|
});
|
|
4740
4700
|
},
|
|
4741
|
-
/**
|
|
4742
|
-
* @deprecated Use createAgentDefinition.
|
|
4743
|
-
*/
|
|
4744
|
-
async registerAgentDefinition(input, idempotencyKey) {
|
|
4745
|
-
return this.createAgentDefinition(input, idempotencyKey);
|
|
4746
|
-
},
|
|
4747
4701
|
/**
|
|
4748
4702
|
* Update an agent definition.
|
|
4749
4703
|
*/
|
|
@@ -4782,12 +4736,6 @@ function createHarnessClient(config = {}) {
|
|
|
4782
4736
|
)
|
|
4783
4737
|
);
|
|
4784
4738
|
},
|
|
4785
|
-
/**
|
|
4786
|
-
* @deprecated Use listAgentRuns.
|
|
4787
|
-
*/
|
|
4788
|
-
async listRunsForAgent(agentId, scope = {}) {
|
|
4789
|
-
return this.listAgentRuns(agentId, scope);
|
|
4790
|
-
},
|
|
4791
4739
|
/**
|
|
4792
4740
|
* List tool definitions.
|
|
4793
4741
|
*/
|
|
@@ -4820,12 +4768,6 @@ function createHarnessClient(config = {}) {
|
|
|
4820
4768
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
4821
4769
|
});
|
|
4822
4770
|
},
|
|
4823
|
-
/**
|
|
4824
|
-
* @deprecated Use createToolDefinition.
|
|
4825
|
-
*/
|
|
4826
|
-
async registerToolDefinition(input, idempotencyKey) {
|
|
4827
|
-
return this.createToolDefinition(input, idempotencyKey);
|
|
4828
|
-
},
|
|
4829
4771
|
/**
|
|
4830
4772
|
* Update a tool definition.
|
|
4831
4773
|
*/
|
|
@@ -4860,12 +4802,6 @@ function createHarnessClient(config = {}) {
|
|
|
4860
4802
|
)
|
|
4861
4803
|
);
|
|
4862
4804
|
},
|
|
4863
|
-
/**
|
|
4864
|
-
* @deprecated Use listRunEntries.
|
|
4865
|
-
*/
|
|
4866
|
-
async listRunLedgerEntries(scope = {}) {
|
|
4867
|
-
return this.listRunEntries(scope);
|
|
4868
|
-
},
|
|
4869
4805
|
/**
|
|
4870
4806
|
* Create a harness run.
|
|
4871
4807
|
*/
|
|
@@ -4940,6 +4876,12 @@ function createHarnessClient(config = {}) {
|
|
|
4940
4876
|
});
|
|
4941
4877
|
}
|
|
4942
4878
|
};
|
|
4879
|
+
return Object.assign(client, {
|
|
4880
|
+
registerAgentDefinition: client.createAgentDefinition,
|
|
4881
|
+
listRunsForAgent: client.listAgentRuns,
|
|
4882
|
+
registerToolDefinition: client.createToolDefinition,
|
|
4883
|
+
listRunLedgerEntries: client.listRunEntries
|
|
4884
|
+
});
|
|
4943
4885
|
}
|
|
4944
4886
|
|
|
4945
4887
|
// src/jobsClient.ts
|
|
@@ -5067,45 +5009,41 @@ function createJobsClient(config = {}) {
|
|
|
5067
5009
|
// src/learningClient.ts
|
|
5068
5010
|
function createLearningClient(config = {}) {
|
|
5069
5011
|
const gateway = createGatewayRequestClient(config);
|
|
5012
|
+
const listRecentExecutions = async (args = {}) => gateway.request({
|
|
5013
|
+
path: `/api/platform/v1/learning/executions/recent${toQueryString({
|
|
5014
|
+
...normalizeTopicQuery(args),
|
|
5015
|
+
namespace: args.namespace,
|
|
5016
|
+
audienceMode: args.audienceMode,
|
|
5017
|
+
success: typeof args.success === "boolean" ? args.success ? "true" : "false" : void 0,
|
|
5018
|
+
limit: typeof args.limit === "number" && Number.isFinite(args.limit) ? String(args.limit) : void 0
|
|
5019
|
+
})}`
|
|
5020
|
+
}).then(
|
|
5021
|
+
(response) => mapGatewayData(
|
|
5022
|
+
response,
|
|
5023
|
+
(data) => createListResult(Array.isArray(data) ? data : [], "executions")
|
|
5024
|
+
)
|
|
5025
|
+
);
|
|
5026
|
+
const getExecutionStats = async (args = {}) => gateway.request({
|
|
5027
|
+
path: `/api/platform/v1/learning/executions/stats${toQueryString({
|
|
5028
|
+
...normalizeTopicQuery(args),
|
|
5029
|
+
namespace: args.namespace,
|
|
5030
|
+
audienceMode: args.audienceMode,
|
|
5031
|
+
hours: typeof args.hours === "number" && Number.isFinite(args.hours) ? String(args.hours) : void 0
|
|
5032
|
+
})}`
|
|
5033
|
+
});
|
|
5070
5034
|
return {
|
|
5071
5035
|
/**
|
|
5072
5036
|
* List recent execution records.
|
|
5073
5037
|
*/
|
|
5074
|
-
|
|
5075
|
-
return gateway.request({
|
|
5076
|
-
path: `/api/platform/v1/learning/executions/recent${toQueryString({
|
|
5077
|
-
...normalizeTopicQuery(args),
|
|
5078
|
-
namespace: args.namespace,
|
|
5079
|
-
audienceMode: args.audienceMode,
|
|
5080
|
-
success: typeof args.success === "boolean" ? args.success ? "true" : "false" : void 0,
|
|
5081
|
-
limit: typeof args.limit === "number" && Number.isFinite(args.limit) ? String(args.limit) : void 0
|
|
5082
|
-
})}`
|
|
5083
|
-
}).then(
|
|
5084
|
-
(response) => mapGatewayData(
|
|
5085
|
-
response,
|
|
5086
|
-
(data) => createListResult(Array.isArray(data) ? data : [], "executions")
|
|
5087
|
-
)
|
|
5088
|
-
);
|
|
5089
|
-
},
|
|
5038
|
+
listRecentExecutions,
|
|
5090
5039
|
/**
|
|
5091
5040
|
* @deprecated Use listRecentExecutions.
|
|
5092
5041
|
*/
|
|
5093
|
-
|
|
5094
|
-
return this.listRecentExecutions(args);
|
|
5095
|
-
},
|
|
5042
|
+
getRecentExecutions: listRecentExecutions,
|
|
5096
5043
|
/**
|
|
5097
5044
|
* Get aggregate execution statistics.
|
|
5098
5045
|
*/
|
|
5099
|
-
|
|
5100
|
-
return gateway.request({
|
|
5101
|
-
path: `/api/platform/v1/learning/executions/stats${toQueryString({
|
|
5102
|
-
...normalizeTopicQuery(args),
|
|
5103
|
-
namespace: args.namespace,
|
|
5104
|
-
audienceMode: args.audienceMode,
|
|
5105
|
-
hours: typeof args.hours === "number" && Number.isFinite(args.hours) ? String(args.hours) : void 0
|
|
5106
|
-
})}`
|
|
5107
|
-
});
|
|
5108
|
-
}
|
|
5046
|
+
getExecutionStats
|
|
5109
5047
|
};
|
|
5110
5048
|
}
|
|
5111
5049
|
function toJsonValue(value) {
|
|
@@ -6133,7 +6071,7 @@ function createOrgGraphSearchClient(config = {}) {
|
|
|
6133
6071
|
// src/packsClient.ts
|
|
6134
6072
|
function createPacksClient(config = {}) {
|
|
6135
6073
|
const gateway = createGatewayRequestClient(config);
|
|
6136
|
-
|
|
6074
|
+
const client = {
|
|
6137
6075
|
/**
|
|
6138
6076
|
* List catalog entries for available packs.
|
|
6139
6077
|
*/
|
|
@@ -6147,12 +6085,6 @@ function createPacksClient(config = {}) {
|
|
|
6147
6085
|
)
|
|
6148
6086
|
);
|
|
6149
6087
|
},
|
|
6150
|
-
/**
|
|
6151
|
-
* @deprecated Use listCatalog.
|
|
6152
|
-
*/
|
|
6153
|
-
async getCatalog() {
|
|
6154
|
-
return this.listCatalog();
|
|
6155
|
-
},
|
|
6156
6088
|
/**
|
|
6157
6089
|
* Get the discovery catalog for packs.
|
|
6158
6090
|
*/
|
|
@@ -6182,12 +6114,6 @@ function createPacksClient(config = {}) {
|
|
|
6182
6114
|
)
|
|
6183
6115
|
);
|
|
6184
6116
|
},
|
|
6185
|
-
/**
|
|
6186
|
-
* @deprecated Use listStates.
|
|
6187
|
-
*/
|
|
6188
|
-
async getStates(query5 = {}) {
|
|
6189
|
-
return this.listStates(query5);
|
|
6190
|
-
},
|
|
6191
6117
|
/**
|
|
6192
6118
|
* Get health details for a pack.
|
|
6193
6119
|
*/
|
|
@@ -6211,12 +6137,6 @@ function createPacksClient(config = {}) {
|
|
|
6211
6137
|
)
|
|
6212
6138
|
);
|
|
6213
6139
|
},
|
|
6214
|
-
/**
|
|
6215
|
-
* @deprecated Use listTelemetry.
|
|
6216
|
-
*/
|
|
6217
|
-
async getTelemetry(query5 = {}) {
|
|
6218
|
-
return this.listTelemetry(query5);
|
|
6219
|
-
},
|
|
6220
6140
|
/**
|
|
6221
6141
|
* Create a pack entitlement.
|
|
6222
6142
|
*/
|
|
@@ -6228,18 +6148,6 @@ function createPacksClient(config = {}) {
|
|
|
6228
6148
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
6229
6149
|
});
|
|
6230
6150
|
},
|
|
6231
|
-
/**
|
|
6232
|
-
* Update a pack entitlement.
|
|
6233
|
-
*/
|
|
6234
|
-
async updateEntitlement(input, idempotencyKey) {
|
|
6235
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
6236
|
-
},
|
|
6237
|
-
/**
|
|
6238
|
-
* @deprecated Use createEntitlement or updateEntitlement.
|
|
6239
|
-
*/
|
|
6240
|
-
async upsertEntitlement(input, idempotencyKey) {
|
|
6241
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
6242
|
-
},
|
|
6243
6151
|
/**
|
|
6244
6152
|
* Install a pack.
|
|
6245
6153
|
*/
|
|
@@ -6296,6 +6204,13 @@ function createPacksClient(config = {}) {
|
|
|
6296
6204
|
});
|
|
6297
6205
|
}
|
|
6298
6206
|
};
|
|
6207
|
+
return Object.assign(client, {
|
|
6208
|
+
getCatalog: client.listCatalog,
|
|
6209
|
+
getStates: client.listStates,
|
|
6210
|
+
getTelemetry: client.listTelemetry,
|
|
6211
|
+
updateEntitlement: client.createEntitlement,
|
|
6212
|
+
upsertEntitlement: client.createEntitlement
|
|
6213
|
+
});
|
|
6299
6214
|
}
|
|
6300
6215
|
|
|
6301
6216
|
// src/policyClient.ts
|
|
@@ -6331,6 +6246,14 @@ function asRolePolicyArray(data) {
|
|
|
6331
6246
|
}
|
|
6332
6247
|
return data.map(asRolePolicyRecord).filter((row) => Boolean(row));
|
|
6333
6248
|
}
|
|
6249
|
+
function buildFilterByPermissionResponse(permission, allowedTopicIds, deniedTopics, count) {
|
|
6250
|
+
const result = {};
|
|
6251
|
+
result.permission = permission;
|
|
6252
|
+
result.allowedTopicIds = allowedTopicIds;
|
|
6253
|
+
result.deniedTopics = deniedTopics;
|
|
6254
|
+
result.count = count;
|
|
6255
|
+
return result;
|
|
6256
|
+
}
|
|
6334
6257
|
function createPolicyClient(config = {}) {
|
|
6335
6258
|
const gateway = createGatewayRequestClient(config);
|
|
6336
6259
|
return {
|
|
@@ -6553,15 +6476,15 @@ function createPolicyClient(config = {}) {
|
|
|
6553
6476
|
});
|
|
6554
6477
|
const allowedTopicIds = Array.isArray(response.data?.allowedTopicIds) ? response.data.allowedTopicIds : [];
|
|
6555
6478
|
const deniedTopics = Array.isArray(response.data?.deniedTopics) ? response.data.deniedTopics : [];
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6479
|
+
const result = {};
|
|
6480
|
+
result.success = true;
|
|
6481
|
+
result.data = buildFilterByPermissionResponse(
|
|
6482
|
+
permission,
|
|
6483
|
+
allowedTopicIds,
|
|
6484
|
+
deniedTopics,
|
|
6485
|
+
typeof response.data?.count === "number" ? response.data.count : allowedTopicIds.length
|
|
6486
|
+
);
|
|
6487
|
+
return result;
|
|
6565
6488
|
}
|
|
6566
6489
|
};
|
|
6567
6490
|
}
|
|
@@ -6569,64 +6492,66 @@ function createPolicyClient(config = {}) {
|
|
|
6569
6492
|
// src/reportsClient.ts
|
|
6570
6493
|
function createReportsClient(config = {}) {
|
|
6571
6494
|
const gateway = createGatewayRequestClient(config);
|
|
6495
|
+
const listTemplates = async (args = {}) => gateway.request({
|
|
6496
|
+
path: `/api/platform/v1/reports/templates${toQueryString({
|
|
6497
|
+
slug: args.slug
|
|
6498
|
+
})}`
|
|
6499
|
+
}).then(
|
|
6500
|
+
(response) => mapGatewayData(response, (data) => {
|
|
6501
|
+
const rows = asListItems(data, "templates");
|
|
6502
|
+
return createListResult(rows, "templates");
|
|
6503
|
+
})
|
|
6504
|
+
);
|
|
6505
|
+
const listReports = async (input, args = {}) => {
|
|
6506
|
+
const topicId = resolveTopicId(input);
|
|
6507
|
+
if (!topicId) {
|
|
6508
|
+
throw new Error("topicId is required");
|
|
6509
|
+
}
|
|
6510
|
+
return gateway.request({
|
|
6511
|
+
path: `/api/platform/v1/reports/topics/${encodeURIComponent(topicId)}${toQueryString(
|
|
6512
|
+
{
|
|
6513
|
+
summary: typeof args.summary === "boolean" ? args.summary ? "true" : "false" : void 0
|
|
6514
|
+
}
|
|
6515
|
+
)}`
|
|
6516
|
+
}).then(
|
|
6517
|
+
(response) => mapGatewayData(
|
|
6518
|
+
response,
|
|
6519
|
+
(data) => createListResult(Array.isArray(data) ? data : [], "reports")
|
|
6520
|
+
)
|
|
6521
|
+
);
|
|
6522
|
+
};
|
|
6523
|
+
const getReport = async (reportId) => gateway.request({
|
|
6524
|
+
path: `/api/platform/v1/reports/${encodeURIComponent(reportId)}`
|
|
6525
|
+
});
|
|
6572
6526
|
return {
|
|
6573
6527
|
/**
|
|
6574
6528
|
* List report templates.
|
|
6575
6529
|
*/
|
|
6576
|
-
|
|
6577
|
-
return gateway.request({
|
|
6578
|
-
path: `/api/platform/v1/reports/templates${toQueryString({
|
|
6579
|
-
slug: args.slug
|
|
6580
|
-
})}`
|
|
6581
|
-
}).then(
|
|
6582
|
-
(response) => mapGatewayData(response, (data) => {
|
|
6583
|
-
const record = data && typeof data === "object" ? data : {};
|
|
6584
|
-
const rows = Array.isArray(data) ? data : Array.isArray(record.templates) ? record.templates : [];
|
|
6585
|
-
return createListResult(rows, "templates");
|
|
6586
|
-
})
|
|
6587
|
-
);
|
|
6588
|
-
},
|
|
6530
|
+
listTemplates,
|
|
6589
6531
|
/**
|
|
6590
6532
|
* @deprecated Use listTemplates.
|
|
6591
6533
|
*/
|
|
6592
|
-
|
|
6593
|
-
return this.listTemplates(args);
|
|
6594
|
-
},
|
|
6534
|
+
getTemplates: listTemplates,
|
|
6595
6535
|
/**
|
|
6596
6536
|
* List reports for a topic scope.
|
|
6597
6537
|
*/
|
|
6598
|
-
|
|
6599
|
-
const topicId = resolveTopicId(input);
|
|
6600
|
-
if (!topicId) {
|
|
6601
|
-
throw new Error("topicId is required");
|
|
6602
|
-
}
|
|
6603
|
-
return gateway.request({
|
|
6604
|
-
path: `/api/platform/v1/reports/topics/${encodeURIComponent(topicId)}${toQueryString(
|
|
6605
|
-
{
|
|
6606
|
-
summary: typeof args.summary === "boolean" ? args.summary ? "true" : "false" : void 0
|
|
6607
|
-
}
|
|
6608
|
-
)}`
|
|
6609
|
-
}).then(
|
|
6610
|
-
(response) => mapGatewayData(
|
|
6611
|
-
response,
|
|
6612
|
-
(data) => createListResult(Array.isArray(data) ? data : [], "reports")
|
|
6613
|
-
)
|
|
6614
|
-
);
|
|
6615
|
-
},
|
|
6538
|
+
listReports,
|
|
6616
6539
|
/**
|
|
6617
6540
|
* Get a generated report.
|
|
6618
6541
|
*/
|
|
6619
|
-
|
|
6620
|
-
return gateway.request({
|
|
6621
|
-
path: `/api/platform/v1/reports/${encodeURIComponent(reportId)}`
|
|
6622
|
-
});
|
|
6623
|
-
}
|
|
6542
|
+
getReport
|
|
6624
6543
|
};
|
|
6625
6544
|
}
|
|
6626
6545
|
|
|
6627
6546
|
// src/schemaClient.ts
|
|
6628
6547
|
function createSchemaClient(config = {}) {
|
|
6629
6548
|
const gateway = createGatewayRequestClient(config);
|
|
6549
|
+
const createEntitlement = (input, idempotencyKey) => gateway.request({
|
|
6550
|
+
path: "/api/platform/v1/schema/entitlements",
|
|
6551
|
+
method: "POST",
|
|
6552
|
+
body: input,
|
|
6553
|
+
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
6554
|
+
});
|
|
6630
6555
|
return {
|
|
6631
6556
|
/**
|
|
6632
6557
|
* List schema packs.
|
|
@@ -6678,29 +6603,95 @@ function createSchemaClient(config = {}) {
|
|
|
6678
6603
|
/**
|
|
6679
6604
|
* Create a schema entitlement.
|
|
6680
6605
|
*/
|
|
6681
|
-
|
|
6682
|
-
return gateway.request({
|
|
6683
|
-
path: "/api/platform/v1/schema/entitlements",
|
|
6684
|
-
method: "POST",
|
|
6685
|
-
body: input,
|
|
6686
|
-
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
6687
|
-
});
|
|
6688
|
-
},
|
|
6606
|
+
createEntitlement,
|
|
6689
6607
|
/**
|
|
6690
6608
|
* Update a schema entitlement.
|
|
6691
6609
|
*/
|
|
6692
|
-
|
|
6693
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
6694
|
-
},
|
|
6610
|
+
updateEntitlement: createEntitlement,
|
|
6695
6611
|
/**
|
|
6696
6612
|
* @deprecated Use createEntitlement or updateEntitlement.
|
|
6697
6613
|
*/
|
|
6698
|
-
|
|
6699
|
-
return this.createEntitlement(input, idempotencyKey);
|
|
6700
|
-
}
|
|
6614
|
+
upsertEntitlement: createEntitlement
|
|
6701
6615
|
};
|
|
6702
6616
|
}
|
|
6703
6617
|
|
|
6618
|
+
// src/clientHelpers.ts
|
|
6619
|
+
function asNodeArray(data) {
|
|
6620
|
+
const rows = asListItems(data, "nodes");
|
|
6621
|
+
if (rows.length > 0) {
|
|
6622
|
+
return rows.filter(
|
|
6623
|
+
(value) => Boolean(value) && typeof value === "object"
|
|
6624
|
+
);
|
|
6625
|
+
}
|
|
6626
|
+
if (data && typeof data === "object") {
|
|
6627
|
+
return [data];
|
|
6628
|
+
}
|
|
6629
|
+
return [];
|
|
6630
|
+
}
|
|
6631
|
+
function requireTopicId4(args) {
|
|
6632
|
+
const topicId = resolveTopicId(args);
|
|
6633
|
+
if (!topicId) {
|
|
6634
|
+
throw new Error("topicId is required");
|
|
6635
|
+
}
|
|
6636
|
+
return topicId;
|
|
6637
|
+
}
|
|
6638
|
+
function requireTopicOrProjectId(args) {
|
|
6639
|
+
const topicId = args.topicId?.trim() || args.projectId?.trim() || void 0;
|
|
6640
|
+
if (!topicId) {
|
|
6641
|
+
throw new Error("topicId is required");
|
|
6642
|
+
}
|
|
6643
|
+
return topicId;
|
|
6644
|
+
}
|
|
6645
|
+
var AUDIT_NODE_REFERENCE_KEY_PATTERN = /(^|_)(id|nodeid|beliefid|resourceid|targetid|sourceid|subjectid|globalid|entityid|recordid|fromnodeid|tonodeid|linkednodeid|linkedbeliefid|nodeids|beliefids|resourceids)$/i;
|
|
6646
|
+
function matchesAuditNodeReference(value, nodeId) {
|
|
6647
|
+
if (Array.isArray(value)) {
|
|
6648
|
+
return value.some((entry) => matchesAuditNodeReference(entry, nodeId));
|
|
6649
|
+
}
|
|
6650
|
+
if (!value || typeof value !== "object") {
|
|
6651
|
+
return false;
|
|
6652
|
+
}
|
|
6653
|
+
return Object.entries(value).some(([key, entry]) => {
|
|
6654
|
+
if (typeof entry === "string" && entry === nodeId && AUDIT_NODE_REFERENCE_KEY_PATTERN.test(key)) {
|
|
6655
|
+
return true;
|
|
6656
|
+
}
|
|
6657
|
+
if (Array.isArray(entry) && AUDIT_NODE_REFERENCE_KEY_PATTERN.test(key) && entry.some((item) => item === nodeId)) {
|
|
6658
|
+
return true;
|
|
6659
|
+
}
|
|
6660
|
+
return matchesAuditNodeReference(entry, nodeId);
|
|
6661
|
+
});
|
|
6662
|
+
}
|
|
6663
|
+
function requireText(args) {
|
|
6664
|
+
const text = resolveText(args);
|
|
6665
|
+
if (!text) {
|
|
6666
|
+
throw new Error("text is required");
|
|
6667
|
+
}
|
|
6668
|
+
return text;
|
|
6669
|
+
}
|
|
6670
|
+
function requireBaseRate(args) {
|
|
6671
|
+
const baseRate = typeof args.baseRate === "number" && Number.isFinite(args.baseRate) ? args.baseRate : 0.5;
|
|
6672
|
+
if (baseRate < 0 || baseRate > 1) {
|
|
6673
|
+
throw new Error("baseRate must be within [0, 1].");
|
|
6674
|
+
}
|
|
6675
|
+
return baseRate;
|
|
6676
|
+
}
|
|
6677
|
+
function sdkQueryString(input) {
|
|
6678
|
+
const params = new URLSearchParams();
|
|
6679
|
+
for (const [key, value] of Object.entries(input)) {
|
|
6680
|
+
if (value === void 0 || value === null) {
|
|
6681
|
+
continue;
|
|
6682
|
+
}
|
|
6683
|
+
if (Array.isArray(value)) {
|
|
6684
|
+
if (value.length > 0) {
|
|
6685
|
+
params.set(key, value.join(","));
|
|
6686
|
+
}
|
|
6687
|
+
continue;
|
|
6688
|
+
}
|
|
6689
|
+
params.set(key, String(value));
|
|
6690
|
+
}
|
|
6691
|
+
const serialized = params.toString();
|
|
6692
|
+
return serialized ? `?${serialized}` : "";
|
|
6693
|
+
}
|
|
6694
|
+
|
|
6704
6695
|
// src/telemetryClient.ts
|
|
6705
6696
|
var TELEMETRY_FIELDS = [
|
|
6706
6697
|
"tenantId",
|
|
@@ -6871,6 +6862,16 @@ function query4(input) {
|
|
|
6871
6862
|
cursor: input.cursor
|
|
6872
6863
|
};
|
|
6873
6864
|
}
|
|
6865
|
+
function effectiveToolsQuery(input) {
|
|
6866
|
+
return {
|
|
6867
|
+
...query4(input),
|
|
6868
|
+
callerRole: input.callerRole,
|
|
6869
|
+
surface: input.surface,
|
|
6870
|
+
sessionType: input.sessionType,
|
|
6871
|
+
permittedToolNames: input.permittedToolNames ? JSON.stringify(input.permittedToolNames) : void 0,
|
|
6872
|
+
executableOnly: input.executableOnly
|
|
6873
|
+
};
|
|
6874
|
+
}
|
|
6874
6875
|
function writeBody(input, operation) {
|
|
6875
6876
|
return knownPayload(input, TOOL_REGISTRY_FIELDS, operation);
|
|
6876
6877
|
}
|
|
@@ -6899,7 +6900,9 @@ function createToolRegistryClient(config = {}) {
|
|
|
6899
6900
|
},
|
|
6900
6901
|
listEffectiveTools(input) {
|
|
6901
6902
|
return gateway.request({
|
|
6902
|
-
path: `/api/platform/v1/tools/effective${toQueryString(
|
|
6903
|
+
path: `/api/platform/v1/tools/effective${toQueryString(
|
|
6904
|
+
effectiveToolsQuery(input)
|
|
6905
|
+
)}`
|
|
6903
6906
|
}).then(
|
|
6904
6907
|
(response) => mapGatewayData(
|
|
6905
6908
|
response,
|
|
@@ -6990,7 +6993,7 @@ function createToolRegistryClient(config = {}) {
|
|
|
6990
6993
|
}
|
|
6991
6994
|
|
|
6992
6995
|
// src/version.ts
|
|
6993
|
-
var LUCERN_SDK_VERSION = "0.
|
|
6996
|
+
var LUCERN_SDK_VERSION = "0.3.0-alpha.7";
|
|
6994
6997
|
|
|
6995
6998
|
// src/workflowClient.ts
|
|
6996
6999
|
function normalizeLensQuery(value) {
|
|
@@ -7184,12 +7187,6 @@ function createWorkflowClient(config = {}) {
|
|
|
7184
7187
|
)
|
|
7185
7188
|
);
|
|
7186
7189
|
},
|
|
7187
|
-
/**
|
|
7188
|
-
* @deprecated Use createWorktree.
|
|
7189
|
-
*/
|
|
7190
|
-
async addWorktree(input, idempotencyKey) {
|
|
7191
|
-
return client.createWorktree(input, idempotencyKey);
|
|
7192
|
-
},
|
|
7193
7190
|
/**
|
|
7194
7191
|
* Merge a worktree into the main belief line.
|
|
7195
7192
|
*/
|
|
@@ -7387,54 +7384,19 @@ function createWorkflowClient(config = {}) {
|
|
|
7387
7384
|
body: input,
|
|
7388
7385
|
idempotencyKey: idempotencyKey ?? randomIdempotencyKey()
|
|
7389
7386
|
});
|
|
7390
|
-
},
|
|
7391
|
-
/**
|
|
7392
|
-
* @deprecated Use createBranch.
|
|
7393
|
-
*/
|
|
7394
|
-
async createPillar(input, idempotencyKey) {
|
|
7395
|
-
return client.createBranch(input, idempotencyKey);
|
|
7396
|
-
},
|
|
7397
|
-
/**
|
|
7398
|
-
* @deprecated Use addWorktree.
|
|
7399
|
-
*/
|
|
7400
|
-
async createSprint(input, idempotencyKey) {
|
|
7401
|
-
return client.createWorktree(input, idempotencyKey);
|
|
7402
|
-
},
|
|
7403
|
-
/**
|
|
7404
|
-
* @deprecated Use merge.
|
|
7405
|
-
*/
|
|
7406
|
-
async completeSprint(worktreeId, input, idempotencyKey) {
|
|
7407
|
-
return client.merge(worktreeId, input, idempotencyKey);
|
|
7408
|
-
},
|
|
7409
|
-
/**
|
|
7410
|
-
* @deprecated Use openPullRequest.
|
|
7411
|
-
*/
|
|
7412
|
-
async requestReview(worktreeId, input, idempotencyKey) {
|
|
7413
|
-
return client.openPullRequest(worktreeId, input, idempotencyKey);
|
|
7414
|
-
},
|
|
7415
|
-
/**
|
|
7416
|
-
* @deprecated Use push.
|
|
7417
|
-
*/
|
|
7418
|
-
async publishFindings(worktreeId, input, idempotencyKey) {
|
|
7419
|
-
return client.push(worktreeId, input, idempotencyKey);
|
|
7420
7387
|
}
|
|
7421
7388
|
};
|
|
7422
|
-
return client
|
|
7389
|
+
return Object.assign(client, {
|
|
7390
|
+
addWorktree: client.createWorktree,
|
|
7391
|
+
createPillar: client.createBranch,
|
|
7392
|
+
createSprint: client.createWorktree,
|
|
7393
|
+
completeSprint: client.merge,
|
|
7394
|
+
requestReview: client.openPullRequest,
|
|
7395
|
+
publishFindings: client.push
|
|
7396
|
+
});
|
|
7423
7397
|
}
|
|
7424
7398
|
|
|
7425
7399
|
// src/client.ts
|
|
7426
|
-
function asNodeArray(data) {
|
|
7427
|
-
const rows = asListItems(data, "nodes");
|
|
7428
|
-
if (rows.length > 0) {
|
|
7429
|
-
return rows.filter(
|
|
7430
|
-
(value) => Boolean(value) && typeof value === "object"
|
|
7431
|
-
);
|
|
7432
|
-
}
|
|
7433
|
-
if (data && typeof data === "object") {
|
|
7434
|
-
return [data];
|
|
7435
|
-
}
|
|
7436
|
-
return [];
|
|
7437
|
-
}
|
|
7438
7400
|
function toGatewayConfig(config) {
|
|
7439
7401
|
return {
|
|
7440
7402
|
baseUrl: config.baseUrl,
|
|
@@ -7462,72 +7424,9 @@ function toGatewayConfig(config) {
|
|
|
7462
7424
|
}
|
|
7463
7425
|
};
|
|
7464
7426
|
}
|
|
7465
|
-
function requireTopicId4(args) {
|
|
7466
|
-
const topicId = resolveTopicId(args);
|
|
7467
|
-
if (!topicId) {
|
|
7468
|
-
throw new Error("topicId is required");
|
|
7469
|
-
}
|
|
7470
|
-
return topicId;
|
|
7471
|
-
}
|
|
7472
|
-
function requireTopicOrProjectId(args) {
|
|
7473
|
-
const topicId = args.topicId?.trim() || args.projectId?.trim() || void 0;
|
|
7474
|
-
if (!topicId) {
|
|
7475
|
-
throw new Error("topicId is required");
|
|
7476
|
-
}
|
|
7477
|
-
return topicId;
|
|
7478
|
-
}
|
|
7479
|
-
var AUDIT_NODE_REFERENCE_KEY_PATTERN = /(^|_)(id|nodeid|beliefid|resourceid|targetid|sourceid|subjectid|globalid|entityid|recordid|fromnodeid|tonodeid|linkednodeid|linkedbeliefid|nodeids|beliefids|resourceids)$/i;
|
|
7480
|
-
function matchesAuditNodeReference(value, nodeId) {
|
|
7481
|
-
if (Array.isArray(value)) {
|
|
7482
|
-
return value.some((entry) => matchesAuditNodeReference(entry, nodeId));
|
|
7483
|
-
}
|
|
7484
|
-
if (!value || typeof value !== "object") {
|
|
7485
|
-
return false;
|
|
7486
|
-
}
|
|
7487
|
-
return Object.entries(value).some(([key, entry]) => {
|
|
7488
|
-
if (typeof entry === "string" && entry === nodeId && AUDIT_NODE_REFERENCE_KEY_PATTERN.test(key)) {
|
|
7489
|
-
return true;
|
|
7490
|
-
}
|
|
7491
|
-
if (Array.isArray(entry) && AUDIT_NODE_REFERENCE_KEY_PATTERN.test(key) && entry.some((item) => item === nodeId)) {
|
|
7492
|
-
return true;
|
|
7493
|
-
}
|
|
7494
|
-
return matchesAuditNodeReference(entry, nodeId);
|
|
7495
|
-
});
|
|
7496
|
-
}
|
|
7497
|
-
function requireText(args) {
|
|
7498
|
-
const text = resolveText(args);
|
|
7499
|
-
if (!text) {
|
|
7500
|
-
throw new Error("text is required");
|
|
7501
|
-
}
|
|
7502
|
-
return text;
|
|
7503
|
-
}
|
|
7504
|
-
function requireBaseRate(args) {
|
|
7505
|
-
const baseRate = typeof args.baseRate === "number" && Number.isFinite(args.baseRate) ? args.baseRate : 0.5;
|
|
7506
|
-
if (baseRate < 0 || baseRate > 1) {
|
|
7507
|
-
throw new Error("baseRate must be within [0, 1].");
|
|
7508
|
-
}
|
|
7509
|
-
return baseRate;
|
|
7510
|
-
}
|
|
7511
7427
|
function exposeGatewayData(response) {
|
|
7512
7428
|
return Object.assign({}, response, response.data);
|
|
7513
7429
|
}
|
|
7514
|
-
function sdkQueryString(input) {
|
|
7515
|
-
const params = new URLSearchParams();
|
|
7516
|
-
for (const [key, value] of Object.entries(input)) {
|
|
7517
|
-
if (value === void 0 || value === null) {
|
|
7518
|
-
continue;
|
|
7519
|
-
}
|
|
7520
|
-
if (Array.isArray(value)) {
|
|
7521
|
-
if (value.length > 0) {
|
|
7522
|
-
params.set(key, value.join(","));
|
|
7523
|
-
}
|
|
7524
|
-
continue;
|
|
7525
|
-
}
|
|
7526
|
-
params.set(key, String(value));
|
|
7527
|
-
}
|
|
7528
|
-
const serialized = params.toString();
|
|
7529
|
-
return serialized ? `?${serialized}` : "";
|
|
7530
|
-
}
|
|
7531
7430
|
function createLucernClient(config = {}) {
|
|
7532
7431
|
const gatewayConfig = toGatewayConfig(config);
|
|
7533
7432
|
const beliefsClient = createBeliefsClient(gatewayConfig);
|
|
@@ -7751,7 +7650,7 @@ function createLucernClient(config = {}) {
|
|
|
7751
7650
|
topicId,
|
|
7752
7651
|
nodeType: "contradiction",
|
|
7753
7652
|
limit: 500
|
|
7754
|
-
}) : args.nodeId ? await graphClient.
|
|
7653
|
+
}) : args.nodeId ? await graphClient.listNodes({ nodeId: args.nodeId }) : { data: [] };
|
|
7755
7654
|
const contradictions = asNodeArray(response.data).filter((node) => {
|
|
7756
7655
|
const status = typeof node.metadata?.status === "string" ? node.metadata.status : typeof node.status === "string" ? node.status : "unresolved";
|
|
7757
7656
|
if (args.status && status !== args.status) {
|
|
@@ -7931,23 +7830,15 @@ function createLucernClient(config = {}) {
|
|
|
7931
7830
|
}).then(exposeGatewayData);
|
|
7932
7831
|
}
|
|
7933
7832
|
const nodesNamespace = {
|
|
7934
|
-
list
|
|
7935
|
-
return graphClient.listNodes(query5);
|
|
7936
|
-
},
|
|
7833
|
+
list: graphClient.listNodes,
|
|
7937
7834
|
get(input) {
|
|
7938
7835
|
return graphClient.getNode(
|
|
7939
7836
|
typeof input === "string" ? { nodeId: input } : input
|
|
7940
7837
|
);
|
|
7941
7838
|
},
|
|
7942
|
-
create
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
update(input, idempotencyKey) {
|
|
7946
|
-
return graphClient.updateNode(input, idempotencyKey);
|
|
7947
|
-
},
|
|
7948
|
-
batchCreate(input, idempotencyKey) {
|
|
7949
|
-
return graphClient.batchCreateNodes(input, idempotencyKey);
|
|
7950
|
-
},
|
|
7839
|
+
create: graphClient.createNode,
|
|
7840
|
+
update: graphClient.updateNode,
|
|
7841
|
+
batchCreate: graphClient.batchCreateNodes,
|
|
7951
7842
|
listByTopicAndType(input) {
|
|
7952
7843
|
return gateway.request({
|
|
7953
7844
|
path: `/api/platform/v1/nodes${sdkQueryString({
|
|
@@ -7972,15 +7863,9 @@ function createLucernClient(config = {}) {
|
|
|
7972
7863
|
})}`
|
|
7973
7864
|
}).then(exposeGatewayData);
|
|
7974
7865
|
},
|
|
7975
|
-
supersede
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
verify(input, idempotencyKey) {
|
|
7979
|
-
return graphClient.verifyNode(input, idempotencyKey);
|
|
7980
|
-
},
|
|
7981
|
-
hardDelete(input, idempotencyKey) {
|
|
7982
|
-
return graphClient.hardDeleteNode(input, idempotencyKey);
|
|
7983
|
-
}
|
|
7866
|
+
supersede: graphClient.supersedeNode,
|
|
7867
|
+
verify: graphClient.verifyNode,
|
|
7868
|
+
hardDelete: graphClient.hardDeleteNode
|
|
7984
7869
|
};
|
|
7985
7870
|
const publicationNamespace = {
|
|
7986
7871
|
create(input, idempotencyKey) {
|
|
@@ -8057,9 +7942,7 @@ function createLucernClient(config = {}) {
|
|
|
8057
7942
|
return {
|
|
8058
7943
|
config,
|
|
8059
7944
|
version: LUCERN_SDK_VERSION,
|
|
8060
|
-
search
|
|
8061
|
-
return searchResources(query5, options);
|
|
8062
|
-
},
|
|
7945
|
+
search: searchResources,
|
|
8063
7946
|
events: {
|
|
8064
7947
|
list(query5 = {}) {
|
|
8065
7948
|
return eventsFacade.list(query5).then(exposeGatewayData);
|
|
@@ -8156,9 +8039,7 @@ function createLucernClient(config = {}) {
|
|
|
8156
8039
|
confidenceHistory(nodeId) {
|
|
8157
8040
|
return beliefsFacade.confidenceHistory(nodeId).then(exposeGatewayData);
|
|
8158
8041
|
},
|
|
8159
|
-
opinionHistory
|
|
8160
|
-
return getOpinionHistory(nodeId);
|
|
8161
|
-
},
|
|
8042
|
+
opinionHistory: getOpinionHistory,
|
|
8162
8043
|
createContract(nodeId, input) {
|
|
8163
8044
|
return beliefsFacade.createContract(nodeId, input).then(exposeGatewayData);
|
|
8164
8045
|
},
|
|
@@ -8412,10 +8293,10 @@ function createLucernClient(config = {}) {
|
|
|
8412
8293
|
}));
|
|
8413
8294
|
},
|
|
8414
8295
|
getHighPriority(args) {
|
|
8415
|
-
return
|
|
8296
|
+
return questionsFacade.list({
|
|
8416
8297
|
topicId: requireTopicId4(args),
|
|
8417
8298
|
status: args.includeAnswered ? void 0 : "open"
|
|
8418
|
-
}).then((data) => {
|
|
8299
|
+
}).then(exposeGatewayData).then((data) => {
|
|
8419
8300
|
const questions = Array.isArray(data.questions) ? data.questions : [];
|
|
8420
8301
|
const rank = (priority) => {
|
|
8421
8302
|
switch (priority) {
|
|
@@ -8445,9 +8326,7 @@ function createLucernClient(config = {}) {
|
|
|
8445
8326
|
},
|
|
8446
8327
|
graph: {
|
|
8447
8328
|
nodes: nodesNamespace,
|
|
8448
|
-
createEdge
|
|
8449
|
-
return graphClient.createEdge(input);
|
|
8450
|
-
},
|
|
8329
|
+
createEdge: graphClient.createEdge,
|
|
8451
8330
|
neighborhood(args) {
|
|
8452
8331
|
return graphFacade.neighborhood({
|
|
8453
8332
|
globalId: args.globalId,
|
|
@@ -8506,7 +8385,7 @@ function createLucernClient(config = {}) {
|
|
|
8506
8385
|
bisectConfidence,
|
|
8507
8386
|
listBeliefs,
|
|
8508
8387
|
detectConfirmationBias(topicId, threshold) {
|
|
8509
|
-
return
|
|
8388
|
+
return graphFacade.bias({
|
|
8510
8389
|
topicId,
|
|
8511
8390
|
threshold,
|
|
8512
8391
|
limit: 200
|
|
@@ -8517,7 +8396,7 @@ function createLucernClient(config = {}) {
|
|
|
8517
8396
|
}));
|
|
8518
8397
|
},
|
|
8519
8398
|
getStructureAnalysis(topicId) {
|
|
8520
|
-
return
|
|
8399
|
+
return graphFacade.analyze({
|
|
8521
8400
|
topicId,
|
|
8522
8401
|
limit: 200
|
|
8523
8402
|
}).then((response) => ({
|
|
@@ -8584,38 +8463,20 @@ function createLucernClient(config = {}) {
|
|
|
8584
8463
|
}
|
|
8585
8464
|
},
|
|
8586
8465
|
judgments: {
|
|
8587
|
-
create
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
list(query5) {
|
|
8594
|
-
return decisionsClient.listJudgments(query5);
|
|
8595
|
-
},
|
|
8596
|
-
get(judgmentId) {
|
|
8597
|
-
return decisionsClient.getJudgment(judgmentId);
|
|
8598
|
-
},
|
|
8599
|
-
recordOutcome(judgmentId, input) {
|
|
8600
|
-
return decisionsClient.recordJudgmentOutcome(judgmentId, input);
|
|
8601
|
-
},
|
|
8602
|
-
updateOutcome(judgmentId, input) {
|
|
8603
|
-
return decisionsClient.updateJudgmentOutcome(judgmentId, input);
|
|
8604
|
-
},
|
|
8466
|
+
create: decisionsClient.createJudgment,
|
|
8467
|
+
record: decisionsClient.recordJudgment,
|
|
8468
|
+
list: decisionsClient.listJudgments,
|
|
8469
|
+
get: decisionsClient.getJudgment,
|
|
8470
|
+
recordOutcome: decisionsClient.recordJudgmentOutcome,
|
|
8471
|
+
updateOutcome: decisionsClient.updateJudgmentOutcome,
|
|
8605
8472
|
readiness(topicId) {
|
|
8606
|
-
return decisionsClient.getJudgmentReadiness({
|
|
8607
|
-
topicId
|
|
8608
|
-
});
|
|
8473
|
+
return decisionsClient.getJudgmentReadiness({ topicId });
|
|
8609
8474
|
},
|
|
8610
8475
|
calibration(topicId) {
|
|
8611
|
-
return decisionsClient.getJudgmentCalibration({
|
|
8612
|
-
topicId
|
|
8613
|
-
});
|
|
8476
|
+
return decisionsClient.getJudgmentCalibration({ topicId });
|
|
8614
8477
|
},
|
|
8615
8478
|
pendingOutcomeReview(topicId) {
|
|
8616
|
-
return decisionsClient.listPendingJudgmentOutcomeReview({
|
|
8617
|
-
topicId
|
|
8618
|
-
});
|
|
8479
|
+
return decisionsClient.listPendingJudgmentOutcomeReview({ topicId });
|
|
8619
8480
|
},
|
|
8620
8481
|
transitionAuditIntegrity(args) {
|
|
8621
8482
|
return decisionsClient.getJudgmentTransitionAuditIntegrity({
|
|
@@ -8625,21 +8486,11 @@ function createLucernClient(config = {}) {
|
|
|
8625
8486
|
}
|
|
8626
8487
|
},
|
|
8627
8488
|
decisions: {
|
|
8628
|
-
create
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
},
|
|
8634
|
-
list(query5) {
|
|
8635
|
-
return decisionsClient.listJudgments(query5);
|
|
8636
|
-
},
|
|
8637
|
-
get(decisionId) {
|
|
8638
|
-
return decisionsClient.getJudgment(decisionId);
|
|
8639
|
-
},
|
|
8640
|
-
recordOutcome(decisionId, input) {
|
|
8641
|
-
return decisionsClient.recordJudgmentOutcome(decisionId, input);
|
|
8642
|
-
},
|
|
8489
|
+
create: decisionsClient.createJudgment,
|
|
8490
|
+
record: decisionsClient.recordJudgment,
|
|
8491
|
+
list: decisionsClient.listJudgments,
|
|
8492
|
+
get: decisionsClient.getJudgment,
|
|
8493
|
+
recordOutcome: decisionsClient.recordJudgmentOutcome,
|
|
8643
8494
|
lessons(decisionId, input, idempotencyKey) {
|
|
8644
8495
|
return gateway.request({
|
|
8645
8496
|
path: `/api/platform/v1/decisions/${encodeURIComponent(
|
|
@@ -8671,21 +8522,11 @@ function createLucernClient(config = {}) {
|
|
|
8671
8522
|
}
|
|
8672
8523
|
},
|
|
8673
8524
|
worktrees: {
|
|
8674
|
-
createBranch
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
},
|
|
8680
|
-
listLenses(query5) {
|
|
8681
|
-
return workflowClient.listLenses(query5);
|
|
8682
|
-
},
|
|
8683
|
-
applyLensToTopic(input) {
|
|
8684
|
-
return workflowClient.applyLensToTopic(input);
|
|
8685
|
-
},
|
|
8686
|
-
removeLensFromTopic(input) {
|
|
8687
|
-
return workflowClient.removeLensFromTopic(input);
|
|
8688
|
-
},
|
|
8525
|
+
createBranch: workflowClient.createBranch,
|
|
8526
|
+
createLens: workflowClient.createLens,
|
|
8527
|
+
listLenses: workflowClient.listLenses,
|
|
8528
|
+
applyLensToTopic: workflowClient.applyLensToTopic,
|
|
8529
|
+
removeLensFromTopic: workflowClient.removeLensFromTopic,
|
|
8689
8530
|
create(input) {
|
|
8690
8531
|
return worktreesFacade.create({
|
|
8691
8532
|
title: input.title,
|
|
@@ -8790,7 +8631,9 @@ function createLucernClient(config = {}) {
|
|
|
8790
8631
|
const dependsOn = Array.isArray(input.dependsOn) ? input.dependsOn.filter(
|
|
8791
8632
|
(value) => typeof value === "string"
|
|
8792
8633
|
) : void 0;
|
|
8793
|
-
const blocks = Array.isArray(input.blocks) ? input.blocks.filter(
|
|
8634
|
+
const blocks = Array.isArray(input.blocks) ? input.blocks.filter(
|
|
8635
|
+
(value) => typeof value === "string"
|
|
8636
|
+
) : void 0;
|
|
8794
8637
|
return worktreesFacade.update({
|
|
8795
8638
|
id: typeof input.worktreeId === "string" ? input.worktreeId : "",
|
|
8796
8639
|
hypothesis: typeof input.hypothesis === "string" ? input.hypothesis : void 0,
|
|
@@ -8804,7 +8647,23 @@ function createLucernClient(config = {}) {
|
|
|
8804
8647
|
});
|
|
8805
8648
|
},
|
|
8806
8649
|
update(input) {
|
|
8807
|
-
|
|
8650
|
+
const dependsOn = Array.isArray(input.dependsOn) ? input.dependsOn.filter(
|
|
8651
|
+
(value) => typeof value === "string"
|
|
8652
|
+
) : void 0;
|
|
8653
|
+
const blocks = Array.isArray(input.blocks) ? input.blocks.filter(
|
|
8654
|
+
(value) => typeof value === "string"
|
|
8655
|
+
) : void 0;
|
|
8656
|
+
return worktreesFacade.update({
|
|
8657
|
+
id: typeof input.worktreeId === "string" ? input.worktreeId : "",
|
|
8658
|
+
hypothesis: typeof input.hypothesis === "string" ? input.hypothesis : void 0,
|
|
8659
|
+
campaign: typeof input.campaign === "number" ? input.campaign : void 0,
|
|
8660
|
+
lane: typeof input.lane === "string" ? input.lane : void 0,
|
|
8661
|
+
laneOrderInCampaign: typeof input.laneOrderInCampaign === "number" ? input.laneOrderInCampaign : void 0,
|
|
8662
|
+
orderInLane: typeof input.orderInLane === "number" ? input.orderInLane : void 0,
|
|
8663
|
+
dependsOn,
|
|
8664
|
+
blocks,
|
|
8665
|
+
gate: typeof input.gate === "string" ? input.gate : void 0
|
|
8666
|
+
});
|
|
8808
8667
|
},
|
|
8809
8668
|
updateTargets(input) {
|
|
8810
8669
|
return worktreesFacade.updateTargets({
|
|
@@ -8815,9 +8674,7 @@ function createLucernClient(config = {}) {
|
|
|
8815
8674
|
removeQuestionIds: input.removeQuestionIds
|
|
8816
8675
|
});
|
|
8817
8676
|
},
|
|
8818
|
-
listAll
|
|
8819
|
-
return workflowClient.listAllWorktrees(query5);
|
|
8820
|
-
},
|
|
8677
|
+
listAll: workflowClient.listAllWorktrees,
|
|
8821
8678
|
merge(worktreeId, input) {
|
|
8822
8679
|
return worktreesFacade.merge({
|
|
8823
8680
|
id: worktreeId,
|
|
@@ -8825,18 +8682,12 @@ function createLucernClient(config = {}) {
|
|
|
8825
8682
|
summary: input.summary
|
|
8826
8683
|
});
|
|
8827
8684
|
},
|
|
8828
|
-
push
|
|
8829
|
-
|
|
8830
|
-
},
|
|
8831
|
-
openPullRequest(worktreeId, input) {
|
|
8832
|
-
return workflowClient.openPullRequest(worktreeId, input);
|
|
8833
|
-
},
|
|
8685
|
+
push: workflowClient.push,
|
|
8686
|
+
openPullRequest: workflowClient.openPullRequest,
|
|
8834
8687
|
pipelineSnapshot(topicId) {
|
|
8835
8688
|
return functionSurfaceClient.pipelineSnapshot({ topicId });
|
|
8836
8689
|
},
|
|
8837
|
-
complete
|
|
8838
|
-
return worktreesFacade.complete(input, idempotencyKey);
|
|
8839
|
-
},
|
|
8690
|
+
complete: worktreesFacade.complete,
|
|
8840
8691
|
advancePhase(worktreeId, idempotencyKey) {
|
|
8841
8692
|
return worktreesFacade.advancePhase(
|
|
8842
8693
|
{ worktreeId },
|
|
@@ -8849,12 +8700,8 @@ function createLucernClient(config = {}) {
|
|
|
8849
8700
|
idempotencyKey
|
|
8850
8701
|
);
|
|
8851
8702
|
},
|
|
8852
|
-
patchState
|
|
8853
|
-
|
|
8854
|
-
},
|
|
8855
|
-
bulkCreate(input, idempotencyKey) {
|
|
8856
|
-
return worktreesFacade.bulkCreate(input, idempotencyKey);
|
|
8857
|
-
}
|
|
8703
|
+
patchState: worktreesFacade.patchState,
|
|
8704
|
+
bulkCreate: worktreesFacade.bulkCreate
|
|
8858
8705
|
},
|
|
8859
8706
|
context: {
|
|
8860
8707
|
listTopics(query5 = {}) {
|
|
@@ -8865,27 +8712,15 @@ function createLucernClient(config = {}) {
|
|
|
8865
8712
|
type: query5.type
|
|
8866
8713
|
});
|
|
8867
8714
|
},
|
|
8868
|
-
compile
|
|
8869
|
-
|
|
8870
|
-
},
|
|
8871
|
-
recordScopeLearning(input, idempotencyKey) {
|
|
8872
|
-
return functionSurfaceClient.recordScopeLearning(input, idempotencyKey);
|
|
8873
|
-
},
|
|
8715
|
+
compile: contextClient.compile,
|
|
8716
|
+
recordScopeLearning: functionSurfaceClient.recordScopeLearning,
|
|
8874
8717
|
discover(input) {
|
|
8875
8718
|
return discoverTopics(input);
|
|
8876
8719
|
},
|
|
8877
|
-
analyzeTopicDensity
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
return functionSurfaceClient.applyAutoBranching(input, idempotencyKey);
|
|
8882
|
-
},
|
|
8883
|
-
seedBeliefLattice(input = {}, idempotencyKey) {
|
|
8884
|
-
return functionSurfaceClient.seedBeliefLattice(input, idempotencyKey);
|
|
8885
|
-
},
|
|
8886
|
-
getLatticeCoverage(input = {}) {
|
|
8887
|
-
return functionSurfaceClient.getLatticeCoverage(input);
|
|
8888
|
-
},
|
|
8720
|
+
analyzeTopicDensity: functionSurfaceClient.analyzeTopicDensity,
|
|
8721
|
+
applyAutoBranching: functionSurfaceClient.applyAutoBranching,
|
|
8722
|
+
seedBeliefLattice: functionSurfaceClient.seedBeliefLattice,
|
|
8723
|
+
getLatticeCoverage: functionSurfaceClient.getLatticeCoverage,
|
|
8889
8724
|
matchEntityType(input) {
|
|
8890
8725
|
return ontologiesFacade.match(input).then(exposeGatewayData);
|
|
8891
8726
|
},
|
|
@@ -8970,9 +8805,7 @@ function createLucernClient(config = {}) {
|
|
|
8970
8805
|
type: input.type
|
|
8971
8806
|
});
|
|
8972
8807
|
},
|
|
8973
|
-
get
|
|
8974
|
-
return topicsFacade.get(topicId);
|
|
8975
|
-
},
|
|
8808
|
+
get: topicsFacade.get,
|
|
8976
8809
|
create(input) {
|
|
8977
8810
|
return topicsFacade.create({
|
|
8978
8811
|
name: input.name,
|
|
@@ -9017,12 +8850,8 @@ function createLucernClient(config = {}) {
|
|
|
9017
8850
|
maxDepth: query5.maxDepth
|
|
9018
8851
|
});
|
|
9019
8852
|
},
|
|
9020
|
-
remove
|
|
9021
|
-
|
|
9022
|
-
},
|
|
9023
|
-
bulkCreate(input, idempotencyKey) {
|
|
9024
|
-
return topicsFacade.bulkCreate(input, idempotencyKey);
|
|
9025
|
-
}
|
|
8853
|
+
remove: topicsFacade.remove,
|
|
8854
|
+
bulkCreate: topicsFacade.bulkCreate
|
|
9026
8855
|
},
|
|
9027
8856
|
answers: {
|
|
9028
8857
|
create(input) {
|
|
@@ -9121,33 +8950,15 @@ function createLucernClient(config = {}) {
|
|
|
9121
8950
|
raw: ontologyClient
|
|
9122
8951
|
},
|
|
9123
8952
|
coordination: {
|
|
9124
|
-
registerSession
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
listActiveSessions(input = {}) {
|
|
9134
|
-
return functionSurfaceClient.listActiveSessions(input);
|
|
9135
|
-
},
|
|
9136
|
-
sendAgentMessage(input, idempotencyKey) {
|
|
9137
|
-
return functionSurfaceClient.sendAgentMessage(input, idempotencyKey);
|
|
9138
|
-
},
|
|
9139
|
-
broadcastMessage(input, idempotencyKey) {
|
|
9140
|
-
return functionSurfaceClient.broadcastMessage(input, idempotencyKey);
|
|
9141
|
-
},
|
|
9142
|
-
getInbox(input = {}) {
|
|
9143
|
-
return functionSurfaceClient.getAgentInbox(input);
|
|
9144
|
-
},
|
|
9145
|
-
getAgentInbox(input = {}) {
|
|
9146
|
-
return functionSurfaceClient.getAgentInbox(input);
|
|
9147
|
-
},
|
|
9148
|
-
claimFiles(input, idempotencyKey) {
|
|
9149
|
-
return functionSurfaceClient.claimFiles(input, idempotencyKey);
|
|
9150
|
-
}
|
|
8953
|
+
registerSession: functionSurfaceClient.registerSession,
|
|
8954
|
+
heartbeatSession: functionSurfaceClient.heartbeatSession,
|
|
8955
|
+
endSession: functionSurfaceClient.endSession,
|
|
8956
|
+
listActiveSessions: functionSurfaceClient.listActiveSessions,
|
|
8957
|
+
sendAgentMessage: functionSurfaceClient.sendAgentMessage,
|
|
8958
|
+
broadcastMessage: functionSurfaceClient.broadcastMessage,
|
|
8959
|
+
getInbox: functionSurfaceClient.getAgentInbox,
|
|
8960
|
+
getAgentInbox: functionSurfaceClient.getAgentInbox,
|
|
8961
|
+
claimFiles: functionSurfaceClient.claimFiles
|
|
9151
8962
|
},
|
|
9152
8963
|
policy: {
|
|
9153
8964
|
checkPermission(input) {
|
|
@@ -9178,38 +8989,24 @@ function createLucernClient(config = {}) {
|
|
|
9178
8989
|
principalId: typeof input.principalId === "string" ? input.principalId : void 0
|
|
9179
8990
|
});
|
|
9180
8991
|
},
|
|
8992
|
+
// Backward compatibility shim: keep the policy namespace exposing the
|
|
8993
|
+
// historical manageWritePolicy entry point.
|
|
9181
8994
|
manageWritePolicy(input, idempotencyKey) {
|
|
9182
8995
|
return functionSurfaceClient.manageWritePolicy(input, idempotencyKey);
|
|
9183
8996
|
},
|
|
9184
8997
|
raw: policyClient
|
|
9185
8998
|
},
|
|
9186
8999
|
observations: {
|
|
9187
|
-
ingest
|
|
9188
|
-
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
return functionSurfaceClient.ingestObservation(input, idempotencyKey);
|
|
9192
|
-
},
|
|
9193
|
-
getContext(input) {
|
|
9194
|
-
return functionSurfaceClient.getObservationContext(input);
|
|
9195
|
-
},
|
|
9196
|
-
getObservationContext(input) {
|
|
9197
|
-
return functionSurfaceClient.getObservationContext(input);
|
|
9198
|
-
}
|
|
9000
|
+
ingest: functionSurfaceClient.ingestObservation,
|
|
9001
|
+
ingestObservation: functionSurfaceClient.ingestObservation,
|
|
9002
|
+
getContext: functionSurfaceClient.getObservationContext,
|
|
9003
|
+
getObservationContext: functionSurfaceClient.getObservationContext
|
|
9199
9004
|
},
|
|
9200
9005
|
coding: {
|
|
9201
|
-
getCodeContext
|
|
9202
|
-
|
|
9203
|
-
|
|
9204
|
-
|
|
9205
|
-
return functionSurfaceClient.getChangeHistory(input);
|
|
9206
|
-
},
|
|
9207
|
-
recordAttempt(input, idempotencyKey) {
|
|
9208
|
-
return functionSurfaceClient.recordAttempt(input, idempotencyKey);
|
|
9209
|
-
},
|
|
9210
|
-
getFailureLog(input) {
|
|
9211
|
-
return functionSurfaceClient.getFailureLog(input);
|
|
9212
|
-
}
|
|
9006
|
+
getCodeContext: functionSurfaceClient.getCodeContext,
|
|
9007
|
+
getChangeHistory: functionSurfaceClient.getChangeHistory,
|
|
9008
|
+
recordAttempt: functionSurfaceClient.recordAttempt,
|
|
9009
|
+
getFailureLog: functionSurfaceClient.getFailureLog
|
|
9213
9010
|
},
|
|
9214
9011
|
contracts: {
|
|
9215
9012
|
create(input) {
|
|
@@ -9235,9 +9032,7 @@ function createLucernClient(config = {}) {
|
|
|
9235
9032
|
}
|
|
9236
9033
|
},
|
|
9237
9034
|
bootstrap: {
|
|
9238
|
-
generateSessionHandoff
|
|
9239
|
-
return functionSurfaceClient.generateSessionHandoff(input);
|
|
9240
|
-
}
|
|
9035
|
+
generateSessionHandoff: functionSurfaceClient.generateSessionHandoff
|
|
9241
9036
|
},
|
|
9242
9037
|
embeddings: embeddingsClient,
|
|
9243
9038
|
graphAnalysis: graphAnalysisClient,
|
|
@@ -9259,25 +9054,15 @@ function createLucernClient(config = {}) {
|
|
|
9259
9054
|
createAcl: toolRegistryClient.createAcl,
|
|
9260
9055
|
deleteAcl: toolRegistryClient.deleteAcl,
|
|
9261
9056
|
registerCustomTool: toolRegistryClient.registerCustomTool,
|
|
9262
|
-
register
|
|
9263
|
-
|
|
9264
|
-
|
|
9265
|
-
|
|
9266
|
-
return unregisterCustomTool(fullName);
|
|
9267
|
-
},
|
|
9268
|
-
list() {
|
|
9269
|
-
return listRegisteredCustomTools();
|
|
9270
|
-
},
|
|
9271
|
-
clear() {
|
|
9272
|
-
clearRegisteredCustomTools();
|
|
9273
|
-
},
|
|
9057
|
+
register: registerCustomTool,
|
|
9058
|
+
unregister: unregisterCustomTool,
|
|
9059
|
+
list: listRegisteredCustomTools,
|
|
9060
|
+
clear: clearRegisteredCustomTools,
|
|
9274
9061
|
invoke(name, input = {}) {
|
|
9275
9062
|
const fullName = name.includes(".") ? name : `custom.${name}`;
|
|
9276
9063
|
return invokeCustomTool(fullName, input);
|
|
9277
9064
|
},
|
|
9278
|
-
namespace
|
|
9279
|
-
return getCustomNamespace(namespace);
|
|
9280
|
-
}
|
|
9065
|
+
namespace: getCustomNamespace
|
|
9281
9066
|
},
|
|
9282
9067
|
packs: {
|
|
9283
9068
|
/**
|
|
@@ -9292,27 +9077,13 @@ function createLucernClient(config = {}) {
|
|
|
9292
9077
|
get isInstalled() {
|
|
9293
9078
|
return _packInstalled;
|
|
9294
9079
|
},
|
|
9295
|
-
listCatalog
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
return packsClient.listStates(scope);
|
|
9303
|
-
},
|
|
9304
|
-
states(scope) {
|
|
9305
|
-
return packsClient.getStates(scope);
|
|
9306
|
-
},
|
|
9307
|
-
install(input) {
|
|
9308
|
-
return packsClient.install(input);
|
|
9309
|
-
},
|
|
9310
|
-
enable(input) {
|
|
9311
|
-
return packsClient.enable(input);
|
|
9312
|
-
},
|
|
9313
|
-
disable(input) {
|
|
9314
|
-
return packsClient.disable(input);
|
|
9315
|
-
}
|
|
9080
|
+
listCatalog: packsClient.listCatalog,
|
|
9081
|
+
catalog: packsClient.listCatalog,
|
|
9082
|
+
listStates: packsClient.listStates,
|
|
9083
|
+
states: packsClient.getStates,
|
|
9084
|
+
install: packsClient.install,
|
|
9085
|
+
enable: packsClient.enable,
|
|
9086
|
+
disable: packsClient.disable
|
|
9316
9087
|
},
|
|
9317
9088
|
nodes: nodesNamespace,
|
|
9318
9089
|
identity: {
|
|
@@ -9325,30 +9096,16 @@ function createLucernClient(config = {}) {
|
|
|
9325
9096
|
raw: identityClient
|
|
9326
9097
|
},
|
|
9327
9098
|
mcp: {
|
|
9328
|
-
bootstrapSession
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
},
|
|
9334
|
-
beginBuildSession(input) {
|
|
9335
|
-
return mcpClient.beginBuildSession(input);
|
|
9336
|
-
},
|
|
9337
|
-
evaluateEngineeringContract(input) {
|
|
9338
|
-
return mcpClient.evaluateEngineeringContract(input);
|
|
9339
|
-
},
|
|
9340
|
-
evaluateResearchContract(input) {
|
|
9341
|
-
return mcpClient.evaluateResearchContract(input);
|
|
9342
|
-
}
|
|
9099
|
+
bootstrapSession: mcpClient.bootstrapSession,
|
|
9100
|
+
checkWritePolicy: mcpClient.checkWritePolicy,
|
|
9101
|
+
beginBuildSession: mcpClient.beginBuildSession,
|
|
9102
|
+
evaluateEngineeringContract: mcpClient.evaluateEngineeringContract,
|
|
9103
|
+
evaluateResearchContract: mcpClient.evaluateResearchContract
|
|
9343
9104
|
},
|
|
9344
9105
|
auth: {
|
|
9345
9106
|
device: {
|
|
9346
|
-
createCode
|
|
9347
|
-
|
|
9348
|
-
},
|
|
9349
|
-
pollToken(deviceCode) {
|
|
9350
|
-
return authDeviceClient.pollDeviceToken(deviceCode);
|
|
9351
|
-
}
|
|
9107
|
+
createCode: authDeviceClient.createDeviceCode,
|
|
9108
|
+
pollToken: authDeviceClient.pollDeviceToken
|
|
9352
9109
|
}
|
|
9353
9110
|
},
|
|
9354
9111
|
custom: getCustomNamespace("custom"),
|
|
@@ -9534,17 +9291,11 @@ var TOKENS_PER_WORD = 1.35;
|
|
|
9534
9291
|
var MIN_TOKEN_ESTIMATE = 8;
|
|
9535
9292
|
|
|
9536
9293
|
// src/contextPackPolicy.ts
|
|
9537
|
-
function nowMs() {
|
|
9538
|
-
return Date.now();
|
|
9539
|
-
}
|
|
9540
|
-
function normalizeText(text) {
|
|
9541
|
-
return text.trim().toLowerCase();
|
|
9542
|
-
}
|
|
9543
9294
|
function tokenHits(text, tokens) {
|
|
9544
9295
|
if (tokens.length === 0) {
|
|
9545
9296
|
return 1;
|
|
9546
9297
|
}
|
|
9547
|
-
const haystack =
|
|
9298
|
+
const haystack = text.trim().toLowerCase();
|
|
9548
9299
|
let hits = 0;
|
|
9549
9300
|
for (const token of tokens) {
|
|
9550
9301
|
if (haystack.includes(token)) {
|
|
@@ -9559,7 +9310,7 @@ function clamp013(value) {
|
|
|
9559
9310
|
}
|
|
9560
9311
|
return Math.max(0, Math.min(1, value));
|
|
9561
9312
|
}
|
|
9562
|
-
function recencyScore(updatedAt, referenceTimeMs =
|
|
9313
|
+
function recencyScore(updatedAt, referenceTimeMs = Date.now()) {
|
|
9563
9314
|
if (!updatedAt || !Number.isFinite(updatedAt)) {
|
|
9564
9315
|
return 0.25;
|
|
9565
9316
|
}
|
|
@@ -9575,15 +9326,15 @@ function confidenceScore(confidence) {
|
|
|
9575
9326
|
return clamp013(confidence);
|
|
9576
9327
|
}
|
|
9577
9328
|
function priorityScore(priority) {
|
|
9578
|
-
const value =
|
|
9329
|
+
const value = (priority || "").trim().toLowerCase();
|
|
9579
9330
|
return PRIORITY_SCORES[value] ?? DEFAULT_PRIORITY_SCORE;
|
|
9580
9331
|
}
|
|
9581
9332
|
function severityScore(severity) {
|
|
9582
|
-
const value =
|
|
9333
|
+
const value = (severity || "").trim().toLowerCase();
|
|
9583
9334
|
return SEVERITY_SCORES[value] ?? DEFAULT_SEVERITY_SCORE;
|
|
9584
9335
|
}
|
|
9585
9336
|
function beliefTypeBonus(beliefType) {
|
|
9586
|
-
const value =
|
|
9337
|
+
const value = (beliefType || "").trim().toLowerCase();
|
|
9587
9338
|
return BELIEF_TYPE_BONUS[value] ?? DEFAULT_BELIEF_TYPE_BONUS;
|
|
9588
9339
|
}
|
|
9589
9340
|
function resolveEffectiveWeights(overrides) {
|
|
@@ -9609,7 +9360,7 @@ function generateJustification(_section, candidate, queryTokens, weights) {
|
|
|
9609
9360
|
}
|
|
9610
9361
|
const ts = candidate.updatedAt || candidate.createdAt || null;
|
|
9611
9362
|
if (ts && Number.isFinite(ts)) {
|
|
9612
|
-
const ageDays = Math.max(0,
|
|
9363
|
+
const ageDays = Math.max(0, Date.now() - ts) / (1e3 * 60 * 60 * 24);
|
|
9613
9364
|
if (ageDays < 1) {
|
|
9614
9365
|
parts.push("updated today");
|
|
9615
9366
|
} else if (ageDays < 7) {
|
|
@@ -9634,10 +9385,6 @@ function generateJustification(_section, candidate, queryTokens, weights) {
|
|
|
9634
9385
|
}
|
|
9635
9386
|
return parts.join(", ");
|
|
9636
9387
|
}
|
|
9637
|
-
function computeBaselineScore(candidate, queryTokens) {
|
|
9638
|
-
const hits = tokenHits(candidate.text, queryTokens);
|
|
9639
|
-
return queryTokens.length === 0 ? 1 : hits;
|
|
9640
|
-
}
|
|
9641
9388
|
function computeWeightedScore(section, candidate, queryTokens, effectiveWeights, referenceTimeMs) {
|
|
9642
9389
|
const weights = (effectiveWeights ?? RANKING_WEIGHTS)[section];
|
|
9643
9390
|
const queryComponent = queryTokens.length === 0 ? 0.4 : clamp013(tokenHits(candidate.text, queryTokens) / queryTokens.length);
|
|
@@ -9671,7 +9418,7 @@ function rankContextSection(section, rows, queryTokens, limit, profile, options)
|
|
|
9671
9418
|
queryTokens,
|
|
9672
9419
|
effectiveWeights,
|
|
9673
9420
|
referenceTimeMs
|
|
9674
|
-
) :
|
|
9421
|
+
) : queryTokens.length === 0 ? 1 : tokenHits(row.text, queryTokens);
|
|
9675
9422
|
const result = { ...row, score };
|
|
9676
9423
|
if (includeJustifications && profile === "weighted_v1") {
|
|
9677
9424
|
const weights = (effectiveWeights ?? RANKING_WEIGHTS)[section];
|
|
@@ -10038,18 +9785,21 @@ function normalizeQueryTokens(query5) {
|
|
|
10038
9785
|
function parseRankingProfile(value) {
|
|
10039
9786
|
return value === "baseline_v1" ? "baseline_v1" : "weighted_v1";
|
|
10040
9787
|
}
|
|
9788
|
+
function isRecord5(value) {
|
|
9789
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
9790
|
+
}
|
|
10041
9791
|
function beliefTypeOf(node) {
|
|
10042
9792
|
if (typeof node.beliefType === "string") {
|
|
10043
9793
|
return node.beliefType;
|
|
10044
9794
|
}
|
|
10045
|
-
const metadata = node.metadata
|
|
9795
|
+
const metadata = isRecord5(node.metadata) ? node.metadata : {};
|
|
10046
9796
|
if (typeof metadata.beliefType === "string") {
|
|
10047
9797
|
return metadata.beliefType;
|
|
10048
9798
|
}
|
|
10049
9799
|
return "";
|
|
10050
9800
|
}
|
|
10051
9801
|
function questionStatusOf(node) {
|
|
10052
|
-
const metadata = node.metadata
|
|
9802
|
+
const metadata = isRecord5(node.metadata) ? node.metadata : {};
|
|
10053
9803
|
const direct = typeof node.status === "string" ? node.status : "";
|
|
10054
9804
|
const questionStatus = typeof metadata.questionStatus === "string" ? metadata.questionStatus : "";
|
|
10055
9805
|
return (questionStatus || direct || "open").toLowerCase();
|
|
@@ -10065,9 +9815,6 @@ function isOpenQuestion(status) {
|
|
|
10065
9815
|
"belief_forked"
|
|
10066
9816
|
].includes(status);
|
|
10067
9817
|
}
|
|
10068
|
-
function metadataText(payload) {
|
|
10069
|
-
return JSON.stringify(payload).toLowerCase();
|
|
10070
|
-
}
|
|
10071
9818
|
function collectTopicNeighborhood(topics, rootTopicId, maxDescendantDepth = 2) {
|
|
10072
9819
|
const byId = /* @__PURE__ */ new Map();
|
|
10073
9820
|
const children = /* @__PURE__ */ new Map();
|
|
@@ -10129,11 +9876,10 @@ function dedupeById(rows) {
|
|
|
10129
9876
|
return output;
|
|
10130
9877
|
}
|
|
10131
9878
|
function candidateTimestamp(candidate) {
|
|
10132
|
-
if (!candidate
|
|
9879
|
+
if (!isRecord5(candidate)) {
|
|
10133
9880
|
return 0;
|
|
10134
9881
|
}
|
|
10135
|
-
const
|
|
10136
|
-
const timestamps = [record.updatedAt, record.createdAt, record.generatedAt].filter(
|
|
9882
|
+
const timestamps = [candidate.updatedAt, candidate.createdAt, candidate.generatedAt].filter(
|
|
10137
9883
|
(value) => typeof value === "number" && Number.isFinite(value)
|
|
10138
9884
|
);
|
|
10139
9885
|
return timestamps.length > 0 ? Math.max(...timestamps) : 0;
|
|
@@ -10255,7 +10001,7 @@ function compileContextPackFromSnapshot(snapshot) {
|
|
|
10255
10001
|
beliefType: beliefTypeOf(belief) || null,
|
|
10256
10002
|
status: belief.status || "active",
|
|
10257
10003
|
updatedAt: belief.updatedAt || belief.createdAt || null,
|
|
10258
|
-
metadataText: belief.metadata && typeof belief.metadata === "object" ?
|
|
10004
|
+
metadataText: belief.metadata && typeof belief.metadata === "object" ? JSON.stringify(belief.metadata).toLowerCase() : ""
|
|
10259
10005
|
}));
|
|
10260
10006
|
const activeBeliefs = rankContextSection(
|
|
10261
10007
|
"activeBeliefs",
|
|
@@ -10287,7 +10033,7 @@ function compileContextPackFromSnapshot(snapshot) {
|
|
|
10287
10033
|
status,
|
|
10288
10034
|
priority: typeof metadata.priority === "string" ? metadata.priority : "medium",
|
|
10289
10035
|
updatedAt: question.updatedAt || question.createdAt || null,
|
|
10290
|
-
metadataText:
|
|
10036
|
+
metadataText: JSON.stringify(metadata).toLowerCase()
|
|
10291
10037
|
};
|
|
10292
10038
|
}).filter((row) => isOpenQuestion(row.status));
|
|
10293
10039
|
const openQuestions = rankContextSection(
|
|
@@ -10319,7 +10065,7 @@ function compileContextPackFromSnapshot(snapshot) {
|
|
|
10319
10065
|
kind: typeof metadata.kind === "string" && metadata.kind || "observation",
|
|
10320
10066
|
createdAt: item.createdAt || null,
|
|
10321
10067
|
updatedAt: item.updatedAt || item.createdAt || null,
|
|
10322
|
-
metadataText:
|
|
10068
|
+
metadataText: JSON.stringify(metadata).toLowerCase()
|
|
10323
10069
|
};
|
|
10324
10070
|
});
|
|
10325
10071
|
const recentEvidence = rankContextSection(
|
|
@@ -10401,7 +10147,7 @@ function compileContextPackFromSnapshot(snapshot) {
|
|
|
10401
10147
|
let failureContext;
|
|
10402
10148
|
if (snapshot.plan.includeFailures && snapshot.failures) {
|
|
10403
10149
|
const allFailures = snapshot.failures.filter((node) => {
|
|
10404
|
-
const metadata = node.metadata
|
|
10150
|
+
const metadata = isRecord5(node.metadata) ? node.metadata : {};
|
|
10405
10151
|
return metadata.failedApproach === true || metadata.isFailedAttempt === true;
|
|
10406
10152
|
});
|
|
10407
10153
|
const rankedFailures = rankContextSection(
|
|
@@ -10419,7 +10165,7 @@ function compileContextPackFromSnapshot(snapshot) {
|
|
|
10419
10165
|
);
|
|
10420
10166
|
const failures = rankedFailures.map((row) => {
|
|
10421
10167
|
const original = allFailures.find((node) => String(node._id) === row.id);
|
|
10422
|
-
const metadata = original?.metadata
|
|
10168
|
+
const metadata = isRecord5(original?.metadata) ? original?.metadata : {};
|
|
10423
10169
|
return {
|
|
10424
10170
|
attemptId: row.id,
|
|
10425
10171
|
approach: String(row.text || ""),
|
|
@@ -10903,9 +10649,7 @@ function lastDelegator(delegationChain) {
|
|
|
10903
10649
|
|
|
10904
10650
|
// src/contracts/lens-filter.contract.ts
|
|
10905
10651
|
function isLensFilterCriteria(value) {
|
|
10906
|
-
|
|
10907
|
-
const obj = value;
|
|
10908
|
-
return typeof obj.version === "number" && typeof obj.kind === "string";
|
|
10652
|
+
return isRecord6(value) && typeof value.version === "number" && typeof value.kind === "string";
|
|
10909
10653
|
}
|
|
10910
10654
|
function isTaxonomyFilterCriteriaV1(value) {
|
|
10911
10655
|
if (!isLensFilterCriteria(value)) return false;
|
|
@@ -10934,6 +10678,9 @@ function validateFilterCriteria(value) {
|
|
|
10934
10678
|
]
|
|
10935
10679
|
};
|
|
10936
10680
|
}
|
|
10681
|
+
function isRecord6(value) {
|
|
10682
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
10683
|
+
}
|
|
10937
10684
|
function validateTaxonomyFilterV1(criteria) {
|
|
10938
10685
|
const errors = [];
|
|
10939
10686
|
if (!Array.isArray(criteria.entityTypeFilters)) {
|
|
@@ -11460,6 +11207,9 @@ function fromBase64(value) {
|
|
|
11460
11207
|
const normalized = value.replace(/-/g, "+").replace(/_/g, "/");
|
|
11461
11208
|
return decodeURIComponent(escape(atob(normalized)));
|
|
11462
11209
|
}
|
|
11210
|
+
function isRecord7(value) {
|
|
11211
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
11212
|
+
}
|
|
11463
11213
|
function createEventId() {
|
|
11464
11214
|
const random = typeof globalThis.crypto?.randomUUID === "function" ? globalThis.crypto.randomUUID().replace(/-/g, "") : Array.from(
|
|
11465
11215
|
typeof globalThis.crypto?.getRandomValues === "function" ? globalThis.crypto.getRandomValues(new Uint8Array(16)) : Array.from({ length: 16 }, () => Math.floor(Math.random() * 256)),
|
|
@@ -11508,14 +11258,14 @@ function decodeEventCursor(cursor) {
|
|
|
11508
11258
|
}
|
|
11509
11259
|
try {
|
|
11510
11260
|
const parsed = JSON.parse(fromBase64(cursor.trim()));
|
|
11511
|
-
if (typeof parsed.timestamp !== "number" || !Number.isFinite(parsed.timestamp) || typeof parsed.eventId !== "string" || parsed.eventId.trim().length === 0) {
|
|
11261
|
+
if (!isRecord7(parsed) || typeof parsed.timestamp !== "number" || !Number.isFinite(parsed.timestamp) || typeof parsed.eventId !== "string" || parsed.eventId.trim().length === 0) {
|
|
11512
11262
|
return null;
|
|
11513
11263
|
}
|
|
11514
11264
|
return {
|
|
11515
11265
|
timestamp: parsed.timestamp,
|
|
11516
11266
|
eventId: parsed.eventId.trim()
|
|
11517
11267
|
};
|
|
11518
|
-
} catch {
|
|
11268
|
+
} catch (error) {
|
|
11519
11269
|
return null;
|
|
11520
11270
|
}
|
|
11521
11271
|
}
|
|
@@ -11544,7 +11294,7 @@ var LOCALHOST_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1"])
|
|
|
11544
11294
|
function normalizeUrl(url) {
|
|
11545
11295
|
try {
|
|
11546
11296
|
return new URL(url.trim());
|
|
11547
|
-
} catch {
|
|
11297
|
+
} catch (error) {
|
|
11548
11298
|
throw new Error("Webhook URL must be a valid absolute URL.");
|
|
11549
11299
|
}
|
|
11550
11300
|
}
|
|
@@ -11790,10 +11540,18 @@ function isInfisicalRuntimeDisabled(env = {}) {
|
|
|
11790
11540
|
}
|
|
11791
11541
|
async function hydrateInfisicalRuntimeEnv(options) {
|
|
11792
11542
|
const env = options.env ?? {};
|
|
11793
|
-
const
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11543
|
+
const baseBootstrap = readInfisicalRuntimeBootstrap(env, options.bootstrap);
|
|
11544
|
+
const bootstrap = baseBootstrap ? {
|
|
11545
|
+
...baseBootstrap,
|
|
11546
|
+
...Object.fromEntries(
|
|
11547
|
+
Object.entries(options.bootstrap ?? {}).filter(
|
|
11548
|
+
([, value]) => value !== void 0
|
|
11549
|
+
)
|
|
11550
|
+
),
|
|
11551
|
+
apiUrl: trimTrailingSlash(
|
|
11552
|
+
options.bootstrap?.apiUrl ?? baseBootstrap.apiUrl
|
|
11553
|
+
)
|
|
11554
|
+
} : null;
|
|
11797
11555
|
if (!bootstrap) {
|
|
11798
11556
|
return {
|
|
11799
11557
|
status: "disabled",
|
|
@@ -11889,16 +11647,6 @@ function normalizeInfisicalEnvironment(value) {
|
|
|
11889
11647
|
}
|
|
11890
11648
|
return "prod";
|
|
11891
11649
|
}
|
|
11892
|
-
function mergeBootstrap(base, overrides) {
|
|
11893
|
-
if (!base) {
|
|
11894
|
-
return null;
|
|
11895
|
-
}
|
|
11896
|
-
return {
|
|
11897
|
-
...base,
|
|
11898
|
-
...compact(overrides ?? {}),
|
|
11899
|
-
apiUrl: trimTrailingSlash(overrides?.apiUrl ?? base.apiUrl)
|
|
11900
|
-
};
|
|
11901
|
-
}
|
|
11902
11650
|
async function loginWithUniversalAuth(bootstrap, fetchImpl) {
|
|
11903
11651
|
const response = await fetchImpl(
|
|
11904
11652
|
`${trimTrailingSlash(bootstrap.apiUrl)}/api/v1/auth/universal-auth/login`,
|
|
@@ -11983,14 +11731,18 @@ async function readSecretValue(args) {
|
|
|
11983
11731
|
async function readJson2(response) {
|
|
11984
11732
|
try {
|
|
11985
11733
|
return await response.json();
|
|
11986
|
-
} catch {
|
|
11734
|
+
} catch (error) {
|
|
11735
|
+
debugInfisicalRuntimeFallback("response.json", error);
|
|
11987
11736
|
return void 0;
|
|
11988
11737
|
}
|
|
11989
11738
|
}
|
|
11739
|
+
function isRecord8(value) {
|
|
11740
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
11741
|
+
}
|
|
11990
11742
|
function readNestedString(value, path) {
|
|
11991
11743
|
let current = value;
|
|
11992
11744
|
for (const key of path) {
|
|
11993
|
-
if (!current ||
|
|
11745
|
+
if (!isRecord8(current) || !(key in current)) {
|
|
11994
11746
|
return null;
|
|
11995
11747
|
}
|
|
11996
11748
|
current = current[key];
|
|
@@ -11998,13 +11750,12 @@ function readNestedString(value, path) {
|
|
|
11998
11750
|
return typeof current === "string" && current.length > 0 ? current : null;
|
|
11999
11751
|
}
|
|
12000
11752
|
function messageFromBody(body4) {
|
|
12001
|
-
if (!body4
|
|
11753
|
+
if (!isRecord8(body4)) {
|
|
12002
11754
|
return "no response body";
|
|
12003
11755
|
}
|
|
12004
|
-
const record = body4;
|
|
12005
11756
|
for (const key of ["message", "error", "errorMessage"]) {
|
|
12006
|
-
if (typeof
|
|
12007
|
-
return
|
|
11757
|
+
if (typeof body4[key] === "string") {
|
|
11758
|
+
return body4[key];
|
|
12008
11759
|
}
|
|
12009
11760
|
}
|
|
12010
11761
|
return JSON.stringify(body4);
|
|
@@ -12024,12 +11775,34 @@ function isTruthyEnv(value) {
|
|
|
12024
11775
|
function trimTrailingSlash(value) {
|
|
12025
11776
|
return value.replace(/\/+$/u, "");
|
|
12026
11777
|
}
|
|
12027
|
-
function
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
11778
|
+
function debugInfisicalRuntimeFallback(message, error) {
|
|
11779
|
+
const env = globalThis.process?.env;
|
|
11780
|
+
if (env?.LUCERN_COMPAT_FALLBACK_DEBUG !== "1" && env?.LUCERN_INFISICAL_RUNTIME_DEBUG !== "1") {
|
|
11781
|
+
return;
|
|
11782
|
+
}
|
|
11783
|
+
console.debug(`[infisical-runtime] ${message}`, {
|
|
11784
|
+
error: formatInfisicalRuntimeError(error)
|
|
11785
|
+
});
|
|
11786
|
+
}
|
|
11787
|
+
function formatInfisicalRuntimeError(error) {
|
|
11788
|
+
if (error instanceof Error) {
|
|
11789
|
+
return `${error.name}: ${error.message}`;
|
|
11790
|
+
}
|
|
11791
|
+
if (typeof error === "string") {
|
|
11792
|
+
return error;
|
|
11793
|
+
}
|
|
11794
|
+
if (typeof error === "number" || typeof error === "boolean") {
|
|
11795
|
+
return String(error);
|
|
11796
|
+
}
|
|
11797
|
+
if (error && typeof error === "object") {
|
|
11798
|
+
const keys = Object.keys(error).slice(0, 5);
|
|
11799
|
+
if (keys.length > 0) {
|
|
11800
|
+
return `Unknown Infisical runtime error object with keys: ${keys.join(", ")}`;
|
|
11801
|
+
}
|
|
11802
|
+
}
|
|
11803
|
+
return "Unknown Infisical runtime error shape";
|
|
12031
11804
|
}
|
|
12032
11805
|
|
|
12033
|
-
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, LucernApiError, 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, assertValidWebhookSecret, assertValidWebhookUrl, buildDeprecatedBranchMetadata, buildDomainEvent, buildMcpToolContracts, buildMcpToolManifest, clearRegisteredCustomTools, compareEventCursor, compileContextPackFromSnapshot, computeWebhookSignature, createAdminClient, createAnswersClient, createAudiencesClient, createAuditClient, createAuthDeviceClient, createBeliefsClient, createCanonicalAuthHeaders, createContextClient, createContextFacade, 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, getControlObjectOwnershipCase, getMcpToolExposure, getRegisteredCustomTool, hydrateInfisicalRuntimeEnv, inferActorType, inferLensPerspectiveTypeFromBranchSchema, inferSessionPrincipalType, invokeRegisteredCustomTool, isAfterCursor, isInfisicalRuntimeDisabled, isLensFilterCriteria, isLucernPrompt, isMcpToolAllowed, isTaxonomyFilterCriteriaV1, lastDelegator, listControlObjectOwnershipCases, listRegisteredCustomTools, mapAliasedList, mapGatewayData, mapOpinionHistoryEntriesFromGatewayData, matchesAnyEventPattern, matchesEventPattern, mcpContractToInputSchema, mcpContractToManifestEntry, migrateBranchToLens, nextDeliveryAttemptAt, normalizeCanonicalLucernAuthContext, normalizeDelegationChain, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeRetentionDays, normalizeTopicQuery, normalizeWebhookPatterns, opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, planContextPackCompilation, randomIdempotencyKey, readInfisicalRuntimeBootstrap, registerCustomTool, resolveDeliveryFailureStatus, resolveText, resolveTopicId, sanitizeWebhookRecord, sortEventsByCursor, toQueryString, truncateWebhookResponseBody, unregisterCustomTool, validateFilterCriteria, withSdkAliases, withTextAlias, withTopicAlias };
|
|
11806
|
+
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, LucernApiError, 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, assertValidWebhookSecret, assertValidWebhookUrl, buildDeprecatedBranchMetadata, buildDomainEvent, buildMcpToolContracts, buildMcpToolManifest, clearRegisteredCustomTools, compareEventCursor, compileContextPackFromSnapshot, computeWebhookSignature, createAdminClient, createAnswersClient, createAudiencesClient, createAuditClient, createAuthDeviceClient, createBeliefsClient, createCanonicalAuthHeaders, createContextClient, createContextFacade, 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, 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, normalizeDelegationChain, normalizeNodeVerificationStatus, normalizeNodeWriteInput, normalizeRetentionDays, normalizeTopicQuery, normalizeWebhookPatterns, opinionFromBaseRate, opinionFromDogmatic, opinionFromProjected, planContextPackCompilation, randomIdempotencyKey, readInfisicalRuntimeBootstrap, registerCustomTool, resolveDeliveryFailureStatus, resolveText, resolveTopicId, sanitizeWebhookRecord, sortEventsByCursor, toQueryString, truncateWebhookResponseBody, unregisterCustomTool, validateFilterCriteria, withSdkAliases, withTextAlias, withTopicAlias };
|
|
12034
11807
|
//# sourceMappingURL=index.js.map
|
|
12035
11808
|
//# sourceMappingURL=index.js.map
|