Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
v0.2.6 — fix scope approval flow, approve_scope tool, Node 18 compat
Salman Qureshif959060f3233
diff --git a/package-lock.json b/package-lock.jsonindex 6192cf43..178b8226 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,30 +1,27 @@{- "name": "mercury",- "version": "0.1.0",+ "name": "@cosmicstack/mercury-agent",+ "version": "0.2.6","lockfileVersion": 2,"requires": true,"packages": {"": {- "name": "mercury",- "version": "0.1.0",+ "name": "@cosmicstack/mercury-agent",+ "version": "0.2.6","license": "MIT","dependencies": {"@ai-sdk/anthropic": "^1.2.0","@ai-sdk/openai": "^1.3.0","@grammyjs/auto-retry": "^2.0.2",- "@grammyjs/stream": "^1.0.1","ai": "^4.3.0","chalk": "^5.4.0",- "commander": "^13.1.0",+ "commander": "^12.1.0","dotenv": "^16.4.7","figlet": "^1.11.0","grammy": "^1.42.0",- "ink": "^5.2.0","js-tiktoken": "^1.0.19","marked": "^14.1.4","node-cron": "^3.0.3","pino": "^9.6.0",- "react": "^18.3.1","yaml": "^2.7.0","zod": "^3.25.76"},@@ -40,7 +37,7 @@"vitest": "^3.0.0"},"engines": {- "node": ">=20.0.0"+ "node": ">=18.0.0"}},"node_modules/@ai-sdk/anthropic": {@@ -139,18 +136,6 @@"zod": "^3.23.8"}},- "node_modules/@alcalzone/ansi-tokenize": {- "version": "0.1.3",- "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.1.3.tgz",- "integrity": "sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw==",- "dependencies": {- "ansi-styles": "^6.2.1",- "is-fullwidth-code-point": "^4.0.0"- },- "engines": {- "node": ">=14.13.1"- }- },"node_modules/@esbuild/aix-ppc64": {"version": "0.27.7","resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",@@ -581,20 +566,6 @@"grammy": "^1.10.0"}},- "node_modules/@grammyjs/stream": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@grammyjs/stream/-/stream-1.0.1.tgz",- "integrity": "sha512-L1hKvKdI1odWa2mRzfcEP8TdZPjgzHaATE2t2SFpSyikXCViVIEzKjZcM6tDRZFce4uzqckkN5tRM8WPW/1BUg==",- "dependencies": {- "abort-controller": "^3.0.0"- },- "engines": {- "node": ">=22"- },- "peerDependencies": {- "grammy": "^1.39.0"- }- },"node_modules/@grammyjs/types": {"version": "3.26.0","resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.26.0.tgz",@@ -1019,13 +990,13 @@"version": "15.7.15","resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz","integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",- "devOptional": true+ "dev": true},"node_modules/@types/react": {"version": "18.3.28","resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz","integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==",- "devOptional": true,+ "dev": true,"dependencies": {"@types/prop-types": "*","csstype": "^3.2.2"@@ -1187,42 +1158,6 @@}}},- "node_modules/ansi-escapes": {- "version": "7.3.0",- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz",- "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==",- "dependencies": {- "environment": "^1.0.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/ansi-regex": {- "version": "6.2.2",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",- "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/ansi-regex?sponsor=1"- }- },- "node_modules/ansi-styles": {- "version": "6.2.3",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/ansi-styles?sponsor=1"- }- },"node_modules/any-promise": {"version": "1.3.0","resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",@@ -1246,17 +1181,6 @@"node": ">=8.0.0"}},- "node_modules/auto-bind": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz",- "integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==",- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/base64-js": {"version": "1.5.1","resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",@@ -1351,76 +1275,10 @@"url": "https://paulmillr.com/funding/"}},- "node_modules/cli-boxes": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",- "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",- "engines": {- "node": ">=10"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/cli-cursor": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",- "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",- "dependencies": {- "restore-cursor": "^4.0.0"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/cli-truncate": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",- "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",- "dependencies": {- "slice-ansi": "^5.0.0",- "string-width": "^7.0.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/cli-truncate/node_modules/slice-ansi": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",- "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",- "dependencies": {- "ansi-styles": "^6.0.0",- "is-fullwidth-code-point": "^4.0.0"- },- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/slice-ansi?sponsor=1"- }- },- "node_modules/code-excerpt": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",- "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",- "dependencies": {- "convert-to-spaces": "^2.0.1"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- }- },"node_modules/commander": {- "version": "13.1.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",- "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==",+ "version": "12.1.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==","engines": {"node": ">=18"}@@ -1440,19 +1298,11 @@"node": "^14.18.0 || >=16.10.0"}},- "node_modules/convert-to-spaces": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",- "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- }- },"node_modules/csstype": {"version": "3.2.3","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz","integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",- "devOptional": true+ "dev": true},"node_modules/debug": {"version": "4.4.3",@@ -1503,33 +1353,12 @@"url": "https://dotenvx.com"}},- "node_modules/emoji-regex": {- "version": "10.6.0",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",- "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="- },- "node_modules/environment": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",- "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/es-module-lexer": {"version": "1.7.0","resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz","integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==","dev": true},- "node_modules/es-toolkit": {- "version": "1.45.1",- "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.45.1.tgz",- "integrity": "sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw=="- },"node_modules/esbuild": {"version": "0.27.7","resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",@@ -1571,14 +1400,6 @@"@esbuild/win32-x64": "0.27.7"}},- "node_modules/escape-string-regexp": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",- "engines": {- "node": ">=8"- }- },"node_modules/estree-walker": {"version": "3.0.3","resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",@@ -1669,17 +1490,6 @@"node": "^8.16.0 || ^10.6.0 || >=11.0.0"}},- "node_modules/get-east-asian-width": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz",- "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==",- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/grammy": {"version": "1.42.0","resolved": "https://registry.npmjs.org/grammy/-/grammy-1.42.0.tgz",@@ -1694,89 +1504,6 @@"node": "^12.20.0 || >=14.13.1"}},- "node_modules/indent-string": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/ink": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/ink/-/ink-5.2.1.tgz",- "integrity": "sha512-BqcUyWrG9zq5HIwW6JcfFHsIYebJkWWb4fczNah1goUO0vv5vneIlfwuS85twyJ5hYR/y18FlAYUxrO9ChIWVg==",- "dependencies": {- "@alcalzone/ansi-tokenize": "^0.1.3",- "ansi-escapes": "^7.0.0",- "ansi-styles": "^6.2.1",- "auto-bind": "^5.0.1",- "chalk": "^5.3.0",- "cli-boxes": "^3.0.0",- "cli-cursor": "^4.0.0",- "cli-truncate": "^4.0.0",- "code-excerpt": "^4.0.0",- "es-toolkit": "^1.22.0",- "indent-string": "^5.0.0",- "is-in-ci": "^1.0.0",- "patch-console": "^2.0.0",- "react-reconciler": "^0.29.0",- "scheduler": "^0.23.0",- "signal-exit": "^3.0.7",- "slice-ansi": "^7.1.0",- "stack-utils": "^2.0.6",- "string-width": "^7.2.0",- "type-fest": "^4.27.0",- "widest-line": "^5.0.0",- "wrap-ansi": "^9.0.0",- "ws": "^8.18.0",- "yoga-layout": "~3.2.1"- },- "engines": {- "node": ">=18"- },- "peerDependencies": {- "@types/react": ">=18.0.0",- "react": ">=18.0.0",- "react-devtools-core": "^4.19.1"- },- "peerDependenciesMeta": {- "@types/react": {- "optional": true- },- "react-devtools-core": {- "optional": true- }- }- },- "node_modules/is-fullwidth-code-point": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/is-in-ci": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-1.0.0.tgz",- "integrity": "sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==",- "bin": {- "is-in-ci": "cli.js"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/joycon": {"version": "3.1.1","resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",@@ -1797,7 +1524,8 @@"node_modules/js-tokens": {"version": "4.0.0","resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "peer": true},"node_modules/json-schema": {"version": "0.4.0",@@ -1851,6 +1579,7 @@"version": "1.4.0","resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz","integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "peer": true,"dependencies": {"js-tokens": "^3.0.0 || ^4.0.0"},@@ -1884,14 +1613,6 @@"node": ">= 18"}},- "node_modules/mimic-fn": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",- "engines": {- "node": ">=6"- }- },"node_modules/mlly": {"version": "1.8.2","resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",@@ -1984,28 +1705,6 @@"node": ">=14.0.0"}},- "node_modules/onetime": {- "version": "5.1.2",- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",- "dependencies": {- "mimic-fn": "^2.1.0"- },- "engines": {- "node": ">=6"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/patch-console": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz",- "integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA==",- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- }- },"node_modules/pathe": {"version": "2.0.3","resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",@@ -2187,6 +1886,7 @@"version": "18.3.1","resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz","integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",+ "peer": true,"dependencies": {"loose-envify": "^1.1.0"},@@ -2194,21 +1894,6 @@"node": ">=0.10.0"}},- "node_modules/react-reconciler": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz",- "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==",- "dependencies": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- },- "engines": {- "node": ">=0.10.0"- },- "peerDependencies": {- "react": "^18.3.1"- }- },"node_modules/readdirp": {"version": "4.1.2","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",@@ -2239,21 +1924,6 @@"node": ">=8"}},- "node_modules/restore-cursor": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",- "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",- "dependencies": {- "onetime": "^5.1.0",- "signal-exit": "^3.0.2"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/rollup": {"version": "4.60.2","resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz",@@ -2306,14 +1976,6 @@"node": ">=10"}},- "node_modules/scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "dependencies": {- "loose-envify": "^1.1.0"- }- },"node_modules/secure-json-parse": {"version": "2.7.0","resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",@@ -2325,40 +1987,6 @@"integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==","dev": true},- "node_modules/signal-exit": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="- },- "node_modules/slice-ansi": {- "version": "7.1.2",- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",- "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",- "dependencies": {- "ansi-styles": "^6.2.1",- "is-fullwidth-code-point": "^5.0.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/chalk/slice-ansi?sponsor=1"- }- },- "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": {- "version": "5.1.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",- "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",- "dependencies": {- "get-east-asian-width": "^1.3.1"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/sonic-boom": {"version": "4.2.1","resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz",@@ -2393,17 +2021,6 @@"node": ">= 10.x"}},- "node_modules/stack-utils": {- "version": "2.0.6",- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",- "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",- "dependencies": {- "escape-string-regexp": "^2.0.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/stackback": {"version": "0.0.2","resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",@@ -2416,36 +2033,6 @@"integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==","dev": true},- "node_modules/string-width": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",- "dependencies": {- "emoji-regex": "^10.3.0",- "get-east-asian-width": "^1.0.0",- "strip-ansi": "^7.1.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/strip-ansi": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",- "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",- "dependencies": {- "ansi-regex": "^6.2.2"- },- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/chalk/strip-ansi?sponsor=1"- }- },"node_modules/strip-literal": {"version": "3.1.0","resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz",@@ -2674,17 +2261,6 @@}}},- "node_modules/type-fest": {- "version": "4.41.0",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",- "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",- "engines": {- "node": ">=16"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/typescript": {"version": "5.9.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",@@ -3381,56 +2957,6 @@"node": ">=8"}},- "node_modules/widest-line": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-5.0.0.tgz",- "integrity": "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==",- "dependencies": {- "string-width": "^7.0.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/wrap-ansi": {- "version": "9.0.2",- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",- "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",- "dependencies": {- "ansi-styles": "^6.2.1",- "string-width": "^7.0.0",- "strip-ansi": "^7.1.0"- },- "engines": {- "node": ">=18"- },- "funding": {- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"- }- },- "node_modules/ws": {- "version": "8.20.0",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz",- "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==",- "engines": {- "node": ">=10.0.0"- },- "peerDependencies": {- "bufferutil": "^4.0.1",- "utf-8-validate": ">=5.0.2"- },- "peerDependenciesMeta": {- "bufferutil": {- "optional": true- },- "utf-8-validate": {- "optional": true- }- }- },"node_modules/yaml": {"version": "2.8.3","resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",@@ -3445,11 +2971,6 @@"url": "https://github.com/sponsors/eemeli"}},- "node_modules/yoga-layout": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz",- "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ=="- },"node_modules/zod": {"version": "3.25.76","resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",@@ -3525,15 +3046,6 @@"zod-to-json-schema": "^3.24.1"}},- "@alcalzone/ansi-tokenize": {- "version": "0.1.3",- "resolved": "https://registry.npmjs.org/@alcalzone/ansi-tokenize/-/ansi-tokenize-0.1.3.tgz",- "integrity": "sha512-3yWxPTq3UQ/FY9p1ErPxIyfT64elWaMvM9lIHnaqpyft63tkxodF5aUElYHrdisWve5cETkh1+KBw1yJuW0aRw==",- "requires": {- "ansi-styles": "^6.2.1",- "is-fullwidth-code-point": "^4.0.0"- }- },"@esbuild/aix-ppc64": {"version": "0.27.7","resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz",@@ -3724,14 +3236,6 @@"debug": "^4.3.4"}},- "@grammyjs/stream": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/@grammyjs/stream/-/stream-1.0.1.tgz",- "integrity": "sha512-L1hKvKdI1odWa2mRzfcEP8TdZPjgzHaATE2t2SFpSyikXCViVIEzKjZcM6tDRZFce4uzqckkN5tRM8WPW/1BUg==",- "requires": {- "abort-controller": "^3.0.0"- }- },"@grammyjs/types": {"version": "3.26.0","resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.26.0.tgz",@@ -4000,13 +3504,13 @@"version": "15.7.15","resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz","integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",- "devOptional": true+ "dev": true},"@types/react": {"version": "18.3.28","resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.28.tgz","integrity": "sha512-z9VXpC7MWrhfWipitjNdgCauoMLRdIILQsAEV+ZesIzBq/oUlxk0m3ApZuMFCXdnS4U7KrI+l3WRUEGQ8K1QKw==",- "devOptional": true,+ "dev": true,"requires": {"@types/prop-types": "*","csstype": "^3.2.2"@@ -4114,24 +3618,6 @@"jsondiffpatch": "0.6.0"}},- "ansi-escapes": {- "version": "7.3.0",- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz",- "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==",- "requires": {- "environment": "^1.0.0"- }- },- "ansi-regex": {- "version": "6.2.2",- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",- "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg=="- },- "ansi-styles": {- "version": "6.2.3",- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg=="- },"any-promise": {"version": "1.3.0","resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",@@ -4149,11 +3635,6 @@"resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz","integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ=="},- "auto-bind": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-5.0.1.tgz",- "integrity": "sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg=="- },"base64-js": {"version": "1.5.1","resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",@@ -4207,51 +3688,10 @@"readdirp": "^4.0.1"}},- "cli-boxes": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",- "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g=="- },- "cli-cursor": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",- "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",- "requires": {- "restore-cursor": "^4.0.0"- }- },- "cli-truncate": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",- "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",- "requires": {- "slice-ansi": "^5.0.0",- "string-width": "^7.0.0"- },- "dependencies": {- "slice-ansi": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",- "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",- "requires": {- "ansi-styles": "^6.0.0",- "is-fullwidth-code-point": "^4.0.0"- }- }- }- },- "code-excerpt": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",- "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",- "requires": {- "convert-to-spaces": "^2.0.1"- }- },"commander": {- "version": "13.1.0",- "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz",- "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="+ "version": "12.1.0",+ "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz",+ "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="},"confbox": {"version": "0.1.8",@@ -4265,16 +3705,11 @@"integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==","dev": true},- "convert-to-spaces": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",- "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ=="- },"csstype": {"version": "3.2.3","resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz","integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",- "devOptional": true+ "dev": true},"debug": {"version": "4.4.3",@@ -4305,27 +3740,12 @@"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz","integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="},- "emoji-regex": {- "version": "10.6.0",- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",- "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A=="- },- "environment": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",- "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q=="- },"es-module-lexer": {"version": "1.7.0","resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz","integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==","dev": true},- "es-toolkit": {- "version": "1.45.1",- "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.45.1.tgz",- "integrity": "sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw=="- },"esbuild": {"version": "0.27.7","resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz",@@ -4360,11 +3780,6 @@"@esbuild/win32-x64": "0.27.7"}},- "escape-string-regexp": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w=="- },"estree-walker": {"version": "3.0.3","resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz",@@ -4425,11 +3840,6 @@"dev": true,"optional": true},- "get-east-asian-width": {- "version": "1.5.0",- "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz",- "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA=="- },"grammy": {"version": "1.42.0","resolved": "https://registry.npmjs.org/grammy/-/grammy-1.42.0.tgz",@@ -4441,52 +3851,6 @@"node-fetch": "^2.7.0"}},- "indent-string": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",- "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg=="- },- "ink": {- "version": "5.2.1",- "resolved": "https://registry.npmjs.org/ink/-/ink-5.2.1.tgz",- "integrity": "sha512-BqcUyWrG9zq5HIwW6JcfFHsIYebJkWWb4fczNah1goUO0vv5vneIlfwuS85twyJ5hYR/y18FlAYUxrO9ChIWVg==",- "requires": {- "@alcalzone/ansi-tokenize": "^0.1.3",- "ansi-escapes": "^7.0.0",- "ansi-styles": "^6.2.1",- "auto-bind": "^5.0.1",- "chalk": "^5.3.0",- "cli-boxes": "^3.0.0",- "cli-cursor": "^4.0.0",- "cli-truncate": "^4.0.0",- "code-excerpt": "^4.0.0",- "es-toolkit": "^1.22.0",- "indent-string": "^5.0.0",- "is-in-ci": "^1.0.0",- "patch-console": "^2.0.0",- "react-reconciler": "^0.29.0",- "scheduler": "^0.23.0",- "signal-exit": "^3.0.7",- "slice-ansi": "^7.1.0",- "stack-utils": "^2.0.6",- "string-width": "^7.2.0",- "type-fest": "^4.27.0",- "widest-line": "^5.0.0",- "wrap-ansi": "^9.0.0",- "ws": "^8.18.0",- "yoga-layout": "~3.2.1"- }- },- "is-fullwidth-code-point": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ=="- },- "is-in-ci": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-1.0.0.tgz",- "integrity": "sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg=="- },"joycon": {"version": "3.1.1","resolved": "https://registry.npmjs.org/joycon/-/joycon-3.1.1.tgz",@@ -4504,7 +3868,8 @@"js-tokens": {"version": "4.0.0","resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "peer": true},"json-schema": {"version": "0.4.0",@@ -4543,6 +3908,7 @@"version": "1.4.0","resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz","integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",+ "peer": true,"requires": {"js-tokens": "^3.0.0 || ^4.0.0"}@@ -4567,11 +3933,6 @@"resolved": "https://registry.npmjs.org/marked/-/marked-14.1.4.tgz","integrity": "sha512-vkVZ8ONmUdPnjCKc5uTRvmkRbx4EAi2OkTOXmfTDhZz3OFqMNBM1oTTWwTr4HY4uAEojhzPf+Fy8F1DWa3Sndg=="},- "mimic-fn": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="- },"mlly": {"version": "1.8.2","resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz",@@ -4632,19 +3993,6 @@"resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz","integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA=="},- "onetime": {- "version": "5.1.2",- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",- "requires": {- "mimic-fn": "^2.1.0"- }- },- "patch-console": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-2.0.0.tgz",- "integrity": "sha512-0YNdUceMdaQwoKce1gatDScmMo5pu/tfABfnzEqeG0gtTmd7mh/WcwgUjtAeOU7N8nFFlbQBnFK2gXW5fGvmMA=="- },"pathe": {"version": "2.0.3","resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",@@ -4751,19 +4099,11 @@"version": "18.3.1","resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz","integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",+ "peer": true,"requires": {"loose-envify": "^1.1.0"}},- "react-reconciler": {- "version": "0.29.2",- "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.29.2.tgz",- "integrity": "sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==",- "requires": {- "loose-envify": "^1.1.0",- "scheduler": "^0.23.2"- }- },"readdirp": {"version": "4.1.2","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz",@@ -4781,15 +4121,6 @@"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==","dev": true},- "restore-cursor": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",- "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",- "requires": {- "onetime": "^5.1.0",- "signal-exit": "^3.0.2"- }- },"rollup": {"version": "4.60.2","resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.2.tgz",@@ -4830,14 +4161,6 @@"resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz","integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA=="},- "scheduler": {- "version": "0.23.2",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",- "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",- "requires": {- "loose-envify": "^1.1.0"- }- },"secure-json-parse": {"version": "2.7.0","resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz",@@ -4849,30 +4172,6 @@"integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==","dev": true},- "signal-exit": {- "version": "3.0.7",- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="- },- "slice-ansi": {- "version": "7.1.2",- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",- "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",- "requires": {- "ansi-styles": "^6.2.1",- "is-fullwidth-code-point": "^5.0.0"- },- "dependencies": {- "is-fullwidth-code-point": {- "version": "5.1.0",- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",- "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",- "requires": {- "get-east-asian-width": "^1.3.1"- }- }- }- },"sonic-boom": {"version": "4.2.1","resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz",@@ -4898,14 +4197,6 @@"resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz","integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg=="},- "stack-utils": {- "version": "2.0.6",- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",- "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",- "requires": {- "escape-string-regexp": "^2.0.0"- }- },"stackback": {"version": "0.0.2","resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",@@ -4918,24 +4209,6 @@"integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==","dev": true},- "string-width": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",- "requires": {- "emoji-regex": "^10.3.0",- "get-east-asian-width": "^1.0.0",- "strip-ansi": "^7.1.0"- }- },- "strip-ansi": {- "version": "7.2.0",- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz",- "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==",- "requires": {- "ansi-regex": "^6.2.2"- }- },"strip-literal": {"version": "3.1.0","resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz",@@ -5098,11 +4371,6 @@"tree-kill": "^1.2.2"}},- "type-fest": {- "version": "4.41.0",- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",- "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA=="- },"typescript": {"version": "5.9.3","resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",@@ -5433,40 +4701,11 @@"stackback": "0.0.2"}},- "widest-line": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-5.0.0.tgz",- "integrity": "sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==",- "requires": {- "string-width": "^7.0.0"- }- },- "wrap-ansi": {- "version": "9.0.2",- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",- "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",- "requires": {- "ansi-styles": "^6.2.1",- "string-width": "^7.0.0",- "strip-ansi": "^7.1.0"- }- },- "ws": {- "version": "8.20.0",- "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz",- "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==",- "requires": {}- },"yaml": {"version": "2.8.3","resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz","integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg=="},- "yoga-layout": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz",- "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ=="- },"zod": {"version": "3.25.76","resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",diff --git a/package.json b/package.jsonindex 76dc4b47..c89455f1 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "@cosmicstack/mercury-agent",- "version": "0.2.5",+ "version": "0.2.6","description": "Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.","type": "module","main": "dist/index.js",@@ -57,19 +57,16 @@"@ai-sdk/anthropic": "^1.2.0","@ai-sdk/openai": "^1.3.0","@grammyjs/auto-retry": "^2.0.2",- "@grammyjs/stream": "^1.0.1","ai": "^4.3.0","chalk": "^5.4.0",- "commander": "^13.1.0",+ "commander": "^12.1.0","dotenv": "^16.4.7","figlet": "^1.11.0","grammy": "^1.42.0",- "ink": "^5.2.0","js-tiktoken": "^1.0.19","marked": "^14.1.4","node-cron": "^3.0.3","pino": "^9.6.0",- "react": "^18.3.1","yaml": "^2.7.0","zod": "^3.25.76"},@@ -82,6 +79,6 @@"vitest": "^3.0.0"},"engines": {- "node": ">=20.0.0"+ "node": ">=18.0.0"}}\ No newline at end of filediff --git a/src/capabilities/filesystem/approve-scope.ts b/src/capabilities/filesystem/approve-scope.tsindex 42d63ab8..cb962e3d 100644--- a/src/capabilities/filesystem/approve-scope.ts+++ b/src/capabilities/filesystem/approve-scope.ts@@ -5,18 +5,18 @@ import type { PermissionManager } from '../permissions.js';export function createApproveScopeTool(permissions: PermissionManager) {return tool({- description: 'Request user approval to add a directory to the allowed filesystem scopes. Use this when a file operation fails due to scope permissions. The user will see an approval prompt (inline keyboard on Telegram, readline on CLI). If approved, the scope is added permanently.',+ description: 'Request user approval to access a directory outside current scopes. Use this when a file tool returns a permission denied error. The user gets an approval prompt (Allow/Always/Deny buttons on Telegram, yes/always/no on CLI). "Allow" grants session-only access. "Always" persists to disk. After approval, retry the original file operation.',parameters: z.object({- path: z.string().describe('The directory path to add to allowed scopes'),+ path: z.string().describe('The directory path to request access to'),mode: z.enum(['read', 'write']).describe('The access mode needed'),}),execute: async ({ path, mode }) => {const resolved = resolve(path);const result = await permissions.requestScopeExternal(resolved, mode);if (result.allowed) {- return `Access approved for ${mode} access to ${resolved}`;+ return `Access approved for ${mode} access to ${resolved}. You can now retry the file operation.`;}- return `Access denied for ${mode} access to ${resolved}`;+ return `Access denied for ${mode} access to ${resolved}. The user did not approve scope access.`;},});}\ No newline at end of filediff --git a/src/capabilities/permissions.ts b/src/capabilities/permissions.tsindex 91211508..d2ed2495 100644--- a/src/capabilities/permissions.ts+++ b/src/capabilities/permissions.ts@@ -132,6 +132,8 @@ export class PermissionManager {private pendingApprovals: Set<string> = new Set();private currentChannelType: string = 'cli';+ private tempScopes: FileScope[] = [];+constructor() {this.cwd = process.cwd();this.manifest = this.load();@@ -239,6 +241,7 @@ export class PermissionManager {const resolved = resolve(path);const scope = this.findScope(resolved);+ const tempScope = this.findTempScope(resolved);if (scope) {if (mode === 'read' && scope.read) return { allowed: true };@@ -246,7 +249,13 @@ export class PermissionManager {return { allowed: false, reason: `Permission denied: ${mode} access to ${path} (scope has ${mode}=false)` };}- return await this.requestScope(resolved, mode);+ if (tempScope) {+ if (mode === 'read' && tempScope.read) return { allowed: true };+ if (mode === 'write' && tempScope.write) return { allowed: true };+ return { allowed: false, reason: `Permission denied: ${mode} access to ${path}` };+ }++ return { allowed: false, reason: `Permission denied for ${mode} access to ${path}` };}async checkShellCommand(command: string): Promise<{ allowed: boolean; reason?: string; needsApproval: boolean }> {@@ -284,7 +293,7 @@ export class PermissionManager {if (hasPathTraversal) {const scopeCheck = await this.checkFsAccess(hasPathTraversal, 'write');if (!scopeCheck.allowed) {- return { allowed: false, reason: scopeCheck.reason, needsApproval: true };+ return { allowed: false, reason: `No permission to access ${hasPathTraversal}. Use approve_scope tool with path="${hasPathTraversal}" and mode="write" to request access.`, needsApproval: false };}}}@@ -365,10 +374,6 @@ export class PermissionManager {}async requestScopeExternal(path: string, mode: 'read' | 'write'): Promise<{ allowed: boolean; reason?: string }> {- return this.requestScope(path, mode);- }-- private async requestScope(path: string, mode: 'read' | 'write'): Promise<{ allowed: boolean; reason?: string }> {if (!this.askHandler) {return { allowed: false, reason: `Permission denied for ${mode} access to ${path}` };}@@ -381,13 +386,30 @@ export class PermissionManager {return { allowed: true };}- if (response === 'yes' || response === 'y') {+ if (response === 'yes') {+ this.addTempScope(path, mode === 'read', mode === 'write');return { allowed: true };}return { allowed: false, reason: `Permission denied for ${mode} access to ${path}` };}+ addTempScope(path: string, read: boolean, write: boolean): void {+ const resolved = resolve(path);+ this.tempScopes.push({ path: resolved, read, write });+ logger.info({ path: resolved, read, write }, 'Temp permission scope added (session only)');+ }++ private findTempScope(resolvedPath: string): FileScope | undefined {+ for (const scope of this.tempScopes) {+ const scopeResolved = resolve(scope.path.replace(/^~/, homedir()));+ if (resolvedPath === scopeResolved || resolvedPath.startsWith(scopeResolved + sep)) {+ return scope;+ }+ }+ return undefined;+ }+private matchPattern(command: string, pattern: string): boolean {const regexStr = '^' + pattern.replace(/\*/g, '.*').replace(/\?/g, '.') + '$';try {