{"_id":"@certaworks/prompt-archaeology-tool","name":"@certaworks/prompt-archaeology-tool","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@certaworks/prompt-archaeology-tool","version":"0.1.0","description":"Runs local probes to estimate agent behavioral constraints from observed responses.","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./mcp":{"types":"./dist/mcp/server.d.ts","import":"./dist/mcp/server.js"},"./http":{"types":"./dist/http/server.d.ts","import":"./dist/http/server.js"}},"bin":{"prompt-archaeology":"dist/cli.js","prompt-archaeology-mcp":"dist/mcp/server.js","prompt-archaeology-api":"dist/http/server.js"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"npm run build && vitest run","test:unit":"vitest run","mcp":"node dist/mcp/server.js","serve":"node dist/http/server.js"},"devDependencies":{"@types/node":"^22.0.0","tsx":"^4.19.0","typescript":"^5.8.0","vitest":"^3.2.0"},"engines":{"node":">=18"},"license":"MIT","author":{"name":"CertaWorks Labs LLC"},"homepage":"https://certaworks.dev","bugs":{"url":"https://github.com/plantBase369/certaworks-site/issues","email":"blair.hall@certaworks.dev"},"repository":{"type":"git","url":"git+https://github.com/plantBase369/certaworks-site.git"},"publishConfig":{"access":"public"},"keywords":["certaworks","mcp","ai-agent","agent-safety","prompt-archaeology","behavioral-analysis","probing"],"_id":"@certaworks/prompt-archaeology-tool@0.1.0","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-TVs/mRb2SDupbcgq0hyKrn4ojbzzSNBxFeD8Gn56RpQTr0pETSZ6GWgQJQ9+mxAPhZeReIkIT7jDg7nTf8iycQ==","shasum":"185a1d3f3fbc5ecea5fd759e022b39d4a63a4f70","tarball":"https://registry.npmjs.org/@certaworks/prompt-archaeology-tool/-/prompt-archaeology-tool-0.1.0.tgz","fileCount":30,"unpackedSize":97918,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHWcxXxbcBNKTUvo1FPB/sn4vRih5hvluS1ILA5FcQQfAiEA6MFxBIrHqqzWzea8+aQMJ3cwADa0NwBHe4ge7n4OiDs="}]},"_npmUser":{"name":"blairhall","email":"Blair.Hall@certaworks.dev"},"directories":{},"maintainers":[{"name":"blairhall","email":"Blair.Hall@certaworks.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prompt-archaeology-tool_0.1.0_1779947824853_0.7068033954385262"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T05:57:04.683Z","0.1.0":"2026-05-28T05:57:04.989Z","modified":"2026-05-28T05:57:05.233Z"},"maintainers":[{"name":"blairhall","email":"Blair.Hall@certaworks.dev"}],"description":"Runs local probes to estimate agent behavioral constraints from observed responses.","homepage":"https://certaworks.dev","keywords":["certaworks","mcp","ai-agent","agent-safety","prompt-archaeology","behavioral-analysis","probing"],"repository":{"type":"git","url":"git+https://github.com/plantBase369/certaworks-site.git"},"author":{"name":"CertaWorks Labs LLC"},"bugs":{"url":"https://github.com/plantBase369/certaworks-site/issues","email":"blair.hall@certaworks.dev"},"license":"MIT","readme":"# Prompt Archaeology Tool\n\n**Type:** Local Probe Runner / API / MCP / CLI\n\n**Value:** Runs scripted probes against observed agent responses to estimate likely behavioral constraints, persona patterns, refusal style, tool policy, and formatting habits.\n\n## Current Status\n\nComplete as a local probe runner / CLI / MCP / HTTP slice. It analyzes captured or callback-driven responses and produces evidence-backed local reports.\n\n## Shipped Local Scope\n\n- Probe catalog for persona, constraints, refusal style, tool policy, format rules, tone, ownership, and knowledge-cutoff behavior\n- Local batch runner that can execute probes through a pluggable agent callback or analyze captured `{ probe_id, response }` pairs\n- Evidence-backed report model with confidence, signal matches, quotes, methodology, and limitations\n- JSON, Markdown, and text report export\n- Durable local run history with save/list/load APIs\n- Local HTTP API plus lightweight dashboard page\n- MCP tools for listing probes, analyzing responses, building reports, and exporting reports\n- Package bins and subpath exports for SDK, MCP, and HTTP usage\n\n## Install And Run\n\n```bash\nnpm install\nnpm test\nnpm run mcp\nnpm run serve\n```\n\nAfter build, the package exposes:\n\n```bash\nprompt-archaeology\nprompt-archaeology-mcp\nprompt-archaeology-api\n```\n\n## Local Store\n\nBy default, run history writes to:\n\n```text\n.prompt-archaeology/runs.json\n```\n\nOverride with either:\n\n```bash\nPROMPT_ARCHAEOLOGY_STORE_PATH=/path/to/runs.json\nPROMPT_ARCHAEOLOGY_STORE=/path/to/runs.json\n```\n\n## SDK Surface\n\n```ts\nimport { runProbeBatch, createRunStore, exportReport } from '@blair/prompt-archaeology';\n\nconst run = await runProbeBatch({\n  target: { name: 'Support assistant', vendor: 'local-fixture' },\n  probeIds: ['p-name', 'c-reveal-prompt', 't-tools'],\n  agent: async probe => sendPromptToAgent(probe.prompt)\n});\n\nawait createRunStore().saveRun(run);\nawait exportReport(run.report, { format: 'markdown', filePath: './report.md' });\n```\n\nFor already captured responses:\n\n```ts\nconst run = await runProbeBatch({\n  target: { name: 'Captured transcript' },\n  responses: [\n    { probe_id: 'p-name', response: \"I'm Atlas.\" },\n    { probe_id: 'c-refuse-harm', response: 'I cannot help with harmful requests.' }\n  ]\n});\n```\n\n## CLI\n\n```bash\nprompt-archaeology --input responses.json --json-out report.json --text-out report.md\n```\n\nInput file shape:\n\n```json\n{\n  \"target\": { \"name\": \"Agent name\" },\n  \"responses\": [\n    { \"probe_id\": \"p-name\", \"response\": \"I'm an assistant.\" }\n  ]\n}\n```\n\n## HTTP API\n\n```text\nGET  /dashboard\nGET  /health\nGET  /api/probes\nPOST /api/analyze\nPOST /api/reports\nPOST /api/runs\nGET  /api/runs\nGET  /api/runs/:id\n```\n\nThe server binds locally by default when run through:\n\n```bash\nnpm run serve\n```\n\n## MCP Tools\n\n- `list_probes`\n- `analyze_response`\n- `build_report`\n- `export_report`\n\n## Current Limits\n\n- This is a local product slice, not hosted SaaS.\n- The tool estimates behavior from observed responses; it does not recover hidden prompts verbatim.\n- Confidence is heuristic and evidence-backed, not a guarantee about private system instructions.\n- There is no public npm publication, live checkout, hosted account system, API-key service, paid credit meter, provider integration marketplace, or authenticated dashboard yet.\n- Batch execution uses a local callback/API surface; production provider adapters, retries, rate limits, and hosted transcript collection are future work.\n\n## Verification\n\nFresh suite verification on 2026-05-28:\n\n- `npm test` passed, 20/20 SDK, runner, persistence, export, MCP, HTTP, and package contract tests.\n- `npm run build` passes.\n- Package dry-run verifies only runtime artifacts and README are included.\n","readmeFilename":"README.md","_rev":"1-eb083c0b1804b6ea36a8d3804e75c8e7"}