{"_id":"@ashafizullah/dsh-telegram","_rev":"8-8a6b25ba863a0c0a70a6dd88f6caa4c0","name":"@ashafizullah/dsh-telegram","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@ashafizullah/dsh-telegram","version":"0.1.0","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.1.0","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"40c259187ed0c18db1f740664dd482e97aa8d5bd","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.1.0.tgz","fileCount":155,"integrity":"sha512-At4XI2RLhlJRrPi3dM3FtsqlwsEQ+6m8yDhoxtE6rWGa2wHlCyYeSYeuBGKN5XzSuG4Y3yTefMNrgIel4JSFBg==","signatures":[{"sig":"MEQCIAgRI75dpANjYwgat9+3yNWRsEbbo5pegYiA7W2+Vd3UAiAbjgShct08s1zqk/5A+po+r+H1upKQglF4r/CKTEoc6g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":535305},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"27afdf77886f9bd6d6b3d22e8c00b08b25a03a17","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.1.0_1787292252525_0.41927162586672573","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@ashafizullah/dsh-telegram","version":"0.2.0","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.2.0","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"8e06b4e6d0418e435e6cb5824ab48eb4365d0851","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.2.0.tgz","fileCount":143,"integrity":"sha512-KTxWLt62vPjlcN4zRY8X9VrmKJDwXqM1vi9j+Tp0Gw8GhPMHDaUgS+sVl2nIvYwsJMW5y2scl4XuQBoWiM6PyQ==","signatures":[{"sig":"MEUCIGyu6EXRHX0zt8bqlMkWm+yf06ik5Zs/WdkiZLsN4ENnAiEAodOs62cqkQilaUAjYQQKCqHBXErmkqEkYOLWuTmHoIY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":522033},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"baec62ddb44feab9c8305cf0a98d76c1703bf800","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.2.0_1787296357160_0.46631337464413636","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@ashafizullah/dsh-telegram","version":"0.2.1","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.2.1","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"6431ccdee71603dd8fbcaa6379b6188cdbf774b9","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.2.1.tgz","fileCount":147,"integrity":"sha512-1ia69SG9sjyvkQne8Hu3nbIAwm+4HcIwX66+RcxWNdv0+WUpY+JfmMb8SH5IyKCYhL329tEVktkBPu3DrTN8mA==","signatures":[{"sig":"MEYCIQDqk3Yj0nyvfM0b9IUNfV6IiQhomjcVmqDwNsroWvEguQIhAM401gGZcJBH2KohCiE1tuAUd7al4mmcJrm6LjDCP+PC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":542687},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"c8e6e432d8134c440c037554ec5b61d0a21343e4","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.2.1_1787297017750_0.09821730016441599","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@ashafizullah/dsh-telegram","version":"0.2.2","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.2.2","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"76fc74af7e54d05d95e55a155960015a3234027e","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.2.2.tgz","fileCount":147,"integrity":"sha512-kvGF0We4AwFP/DpDDEPXva2iwj//LwlOJgj8YKMhqrS8onXg6fxR2gC9LlO9oa9P6LtIPZ9eV9TxCwotPa+e1g==","signatures":[{"sig":"MEUCIQD3PBahYmnYQyD4Qs3PIkIL9l3B8wDbr/2eMf3VPZYA7AIgM7IBaBBekpLI8n8Dlar1P5Un874fUheCLeM10fj/VjA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":553478},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"6111b640d13b3bd93489c30a70632378d8816096","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.2.2_1787299405141_0.33253248641506095","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@ashafizullah/dsh-telegram","version":"0.3.0","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.3.0","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"246314b4b18d852f391b497028d4d6ccad46ea61","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.3.0.tgz","fileCount":187,"integrity":"sha512-XItci9x1khkvaUR0yLigd1JZHWheYXgM0tDZLf4kypNm9a8cP22ngRkFjIbSBx4KM0F1xuJX/FpKZolRFfJqxA==","signatures":[{"sig":"MEYCIQCh7E9oZNWvgYOMVMJyIDoz5CzPfhRdl5tpqb9rtXsJUgIhALDv7G/AOq4+PqVh7frUU/aSHXGEhwI02syJZZ+/MFii","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":776286},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"52ee652b361b67f9ed4925904fd6407edd4494ef","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.3.0_1787306470062_0.9520510397514523","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@ashafizullah/dsh-telegram","version":"0.4.0","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.4.0","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"f248cc8eca16f68843d358279f55bcb77a024274","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.4.0.tgz","fileCount":191,"integrity":"sha512-u0ZCbUGq1T2f2hScuwxi+GmZ9871Y7LrIjGbnJW7CEb9mAf827yLrWwNts50I6jWLmsjSG14+IEwY+YemnpIaA==","signatures":[{"sig":"MEUCICDOIKHty3vSqy5KnixcMLbFueUvcZauSu7rGomUiBrfAiEA8S3DXETIBiMJnbdM0zrjKKJVDJDudWR8IEE1StRf0O8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":804749},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"b07ee9982bb85178d1004cbc5d995f958780ded6","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.4.0_1787307565460_0.12684422490533387","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@ashafizullah/dsh-telegram","version":"0.5.0","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","_id":"@ashafizullah/dsh-telegram@0.5.0","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"],"platform":"web"}},"dist":{"shasum":"32be87508537738fbf0bd44094dfc8bf095c46e6","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.5.0.tgz","fileCount":195,"integrity":"sha512-d3YdI58OimMvwtXCCsOd8TA3c440C4VO+puD/N0qY+rqxzvvejbMjpocMo7I4rgnETwb5/xxceGk7h2Z/y7P8Q==","signatures":[{"sig":"MEQCIDLphEdZoym+wUf3wrbvBJS/pfpGedgaWgGVPGqOAR6bAiAuz5+F5FtnGIkdxBsGBVr0XfqwbUEyLBal/exsXG0qrA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":850058},"main":"./lib/index.js","pnpm":{"onlyBuiltDependencies":["esbuild"]},"type":"module","types":"./lib/index.d.ts","engines":{"node":">=22"},"exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./client":{"default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"a3062dfbbc55da839f4fc9e1d647d696ffea57f7","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json && node build.client.mjs","clean":"rm -rf lib","coverage":"vitest run --coverage","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test:watch":"vitest","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"_npmUser":{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"},"repository":{"url":"git+https://github.com/ashafizullah/dsh-telegram.git","type":"git"},"_npmVersion":"11.6.2","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"react":"^18.3.1","vitest":"^3.2.0","esbuild":"^0.28.2","typescript":"^5.9.0","@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dsh-telegram_0.5.0_1787320933339_0.6989502657909996","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@ashafizullah/dsh-telegram","version":"0.5.1","description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","type":"module","license":"MIT","engines":{"node":">=22"},"main":"./lib/index.js","types":"./lib/index.d.ts","exports":{".":{"types":"./lib/index.d.ts","default":"./lib/index.js"},"./package.json":"./package.json","./client":{"default":"./lib/client.js"}},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime","@deepseek-ai/dsh-client-locale","@deepseek-ai/dsh-client-ui-settings","@deepseek-ai/dsh-client-connection","@deepseek-ai/dsh-api-remotes"]}},"scripts":{"build":"tsc -p tsconfig.json && node build.client.mjs","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json","test":"vitest run","test:watch":"vitest","coverage":"vitest run --coverage","clean":"rm -rf lib","prepublishOnly":"pnpm typecheck && pnpm test && pnpm build"},"dependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/schemastery":"^3.0.0"},"devDependencies":{"@types/node":"^22.0.0","@types/react":"^18.3.31","@vitest/coverage-v8":"^3.2.0","esbuild":"^0.28.2","react":"^18.3.1","typescript":"^5.9.0","vitest":"^3.2.0"},"pnpm":{"onlyBuiltDependencies":["esbuild"]},"repository":{"type":"git","url":"git+https://github.com/ashafizullah/dsh-telegram.git"},"homepage":"https://github.com/ashafizullah/dsh-telegram#readme","bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"author":{"name":"Adam Suchiha Fizullah"},"keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"publishConfig":{"access":"public"},"packageManager":"pnpm@10.32.1","gitHead":"596ef74b4fb9536aaae9981035240be4ef8a9acd","_id":"@ashafizullah/dsh-telegram@0.5.1","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-/bFEveB+vafAFoM2MW6vTCTPEHBMDnblAfKaFIs221Jh27cvfFrtHyhwi5vzxByqeoqMN/g/2I23+gI4NU1lLg==","shasum":"ead25769c8673fb9f6632c1e7dd6a64693e51bc1","tarball":"https://registry.npmjs.org/@ashafizullah/dsh-telegram/-/dsh-telegram-0.5.1.tgz","fileCount":195,"unpackedSize":851584,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ashafizullah%2fdsh-telegram@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBD0oeGHsfWennOr+aKjoQtT6lFPIBGfMByjNzIXtVKBAiBsPiU/mzDwd6vby+N8N1zlfZXnKQeobeLbp6qIK5jyjw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a6f52710-abc4-44c5-a017-736e8ea40834"}},"directories":{},"maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-telegram_0.5.1_1787321479314_0.6628730674517611"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-21T06:04:12.328Z","modified":"2026-08-21T14:11:19.840Z","0.1.0":"2026-08-21T06:04:12.665Z","0.2.0":"2026-08-21T07:12:37.317Z","0.2.1":"2026-08-21T07:23:37.935Z","0.2.2":"2026-08-21T08:03:25.284Z","0.3.0":"2026-08-21T10:01:10.219Z","0.4.0":"2026-08-21T10:19:25.616Z","0.5.0":"2026-08-21T14:02:13.512Z","0.5.1":"2026-08-21T14:11:19.480Z"},"bugs":{"url":"https://github.com/ashafizullah/dsh-telegram/issues"},"author":{"name":"Adam Suchiha Fizullah"},"license":"MIT","homepage":"https://github.com/ashafizullah/dsh-telegram#readme","keywords":["deepseek-harness","dsh","dsh-plugin","telegram","telegram-bot","agent","chatops"],"repository":{"type":"git","url":"git+https://github.com/ashafizullah/dsh-telegram.git"},"description":"Telegram channel for DeepSeek Harness — real Telegram markdown, and answer the agent's questions and approvals straight from chat","maintainers":[{"name":"ashafizullah","email":"adamsuchihafizullah@gmail.com"}],"readme":"<div align=\"center\">\n\n<h1>dsh-telegram</h1>\n\n<p><strong>在 Telegram 上与你的 Agent 对话——并且在它提问时，真的能够回答。</strong></p>\n\n<p>\n  <a href=\"https://github.com/ashafizullah/dsh-telegram/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/ashafizullah/dsh-telegram/actions/workflows/ci.yml/badge.svg\"></a>\n  <a href=\"https://www.npmjs.com/package/@ashafizullah/dsh-telegram\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/%40ashafizullah/dsh-telegram?logo=npm&logoColor=white&color=cb3837\"></a>\n  <a href=\"LICENSE\"><img alt=\"license\" src=\"https://img.shields.io/npm/l/%40ashafizullah/dsh-telegram?color=3da639\"></a>\n  <a href=\"package.json\"><img alt=\"node\" src=\"https://img.shields.io/node/v/%40ashafizullah/dsh-telegram?logo=node.js&logoColor=white&color=5fa04e\"></a>\n  <a href=\"https://core.telegram.org/bots/api\"><img alt=\"Bot API\" src=\"https://img.shields.io/badge/Bot%20API-10.1%2B-2ca5e0?logo=telegram&logoColor=white\"></a>\n  <a href=\"https://github.com/deepseek-ai/deepseek-harness\"><img alt=\"DeepSeek Harness\" src=\"https://img.shields.io/badge/DeepSeek-Harness-4d6bfe\"></a>\n</p>\n\n<p><a href=\"README.md\">English</a> · <a href=\"README.id.md\">Bahasa Indonesia</a> · <strong>中文</strong></p>\n\n</div>\n\n[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的 Telegram 前端。\n\n在手机上与你的 Agent 对话——并且在它提问时，真的能够*回答*。\n\n## 为什么需要它\n\n用聊天软件驱动 Agent，会在两个具体的地方卡住，这个插件就是为了解决它们。\n\n**Agent 写的是 markdown，而 Telegram 收到的是原文。** 模型的回答里有\n`**粗体**`、标题、表格、任务清单和代码块。以纯文本发送时，这些全都变成了字面\n上的星号和竖线。\n\n从 Bot API 10.1 起，Telegram 自己会解析 markdown，因此本插件通过\n`sendRichMessage` 几乎原样转发 Agent 的回复——表格显示为表格，清单显示为清单\n——同时消息上限也从 4096 提升到 32768 个字符。\n\n**Agent 会提问，却没有地方回答。** 当 Agent 调用 `ask_user_question`，或某个工\n具需要你的许可时，harness 会阻塞并等待某个 UI 作答。而这件事以前只有浏览器能\n做。完全发生在 Telegram 里的对话，会在第一个提问处停住，且无从解开。本插件把自\n己注册为那个 UI，于是提问与授权都以按钮的形式出现在聊天里。\n\n## 前置要求\n\n- 一个可以添加插件的 DeepSeek Harness profile\n- **Bot API 10.1 或更高版本**，用于 `sendRichMessage` 与 `sendRichMessageDraft`\n- Node 22 或更高版本\n\n没有 HTML 回退路径。Telegram 的 rich markdown 解析器是宽容的——未闭合的代码围栏\n或一行散乱的标记都会被接受而非拒绝——所以流式过程中的中间帧并不需要回退。\n\n## 安装\n\n```bash\nnpx @deepseek-ai/dsh plugin --profile web add -w @ashafizullah/dsh-telegram\n```\n\n或者从源码检出，以便在其之上开发：\n\n```bash\ngit clone https://github.com/ashafizullah/dsh-telegram.git\ncd dsh-telegram\npnpm install && pnpm build\n\nnpx @deepseek-ai/dsh plugin --profile web add -w \"$(pwd)\"\n```\n\n然后给它一个机器人 Token。用 [@BotFather](https://t.me/BotFather) 创建机器人，\n并把 Token 存放在凭据引用之下——永远不要写进配置文件：\n\n```bash\nnpx @deepseek-ai/dsh credentials set TELEGRAM_BOT_TOKEN\n```\n\n启动 profile，控制台会打印一个认领码：\n\n```\n[dsh-telegram] this bot has no owner yet. Message @your_bot with:\n\n    /claim 3f9a2b1c\n```\n\n把它发给你的机器人，它就归你了。在此之前，它不回应任何人。\n\n该认领码同时会以仅属主可读的权限写入\n`$DSH_HOME/dsh-telegram/claim-code.txt`，因为有些 profile 根本没有组合任何控制\n台输出，而一个没人能读到的认领码会让机器人永远无法使用。\n\n## 访问控制\n\n任何知道句柄的人都能找到一个 Telegram 机器人，而它背后的 Agent 能在你的机器上\n执行 shell 命令。因此默认是关闭的。\n\n- **认领流程**（默认）：第一个发送控制台认领码的人成为属主。所有权是持久且一次\n  性的——即使拿着正确的码，后来的认领也会被拒绝，所以事后泄露的码毫无用处。\n- **允许名单**：把 `allowFrom` 设为一组 Telegram 用户 ID，即可完全跳过认领。用\n  `/whoami` 查看自己的 ID。\n\n认领码每次重启都会更换，且从不经由 Telegram 发送。\n\n访问检查先于其它一切进行，因此未经授权的文本不会到达 Agent——连命令也不会。\n\n## 命令\n\n| 命令 | 作用 |\n| --- | --- |\n| `/start` | 这个机器人是什么，以及你是否可以使用它 |\n| `/help` | 列出所有命令 |\n| `/claim <码>` | 认领一个尚未被认领的机器人 |\n| `/new` | 开始新对话，忘掉当前这一段 |\n| `/cd [路径]` | 查看或切换工作目录 |\n| `/model [名称]` | 查看模型、`/model list`，或切换到某一个 |\n| `/effort [强度]` | 查看或调整模型思考的深度 |\n| `/vision [名称]` | 查看、更换或关闭负责读图的模型 |\n| `/permission [名称]` | 查看或调整 Agent 在这里被允许做什么 |\n| `/diag` | 插件对自身的观察，以及最近的失败 |\n| `/screenshot` | 发送 harness 所在机器的屏幕截图 |\n| `/sessions` | 继续这个聊天里较早的一段对话 |\n| `/status` | 会话 ID、工作目录，以及是否已加载 |\n| `/stop` | 取消 Agent 当前正在做的事 |\n| `/whoami` | 你的 Telegram 用户 ID |\n\n### 在群里\n\n一个每句话都要接的机器人，没人愿意留在群里。所以在群里它只在被 @提及或被回复时\n才作答——这也正是大家已经在用的惯例。它自己的 @提及会在进入提示词前被去掉，因为\n那是称呼而不是内容；而回复它说过的话可以继续这段交流，无需每行都 @一次。私聊不\n受影响。想要旧行为，把 `requireMentionInGroups` 设为 `false`。\n\n@提及是跟 Telegram 自己解析出的区间比对的，而不是在文本里搜索：\n`@mybot_staging` 里含有 `@mybot`，用子串匹配会让这个机器人抢答另一个机器人的\n@提及。\n\n### Agent 被允许做什么\n\n部署会为它运行的一切选定一个权限默认值，而这个选择通常是对着网页界面做的：\n仅回环访问，有人在旁边看着。Telegram 机器人不是这样——它从任何地方都能被联系到，\n只靠一份用户 ID 名单把关。所以同样的 `danger-full-access`，在那里意味着完全不同\n的东西。`permissionPreset` 从部署自己的表里挑一个，只作用于 Telegram 对话。\n\n它同时决定审批按钮能否工作：在审批策略为 `never` 的 preset 下，永远不会有人来\n请求许可，按钮也就永远不会出现。选一个会询问的 preset，才是把它们打开。\n\n### 屏幕截图\n\n`/screenshot` 会把 harness 所在机器正在显示的画面发过来。这正是这个机器人存在的\n理由，只不过用在了屏幕本身上：机器在桌上，而你不在——否则想看看那个跑了很久的构建\n现在显示到哪了，就得走回键盘前。\n\n它**默认关闭**，而且这个开关刻意放在部署设置里，而不是做成聊天命令。屏幕上有什么\n就会拍到什么——打开着的密码管理器、别人的消息、毫不相干的客户数据——而这是这里唯一\n一件不经过 Agent 就把本机内容发往外部的事。打开它，理应需要与配置这个机器人相同的\n权限。\n\nmacOS 还需要给运行 harness 的进程「屏幕录制」权限。没有它，`screencapture` **仍会\n成功**，只是返回一张没有任何窗口的桌面图——看起来像功能坏了，其实只是缺权限。所以\n这种情况会被明确说出来，而不是含糊带过。请在 系统设置 → 隐私与安全性 → 屏幕录制\n中授权，然后重启 harness。\n\n超过 Telegram 10 MB 照片上限的截图会改以文件形式发送，那条通道可到 50 MB——大尺寸\n显示器的 PNG 经常需要。\n\n### 思考强度，以及被允许做什么\n\n`/effort` 显示模型思考得多深，并列出**这个模型**提供的档位——档位是从模型自己读来\n的，因为 `low`/`medium`/`high` 只是某一家供应方的说法，而不是所有人的；提供一个\n模型没有的档位，失败的会是这个回合，而不只是这条命令。`/effort default` 可以还原。\n\n`/permission` 显示 Agent 在这里被允许做什么，并可切换：`read-only`、\n`workspace-write`、`danger-full-access`，或者你的部署定义的任何其他名字——名字读\n自它自己的表，而不是写死在这里。拼写很宽松，`full access`、`full-access` 和\n`readonly` 都能命中；而同时匹配两个 preset 的简写会被拒绝，而不是靠猜。改动对正在\n进行的对话同样生效，因为人们收紧权限的理由，通常正是马上要跑的那个回合。\n\n这几项都按对话生效，并且叠在设置页面所配置的东西**之上**。这意味着有两个界面在展示\n相关状态，所以命令会说明是哪一层在回答：一旦某个对话自己做了选择，它的回复就会一并\n说出底下的部署默认值。没有这句，设置页面读起来就像在撒谎——它显示一个值，而聊天里\n在按另一个值行事，两者之间毫无关联。`/… default` 会把对话交还给部署默认值。\n\n`/status` 用一条消息回答全部——会话、目录、模型、思考强度、权限——因为为了搞清楚\n自己在跟什么说话而要敲四条命令，是四条太多了。\n\n### 用哪个模型，以及哪一段对话\n\n`/model` 告诉你当前对话用的是哪个模型，`/model list` 列出已配置的，\n`/model provider/model` 则切换。当只有一个供应方提供某个模型 id 时，直接写它就\n够了；有多个时，它会反问是哪一个。与 `/cd` 不同，这不会重启任何东西——harness 在\n组装每一步时都会读取一份可变的选择，所以改动会落在下一条消息上，历史完好无损。\n`/model default` 把对话交还给部署默认值。\n\n`/sessions` 把这个聊天里较早的对话做成按钮供你挑选。在此之前 `/new` 是一扇单向\n门：harness 保留了每一份日志，但指向当前对话的绑定被替换掉了，从手机上再没有别的\n路回去。这份列表属于本插件自己，因此装的是这个聊天里的对话——而不是网页界面开过\n的每一个会话。\n\n### Agent 有哪些工具\n\n工具由 preset 提供。注册表本身属于 host 平面，但几乎每一个面向模型的行——bash、\n编辑器、grep、skills、子代理、todo、计划模式——都注册在某个 **preset** 的 scope\n层里。因此没有加入任何 preset 的 agent，到达模型时只带着 host 组合中全局注册的那\n些。Telegram 会话按部署的默认 preset 组合，或在指定了 `agentPreset` 时按它组合，\n并把该选择记入会话头，好让之后的读取者解析到同一套组合。\n\n### Agent 在哪里工作\n\n`/cd` 不带参数会告诉你当前对话在哪；`/cd ~/projects/app` 则把它移过去。绝对路径、\n`~`、以及相对当前位置的路径都可以用，粘贴进来的路径会自动去掉引号。\n\n移动目录会开启一段新对话，机器人也会明说。这不是偷懒：沙箱的可写根目录来自会话的\n工作目录，而这个根在会话打开时就已固定——所以切换目录在构造上就等于换一个会话。\n你的选择按聊天记住，`/new` 和重启都不会丢。这正是它与 `/new` 会丢弃的会话绑定分开\n存放的原因。\n\n目录不存在、目标其实是个文件、以及读不到，是三种不同的错误，会得到三种不同的说明。\n三种情况都让对话原地不动。\n\n每次连接时这份列表都会注册到 Telegram，所以在聊天里输入 `/` 就会看到命令提示和\n各自的说明。机器人一旦有了主人，`/claim` 就会从列表里消失——它是唯一一个成功之后\n便不再有用的命令。\n\n除此之外你输入的任何内容，都会作为提示词交给 Agent。\n\n## 你可以发送什么\n\n| 你发送 | Agent 收到 |\n| --- | --- |\n| 文本 | 提示词本身 |\n| 照片，或以文件形式发送的图片 | 视觉模型读出的内容，以及你的说明文字 |\n| 一次发多张照片 | 全部合成一条消息，附在你的说明文字下 |\n| 文本文件——日志、堆栈、源码 | 其内容进入提示词，过长时会被截断 |\n| 语音、音频或视频 | 一句说明：无法读取 |\n\n图片经由 harness 的附件接缝，它接受 PNG、JPEG、WebP 和 GIF。其余类型被官方明确\n搁置，因此本插件会直言相告，而不是收下消息再悄悄丢掉其中的内容。\n\n该接缝还会拒绝最长边超过 `maxImageDimension`（默认 2000 像素）的图片——而**每一张**\n满屏的手机截图都超过它：iPhone 是 1179×2556，多数 Android 是 1080×2400。Telegram\n会为一张照片渲染多个尺寸，因此这里选的是**放得下**的最大尺寸，而不是现有的最大\n尺寸；限制值直接从 store 本身读取，不再另存一份会走样的数字。若接缝仍然拒绝，就\n退到下一个更小的尺寸。至于以文件形式发送的图片——只有一个尺寸，无处可退——拒绝\n信息会说明限制是多少，并提示改用照片方式发送，让 Telegram 提供较小的副本。\n\n文件过大或下载失败时，会变成提示词里的一句说明——无论如何，你的说明文字仍会到达\nAgent。\n\n### 一次发好几张\n\nTelegram 没有「一条消息里放多张照片」这回事。相册会作为 N 条独立更新到达，彼此之间\n只靠一个共享 id 连着，而说明文字只挂在其中**一条**上——所以三张截图以前会变成三个\n回合，其中两个是 Agent 无从下手的裸图片。\n\n现在属于相册的消息会先被暂存而不是立即作答，等相册不再增长，整组作为一条提示词送\n出去：你的说明文字，然后是全部图片。这点等待只由相册承担，且每个相册只付一次——比\n把同一个问题回答三遍划算得多。\n\n### 模型必须看得见\n\n不声明图片输入的模型会拒绝**整个**请求，因此图片在发送前会对照\n`inputModalities` 做检查。**没有任何 DeepSeek 模型接受图片**——\n`deepseek-v4-flash` 与 `deepseek-v4-pro` 都是纯文本——所以开箱即用的情况下，截\n图会被婉拒，并附上一句说明什么才可行，而你的说明文字仍会到达 Agent。\n\n**设置 → Telegram → 附件** 提供一个下拉框，列出你已在 设置 → Models 中配置好的\n模型。选一个，图片就能被读取了。\n\n`/vision` 用来选择由哪个模型在这里读图，或者用 `/vision off` 把读图整个关掉。\n「关掉」是一个真正的答案，而不是答案的缺席：对话本身能看见的时候，它不需要任何读图\n者，而这个表态必须压过部署层面的任何配置。和其他几项一样，它按对话生效，并且能挺过\n`/new`。\n\n**如果对话本身用的模型就能读图，下面这一切都不会发生。** 图片会直接送进去，由模型\n自己去看。自 DeepSeek 发布 `deepseek-v4-flash-vision-exp` 起，这已是一个现实的选项\n——而且当截图不只是文字时，它是更好的那个：转写会丢掉图表、曲线、错位的布局，也就是\n你真正在问的东西。\n\n下面这层间接之所以存在，是因为供应方会检查整个请求历史，图片会把对话绑定到一个看得\n见的模型上。而当那个模型**正是**你选的那个，就没有什么需要挣脱，也没有什么需要绕开\n——于是读取、谢绝、以及粘住的路由会一起退场。\n\n图片本身从不进入你的对话。它会被发到该模型上的一个一次性会话，被要求转写其中的\n每一处文字，并简要描述这是什么；回答以普通文本返回，**那才是**你的对话所收到的\n内容，就放在你自己的说明文字下面。那个会话随后即被销毁——它只活一个回合。\n\n这一层间接正是关键。供应方会检查整个请求历史中的图片，所以留在对话里的一张图片\n会把这段对话终身绑定到一个看得见图片的模型上：一张截图之后，后续每一个回合——\n无论其文字多么普通——都得跟着跑到那里，远离你选定的模型和围绕它配置的工具。把\n图片放到别处去读，历史中就始终没有图片，对话因而留在原处、保有工具，也永远不会\n卡住。\n\n如果根本没有配置视觉模型，这条路径压根不会被走到：图片在下载之前就被谢绝，并附上\n一句说明哪些模型本可胜任，而你的说明文字仍会到达 Agent。\n\n如果读取已经尝试但失败了——模型无法连接，或该回合在两分钟后超时——图片就按原样\n发出，改为让对话迁移到视觉模型上，并持久生效，直到 `/new`。那是退路而非设计，\n提示词里会说明发生了哪一种情况。\n\n浏览器能读到的模型目录不携带模态信息，所以下拉框无法标出哪些模型接受图片。这项\n检查交由 host 在图片真正发送时进行，那是唯一能给出确定答案的地方。视觉模型通过\n承载它们的供应方进入 harness，例如在 设置 → Models 中添加的\nOpenAI-compatible 路由，其模型条目声明了 `input: [text, image]`。\n\n### 当没有模型能看时\n\n在没有配置视觉模型时，图片过去会被直接谢绝，你得到的是一句关于模型配置的说明，而\n不是关于这张图的任何信息。现在，只要装了 `tesseract`，就改为读取其中的文字。\n\n它是退路，而且它自己会这么说。OCR 读的是**文字**，它并不「看见」。报错、日志或收据\n的截图会读得很干净——文字清晰、对比度高、没有透视，正是它最擅长的情形；而白板、\n架构图或图表则只会变成一堆散落的词，没有任何东西能说明这张图是什么。因此读出的内容\n无论去到哪里都会被标注为 OCR：把未加标注的 OCR 交给 Agent，它会把读错的数字当成\n事实，而收据上的金额恰恰是最容易读错的。\n\ntesseract 从不被假定存在。没有任何一个运行本插件的操作系统自带它，因此它的缺席才是\n常态：只探测一次，缺失时旧的谢绝依然生效——只是现在会同时说明**两条**出路。\n`/diag` 会告诉你这台机器有哪一条。\n\n同一条退路也覆盖「配置了视觉模型但连不上」的情形，理由相同：读出文字总好过什么都不\n返回。\n\n拉丁字母仅用 `eng` 就读得不错——印尼语、数字、日期和金额都能穿过——所以\n`media.ocr.languages` 只有在换一种书写系统时才需要改。`tesseract --list-langs` 会\n列出已安装的语言。\n\n### 当对话卡住时\n\n有一类失败重试永远无法解决——最常见的正是上面那种：早先的某条消息携带了当前模型\n不接受的内容，而你接下来输入什么都无济于事。机器人会识别这类失败，说明失败原\n因，并给出一个开启新对话的按钮。让用户去记住 `/new`，等于让他们替插件做诊断。\n\n可能自行恢复的失败则不带按钮上报，因为对那些失败来说，重试确实是正确的做法。\n\n## 配置\n\n在 harness 的网页界面中打开 **设置 → Telegram**。该页面直接写入设置文档——没有\n保存按钮，因为 host 通过重新连接来应用已提交的更改，而一个暂存改动的表单会让页\n面和正在运行的机器人对\"当前配置是什么\"产生分歧。\n\n机器人 Token 是例外。它是机密，因此从不经由设置通道来回传输：页面只知道是否已\n存有 Token，通过 credentials 域写入它，并且对于环境变量已经提供的引用拒绝提供编\n辑——在那里写入会看似成功，而解析仍旧返回环境变量中的值。\n\n页面上的每一项，同样可以在 profile patch 中设置，供以文件方式配置的部署使用。\n\n## 配置项\n\n每个字段都有可用的默认值；配置为空也能运行。\n\n| 键 | 默认值 | 含义 |\n| --- | --- | --- |\n| `enabled` | `true` | 连接是否随 harness 一同启动 |\n| `tokenRef` | `TELEGRAM_BOT_TOKEN` | 存放 Token 的凭据引用名 |\n| `baseUrl` | `https://api.telegram.org` | Bot API 源站；仅在使用代理时修改 |\n| `allowFrom` | `[]` | 允许的用户 ID；留空则启用认领流程 |\n| `cwd` | harness 的 cwd | 对话的起始目录，直到用 `/cd` 切换 |\n| `agentPreset` | `\"\"` | Telegram 对话所用的 preset；留空则取部署默认值。工具正是由 preset 提供 |\n| `permissionPreset` | `\"\"` | Telegram 使用的权限 preset，取自部署自己的表；留空则跟随部署默认值 |\n| `requireMentionInGroups` | `true` | 在群里，只有被 @提及或被回复时才作答 |\n| `screenshot.enabled` | `false` | 允许 `/screenshot`。默认关闭；macOS 还需要「屏幕录制」权限 |\n| `streaming.enabled` | `true` | 边生成边显示回答 |\n| `streaming.throttleMs` | `1200` | 两帧之间的最小间隔 |\n| `timeoutMs` | `30000` | 单次 Bot API 请求的超时时间 |\n| `longPollSeconds` | `25` | Telegram 保持空轮询打开的时长 |\n| `media.enabled` | `true` | 读取用户发送的图片和文本文件 |\n| `media.maxBytes` | `20 MB` | 超过则拒绝；Telegram 的机器人下载上限即在此 |\n| `media.maxTextChars` | `60000` | 内联文本文件截断到此字符数 |\n| `media.ocr.enabled` | `true` | 没有视觉模型时，用 tesseract 读取图片中的文字。未安装 tesseract 则不起作用 |\n| `media.ocr.languages` | `eng` | tesseract 读取的语言；多个用 `+` 连接。只有已安装的才可用 |\n| `media.visionModel` | `\"\"` | 在独立会话中读取图片的 `provider/model`；留空则把图片直接发给对话本身 |\n| `reconnect.baseDelayMs` | `1000` | 第一次重连前的延迟 |\n| `reconnect.maxDelayMs` | `30000` | 重连之间的最长延迟 |\n\n## 诊断\n\n`/diag` 报告插件对自身的观察：连接状况、这个部署究竟组合了哪些 harness 接缝，以及\n最近二十件出错的事。\n\n它还会报告正在运行的版本，以及 npm 上是否有更新——只读，并缓存一小时，所以问第二遍\n不花任何代价。这里刻意**没有**配套的 `/update`：更新 harness 只有重启后才生效，而从\n运行在其中的插件里重启，等于杀掉正在回答你的那个进程——在没有守护进程的机器上，没有\n任何东西会把它拉起来。知道自己落后了是有用的那一半；动手则该在你能盯着的地方做。\n\n接缝列表是其中最有用的部分。缺席的接缝能一眼解释一整类「它为什么不会做那个」，\n不需要任何人去猜——缺少 `agentPresets` 正是 Telegram agent 曾经到达模型时几乎没有\n工具的原因，而当时没有任何地方说出这件事。\n\n`ctx.logger` 写往部署所组合的任何输出端，而有些 profile 一个都没有组合——因此一\n个只把失败写进日志的插件，实际上是沉默的。本插件还会在每次状态变化时把自身状态\n写入 `$DSH_HOME/dsh-telegram/status.json`：\n\n```json\n{ \"state\": \"connected\", \"bot\": \"your_bot\", \"updatedAt\": \"...\" }\n```\n\n`connecting`、`connected`、带原因的 `idle`、带原因的 `failed`。机器人 Token 绝不\n会出现在其中。\n\n## 与网页界面共存\n\nharness 只允许**一个** user-questions provider，而在同时运行网页应用的 profile\n中，浏览器已经占用了它。本插件接管该位置，并把浏览器的 provider 保留为回退：属\n于浏览器会话的提问会被原样转交回去，属于 Telegram 对话的提问则变成聊天里的按\n钮。卸载本插件会把先前的安排原样恢复。\n\n授权本身是可组合的——harness 以 waterfall 方式运行它们——因此本插件只为自己的会\n话作答，其余一律向后传递。\n\n## 各部分如何衔接\n\n```\nTelegram Bot API\n      │  长轮询：message + callback_query\n      ▼\nUpdatePoller ──► UpdateRouter ──┬──► SessionRunner ──► ctx.agents\n                                │           │\n                                │           └──► VisionExtractor ──► 一次性会话\n                                ├──► MediaCollector ──► ctx.attachments\n                                ├──► TelegramQuestionProvider ──► ctx.userQuestions\n                                └──► TelegramApprovalAnswerer ──► approval/request\n\nctx.on('session/event') ──┬──► VisionExtractor   （它自己的读取会话）\n                          └──► TurnBridge ──► RichReplyStream ──► sendRichMessage\n\nTypingIndicator          （路由器与桥接持有，直到回复出现）\n```\n\n### 回复是如何流式呈现的\n\nTelegram 提供了两种机制，二者不可互换：\n\n- **私聊**使用 `sendRichMessageDraft`——一个临时预览，共享同一 draft id 的各帧之\n  间会有动画过渡。它在最后一帧之后 30 秒过期，因此在漫长的工具调用期间，会有一\n  个心跳重发当前文本；否则预览会消失，机器人看上去就像死了。草稿从不持久化，所\n  以一个回合以真正的 `sendRichMessage` 结束。\n- **群组没有草稿 API。** 那里就在回复写完时直接发送。\n\n两者最终都归于一条持久的 rich message。\n\n### 在有话可说之前，什么都不发\n\n等待期交给 Telegram 自己的 “正在输入…” 指示，回复只在真正有内容时才出现——第一批\n文字，或者 Agent 调用的工具名。回合一开就发出去的省略号，只是在告诉用户他们已经\n知道的事；在群里，它还是一条永久留存的消息。\n\n指示是**被持有**的，而不是发一次。`sendChatAction` 五秒即失效，比这里几乎所有值得\n等待的事都短——下载文件、在视觉模型上读取图片、排在上一个回合后面、或在某个工具\n调用里待上一分钟——所以单次调用读起来就像机器人启动后立刻死了。持有按会话计数，\n并在其自身有效期内重发，因此路由器读取附件时的持有与桥接随后那个回合的持有能干净\n地重叠，只有最后一个释放时才停止输入。另有十分钟的兜底，以防某次释放永远不来。\n\n任何一次重绘都不会比上一帧显示得更少。当一个工具跑完而正文还没出现时，那行工具名会\n一直留着，直到有真正的文字来替换它——Telegram 拒绝空草稿，所以另一种做法等于用一帧\n什么也没说的内容，换掉刚刚发生过的事。\n\n在 Agent 工作期间，正在运行的工具会以 `<tg-thinking>` 块显示在回复上方：\n\n```\n▸ bash: npm test\n\n目前我发现的是……\n```\n\nTelegram 只在草稿中接受该块，别处一概不接受，这与它的生命周期恰好吻合——回合被\n持久化时它就消失，于是最终回复承载的是答案，而不是产生答案的脚手架。它只有被截\n断的一行：一次工具调用的参数可能长达整个文件，而这里的目的是知道 Agent 还活着，\n不是阅读一份记录。\n\n## 开发\n\n```bash\npnpm install\npnpm test          # 598 个测试\npnpm test -- --coverage\npnpm typecheck     # host 与 browser 两半\npnpm build         # host 用 tsc，浏览器包用 esbuild\n```\n\n发布由 `.github/workflows/release.yml` 在推送 `v*` 标签时完成，走 npm 的可信发布：\nGitHub 通过 OIDC 证明该工作流的身份，npm 据此换发一份只在这一次发布期间有效的凭据。\n没有任何地方存放 token，也没有需要抢时间输入的一次性密码——当账号的第二因素是通行密钥\n而不是验证码时，这一点尤其重要。工作流会拒绝与 `package.json` 不一致的标签，因为那是\n它唯一可能悄无声息发布出去的错误。\n\n每个模块都能脱离 harness 运行，这正是测试套件跑得快的原因：插件入口是对着 Bot\nAPI 的真实 HTTP 桩来执行的，而浏览器包的物化方式与 shell 完全一致。\n\n### 浏览器那一半\n\n`build.client.mjs` 把 esbuild 产出的 CJS 包裹进 shell 的惰性 CJS 工厂信封\n(`window.__ModuleLoader__.load({ id, factory })`)。该信封是复现出来的而非引入\n的：harness 的 `clientBundle` 预设并未发布，其自身文档也把这一点列为对仓库之外\n插件的已知限制。\n\n因此这里是本插件唯一与内部格式耦合的地方，而 `test/client-bundle.test.ts` 将其\n钉住——该测试会执行构建、用桩 `require` 物化工厂，并检查 `apply` 是否占据了它的\n设置席位。若某个 harness 版本改变了该格式，失败会在那里以明确的名字出现，而不是\n表现为一个空白的设置页。\n\nReact 与 shell 自身的包被标记为 external；打包第二份 React 会在页面挂载的一瞬间\n破坏所有 hook。\n\n## 已知限制\n\n- **每个对话一个目录。** `/cd` 可以移动对话，但会话本身无法移动——切换目录会\n  开启一段新会话。\n- **暂不支持语音、音频或视频。** harness 的附件接缝只接受图片。\n\n## 许可证\n\nMIT\n","readmeFilename":"README.zh.md"}