@yiaany/ghostapi 0.1.9 → 0.2.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/CHANGELOG.md +21 -0
- package/CONTRIBUTING.md +132 -119
- package/LICENSE +21 -21
- package/PROVENANCE.md +13 -0
- package/README.md +78 -84
- package/SECURITY.md +56 -53
- package/dist/actions/gateway.js +320 -72
- package/dist/actions/gateway.js.map +1 -1
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.js +1 -1
- package/dist/actions/index.js.map +1 -1
- package/dist/agents/agentPrompt.js +7 -5
- package/dist/agents/agentPrompt.js.map +1 -1
- package/dist/ai/aiClient.js +5 -5
- package/dist/ai/aiClient.js.map +1 -1
- package/dist/ai/aiGenerator.js +66 -26
- package/dist/ai/aiGenerator.js.map +1 -1
- package/dist/ai/genericInference.js +151 -36
- package/dist/ai/genericInference.js.map +1 -1
- package/dist/ai/prompts.js +55 -49
- package/dist/ai/prompts.js.map +1 -1
- package/dist/approvals/approvalInbox.js +649 -133
- package/dist/approvals/approvalInbox.js.map +1 -1
- package/dist/approvals/index.d.ts +2 -2
- package/dist/approvals/index.js +1 -1
- package/dist/approvals/index.js.map +1 -1
- package/dist/behavior/behaviorStore.js +34 -14
- package/dist/behavior/behaviorStore.js.map +1 -1
- package/dist/cache/index.js +14 -5
- package/dist/cache/index.js.map +1 -1
- package/dist/cli/index.js +226 -93
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/openUrl.js +17 -3
- package/dist/cli/openUrl.js.map +1 -1
- package/dist/cli/parser.js +79 -18
- package/dist/cli/parser.js.map +1 -1
- package/dist/config/dataPaths.js +4 -2
- package/dist/config/dataPaths.js.map +1 -1
- package/dist/config/localConfig.js +5 -2
- package/dist/config/localConfig.js.map +1 -1
- package/dist/config/serverConfig.js +11 -5
- package/dist/config/serverConfig.js.map +1 -1
- package/dist/contracts/contract.js +311 -83
- package/dist/contracts/contract.js.map +1 -1
- package/dist/contracts/index.d.ts +2 -2
- package/dist/contracts/index.js +1 -1
- package/dist/contracts/index.js.map +1 -1
- package/dist/credentials/credentialBroker.js +391 -79
- package/dist/credentials/credentialBroker.js.map +1 -1
- package/dist/credentials/index.d.ts +2 -2
- package/dist/credentials/index.js +1 -1
- package/dist/credentials/index.js.map +1 -1
- package/dist/dashboard/app.js +823 -685
- package/dist/dashboard/dashboard.js.map +1 -1
- package/dist/dashboard/index.html +704 -267
- package/dist/dashboard/styles.css +1040 -349
- package/dist/egress/capabilities.js +55 -25
- package/dist/egress/capabilities.js.map +1 -1
- package/dist/egress/linuxBootstrap.js +47 -11
- package/dist/egress/linuxBootstrap.js.map +1 -1
- package/dist/egress/run.js +170 -31
- package/dist/egress/run.js.map +1 -1
- package/dist/errors/errorEngine.js +15 -3
- package/dist/errors/errorEngine.js.map +1 -1
- package/dist/errors/providerErrors.js.map +1 -1
- package/dist/evals/evals.js +304 -78
- package/dist/evals/evals.js.map +1 -1
- package/dist/evals/index.d.ts +2 -2
- package/dist/evals/index.js +1 -1
- package/dist/evals/index.js.map +1 -1
- package/dist/evidence/index.d.ts +2 -2
- package/dist/evidence/index.js +1 -1
- package/dist/evidence/index.js.map +1 -1
- package/dist/evidence/report.d.ts +1 -1
- package/dist/evidence/report.js +263 -79
- package/dist/evidence/report.js.map +1 -1
- package/dist/fault/faultLab.js +24 -9
- package/dist/fault/faultLab.js.map +1 -1
- package/dist/index.d.ts +42 -42
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/inventory/analysis.d.ts +1 -1
- package/dist/inventory/analysis.js +174 -50
- package/dist/inventory/analysis.js.map +1 -1
- package/dist/inventory/index.d.ts +4 -4
- package/dist/inventory/index.js +3 -3
- package/dist/inventory/index.js.map +1 -1
- package/dist/inventory/inventoryController.js +362 -115
- package/dist/inventory/inventoryController.js.map +1 -1
- package/dist/inventory/types.js +680 -140
- package/dist/inventory/types.js.map +1 -1
- package/dist/ledger/actionLedger.js +355 -78
- package/dist/ledger/actionLedger.js.map +1 -1
- package/dist/ledger/index.d.ts +2 -2
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/index.js.map +1 -1
- package/dist/mcp/server.js +26 -11
- package/dist/mcp/server.js.map +1 -1
- package/dist/policy/index.d.ts +2 -2
- package/dist/policy/index.js +1 -1
- package/dist/policy/index.js.map +1 -1
- package/dist/policy/policy.js +112 -32
- package/dist/policy/policy.js.map +1 -1
- package/dist/productTelemetry/index.js +71 -20
- package/dist/productTelemetry/index.js.map +1 -1
- package/dist/providers/conformance.js +10 -5
- package/dist/providers/conformance.js.map +1 -1
- package/dist/providers/discord.js +2 -2
- package/dist/providers/generic.js +3 -3
- package/dist/providers/github.js +2 -2
- package/dist/providers/index.d.ts +3 -3
- package/dist/providers/index.js +2 -2
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.js +3 -3
- package/dist/providers/packs/resendPack.js +51 -25
- package/dist/providers/packs/resendPack.js.map +1 -1
- package/dist/providers/packs/stripePack.js +590 -121
- package/dist/providers/packs/stripePack.js.map +1 -1
- package/dist/providers/registry.js +4 -4
- package/dist/providers/registry.js.map +1 -1
- package/dist/providers/runtime.js +7 -6
- package/dist/providers/runtime.js.map +1 -1
- package/dist/providers/stripeWebhook.js +39 -10
- package/dist/providers/stripeWebhook.js.map +1 -1
- package/dist/providers/twilio.js +2 -2
- package/dist/proxy/cacheKey.js +9 -2
- package/dist/proxy/cacheKey.js.map +1 -1
- package/dist/proxy/providerDetector.js +22 -9
- package/dist/proxy/providerDetector.js.map +1 -1
- package/dist/proxy/proxyHandler.js +57 -22
- package/dist/proxy/proxyHandler.js.map +1 -1
- package/dist/proxy/requestNormalizer.js +4 -2
- package/dist/proxy/requestNormalizer.js.map +1 -1
- package/dist/reliability/costGovernance.js +211 -49
- package/dist/reliability/costGovernance.js.map +1 -1
- package/dist/reliability/index.d.ts +8 -8
- package/dist/reliability/index.js +4 -4
- package/dist/reliability/index.js.map +1 -1
- package/dist/reliability/reconciliation.js +274 -65
- package/dist/reliability/reconciliation.js.map +1 -1
- package/dist/reliability/runtimeHealth.js +127 -35
- package/dist/reliability/runtimeHealth.js.map +1 -1
- package/dist/reliability/slo.js +257 -50
- package/dist/reliability/slo.js.map +1 -1
- package/dist/report/safetyReport.d.ts +6 -0
- package/dist/report/safetyReport.js +56 -12
- package/dist/report/safetyReport.js.map +1 -1
- package/dist/rules/aiRules.js +5 -5
- package/dist/rules/aiRules.js.map +1 -1
- package/dist/safety/index.d.ts +2 -2
- package/dist/safety/index.js +1 -1
- package/dist/safety/index.js.map +1 -1
- package/dist/safety/safetyController.js +675 -165
- package/dist/safety/safetyController.js.map +1 -1
- package/dist/scenarios/scenarioBundle.js +204 -71
- package/dist/scenarios/scenarioBundle.js.map +1 -1
- package/dist/scenarios/scenarioStore.js +88 -29
- package/dist/scenarios/scenarioStore.js.map +1 -1
- package/dist/security/headerSanitizer.js +52 -10
- package/dist/security/headerSanitizer.js.map +1 -1
- package/dist/security/secrets.js +10 -5
- package/dist/security/secrets.js.map +1 -1
- package/dist/server/accessControl.js +37 -10
- package/dist/server/accessControl.js.map +1 -1
- package/dist/server/createServer.js +1 -1
- package/dist/server/createServer.js.map +1 -1
- package/dist/server/eventsStore.js +15 -5
- package/dist/server/eventsStore.js.map +1 -1
- package/dist/server/routes.js +61 -19
- package/dist/server/routes.js.map +1 -1
- package/dist/server/sse.js +1 -1
- package/dist/server/sse.js.map +1 -1
- package/dist/setup/sdkDetector.js +7 -2
- package/dist/setup/sdkDetector.js.map +1 -1
- package/dist/setup/setupGenerator.js +136 -48
- package/dist/setup/setupGenerator.js.map +1 -1
- package/dist/state/stateExtractor.js +3 -1
- package/dist/state/stateExtractor.js.map +1 -1
- package/dist/state/stateResolver.js +10 -7
- package/dist/state/stateResolver.js.map +1 -1
- package/dist/state/stateStore.js +13 -4
- package/dist/state/stateStore.js.map +1 -1
- package/dist/storage/fileStore.js +12 -4
- package/dist/storage/fileStore.js.map +1 -1
- package/dist/teamControl/controlPlane.js +846 -174
- package/dist/teamControl/controlPlane.js.map +1 -1
- package/dist/teamControl/deployment.js +19 -5
- package/dist/teamControl/deployment.js.map +1 -1
- package/dist/teamControl/index.d.ts +4 -4
- package/dist/teamControl/index.js +2 -2
- package/dist/teamControl/index.js.map +1 -1
- package/dist/tests/testGenerator.js +15 -7
- package/dist/tests/testGenerator.js.map +1 -1
- package/dist/trust/index.d.ts +2 -2
- package/dist/trust/index.js +1 -1
- package/dist/trust/index.js.map +1 -1
- package/dist/trust/trustLadder.js +309 -63
- package/dist/trust/trustLadder.js.map +1 -1
- package/dist/worlds/index.d.ts +2 -2
- package/dist/worlds/index.js +1 -1
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/worlds.js +364 -65
- package/dist/worlds/worlds.js.map +1 -1
- package/docs/assets/dashboard.png +0 -0
- package/docs/ci.md +49 -49
- package/docs/github-actions.md +84 -84
- package/docs/mcp.md +58 -52
- package/docs/policy.md +63 -61
- package/docs/providers/authoring-packs.md +180 -175
- package/docs/providers/stripe-core-pack.md +84 -82
- package/docs/releases/README.md +13 -0
- package/docs/security/action-gateway-threat-model.md +34 -34
- package/docs/security/action-ledger-incident-replay-threat-model.md +42 -42
- package/docs/security/approval-inbox-threat-model.md +35 -35
- package/docs/security/credential-broker-threat-model.md +52 -52
- package/docs/security/egress-threat-model.md +126 -126
- package/docs/security/inventory-threat-model.md +104 -104
- package/docs/security/kill-switch-budgets-threat-model.md +37 -37
- package/docs/security/reliability-threat-model.md +111 -111
- package/docs/security/trust-ladder-threat-model.md +33 -33
- package/docs/telemetry.md +14 -0
- package/docs/usage.md +680 -571
- package/examples/README.md +10 -10
- package/examples/agent-instructions/README.md +39 -39
- package/examples/ci-smoke/README.md +21 -21
- package/examples/ci-smoke/ghostapi.policy.yaml +22 -22
- package/examples/ci-smoke/package.json +9 -9
- package/examples/ci-smoke/production-egress.mjs +4 -2
- package/examples/ci-smoke/safe.mjs +21 -17
- package/examples/evals/README.md +24 -24
- package/examples/evals/retry-after.eval.json +71 -52
- package/examples/generic-rest/README.md +27 -27
- package/examples/github-fetch/README.md +38 -35
- package/examples/openai-streaming/README.md +16 -16
- package/examples/openai-streaming/streaming-tool-call.mjs +44 -31
- package/examples/policy/ghostapi.policy.yaml +27 -27
- package/examples/record-replay/README.md +19 -19
- package/examples/record-replay/replay-requests.json +22 -22
- package/examples/record-replay/stripe-checkout.har.json +30 -30
- package/examples/resend-node/README.md +22 -22
- package/examples/stripe-node/README.md +35 -35
- package/examples/stripe-node/checkout-flow.mjs +87 -61
- package/examples/twilio-node/README.md +21 -21
- package/examples/worlds/README.md +19 -19
- package/examples/worlds/subscription-recovery.mjs +21 -12
- package/package.json +28 -6
- package/dist/landing/assets/index-BXR41fAD.css +0 -1
- package/dist/landing/assets/index-CxWsopzP.css +0 -1
- package/dist/landing/assets/index-D8_ggMRE.js +0 -55
- package/dist/landing/assets/index-DZlpyhqd.js +0 -55
- package/dist/landing/assets/index-Dk-Xezs3.js +0 -55
- package/dist/landing/index.html +0 -15
- package/dist/landing/landing.d.ts +0 -3
- package/dist/landing/landing.js +0 -12
- package/dist/landing/landing.js.map +0 -1
- package/docs/commercial/README.md +0 -29
- package/docs/commercial/data-inventory.md +0 -36
- package/docs/commercial/manual-invoicing.md +0 -44
- package/docs/commercial/metrics.md +0 -51
- package/docs/commercial/pricing.md +0 -103
- package/docs/commercial/privacy-policy-draft.md +0 -41
- package/docs/commercial/terms-topics-for-counsel.md +0 -51
- package/docs/design-partners/README.md +0 -52
- package/docs/design-partners/demo-narratives.md +0 -33
- package/docs/design-partners/design-partner-offer.md +0 -39
- package/docs/design-partners/discovery-questions.md +0 -28
- package/docs/design-partners/feedback-capture-template.md +0 -48
- package/docs/design-partners/icp-one-pager.md +0 -43
- package/docs/design-partners/onboarding-checklist.md +0 -33
- package/docs/design-partners/pilot-success-criteria.md +0 -27
- package/docs/design-partners/pricing-interview-script.md +0 -18
- package/docs/design-partners/telemetry-plan.md +0 -48
- package/docs/development/baseline.md +0 -114
- package/docs/development/onboarding-smoke.md +0 -37
- package/docs/development/verification-0.1.8.md +0 -25
- package/docs/enterprise-product-roadmap-ru.md +0 -1879
- package/docs/fundraising/README.md +0 -87
- package/docs/fundraising/data-room-checklist.md +0 -72
- package/docs/fundraising/demo-script.md +0 -52
- package/docs/fundraising/design-partners-50.md +0 -74
- package/docs/fundraising/launch-posts.md +0 -37
- package/docs/fundraising/metrics-and-evidence.md +0 -30
- package/docs/fundraising/roadmap-12-month.md +0 -25
- package/docs/fundraising/technical-due-diligence-index.md +0 -37
- package/docs/fundraising/yc-application.md +0 -25
- package/docs/hosted-pilot.md +0 -111
- package/docs/operations/disaster-recovery-runbook.md +0 -81
- package/docs/operations/kill-switch-runbook.md +0 -32
- package/docs/release-checklist.md +0 -83
- package/docs/release-migration-and-rollback.md +0 -63
- package/docs/release-readiness.md +0 -39
- package/docs/team-control-plane.md +0 -72
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to GhostAPI will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format follows the spirit of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses semantic versioning once public releases begin.
|
|
6
6
|
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
## 0.2.1 - 2026-09-01
|
|
10
|
+
|
|
11
|
+
### Security
|
|
12
|
+
|
|
13
|
+
- Corrected evidence semantics so unmeasured production-egress attempt counts are reported as `not measured` instead of a fabricated zero.
|
|
14
|
+
- Reframed the bounded repository safety scan as a provider-risk heuristic scan and exposed its file, size, and extension limits.
|
|
15
|
+
- Removed external font requests from the local dashboard and added a regression test for external dashboard asset URLs.
|
|
16
|
+
- Added CodeQL, OSV, OpenSSF Scorecard, Dependabot, container scanning, coverage thresholds, and retained Linux egress test output.
|
|
17
|
+
- Added locked compatibility tests for the official Stripe `22.6.0` and OpenAI `7.8.0` Node SDKs against a loopback-only GhostAPI server.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Repositioned GhostAPI as an AI-assisted local API simulation experiment with explicit non-goals and no customer-validation claims.
|
|
22
|
+
- Added project provenance, contribution authorship guidance, full-tree formatting, and type-aware ESLint parsing.
|
|
23
|
+
- Corrected 36 pre-0.2 Git author and committer identities from an accidental local tool identity to the contributing maintainer while preserving file trees, messages, and dates.
|
|
24
|
+
- Removed fundraising, commercial, design-partner, community-operations, and enterprise-roadmap material from the public tree and npm package.
|
|
25
|
+
- Added a release workflow for signed annotated tags, exact-tarball smoke testing, checksums, SBOM generation, build attestations, npm provenance, and post-publish `gitHead` verification.
|
|
26
|
+
- Centered the README hero and dashboard product identity, and added responsive navigation and request/detail layouts for mobile screens.
|
|
27
|
+
|
|
7
28
|
## 0.1.8 - 2026-08-22
|
|
8
29
|
|
|
9
30
|
### Security
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,119 +1,132 @@
|
|
|
1
|
-
# Contributing to GhostAPI
|
|
2
|
-
|
|
3
|
-
Thanks for helping improve GhostAPI. This project aims to be small, safe, local-first, and useful for developers and AI coding agents.
|
|
4
|
-
|
|
5
|
-
## Setup
|
|
6
|
-
|
|
7
|
-
Requirements:
|
|
8
|
-
|
|
9
|
-
- Node.js 20 or newer
|
|
10
|
-
- npm
|
|
11
|
-
|
|
12
|
-
Install dependencies:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
Run the local development server:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npm run dev
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Open:
|
|
25
|
-
|
|
26
|
-
```text
|
|
27
|
-
http://localhost:8080/dashboard
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Scripts
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm run typecheck
|
|
34
|
-
npm run lint
|
|
35
|
-
npm test
|
|
36
|
-
npm run
|
|
37
|
-
npm run
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
npm run
|
|
45
|
-
npm
|
|
46
|
-
npm
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Tests
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
- `npm run
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
1
|
+
# Contributing to GhostAPI
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve GhostAPI. This project aims to be small, safe, local-first, and useful for developers and AI coding agents.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
Requirements:
|
|
8
|
+
|
|
9
|
+
- Node.js 20 or newer
|
|
10
|
+
- npm
|
|
11
|
+
|
|
12
|
+
Install dependencies from the lockfile:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm ci
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Run the local development server:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Open:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
http://localhost:8080/dashboard
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Scripts
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run typecheck
|
|
34
|
+
npm run lint
|
|
35
|
+
npm test
|
|
36
|
+
npm run test:coverage
|
|
37
|
+
npm run build
|
|
38
|
+
npm run dev
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Use these before opening a pull request:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm run typecheck
|
|
45
|
+
npm run lint
|
|
46
|
+
npm test
|
|
47
|
+
npm run test:coverage
|
|
48
|
+
npm run build
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Tests
|
|
52
|
+
|
|
53
|
+
Tests are written with Vitest and must stay local-only. Do not add tests that call real Stripe, Twilio, Resend, GitHub, OpenAI, or any other external API.
|
|
54
|
+
|
|
55
|
+
Current test areas include:
|
|
56
|
+
|
|
57
|
+
- Secret masking
|
|
58
|
+
- Provider detection
|
|
59
|
+
- Cache key stability
|
|
60
|
+
- State save/read/list/delete
|
|
61
|
+
- Provider error formatting
|
|
62
|
+
- Prompt construction and JSON repair
|
|
63
|
+
- Proxy flow integration
|
|
64
|
+
- Dashboard/SSE event formatting
|
|
65
|
+
|
|
66
|
+
Shared fixtures live in `test/fixtures/`.
|
|
67
|
+
|
|
68
|
+
## Coding Style
|
|
69
|
+
|
|
70
|
+
- TypeScript strict mode.
|
|
71
|
+
- ESM modules.
|
|
72
|
+
- Prefer functions and simple objects over classes.
|
|
73
|
+
- Keep modules small and direct.
|
|
74
|
+
- Avoid `any`; use `unknown` and narrow values where possible.
|
|
75
|
+
- Add comments only where behavior is not obvious.
|
|
76
|
+
- Keep user-facing errors actionable.
|
|
77
|
+
- Do not introduce network calls to real provider APIs by default.
|
|
78
|
+
|
|
79
|
+
## Adding A Provider
|
|
80
|
+
|
|
81
|
+
GhostAPI intentionally keeps native adapters limited. For the MVP, native adapters are:
|
|
82
|
+
|
|
83
|
+
- Stripe
|
|
84
|
+
- Twilio
|
|
85
|
+
- Resend
|
|
86
|
+
- GitHub
|
|
87
|
+
- Discord
|
|
88
|
+
- OpenAI
|
|
89
|
+
- Generic fallback
|
|
90
|
+
|
|
91
|
+
Before adding a new native adapter, ask whether generic fallback plus prompt hints is enough. Native adapters should be reserved for providers where contract-specific behavior, validation, or error formatting is clearly worth maintaining.
|
|
92
|
+
|
|
93
|
+
If a native adapter is justified:
|
|
94
|
+
|
|
95
|
+
1. Read `docs/providers/authoring-packs.md`.
|
|
96
|
+
2. Add one built-in pack under `src/providers/packs/`.
|
|
97
|
+
3. Register it in `src/providers/registry.ts` without changing generic fallback.
|
|
98
|
+
4. Add deterministic conformance fixtures and provider regression tests.
|
|
99
|
+
5. Do not import network, filesystem, environment, or state-store capabilities into the pack.
|
|
100
|
+
6. Update README provider coverage and the versioned capability manifest.
|
|
101
|
+
|
|
102
|
+
## Adding Prompt Hints
|
|
103
|
+
|
|
104
|
+
Most services should use generic fallback. To improve generic behavior:
|
|
105
|
+
|
|
106
|
+
1. Add or refine lightweight inference in `src/ai/genericInference.ts`.
|
|
107
|
+
2. Keep labels best-effort, such as `generic:shopify-like`.
|
|
108
|
+
3. Do not add provider-specific validation or error formats for generic services.
|
|
109
|
+
4. Add tests in `test/genericInference.test.ts`.
|
|
110
|
+
5. Update README coverage if the change affects documented behavior.
|
|
111
|
+
|
|
112
|
+
## Pull Request Checklist
|
|
113
|
+
|
|
114
|
+
- The change is scoped and explained clearly.
|
|
115
|
+
- `npm run typecheck` passes.
|
|
116
|
+
- `npm test` passes.
|
|
117
|
+
- `npm run build` passes.
|
|
118
|
+
- New behavior has tests when practical.
|
|
119
|
+
- No real external API calls were added by default.
|
|
120
|
+
- Secrets are not logged, cached, sent to LLM prompts, or exposed in dashboard payloads.
|
|
121
|
+
- README or examples are updated when user-facing behavior changes.
|
|
122
|
+
|
|
123
|
+
## Authorship And Commits
|
|
124
|
+
|
|
125
|
+
- Use a human Git author for commits. Do not commit as `OpenCode <opencode@localhost>`.
|
|
126
|
+
- Add `Assisted-by: OpenCode` only when AI assistance was substantial and materially affected the change.
|
|
127
|
+
- Use pull requests and squash merge for changes to `main`.
|
|
128
|
+
- Use focused Conventional Commit titles such as `fix(egress): reject unsupported allow hosts` or `docs(readme): clarify provider coverage`.
|
|
129
|
+
- Preferred scopes are `provider`, `policy`, `egress`, `sanitizer`, `dashboard`, `mcp`, `hosted`, `release`, and `docs`.
|
|
130
|
+
- Do not combine unrelated security, feature, and documentation work into one commit.
|
|
131
|
+
|
|
132
|
+
See [`PROVENANCE.md`](PROVENANCE.md) for the project authorship statement.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 GhostAPI contributors
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GhostAPI contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PROVENANCE.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Project Provenance
|
|
2
|
+
|
|
3
|
+
GhostAPI is maintained by Yiaany.
|
|
4
|
+
|
|
5
|
+
AI-assisted development tools, including OpenCode, were used for code generation, review, test generation, documentation drafting, and refactoring. The maintainer selected the architecture, defined product and security boundaries, reviewed and modified generated changes, ran verification, and accepts responsibility for the published code.
|
|
6
|
+
|
|
7
|
+
AI assistance does not imply independent authorship. No claim is made that every line was typed manually.
|
|
8
|
+
|
|
9
|
+
Security-sensitive changes require maintainer review, tests, and release evidence from the exact published commit.
|
|
10
|
+
|
|
11
|
+
On September 1, 2026, the pre-0.2 history was rewritten to correct 36 commits accidentally recorded under the local `OpenCode <opencode@localhost>` identity to `hizyyo <kapolol2266@gmail.com>`. The reviewed replacement preserved every file tree, commit message, author date, and committer date; PR #20 records the validation and application procedure. This metadata correction does not remove this disclosure of AI-assisted development.
|
|
12
|
+
|
|
13
|
+
New changes should use a human author and may include an `Assisted-by: OpenCode` trailer when the assistance was substantial.
|
package/README.md
CHANGED
|
@@ -1,37 +1,24 @@
|
|
|
1
|
-
<
|
|
2
|
-
<img src="docs/assets/ghostapi-avatar.png" alt="GhostAPI" width="
|
|
3
|
-
</
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
<p
|
|
8
|
-
<strong>The local internet for AI coding agents.</strong>
|
|
9
|
-
</p>
|
|
10
|
-
|
|
11
|
-
<p align="center">
|
|
12
|
-
Build and test third-party API integrations locally, without charging cards, sending messages, leaking production keys, or mutating real services.
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
<p align="center">
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="docs/assets/ghostapi-avatar.png" alt="GhostAPI logo" width="88" height="88">
|
|
3
|
+
<h1>GhostAPI</h1>
|
|
4
|
+
<p><strong>Local API simulation and test evidence for AI-assisted development.</strong></p>
|
|
5
|
+
<p>GhostAPI gives applications and coding agents a local target for selected Stripe, Resend, OpenAI, Twilio, GitHub, Discord, and generic REST workflows. It records heuristically sanitized traffic, injects deterministic failures, exposes MCP controls, and turns captured behavior into repeatable tests.</p>
|
|
6
|
+
<p>On supported Linux hosts, <code>ghostapi run</code> can execute a test command inside a loopback-only network namespace. It is not a hostile-code or filesystem sandbox.</p>
|
|
7
|
+
<p>
|
|
16
8
|
<a href="https://www.npmjs.com/package/@yiaany/ghostapi"><img alt="npm" src="https://img.shields.io/npm/v/@yiaany/ghostapi?color=0f172a&label=npm"></a>
|
|
17
9
|
<a href="https://github.com/yiaany/ghostapi/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/badge/license-MIT-0f172a"></a>
|
|
18
10
|
<a href="https://github.com/yiaany/ghostapi/actions/workflows/ci.yml"><img alt="ci" src="https://github.com/yiaany/ghostapi/actions/workflows/ci.yml/badge.svg"></a>
|
|
19
11
|
<img alt="node" src="https://img.shields.io/badge/node-%3E%3D20-0f172a">
|
|
20
12
|
<img alt="MCP" src="https://img.shields.io/badge/MCP-enabled-0f172a">
|
|
21
|
-
</p>
|
|
22
|
-
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
</p>
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npx @yiaany/ghostapi start --open
|
|
34
|
-
```
|
|
13
|
+
</p>
|
|
14
|
+
<p>
|
|
15
|
+
<a href="#quickstart">Quickstart</a> ·
|
|
16
|
+
<a href="SECURITY.md">Security model</a> ·
|
|
17
|
+
<a href="docs/providers/">Provider coverage</a> ·
|
|
18
|
+
<a href="docs/releases/">Release evidence</a>
|
|
19
|
+
</p>
|
|
20
|
+
<p><code>npx @yiaany/ghostapi start --open</code></p>
|
|
21
|
+
</div>
|
|
35
22
|
|
|
36
23
|
<p align="center">
|
|
37
24
|
<img src="docs/assets/dashboard.png" alt="GhostAPI dashboard with live local Stripe, OpenAI, and REST traffic">
|
|
@@ -41,7 +28,7 @@ npx @yiaany/ghostapi start --open
|
|
|
41
28
|
|
|
42
29
|
Coding agents can write a Stripe checkout, an OpenAI workflow, a GitHub automation, or an email integration in minutes. The dangerous part is what happens when they run that code.
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
When a client is configured against a live provider, a test can:
|
|
45
32
|
|
|
46
33
|
- charge a real card;
|
|
47
34
|
- send a real email or SMS;
|
|
@@ -49,7 +36,11 @@ Without a safe local target, a test can:
|
|
|
49
36
|
- spend API credits;
|
|
50
37
|
- leak credentials into logs, prompts, screenshots, or test fixtures.
|
|
51
38
|
|
|
52
|
-
GhostAPI
|
|
39
|
+
GhostAPI provides a local endpoint at `127.0.0.1:8080`. Requests sent to that endpoint are classified, heuristically sanitized, recorded in bounded local stores, and answered by implemented provider packs or generic fallback behavior. You can inspect the result in the dashboard, control local behavior through MCP, and turn captured failures into repeatable tests.
|
|
40
|
+
|
|
41
|
+
## Verified Locally, Not Customer-Validated Yet
|
|
42
|
+
|
|
43
|
+
The public repository contains reproducible tests for local provider simulation, Linux namespace enforcement, package installation, and hosted-pilot authorization. GhostAPI does not yet claim production customers, paid pilots, or a deployed team service.
|
|
53
44
|
|
|
54
45
|
## Quickstart
|
|
55
46
|
|
|
@@ -89,20 +80,20 @@ On Windows and macOS, `ghostapi run` fails closed because an equivalent process-
|
|
|
89
80
|
|
|
90
81
|
## What You Get
|
|
91
82
|
|
|
92
|
-
| Feature
|
|
93
|
-
|
|
|
94
|
-
| Local API
|
|
95
|
-
| Provider-shaped behavior
|
|
96
|
-
| Live dashboard
|
|
97
|
-
| MCP control plane
|
|
98
|
-
| Stateful synthetic worlds
|
|
99
|
-
| Scenarios and record/replay | Saves sanitized sandbox traffic and replays it offline as deterministic fixtures.
|
|
100
|
-
| Contract drift checks
|
|
101
|
-
| Agent evals and evidence
|
|
102
|
-
| Secret
|
|
103
|
-
| Fault testing
|
|
104
|
-
| Safety controls
|
|
105
|
-
| Reliability tooling
|
|
83
|
+
| Feature | What it does |
|
|
84
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| Local API simulation | Gives explicitly configured SDKs and applications a local target instead of a live provider. |
|
|
86
|
+
| Provider-shaped behavior | Returns deterministic objects and errors shaped like the implemented subset of each provider API; it does not claim live-provider parity. |
|
|
87
|
+
| Live dashboard | Shows requests and responses, filters traffic by provider, generates tests, and arms scenarios. |
|
|
88
|
+
| MCP control plane | Lets compatible coding agents inspect state, read traffic, configure responses, and toggle Chaos Mode. |
|
|
89
|
+
| Stateful synthetic worlds | Maintains deterministic local identities and state across Stripe, GitHub, email, and REST projections. |
|
|
90
|
+
| Scenarios and record/replay | Saves sanitized sandbox traffic and replays it offline as deterministic fixtures. |
|
|
91
|
+
| Contract drift checks | Imports bounded OpenAPI/HAR contracts and classifies breaking, non-breaking, and uncertain changes. |
|
|
92
|
+
| Agent evals and evidence | Produces bounded reports with a local self-consistency hash, verifiable while the runtime and local storage remain trusted. |
|
|
93
|
+
| Secret-risk reduction | Heuristically masks recognized secret-shaped headers, query parameters, bodies, paths, events, prompts, and cache inputs. |
|
|
94
|
+
| Fault testing | Forces latency, provider errors, card declines, rate limits, and other unhappy paths. |
|
|
95
|
+
| Safety controls | Includes local approvals, scoped budgets, kill switches, circuit breakers, ledgers, and reconciliation for synthetic actions. |
|
|
96
|
+
| Reliability tooling | Tracks local SLO samples, cost attribution, runtime health, backups, inventory, and attack-path metadata. |
|
|
106
97
|
|
|
107
98
|
## Dashboard
|
|
108
99
|
|
|
@@ -124,16 +115,16 @@ GhostAPI has two levels of provider support.
|
|
|
124
115
|
|
|
125
116
|
### Stateful provider packs
|
|
126
117
|
|
|
127
|
-
| Provider | Included behavior
|
|
128
|
-
|
|
|
129
|
-
| Stripe
|
|
130
|
-
| Resend
|
|
118
|
+
| Provider | Included behavior |
|
|
119
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
120
|
+
| Stripe | Customers, products, prices, subscriptions, invoices, payment intents, payment methods, checkout sessions, refunds, pagination, lifecycle scenarios, and signed local webhooks. |
|
|
121
|
+
| Resend | Deterministic email-shaped requests, responses, validation, and failure behavior. |
|
|
131
122
|
|
|
132
123
|
### Provider-shaped adapters and generic inference
|
|
133
124
|
|
|
134
|
-
OpenAI, Twilio, GitHub, Discord, and generic REST routes are detected and receive provider-shaped
|
|
125
|
+
OpenAI, Twilio, GitHub, Discord, and generic REST routes are detected and receive provider-shaped synthetic responses and errors. These adapters are useful for local development, but they do not claim complete parity with live-provider endpoints.
|
|
135
126
|
|
|
136
|
-
Unsupported
|
|
127
|
+
Unsupported Stripe and Resend pack operations fail diagnostically. Legacy adapters and generic REST inference may return a synthetic fallback response for unrecognized routes; such responses do not indicate provider support or parity.
|
|
137
128
|
|
|
138
129
|
## SDK Setup
|
|
139
130
|
|
|
@@ -147,8 +138,8 @@ export const stripe = new Stripe(
|
|
|
147
138
|
{
|
|
148
139
|
host: process.env.GHOSTAPI_HOST ?? "127.0.0.1",
|
|
149
140
|
port: Number(process.env.GHOSTAPI_PORT ?? "8080"),
|
|
150
|
-
protocol: process.env.GHOSTAPI_PROTOCOL ?? "http"
|
|
151
|
-
}
|
|
141
|
+
protocol: process.env.GHOSTAPI_PROTOCOL ?? "http",
|
|
142
|
+
},
|
|
152
143
|
);
|
|
153
144
|
```
|
|
154
145
|
|
|
@@ -159,7 +150,7 @@ import OpenAI from "openai";
|
|
|
159
150
|
|
|
160
151
|
export const openai = new OpenAI({
|
|
161
152
|
apiKey: process.env.OPENAI_API_KEY ?? "sk-ghostapi",
|
|
162
|
-
baseURL: process.env.GHOSTAPI_OPENAI_BASE_URL ?? "http://127.0.0.1:8080/v1"
|
|
153
|
+
baseURL: process.env.GHOSTAPI_OPENAI_BASE_URL ?? "http://127.0.0.1:8080/v1",
|
|
163
154
|
});
|
|
164
155
|
```
|
|
165
156
|
|
|
@@ -186,7 +177,7 @@ Generic MCP configuration:
|
|
|
186
177
|
"mcpServers": {
|
|
187
178
|
"ghostapi": {
|
|
188
179
|
"command": "npx",
|
|
189
|
-
"args": ["-y", "@yiaany/ghostapi", "mcp"]
|
|
180
|
+
"args": ["-y", "@yiaany/ghostapi@0.2.1", "mcp"]
|
|
190
181
|
}
|
|
191
182
|
}
|
|
192
183
|
}
|
|
@@ -194,11 +185,11 @@ Generic MCP configuration:
|
|
|
194
185
|
|
|
195
186
|
Available tools:
|
|
196
187
|
|
|
197
|
-
| Tool
|
|
198
|
-
|
|
|
199
|
-
| `inspect_state`
|
|
200
|
-
| `get_traffic_logs`
|
|
201
|
-
| `set_api_behavior`
|
|
188
|
+
| Tool | Purpose |
|
|
189
|
+
| ------------------- | ------------------------------------------------------ |
|
|
190
|
+
| `inspect_state` | Read current local API objects. |
|
|
191
|
+
| `get_traffic_logs` | Inspect sanitized recent traffic. |
|
|
192
|
+
| `set_api_behavior` | Force a deterministic response for a method and path. |
|
|
202
193
|
| `toggle_chaos_mode` | Enable or disable local latency and failure injection. |
|
|
203
194
|
|
|
204
195
|
Generate setup snippets for Cursor, Claude, Cline, Aider, Codex, OpenCode, Gemini CLI, Goose, OpenClaw, Hermes, and generic MCP clients:
|
|
@@ -207,6 +198,8 @@ Generate setup snippets for Cursor, Claude, Cline, Aider, Codex, OpenCode, Gemin
|
|
|
207
198
|
npx @yiaany/ghostapi setup --write
|
|
208
199
|
```
|
|
209
200
|
|
|
201
|
+
Connect only trusted local MCP clients. MCP tools can read retained traffic and state and can modify local simulation behavior; MCP is not an authentication or egress boundary. Pin the package version in persistent MCP configuration or use a reviewed local installation.
|
|
202
|
+
|
|
210
203
|
## Scenarios, Contracts, And Evals
|
|
211
204
|
|
|
212
205
|
Record approved sandbox traffic into a sanitized offline bundle:
|
|
@@ -250,30 +243,40 @@ ghostapi eval \
|
|
|
250
243
|
--ci
|
|
251
244
|
```
|
|
252
245
|
|
|
253
|
-
##
|
|
246
|
+
## Security Boundaries
|
|
254
247
|
|
|
255
|
-
GhostAPI
|
|
248
|
+
GhostAPI uses local-first defaults, explicit external-LLM opt-in, and heuristic secret masking. Its boundaries are explicit:
|
|
256
249
|
|
|
257
250
|
- Real provider calls are disabled by default.
|
|
258
251
|
- Ambient `OPENAI_API_KEY` does not enable external generation.
|
|
259
252
|
- External LLM generation requires an explicit flag plus a separate `GHOSTAPI_LLM_API_KEY`.
|
|
260
|
-
-
|
|
253
|
+
- On non-loopback binds, every route except `/` and `/health` requires a strong `GHOSTAPI_AUTH_TOKEN`. The token provides access control, not encryption.
|
|
261
254
|
- External response redirects, unsafe response headers, traversal, remote schema references, symlinks, archives, and oversized inputs are rejected where applicable.
|
|
262
255
|
- Persistent stores have size, entry, retention, or rotation limits.
|
|
263
256
|
- The Linux `run` backend provides loopback-only process network isolation when namespace preflight succeeds.
|
|
264
257
|
- `run` is not a hostile-code filesystem sandbox.
|
|
265
|
-
- Secret masking is heuristic. Use synthetic credentials and data even in local fixtures.
|
|
258
|
+
- Secret masking is heuristic and incomplete. Use synthetic credentials and data even in local fixtures.
|
|
266
259
|
- Local approval, action, credential, ledger, trust, and safety components execute synthetic operations only. They are not a production-provider executor.
|
|
260
|
+
- Evidence hashes are local self-consistency checks, not signatures, immutable provenance, or proof against a same-user editor.
|
|
261
|
+
- Current run evidence records namespace lifecycle and GhostAPI-local traffic; it does not enumerate kernel-denied socket attempts.
|
|
267
262
|
|
|
268
263
|
Read the detailed threat models in [`docs/security`](docs/security) and the reporting policy in [`SECURITY.md`](SECURITY.md).
|
|
269
264
|
|
|
265
|
+
## Explicit Non-Goals
|
|
266
|
+
|
|
267
|
+
- No live-provider parity guarantee.
|
|
268
|
+
- No complete secret-redaction guarantee.
|
|
269
|
+
- No hostile-code filesystem sandbox.
|
|
270
|
+
- No equivalent process-egress enforcement on Windows or macOS.
|
|
271
|
+
- No deployed hosted service, SLA, compliance certification, or production credential executor.
|
|
272
|
+
|
|
270
273
|
## Platform Support
|
|
271
274
|
|
|
272
|
-
| Platform | Local API and dashboard
|
|
273
|
-
|
|
|
274
|
-
| Linux
|
|
275
|
-
| Windows
|
|
276
|
-
| macOS
|
|
275
|
+
| Platform | Local API and dashboard | `ghostapi run` enforcement |
|
|
276
|
+
| -------- | ------------------------ | ------------------------------------------------------------------- |
|
|
277
|
+
| Linux | Supported on Node.js 20+ | Supported when `unshare`, `iproute2`, and namespace preflight pass. |
|
|
278
|
+
| Windows | Supported on Node.js 20+ | Not implemented; fails closed. |
|
|
279
|
+
| macOS | Supported on Node.js 20+ | Not implemented; fails closed. |
|
|
277
280
|
|
|
278
281
|
Check the current machine:
|
|
279
282
|
|
|
@@ -289,20 +292,9 @@ GET /health process liveness, HTTP 200 while state can be evaluated
|
|
|
289
292
|
GET /health/readiness structural readiness, HTTP 503 when a required store is unsafe
|
|
290
293
|
```
|
|
291
294
|
|
|
292
|
-
## Hosted
|
|
293
|
-
|
|
294
|
-
The `hosted/` directory contains an implemented but not yet deployed team pilot. It includes:
|
|
295
|
-
|
|
296
|
-
- organizations, projects, invitations, memberships, and role-based access;
|
|
297
|
-
- tenant-safe report and scenario APIs;
|
|
298
|
-
- hashed and rotatable CI ingest keys;
|
|
299
|
-
- bounded request handling, CSRF checks, security headers, quotas, and abuse limits;
|
|
300
|
-
- PostgreSQL migrations, idempotency, outbox dispatch, worker leases, retries, dead letters, and retention cleanup;
|
|
301
|
-
- Redis-backed rate limiting, QStash verification, readiness checks, and a non-root Docker image.
|
|
302
|
-
|
|
303
|
-
It is not advertised as a production SaaS yet. Live OAuth, Redis, QStash, load, failover, backup/restore, and disaster-recovery behavior must still be proven in staging before a paid pilot.
|
|
295
|
+
## Hosted Experiment
|
|
304
296
|
|
|
305
|
-
The
|
|
297
|
+
No hosted or enterprise service is currently available. The `hosted/` directory is an undeployed experimental implementation, excluded from the npm package and unsupported for production use. Its live OAuth, dependency, migration, load, failover, backup, and disaster-recovery behavior has not been proven in staging.
|
|
306
298
|
|
|
307
299
|
## Development
|
|
308
300
|
|
|
@@ -311,6 +303,7 @@ npm ci
|
|
|
311
303
|
npm run lint
|
|
312
304
|
npm run typecheck
|
|
313
305
|
npm test
|
|
306
|
+
npm run test:coverage
|
|
314
307
|
npm run build
|
|
315
308
|
npm run smoke:package
|
|
316
309
|
```
|
|
@@ -323,7 +316,7 @@ npm ci
|
|
|
323
316
|
npm run check
|
|
324
317
|
```
|
|
325
318
|
|
|
326
|
-
See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`
|
|
319
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`PROVENANCE.md`](PROVENANCE.md), and [`docs/releases/`](docs/releases/) for the contribution and release boundaries.
|
|
327
320
|
|
|
328
321
|
## Documentation
|
|
329
322
|
|
|
@@ -335,9 +328,10 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md), [`docs/release-readiness.md`](docs/rel
|
|
|
335
328
|
- [Stripe provider pack](docs/providers/stripe-core-pack.md)
|
|
336
329
|
- [Security policy](SECURITY.md)
|
|
337
330
|
- [Threat models](docs/security)
|
|
331
|
+
- [Project provenance](PROVENANCE.md)
|
|
332
|
+
- [Release evidence](docs/releases/)
|
|
338
333
|
- [Release readiness](docs/release-readiness.md)
|
|
339
334
|
- [Migration and rollback](docs/release-migration-and-rollback.md)
|
|
340
|
-
- [Enterprise roadmap in Russian](docs/enterprise-product-roadmap-ru.md)
|
|
341
335
|
|
|
342
336
|
## License
|
|
343
337
|
|