@withbuddi/buddi 0.1.0-pre.52 → 0.1.0-pre.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extension/background.js +38 -7
- package/extension/manifest.json +2 -2
- package/extension/popup.html +2 -2
- package/node_modules/@buddi/cli/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/cli/dist/dashboard-cmd.d.ts.map +1 -1
- package/node_modules/@buddi/cli/dist/dashboard-cmd.js +6 -3
- package/node_modules/@buddi/cli/dist/dashboard-cmd.js.map +1 -1
- package/node_modules/@buddi/cli/dist/main.js +2 -2
- package/node_modules/@buddi/cli/dist/main.js.map +1 -1
- package/node_modules/@buddi/cli/dist/status.d.ts +16 -2
- package/node_modules/@buddi/cli/dist/status.d.ts.map +1 -1
- package/node_modules/@buddi/cli/dist/status.js +42 -2
- package/node_modules/@buddi/cli/dist/status.js.map +1 -1
- package/node_modules/@buddi/core/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/core/dist/agents/catalog.d.ts +6 -0
- package/node_modules/@buddi/core/dist/agents/catalog.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/agents/catalog.js +1 -1
- package/node_modules/@buddi/core/dist/agents/catalog.js.map +1 -1
- package/node_modules/@buddi/core/dist/backup/archive.d.ts +6 -0
- package/node_modules/@buddi/core/dist/backup/archive.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/backup/archive.js +19 -6
- package/node_modules/@buddi/core/dist/backup/archive.js.map +1 -1
- package/node_modules/@buddi/core/dist/postgres/binaries.d.ts +21 -1
- package/node_modules/@buddi/core/dist/postgres/binaries.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/postgres/binaries.js +72 -10
- package/node_modules/@buddi/core/dist/postgres/binaries.js.map +1 -1
- package/node_modules/@buddi/core/dist/postgres/cluster.d.ts +8 -0
- package/node_modules/@buddi/core/dist/postgres/cluster.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/postgres/cluster.js +119 -17
- package/node_modules/@buddi/core/dist/postgres/cluster.js.map +1 -1
- package/node_modules/@buddi/core/dist/postgres/windows-guard.d.ts +20 -0
- package/node_modules/@buddi/core/dist/postgres/windows-guard.d.ts.map +1 -0
- package/node_modules/@buddi/core/dist/postgres/windows-guard.js +140 -0
- package/node_modules/@buddi/core/dist/postgres/windows-guard.js.map +1 -0
- package/node_modules/@buddi/gateway/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/gateway/dist/agents/catalog.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/catalog.js +3 -2
- package/node_modules/@buddi/gateway/dist/agents/catalog.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/catalogue-package.d.ts +2 -2
- package/node_modules/@buddi/gateway/dist/agents/catalogue-package.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/catalogue-package.js +1 -1
- package/node_modules/@buddi/gateway/dist/agents/catalogue-package.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.d.ts +6 -6
- package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.js +5 -5
- package/node_modules/@buddi/gateway/dist/agents/platform-catalogue.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/browser-host.js +1 -1
- package/node_modules/@buddi/gateway/dist/browser-host.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/chrome-scope.d.ts +10 -10
- package/node_modules/@buddi/gateway/dist/missions/chrome-scope.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/chrome-scope.js +20 -20
- package/node_modules/@buddi/gateway/dist/missions/chrome-scope.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/execute.d.ts +2 -2
- package/node_modules/@buddi/gateway/dist/missions/execute.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/execute.js +11 -11
- package/node_modules/@buddi/gateway/dist/missions/execute.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/reminders.d.ts +2 -2
- package/node_modules/@buddi/gateway/dist/missions/reminders.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/missions/reminders.js +5 -5
- package/node_modules/@buddi/gateway/dist/missions/reminders.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/owner-notify.js +1 -1
- package/node_modules/@buddi/gateway/dist/owner-notify.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/plugins/npm.d.ts +9 -2
- package/node_modules/@buddi/gateway/dist/plugins/npm.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/plugins/npm.js +29 -6
- package/node_modules/@buddi/gateway/dist/plugins/npm.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/plugins/stage.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/plugins/stage.js +2 -2
- package/node_modules/@buddi/gateway/dist/plugins/stage.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/serve.js +1 -1
- package/node_modules/@buddi/gateway/dist/serve.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/surfaces/browser-cards.d.ts +1 -1
- package/node_modules/@buddi/gateway/dist/surfaces/browser-cards.js +1 -1
- package/node_modules/@buddi/gateway/dist/system-context.d.ts +11 -0
- package/node_modules/@buddi/gateway/dist/system-context.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/system-context.js +42 -1
- package/node_modules/@buddi/gateway/dist/system-context.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/approvals.js +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/approvals.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/browser-view.js +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/browser-view.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/api-routes.js +6 -6
- package/node_modules/@buddi/gateway/dist/web/api-routes.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/approval-ask.js +1 -1
- package/node_modules/@buddi/gateway/dist/web/extension.d.ts +6 -0
- package/node_modules/@buddi/gateway/dist/web/extension.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/extension.js +22 -11
- package/node_modules/@buddi/gateway/dist/web/extension.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/read.d.ts +1 -1
- package/node_modules/@buddi/gateway/dist/web/read.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/server.js +4 -4
- package/node_modules/@buddi/gateway/dist/web/server.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/service.d.ts +6 -1
- package/node_modules/@buddi/gateway/dist/web/service.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/service.js +10 -1
- package/node_modules/@buddi/gateway/dist/web/service.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/skills.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/skills.js +2 -1
- package/node_modules/@buddi/gateway/dist/web/skills.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/write.d.ts +1 -1
- package/node_modules/@buddi/gateway/dist/web/write.js +1 -1
- package/node_modules/@buddi/install/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/install/dist/app-layout.d.ts +53 -0
- package/node_modules/@buddi/install/dist/app-layout.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/app-layout.js +123 -10
- package/node_modules/@buddi/install/dist/app-layout.js.map +1 -1
- package/node_modules/@buddi/install/dist/cloudflared.js +2 -2
- package/node_modules/@buddi/install/dist/cloudflared.js.map +1 -1
- package/node_modules/@buddi/install/dist/environment.d.ts +40 -1
- package/node_modules/@buddi/install/dist/environment.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/environment.js +158 -12
- package/node_modules/@buddi/install/dist/environment.js.map +1 -1
- package/node_modules/@buddi/install/dist/launcher.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/launcher.js +340 -54
- package/node_modules/@buddi/install/dist/launcher.js.map +1 -1
- package/node_modules/@buddi/install/dist/linux-install.d.ts +41 -0
- package/node_modules/@buddi/install/dist/linux-install.d.ts.map +1 -0
- package/node_modules/@buddi/install/dist/linux-install.js +86 -0
- package/node_modules/@buddi/install/dist/linux-install.js.map +1 -0
- package/node_modules/@buddi/install/dist/postgres-check.js +1 -1
- package/node_modules/@buddi/install/dist/postgres-check.js.map +1 -1
- package/node_modules/@buddi/install/dist/product-uninstall.d.ts +14 -0
- package/node_modules/@buddi/install/dist/product-uninstall.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/product-uninstall.js +10 -0
- package/node_modules/@buddi/install/dist/product-uninstall.js.map +1 -1
- package/node_modules/@buddi/install/dist/runtime-info.d.ts +23 -0
- package/node_modules/@buddi/install/dist/runtime-info.d.ts.map +1 -0
- package/node_modules/@buddi/install/dist/runtime-info.js +72 -0
- package/node_modules/@buddi/install/dist/runtime-info.js.map +1 -0
- package/node_modules/@buddi/install/dist/supervisor.d.ts +60 -3
- package/node_modules/@buddi/install/dist/supervisor.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/supervisor.js +175 -17
- package/node_modules/@buddi/install/dist/supervisor.js.map +1 -1
- package/node_modules/@buddi/install/dist/uninstall.d.ts +49 -3
- package/node_modules/@buddi/install/dist/uninstall.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/uninstall.js +184 -27
- package/node_modules/@buddi/install/dist/uninstall.js.map +1 -1
- package/node_modules/@buddi/install/dist/upgrade.d.ts +20 -5
- package/node_modules/@buddi/install/dist/upgrade.d.ts.map +1 -1
- package/node_modules/@buddi/install/dist/upgrade.js +125 -62
- package/node_modules/@buddi/install/dist/upgrade.js.map +1 -1
- package/node_modules/@buddi/install/dist/windows-install.d.ts +102 -0
- package/node_modules/@buddi/install/dist/windows-install.d.ts.map +1 -0
- package/node_modules/@buddi/install/dist/windows-install.js +223 -0
- package/node_modules/@buddi/install/dist/windows-install.js.map +1 -0
- package/node_modules/@buddi/install/dist/windows-setup.d.ts +107 -0
- package/node_modules/@buddi/install/dist/windows-setup.d.ts.map +1 -0
- package/node_modules/@buddi/install/dist/windows-setup.js +700 -0
- package/node_modules/@buddi/install/dist/windows-setup.js.map +1 -0
- package/node_modules/@buddi/install/dist/windows-task.d.ts +49 -0
- package/node_modules/@buddi/install/dist/windows-task.d.ts.map +1 -0
- package/node_modules/@buddi/install/dist/windows-task.js +167 -0
- package/node_modules/@buddi/install/dist/windows-task.js.map +1 -0
- package/node_modules/@buddi/runtime/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/runtime/dist/codex-direct.d.ts +1 -1
- package/node_modules/@buddi/runtime/dist/codex-direct.js +1 -1
- package/node_modules/@buddi/runtime/dist/openai.d.ts +11 -0
- package/node_modules/@buddi/runtime/dist/openai.d.ts.map +1 -1
- package/node_modules/@buddi/runtime/dist/openai.js +36 -3
- package/node_modules/@buddi/runtime/dist/openai.js.map +1 -1
- package/node_modules/@buddi/tool-artifacts/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/tool-artifacts/dist/tools/write.js +3 -3
- package/node_modules/@buddi/tool-artifacts/dist/tools/write.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/tool-browser/dist/availability.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/availability.js +1 -0
- package/node_modules/@buddi/tool-browser/dist/availability.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/brand.d.ts +19 -0
- package/node_modules/@buddi/tool-browser/dist/brand.d.ts.map +1 -0
- package/node_modules/@buddi/tool-browser/dist/brand.js +31 -0
- package/node_modules/@buddi/tool-browser/dist/brand.js.map +1 -0
- package/node_modules/@buddi/tool-browser/dist/controller.d.ts +2 -2
- package/node_modules/@buddi/tool-browser/dist/controller.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/controller.js +16 -7
- package/node_modules/@buddi/tool-browser/dist/controller.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/downloads.js +1 -1
- package/node_modules/@buddi/tool-browser/dist/downloads.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/extension.d.ts +3 -1
- package/node_modules/@buddi/tool-browser/dist/extension.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/extension.js +4 -4
- package/node_modules/@buddi/tool-browser/dist/extension.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/index.d.ts +3 -2
- package/node_modules/@buddi/tool-browser/dist/index.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/index.js +7 -6
- package/node_modules/@buddi/tool-browser/dist/index.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/routes.d.ts +12 -1
- package/node_modules/@buddi/tool-browser/dist/routes.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/routes.js +31 -14
- package/node_modules/@buddi/tool-browser/dist/routes.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/service.d.ts +2 -0
- package/node_modules/@buddi/tool-browser/dist/service.d.ts.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/service.js +6 -6
- package/node_modules/@buddi/tool-browser/dist/service.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/telemetry.d.ts +2 -2
- package/node_modules/@buddi/tool-browser/dist/telemetry.js +2 -2
- package/node_modules/@buddi/tool-browser/dist/telemetry.js.map +1 -1
- package/node_modules/@buddi/tool-browser/dist/types.js +1 -1
- package/node_modules/@buddi/tool-browser/dist/types.js.map +1 -1
- package/node_modules/@buddi/tool-host/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/tool-host/dist/index.d.ts +2 -1
- package/node_modules/@buddi/tool-host/dist/index.d.ts.map +1 -1
- package/node_modules/@buddi/tool-host/dist/index.js +11 -2
- package/node_modules/@buddi/tool-host/dist/index.js.map +1 -1
- package/node_modules/@buddi/tool-host/dist/process.d.ts +58 -1
- package/node_modules/@buddi/tool-host/dist/process.d.ts.map +1 -1
- package/node_modules/@buddi/tool-host/dist/process.js +229 -15
- package/node_modules/@buddi/tool-host/dist/process.js.map +1 -1
- package/node_modules/@buddi/tool-host/dist/service.d.ts +2 -0
- package/node_modules/@buddi/tool-host/dist/service.d.ts.map +1 -1
- package/node_modules/@buddi/tool-host/dist/service.js +8 -6
- package/node_modules/@buddi/tool-host/dist/service.js.map +1 -1
- package/node_modules/@buddi/tool-host/dist/skill-run.d.ts +10 -0
- package/node_modules/@buddi/tool-host/dist/skill-run.d.ts.map +1 -1
- package/node_modules/@buddi/tool-host/dist/skill-run.js +14 -0
- package/node_modules/@buddi/tool-host/dist/skill-run.js.map +1 -1
- package/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/content-disposition/README.md +105 -35
- package/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/content-disposition/package.json +31 -19
- package/node_modules/docx/dist/index.cjs +182 -80
- package/node_modules/docx/dist/index.d.cts +63 -6
- package/node_modules/docx/dist/index.d.ts +63 -6
- package/node_modules/docx/dist/index.iife.js +182 -80
- package/node_modules/docx/dist/index.mjs +182 -80
- package/node_modules/docx/dist/index.umd.cjs +182 -80
- package/node_modules/docx/dist/layout.cjs +1 -6
- package/node_modules/docx/dist/layout.iife.js +1 -6
- package/node_modules/docx/dist/layout.mjs +1 -6
- package/node_modules/docx/dist/layout.umd.cjs +1 -6
- package/node_modules/docx/package.json +4 -3
- package/node_modules/express/Readme.md +15 -9
- package/node_modules/express/lib/application.js +2 -2
- package/node_modules/express/lib/request.js +32 -19
- package/node_modules/express/lib/response.js +27 -30
- package/node_modules/express/node_modules/content-type/LICENSE +22 -0
- package/node_modules/express/node_modules/content-type/README.md +71 -0
- package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/express/node_modules/content-type/package.json +52 -0
- package/node_modules/express/package.json +10 -10
- package/node_modules/imapflow/CHANGELOG.md +33 -0
- package/node_modules/imapflow/dist/cjs/commands/append.d.ts +1 -1
- package/node_modules/imapflow/dist/cjs/commands/append.js +15 -4
- package/node_modules/imapflow/dist/cjs/commands/compress.js +2 -2
- package/node_modules/imapflow/dist/cjs/commands/id.js +5 -3
- package/node_modules/imapflow/dist/cjs/commands/idle.js +9 -9
- package/node_modules/imapflow/dist/cjs/commands/list.js +2 -2
- package/node_modules/imapflow/dist/cjs/commands/namespace.js +18 -14
- package/node_modules/imapflow/dist/cjs/commands/quota.js +2 -3
- package/node_modules/imapflow/dist/cjs/commands/status.js +2 -4
- package/node_modules/imapflow/dist/cjs/connection-deadline.d.ts +1 -1
- package/node_modules/imapflow/dist/cjs/connection-deadline.js +2 -4
- package/node_modules/imapflow/dist/cjs/download.js +66 -35
- package/node_modules/imapflow/dist/cjs/errors.d.ts +15 -0
- package/node_modules/imapflow/dist/cjs/errors.js +22 -0
- package/node_modules/imapflow/dist/cjs/handler/imap-compiler.d.ts +4 -4
- package/node_modules/imapflow/dist/cjs/handler/imap-compiler.js +18 -18
- package/node_modules/imapflow/dist/cjs/handler/imap-parser.js +28 -3
- package/node_modules/imapflow/dist/cjs/handler/imap-stream.js +9 -8
- package/node_modules/imapflow/dist/cjs/handler/limits.d.ts +1 -1
- package/node_modules/imapflow/dist/cjs/handler/limits.js +5 -7
- package/node_modules/imapflow/dist/cjs/handler/parser-instance.js +23 -38
- package/node_modules/imapflow/dist/cjs/handler/token-parser.d.ts +12 -0
- package/node_modules/imapflow/dist/cjs/handler/token-parser.js +44 -104
- package/node_modules/imapflow/dist/cjs/imap-flow.d.ts +4 -3
- package/node_modules/imapflow/dist/cjs/imap-flow.js +98 -72
- package/node_modules/imapflow/dist/cjs/package-info.d.ts +1 -1
- package/node_modules/imapflow/dist/cjs/package-info.js +1 -1
- package/node_modules/imapflow/dist/cjs/proxy-connection.js +2 -5
- package/node_modules/imapflow/dist/cjs/search-compiler.js +2 -3
- package/node_modules/imapflow/dist/cjs/tools.d.ts +14 -3
- package/node_modules/imapflow/dist/cjs/tools.js +30 -18
- package/node_modules/imapflow/dist/cjs/types.d.ts +11 -0
- package/node_modules/imapflow/dist/esm/commands/append.d.ts +1 -1
- package/node_modules/imapflow/dist/esm/commands/append.js +15 -4
- package/node_modules/imapflow/dist/esm/commands/compress.js +2 -2
- package/node_modules/imapflow/dist/esm/commands/id.js +6 -4
- package/node_modules/imapflow/dist/esm/commands/idle.js +9 -9
- package/node_modules/imapflow/dist/esm/commands/list.js +3 -3
- package/node_modules/imapflow/dist/esm/commands/namespace.js +19 -15
- package/node_modules/imapflow/dist/esm/commands/quota.js +3 -4
- package/node_modules/imapflow/dist/esm/commands/status.js +2 -4
- package/node_modules/imapflow/dist/esm/connection-deadline.d.ts +1 -1
- package/node_modules/imapflow/dist/esm/connection-deadline.js +2 -4
- package/node_modules/imapflow/dist/esm/download.js +66 -35
- package/node_modules/imapflow/dist/esm/errors.d.ts +15 -0
- package/node_modules/imapflow/dist/esm/errors.js +21 -0
- package/node_modules/imapflow/dist/esm/handler/imap-compiler.d.ts +4 -4
- package/node_modules/imapflow/dist/esm/handler/imap-compiler.js +18 -18
- package/node_modules/imapflow/dist/esm/handler/imap-parser.js +28 -3
- package/node_modules/imapflow/dist/esm/handler/imap-stream.js +9 -8
- package/node_modules/imapflow/dist/esm/handler/limits.d.ts +1 -1
- package/node_modules/imapflow/dist/esm/handler/limits.js +5 -7
- package/node_modules/imapflow/dist/esm/handler/parser-instance.js +23 -38
- package/node_modules/imapflow/dist/esm/handler/token-parser.d.ts +12 -0
- package/node_modules/imapflow/dist/esm/handler/token-parser.js +44 -104
- package/node_modules/imapflow/dist/esm/imap-flow.d.ts +4 -3
- package/node_modules/imapflow/dist/esm/imap-flow.js +99 -73
- package/node_modules/imapflow/dist/esm/package-info.d.ts +1 -1
- package/node_modules/imapflow/dist/esm/package-info.js +1 -1
- package/node_modules/imapflow/dist/esm/proxy-connection.js +2 -5
- package/node_modules/imapflow/dist/esm/search-compiler.js +2 -3
- package/node_modules/imapflow/dist/esm/tools.d.ts +14 -3
- package/node_modules/imapflow/dist/esm/tools.js +30 -19
- package/node_modules/imapflow/dist/esm/types.d.ts +11 -0
- package/node_modules/imapflow/package.json +6 -3
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/marked/bin/main.js +1 -1
- package/node_modules/marked/lib/marked.d.ts +6 -3
- package/node_modules/marked/lib/marked.esm.js +48 -50
- package/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/node_modules/marked/lib/marked.umd.js +45 -47
- package/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/node_modules/marked/man/marked.1 +1 -1
- package/node_modules/marked/package.json +1 -1
- package/node_modules/process-warning/.github/workflows/ci.yml +1 -1
- package/node_modules/process-warning/.github/workflows/lock-threads.yml +1 -1
- package/node_modules/process-warning/.github/workflows/release.yml +24 -0
- package/node_modules/process-warning/README.md +46 -46
- package/node_modules/process-warning/package.json +1 -1
- package/package.json +2 -2
- package/packages/cli/dist/.tsbuildinfo +1 -1
- package/packages/cli/dist/dashboard-cmd.d.ts.map +1 -1
- package/packages/cli/dist/dashboard-cmd.js +6 -3
- package/packages/cli/dist/dashboard-cmd.js.map +1 -1
- package/packages/cli/dist/main.js +2 -2
- package/packages/cli/dist/main.js.map +1 -1
- package/packages/cli/dist/status.d.ts +16 -2
- package/packages/cli/dist/status.d.ts.map +1 -1
- package/packages/cli/dist/status.js +42 -2
- package/packages/cli/dist/status.js.map +1 -1
- package/packages/core/dist/.tsbuildinfo +1 -1
- package/packages/core/dist/agents/catalog.d.ts +6 -0
- package/packages/core/dist/agents/catalog.d.ts.map +1 -1
- package/packages/core/dist/agents/catalog.js +1 -1
- package/packages/core/dist/agents/catalog.js.map +1 -1
- package/packages/core/dist/backup/archive.d.ts +6 -0
- package/packages/core/dist/backup/archive.d.ts.map +1 -1
- package/packages/core/dist/backup/archive.js +19 -6
- package/packages/core/dist/backup/archive.js.map +1 -1
- package/packages/core/dist/postgres/binaries.d.ts +21 -1
- package/packages/core/dist/postgres/binaries.d.ts.map +1 -1
- package/packages/core/dist/postgres/binaries.js +72 -10
- package/packages/core/dist/postgres/binaries.js.map +1 -1
- package/packages/core/dist/postgres/cluster.d.ts +8 -0
- package/packages/core/dist/postgres/cluster.d.ts.map +1 -1
- package/packages/core/dist/postgres/cluster.js +119 -17
- package/packages/core/dist/postgres/cluster.js.map +1 -1
- package/packages/core/dist/postgres/windows-guard.d.ts +20 -0
- package/packages/core/dist/postgres/windows-guard.d.ts.map +1 -0
- package/packages/core/dist/postgres/windows-guard.js +140 -0
- package/packages/core/dist/postgres/windows-guard.js.map +1 -0
- package/packages/gateway/dist/.tsbuildinfo +1 -1
- package/packages/gateway/dist/agents/catalog.d.ts.map +1 -1
- package/packages/gateway/dist/agents/catalog.js +3 -2
- package/packages/gateway/dist/agents/catalog.js.map +1 -1
- package/packages/gateway/dist/agents/catalogue-package.d.ts +2 -2
- package/packages/gateway/dist/agents/catalogue-package.d.ts.map +1 -1
- package/packages/gateway/dist/agents/catalogue-package.js +1 -1
- package/packages/gateway/dist/agents/catalogue-package.js.map +1 -1
- package/packages/gateway/dist/agents/platform-catalogue.d.ts +6 -6
- package/packages/gateway/dist/agents/platform-catalogue.d.ts.map +1 -1
- package/packages/gateway/dist/agents/platform-catalogue.js +5 -5
- package/packages/gateway/dist/agents/platform-catalogue.js.map +1 -1
- package/packages/gateway/dist/browser-host.js +1 -1
- package/packages/gateway/dist/browser-host.js.map +1 -1
- package/packages/gateway/dist/missions/chrome-scope.d.ts +10 -10
- package/packages/gateway/dist/missions/chrome-scope.d.ts.map +1 -1
- package/packages/gateway/dist/missions/chrome-scope.js +20 -20
- package/packages/gateway/dist/missions/chrome-scope.js.map +1 -1
- package/packages/gateway/dist/missions/execute.d.ts +2 -2
- package/packages/gateway/dist/missions/execute.d.ts.map +1 -1
- package/packages/gateway/dist/missions/execute.js +11 -11
- package/packages/gateway/dist/missions/execute.js.map +1 -1
- package/packages/gateway/dist/missions/reminders.d.ts +2 -2
- package/packages/gateway/dist/missions/reminders.d.ts.map +1 -1
- package/packages/gateway/dist/missions/reminders.js +5 -5
- package/packages/gateway/dist/missions/reminders.js.map +1 -1
- package/packages/gateway/dist/owner-notify.js +1 -1
- package/packages/gateway/dist/owner-notify.js.map +1 -1
- package/packages/gateway/dist/plugins/npm.d.ts +9 -2
- package/packages/gateway/dist/plugins/npm.d.ts.map +1 -1
- package/packages/gateway/dist/plugins/npm.js +29 -6
- package/packages/gateway/dist/plugins/npm.js.map +1 -1
- package/packages/gateway/dist/plugins/stage.d.ts.map +1 -1
- package/packages/gateway/dist/plugins/stage.js +2 -2
- package/packages/gateway/dist/plugins/stage.js.map +1 -1
- package/packages/gateway/dist/serve.js +1 -1
- package/packages/gateway/dist/serve.js.map +1 -1
- package/packages/gateway/dist/surfaces/browser-cards.d.ts +1 -1
- package/packages/gateway/dist/surfaces/browser-cards.js +1 -1
- package/packages/gateway/dist/system-context.d.ts +11 -0
- package/packages/gateway/dist/system-context.d.ts.map +1 -1
- package/packages/gateway/dist/system-context.js +42 -1
- package/packages/gateway/dist/system-context.js.map +1 -1
- package/packages/gateway/dist/telegram/approvals.js +1 -1
- package/packages/gateway/dist/telegram/approvals.js.map +1 -1
- package/packages/gateway/dist/telegram/browser-view.js +1 -1
- package/packages/gateway/dist/telegram/browser-view.js.map +1 -1
- package/packages/gateway/dist/web/api-routes.js +6 -6
- package/packages/gateway/dist/web/api-routes.js.map +1 -1
- package/packages/gateway/dist/web/approval-ask.js +1 -1
- package/packages/gateway/dist/web/extension.d.ts +6 -0
- package/packages/gateway/dist/web/extension.d.ts.map +1 -1
- package/packages/gateway/dist/web/extension.js +22 -11
- package/packages/gateway/dist/web/extension.js.map +1 -1
- package/packages/gateway/dist/web/read.d.ts +1 -1
- package/packages/gateway/dist/web/read.d.ts.map +1 -1
- package/packages/gateway/dist/web/server.js +4 -4
- package/packages/gateway/dist/web/server.js.map +1 -1
- package/packages/gateway/dist/web/service.d.ts +6 -1
- package/packages/gateway/dist/web/service.d.ts.map +1 -1
- package/packages/gateway/dist/web/service.js +10 -1
- package/packages/gateway/dist/web/service.js.map +1 -1
- package/packages/gateway/dist/web/skills.d.ts.map +1 -1
- package/packages/gateway/dist/web/skills.js +2 -1
- package/packages/gateway/dist/web/skills.js.map +1 -1
- package/packages/gateway/dist/web/write.d.ts +1 -1
- package/packages/gateway/dist/web/write.js +1 -1
- package/packages/install/dist/.tsbuildinfo +1 -1
- package/packages/install/dist/app-layout.d.ts +53 -0
- package/packages/install/dist/app-layout.d.ts.map +1 -1
- package/packages/install/dist/app-layout.js +123 -10
- package/packages/install/dist/app-layout.js.map +1 -1
- package/packages/install/dist/cloudflared.js +2 -2
- package/packages/install/dist/cloudflared.js.map +1 -1
- package/packages/install/dist/environment.d.ts +40 -1
- package/packages/install/dist/environment.d.ts.map +1 -1
- package/packages/install/dist/environment.js +158 -12
- package/packages/install/dist/environment.js.map +1 -1
- package/packages/install/dist/launcher.d.ts.map +1 -1
- package/packages/install/dist/launcher.js +340 -54
- package/packages/install/dist/launcher.js.map +1 -1
- package/packages/install/dist/linux-install.d.ts +41 -0
- package/packages/install/dist/linux-install.d.ts.map +1 -0
- package/packages/install/dist/linux-install.js +86 -0
- package/packages/install/dist/linux-install.js.map +1 -0
- package/packages/install/dist/postgres-check.js +1 -1
- package/packages/install/dist/postgres-check.js.map +1 -1
- package/packages/install/dist/product-uninstall.d.ts +14 -0
- package/packages/install/dist/product-uninstall.d.ts.map +1 -1
- package/packages/install/dist/product-uninstall.js +10 -0
- package/packages/install/dist/product-uninstall.js.map +1 -1
- package/packages/install/dist/runtime-info.d.ts +23 -0
- package/packages/install/dist/runtime-info.d.ts.map +1 -0
- package/packages/install/dist/runtime-info.js +72 -0
- package/packages/install/dist/runtime-info.js.map +1 -0
- package/packages/install/dist/supervisor.d.ts +60 -3
- package/packages/install/dist/supervisor.d.ts.map +1 -1
- package/packages/install/dist/supervisor.js +175 -17
- package/packages/install/dist/supervisor.js.map +1 -1
- package/packages/install/dist/uninstall.d.ts +49 -3
- package/packages/install/dist/uninstall.d.ts.map +1 -1
- package/packages/install/dist/uninstall.js +184 -27
- package/packages/install/dist/uninstall.js.map +1 -1
- package/packages/install/dist/upgrade.d.ts +20 -5
- package/packages/install/dist/upgrade.d.ts.map +1 -1
- package/packages/install/dist/upgrade.js +125 -62
- package/packages/install/dist/upgrade.js.map +1 -1
- package/packages/install/dist/windows-install.d.ts +102 -0
- package/packages/install/dist/windows-install.d.ts.map +1 -0
- package/packages/install/dist/windows-install.js +223 -0
- package/packages/install/dist/windows-install.js.map +1 -0
- package/packages/install/dist/windows-setup.d.ts +107 -0
- package/packages/install/dist/windows-setup.d.ts.map +1 -0
- package/packages/install/dist/windows-setup.js +700 -0
- package/packages/install/dist/windows-setup.js.map +1 -0
- package/packages/install/dist/windows-task.d.ts +49 -0
- package/packages/install/dist/windows-task.d.ts.map +1 -0
- package/packages/install/dist/windows-task.js +167 -0
- package/packages/install/dist/windows-task.js.map +1 -0
- package/packages/runtime/dist/.tsbuildinfo +1 -1
- package/packages/runtime/dist/codex-direct.d.ts +1 -1
- package/packages/runtime/dist/codex-direct.js +1 -1
- package/packages/runtime/dist/openai.d.ts +11 -0
- package/packages/runtime/dist/openai.d.ts.map +1 -1
- package/packages/runtime/dist/openai.js +36 -3
- package/packages/runtime/dist/openai.js.map +1 -1
- package/packages/tools/artifacts/dist/.tsbuildinfo +1 -1
- package/packages/tools/artifacts/dist/tools/write.js +3 -3
- package/packages/tools/artifacts/dist/tools/write.js.map +1 -1
- package/packages/tools/browser/dist/.tsbuildinfo +1 -1
- package/packages/tools/browser/dist/availability.d.ts.map +1 -1
- package/packages/tools/browser/dist/availability.js +1 -0
- package/packages/tools/browser/dist/availability.js.map +1 -1
- package/packages/tools/browser/dist/brand.d.ts +19 -0
- package/packages/tools/browser/dist/brand.d.ts.map +1 -0
- package/packages/tools/browser/dist/brand.js +31 -0
- package/packages/tools/browser/dist/brand.js.map +1 -0
- package/packages/tools/browser/dist/controller.d.ts +2 -2
- package/packages/tools/browser/dist/controller.d.ts.map +1 -1
- package/packages/tools/browser/dist/controller.js +16 -7
- package/packages/tools/browser/dist/controller.js.map +1 -1
- package/packages/tools/browser/dist/downloads.js +1 -1
- package/packages/tools/browser/dist/downloads.js.map +1 -1
- package/packages/tools/browser/dist/extension.d.ts +3 -1
- package/packages/tools/browser/dist/extension.d.ts.map +1 -1
- package/packages/tools/browser/dist/extension.js +4 -4
- package/packages/tools/browser/dist/extension.js.map +1 -1
- package/packages/tools/browser/dist/index.d.ts +3 -2
- package/packages/tools/browser/dist/index.d.ts.map +1 -1
- package/packages/tools/browser/dist/index.js +7 -6
- package/packages/tools/browser/dist/index.js.map +1 -1
- package/packages/tools/browser/dist/routes.d.ts +12 -1
- package/packages/tools/browser/dist/routes.d.ts.map +1 -1
- package/packages/tools/browser/dist/routes.js +31 -14
- package/packages/tools/browser/dist/routes.js.map +1 -1
- package/packages/tools/browser/dist/service.d.ts +2 -0
- package/packages/tools/browser/dist/service.d.ts.map +1 -1
- package/packages/tools/browser/dist/service.js +6 -6
- package/packages/tools/browser/dist/service.js.map +1 -1
- package/packages/tools/browser/dist/telemetry.d.ts +2 -2
- package/packages/tools/browser/dist/telemetry.js +2 -2
- package/packages/tools/browser/dist/telemetry.js.map +1 -1
- package/packages/tools/browser/dist/types.js +1 -1
- package/packages/tools/browser/dist/types.js.map +1 -1
- package/packages/tools/host/dist/.tsbuildinfo +1 -1
- package/packages/tools/host/dist/index.d.ts +2 -1
- package/packages/tools/host/dist/index.d.ts.map +1 -1
- package/packages/tools/host/dist/index.js +11 -2
- package/packages/tools/host/dist/index.js.map +1 -1
- package/packages/tools/host/dist/process.d.ts +58 -1
- package/packages/tools/host/dist/process.d.ts.map +1 -1
- package/packages/tools/host/dist/process.js +229 -15
- package/packages/tools/host/dist/process.js.map +1 -1
- package/packages/tools/host/dist/service.d.ts +2 -0
- package/packages/tools/host/dist/service.d.ts.map +1 -1
- package/packages/tools/host/dist/service.js +8 -6
- package/packages/tools/host/dist/service.js.map +1 -1
- package/packages/tools/host/dist/skill-run.d.ts +10 -0
- package/packages/tools/host/dist/skill-run.d.ts.map +1 -1
- package/packages/tools/host/dist/skill-run.js +14 -0
- package/packages/tools/host/dist/skill-run.js.map +1 -1
- package/packages/web/dist/assets/index-DnZhfnM7.js +155 -0
- package/packages/web/dist/assets/{lottie_light-DROBTM6Y.js → lottie_light-CGUtDt_b.js} +1 -1
- package/packages/web/dist/build.json +1 -1
- package/packages/web/dist/index.html +1 -1
- package/packages/web/dist/precache.json +3 -3
- package/node_modules/content-disposition/index.js +0 -536
- package/packages/web/dist/assets/index-oxmxR39o.js +0 -155
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint no-console: 0, new-cap: 0 */
|
|
2
2
|
import imapFormalSyntax from './imap-formal-syntax.js';
|
|
3
|
+
import { createImapError } from '../errors.js';
|
|
3
4
|
// A single element of a sequence-set as defined by the RFC 9051 grammar: a number
|
|
4
5
|
// or a range, where "*" stands for the largest number in use. Digit strings are not
|
|
5
6
|
// range-checked here (a server rejects "0" or an overlong number on its own); the
|
|
@@ -41,13 +42,11 @@ const CRLF = /[\r\n]/;
|
|
|
41
42
|
*/
|
|
42
43
|
const quoteString = (value) => {
|
|
43
44
|
if (NOT_QUOTABLE.test(value)) {
|
|
44
|
-
|
|
45
|
-
error.code = 'InvalidStringValue';
|
|
46
|
-
throw error;
|
|
45
|
+
throw createImapError('Unquotable character in IMAP string value', 'InvalidStringValue');
|
|
47
46
|
}
|
|
48
47
|
return '"' + value.replace(/["\\]/g, char => '\\' + char) + '"';
|
|
49
48
|
};
|
|
50
|
-
|
|
49
|
+
function compiler(response, options) {
|
|
51
50
|
let { asArray, isLogging, literalPlus, literalMinus } = options || {};
|
|
52
51
|
const respParts = [];
|
|
53
52
|
// Formats an entry (string, number or Buffer) into the Buffer that is written to
|
|
@@ -62,9 +61,7 @@ async function compiler(response, options) {
|
|
|
62
61
|
const emitEntry = (entry, opts) => {
|
|
63
62
|
let { returnEmpty, raw } = opts || {};
|
|
64
63
|
if (!raw && !isLogging && (typeof entry === 'string' || Buffer.isBuffer(entry)) && CRLF.test(entry.toString('latin1'))) {
|
|
65
|
-
|
|
66
|
-
error.code = 'InvalidTokenValue';
|
|
67
|
-
throw error;
|
|
64
|
+
throw createImapError('Line terminator in IMAP token', 'InvalidTokenValue');
|
|
68
65
|
}
|
|
69
66
|
if (typeof entry === 'string') {
|
|
70
67
|
return Buffer.from(entry);
|
|
@@ -88,7 +85,7 @@ async function compiler(response, options) {
|
|
|
88
85
|
// Set right after the compiler writes "(" or "[" itself, so the first element inside gets no
|
|
89
86
|
// leading space
|
|
90
87
|
let afterOpener = false;
|
|
91
|
-
let walk =
|
|
88
|
+
let walk = (node, options) => {
|
|
92
89
|
options = options || {};
|
|
93
90
|
// Add a space separator when:
|
|
94
91
|
// - The previous token was a LITERAL. Literal data ends exactly at its declared length, so
|
|
@@ -120,7 +117,7 @@ async function compiler(response, options) {
|
|
|
120
117
|
if (subArray && !Array.isArray(child)) {
|
|
121
118
|
subArray = false;
|
|
122
119
|
}
|
|
123
|
-
|
|
120
|
+
walk(child, { subArray });
|
|
124
121
|
}
|
|
125
122
|
resp.push(emitEntry(')'));
|
|
126
123
|
afterOpener = false;
|
|
@@ -154,6 +151,11 @@ async function compiler(response, options) {
|
|
|
154
151
|
resp.push(emitEntry(logPlaceholder(node.value.length, 'literal')));
|
|
155
152
|
}
|
|
156
153
|
else {
|
|
154
|
+
// The size marker must match the bytes emitEntry() writes, and it writes
|
|
155
|
+
// nothing for a value that is not a Buffer or a string
|
|
156
|
+
if (node.value && !Buffer.isBuffer(node.value) && typeof node.value !== 'string') {
|
|
157
|
+
throw createImapError('Literal value must be a Buffer or a string', 'InvalidTokenValue');
|
|
158
|
+
}
|
|
157
159
|
// The literal size marker counts octets - string values are written as
|
|
158
160
|
// UTF-8, so their UTF-16 .length would undercount multi-byte characters
|
|
159
161
|
let literalLength = !node.value ? 0 : Buffer.isBuffer(node.value) ? node.value.length : Buffer.byteLength(node.value.toString());
|
|
@@ -208,9 +210,7 @@ async function compiler(response, options) {
|
|
|
208
210
|
if (!isLogging) {
|
|
209
211
|
val = node.value === null || node.value === undefined ? '' : node.value.toString();
|
|
210
212
|
if (!isValidSequenceSet(val)) {
|
|
211
|
-
|
|
212
|
-
error.code = 'InvalidSequenceSet';
|
|
213
|
-
throw error;
|
|
213
|
+
throw createImapError('Invalid sequence set value', 'InvalidSequenceSet');
|
|
214
214
|
}
|
|
215
215
|
resp.push(emitEntry(val, { raw: true }));
|
|
216
216
|
}
|
|
@@ -225,9 +225,7 @@ async function compiler(response, options) {
|
|
|
225
225
|
// this check runs first only to raise the more specific InvalidTextValue code.
|
|
226
226
|
if (node.value) {
|
|
227
227
|
if (!isLogging && CRLF.test(node.value.toString())) {
|
|
228
|
-
|
|
229
|
-
error.code = 'InvalidTextValue';
|
|
230
|
-
throw error;
|
|
228
|
+
throw createImapError('Line terminator in IMAP text value', 'InvalidTextValue');
|
|
231
229
|
}
|
|
232
230
|
resp.push(emitEntry(node.value));
|
|
233
231
|
}
|
|
@@ -262,7 +260,7 @@ async function compiler(response, options) {
|
|
|
262
260
|
resp.push(emitEntry('['));
|
|
263
261
|
afterOpener = true;
|
|
264
262
|
for (let child of node.section) {
|
|
265
|
-
|
|
263
|
+
walk(child);
|
|
266
264
|
}
|
|
267
265
|
resp.push(emitEntry(']'));
|
|
268
266
|
afterOpener = false;
|
|
@@ -281,13 +279,15 @@ async function compiler(response, options) {
|
|
|
281
279
|
if (response.attributes) {
|
|
282
280
|
let attributes = Array.isArray(response.attributes) ? response.attributes : [].concat(response.attributes);
|
|
283
281
|
for (let child of attributes) {
|
|
284
|
-
|
|
282
|
+
walk(child);
|
|
285
283
|
}
|
|
286
284
|
}
|
|
287
285
|
if (resp.length) {
|
|
288
286
|
respParts.push(resp);
|
|
289
287
|
}
|
|
290
|
-
|
|
288
|
+
// A part with a single entry (the data of a synchronizing literal) is used as is: copying a
|
|
289
|
+
// large message only to send it doubles its memory
|
|
290
|
+
const compiled = respParts.map(part => (part.length === 1 ? part[0] : Buffer.concat(part)));
|
|
291
291
|
// without asArray there is a single part, returned as is instead of copied
|
|
292
292
|
return asArray ? compiled : compiled.length === 1 ? compiled[0] : Buffer.concat(compiled);
|
|
293
293
|
}
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import imapFormalSyntax from './imap-formal-syntax.js';
|
|
2
2
|
import { ParserInstance } from './parser-instance.js';
|
|
3
|
+
import { createImapError } from '../errors.js';
|
|
4
|
+
import { boundedInput } from './limits.js';
|
|
5
|
+
// The codes the parser raises on purpose: the numbered ParserErrorN codes, ParserErrorExchange,
|
|
6
|
+
// the nesting limit and the inline literal size limit
|
|
7
|
+
const PARSER_ERROR_CODES = /^(?:ParserError\d+|ParserErrorExchange|MAX_IMAP_NESTING_REACHED|LiteralTooLarge)$/;
|
|
8
|
+
/**
|
|
9
|
+
* Anything the parser throws other than one of its own coded errors - a TypeError from a parser
|
|
10
|
+
* bug, a RangeError from runaway recursion or a bad Buffer offset (which carries a Node code), a
|
|
11
|
+
* thrown non-Error - is re-raised as a coded `ParserErrorInternal`, so callers that match on
|
|
12
|
+
* codes still handle it and settle the command the line belonged to. The fuzz suite treats this
|
|
13
|
+
* code as a failure, so the guard does not hide parser bugs from the tests.
|
|
14
|
+
*
|
|
15
|
+
* @param err - The thrown value
|
|
16
|
+
* @param input - The line that was being parsed
|
|
17
|
+
* @returns The error to rethrow
|
|
18
|
+
*/
|
|
19
|
+
function asParserError(err, input) {
|
|
20
|
+
if (err instanceof Error && PARSER_ERROR_CODES.test(err.code || '')) {
|
|
21
|
+
return err;
|
|
22
|
+
}
|
|
23
|
+
return createImapError(`Unexpected parser failure: ${err instanceof Error ? err.message : String(err)}`, 'ParserErrorInternal', {
|
|
24
|
+
parserContext: boundedInput(input.toString()),
|
|
25
|
+
...(err instanceof Error ? { _err: err } : {})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
3
28
|
/**
|
|
4
29
|
* Parses a raw IMAP command or response buffer into a structured object.
|
|
5
30
|
* Handles edge cases such as null-byte-padded responses from buggy servers and
|
|
@@ -20,7 +45,7 @@ export default async function parser(command, options) {
|
|
|
20
45
|
// Workaround for buggy IMAP servers that pad responses with leading NUL (\x00) bytes.
|
|
21
46
|
// Some servers (observed in the wild) prepend null bytes to their output, which would
|
|
22
47
|
// cause parsing to fail. We strip them and note how many were removed for diagnostics.
|
|
23
|
-
if (command[0] === 0) {
|
|
48
|
+
if (Buffer.isBuffer(command) && command[0] === 0) {
|
|
24
49
|
// find the first non null byte and trim
|
|
25
50
|
let firstNonNull = -1;
|
|
26
51
|
for (let i = 0; i < command.length; i++) {
|
|
@@ -33,7 +58,7 @@ export default async function parser(command, options) {
|
|
|
33
58
|
// All bytes are null, treat as a BAD response
|
|
34
59
|
return { tag: '*', command: 'BAD', attributes: [] };
|
|
35
60
|
}
|
|
36
|
-
command = command.
|
|
61
|
+
command = command.subarray(firstNonNull);
|
|
37
62
|
nullBytesRemoved = firstNonNull;
|
|
38
63
|
}
|
|
39
64
|
const parserInstance = new ParserInstance(command, options);
|
|
@@ -65,7 +90,7 @@ export default async function parser(command, options) {
|
|
|
65
90
|
}
|
|
66
91
|
}
|
|
67
92
|
catch (err) {
|
|
68
|
-
let error = err;
|
|
93
|
+
let error = asParserError(err, command);
|
|
69
94
|
if (error.code === 'ParserErrorExchange' && error.parserContext && error.parserContext.value) {
|
|
70
95
|
return error.parserContext.value;
|
|
71
96
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Transform } from 'node:stream';
|
|
2
2
|
import { createConnectionLogger } from '../logger.js';
|
|
3
3
|
import { MAX_LITERAL_SIZE, MAX_LINE_SIZE, MAX_RESPONSE_SIZE, normalizeLimit, createLiteralTooLargeError } from './limits.js';
|
|
4
|
+
import { createImapError } from '../errors.js';
|
|
4
5
|
const LINE = 0x01;
|
|
5
6
|
const LITERAL = 0x02;
|
|
6
7
|
const LF = 0x0a;
|
|
@@ -177,10 +178,10 @@ export class ImapStream extends Transform {
|
|
|
177
178
|
if (lineLength <= this.maxLineLength) {
|
|
178
179
|
return true;
|
|
179
180
|
}
|
|
180
|
-
const err =
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
const err = createImapError(`Line length ${lineLength} exceeds maximum allowed size of ${this.maxLineLength} bytes`, 'LineTooLarge', {
|
|
182
|
+
lineLength,
|
|
183
|
+
maxSize: this.maxLineLength
|
|
184
|
+
});
|
|
184
185
|
return this.failStream(err);
|
|
185
186
|
}
|
|
186
187
|
/**
|
|
@@ -203,10 +204,10 @@ export class ImapStream extends Transform {
|
|
|
203
204
|
}
|
|
204
205
|
return true;
|
|
205
206
|
}
|
|
206
|
-
const err =
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
const err = createImapError(`Response size ${total} exceeds maximum allowed size of ${this.maxResponseSize} bytes`, 'ResponseTooLarge', {
|
|
208
|
+
responseSize: total,
|
|
209
|
+
maxSize: this.maxResponseSize
|
|
210
|
+
});
|
|
210
211
|
return this.failStream(err);
|
|
211
212
|
}
|
|
212
213
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// Shared response-size limits for the IMAP parser. Kept in one place so the streaming parser
|
|
2
2
|
// (ImapStream) and the standalone token parser cannot drift apart, and so the documented
|
|
3
3
|
// defaults in the ImapFlowOptions type describe both paths.
|
|
4
|
+
import { createImapError } from '../errors.js';
|
|
4
5
|
// Maximum allowed literal size: 1GB (1073741824 bytes)
|
|
5
6
|
export const MAX_LITERAL_SIZE = 1024 * 1024 * 1024;
|
|
6
7
|
// Default maximum length of a single line (a response without a literal). Matches the literal cap:
|
|
@@ -51,10 +52,7 @@ export const normalizeLimit = (value, defaultValue) => (Number.isInteger(value)
|
|
|
51
52
|
* @param reason - What the bound was, when it is not the configured maximum.
|
|
52
53
|
* @returns The error to emit or throw.
|
|
53
54
|
*/
|
|
54
|
-
export const createLiteralTooLargeError = (literalSize, maxSize, reason) => {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
err.maxSize = maxSize;
|
|
59
|
-
return err;
|
|
60
|
-
};
|
|
55
|
+
export const createLiteralTooLargeError = (literalSize, maxSize, reason) => createImapError(`Literal size ${literalSize} exceeds ${reason || `maximum allowed size of ${maxSize} bytes`}`, 'LiteralTooLarge', {
|
|
56
|
+
literalSize,
|
|
57
|
+
maxSize
|
|
58
|
+
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import imapFormalSyntax from './imap-formal-syntax.js';
|
|
3
3
|
import { TokenParser } from './token-parser.js';
|
|
4
4
|
import { boundedInput } from './limits.js';
|
|
5
|
+
import { createImapError } from '../errors.js';
|
|
5
6
|
/**
|
|
6
7
|
* Parses a single IMAP response line into its structural components: tag, command,
|
|
7
8
|
* and attributes. Handles status responses (OK, NO, BAD, PREAUTH, BYE) with their
|
|
@@ -137,10 +138,7 @@ export class ParserInstance {
|
|
|
137
138
|
async getElement(syntax) {
|
|
138
139
|
let match, element, errPos;
|
|
139
140
|
if (/^\s/.test(this.remainder)) {
|
|
140
|
-
|
|
141
|
-
error.code = 'ParserError1';
|
|
142
|
-
error.parserContext = this.errorContext();
|
|
143
|
-
throw error;
|
|
141
|
+
throw createImapError(`Unexpected whitespace at position ${this.pos} [E1]`, 'ParserError1', { parserContext: this.errorContext() });
|
|
144
142
|
}
|
|
145
143
|
if ((match = this.remainder.match(/^\s*[^\s]+(?=\s|$)/))) {
|
|
146
144
|
element = match[0];
|
|
@@ -150,29 +148,24 @@ export class ParserInstance {
|
|
|
150
148
|
// "Server Unavailable." instead of a proper IMAP tagged/untagged response.
|
|
151
149
|
// We detect this specific pattern and convert it into a synthetic BAD response
|
|
152
150
|
// so the rest of the parser can handle it gracefully.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
151
|
+
throw createImapError(`Server returned an error: ${this.input}`, 'ParserErrorExchange', {
|
|
152
|
+
parserContext: {
|
|
153
|
+
...this.errorContext(element),
|
|
154
|
+
value: {
|
|
155
|
+
tag: '*',
|
|
156
|
+
command: 'BAD',
|
|
157
|
+
attributes: [{ type: 'TEXT', value: this.input }]
|
|
158
|
+
}
|
|
161
159
|
}
|
|
162
|
-
};
|
|
163
|
-
throw error;
|
|
160
|
+
});
|
|
164
161
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
throw error;
|
|
162
|
+
throw createImapError(`Unexpected char at position ${this.pos + errPos} [E2: ${JSON.stringify(element.charAt(errPos))}]`, 'ParserError2', {
|
|
163
|
+
parserContext: this.errorContext(element)
|
|
164
|
+
});
|
|
169
165
|
}
|
|
170
166
|
}
|
|
171
167
|
else {
|
|
172
|
-
|
|
173
|
-
error.code = 'ParserError3';
|
|
174
|
-
error.parserContext = this.errorContext();
|
|
175
|
-
throw error;
|
|
168
|
+
throw createImapError(`Unexpected end of input at position ${this.pos} [E3]`, 'ParserError3', { parserContext: this.errorContext() });
|
|
176
169
|
}
|
|
177
170
|
this.pos += match[0].length;
|
|
178
171
|
this.remainder = this.remainder.slice(match[0].length);
|
|
@@ -190,16 +183,12 @@ export class ParserInstance {
|
|
|
190
183
|
// special case, empty + response
|
|
191
184
|
return;
|
|
192
185
|
}
|
|
193
|
-
|
|
194
|
-
error.code = 'ParserError4';
|
|
195
|
-
error.parserContext = this.errorContext();
|
|
196
|
-
throw error;
|
|
186
|
+
throw createImapError(`Unexpected end of input at position ${this.pos} [E4]`, 'ParserError4', { parserContext: this.errorContext() });
|
|
197
187
|
}
|
|
198
188
|
if (imapFormalSyntax.verify(this.remainder.charAt(0), imapFormalSyntax.SP()) >= 0) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
throw error;
|
|
189
|
+
throw createImapError(`Unexpected char at position ${this.pos} [E5: ${JSON.stringify(this.remainder.charAt(0))}]`, 'ParserError5', {
|
|
190
|
+
parserContext: this.errorContext(this.remainder)
|
|
191
|
+
});
|
|
203
192
|
}
|
|
204
193
|
this.pos++;
|
|
205
194
|
this.remainder = this.remainder.slice(1);
|
|
@@ -214,16 +203,12 @@ export class ParserInstance {
|
|
|
214
203
|
*/
|
|
215
204
|
async getAttributes() {
|
|
216
205
|
if (!this.remainder.length) {
|
|
217
|
-
|
|
218
|
-
error.code = 'ParserError6';
|
|
219
|
-
error.parserContext = this.errorContext();
|
|
220
|
-
throw error;
|
|
206
|
+
throw createImapError(`Unexpected end of input at position ${this.pos} [E6]`, 'ParserError6', { parserContext: this.errorContext() });
|
|
221
207
|
}
|
|
222
208
|
if (/^\s/.test(this.remainder)) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
throw error;
|
|
209
|
+
throw createImapError(`Unexpected whitespace at position ${this.pos} [E7]`, 'ParserError7', {
|
|
210
|
+
parserContext: this.errorContext(this.remainder)
|
|
211
|
+
});
|
|
227
212
|
}
|
|
228
213
|
const tokenParser = new TokenParser(this, this.pos, this.remainder, this.options);
|
|
229
214
|
return await tokenParser.getAttributes();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ImapFlowError, type ParserErrorCode } from '../errors.js';
|
|
1
2
|
import type { ImapAttributeList, ParserOptions } from './types.js';
|
|
2
3
|
import type { ParserInstance } from './parser-instance.js';
|
|
3
4
|
/**
|
|
@@ -58,6 +59,17 @@ export declare class TokenParser {
|
|
|
58
59
|
* from the input, i.e. when no pre-parsed literal buffers were supplied. Defaults to 1GB.
|
|
59
60
|
*/
|
|
60
61
|
constructor(parent: TokenParserParent | ParserInstance, startPos?: number | undefined, str?: string | null | undefined, options?: ParserOptions | undefined);
|
|
62
|
+
/**
|
|
63
|
+
* Builds a numbered parser error that carries a bounded copy of the input and the position
|
|
64
|
+
* (and character, when there is one) where parsing failed.
|
|
65
|
+
*
|
|
66
|
+
* @param message - The error message
|
|
67
|
+
* @param code - The numbered parser error code
|
|
68
|
+
* @param pos - Position of the failure in the original input
|
|
69
|
+
* @param chr - The offending character
|
|
70
|
+
* @returns The error to throw
|
|
71
|
+
*/
|
|
72
|
+
parserError(message: string, code: ParserErrorCode, pos: number, chr?: string | undefined): ImapFlowError;
|
|
61
73
|
/**
|
|
62
74
|
* Processes the input string and returns the parsed attributes as a flat array of typed objects.
|
|
63
75
|
* Each attribute is an object with a `type` (e.g., "ATOM", "STRING", "LITERAL", "SEQUENCE")
|