{"_id":"@atlascrew/crucible-client","_rev":"2-717245b72ec2564bbdf57870a32c1592","name":"@atlascrew/crucible-client","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@atlascrew/crucible-client","version":"0.1.0","author":{"url":"https://atlascrew.dev","name":"Nicholas Crew Ferguson","email":"nick@atlascrew.dev"},"license":"MIT","_id":"@atlascrew/crucible-client@0.1.0","maintainers":[{"name":"nickcrew","email":"nickf4@icloud.com"}],"homepage":"https://crucible.atlascrew.dev","bugs":{"url":"https://github.com/atlas-crew/Crucible/issues"},"dist":{"shasum":"fbc28303429b7fa43cc5b6dde5b62d890417503a","tarball":"https://registry.npmjs.org/@atlascrew/crucible-client/-/crucible-client-0.1.0.tgz","fileCount":5,"integrity":"sha512-/t0un2ui+1VchcIdNBMPZBsdBYs6w30V+pSXp6aj7ky6DGomcBuc/ar7R0BVlsW8l2ohSOJHO/KybQHiXFS4zQ==","signatures":[{"sig":"MEYCIQD1oKQPWFa46v6I6ZIgdvl/NIfvTN3J7h2zYnRQhbg+cwIhAKUhYF/h0r4xrZZB0gFkbbR2s7+H5gXAl4HqSBNXAJWA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atlascrew%2fcrucible-client@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47021},"main":"./dist/index.js","type":"module","_from":"file:atlascrew-crucible-client-0.1.0.tgz","types":"./dist/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsup","test:watch":"vitest","type-check":"tsc --noEmit"},"_npmUser":{"name":"nickcrew","email":"nickf4@icloud.com"},"_resolved":"/tmp/0c740de97b2fbf6a877ae1d4cff03b73/atlascrew-crucible-client-0.1.0.tgz","_integrity":"sha512-/t0un2ui+1VchcIdNBMPZBsdBYs6w30V+pSXp6aj7ky6DGomcBuc/ar7R0BVlsW8l2ohSOJHO/KybQHiXFS4zQ==","repository":{"url":"git+https://github.com/atlas-crew/Crucible.git","type":"git","directory":"apps/client"},"_npmVersion":"10.9.7","description":"Typed API client for the Crucible REST and WebSocket APIs.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.3.6","vitest":"^3.2.4","typescript":"5.8.3","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/crucible-client_0.1.0_1775965870923_0.9172445909467601","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@atlascrew/crucible-client","version":"0.1.1","description":"Typed API client for the Crucible REST and WebSocket APIs.","type":"module","author":{"name":"Nicholas Crew Ferguson","email":"nick@atlascrew.dev","url":"https://atlascrew.dev"},"homepage":"https://crucible.atlascrew.dev","repository":{"type":"git","url":"git+https://github.com/atlas-crew/Crucible.git","directory":"apps/client"},"bugs":{"url":"https://github.com/atlas-crew/Crucible/issues"},"license":"MIT","engines":{"node":">=22"},"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public","provenance":true},"devDependencies":{"@types/node":"^20.14.0","tsup":"^8.3.6","typescript":"5.8.3","vitest":"^3.2.4"},"scripts":{"build":"tsup","type-check":"tsc --noEmit","test":"vitest run","test:watch":"vitest"},"_id":"@atlascrew/crucible-client@0.1.1","_integrity":"sha512-nhw1RUg9sJJo//NqhgT/D6L/C4t5XrGO/1Cdg5jxP/PPP7NGBZ4Cw4xT20bwv9853a/W8/PUhCPygWotdk06Fw==","_resolved":"/tmp/ae9f77a9a1169cd18b6ac386da102287/atlascrew-crucible-client-0.1.1.tgz","_from":"file:atlascrew-crucible-client-0.1.1.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-nhw1RUg9sJJo//NqhgT/D6L/C4t5XrGO/1Cdg5jxP/PPP7NGBZ4Cw4xT20bwv9853a/W8/PUhCPygWotdk06Fw==","shasum":"db6273af721af425143e2af12bf568f962d9d897","tarball":"https://registry.npmjs.org/@atlascrew/crucible-client/-/crucible-client-0.1.1.tgz","fileCount":6,"unpackedSize":57593,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@atlascrew%2fcrucible-client@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDW0ln2xYMqHdWjMH/4OFD+5DK6j/G1883qMuvL+kUAggIgRUJG37XA9g58VML/uLG2PlgY/3+SG2FWAN9gCSnXSMY="}]},"_npmUser":{"name":"nickcrew","email":"nickf4@icloud.com"},"directories":{},"maintainers":[{"name":"nickcrew","email":"nickf4@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crucible-client_0.1.1_1777411637284_0.9834512224886502"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T03:51:10.776Z","modified":"2026-04-28T21:27:17.728Z","0.1.0":"2026-04-12T03:51:11.121Z","0.1.1":"2026-04-28T21:27:17.432Z"},"bugs":{"url":"https://github.com/atlas-crew/Crucible/issues"},"author":{"name":"Nicholas Crew Ferguson","email":"nick@atlascrew.dev","url":"https://atlascrew.dev"},"license":"MIT","homepage":"https://crucible.atlascrew.dev","repository":{"type":"git","url":"git+https://github.com/atlas-crew/Crucible.git","directory":"apps/client"},"description":"Typed API client for the Crucible REST and WebSocket APIs.","maintainers":[{"name":"nickcrew","email":"nickf4@icloud.com"}],"readme":"# @atlascrew/crucible-client\n\nTyped TypeScript client for the [Crucible](https://crucible.atlascrew.dev) REST and WebSocket APIs.\n\n- Strongly-typed methods that mirror the REST resource layout (`client.simulations.start(...)`, `client.executions.list(...)`, `client.reports.get(...)`)\n- Native `fetch` and `WebSocket` (Node 22+ or modern browser) — zero runtime dependencies\n- Structured error handling via `CrucibleApiError`\n- Auto-reconnecting WebSocket helper with jittered backoff\n\n## Install\n\n```bash\nnpm install @atlascrew/crucible-client\n```\n\n## Usage\n\n```ts\nimport { CrucibleClient } from '@atlascrew/crucible-client';\n\nconst client = new CrucibleClient({ baseUrl: 'http://localhost:3000' });\n\nconst { executionId } = await client.assessments.start('owasp-api-1-broken-auth');\nconst execution = await client.executions.get(executionId);\nconsole.log(execution.status, execution.report?.score);\n```\n\n## Per-run target URL\n\nBy default, every scenario runs against the engine's configured target (`CRUCIBLE_TARGET_URL` server-side). You can override the target on a per-run basis by passing `targetUrl` to `simulations.start()` or `assessments.start()`. This is the typical way to reuse a single Crucible deployment across multiple environments — e.g. running the same scenario against staging today and prod tomorrow from the same CI job.\n\n```ts\nconst client = new CrucibleClient({ baseUrl: 'https://crucible.internal' });\n\n// Same scenario, two environments — one Crucible deployment.\nawait client.simulations.start('advanced-sqli-campaign', {\n  targetUrl: 'https://staging.example.com',\n});\n\nawait client.simulations.start('advanced-sqli-campaign', {\n  targetUrl: 'https://prod.example.com',\n});\n```\n\nNotes:\n\n- `targetUrl` must be an absolute `http`/`https` URL with no embedded credentials and no fragment. The server validates and returns `400` with a descriptive error on bad input.\n- Omit the field to use the engine default. The client deliberately does **not** forward an empty `targetUrl` key — if you don't pass it, the server falls back to its own default.\n- Restart inherits the originating execution's target. `client.executions.restart(id)` does not take a `targetUrl` argument; it replays against whatever target the original run used. Start a new execution if you need a different target.\n- The per-execution outbound SSRF allowlist is scoped to the override target, so two concurrent runs targeting different hosts cannot pivot off each other.\n\n## Documentation\n\nThe full user guide lives at <https://crucible.atlascrew.dev/user-guides/api-client>. The REST endpoints are documented at <https://crucible.atlascrew.dev/reference/rest-api>.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}