@lucern/sdk 1.0.29 → 1.0.30
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 +8 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
*
|
|
22
22
|
* V2 will add `propertyMatchers` here for arbitrary JSON Schema facet queries.
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export interface EntityTypeFilterV1 {
|
|
25
25
|
/** References ontologyVersion.entityTypes[].value, e.g. "company" */
|
|
26
26
|
entityTypeValue: string;
|
|
27
27
|
/** Optional subtype narrowing. If omitted or empty, all subtypes match. */
|
|
28
28
|
subtypeValues?: string[];
|
|
29
|
-
}
|
|
29
|
+
}
|
|
30
30
|
/**
|
|
31
31
|
* Optional scope to restrict which ontology the filter resolves against.
|
|
32
32
|
* If omitted, resolution uses whatever ontology is active in the workspace.
|
|
33
33
|
*/
|
|
34
|
-
export
|
|
34
|
+
export interface OntologyScope {
|
|
35
35
|
/** Restrict to a specific ontology by key, e.g. "vc-investment" */
|
|
36
36
|
ontologyKey?: string;
|
|
37
|
-
}
|
|
37
|
+
}
|
|
38
38
|
/**
|
|
39
39
|
* Taxonomy filter criteria v1: entity type + subtype matching over ontology.
|
|
40
40
|
*/
|
|
41
|
-
export
|
|
42
|
-
version: 1;
|
|
43
|
-
kind: "taxonomy";
|
|
41
|
+
export interface TaxonomyFilterCriteriaV1 {
|
|
44
42
|
entityTypeFilters: EntityTypeFilterV1[];
|
|
43
|
+
kind: "taxonomy";
|
|
45
44
|
ontologyScope?: OntologyScope;
|
|
46
|
-
|
|
45
|
+
version: 1;
|
|
46
|
+
}
|
|
47
47
|
/**
|
|
48
48
|
* Discriminated union of all supported filter criteria.
|
|
49
49
|
* Resolution logic switches on `version` + `kind`.
|
|
@@ -20,11 +20,14 @@
|
|
|
20
20
|
// Type guards
|
|
21
21
|
// ---------------------------------------------------------------------------
|
|
22
22
|
export function isLensFilterCriteria(value) {
|
|
23
|
-
return isRecord(value) &&
|
|
23
|
+
return (isRecord(value) &&
|
|
24
|
+
typeof value.version === "number" &&
|
|
25
|
+
typeof value.kind === "string");
|
|
24
26
|
}
|
|
25
27
|
export function isTaxonomyFilterCriteriaV1(value) {
|
|
26
|
-
if (!isLensFilterCriteria(value))
|
|
28
|
+
if (!isLensFilterCriteria(value)) {
|
|
27
29
|
return false;
|
|
30
|
+
}
|
|
28
31
|
return value.version === 1 && value.kind === "taxonomy";
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
@@ -83,14 +86,11 @@ function validateTaxonomyFilterV1(criteria) {
|
|
|
83
86
|
errors.push(`entityTypeFilters[${i}].subtypeValues must be an array`);
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
|
-
if (criteria.ontologyScope !== undefined
|
|
87
|
-
|
|
88
|
-
criteria.ontologyScope === null) {
|
|
89
|
-
|
|
90
|
-
}
|
|
89
|
+
if (criteria.ontologyScope !== undefined &&
|
|
90
|
+
(typeof criteria.ontologyScope !== "object" ||
|
|
91
|
+
criteria.ontologyScope === null)) {
|
|
92
|
+
errors.push("ontologyScope must be an object");
|
|
91
93
|
}
|
|
92
|
-
return errors.length === 0
|
|
93
|
-
? { valid: true }
|
|
94
|
-
: { valid: false, errors };
|
|
94
|
+
return errors.length === 0 ? { valid: true } : { valid: false, errors };
|
|
95
95
|
}
|
|
96
96
|
//# sourceMappingURL=lens-filter.contract.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical lens workflow contract shared across schema, SDK, and MCP surfaces.
|
|
3
3
|
*/
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
4
|
+
export type { EntityTypeFilterV1, FilterValidationResult, LensFilterCriteria, OntologyScope, TaxonomyFilterCriteriaV1, } from "./lens-filter.contract";
|
|
5
|
+
export { isLensFilterCriteria, isTaxonomyFilterCriteriaV1, validateFilterCriteria, } from "./lens-filter.contract";
|
|
6
6
|
export declare const LENS_PERSPECTIVE_TYPES: readonly ["investigation", "monitoring", "analysis", "comparison", "taxonomy"];
|
|
7
7
|
export type LensPerspectiveType = (typeof LENS_PERSPECTIVE_TYPES)[number];
|
|
8
8
|
export declare const LENS_STATUSES: readonly ["draft", "active", "archived"];
|
|
@@ -10,49 +10,49 @@ export type LensStatus = (typeof LENS_STATUSES)[number];
|
|
|
10
10
|
export declare const LENS_TASK_TEMPLATE_PRIORITIES: readonly ["critical", "high", "medium", "low"];
|
|
11
11
|
export type LensTaskTemplatePriority = (typeof LENS_TASK_TEMPLATE_PRIORITIES)[number];
|
|
12
12
|
export type LensLooseMetadata = Record<string, unknown>;
|
|
13
|
-
export
|
|
13
|
+
export interface LensPromptTemplateReference {
|
|
14
14
|
key: string;
|
|
15
|
-
|
|
15
|
+
metadata?: LensLooseMetadata;
|
|
16
16
|
phase?: string;
|
|
17
|
+
promptRef: string;
|
|
18
|
+
required?: boolean;
|
|
17
19
|
role?: string;
|
|
18
20
|
version?: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
export type LensWorkflowStepTemplate = {
|
|
23
|
-
key: string;
|
|
24
|
-
title: string;
|
|
21
|
+
}
|
|
22
|
+
export interface LensWorkflowStepTemplate {
|
|
25
23
|
description?: string;
|
|
24
|
+
key: string;
|
|
25
|
+
metadata?: LensLooseMetadata;
|
|
26
26
|
promptTemplateKey?: string;
|
|
27
27
|
taskTemplateKeys?: string[];
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export
|
|
28
|
+
title: string;
|
|
29
|
+
}
|
|
30
|
+
export interface LensWorkflowTemplate {
|
|
31
|
+
description?: string;
|
|
31
32
|
key: string;
|
|
33
|
+
metadata?: LensLooseMetadata;
|
|
32
34
|
name: string;
|
|
33
|
-
description?: string;
|
|
34
35
|
steps: LensWorkflowStepTemplate[];
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export type LensTaskTemplate = {
|
|
38
|
-
key: string;
|
|
39
|
-
title: string;
|
|
36
|
+
}
|
|
37
|
+
export interface LensTaskTemplate {
|
|
40
38
|
description?: string;
|
|
41
|
-
priority?: LensTaskTemplatePriority;
|
|
42
|
-
phase?: string;
|
|
43
|
-
metadata?: LensLooseMetadata;
|
|
44
|
-
};
|
|
45
|
-
export type LensQuestionTemplate = {
|
|
46
39
|
key: string;
|
|
47
|
-
|
|
40
|
+
metadata?: LensLooseMetadata;
|
|
41
|
+
phase?: string;
|
|
48
42
|
priority?: LensTaskTemplatePriority;
|
|
43
|
+
title: string;
|
|
44
|
+
}
|
|
45
|
+
export interface LensQuestionTemplate {
|
|
46
|
+
key: string;
|
|
49
47
|
linkedBeliefKey?: string;
|
|
50
48
|
metadata?: LensLooseMetadata;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
priority?: LensTaskTemplatePriority;
|
|
50
|
+
text: string;
|
|
51
|
+
}
|
|
52
|
+
export interface LensBranchMigrationSuggestion {
|
|
55
53
|
message: string;
|
|
54
|
+
perspectiveType: LensPerspectiveType;
|
|
55
|
+
recommendedTool: "create_lens";
|
|
56
56
|
suggestedPayload: {
|
|
57
57
|
name: string;
|
|
58
58
|
description?: string;
|
|
@@ -60,13 +60,13 @@ export type LensBranchMigrationSuggestion = {
|
|
|
60
60
|
workspaceId?: string;
|
|
61
61
|
perspectiveType: LensPerspectiveType;
|
|
62
62
|
};
|
|
63
|
-
}
|
|
63
|
+
}
|
|
64
64
|
export declare const BRANCH_DEPRECATION_MESSAGE = "Branches are deprecated for operational framing. Create a workspace-scoped lens instead.";
|
|
65
|
-
export
|
|
65
|
+
export interface DeprecatedBranchMetadata {
|
|
66
66
|
deprecated: true;
|
|
67
67
|
deprecationMessage: string;
|
|
68
68
|
lensSuggestion: LensBranchMigrationSuggestion;
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
export declare function inferLensPerspectiveTypeFromBranchSchema(schema?: string | null): LensPerspectiveType;
|
|
71
71
|
export declare function migrateBranchToLens(args: {
|
|
72
72
|
name: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
/**
|
|
2
3
|
* Canonical lens workflow contract shared across schema, SDK, and MCP surfaces.
|
|
3
4
|
*/
|
|
4
|
-
export {
|
|
5
|
+
export { isLensFilterCriteria, isTaxonomyFilterCriteriaV1, validateFilterCriteria, } from "./lens-filter.contract.js";
|
|
5
6
|
export const LENS_PERSPECTIVE_TYPES = [
|
|
6
7
|
"investigation",
|
|
7
8
|
"monitoring",
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
export * from "./lens-filter.contract.js";
|
|
2
4
|
//# sourceMappingURL=lensFilter.js.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
export * from "./lens-workflow.contract.js";
|
|
2
4
|
//# sourceMappingURL=lensWorkflow.js.map
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
export * from "./tool-contracts";
|
|
2
2
|
import { type McpToolContract } from "./tool-contracts";
|
|
3
3
|
export declare const MCP_ALWAYS_ALLOWED_TOOL_NAMES: readonly ["identity_whoami", "lucern_orient"];
|
|
4
|
-
export
|
|
5
|
-
type: "object";
|
|
4
|
+
export interface McpToolInputSchema {
|
|
6
5
|
properties: Record<string, unknown>;
|
|
7
6
|
required: string[];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
requiredRole?: string;
|
|
7
|
+
type: "object";
|
|
8
|
+
}
|
|
9
|
+
export interface McpPermittedTool {
|
|
12
10
|
approvalGateId?: string;
|
|
13
|
-
isCore?: boolean;
|
|
14
11
|
category?: string;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
isCore?: boolean;
|
|
13
|
+
requiredRole?: string;
|
|
14
|
+
toolName: string;
|
|
15
|
+
}
|
|
16
|
+
export interface McpToolManifestEntry {
|
|
18
17
|
description: string;
|
|
19
18
|
inputSchema: McpToolInputSchema;
|
|
20
19
|
internal: boolean;
|
|
21
|
-
|
|
20
|
+
name: string;
|
|
22
21
|
ontologyPrimitive: McpToolContract["ontologyPrimitive"];
|
|
22
|
+
ownerModule: string;
|
|
23
23
|
tier: McpToolContract["tier"];
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
export type McpToolContractMap = Record<string, McpToolContract>;
|
|
26
|
-
export
|
|
26
|
+
export interface BuildMcpToolContractsOptions {
|
|
27
27
|
extensions?: McpToolContractMap;
|
|
28
|
-
}
|
|
29
|
-
export
|
|
30
|
-
contracts?: McpToolContractMap;
|
|
31
|
-
sessionType?: "agent" | "user";
|
|
32
|
-
permittedTools?: readonly McpPermittedTool[] | null;
|
|
28
|
+
}
|
|
29
|
+
export interface McpToolVisibilityOptions {
|
|
33
30
|
allowedTools?: readonly string[] | null;
|
|
34
31
|
alwaysAllowedTools?: readonly string[];
|
|
35
|
-
|
|
32
|
+
contracts?: McpToolContractMap;
|
|
33
|
+
permittedTools?: readonly McpPermittedTool[] | null;
|
|
34
|
+
sessionType?: "agent" | "user";
|
|
35
|
+
}
|
|
36
36
|
export declare function getMcpToolExposure(toolName: string): "public" | "internal" | "none";
|
|
37
37
|
export declare function buildMcpToolContracts(options?: BuildMcpToolContractsOptions): McpToolContractMap;
|
|
38
38
|
export declare function mcpContractToInputSchema(contract: McpToolContract): McpToolInputSchema;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
export * from "./tool-contracts.js";
|
|
2
4
|
import { LUCERN_OPERATION_MANIFEST } from "@lucern/contracts/function-registry/manifest";
|
|
3
|
-
import { MCP_TOOL_CONTRACTS
|
|
5
|
+
import { MCP_TOOL_CONTRACTS } from "./tool-contracts.js";
|
|
4
6
|
const OPERATION_MANIFEST = LUCERN_OPERATION_MANIFEST;
|
|
5
7
|
export const MCP_ALWAYS_ALLOWED_TOOL_NAMES = [
|
|
6
8
|
"identity_whoami",
|
|
@@ -2,17 +2,7 @@
|
|
|
2
2
|
* Prompt contract for portable, provider-agnostic prompt artifacts.
|
|
3
3
|
*/
|
|
4
4
|
export type LucernPromptModelHint = "fast" | "balanced" | "strong";
|
|
5
|
-
export
|
|
6
|
-
/** Stable prompt identifier, e.g. "lucern/classify-evidence" */
|
|
7
|
-
slug: string;
|
|
8
|
-
/** Semver-ish prompt version, e.g. "1.0.0" */
|
|
9
|
-
version: string;
|
|
10
|
-
/** Prompt template text (supports {{variable}} interpolation) */
|
|
11
|
-
template: string;
|
|
12
|
-
/** Variables expected by the template */
|
|
13
|
-
variables: string[];
|
|
14
|
-
/** Model family hint for runtime model routing */
|
|
15
|
-
modelHint: LucernPromptModelHint;
|
|
5
|
+
export interface LucernPrompt {
|
|
16
6
|
/** Metadata used for ownership and discovery */
|
|
17
7
|
metadata: {
|
|
18
8
|
author: string;
|
|
@@ -20,6 +10,16 @@ export type LucernPrompt = {
|
|
|
20
10
|
description: string;
|
|
21
11
|
tags: string[];
|
|
22
12
|
};
|
|
23
|
-
|
|
13
|
+
/** Model family hint for runtime model routing */
|
|
14
|
+
modelHint: LucernPromptModelHint;
|
|
15
|
+
/** Stable prompt identifier, e.g. "lucern/classify-evidence" */
|
|
16
|
+
slug: string;
|
|
17
|
+
/** Prompt template text (supports {{variable}} interpolation) */
|
|
18
|
+
template: string;
|
|
19
|
+
/** Variables expected by the template */
|
|
20
|
+
variables: string[];
|
|
21
|
+
/** Semver-ish prompt version, e.g. "1.0.0" */
|
|
22
|
+
version: string;
|
|
23
|
+
}
|
|
24
24
|
export declare function isLucernPrompt(value: unknown): value is LucernPrompt;
|
|
25
25
|
//# sourceMappingURL=prompt.contract.d.ts.map
|
package/dist/contracts/prompt.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
export * from "@lucern/contracts/sdk-tools.contract";
|
|
2
3
|
//# sourceMappingURL=sdk-tools.contract.js.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
export * from "./sdk-tools.contract.js";
|
|
2
4
|
//# sourceMappingURL=sdkTools.js.map
|
|
@@ -39,33 +39,33 @@ export declare const WORKFLOW_AUTO_FIX_MODES: readonly ["disabled", "dry_run", "
|
|
|
39
39
|
export type WorkflowAutoFixMode = (typeof WORKFLOW_AUTO_FIX_MODES)[number];
|
|
40
40
|
export declare const WORKFLOW_INTEGRITY_CHECKS: readonly ["null_dependency_refs", "superseded_blockers", "band_order_inconsistency", "sparse_shaping", "failed_completed_gate"];
|
|
41
41
|
export type WorkflowIntegrityCheckId = (typeof WORKFLOW_INTEGRITY_CHECKS)[number];
|
|
42
|
-
export
|
|
42
|
+
export interface WorkflowProofArtifact {
|
|
43
43
|
kind: WorkflowProofArtifactKind;
|
|
44
44
|
label: string;
|
|
45
45
|
required?: boolean;
|
|
46
46
|
sourceRef?: string;
|
|
47
|
-
}
|
|
48
|
-
export
|
|
49
|
-
|
|
47
|
+
}
|
|
48
|
+
export interface WorkflowAutoFixPolicy {
|
|
49
|
+
escalationGate?: string;
|
|
50
50
|
maxActionsPerRun?: number;
|
|
51
|
+
mode: WorkflowAutoFixMode;
|
|
51
52
|
permittedMutationTiers?: WorkflowMutationTier[];
|
|
52
53
|
requireAuditTrail?: boolean;
|
|
53
|
-
|
|
54
|
-
};
|
|
54
|
+
}
|
|
55
55
|
export declare const DEFAULT_WORKFLOW_AUTO_FIX_POLICY: WorkflowAutoFixPolicy;
|
|
56
|
-
export
|
|
57
|
-
mode: WorkflowApprovalMode;
|
|
56
|
+
export interface WorkflowApprovalPolicy {
|
|
58
57
|
approvalGate?: string;
|
|
59
58
|
autoApprovePolicyKey?: string;
|
|
59
|
+
mode: WorkflowApprovalMode;
|
|
60
60
|
rationaleRequired?: boolean;
|
|
61
|
-
}
|
|
62
|
-
export
|
|
63
|
-
|
|
61
|
+
}
|
|
62
|
+
export interface WorkflowOutputBase {
|
|
63
|
+
generatedAt?: number;
|
|
64
64
|
kind: WorkflowOutputKind;
|
|
65
|
-
|
|
65
|
+
outputId: string;
|
|
66
66
|
summary: string;
|
|
67
|
-
|
|
68
|
-
}
|
|
67
|
+
title: string;
|
|
68
|
+
}
|
|
69
69
|
export type EngineeringBriefOutput = WorkflowOutputBase & {
|
|
70
70
|
kind: "engineering_brief";
|
|
71
71
|
sections: Array<{
|
|
@@ -103,24 +103,24 @@ export type StructuredPayloadOutput = WorkflowOutputBase & {
|
|
|
103
103
|
payload: Record<string, unknown>;
|
|
104
104
|
};
|
|
105
105
|
export type WorkflowOutputContract = EngineeringBriefOutput | ResearchMemoOutput | StrategyArtifactOutput | InboxSummaryOutput | PipelineBriefOutput | StructuredPayloadOutput;
|
|
106
|
-
export
|
|
106
|
+
export interface WorkflowActionContract {
|
|
107
107
|
actionId: string;
|
|
108
|
-
|
|
109
|
-
title: string;
|
|
108
|
+
approval: WorkflowApprovalPolicy;
|
|
110
109
|
description: string;
|
|
110
|
+
idempotent?: boolean;
|
|
111
|
+
kind: WorkflowActionKind;
|
|
111
112
|
mutationTier: WorkflowMutationTier;
|
|
112
|
-
toolName?: string;
|
|
113
113
|
produces?: WorkflowOutputKind[];
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
export
|
|
118
|
-
hookId: string;
|
|
119
|
-
event: WorkflowHookEvent;
|
|
120
|
-
description: string;
|
|
121
|
-
condition?: string;
|
|
114
|
+
title: string;
|
|
115
|
+
toolName?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface WorkflowHookContract {
|
|
122
118
|
actionIds: string[];
|
|
123
|
-
|
|
119
|
+
condition?: string;
|
|
120
|
+
description: string;
|
|
121
|
+
event: WorkflowHookEvent;
|
|
122
|
+
hookId: string;
|
|
123
|
+
}
|
|
124
124
|
export type WorkflowTriggerContract = {
|
|
125
125
|
kind: "manual";
|
|
126
126
|
description?: string;
|
|
@@ -132,30 +132,30 @@ export type WorkflowTriggerContract = {
|
|
|
132
132
|
kind: "hook";
|
|
133
133
|
event: WorkflowHookEvent;
|
|
134
134
|
};
|
|
135
|
-
export
|
|
136
|
-
workflowId: string;
|
|
137
|
-
version: typeof WORKFLOW_RUNTIME_SCHEMA_VERSION;
|
|
138
|
-
title: string;
|
|
139
|
-
description: string;
|
|
140
|
-
trigger: WorkflowTriggerContract;
|
|
141
|
-
staffingHint?: WorkflowStaffingHint;
|
|
142
|
-
proofArtifacts?: WorkflowProofArtifact[];
|
|
143
|
-
autoFixPolicy?: WorkflowAutoFixPolicy;
|
|
135
|
+
export interface WorkflowDefinitionV1 {
|
|
144
136
|
actions: readonly WorkflowActionContract[];
|
|
137
|
+
autoFixPolicy?: WorkflowAutoFixPolicy;
|
|
138
|
+
description: string;
|
|
145
139
|
hooks?: readonly WorkflowHookContract[];
|
|
146
|
-
outputs: readonly WorkflowOutputKind[];
|
|
147
140
|
integrityChecks?: readonly WorkflowIntegrityCheckId[];
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
outputs: readonly WorkflowOutputKind[];
|
|
142
|
+
proofArtifacts?: WorkflowProofArtifact[];
|
|
143
|
+
staffingHint?: WorkflowStaffingHint;
|
|
144
|
+
title: string;
|
|
145
|
+
trigger: WorkflowTriggerContract;
|
|
146
|
+
version: typeof WORKFLOW_RUNTIME_SCHEMA_VERSION;
|
|
151
147
|
workflowId: string;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
148
|
+
}
|
|
149
|
+
export interface WorkflowRunReceiptV1 {
|
|
150
|
+
approvalsRequired?: number;
|
|
155
151
|
completedAt?: number;
|
|
156
152
|
outputKinds: WorkflowOutputKind[];
|
|
157
|
-
|
|
158
|
-
|
|
153
|
+
runId: string;
|
|
154
|
+
startedAt: number;
|
|
155
|
+
status: WorkflowRunStatus;
|
|
156
|
+
triggeredBy: WorkflowTriggerKind;
|
|
157
|
+
workflowId: string;
|
|
158
|
+
}
|
|
159
159
|
export declare const NIGHTLY_RECONCILIATION_WORKFLOW_ID: "workflow.pipeline_reconciliation.v1";
|
|
160
160
|
export declare const MORNING_BRIEF_WORKFLOW_ID: "workflow.morning_brief.v1";
|
|
161
161
|
export declare const CANONICAL_WORKFLOW_DEFINITIONS: readonly WorkflowDefinitionV1[];
|
|
@@ -66,11 +66,7 @@ export const WORKFLOW_RUN_STATUSES = [
|
|
|
66
66
|
"failed",
|
|
67
67
|
"cancelled",
|
|
68
68
|
];
|
|
69
|
-
export const WORKFLOW_TRIGGER_KINDS = [
|
|
70
|
-
"manual",
|
|
71
|
-
"schedule",
|
|
72
|
-
"hook",
|
|
73
|
-
];
|
|
69
|
+
export const WORKFLOW_TRIGGER_KINDS = ["manual", "schedule", "hook"];
|
|
74
70
|
export const WORKFLOW_PROOF_ARTIFACT_KINDS = [
|
|
75
71
|
"report",
|
|
76
72
|
"brief",
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
2
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
3
|
export * from "./workflow-runtime.contract.js";
|
|
2
4
|
//# sourceMappingURL=workflowRuntime.js.map
|
|
@@ -12,15 +12,15 @@ export declare function createContradictionsClient(config?: ContradictionsClient
|
|
|
12
12
|
topicId?: string;
|
|
13
13
|
severity?: string;
|
|
14
14
|
defeatType?: string;
|
|
15
|
-
}) =>
|
|
16
|
-
getContradiction: (contradictionId: string) =>
|
|
15
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
16
|
+
getContradiction: (contradictionId: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
17
17
|
listContradictions: (args: {
|
|
18
18
|
topicId?: string;
|
|
19
19
|
status?: string;
|
|
20
20
|
limit?: number;
|
|
21
21
|
cursor?: string;
|
|
22
|
-
}) =>
|
|
23
|
-
findContradictions:
|
|
22
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").ContradictionsListResult>>;
|
|
23
|
+
findContradictions: (args_0: import("..").JsonObject) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
24
24
|
raw: {
|
|
25
25
|
flag(args: {
|
|
26
26
|
beliefA: string;
|
|
@@ -29,15 +29,15 @@ export declare function createContradictionsClient(config?: ContradictionsClient
|
|
|
29
29
|
topicId?: string;
|
|
30
30
|
severity?: string;
|
|
31
31
|
defeatType?: string;
|
|
32
|
-
}):
|
|
32
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
33
33
|
list(args: {
|
|
34
34
|
topicId?: string;
|
|
35
35
|
status?: string;
|
|
36
36
|
limit?: number;
|
|
37
37
|
cursor?: string;
|
|
38
|
-
}):
|
|
39
|
-
get(contradictionId: string):
|
|
40
|
-
find:
|
|
38
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").ContradictionsListResult>>;
|
|
39
|
+
get(contradictionId: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
40
|
+
find: (args_0: import("..").JsonObject) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
import { createLucernClient } from "../client.js";
|
|
2
3
|
export * as graphContracts from "@lucern/contracts/graph/v1";
|
|
3
4
|
export * as methodSchemas from "@lucern/contracts/sdk-methods.contract";
|
package/dist/control-plane.d.ts
CHANGED
|
@@ -2,17 +2,17 @@ import { type GatewayClientConfig, type PlatformGatewaySuccess } from "./coreCli
|
|
|
2
2
|
import type { JsonObject, SdkPrincipalContext } from "./types";
|
|
3
3
|
export type ControlPlanePrincipalType = "human" | "service" | "agent" | "group" | "external_viewer";
|
|
4
4
|
export type ControlPlanePrincipalStatus = "active" | "invited" | "suspended" | "disabled" | "revoked" | "missing";
|
|
5
|
-
export
|
|
5
|
+
export interface ResolveInteractivePrincipalInput {
|
|
6
6
|
clerkId: string;
|
|
7
|
+
providerProjectId?: string;
|
|
7
8
|
tenantId?: string;
|
|
8
9
|
workspaceId?: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export type ControlPlanePermitSubject = {
|
|
10
|
+
}
|
|
11
|
+
export interface ControlPlanePermitSubject {
|
|
12
12
|
subject: string;
|
|
13
13
|
tenant: string;
|
|
14
14
|
workspace?: string;
|
|
15
|
-
}
|
|
15
|
+
}
|
|
16
16
|
export type ResolvedInteractivePrincipalContext = SdkPrincipalContext & {
|
|
17
17
|
principalType: ControlPlanePrincipalType;
|
|
18
18
|
authMode: "interactive_user";
|
|
@@ -28,15 +28,15 @@ export type ResolvedInteractivePrincipalContext = SdkPrincipalContext & {
|
|
|
28
28
|
permit: ControlPlanePermitSubject;
|
|
29
29
|
};
|
|
30
30
|
export type ResolveInteractivePrincipalFailureReason = "principal_missing" | "tenant_missing" | "workspace_missing" | "membership_missing" | "ambiguous_principal" | "ambiguous_workspace" | "alias_invited" | "alias_suspended" | "alias_disabled" | "alias_revoked" | "principal_invited" | "principal_suspended" | "principal_disabled" | "principal_revoked" | "tenant_disabled" | "workspace_disabled" | "resolver_unavailable";
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
reason: ResolveInteractivePrincipalFailureReason | (string & {});
|
|
31
|
+
export interface ResolveInteractivePrincipalFailure {
|
|
32
|
+
details?: JsonObject;
|
|
34
33
|
message: string;
|
|
34
|
+
ok: false;
|
|
35
35
|
principalStatus?: ControlPlanePrincipalStatus | string;
|
|
36
|
+
reason: ResolveInteractivePrincipalFailureReason | (string & {});
|
|
36
37
|
tenantStatus?: string;
|
|
37
38
|
workspaceStatus?: string;
|
|
38
|
-
|
|
39
|
-
};
|
|
39
|
+
}
|
|
40
40
|
type ResolveInteractivePrincipalPayload = (ResolvedInteractivePrincipalContext & {
|
|
41
41
|
ok?: true;
|
|
42
42
|
}) | ResolveInteractivePrincipalFailure;
|
package/dist/control-plane.js
CHANGED
|
@@ -64,7 +64,7 @@ export function normalizeResolvedInteractivePrincipal(payload) {
|
|
|
64
64
|
const principalId = cleanString(payload.principalId);
|
|
65
65
|
const clerkId = cleanString(payload.clerkId);
|
|
66
66
|
const tenantId = cleanString(payload.tenantId);
|
|
67
|
-
if (!principalId
|
|
67
|
+
if (!(principalId && clerkId && tenantId)) {
|
|
68
68
|
throw new LucernControlPlaneIdentityError({
|
|
69
69
|
ok: false,
|
|
70
70
|
reason: "resolver_unavailable",
|
|
@@ -118,7 +118,7 @@ export function normalizeResolvedInteractivePrincipal(payload) {
|
|
|
118
118
|
export function createControlPlaneIdentityClient(config = {}) {
|
|
119
119
|
const gateway = createGatewayRequestClient(config);
|
|
120
120
|
return {
|
|
121
|
-
|
|
121
|
+
resolveInteractivePrincipal(input) {
|
|
122
122
|
return gateway
|
|
123
123
|
.request({
|
|
124
124
|
path: "/api/platform/v1/control-plane/identity/resolve-interactive-principal",
|
|
@@ -19,28 +19,28 @@ export declare const CONTROL_OBJECT_BLAST_RADII: readonly ["platform", "tenant",
|
|
|
19
19
|
/** The furthest scope impacted by a mutation to a control object. */
|
|
20
20
|
export type ControlObjectBlastRadius = (typeof CONTROL_OBJECT_BLAST_RADII)[number];
|
|
21
21
|
/** A single row in the ownership matrix describing who owns, edits, and inherits a control object. */
|
|
22
|
-
export
|
|
22
|
+
export interface ControlObjectOwnershipCase {
|
|
23
|
+
blastRadius: ControlObjectBlastRadius;
|
|
24
|
+
canonicalOwnerScope: ControlObjectOwnerScope;
|
|
23
25
|
caseKey: string;
|
|
24
26
|
caseLabel: string;
|
|
25
|
-
kind: ControlObjectKind;
|
|
26
|
-
canonicalOwnerScope: ControlObjectOwnerScope;
|
|
27
27
|
editSurface: ControlObjectEditSurface;
|
|
28
28
|
inheritanceRule: ControlObjectInheritanceRule;
|
|
29
|
-
|
|
30
|
-
}
|
|
29
|
+
kind: ControlObjectKind;
|
|
30
|
+
}
|
|
31
31
|
/** Full ownership matrix keyed by control object kind. */
|
|
32
32
|
export type ControlObjectOwnershipMatrix = Record<ControlObjectKind, readonly ControlObjectOwnershipCase[]>;
|
|
33
33
|
/** Versioned ownership contract bundling all enums, the matrix, and flattened rows. */
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
kinds: readonly ControlObjectKind[];
|
|
37
|
-
ownerScopes: readonly ControlObjectOwnerScope[];
|
|
34
|
+
export interface ControlObjectOwnershipContract {
|
|
35
|
+
blastRadii: readonly ControlObjectBlastRadius[];
|
|
38
36
|
editSurfaces: readonly ControlObjectEditSurface[];
|
|
39
37
|
inheritanceRules: readonly ControlObjectInheritanceRule[];
|
|
40
|
-
|
|
38
|
+
kinds: readonly ControlObjectKind[];
|
|
41
39
|
matrix: ControlObjectOwnershipMatrix;
|
|
40
|
+
ownerScopes: readonly ControlObjectOwnerScope[];
|
|
42
41
|
rows: readonly ControlObjectOwnershipCase[];
|
|
43
|
-
|
|
42
|
+
version: "1.0.0";
|
|
43
|
+
}
|
|
44
44
|
/** Static ownership matrix mapping each control object kind to its ownership cases. */
|
|
45
45
|
export declare const CONTROL_OBJECT_OWNERSHIP_MATRIX: {
|
|
46
46
|
readonly tenant: readonly [{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
1
2
|
/** All recognized control object kinds in the ownership model. */
|
|
2
3
|
export const CONTROL_OBJECT_KINDS = [
|
|
3
4
|
"tenant",
|