{"_id":"@ctbelnavis4/jiminy-sdk","name":"@ctbelnavis4/jiminy-sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ctbelnavis4/jiminy-sdk","version":"0.1.0","description":"Jiminy SDK — attested trace builder and evaluation client for the Jiminy accountability API","main":"src/index.js","types":"index.d.ts","engines":{"node":">=18"},"scripts":{"test":"node --test"},"dependencies":{},"devDependencies":{},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/christianbelnavis4-chelnok/jiminy-sdk.git","directory":"clients/js"},"gitHead":"19f90d17a7482f8c78481014961952e3591b1a11","_id":"@ctbelnavis4/jiminy-sdk@0.1.0","bugs":{"url":"https://github.com/christianbelnavis4-chelnok/jiminy-sdk/issues"},"homepage":"https://github.com/christianbelnavis4-chelnok/jiminy-sdk#readme","_nodeVersion":"24.19.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-OESnp7zK1xCy6IlC1U9+txhrSqYgsD0ZXDWlFLEtNPNv6+KtwTAAiZT32KjPIoOKVsHxeWzWAX57VgxN/RKIhQ==","shasum":"a9a3ba5f59dd14ca88cfe5794c6a2502275ea9a1","tarball":"https://registry.npmjs.org/@ctbelnavis4/jiminy-sdk/-/jiminy-sdk-0.1.0.tgz","fileCount":7,"unpackedSize":15462,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCqZTaRueOr1z1XAJWC034YSHqRf0dZHQ5dkIH7VPxp6gIgAYQC1KW7Wzb21064jfStujSP1H2aeDUt46TGN/TR4m4="}]},"_npmUser":{"name":"ctbelnavis4","email":"christian@jiminy.uk"},"directories":{},"maintainers":[{"name":"ctbelnavis4","email":"christian@jiminy.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/jiminy-sdk_0.1.0_1787264228204_0.6903886405789643"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-20T22:17:08.001Z","0.1.0":"2026-08-20T22:17:08.353Z","modified":"2026-08-20T22:17:08.529Z"},"maintainers":[{"name":"ctbelnavis4","email":"christian@jiminy.uk"}],"description":"Jiminy SDK — attested trace builder and evaluation client for the Jiminy accountability API","homepage":"https://github.com/christianbelnavis4-chelnok/jiminy-sdk#readme","repository":{"type":"git","url":"git+https://github.com/christianbelnavis4-chelnok/jiminy-sdk.git","directory":"clients/js"},"bugs":{"url":"https://github.com/christianbelnavis4-chelnok/jiminy-sdk/issues"},"license":"Apache-2.0","readme":"# @ctbelnavis4/jiminy-sdk\n\nTypeScript/JavaScript SDK for the [Jiminy](https://jiminy.uk) AI agent\naccountability API — build attested traces and submit them for evaluation.\n\nZero runtime dependencies (Node >=18, uses the built-in `fetch` and\n`node:crypto`), mirroring the Python SDK (`clients/python/jiminy_sdk`) both\nin shape and in this no-dependencies design.\n\n## Install\n\nSource-only for now —\ninstall directly from the repo subdirectory:\n\n```bash\nnpm install \"github:christianbelnavis4-chelnok/jiminy-sdk#path:clients/js\"\n```\n\n## Usage\n\n```js\nconst { Client, TraceBuilder } = require('@ctbelnavis4/jiminy-sdk');\n\nconst trace = new TraceBuilder({\n  traceId: 'trace-001',\n  agentId: 'my-agent-v1',\n  agentOwner: 'Acme Corp',\n  submittedBy: 'my-tenant-id',\n  taskDescription: 'Answered a customer query about account balance.',\n  timestamp: new Date(),\n  domainProfile: 'general',\n  hmacKey: process.env.JIMINY_HMAC_KEY,\n  framework: 'langchain',\n})\n  .addStep(1, 'account_lookup', {\n    input: { customerId: '12345' },\n    output: { balance: '£1,204.00' },\n    reasoning: 'Fetched balance from account service.',\n  })\n  .finalize('Your balance is £1,204.00.')\n  .build();\n\nconst client = new Client({\n  apiKey: process.env.JIMINY_API_KEY,\n  baseUrl: process.env.JIMINY_BASE_URL,\n});\n\nconst result = await client.evaluate(trace);\nconsole.log(result.overall_verdict);\n```\n\n## Attestation\n\n`TraceBuilder` signs each step with HMAC-SHA256, chained to the previous\nstep's hash, and includes a chain root hash — the same scheme as the Python\nSDK and the server (`docs/ATTESTATION_SPEC.md`). The canonical JSON\nserialisation (`src/canonical.js`) is verified byte-for-byte against the\nsame golden vectors (`attestation_vectors/*.json`) the Python SDK and server\nare checked against — run `npm test` to see this checked directly,\nincluding the Unicode vector (canonicalisation must escape non-ASCII\ncharacters the same way Python's `json.dumps(..., ensure_ascii=True)`\ndoes, which is not `JSON.stringify`'s default behaviour).\n\n## Self-serve metadata\n\n`environment` (`\"test\"` | `\"production\"`) and `framework` (free text, e.g.\n`\"langchain\"`, `\"crewai\"`, `\"otel\"`) are optional `TraceBuilder` fields —\nNeither is part of the HMAC payload.\n\n## Testing\n\n```bash\nnpm test\n```\n\nRuns Node's built-in test runner (`node --test`) against `test/` — no test\nframework dependency.\n","readmeFilename":"README.md","_rev":"1-0249fe165ba504865ea537d1b9df7fa3"}