@voyant-travel/action-ledger 0.104.11 → 0.105.1
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/dist/health-routes.d.ts +104 -0
- package/dist/health-routes.d.ts.map +1 -0
- package/dist/health-routes.js +77 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +9 -4
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Action-ledger health route module, owned by `@voyant-travel/action-ledger`.
|
|
3
|
+
*
|
|
4
|
+
* GET /health — read-only drift check (no canary write)
|
|
5
|
+
* POST /health/check — drift check + synthetic canary write
|
|
6
|
+
*
|
|
7
|
+
* The routes mount at `/v1/admin/action-ledger` via the deployment's
|
|
8
|
+
* composition (the `action-ledger-health` extension).
|
|
9
|
+
*
|
|
10
|
+
* The package owns the route shape, the request/response contract, and its
|
|
11
|
+
* own canary logic. The per-module drift checks compose results from
|
|
12
|
+
* `@voyant-travel/bookings`, `@voyant-travel/finance`, and
|
|
13
|
+
* `@voyant-travel/inventory` — all of which DEPEND ON action-ledger. To avoid
|
|
14
|
+
* an import cycle, those drift checks are INJECTED by the deployment as
|
|
15
|
+
* structurally-typed option functions; this package never imports them.
|
|
16
|
+
*/
|
|
17
|
+
import type { AnyDrizzleDb } from "@voyant-travel/db";
|
|
18
|
+
import { Hono } from "hono";
|
|
19
|
+
import { type RunActionLedgerCanaryInput, type RunActionLedgerCanaryResult } from "./canary.js";
|
|
20
|
+
/**
|
|
21
|
+
* Structural drift-check input. Mirrors the shared
|
|
22
|
+
* `Check{Booking,Finance,Product}ActionLedgerDriftInput` shape so the package
|
|
23
|
+
* needn't import bookings/finance/inventory.
|
|
24
|
+
*/
|
|
25
|
+
export interface ActionLedgerDriftCheckInput {
|
|
26
|
+
createdAtFrom?: string | null;
|
|
27
|
+
sampleLimit?: number | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Structural single drift-check result row. Mirrors the row shape returned by
|
|
31
|
+
* each module's drift check.
|
|
32
|
+
*/
|
|
33
|
+
export interface ActionLedgerDriftCheckRow {
|
|
34
|
+
check: string;
|
|
35
|
+
missingCount: number;
|
|
36
|
+
sampleIds: string[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Structural drift-check result. Mirrors the
|
|
40
|
+
* `Check{Booking,Finance,Product}ActionLedgerDriftResult` shape.
|
|
41
|
+
*/
|
|
42
|
+
export interface ActionLedgerDriftCheckResult {
|
|
43
|
+
ok: boolean;
|
|
44
|
+
rows: ActionLedgerDriftCheckRow[];
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A deployment-supplied per-module drift check. Structurally typed so the
|
|
48
|
+
* package can compose `@voyant-travel/{bookings,finance,inventory}`'s drift
|
|
49
|
+
* checks without importing them (those modules depend on action-ledger).
|
|
50
|
+
*/
|
|
51
|
+
export type ActionLedgerDriftCheck = (db: AnyDrizzleDb, input: ActionLedgerDriftCheckInput) => Promise<ActionLedgerDriftCheckResult>;
|
|
52
|
+
type ActionLedgerHealthVariables = {
|
|
53
|
+
db: AnyDrizzleDb;
|
|
54
|
+
userId?: string;
|
|
55
|
+
organizationId?: string;
|
|
56
|
+
};
|
|
57
|
+
export interface ActionLedgerHealthResponse {
|
|
58
|
+
data: {
|
|
59
|
+
ok: boolean;
|
|
60
|
+
canary: RunActionLedgerCanaryResult | null;
|
|
61
|
+
bookingDrift: ActionLedgerDriftCheckResult;
|
|
62
|
+
financeDrift: ActionLedgerDriftCheckResult;
|
|
63
|
+
productDrift: ActionLedgerDriftCheckResult;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface RunActionLedgerHealthCheckInput {
|
|
67
|
+
db: AnyDrizzleDb;
|
|
68
|
+
drift: ActionLedgerDriftCheckInput;
|
|
69
|
+
canary?: RunActionLedgerCanaryInput | null;
|
|
70
|
+
runCanary: boolean;
|
|
71
|
+
checkBookingDrift: ActionLedgerDriftCheck;
|
|
72
|
+
checkFinanceDrift: ActionLedgerDriftCheck;
|
|
73
|
+
checkProductDrift: ActionLedgerDriftCheck;
|
|
74
|
+
runCanaryCheck?: (db: AnyDrizzleDb, input: RunActionLedgerCanaryInput) => Promise<RunActionLedgerCanaryResult>;
|
|
75
|
+
}
|
|
76
|
+
export declare function runActionLedgerHealthCheck({ db, drift, canary, runCanary, checkBookingDrift, checkFinanceDrift, checkProductDrift, runCanaryCheck, }: RunActionLedgerHealthCheckInput): Promise<ActionLedgerHealthResponse["data"]>;
|
|
77
|
+
/**
|
|
78
|
+
* Deployment-supplied options for the action-ledger health route module.
|
|
79
|
+
* Structural only — the three per-module drift checks are INJECTED so this
|
|
80
|
+
* foundational package never imports bookings/finance/inventory.
|
|
81
|
+
*/
|
|
82
|
+
export interface ActionLedgerHealthRoutesOptions {
|
|
83
|
+
/** Drift check from `@voyant-travel/bookings/action-ledger-drift`. */
|
|
84
|
+
checkBookingDrift: ActionLedgerDriftCheck;
|
|
85
|
+
/** Drift check from `@voyant-travel/finance/action-ledger-drift`. */
|
|
86
|
+
checkFinanceDrift: ActionLedgerDriftCheck;
|
|
87
|
+
/** Drift check from `@voyant-travel/inventory/action-ledger-drift`. */
|
|
88
|
+
checkProductDrift: ActionLedgerDriftCheck;
|
|
89
|
+
/**
|
|
90
|
+
* Override the canary writer (defaults to this package's
|
|
91
|
+
* `runActionLedgerCanary`). Mostly for tests.
|
|
92
|
+
*/
|
|
93
|
+
runCanaryCheck?: (db: AnyDrizzleDb, input: RunActionLedgerCanaryInput) => Promise<RunActionLedgerCanaryResult>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Build the action-ledger health routes (relative paths; mount at
|
|
97
|
+
* `/v1/admin/action-ledger`). The deployment injects the per-module drift
|
|
98
|
+
* checks via `options`.
|
|
99
|
+
*/
|
|
100
|
+
export declare function createActionLedgerHealthRoutes(options: ActionLedgerHealthRoutesOptions): Hono<{
|
|
101
|
+
Variables: ActionLedgerHealthVariables;
|
|
102
|
+
}>;
|
|
103
|
+
export {};
|
|
104
|
+
//# sourceMappingURL=health-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"health-routes.d.ts","sourceRoot":"","sources":["../src/health-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAErD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAEjC,MAAM,aAAa,CAAA;AAEpB;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,yBAAyB,EAAE,CAAA;CAClC;AAED;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,CACnC,EAAE,EAAE,YAAY,EAChB,KAAK,EAAE,2BAA2B,KAC/B,OAAO,CAAC,4BAA4B,CAAC,CAAA;AAE1C,KAAK,2BAA2B,GAAG;IACjC,EAAE,EAAE,YAAY,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAcD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,EAAE,EAAE,OAAO,CAAA;QACX,MAAM,EAAE,2BAA2B,GAAG,IAAI,CAAA;QAC1C,YAAY,EAAE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hono";
|
|
2
|
+
import { Hono } from "hono";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { runActionLedgerCanary, } from "./canary.js";
|
|
5
|
+
const actionLedgerHealthQuerySchema = z.object({
|
|
6
|
+
createdAtFrom: z.string().datetime().optional(),
|
|
7
|
+
sampleLimit: z.coerce.number().int().min(1).max(100).optional(),
|
|
8
|
+
});
|
|
9
|
+
const actionLedgerHealthCheckBodySchema = actionLedgerHealthQuerySchema.extend({
|
|
10
|
+
organizationId: z.string().trim().min(1).optional(),
|
|
11
|
+
principalId: z.string().trim().min(1).optional(),
|
|
12
|
+
idempotencyKey: z.string().trim().min(1).optional(),
|
|
13
|
+
payloadRef: z.string().trim().min(1).optional(),
|
|
14
|
+
});
|
|
15
|
+
export async function runActionLedgerHealthCheck({ db, drift, canary, runCanary, checkBookingDrift, checkFinanceDrift, checkProductDrift, runCanaryCheck = runActionLedgerCanary, }) {
|
|
16
|
+
const [bookingDrift, financeDrift, productDrift, canaryResult] = await Promise.all([
|
|
17
|
+
checkBookingDrift(db, drift),
|
|
18
|
+
checkFinanceDrift(db, drift),
|
|
19
|
+
checkProductDrift(db, drift),
|
|
20
|
+
runCanary ? runCanaryCheck(db, canary ?? {}) : Promise.resolve(null),
|
|
21
|
+
]);
|
|
22
|
+
return {
|
|
23
|
+
ok: bookingDrift.ok && financeDrift.ok && productDrift.ok && (canaryResult?.ok ?? true),
|
|
24
|
+
canary: canaryResult,
|
|
25
|
+
bookingDrift,
|
|
26
|
+
financeDrift,
|
|
27
|
+
productDrift,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the action-ledger health routes (relative paths; mount at
|
|
32
|
+
* `/v1/admin/action-ledger`). The deployment injects the per-module drift
|
|
33
|
+
* checks via `options`.
|
|
34
|
+
*/
|
|
35
|
+
export function createActionLedgerHealthRoutes(options) {
|
|
36
|
+
const { checkBookingDrift, checkFinanceDrift, checkProductDrift, runCanaryCheck } = options;
|
|
37
|
+
const hono = new Hono();
|
|
38
|
+
hono.get("/health", async (c) => {
|
|
39
|
+
const query = parseQuery(c, actionLedgerHealthQuerySchema);
|
|
40
|
+
const data = await runActionLedgerHealthCheck({
|
|
41
|
+
db: c.get("db"),
|
|
42
|
+
drift: {
|
|
43
|
+
createdAtFrom: query.createdAtFrom ?? null,
|
|
44
|
+
sampleLimit: query.sampleLimit ?? null,
|
|
45
|
+
},
|
|
46
|
+
runCanary: false,
|
|
47
|
+
checkBookingDrift,
|
|
48
|
+
checkFinanceDrift,
|
|
49
|
+
checkProductDrift,
|
|
50
|
+
...(runCanaryCheck ? { runCanaryCheck } : {}),
|
|
51
|
+
});
|
|
52
|
+
return c.json({ data }, data.ok ? 200 : 503);
|
|
53
|
+
});
|
|
54
|
+
hono.post("/health/check", async (c) => {
|
|
55
|
+
const body = await parseJsonBody(c, actionLedgerHealthCheckBodySchema);
|
|
56
|
+
const data = await runActionLedgerHealthCheck({
|
|
57
|
+
db: c.get("db"),
|
|
58
|
+
drift: {
|
|
59
|
+
createdAtFrom: body.createdAtFrom ?? null,
|
|
60
|
+
sampleLimit: body.sampleLimit ?? null,
|
|
61
|
+
},
|
|
62
|
+
canary: {
|
|
63
|
+
organizationId: body.organizationId ?? c.get("organizationId") ?? null,
|
|
64
|
+
principalId: body.principalId ?? c.get("userId") ?? "operator-action-ledger-health",
|
|
65
|
+
idempotencyKey: body.idempotencyKey ?? null,
|
|
66
|
+
payloadRef: body.payloadRef ?? null,
|
|
67
|
+
},
|
|
68
|
+
runCanary: true,
|
|
69
|
+
checkBookingDrift,
|
|
70
|
+
checkFinanceDrift,
|
|
71
|
+
checkProductDrift,
|
|
72
|
+
...(runCanaryCheck ? { runCanaryCheck } : {}),
|
|
73
|
+
});
|
|
74
|
+
return c.json({ data }, data.ok ? 200 : 503);
|
|
75
|
+
});
|
|
76
|
+
return hono;
|
|
77
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { type RunActionLedgerCanaryInput, type RunActionLedgerCanaryResult, runActionLedgerCanary, } from "./canary.js";
|
|
2
2
|
export { type ActionLedgerApprovalRequirementReason, type ActionLedgerApprovalRequirementResult, type ActionLedgerCapabilityAccessReason, type ActionLedgerCapabilityAccessResult, type ActionLedgerCapabilityApprovalPolicy, type ActionLedgerCapabilityDefinition, type ActionLedgerCapabilityGrant, type ActionLedgerCapabilityLedgerPolicy, type ActionLedgerCapabilityRegistry, ActionLedgerCapabilityRegistryError, type ActionLedgerCapabilityRisk, actionLedgerCapabilityApprovalPolicyValues, actionLedgerCapabilityKey, actionLedgerCapabilityLedgerPolicyValues, createActionLedgerCapabilityRegistry, type EvaluateActionLedgerApprovalRequirementInput, type EvaluateActionLedgerCapabilityAccessInput, evaluateActionLedgerApprovalRequirement, evaluateActionLedgerCapabilityAccess, evaluateActionLedgerCapabilityRisk, getActionLedgerCapability, } from "./capability.js";
|
|
3
3
|
export { type BuildActionApprovalCommandFingerprintInput, buildActionApprovalCommandFingerprint, buildIdempotencyFingerprint, canonicalize, canonicalJson, sha256, } from "./fingerprint.js";
|
|
4
|
+
export { type ActionLedgerDriftCheck, type ActionLedgerDriftCheckInput, type ActionLedgerDriftCheckResult, type ActionLedgerDriftCheckRow, type ActionLedgerHealthResponse, type ActionLedgerHealthRoutesOptions, createActionLedgerHealthRoutes, type RunActionLedgerHealthCheckInput, runActionLedgerHealthCheck, } from "./health-routes.js";
|
|
4
5
|
export { ACTION_LEDGER_APPROVAL_ID_HEADER, type ActionLedgerActorFields, type ActionLedgerApprovedExecutionFields, type ActionLedgerRequestContextValues, type ActionLedgerRequestMappingOptions, appendActionLedgerMutation, appendActionLedgerSensitiveRead, type BuildActionLedgerApprovalDecisionInput, type BuildActionLedgerApprovalRequestInput, type BuildActionLedgerApprovedExecutionFieldsInput, type BuildActionLedgerMutationInput, type BuildActionLedgerSensitiveReadInput, type BuildActionLedgerSensitiveReadInputForValue, buildActionLedgerApprovalDecisionInput, buildActionLedgerApprovalRequestInput, buildActionLedgerApprovedExecutionFields, buildActionLedgerMutationEntryInput, buildActionLedgerSensitiveReadEntryInput, decideActionLedgerApproval, ledgerSensitiveRead, mapActionLedgerRequestContext, requestActionLedgerApproval, } from "./request-context.js";
|
|
5
6
|
export { type ActionApprovalDecisionResponse, type ActionApprovalDetailResponse, type ActionApprovalGetResponse, type ActionApprovalListResponse, type ActionApprovalRequestResponse, type ActionApprovalResponse, type ActionDelegationGetResponse, type ActionDelegationListResponse, type ActionDelegationResponse, type ActionLedgerAdminRoutes, type ActionLedgerEntryDetailResponse, type ActionLedgerEntryResponse, type ActionLedgerGetResponse, type ActionLedgerListResponse, type ActionLedgerPayloadResponse, type ActionLedgerRelayOutboxListResponse, type ActionLedgerRelayOutboxResponse, type ActionLedgerReversalResponse, actionLedgerAdminRoutes, actionLedgerHonoModule, actionLedgerModule, } from "./routes.js";
|
|
6
7
|
export { type ActionApproval, type ActionDelegation, type ActionLedgerEntry, type ActionLedgerPayload, type ActionLedgerRelayOutbox, type ActionMutationDetail, type ActionSensitiveReadDetail, actionApprovals, actionDelegations, actionLedgerActionKindEnum, actionLedgerApprovalStatusEnum, actionLedgerEntries, actionLedgerPayloads, actionLedgerPrincipalTypeEnum, actionLedgerRedactionStatusEnum, actionLedgerRelayOutbox, actionLedgerRelayStatusEnum, actionLedgerReversalKindEnum, actionLedgerReversalOutcomeEnum, actionLedgerReversalStateEnum, actionLedgerRiskEnum, actionLedgerStatusEnum, actionMutationDetails, actionSensitiveReadDetails, type NewActionApproval, type NewActionDelegation, type NewActionLedgerEntry, type NewActionLedgerPayload, type NewActionLedgerRelayOutbox, type NewActionMutationDetail, type NewActionSensitiveReadDetail, } from "./schema.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,qBAAq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K,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,0BAA0B,EAC/B,qCAAqC,EACrC,mCAAmC,EACnC,yBAAyB,EACzB,0BAA0B,EAC1B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,eAAe,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { runActionLedgerCanary, } from "./canary.js";
|
|
2
2
|
export { ActionLedgerCapabilityRegistryError, actionLedgerCapabilityApprovalPolicyValues, actionLedgerCapabilityKey, actionLedgerCapabilityLedgerPolicyValues, createActionLedgerCapabilityRegistry, evaluateActionLedgerApprovalRequirement, evaluateActionLedgerCapabilityAccess, evaluateActionLedgerCapabilityRisk, getActionLedgerCapability, } from "./capability.js";
|
|
3
3
|
export { buildActionApprovalCommandFingerprint, buildIdempotencyFingerprint, canonicalize, canonicalJson, sha256, } from "./fingerprint.js";
|
|
4
|
+
export { createActionLedgerHealthRoutes, runActionLedgerHealthCheck, } from "./health-routes.js";
|
|
4
5
|
export { ACTION_LEDGER_APPROVAL_ID_HEADER, appendActionLedgerMutation, appendActionLedgerSensitiveRead, buildActionLedgerApprovalDecisionInput, buildActionLedgerApprovalRequestInput, buildActionLedgerApprovedExecutionFields, buildActionLedgerMutationEntryInput, buildActionLedgerSensitiveReadEntryInput, decideActionLedgerApproval, ledgerSensitiveRead, mapActionLedgerRequestContext, requestActionLedgerApproval, } from "./request-context.js";
|
|
5
6
|
export { actionLedgerAdminRoutes, actionLedgerHonoModule, actionLedgerModule, } from "./routes.js";
|
|
6
7
|
export { actionApprovals, actionDelegations, actionLedgerActionKindEnum, actionLedgerApprovalStatusEnum, actionLedgerEntries, actionLedgerPayloads, actionLedgerPrincipalTypeEnum, actionLedgerRedactionStatusEnum, actionLedgerRelayOutbox, actionLedgerRelayStatusEnum, actionLedgerReversalKindEnum, actionLedgerReversalOutcomeEnum, actionLedgerReversalStateEnum, actionLedgerRiskEnum, actionLedgerStatusEnum, actionMutationDetails, actionSensitiveReadDetails, } from "./schema.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/action-ledger",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.1",
|
|
4
4
|
"description": "Action ledger schema, append-only write helpers, and idempotency primitives for Voyant control surfaces.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -35,6 +35,11 @@
|
|
|
35
35
|
"import": "./dist/fingerprint.js",
|
|
36
36
|
"default": "./dist/fingerprint.js"
|
|
37
37
|
},
|
|
38
|
+
"./health": {
|
|
39
|
+
"types": "./dist/health-routes.d.ts",
|
|
40
|
+
"import": "./dist/health-routes.js",
|
|
41
|
+
"default": "./dist/health-routes.js"
|
|
42
|
+
},
|
|
38
43
|
"./timeline": {
|
|
39
44
|
"types": "./dist/timeline.d.ts",
|
|
40
45
|
"import": "./dist/timeline.js",
|
|
@@ -55,9 +60,9 @@
|
|
|
55
60
|
"drizzle-orm": "^0.45.2",
|
|
56
61
|
"hono": "^4.12.10",
|
|
57
62
|
"zod": "^4.3.6",
|
|
58
|
-
"@voyant-travel/core": "^0.
|
|
59
|
-
"@voyant-travel/db": "^0.108.
|
|
60
|
-
"@voyant-travel/hono": "^0.
|
|
63
|
+
"@voyant-travel/core": "^0.110.0",
|
|
64
|
+
"@voyant-travel/db": "^0.108.2",
|
|
65
|
+
"@voyant-travel/hono": "^0.112.0"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
63
68
|
"typescript": "^6.0.2",
|