{"_id":"@agent-smith/wscli","_rev":"9-04f9cef020fc918448006e3935ac7660","name":"@agent-smith/wscli","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.2":{"name":"@agent-smith/wscli","version":"0.0.2","license":"MIT","_id":"@agent-smith/wscli@0.0.2","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"00bb766417699ee66975c141bc2a6ad0a43a0943","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.2.tgz","fileCount":7,"integrity":"sha512-gDvszbUrs74ISUlQkP7IFtJrfCotW+auVxxTClR4tIR1aSG6mnQrDtqkuhJXqQoz0McubBsi8XXnlHICkfVlQQ==","signatures":[{"sig":"MEUCIQCZPPtylANj5kRHpp4VmPDMrFCU7JU86WldUFp+ILg6nQIgUZ2yjwYBGQO+4tCBn+sAko9qjrA0MJz6sfRZP6Od0Ro=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7903},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"7830166e33343fe473b1dd51196e8fce5c704add","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.7.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.30.0","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^5.7.2","@types/node":"^22.10.5","@locallm/types":"^0.7.0","@agent-smith/types":"^0.0.2","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.2_1771937079370_0.19611498405563355","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@agent-smith/wscli","version":"0.0.3","license":"MIT","_id":"@agent-smith/wscli@0.0.3","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"a6880e6bb99dcdc3f820ef541a9aeed62130bc93","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.3.tgz","fileCount":7,"integrity":"sha512-GPIE6NHbjGvK6PRJ1dCu+QXem7dmoIGpxsAUGjjUwCe1Osb24mVKln+vX04iaWTzeDXVjYO7NCYJfH3eaXLjFQ==","signatures":[{"sig":"MEUCIQD5QqsbwTH0S3A6ga7XgOn0oxPPn44GxN27Ko+/4edQ7wIgJuMj5Ij5fiw419H/qAxgtIOx6C9TALknc8eHTqLx/ZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8062},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"7f8a756760b2bf0b1601aebb9e2d992fa5a0f84a","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.7.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.59.0","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^25.3.1","@locallm/types":"^0.7.1","@agent-smith/types":"^0.0.3","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.3_1772130157519_0.5569734542263052","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@agent-smith/wscli","version":"0.0.4","license":"MIT","_id":"@agent-smith/wscli@0.0.4","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"236025612ca2511d4738a817b9bce784cea50463","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.4.tgz","fileCount":7,"integrity":"sha512-EkVBe65pohfdeU1Flxd4futAdVJNCMxdzc8g1sgqz0SmYSvtO6o0f6imHRtgPtl0JnBzyxon5zSEycS4g1skQQ==","signatures":[{"sig":"MEUCIB/ab2e++XazRpOuLX9It88QomsApvDRFBMcyxG8zKMHAiEA/isgXzJBOBImM7XM+0qT8cHMAq2BmZ2t6hA5fioSpo8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8129},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"41104c1a4ae480d543b4516dfadd8fa8a94f5129","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.7.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.59.0","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^25.3.1","@locallm/types":"^0.7.1","@agent-smith/types":"^0.0.3","@rollup/plugin-terser":"^0.4.4","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.4_1772720790342_0.24201580340487094","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@agent-smith/wscli","version":"0.0.5","license":"MIT","_id":"@agent-smith/wscli@0.0.5","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"cf18e1668edf1e48530c2aa66a0fe7eb345c79ce","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.5.tgz","fileCount":5,"integrity":"sha512-Fl0ZtdwB4vRh+sfXqcwKV5FesHqA35fAKbDHkjGv20ZocKLyAXFqRz2lqhQ1qVhMXwDZIq4EHoMsXkt7Azr1Dw==","signatures":[{"sig":"MEYCIQDAxahjbyh44rNhJhIBz7J4n3pyodj2ZG7uEIFxQ4L3kgIhAJc4RQn4SrA8swz8GNQZQv+b8FoovV/VWUpbAcmPdq/e","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7392},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"fe227c543560465e41560d4b9f0a79eda62a83d1","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.7.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","dependencies":{"reconnecting-websocket":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.60.1","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^25.5.0","@locallm/types":"^0.7.1","@agent-smith/types":"^0.0.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.5_1774886603857_0.6517065168140039","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@agent-smith/wscli","version":"0.0.6","license":"MIT","_id":"@agent-smith/wscli@0.0.6","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"e4d0df4de61869a7185bd063b4ea5526a9e5ac5e","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.6.tgz","fileCount":12,"integrity":"sha512-c74XrRtVsWUI+V9s+RqivByryovtdmdiuxEOnQ9FT1da4fOMAwG9lQZmE5PR1mUNGGgvCkvXdMdCd+5FuCdLrQ==","signatures":[{"sig":"MEUCIQDBLZG8uUJ48o5mXeKtu7uoMcJcumK4cFwK+Z9l9xAgJQIgWsvYgolfMmlobbJ8tihPOCLqVbfT7K2nbdaZ/XWmsbE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31241},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"d0f8060fc9392f1d1a6aaf85d47cdcb591c56e38","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.13.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@vue/reactivity":"^3.5.33","reconnecting-websocket":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.60.2","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.6.0","@agent-smith/types":"^0.0.5","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.6_1780930757847_0.7250935633159614","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@agent-smith/wscli","version":"0.0.7","license":"MIT","_id":"@agent-smith/wscli@0.0.7","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"13450b80351a0277413814425b86c65d6eb60a47","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.7.tgz","fileCount":12,"integrity":"sha512-3sWWTs3b2c+ygQvwZtHxm21oz1y+bWYg7RntXHBtZh5ZBLmoY/eC3mFSZI1Hcjnj8i6gK8cFaFXV/obRVmcvVA==","signatures":[{"sig":"MEUCIQD3S/G3q7RfIeSRgIFDV7HevNp9oloL73vjTg2DDZ8trgIgZty1wXGwAaWsJsAI1G/FlhVntwKANsXKiMrRObGt8To=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31504},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"3cc3ac7b186dc5869d1d295b697e96dfcac3f9e9","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.13.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@vue/reactivity":"^3.5.38","reconnecting-websocket":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.9.3","@agent-smith/types":"^0.0.6","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.7_1781271493168_0.7366346414248399","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@agent-smith/wscli","version":"0.0.8","license":"MIT","_id":"@agent-smith/wscli@0.0.8","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"1219f498f3dab9ee4503c755a39fca87ecfc17d6","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.8.tgz","fileCount":10,"integrity":"sha512-yGMsAwXS/r186pZ6OidHv6X7y1mTMzNb1GFL472xLvTCth2kde8LgQwP+oQgm8WxoUXF+8QcrIE213alAJOEfg==","signatures":[{"sig":"MEUCIF7hqQAPiaBEhyCT6bZAy4reuItJ3FIPi4skIVnWAv3hAiEAwDi2JkrNR+dhUsGwvjBrW+RvlCOIelxOYuWqMXWVdLw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30303},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"42862ae62c1a6f31ff15c0ef2531adffec0477da","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.13.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@vue/reactivity":"^3.5.38","reconnecting-websocket":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.9.3","@agent-smith/types":"^0.0.7","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.8_1783254871751_0.8183489718767272","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@agent-smith/wscli","version":"0.0.9","license":"MIT","_id":"@agent-smith/wscli@0.0.9","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"homepage":"https://github.com/synw/agent-smith#readme","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"dist":{"shasum":"a9ea2ed6ae2155e972a09d6186850fe870654283","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.9.tgz","fileCount":10,"integrity":"sha512-411IR8U8h/zNpS3mB+39mSoMb4pbSB6NuoFFdzVS5fHHqzhdZlZc4UuEmrVjBBVrZXk8Hhx98Kt0mIUMVUi9cA==","signatures":[{"sig":"MEUCIQCKUOxWGu8/mZzD1WKqwl6msI5YGwp7J7DWZ1xfYqFQwQIgWDa8tzVNe09lAB4tCfKP3BB8AblalT4v6cCUwQZCpwo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30405},"type":"module","types":"./dist/main.d.ts","module":"./dist/main.js","exports":{".":{"import":"./dist/main.js"}},"gitHead":"ffcc2a165d5c794f31b8f6e07a7f2ef92d6bb782","scripts":{"docs":"typedoc --entryPointStrategy expand","build":"rm -rf dist/* && tsc","buildrl":"rm -rf dist/* && rollup -c"},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"repository":{"url":"git+https://github.com/synw/agent-smith.git","type":"git"},"_npmVersion":"11.18.0","description":"An websockets client for the Agent Smith server","directories":{},"_nodeVersion":"24.11.0","dependencies":{"@vue/reactivity":"^3.5.38","reconnecting-websocket":"^4.4.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","openai":"^6.49.0","rollup":"^4.61.1","restmix":"^0.6.1","ts-node":"^10.9.2","typescript":"^6.0.3","@types/node":"^25.9.3","vue-reactivity":"^1.0.3","@agent-smith/types":"^0.0.10","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/wscli_0.0.9_1787312812326_0.08730297198494785","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"@agent-smith/wscli","version":"0.0.10","description":"A websockets client for the Agent Smith server","repository":{"type":"git","url":"git+https://github.com/synw/agent-smith.git"},"scripts":{"buildrl":"rm -rf dist/* && rollup -c","build":"rm -rf dist/* && tsc","docs":"typedoc --entryPointStrategy expand"},"devDependencies":{"vue-reactivity":"^1.0.3","openai":"^6.49.0","@agent-smith/types":"^0.0.10","@rollup/plugin-node-resolve":"^16.0.3","@rollup/plugin-terser":"^1.0.0","@rollup/plugin-typescript":"^12.3.0","@types/node":"^25.9.3","restmix":"^0.6.1","rollup":"^4.61.1","ts-node":"^10.9.2","tslib":"^2.8.1","typescript":"^6.0.3"},"module":"./dist/main.js","types":"./dist/main.d.ts","type":"module","exports":{".":{"import":"./dist/main.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"license":"MIT","dependencies":{"@vue/reactivity":"^3.5.38","reconnecting-websocket":"^4.4.0"},"gitHead":"828c52f8866aa65a661b61a7aa8d8524ffe2ccc6","_id":"@agent-smith/wscli@0.0.10","bugs":{"url":"https://github.com/synw/agent-smith/issues"},"homepage":"https://github.com/synw/agent-smith#readme","_nodeVersion":"24.11.0","_npmVersion":"11.18.0","dist":{"integrity":"sha512-5kCJvMJUmYra0d3+mZtKLBdsd0PvzTB6oAEnbmG329uEQjLK1OrjsCaozZYub0PEhNoYW80FgfewoezYGJZhIA==","shasum":"887299be767b0ce790d237282d12421b386bcf4d","tarball":"https://registry.npmjs.org/@agent-smith/wscli/-/wscli-0.0.10.tgz","fileCount":10,"unpackedSize":30754,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD5FweSW7f3GXd4gJ5uRmPzKHCjKYdj0TxqHWXIWiD9tgIgTm2cqPW4jZvPtOjyvU+eCvQbbh0NO6lB9SXwyrm0Mmc="}]},"_npmUser":{"name":"synw","email":"synwx@protonmail.com"},"directories":{},"maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wscli_0.0.10_1788603060108_0.8100483403743237"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-24T12:44:39.268Z","modified":"2026-09-05T10:11:00.404Z","0.0.2":"2026-02-24T12:44:39.544Z","0.0.3":"2026-02-26T18:22:37.683Z","0.0.4":"2026-03-05T14:26:30.498Z","0.0.5":"2026-03-30T16:03:23.997Z","0.0.6":"2026-06-08T14:59:17.988Z","0.0.7":"2026-06-12T13:38:13.320Z","0.0.8":"2026-07-05T12:34:31.889Z","0.0.9":"2026-08-21T11:46:52.469Z","0.0.10":"2026-09-05T10:11:00.233Z"},"bugs":{"url":"https://github.com/synw/agent-smith/issues"},"license":"MIT","homepage":"https://github.com/synw/agent-smith#readme","repository":{"type":"git","url":"git+https://github.com/synw/agent-smith.git"},"description":"A websockets client for the Agent Smith server","maintainers":[{"name":"synw","email":"synwx@protonmail.com"}],"readme":"[![npm package](https://img.shields.io/npm/v/@agent-smith/wscli)](https://www.npmjs.com/package/@agent-smith/wscli)\n\n# @agent-smith/wscli — WebSocket Client for Agent Smith\n\nReal-time bidirectional WebSocket client for the [Agent Smith](https://github.com/lynxai-team/agent-smith) toolkit — enables streaming inference tokens, tool call notifications, and agent/workflow orchestration with automatic reconnection.\n\n## Features\n\n- 🔌 **Auto-Reconnect** — Exponential backoff reconnection via `reconnecting-websocket` (1s → 5s max)\n- 📡 **Real-Time Streaming** — Receive inference tokens, thinking tokens, and tool call events as they happen\n- 🔄 **Dual Transport** — WebSocket for streaming + REST API (`restmix`) for configuration queries\n- ⚡ **Event-Driven Callbacks** — Dispatch messages by type (token, toolcall, turnstart/end, errors) to registered handlers\n- 🤖 **High-Level Orchestration** — `useClientFeatures` provides reactive state, variable management, and sync/async execution modes\n- 🛡️ **Tool Confirmation** — Built-in support for human-in-the-loop tool authorization via `onConfirmToolUsage`\n\n## Documentation\n\n### For AI Agents\n\n- [Codebase Summary](.agents/documentation/codebase-summary.md) — Architecture, key files, and patterns for the wscli package\n- [Get Started](https://raw.githubusercontent.com/lynxai-team/agent-smith/refs/heads/main/docsite/public/doc/libraries/wscli/1.get_started.md) — Installation and basic usage\n- [API Reference](https://raw.githubusercontent.com/lynxai-team/agent-smith/refs/heads/main/docsite/public/doc/libraries/wscli/2.api.md) — Complete API surface, message protocol, and callback types\n\n### For Humans\n\n- [Get Started](https://lynxai-team.github.io/agent-smith/libraries/wscli/1.get_started/) — Installation and basic usage\n- [API Reference](https://lynxai-team.github.io/agent-smith/libraries/wscli/2.api/) — Complete API surface, message protocol, and callback types\n\n## Installation\n\n```bash\nnpm install @agent-smith/wscli\n```\n\n**Dependencies:** `reconnecting-websocket` (auto-reconnect), `@vue/reactivity` (reactive state for high-level service).\n\n## Quick Start\n\nConnect to the server and execute an agent with streaming output:\n\n```typescript\nimport { useWsServer } from \"@agent-smith/wscli\";\n\nconst ws = useWsServer({\n    url: \"ws://localhost:5184/ws\",\n    onToken: (token, from) => process.stdout.write(token),\n    onError: (err, from) => console.error(`[${from}] ${err}`),\n});\n\n// Execute an agent\nws.executeAgent(\"my-agent\", { prompt: \"Hello, world!\" });\n\n// Or execute a workflow\nws.executeWorkflow(\"my-workflow\", { input: \"data\" });\n\n// Cancel a running operation\nawait ws.cancel();\n```\n\n## Usage\n\n### Low-Level WebSocket Client (`useWsServer`)\n\nThe factory function creates a WebSocket connection with automatic reconnection and message dispatching to callbacks.\n\n#### Connection Setup\n\n```typescript\nimport { useWsServer } from \"@agent-smith/wscli\";\nimport type { ServerParams } from \"@agent-smith/types\";\n\nconst ws = useWsServer({\n    url: \"ws://localhost:5184/ws\",  // defaults to ws://localhost:5184/ws\n    onToken: (token, from) => console.log(`[${from}] ${token}`),\n    onError: (err, from) => console.error(`[${from}] Error: ${err}`),\n});\n```\n\n#### Executing Agents and Workflows\n\n```typescript\n// Execute an agent with prompt and options\nws.executeAgent(\"my-agent\", { prompt: \"Analyze this data\" }, { temperature: 0.7 });\n\n// Execute a workflow with payload\nws.executeWorkflow(\"data-pipeline\", { input: \"file.csv\", format: \"json\" });\n\n// Cancel running inference\nawait ws.cancel();\n```\n\n#### Streaming Callbacks\n\nAll callbacks receive `(data, from)` where `from` is the source identifier:\n\n```typescript\nconst ws = useWsServer({\n    onTurnStart: (from) => console.log(`\\n=== New turn from ${from} ===`),\n    onToken: (token, from) => process.stdout.write(token),\n    onThinkingToken: (token, from) => console.log(`[thinking] ${token}`),\n    onToolCall: (tc, type, from) => {\n        console.log(`Tool call: ${tc.name}(${JSON.stringify(tc.arguments)})`);\n    },\n    onToolCallEnd: (tc, content, type, from) => {\n        console.log(`Tool \"${tc.name}\" completed: ${content}`);\n    },\n    onTurnEnd: (history, from) => {\n        console.log(`\\n=== Turn ended from ${from} ===`);\n    },\n});\n\nws.executeAgent(\"my-agent\", { prompt: \"Process the data\" });\n```\n\n#### Tool Confirmation\n\nWhen the server requires human authorization for a tool call, `onConfirmToolUsage` is triggered:\n\n```typescript\nconst ws = useWsServer({\n    onConfirmToolUsage: async (tool) => {\n        const confirmed = await askUser(`Allow tool \"${tool.name}\"?`);\n        return confirmed;  // Client automatically sends confirmation back\n    },\n});\n```\n\n### High-Level Service (`useClientFeatures`)\n\nProvides reactive state, variable management, and REST API integration on top of the WebSocket client.\n\n```typescript\nimport { useClientFeatures } from \"@agent-smith/wscli\";\n\nconst client = useClientFeatures({\n    onToken: (token, from) => process.stdout.write(token),\n});\n\n// Load an agent spec and its variables\nawait client.load(\"my-agent\");\n\n// Execute with reactive variable values\nawait client.executeAgent(\"Analyze the data\", {\n    variables: { workspace: \"/path/to/project\" },\n});\n\n// Or use sync mode (waits for turn completion)\nawait client.executeAgentSync(\"Analyze the data\", {\n    variables: { workspace: \"/path/to/project\" },\n});\n\n// Load server resources via REST\nconst models = await client.loadModels(\"ollama\");\nconst workspaces = await client.loadWorkspaces();\nconst settings = await client.loadSettings();\n\n// Reactive state\nconsole.log(client.isReady.value);        // boolean\nconsole.log(client.agentSpec.value.name); // string\n```\n\n#### Available Methods\n\n| Method | Description |\n|--------|-------------|\n| `load(name)` | Load agent spec and populate variables |\n| `executeAgent(prompt, opts)` | Async execution (fire-and-forget) |\n| `executeAgentSync(prompt, opts)` | Sync execution (waits for completion) |\n| `executeWorkflow(name, payload, opts)` | Execute a workflow |\n| `executeWorkflowSync(name, payload, opts)` | Sync workflow execution |\n| `cancel()` | Cancel running inference |\n| `loadModels(backend)` | Load available models for a backend |\n| `loadSamplingPresets()` | Load model sampling presets |\n| `loadAgentSettings()` | Load agent settings |\n| `loadBackends()` | Load configured backends |\n| `setBackend(name)` | Set active backend |\n| `getTools(tools)` | Get tool definitions |\n| `checkState()` | Check initialization state |\n| `loadWorkspaces()` | Load available workspaces |\n| `loadSettings()` | Load global settings |\n\n## Complete Example\n\nFull working async function demonstrating all operations:\n\n```typescript\nimport { useClientFeatures } from \"@agent-smith/wscli\";\nimport type { ClientFeaturesOptions } from \"@agent-smith/types\";\n\nasync function runAgentWithCallbacks() {\n    const client = useClientFeatures({\n        onToken: (token, from) => process.stdout.write(token),\n        onThinkingToken: (token) => console.log(`[thinking] ${token}`),\n        onToolCall: (tc) => console.log(`🔧 ${tc.name}(${JSON.stringify(tc.arguments)})`),\n        onTurnStart: () => console.log(\"\\n=== Starting ===\"),\n        onTurnEnd: () => console.log(\"\\n=== Done ===\"),\n        onError: (err) => console.error(`❌ ${err}`),\n    });\n\n    // Load agent configuration\n    await client.load(\"general-agent\");\n\n    // Prepare variables\n    client.variables.values.required.workspace = \"/workspace/project\";\n\n    // Execute with options\n    const opts: ClientFeaturesOptions = {\n        backend: \"ollama\",\n        model: \"qwen4b\",\n        variables: { workspace: \"/workspace/project\" },\n    };\n\n    try {\n        await client.executeAgentSync(\"Analyze the project structure\", opts);\n    } catch (err) {\n        console.error(\"Execution failed:\", err);\n    }\n\n    // Cleanup\n    await client.cancel();\n}\n\nrunAgentWithCallbacks();\n```\n\n## API Reference\n\n### Factory Functions\n\n| Function | Signature | Description |\n|----------|-----------|-------------|\n| `useWsServer` | `(params: ServerParams) => WsServerHandle` | Low-level WebSocket client with auto-reconnect and callback dispatch |\n| `useClientFeatures` | `(params?: ServerParams) => ClientFeaturesService` | High-level service with reactive state, variable management, and REST integration |\n\n### WsServerHandle\n\n```typescript\ninterface WsServerHandle {\n    executeWorkflow: (name: string, payload: any, options?: Record<string, any>) => void;\n    executeAgent: (name: string, payload: any, options?: Record<string, any>) => void;\n    cancel: () => Promise<void>;\n    onToken: ((t: string, from: string) => void) | undefined;\n    onToolCall: ((tc: ToolCallSpec, type: string, from: string) => void) | undefined;\n    onToolCallEnd: ((tc: ToolCallSpec, tr: any, type: string, from: string) => void) | undefined;\n    onError: ((err: any, from: string) => void) | undefined;\n    onConfirmToolUsage: ((tool: ToolCallSpec) => Promise<boolean>) | undefined;\n}\n```\n\n### ServerParams\n\n```typescript\ninterface ServerParams extends AllCallbacks {\n    url?: string;                          // WebSocket URL (default: ws://localhost:5184/ws)\n    defaultInferenceParams?: InferenceParams;\n    onConfirmToolUsage?: (tool: ToolCallSpec) => Promise<boolean>;\n}\n```\n\n`ServerParams` extends `AllCallbacks` which combines `InferenceCallbacks` and `AgentCallbacks`. All callbacks are optional.\n\n### Message Types\n\n| Type | Callback | Description |\n|------|----------|-------------|\n| `'token'` | `onToken(token, from)` | Generated output token |\n| `'thinkingtoken'` | `onThinkingToken(token, from)` | Thinking/reasoning token |\n| `'toolcall'` | `onToolCall(tc, type, from)` | Tool call initiated |\n| `'toolcallend'` | `onToolCallEnd(tc, content, type, from)` | Tool call completed |\n| `'toolcallconfirm'` | `onConfirmToolUsage(tool)` | Awaiting tool authorization |\n| `'turnstart'` | `onTurnStart(from)` | New conversation turn |\n| `'turnend'` | `onTurnEnd(history, from)` | Turn completed with history |\n| `'endemit'` | `onEndEmit(result, from)` | Inference complete |\n| `'error'` | `onError(err, from)` | Error message |\n\n## Important Notes\n\n- **Server Required** — This package connects to a running Agent Smith server (default: `ws://localhost:5184/ws`). Start the server before using this client.\n- **Browser Compatible** — Works in browsers and Node.js environments.\n- **Reactive State** — `useClientFeatures` uses `@vue/reactivity` for reactive state (`isReady`, `agentSpec`, `variables`). These are Vue refs/reactives, not plain values.\n- **REST Fallback** — Configuration queries (models, settings, workspaces) use the REST API at `/api/*` via `restmix`. Default server URL is `http://localhost:5184/api`.\n- **Auto-Reconnect** — Connection drops trigger automatic reconnection with exponential backoff (1s → 5s max). In-flight message sends retry internally if connection is not yet open.\n\n## Related Packages\n\n- [`@agent-smith/types`](../types/) — Shared TypeScript interfaces for WebSocket messages, callbacks, and tool specs\n- [`@agent-smith/server`](../../server/) — Koa server exposing `/ws` (WebSocket) and `/api/*` (REST) endpoints\n- [`@agent-smith/cli`](../cli/) — Terminal REPL for interactive agent execution\n\n## Documentation Links\n\n- [Get Started Guide](https://lynxai-team.github.io/agent-smith/libraries/wscli/1.get_started/)\n- [API Reference](https://lynxai-team.github.io/agent-smith/libraries/wscli/2.api/)\n- [Project Documentation](https://lynxai-team.github.io/agent-smith/)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}