@yiaany/ghostapi 0.1.7 → 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 +42 -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 +27 -12
- 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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@ 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
|
+
## 0.1.8 - 2026-08-22
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
|
|
11
|
+
- Added a local tenant-scoped action ledger with bounded structured redaction, SHA-256 append-only chains, verification/export integrity checks, legal-hold/deletion-request semantics, and no credential or raw payload persistence. Added incident-to-synthetic-world/scenario fixtures that replay only in memory and preserve ambiguous outcomes as reconciliation-required.
|
|
12
|
+
- Added a local tenant-scoped agent inventory and attack-path graph (`inventory.json`) with provenance- and freshness-carrying records and edges, tenant-scoped reads/writes/export, strict payload validation that rejects secret-shaped values, reference-bound operator authorization per action, bounded store, an open export (inventory, policies, eval scenario references, evidence metadata, removal analysis, ROI built only from imported counters and applied remediations), and a remediation workflow whose scope reductions are validated as strict subsets at proposal and apply time. Heuristic blast-radius classifications are explicitly labeled advisory. The enterprise pilot gate is not yet met; results are for local synthetic review.
|
|
13
|
+
- Added a persisted local synthetic safety controller with scoped kill switches, locked budget reservations, circuit breakers, bounded queue/dead-letter handling, audited separately authorized re-enable, final synthetic commit checks, and a scheduled non-destructive game-day drill. No provider, credential, HTTP, or hosted emergency transport was added.
|
|
14
|
+
- Added a local synthetic trust ladder with strict no-side-effect level capabilities, explicit unsupported dry-run/trusted states, verified-owner promotion evidence, deterministic scoped canaries, hash-only shadow/outcome comparison, automatic demotion/circuit-breaker policy, rollback audit reasons, and no provider execution path.
|
|
15
|
+
- Hardened the local approval inbox so inbox-issued artifacts cannot be submitted or executed through the public action-gateway path, and verified approver principals prevent actor aliases from self-approving or satisfying two-person review.
|
|
16
|
+
- Hardened credential execution receipts and revocation handling: vault/provider I/O no longer holds the broker mutation lock, executors must recheck active grants before side effects, and executor errors are recorded as non-retryable unknown outcomes rather than confirmed failures.
|
|
17
|
+
- Added a local approval inbox with action-hash-bound, one-time expiring artifacts, derived risk taxonomy, independent two-person approval, amount/resource/environment/actor/confidence/velocity policy checks, timeout/revoke fail-closed handling, and action-receipt-linked audit records for the synthetic adapter only.
|
|
18
|
+
- Added a credential-broker and workload-identity boundary that stores only metadata, issues scoped server-only short-lived grants bound to action receipts, rechecks revocation/expiry/scope/tenant/workload at execution, invalidates grants on rotation, and ships test-only vault/provider adapters without real credential or network capability.
|
|
19
|
+
- Bound explicit evidence run-input files before parsing and reject malformed JSON, preventing unbounded local memory consumption through `evidence generate --run`.
|
|
20
|
+
- Redact secret-shaped target-start errors before writing Linux run evidence.
|
|
21
|
+
- Redact secret-shaped target stdout/stderr before forwarding it to the operator or CI log, including tokens split across stream chunks; interrupted namespace runs now preserve the caller signal exit code and finalize evidence after escalation.
|
|
22
|
+
- Added bounded queue-body handling to the separate undeployed hosted pilot before signature verification or JSON parsing.
|
|
23
|
+
- Hardened the undeployed hosted pilot with explicit tenant/role authorization, tenant-safe cross-boundary responses, exact-origin mutation checks, secure session/cookie and response-header defaults, and one-time SHA-256-only invitation and ingest secrets.
|
|
24
|
+
- Added hosted request/body limits, concurrency-safe durable quotas, bounded worker/outbox retries and dead-letter state, retention cleanup, and dependency-aware readiness checks; these controls are implemented and locally verified but not yet deployed.
|
|
25
|
+
- Restricted the standard GitHub Actions CI token to `contents: read`.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
29
|
+
- Published a valid package root with ESM and declaration exports, and extended packed-artifact smoke coverage to import `@yiaany/ghostapi` directly.
|
|
30
|
+
- Corrected repository identity to `yiaany/ghostapi`, standardized public commands on `@yiaany/ghostapi`, removed the bundled landing page so `/` opens the dashboard, and clarified setup generation and scenario arming behavior.
|
|
31
|
+
- Upgraded Vite and Vitest to audited compatible versions, added formatting checks, and expanded CI across Node.js and desktop platforms with package, production audit, and hosted-pilot checks.
|
|
32
|
+
- Clarified that `GET /health` is a liveness response that stays HTTP 200 while `GET /health/readiness` returns the structural report and HTTP 503 when dependencies are degraded.
|
|
33
|
+
- Added deterministic malformed-input regression coverage for policy, OpenAPI, and scenario-bundle parsers.
|
|
34
|
+
- Added release-readiness and migration/rollback documentation with platform-specific guarantees and known gaps.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Fixed dashboard clear actions so non-2xx responses are reported as failures, filtered request counts reflect visible rows, and malformed SSE messages are ignored without breaking the stream handler.
|
|
39
|
+
- Hardened the safety controller and action gateway: time-bounded synthetic leases with a default 60 s TTL, a two-phase final commit that re-checks the lease and records `action.final_check` after the operation, a tolerant terminal `complete()`, a stable `SAFETY_KILL_SWITCH` error code, and bounded dead-letter eviction. Gateway commit errors are no longer silently swallowed.
|
|
40
|
+
- Hardened the action ledger: caller-claimed basis markers on echoed policy/approval records, per-tenant retention rotation with hash-chain relinking at the 2,000-entry bound, and a `tracked` flag so a tenant without entries verifies distinctly from a broken chain.
|
|
41
|
+
- Hardened local reliability: SLO sampling is batch-bounded and latency counts only successful samples, reconciliation rejects missing worlds structurally and requires the `reconciliation.manage` permission, and cost governance is idempotent with a pure report path and tenant-scoped alerts.
|
|
42
|
+
- Hardened runtime health and backups: the inventory store is part of health checks, restores refuse non-empty directories, and backup exclusions use canonical cache/backup paths instead of folder names.
|
|
43
|
+
- Hardened the inventory controller: stale attack-path edges are filtered and garbage-collected, findings and import runs are bounded with per-tenant rotation, ineffective remediations can be reopened and are gated by injected eval-scenario existence, and remediation targets validate the environment reference.
|
|
44
|
+
|
|
7
45
|
## 0.1.7 - 2026-07-18
|
|
8
46
|
|
|
9
47
|
### Changed
|
|
@@ -14,8 +52,8 @@ The format follows the spirit of [Keep a Changelog](https://keepachangelog.com/e
|
|
|
14
52
|
|
|
15
53
|
### Fixed
|
|
16
54
|
|
|
17
|
-
- Updated npm package repository, bugs, and homepage URLs to point to
|
|
18
|
-
- Replaced custom CI badge with live GitHub Actions workflow status badge
|
|
55
|
+
- Updated npm package repository, bugs, and homepage URLs to point to the then-current repository instead of broken legacy links.
|
|
56
|
+
- Replaced the custom CI badge with a live GitHub Actions workflow status badge.
|
|
19
57
|
|
|
20
58
|
## 0.1.5 - 2026-07-18
|
|
21
59
|
|
|
@@ -67,6 +105,8 @@ The format follows the spirit of [Keep a Changelog](https://keepachangelog.com/e
|
|
|
67
105
|
|
|
68
106
|
### Security
|
|
69
107
|
|
|
108
|
+
- Added a local reliability layer with bounded stores and reference-bound capabilities: a local SLO controller (`slo.json`) that records samples only with a verified record capability, restricts configure/evaluate to authenticated operators, trims evaluation windows, and caps samples per metric and store bytes; a local reconciliation service (`reconciliation.json`) that blocks on ledger integrity failure, classifies ledger timelines as committed/not-committed/unknown/compensated/drifted against synthetic provider state, opens resolveable findings, and records duplicate-prevention, receipt-verification, availability, and execution-latency SLI samples; a local cost-governance store (`costs.json`) with capped attribution records, budgets, acknowledgeable alerts, and a linear-extrapolation forecast explicitly labeled as not a provider invoice; and runtime health plus verified local backup/restore (`reliability/backups/`) with sha256 manifests, tamper and path-traversal rejection, and no egress. `GET /health` reports liveness with readiness state at HTTP 200, while `GET /health/readiness` returns the structural report and HTTP 503 when a store is degraded.
|
|
109
|
+
|
|
70
110
|
- No real external provider API calls by default.
|
|
71
111
|
- Secrets are masked before prompt construction, cache key generation, event logging, and dashboard rendering.
|
|
72
112
|
- `ghostapi doctor` warns about unsafe TLS bypass settings.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,117 +1,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:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npm install
|
|
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
|
|
35
|
-
npm
|
|
36
|
-
npm run
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
npm
|
|
44
|
-
npm run
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Tests
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
- `npm run
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
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 install
|
|
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 build
|
|
37
|
+
npm run dev
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Use these before opening a pull request:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm run typecheck
|
|
44
|
+
npm run lint
|
|
45
|
+
npm test
|
|
46
|
+
npm run build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Tests
|
|
50
|
+
|
|
51
|
+
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.
|
|
52
|
+
|
|
53
|
+
Current test areas include:
|
|
54
|
+
|
|
55
|
+
- Secret masking
|
|
56
|
+
- Provider detection
|
|
57
|
+
- Cache key stability
|
|
58
|
+
- State save/read/list/delete
|
|
59
|
+
- Provider error formatting
|
|
60
|
+
- Prompt construction and JSON repair
|
|
61
|
+
- Proxy flow integration
|
|
62
|
+
- Dashboard/SSE event formatting
|
|
63
|
+
|
|
64
|
+
Shared fixtures live in `test/fixtures/`.
|
|
65
|
+
|
|
66
|
+
## Coding Style
|
|
67
|
+
|
|
68
|
+
- TypeScript strict mode.
|
|
69
|
+
- ESM modules.
|
|
70
|
+
- Prefer functions and simple objects over classes.
|
|
71
|
+
- Keep modules small and direct.
|
|
72
|
+
- Avoid `any`; use `unknown` and narrow values where possible.
|
|
73
|
+
- Add comments only where behavior is not obvious.
|
|
74
|
+
- Keep user-facing errors actionable.
|
|
75
|
+
- Do not introduce network calls to real provider APIs by default.
|
|
76
|
+
|
|
77
|
+
## Adding A Provider
|
|
78
|
+
|
|
79
|
+
GhostAPI intentionally keeps native adapters limited. For the MVP, native adapters are:
|
|
80
|
+
|
|
81
|
+
- Stripe
|
|
82
|
+
- Twilio
|
|
83
|
+
- Resend
|
|
84
|
+
- GitHub
|
|
85
|
+
- Discord
|
|
86
|
+
- OpenAI
|
|
87
|
+
- Generic fallback
|
|
88
|
+
|
|
89
|
+
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.
|
|
90
|
+
|
|
91
|
+
If a native adapter is justified:
|
|
92
|
+
|
|
93
|
+
1. Read `docs/providers/authoring-packs.md`.
|
|
94
|
+
2. Add one built-in pack under `src/providers/packs/`.
|
|
95
|
+
3. Register it in `src/providers/registry.ts` without changing generic fallback.
|
|
96
|
+
4. Add deterministic conformance fixtures and provider regression tests.
|
|
97
|
+
5. Do not import network, filesystem, environment, or state-store capabilities into the pack.
|
|
98
|
+
6. Update README provider coverage and the versioned capability manifest.
|
|
99
|
+
|
|
100
|
+
## Adding Prompt Hints
|
|
101
|
+
|
|
102
|
+
Most services should use generic fallback. To improve generic behavior:
|
|
103
|
+
|
|
104
|
+
1. Add or refine lightweight inference in `src/ai/genericInference.ts`.
|
|
105
|
+
2. Keep labels best-effort, such as `generic:shopify-like`.
|
|
106
|
+
3. Do not add provider-specific validation or error formats for generic services.
|
|
107
|
+
4. Add tests in `test/genericInference.test.ts`.
|
|
108
|
+
5. Update README coverage if the change affects documented behavior.
|
|
109
|
+
|
|
110
|
+
## Pull Request Checklist
|
|
111
|
+
|
|
112
|
+
- The change is scoped and explained clearly.
|
|
113
|
+
- `npm run typecheck` passes.
|
|
114
|
+
- `npm test` passes.
|
|
115
|
+
- `npm run build` passes.
|
|
116
|
+
- New behavior has tests when practical.
|
|
117
|
+
- No real external API calls were added by default.
|
|
118
|
+
- Secrets are not logged, cached, sent to LLM prompts, or exposed in dashboard payloads.
|
|
119
|
+
- README or examples are updated when user-facing behavior changes.
|
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.
|