@lucern/sdk 1.0.28 → 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 +15 -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
package/dist/contextTypes.d.ts
CHANGED
|
@@ -5,52 +5,21 @@ export type ContextTraversalMode = "anchored_ranked" | "bounded_exploration" | "
|
|
|
5
5
|
export type ContextRequestedDepth = "low" | "medium" | "high" | "extra-high";
|
|
6
6
|
export type ContextHeartbeatIntent = "pre_write" | "pre_closeout" | "research_loop" | "status_check";
|
|
7
7
|
export type ContextPackSectionKey = "invariants" | "activeBeliefs" | "openQuestions" | "recentEvidence" | "contradictions";
|
|
8
|
-
export
|
|
9
|
-
query: number;
|
|
10
|
-
recency: number;
|
|
11
|
-
confidence?: number;
|
|
8
|
+
export interface RankingWeightVector {
|
|
12
9
|
beliefType?: number;
|
|
10
|
+
confidence?: number;
|
|
13
11
|
priority?: number;
|
|
12
|
+
query: number;
|
|
13
|
+
recency: number;
|
|
14
14
|
severity?: number;
|
|
15
|
-
}
|
|
16
|
-
export
|
|
15
|
+
}
|
|
16
|
+
export interface PackWeightOverride {
|
|
17
17
|
section: ContextPackSectionKey;
|
|
18
18
|
weights: Partial<RankingWeightVector>;
|
|
19
|
-
}
|
|
20
|
-
export
|
|
21
|
-
/** Optional explicit topic. Omit to resolve by query. */
|
|
22
|
-
topicId?: string;
|
|
23
|
-
query?: string;
|
|
24
|
-
purpose?: CampaignContextPurpose;
|
|
25
|
-
purposePrompt?: string;
|
|
26
|
-
topicHint?: string;
|
|
27
|
-
tags?: string[];
|
|
28
|
-
touchedPaths?: string[];
|
|
29
|
-
sourceRef?: string;
|
|
30
|
-
sourceKind?: string;
|
|
31
|
-
campaign?: number;
|
|
32
|
-
lane?: string;
|
|
33
|
-
status?: string;
|
|
34
|
-
principalId?: string;
|
|
35
|
-
workspaceId?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CompileContextInput {
|
|
36
21
|
budget?: number;
|
|
37
|
-
|
|
38
|
-
limit?: number;
|
|
39
|
-
maxDepth?: number;
|
|
40
|
-
includeEntities?: boolean;
|
|
41
|
-
mode?: ContextCompilationMode;
|
|
42
|
-
includeFailures?: boolean;
|
|
43
|
-
worktreeId?: string;
|
|
44
|
-
sessionId?: string;
|
|
45
|
-
heartbeat?: boolean;
|
|
46
|
-
heartbeatIntent?: ContextHeartbeatIntent;
|
|
47
|
-
heartbeatBudgetMs?: number;
|
|
48
|
-
heartbeatTraceId?: string;
|
|
49
|
-
invocationIntent?: string;
|
|
50
|
-
receiptIntent?: string;
|
|
51
|
-
packWeightOverrides?: PackWeightOverride[];
|
|
52
|
-
tokenBudget?: number;
|
|
53
|
-
rankingProfile?: ContextRankingProfile;
|
|
22
|
+
campaign?: number;
|
|
54
23
|
/**
|
|
55
24
|
* Dimension-seeded compiles synthesize every scoped worktree but bound raw
|
|
56
25
|
* belief/question/evidence enrichment to a ranked carrier-topic sample.
|
|
@@ -58,89 +27,114 @@ export type CompileContextInput = {
|
|
|
58
27
|
* enrichment in the returned pack.
|
|
59
28
|
*/
|
|
60
29
|
contentTopicLimit?: number;
|
|
61
|
-
|
|
30
|
+
heartbeat?: boolean;
|
|
31
|
+
heartbeatBudgetMs?: number;
|
|
32
|
+
heartbeatIntent?: ContextHeartbeatIntent;
|
|
33
|
+
heartbeatTraceId?: string;
|
|
34
|
+
includeEntities?: boolean;
|
|
35
|
+
includeFailures?: boolean;
|
|
36
|
+
invocationIntent?: string;
|
|
37
|
+
lane?: string;
|
|
38
|
+
limit?: number;
|
|
39
|
+
maxDepth?: number;
|
|
40
|
+
mode?: ContextCompilationMode;
|
|
41
|
+
packWeightOverrides?: PackWeightOverride[];
|
|
42
|
+
principalId?: string;
|
|
43
|
+
purpose?: CampaignContextPurpose;
|
|
44
|
+
purposePrompt?: string;
|
|
45
|
+
query?: string;
|
|
46
|
+
ranking?: ContextRankingProfile;
|
|
47
|
+
rankingProfile?: ContextRankingProfile;
|
|
48
|
+
receiptIntent?: string;
|
|
62
49
|
requestedDepth?: ContextRequestedDepth;
|
|
63
|
-
|
|
50
|
+
sessionId?: string;
|
|
51
|
+
sourceKind?: string;
|
|
52
|
+
sourceRef?: string;
|
|
53
|
+
status?: string;
|
|
54
|
+
tags?: string[];
|
|
55
|
+
tokenBudget?: number;
|
|
56
|
+
topicHint?: string;
|
|
57
|
+
/** Optional explicit topic. Omit to resolve by query. */
|
|
58
|
+
topicId?: string;
|
|
59
|
+
touchedPaths?: string[];
|
|
60
|
+
traversalMode?: ContextTraversalMode;
|
|
61
|
+
workspaceId?: string;
|
|
62
|
+
worktreeId?: string;
|
|
63
|
+
}
|
|
64
64
|
export type CampaignContextPurpose = "campaign_status" | "avatar_tree_foundation" | "clean_prod_reset" | "graph_v2_readiness" | "custom";
|
|
65
|
-
export
|
|
65
|
+
export interface GetCampaignContextInput {
|
|
66
66
|
campaign: number;
|
|
67
|
+
lane?: string;
|
|
68
|
+
principalId?: string;
|
|
67
69
|
purpose?: CampaignContextPurpose;
|
|
68
70
|
purposePrompt?: string;
|
|
69
|
-
|
|
71
|
+
scanLimit?: number;
|
|
72
|
+
sourceSpanLimit?: number;
|
|
70
73
|
status?: string;
|
|
71
|
-
|
|
74
|
+
tokenBudget?: number;
|
|
72
75
|
workspaceId?: string;
|
|
73
76
|
worktreeLimit?: number;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
tokenBudget?: number;
|
|
77
|
-
};
|
|
78
|
-
export type PublicContextBelief = {
|
|
77
|
+
}
|
|
78
|
+
export interface PublicContextBelief {
|
|
79
79
|
beliefId: string;
|
|
80
|
-
text: string;
|
|
81
|
-
confidence: number | null;
|
|
82
80
|
beliefType?: string | null;
|
|
81
|
+
confidence: number | null;
|
|
82
|
+
justification?: string;
|
|
83
|
+
score: number;
|
|
83
84
|
status?: string;
|
|
85
|
+
text: string;
|
|
84
86
|
updatedAt?: number | null;
|
|
85
|
-
|
|
87
|
+
}
|
|
88
|
+
export interface PublicContextQuestion {
|
|
86
89
|
justification?: string;
|
|
87
|
-
|
|
88
|
-
export type PublicContextQuestion = {
|
|
90
|
+
priority: string;
|
|
89
91
|
questionId: string;
|
|
90
|
-
|
|
92
|
+
score: number;
|
|
91
93
|
status: string;
|
|
92
|
-
|
|
94
|
+
text: string;
|
|
93
95
|
updatedAt?: number | null;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export type PublicContextEvidence = {
|
|
96
|
+
}
|
|
97
|
+
export interface PublicContextEvidence {
|
|
98
|
+
createdAt?: number | null;
|
|
98
99
|
evidenceId: string;
|
|
99
|
-
|
|
100
|
-
sourceUrl?: string | null;
|
|
100
|
+
justification?: string;
|
|
101
101
|
kind: string;
|
|
102
|
-
createdAt?: number | null;
|
|
103
102
|
score: number;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
sourceUrl?: string | null;
|
|
104
|
+
text: string;
|
|
105
|
+
}
|
|
106
|
+
export interface PublicContextContradiction {
|
|
107
107
|
contradictionId: string;
|
|
108
|
-
severity: string;
|
|
109
|
-
status: string;
|
|
110
108
|
description: string;
|
|
111
|
-
score: number;
|
|
112
109
|
justification?: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
text?: string;
|
|
110
|
+
score: number;
|
|
111
|
+
severity: string;
|
|
112
|
+
status: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PublicContextEntity {
|
|
119
115
|
connectedBeliefCount: number;
|
|
120
116
|
connectedEvidenceCount: number;
|
|
121
|
-
|
|
117
|
+
entityId: string;
|
|
118
|
+
entityType: string;
|
|
122
119
|
metadata?: Record<string, unknown>;
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
score: number;
|
|
121
|
+
text?: string;
|
|
122
|
+
title: string;
|
|
123
|
+
}
|
|
124
|
+
export interface PublicContextInjectionPolicy {
|
|
126
125
|
estimatedTokens: number;
|
|
127
|
-
sectionBudgets: Record<string, number>;
|
|
128
|
-
sectionUsage: Record<string, number>;
|
|
129
|
-
selected: Record<string, string[]>;
|
|
130
126
|
excludedItems?: Array<{
|
|
131
127
|
id: string;
|
|
132
128
|
section: string;
|
|
133
129
|
reason: "budget_exceeded" | "anti_repetition" | "below_threshold";
|
|
134
130
|
score: number;
|
|
135
131
|
}>;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
narrative_id?: string;
|
|
143
|
-
scope?: Record<string, unknown>;
|
|
132
|
+
sectionBudgets: Record<string, number>;
|
|
133
|
+
sectionUsage: Record<string, number>;
|
|
134
|
+
selected: Record<string, string[]>;
|
|
135
|
+
tokenBudget: number;
|
|
136
|
+
}
|
|
137
|
+
export interface PublicContextNarrativeBlock {
|
|
144
138
|
childNarratives?: Array<{
|
|
145
139
|
narrativeId: string;
|
|
146
140
|
narrative_id?: string;
|
|
@@ -149,106 +143,112 @@ export type PublicContextNarrativeBlock = {
|
|
|
149
143
|
summary: string;
|
|
150
144
|
recordsNamed?: number;
|
|
151
145
|
}>;
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
kind: string;
|
|
147
|
+
narrative_id?: string;
|
|
148
|
+
narrativeId?: string;
|
|
149
|
+
recordsNamed?: number;
|
|
150
|
+
scope?: Record<string, unknown>;
|
|
151
|
+
text: string;
|
|
152
|
+
}
|
|
153
|
+
export interface PublicContextNarrativeCoverage {
|
|
154
|
+
blocksEmitted?: number;
|
|
155
|
+
enrichmentMode?: string;
|
|
155
156
|
recordsNamed?: number;
|
|
156
157
|
recordsOmitted?: number;
|
|
157
|
-
|
|
158
|
-
topicsEnriched?: number;
|
|
158
|
+
recordsSynthesized?: number;
|
|
159
159
|
topicContentOmitted?: number;
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
topicsEnriched?: number;
|
|
161
|
+
topicsSynthesized?: number;
|
|
162
162
|
[key: string]: unknown;
|
|
163
|
-
}
|
|
164
|
-
export
|
|
163
|
+
}
|
|
164
|
+
export interface PublicContextSynthesisLint {
|
|
165
165
|
code?: string;
|
|
166
|
-
severity?: string;
|
|
167
166
|
message?: string;
|
|
168
167
|
path?: string[];
|
|
168
|
+
severity?: string;
|
|
169
169
|
[key: string]: unknown;
|
|
170
|
-
}
|
|
171
|
-
export
|
|
170
|
+
}
|
|
171
|
+
export interface PublicContextRetrievalReceipt {
|
|
172
172
|
candidateCounts?: Record<string, number>;
|
|
173
173
|
coverageWarning?: string | null;
|
|
174
|
-
narrativeCoverage?: PublicContextNarrativeCoverage;
|
|
175
|
-
synthesisLints?: PublicContextSynthesisLint[];
|
|
176
174
|
heartbeatReceipt?: PublicContextHeartbeatReceipt;
|
|
175
|
+
narrativeCoverage?: PublicContextNarrativeCoverage;
|
|
177
176
|
suggestedNextActions?: string[];
|
|
177
|
+
synthesisLints?: PublicContextSynthesisLint[];
|
|
178
178
|
[key: string]: unknown;
|
|
179
|
-
}
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
sessionId?: string;
|
|
184
|
-
traceId?: string;
|
|
185
|
-
startedAt?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface PublicContextHeartbeatReceipt {
|
|
181
|
+
budgetStatus: "within_budget" | "over_budget" | string;
|
|
182
|
+
cachedP50BudgetMs: number;
|
|
186
183
|
completedAt?: number;
|
|
184
|
+
contextBeforeWrite: boolean;
|
|
185
|
+
coverageWarning?: boolean;
|
|
186
|
+
hardTimeoutMs?: number;
|
|
187
|
+
intent: string;
|
|
188
|
+
lintsBlockingPreWrite?: number;
|
|
187
189
|
measuredDurationMs: number;
|
|
190
|
+
preWriteReady: boolean;
|
|
188
191
|
requestedBudgetMs: number;
|
|
189
|
-
|
|
192
|
+
schemaVersion: "compile_context_heartbeat.v1";
|
|
193
|
+
sessionId?: string;
|
|
194
|
+
startedAt?: number;
|
|
190
195
|
synthesizedP50BudgetMs: number;
|
|
191
|
-
|
|
192
|
-
budgetStatus: "within_budget" | "over_budget" | string;
|
|
196
|
+
traceId?: string;
|
|
193
197
|
traceMetric: "context_before_write" | string;
|
|
194
|
-
contextBeforeWrite: boolean;
|
|
195
|
-
preWriteReady: boolean;
|
|
196
|
-
lintsBlockingPreWrite?: number;
|
|
197
|
-
coverageWarning?: boolean;
|
|
198
198
|
[key: string]: unknown;
|
|
199
|
-
}
|
|
200
|
-
export
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
included?: Array<Record<string, unknown>>;
|
|
205
|
-
omitted?: Array<Record<string, unknown>>;
|
|
206
|
-
rankingInputs?: Record<string, unknown>;
|
|
199
|
+
}
|
|
200
|
+
export interface PublicContextAssemblyReceipt {
|
|
201
|
+
axiomTelemetry?: Record<string, unknown>;
|
|
202
|
+
included?: Record<string, unknown>[];
|
|
203
|
+
omitted?: Record<string, unknown>[];
|
|
207
204
|
policyClipping?: Record<string, unknown>;
|
|
205
|
+
rankingInputs?: Record<string, unknown>;
|
|
206
|
+
receiptUuid?: string;
|
|
207
|
+
receiptVersion?: string;
|
|
208
208
|
synthesisLints?: PublicContextSynthesisLint[];
|
|
209
|
-
|
|
209
|
+
traceId?: string;
|
|
210
210
|
[key: string]: unknown;
|
|
211
|
-
}
|
|
212
|
-
export
|
|
213
|
-
invariants?: PublicContextBelief[];
|
|
211
|
+
}
|
|
212
|
+
export interface PublicContextSupportingObjects {
|
|
214
213
|
activeBeliefs?: PublicContextBelief[];
|
|
214
|
+
contradictions?: PublicContextContradiction[];
|
|
215
|
+
entities?: unknown[];
|
|
216
|
+
invariants?: PublicContextBelief[];
|
|
217
|
+
lanes?: string[];
|
|
215
218
|
openQuestions?: PublicContextQuestion[];
|
|
216
219
|
recentEvidence?: PublicContextEvidence[];
|
|
217
|
-
contradictions?: PublicContextContradiction[];
|
|
218
220
|
relatedEntities?: PublicContextEntity[];
|
|
219
221
|
worktrees?: unknown[];
|
|
220
|
-
|
|
221
|
-
entities?: unknown[];
|
|
222
|
-
};
|
|
222
|
+
}
|
|
223
223
|
export type PublicCompiledContext = ContractPublicCompiledContext & {
|
|
224
224
|
narrativeIndex?: Record<string, unknown>;
|
|
225
225
|
};
|
|
226
|
-
export
|
|
227
|
-
|
|
228
|
-
laneOrder?: Array<Record<string, unknown>>;
|
|
229
|
-
blockers?: Array<Record<string, unknown>>;
|
|
230
|
-
risks?: Array<Record<string, unknown>>;
|
|
231
|
-
openQuestions?: Array<Record<string, unknown>>;
|
|
226
|
+
export interface PublicCampaignContextPayload {
|
|
227
|
+
blockers?: Record<string, unknown>[];
|
|
232
228
|
evidencePosture?: Record<string, unknown>;
|
|
233
|
-
|
|
229
|
+
laneOrder?: Record<string, unknown>[];
|
|
230
|
+
mission?: Record<string, unknown>;
|
|
231
|
+
openQuestions?: Record<string, unknown>[];
|
|
234
232
|
purposeNarrative?: Record<string, unknown>;
|
|
233
|
+
risks?: Record<string, unknown>[];
|
|
234
|
+
sourceSpans?: Record<string, unknown>[];
|
|
235
235
|
[key: string]: unknown;
|
|
236
|
-
}
|
|
237
|
-
export
|
|
238
|
-
|
|
236
|
+
}
|
|
237
|
+
export interface PublicCampaignContext {
|
|
238
|
+
campaign: number;
|
|
239
239
|
campaignContext: PublicCampaignContextPayload;
|
|
240
|
-
|
|
240
|
+
contextNarrative: Array<string | PublicContextNarrativeBlock>;
|
|
241
|
+
diagnostics: Record<string, unknown>;
|
|
242
|
+
generatedAt: number;
|
|
241
243
|
narrativeCoverage?: PublicContextNarrativeCoverage;
|
|
242
|
-
|
|
244
|
+
purposeNarrative?: Record<string, unknown>;
|
|
243
245
|
retrievalReceipt?: PublicContextRetrievalReceipt;
|
|
244
|
-
synthesisReceipt?: Record<string, unknown>;
|
|
245
|
-
supportingObjects?: PublicContextSupportingObjects & {
|
|
246
|
-
sourceSpans?: Array<Record<string, unknown>>;
|
|
247
|
-
};
|
|
248
246
|
schemaVersion: "campaign_context.v1" | string;
|
|
249
|
-
campaign: number;
|
|
250
|
-
generatedAt: number;
|
|
251
247
|
summary: Record<string, unknown>;
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
supportingObjects?: PublicContextSupportingObjects & {
|
|
249
|
+
sourceSpans?: Record<string, unknown>[];
|
|
250
|
+
};
|
|
251
|
+
synthesisLints?: PublicContextSynthesisLint[];
|
|
252
|
+
synthesisReceipt?: Record<string, unknown>;
|
|
253
|
+
}
|
|
254
254
|
//# sourceMappingURL=contextTypes.d.ts.map
|
|
@@ -105,11 +105,7 @@ export const REASONING_METHODS = [
|
|
|
105
105
|
// CONTRADICTION ENUMS
|
|
106
106
|
// =============================================================================
|
|
107
107
|
/** Defeat types (Pollock taxonomy) — how a contradiction operates */
|
|
108
|
-
export const DEFEAT_TYPES = [
|
|
109
|
-
"rebuts",
|
|
110
|
-
"undercuts",
|
|
111
|
-
"undermines",
|
|
112
|
-
];
|
|
108
|
+
export const DEFEAT_TYPES = ["rebuts", "undercuts", "undermines"];
|
|
113
109
|
/** Contradiction severity */
|
|
114
110
|
export const CONTRADICTION_SEVERITIES = [
|
|
115
111
|
"low",
|
|
@@ -151,12 +147,7 @@ export const WORKTREE_PHASES = [
|
|
|
151
147
|
* - L3: Beliefs — structural claims that carry confidence
|
|
152
148
|
* - L4: Judgments — irreversible commitments based on the epistemic state
|
|
153
149
|
*/
|
|
154
|
-
export const EPISTEMIC_LAYERS = [
|
|
155
|
-
"L1",
|
|
156
|
-
"L2",
|
|
157
|
-
"L3",
|
|
158
|
-
"L4",
|
|
159
|
-
];
|
|
150
|
+
export const EPISTEMIC_LAYERS = ["L1", "L2", "L3", "L4"];
|
|
160
151
|
// =============================================================================
|
|
161
152
|
// JUDGMENT TYPES
|
|
162
153
|
// =============================================================================
|
|
@@ -10,28 +10,22 @@ export declare const SESSION_PRINCIPAL_TYPES: readonly ["human", "service", "age
|
|
|
10
10
|
export type SessionPrincipalType = (typeof SESSION_PRINCIPAL_TYPES)[number];
|
|
11
11
|
export declare const SESSION_LIFECYCLE_STATUSES: readonly ["active", "expired", "revoked"];
|
|
12
12
|
export type SessionLifecycleStatus = (typeof SESSION_LIFECYCLE_STATUSES)[number];
|
|
13
|
-
export
|
|
14
|
-
principalId: string;
|
|
15
|
-
principalType: SessionPrincipalType;
|
|
13
|
+
export interface SessionDelegationHop {
|
|
16
14
|
authMode?: SessionAuthMode;
|
|
17
|
-
sessionId?: string;
|
|
18
15
|
delegatedAt?: number;
|
|
19
|
-
reason?: string;
|
|
20
|
-
};
|
|
21
|
-
export type SessionAuditOutcome = "accepted" | "rejected" | "revoked" | "expired";
|
|
22
|
-
export type SessionAuditEnvelope = {
|
|
23
|
-
sessionId: string;
|
|
24
|
-
authMode: SessionAuthMode;
|
|
25
16
|
principalId: string;
|
|
26
17
|
principalType: SessionPrincipalType;
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
reason?: string;
|
|
19
|
+
sessionId?: string;
|
|
20
|
+
}
|
|
21
|
+
export type SessionAuditOutcome = "accepted" | "rejected" | "revoked" | "expired";
|
|
22
|
+
export interface SessionAuditEnvelope {
|
|
29
23
|
apiKeyId?: string;
|
|
30
|
-
|
|
31
|
-
roles?: readonly string[];
|
|
24
|
+
authMode: SessionAuthMode;
|
|
32
25
|
delegationChain?: readonly SessionDelegationHop[];
|
|
33
|
-
sourceSessionId?: string;
|
|
34
26
|
expiresAt?: number;
|
|
27
|
+
principalId: string;
|
|
28
|
+
principalType: SessionPrincipalType;
|
|
35
29
|
request?: {
|
|
36
30
|
endpoint?: string;
|
|
37
31
|
method?: string;
|
|
@@ -41,7 +35,13 @@ export type SessionAuditEnvelope = {
|
|
|
41
35
|
outcome: SessionAuditOutcome;
|
|
42
36
|
reason?: string;
|
|
43
37
|
};
|
|
44
|
-
|
|
38
|
+
roles?: readonly string[];
|
|
39
|
+
scopes: readonly string[];
|
|
40
|
+
sessionId: string;
|
|
41
|
+
sourceSessionId?: string;
|
|
42
|
+
tenantId: string;
|
|
43
|
+
workspaceId?: string;
|
|
44
|
+
}
|
|
45
45
|
export declare function inferSessionPrincipalType(principalId: string): SessionPrincipalType;
|
|
46
46
|
export declare function normalizeDelegationChain(args: {
|
|
47
47
|
delegationChain?: readonly SessionDelegationHop[];
|
|
@@ -22,8 +22,9 @@ export const SESSION_LIFECYCLE_STATUSES = [
|
|
|
22
22
|
"expired",
|
|
23
23
|
"revoked",
|
|
24
24
|
];
|
|
25
|
+
const CLERK_USER_PRINCIPAL_PATTERN = /^user_[A-Za-z0-9]+$/;
|
|
25
26
|
export function inferSessionPrincipalType(principalId) {
|
|
26
|
-
if (
|
|
27
|
+
if (CLERK_USER_PRINCIPAL_PATTERN.test(principalId)) {
|
|
27
28
|
return "human";
|
|
28
29
|
}
|
|
29
30
|
if (principalId.startsWith("agent:")) {
|
|
@@ -58,6 +59,6 @@ export function lastDelegator(delegationChain) {
|
|
|
58
59
|
if (!delegationChain || delegationChain.length === 0) {
|
|
59
60
|
return;
|
|
60
61
|
}
|
|
61
|
-
return delegationChain
|
|
62
|
+
return delegationChain.at(-1)?.principalId;
|
|
62
63
|
}
|
|
63
64
|
//# sourceMappingURL=auth-session.contract.js.map
|