{"_id":"@aos-agent/server","_rev":"4-6285687d682e774f392545733d6c6220","name":"@aos-agent/server","dist-tags":{"latest":"0.85.1"},"versions":{"0.84.2":{"name":"@aos-agent/server","version":"0.84.2","keywords":["aos-agent","server"],"author":{"name":"Earendil Works"},"license":"MIT","_id":"@aos-agent/server@0.84.2","maintainers":[{"name":"aosagent","email":"guanwenpeng2001@gmail.com"}],"homepage":"https://github.com/guanwenpeng2001-bot/AOS-Agent#readme","bugs":{"url":"https://github.com/guanwenpeng2001-bot/AOS-Agent/issues"},"dist":{"shasum":"bfb541c9edc9c2de79182d95713ad7ab3c37cba6","tarball":"https://registry.npmjs.org/@aos-agent/server/-/server-0.84.2.tgz","fileCount":71,"integrity":"sha512-RFVPYYqLQg1asT+1QTNF/fT8N3zStY8eWx2Lux1zOQ1jqqAjxu9RHtCrwKtnoPKFh0NiQiYXxhw/ElRuk8n7KQ==","signatures":[{"sig":"MEYCIQCi19yH9M+FXo3Z4GFlcNG9baK2OyERgftQA83u1Ml9/gIhALhUBu5ffGt4A0ElRjEDtfWCOyWgSTVJavGNwvVEOEn3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":435430},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./unix":{"types":"./dist/transports/unix/index.d.ts","import":"./dist/transports/unix/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","import":"./dist/testing/index.js"}},"scripts":{"dev":"tsgo -p tsconfig.build.json --watch --preserveWatchOutput","test":"vitest --run","build":"tsgo -p tsconfig.build.json","clean":"shx rm -rf dist","typecheck":"tsgo -p tsconfig.test.json","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"aosagent","email":"guanwenpeng2001@gmail.com"},"repository":{"url":"git+https://github.com/guanwenpeng2001-bot/AOS-Agent.git","type":"git","directory":"packages/server"},"_npmVersion":"12.0.2","description":"Experimental server package for AOS Agent","directories":{},"_nodeVersion":"24.18.1","dependencies":{"@aos-agent/ai":"^0.84.2","@aos-agent/protocol":"^0.84.2"},"_hasShrinkwrap":false,"devDependencies":{"shx":"0.4.0","vitest":"4.1.9"},"_npmOperationalInternal":{"tmp":"tmp/server_0.84.2_1786323625119_0.653561224964929","host":"s3://npm-registry-packages-npm-production"}},"0.84.3":{"name":"@aos-agent/server","version":"0.84.3","keywords":["aos-agent","server"],"author":{"name":"Earendil Works"},"license":"MIT","_id":"@aos-agent/server@0.84.3","maintainers":[{"name":"aosagent","email":"guanwenpeng2001@gmail.com"}],"homepage":"https://github.com/guanwenpeng2001-bot/AOS-Agent#readme","bugs":{"url":"https://github.com/guanwenpeng2001-bot/AOS-Agent/issues"},"dist":{"shasum":"8e217733ce4c7fcba827bc5d9c06c3e1bcb04e53","tarball":"https://registry.npmjs.org/@aos-agent/server/-/server-0.84.3.tgz","fileCount":71,"integrity":"sha512-TlO/kTL15c2BfwD9VGZ6Pt9G8XL6YJyxY/AZqgUl2L4a944nn8zBcCFg9RGM/BfxhVbl3TeFxbjZc4oBY5toeQ==","signatures":[{"sig":"MEUCIC3QJ/t07Sn3JG0npyr/TrFCWg4AK9yPK5hLKx22ZtgAAiEApzpAvr9VrdoZST8uRxeCT2ye0iWTH+xd1/JdRfgGE8I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aos-agent%2fserver@0.84.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":435439},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./unix":{"types":"./dist/transports/unix/index.d.ts","import":"./dist/transports/unix/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","import":"./dist/testing/index.js"}},"gitHead":"d92430128236cc1f285dcbb4f03ddd56ed81f8da","scripts":{"dev":"tsgo -p tsconfig.build.json --watch --preserveWatchOutput","test":"vitest --run","build":"tsgo -p tsconfig.build.json","clean":"shx rm -rf dist","typecheck":"tsgo -p tsconfig.test.json","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:76fd5482-4baa-4b00-bcb6-44463b7134b4"}},"repository":{"url":"git+https://github.com/guanwenpeng2001-bot/AOS-Agent.git","type":"git","directory":"packages/server"},"_npmVersion":"11.5.1","description":"Experimental server package for AOS Agent","directories":{},"_nodeVersion":"24.18.0","dependencies":{"@aos-agent/ai":"^0.84.3","@aos-agent/protocol":"^0.84.3"},"_hasShrinkwrap":false,"devDependencies":{"shx":"0.4.0","vitest":"4.1.9"},"_npmOperationalInternal":{"tmp":"tmp/server_0.84.3_1786383929826_0.9814090976978695","host":"s3://npm-registry-packages-npm-production"}},"0.85.0":{"name":"@aos-agent/server","version":"0.85.0","keywords":["aos-agent","server"],"author":{"name":"AOS Agent"},"license":"MIT","_id":"@aos-agent/server@0.85.0","maintainers":[{"name":"aosagent","email":"guanwenpeng2001@gmail.com"}],"homepage":"https://github.com/guanwenpeng2001-bot/AOS-Agent#readme","bugs":{"url":"https://github.com/guanwenpeng2001-bot/AOS-Agent/issues"},"dist":{"shasum":"0f75a83e9074ececd205f00ccacbc826022557a0","tarball":"https://registry.npmjs.org/@aos-agent/server/-/server-0.85.0.tgz","fileCount":71,"integrity":"sha512-KXGsdO9ONqvHRF89G13M8n7zH0jAOewC0zTFfMwUDVK/RtbwStTlOCk4bDVbpv3T7PWcMZzQEf3olsaltTYoMA==","signatures":[{"sig":"MEUCIQCmAkA9Rt+N0eknEiAR8oi3ucZoSUJEU/HOaX0vzFqbQgIgeMx0NTkD2S5B3Keg7tqji6k1gONBPLpzW2A4vFOzLKQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aos-agent%2fserver@0.85.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":440109},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.19.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./unix":{"types":"./dist/transports/unix/index.d.ts","import":"./dist/transports/unix/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","import":"./dist/testing/index.js"}},"gitHead":"a305bd6d376b447cbdc0b92711a54e9778d24695","scripts":{"dev":"tsgo -p tsconfig.build.json --watch --preserveWatchOutput","test":"vitest --run","build":"tsgo -p tsconfig.build.json","clean":"shx rm -rf dist","typecheck":"tsgo -p tsconfig.test.json","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:76fd5482-4baa-4b00-bcb6-44463b7134b4"}},"repository":{"url":"git+https://github.com/guanwenpeng2001-bot/AOS-Agent.git","type":"git","directory":"packages/server"},"_npmVersion":"11.5.1","description":"Experimental server package for AOS Agent","directories":{},"_nodeVersion":"24.19.0","dependencies":{"@aos-agent/ai":"^0.85.0","@aos-agent/protocol":"^0.85.0"},"_hasShrinkwrap":false,"devDependencies":{"shx":"0.4.0","vitest":"4.1.9"},"_npmOperationalInternal":{"tmp":"tmp/server_0.85.0_1788326538172_0.33983563069207845","host":"s3://npm-registry-packages-npm-production"}},"0.85.1":{"name":"@aos-agent/server","version":"0.85.1","description":"Experimental server package for AOS Agent","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./testing":{"types":"./dist/testing/index.d.ts","import":"./dist/testing/index.js"},"./unix":{"types":"./dist/transports/unix/index.d.ts","import":"./dist/transports/unix/index.js"}},"scripts":{"clean":"shx rm -rf dist","dev":"tsgo -p tsconfig.build.json --watch --preserveWatchOutput","build":"tsgo -p tsconfig.build.json","test":"vitest --run","typecheck":"tsgo -p tsconfig.test.json","prepublishOnly":"npm run clean && npm run build"},"keywords":["aos-agent","server"],"author":{"name":"AOS Agent"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/guanwenpeng2001-bot/AOS-Agent.git","directory":"packages/server"},"engines":{"node":">=22.19.0"},"dependencies":{"@aos-agent/ai":"^0.85.1","@aos-agent/protocol":"^0.85.1"},"devDependencies":{"shx":"0.4.0","vitest":"4.1.9"},"_id":"@aos-agent/server@0.85.1","gitHead":"8fc01dea402bced66d545cf6febddcd944d8943b","bugs":{"url":"https://github.com/guanwenpeng2001-bot/AOS-Agent/issues"},"homepage":"https://github.com/guanwenpeng2001-bot/AOS-Agent#readme","_nodeVersion":"24.20.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-j/+LK1moJwndP46DWNOdg0SRQH4g2F05Cg3Fj8r+vMuw6RRYxa2Ua6GZ+otkDtfV8kmD8IkV9BlOODrcuigLtA==","shasum":"bd06f6431e54a733454c420f19499f4182b5366b","tarball":"https://registry.npmjs.org/@aos-agent/server/-/server-0.85.1.tgz","fileCount":71,"unpackedSize":440135,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aos-agent%2fserver@0.85.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDeaIeKU1WD9y65sG6iFRBcD529S0+loIKgIQgi6H78LgIgciyCfm8wRanhLVe8mzT/yybyYoiFz9h8SJbaFLrm7HY="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:76fd5482-4baa-4b00-bcb6-44463b7134b4"}},"directories":{},"maintainers":[{"name":"aosagent","email":"guanwenpeng2001@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/server_0.85.1_1788451904631_0.9542164205000803"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T01:00:24.950Z","modified":"2026-09-03T16:11:45.099Z","0.84.2":"2026-08-10T01:00:25.264Z","0.84.3":"2026-08-10T17:45:29.978Z","0.85.0":"2026-09-02T05:22:18.330Z","0.85.1":"2026-09-03T16:11:44.758Z"},"bugs":{"url":"https://github.com/guanwenpeng2001-bot/AOS-Agent/issues"},"author":{"name":"AOS Agent"},"license":"MIT","homepage":"https://github.com/guanwenpeng2001-bot/AOS-Agent#readme","keywords":["aos-agent","server"],"repository":{"type":"git","url":"git+https://github.com/guanwenpeng2001-bot/AOS-Agent.git","directory":"packages/server"},"description":"Experimental server package for AOS Agent","maintainers":[{"name":"aosagent","email":"guanwenpeng2001@gmail.com"}],"readme":"# @aos-agent/server\n\nExperimental. This package is under active development and may change or be removed without notice. Its APIs and behavior are not yet stable.\n\nServer package for AOS Agent.\n\n## Session server core\n\nThe package exports the `AosServer` session server.\n\n```ts\nimport type { AosServerService } from \"@aos-agent/server\";\nimport { createUnixServer } from \"@aos-agent/server/unix\";\n\nconst service: AosServerService = {\n  async listSessions() {\n    return storage.listSessions();\n  },\n  async listModels() {\n    return modelRegistry.listModels();\n  },\n  async createSession(options) {\n    return storage.createAndOpen(options);\n  },\n  async openSession(sessionId) {\n    return storage.open(sessionId);\n  },\n};\n\nconst server = createUnixServer(service, {\n  path: \"/tmp/aos-agent/server.sock\",\n});\nawait server.start();\n```\n\n`AosServer` composes transport listeners through the `AosServerListener` interface. Each listener must complete any transport-specific authentication and authorization before passing a connection to `AosServer`. For example, a WebSocket listener can validate credentials during the HTTP upgrade, while the Unix listener relies on socket filesystem permissions. The Unix submodule exports the `createUnixListener()` building block and `createUnixServer()` preset, keeping the common case concise without coupling the primary server to Unix sockets. The listener uses length-prefixed CBOR messages from `@aos-agent/protocol`.\n\nThis package does not provide a standalone CLI or coding-agent service. Applications supply the `AosServerService` implementation.\n\nOn Windows, Node provides local IPC through named pipes instead of filesystem Unix sockets. The configured path is used to derive a stable named-pipe address, which is returned by `server.addresses`; Unix permission modes apply only to filesystem sockets.\n\n`AosServerService.listSessions()` returns protocol `SessionMetadata`, not acquired runtime state. Services should map the durable fields their storage supports and may omit `updatedAt`, `parentSessionId`, `sessionName`, and `cwd`. `AosServer` refreshes available metadata from live snapshots without requiring stored sessions to fabricate phase, model, thinking-level, attachment, or lock values.\n\n## Transport testing\n\nCustom transports can use `@aos-agent/server/testing` for deterministic protocol conformance tests. It exports `createTestServer()`, `TestServerService`, `ProtocolTestClient`, and the transport-neutral `WireChannel` contract. `connectUnixTestClient()` is provided for Unix transport tests.\n\n## `@aos-agent/ai` protocol bridge\n\n`@aos-agent/ai` domain objects and `@aos-agent/protocol` wire DTOs remain independent. This package owns their boundary and exports `toProtocolModelMetadata()`, `toProtocolAssistantMessage()`, `toProtocolUserMessage()`, and `toProtocolToolResultMessage()`.\n\nThe adapters reject invalid tool inputs, identifiers, timestamps, and mismatched tool results; `toProtocolToolResultMessage()` requires the original `ToolCall` so it can verify the association and convert its arguments itself. Diagnostic details are explicitly sanitized. Closed `@aos-agent/ai` unions are mapped exhaustively, and compile-time field manifests enumerate current AI package properties so additions require an explicit review. The protocol mirrors AI-package vocabulary such as `toolCall` and `toolUse` where the semantics are identical. Protocol schemas enforce consistent lifecycle states, and tests encode adapter output through the runtime schemas so incompatible changes fail in the bridging package.\n","readmeFilename":"README.md"}