{"_id":"@best-agent/foundation","_rev":"3-ac984d1e6cd029331d1ed43d885954db","name":"@best-agent/foundation","dist-tags":{"latest":"0.0.2-beta.8","beta":"0.0.2-beta.2"},"versions":{"0.0.1-beta.1":{"name":"@best-agent/foundation","version":"0.0.1-beta.1","_id":"@best-agent/foundation@0.0.1-beta.1","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"dist":{"shasum":"1f8f836c1be8643007f6d8aa6aa44c7d118cda17","tarball":"https://registry.npmjs.org/@best-agent/foundation/-/foundation-0.0.1-beta.1.tgz","fileCount":39,"integrity":"sha512-LccIcu9PjSadHbsl0C6tRtul42al62lVzbl33ZQDqTocOaxPhTxWY/3ukVLqpxxDBpkAYtx92q726c/jjWBgfA==","signatures":[{"sig":"MEMCHy8DhLBKK3wkLRCnU7P5bSExQPfGVPt2xWQuoL6izl4CICFak8IkqBMXGf2CZAMnViuvNHBFvOqd842ghcINFOAN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64671},"main":"./dist/index.js","type":"module","_from":"file:best-agent-foundation-0.0.1-beta.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/b72a831d1ed0264c87dbff09084ff88f/best-agent-foundation-0.0.1-beta.1.tgz","_integrity":"sha512-LccIcu9PjSadHbsl0C6tRtul42al62lVzbl33ZQDqTocOaxPhTxWY/3ukVLqpxxDBpkAYtx92q726c/jjWBgfA==","_npmVersion":"10.9.2","description":"Internal shared primitives for the monorepo.","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/foundation_0.0.1-beta.1_1779708555488_0.018299161449607526","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.2":{"name":"@best-agent/foundation","version":"0.0.2-beta.2","_id":"@best-agent/foundation@0.0.2-beta.2","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"dist":{"shasum":"e1632cc7450aa69d3b544734466fde939ba264dc","tarball":"https://registry.npmjs.org/@best-agent/foundation/-/foundation-0.0.2-beta.2.tgz","fileCount":39,"integrity":"sha512-W2jtBWPO+iKAn3yZ6yAKvhhpdhym725tv+nbGoFTc85ojJJyqpacFgxx5uXyDz7I1PvGbImOixPVKkP+6vgxdg==","signatures":[{"sig":"MEQCIEV6erxhIsCG6Vg6cXDY6RqvUTdF/q7uLiEAg2GaAiZFAiBcud10Np4TDWM72RFejRwee1s0+qK9esVvvtcLUf8jaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64671},"main":"./dist/index.js","type":"module","_from":"file:best-agent-foundation-0.0.2-beta.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/751dd09874d6cffd729f97de79576686/best-agent-foundation-0.0.2-beta.2.tgz","_integrity":"sha512-W2jtBWPO+iKAn3yZ6yAKvhhpdhym725tv+nbGoFTc85ojJJyqpacFgxx5uXyDz7I1PvGbImOixPVKkP+6vgxdg==","_npmVersion":"10.9.2","description":"Internal shared primitives for the monorepo.","directories":{},"_nodeVersion":"23.11.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/foundation_0.0.2-beta.2_1779794946931_0.47400320781584604","host":"s3://npm-registry-packages-npm-production"}},"0.0.2-beta.8":{"name":"@best-agent/foundation","version":"0.0.2-beta.8","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"release":"pnpm -w build && pnpm publish --access public --no-git-checks"},"_id":"@best-agent/foundation@0.0.2-beta.8","description":"Internal shared primitives for the monorepo.","_integrity":"sha512-Yfbg/xrkywjs09l30kdusCAXmy1NM3+b8dkhajgvBMIrbd+xxV8eXxa0yWi8DxThwyPtT5wChEIJWPdov369ZQ==","_resolved":"/private/var/folders/z8/w1qvd0cd46z6k8_swl1n33d00000gn/T/8a36cf03a7cb04a1ec906603cb078a1f/best-agent-foundation-0.0.2-beta.8.tgz","_from":"file:best-agent-foundation-0.0.2-beta.8.tgz","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Yfbg/xrkywjs09l30kdusCAXmy1NM3+b8dkhajgvBMIrbd+xxV8eXxa0yWi8DxThwyPtT5wChEIJWPdov369ZQ==","shasum":"66396af18d2b0831737cde160ce0835b331e7a8d","tarball":"https://registry.npmjs.org/@best-agent/foundation/-/foundation-0.0.2-beta.8.tgz","fileCount":45,"unpackedSize":74899,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCiK6fAgJv97cXLxDTTyFvH8IT+sOMiqlvPvzRrqYCM7QIgYRuHBMGK8J8zNe58GQLcdyXwEjH0x/bdeW6+KawY1g4="}]},"_npmUser":{"name":"simon_he","email":"13917107469@163.com"},"directories":{},"maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/foundation_0.0.2-beta.8_1780387064538_0.4083225965221895"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T11:29:15.316Z","modified":"2026-06-02T07:57:44.788Z","0.0.1-beta.1":"2026-05-25T11:29:15.642Z","0.0.2-beta.2":"2026-05-26T11:29:07.064Z","0.0.2-beta.8":"2026-06-02T07:57:44.664Z"},"description":"Internal shared primitives for the monorepo.","maintainers":[{"name":"simon_he","email":"13917107469@163.com"}],"readme":"# @best-agent/foundation\n\nInternal shared primitives for the monorepo.\n\n## Main Exports\n\n- `Brand<TValue, TName>`\n- `DEFAULT_STORAGE_DIRECTORY_NAME`\n- `DEFAULT_DAEMON_VERSION`\n- `DaemonInstancePaths`\n- `createRandomId(prefix)`\n- `BestAgentError`\n- `resolveWorkspaceStorageRoot(cwd)`\n- `resolveVersionedStorageRoot(storageRoot)`\n- `resolveDaemonInstancePaths(storageRoot)`\n\n## Features\n\n- lightweight branded ids\n- one shared error type for public/runtime errors\n- one shared default storage-directory name\n- workspace-derived storage-root resolution\n- versioned daemon storage-root normalization\n- deterministic daemon metadata and socket-path resolution\n\n## Example\n\n```ts\nimport {\n  BestAgentError,\n  createRandomId,\n  resolveWorkspaceStorageRoot,\n} from \"@best-agent/foundation\";\n\nconst threadId = createRandomId<\"ThreadId\">(\"thread\");\nconst storageRoot = resolveWorkspaceStorageRoot(process.cwd());\n\nthrow new BestAgentError(\"DEMO\", `Created ${threadId} under ${storageRoot}`);\n```\n\n## Does Not Own\n\n- protocol shapes\n- runtime state\n- tools, skills, providers, or plugins\n\nThis package is internal to the workspace even though it builds like a normal package.\n","readmeFilename":"README.md"}