{"_id":"@agent-wasm/sdk","name":"@agent-wasm/sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agent-wasm/sdk","version":"0.1.0","description":"Workspace lifecycle and agent harness APIs for browser-native agent-wasm apps.","private":false,"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"},"./auth":{"types":"./dist/auth/index.d.ts","import":"./dist/auth/index.js","require":"./dist/auth/index.cjs","default":"./dist/auth/index.js"},"./plugins":{"types":"./dist/plugins/index.d.ts","import":"./dist/plugins/index.js","require":"./dist/plugins/index.cjs","default":"./dist/plugins/index.js"}},"dependencies":{"@agent-wasm/core":"0.4.0"},"devDependencies":{"@types/node":"^25.0.10","typescript":"^5.9.3","vitest":"4.0.18","tsup":"^8.5.0"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"sideEffects":false,"publishConfig":{"access":"public"},"scripts":{"build":"tsup src/index.ts src/auth/index.ts src/plugins/index.ts --tsconfig tsconfig.build.json --format esm,cjs --dts --clean --external @agent-wasm/core","test":"vitest run","type-check":"tsc --project tsconfig.json --noEmit"},"_id":"@agent-wasm/sdk@0.1.0","bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"homepage":"https://github.com/BLamy/agent-wasm#readme","_integrity":"sha512-ZfCsAMxChEIqsBaq9s6BwgXeClS0nLR9KU6WLwPe4PAORKVRGwUNQbAS4VQnYp3r9fbP2+xrDyldfolXGZbMfw==","_resolved":"/private/var/folders/xj/jvddkcmd6y9_f79xzk2z_rd00000gn/T/3d1242045edbfa5dfd38f68adf5c8639/agent-wasm-sdk-0.1.0.tgz","_from":"file:agent-wasm-sdk-0.1.0.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-ZfCsAMxChEIqsBaq9s6BwgXeClS0nLR9KU6WLwPe4PAORKVRGwUNQbAS4VQnYp3r9fbP2+xrDyldfolXGZbMfw==","shasum":"0a1fa9bcd931ce25201610a7a6754bde07d8ff5d","tarball":"https://registry.npmjs.org/@agent-wasm/sdk/-/sdk-0.1.0.tgz","fileCount":17,"unpackedSize":202645,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0NgmJl8DHbAY9pp35wT1yQwKa6+EPaEjscmnJBseZVwIhAIuGBtv1XMOuXZDSI0bG/33+opCz1ROX1ALWweGVvlhp"}]},"_npmUser":{"name":"bel423","email":"bel423@gmail.com"},"directories":{},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.1.0_1784961617852_0.24359035720303868"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-25T06:40:17.686Z","0.1.0":"2026-07-25T06:40:17.986Z","modified":"2026-07-25T06:40:18.198Z"},"maintainers":[{"name":"bel423","email":"bel423@gmail.com"}],"description":"Workspace lifecycle and agent harness APIs for browser-native agent-wasm apps.","homepage":"https://github.com/BLamy/agent-wasm#readme","repository":{"type":"git","url":"git+https://github.com/BLamy/agent-wasm.git"},"bugs":{"url":"https://github.com/BLamy/agent-wasm/issues"},"license":"MIT","readme":"# @agent-wasm/sdk\n\nWorkspace and agent-lifecycle layer over [`@agent-wasm/core`](https://www.npmjs.com/package/@agent-wasm/core).\n\n```bash\nnpm install @agent-wasm/core @agent-wasm/sdk\n```\n\n```ts\nimport { createWorkspace } from \"@agent-wasm/sdk\";\n\nconst workspace = createWorkspace();\nworkspace.vfs.writeFileSync(\"/index.html\", \"<h1>hi</h1>\");\nawait workspace.preview.start(\"npm run dev\");\nawait workspace.snapshots.save();\n```\n\n## API\n\n- **`createWorkspace` / `WorkspaceController`** — a container plus preview, terminal\n  sessions, mounted agents, and persistence in one object.\n- **`SnapshotStore` / `createIndexedDbSnapshotStore`** — persist a workspace VFS to\n  IndexedDB (or an in-memory store).\n- **`AgentAdapter` / `AgentSession`** — mount CLI agents into a workspace.\n- **`WorkspaceTemplate` / `DEFAULT_WORKSPACE_TEMPLATE`** — seedable starter files.\n- **`createOpenCodeAgentAdapter`** — an adapter for the OpenCode agent.\n- **`@agent-wasm/sdk/plugins`** — load and merge Claude Code, Codex, and\n  agent-wasm plugin manifests into one harness-agnostic contribution graph.\n\n## `@agent-wasm/sdk/auth`\n\nThe credential manifest shared across agent-wasm: `defaultCredentialSlots`,\n`defaultAuthProviders`, `agentWasmCredentialPaths`, and `createAuthManifest()` —\nthe single source of truth for where each provider's credentials live in the VFS.\n\n## `@agent-wasm/sdk/plugins`\n\nThe plugin registry is the shared manifest layer for all harnesses. It accepts\ncanonical `plugin.json` files, `.claude-plugin/plugin.json`,\n`.codex-plugin/plugin.json`, `.mcp.json`, `.lsp.json`, `settings.json`, and\nfolder conventions such as `skills/`, `commands/`, `agents/`, `hooks/`,\n`monitors/`, and `bin/`.\n\n```ts\nimport { loadPlugins } from \"@agent-wasm/sdk/plugins\";\n\nconst registry = await loadPlugins([\n  { kind: \"workspace\", root: \"/project/.claude-plugin\", workspace },\n  { kind: \"workspace\", root: \"/project/.codex-plugin\", workspace },\n  { kind: \"workspace\", root: \"/project/plugins/design-tools\", workspace },\n]);\n\nfor (const panel of registry.listPanels()) {\n  console.log(panel.id, panel.location);\n}\n```\n\nCanonical contributions are `skills`, `commands`, `agents`, `hooks`,\n`mcpServers`, `lspServers`, `monitors`, `bin`, `settings`, `auth`,\n`vscode.panels`, and `vscode.customEditors`. Multiple manifests merge by\ncontribution id. Duplicate ids use last-writer-wins and emit diagnostics.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-a470c4269dbf2b24938ae7027595f1f6"}