{"_id":"@makerchecker/sdk","_rev":"4-233ea95e8455ea2e6e2ca0d9da3c4cf4","name":"@makerchecker/sdk","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@makerchecker/sdk","version":"1.0.0","author":{"name":"Mashini Investments Ltd.","email":"hello@makerchecker.ai"},"license":"Apache-2.0","_id":"@makerchecker/sdk@1.0.0","maintainers":[{"name":"makerchecker","email":"suleiman@mashinii.com"}],"homepage":"https://makerchecker.ai","bugs":{"url":"https://github.com/sammysltd/makerchecker/issues"},"dist":{"shasum":"9511e24818306523aaef10496fe7789a5cc7aeac","tarball":"https://registry.npmjs.org/@makerchecker/sdk/-/sdk-1.0.0.tgz","fileCount":6,"integrity":"sha512-KctMuwEngLkw/BOYsvrFDflNIrMdKOutilhMuvClRpbWrHfnhTwhDA+zFCge6Gm4qLPbfuE9qpRH9np/moS5tw==","signatures":[{"sig":"MEUCIE7Haa7oqQDprqU+Hq0lh96JVxdFe7eKI81iDuBOLBj/AiEAtYrMlzgA/UwqCScB9RAB+SgpGd095n5NN21Kix4Kk2M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@makerchecker%2fsdk@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":35763},"type":"module","_from":"file:makerchecker-sdk-1.0.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lint":"eslint src","test":"vitest run --coverage","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"makerchecker","email":"suleiman@mashinii.com"},"_resolved":"/tmp/d72110e80d8244ed13d359ffa8352045/makerchecker-sdk-1.0.0.tgz","_integrity":"sha512-KctMuwEngLkw/BOYsvrFDflNIrMdKOutilhMuvClRpbWrHfnhTwhDA+zFCge6Gm4qLPbfuE9qpRH9np/moS5tw==","repository":{"url":"git+https://github.com/sammysltd/makerchecker.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.8","description":"Typed TypeScript client for the MakerChecker API, with a governedTool wrapper that routes agent tool calls through deny-by-default authorization and a hash-chained audit log.","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.4","typescript":"^5.7.3","@types/node":"^22.10.7","@vitest/coverage-v8":"^3.0.4"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1781768038159_0.3541280909533655","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@makerchecker/sdk","version":"1.0.4","author":{"name":"Mashini Investments Ltd.","email":"hello@makerchecker.ai"},"license":"Apache-2.0","_id":"@makerchecker/sdk@1.0.4","maintainers":[{"name":"makerchecker","email":"suleiman@mashinii.com"}],"homepage":"https://makerchecker.ai","bugs":{"url":"https://github.com/sammysltd/makerchecker/issues"},"dist":{"shasum":"18bc9310dc1258b3084e171fd816f54573fe195b","tarball":"https://registry.npmjs.org/@makerchecker/sdk/-/sdk-1.0.4.tgz","fileCount":6,"integrity":"sha512-xsQY2l4an/4roFti2Lvddc+CEBxkCGS+P3kYZACz6Kykbe+k0lAi/z3+/ZY8r3U712b8RjKpW9d4O89GrwZPAg==","signatures":[{"sig":"MEUCIQCT+OUETtTeDUw3O+g2Y+TFTPs8R8NQ+10qjoOg6M/OxwIgVNqJrYoCcTSthb7FgaeKWCzq4gnZJNaGn0QhhvV6AXk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@makerchecker%2fsdk@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36646},"type":"module","_from":"file:makerchecker-sdk-1.0.4.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lint":"eslint src","test":"vitest run --coverage","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"makerchecker","email":"suleiman@mashinii.com"},"_resolved":"/tmp/a0d0a40810c712ac6e52aceb49c757db/makerchecker-sdk-1.0.4.tgz","_integrity":"sha512-xsQY2l4an/4roFti2Lvddc+CEBxkCGS+P3kYZACz6Kykbe+k0lAi/z3+/ZY8r3U712b8RjKpW9d4O89GrwZPAg==","repository":{"url":"git+https://github.com/sammysltd/makerchecker.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.8","description":"Typed TypeScript client for the MakerChecker API, with a governedTool wrapper that routes agent tool calls through deny-by-default authorization and a hash-chained audit log.","directories":{},"_nodeVersion":"22.22.3","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.4","typescript":"^5.7.3","@types/node":"^22.10.7","@vitest/coverage-v8":"^3.0.4"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.4_1781787025341_0.6633141031452396","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@makerchecker/sdk","version":"1.1.4","author":{"name":"Mashini Investments Ltd.","email":"hello@makerchecker.ai"},"license":"Apache-2.0","_id":"@makerchecker/sdk@1.1.4","maintainers":[{"name":"makerchecker","email":"suleiman@mashinii.com"}],"homepage":"https://makerchecker.ai","bugs":{"url":"https://github.com/sammysltd/makerchecker/issues"},"dist":{"shasum":"ba65a7bbc3aa290302afa8435fe61c3bb7b43c81","tarball":"https://registry.npmjs.org/@makerchecker/sdk/-/sdk-1.1.4.tgz","fileCount":6,"integrity":"sha512-CZcTA3dPj7bV408roE7v97/buSiAhaA2xuCWHIwHuGnAJa9rCOJ4fPeprQQV2y3klpq/rhonBsM2jPEFZnOcgA==","signatures":[{"sig":"MEUCIDBmWAlzRiGscHY8HF178f0jIHnhRGuW08CU6QOAiuUWAiEAwt+UdvlSdFg1BC4v4Uz0LklyHQaTqMY1+0Ggp5viPik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@makerchecker%2fsdk@1.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36646},"type":"module","_from":"file:makerchecker-sdk-1.1.4.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"lint":"eslint src","test":"vitest run --coverage","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"makerchecker","email":"suleiman@mashinii.com"},"_resolved":"/tmp/1b9f3f1747109d8bc2125bb1b2ac6d29/makerchecker-sdk-1.1.4.tgz","_integrity":"sha512-CZcTA3dPj7bV408roE7v97/buSiAhaA2xuCWHIwHuGnAJa9rCOJ4fPeprQQV2y3klpq/rhonBsM2jPEFZnOcgA==","repository":{"url":"git+https://github.com/sammysltd/makerchecker.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.8","description":"Typed TypeScript client for the MakerChecker API, with a governedTool wrapper that routes agent tool calls through deny-by-default authorization and a hash-chained audit log.","directories":{},"_nodeVersion":"22.23.1","_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.4","typescript":"^5.7.3","@types/node":"^22.20.0","@vitest/coverage-v8":"^3.0.4"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.4_1783179256006_0.6039732055534186","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@makerchecker/sdk","version":"1.2.0","description":"Typed TypeScript client for the MakerChecker API, with a governedTool wrapper that routes agent tool calls through deny-by-default authorization and a hash-chained audit log.","license":"Apache-2.0","author":{"name":"Mashini Investments Ltd.","email":"hello@makerchecker.ai"},"homepage":"https://makerchecker.ai","repository":{"type":"git","url":"git+https://github.com/makerchecker/MakerChecker.git","directory":"packages/sdk"},"bugs":{"url":"https://github.com/makerchecker/MakerChecker/issues"},"type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"devDependencies":{"@types/node":"^22.20.0","@vitest/coverage-v8":"^3.0.4","typescript":"^5.7.3","vitest":"^3.0.4"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","lint":"eslint src","test":"vitest run --coverage"},"_id":"@makerchecker/sdk@1.2.0","_integrity":"sha512-2yS69OCYG0tRpsCYRTet6nEQOX6PX2dwROWbn9sR38rD4q0oNBtJh2+aw51l5FamxDWSOCXVk0bfh456us+bUw==","_resolved":"/tmp/79997a0767fae07d86f5e6f4f723977d/makerchecker-sdk-1.2.0.tgz","_from":"file:makerchecker-sdk-1.2.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-2yS69OCYG0tRpsCYRTet6nEQOX6PX2dwROWbn9sR38rD4q0oNBtJh2+aw51l5FamxDWSOCXVk0bfh456us+bUw==","shasum":"38bd5cc13554cf36da273792effc872d3bb889db","tarball":"https://registry.npmjs.org/@makerchecker/sdk/-/sdk-1.2.0.tgz","fileCount":6,"unpackedSize":37000,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@makerchecker%2fsdk@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDRZ6kduGc8v0m+yLiESK950nKWY+MGrwsMdUqErjH7xAIhAJwV9WoYBUOekSiMnRsWoY1ADejhQDCIkpnCI0aNJSAe"}]},"_npmUser":{"name":"makerchecker","email":"suleiman@mashinii.com"},"directories":{},"maintainers":[{"name":"makerchecker","email":"suleiman@mashinii.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.2.0_1783346126626_0.2778880222035178"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-18T07:33:58.006Z","modified":"2026-07-06T13:55:27.042Z","1.0.0":"2026-06-18T07:33:58.286Z","1.0.4":"2026-06-18T12:50:25.468Z","1.1.4":"2026-07-04T15:34:16.163Z","1.2.0":"2026-07-06T13:55:26.764Z"},"bugs":{"url":"https://github.com/makerchecker/MakerChecker/issues"},"author":{"name":"Mashini Investments Ltd.","email":"hello@makerchecker.ai"},"license":"Apache-2.0","homepage":"https://makerchecker.ai","repository":{"type":"git","url":"git+https://github.com/makerchecker/MakerChecker.git","directory":"packages/sdk"},"description":"Typed TypeScript client for the MakerChecker API, with a governedTool wrapper that routes agent tool calls through deny-by-default authorization and a hash-chained audit log.","maintainers":[{"name":"makerchecker","email":"suleiman@mashinii.com"}],"readme":"<div align=\"center\">\n\n# 🧰 @makerchecker/sdk\n\n### Wrap any tool with `governedTool` so every agent call is authorized and recorded.\n\n[![npm](https://img.shields.io/npm/v/@makerchecker/sdk?color=cb3837&logo=npm)](https://www.npmjs.com/package/@makerchecker/sdk)\n[![License](https://img.shields.io/badge/license-Apache--2.0-informational)](../../LICENSING.md)\n\n</div>\n\nTyped TypeScript client for the MakerChecker API, wrapping the HTTP API of [`packages/server`](../server). Exports `governedTool`, which routes a tool function through a proxy session so each call is authorized and recorded. ES module on the host `fetch`; runs on Node 22+ and in browsers.\n\n## Install\n\n```bash\npnpm add @makerchecker/sdk\n```\n\n## Use\n\n```ts\nimport { createClient, governedTool, GovernanceDeniedError } from \"@makerchecker/sdk\";\n\nconst client = createClient({ baseUrl: \"http://localhost:3000\", apiKey: \"mk_...\" });\nconst { session } = await client.proxy.openSession({ label: \"my-agent-run\" });\n\nconst ingest = governedTool(client, session.id, \"recon-preparer\", \"csv-ingest@1\", readCsvFiles);\n\ntry {\n  await ingest({ source: \"bank_statement.csv\" });\n} catch (err) {\n  if (err instanceof GovernanceDeniedError) console.log(`denied (${err.code}): ${err.reason}`);\n  else throw err;\n}\n\nawait client.proxy.closeSession(session.id);\n```\n\n## Resource methods\n\n`createClient({ baseUrl, apiKey?, fetch? })` returns a client. Each method runs one HTTP request and returns a typed `Promise`. A non-2xx response throws `ApiError` with `status` and `body`.\n\n```ts\nawait client.health();                              // { status, schemaVersion }\nawait client.flows.trigger(name, input?);           // { runId }\nawait client.runs.list();                           // { runs: RunSummary[] }\nawait client.runs.get(id);                          // RunDetail\nawait client.approvals.list();                      // { approvals: PendingApproval[] }\nawait client.approvals.decide(id, \"approved\", reason?);\nawait client.agents.list();\nawait client.agents.create({ name, roleName });     // also accepts roleId, modelConfig\nawait client.agents.get(id);                        // AgentDetail\nawait client.agents.setStatus(id, \"suspended\");\nawait client.roles.list();\nawait client.roles.create({ name, limits });        // limits: per-skill role limit map\nawait client.skills.list();\nawait client.skills.publish({ name, version, description, inputSchema, outputSchema, implementation, riskTier });\nawait client.skills.deprecate(id);\nawait client.grants.create({ roleId, skillId });\nawait client.grants.revoke(id);\nawait client.audit.verify();                        // walks the hash chain, reports if intact\nawait client.proxy.openSession({ label, externalRef? });\nawait client.proxy.check(sessionId, { agentName, skillRef, input? });\nawait client.proxy.record(sessionId, { checkId, output?, error? });\nawait client.proxy.closeSession(sessionId);\nawait client.proxy.getSession(sessionId);           // ProxySessionDetail\n```\n\n## governedTool\n\n`governedTool(client, sessionId, agentName, skillRef, fn): (input) => Promise<output>` returns a function with the same input shape as `fn`. Each call runs `proxy.check`, throws `GovernanceDeniedError` (with `code` and `reason`) on denial, executes `fn`, then records the output. If `fn` throws, the error is recorded and rethrown.\n\nFramework adapters: [`packages/connector-langchain`](../connector-langchain), [`packages/connector-claude-agent`](../connector-claude-agent). Worked examples: [`examples/middleware/README.md`](../../examples/middleware/README.md).\n\n## License\n\nApache-2.0. See [LICENSE](./LICENSE).\n","readmeFilename":"README.md"}