@voyantjs/action-ledger 0.52.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../src/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAC7F,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,cAAc,CAAA;AAGrB,eAAO,MAAM,gCAAgC,uBAAuB,CAAA;AAEpE,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B;A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CACjD,KAAK,EAAE,8BAA8B,GACpC,4BAA4B,CA6B9B;AAED,wBAAsB,0BAA0B,CAC9C,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,6BAA6B,CAAC,CAExC;AAED,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,qCAAqC,GAC3C,0BAA0B,CAqB5B;AAED,wBAAsB,2BAA2B,CAC/C,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,qCAAqC,GAC3C,OAAO,CAAC,2BAA2B,CAAC,CAEtC;AAED,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,sCAAsC,GAC5C,yBAAyB,CA8B3B;AAED,wBAAsB,0BAA0B,CAC9C,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,sCAAsC,GAC5C,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAE5C;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,6CAA6C,GACnD,mCAAmC,CAQrC"}
@@ -0,0 +1,237 @@
1
+ import { actionLedgerService } from "./service.js";
2
+ export const ACTION_LEDGER_APPROVAL_ID_HEADER = "action-approval-id";
3
+ export function mapActionLedgerRequestContext(context, options = {}) {
4
+ const actor = normalizeNullableString(context.actor);
5
+ const callerType = normalizeNullableString(context.callerType);
6
+ const userId = normalizeNullableString(context.userId);
7
+ const agentId = normalizeNullableString(context.agentId);
8
+ const workflowRunId = normalizeNullableString(context.workflowRunId);
9
+ const workflowPrincipalId = normalizeNullableString(context.workflowPrincipalId) ?? workflowRunId;
10
+ const principalSubtype = normalizeNullableString(context.principalSubtype);
11
+ const sessionId = normalizeNullableString(context.sessionId);
12
+ const apiTokenId = normalizeNullableString(context.apiTokenId ?? context.apiKeyId);
13
+ const internalRequest = context.isInternalRequest === true || callerType === "internal";
14
+ if (apiTokenId && callerType === "api_key") {
15
+ return {
16
+ actorType: actor,
17
+ principalType: "api_key",
18
+ principalId: apiTokenId,
19
+ principalSubtype,
20
+ sessionId,
21
+ apiTokenId,
22
+ internalRequest,
23
+ callerType,
24
+ organizationId: normalizeNullableString(context.organizationId),
25
+ workflowRunId,
26
+ workflowStepId: normalizeNullableString(context.workflowStepId),
27
+ correlationId: normalizeNullableString(context.correlationId),
28
+ };
29
+ }
30
+ if (agentId && callerType === "agent") {
31
+ return {
32
+ actorType: actor,
33
+ principalType: "agent",
34
+ principalId: agentId,
35
+ principalSubtype,
36
+ sessionId,
37
+ apiTokenId,
38
+ internalRequest,
39
+ callerType,
40
+ organizationId: normalizeNullableString(context.organizationId),
41
+ workflowRunId,
42
+ workflowStepId: normalizeNullableString(context.workflowStepId),
43
+ correlationId: normalizeNullableString(context.correlationId),
44
+ };
45
+ }
46
+ if (workflowPrincipalId && callerType === "workflow") {
47
+ return {
48
+ actorType: actor,
49
+ principalType: "workflow",
50
+ principalId: workflowPrincipalId,
51
+ principalSubtype,
52
+ sessionId,
53
+ apiTokenId,
54
+ internalRequest,
55
+ callerType,
56
+ organizationId: normalizeNullableString(context.organizationId),
57
+ workflowRunId,
58
+ workflowStepId: normalizeNullableString(context.workflowStepId),
59
+ correlationId: normalizeNullableString(context.correlationId),
60
+ };
61
+ }
62
+ if (internalRequest) {
63
+ return {
64
+ actorType: actor,
65
+ principalType: "system",
66
+ principalId: userId ?? apiTokenId ?? options.fallbackPrincipalId ?? "internal_request",
67
+ principalSubtype,
68
+ sessionId,
69
+ apiTokenId,
70
+ internalRequest,
71
+ callerType,
72
+ organizationId: normalizeNullableString(context.organizationId),
73
+ workflowRunId,
74
+ workflowStepId: normalizeNullableString(context.workflowStepId),
75
+ correlationId: normalizeNullableString(context.correlationId),
76
+ };
77
+ }
78
+ return {
79
+ actorType: actor,
80
+ principalType: userId ? "user" : "system",
81
+ principalId: userId ?? options.fallbackPrincipalId ?? "unknown_request",
82
+ principalSubtype,
83
+ sessionId,
84
+ apiTokenId,
85
+ internalRequest,
86
+ callerType,
87
+ organizationId: normalizeNullableString(context.organizationId),
88
+ workflowRunId,
89
+ workflowStepId: normalizeNullableString(context.workflowStepId),
90
+ correlationId: normalizeNullableString(context.correlationId),
91
+ };
92
+ }
93
+ export function buildActionLedgerSensitiveReadEntryInput(input) {
94
+ const actorFields = mapActionLedgerRequestContext(input.context, input);
95
+ return {
96
+ ...actorFields,
97
+ actionName: input.actionName,
98
+ actionVersion: input.actionVersion ?? "v1",
99
+ actionKind: "read",
100
+ status: input.status ?? "succeeded",
101
+ evaluatedRisk: input.evaluatedRisk ?? "high",
102
+ targetType: input.targetType,
103
+ targetId: input.targetId,
104
+ routeOrToolName: input.routeOrToolName ?? null,
105
+ capabilityId: input.capabilityId ?? null,
106
+ capabilityVersion: input.capabilityVersion ?? null,
107
+ authorizationSource: input.authorizationSource ?? null,
108
+ causationActionId: input.causationActionId ?? null,
109
+ approvalId: input.approvalId ?? null,
110
+ idempotencyScope: input.idempotencyScope ?? null,
111
+ idempotencyKey: input.idempotencyKey ?? null,
112
+ idempotencyFingerprint: input.idempotencyFingerprint ?? null,
113
+ payloads: input.payloads,
114
+ enqueueRelay: input.enqueueRelay,
115
+ organizationId: input.organizationId ?? actorFields.organizationId,
116
+ workflowRunId: input.workflowRunId ?? actorFields.workflowRunId,
117
+ workflowStepId: input.workflowStepId ?? actorFields.workflowStepId,
118
+ correlationId: input.correlationId ?? actorFields.correlationId,
119
+ sensitiveReadDetail: {
120
+ reasonCode: input.reasonCode ?? null,
121
+ disclosedFieldSet: input.disclosedFieldSet ?? null,
122
+ disclosureSummary: input.disclosureSummary ?? null,
123
+ decisionPolicy: input.decisionPolicy ?? null,
124
+ },
125
+ };
126
+ }
127
+ export async function appendActionLedgerSensitiveRead(db, input) {
128
+ return actionLedgerService.appendEntry(db, buildActionLedgerSensitiveReadEntryInput(input));
129
+ }
130
+ export async function ledgerSensitiveRead(db, input, read) {
131
+ if (typeof input !== "function") {
132
+ await appendActionLedgerSensitiveRead(db, input);
133
+ return read();
134
+ }
135
+ const value = await read();
136
+ await appendActionLedgerSensitiveRead(db, input(value));
137
+ return value;
138
+ }
139
+ export function buildActionLedgerMutationEntryInput(input) {
140
+ const actorFields = mapActionLedgerRequestContext(input.context, input);
141
+ return {
142
+ ...actorFields,
143
+ actionName: input.actionName,
144
+ actionVersion: input.actionVersion ?? "v1",
145
+ actionKind: input.actionKind,
146
+ status: input.status ?? "succeeded",
147
+ evaluatedRisk: input.evaluatedRisk ?? "medium",
148
+ targetType: input.targetType,
149
+ targetId: input.targetId,
150
+ routeOrToolName: input.routeOrToolName ?? null,
151
+ capabilityId: input.capabilityId ?? null,
152
+ capabilityVersion: input.capabilityVersion ?? null,
153
+ authorizationSource: input.authorizationSource ?? null,
154
+ causationActionId: input.causationActionId ?? null,
155
+ approvalId: input.approvalId ?? null,
156
+ idempotencyScope: input.idempotencyScope ?? null,
157
+ idempotencyKey: input.idempotencyKey ?? null,
158
+ idempotencyFingerprint: input.idempotencyFingerprint ?? null,
159
+ payloads: input.payloads,
160
+ enqueueRelay: input.enqueueRelay,
161
+ organizationId: input.organizationId ?? actorFields.organizationId,
162
+ workflowRunId: input.workflowRunId ?? actorFields.workflowRunId,
163
+ workflowStepId: input.workflowStepId ?? actorFields.workflowStepId,
164
+ correlationId: input.correlationId ?? actorFields.correlationId,
165
+ mutationDetail: input.mutationDetail,
166
+ };
167
+ }
168
+ export async function appendActionLedgerMutation(db, input) {
169
+ return actionLedgerService.appendEntry(db, buildActionLedgerMutationEntryInput(input));
170
+ }
171
+ export function buildActionLedgerApprovalRequestInput(input) {
172
+ const { status: _status, approvalId: _approvalId, ...requestedAction } = buildActionLedgerMutationEntryInput(input);
173
+ return {
174
+ requestedAction,
175
+ approval: {
176
+ requestedByPrincipalId: input.approval.requestedByPrincipalId ?? requestedAction.principalId,
177
+ assignedToPrincipalId: input.approval.assignedToPrincipalId ?? null,
178
+ delegatedFromPrincipalId: input.approval.delegatedFromPrincipalId ?? null,
179
+ policyName: input.approval.policyName,
180
+ policyVersion: input.approval.policyVersion,
181
+ targetSnapshotRef: input.approval.targetSnapshotRef ?? null,
182
+ riskSnapshot: input.approval.riskSnapshot ?? requestedAction.evaluatedRisk,
183
+ reasonCode: input.approval.reasonCode ?? null,
184
+ expiresAt: input.approval.expiresAt ?? null,
185
+ },
186
+ };
187
+ }
188
+ export async function requestActionLedgerApproval(db, input) {
189
+ return actionLedgerService.requestApproval(db, buildActionLedgerApprovalRequestInput(input));
190
+ }
191
+ export function buildActionLedgerApprovalDecisionInput(input) {
192
+ const actorFields = mapActionLedgerRequestContext(input.context, input);
193
+ return {
194
+ id: input.id,
195
+ status: input.status,
196
+ decidedByPrincipalId: input.decidedByPrincipalId ?? actorFields.principalId,
197
+ decidedAt: input.decidedAt ?? null,
198
+ decisionAction: {
199
+ ...actorFields,
200
+ actionName: input.actionName,
201
+ actionVersion: input.actionVersion ?? "v1",
202
+ evaluatedRisk: input.evaluatedRisk,
203
+ targetType: input.targetType,
204
+ targetId: input.targetId,
205
+ routeOrToolName: input.routeOrToolName ?? null,
206
+ capabilityId: input.capabilityId ?? null,
207
+ capabilityVersion: input.capabilityVersion ?? null,
208
+ authorizationSource: input.authorizationSource ?? null,
209
+ idempotencyScope: input.idempotencyScope ?? null,
210
+ idempotencyKey: input.idempotencyKey ?? null,
211
+ idempotencyFingerprint: input.idempotencyFingerprint ?? null,
212
+ payloads: input.payloads,
213
+ enqueueRelay: input.enqueueRelay,
214
+ organizationId: input.organizationId ?? actorFields.organizationId,
215
+ workflowRunId: input.workflowRunId ?? actorFields.workflowRunId,
216
+ workflowStepId: input.workflowStepId ?? actorFields.workflowStepId,
217
+ correlationId: input.correlationId ?? actorFields.correlationId,
218
+ },
219
+ };
220
+ }
221
+ export async function decideActionLedgerApproval(db, input) {
222
+ return actionLedgerService.decideApproval(db, buildActionLedgerApprovalDecisionInput(input));
223
+ }
224
+ export function buildActionLedgerApprovedExecutionFields(input) {
225
+ return {
226
+ causationActionId: input.requestedActionId,
227
+ approvalId: input.approvalId,
228
+ idempotencyScope: `${input.approvalId}:execution`,
229
+ idempotencyKey: input.approvalId,
230
+ idempotencyFingerprint: input.idempotencyFingerprint,
231
+ };
232
+ }
233
+ function normalizeNullableString(value) {
234
+ if (value === undefined || value === null || value === "")
235
+ return null;
236
+ return value;
237
+ }