@withbuddi/buddi 0.1.0-pre.25 → 0.1.0-pre.26
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/examples/agents/agent-father/agent.md +1 -0
- package/extension/manifest.json +2 -2
- package/node_modules/@buddi/cli/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/cli/dist/doctor-probes.d.ts.map +1 -1
- package/node_modules/@buddi/cli/dist/doctor-probes.js +29 -8
- package/node_modules/@buddi/cli/dist/doctor-probes.js.map +1 -1
- package/node_modules/@buddi/cli/dist/doctor.d.ts +8 -1
- package/node_modules/@buddi/cli/dist/doctor.d.ts.map +1 -1
- package/node_modules/@buddi/cli/dist/doctor.js +19 -2
- package/node_modules/@buddi/cli/dist/doctor.js.map +1 -1
- package/node_modules/@buddi/core/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/core/dist/agents/catalog.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/agents/catalog.js +11 -2
- package/node_modules/@buddi/core/dist/agents/catalog.js.map +1 -1
- package/node_modules/@buddi/core/dist/agents/skills.d.ts +4 -4
- package/node_modules/@buddi/core/dist/notifications/agent.d.ts +54 -0
- package/node_modules/@buddi/core/dist/notifications/agent.d.ts.map +1 -0
- package/node_modules/@buddi/core/dist/notifications/agent.js +134 -0
- package/node_modules/@buddi/core/dist/notifications/agent.js.map +1 -0
- package/node_modules/@buddi/core/dist/notifications/index.d.ts +1 -0
- package/node_modules/@buddi/core/dist/notifications/index.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/index.js +1 -0
- package/node_modules/@buddi/core/dist/notifications/index.js.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/notify.d.ts +4 -0
- package/node_modules/@buddi/core/dist/notifications/notify.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/notify.js +19 -7
- package/node_modules/@buddi/core/dist/notifications/notify.js.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/store.d.ts +8 -1
- package/node_modules/@buddi/core/dist/notifications/store.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/store.js +55 -6
- package/node_modules/@buddi/core/dist/notifications/store.js.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/types.d.ts +26 -2
- package/node_modules/@buddi/core/dist/notifications/types.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/notifications/types.js +1 -1
- package/node_modules/@buddi/core/dist/notifications/types.js.map +1 -1
- package/node_modules/@buddi/core/dist/vault/resolve.d.ts.map +1 -1
- package/node_modules/@buddi/core/dist/vault/resolve.js +0 -1
- package/node_modules/@buddi/core/dist/vault/resolve.js.map +1 -1
- package/node_modules/@buddi/core/migrations/054_agent_messages.sql +15 -0
- package/node_modules/@buddi/gateway/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/gateway/dist/agents/owner-tools.d.ts +34 -1
- package/node_modules/@buddi/gateway/dist/agents/owner-tools.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/agents/owner-tools.js +87 -4
- package/node_modules/@buddi/gateway/dist/agents/owner-tools.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/bootstrap.js +3 -3
- package/node_modules/@buddi/gateway/dist/bootstrap.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/owner-secrets.d.ts +77 -8
- package/node_modules/@buddi/gateway/dist/owner-secrets.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/owner-secrets.js +142 -14
- package/node_modules/@buddi/gateway/dist/owner-secrets.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/serve.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/serve.js +24 -8
- package/node_modules/@buddi/gateway/dist/serve.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/system-context.d.ts +2 -0
- package/node_modules/@buddi/gateway/dist/system-context.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/system-context.js +5 -1
- package/node_modules/@buddi/gateway/dist/system-context.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/channel.d.ts +7 -0
- package/node_modules/@buddi/gateway/dist/telegram/channel.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/telegram/channel.js +14 -2
- package/node_modules/@buddi/gateway/dist/telegram/channel.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/connections.d.ts +3 -0
- package/node_modules/@buddi/gateway/dist/web/connections.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/connections.js +48 -6
- package/node_modules/@buddi/gateway/dist/web/connections.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/notifications.d.ts +6 -0
- package/node_modules/@buddi/gateway/dist/web/notifications.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/notifications.js +14 -1
- package/node_modules/@buddi/gateway/dist/web/notifications.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/onboarding.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/onboarding.js +5 -2
- package/node_modules/@buddi/gateway/dist/web/onboarding.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/recovery.d.ts +10 -0
- package/node_modules/@buddi/gateway/dist/web/recovery.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/recovery.js +113 -33
- package/node_modules/@buddi/gateway/dist/web/recovery.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/server.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/server.js +16 -5
- package/node_modules/@buddi/gateway/dist/web/server.js.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/sessions.d.ts +8 -0
- package/node_modules/@buddi/gateway/dist/web/sessions.d.ts.map +1 -1
- package/node_modules/@buddi/gateway/dist/web/sessions.js +24 -1
- package/node_modules/@buddi/gateway/dist/web/sessions.js.map +1 -1
- package/node_modules/@buddi/gateway/src/agents/starter/keeper/agent.md +2 -2
- package/node_modules/@buddi/gateway/src/agents/starter/planner/agent.md +1 -1
- package/node_modules/@buddi/gateway/src/agents/starter/scout/agent.md +1 -1
- package/node_modules/@buddi/install/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/runtime/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/runtime/dist/delegate.js +1 -1
- package/node_modules/@buddi/runtime/dist/delegate.js.map +1 -1
- package/node_modules/@buddi/tool-email/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/tool-email/dist/config.d.ts +13 -9
- package/node_modules/@buddi/tool-email/dist/config.d.ts.map +1 -1
- package/node_modules/@buddi/tool-email/dist/config.js +33 -40
- package/node_modules/@buddi/tool-email/dist/config.js.map +1 -1
- package/node_modules/@buddi/tool-email/dist/index.d.ts +1 -1
- package/node_modules/@buddi/tool-email/dist/index.d.ts.map +1 -1
- package/node_modules/@buddi/tool-email/dist/index.js +1 -1
- package/node_modules/@buddi/tool-email/dist/index.js.map +1 -1
- package/node_modules/@buddi/tool-email/dist/pages/accounts.d.ts +1 -2
- package/node_modules/@buddi/tool-email/dist/pages/accounts.d.ts.map +1 -1
- package/node_modules/@buddi/tool-email/dist/pages/accounts.js +42 -18
- package/node_modules/@buddi/tool-email/dist/pages/accounts.js.map +1 -1
- package/node_modules/@buddi/tool-email/dist/pages/queries.d.ts.map +1 -1
- package/node_modules/@buddi/tool-email/dist/pages/queries.js +7 -5
- package/node_modules/@buddi/tool-email/dist/pages/queries.js.map +1 -1
- package/node_modules/@buddi/tool-email/dist/ports.d.ts +5 -1
- package/node_modules/@buddi/tool-email/dist/ports.d.ts.map +1 -1
- package/node_modules/@buddi/tool-email/dist/tools/shared.js +1 -1
- package/node_modules/@buddi/tool-email/dist/tools/shared.js.map +1 -1
- package/node_modules/@buddi/tool-web/dist/.tsbuildinfo +1 -1
- package/node_modules/@buddi/tool-web/dist/providers/index.d.ts +1 -2
- package/node_modules/@buddi/tool-web/dist/providers/index.d.ts.map +1 -1
- package/node_modules/@buddi/tool-web/dist/providers/index.js +1 -2
- package/node_modules/@buddi/tool-web/dist/providers/index.js.map +1 -1
- package/node_modules/hono/dist/cjs/jsx/utils.js +1 -1
- package/node_modules/hono/dist/cjs/middleware/combine/index.js +3 -1
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +2 -2
- package/node_modules/hono/dist/jsx/utils.js +1 -1
- package/node_modules/hono/dist/middleware/combine/index.js +3 -1
- package/node_modules/hono/dist/middleware/etag/index.js +2 -2
- package/node_modules/hono/dist/middleware/language/language.js +1 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/handler.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/bun/websocket.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-pages/handler.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/cloudflare-workers/serve-static-module.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/lambda-edge/handler.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/service-worker/handler.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/service-worker/index.d.ts +2 -1
- package/node_modules/hono/dist/types/adapter/service-worker/types.d.ts +2 -1
- package/node_modules/hono/dist/types/client/types.d.ts +2 -1
- package/node_modules/hono/dist/types/context.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/cookie/index.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/css/common.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/css/index.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/dev/index.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/factory/index.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/proxy/index.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/ssg/middleware.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/ssg/utils.d.ts +2 -1
- package/node_modules/hono/dist/types/helper/testing/index.d.ts +2 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +2 -1
- package/node_modules/hono/dist/types/http-exception.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/base.d.ts +4 -3
- package/node_modules/hono/dist/types/jsx/context.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/client.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/css.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/hooks/index.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/index.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/render.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/dom/server.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/index.d.ts +2 -1
- package/node_modules/hono/dist/types/jsx/types.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/basic-auth/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/bearer-auth/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/body-limit/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/compress/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/cors/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/csrf/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/etag/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/ip-restriction/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/jwt/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/language/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/logger/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/method-override/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/powered-by/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/pretty-json/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/request-id/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/secure-headers/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/secure-headers/permissions-policy.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/secure-headers/secure-headers.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/timing/index.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/timing/timing.d.ts +2 -1
- package/node_modules/hono/dist/types/middleware/trailing-slash/index.d.ts +2 -1
- package/node_modules/hono/dist/types/request.d.ts +2 -1
- package/node_modules/hono/dist/types/router/reg-exp-router/prepared-router.d.ts +2 -1
- package/node_modules/hono/dist/types/types.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/body.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/buffer.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/cookie.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/crypto.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/filepath.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/html.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/mime.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/types.d.ts +2 -1
- package/node_modules/hono/dist/types/utils/url.d.ts +2 -1
- package/node_modules/hono/dist/types/validator/utils.d.ts +2 -1
- package/node_modules/hono/dist/types/validator/validator.d.ts +2 -1
- package/node_modules/hono/package.json +2 -2
- package/node_modules/pg/lib/client.js +18 -0
- package/node_modules/pg/lib/connection.js +8 -1
- package/node_modules/pg/lib/crypto/cert-signatures.js +1 -1
- package/node_modules/pg/lib/native/client.js +11 -3
- package/node_modules/pg/lib/native/query.js +3 -1
- package/node_modules/pg/lib/query.js +5 -1
- package/node_modules/pg/lib/utils.js +19 -1
- package/node_modules/pg/package.json +5 -5
- package/node_modules/pg-connection-string/index.js +1 -1
- package/node_modules/pg-connection-string/package.json +2 -3
- package/node_modules/pg-protocol/dist/buffer-writer.d.ts +5 -1
- package/node_modules/pg-protocol/dist/buffer-writer.js +10 -1
- package/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -1
- package/node_modules/pg-protocol/dist/serializer.js +20 -18
- package/node_modules/pg-protocol/dist/serializer.js.map +1 -1
- package/node_modules/pg-protocol/package.json +2 -2
- package/node_modules/pg-protocol/src/buffer-writer.ts +12 -2
- package/node_modules/pg-protocol/src/serializer.ts +26 -20
- package/package.json +2 -2
- package/packages/cli/dist/.tsbuildinfo +1 -1
- package/packages/cli/dist/doctor-probes.d.ts.map +1 -1
- package/packages/cli/dist/doctor-probes.js +29 -8
- package/packages/cli/dist/doctor-probes.js.map +1 -1
- package/packages/cli/dist/doctor.d.ts +8 -1
- package/packages/cli/dist/doctor.d.ts.map +1 -1
- package/packages/cli/dist/doctor.js +19 -2
- package/packages/cli/dist/doctor.js.map +1 -1
- package/packages/core/dist/.tsbuildinfo +1 -1
- package/packages/core/dist/agents/catalog.d.ts.map +1 -1
- package/packages/core/dist/agents/catalog.js +11 -2
- package/packages/core/dist/agents/catalog.js.map +1 -1
- package/packages/core/dist/agents/skills.d.ts +4 -4
- package/packages/core/dist/notifications/agent.d.ts +54 -0
- package/packages/core/dist/notifications/agent.d.ts.map +1 -0
- package/packages/core/dist/notifications/agent.js +134 -0
- package/packages/core/dist/notifications/agent.js.map +1 -0
- package/packages/core/dist/notifications/index.d.ts +1 -0
- package/packages/core/dist/notifications/index.d.ts.map +1 -1
- package/packages/core/dist/notifications/index.js +1 -0
- package/packages/core/dist/notifications/index.js.map +1 -1
- package/packages/core/dist/notifications/notify.d.ts +4 -0
- package/packages/core/dist/notifications/notify.d.ts.map +1 -1
- package/packages/core/dist/notifications/notify.js +19 -7
- package/packages/core/dist/notifications/notify.js.map +1 -1
- package/packages/core/dist/notifications/store.d.ts +8 -1
- package/packages/core/dist/notifications/store.d.ts.map +1 -1
- package/packages/core/dist/notifications/store.js +55 -6
- package/packages/core/dist/notifications/store.js.map +1 -1
- package/packages/core/dist/notifications/types.d.ts +26 -2
- package/packages/core/dist/notifications/types.d.ts.map +1 -1
- package/packages/core/dist/notifications/types.js +1 -1
- package/packages/core/dist/notifications/types.js.map +1 -1
- package/packages/core/dist/vault/resolve.d.ts.map +1 -1
- package/packages/core/dist/vault/resolve.js +0 -1
- package/packages/core/dist/vault/resolve.js.map +1 -1
- package/packages/core/migrations/054_agent_messages.sql +15 -0
- package/packages/gateway/dist/.tsbuildinfo +1 -1
- package/packages/gateway/dist/agents/owner-tools.d.ts +34 -1
- package/packages/gateway/dist/agents/owner-tools.d.ts.map +1 -1
- package/packages/gateway/dist/agents/owner-tools.js +87 -4
- package/packages/gateway/dist/agents/owner-tools.js.map +1 -1
- package/packages/gateway/dist/bootstrap.js +3 -3
- package/packages/gateway/dist/bootstrap.js.map +1 -1
- package/packages/gateway/dist/owner-secrets.d.ts +77 -8
- package/packages/gateway/dist/owner-secrets.d.ts.map +1 -1
- package/packages/gateway/dist/owner-secrets.js +142 -14
- package/packages/gateway/dist/owner-secrets.js.map +1 -1
- package/packages/gateway/dist/serve.d.ts.map +1 -1
- package/packages/gateway/dist/serve.js +24 -8
- package/packages/gateway/dist/serve.js.map +1 -1
- package/packages/gateway/dist/system-context.d.ts +2 -0
- package/packages/gateway/dist/system-context.d.ts.map +1 -1
- package/packages/gateway/dist/system-context.js +5 -1
- package/packages/gateway/dist/system-context.js.map +1 -1
- package/packages/gateway/dist/telegram/channel.d.ts +7 -0
- package/packages/gateway/dist/telegram/channel.d.ts.map +1 -1
- package/packages/gateway/dist/telegram/channel.js +14 -2
- package/packages/gateway/dist/telegram/channel.js.map +1 -1
- package/packages/gateway/dist/web/connections.d.ts +3 -0
- package/packages/gateway/dist/web/connections.d.ts.map +1 -1
- package/packages/gateway/dist/web/connections.js +48 -6
- package/packages/gateway/dist/web/connections.js.map +1 -1
- package/packages/gateway/dist/web/notifications.d.ts +6 -0
- package/packages/gateway/dist/web/notifications.d.ts.map +1 -1
- package/packages/gateway/dist/web/notifications.js +14 -1
- package/packages/gateway/dist/web/notifications.js.map +1 -1
- package/packages/gateway/dist/web/onboarding.d.ts.map +1 -1
- package/packages/gateway/dist/web/onboarding.js +5 -2
- package/packages/gateway/dist/web/onboarding.js.map +1 -1
- package/packages/gateway/dist/web/recovery.d.ts +10 -0
- package/packages/gateway/dist/web/recovery.d.ts.map +1 -1
- package/packages/gateway/dist/web/recovery.js +113 -33
- package/packages/gateway/dist/web/recovery.js.map +1 -1
- package/packages/gateway/dist/web/server.d.ts.map +1 -1
- package/packages/gateway/dist/web/server.js +16 -5
- package/packages/gateway/dist/web/server.js.map +1 -1
- package/packages/gateway/dist/web/sessions.d.ts +8 -0
- package/packages/gateway/dist/web/sessions.d.ts.map +1 -1
- package/packages/gateway/dist/web/sessions.js +24 -1
- package/packages/gateway/dist/web/sessions.js.map +1 -1
- package/packages/gateway/src/agents/starter/keeper/agent.md +2 -2
- package/packages/gateway/src/agents/starter/planner/agent.md +1 -1
- package/packages/gateway/src/agents/starter/scout/agent.md +1 -1
- package/packages/install/dist/.tsbuildinfo +1 -1
- package/packages/runtime/dist/.tsbuildinfo +1 -1
- package/packages/runtime/dist/delegate.js +1 -1
- package/packages/runtime/dist/delegate.js.map +1 -1
- package/packages/tools/email/dist/.tsbuildinfo +1 -1
- package/packages/tools/email/dist/config.d.ts +13 -9
- package/packages/tools/email/dist/config.d.ts.map +1 -1
- package/packages/tools/email/dist/config.js +33 -40
- package/packages/tools/email/dist/config.js.map +1 -1
- package/packages/tools/email/dist/index.d.ts +1 -1
- package/packages/tools/email/dist/index.d.ts.map +1 -1
- package/packages/tools/email/dist/index.js +1 -1
- package/packages/tools/email/dist/index.js.map +1 -1
- package/packages/tools/email/dist/pages/accounts.d.ts +1 -2
- package/packages/tools/email/dist/pages/accounts.d.ts.map +1 -1
- package/packages/tools/email/dist/pages/accounts.js +42 -18
- package/packages/tools/email/dist/pages/accounts.js.map +1 -1
- package/packages/tools/email/dist/pages/queries.d.ts.map +1 -1
- package/packages/tools/email/dist/pages/queries.js +7 -5
- package/packages/tools/email/dist/pages/queries.js.map +1 -1
- package/packages/tools/email/dist/ports.d.ts +5 -1
- package/packages/tools/email/dist/ports.d.ts.map +1 -1
- package/packages/tools/email/dist/tools/shared.js +1 -1
- package/packages/tools/email/dist/tools/shared.js.map +1 -1
- package/packages/tools/web/dist/.tsbuildinfo +1 -1
- package/packages/tools/web/dist/providers/index.d.ts +1 -2
- package/packages/tools/web/dist/providers/index.d.ts.map +1 -1
- package/packages/tools/web/dist/providers/index.js +1 -2
- package/packages/tools/web/dist/providers/index.js.map +1 -1
- package/packages/web/dist/assets/{index-DIXokQ4n.css → index-BxbiKNMS.css} +1 -1
- package/packages/web/dist/assets/index-Rrze3bGo.js +130 -0
- package/packages/web/dist/assets/{lottie_light-j3HICV9o.js → lottie_light-7wQnGwdw.js} +1 -1
- package/packages/web/dist/build.json +1 -1
- package/packages/web/dist/index.html +2 -2
- package/packages/web/dist/precache.json +4 -4
- package/packages/web/dist/sw.js +5 -3
- package/packages/web/dist/assets/index-uqQyuYjR.js +0 -128
|
@@ -35,6 +35,8 @@ const errorFieldMap = {
|
|
|
35
35
|
sqlState: 'code',
|
|
36
36
|
statementPosition: 'position',
|
|
37
37
|
messagePrimary: 'message',
|
|
38
|
+
messageDetail: 'detail',
|
|
39
|
+
messageHint: 'hint',
|
|
38
40
|
context: 'where',
|
|
39
41
|
schemaName: 'schema',
|
|
40
42
|
tableName: 'table',
|
|
@@ -137,7 +139,7 @@ NativeQuery.prototype.submit = function (client) {
|
|
|
137
139
|
|
|
138
140
|
// check if the client has already executed this named query
|
|
139
141
|
// if so...just execute it again - skip the planning phase
|
|
140
|
-
if (client.namedQueries[this.name]) {
|
|
142
|
+
if (client.namedQueries[this.name] !== undefined) {
|
|
141
143
|
if (this.text && client.namedQueries[this.name] !== this.text) {
|
|
142
144
|
const err = new Error(`Prepared statements must be unique - '${this.name}' was used for a different statement`)
|
|
143
145
|
return after(err)
|
|
@@ -183,7 +183,11 @@ class Query extends EventEmitter {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
hasBeenParsed(connection) {
|
|
186
|
-
return
|
|
186
|
+
return (
|
|
187
|
+
this.name &&
|
|
188
|
+
(connection.parsedStatements[this.name] !== undefined ||
|
|
189
|
+
connection.submittedNamedStatements[this.name] !== undefined)
|
|
190
|
+
)
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
handlePortalSuspended(connection) {
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const defaults = require('./defaults')
|
|
4
|
+
const nodeUtils = require('util')
|
|
4
5
|
|
|
5
6
|
const { isDate } = require('util/types')
|
|
6
7
|
|
|
8
|
+
const invalidDateDeprecationNotice = nodeUtils.deprecate(
|
|
9
|
+
() => {},
|
|
10
|
+
'Sending an invalid date to Postgres is deprecated and will throw an error in the next major version of pg. Ensure any Date object passed as a query parameter is valid.',
|
|
11
|
+
'PG_INVALID_DATE'
|
|
12
|
+
)
|
|
13
|
+
|
|
7
14
|
function escapeElement(elementRepresentation) {
|
|
8
15
|
const escaped = elementRepresentation.replace(/\\/g, '\\\\').replace(/"/g, '\\"')
|
|
9
16
|
|
|
@@ -54,6 +61,9 @@ const prepareValue = function (val, seen) {
|
|
|
54
61
|
return Buffer.from(val.buffer, val.byteOffset, val.byteLength)
|
|
55
62
|
}
|
|
56
63
|
if (isDate(val)) {
|
|
64
|
+
if (isNaN(val.getTime())) {
|
|
65
|
+
invalidDateDeprecationNotice()
|
|
66
|
+
}
|
|
57
67
|
if (defaults.parseInputDatesAsUTC) {
|
|
58
68
|
return dateToStringUTC(val)
|
|
59
69
|
} else {
|
|
@@ -143,7 +153,8 @@ function dateToStringUTC(date) {
|
|
|
143
153
|
|
|
144
154
|
function normalizeQueryConfig(config, values, callback) {
|
|
145
155
|
// can take in strings or config objects
|
|
146
|
-
|
|
156
|
+
// Copy config so normalization does not mutate the caller's object.
|
|
157
|
+
config = typeof config === 'string' ? { text: config } : cloneQueryConfig(config)
|
|
147
158
|
if (values) {
|
|
148
159
|
if (typeof values === 'function') {
|
|
149
160
|
config.callback = values
|
|
@@ -157,6 +168,13 @@ function normalizeQueryConfig(config, values, callback) {
|
|
|
157
168
|
return config
|
|
158
169
|
}
|
|
159
170
|
|
|
171
|
+
function cloneQueryConfig(config) {
|
|
172
|
+
if (config == null) {
|
|
173
|
+
return config
|
|
174
|
+
}
|
|
175
|
+
return Object.defineProperties(Object.create(Object.getPrototypeOf(config)), Object.getOwnPropertyDescriptors(config))
|
|
176
|
+
}
|
|
177
|
+
|
|
160
178
|
// Ported from PostgreSQL 9.2.4 source code in src/interfaces/libpq/fe-exec.c
|
|
161
179
|
const escapeIdentifier = function (str) {
|
|
162
180
|
return '"' + str.replace(/"/g, '""') + '"'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg",
|
|
3
|
-
"version": "8.23.
|
|
3
|
+
"version": "8.23.1",
|
|
4
4
|
"description": "PostgreSQL client - pure javascript & libpq with the same API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"database",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"./lib/*.js": "./lib/*.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"pg-connection-string": "^2.14.
|
|
35
|
+
"pg-connection-string": "^2.14.1",
|
|
36
36
|
"pg-pool": "^3.14.0",
|
|
37
|
-
"pg-protocol": "^1.16.
|
|
37
|
+
"pg-protocol": "^1.16.1",
|
|
38
38
|
"pg-types": "2.2.0",
|
|
39
39
|
"pgpass": "1.0.5"
|
|
40
40
|
},
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"wrangler": "^3.x"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"pg-cloudflare": "^1.4.
|
|
53
|
+
"pg-cloudflare": "^1.4.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"pg-native": ">=3.0.1"
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">= 16.0.0"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "0980cefebe0ae461da8883703be049fe13ca96cf"
|
|
76
76
|
}
|
|
@@ -50,7 +50,7 @@ function parse(str, options = {}) {
|
|
|
50
50
|
config.client_encoding = result.searchParams.get('encoding')
|
|
51
51
|
return config
|
|
52
52
|
}
|
|
53
|
-
const hostname = dummyHost ? '' : result.hostname
|
|
53
|
+
const hostname = (dummyHost ? '' : result.hostname).replace(/^\[(.+)\]$/, '$1')
|
|
54
54
|
if (!config.host) {
|
|
55
55
|
// Only set the host if there is no equivalent query param.
|
|
56
56
|
config.host = decodeURIComponent(hostname)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-connection-string",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "Functions for dealing with a PostgreSQL connection string",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"@types/pg": "^8.12.0",
|
|
38
38
|
"chai": "^4.1.1",
|
|
39
39
|
"coveralls": "^3.0.4",
|
|
40
|
-
"istanbul": "^0.4.5",
|
|
41
40
|
"mocha": "^11.7.5",
|
|
42
41
|
"nyc": "^15",
|
|
43
42
|
"tsx": "^4.19.4",
|
|
@@ -48,5 +47,5 @@
|
|
|
48
47
|
"index.d.ts",
|
|
49
48
|
"esm"
|
|
50
49
|
],
|
|
51
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0980cefebe0ae461da8883703be049fe13ca96cf"
|
|
52
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare class Writer {
|
|
2
2
|
private size;
|
|
3
|
-
|
|
3
|
+
buffer: Buffer;
|
|
4
4
|
private offset;
|
|
5
5
|
private headerPosition;
|
|
6
6
|
constructor(size?: number);
|
|
@@ -11,6 +11,10 @@ export declare class Writer {
|
|
|
11
11
|
addString(string?: string): Writer;
|
|
12
12
|
addInt32PrefixedString(string: string): Writer;
|
|
13
13
|
add(otherBuffer: Buffer): Writer;
|
|
14
|
+
/**
|
|
15
|
+
* Appends an uninitialized block of {@link size} bytes to the buffer and returns its offset.
|
|
16
|
+
*/
|
|
17
|
+
reserveUnsafe(size: number): number;
|
|
14
18
|
private join;
|
|
15
19
|
flush(code?: number): Buffer;
|
|
16
20
|
clear(): void;
|
|
@@ -17,7 +17,7 @@ class Writer {
|
|
|
17
17
|
// https://stackoverflow.com/questions/2269063/buffer-growth-strategy
|
|
18
18
|
const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size;
|
|
19
19
|
this.buffer = Buffer.allocUnsafe(newSize);
|
|
20
|
-
oldBuffer.copy(this.buffer);
|
|
20
|
+
oldBuffer.copy(this.buffer, 0, 0, this.offset);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
addInt32(num) {
|
|
@@ -79,6 +79,15 @@ class Writer {
|
|
|
79
79
|
this.offset += otherBuffer.length;
|
|
80
80
|
return this;
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Appends an uninitialized block of {@link size} bytes to the buffer and returns its offset.
|
|
84
|
+
*/
|
|
85
|
+
reserveUnsafe(size) {
|
|
86
|
+
const offset = this.offset;
|
|
87
|
+
this.ensure(size);
|
|
88
|
+
this.offset += size;
|
|
89
|
+
return offset;
|
|
90
|
+
}
|
|
82
91
|
join(code) {
|
|
83
92
|
if (code) {
|
|
84
93
|
this.buffer[this.headerPosition] = code;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buffer-writer.js","sourceRoot":"","sources":["../src/buffer-writer.ts"],"names":[],"mappings":";AAAA,uFAAuF;;;AAEvF,MAAa,MAAM;IAIjB,YAAoB,OAAO,GAAG;QAAV,SAAI,GAAJ,IAAI,CAAM;QAFtB,WAAM,GAAW,CAAC,CAAA;QAClB,mBAAc,GAAW,CAAC,CAAA;QAEhC,IAAI,CAAC,MAAM,GAAG,MA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C,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IACrD,CAAC;IAEM,KAAK,CAAC,IAAa;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC9B,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;QACf,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC3C,OAAO,MAAM,CAAA;IACf,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;QACf,IAAI,CAAC,cAAc,GAAG,CAAC,CAAA;IACzB,CAAC;CACF;AArHD,wBAqHC"}
|
|
@@ -59,29 +59,29 @@ const parse = (query) => {
|
|
|
59
59
|
}
|
|
60
60
|
return writer.flush(80 /* code.parse */);
|
|
61
61
|
};
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
for (let i = 0; i <
|
|
62
|
+
const writeValues = function (values, valueMapper, formatsOffset) {
|
|
63
|
+
const len = values.length;
|
|
64
|
+
for (let i = 0; i < len; i++) {
|
|
65
65
|
const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i];
|
|
66
|
+
let formatByte = 0 /* ParamType.STRING */;
|
|
66
67
|
if (mappedVal == null) {
|
|
67
|
-
//
|
|
68
|
-
writer.
|
|
69
|
-
// write -1 to the param writer to indicate null
|
|
70
|
-
paramWriter.addInt32(-1);
|
|
68
|
+
// write -1 to indicate null
|
|
69
|
+
writer.addInt32(-1);
|
|
71
70
|
}
|
|
72
71
|
else if (mappedVal instanceof Buffer) {
|
|
73
|
-
|
|
74
|
-
writer.addInt16(1 /* ParamType.BINARY */);
|
|
72
|
+
formatByte = 1 /* ParamType.BINARY */;
|
|
75
73
|
// add the buffer to the param writer
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
writer.addInt32(mappedVal.length);
|
|
75
|
+
writer.add(mappedVal);
|
|
78
76
|
}
|
|
79
77
|
else {
|
|
80
|
-
// add the param type (string) to the writer
|
|
81
|
-
writer.addInt16(0 /* ParamType.STRING */);
|
|
82
78
|
// length prefix + UTF-8 bytes in one pass (Buffer.byteLength computed once)
|
|
83
|
-
|
|
79
|
+
writer.addInt32PrefixedString(mappedVal);
|
|
84
80
|
}
|
|
81
|
+
// beware: `writer` operations can replace `writer.buffer` with a new buffer
|
|
82
|
+
const buf = writer.buffer;
|
|
83
|
+
buf[formatsOffset++] = 0;
|
|
84
|
+
buf[formatsOffset++] = formatByte;
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
const bind = (config = {}) => {
|
|
@@ -92,17 +92,19 @@ const bind = (config = {}) => {
|
|
|
92
92
|
const values = config.values || emptyArray;
|
|
93
93
|
const len = values.length;
|
|
94
94
|
writer.addCString(portal).addCString(statement);
|
|
95
|
+
// number of parameter format codes
|
|
96
|
+
writer.addInt16(len);
|
|
97
|
+
// space for those codes, filled by `writeValues`
|
|
98
|
+
const formatsOffset = writer.reserveUnsafe(len * 2);
|
|
99
|
+
// number of parameter values
|
|
95
100
|
writer.addInt16(len);
|
|
96
101
|
try {
|
|
97
|
-
writeValues(values, config.valueMapper);
|
|
102
|
+
writeValues(values, config.valueMapper, formatsOffset);
|
|
98
103
|
}
|
|
99
104
|
catch (err) {
|
|
100
105
|
writer.clear();
|
|
101
|
-
paramWriter.clear();
|
|
102
106
|
throw err;
|
|
103
107
|
}
|
|
104
|
-
writer.addInt16(len);
|
|
105
|
-
writer.add(paramWriter.flush());
|
|
106
108
|
// all results use the same format code
|
|
107
109
|
writer.addInt16(1);
|
|
108
110
|
// format code
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.js","sourceRoot":"","sources":["../src/serializer.ts"],"names":[],"mappings":";;;AAAA,mDAAwC;AAkBxC,MAAM,MAAM,GAAG,IAAI,sBAAM,EAAE,CAAA;AAE3B,MAAM,OAAO,GAAG,CAAC,IAA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GAAG,EAAE,CAAC,SAAS;IACpB,QAAQ;IACR,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc;IAC9B,QAAQ;IACR,MAAM;CACP,CAAA;AAEQ,8BAAS"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pg-protocol",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"description": "The postgres client/server binary protocol, implemented in TypeScript",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"/src",
|
|
41
41
|
"/esm"
|
|
42
42
|
],
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0980cefebe0ae461da8883703be049fe13ca96cf"
|
|
44
44
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//binary data writer tuned for encoding binary specific to the postgres binary protocol
|
|
2
2
|
|
|
3
3
|
export class Writer {
|
|
4
|
-
|
|
4
|
+
public buffer: Buffer
|
|
5
5
|
private offset: number = 5
|
|
6
6
|
private headerPosition: number = 0
|
|
7
7
|
constructor(private size = 256) {
|
|
@@ -16,7 +16,7 @@ export class Writer {
|
|
|
16
16
|
// https://stackoverflow.com/questions/2269063/buffer-growth-strategy
|
|
17
17
|
const newSize = oldBuffer.length + (oldBuffer.length >> 1) + size
|
|
18
18
|
this.buffer = Buffer.allocUnsafe(newSize)
|
|
19
|
-
oldBuffer.copy(this.buffer)
|
|
19
|
+
oldBuffer.copy(this.buffer, 0, 0, this.offset)
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -85,6 +85,16 @@ export class Writer {
|
|
|
85
85
|
return this
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Appends an uninitialized block of {@link size} bytes to the buffer and returns its offset.
|
|
90
|
+
*/
|
|
91
|
+
public reserveUnsafe(size: number): number {
|
|
92
|
+
const offset = this.offset
|
|
93
|
+
this.ensure(size)
|
|
94
|
+
this.offset += size
|
|
95
|
+
return offset
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
private join(code?: number): Buffer {
|
|
89
99
|
if (code) {
|
|
90
100
|
this.buffer[this.headerPosition] = code
|
|
@@ -110,34 +110,36 @@ type BindOpts = {
|
|
|
110
110
|
valueMapper?: ValueMapper
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
const paramWriter = new Writer()
|
|
114
|
-
|
|
115
113
|
// make this a const enum so typescript will inline the value
|
|
116
114
|
const enum ParamType {
|
|
117
115
|
STRING = 0,
|
|
118
116
|
BINARY = 1,
|
|
119
117
|
}
|
|
120
118
|
|
|
121
|
-
const writeValues = function (values: any[], valueMapper
|
|
122
|
-
|
|
119
|
+
const writeValues = function (values: any[], valueMapper: ValueMapper | undefined, formatsOffset: number): void {
|
|
120
|
+
const len = values.length
|
|
121
|
+
for (let i = 0; i < len; i++) {
|
|
123
122
|
const mappedVal = valueMapper ? valueMapper(values[i], i) : values[i]
|
|
123
|
+
let formatByte = ParamType.STRING
|
|
124
|
+
|
|
124
125
|
if (mappedVal == null) {
|
|
125
|
-
//
|
|
126
|
-
writer.
|
|
127
|
-
// write -1 to the param writer to indicate null
|
|
128
|
-
paramWriter.addInt32(-1)
|
|
126
|
+
// write -1 to indicate null
|
|
127
|
+
writer.addInt32(-1)
|
|
129
128
|
} else if (mappedVal instanceof Buffer) {
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
formatByte = ParamType.BINARY
|
|
130
|
+
|
|
132
131
|
// add the buffer to the param writer
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
writer.addInt32(mappedVal.length)
|
|
133
|
+
writer.add(mappedVal)
|
|
135
134
|
} else {
|
|
136
|
-
// add the param type (string) to the writer
|
|
137
|
-
writer.addInt16(ParamType.STRING)
|
|
138
135
|
// length prefix + UTF-8 bytes in one pass (Buffer.byteLength computed once)
|
|
139
|
-
|
|
136
|
+
writer.addInt32PrefixedString(mappedVal)
|
|
140
137
|
}
|
|
138
|
+
|
|
139
|
+
// beware: `writer` operations can replace `writer.buffer` with a new buffer
|
|
140
|
+
const buf = writer.buffer
|
|
141
|
+
buf[formatsOffset++] = 0
|
|
142
|
+
buf[formatsOffset++] = formatByte
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -150,19 +152,23 @@ const bind = (config: BindOpts = {}): Buffer => {
|
|
|
150
152
|
const len = values.length
|
|
151
153
|
|
|
152
154
|
writer.addCString(portal).addCString(statement)
|
|
155
|
+
|
|
156
|
+
// number of parameter format codes
|
|
157
|
+
writer.addInt16(len)
|
|
158
|
+
|
|
159
|
+
// space for those codes, filled by `writeValues`
|
|
160
|
+
const formatsOffset = writer.reserveUnsafe(len * 2)
|
|
161
|
+
|
|
162
|
+
// number of parameter values
|
|
153
163
|
writer.addInt16(len)
|
|
154
164
|
|
|
155
165
|
try {
|
|
156
|
-
writeValues(values, config.valueMapper)
|
|
166
|
+
writeValues(values, config.valueMapper, formatsOffset)
|
|
157
167
|
} catch (err) {
|
|
158
168
|
writer.clear()
|
|
159
|
-
paramWriter.clear()
|
|
160
169
|
throw err
|
|
161
170
|
}
|
|
162
171
|
|
|
163
|
-
writer.addInt16(len)
|
|
164
|
-
writer.add(paramWriter.flush())
|
|
165
|
-
|
|
166
172
|
// all results use the same format code
|
|
167
173
|
writer.addInt16(1)
|
|
168
174
|
// format code
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withbuddi/buddi",
|
|
3
|
-
"version": "0.1.0-pre.
|
|
3
|
+
"version": "0.1.0-pre.26",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Your personal agents, on your computer",
|
|
6
6
|
"repository": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"buddi": "packages/install/dist/launcher.js"
|
|
18
18
|
},
|
|
19
19
|
"buddi": {
|
|
20
|
-
"notes": "###
|
|
20
|
+
"notes": "### Added\n\n- A message an agent sent you (`owner.notify`) opens on the canvas as the message itself, with where it went as a status (sent, held, in a summary, refused) and the call's details folded; its chat row says where it went.\n- The front desk holds `owner.notify` without a line in its file, the way every agent reads the time, so an installation whose Buddi file predates the tool can still be asked to \"send me that on my phone\". Other agents get it on their Tools tab.\n- Agents can message you themselves with the new `owner.notify` tool: asked \"send me a message on Telegram now\", an agent sends it and says truthfully where it went. It is shown as \"@agent: title\" in plain text, follows your notification routing (and skips the dashboard hold when you asked in the conversation), and is limited to 6 urgent messages an hour and 20 a day per agent. Settings → Notifications has a \"Messages from your agents\" section (on or off, the highest urgency, a mute per agent), and each agent's Tools tab has its mute. The front desk, your first assistant and the starter agents have it.\n- An agent's Setup → Tools now lists every connection with a switch for whether this agent holds it, saved as you flip it. A connection that needs review or a sign-in is shown with why and a link to Connections; the connection sheet's \"Held by\" shows the same.\n\n### Fixed\n\n- On Telegram, an agent's signature (\"@buddi: …\") was turned into a link to whoever owns that public username. It still reads the same, but is no longer a mention.\n- A forgotten tab, an unpaired Chrome extension or any poller with no sign-in could lock the owner out of the dashboard: every refused request counted as a failed sign-in, and all tailnet and SSH-tunnel traffic shares one address. Now only a request that presents a credential counts, and the same stale cookie counts once however often it is sent; guessing still locks the address.\n- The installed app showed the browser's error page when buddi answered with an empty \"too many requests\" or a server error. It now shows its own offline page for those too.\n- After a restore, the recovery checklist listed every working model account as a key to paste again, because it looked for the account's key under its own name while buddi keeps it as an owner secret. It now asks the way buddi reads the key, so only what is really missing is listed, in words (\"Gemini — API key\"). Each item has a Fix that opens that account, the Telegram setting, Keys and secrets, or the plugin's install, and the checklist reads itself again when you come back to it.\n\n### Changed\n\n- Telegram has its own page in Settings, beside Notifications: it is where you talk to buddi, not only how it reaches you. Notifications links to it while Telegram is not set up, and the recovery checklist's Telegram fix opens it.\n- An agent's connection tools that ask first are one folded group per connection, with how many ask and which are remembered in its summary; tools that delete or destroy are named once at the bottom instead of a disabled row and a sentence each.\n- An agent's Setup is four tabs instead of three: Identity, Brain, Tools (roles, tools and connections) and Team (who it may ask). The built-in context moved to Brain, and old links to Access open Tools.\n- The agents reference documents `{{today}}`, the one placeholder a persona can use.\n- Mailboxes now exist only as accounts added in Settings → Email; `GMAIL_USER` and `GMAIL_APP_PASSWORD` in `.env` are no longer read. On the first start after upgrading, a mailbox `.env` named is adopted once as a Settings → Email account, keeping its mail, its sync position and its triage (nothing is read or triaged again), and its password moves to that account's own secret; the log says the `GMAIL_*` lines can be deleted. If its password cannot be read, nothing is created and the log says to add the mailbox in Settings → Email, where adding it keeps its mail. `buddi doctor` warns while those lines are still in `.env`, and the start-up summary says how many mailboxes are configured.\n- `buddi doctor` finds a mailbox's password among the owner's secrets, where buddi keeps it, instead of reporting it missing."
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"packages",
|