{"_id":"@agent-action-runner/testing","_rev":"3-4fe42a48db48d3759b253b1c7a1f5a49","name":"@agent-action-runner/testing","dist-tags":{"latest":"0.8.2"},"versions":{"0.8.0":{"name":"@agent-action-runner/testing","version":"0.8.0","keywords":["typescript","ai-agent","llm","workflow","agent-workflow","tool-calling","mcp","approval","audit","dry-run","human-in-the-loop","zod","testing"],"author":{"name":"Doompy"},"license":"Apache-2.0","_id":"@agent-action-runner/testing@0.8.0","maintainers":[{"name":"doompy17","email":"brillarrz@gmail.com"}],"homepage":"https://github.com/Doompy/agent-action-runner#readme","bugs":{"url":"https://github.com/Doompy/agent-action-runner/issues"},"dist":{"shasum":"3a48de091740383d274e61230104275daa8668a5","tarball":"https://registry.npmjs.org/@agent-action-runner/testing/-/testing-0.8.0.tgz","fileCount":6,"integrity":"sha512-DqQGGR7ObFJSIFc+Ctv4A6FWr1r2Ef/nzfEUCSFOW8VmhFYWF7K9SFYyzDt/LX/MnunTRRT6TAHwgXsnjrOQSw==","signatures":[{"sig":"MEUCIQDngdShH3Fmyl+wcif91vddV/LtYdEurlUaHLA2/RgMAgIgMltDrXlnhcJi2Jo6FE2dqvTj2btFYNErNYSDwHhsEeE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9429},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"14ef4cec8048f5d88007e346f50f5ede46b093ab","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","prepack":"npm run build","pretest":"npm run build --workspace @agent-action-runner/core --if-present","prebuild":"npm run build --workspace @agent-action-runner/core --if-present","typecheck":"tsc -p tsconfig.json --noEmit","pretypecheck":"npm run build --workspace @agent-action-runner/core --if-present"},"_npmUser":{"name":"doompy17","email":"brillarrz@gmail.com"},"repository":{"url":"git+https://github.com/Doompy/agent-action-runner.git","type":"git","directory":"packages/testing"},"_npmVersion":"11.14.0","description":"Framework-neutral testing utilities for Agent Action Runner.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","vitest":"^4.0.14","@agent-action-runner/core":"file:../core"},"peerDependencies":{"@agent-action-runner/core":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/testing_0.8.0_1778342275274_0.9419174556531549","host":"s3://npm-registry-packages-npm-production"}},"0.8.1":{"name":"@agent-action-runner/testing","version":"0.8.1","keywords":["typescript","ai-agent","llm","workflow","agent-workflow","tool-calling","mcp","approval","audit","dry-run","human-in-the-loop","zod","testing"],"author":{"name":"Doompy"},"license":"Apache-2.0","_id":"@agent-action-runner/testing@0.8.1","maintainers":[{"name":"doompy17","email":"brillarrz@gmail.com"}],"homepage":"https://github.com/Doompy/agent-action-runner#readme","bugs":{"url":"https://github.com/Doompy/agent-action-runner/issues"},"dist":{"shasum":"505b30cca3f16bb44b0682d7c7a7ce819319d4ec","tarball":"https://registry.npmjs.org/@agent-action-runner/testing/-/testing-0.8.1.tgz","fileCount":6,"integrity":"sha512-1Mbusr7vIEEmAOzlMXdL76py2GrcbA7VkdLJu5yWvICUqhWlhfaHgN1qylkolXGCB2398iRFQbpZqlaMYjIq3A==","signatures":[{"sig":"MEYCIQCtrHNxmwK0gA0bv7MKef7uidOHSDklG3Rwpi90eS3oYAIhAJI76SeFc38J9KSPdOz+eHwHpiaO8qrIUyF8yf5QKtCM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-action-runner%2ftesting@0.8.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":10780},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.18.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"778ad68e7a72b20643f9e80566041085c46b27c2","scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","prepack":"npm run build","pretest":"npm run build --workspace @agent-action-runner/core --if-present","prebuild":"npm run build --workspace @agent-action-runner/core --if-present","typecheck":"tsc -p tsconfig.json --noEmit","pretypecheck":"npm run build --workspace @agent-action-runner/core --if-present"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:72fb0824-f74a-4f74-8a4d-e6b59340387d"}},"repository":{"url":"git+https://github.com/Doompy/agent-action-runner.git","type":"git","directory":"packages/testing"},"_npmVersion":"11.11.0","description":"Framework-neutral testing utilities for Agent Action Runner.","directories":{},"sideEffects":false,"_nodeVersion":"24.14.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^4.1.13","vitest":"^4.0.14","@agent-action-runner/core":"^0.8.1"},"peerDependencies":{"@agent-action-runner/core":"^0.8.1"},"_npmOperationalInternal":{"tmp":"tmp/testing_0.8.1_1778345136598_0.7062240122644814","host":"s3://npm-registry-packages-npm-production"}},"0.8.2":{"name":"@agent-action-runner/testing","version":"0.8.2","description":"Framework-neutral testing utilities for Agent Action Runner.","license":"Apache-2.0","author":{"name":"Doompy"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/Doompy/agent-action-runner.git","directory":"packages/testing"},"homepage":"https://github.com/Doompy/agent-action-runner#readme","bugs":{"url":"https://github.com/Doompy/agent-action-runner/issues"},"keywords":["typescript","ai-agent","llm","workflow","agent-workflow","tool-calling","mcp","approval","audit","dry-run","human-in-the-loop","zod","testing"],"engines":{"node":">=18.18.0"},"publishConfig":{"access":"public"},"sideEffects":false,"scripts":{"prepack":"npm run build","prebuild":"npm run build --workspace @agent-action-runner/core --if-present","build":"tsc -p tsconfig.build.json","pretest":"npm run build --workspace @agent-action-runner/core --if-present","test":"vitest run","pretypecheck":"npm run build --workspace @agent-action-runner/core --if-present","typecheck":"tsc -p tsconfig.json --noEmit"},"peerDependencies":{"@agent-action-runner/core":"^0.8.2"},"devDependencies":{"@agent-action-runner/core":"^0.8.2","vitest":"^4.0.14","zod":"^4.1.13"},"gitHead":"37be6f225af7711a54c4d0ed8e315f8c82124d8f","_id":"@agent-action-runner/testing@0.8.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-cZmlHovTyb75EwDEsEddLfi6gMGPykgBYTFFPqJnOVFAXzc+RzJYSUb00GfrWl/EayOdZ6TaWjMXRc1ebIe7bA==","shasum":"8a33d5908e8c6e0214034cb4337cce2f02ee02de","tarball":"https://registry.npmjs.org/@agent-action-runner/testing/-/testing-0.8.2.tgz","fileCount":6,"unpackedSize":10780,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@agent-action-runner%2ftesting@0.8.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFYP/tpO1paopQtYBd0oO0Ha4loXBVPVRZ9rPQmHw5vMAiBI53DKXJK/Ua4GgGi3aApeLXtrDIZo+4VODkiKGx82Ig=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:72fb0824-f74a-4f74-8a4d-e6b59340387d"}},"directories":{},"maintainers":[{"name":"doompy17","email":"brillarrz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/testing_0.8.2_1778383475919_0.5477169999379221"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-09T15:57:55.153Z","modified":"2026-05-10T03:24:36.375Z","0.8.0":"2026-05-09T15:57:55.451Z","0.8.1":"2026-05-09T16:45:36.735Z","0.8.2":"2026-05-10T03:24:36.077Z"},"bugs":{"url":"https://github.com/Doompy/agent-action-runner/issues"},"author":{"name":"Doompy"},"license":"Apache-2.0","homepage":"https://github.com/Doompy/agent-action-runner#readme","keywords":["typescript","ai-agent","llm","workflow","agent-workflow","tool-calling","mcp","approval","audit","dry-run","human-in-the-loop","zod","testing"],"repository":{"type":"git","url":"git+https://github.com/Doompy/agent-action-runner.git","directory":"packages/testing"},"description":"Framework-neutral testing utilities for Agent Action Runner.","maintainers":[{"name":"doompy17","email":"brillarrz@gmail.com"}],"readme":"# @agent-action-runner/testing\n\nFramework-neutral test helpers for Agent Action Runner.\n\nUse this package to exercise registered actions, approval hooks, policy hooks, and audit redaction without coupling your tests to Jest, Vitest, or a web framework.\n\n```ts\nimport {\n  approveAll,\n  createRunnerHarness,\n  findAuditEvents,\n} from '@agent-action-runner/testing';\n\nconst harness = createRunnerHarness({\n  runnerOptions: {\n    approval: approveAll(),\n    auditDefaults: {\n      input: 'hash',\n      output: 'summary',\n      error: 'summary',\n    },\n  },\n  actions: [disableUserAction],\n});\n\nawait harness.executeAction({\n  userId: 'operator_1',\n  action: 'admin.disableUser',\n  input: { userId: 'user_1' },\n  allowedModes: ['mutate'],\n  approvalToken: 'test_token',\n});\n\nexpect(findAuditEvents(harness.getAuditEvents(), {\n  actionName: 'admin.disableUser',\n  status: 'succeeded',\n})).toHaveLength(1);\n```\n\nUse `auditEventsContainText(events, text)` when you need a simple leak check across captured audit events. It uses circular-safe serialization and represents `Error` values by `{ name, message }`, so helper assertions do not throw just because a full audit payload contains circular objects.\n\nThe package intentionally does not provide Jest/Vitest matchers yet. It exposes plain functions so it can work with any test runner.\n","readmeFilename":"README.md"}