{"_id":"@aethon/trust-proxy","name":"@aethon/trust-proxy","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aethon/trust-proxy","version":"1.0.0","description":"Aethon Trust Runtime Proxy — GIR enforcement sidecar for AI-generated applications","author":{"name":"Jupitice Justice Technologies Pvt. Ltd."},"repository":{"type":"git","url":"git+https://gitlab.com/jupitice/arnor.git","directory":"client/src/projects/aethon/packages/trust-proxy"},"homepage":"https://aethon.ai","publishConfig":{"access":"public"},"bin":{"aethon-proxy":"bin/aethon-proxy.js"},"main":"./lib/index.js","dependencies":{"http-proxy":"^1.18.1","commander":"^12.0.0","chalk":"^4.1.2","nanoid":"^3.3.7","inquirer":"^8.2.6"},"scripts":{"start":"node bin/aethon-proxy.js start","test":"echo \"No tests yet\""},"keywords":["aethon","trust","proxy","gir","enforcement","sidecar"],"license":"UNLICENSED","engines":{"node":">=20.0.0"},"gitHead":"23e7a5608562382999bd3ac9dc9689204e27b339","_id":"@aethon/trust-proxy@1.0.0","bugs":{"url":"https://gitlab.com/jupitice/arnor/issues"},"_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-FzGQmTBOdizULFI3y1kDQAZ4PbCXxkqIMHInTA1rOU7I/s9W1oW+ozkIOrJ/SPG2vupBMqlC8m+pJEFKzFqTKQ==","shasum":"6a01fdb121f722d51be549ec629f05cab7b4420a","tarball":"https://registry.npmjs.org/@aethon/trust-proxy/-/trust-proxy-1.0.0.tgz","fileCount":12,"unpackedSize":55451,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICPpwl+J0UHmzLOVL3Y/lFKrzZutLAHHHZq3dmdXPUQyAiBCmRKIykOwso7DDwsJ0K8y0/yI+q4CclVQwS6sOjeWXA=="}]},"_npmUser":{"name":"lavjupitice","email":"lavkush@jupitice.com"},"directories":{},"maintainers":[{"name":"achinjupitice","email":"achin@jupitice.com"},{"name":"saurabhjupitice","email":"saurabh@jupitice.com"},{"name":"lavjupitice","email":"lavkush@jupitice.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trust-proxy_1.0.0_1783924641548_0.382982962398944"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-13T06:37:21.323Z","1.0.0":"2026-07-13T06:37:21.680Z","modified":"2026-07-13T06:37:22.085Z"},"maintainers":[{"name":"achinjupitice","email":"achin@jupitice.com"},{"name":"saurabhjupitice","email":"saurabh@jupitice.com"},{"name":"lavjupitice","email":"lavkush@jupitice.com"}],"description":"Aethon Trust Runtime Proxy — GIR enforcement sidecar for AI-generated applications","homepage":"https://aethon.ai","keywords":["aethon","trust","proxy","gir","enforcement","sidecar"],"repository":{"type":"git","url":"git+https://gitlab.com/jupitice/arnor.git","directory":"client/src/projects/aethon/packages/trust-proxy"},"author":{"name":"Jupitice Justice Technologies Pvt. Ltd."},"bugs":{"url":"https://gitlab.com/jupitice/arnor/issues"},"license":"UNLICENSED","readme":"# @aethon/trust-proxy\n\n**GIR enforcement sidecar for AI-generated applications.**\n\nAethon Trust Proxy is a lightweight reverse-proxy sidecar that sits between your clients and your AI-generated application. Every request passes through the proxy, which enforces your GIR (Governance, Invariant, and Runtime) contract in real time — blocking unauthorized state transitions before they reach your app.\n\n---\n\n## Architecture\n\n```\n                         ┌──────────────────────────────────┐\n                         │       Aethon Trust Cloud         │\n                         │   trust.aethon.ai                │\n                         │                                  │\n                         │  ┌────────────┐ ┌─────────────┐  │\n                         │  │  Contract   │ │  Validate   │  │\n                         │  │  Endpoint   │ │  Endpoint   │  │\n                         │  └─────┬──────┘ └──────┬──────┘  │\n                         └────────┼───────────────┼─────────┘\n                                  │               │\n                            fetch │          validate\n                                  │               │\n┌─────────┐    ┌──────────────────┴───────────────┴──────────────────┐    ┌──────────────┐\n│         │    │             Aethon Trust Proxy (Sidecar)            │    │              │\n│  Client ├───►   :4819                                             ├───►  Your App     │\n│         │    │                                                    │    │  :8000       │\n│         ◄───┤  1. Extract action context from headers             ◄────┤              │\n│         │    │  2. Local enforcement (fast first-pass)             │    │              │\n└─────────┘    │  3. Cloud validation                               │    └──────────────┘\n               │  4. Forward or block                               │\n               │  5. Inject IR trace headers                        │\n               └────────────────────────────────────────────────────┘\n```\n\n---\n\n## Quick Start\n\n### 1. Install\n\n```bash\nnpm install -g @aethon/trust-proxy\n```\n\n### 2. Initialize\n\n```bash\naethon-proxy init\n```\n\nFollow the interactive wizard to generate your `aethon-proxy.config.json`.\n\n### 3. Configure\n\nEdit `aethon-proxy.config.json` as needed, or set environment variables:\n\n```bash\nexport AETHON_WORKSPACE=\"my-workspace\"\nexport AETHON_API_TOKEN=\"Bearer eyJhbGci...\"\nexport AETHON_UPSTREAM=\"http://localhost:8000\"\n```\n\n### 4. Start\n\n```bash\naethon-proxy start\n```\n\nThe proxy is now listening on port `4819` (default) and enforcing your GIR contract.\n\n---\n\n## CLI Commands\n\n| Command              | Description                                      |\n|----------------------|--------------------------------------------------|\n| `aethon-proxy init`  | Interactive setup wizard                         |\n| `aethon-proxy start` | Start the sidecar proxy server                   |\n| `aethon-proxy status`| Check proxy status and connectivity              |\n| `aethon-proxy logs`  | View enforcement audit logs                      |\n| `aethon-proxy health`| Health check against Aethon Trust Cloud          |\n| `aethon-proxy -v`    | Show SDK version                                 |\n\n---\n\n## Configuration\n\n### Config File\n\nThe proxy reads `aethon-proxy.config.json` from the current working directory:\n\n```json\n{\n  \"workspace\": \"my-workspace-slug\",\n  \"apiToken\": \"Bearer eyJhbGciOiJIUzI1NiIs...\",\n  \"trustCloudUrl\": \"https://trust.aethon.ai\",\n  \"proxy\": {\n    \"port\": 4819,\n    \"upstream\": \"http://localhost:8000\"\n  },\n  \"enforcement\": {\n    \"mode\": \"strict\",\n    \"fallbackOnCloudFailure\": \"block\"\n  },\n  \"logging\": {\n    \"level\": \"info\"\n  }\n}\n```\n\n### Environment Variable Overrides\n\n| Variable                   | Description                     | Default                    |\n|----------------------------|---------------------------------|----------------------------|\n| `AETHON_WORKSPACE`         | Workspace slug                  | —                          |\n| `AETHON_API_TOKEN`         | API bearer token                | —                          |\n| `AETHON_UPSTREAM`          | Upstream application URL        | —                          |\n| `AETHON_PROXY_PORT`        | Proxy listen port               | `4819`                     |\n| `AETHON_TRUST_CLOUD_URL`   | Trust Cloud base URL            | `https://trust.aethon.ai`  |\n| `AETHON_ENFORCEMENT_MODE`  | `strict` or `permissive`        | `strict`                   |\n| `AETHON_ENVIRONMENT`       | Environment label               | `production`               |\n\n### Enforcement Modes\n\n- **`strict`** — Unauthorized actions are blocked with `403`.\n- **`permissive`** — Unauthorized actions are logged but allowed through.\n\n### Fallback Policy\n\nWhen the Trust Cloud is unreachable:\n- **`block`** (default) — Requests with enforcement headers are blocked.\n- **`allow`** — Requests are forwarded with a warning logged.\n\n---\n\n## Request Headers\n\nYour application (or API gateway) should include these headers to trigger enforcement:\n\n| Header              | Description                              | Example           |\n|---------------------|------------------------------------------|-------------------|\n| `X-Aethon-Action`   | The action being attempted               | `deploy`          |\n| `X-Aethon-Role`     | The role of the actor                    | `developer`       |\n| `X-Aethon-State`    | The current state in the state machine   | `review_pending`  |\n\nRequests without these headers pass through the proxy unmodified.\n\n---\n\n## Response Headers\n\nThe proxy injects these headers into forwarded responses:\n\n| Header                        | Description                                |\n|-------------------------------|--------------------------------------------|\n| `X-Aethon-Proxy`              | `true` — confirms the proxy handled it     |\n| `X-Aethon-Instance-Id`        | Sidecar instance identifier                |\n| `X-Aethon-Contract-Version`   | Active GIR contract version                |\n| `X-Aethon-Certificate-Id`     | Enforcement certificate from Trust Cloud   |\n\n---\n\n## Local Files\n\nThe proxy stores state in `~/.aethon/`:\n\n| File                                      | Purpose                           |\n|-------------------------------------------|-----------------------------------|\n| `~/.aethon/instance.json`                 | Sidecar identity and registration |\n| `~/.aethon/contracts/<workspace>.json`    | Cached GIR contract               |\n| `~/.aethon/audit.log`                     | Enforcement audit log             |\n\n---\n\n## Requirements\n\n- **Node.js** ≥ 20.0.0\n- Network access to your upstream application\n- (Recommended) Network access to `trust.aethon.ai`\n\n---\n\n## License\n\nUNLICENSED — Proprietary. All rights reserved.\n","readmeFilename":"README.md","_rev":"1-3a5b47e80a52d3bf5d04482f21feb323"}