@yiaany/ghostapi 0.1.6 → 0.1.8
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 +48 -2
- package/CONTRIBUTING.md +119 -117
- package/LICENSE +21 -21
- package/README.md +208 -185
- package/SECURITY.md +53 -37
- package/dist/actions/gateway.d.ts +179 -0
- package/dist/actions/gateway.js +514 -0
- package/dist/actions/gateway.js.map +1 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.js +2 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/ai/aiClient.js +4 -4
- package/dist/ai/aiClient.js.map +1 -1
- package/dist/ai/aiGenerator.d.ts +2 -2
- package/dist/ai/aiGenerator.js +21 -72
- package/dist/ai/aiGenerator.js.map +1 -1
- package/dist/ai/prompts.js +51 -51
- package/dist/ai/prompts.js.map +1 -1
- package/dist/approvals/approvalInbox.d.ts +150 -0
- package/dist/approvals/approvalInbox.js +412 -0
- package/dist/approvals/approvalInbox.js.map +1 -0
- package/dist/approvals/index.d.ts +2 -0
- package/dist/approvals/index.js +2 -0
- package/dist/approvals/index.js.map +1 -0
- package/dist/behavior/behaviorStore.d.ts +2 -0
- package/dist/behavior/behaviorStore.js +50 -46
- package/dist/behavior/behaviorStore.js.map +1 -1
- package/dist/cache/index.d.ts +2 -0
- package/dist/cache/index.js +58 -14
- package/dist/cache/index.js.map +1 -1
- package/dist/cli/index.js +438 -58
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/openUrl.d.ts +10 -0
- package/dist/cli/openUrl.js +31 -0
- package/dist/cli/openUrl.js.map +1 -0
- package/dist/cli/parser.d.ts +155 -0
- package/dist/cli/parser.js +504 -2
- package/dist/cli/parser.js.map +1 -1
- package/dist/config/dataPaths.d.ts +31 -0
- package/dist/config/dataPaths.js +45 -0
- package/dist/config/dataPaths.js.map +1 -0
- package/dist/config/localConfig.d.ts +1 -2
- package/dist/config/localConfig.js +27 -21
- package/dist/config/localConfig.js.map +1 -1
- package/dist/config/serverConfig.d.ts +2 -0
- package/dist/config/serverConfig.js +8 -1
- package/dist/config/serverConfig.js.map +1 -1
- package/dist/contracts/contract.d.ts +76 -0
- package/dist/contracts/contract.js +603 -0
- package/dist/contracts/contract.js.map +1 -0
- package/dist/contracts/index.d.ts +2 -0
- package/dist/contracts/index.js +2 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/credentials/credentialBroker.d.ts +207 -0
- package/dist/credentials/credentialBroker.js +588 -0
- package/dist/credentials/credentialBroker.js.map +1 -0
- package/dist/credentials/index.d.ts +2 -0
- package/dist/credentials/index.js +2 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/dashboard/app.js +685 -615
- package/dist/dashboard/index.html +13 -7
- package/dist/dashboard/styles.css +349 -349
- package/dist/egress/capabilities.d.ts +32 -0
- package/dist/egress/capabilities.js +165 -0
- package/dist/egress/capabilities.js.map +1 -0
- package/dist/egress/linuxBootstrap.d.ts +1 -0
- package/dist/egress/linuxBootstrap.js +121 -0
- package/dist/egress/linuxBootstrap.js.map +1 -0
- package/dist/egress/run.d.ts +18 -0
- package/dist/egress/run.js +305 -0
- package/dist/egress/run.js.map +1 -0
- package/dist/errors/errorEngine.d.ts +2 -2
- package/dist/errors/errorEngine.js +3 -40
- package/dist/errors/errorEngine.js.map +1 -1
- package/dist/evals/evals.d.ts +126 -0
- package/dist/evals/evals.js +466 -0
- package/dist/evals/evals.js.map +1 -0
- package/dist/evals/index.d.ts +2 -0
- package/dist/evals/index.js +2 -0
- package/dist/evals/index.js.map +1 -0
- package/dist/evidence/index.d.ts +2 -0
- package/dist/evidence/index.js +2 -0
- package/dist/evidence/index.js.map +1 -0
- package/dist/evidence/report.d.ts +143 -0
- package/dist/evidence/report.js +556 -0
- package/dist/evidence/report.js.map +1 -0
- package/dist/fault/faultLab.d.ts +5 -4
- package/dist/fault/faultLab.js +66 -24
- package/dist/fault/faultLab.js.map +1 -1
- package/dist/index.d.ts +46 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/dist/inventory/analysis.d.ts +12 -0
- package/dist/inventory/analysis.js +457 -0
- package/dist/inventory/analysis.js.map +1 -0
- package/dist/inventory/index.d.ts +5 -0
- package/dist/inventory/index.js +4 -0
- package/dist/inventory/index.js.map +1 -0
- package/dist/inventory/inventoryController.d.ts +53 -0
- package/dist/inventory/inventoryController.js +1044 -0
- package/dist/inventory/inventoryController.js.map +1 -0
- package/dist/inventory/types.d.ts +579 -0
- package/dist/inventory/types.js +787 -0
- package/dist/inventory/types.js.map +1 -0
- package/dist/landing/assets/index-CxWsopzP.css +1 -0
- package/dist/landing/assets/index-DZlpyhqd.js +55 -0
- package/dist/landing/assets/index-Dk-Xezs3.js +55 -0
- package/dist/landing/index.html +15 -15
- package/dist/ledger/actionLedger.d.ts +125 -0
- package/dist/ledger/actionLedger.js +594 -0
- package/dist/ledger/actionLedger.js.map +1 -0
- package/dist/ledger/index.d.ts +2 -0
- package/dist/ledger/index.js +2 -0
- package/dist/ledger/index.js.map +1 -0
- package/dist/mcp/server.js +4 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/policy/index.d.ts +3 -0
- package/dist/policy/index.js +2 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/policy.d.ts +14 -0
- package/dist/policy/policy.js +282 -0
- package/dist/policy/policy.js.map +1 -0
- package/dist/policy/types.d.ts +52 -0
- package/dist/policy/types.js +2 -0
- package/dist/policy/types.js.map +1 -0
- package/dist/productTelemetry/index.d.ts +16 -0
- package/dist/productTelemetry/index.js +142 -0
- package/dist/productTelemetry/index.js.map +1 -0
- package/dist/providers/conformance.d.ts +7 -0
- package/dist/providers/conformance.js +48 -0
- package/dist/providers/conformance.js.map +1 -0
- package/dist/providers/index.d.ts +4 -2
- package/dist/providers/index.js +3 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/packs/resendPack.d.ts +2 -0
- package/dist/providers/packs/resendPack.js +147 -0
- package/dist/providers/packs/resendPack.js.map +1 -0
- package/dist/providers/packs/stripePack.d.ts +2 -0
- package/dist/providers/packs/stripePack.js +852 -0
- package/dist/providers/packs/stripePack.js.map +1 -0
- package/dist/providers/registry.d.ts +7 -3
- package/dist/providers/registry.js +55 -4
- package/dist/providers/registry.js.map +1 -1
- package/dist/providers/resend.js +2 -11
- package/dist/providers/resend.js.map +1 -1
- package/dist/providers/runtime.d.ts +8 -0
- package/dist/providers/runtime.js +48 -0
- package/dist/providers/runtime.js.map +1 -0
- package/dist/providers/stripeWebhook.d.ts +13 -0
- package/dist/providers/stripeWebhook.js +50 -0
- package/dist/providers/stripeWebhook.js.map +1 -0
- package/dist/providers/types.d.ts +153 -0
- package/dist/proxy/cacheKey.js +3 -3
- package/dist/proxy/cacheKey.js.map +1 -1
- package/dist/proxy/providerDetector.d.ts +2 -7
- package/dist/proxy/providerDetector.js +4 -4
- package/dist/proxy/providerDetector.js.map +1 -1
- package/dist/proxy/proxyHandler.js +116 -12
- package/dist/proxy/proxyHandler.js.map +1 -1
- package/dist/proxy/requestNormalizer.d.ts +0 -1
- package/dist/proxy/requestNormalizer.js +2 -5
- package/dist/proxy/requestNormalizer.js.map +1 -1
- package/dist/reliability/costGovernance.d.ts +175 -0
- package/dist/reliability/costGovernance.js +515 -0
- package/dist/reliability/costGovernance.js.map +1 -0
- package/dist/reliability/index.d.ts +8 -0
- package/dist/reliability/index.js +5 -0
- package/dist/reliability/index.js.map +1 -0
- package/dist/reliability/reconciliation.d.ts +157 -0
- package/dist/reliability/reconciliation.js +522 -0
- package/dist/reliability/reconciliation.js.map +1 -0
- package/dist/reliability/runtimeHealth.d.ts +60 -0
- package/dist/reliability/runtimeHealth.js +356 -0
- package/dist/reliability/runtimeHealth.js.map +1 -0
- package/dist/reliability/slo.d.ts +131 -0
- package/dist/reliability/slo.js +375 -0
- package/dist/reliability/slo.js.map +1 -0
- package/dist/report/safetyReport.js +7 -3
- package/dist/report/safetyReport.js.map +1 -1
- package/dist/safety/index.d.ts +2 -0
- package/dist/safety/index.js +2 -0
- package/dist/safety/index.js.map +1 -0
- package/dist/safety/safetyController.d.ts +187 -0
- package/dist/safety/safetyController.js +477 -0
- package/dist/safety/safetyController.js.map +1 -0
- package/dist/scenarios/scenarioBundle.d.ts +75 -0
- package/dist/scenarios/scenarioBundle.js +750 -0
- package/dist/scenarios/scenarioBundle.js.map +1 -0
- package/dist/scenarios/scenarioStore.d.ts +1 -0
- package/dist/scenarios/scenarioStore.js +47 -32
- package/dist/scenarios/scenarioStore.js.map +1 -1
- package/dist/security/headerSanitizer.d.ts +2 -0
- package/dist/security/headerSanitizer.js +36 -1
- package/dist/security/headerSanitizer.js.map +1 -1
- package/dist/security/secrets.js +24 -4
- package/dist/security/secrets.js.map +1 -1
- package/dist/server/accessControl.d.ts +5 -0
- package/dist/server/accessControl.js +100 -0
- package/dist/server/accessControl.js.map +1 -0
- package/dist/server/createServer.d.ts +0 -5
- package/dist/server/createServer.js +9 -29
- package/dist/server/createServer.js.map +1 -1
- package/dist/server/eventsStore.d.ts +6 -1
- package/dist/server/eventsStore.js +83 -15
- package/dist/server/eventsStore.js.map +1 -1
- package/dist/server/routes.js +36 -10
- package/dist/server/routes.js.map +1 -1
- package/dist/server/sse.d.ts +2 -1
- package/dist/server/sse.js +15 -3
- package/dist/server/sse.js.map +1 -1
- package/dist/setup/setupGenerator.js +53 -6
- package/dist/setup/setupGenerator.js.map +1 -1
- package/dist/state/stateStore.d.ts +5 -0
- package/dist/state/stateStore.js +48 -62
- package/dist/state/stateStore.js.map +1 -1
- package/dist/storage/fileStore.d.ts +10 -0
- package/dist/storage/fileStore.js +131 -0
- package/dist/storage/fileStore.js.map +1 -0
- package/dist/teamControl/controlPlane.d.ts +255 -0
- package/dist/teamControl/controlPlane.js +918 -0
- package/dist/teamControl/controlPlane.js.map +1 -0
- package/dist/teamControl/deployment.d.ts +33 -0
- package/dist/teamControl/deployment.js +67 -0
- package/dist/teamControl/deployment.js.map +1 -0
- package/dist/teamControl/index.d.ts +4 -0
- package/dist/teamControl/index.js +3 -0
- package/dist/teamControl/index.js.map +1 -0
- package/dist/tests/testGenerator.js +4 -1
- package/dist/tests/testGenerator.js.map +1 -1
- package/dist/trust/index.d.ts +2 -0
- package/dist/trust/index.js +2 -0
- package/dist/trust/index.js.map +1 -0
- package/dist/trust/trustLadder.d.ts +182 -0
- package/dist/trust/trustLadder.js +560 -0
- package/dist/trust/trustLadder.js.map +1 -0
- package/dist/worlds/index.d.ts +2 -0
- package/dist/worlds/index.js +2 -0
- package/dist/worlds/index.js.map +1 -0
- package/dist/worlds/worlds.d.ts +160 -0
- package/dist/worlds/worlds.js +491 -0
- package/dist/worlds/worlds.js.map +1 -0
- package/docs/assets/dashboard.png +0 -0
- package/docs/ci.md +49 -0
- package/docs/commercial/README.md +29 -0
- package/docs/commercial/data-inventory.md +36 -0
- package/docs/commercial/manual-invoicing.md +44 -0
- package/docs/commercial/metrics.md +51 -0
- package/docs/commercial/pricing.md +103 -0
- package/docs/commercial/privacy-policy-draft.md +41 -0
- package/docs/commercial/terms-topics-for-counsel.md +51 -0
- package/docs/design-partners/README.md +52 -0
- package/docs/design-partners/demo-narratives.md +33 -0
- package/docs/design-partners/design-partner-offer.md +39 -0
- package/docs/design-partners/discovery-questions.md +28 -0
- package/docs/design-partners/feedback-capture-template.md +48 -0
- package/docs/design-partners/icp-one-pager.md +43 -0
- package/docs/design-partners/onboarding-checklist.md +33 -0
- package/docs/design-partners/pilot-success-criteria.md +27 -0
- package/docs/design-partners/pricing-interview-script.md +18 -0
- package/docs/design-partners/telemetry-plan.md +48 -0
- package/docs/development/baseline.md +114 -0
- package/docs/development/onboarding-smoke.md +37 -0
- package/docs/development/verification-0.1.8.md +25 -0
- package/docs/enterprise-product-roadmap-ru.md +1879 -0
- package/docs/fundraising/README.md +87 -0
- package/docs/fundraising/data-room-checklist.md +72 -0
- package/docs/fundraising/demo-script.md +52 -0
- package/docs/fundraising/design-partners-50.md +74 -0
- package/docs/fundraising/launch-posts.md +37 -0
- package/docs/fundraising/metrics-and-evidence.md +30 -0
- package/docs/fundraising/roadmap-12-month.md +25 -0
- package/docs/fundraising/technical-due-diligence-index.md +37 -0
- package/docs/fundraising/yc-application.md +25 -0
- package/docs/github-actions.md +84 -0
- package/docs/hosted-pilot.md +111 -0
- package/docs/mcp.md +52 -50
- package/docs/operations/disaster-recovery-runbook.md +81 -0
- package/docs/operations/kill-switch-runbook.md +32 -0
- package/docs/policy.md +61 -0
- package/docs/providers/authoring-packs.md +175 -0
- package/docs/providers/stripe-core-pack.md +82 -0
- package/docs/release-checklist.md +83 -71
- package/docs/release-migration-and-rollback.md +63 -0
- package/docs/release-readiness.md +39 -0
- package/docs/security/action-gateway-threat-model.md +34 -0
- package/docs/security/action-ledger-incident-replay-threat-model.md +42 -0
- package/docs/security/approval-inbox-threat-model.md +35 -0
- package/docs/security/credential-broker-threat-model.md +52 -0
- package/docs/security/egress-threat-model.md +126 -0
- package/docs/security/inventory-threat-model.md +104 -0
- package/docs/security/kill-switch-budgets-threat-model.md +37 -0
- package/docs/security/reliability-threat-model.md +111 -0
- package/docs/security/trust-ladder-threat-model.md +33 -0
- package/docs/team-control-plane.md +72 -0
- package/docs/usage.md +571 -57
- package/examples/README.md +10 -0
- package/examples/agent-instructions/README.md +39 -39
- package/examples/ci-smoke/README.md +21 -0
- package/examples/ci-smoke/ghostapi.policy.yaml +22 -0
- package/examples/ci-smoke/package.json +9 -0
- package/examples/ci-smoke/production-egress.mjs +2 -0
- package/examples/ci-smoke/safe.mjs +17 -0
- package/examples/evals/README.md +24 -0
- package/examples/evals/retry-after.eval.json +52 -0
- package/examples/generic-rest/README.md +27 -27
- package/examples/github-fetch/README.md +35 -35
- package/examples/openai-streaming/README.md +16 -0
- package/examples/openai-streaming/streaming-tool-call.mjs +31 -0
- package/examples/policy/ghostapi.policy.yaml +27 -0
- package/examples/record-replay/README.md +19 -0
- package/examples/record-replay/replay-requests.json +22 -0
- package/examples/record-replay/stripe-checkout.har.json +30 -0
- package/examples/resend-node/README.md +22 -22
- package/examples/stripe-node/README.md +35 -29
- package/examples/stripe-node/checkout-flow.mjs +61 -0
- package/examples/twilio-node/README.md +21 -21
- package/examples/worlds/README.md +19 -0
- package/examples/worlds/subscription-recovery.mjs +12 -0
- package/package.json +26 -11
- package/dist/providers/stripe.d.ts +0 -2
- package/dist/providers/stripe.js +0 -15
- package/dist/providers/stripe.js.map +0 -1
- package/docs/assets/ghostapi-avatar.png +0 -0
package/dist/landing/index.html
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<meta name="description" content="GhostAPI is the local internet for AI coding agents." />
|
|
7
|
-
<title>GhostAPI - The local internet for AI coding agents</title>
|
|
8
|
-
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' rx='22' fill='%23121212'/%3E%3Cpath d='M26 36c0-12 10-22 24-22s24 10 24 22v36c0 7-8 10-13 5l-4-4-5 5-5-5-5 5-5-5-4 4c-5 5-13 2-13-5V36Z' fill='%233ecf8e'/%3E%3Ccircle cx='40' cy='42' r='5' fill='%23121212'/%3E%3Ccircle cx='60' cy='42' r='5' fill='%23121212'/%3E%3C/svg%3E" />
|
|
9
|
-
<script type="module" crossorigin src="/landing/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/landing/assets/index-
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<div id="root"></div>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="description" content="GhostAPI is the local internet for AI coding agents." />
|
|
7
|
+
<title>GhostAPI - The local internet for AI coding agents</title>
|
|
8
|
+
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Crect width='100' height='100' rx='22' fill='%23121212'/%3E%3Cpath d='M26 36c0-12 10-22 24-22s24 10 24 22v36c0 7-8 10-13 5l-4-4-5 5-5-5-5 5-5-5-4 4c-5 5-13 2-13-5V36Z' fill='%233ecf8e'/%3E%3Ccircle cx='40' cy='42' r='5' fill='%23121212'/%3E%3Ccircle cx='60' cy='42' r='5' fill='%23121212'/%3E%3C/svg%3E" />
|
|
9
|
+
<script type="module" crossorigin src="/landing/assets/index-DZlpyhqd.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/landing/assets/index-CxWsopzP.css">
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div id="root"></div>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type ActionApproval, type ActionEnvelope, type ActionExecutionReceipt } from "../actions/index.js";
|
|
2
|
+
import { type ScenarioBundle, type ScenarioReplayRequest } from "../scenarios/scenarioBundle.js";
|
|
3
|
+
export type LedgerPermission = "append" | "read" | "export" | "manage_retention" | "manage_hold" | "request_deletion";
|
|
4
|
+
export type LedgerStage = "intent" | "identity" | "policy_decision" | "approval" | "credential_grant" | "execution_attempt" | "provider_receipt" | "verification" | "compensation" | "retention" | "legal_hold" | "deletion_request";
|
|
5
|
+
export type LedgerAccess = {
|
|
6
|
+
tenantId: string;
|
|
7
|
+
principalId: string;
|
|
8
|
+
permissions: readonly LedgerPermission[];
|
|
9
|
+
};
|
|
10
|
+
export type LedgerAccessAuthorizer = (access: unknown, permission: LedgerPermission, tenantId: string) => LedgerAccess;
|
|
11
|
+
export type LedgerEntry = {
|
|
12
|
+
schemaVersion: 1;
|
|
13
|
+
kind: "ghostapi.action-ledger-entry";
|
|
14
|
+
tenantId: string;
|
|
15
|
+
sequence: number;
|
|
16
|
+
timestamp: string;
|
|
17
|
+
actionId: string;
|
|
18
|
+
actionHash: string;
|
|
19
|
+
stage: LedgerStage;
|
|
20
|
+
data: Record<string, string | number | boolean | null>;
|
|
21
|
+
previousHash: string;
|
|
22
|
+
entryHash: string;
|
|
23
|
+
};
|
|
24
|
+
export type LedgerTenantState = {
|
|
25
|
+
tenantId: string;
|
|
26
|
+
entryCount: number;
|
|
27
|
+
headHash: string;
|
|
28
|
+
retentionDays: number | null;
|
|
29
|
+
legalHold: boolean;
|
|
30
|
+
deletionRequestedAt?: string;
|
|
31
|
+
};
|
|
32
|
+
export type ActionLedgerState = {
|
|
33
|
+
schemaVersion: 1;
|
|
34
|
+
kind: "ghostapi.action-ledger";
|
|
35
|
+
entries: LedgerEntry[];
|
|
36
|
+
tenants: LedgerTenantState[];
|
|
37
|
+
};
|
|
38
|
+
export type ActionLedgerRecord = {
|
|
39
|
+
envelope: ActionEnvelope;
|
|
40
|
+
approval: ActionApproval;
|
|
41
|
+
receipts: readonly ActionExecutionReceipt[];
|
|
42
|
+
credentialGrant?: {
|
|
43
|
+
grantIdHash: string;
|
|
44
|
+
credentialVersion: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type LedgerVerification = {
|
|
48
|
+
valid: true;
|
|
49
|
+
entryCount: number;
|
|
50
|
+
headHash: string;
|
|
51
|
+
tracked: boolean;
|
|
52
|
+
} | {
|
|
53
|
+
valid: false;
|
|
54
|
+
error: string;
|
|
55
|
+
};
|
|
56
|
+
export type LedgerExport = {
|
|
57
|
+
schemaVersion: 1;
|
|
58
|
+
kind: "ghostapi.action-ledger-export";
|
|
59
|
+
tenantId: string;
|
|
60
|
+
exportedAt: string;
|
|
61
|
+
integrity: LedgerVerification;
|
|
62
|
+
entries: LedgerEntry[];
|
|
63
|
+
};
|
|
64
|
+
export type IncidentFixture = {
|
|
65
|
+
schemaVersion: 1;
|
|
66
|
+
kind: "ghostapi.incident-fixture";
|
|
67
|
+
tenantId: string;
|
|
68
|
+
actionId: string;
|
|
69
|
+
actionHash: string;
|
|
70
|
+
sourceLedgerHeadHash: string;
|
|
71
|
+
syntheticWorld: {
|
|
72
|
+
id: string;
|
|
73
|
+
version: "1.0.0";
|
|
74
|
+
seed: string;
|
|
75
|
+
};
|
|
76
|
+
bundle: ScenarioBundle;
|
|
77
|
+
request: ScenarioReplayRequest;
|
|
78
|
+
expected: {
|
|
79
|
+
status: number;
|
|
80
|
+
outcome: "verified" | "requires_reconciliation";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
export type IncidentReplayResult = {
|
|
84
|
+
status: number;
|
|
85
|
+
outcome: "verified" | "requires_reconciliation";
|
|
86
|
+
remaining: number;
|
|
87
|
+
};
|
|
88
|
+
export type ActionLedgerOptions = {
|
|
89
|
+
path?: string;
|
|
90
|
+
incidentsPath?: string;
|
|
91
|
+
now?: () => Date;
|
|
92
|
+
accessAuthorizer?: LedgerAccessAuthorizer;
|
|
93
|
+
};
|
|
94
|
+
export declare class ActionLedgerError extends Error {
|
|
95
|
+
constructor(message: string);
|
|
96
|
+
}
|
|
97
|
+
export declare class LocalActionLedger {
|
|
98
|
+
private readonly path;
|
|
99
|
+
private readonly incidentsPath;
|
|
100
|
+
private readonly now;
|
|
101
|
+
private readonly accessAuthorizer;
|
|
102
|
+
constructor(options?: ActionLedgerOptions);
|
|
103
|
+
recordAction(accessValue: unknown, recordValue: ActionLedgerRecord): Promise<LedgerEntry[]>;
|
|
104
|
+
timeline(accessValue: unknown, actionIdValue: string): Promise<LedgerEntry[]>;
|
|
105
|
+
exportTenant(accessValue: unknown): Promise<LedgerExport>;
|
|
106
|
+
verifyTenant(accessValue: unknown): Promise<LedgerVerification>;
|
|
107
|
+
configureRetention(accessValue: unknown, retentionDaysValue: number | null): Promise<LedgerTenantState>;
|
|
108
|
+
setLegalHold(accessValue: unknown, active: boolean): Promise<LedgerTenantState>;
|
|
109
|
+
requestDeletion(accessValue: unknown): Promise<LedgerTenantState>;
|
|
110
|
+
createIncidentFixture(accessValue: unknown, actionIdValue: string): Promise<{
|
|
111
|
+
fixture: IncidentFixture;
|
|
112
|
+
bundlePath: string;
|
|
113
|
+
fixturePath: string;
|
|
114
|
+
}>;
|
|
115
|
+
replayIncidentFixture(accessValue: unknown, fixtureValue: unknown): Promise<IncidentReplayResult>;
|
|
116
|
+
private authorize;
|
|
117
|
+
private readState;
|
|
118
|
+
private mutate;
|
|
119
|
+
}
|
|
120
|
+
export declare function createLocalActionLedger(options?: ActionLedgerOptions): LocalActionLedger;
|
|
121
|
+
export declare function createTestLedgerAccessAuthorizer(): {
|
|
122
|
+
authorizer: LedgerAccessAuthorizer;
|
|
123
|
+
issue(input: LedgerAccess): object;
|
|
124
|
+
};
|
|
125
|
+
export declare function validateIncidentFixture(value: unknown): IncidentFixture;
|