From dd928264233af4fd5591ed60fa42a69c4eb17d17 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:39:33 -0700 Subject: [PATCH 01/14] pebbles: sync --- .pebbles/events.jsonl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .pebbles/events.jsonl diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl new file mode 100644 index 0000000..7599bb1 --- /dev/null +++ b/.pebbles/events.jsonl @@ -0,0 +1,25 @@ +{"type":"create","timestamp":"2026-07-12T13:39:02.188201Z","issue_id":"gmail-883","payload":{"description":"Create a modern external OpenClaw channel plugin where each Gmail thread maps to one isolated OpenClaw session. Deliver package scaffolding, secure account configuration, Gmail API transport, polling ingress, threaded replies, tests, documentation, and package validation.","priority":"1","title":"Build Gmail-backed OpenClaw channel","type":"epic"}} +{"type":"create","timestamp":"2026-07-12T13:39:16.864391Z","issue_id":"gmail-e98","payload":{"description":"Create TypeScript ESM package metadata, manifest, build/test/lint scripts, runtime entry, CI, and pinned OpenClaw compatibility metadata. Acceptance: package installs dependencies, entry follows defineChannelPluginEntry, build and an entry-shape test pass. Verification: pnpm test; pnpm build; pnpm typecheck.","priority":"1","title":"Scaffold the modern OpenClaw plugin package","type":"task"}} +{"type":"create","timestamp":"2026-07-12T13:39:16.954953Z","issue_id":"gmail-c95","payload":{"description":"Define strict Zod channel schemas, secret-input-aware account resolution, target parsing, and deny-by-default inbound/outbound email policy. Acceptance: named/default accounts resolve without exposing secret values; exact/domain allowlists are case-insensitive; malformed targets/config fail closed. Verification: focused config and target tests plus typecheck.","priority":"1","title":"Implement secure Gmail account configuration","type":"task"}} +{"type":"create","timestamp":"2026-07-12T13:39:17.028583Z","issue_id":"gmail-227","payload":{"description":"Add a narrow Gmail client boundary, bounded MIME extraction, RFC 2822/base64url construction, unread listing/get/mark-read, and send/reply operations. Acceptance: untrusted API data is validated; text/plain and safe HTML fallback parse; new sends and replies produce correct Gmail payloads and return message/thread IDs. Verification: transport tests with a fake API, build, npm audit.","priority":"1","title":"Implement Gmail API message transport","type":"task"}} +{"type":"create","timestamp":"2026-07-12T13:39:17.117982Z","issue_id":"gmail-499","payload":{"description":"Implement polling gateway and inbound dispatch through current runtime helpers, using Gmail thread IDs as channel peers so sessions are isolated per thread. Acceptance: same thread produces same session route; different threads differ; self/disallowed senders never dispatch; successful dispatch marks read; reply delivery stays in the source thread. Verification: gateway/inbound tests and typecheck.","priority":"1","title":"Route polled Gmail threads through OpenClaw","type":"task"}} +{"type":"create","timestamp":"2026-07-12T13:39:17.257903Z","issue_id":"gmail-aa0","payload":{"description":"Write setup/configuration documentation, limitations and security notes; pack the built plugin and inspect/install it against current OpenClaw; run full validation and pre-ship reviews. Acceptance: README explains OAuth and target grammar; npm pack contains only required artifacts; OpenClaw runtime inspection recognizes gmail; all quality gates pass. Verification: pnpm check; npm pack --dry-run; OpenClaw plugin inspection.","priority":"1","title":"Document, package, and validate the first milestone","type":"task"}} +{"type":"rename","timestamp":"2026-07-12T13:39:28.320175Z","issue_id":"gmail-e98","payload":{"new_id":"gmail-883.1"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.320175Z","issue_id":"gmail-883.1","payload":{"dep_type":"parent-child","depends_on":"gmail-883"}} +{"type":"rename","timestamp":"2026-07-12T13:39:28.340705Z","issue_id":"gmail-c95","payload":{"new_id":"gmail-883.2"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.340705Z","issue_id":"gmail-883.2","payload":{"dep_type":"parent-child","depends_on":"gmail-883"}} +{"type":"rename","timestamp":"2026-07-12T13:39:28.360951Z","issue_id":"gmail-227","payload":{"new_id":"gmail-883.3"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.360951Z","issue_id":"gmail-883.3","payload":{"dep_type":"parent-child","depends_on":"gmail-883"}} +{"type":"rename","timestamp":"2026-07-12T13:39:28.381351Z","issue_id":"gmail-499","payload":{"new_id":"gmail-883.4"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.381351Z","issue_id":"gmail-883.4","payload":{"dep_type":"parent-child","depends_on":"gmail-883"}} +{"type":"rename","timestamp":"2026-07-12T13:39:28.403392Z","issue_id":"gmail-aa0","payload":{"new_id":"gmail-883.5"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.403392Z","issue_id":"gmail-883.5","payload":{"dep_type":"parent-child","depends_on":"gmail-883"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.426286Z","issue_id":"gmail-883","payload":{"dep_type":"blocks","depends_on":"gmail-883.1"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.449699Z","issue_id":"gmail-883","payload":{"dep_type":"blocks","depends_on":"gmail-883.2"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.474009Z","issue_id":"gmail-883","payload":{"dep_type":"blocks","depends_on":"gmail-883.3"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.497556Z","issue_id":"gmail-883","payload":{"dep_type":"blocks","depends_on":"gmail-883.4"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.520338Z","issue_id":"gmail-883","payload":{"dep_type":"blocks","depends_on":"gmail-883.5"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.545139Z","issue_id":"gmail-883.2","payload":{"dep_type":"blocks","depends_on":"gmail-883.1"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.569058Z","issue_id":"gmail-883.3","payload":{"dep_type":"blocks","depends_on":"gmail-883.2"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.593206Z","issue_id":"gmail-883.4","payload":{"dep_type":"blocks","depends_on":"gmail-883.3"}} +{"type":"dep_add","timestamp":"2026-07-12T13:39:28.62949Z","issue_id":"gmail-883.5","payload":{"dep_type":"blocks","depends_on":"gmail-883.4"}} From 39a7b6d164f95f45a80abb018f928f0da1925e26 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:39:53 -0700 Subject: [PATCH 02/14] chore: initialize project workflow --- .gitignore | 1 + .pebbles/.gitignore | 1 + .pebbles/config.json | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 .pebbles/.gitignore create mode 100644 .pebbles/config.json diff --git a/.gitignore b/.gitignore index 872d5f6..b5022d7 100644 --- a/.gitignore +++ b/.gitignore @@ -40,6 +40,7 @@ build/Release # Dependency directories node_modules/ jspm_packages/ +.worktrees/ # Snowpack dependency directory (https://snowpack.dev/) web_modules/ diff --git a/.pebbles/.gitignore b/.pebbles/.gitignore new file mode 100644 index 0000000..0a168c6 --- /dev/null +++ b/.pebbles/.gitignore @@ -0,0 +1 @@ +pebbles.db diff --git a/.pebbles/config.json b/.pebbles/config.json new file mode 100644 index 0000000..d64887b --- /dev/null +++ b/.pebbles/config.json @@ -0,0 +1,3 @@ +{ + "prefix": "gmail" +} \ No newline at end of file From ab37b3af267f7c155cb210eb60b28a958b8c7d08 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:41:23 -0700 Subject: [PATCH 03/14] docs: define Gmail channel milestone --- .pebbles/events.jsonl | 1 + docs/plan.md | 172 ++++++++++++++++++++++++++++++++++++ docs/spec.md | 199 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 372 insertions(+) create mode 100644 docs/plan.md create mode 100644 docs/spec.md diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 7599bb1..941ee64 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -23,3 +23,4 @@ {"type":"dep_add","timestamp":"2026-07-12T13:39:28.569058Z","issue_id":"gmail-883.3","payload":{"dep_type":"blocks","depends_on":"gmail-883.2"}} {"type":"dep_add","timestamp":"2026-07-12T13:39:28.593206Z","issue_id":"gmail-883.4","payload":{"dep_type":"blocks","depends_on":"gmail-883.3"}} {"type":"dep_add","timestamp":"2026-07-12T13:39:28.62949Z","issue_id":"gmail-883.5","payload":{"dep_type":"blocks","depends_on":"gmail-883.4"}} +{"type":"status_update","timestamp":"2026-07-12T13:41:23.915971Z","issue_id":"gmail-883.1","payload":{"status":"in_progress"}} diff --git a/docs/plan.md b/docs/plan.md new file mode 100644 index 0000000..b620e1f --- /dev/null +++ b/docs/plan.md @@ -0,0 +1,172 @@ +# Gmail Chan Implementation Plan + +## Overview + +The first milestone builds one text-only path through Gmail and OpenClaw. The +work starts with a package that loads against the OpenClaw `2026.7.2` channel +contract, then adds configuration, Gmail transport, inbound dispatch, and final +package validation. + +## Architecture Decisions + +- Gmail thread IDs are channel peer IDs. Channel routing prevents OpenClaw DM + scope settings from merging unrelated email threads. +- Gmail API access sits behind a small interface so tests use a fake without + network calls or OAuth credentials. +- `gmail.modify` supplies read, send, and label mutation in one scope. The README + identifies Google's restricted-scope verification requirements. +- The first milestone sends plain-text MIME. This keeps untrusted HTML out of + outbound rendering and limits dependencies. +- Sender and recipient policy deny by default. Exact addresses and domain + suffixes are the only supported match forms. + +## Task List + +### Foundation + +#### `gmail-883.1`: Scaffold the modern OpenClaw plugin package + +Create package metadata, the manifest, TypeScript and test configuration, the +entry contract, and CI. + +Acceptance criteria: + +- `defineChannelPluginEntry` owns channel registration. +- Package metadata declares OpenClaw API `2026.7.2` compatibility. +- Entry-shape tests, type checking, and build pass. + +Verification: + +```bash +pnpm test +pnpm typecheck +pnpm build +``` + +Likely files: `package.json`, `openclaw.plugin.json`, `index.ts`, `tsconfig.json`, +`vitest.config.ts`, `.github/workflows/ci.yml`. + +### Configuration and Policy + +#### `gmail-883.2`: Implement secure Gmail account configuration + +Add strict channel schemas, OpenClaw secret-input resolution, target parsing, +and address policy. + +Acceptance criteria: + +- Default and named accounts resolve through one path. +- Missing secrets report unavailable status without exposing secret values. +- Invalid targets and denied addresses fail closed. + +Verification: + +```bash +pnpm test -- src/config.test.ts src/accounts.test.ts src/target.test.ts src/policy.test.ts +pnpm typecheck +``` + +Dependencies: `gmail-883.1`. + +### Gmail Transport + +#### `gmail-883.3`: Implement Gmail API message transport + +Add the Gmail client boundary, bounded message parsing, unread label operations, +and MIME construction for new messages and replies. + +Acceptance criteria: + +- Gmail responses are validated before use. +- MIME parsing prefers `text/plain` and uses bounded text extraction for HTML. +- Replies carry `threadId`, matching subject, `In-Reply-To`, and `References`. + +Verification: + +```bash +pnpm test -- src/message.test.ts src/gmail-client.test.ts +pnpm typecheck +pnpm audit --audit-level high +``` + +Dependencies: `gmail-883.2`. + +### OpenClaw Routing + +#### `gmail-883.4`: Route polled Gmail threads through OpenClaw + +Add gateway polling, inbound admission, channel session routing, reply dispatch, +and durable outbound receipts. + +Acceptance criteria: + +- One Gmail thread reuses one route session and different threads stay isolated. +- Self-authored and denied messages do not dispatch. +- Successful dispatch marks the source message read; failed dispatch leaves it + unread. +- Agent replies remain in the source Gmail thread. + +Verification: + +```bash +pnpm test -- src/gateway.test.ts src/inbound.test.ts src/channel.test.ts +pnpm typecheck +pnpm build +``` + +Dependencies: `gmail-883.3`. + +### Package Proof + +#### `gmail-883.5`: Document, package, and validate the first milestone + +Document setup, security properties, target grammar, and limitations. Pack the +plugin and inspect it against the local OpenClaw checkout. + +Acceptance criteria: + +- README contains a reproducible OAuth and OpenClaw configuration path. +- The package archive contains built runtime files, manifest, README, and license. +- OpenClaw runtime inspection recognizes the `gmail` channel. +- Full validation and review complete without unresolved high-impact findings. + +Verification: + +```bash +pnpm check +npm pack --dry-run +pnpm openclaw:inspect +``` + +Dependencies: `gmail-883.4`. + +## Checkpoints + +After `gmail-883.2`: + +- The package builds against the API floor. +- Configuration and policy tests pass. +- No secret values appear in staged changes. + +After `gmail-883.4`: + +- The fake Gmail integration completes an inbound-to-reply flow. +- Session routing tests prove thread isolation. +- Full test, type, lint, and build commands pass. + +Before closing `gmail-883`: + +- The packed artifact loads through OpenClaw's external-plugin path. +- Strict maintainability review and autoreview have no unresolved findings. +- Deferred work remains in pebbles rather than placeholder code. + +## Risks and Mitigations + +| Risk | Impact | Mitigation | +| --- | --- | --- | +| OpenClaw API changes before `2026.7.2` release | Build or runtime load fails | Pin the development SHA in docs and run inspection against OpenClaw `main` | +| Gmail assigns a thread ID after a new outbound send | Outbound-origin session may start with a provisional route | Return the canonical thread ID in the receipt and test host reconciliation before claiming full support | +| Restricted Gmail scope requires verification | Public OAuth app setup takes additional work | Document operator-owned OAuth clients and scope classification | +| Duplicate unread polling after a crash | One email may dispatch more than once | Use in-process dedupe for concurrency and track durable History API cursors as a follow-up | +| Email content contains prompt injection | Agent may act on hostile instructions | Treat bodies as user input and rely on OpenClaw permissions; never elevate authority from email content | + diff --git a/docs/spec.md b/docs/spec.md new file mode 100644 index 0000000..639d320 --- /dev/null +++ b/docs/spec.md @@ -0,0 +1,199 @@ +# Gmail Chan Specification + +## Objective + +`gmail-chan` is an external OpenClaw channel plugin that uses Gmail threads as +conversations. Each Gmail thread maps to one OpenClaw session. Messages in the +same thread reuse that session, and messages in different threads use different +sessions. + +The first milestone supports text email through the Gmail API. It polls unread +inbox messages, applies sender policy, dispatches admitted messages to OpenClaw, +and sends the agent's response as a reply in the source Gmail thread. + +## Tech Stack + +- Node.js 22.19 or newer +- TypeScript ESM +- OpenClaw plugin API `2026.7.2` +- `@googleapis/gmail` for Gmail API calls +- Zod 4 for config and API-boundary validation +- Vitest for unit and contract tests +- pnpm for development and CI + +## Commands + +```bash +pnpm install +pnpm test +pnpm typecheck +pnpm lint +pnpm build +pnpm check +pnpm pack +``` + +Local OpenClaw validation: + +```bash +pnpm openclaw:link +pnpm openclaw:inspect +``` + +## Project Structure + +```text +index.ts Plugin runtime entry +openclaw.plugin.json Cold-path manifest and channel schema +src/accounts.ts Account config and secret resolution +src/channel.ts Channel contract and outbound adapters +src/config.ts Zod schemas and public config types +src/gateway.ts Polling account lifecycle +src/gmail-client.ts Gmail API boundary +src/inbound.ts OpenClaw ingress and reply dispatch +src/message.ts MIME parsing and construction +src/policy.ts Inbound and outbound address policy +src/runtime.ts Host-provided runtime store +src/target.ts Gmail target grammar +tests/ Cross-module and contract tests +docs/ Specification and implementation plan +``` + +## Public Contracts + +### Channel ID + +The channel ID is `gmail`. + +### Targets + +- `thread:` replies to an existing Gmail thread. +- `mailto:` starts a new Gmail thread. + +Bare email addresses normalize to `mailto:` targets. Bare Gmail thread IDs do +not normalize because an email local part can have a similar shape. + +### Account Configuration + +```json5 +{ + channels: { + gmail: { + accounts: { + work: { + email: "agent@example.com", + oauth: { + clientId: { source: "env", provider: "default", id: "GMAIL_CLIENT_ID" }, + clientSecret: { source: "env", provider: "default", id: "GMAIL_CLIENT_SECRET" }, + refreshToken: { source: "env", provider: "default", id: "GMAIL_REFRESH_TOKEN" } + }, + allowFrom: ["person@example.com", "@martian.engineering"], + allowTo: ["person@example.com", "@martian.engineering"], + pollIntervalSeconds: 30 + } + } + } + } +} +``` + +`allowFrom` and `allowTo` default to empty arrays. Empty policy denies all +addresses. `"*"` allows every syntactically valid address. Entries beginning +with `@` match one domain and its subdomains by suffix boundary. + +The plugin uses the `gmail.modify` OAuth scope. Google classifies this as a +restricted scope because the plugin reads message bodies and changes labels. + +## Message Lifecycle + +1. The gateway lists `in:inbox is:unread` messages. +2. The Gmail client fetches each full message and validates required IDs and + bounded header/body fields. +3. The plugin ignores messages sent by the configured mailbox. +4. Sender policy admits or rejects the normalized `From` address. +5. The runtime builds a channel route with `thread:` as the + peer ID. +6. OpenClaw dispatches the message in the route's session. +7. Agent output is sent with the Gmail thread ID and RFC reply headers. +8. The plugin removes the `UNREAD` label after dispatch completes. + +Rejected senders are marked read so a denied message does not create a hot poll +loop. Dispatch failures leave messages unread for a later poll. + +## Code Style + +Public functions and types include purpose comments. Modules expose a narrow +boundary and keep transport, policy, parsing, and OpenClaw runtime logic +separate. + +```typescript +/** Returns whether a normalized email address is admitted by one policy list. */ +export function isAddressAllowed(address: string, entries: readonly string[]): boolean { + return entries.some((entry) => matchesAddressPolicy(address, entry)); +} +``` + +Use focused imports such as `openclaw/plugin-sdk/channel-core`. Do not import +the deprecated `openclaw/plugin-sdk` root barrel. + +## Testing Strategy + +- Unit tests cover target parsing, address policy, MIME parsing, and MIME output. +- Boundary tests use a fake Gmail transport. Tests do not call Google services. +- Channel tests prove account resolution and session routing. +- Inbound tests prove sender denial, self-message suppression, marking behavior, + same-thread session reuse, and cross-thread isolation. +- Package validation builds JavaScript, runs `npm pack --dry-run`, and inspects + the linked plugin with the local OpenClaw checkout. + +Each behavior test is written before its implementation and must fail for the +expected reason before production code is added. + +## Boundaries + +Always: + +- Validate Gmail API data before use. +- Keep OAuth values out of logs, errors, fixtures, and Git history. +- Apply deny-by-default sender and recipient policy. +- Limit message body and header sizes before model dispatch. +- Return Gmail message and thread IDs in outbound receipts. +- Run tests, type checking, linting, and the build before commits. + +Ask first: + +- Add an OAuth callback server or another authentication flow. +- Add Gmail push notifications or public webhook infrastructure. +- Add dependencies beyond the Gmail client, Zod, and development tools. +- Add attachment persistence or forward full thread history to the model. + +Never: + +- Execute email HTML or instructions as code. +- Log message bodies, OAuth credentials, or refresh tokens. +- Shell out to a mail CLI. +- Mark a failed dispatch as read. +- Copy source from a repository without a clear committed license. + +## Success Criteria + +- OpenClaw loads the plugin through `defineChannelPluginEntry` on API + `2026.7.2`. +- Two messages with one Gmail thread ID resolve to one session key. +- Messages with different Gmail thread IDs resolve to different session keys. +- A permitted unread email reaches OpenClaw and receives a reply in its Gmail + thread. +- Self-authored and denied messages do not reach the agent. +- A new outbound email returns its Gmail thread ID in a durable receipt. +- The package builds, tests, packs, and passes OpenClaw runtime inspection. + +## Deferred Work + +- Interactive desktop OAuth onboarding +- Attachments and inline images +- HTML-rich outbound email +- Reply-all and multi-recipient policy +- Gmail History API and push notifications +- Full thread-history context +- Proven session reconciliation for outbound-originated Gmail threads + From 37ed7375239915a2569b783ab3f659c86f2ad226 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:47:01 -0700 Subject: [PATCH 04/14] gmail-883.1: scaffold modern channel plugin --- .github/workflows/ci.yml | 24 + .prettierignore | 4 + README.md | 1 + docs/plan.md | 13 +- docs/spec.md | 34 +- eslint.config.ts | 17 + index.ts | 9 + openclaw.plugin.json | 26 + package.json | 93 + pnpm-lock.yaml | 4033 ++++++++++++++++++++++++++++++++++++++ pnpm-workspace.yaml | 8 + src/channel.ts | 32 + tests/entry.test.ts | 11 + tsconfig.build.json | 10 + tsconfig.json | 18 + vitest.config.ts | 8 + 16 files changed, 4324 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .prettierignore create mode 100644 eslint.config.ts create mode 100644 index.ts create mode 100644 openclaw.plugin.json create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 pnpm-workspace.yaml create mode 100644 src/channel.ts create mode 100644 tests/entry.test.ts create mode 100644 tsconfig.build.json create mode 100644 tsconfig.json create mode 100644 vitest.config.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1955573 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +name: CI + +on: + pull_request: + push: + branches: [main] + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 11.2.2 + - uses: actions/setup-node@v4 + with: + node-version: 22.19.0 + cache: pnpm + - run: pnpm install --frozen-lockfile + - run: pnpm check diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..f7f9b1e --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +.pebbles/ +dist/ +node_modules/ +pnpm-lock.yaml diff --git a/README.md b/README.md index bd3856e..a2a5154 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # gmail-chan + OpenClaw communication channel backed by Gmail threads diff --git a/docs/plan.md b/docs/plan.md index b620e1f..7aa7a51 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -162,11 +162,10 @@ Before closing `gmail-883`: ## Risks and Mitigations -| Risk | Impact | Mitigation | -| --- | --- | --- | -| OpenClaw API changes before `2026.7.2` release | Build or runtime load fails | Pin the development SHA in docs and run inspection against OpenClaw `main` | +| Risk | Impact | Mitigation | +| --------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| OpenClaw API changes before `2026.7.2` release | Build or runtime load fails | Pin the development SHA in docs and run inspection against OpenClaw `main` | | Gmail assigns a thread ID after a new outbound send | Outbound-origin session may start with a provisional route | Return the canonical thread ID in the receipt and test host reconciliation before claiming full support | -| Restricted Gmail scope requires verification | Public OAuth app setup takes additional work | Document operator-owned OAuth clients and scope classification | -| Duplicate unread polling after a crash | One email may dispatch more than once | Use in-process dedupe for concurrency and track durable History API cursors as a follow-up | -| Email content contains prompt injection | Agent may act on hostile instructions | Treat bodies as user input and rely on OpenClaw permissions; never elevate authority from email content | - +| Restricted Gmail scope requires verification | Public OAuth app setup takes additional work | Document operator-owned OAuth clients and scope classification | +| Duplicate unread polling after a crash | One email may dispatch more than once | Use in-process dedupe for concurrency and track durable History API cursors as a follow-up | +| Email content contains prompt injection | Agent may act on hostile instructions | Treat bodies as user input and rely on OpenClaw permissions; never elevate authority from email content | diff --git a/docs/spec.md b/docs/spec.md index 639d320..657412c 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -83,17 +83,29 @@ not normalize because an email local part can have a similar shape. work: { email: "agent@example.com", oauth: { - clientId: { source: "env", provider: "default", id: "GMAIL_CLIENT_ID" }, - clientSecret: { source: "env", provider: "default", id: "GMAIL_CLIENT_SECRET" }, - refreshToken: { source: "env", provider: "default", id: "GMAIL_REFRESH_TOKEN" } + clientId: { + source: "env", + provider: "default", + id: "GMAIL_CLIENT_ID", + }, + clientSecret: { + source: "env", + provider: "default", + id: "GMAIL_CLIENT_SECRET", + }, + refreshToken: { + source: "env", + provider: "default", + id: "GMAIL_REFRESH_TOKEN", + }, }, allowFrom: ["person@example.com", "@martian.engineering"], allowTo: ["person@example.com", "@martian.engineering"], - pollIntervalSeconds: 30 - } - } - } - } + pollIntervalSeconds: 30, + }, + }, + }, + }, } ``` @@ -128,7 +140,10 @@ separate. ```typescript /** Returns whether a normalized email address is admitted by one policy list. */ -export function isAddressAllowed(address: string, entries: readonly string[]): boolean { +export function isAddressAllowed( + address: string, + entries: readonly string[], +): boolean { return entries.some((entry) => matchesAddressPolicy(address, entry)); } ``` @@ -196,4 +211,3 @@ Never: - Gmail History API and push notifications - Full thread-history context - Proven session reconciliation for outbound-originated Gmail threads - diff --git a/eslint.config.ts b/eslint.config.ts new file mode 100644 index 0000000..a72b423 --- /dev/null +++ b/eslint.config.ts @@ -0,0 +1,17 @@ +import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; + +export default tseslint.config( + { ignores: ["dist/**", "node_modules/**"] }, + eslint.configs.recommended, + ...tseslint.configs.strict, + { + files: ["**/*.ts"], + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, +); diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..e7b2af0 --- /dev/null +++ b/index.ts @@ -0,0 +1,9 @@ +import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core"; +import { gmailPlugin } from "./src/channel.js"; + +export default defineChannelPluginEntry({ + id: "gmail", + name: "Gmail", + description: "OpenClaw communication channel backed by Gmail threads", + plugin: gmailPlugin, +}); diff --git a/openclaw.plugin.json b/openclaw.plugin.json new file mode 100644 index 0000000..6def265 --- /dev/null +++ b/openclaw.plugin.json @@ -0,0 +1,26 @@ +{ + "id": "gmail", + "name": "Gmail", + "description": "OpenClaw communication channel backed by Gmail threads", + "activation": { + "onStartup": false + }, + "channels": ["gmail"], + "channelEnvVars": { + "gmail": ["GMAIL_CLIENT_ID", "GMAIL_CLIENT_SECRET", "GMAIL_REFRESH_TOKEN"] + }, + "configSchema": { + "type": "object", + "additionalProperties": false, + "properties": {} + }, + "channelConfigs": { + "gmail": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": {} + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..c4418f2 --- /dev/null +++ b/package.json @@ -0,0 +1,93 @@ +{ + "name": "@martian-engineering/gmail-chan", + "version": "0.1.0", + "description": "OpenClaw communication channel backed by Gmail threads", + "type": "module", + "exports": { + ".": "./dist/index.js" + }, + "files": [ + "dist/", + "openclaw.plugin.json", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "tsc -p tsconfig.build.json", + "check": "pnpm lint && pnpm format:check && pnpm typecheck && pnpm test && pnpm build", + "format": "prettier --write .", + "format:check": "prettier --check .", + "lint": "eslint .", + "prepack": "pnpm build", + "test": "vitest run", + "typecheck": "tsc --noEmit" + }, + "keywords": [ + "openclaw", + "gmail", + "email", + "channel", + "plugin" + ], + "license": "MIT", + "repository": { + "type": "git", + "url": "git+https://github.com/Martian-Engineering/gmail-chan.git" + }, + "engines": { + "node": ">=22.19.0 <23 || >=23.11.0" + }, + "packageManager": "pnpm@11.2.2", + "peerDependencies": { + "openclaw": ">=2026.7.2" + }, + "peerDependenciesMeta": { + "openclaw": { + "optional": true + } + }, + "devDependencies": { + "@eslint/js": "9.39.5", + "@types/node": "26.1.1", + "eslint": "9.39.5", + "openclaw": "2026.7.1-beta.5", + "prettier": "3.9.5", + "typescript": "6.0.3", + "typescript-eslint": "8.63.0", + "vitest": "4.1.9" + }, + "openclaw": { + "extensions": [ + "./index.ts" + ], + "runtimeExtensions": [ + "./dist/index.js" + ], + "channel": { + "id": "gmail", + "label": "Gmail", + "selectionLabel": "Gmail (OAuth)", + "detailLabel": "Gmail", + "docsPath": "/channels/gmail", + "docsLabel": "gmail", + "blurb": "Use Gmail threads as isolated OpenClaw conversations.", + "systemImage": "envelope", + "preferSessionLookupForAnnounceTarget": true, + "order": 100, + "exposure": { + "configured": true, + "setup": true, + "docs": true + } + }, + "compat": { + "pluginApi": ">=2026.7.2", + "minGatewayVersion": "2026.7.2" + }, + "build": { + "openclawVersion": "2026.7.2", + "pluginSdkVersion": "2026.7.2", + "openclawCommit": "1318cf1fdef0f86fa186ab30be9f0a60e24c7868" + } + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..b45dbae --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,4033 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + devDependencies: + '@eslint/js': + specifier: 9.39.5 + version: 9.39.5 + '@types/node': + specifier: 26.1.1 + version: 26.1.1 + eslint: + specifier: 9.39.5 + version: 9.39.5(jiti@2.7.0) + openclaw: + specifier: 2026.7.1-beta.5 + version: 2026.7.1-beta.5 + prettier: + specifier: 3.9.5 + version: 3.9.5 + typescript: + specifier: 6.0.3 + version: 6.0.3 + typescript-eslint: + specifier: 8.63.0 + version: 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + vitest: + specifier: 4.1.9 + version: 4.1.9(@types/node@26.1.1)(vite@8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0)) + +packages: + + '@agentclientprotocol/sdk@1.1.0': + resolution: {integrity: sha512-NT2KqphUJ3w6EksUL51ZhJgIYgq/ZLGcBPkyMKgRSO5PMVwe9DnKKX+Htnvk6KHh6dUuh34UHK4gKp+4te1Mdg==} + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + + '@anthropic-ai/sdk@0.109.1': + resolution: {integrity: sha512-q9OnEKLr5H9nxSuXdgDgJhxfYMiE+AaUEBze2Gk91UcaaLnsN+Lx5fbCYywiqurU/APLdwv23x03Wm6WN3EBsg==} + hasBin: true + peerDependencies: + zod: ^3.25.0 || ^4.0.0 + peerDependenciesMeta: + zod: + optional: true + + '@babel/runtime@7.29.7': + resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==} + engines: {node: '>=6.9.0'} + + '@borewit/text-codec@0.2.2': + resolution: {integrity: sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==} + + '@clack/core@1.4.2': + resolution: {integrity: sha512-0Ty/1Gfm+Kb07sXcuESjyKfwEhSy4Ns1AgeEisHb/bDY5fWme0tTeTkU14T1Gmcs17YIjB/teiDe4uaCghbYqQ==} + engines: {node: '>= 20.12.0'} + + '@clack/prompts@1.6.0': + resolution: {integrity: sha512-EYlRokl8szrP9Z25qT5aepMdBjzBvHF9ZEhzIiUBc9guz/T31EqRgvD0QSgZcpE93xiwrr+OkB4nz0BZyF6fSA==} + engines: {node: '>= 20.12.0'} + + '@earendil-works/pi-tui@0.80.3': + resolution: {integrity: sha512-2BJI6qwRQfnM0Q7seL1+SbacU/jRRjBnN7Hu3n9BjAn7/s5FaBNnvdD1qBQYRsFTHfjqMaDsjYqanPyqwXj99w==} + engines: {node: '>=22.19.0'} + + '@emnapi/core@1.11.1': + resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==} + + '@emnapi/runtime@1.11.1': + resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==} + + '@emnapi/wasi-threads@1.2.2': + resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==} + + '@eslint-community/eslint-utils@4.9.1': + resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.6': + resolution: {integrity: sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.5': + resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@google/genai@2.10.0': + resolution: {integrity: sha512-e4cFxj3tiuMtsgOT4G9c1hXyGJhg7/Buj7VVeBacRY3fRtkRZZ59Q3nuVp2xbq8BGQXLXCDB253qMhklMOeUDg==} + engines: {node: '>=20.0.0'} + peerDependencies: + '@modelcontextprotocol/sdk': ^1.25.2 + peerDependenciesMeta: + '@modelcontextprotocol/sdk': + optional: true + + '@grammyjs/runner@2.0.3': + resolution: {integrity: sha512-nckmTs1dPWfVQteK9cxqxzE+0m1VRvluLWB8UgFzsjg62w3qthPJt0TYtJBEdG7OedvfQq4vnFAyE6iaMkR42A==} + engines: {node: '>=12.20.0 || >=14.13.1'} + peerDependencies: + grammy: ^1.13.1 + + '@grammyjs/transformer-throttler@1.2.1': + resolution: {integrity: sha512-CpWB0F3rJdUiKsq7826QhQsxbZi4wqfz1ccKX+fr+AOC+o8K7ZvS+wqX0suSu1QCsyUq2MDpNiKhyL2ZOJUS4w==} + engines: {node: ^12.20.0 || >=14.13.1} + peerDependencies: + grammy: ^1.0.0 + + '@grammyjs/types@3.28.0': + resolution: {integrity: sha512-4JvXCdxRZHCje0M4gHzLwtB4bLno3WD28xd8CNfk4POWIu73BFnSvGeW6OQ5gPem4eYTEwkD9yDaXssixl6tMQ==} + + '@homebridge/ciao@1.3.9': + resolution: {integrity: sha512-TMy9zy173jDOpnFXDqL3BPIQn5lfcAkSsivYQatCCakoHk4fLGd7QjfAaNGYE3Ox+/ZI6Lq0e1gGcz1qdw/IbA==} + hasBin: true + + '@hono/node-server@1.19.14': + resolution: {integrity: sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==} + engines: {node: '>=18.14.1'} + peerDependencies: + hono: ^4 + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@lydell/node-pty-darwin-arm64@1.2.0-beta.12': + resolution: {integrity: sha512-tqaifcY9Cr41SblO1+FLzh8oxxtkNhuW9Dhl22lKme9BreYvKvxEZcdPIXTuqkJc5tagOEC4QHShKmJjLyLXLQ==} + cpu: [arm64] + os: [darwin] + + '@lydell/node-pty-darwin-x64@1.2.0-beta.12': + resolution: {integrity: sha512-4LrS5pCJwqHKDVf1zS2gyNV0m4hKAXch+XZNhbZ6LY8uwVL8BhchzQBO40Os5anuRxRCWzHpw4Sp64Ie8q7E4Q==} + cpu: [x64] + os: [darwin] + + '@lydell/node-pty-linux-arm64@1.2.0-beta.12': + resolution: {integrity: sha512-Sx+A71x5BDGHt9ansfrtGxwq2VFVDWvJUAdlUL0Hv0qeiJUfts+hgopx+CgT4PSwahKjdEgtu0+FAfY9rICKRw==} + cpu: [arm64] + os: [linux] + + '@lydell/node-pty-linux-x64@1.2.0-beta.12': + resolution: {integrity: sha512-bJzs94njofYhGg/UDqW1nj0dtvvu+2OvxMY+RlLS1T17VgcktKoIR6PuenTwE5HJ/D6StCPADmXcT0nNsCKmIQ==} + cpu: [x64] + os: [linux] + + '@lydell/node-pty-win32-arm64@1.2.0-beta.12': + resolution: {integrity: sha512-p7POgjVEiFaBC3/y+AKuV1FzePCsJ6HmZDv2XK+jBZSfwP8+uBAw181ZiKYN1YuRa/XpmBGaWezcI8hZkbW++g==} + cpu: [arm64] + os: [win32] + + '@lydell/node-pty-win32-x64@1.2.0-beta.12': + resolution: {integrity: sha512-IDFa00g7qUDGUYgByrUBJtC+mOjYVt/8KYyWivCg5JjGOHbBUACUQZLl0jTWmnr+tld/UyTpX90a2PY6oTVtRw==} + cpu: [x64] + os: [win32] + + '@lydell/node-pty@1.2.0-beta.12': + resolution: {integrity: sha512-qIK890UwPupoj07osVvgOIa++1mxeHbcGry4PKRHhNVNs81V2SCG34eJr46GybiOmBtc8Sj5PB1/GGM5PL549g==} + + '@mistralai/mistralai@2.4.0': + resolution: {integrity: sha512-t6hCx242MTGolB76CI+17jDtPIe/bzLsMdUTMMoMn9Qo1h02N2G5jQYHmKDGU3X//OgR2wvngTD7tO6tPp5poQ==} + peerDependencies: + '@opentelemetry/api': ^1.9.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + + '@modelcontextprotocol/sdk@1.29.0': + resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==} + engines: {node: '>=18'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + + '@mozilla/readability@0.6.0': + resolution: {integrity: sha512-juG5VWh4qAivzTAeMzvY9xs9HY5rAcr2E4I7tiSSCokRFi7XIZCAu92ZkSTsIj1OPceCifL3cpfteP3pDT9/QQ==} + engines: {node: '>=14.0.0'} + + '@napi-rs/wasm-runtime@1.1.6': + resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 + + '@openclaw/ai@2026.7.1-beta.5': + resolution: {integrity: sha512-6EB875Ge0tXZaI4boe0wGBSR7kSwUFutIezhOpprBlAHXr0Jouk97jGsz/xbLTV/pJ4JC8hb9HYisktCsdzeQA==} + engines: {node: '>=22.19.0'} + + '@openclaw/fs-safe@0.4.1': + resolution: {integrity: sha512-hQi+BxO10KdRFlYUot1syC+hTaUnGeQNdqX5kwkKJig8CFq1tKsYJLPm+zkiiGsSKOprPAquQl/txejEhpKPgg==} + engines: {node: '>=22'} + + '@openclaw/proxyline@0.3.3': + resolution: {integrity: sha512-sftHnW69NHQqLjCxBTvQ8f/eQl+peZ5pHCBQtuTWBbeuYRHZ0/GXVTmw/O/YKsShMbqPWhJB0UYtPPdvCUSS8w==} + engines: {node: '>=22.19.0'} + peerDependencies: + undici: '>=8.3.0 <9' + + '@opentelemetry/semantic-conventions@1.43.0': + resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==} + engines: {node: '>=14'} + + '@oxc-project/types@0.139.0': + resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==} + + '@protobufjs/aspromise@1.1.2': + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + + '@protobufjs/base64@1.1.2': + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + + '@protobufjs/codegen@2.0.5': + resolution: {integrity: sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==} + + '@protobufjs/eventemitter@1.1.1': + resolution: {integrity: sha512-vW1GmwMZNnL+gMRaovlh9yZX74kc+TTU3FObkkurpMaRtBfLP3ldjS9KQWlwZgraRE0+dheEEoAxdzcJQ8eXZg==} + + '@protobufjs/fetch@1.1.1': + resolution: {integrity: sha512-GpptLrs57adMSuHi3VNj0mAF8dwh36LMaYF6XyJ6JMWlVsc+t42tm1HSEDmOs3A8fC9yyeisgLhsTVQokOZ0zw==} + + '@protobufjs/float@1.0.2': + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + + '@protobufjs/path@1.1.2': + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + + '@protobufjs/pool@1.1.0': + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + + '@protobufjs/utf8@1.1.2': + resolution: {integrity: sha512-b1UQwcEZ4yCnMCD8DAL1VlbvBJE9/IX4FTIp7BG1xYpf29SLazLSrqUkj4w7Y5y7cCVP6E5tcqqcI0xemPkHug==} + + '@rolldown/binding-android-arm64@1.1.5': + resolution: {integrity: sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.1.5': + resolution: {integrity: sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.1.5': + resolution: {integrity: sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.1.5': + resolution: {integrity: sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': + resolution: {integrity: sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.1.5': + resolution: {integrity: sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.1.5': + resolution: {integrity: sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.1.5': + resolution: {integrity: sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.1.5': + resolution: {integrity: sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.1.5': + resolution: {integrity: sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.1.5': + resolution: {integrity: sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.1.5': + resolution: {integrity: sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.1.5': + resolution: {integrity: sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.1.5': + resolution: {integrity: sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.1.5': + resolution: {integrity: sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@silvia-odwyer/photon-node@0.3.4': + resolution: {integrity: sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==} + + '@stablelib/base64@1.0.1': + resolution: {integrity: sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@tokenizer/inflate@0.4.1': + resolution: {integrity: sha512-2mAv+8pkG6GIZiF1kNg1jAjh27IDxEPKwdGul3snfztFerfPGI1LjDezZp3i7BElXompqEtPmoPx6c2wgtWsOA==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + + '@tybys/wasm-util@0.10.3': + resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@26.1.1': + resolution: {integrity: sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==} + + '@types/retry@0.12.0': + resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} + + '@typescript-eslint/eslint-plugin@8.63.0': + resolution: {integrity: sha512-rvwSgqT+DHpWdzfSzPatRLm02a0GlESt++9iy3hLCDY4BgkaLcl8LBi9Yh7XGFBpwcBE/K3024QuXWTpbz4FfQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.63.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/parser@8.63.0': + resolution: {integrity: sha512-gwh4gvvlaVDKKxyfxMG+Gnu1u9X0OQBwyGLkbwB65dIzBKnxeRiJlNFqlI3zwVhNXJIs6qV7mlFCn/BIajlVig==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/project-service@8.63.0': + resolution: {integrity: sha512-e5dh0/UI0ok53AlZ5wRkXCB32z/f2jUZqPR/ygAw5WYaSw8j9EoJWlS7wQjr/dmOaqWjnPIn2m+HhVPCMWGZVQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/scope-manager@8.63.0': + resolution: {integrity: sha512-uUyfMWCnDSN8bCpcrY8nGP2BLkQ9Xn0GsipcONcpIDWhwhO4ZSyHvyS14U3X75mzxWxL3I2UZIrenTzdzcJO8A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.63.0': + resolution: {integrity: sha512-sUAbkulqBAsncKnbRP3+7CtQFRKicexnj7ZwNC6ddCR7EmrXvjvdCYMJbUIqMd6lwoEriZjwLo08aS5tSjVMHg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.63.0': + resolution: {integrity: sha512-Nzzh/OGxVCOjObjaj1CQF2RUasyYy2Jfuh+zZ3PjLzG2fYRriAiZLib9UKtO+CpQAS3YHiAS+ckZDclwqI1TPA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/types@8.63.0': + resolution: {integrity: sha512-xyLtl9DUBBFrcJS4x2pIqGLH68/tC2uOa4Z7pUteW09D3bXnnXUom4dyPikzWgB7llmIc1zoeI3aoUdC4rPK/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.63.0': + resolution: {integrity: sha512-ygBkU+B7ex5UI/gKhaqexWev79uISfIv7XQCRNYO/jmD8rGLPyWLAb3KMRT6nd8Gt9bmUBi9+iX6tBdYfOY81Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/utils@8.63.0': + resolution: {integrity: sha512-fUKaeAvrTuQg/Tgt3nliAUSZHJM6DlCcfyEmxCvlX8kieWSStBX+5O5Fnidtc3i2JrH+9c/GL4RY2iasd/GPTA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/visitor-keys@8.63.0': + resolution: {integrity: sha512-UexrHGnGTpbuQHct2ExOc2ZcFbGUS9FOesCxxqdBGcpI1BxYu/LZ6U8Aq6/72XtF/qRBk9nhuGHFJIXXMhPMdw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/expect@4.1.9': + resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==} + + '@vitest/mocker@4.1.9': + resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==} + peerDependencies: + msw: ^2.4.9 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@4.1.9': + resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==} + + '@vitest/runner@4.1.9': + resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==} + + '@vitest/snapshot@4.1.9': + resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==} + + '@vitest/spy@4.1.9': + resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==} + + '@vitest/utils@4.1.9': + resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} + + abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.17.0: + resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==} + engines: {node: '>=0.4.0'} + hasBin: true + + agent-base@7.1.4: + resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} + engines: {node: '>= 14'} + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + + asn1.js@5.4.1: + resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + bignumber.js@9.3.1: + resolution: {integrity: sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==} + + bn.js@4.12.5: + resolution: {integrity: sha512-3aRg6/JxfffFD+OlOjOFR3Vo79l39ooBTFucxx+MT3dhCtzn3EmiUPQo+6/OZuI2jbXi3YKgmiTFBgChQMwIRQ==} + + body-parser@2.3.0: + resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} + engines: {node: '>=18'} + + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + + bottleneck@2.19.5: + resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} + + brace-expansion@1.1.16: + resolution: {integrity: sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==} + + brace-expansion@5.0.7: + resolution: {integrity: sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==} + engines: {node: 18 || 20 || >=22} + + buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} + + clawpdf@0.3.0: + resolution: {integrity: sha512-41+3AnKk9yek2sm+/9XvUlDTN8Wi+ag7fmxZuqw+ySn4lqaf/fCgLeamqPLiXY4gVbizKEHGoTG/JrIIFNE2rw==} + engines: {node: '>=20'} + hasBin: true + + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + content-disposition@1.1.0: + resolution: {integrity: sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==} + engines: {node: '>=18'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.0.0: + resolution: {integrity: sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==} + engines: {node: '>=18'} + + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + + croner@10.0.1: + resolution: {integrity: sha512-ixNtAJndqh173VQ4KodSdJEI6nuioBWI0V1ITNKhZZsO0pEMoDxz539T4FTTbSZ/xIOSuDnzxLVRqBVSvPNE2g==} + engines: {node: '>=18.0'} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + + css-select@5.2.2: + resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} + + css-what@6.2.2: + resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} + engines: {node: '>= 6'} + + cssom@0.5.0: + resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} + + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + diff@9.0.0: + resolution: {integrity: sha512-svtcdpS8CgJyqAjEQIXdb3OjhFVVYjzGAPO8WGCmRbrml64SPw/jJD4GoE98aR7r25A0XcgrK3F02yw9R/vhQw==} + engines: {node: '>=0.3.1'} + + dijkstrajs@1.0.3: + resolution: {integrity: sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==} + + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} + + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} + + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} + engines: {node: '>=12'} + + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + encodeurl@2.0.0: + resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} + engines: {node: '>= 0.8'} + + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-module-lexer@2.3.0: + resolution: {integrity: sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} + + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@9.39.5: + resolution: {integrity: sha512-DgZS62aPLXKlnxILS/AYCoRvHaZeXceIzlXPkkGGzJWSow1aEk0lbTlxUSlyjC8jcaKxAdOnTDz+o1JFSBsyjw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + + eventsource-parser@3.1.0: + resolution: {integrity: sha512-kJezFj9YFAMLeORyi7aCLxLbD5/qWMQnoMVlVPyHIll7lgRJCc3JVln9Vgl9nwQi0YkMnhdGTMNn7CkRRAptMg==} + engines: {node: '>=18.0.0'} + + eventsource@3.0.7: + resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} + engines: {node: '>=18.0.0'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + express-rate-limit@8.5.2: + resolution: {integrity: sha512-5Kb34ipNX694DH48vN9irak1Qx30nb0PLYHXfJgw4YEjiC3ZEmZJhwOp+VfiCYwFzvFTdB9QkArYS5kXa2cx2A==} + engines: {node: '>= 16'} + peerDependencies: + express: '>= 4.11' + + express@5.2.1: + resolution: {integrity: sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==} + engines: {node: '>= 18'} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fast-sha256@1.3.0: + resolution: {integrity: sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==} + + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} + + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + + fast-uri@3.1.3: + resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==} + + fast-wrap-ansi@0.2.2: + resolution: {integrity: sha512-7F2Fl+TjRSenLqlU3UjSH0iyqopqoZIu7eZVpEirP2g1GtWa2G/ecEmBdgz31+Mxr+ELclgg6sokpSFIQiZ02Q==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + file-type@22.0.1: + resolution: {integrity: sha512-ww5Mhre0EE+jmBvOXTmXAbEMuZE7uX4a3+oRCQFNj8w++g3ev913N6tXQz0XTXbueQ5TWQfm6BdaViEHHn8bhA==} + engines: {node: '>=22'} + + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.4.2: + resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + gaxios@7.2.0: + resolution: {integrity: sha512-CUVb4wcYe+771XevyH6HtGmXFAGGKkIC3kswAP8Z1JCe0j80JMaTPZH930DWFrvo0atjh18Arc0pEyUCWa5bfg==} + engines: {node: '>=18'} + + gcp-metadata@8.1.2: + resolution: {integrity: sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==} + engines: {node: '>=18'} + + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + + get-east-asian-width@1.6.0: + resolution: {integrity: sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==} + engines: {node: '>=18'} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + glob@13.0.6: + resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} + engines: {node: 18 || 20 || >=22} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + google-auth-library@10.9.0: + resolution: {integrity: sha512-xtvUqvINPhTaBm7nXqlYPcrMHJPm1lCNdSovxnKKhTm+4JsvQ+KGVYJViLoH9Yxu8w+T0Qv5HubzYT9BLrppJg==} + engines: {node: '>=18'} + + google-logging-utils@1.1.3: + resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==} + engines: {node: '>=14'} + + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + + grammy@1.44.0: + resolution: {integrity: sha512-gGVykS5+c5f1tPV97LuU6IDRMawE2NzpwM9pNz58HQ35IZXDnYL3VOLvNzYognPSeBIOSzQXRu5w96V0aY8y8A==} + engines: {node: ^12.20.0 || >=14.13.1} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + highlight.js@11.11.1: + resolution: {integrity: sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==} + engines: {node: '>=12.0.0'} + + hono@4.12.29: + resolution: {integrity: sha512-1hNiRjawYrLq/4m3DQQjPGFg0VZkk4RjQJDff/excI6Dm9BiL75qxGrd7/c6YOxPdq6AscP3LiXhQ6fKFC1Waw==} + engines: {node: '>=16.9.0'} + + hosted-git-info@10.1.1: + resolution: {integrity: sha512-DeOnSPAvOndYKfw075gt8yZzQ7S2hNztw34zBTfhIzLhmBTswIBg5/y+pqu/VD5cYWm5goAFTusDmUEmKZ0PEQ==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + html-escaper@3.0.3: + resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + + htmlparser2@10.1.0: + resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + http_ece@1.2.0: + resolution: {integrity: sha512-JrF8SSLVmcvc5NducxgyOrKXe3EsyHMgBFgSaIUGmArKe+rwr0uphRkRXvwiom3I+fpIfoItveHrfudL8/rxuA==} + engines: {node: '>=16'} + + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.5: + resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} + engines: {node: '>= 4'} + + ignore@7.0.6: + resolution: {integrity: sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==} + engines: {node: '>= 4'} + + immediate@3.0.6: + resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ip-address@10.2.0: + resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==} + engines: {node: '>= 12'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + jose@6.2.3: + resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} + + js-yaml@4.3.0: + resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==} + hasBin: true + + json-bigint@1.0.0: + resolution: {integrity: sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==} + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-to-ts@3.1.1: + resolution: {integrity: sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==} + engines: {node: '>=16'} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-schema-typed@8.0.2: + resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + + jszip@3.10.1: + resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==} + + jwa@2.0.1: + resolution: {integrity: sha512-hRF04fqJIP8Abbkq5NKGN0Bbr3JxlQ+qhZufXVr0DvujKy93ZCbXZMHDL4EOtodSbCWxOqR8MS1tXA5hwqCXDg==} + + jws@4.0.1: + resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + kysely@0.29.2: + resolution: {integrity: sha512-s6WVJyEZrbm6jhBpiKHsGHyePMrVQKJ85wZCFCr9W4QHv6WTjWIrdvTmO9hDEA3bNK0xkrE2DqrHsXMLWuZpQg==} + engines: {node: '>=22.0.0'} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lie@3.3.0: + resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==} + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} + + linkedom@0.18.12: + resolution: {integrity: sha512-jalJsOwIKuQJSeTvsgzPe9iJzyfVaEJiEXl+25EkKevsULHvMJzpNqwvj1jOESWdmgKDiXObyjOYwlUqG7wo1Q==} + engines: {node: '>=16'} + peerDependencies: + canvas: '>= 2' + peerDependenciesMeta: + canvas: + optional: true + + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + long@5.3.2: + resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + + lru-cache@11.5.2: + resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} + engines: {node: 20 || >=22} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + marked@18.0.5: + resolution: {integrity: sha512-S6GcvALHg6K4ohtu4E7x0a1AqhAjp6cV8KhLSyN9qVapnzJkusVBxZRcIU9AeYsbe6P1hKDusSbEOzGyyuce6w==} + engines: {node: '>= 20'} + hasBin: true + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + + minizlib@3.1.0: + resolution: {integrity: sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==} + engines: {node: '>= 18'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.15: + resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + negotiator@1.0.0: + resolution: {integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==} + engines: {node: '>= 0.6'} + + node-addon-api@8.9.0: + resolution: {integrity: sha512-ekZMeaaIzSQTSpr7X2X3iJM7lTzgnx8ahAG9pJfT/7+14mlEM8ZYQ9cgCDvSSRbReFK0oHli3WrZdCiRsgAT9Q==} + engines: {node: ^18 || ^20 || >= 21} + + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead + + node-edge-tts@1.2.10: + resolution: {integrity: sha512-bV2i4XU54D45+US0Zm1HcJRkifuB3W438dWyuJEHLQdKxnuqlI1kim2MOvR6Q3XUQZvfF9PoDyR1Rt7aeXhPdQ==} + hasBin: true + + node-fetch@2.7.0: + resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + + node-gyp-build@4.8.4: + resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} + hasBin: true + + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + obug@2.1.3: + resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} + engines: {node: '>=12.20.0'} + + on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + openai@6.45.0: + resolution: {integrity: sha512-5DQVNErssk0afNpTTHUm/qZPU4iKR9OYdNid8Ib4puq4gHNNvGWZht2zY4h9a8JMF949Ik6m8gQutllVPbjdnw==} + peerDependencies: + '@aws-sdk/credential-provider-node': '>=3.972.0 <4' + '@smithy/hash-node': '>=4.3.0 <5' + '@smithy/signature-v4': '>=5.4.0 <6' + ws: ^8.18.0 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@aws-sdk/credential-provider-node': + optional: true + '@smithy/hash-node': + optional: true + '@smithy/signature-v4': + optional: true + ws: + optional: true + zod: + optional: true + + openclaw@2026.7.1-beta.5: + resolution: {integrity: sha512-ejdttiBZwk5RJmZdGD3gQPW1+4819pb0gyw4ZbGg/NcEAdozk6UQWq4n3P2XfDBgOn2k7D8fSKLcN+YDdJ77TA==} + engines: {node: '>=22.19.0 <23 || >=23.11.0'} + hasBin: true + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + p-retry@4.6.2: + resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} + engines: {node: '>=8'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + + pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + partial-json@0.1.7: + resolution: {integrity: sha512-Njv/59hHaokb/hRUjce3Hdv12wd60MtM9Z5Olmn+nehe0QDAsRtRbJPvJ0Z91TusF0SuZRIvnM+S4l6EIP8leA==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.5: + resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} + engines: {node: '>=12'} + + pkce-challenge@5.0.1: + resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==} + engines: {node: '>=16.20.0'} + + playwright-core@1.61.1: + resolution: {integrity: sha512-h7Qlt6m4REp25qvIdvbDtVmD4LqVXfpRxhORv9L0jzETM05p4fuPJ3dKyuSXQxDSbXnmS79HAgi9589lGSpLkg==} + engines: {node: '>=18'} + hasBin: true + + pngjs@5.0.0: + resolution: {integrity: sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==} + engines: {node: '>=10.13.0'} + + postcss@8.5.16: + resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier@3.9.5: + resolution: {integrity: sha512-/FVl766LpUfB5vXgCYOYa0MeV/441Ia99AeICQIQFTY/Nw0roZwULcXpku5i1/m5kt/baz+s4Zogspd839HSMg==} + engines: {node: '>=14'} + hasBin: true + + process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + + proper-lockfile@4.1.2: + resolution: {integrity: sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==} + + protobufjs@7.6.5: + resolution: {integrity: sha512-/FPD0nUc9jH6rfFjji9IBqOz4pcSE3CsT1m7Ep6Mdb0LxSUMj8hgl6GomOvZzpNpAqqGaXA0P3VSrZLFzIhQrw==} + engines: {node: '>=12.0.0'} + + proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qrcode@1.5.4: + resolution: {integrity: sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==} + engines: {node: '>=10.13.0'} + hasBin: true + + qs@6.15.3: + resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} + engines: {node: '>=0.6'} + + quickjs-wasi@3.0.2: + resolution: {integrity: sha512-SyfPzlrfz67/kv0SogmQgW4c2I1klkLcbvj9Y2gc1h7+VylmvuGevFljLXibGKajKJKiJV29d4S6FQLA6Sc80A==} + + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + + rastermill@0.3.1: + resolution: {integrity: sha512-CX4nij6+ZLHYIaojJNfLTr7W+AiH/IPJi6E9Aw1br2///1KZL2KBOHd68rkcLedc47MPvb4hhH+fzYeGFa4A/Q==} + engines: {node: '>=22'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + + readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + + retry@0.12.0: + resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} + engines: {node: '>= 4'} + + retry@0.13.1: + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} + + rolldown@1.1.5: + resolution: {integrity: sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + + setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + sqlite-vec-darwin-arm64@0.1.9: + resolution: {integrity: sha512-jSsZpE42OfBkGL/ItyJTVCUwl6o6Ka3U5rc4j+UBDIQzC1ulSSKMEhQLthsOnF/MdAf1MuAkYhkdKmmcjaIZQg==} + cpu: [arm64] + os: [darwin] + + sqlite-vec-darwin-x64@0.1.9: + resolution: {integrity: sha512-KDlVyqQT7pnOhU1ymB9gs7dMbSoVmKHitT+k1/xkjarcX8bBqPxWrGlK/R+C5WmWkfvWwyq5FfXfiBYCBs6PlA==} + cpu: [x64] + os: [darwin] + + sqlite-vec-linux-arm64@0.1.9: + resolution: {integrity: sha512-5wXVJ9c9kR4CHm/wVqXb/R+XUHTdpZ4nWbPHlS+gc9qQFVHs92Km4bPnCKX4rtcPMzvNis+SIzMJR1SCEwpuUw==} + cpu: [arm64] + os: [linux] + + sqlite-vec-linux-x64@0.1.9: + resolution: {integrity: sha512-w3tCH8xK2finW8fQJ/m8uqKodXUZ9KAuAar2UIhz4BHILfpE0WM/MTGCRfa7RjYbrYim5Luk3guvMOGI7T7JQA==} + cpu: [x64] + os: [linux] + + sqlite-vec-windows-x64@0.1.9: + resolution: {integrity: sha512-y3gEIyy/17bq2QFPQOWLE68TYWcRZkBQVA2XLrTPHNTOp55xJi/BBBmOm40tVMDMjtP+Elpk6UBUXdaq+46b0Q==} + cpu: [x64] + os: [win32] + + sqlite-vec@0.1.9: + resolution: {integrity: sha512-L7XJWRIBNvR9O5+vh1FQ+IGkh/3D2AzVksW5gdtk28m78Hy8skFD0pqReKH1Yp0/BUKRGcffgKvyO/EON5JXpA==} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + standardwebhooks@1.0.0: + resolution: {integrity: sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==} + + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + + std-env@4.2.0: + resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==} + + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + + string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + strtok3@10.3.5: + resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} + engines: {node: '>=18'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tar@7.5.19: + resolution: {integrity: sha512-4LeEWl96twnS2Q7Bz4MGqgazLqO+hJN63GZxXoIqh1T3VweYD997gbU1ItNsQafqqXTXd5WFyFdReLtwvRBNiw==} + engines: {node: '>=18'} + + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} + engines: {node: '>=14.0.0'} + + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + token-types@6.1.2: + resolution: {integrity: sha512-dRXchy+C0IgK8WPC6xvCHFRIWYUbqqdEIKPaKo/AcTUNzwLTK6AH7RjdLWsEZcAN/TBdtfUw3PYEgPr5VPr6ww==} + engines: {node: '>=14.16'} + + tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + + tree-sitter-bash@0.25.1: + resolution: {integrity: sha512-7hMytuYIMoXOq24yRulgIxthE9YmggZIOHCyPTTuJcu6EU54tYD+4G39cUb28kxC6jMf/AbPfWGLQtgPTdh3xw==} + peerDependencies: + tree-sitter: ^0.25.0 + peerDependenciesMeta: + tree-sitter: + optional: true + + ts-algebra@2.0.0: + resolution: {integrity: sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==} + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + + tslog@4.10.2: + resolution: {integrity: sha512-XuELoRpMR+sq8fuWwX7P0bcj+PRNiicOKDEb3fGNURhxWVyykCi9BNq7c4uVz7h7P0sj8qgBsr5SWS6yBClq3g==} + engines: {node: '>=16'} + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + + typebox@1.3.3: + resolution: {integrity: sha512-URXGUE31PJDQC+PtRMJeLdF4kmmOdFoVPikPCtV2oOIhUpNpppEdIz7W8bH8cFYPYHdDpaRvqwdegMTmHliudg==} + + typescript-eslint@8.63.0: + resolution: {integrity: sha512-xgwXyzG4sK9ALkBxbyGkTMMOS+imnW65iPhxCQMK83KhxyoDNW7l+IDqEf9vMdoUidHpOoS967RCq4eMiTexwQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + uhyphen@0.2.0: + resolution: {integrity: sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==} + + uint8array-extras@1.5.0: + resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} + engines: {node: '>=18'} + + undici-types@8.3.0: + resolution: {integrity: sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==} + + undici@8.5.0: + resolution: {integrity: sha512-xamtWoB1EshgjpmlXd7GGm2VfdDtw1+rD8uhry8pSNW3If6S8E0m2T2+orSKeZXEn/aPJMviCpDBA65WJt8zhg==} + engines: {node: '>=22.19.0'} + + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + vite@8.1.4: + resolution: {integrity: sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.3.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@4.1.9: + resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.9 + '@vitest/browser-preview': 4.1.9 + '@vitest/browser-webdriverio': 4.1.9 + '@vitest/coverage-istanbul': 4.1.9 + '@vitest/coverage-v8': 4.1.9 + '@vitest/ui': 4.1.9 + happy-dom: '*' + jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + web-push@3.6.7: + resolution: {integrity: sha512-OpiIUe8cuGjrj3mMBFWY+e4MMIkW3SVT+7vEIjvD9kejGUypv8GPDf84JdPWskK8zMRIJ6xYGm+Kxr8YkPyA0A==} + engines: {node: '>= 16'} + hasBin: true + + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + + web-tree-sitter@0.26.10: + resolution: {integrity: sha512-vengBGYS7FpAerkR3o04oBL4L8MkVmjawK50AFBu7v0HZBkmF9ZavPGKoXLSSmRhp7T/YgsJ7joAS3yAxHPEqQ==} + + webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + + whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} + engines: {node: '>= 14.6'} + hasBin: true + + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + + yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@17.7.3: + resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} + engines: {node: '>=12'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} + peerDependencies: + zod: ^3.25.28 || ^4 + + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + +snapshots: + + '@agentclientprotocol/sdk@1.1.0(zod@4.4.3)': + dependencies: + zod: 4.4.3 + + '@anthropic-ai/sdk@0.109.1(zod@4.4.3)': + dependencies: + json-schema-to-ts: 3.1.1 + standardwebhooks: 1.0.0 + optionalDependencies: + zod: 4.4.3 + + '@babel/runtime@7.29.7': {} + + '@borewit/text-codec@0.2.2': {} + + '@clack/core@1.4.2': + dependencies: + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@clack/prompts@1.6.0': + dependencies: + '@clack/core': 1.4.2 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.2 + sisteransi: 1.0.5 + + '@earendil-works/pi-tui@0.80.3': + dependencies: + get-east-asian-width: 1.6.0 + marked: 18.0.5 + + '@emnapi/core@1.11.1': + dependencies: + '@emnapi/wasi-threads': 1.2.2 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.11.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.2': + dependencies: + tslib: 2.8.1 + optional: true + + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.5(jiti@2.7.0))': + dependencies: + eslint: 9.39.5(jiti@2.7.0) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.2': {} + + '@eslint/config-array@0.21.2': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3 + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.6': + dependencies: + ajv: 6.15.0 + debug: 4.4.3 + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.0 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.5': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@google/genai@2.10.0(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))': + dependencies: + google-auth-library: 10.9.0 + p-retry: 4.6.2 + protobufjs: 7.6.5 + ws: 8.21.0 + optionalDependencies: + '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + '@grammyjs/runner@2.0.3(grammy@1.44.0)': + dependencies: + abort-controller: 3.0.0 + grammy: 1.44.0 + + '@grammyjs/transformer-throttler@1.2.1(grammy@1.44.0)': + dependencies: + bottleneck: 2.19.5 + grammy: 1.44.0 + + '@grammyjs/types@3.28.0': {} + + '@homebridge/ciao@1.3.9': + dependencies: + debug: 4.4.3 + fast-deep-equal: 3.1.3 + source-map-support: 0.5.21 + tslib: 2.8.1 + transitivePeerDependencies: + - supports-color + + '@hono/node-server@1.19.14(hono@4.12.29)': + dependencies: + hono: 4.12.29 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.3 + + '@jridgewell/sourcemap-codec@1.5.5': {} + + '@lydell/node-pty-darwin-arm64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty-darwin-x64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty-linux-arm64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty-linux-x64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty-win32-arm64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty-win32-x64@1.2.0-beta.12': + optional: true + + '@lydell/node-pty@1.2.0-beta.12': + optionalDependencies: + '@lydell/node-pty-darwin-arm64': 1.2.0-beta.12 + '@lydell/node-pty-darwin-x64': 1.2.0-beta.12 + '@lydell/node-pty-linux-arm64': 1.2.0-beta.12 + '@lydell/node-pty-linux-x64': 1.2.0-beta.12 + '@lydell/node-pty-win32-arm64': 1.2.0-beta.12 + '@lydell/node-pty-win32-x64': 1.2.0-beta.12 + + '@mistralai/mistralai@2.4.0': + dependencies: + '@opentelemetry/semantic-conventions': 1.43.0 + ws: 8.21.0 + zod: 4.4.3 + zod-to-json-schema: 3.25.2(zod@4.4.3) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)': + dependencies: + '@hono/node-server': 1.19.14(hono@4.12.29) + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) + content-type: 1.0.5 + cors: 2.8.6 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.1.0 + express: 5.2.1 + express-rate-limit: 8.5.2(express@5.2.1) + hono: 4.12.29 + jose: 6.2.3 + json-schema-typed: 8.0.2 + pkce-challenge: 5.0.1 + raw-body: 3.0.2 + zod: 4.4.3 + zod-to-json-schema: 3.25.2(zod@4.4.3) + transitivePeerDependencies: + - supports-color + + '@mozilla/readability@0.6.0': {} + + '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@openclaw/ai@2026.7.1-beta.5(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(ws@8.21.0)(zod@4.4.3)': + dependencies: + '@anthropic-ai/sdk': 0.109.1(zod@4.4.3) + '@google/genai': 2.10.0(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)) + '@mistralai/mistralai': 2.4.0 + openai: 6.45.0(ws@8.21.0)(zod@4.4.3) + partial-json: 0.1.7 + typebox: 1.3.3 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - '@modelcontextprotocol/sdk' + - '@opentelemetry/api' + - '@smithy/hash-node' + - '@smithy/signature-v4' + - bufferutil + - supports-color + - utf-8-validate + - ws + - zod + + '@openclaw/fs-safe@0.4.1': + optionalDependencies: + jszip: 3.10.1 + tar: 7.5.19 + + '@openclaw/proxyline@0.3.3(undici@8.5.0)': + dependencies: + undici: 8.5.0 + + '@opentelemetry/semantic-conventions@1.43.0': {} + + '@oxc-project/types@0.139.0': {} + + '@protobufjs/aspromise@1.1.2': {} + + '@protobufjs/base64@1.1.2': {} + + '@protobufjs/codegen@2.0.5': {} + + '@protobufjs/eventemitter@1.1.1': {} + + '@protobufjs/fetch@1.1.1': + dependencies: + '@protobufjs/aspromise': 1.1.2 + + '@protobufjs/float@1.0.2': {} + + '@protobufjs/path@1.1.2': {} + + '@protobufjs/pool@1.1.0': {} + + '@protobufjs/utf8@1.1.2': {} + + '@rolldown/binding-android-arm64@1.1.5': + optional: true + + '@rolldown/binding-darwin-arm64@1.1.5': + optional: true + + '@rolldown/binding-darwin-x64@1.1.5': + optional: true + + '@rolldown/binding-freebsd-x64@1.1.5': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.1.5': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.1.5': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.1.5': + optional: true + + '@rolldown/binding-linux-x64-musl@1.1.5': + optional: true + + '@rolldown/binding-openharmony-arm64@1.1.5': + optional: true + + '@rolldown/binding-wasm32-wasi@1.1.5': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.1.5': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.1.5': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@silvia-odwyer/photon-node@0.3.4': {} + + '@stablelib/base64@1.0.1': {} + + '@standard-schema/spec@1.1.0': {} + + '@tokenizer/inflate@0.4.1': + dependencies: + debug: 4.4.3 + token-types: 6.1.2 + transitivePeerDependencies: + - supports-color + + '@tokenizer/token@0.3.0': {} + + '@tybys/wasm-util@0.10.3': + dependencies: + tslib: 2.8.1 + optional: true + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@26.1.1': + dependencies: + undici-types: 8.3.0 + + '@types/retry@0.12.0': {} + + '@typescript-eslint/eslint-plugin@8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3))(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3)': + dependencies: + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.63.0 + '@typescript-eslint/type-utils': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/utils': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.63.0 + eslint: 9.39.5(jiti@2.7.0) + ignore: 7.0.6 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.63.0 + '@typescript-eslint/types': 8.63.0 + '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.63.0 + debug: 4.4.3 + eslint: 9.39.5(jiti@2.7.0) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.63.0(typescript@6.0.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.63.0(typescript@6.0.3) + '@typescript-eslint/types': 8.63.0 + debug: 4.4.3 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.63.0': + dependencies: + '@typescript-eslint/types': 8.63.0 + '@typescript-eslint/visitor-keys': 8.63.0 + + '@typescript-eslint/tsconfig-utils@8.63.0(typescript@6.0.3)': + dependencies: + typescript: 6.0.3 + + '@typescript-eslint/type-utils@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3)': + dependencies: + '@typescript-eslint/types': 8.63.0 + '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) + '@typescript-eslint/utils': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + debug: 4.4.3 + eslint: 9.39.5(jiti@2.7.0) + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.63.0': {} + + '@typescript-eslint/typescript-estree@8.63.0(typescript@6.0.3)': + dependencies: + '@typescript-eslint/project-service': 8.63.0(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.63.0(typescript@6.0.3) + '@typescript-eslint/types': 8.63.0 + '@typescript-eslint/visitor-keys': 8.63.0 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5(jiti@2.7.0)) + '@typescript-eslint/scope-manager': 8.63.0 + '@typescript-eslint/types': 8.63.0 + '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) + eslint: 9.39.5(jiti@2.7.0) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.63.0': + dependencies: + '@typescript-eslint/types': 8.63.0 + eslint-visitor-keys: 5.0.1 + + '@vitest/expect@4.1.9': + dependencies: + '@standard-schema/spec': 1.1.0 + '@types/chai': 5.2.3 + '@vitest/spy': 4.1.9 + '@vitest/utils': 4.1.9 + chai: 6.2.2 + tinyrainbow: 3.1.0 + + '@vitest/mocker@4.1.9(vite@8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0))': + dependencies: + '@vitest/spy': 4.1.9 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0) + + '@vitest/pretty-format@4.1.9': + dependencies: + tinyrainbow: 3.1.0 + + '@vitest/runner@4.1.9': + dependencies: + '@vitest/utils': 4.1.9 + pathe: 2.0.3 + + '@vitest/snapshot@4.1.9': + dependencies: + '@vitest/pretty-format': 4.1.9 + '@vitest/utils': 4.1.9 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@4.1.9': {} + + '@vitest/utils@4.1.9': + dependencies: + '@vitest/pretty-format': 4.1.9 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 + + abort-controller@3.0.0: + dependencies: + event-target-shim: 5.0.1 + + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.0.0 + + acorn-jsx@5.3.2(acorn@8.17.0): + dependencies: + acorn: 8.17.0 + + acorn@8.17.0: {} + + agent-base@7.1.4: {} + + ajv-formats@3.0.1(ajv@8.20.0): + optionalDependencies: + ajv: 8.20.0 + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + + ansi-regex@5.0.1: {} + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + argparse@2.0.1: {} + + asn1.js@5.4.1: + dependencies: + bn.js: 4.12.5 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + + assertion-error@2.0.1: {} + + balanced-match@1.0.2: {} + + balanced-match@4.0.4: {} + + base64-js@1.5.1: {} + + bignumber.js@9.3.1: {} + + bn.js@4.12.5: {} + + body-parser@2.3.0: + dependencies: + bytes: 3.1.2 + content-type: 2.0.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + on-finished: 2.4.1 + qs: 6.15.3 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + + boolbase@1.0.0: {} + + bottleneck@2.19.5: {} + + brace-expansion@1.1.16: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@5.0.7: + dependencies: + balanced-match: 4.0.4 + + buffer-equal-constant-time@1.0.1: {} + + buffer-from@1.1.2: {} + + bytes@3.1.2: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + + callsites@3.1.0: {} + + camelcase@5.3.1: {} + + chai@6.2.2: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.6.2: {} + + chokidar@5.0.0: + dependencies: + readdirp: 5.0.0 + + chownr@3.0.0: {} + + clawpdf@0.3.0: {} + + cliui@6.0.0: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + commander@15.0.0: {} + + concat-map@0.0.1: {} + + content-disposition@1.1.0: {} + + content-type@1.0.5: {} + + content-type@2.0.0: {} + + convert-source-map@2.0.0: {} + + cookie-signature@1.2.2: {} + + cookie@0.7.2: {} + + core-util-is@1.0.3: {} + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + + croner@10.0.1: {} + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + css-select@5.2.2: + dependencies: + boolbase: 1.0.0 + css-what: 6.2.2 + domhandler: 5.0.3 + domutils: 3.2.2 + nth-check: 2.1.1 + + css-what@6.2.2: {} + + cssom@0.5.0: {} + + data-uri-to-buffer@4.0.1: {} + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decamelize@1.2.0: {} + + deep-is@0.1.4: {} + + depd@2.0.0: {} + + detect-libc@2.1.2: {} + + diff@9.0.0: {} + + dijkstrajs@1.0.3: {} + + dom-serializer@2.0.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + domelementtype@2.3.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 + + domutils@3.2.2: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 + + dotenv@17.4.2: {} + + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + ecdsa-sig-formatter@1.0.11: + dependencies: + safe-buffer: 5.2.1 + + ee-first@1.1.1: {} + + emoji-regex@8.0.0: {} + + encodeurl@2.0.0: {} + + entities@4.5.0: {} + + entities@7.0.1: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-module-lexer@2.3.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + + escalade@3.2.0: {} + + escape-html@1.0.3: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint-visitor-keys@5.0.1: {} + + eslint@9.39.5(jiti@2.7.0): + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.5(jiti@2.7.0)) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.21.2 + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.6 + '@eslint/js': 9.39.5 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3 + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.17.0 + acorn-jsx: 5.3.2(acorn@8.17.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + esutils@2.0.3: {} + + etag@1.8.1: {} + + event-target-shim@5.0.1: {} + + eventsource-parser@3.1.0: {} + + eventsource@3.0.7: + dependencies: + eventsource-parser: 3.1.0 + + expect-type@1.4.0: {} + + express-rate-limit@8.5.2(express@5.2.1): + dependencies: + express: 5.2.1 + ip-address: 10.2.0 + + express@5.2.1: + dependencies: + accepts: 2.0.0 + body-parser: 2.3.0 + content-disposition: 1.1.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.1 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.7 + qs: 6.15.3 + range-parser: 1.3.0 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + extend@3.0.2: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fast-sha256@1.3.0: {} + + fast-string-truncated-width@3.0.3: {} + + fast-string-width@3.0.2: + dependencies: + fast-string-truncated-width: 3.0.3 + + fast-uri@3.1.3: {} + + fast-wrap-ansi@0.2.2: + dependencies: + fast-string-width: 3.0.2 + + fdir@6.5.0(picomatch@4.0.5): + optionalDependencies: + picomatch: 4.0.5 + + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + file-type@22.0.1: + dependencies: + '@tokenizer/inflate': 0.4.1 + strtok3: 10.3.5 + token-types: 6.1.2 + uint8array-extras: 1.5.0 + transitivePeerDependencies: + - supports-color + + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.4.2 + keyv: 4.5.4 + + flatted@3.4.2: {} + + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + + forwarded@0.2.0: {} + + fresh@2.0.0: {} + + fsevents@2.3.3: + optional: true + + function-bind@1.1.2: {} + + gaxios@7.2.0: + dependencies: + extend: 3.0.2 + https-proxy-agent: 7.0.6 + node-fetch: 3.3.2 + transitivePeerDependencies: + - supports-color + + gcp-metadata@8.1.2: + dependencies: + gaxios: 7.2.0 + google-logging-utils: 1.1.3 + json-bigint: 1.0.0 + transitivePeerDependencies: + - supports-color + + get-caller-file@2.0.5: {} + + get-east-asian-width@1.6.0: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + glob@13.0.6: + dependencies: + minimatch: 10.2.5 + minipass: 7.1.3 + path-scurry: 2.0.2 + + globals@14.0.0: {} + + google-auth-library@10.9.0: + dependencies: + base64-js: 1.5.1 + ecdsa-sig-formatter: 1.0.11 + gaxios: 7.2.0 + gcp-metadata: 8.1.2 + google-logging-utils: 1.1.3 + jws: 4.0.1 + transitivePeerDependencies: + - supports-color + + google-logging-utils@1.1.3: {} + + gopd@1.2.0: {} + + graceful-fs@4.2.11: {} + + grammy@1.44.0: + dependencies: + '@grammyjs/types': 3.28.0 + abort-controller: 3.0.0 + debug: 4.4.3 + node-fetch: 2.7.0 + transitivePeerDependencies: + - encoding + - supports-color + + has-flag@4.0.0: {} + + has-symbols@1.1.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + highlight.js@11.11.1: {} + + hono@4.12.29: {} + + hosted-git-info@10.1.1: + dependencies: + lru-cache: 11.5.2 + + html-escaper@3.0.3: {} + + htmlparser2@10.1.0: + dependencies: + domelementtype: 2.3.0 + domhandler: 5.0.3 + domutils: 3.2.2 + entities: 7.0.1 + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + http_ece@1.2.0: {} + + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.4 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + ieee754@1.2.1: {} + + ignore@5.3.2: {} + + ignore@7.0.5: {} + + ignore@7.0.6: {} + + immediate@3.0.6: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + inherits@2.0.4: {} + + ip-address@10.2.0: {} + + ipaddr.js@1.9.1: {} + + is-extglob@2.1.1: {} + + is-fullwidth-code-point@3.0.0: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-promise@4.0.0: {} + + isarray@1.0.0: {} + + isexe@2.0.0: {} + + jiti@2.7.0: {} + + jose@6.2.3: {} + + js-yaml@4.3.0: + dependencies: + argparse: 2.0.1 + + json-bigint@1.0.0: + dependencies: + bignumber.js: 9.3.1 + + json-buffer@3.0.1: {} + + json-schema-to-ts@3.1.1: + dependencies: + '@babel/runtime': 7.29.7 + ts-algebra: 2.0.0 + + json-schema-traverse@0.4.1: {} + + json-schema-traverse@1.0.0: {} + + json-schema-typed@8.0.2: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + json5@2.2.3: {} + + jszip@3.10.1: + dependencies: + lie: 3.3.0 + pako: 1.0.11 + readable-stream: 2.3.8 + setimmediate: 1.0.5 + + jwa@2.0.1: + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + + jws@4.0.1: + dependencies: + jwa: 2.0.1 + safe-buffer: 5.2.1 + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + kysely@0.29.2: {} + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lie@3.3.0: + dependencies: + immediate: 3.0.6 + + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + linkedom@0.18.12: + dependencies: + css-select: 5.2.2 + cssom: 0.5.0 + html-escaper: 3.0.3 + htmlparser2: 10.1.0 + uhyphen: 0.2.0 + + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + long@5.3.2: {} + + lru-cache@11.5.2: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + marked@18.0.5: {} + + math-intrinsics@1.1.0: {} + + media-typer@1.1.0: {} + + merge-descriptors@2.0.0: {} + + mime-db@1.54.0: {} + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + + minimalistic-assert@1.0.1: {} + + minimatch@10.2.5: + dependencies: + brace-expansion: 5.0.7 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.16 + + minimist@1.2.8: {} + + minipass@7.1.3: {} + + minizlib@3.1.0: + dependencies: + minipass: 7.1.3 + + ms@2.1.3: {} + + nanoid@3.3.15: {} + + natural-compare@1.4.0: {} + + negotiator@1.0.0: {} + + node-addon-api@8.9.0: {} + + node-domexception@1.0.0: {} + + node-edge-tts@1.2.10: + dependencies: + https-proxy-agent: 7.0.6 + ws: 8.21.0 + yargs: 17.7.3 + transitivePeerDependencies: + - bufferutil + - supports-color + - utf-8-validate + + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + + node-gyp-build@4.8.4: {} + + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + + object-assign@4.1.1: {} + + object-inspect@1.13.4: {} + + obug@2.1.3: {} + + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + openai@6.45.0(ws@8.21.0)(zod@4.4.3): + optionalDependencies: + ws: 8.21.0 + zod: 4.4.3 + + openclaw@2026.7.1-beta.5: + dependencies: + '@agentclientprotocol/sdk': 1.1.0(zod@4.4.3) + '@anthropic-ai/sdk': 0.109.1(zod@4.4.3) + '@clack/core': 1.4.2 + '@clack/prompts': 1.6.0 + '@earendil-works/pi-tui': 0.80.3 + '@google/genai': 2.10.0(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)) + '@grammyjs/runner': 2.0.3(grammy@1.44.0) + '@grammyjs/transformer-throttler': 1.2.1(grammy@1.44.0) + '@homebridge/ciao': 1.3.9 + '@lydell/node-pty': 1.2.0-beta.12 + '@mistralai/mistralai': 2.4.0 + '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) + '@mozilla/readability': 0.6.0 + '@openclaw/ai': 2026.7.1-beta.5(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(ws@8.21.0)(zod@4.4.3) + '@openclaw/fs-safe': 0.4.1 + '@openclaw/proxyline': 0.3.3(undici@8.5.0) + '@silvia-odwyer/photon-node': 0.3.4 + chalk: 5.6.2 + chokidar: 5.0.0 + clawpdf: 0.3.0 + commander: 15.0.0 + croner: 10.0.1 + diff: 9.0.0 + dotenv: 17.4.2 + express: 5.2.1 + file-type: 22.0.1 + glob: 13.0.6 + grammy: 1.44.0 + highlight.js: 11.11.1 + hosted-git-info: 10.1.1 + ignore: 7.0.5 + jiti: 2.7.0 + json5: 2.2.3 + jszip: 3.10.1 + kysely: 0.29.2 + linkedom: 0.18.12 + minimatch: 10.2.5 + node-edge-tts: 1.2.10 + openai: 6.45.0(ws@8.21.0)(zod@4.4.3) + partial-json: 0.1.7 + playwright-core: 1.61.1 + proper-lockfile: 4.1.2 + qrcode: 1.5.4 + quickjs-wasi: 3.0.2 + rastermill: 0.3.1 + tar: 7.5.19 + tree-sitter-bash: 0.25.1 + tslog: 4.10.2 + typebox: 1.3.3 + typescript: 6.0.3 + undici: 8.5.0 + web-push: 3.6.7 + web-tree-sitter: 0.26.10 + ws: 8.21.0 + yaml: 2.9.0 + zod: 4.4.3 + optionalDependencies: + sqlite-vec: 0.1.9 + transitivePeerDependencies: + - '@aws-sdk/credential-provider-node' + - '@cfworker/json-schema' + - '@opentelemetry/api' + - '@smithy/hash-node' + - '@smithy/signature-v4' + - bufferutil + - canvas + - encoding + - supports-color + - tree-sitter + - utf-8-validate + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + p-retry@4.6.2: + dependencies: + '@types/retry': 0.12.0 + retry: 0.13.1 + + p-try@2.2.0: {} + + pako@1.0.11: {} + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + parseurl@1.3.3: {} + + partial-json@0.1.7: {} + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + path-scurry@2.0.2: + dependencies: + lru-cache: 11.5.2 + minipass: 7.1.3 + + path-to-regexp@8.4.2: {} + + pathe@2.0.3: {} + + picocolors@1.1.1: {} + + picomatch@4.0.5: {} + + pkce-challenge@5.0.1: {} + + playwright-core@1.61.1: {} + + pngjs@5.0.0: {} + + postcss@8.5.16: + dependencies: + nanoid: 3.3.15 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + prelude-ls@1.2.1: {} + + prettier@3.9.5: {} + + process-nextick-args@2.0.1: {} + + proper-lockfile@4.1.2: + dependencies: + graceful-fs: 4.2.11 + retry: 0.12.0 + signal-exit: 3.0.7 + + protobufjs@7.6.5: + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.5 + '@protobufjs/eventemitter': 1.1.1 + '@protobufjs/fetch': 1.1.1 + '@protobufjs/float': 1.0.2 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.2 + '@types/node': 26.1.1 + long: 5.3.2 + + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + + punycode@2.3.1: {} + + qrcode@1.5.4: + dependencies: + dijkstrajs: 1.0.3 + pngjs: 5.0.0 + yargs: 15.4.1 + + qs@6.15.3: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quickjs-wasi@3.0.2: {} + + range-parser@1.3.0: {} + + rastermill@0.3.1: + dependencies: + '@silvia-odwyer/photon-node': 0.3.4 + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + unpipe: 1.0.0 + + readable-stream@2.3.8: + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + + readdirp@5.0.0: {} + + require-directory@2.1.1: {} + + require-from-string@2.0.2: {} + + require-main-filename@2.0.0: {} + + resolve-from@4.0.0: {} + + retry@0.12.0: {} + + retry@0.13.1: {} + + rolldown@1.1.5: + dependencies: + '@oxc-project/types': 0.139.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm64': 1.1.5 + '@rolldown/binding-darwin-arm64': 1.1.5 + '@rolldown/binding-darwin-x64': 1.1.5 + '@rolldown/binding-freebsd-x64': 1.1.5 + '@rolldown/binding-linux-arm-gnueabihf': 1.1.5 + '@rolldown/binding-linux-arm64-gnu': 1.1.5 + '@rolldown/binding-linux-arm64-musl': 1.1.5 + '@rolldown/binding-linux-ppc64-gnu': 1.1.5 + '@rolldown/binding-linux-s390x-gnu': 1.1.5 + '@rolldown/binding-linux-x64-gnu': 1.1.5 + '@rolldown/binding-linux-x64-musl': 1.1.5 + '@rolldown/binding-openharmony-arm64': 1.1.5 + '@rolldown/binding-wasm32-wasi': 1.1.5 + '@rolldown/binding-win32-arm64-msvc': 1.1.5 + '@rolldown/binding-win32-x64-msvc': 1.1.5 + + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + + safe-buffer@5.1.2: {} + + safe-buffer@5.2.1: {} + + safer-buffer@2.1.2: {} + + semver@7.8.5: {} + + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.0 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.3.0 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + + set-blocking@2.0.0: {} + + setimmediate@1.0.5: {} + + setprototypeof@1.2.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + + siginfo@2.0.0: {} + + signal-exit@3.0.7: {} + + sisteransi@1.0.5: {} + + source-map-js@1.2.1: {} + + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + sqlite-vec-darwin-arm64@0.1.9: + optional: true + + sqlite-vec-darwin-x64@0.1.9: + optional: true + + sqlite-vec-linux-arm64@0.1.9: + optional: true + + sqlite-vec-linux-x64@0.1.9: + optional: true + + sqlite-vec-windows-x64@0.1.9: + optional: true + + sqlite-vec@0.1.9: + optionalDependencies: + sqlite-vec-darwin-arm64: 0.1.9 + sqlite-vec-darwin-x64: 0.1.9 + sqlite-vec-linux-arm64: 0.1.9 + sqlite-vec-linux-x64: 0.1.9 + sqlite-vec-windows-x64: 0.1.9 + optional: true + + stackback@0.0.2: {} + + standardwebhooks@1.0.0: + dependencies: + '@stablelib/base64': 1.0.1 + fast-sha256: 1.3.0 + + statuses@2.0.2: {} + + std-env@4.2.0: {} + + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + + string_decoder@1.1.1: + dependencies: + safe-buffer: 5.1.2 + + strip-ansi@6.0.1: + dependencies: + ansi-regex: 5.0.1 + + strip-json-comments@3.1.1: {} + + strtok3@10.3.5: + dependencies: + '@tokenizer/token': 0.3.0 + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + tar@7.5.19: + dependencies: + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.3 + minizlib: 3.1.0 + yallist: 5.0.0 + + tinybench@2.9.0: {} + + tinyexec@1.2.4: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.5) + picomatch: 4.0.5 + + tinyrainbow@3.1.0: {} + + toidentifier@1.0.1: {} + + token-types@6.1.2: + dependencies: + '@borewit/text-codec': 0.2.2 + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + + tr46@0.0.3: {} + + tree-sitter-bash@0.25.1: + dependencies: + node-addon-api: 8.9.0 + node-gyp-build: 4.8.4 + + ts-algebra@2.0.0: {} + + ts-api-utils@2.5.0(typescript@6.0.3): + dependencies: + typescript: 6.0.3 + + tslib@2.8.1: {} + + tslog@4.10.2: {} + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + type-is@2.1.0: + dependencies: + content-type: 2.0.0 + media-typer: 1.1.0 + mime-types: 3.0.2 + + typebox@1.3.3: {} + + typescript-eslint@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.63.0(@typescript-eslint/parser@8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3))(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.63.0(typescript@6.0.3) + '@typescript-eslint/utils': 8.63.0(eslint@9.39.5(jiti@2.7.0))(typescript@6.0.3) + eslint: 9.39.5(jiti@2.7.0) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + typescript@6.0.3: {} + + uhyphen@0.2.0: {} + + uint8array-extras@1.5.0: {} + + undici-types@8.3.0: {} + + undici@8.5.0: {} + + unpipe@1.0.0: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + util-deprecate@1.0.2: {} + + vary@1.1.2: {} + + vite@8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0): + dependencies: + lightningcss: 1.32.0 + picomatch: 4.0.5 + postcss: 8.5.16 + rolldown: 1.1.5 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 26.1.1 + fsevents: 2.3.3 + jiti: 2.7.0 + yaml: 2.9.0 + + vitest@4.1.9(@types/node@26.1.1)(vite@8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.9 + '@vitest/mocker': 4.1.9(vite@8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.9 + '@vitest/runner': 4.1.9 + '@vitest/snapshot': 4.1.9 + '@vitest/spy': 4.1.9 + '@vitest/utils': 4.1.9 + es-module-lexer: 2.3.0 + expect-type: 1.4.0 + magic-string: 0.30.21 + obug: 2.1.3 + pathe: 2.0.3 + picomatch: 4.0.5 + std-env: 4.2.0 + tinybench: 2.9.0 + tinyexec: 1.2.4 + tinyglobby: 0.2.17 + tinyrainbow: 3.1.0 + vite: 8.1.4(@types/node@26.1.1)(jiti@2.7.0)(yaml@2.9.0) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 26.1.1 + transitivePeerDependencies: + - msw + + web-push@3.6.7: + dependencies: + asn1.js: 5.4.1 + http_ece: 1.2.0 + https-proxy-agent: 7.0.6 + jws: 4.0.1 + minimist: 1.2.8 + transitivePeerDependencies: + - supports-color + + web-streams-polyfill@3.3.3: {} + + web-tree-sitter@0.26.10: {} + + webidl-conversions@3.0.1: {} + + whatwg-url@5.0.0: + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + + which-module@2.0.1: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + + word-wrap@1.2.5: {} + + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrappy@1.0.2: {} + + ws@8.21.0: {} + + y18n@4.0.3: {} + + y18n@5.0.8: {} + + yallist@5.0.0: {} + + yaml@2.9.0: {} + + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + + yargs-parser@21.1.1: {} + + yargs@15.4.1: + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + + yargs@17.7.3: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + + yocto-queue@0.1.0: {} + + zod-to-json-schema@3.25.2(zod@4.4.3): + dependencies: + zod: 4.4.3 + + zod@4.4.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..943433b --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,8 @@ +packages: + - "." + +allowBuilds: + "@google/genai": false + openclaw: false + protobufjs: false + tree-sitter-bash: false diff --git a/src/channel.ts b/src/channel.ts new file mode 100644 index 0000000..166d7a5 --- /dev/null +++ b/src/channel.ts @@ -0,0 +1,32 @@ +import { + createChatChannelPlugin, + type ChannelPlugin, +} from "openclaw/plugin-sdk/channel-core"; +import { getChatChannelMeta } from "openclaw/plugin-sdk/channel-plugin-common"; + +export const GMAIL_CHANNEL_ID = "gmail" as const; + +export type GmailAccountPlaceholder = { + accountId: string; +}; + +/** Gmail channel contract used by OpenClaw during discovery and setup. */ +export const gmailPlugin: ChannelPlugin = + createChatChannelPlugin({ + base: { + id: GMAIL_CHANNEL_ID, + meta: { ...getChatChannelMeta(GMAIL_CHANNEL_ID), id: GMAIL_CHANNEL_ID }, + capabilities: { + chatTypes: ["group"], + threads: true, + blockStreaming: true, + }, + reload: { configPrefixes: ["channels.gmail"] }, + config: { + listAccountIds: () => [], + resolveAccount: (_cfg, accountId) => ({ + accountId: accountId ?? "default", + }), + }, + }, + }); diff --git a/tests/entry.test.ts b/tests/entry.test.ts new file mode 100644 index 0000000..0e882ab --- /dev/null +++ b/tests/entry.test.ts @@ -0,0 +1,11 @@ +import { describe, expect, it } from "vitest"; +import entry from "../index.js"; + +describe("Gmail plugin entry", () => { + it("declares the modern channel entry contract", () => { + expect(entry.id).toBe("gmail"); + expect(entry.name).toBe("Gmail"); + expect(entry.channelPlugin.id).toBe("gmail"); + expect(entry.channelPlugin.meta.id).toBe("gmail"); + }); +}); diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..1f4e782 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": ".", + "sourceMap": true + }, + "include": ["index.ts", "src/**/*.ts"], + "exclude": ["**/*.test.ts"] +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..97796ea --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2023", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + "noImplicitOverride": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "verbatimModuleSyntax": true, + "esModuleInterop": true, + "skipLibCheck": true, + "types": ["node", "vitest/globals"] + }, + "include": ["index.ts", "src/**/*.ts", "tests/**/*.ts", "*.config.ts"] +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..73cfd4c --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + coverage: { enabled: false }, + include: ["src/**/*.test.ts", "tests/**/*.test.ts"], + }, +}); From dbf8d7f95cf1fb07140dcc9e97126e515ec2170b Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:47:21 -0700 Subject: [PATCH 05/14] gmail-883.1: close scaffold task --- .pebbles/events.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 941ee64..124c563 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -24,3 +24,4 @@ {"type":"dep_add","timestamp":"2026-07-12T13:39:28.593206Z","issue_id":"gmail-883.4","payload":{"dep_type":"blocks","depends_on":"gmail-883.3"}} {"type":"dep_add","timestamp":"2026-07-12T13:39:28.62949Z","issue_id":"gmail-883.5","payload":{"dep_type":"blocks","depends_on":"gmail-883.4"}} {"type":"status_update","timestamp":"2026-07-12T13:41:23.915971Z","issue_id":"gmail-883.1","payload":{"status":"in_progress"}} +{"type":"close","timestamp":"2026-07-12T13:47:21.620738Z","issue_id":"gmail-883.1","payload":{}} From 0ad324d8268d5bdd8d7fe4830f307a945c0ae67b Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:53:20 -0700 Subject: [PATCH 06/14] gmail-883.2: add secure Gmail account configuration --- .pebbles/events.jsonl | 2 + openclaw.plugin.json | 69 ++++++++++++++- package.json | 3 + pnpm-lock.yaml | 4 + src/accounts.test.ts | 88 +++++++++++++++++++ src/accounts.ts | 190 ++++++++++++++++++++++++++++++++++++++++++ src/channel.test.ts | 31 +++++++ src/channel.ts | 48 +++++++++-- src/config.test.ts | 27 ++++++ src/config.ts | 72 ++++++++++++++++ src/policy.test.ts | 28 +++++++ src/policy.ts | 25 ++++++ src/target.test.ts | 22 +++++ src/target.ts | 47 +++++++++++ 14 files changed, 647 insertions(+), 9 deletions(-) create mode 100644 src/accounts.test.ts create mode 100644 src/accounts.ts create mode 100644 src/channel.test.ts create mode 100644 src/config.test.ts create mode 100644 src/config.ts create mode 100644 src/policy.test.ts create mode 100644 src/policy.ts create mode 100644 src/target.test.ts create mode 100644 src/target.ts diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 124c563..620a3a6 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -25,3 +25,5 @@ {"type":"dep_add","timestamp":"2026-07-12T13:39:28.62949Z","issue_id":"gmail-883.5","payload":{"dep_type":"blocks","depends_on":"gmail-883.4"}} {"type":"status_update","timestamp":"2026-07-12T13:41:23.915971Z","issue_id":"gmail-883.1","payload":{"status":"in_progress"}} {"type":"close","timestamp":"2026-07-12T13:47:21.620738Z","issue_id":"gmail-883.1","payload":{}} +{"type":"status_update","timestamp":"2026-07-12T13:53:15.347607Z","issue_id":"gmail-883.2","payload":{"status":"in_progress"}} +{"type":"close","timestamp":"2026-07-12T13:53:20.356718Z","issue_id":"gmail-883.2","payload":{}} diff --git a/openclaw.plugin.json b/openclaw.plugin.json index 6def265..b26448d 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -19,7 +19,74 @@ "schema": { "type": "object", "additionalProperties": false, - "properties": {} + "properties": { + "enabled": { "type": "boolean", "default": true }, + "defaultAccount": { "type": "string", "minLength": 1 }, + "accounts": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "required": ["email"], + "properties": { + "name": { "type": "string", "minLength": 1 }, + "enabled": { "type": "boolean", "default": true }, + "email": { "type": "string", "format": "email" }, + "oauth": { + "type": "object", + "additionalProperties": false, + "properties": { + "clientId": { "$ref": "#/$defs/secretInput" }, + "clientSecret": { "$ref": "#/$defs/secretInput" }, + "refreshToken": { "$ref": "#/$defs/secretInput" } + } + }, + "allowFrom": { "type": "array", "items": { "type": "string" } }, + "allowTo": { "type": "array", "items": { "type": "string" } }, + "pollIntervalSeconds": { + "type": "integer", + "minimum": 10, + "maximum": 3600, + "default": 30 + } + } + } + } + }, + "$defs": { + "secretInput": { + "oneOf": [ + { "type": "string" }, + { + "type": "object", + "additionalProperties": false, + "required": ["source", "provider", "id"], + "properties": { + "source": { + "type": "string", + "enum": ["env", "file", "exec"] + }, + "provider": { "type": "string", "minLength": 1 }, + "id": { "type": "string", "minLength": 1 } + } + } + ] + } + } + }, + "uiHints": { + "accounts.*.oauth.clientId": { + "label": "OAuth client ID", + "sensitive": true + }, + "accounts.*.oauth.clientSecret": { + "label": "OAuth client secret", + "sensitive": true + }, + "accounts.*.oauth.refreshToken": { + "label": "OAuth refresh token", + "sensitive": true + } } } } diff --git a/package.json b/package.json index c4418f2..a84a578 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,9 @@ "optional": true } }, + "dependencies": { + "zod": "4.4.3" + }, "devDependencies": { "@eslint/js": "9.39.5", "@types/node": "26.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b45dbae..e39efe4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + zod: + specifier: 4.4.3 + version: 4.4.3 devDependencies: '@eslint/js': specifier: 9.39.5 diff --git a/src/accounts.test.ts b/src/accounts.test.ts new file mode 100644 index 0000000..918e776 --- /dev/null +++ b/src/accounts.test.ts @@ -0,0 +1,88 @@ +import { describe, expect, it } from "vitest"; +import { + inspectGmailAccount, + listGmailAccountIds, + resolveDefaultGmailAccountId, + resolveGmailAccount, + type GmailCoreConfig, +} from "./accounts.js"; + +const config = { + channels: { + gmail: { + defaultAccount: "work", + accounts: { + work: { + email: "Agent@Example.com", + oauth: { + clientId: { + source: "env", + provider: "default", + id: "TEST_GMAIL_CLIENT_ID", + }, + clientSecret: { + source: "env", + provider: "default", + id: "TEST_GMAIL_CLIENT_SECRET", + }, + refreshToken: { + source: "env", + provider: "default", + id: "TEST_GMAIL_REFRESH_TOKEN", + }, + }, + allowFrom: ["person@example.com"], + allowTo: ["@example.com"], + }, + }, + }, + }, +} satisfies GmailCoreConfig; + +describe("Gmail account resolution", () => { + it("lists named accounts and resolves the configured default", () => { + expect(listGmailAccountIds(config)).toEqual(["work"]); + expect(resolveDefaultGmailAccountId(config)).toBe("work"); + }); + + it("resolves env-backed OAuth inputs without changing config", () => { + const account = resolveGmailAccount({ + cfg: config, + env: { + TEST_GMAIL_CLIENT_ID: "client-id", + TEST_GMAIL_CLIENT_SECRET: "client-secret", + TEST_GMAIL_REFRESH_TOKEN: "refresh-token", + }, + }); + + expect(account).toMatchObject({ + accountId: "work", + email: "agent@example.com", + configured: true, + clientId: "client-id", + clientSecret: "client-secret", + refreshToken: "refresh-token", + allowFrom: ["person@example.com"], + allowTo: ["@example.com"], + }); + }); + + it("inspects configuration without returning secret values", () => { + const inspection = inspectGmailAccount(config, "work"); + + expect(inspection).toEqual({ + accountId: "work", + enabled: true, + configured: true, + email: "agent@example.com", + oauth: { + clientId: "configured", + clientSecret: "configured", + refreshToken: "configured", + }, + }); + expect(JSON.stringify(inspection)).not.toContain( + "TEST_GMAIL_CLIENT_SECRET", + ); + }); +}); diff --git a/src/accounts.ts b/src/accounts.ts new file mode 100644 index 0000000..7bcaf5a --- /dev/null +++ b/src/accounts.ts @@ -0,0 +1,190 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { + hasConfiguredSecretInput, + normalizeSecretInputString, + resolveSecretInputString, +} from "openclaw/plugin-sdk/secret-input"; +import { + GmailChannelConfigSchema, + type GmailAccountConfig, + type GmailChannelConfig, + type GmailChannelConfigInput, +} from "./config.js"; + +export type GmailCoreConfig = Omit & { + channels?: OpenClawConfig["channels"] & { gmail?: GmailChannelConfigInput }; +}; + +export type ResolvedGmailAccount = { + accountId: string; + name?: string; + enabled: boolean; + configured: boolean; + email: string; + clientId: string; + clientSecret: string; + refreshToken: string; + allowFrom: string[]; + allowTo: string[]; + pollIntervalSeconds: number; +}; + +type OAuthInspection = "configured" | "missing"; + +export type GmailAccountInspection = { + accountId: string; + enabled: boolean; + configured: boolean; + email: string; + oauth: { + clientId: OAuthInspection; + clientSecret: OAuthInspection; + refreshToken: OAuthInspection; + }; +}; + +function readChannelConfig(cfg: GmailCoreConfig): GmailChannelConfig { + return GmailChannelConfigSchema.parse(cfg.channels?.gmail ?? {}); +} + +function requireAccount( + cfg: GmailCoreConfig, + accountId?: string | null, +): { + accountId: string; + channel: GmailChannelConfig; + account: GmailAccountConfig; +} { + const channel = readChannelConfig(cfg); + const resolvedId = accountId?.trim() || resolveDefaultGmailAccountId(cfg); + const account = channel.accounts[resolvedId]; + if (!account) { + throw new Error(`Gmail account "${resolvedId}" is not configured`); + } + return { accountId: resolvedId, channel, account }; +} + +function resolveOAuthSecret(params: { + cfg: GmailCoreConfig; + value: unknown; + path: string; + env: NodeJS.ProcessEnv; +}): string { + const resolution = resolveSecretInputString({ + value: params.value, + ...(params.cfg.secrets?.defaults + ? { defaults: params.cfg.secrets.defaults } + : {}), + path: params.path, + mode: "inspect", + }); + if (resolution.status === "available") { + return normalizeSecretInputString(resolution.value) ?? ""; + } + if ( + resolution.status === "configured_unavailable" && + resolution.ref.source === "env" + ) { + return params.env[resolution.ref.id]?.trim() ?? ""; + } + return ""; +} + +function inspectOAuthSecret( + cfg: GmailCoreConfig, + value: unknown, +): OAuthInspection { + return hasConfiguredSecretInput(value, cfg.secrets?.defaults) + ? "configured" + : "missing"; +} + +/** Lists configured Gmail account IDs in stable order. */ +export function listGmailAccountIds(cfg: GmailCoreConfig): string[] { + return Object.keys(readChannelConfig(cfg).accounts).sort(); +} + +/** Resolves the explicit default or the first configured Gmail account. */ +export function resolveDefaultGmailAccountId(cfg: GmailCoreConfig): string { + const channel = readChannelConfig(cfg); + if (channel.defaultAccount) { + return channel.defaultAccount; + } + const first = Object.keys(channel.accounts).sort()[0]; + if (!first) { + throw new Error("No Gmail accounts are configured"); + } + return first; +} + +/** Resolves one Gmail account and materializes env-backed OAuth inputs. */ +export function resolveGmailAccount(params: { + cfg: GmailCoreConfig; + accountId?: string | null; + env?: NodeJS.ProcessEnv; +}): ResolvedGmailAccount { + const { accountId, channel, account } = requireAccount( + params.cfg, + params.accountId, + ); + const env = params.env ?? process.env; + const path = `channels.gmail.accounts.${accountId}.oauth`; + const clientId = resolveOAuthSecret({ + cfg: params.cfg, + value: account.oauth.clientId, + path: `${path}.clientId`, + env, + }); + const clientSecret = resolveOAuthSecret({ + cfg: params.cfg, + value: account.oauth.clientSecret, + path: `${path}.clientSecret`, + env, + }); + const refreshToken = resolveOAuthSecret({ + cfg: params.cfg, + value: account.oauth.refreshToken, + path: `${path}.refreshToken`, + env, + }); + const enabled = channel.enabled && account.enabled; + return { + accountId, + ...(account.name ? { name: account.name } : {}), + enabled, + configured: enabled && Boolean(clientId && clientSecret && refreshToken), + email: account.email, + clientId, + clientSecret, + refreshToken, + allowFrom: account.allowFrom, + allowTo: account.allowTo, + pollIntervalSeconds: account.pollIntervalSeconds, + }; +} + +/** Describes account readiness without returning OAuth secret values or references. */ +export function inspectGmailAccount( + cfg: GmailCoreConfig, + requestedAccountId?: string | null, +): GmailAccountInspection { + const { accountId, channel, account } = requireAccount( + cfg, + requestedAccountId, + ); + const oauth = { + clientId: inspectOAuthSecret(cfg, account.oauth.clientId), + clientSecret: inspectOAuthSecret(cfg, account.oauth.clientSecret), + refreshToken: inspectOAuthSecret(cfg, account.oauth.refreshToken), + }; + const enabled = channel.enabled && account.enabled; + return { + accountId, + enabled, + configured: + enabled && + Object.values(oauth).every((status) => status === "configured"), + email: account.email, + oauth, + }; +} diff --git a/src/channel.test.ts b/src/channel.test.ts new file mode 100644 index 0000000..d3bc0e0 --- /dev/null +++ b/src/channel.test.ts @@ -0,0 +1,31 @@ +import { describe, expect, it } from "vitest"; +import { gmailPlugin } from "./channel.js"; + +describe("gmailPlugin config", () => { + it("exposes configured named accounts through the channel adapter", () => { + const cfg = { + channels: { + gmail: { + accounts: { + work: { + email: "agent@example.com", + oauth: { + clientId: "client-id", + clientSecret: "client-secret", + refreshToken: "refresh-token", + }, + }, + }, + }, + }, + } as never; + + expect(gmailPlugin.config.listAccountIds(cfg)).toEqual(["work"]); + expect(gmailPlugin.config.defaultAccountId?.(cfg)).toBe("work"); + expect(gmailPlugin.config.resolveAccount(cfg, "work")).toMatchObject({ + accountId: "work", + configured: true, + email: "agent@example.com", + }); + }); +}); diff --git a/src/channel.ts b/src/channel.ts index 166d7a5..5e3bd54 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -3,15 +3,20 @@ import { type ChannelPlugin, } from "openclaw/plugin-sdk/channel-core"; import { getChatChannelMeta } from "openclaw/plugin-sdk/channel-plugin-common"; +import { + listGmailAccountIds, + resolveDefaultGmailAccountId, + resolveGmailAccount, + type GmailCoreConfig, + type ResolvedGmailAccount, +} from "./accounts.js"; +import { gmailConfigSchema } from "./config.js"; +import { normalizeGmailTarget, parseGmailTarget } from "./target.js"; export const GMAIL_CHANNEL_ID = "gmail" as const; -export type GmailAccountPlaceholder = { - accountId: string; -}; - /** Gmail channel contract used by OpenClaw during discovery and setup. */ -export const gmailPlugin: ChannelPlugin = +export const gmailPlugin: ChannelPlugin = createChatChannelPlugin({ base: { id: GMAIL_CHANNEL_ID, @@ -22,11 +27,38 @@ export const gmailPlugin: ChannelPlugin = blockStreaming: true, }, reload: { configPrefixes: ["channels.gmail"] }, + configSchema: gmailConfigSchema, config: { - listAccountIds: () => [], - resolveAccount: (_cfg, accountId) => ({ - accountId: accountId ?? "default", + listAccountIds: (cfg) => listGmailAccountIds(cfg as GmailCoreConfig), + defaultAccountId: (cfg) => + resolveDefaultGmailAccountId(cfg as GmailCoreConfig), + resolveAccount: (cfg, accountId) => + resolveGmailAccount({ + cfg: cfg as GmailCoreConfig, + ...(accountId !== undefined ? { accountId } : {}), + }), + isConfigured: (account) => account.configured, + isEnabled: (account) => account.enabled, + resolveAllowFrom: ({ cfg, accountId }) => + resolveGmailAccount({ + cfg: cfg as GmailCoreConfig, + ...(accountId !== undefined ? { accountId } : {}), + }).allowFrom, + describeAccount: (account) => ({ + accountId: account.accountId, + name: account.name ?? account.email, + enabled: account.enabled, + configured: account.configured, }), }, + messaging: { + targetPrefixes: ["gmail"], + normalizeTarget: (value) => normalizeGmailTarget(value) ?? undefined, + inferTargetChatType: () => "group", + targetResolver: { + looksLikeId: (value) => parseGmailTarget(value) !== null, + hint: "", + }, + }, }, }); diff --git a/src/config.test.ts b/src/config.test.ts new file mode 100644 index 0000000..2c9634a --- /dev/null +++ b/src/config.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it } from "vitest"; +import { GmailChannelConfigSchema } from "./config.js"; + +describe("GmailChannelConfigSchema", () => { + it("rejects unknown account fields", () => { + expect(() => + GmailChannelConfigSchema.parse({ + accounts: { + work: { + email: "agent@example.com", + unexpected: true, + }, + }, + }), + ).toThrow(); + }); + + it("applies conservative polling defaults", () => { + const parsed = GmailChannelConfigSchema.parse({ + accounts: { work: { email: "agent@example.com" } }, + }); + + expect(parsed.accounts.work?.pollIntervalSeconds).toBe(30); + expect(parsed.accounts.work?.allowFrom).toEqual([]); + expect(parsed.accounts.work?.allowTo).toEqual([]); + }); +}); diff --git a/src/config.ts b/src/config.ts new file mode 100644 index 0000000..5b345c9 --- /dev/null +++ b/src/config.ts @@ -0,0 +1,72 @@ +import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; +import { + buildSecretInputSchema, + type SecretInput, +} from "openclaw/plugin-sdk/secret-input"; +import { z } from "zod"; + +const OAuthConfigSchema = z + .object({ + clientId: buildSecretInputSchema().optional(), + clientSecret: buildSecretInputSchema().optional(), + refreshToken: buildSecretInputSchema().optional(), + }) + .strict() + .default({}); + +export const GmailAccountConfigSchema = z + .object({ + name: z.string().trim().min(1).optional(), + enabled: z.boolean().default(true), + email: z.string().trim().toLowerCase().email(), + oauth: OAuthConfigSchema, + allowFrom: z.array(z.string().trim().min(1)).default([]), + allowTo: z.array(z.string().trim().min(1)).default([]), + pollIntervalSeconds: z.number().int().min(10).max(3_600).default(30), + }) + .strict(); + +export const GmailChannelConfigSchema = z + .object({ + enabled: z.boolean().default(true), + defaultAccount: z.string().trim().min(1).optional(), + accounts: z + .record(z.string().trim().min(1), GmailAccountConfigSchema) + .default({}), + }) + .strict(); + +export type GmailOAuthConfig = { + clientId?: SecretInput; + clientSecret?: SecretInput; + refreshToken?: SecretInput; +}; + +export type GmailAccountConfig = z.infer; +export type GmailChannelConfig = z.infer; +export type GmailChannelConfigInput = z.input; + +type ChannelConfigSchema = NonNullable; + +/** Channel schema with the JSON and runtime validators expected by OpenClaw. */ +export const gmailConfigSchema: ChannelConfigSchema = { + schema: z.toJSONSchema(GmailChannelConfigSchema), + runtime: { + safeParse(value: unknown) { + const result = GmailChannelConfigSchema.safeParse(value); + return result.success + ? { success: true, data: result.data } + : { + success: false, + issues: result.error.issues.map((issue) => ({ + path: issue.path.filter( + (part): part is string | number => + typeof part === "string" || typeof part === "number", + ), + message: issue.message, + code: issue.code, + })), + }; + }, + }, +}; diff --git a/src/policy.test.ts b/src/policy.test.ts new file mode 100644 index 0000000..7c137e0 --- /dev/null +++ b/src/policy.test.ts @@ -0,0 +1,28 @@ +import { describe, expect, it } from "vitest"; +import { isAddressAllowed } from "./policy.js"; + +describe("isAddressAllowed", () => { + it("denies every address when policy is empty", () => { + expect(isAddressAllowed("person@example.com", [])).toBe(false); + }); + + it("matches exact addresses without case sensitivity", () => { + expect(isAddressAllowed("Person@Example.com", ["person@example.com"])).toBe( + true, + ); + }); + + it("matches a domain and its subdomains on a label boundary", () => { + expect(isAddressAllowed("person@ops.example.com", ["@example.com"])).toBe( + true, + ); + expect(isAddressAllowed("person@notexample.com", ["@example.com"])).toBe( + false, + ); + }); + + it("accepts any valid address for wildcard policy", () => { + expect(isAddressAllowed("person@example.com", ["*"])).toBe(true); + expect(isAddressAllowed("not-an-address", ["*"])).toBe(false); + }); +}); diff --git a/src/policy.ts b/src/policy.ts new file mode 100644 index 0000000..fcb952b --- /dev/null +++ b/src/policy.ts @@ -0,0 +1,25 @@ +import { normalizeEmailAddress } from "./target.js"; + +function matchesAddressPolicy(address: string, rawEntry: string): boolean { + const entry = rawEntry.trim().toLowerCase(); + if (entry === "*") { + return true; + } + if (entry.startsWith("@")) { + const domain = address.slice(address.lastIndexOf("@") + 1); + const allowedDomain = entry.slice(1); + return domain === allowedDomain || domain.endsWith(`.${allowedDomain}`); + } + return address === normalizeEmailAddress(entry); +} + +/** Returns whether one email address is admitted by an exact/domain policy list. */ +export function isAddressAllowed( + address: string, + entries: readonly string[], +): boolean { + const normalized = normalizeEmailAddress(address); + return normalized + ? entries.some((entry) => matchesAddressPolicy(normalized, entry)) + : false; +} diff --git a/src/target.test.ts b/src/target.test.ts new file mode 100644 index 0000000..4418ca4 --- /dev/null +++ b/src/target.test.ts @@ -0,0 +1,22 @@ +import { describe, expect, it } from "vitest"; +import { normalizeGmailTarget, parseGmailTarget } from "./target.js"; + +describe("Gmail target grammar", () => { + it("normalizes bare email addresses to mailto targets", () => { + expect(normalizeGmailTarget(" Person@Example.com ")).toBe( + "mailto:person@example.com", + ); + }); + + it("preserves Gmail thread identifiers", () => { + expect(parseGmailTarget("thread:18f0abCDef12")).toEqual({ + kind: "thread", + threadId: "18f0abCDef12", + }); + }); + + it("rejects malformed targets", () => { + expect(normalizeGmailTarget("not-an-address")).toBeNull(); + expect(normalizeGmailTarget("thread:../mailbox")).toBeNull(); + }); +}); diff --git a/src/target.ts b/src/target.ts new file mode 100644 index 0000000..141d971 --- /dev/null +++ b/src/target.ts @@ -0,0 +1,47 @@ +const THREAD_ID_PATTERN = /^[A-Za-z0-9_-]{8,128}$/u; +const EMAIL_PATTERN = /^[^\s<>@]+@[^\s<>@]+\.[^\s<>@]+$/u; + +export type GmailTarget = + { kind: "thread"; threadId: string } | { kind: "email"; email: string }; + +/** Normalizes a syntactically valid email address for matching and delivery. */ +export function normalizeEmailAddress(value: string): string | null { + const normalized = value.trim().toLowerCase(); + return EMAIL_PATTERN.test(normalized) ? normalized : null; +} + +/** Parses the public Gmail target grammar into one typed variant. */ +export function parseGmailTarget(value: string): GmailTarget | null { + const trimmed = value.trim(); + if (trimmed.startsWith("thread:")) { + const threadId = trimmed.slice("thread:".length); + return THREAD_ID_PATTERN.test(threadId) + ? { kind: "thread", threadId } + : null; + } + + const rawEmail = trimmed.startsWith("mailto:") + ? trimmed.slice("mailto:".length) + : trimmed; + const email = normalizeEmailAddress(rawEmail); + return email ? { kind: "email", email } : null; +} + +/** Returns the canonical string form accepted by the channel adapters. */ +export function normalizeGmailTarget(value: string): string | null { + const target = parseGmailTarget(value); + if (!target) { + return null; + } + return target.kind === "thread" + ? `thread:${target.threadId}` + : `mailto:${target.email}`; +} + +/** Builds the canonical target for one Gmail conversation. */ +export function buildGmailThreadTarget(threadId: string): string { + if (!THREAD_ID_PATTERN.test(threadId)) { + throw new Error("Invalid Gmail thread ID"); + } + return `thread:${threadId}`; +} From 82d6d194cb3efb29eef47c0d00f8356304003914 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 06:57:05 -0700 Subject: [PATCH 07/14] gmail-883.3: implement Gmail API transport --- .pebbles/events.jsonl | 2 + package.json | 1 + pnpm-lock.yaml | 223 +++++++++++++++++++++++++++++++++++ src/gmail-client.test.ts | 72 ++++++++++++ src/gmail-client.ts | 153 ++++++++++++++++++++++++ src/message.test.ts | 113 ++++++++++++++++++ src/message.ts | 247 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 811 insertions(+) create mode 100644 src/gmail-client.test.ts create mode 100644 src/gmail-client.ts create mode 100644 src/message.test.ts create mode 100644 src/message.ts diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 620a3a6..812f236 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -27,3 +27,5 @@ {"type":"close","timestamp":"2026-07-12T13:47:21.620738Z","issue_id":"gmail-883.1","payload":{}} {"type":"status_update","timestamp":"2026-07-12T13:53:15.347607Z","issue_id":"gmail-883.2","payload":{"status":"in_progress"}} {"type":"close","timestamp":"2026-07-12T13:53:20.356718Z","issue_id":"gmail-883.2","payload":{}} +{"type":"status_update","timestamp":"2026-07-12T13:57:05.108169Z","issue_id":"gmail-883.3","payload":{"status":"in_progress"}} +{"type":"close","timestamp":"2026-07-12T13:57:05.134847Z","issue_id":"gmail-883.3","payload":{}} diff --git a/package.json b/package.json index a84a578..d86da31 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ } }, "dependencies": { + "@googleapis/gmail": "17.0.0", "zod": "4.4.3" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e39efe4..6b9f41a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@googleapis/gmail': + specifier: 17.0.0 + version: 17.0.0 zod: specifier: 4.4.3 version: 4.4.3 @@ -128,6 +131,10 @@ packages: '@modelcontextprotocol/sdk': optional: true + '@googleapis/gmail@17.0.0': + resolution: {integrity: sha512-pV0E+has0ZCqIJoaTmQkOyuRXDtcC8bvH+hmoqGH+J2qxEzhsLT3VX69v6Ef7bifhwokYH82rgQlMRHpFDLrmw==} + engines: {node: '>=12.0.0'} + '@grammyjs/runner@2.0.3': resolution: {integrity: sha512-nckmTs1dPWfVQteK9cxqxzE+0m1VRvluLWB8UgFzsjg62w3qthPJt0TYtJBEdG7OedvfQq4vnFAyE6iaMkR42A==} engines: {node: '>=12.20.0 || >=14.13.1'} @@ -173,6 +180,10 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@isaacs/fs-minipass@4.0.1': resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} engines: {node: '>=18.0.0'} @@ -262,6 +273,10 @@ packages: '@oxc-project/types@0.139.0': resolution: {integrity: sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==} + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + '@protobufjs/aspromise@1.1.2': resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} @@ -552,10 +567,18 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -595,6 +618,9 @@ packages: brace-expansion@1.1.16: resolution: {integrity: sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw==} + brace-expansion@2.1.2: + resolution: {integrity: sha512-w5JZcKgdhDOgOwm8H+KgbosopHMuGcl6qbulwjtz3SM7I7P3yW1eAjzMPLrIE+NQ9vjgANKHWeMHnrT0OXW1oA==} + brace-expansion@5.0.7: resolution: {integrity: sha512-7oFy703dxfY3/NLxC1fh2SUCQ0H9rmAY+5EpDVfXjUTTs+HEwR2nYaqLv+GWcTsumwxPfiz6CzCNkwXwBUwqCA==} engines: {node: 18 || 20 || >=22} @@ -775,6 +801,9 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} @@ -784,6 +813,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -968,6 +1000,10 @@ packages: flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + formdata-polyfill@4.0.10: resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} engines: {node: '>=12.20.0'} @@ -988,6 +1024,10 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gaxios@7.1.3: + resolution: {integrity: sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==} + engines: {node: '>=18'} + gaxios@7.2.0: resolution: {integrity: sha512-CUVb4wcYe+771XevyH6HtGmXFAGGKkIC3kswAP8Z1JCe0j80JMaTPZH930DWFrvo0atjh18Arc0pEyUCWa5bfg==} engines: {node: '>=18'} @@ -1016,6 +1056,11 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} + glob@10.5.0: + resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + glob@13.0.6: resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} engines: {node: 18 || 20 || >=22} @@ -1024,6 +1069,10 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} + google-auth-library@10.5.0: + resolution: {integrity: sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==} + engines: {node: '>=18'} + google-auth-library@10.9.0: resolution: {integrity: sha512-xtvUqvINPhTaBm7nXqlYPcrMHJPm1lCNdSovxnKKhTm+4JsvQ+KGVYJViLoH9Yxu8w+T0Qv5HubzYT9BLrppJg==} engines: {node: '>=18'} @@ -1032,6 +1081,10 @@ packages: resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==} engines: {node: '>=14'} + googleapis-common@8.0.2: + resolution: {integrity: sha512-5MXeQzIZaqCH7B+HJWqhQm946VARpZep6acbWSr/fcgF2cQANq7allgX+i/G0EqF0WyUxB277gtWMzRYHMl9tg==} + engines: {node: '>=18.0.0'} + gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -1043,6 +1096,10 @@ packages: resolution: {integrity: sha512-gGVykS5+c5f1tPV97LuU6IDRMawE2NzpwM9pNz58HQ35IZXDnYL3VOLvNzYognPSeBIOSzQXRu5w96V0aY8y8A==} engines: {node: ^12.20.0 || >=14.13.1} + gtoken@8.0.0: + resolution: {integrity: sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==} + engines: {node: '>=18'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1147,6 +1204,9 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + jiti@2.7.0: resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true @@ -1305,6 +1365,9 @@ packages: long@5.3.2: resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@11.5.2: resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} engines: {node: 20 || >=22} @@ -1347,6 +1410,10 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -1478,6 +1545,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -1500,6 +1570,10 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + path-scurry@2.0.2: resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} engines: {node: 18 || 20 || >=22} @@ -1615,6 +1689,10 @@ packages: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + hasBin: true + rolldown@1.1.5: resolution: {integrity: sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==} engines: {node: ^20.19.0 || >=22.12.0} @@ -1685,6 +1763,10 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -1744,6 +1826,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} @@ -1751,6 +1837,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -1861,6 +1951,9 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-template@2.0.8: + resolution: {integrity: sha512-XdVKMF4SJ0nP/O7XIPB0JwAEuT9lDIYnNsK8yGVe43y0AWoKeJNdv3ZNWh7ksJ6KqQFjOO6ox/VEitLnaVNufw==} + util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} @@ -1995,6 +2088,10 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -2163,6 +2260,12 @@ snapshots: - supports-color - utf-8-validate + '@googleapis/gmail@17.0.0': + dependencies: + googleapis-common: 8.0.2 + transitivePeerDependencies: + - supports-color + '@grammyjs/runner@2.0.3(grammy@1.44.0)': dependencies: abort-controller: 3.0.0 @@ -2204,6 +2307,15 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.2.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/fs-minipass@4.0.1': dependencies: minipass: 7.1.3 @@ -2311,6 +2423,9 @@ snapshots: '@oxc-project/types@0.139.0': {} + '@pkgjs/parseargs@0.11.0': + optional: true + '@protobufjs/aspromise@1.1.2': {} '@protobufjs/base64@1.1.2': {} @@ -2588,10 +2703,14 @@ snapshots: ansi-regex@5.0.1: {} + ansi-regex@6.2.2: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 + ansi-styles@6.2.3: {} + argparse@2.0.1: {} asn1.js@5.4.1: @@ -2636,6 +2755,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.1.2: + dependencies: + balanced-match: 1.0.2 + brace-expansion@5.0.7: dependencies: balanced-match: 4.0.4 @@ -2782,6 +2905,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + eastasianwidth@0.2.0: {} + ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer: 5.2.1 @@ -2790,6 +2915,8 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + encodeurl@2.0.0: {} entities@4.5.0: {} @@ -3008,6 +3135,11 @@ snapshots: flatted@3.4.2: {} + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + formdata-polyfill@4.0.10: dependencies: fetch-blob: 3.2.0 @@ -3021,6 +3153,15 @@ snapshots: function-bind@1.1.2: {} + gaxios@7.1.3: + dependencies: + extend: 3.0.2 + https-proxy-agent: 7.0.6 + node-fetch: 3.3.2 + rimraf: 5.0.10 + transitivePeerDependencies: + - supports-color + gaxios@7.2.0: dependencies: extend: 3.0.2 @@ -3063,6 +3204,15 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@10.5.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.9 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + glob@13.0.6: dependencies: minimatch: 10.2.5 @@ -3071,6 +3221,18 @@ snapshots: globals@14.0.0: {} + google-auth-library@10.5.0: + dependencies: + base64-js: 1.5.1 + ecdsa-sig-formatter: 1.0.11 + gaxios: 7.2.0 + gcp-metadata: 8.1.2 + google-logging-utils: 1.1.3 + gtoken: 8.0.0 + jws: 4.0.1 + transitivePeerDependencies: + - supports-color + google-auth-library@10.9.0: dependencies: base64-js: 1.5.1 @@ -3084,6 +3246,17 @@ snapshots: google-logging-utils@1.1.3: {} + googleapis-common@8.0.2: + dependencies: + extend: 3.0.2 + gaxios: 7.1.3 + google-auth-library: 10.5.0 + google-logging-utils: 1.1.3 + qs: 6.15.3 + url-template: 2.0.8 + transitivePeerDependencies: + - supports-color + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -3098,6 +3271,13 @@ snapshots: - encoding - supports-color + gtoken@8.0.0: + dependencies: + gaxios: 7.2.0 + jws: 4.0.1 + transitivePeerDependencies: + - supports-color + has-flag@4.0.0: {} has-symbols@1.1.0: {} @@ -3181,6 +3361,12 @@ snapshots: isexe@2.0.0: {} + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + jiti@2.7.0: {} jose@6.2.3: {} @@ -3312,6 +3498,8 @@ snapshots: long@5.3.2: {} + lru-cache@10.4.3: {} + lru-cache@11.5.2: {} magic-string@0.30.21: @@ -3342,6 +3530,10 @@ snapshots: dependencies: brace-expansion: 1.1.16 + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.2 + minimist@1.2.8: {} minipass@7.1.3: {} @@ -3512,6 +3704,8 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} + pako@1.0.11: {} parent-module@1.0.1: @@ -3526,6 +3720,11 @@ snapshots: path-key@3.1.1: {} + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.3 + path-scurry@2.0.2: dependencies: lru-cache: 11.5.2 @@ -3634,6 +3833,10 @@ snapshots: retry@0.13.1: {} + rimraf@5.0.10: + dependencies: + glob: 10.5.0 + rolldown@1.1.5: dependencies: '@oxc-project/types': 0.139.0 @@ -3742,6 +3945,8 @@ snapshots: signal-exit@3.0.7: {} + signal-exit@4.1.0: {} + sisteransi@1.0.5: {} source-map-js@1.2.1: {} @@ -3794,6 +3999,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.2.0 + string_decoder@1.1.1: dependencies: safe-buffer: 5.1.2 @@ -3802,6 +4013,10 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-ansi@7.2.0: + dependencies: + ansi-regex: 6.2.2 + strip-json-comments@3.1.1: {} strtok3@10.3.5: @@ -3895,6 +4110,8 @@ snapshots: dependencies: punycode: 2.3.1 + url-template@2.0.8: {} + util-deprecate@1.0.2: {} vary@1.1.2: {} @@ -3985,6 +4202,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.3 + string-width: 5.1.2 + strip-ansi: 7.2.0 + wrappy@1.0.2: {} ws@8.21.0: {} diff --git a/src/gmail-client.test.ts b/src/gmail-client.test.ts new file mode 100644 index 0000000..4ef6513 --- /dev/null +++ b/src/gmail-client.test.ts @@ -0,0 +1,72 @@ +import { describe, expect, it, vi } from "vitest"; +import { GmailClient, type GmailApi } from "./gmail-client.js"; + +function createApi(overrides: Partial = {}): GmailApi { + return { + listMessages: vi.fn(async () => ({ messages: [] })), + getMessage: vi.fn(async () => ({ id: "message-1", threadId: "thread-1" })), + getThread: vi.fn(async () => ({ id: "thread-1", messages: [] })), + markMessageRead: vi.fn(async () => undefined), + sendMessage: vi.fn(async () => ({ id: "sent-1", threadId: "thread-1" })), + ...overrides, + }; +} + +describe("GmailClient", () => { + it("lists only validated Gmail message identifiers", async () => { + const client = new GmailClient( + createApi({ + listMessages: vi.fn(async () => ({ + messages: [ + { id: "message-1", threadId: "thread-1" }, + { id: "message-2", threadId: "thread-2" }, + ], + })), + }), + ); + + await expect(client.listUnreadMessageIds()).resolves.toEqual([ + "message-1", + "message-2", + ]); + }); + + it("rejects malformed message list responses", async () => { + const client = new GmailClient( + createApi({ + listMessages: vi.fn(async () => ({ + messages: [{ threadId: "thread-1" }], + })), + }), + ); + + await expect(client.listUnreadMessageIds()).rejects.toThrow( + "Gmail list response", + ); + }); + + it("marks one successfully handled message read", async () => { + const api = createApi(); + const client = new GmailClient(api); + + await client.markMessageRead("message-1"); + + expect(api.markMessageRead).toHaveBeenCalledWith("message-1"); + }); + + it("returns canonical IDs from a sent message", async () => { + const api = createApi(); + const client = new GmailClient(api); + + await expect(client.sendRawMessage("encoded", "thread-1")).resolves.toEqual( + { + messageId: "sent-1", + threadId: "thread-1", + }, + ); + expect(api.sendMessage).toHaveBeenCalledWith({ + raw: "encoded", + threadId: "thread-1", + }); + }); +}); diff --git a/src/gmail-client.ts b/src/gmail-client.ts new file mode 100644 index 0000000..2e73df1 --- /dev/null +++ b/src/gmail-client.ts @@ -0,0 +1,153 @@ +import { auth, gmail } from "@googleapis/gmail"; +import { z } from "zod"; +import type { ResolvedGmailAccount } from "./accounts.js"; +import { GmailApiMessageSchema, type GmailApiMessage } from "./message.js"; + +const MessageListSchema = z.object({ + messages: z + .array(z.object({ id: z.string().min(1), threadId: z.string().min(1) })) + .optional() + .default([]), +}); + +const GmailThreadSchema = z.object({ + id: z.string().min(1), + messages: z.array(GmailApiMessageSchema).optional().default([]), +}); + +const SentMessageSchema = z.object({ + id: z.string().min(1), + threadId: z.string().min(1), +}); + +export type GmailApi = { + listMessages: () => Promise; + getMessage: (messageId: string) => Promise; + getThread: (threadId: string) => Promise; + markMessageRead: (messageId: string) => Promise; + sendMessage: (input: { raw: string; threadId?: string }) => Promise; +}; + +export type GmailThread = z.infer; + +/** Validated Gmail operations used by polling, inbound parsing, and outbound delivery. */ +export class GmailClient { + readonly #api: GmailApi; + + public constructor(api: GmailApi) { + this.#api = api; + } + + /** Lists unread inbox message IDs after validating the Gmail response. */ + public async listUnreadMessageIds(): Promise { + const result = MessageListSchema.safeParse(await this.#api.listMessages()); + if (!result.success) { + throw new Error("Invalid Gmail list response", { cause: result.error }); + } + return result.data.messages.map((message) => message.id); + } + + /** Fetches and validates one full Gmail message. */ + public async getMessage(messageId: string): Promise { + const result = GmailApiMessageSchema.safeParse( + await this.#api.getMessage(messageId), + ); + if (!result.success) { + throw new Error("Invalid Gmail message response", { + cause: result.error, + }); + } + return result.data; + } + + /** Fetches and validates every message in one Gmail thread. */ + public async getThread(threadId: string): Promise { + const result = GmailThreadSchema.safeParse( + await this.#api.getThread(threadId), + ); + if (!result.success) { + throw new Error("Invalid Gmail thread response", { cause: result.error }); + } + return result.data; + } + + /** Removes the unread label after the channel has handled a message. */ + public async markMessageRead(messageId: string): Promise { + await this.#api.markMessageRead(messageId); + } + + /** Sends one encoded message and returns Gmail's canonical message and thread IDs. */ + public async sendRawMessage( + raw: string, + threadId?: string, + ): Promise<{ messageId: string; threadId: string }> { + const input = { raw, ...(threadId ? { threadId } : {}) }; + const result = SentMessageSchema.safeParse( + await this.#api.sendMessage(input), + ); + if (!result.success) { + throw new Error("Invalid Gmail send response", { cause: result.error }); + } + return { messageId: result.data.id, threadId: result.data.threadId }; + } +} + +/** Creates the HTTPS Gmail API adapter for one resolved OAuth account. */ +export function createGoogleGmailApi(account: ResolvedGmailAccount): GmailApi { + if (!account.configured) { + throw new Error( + `Gmail account "${account.accountId}" is not fully configured`, + ); + } + const oauth = new auth.OAuth2(account.clientId, account.clientSecret); + oauth.setCredentials({ refresh_token: account.refreshToken }); + const service = gmail({ version: "v1", auth: oauth }); + return { + async listMessages() { + const response = await service.users.messages.list({ + userId: "me", + q: "in:inbox is:unread", + maxResults: 20, + }); + return response.data; + }, + async getMessage(messageId) { + const response = await service.users.messages.get({ + userId: "me", + id: messageId, + format: "full", + }); + return response.data; + }, + async getThread(threadId) { + const response = await service.users.threads.get({ + userId: "me", + id: threadId, + format: "full", + }); + return response.data; + }, + async markMessageRead(messageId) { + await service.users.messages.modify({ + userId: "me", + id: messageId, + requestBody: { removeLabelIds: ["UNREAD"] }, + }); + }, + async sendMessage(input) { + const response = await service.users.messages.send({ + userId: "me", + requestBody: { + raw: input.raw, + ...(input.threadId ? { threadId: input.threadId } : {}), + }, + }); + return response.data; + }, + }; +} + +/** Creates the validated Gmail client used by channel runtime code. */ +export function createGmailClient(account: ResolvedGmailAccount): GmailClient { + return new GmailClient(createGoogleGmailApi(account)); +} diff --git a/src/message.test.ts b/src/message.test.ts new file mode 100644 index 0000000..3aefe8d --- /dev/null +++ b/src/message.test.ts @@ -0,0 +1,113 @@ +import { Buffer } from "node:buffer"; +import { describe, expect, it } from "vitest"; +import { buildRawEmail, parseGmailMessage } from "./message.js"; + +function encodeBody(value: string): string { + return Buffer.from(value, "utf8").toString("base64url"); +} + +describe("parseGmailMessage", () => { + it("extracts bounded plain text and normalized headers", () => { + const message = parseGmailMessage({ + id: "message-1", + threadId: "thread-1", + internalDate: "1720000000000", + payload: { + mimeType: "multipart/alternative", + headers: [ + { name: "From", value: "Person " }, + { name: "Subject", value: "Question" }, + { name: "Message-ID", value: "" }, + { name: "References", value: "" }, + ], + parts: [ + { + mimeType: "text/html", + body: { data: encodeBody("

HTML body

") }, + }, + { mimeType: "text/plain", body: { data: encodeBody("Plain body") } }, + ], + }, + }); + + expect(message).toMatchObject({ + id: "message-1", + threadId: "thread-1", + senderEmail: "person@example.com", + senderName: "Person", + subject: "Question", + messageIdHeader: "", + references: "", + text: "Plain body", + timestampMs: 1720000000000, + }); + }); + + it("strips executable and markup content from HTML fallback", () => { + const message = parseGmailMessage({ + id: "message-2", + threadId: "thread-2", + payload: { + headers: [{ name: "From", value: "person@example.com" }], + mimeType: "text/html", + body: { + data: encodeBody( + "

Hello & welcome

", + ), + }, + }, + }); + + expect(message.text).toBe("Hello & welcome"); + }); + + it("rejects decoded bodies above the configured boundary", () => { + expect(() => + parseGmailMessage( + { + id: "message-3", + threadId: "thread-3", + payload: { + headers: [{ name: "From", value: "person@example.com" }], + mimeType: "text/plain", + body: { data: encodeBody("x".repeat(20)) }, + }, + }, + 10, + ), + ).toThrow("body exceeds"); + }); +}); + +describe("buildRawEmail", () => { + it("builds a base64url RFC message with Gmail thread reply headers", () => { + const raw = buildRawEmail({ + from: "agent@example.com", + to: "person@example.com", + subject: "Re: Question", + text: "Answer", + inReplyTo: "", + references: " ", + }); + const decoded = Buffer.from(raw, "base64url").toString("utf8"); + + expect(decoded).toContain("From: agent@example.com\r\n"); + expect(decoded).toContain("To: person@example.com\r\n"); + expect(decoded).toContain("In-Reply-To: \r\n"); + expect(decoded).toContain( + "References: \r\n", + ); + expect(decoded.endsWith("\r\n\r\nAnswer")).toBe(true); + }); + + it("rejects newline injection in headers", () => { + expect(() => + buildRawEmail({ + from: "agent@example.com", + to: "person@example.com\r\nBcc: attacker@example.com", + subject: "Question", + text: "Body", + }), + ).toThrow("header"); + }); +}); diff --git a/src/message.ts b/src/message.ts new file mode 100644 index 0000000..e4c9b9a --- /dev/null +++ b/src/message.ts @@ -0,0 +1,247 @@ +import { Buffer } from "node:buffer"; +import { z } from "zod"; +import { normalizeEmailAddress } from "./target.js"; + +export const DEFAULT_MAX_MESSAGE_BODY_BYTES = 128 * 1024; +const MAX_HEADER_LENGTH = 32 * 1024; +const MAX_PARTS = 100; +const MAX_PART_DEPTH = 10; + +const GmailHeaderSchema = z.object({ + name: z.string().max(256), + value: z.string().max(MAX_HEADER_LENGTH), +}); + +const GmailBodySchema = z.object({ + data: z.string().optional(), + attachmentId: z.string().optional(), + size: z.number().int().nonnegative().optional(), +}); + +export type GmailMessagePart = { + mimeType?: string | null | undefined; + filename?: string | null | undefined; + headers?: Array> | null | undefined; + body?: z.infer | null | undefined; + parts?: GmailMessagePart[] | null | undefined; +}; + +const GmailMessagePartSchema: z.ZodType = z.lazy(() => + z.object({ + mimeType: z.string().optional().nullable(), + filename: z.string().optional().nullable(), + headers: z.array(GmailHeaderSchema).optional().nullable(), + body: GmailBodySchema.optional().nullable(), + parts: z.array(GmailMessagePartSchema).optional().nullable(), + }), +); + +export const GmailApiMessageSchema = z.object({ + id: z.string().min(1), + threadId: z.string().min(1), + labelIds: z.array(z.string()).optional().nullable(), + internalDate: z.string().regex(/^\d+$/u).optional().nullable(), + payload: GmailMessagePartSchema.optional().nullable(), +}); + +export type GmailApiMessage = z.infer; + +export type ParsedGmailMessage = { + id: string; + threadId: string; + senderEmail: string; + senderName?: string; + subject: string; + messageIdHeader?: string; + references?: string; + text: string; + timestampMs?: number; +}; + +type BodyCandidates = { plain?: string; html?: string }; + +function findBodyCandidates(part: GmailMessagePart): BodyCandidates { + const candidates: BodyCandidates = {}; + let visited = 0; + + function visit(current: GmailMessagePart, depth: number): void { + visited += 1; + if (visited > MAX_PARTS || depth > MAX_PART_DEPTH) { + throw new Error("Gmail MIME structure exceeds supported limits"); + } + if ( + current.body?.data && + current.mimeType === "text/plain" && + !candidates.plain + ) { + candidates.plain = current.body.data; + } + if ( + current.body?.data && + current.mimeType === "text/html" && + !candidates.html + ) { + candidates.html = current.body.data; + } + for (const child of current.parts ?? []) { + visit(child, depth + 1); + } + } + + visit(part, 0); + return candidates; +} + +function decodeBody(data: string, maxBytes: number): string { + if (data.length > Math.ceil((maxBytes * 4) / 3) + 4) { + throw new Error(`Gmail message body exceeds ${maxBytes} bytes`); + } + const decoded = Buffer.from(data, "base64url"); + if (decoded.byteLength > maxBytes) { + throw new Error(`Gmail message body exceeds ${maxBytes} bytes`); + } + return decoded.toString("utf8"); +} + +function htmlToText(html: string): string { + return html + .replace(/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/giu, " ") + .replace(//gu, " ") + .replace(//giu, "\n") + .replace(/<\/p\s*>/giu, "\n") + .replace(/<[^>]+>/gu, " ") + .replace(/ /giu, " ") + .replace(/&/giu, "&") + .replace(/</giu, "<") + .replace(/>/giu, ">") + .replace(/"/giu, '"') + .replace(/'/giu, "'") + .replace(/[ \t]+/gu, " ") + .replace(/ *\n */gu, "\n") + .trim(); +} + +function getHeader(part: GmailMessagePart, name: string): string | undefined { + return part.headers?.find( + (header) => header.name.toLowerCase() === name.toLowerCase(), + )?.value; +} + +function parseSender(value: string | undefined): { + email: string; + name?: string; +} { + if (!value) { + throw new Error("Gmail message is missing a From header"); + } + const bracketed = /^(.*?)<([^<>]+)>$/u.exec(value.trim()); + const email = normalizeEmailAddress(bracketed?.[2] ?? value); + if (!email) { + throw new Error("Gmail message has an invalid From header"); + } + const name = bracketed?.[1]?.trim().replace(/^"|"$/gu, ""); + return { email, ...(name ? { name } : {}) }; +} + +/** Validates and converts one Gmail API message into bounded text for OpenClaw. */ +export function parseGmailMessage( + input: unknown, + maxBodyBytes = DEFAULT_MAX_MESSAGE_BODY_BYTES, +): ParsedGmailMessage { + const message = GmailApiMessageSchema.parse(input); + if (!message.payload) { + throw new Error("Gmail message has no MIME payload"); + } + + // Prefer the sender's plain-text alternative. HTML is treated only as text. + const bodies = findBodyCandidates(message.payload); + const bodyData = bodies.plain ?? bodies.html; + if (!bodyData) { + throw new Error("Gmail message has no supported text body"); + } + const decoded = decodeBody(bodyData, maxBodyBytes); + const sender = parseSender(getHeader(message.payload, "From")); + const timestampMs = message.internalDate + ? Number(message.internalDate) + : undefined; + const messageIdHeader = getHeader(message.payload, "Message-ID"); + const references = getHeader(message.payload, "References"); + return { + id: message.id, + threadId: message.threadId, + senderEmail: sender.email, + ...(sender.name ? { senderName: sender.name } : {}), + subject: getHeader(message.payload, "Subject")?.trim() ?? "", + ...(messageIdHeader ? { messageIdHeader } : {}), + ...(references ? { references } : {}), + text: bodies.plain ? decoded.trim() : htmlToText(decoded), + ...(timestampMs !== undefined ? { timestampMs } : {}), + }; +} + +function requireSafeHeader( + name: string, + value: string, + maxLength = 998, +): string { + const trimmed = value.trim(); + if (!trimmed || trimmed.length > maxLength || /[\r\n]/u.test(trimmed)) { + throw new Error(`Invalid ${name} email header`); + } + return trimmed; +} + +function encodeSubject(subject: string): string { + const safe = requireSafeHeader("Subject", subject); + return /^[\x20-\x7e]+$/u.test(safe) + ? safe + : `=?UTF-8?B?${Buffer.from(safe, "utf8").toString("base64")}?=`; +} + +function normalizeCrLf(value: string): string { + return value.replace(/\r?\n/gu, "\n").replace(/\n/gu, "\r\n"); +} + +export type RawEmailInput = { + from: string; + to: string; + subject: string; + text: string; + inReplyTo?: string; + references?: string; +}; + +/** Builds the base64url RFC 2822 payload required by Gmail messages.send. */ +export function buildRawEmail(input: RawEmailInput): string { + const from = normalizeEmailAddress(requireSafeHeader("From", input.from)); + const to = normalizeEmailAddress(requireSafeHeader("To", input.to)); + if (!from || !to) { + throw new Error("Invalid From or To email header"); + } + if (Buffer.byteLength(input.text, "utf8") > DEFAULT_MAX_MESSAGE_BODY_BYTES) { + throw new Error( + `Outbound email body exceeds ${DEFAULT_MAX_MESSAGE_BODY_BYTES} bytes`, + ); + } + + const headers = [ + `From: ${from}`, + `To: ${to}`, + `Subject: ${encodeSubject(input.subject)}`, + "MIME-Version: 1.0", + 'Content-Type: text/plain; charset="UTF-8"', + "Content-Transfer-Encoding: 8bit", + ]; + if (input.inReplyTo) { + headers.push( + `In-Reply-To: ${requireSafeHeader("In-Reply-To", input.inReplyTo)}`, + ); + } + if (input.references) { + headers.push( + `References: ${requireSafeHeader("References", input.references, MAX_HEADER_LENGTH)}`, + ); + } + const raw = `${headers.join("\r\n")}\r\n\r\n${normalizeCrLf(input.text)}`; + return Buffer.from(raw, "utf8").toString("base64url"); +} From 909a744ae5a6bc457d526fff86c5496e22cda818 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 07:03:11 -0700 Subject: [PATCH 08/14] gmail-883.4: route Gmail threads through OpenClaw --- .pebbles/events.jsonl | 2 + index.ts | 2 + src/channel.test.ts | 32 ++++++++++ src/channel.ts | 105 +++++++++++++++++++++++++++++++++ src/gateway.test.ts | 84 ++++++++++++++++++++++++++ src/gateway.ts | 98 +++++++++++++++++++++++++++++++ src/inbound.test.ts | 133 ++++++++++++++++++++++++++++++++++++++++++ src/inbound.ts | 120 +++++++++++++++++++++++++++++++++++++ src/outbound.test.ts | 91 +++++++++++++++++++++++++++++ src/outbound.ts | 92 +++++++++++++++++++++++++++++ src/runtime.ts | 12 ++++ 11 files changed, 771 insertions(+) create mode 100644 src/gateway.test.ts create mode 100644 src/gateway.ts create mode 100644 src/inbound.test.ts create mode 100644 src/inbound.ts create mode 100644 src/outbound.test.ts create mode 100644 src/outbound.ts create mode 100644 src/runtime.ts diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 812f236..c39f80b 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -29,3 +29,5 @@ {"type":"close","timestamp":"2026-07-12T13:53:20.356718Z","issue_id":"gmail-883.2","payload":{}} {"type":"status_update","timestamp":"2026-07-12T13:57:05.108169Z","issue_id":"gmail-883.3","payload":{"status":"in_progress"}} {"type":"close","timestamp":"2026-07-12T13:57:05.134847Z","issue_id":"gmail-883.3","payload":{}} +{"type":"status_update","timestamp":"2026-07-12T14:03:11.788559Z","issue_id":"gmail-883.4","payload":{"status":"in_progress"}} +{"type":"close","timestamp":"2026-07-12T14:03:11.817066Z","issue_id":"gmail-883.4","payload":{}} diff --git a/index.ts b/index.ts index e7b2af0..5ad983f 100644 --- a/index.ts +++ b/index.ts @@ -1,9 +1,11 @@ import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core"; import { gmailPlugin } from "./src/channel.js"; +import { setGmailRuntime } from "./src/runtime.js"; export default defineChannelPluginEntry({ id: "gmail", name: "Gmail", description: "OpenClaw communication channel backed by Gmail threads", plugin: gmailPlugin, + setRuntime: setGmailRuntime, }); diff --git a/src/channel.test.ts b/src/channel.test.ts index d3bc0e0..fecbde8 100644 --- a/src/channel.test.ts +++ b/src/channel.test.ts @@ -28,4 +28,36 @@ describe("gmailPlugin config", () => { email: "agent@example.com", }); }); + + it("builds one outbound session route per Gmail thread", () => { + const resolveRoute = gmailPlugin.messaging?.resolveOutboundSessionRoute; + expect(resolveRoute).toBeTypeOf("function"); + const params = { + cfg: {} as never, + agentId: "main", + accountId: "work", + target: "thread:thread-1", + }; + const first = resolveRoute?.(params); + const same = resolveRoute?.(params); + const different = resolveRoute?.({ ...params, target: "thread:thread-2" }); + + expect(first).toMatchObject({ + threadId: "thread-1", + recipientSessionExact: true, + }); + expect(same).toEqual(first); + expect(different).not.toMatchObject({ + sessionKey: (first as { sessionKey: string }).sessionKey, + }); + }); + + it("exposes gateway and durable text message adapters", () => { + expect(gmailPlugin.gateway?.startAccount).toBeTypeOf("function"); + expect(gmailPlugin.message?.durableFinal?.capabilities).toMatchObject({ + text: true, + replyTo: true, + thread: true, + }); + }); }); diff --git a/src/channel.ts b/src/channel.ts index 5e3bd54..1a595e4 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -1,8 +1,13 @@ import { + buildChannelOutboundSessionRoute, createChatChannelPlugin, type ChannelPlugin, } from "openclaw/plugin-sdk/channel-core"; import { getChatChannelMeta } from "openclaw/plugin-sdk/channel-plugin-common"; +import { + createMessageReceiptFromOutboundResults, + defineChannelMessageAdapter, +} from "openclaw/plugin-sdk/channel-outbound"; import { listGmailAccountIds, resolveDefaultGmailAccountId, @@ -11,10 +16,50 @@ import { type ResolvedGmailAccount, } from "./accounts.js"; import { gmailConfigSchema } from "./config.js"; +import { startGmailGatewayAccount } from "./gateway.js"; +import { createGmailClient } from "./gmail-client.js"; +import { sendGmailText } from "./outbound.js"; +import { getGmailRuntime } from "./runtime.js"; import { normalizeGmailTarget, parseGmailTarget } from "./target.js"; export const GMAIL_CHANNEL_ID = "gmail" as const; +const gmailMessageAdapter = defineChannelMessageAdapter({ + id: GMAIL_CHANNEL_ID, + durableFinal: { + capabilities: { + text: true, + replyTo: true, + thread: true, + messageSendingHooks: true, + }, + }, + send: { + text: async (ctx) => { + const account = resolveGmailAccount({ + cfg: ctx.cfg as GmailCoreConfig, + ...(ctx.accountId !== undefined ? { accountId: ctx.accountId } : {}), + }); + const result = await sendGmailText({ + account, + client: createGmailClient(account), + target: ctx.to, + text: ctx.text, + }); + const replyToId = ctx.replyToId ?? undefined; + return { + messageId: result.messageId, + receipt: createMessageReceiptFromOutboundResults({ + results: [{ channel: GMAIL_CHANNEL_ID, messageId: result.messageId }], + threadId: result.threadId, + ...(replyToId ? { replyToId } : {}), + kind: "text", + }), + }; + }, + }, +}); + /** Gmail channel contract used by OpenClaw during discovery and setup. */ export const gmailPlugin: ChannelPlugin = createChatChannelPlugin({ @@ -51,6 +96,11 @@ export const gmailPlugin: ChannelPlugin = configured: account.configured, }), }, + gateway: { + startAccount: async (ctx) => + await startGmailGatewayAccount(ctx, getGmailRuntime()), + }, + message: gmailMessageAdapter, messaging: { targetPrefixes: ["gmail"], normalizeTarget: (value) => normalizeGmailTarget(value) ?? undefined, @@ -59,6 +109,61 @@ export const gmailPlugin: ChannelPlugin = looksLikeId: (value) => parseGmailTarget(value) !== null, hint: "", }, + resolveOutboundSessionRoute: ({ cfg, agentId, accountId, target }) => { + const parsed = parseGmailTarget(target); + if (!parsed) { + return null; + } + const normalized = normalizeGmailTarget(target); + if (!normalized) { + return null; + } + return buildChannelOutboundSessionRoute({ + cfg, + agentId, + channel: GMAIL_CHANNEL_ID, + ...(accountId !== undefined ? { accountId } : {}), + recipientSessionExact: + parsed.kind === "thread" ? true : "delivery-identity", + peer: { kind: "channel", id: normalized }, + chatType: "channel", + from: `gmail:${accountId ?? "default"}`, + to: normalized, + ...(parsed.kind === "thread" ? { threadId: parsed.threadId } : {}), + }); + }, + resolveSessionConversation: ({ rawId }) => { + const parsed = parseGmailTarget(rawId); + if (!parsed || parsed.kind === "email") { + return null; + } + const id = `thread:${parsed.threadId}`; + return { + id, + threadId: parsed.threadId, + baseConversationId: id, + parentConversationCandidates: [id], + }; + }, + }, + }, + outbound: { + base: { deliveryMode: "direct" }, + attachedResults: { + channel: GMAIL_CHANNEL_ID, + sendText: async ({ cfg, to, text, accountId }) => { + const account = resolveGmailAccount({ + cfg: cfg as GmailCoreConfig, + ...(accountId !== undefined ? { accountId } : {}), + }); + const result = await sendGmailText({ + account, + client: createGmailClient(account), + target: to, + text, + }); + return { messageId: result.messageId }; + }, }, }, }); diff --git a/src/gateway.test.ts b/src/gateway.test.ts new file mode 100644 index 0000000..b6084a1 --- /dev/null +++ b/src/gateway.test.ts @@ -0,0 +1,84 @@ +import { Buffer } from "node:buffer"; +import { describe, expect, it, vi } from "vitest"; +import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; +import type { GmailCoreConfig, ResolvedGmailAccount } from "./accounts.js"; +import { GmailClient, type GmailApi } from "./gmail-client.js"; +import { pollGmailOnce } from "./gateway.js"; + +const account: ResolvedGmailAccount = { + accountId: "work", + enabled: true, + configured: true, + email: "agent@example.com", + clientId: "client-id", + clientSecret: "client-secret", + refreshToken: "refresh-token", + allowFrom: ["person@example.com"], + allowTo: ["person@example.com"], + pollIntervalSeconds: 30, +}; + +function message() { + return { + id: "message-1", + threadId: "thread-1", + payload: { + mimeType: "text/plain", + headers: [{ name: "From", value: "person@example.com" }], + body: { data: Buffer.from("Question").toString("base64url") }, + }, + }; +} + +function createClient(): { + client: GmailClient; + markMessageRead: ReturnType; +} { + const markMessageRead = vi.fn(async () => undefined); + const api: GmailApi = { + listMessages: vi.fn(async () => ({ + messages: [{ id: "message-1", threadId: "thread-1" }], + })), + getMessage: vi.fn(async () => message()), + getThread: vi.fn(), + markMessageRead, + sendMessage: vi.fn(), + }; + return { client: new GmailClient(api), markMessageRead }; +} + +describe("pollGmailOnce", () => { + it("marks a source message read only after dispatch succeeds", async () => { + const { client, markMessageRead } = createClient(); + const dispatch = vi.fn(async () => "dispatched" as const); + + await pollGmailOnce({ + account, + cfg: {} as GmailCoreConfig, + client, + runtime: {} as PluginRuntime, + dispatch, + }); + + expect(dispatch).toHaveBeenCalledOnce(); + expect(markMessageRead).toHaveBeenCalledWith("message-1"); + }); + + it("leaves a message unread when dispatch fails", async () => { + const { client, markMessageRead } = createClient(); + const dispatch = vi.fn(async () => { + throw new Error("dispatch failed"); + }); + + await expect( + pollGmailOnce({ + account, + cfg: {} as GmailCoreConfig, + client, + runtime: {} as PluginRuntime, + dispatch, + }), + ).rejects.toThrow("dispatch failed"); + expect(markMessageRead).not.toHaveBeenCalled(); + }); +}); diff --git a/src/gateway.ts b/src/gateway.ts new file mode 100644 index 0000000..9bc04ed --- /dev/null +++ b/src/gateway.ts @@ -0,0 +1,98 @@ +import type { ChannelGatewayContext } from "openclaw/plugin-sdk/channel-contract"; +import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; +import { + resolveGmailAccount, + type GmailCoreConfig, + type ResolvedGmailAccount, +} from "./accounts.js"; +import { createGmailClient, type GmailClient } from "./gmail-client.js"; +import { handleGmailInbound, type GmailInboundDisposition } from "./inbound.js"; + +const activeMessages = new Set(); + +type GmailInboundDispatch = typeof handleGmailInbound; + +/** Polls and processes one bounded page of unread Gmail messages. */ +export async function pollGmailOnce(params: { + account: ResolvedGmailAccount; + cfg: GmailCoreConfig; + client: GmailClient; + runtime: PluginRuntime; + dispatch?: GmailInboundDispatch; +}): Promise { + const dispatch = params.dispatch ?? handleGmailInbound; + for (const messageId of await params.client.listUnreadMessageIds()) { + const key = `${params.account.accountId}:${messageId}`; + if (activeMessages.has(key)) { + continue; + } + activeMessages.add(key); + try { + const message = await params.client.getMessage(messageId); + await dispatch({ + account: params.account, + cfg: params.cfg, + message, + runtime: params.runtime, + }); + await params.client.markMessageRead(messageId); + } finally { + activeMessages.delete(key); + } + } +} + +function waitForNextPoll( + abortSignal: AbortSignal, + intervalMs: number, +): Promise { + return new Promise((resolve) => { + const timer = setTimeout(finish, intervalMs); + function finish() { + clearTimeout(timer); + abortSignal.removeEventListener("abort", finish); + resolve(); + } + abortSignal.addEventListener("abort", finish, { once: true }); + }); +} + +/** Runs one Gmail account until OpenClaw aborts the channel gateway lifecycle. */ +export async function startGmailGatewayAccount( + ctx: ChannelGatewayContext, + runtime: PluginRuntime, +): Promise { + const account = resolveGmailAccount({ + cfg: ctx.cfg as GmailCoreConfig, + accountId: ctx.accountId, + }); + if (!account.configured) { + throw new Error( + `Gmail account "${account.accountId}" is not fully configured`, + ); + } + const client = createGmailClient(account); + ctx.setStatus({ + accountId: account.accountId, + running: true, + configured: true, + }); + try { + while (!ctx.abortSignal.aborted) { + await pollGmailOnce({ + account, + cfg: ctx.cfg as GmailCoreConfig, + client, + runtime, + }); + await waitForNextPoll( + ctx.abortSignal, + account.pollIntervalSeconds * 1_000, + ); + } + } finally { + ctx.setStatus({ accountId: account.accountId, running: false }); + } +} + +export type { GmailInboundDisposition }; diff --git a/src/inbound.test.ts b/src/inbound.test.ts new file mode 100644 index 0000000..fe30f83 --- /dev/null +++ b/src/inbound.test.ts @@ -0,0 +1,133 @@ +import { Buffer } from "node:buffer"; +import { describe, expect, it, vi } from "vitest"; +import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; +import type { GmailCoreConfig, ResolvedGmailAccount } from "./accounts.js"; +import { handleGmailInbound } from "./inbound.js"; + +const account: ResolvedGmailAccount = { + accountId: "work", + enabled: true, + configured: true, + email: "agent@example.com", + clientId: "client-id", + clientSecret: "client-secret", + refreshToken: "refresh-token", + allowFrom: ["person@example.com"], + allowTo: ["person@example.com"], + pollIntervalSeconds: 30, +}; + +const cfg = { + channels: { gmail: { accounts: {} } }, +} as unknown as GmailCoreConfig; + +function gmailMessage(id: string, threadId: string, from: string) { + return { + id, + threadId, + payload: { + mimeType: "text/plain", + headers: [ + { name: "From", value: from }, + { name: "Subject", value: "Question" }, + ], + body: { data: Buffer.from("Question body").toString("base64url") }, + }, + }; +} + +function createRuntime() { + const dispatchReply = vi.fn(async (params: unknown) => { + void params; + return { kind: "dispatched" }; + }); + const runtime = { + channel: { + routing: { + resolveAgentRoute: ({ peer }: { peer: { id: string } }) => ({ + accountId: "work", + agentId: "main", + sessionKey: `agent:main:gmail:channel:${peer.id}`, + }), + }, + session: { + resolveStorePath: () => "/tmp/gmail-session-store.json", + recordInboundSession: vi.fn(), + }, + inbound: { + buildContext: (facts: { + route: { routeSessionKey: string }; + message: { rawBody: string }; + }) => ({ + Body: facts.message.rawBody, + BodyForAgent: facts.message.rawBody, + BodyForCommands: facts.message.rawBody, + ChatType: "channel", + CommandAuthorized: false, + CommandBody: facts.message.rawBody, + From: "gmail", + RawBody: facts.message.rawBody, + SessionKey: facts.route.routeSessionKey, + To: "gmail", + InboundEventKind: "message", + }), + dispatchReply, + }, + reply: { dispatchReplyWithBufferedBlockDispatcher: vi.fn() }, + }, + } as unknown as PluginRuntime; + return { runtime, dispatchReply }; +} + +describe("handleGmailInbound", () => { + it("routes every message in one Gmail thread to one session", async () => { + const { runtime, dispatchReply } = createRuntime(); + + await handleGmailInbound({ + account, + cfg, + message: gmailMessage("message-1", "thread-1", "person@example.com"), + runtime, + }); + await handleGmailInbound({ + account, + cfg, + message: gmailMessage("message-2", "thread-1", "person@example.com"), + runtime, + }); + await handleGmailInbound({ + account, + cfg, + message: gmailMessage("message-3", "thread-2", "person@example.com"), + runtime, + }); + + const keys = dispatchReply.mock.calls.map( + (call) => (call[0] as { routeSessionKey: string }).routeSessionKey, + ); + expect(keys[0]).toBe(keys[1]); + expect(keys[2]).not.toBe(keys[0]); + }); + + it("does not dispatch self-authored or denied messages", async () => { + const { runtime, dispatchReply } = createRuntime(); + + await expect( + handleGmailInbound({ + account, + cfg, + message: gmailMessage("message-1", "thread-1", "agent@example.com"), + runtime, + }), + ).resolves.toBe("ignored"); + await expect( + handleGmailInbound({ + account, + cfg, + message: gmailMessage("message-2", "thread-2", "outside@example.net"), + runtime, + }), + ).resolves.toBe("ignored"); + expect(dispatchReply).not.toHaveBeenCalled(); + }); +}); diff --git a/src/inbound.ts b/src/inbound.ts new file mode 100644 index 0000000..b34526a --- /dev/null +++ b/src/inbound.ts @@ -0,0 +1,120 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; +import type { GmailCoreConfig, ResolvedGmailAccount } from "./accounts.js"; +import type { GmailApiMessage } from "./message.js"; +import { parseGmailMessage } from "./message.js"; +import { isAddressAllowed } from "./policy.js"; +import { buildGmailThreadTarget } from "./target.js"; + +export type GmailInboundDisposition = "dispatched" | "ignored"; + +/** Admits and dispatches one validated Gmail message through OpenClaw. */ +export async function handleGmailInbound(params: { + account: ResolvedGmailAccount; + cfg: GmailCoreConfig; + message: GmailApiMessage; + runtime: PluginRuntime; +}): Promise { + const message = parseGmailMessage(params.message); + if ( + message.senderEmail === params.account.email || + !isAddressAllowed(message.senderEmail, params.account.allowFrom) + ) { + return "ignored"; + } + + // A Gmail thread is a channel peer so DM scope cannot merge distinct threads. + const target = buildGmailThreadTarget(message.threadId); + const cfg = params.cfg as OpenClawConfig; + const route = params.runtime.channel.routing.resolveAgentRoute({ + cfg, + channel: "gmail", + accountId: params.account.accountId, + peer: { kind: "channel", id: target }, + }); + const storePath = params.runtime.channel.session.resolveStorePath( + cfg.session?.store, + { + agentId: route.agentId, + }, + ); + const ctxPayload = params.runtime.channel.inbound.buildContext({ + channel: "gmail", + accountId: params.account.accountId, + provider: "gmail", + surface: "gmail", + messageId: message.id, + ...(message.timestampMs !== undefined + ? { timestamp: message.timestampMs } + : {}), + from: `gmail:${message.senderEmail}`, + sender: { + id: message.senderEmail, + ...(message.senderName ? { name: message.senderName } : {}), + displayLabel: message.senderName ?? message.senderEmail, + }, + conversation: { + kind: "channel", + id: target, + label: message.subject || `Gmail thread ${message.threadId}`, + threadId: message.threadId, + nativeChannelId: message.threadId, + routePeer: { kind: "channel", id: target }, + }, + route: { + agentId: route.agentId, + accountId: route.accountId ?? params.account.accountId, + routeSessionKey: route.sessionKey, + }, + reply: { + to: target, + originatingTo: target, + nativeChannelId: message.threadId, + replyTarget: target, + deliveryTarget: target, + replyToId: message.id, + messageThreadId: message.threadId, + sourceReplyDeliveryMode: "thread", + }, + message: { + inboundEventKind: "user_request", + body: message.text, + rawBody: message.text, + bodyForAgent: message.text, + commandBody: message.text, + senderLabel: message.senderName ?? message.senderEmail, + }, + }); + + await params.runtime.channel.inbound.dispatchReply({ + cfg, + channel: "gmail", + accountId: params.account.accountId, + agentId: route.agentId, + routeSessionKey: route.sessionKey, + storePath, + ctxPayload, + recordInboundSession: params.runtime.channel.session.recordInboundSession, + dispatchReplyWithBufferedBlockDispatcher: + params.runtime.channel.reply.dispatchReplyWithBufferedBlockDispatcher, + delivery: { + durable: { + to: target, + threadId: message.threadId, + replyToId: message.id, + }, + deliver: async () => { + throw new Error( + "Gmail durable message adapter did not handle the reply", + ); + }, + }, + replyPipeline: {}, + record: { + onRecordError(error) { + throw error instanceof Error ? error : new Error(String(error)); + }, + }, + }); + return "dispatched"; +} diff --git a/src/outbound.test.ts b/src/outbound.test.ts new file mode 100644 index 0000000..0c9a1e3 --- /dev/null +++ b/src/outbound.test.ts @@ -0,0 +1,91 @@ +import { Buffer } from "node:buffer"; +import { describe, expect, it, vi } from "vitest"; +import type { ResolvedGmailAccount } from "./accounts.js"; +import { GmailClient, type GmailApi } from "./gmail-client.js"; +import { sendGmailText } from "./outbound.js"; + +const account: ResolvedGmailAccount = { + accountId: "work", + enabled: true, + configured: true, + email: "agent@example.com", + clientId: "client-id", + clientSecret: "client-secret", + refreshToken: "refresh-token", + allowFrom: ["person@example.com"], + allowTo: ["person@example.com"], + pollIntervalSeconds: 30, +}; + +function createClient(): { + client: GmailClient; + sendMessage: ReturnType; +} { + const sendMessage = vi.fn(async () => ({ + id: "sent-1", + threadId: "thread-1", + })); + const api: GmailApi = { + listMessages: vi.fn(async () => ({ messages: [] })), + getMessage: vi.fn(), + getThread: vi.fn(async () => ({ + id: "thread-1", + messages: [ + { + id: "message-1", + threadId: "thread-1", + payload: { + mimeType: "text/plain", + headers: [ + { name: "From", value: "Person " }, + { name: "Subject", value: "Question" }, + { name: "Message-ID", value: "" }, + ], + body: { data: Buffer.from("Question body").toString("base64url") }, + }, + }, + ], + })), + markMessageRead: vi.fn(), + sendMessage, + }; + return { client: new GmailClient(api), sendMessage }; +} + +describe("sendGmailText", () => { + it("replies to the latest external sender in an existing thread", async () => { + const { client, sendMessage } = createClient(); + + await expect( + sendGmailText({ + account, + client, + target: "thread:thread-1", + text: "Answer", + }), + ).resolves.toEqual({ messageId: "sent-1", threadId: "thread-1" }); + + const input = sendMessage.mock.calls[0]?.[0] as { + raw: string; + threadId: string; + }; + const decoded = Buffer.from(input.raw, "base64url").toString("utf8"); + expect(input.threadId).toBe("thread-1"); + expect(decoded).toContain("To: person@example.com\r\n"); + expect(decoded).toContain("Subject: Re: Question\r\n"); + expect(decoded).toContain("In-Reply-To: \r\n"); + }); + + it("denies a new outbound thread outside allowTo", async () => { + const { client } = createClient(); + + await expect( + sendGmailText({ + account, + client, + target: "mailto:outside@example.net", + text: "Hello", + }), + ).rejects.toThrow("not allowed"); + }); +}); diff --git a/src/outbound.ts b/src/outbound.ts new file mode 100644 index 0000000..5c0208e --- /dev/null +++ b/src/outbound.ts @@ -0,0 +1,92 @@ +import type { ResolvedGmailAccount } from "./accounts.js"; +import type { GmailClient } from "./gmail-client.js"; +import { + buildRawEmail, + parseGmailMessage, + type ParsedGmailMessage, +} from "./message.js"; +import { isAddressAllowed } from "./policy.js"; +import { parseGmailTarget } from "./target.js"; + +function buildReplySubject(subject: string): string { + const trimmed = subject.trim(); + if (!trimmed) { + return "Re: Gmail message"; + } + return /^re:/iu.test(trimmed) ? trimmed : `Re: ${trimmed}`; +} + +async function resolveReplySource( + account: ResolvedGmailAccount, + client: GmailClient, + threadId: string, +): Promise { + const thread = await client.getThread(threadId); + for (const message of [...thread.messages].reverse()) { + try { + const parsed = parseGmailMessage(message); + if (parsed.senderEmail !== account.email) { + return parsed; + } + } catch { + // Attachment-only and unsupported MIME messages cannot supply reply metadata. + } + } + throw new Error( + `Gmail thread "${threadId}" has no external text message to reply to`, + ); +} + +function buildReferences(source: ParsedGmailMessage): string | undefined { + const references = [source.references, source.messageIdHeader] + .filter(Boolean) + .join(" ") + .trim(); + return references || undefined; +} + +/** Sends text to a new address or replies inside an existing Gmail thread. */ +export async function sendGmailText(params: { + account: ResolvedGmailAccount; + client: GmailClient; + target: string; + text: string; +}): Promise<{ messageId: string; threadId: string }> { + const target = parseGmailTarget(params.target); + if (!target) { + throw new Error(`Invalid Gmail target: ${params.target}`); + } + + if (target.kind === "email") { + if (!isAddressAllowed(target.email, params.account.allowTo)) { + throw new Error(`Gmail recipient "${target.email}" is not allowed`); + } + const raw = buildRawEmail({ + from: params.account.email, + to: target.email, + subject: "OpenClaw message", + text: params.text, + }); + return await params.client.sendRawMessage(raw); + } + + // Gmail requires matching subject and RFC reply headers for thread membership. + const source = await resolveReplySource( + params.account, + params.client, + target.threadId, + ); + if (!isAddressAllowed(source.senderEmail, params.account.allowTo)) { + throw new Error(`Gmail recipient "${source.senderEmail}" is not allowed`); + } + const references = buildReferences(source); + const raw = buildRawEmail({ + from: params.account.email, + to: source.senderEmail, + subject: buildReplySubject(source.subject), + text: params.text, + ...(source.messageIdHeader ? { inReplyTo: source.messageIdHeader } : {}), + ...(references ? { references } : {}), + }); + return await params.client.sendRawMessage(raw, target.threadId); +} diff --git a/src/runtime.ts b/src/runtime.ts new file mode 100644 index 0000000..d58130a --- /dev/null +++ b/src/runtime.ts @@ -0,0 +1,12 @@ +import { + createPluginRuntimeStore, + type PluginRuntime, +} from "openclaw/plugin-sdk/runtime-store"; + +const runtimeStore = createPluginRuntimeStore({ + pluginId: "gmail", + errorMessage: "Gmail runtime is not initialized", +}); + +export const setGmailRuntime = runtimeStore.setRuntime; +export const getGmailRuntime = runtimeStore.getRuntime; From 0d214cf951fbdf5c20ac3b4f0543e5d6dad8032e Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 07:08:46 -0700 Subject: [PATCH 09/14] gmail-883.5: document and package the first milestone --- .pebbles/events.jsonl | 5 ++ README.md | 194 +++++++++++++++++++++++++++++++++++++++++- package.json | 3 +- src/channel.ts | 12 ++- 4 files changed, 210 insertions(+), 4 deletions(-) diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index c39f80b..4985a78 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -31,3 +31,8 @@ {"type":"close","timestamp":"2026-07-12T13:57:05.134847Z","issue_id":"gmail-883.3","payload":{}} {"type":"status_update","timestamp":"2026-07-12T14:03:11.788559Z","issue_id":"gmail-883.4","payload":{"status":"in_progress"}} {"type":"close","timestamp":"2026-07-12T14:03:11.817066Z","issue_id":"gmail-883.4","payload":{}} +{"type":"create","timestamp":"2026-07-12T14:04:34.757377Z","issue_id":"gmail-92e","payload":{"description":"Prove how OpenClaw should replace a provisional mailto recipient route with the canonical Gmail thread ID returned after messages.send. Add plugin-owned mapping or propose the smallest SDK enhancement so subsequent replies continue the outbound-created session.","priority":"1","title":"Reconcile outbound-originated Gmail thread sessions","type":"task"}} +{"type":"create","timestamp":"2026-07-12T14:04:34.86125Z","issue_id":"gmail-7a7","payload":{"description":"Implement an OpenClaw setup entry and installed-app OAuth flow with PKCE, least-privilege gmail.modify scope, secret-provider storage, cancellation, and doctor diagnostics. Do not expose refresh tokens in logs or config summaries.","priority":"2","title":"Add interactive Gmail OAuth setup","type":"task"}} +{"type":"create","timestamp":"2026-07-12T14:04:34.94706Z","issue_id":"gmail-178","payload":{"description":"Add bounded attachment download/storage plus multi-recipient reply-all with independent allowTo checks for every To/Cc recipient. Cover MIME nesting, filename safety, size limits, and unsupported attachment behavior.","priority":"2","title":"Add Gmail attachments and reply-all","type":"task"}} +{"type":"create","timestamp":"2026-07-12T14:04:35.041849Z","issue_id":"gmail-b74","payload":{"description":"Compare polling with History API cursors and Pub/Sub push notifications. Specify durable cursor storage, missed-history recovery, webhook authentication, operational requirements, and rate-limit behavior before implementation.","priority":"3","title":"Evaluate Gmail History API and push delivery","type":"task"}} +{"type":"status_update","timestamp":"2026-07-12T14:08:41.12632Z","issue_id":"gmail-883.5","payload":{"status":"in_progress"}} diff --git a/README.md b/README.md index a2a5154..38c9ff3 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,195 @@ # gmail-chan -OpenClaw communication channel backed by Gmail threads +`gmail-chan` is an external [OpenClaw](https://github.com/openclaw/openclaw) +channel plugin that uses Gmail threads as conversations. + +One Gmail thread maps to one OpenClaw session. Every email in that thread +continues the session, and a different Gmail thread creates a different session. + +The `0.1.x` milestone supports plain-text messages through the Gmail API: + +- poll unread inbox messages; +- admit senders through a deny-by-default allowlist; +- dispatch each Gmail thread through an isolated OpenClaw session; +- send the agent's result as a reply in the source Gmail thread; +- start a new Gmail thread through an explicit `mailto:` target; +- return Gmail message and thread IDs in durable OpenClaw receipts. + +## Requirements + +- OpenClaw `2026.7.2` or newer +- Node.js 22.19+, 23.11+, or 24+ +- A Google Cloud project with the Gmail API enabled +- An OAuth 2.0 Desktop app client and refresh token + +The plugin requests `https://www.googleapis.com/auth/gmail.modify`. Google +classifies this as a restricted scope because it permits reading messages, +sending messages, and changing labels. Review Google's +[Gmail scope documentation](https://developers.google.com/workspace/gmail/api/auth/scopes) +before distributing one OAuth client to other users. + +## Install for development + +```bash +git clone git@github.com:Martian-Engineering/gmail-chan.git +cd gmail-chan +pnpm install +pnpm build +openclaw plugins install --link "$PWD" +``` + +Published packages use `dist/index.js`. Linked source checkouts use `index.ts`, +which OpenClaw supports for local plugin development. + +## Create Gmail credentials + +1. Enable the Gmail API in a Google Cloud project. +2. Configure the OAuth consent screen for the account that owns the mailbox. +3. Create an OAuth client with application type **Desktop app**. +4. Obtain an offline refresh token for + `https://www.googleapis.com/auth/gmail.modify` through an installed-app OAuth + flow. Google's + [desktop OAuth guide](https://developers.google.com/identity/protocols/oauth2/native-app) + documents the authorization-code and refresh-token exchange. +5. Store the client ID, client secret, and refresh token in environment variables + or another OpenClaw secret provider. + +For a single-operator development setup, the +[Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/) +can perform step 4 with **Use your own OAuth credentials** enabled. Do not use a +shared refresh token or commit one to this repository. + +## Configure OpenClaw + +Environment variables: + +```bash +export GMAIL_CLIENT_ID='your-client-id.apps.googleusercontent.com' +export GMAIL_CLIENT_SECRET='your-client-secret' +export GMAIL_REFRESH_TOKEN='your-refresh-token' +``` + +OpenClaw config: + +```json5 +{ + channels: { + gmail: { + defaultAccount: "work", + accounts: { + work: { + email: "agent@example.com", + oauth: { + clientId: { + source: "env", + provider: "default", + id: "GMAIL_CLIENT_ID", + }, + clientSecret: { + source: "env", + provider: "default", + id: "GMAIL_CLIENT_SECRET", + }, + refreshToken: { + source: "env", + provider: "default", + id: "GMAIL_REFRESH_TOKEN", + }, + }, + allowFrom: ["person@example.com", "@martian.engineering"], + allowTo: ["person@example.com", "@martian.engineering"], + pollIntervalSeconds: 30, + }, + }, + }, + }, +} +``` + +Restart the OpenClaw gateway after changing channel configuration. + +### Address policy + +Both `allowFrom` and `allowTo` default to `[]`, which denies every address. + +- `person@example.com` matches one address without case sensitivity. +- `@example.com` matches that domain and its subdomains. +- `*` matches every syntactically valid email address. + +`allowFrom` controls messages delivered to the agent. `allowTo` controls new +outbound threads and replies. A permitted inbound sender must also be in +`allowTo` for the agent to reply. + +## Targets and sessions + +The shared OpenClaw `message` tool accepts two Gmail target forms: + +- `thread:` replies in an existing Gmail thread. +- `mailto:` starts a new Gmail thread with subject + `OpenClaw message`. + +Bare email addresses normalize to `mailto:` targets. Thread IDs require the +`thread:` prefix. + +Inbound routing models each Gmail thread as an OpenClaw channel peer. This keeps +thread sessions isolated even when the operator's direct-message session policy +uses a shared main session. + +Gmail assigns the canonical thread ID after a new outbound send. The plugin +returns that ID in the message receipt. Reconciliation between an +outbound-originated provisional OpenClaw route and the canonical Gmail thread +session remains tracked work. + +## Delivery behavior + +- Successfully dispatched messages are marked read. +- Self-authored and denied messages are not sent to the agent and are marked + read, which prevents a denied message from producing a polling loop. +- A dispatch failure leaves the Gmail message unread for a later poll. +- Processing is sequential per account. An in-process guard prevents concurrent + handling of one Gmail message ID. +- Gmail responses, MIME structures, headers, and bodies are validated and + bounded before use. +- HTML email is reduced to text. Script and style blocks are removed; HTML is + never executed. + +The Gmail API groups replies by thread only when the request includes the thread +ID, the subject matches, and `References` plus `In-Reply-To` follow RFC 2822. +The plugin sets all three requirements. See Google's +[thread guide](https://developers.google.com/workspace/gmail/api/guides/threads) +and [sending guide](https://developers.google.com/workspace/gmail/api/guides/sending). + +## Limitations + +- Plain-text inbound and outbound content only +- One external reply recipient per thread; reply-all is not implemented +- No attachments or inline images +- No interactive OpenClaw OAuth wizard +- Polling only; no Gmail History API cursor or push notifications +- No automatic thread-history backfill into the model context +- New outbound messages use the fixed subject `OpenClaw message` + +## Development + +```bash +pnpm test +pnpm typecheck +pnpm lint +pnpm format:check +pnpm build +pnpm check +pnpm audit --audit-level high +npm pack --dry-run +``` + +Tests use fake Gmail API boundaries and do not require Google credentials or +network access. + +The implementation targets OpenClaw `main` commit +`1318cf1fdef0f86fa186ab30be9f0a60e24c7868`, whose package version is +`2026.7.2`. See [docs/spec.md](docs/spec.md) for the contract and +[docs/plan.md](docs/plan.md) for the milestone task graph. + +## License + +MIT diff --git a/package.json b/package.json index d86da31..f559ba0 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,9 @@ "LICENSE" ], "scripts": { - "build": "tsc -p tsconfig.build.json", + "build": "pnpm clean && tsc -p tsconfig.build.json", "check": "pnpm lint && pnpm format:check && pnpm typecheck && pnpm test && pnpm build", + "clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"", "format": "prettier --write .", "format:check": "prettier --check .", "lint": "eslint .", diff --git a/src/channel.ts b/src/channel.ts index 1a595e4..41126b3 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -3,7 +3,6 @@ import { createChatChannelPlugin, type ChannelPlugin, } from "openclaw/plugin-sdk/channel-core"; -import { getChatChannelMeta } from "openclaw/plugin-sdk/channel-plugin-common"; import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, @@ -65,7 +64,16 @@ export const gmailPlugin: ChannelPlugin = createChatChannelPlugin({ base: { id: GMAIL_CHANNEL_ID, - meta: { ...getChatChannelMeta(GMAIL_CHANNEL_ID), id: GMAIL_CHANNEL_ID }, + meta: { + id: GMAIL_CHANNEL_ID, + label: "Gmail", + selectionLabel: "Gmail (OAuth)", + detailLabel: "Gmail", + docsPath: "/channels/gmail", + docsLabel: "gmail", + blurb: "Use Gmail threads as isolated OpenClaw conversations.", + systemImage: "envelope", + }, capabilities: { chatTypes: ["group"], threads: true, From 762fe4f5326e4ea041c773aef5d342921a0ea48f Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 07:11:45 -0700 Subject: [PATCH 10/14] fix: preserve Gmail reply source identity --- src/channel.ts | 4 +++- src/outbound.test.ts | 49 +++++++++++++++++++++++++++++--------------- src/outbound.ts | 12 +++++++++++ 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/channel.ts b/src/channel.ts index 41126b3..6def95d 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -44,6 +44,7 @@ const gmailMessageAdapter = defineChannelMessageAdapter({ client: createGmailClient(account), target: ctx.to, text: ctx.text, + ...(ctx.replyToId ? { replyToId: ctx.replyToId } : {}), }); const replyToId = ctx.replyToId ?? undefined; return { @@ -159,7 +160,7 @@ export const gmailPlugin: ChannelPlugin = base: { deliveryMode: "direct" }, attachedResults: { channel: GMAIL_CHANNEL_ID, - sendText: async ({ cfg, to, text, accountId }) => { + sendText: async ({ cfg, to, text, accountId, replyToId }) => { const account = resolveGmailAccount({ cfg: cfg as GmailCoreConfig, ...(accountId !== undefined ? { accountId } : {}), @@ -169,6 +170,7 @@ export const gmailPlugin: ChannelPlugin = client: createGmailClient(account), target: to, text, + ...(replyToId ? { replyToId } : {}), }); return { messageId: result.messageId }; }, diff --git a/src/outbound.test.ts b/src/outbound.test.ts index 0c9a1e3..47ec813 100644 --- a/src/outbound.test.ts +++ b/src/outbound.test.ts @@ -19,37 +19,38 @@ const account: ResolvedGmailAccount = { function createClient(): { client: GmailClient; + getMessage: ReturnType; sendMessage: ReturnType; } { const sendMessage = vi.fn(async () => ({ id: "sent-1", threadId: "thread-1", })); + const sourceMessage = { + id: "message-1", + threadId: "thread-1", + payload: { + mimeType: "text/plain", + headers: [ + { name: "From", value: "Person " }, + { name: "Subject", value: "Question" }, + { name: "Message-ID", value: "" }, + ], + body: { data: Buffer.from("Question body").toString("base64url") }, + }, + }; + const getMessage = vi.fn(async () => sourceMessage); const api: GmailApi = { listMessages: vi.fn(async () => ({ messages: [] })), - getMessage: vi.fn(), + getMessage, getThread: vi.fn(async () => ({ id: "thread-1", - messages: [ - { - id: "message-1", - threadId: "thread-1", - payload: { - mimeType: "text/plain", - headers: [ - { name: "From", value: "Person " }, - { name: "Subject", value: "Question" }, - { name: "Message-ID", value: "" }, - ], - body: { data: Buffer.from("Question body").toString("base64url") }, - }, - }, - ], + messages: [sourceMessage], })), markMessageRead: vi.fn(), sendMessage, }; - return { client: new GmailClient(api), sendMessage }; + return { client: new GmailClient(api), getMessage, sendMessage }; } describe("sendGmailText", () => { @@ -76,6 +77,20 @@ describe("sendGmailText", () => { expect(decoded).toContain("In-Reply-To: \r\n"); }); + it("uses the exact source message when OpenClaw supplies replyToId", async () => { + const { client, getMessage } = createClient(); + + await sendGmailText({ + account, + client, + target: "thread:thread-1", + text: "Answer", + replyToId: "message-1", + }); + + expect(getMessage).toHaveBeenCalledWith("message-1"); + }); + it("denies a new outbound thread outside allowTo", async () => { const { client } = createClient(); diff --git a/src/outbound.ts b/src/outbound.ts index 5c0208e..6b6c726 100644 --- a/src/outbound.ts +++ b/src/outbound.ts @@ -20,7 +20,17 @@ async function resolveReplySource( account: ResolvedGmailAccount, client: GmailClient, threadId: string, + replyToId?: string, ): Promise { + if (replyToId) { + const source = parseGmailMessage(await client.getMessage(replyToId)); + if (source.threadId !== threadId || source.senderEmail === account.email) { + throw new Error( + `Gmail reply source "${replyToId}" does not belong to thread "${threadId}"`, + ); + } + return source; + } const thread = await client.getThread(threadId); for (const message of [...thread.messages].reverse()) { try { @@ -51,6 +61,7 @@ export async function sendGmailText(params: { client: GmailClient; target: string; text: string; + replyToId?: string; }): Promise<{ messageId: string; threadId: string }> { const target = parseGmailTarget(params.target); if (!target) { @@ -75,6 +86,7 @@ export async function sendGmailText(params: { params.account, params.client, target.threadId, + params.replyToId, ); if (!isAddressAllowed(source.senderEmail, params.account.allowTo)) { throw new Error(`Gmail recipient "${source.senderEmail}" is not allowed`); From c8d33ba4856a8f720daa1682bf9774066d10adc8 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 09:21:07 -0700 Subject: [PATCH 11/14] fix: reject unsafe Gmail messages before dispatch --- src/inbound.test.ts | 31 +++++++++++++++++++++++++++++ src/inbound.ts | 12 ++++++++---- src/message.ts | 48 ++++++++++++++++++++++++++++++++++++++------- 3 files changed, 80 insertions(+), 11 deletions(-) diff --git a/src/inbound.test.ts b/src/inbound.test.ts index fe30f83..3fcc0c0 100644 --- a/src/inbound.test.ts +++ b/src/inbound.test.ts @@ -130,4 +130,35 @@ describe("handleGmailInbound", () => { ).resolves.toBe("ignored"); expect(dispatchReply).not.toHaveBeenCalled(); }); + + it("does not dispatch when the sender cannot receive a reply", async () => { + const { runtime, dispatchReply } = createRuntime(); + + await expect( + handleGmailInbound({ + account: { ...account, allowTo: [] }, + cfg, + message: gmailMessage("message-1", "thread-1", "person@example.com"), + runtime, + }), + ).resolves.toBe("ignored"); + expect(dispatchReply).not.toHaveBeenCalled(); + }); + + it("classifies denied senders before parsing unsupported MIME bodies", async () => { + const { runtime, dispatchReply } = createRuntime(); + const unsupported = { + id: "message-1", + threadId: "thread-1", + payload: { + mimeType: "application/pdf", + headers: [{ name: "From", value: "outside@example.net" }], + }, + }; + + await expect( + handleGmailInbound({ account, cfg, message: unsupported, runtime }), + ).resolves.toBe("ignored"); + expect(dispatchReply).not.toHaveBeenCalled(); + }); }); diff --git a/src/inbound.ts b/src/inbound.ts index b34526a..4779cad 100644 --- a/src/inbound.ts +++ b/src/inbound.ts @@ -2,7 +2,7 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; import type { GmailCoreConfig, ResolvedGmailAccount } from "./accounts.js"; import type { GmailApiMessage } from "./message.js"; -import { parseGmailMessage } from "./message.js"; +import { parseGmailMessage, parseGmailMessageEnvelope } from "./message.js"; import { isAddressAllowed } from "./policy.js"; import { buildGmailThreadTarget } from "./target.js"; @@ -15,13 +15,17 @@ export async function handleGmailInbound(params: { message: GmailApiMessage; runtime: PluginRuntime; }): Promise { - const message = parseGmailMessage(params.message); + // Apply sender policy before decoding untrusted MIME content or invoking an + // agent. A sender must be eligible for both admission and the reply path. + const envelope = parseGmailMessageEnvelope(params.message); if ( - message.senderEmail === params.account.email || - !isAddressAllowed(message.senderEmail, params.account.allowFrom) + envelope.senderEmail === params.account.email || + !isAddressAllowed(envelope.senderEmail, params.account.allowFrom) || + !isAddressAllowed(envelope.senderEmail, params.account.allowTo) ) { return "ignored"; } + const message = parseGmailMessage(params.message); // A Gmail thread is a channel peer so DM scope cannot merge distinct threads. const target = buildGmailThreadTarget(message.threadId); diff --git a/src/message.ts b/src/message.ts index e4c9b9a..c55982d 100644 --- a/src/message.ts +++ b/src/message.ts @@ -46,6 +46,23 @@ export const GmailApiMessageSchema = z.object({ export type GmailApiMessage = z.infer; +const GmailMessageEnvelopeSchema = z.object({ + id: z.string().min(1), + threadId: z.string().min(1), + internalDate: z.string().regex(/^\d+$/u).optional().nullable(), + payload: z.object({ + headers: z.array(GmailHeaderSchema).optional().nullable(), + }), +}); + +export type GmailMessageEnvelope = { + id: string; + threadId: string; + senderEmail: string; + senderName?: string; + timestampMs?: number; +}; + export type ParsedGmailMessage = { id: string; threadId: string; @@ -143,6 +160,24 @@ function parseSender(value: string | undefined): { return { email, ...(name ? { name } : {}) }; } +/** Reads routing and policy metadata without parsing the MIME body. */ +export function parseGmailMessageEnvelope( + input: unknown, +): GmailMessageEnvelope { + const message = GmailMessageEnvelopeSchema.parse(input); + const sender = parseSender(getHeader(message.payload, "From")); + const timestampMs = message.internalDate + ? Number(message.internalDate) + : undefined; + return { + id: message.id, + threadId: message.threadId, + senderEmail: sender.email, + ...(sender.name ? { senderName: sender.name } : {}), + ...(timestampMs !== undefined ? { timestampMs } : {}), + }; +} + /** Validates and converts one Gmail API message into bounded text for OpenClaw. */ export function parseGmailMessage( input: unknown, @@ -160,22 +195,21 @@ export function parseGmailMessage( throw new Error("Gmail message has no supported text body"); } const decoded = decodeBody(bodyData, maxBodyBytes); - const sender = parseSender(getHeader(message.payload, "From")); - const timestampMs = message.internalDate - ? Number(message.internalDate) - : undefined; + const envelope = parseGmailMessageEnvelope(message); const messageIdHeader = getHeader(message.payload, "Message-ID"); const references = getHeader(message.payload, "References"); return { id: message.id, threadId: message.threadId, - senderEmail: sender.email, - ...(sender.name ? { senderName: sender.name } : {}), + senderEmail: envelope.senderEmail, + ...(envelope.senderName ? { senderName: envelope.senderName } : {}), subject: getHeader(message.payload, "Subject")?.trim() ?? "", ...(messageIdHeader ? { messageIdHeader } : {}), ...(references ? { references } : {}), text: bodies.plain ? decoded.trim() : htmlToText(decoded), - ...(timestampMs !== undefined ? { timestampMs } : {}), + ...(envelope.timestampMs !== undefined + ? { timestampMs: envelope.timestampMs } + : {}), }; } From e34174d4fca32dfa602f1d21c86e4c14af099c09 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 09:28:33 -0700 Subject: [PATCH 12/14] fix: authenticate Gmail senders and thread replies --- README.md | 8 +++++++- docs/spec.md | 16 ++++++++++------ src/inbound.test.ts | 18 ++++++++++++++++++ src/inbound.ts | 3 ++- src/message.ts | 34 ++++++++++++++++++++++++++++++++++ src/outbound.test.ts | 27 +++++++++++++++++++++++++++ src/outbound.ts | 7 ++++++- 7 files changed, 104 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 38c9ff3..814d0ae 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,11 @@ Both `allowFrom` and `allowTo` default to `[]`, which denies every address. `allowFrom` controls messages delivered to the agent. `allowTo` controls new outbound threads and replies. A permitted inbound sender must also be in -`allowTo` for the agent to reply. +`allowTo` for the agent to reply. Admission additionally fails closed unless a +Google-generated `Authentication-Results` header reports aligned DMARC success +for the normalized `From` domain. This prevents the address policy from trusting +an unauthenticated, spoofed `From` header; mail from domains without passing +DMARC is ignored. ## Targets and sessions @@ -158,6 +162,8 @@ ID, the subject matches, and `References` plus `In-Reply-To` follow RFC 2822. The plugin sets all three requirements. See Google's [thread guide](https://developers.google.com/workspace/gmail/api/guides/threads) and [sending guide](https://developers.google.com/workspace/gmail/api/guides/sending). +If the source message has no `Message-ID`, the plugin fails closed instead of +claiming a reply that Gmail may place in a different thread. ## Limitations diff --git a/docs/spec.md b/docs/spec.md index 657412c..2c65bbc 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -120,17 +120,21 @@ restricted scope because the plugin reads message bodies and changes labels. 1. The gateway lists `in:inbox is:unread` messages. 2. The Gmail client fetches each full message and validates required IDs and - bounded header/body fields. + bounded header fields. 3. The plugin ignores messages sent by the configured mailbox. -4. Sender policy admits or rejects the normalized `From` address. -5. The runtime builds a channel route with `thread:` as the +4. Sender policy admits or rejects the normalized `From` address before MIME + decoding. Admission requires the sender in both address policies and aligned + DMARC success from Google's trusted `Authentication-Results` boundary. +5. The plugin validates and decodes the bounded text body. +6. The runtime builds a channel route with `thread:` as the peer ID. -6. OpenClaw dispatches the message in the route's session. -7. Agent output is sent with the Gmail thread ID and RFC reply headers. -8. The plugin removes the `UNREAD` label after dispatch completes. +7. OpenClaw dispatches the message in the route's session. +8. Agent output is sent with the Gmail thread ID and required RFC reply headers. +9. The plugin removes the `UNREAD` label after dispatch completes. Rejected senders are marked read so a denied message does not create a hot poll loop. Dispatch failures leave messages unread for a later poll. +Thread replies fail closed when their source message lacks a `Message-ID`. ## Code Style diff --git a/src/inbound.test.ts b/src/inbound.test.ts index 3fcc0c0..b65052b 100644 --- a/src/inbound.test.ts +++ b/src/inbound.test.ts @@ -30,6 +30,10 @@ function gmailMessage(id: string, threadId: string, from: string) { headers: [ { name: "From", value: from }, { name: "Subject", value: "Question" }, + { + name: "Authentication-Results", + value: "mx.google.com; dmarc=pass (p=NONE) header.from=example.com", + }, ], body: { data: Buffer.from("Question body").toString("base64url") }, }, @@ -145,6 +149,20 @@ describe("handleGmailInbound", () => { expect(dispatchReply).not.toHaveBeenCalled(); }); + it("does not trust a later sender-supplied authentication result", async () => { + const { runtime, dispatchReply } = createRuntime(); + const spoofed = gmailMessage("message-1", "thread-1", "person@example.com"); + spoofed.payload.headers.unshift({ + name: "Authentication-Results", + value: "mx.google.com; dmarc=fail header.from=example.com", + }); + + await expect( + handleGmailInbound({ account, cfg, message: spoofed, runtime }), + ).resolves.toBe("ignored"); + expect(dispatchReply).not.toHaveBeenCalled(); + }); + it("classifies denied senders before parsing unsupported MIME bodies", async () => { const { runtime, dispatchReply } = createRuntime(); const unsupported = { diff --git a/src/inbound.ts b/src/inbound.ts index 4779cad..27ee24b 100644 --- a/src/inbound.ts +++ b/src/inbound.ts @@ -21,7 +21,8 @@ export async function handleGmailInbound(params: { if ( envelope.senderEmail === params.account.email || !isAddressAllowed(envelope.senderEmail, params.account.allowFrom) || - !isAddressAllowed(envelope.senderEmail, params.account.allowTo) + !isAddressAllowed(envelope.senderEmail, params.account.allowTo) || + !envelope.senderDomainAuthenticated ) { return "ignored"; } diff --git a/src/message.ts b/src/message.ts index c55982d..4f81abb 100644 --- a/src/message.ts +++ b/src/message.ts @@ -60,6 +60,7 @@ export type GmailMessageEnvelope = { threadId: string; senderEmail: string; senderName?: string; + senderDomainAuthenticated: boolean; timestampMs?: number; }; @@ -144,6 +145,35 @@ function getHeader(part: GmailMessagePart, name: string): string | undefined { )?.value; } +function hasAuthenticatedSenderDomain( + senderEmail: string, + authenticationResults: string | undefined, +): boolean { + const senderDomain = senderEmail.split("@")[1]?.toLowerCase(); + if (!senderDomain) { + return false; + } + if (!authenticationResults) { + return false; + } + // Gmail prepends its boundary result. Never accept a later, sender-supplied + // Authentication-Results field that could claim Google's authserv-id. + const normalized = authenticationResults.replace(/\s+/gu, " ").trim(); + if (!/^mx\.google\.com\s*;/iu.test(normalized)) { + return false; + } + return normalized.split(";").some((result) => { + if (!/\bdmarc=pass\b/iu.test(result)) { + return false; + } + const authenticatedDomain = /\bheader\.from=([^\s;]+)/iu + .exec(result)?.[1] + ?.toLowerCase() + .replace(/\.$/u, ""); + return authenticatedDomain === senderDomain; + }); +} + function parseSender(value: string | undefined): { email: string; name?: string; @@ -174,6 +204,10 @@ export function parseGmailMessageEnvelope( threadId: message.threadId, senderEmail: sender.email, ...(sender.name ? { senderName: sender.name } : {}), + senderDomainAuthenticated: hasAuthenticatedSenderDomain( + sender.email, + getHeader(message.payload, "Authentication-Results"), + ), ...(timestampMs !== undefined ? { timestampMs } : {}), }; } diff --git a/src/outbound.test.ts b/src/outbound.test.ts index 47ec813..96c585c 100644 --- a/src/outbound.test.ts +++ b/src/outbound.test.ts @@ -91,6 +91,33 @@ describe("sendGmailText", () => { expect(getMessage).toHaveBeenCalledWith("message-1"); }); + it("does not claim a thread reply without a source Message-ID", async () => { + const { client, getMessage, sendMessage } = createClient(); + getMessage.mockResolvedValue({ + id: "message-1", + threadId: "thread-1", + payload: { + mimeType: "text/plain", + headers: [ + { name: "From", value: "Person " }, + { name: "Subject", value: "Question" }, + ], + body: { data: Buffer.from("Question body").toString("base64url") }, + }, + }); + + await expect( + sendGmailText({ + account, + client, + target: "thread:thread-1", + text: "Answer", + replyToId: "message-1", + }), + ).rejects.toThrow("Message-ID"); + expect(sendMessage).not.toHaveBeenCalled(); + }); + it("denies a new outbound thread outside allowTo", async () => { const { client } = createClient(); diff --git a/src/outbound.ts b/src/outbound.ts index 6b6c726..b203b18 100644 --- a/src/outbound.ts +++ b/src/outbound.ts @@ -91,13 +91,18 @@ export async function sendGmailText(params: { if (!isAddressAllowed(source.senderEmail, params.account.allowTo)) { throw new Error(`Gmail recipient "${source.senderEmail}" is not allowed`); } + if (!source.messageIdHeader) { + throw new Error( + `Gmail reply source in thread "${target.threadId}" has no Message-ID header`, + ); + } const references = buildReferences(source); const raw = buildRawEmail({ from: params.account.email, to: source.senderEmail, subject: buildReplySubject(source.subject), text: params.text, - ...(source.messageIdHeader ? { inReplyTo: source.messageIdHeader } : {}), + inReplyTo: source.messageIdHeader, ...(references ? { references } : {}), }); return await params.client.sendRawMessage(raw, target.threadId); From 22aaca301b8c5cc3052ceed3bcf85b6c37c54d7a Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 09:33:05 -0700 Subject: [PATCH 13/14] fix: align advertised OpenClaw contracts --- README.md | 7 +++++-- openclaw.plugin.json | 2 +- src/channel.test.ts | 3 +++ src/config.test.ts | 19 +++++++++++++++++++ src/config.ts | 27 +++++++++++++++++---------- src/target.test.ts | 9 +++++++++ src/target.ts | 5 ++++- 7 files changed, 58 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 814d0ae..b363290 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ which OpenClaw supports for local plugin development. flow. Google's [desktop OAuth guide](https://developers.google.com/identity/protocols/oauth2/native-app) documents the authorization-code and refresh-token exchange. -5. Store the client ID, client secret, and refresh token in environment variables - or another OpenClaw secret provider. +5. Store the client ID, client secret, and refresh token as environment-backed + OpenClaw secret inputs. For a single-operator development setup, the [Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/) @@ -132,6 +132,9 @@ The shared OpenClaw `message` tool accepts two Gmail target forms: - `mailto:` starts a new Gmail thread with subject `OpenClaw message`. +OpenClaw-qualified forms such as `gmail:thread:` and +`gmail:mailto:` normalize to the same targets. + Bare email addresses normalize to `mailto:` targets. Thread IDs require the `thread:` prefix. diff --git a/openclaw.plugin.json b/openclaw.plugin.json index b26448d..3d8247b 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -64,7 +64,7 @@ "properties": { "source": { "type": "string", - "enum": ["env", "file", "exec"] + "enum": ["env"] }, "provider": { "type": "string", "minLength": 1 }, "id": { "type": "string", "minLength": 1 } diff --git a/src/channel.test.ts b/src/channel.test.ts index fecbde8..168cff6 100644 --- a/src/channel.test.ts +++ b/src/channel.test.ts @@ -50,6 +50,9 @@ describe("gmailPlugin config", () => { expect(different).not.toMatchObject({ sessionKey: (first as { sessionKey: string }).sessionKey, }); + expect( + resolveRoute?.({ ...params, target: "gmail:thread:thread-1" }), + ).toEqual(first); }); it("exposes gateway and durable text message adapters", () => { diff --git a/src/config.test.ts b/src/config.test.ts index 2c9634a..0e36179 100644 --- a/src/config.test.ts +++ b/src/config.test.ts @@ -24,4 +24,23 @@ describe("GmailChannelConfigSchema", () => { expect(parsed.accounts.work?.allowFrom).toEqual([]); expect(parsed.accounts.work?.allowTo).toEqual([]); }); + + it("rejects secret providers that runtime resolution cannot materialize", () => { + expect(() => + GmailChannelConfigSchema.parse({ + accounts: { + work: { + email: "agent@example.com", + oauth: { + refreshToken: { + source: "file", + provider: "default", + id: "gmail-token", + }, + }, + }, + }, + }), + ).toThrow(); + }); }); diff --git a/src/config.ts b/src/config.ts index 5b345c9..2a76935 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,15 +1,22 @@ import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -import { - buildSecretInputSchema, - type SecretInput, -} from "openclaw/plugin-sdk/secret-input"; import { z } from "zod"; +const OAuthSecretInputSchema = z.union([ + z.string(), + z + .object({ + source: z.literal("env"), + provider: z.string().trim().min(1), + id: z.string().trim().min(1), + }) + .strict(), +]); + const OAuthConfigSchema = z .object({ - clientId: buildSecretInputSchema().optional(), - clientSecret: buildSecretInputSchema().optional(), - refreshToken: buildSecretInputSchema().optional(), + clientId: OAuthSecretInputSchema.optional(), + clientSecret: OAuthSecretInputSchema.optional(), + refreshToken: OAuthSecretInputSchema.optional(), }) .strict() .default({}); @@ -37,9 +44,9 @@ export const GmailChannelConfigSchema = z .strict(); export type GmailOAuthConfig = { - clientId?: SecretInput; - clientSecret?: SecretInput; - refreshToken?: SecretInput; + clientId?: z.infer; + clientSecret?: z.infer; + refreshToken?: z.infer; }; export type GmailAccountConfig = z.infer; diff --git a/src/target.test.ts b/src/target.test.ts index 4418ca4..6ededb1 100644 --- a/src/target.test.ts +++ b/src/target.test.ts @@ -15,6 +15,15 @@ describe("Gmail target grammar", () => { }); }); + it("accepts OpenClaw channel-qualified targets", () => { + expect(normalizeGmailTarget("gmail:mailto:Person@Example.com")).toBe( + "mailto:person@example.com", + ); + expect(normalizeGmailTarget("gmail:thread:18f0abCDef12")).toBe( + "thread:18f0abCDef12", + ); + }); + it("rejects malformed targets", () => { expect(normalizeGmailTarget("not-an-address")).toBeNull(); expect(normalizeGmailTarget("thread:../mailbox")).toBeNull(); diff --git a/src/target.ts b/src/target.ts index 141d971..bda1e0d 100644 --- a/src/target.ts +++ b/src/target.ts @@ -12,7 +12,10 @@ export function normalizeEmailAddress(value: string): string | null { /** Parses the public Gmail target grammar into one typed variant. */ export function parseGmailTarget(value: string): GmailTarget | null { - const trimmed = value.trim(); + const raw = value.trim(); + const trimmed = raw.toLowerCase().startsWith("gmail:") + ? raw.slice("gmail:".length) + : raw; if (trimmed.startsWith("thread:")) { const threadId = trimmed.slice("thread:".length); return THREAD_ID_PATTERN.test(threadId) From 37e07097a5da684529e7c13a6239834824045242 Mon Sep 17 00:00:00 2001 From: Josh Lehman Date: Sun, 12 Jul 2026 09:34:57 -0700 Subject: [PATCH 14/14] gmail-883: close Gmail channel milestone --- .pebbles/events.jsonl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.pebbles/events.jsonl b/.pebbles/events.jsonl index 4985a78..cdc0953 100644 --- a/.pebbles/events.jsonl +++ b/.pebbles/events.jsonl @@ -36,3 +36,7 @@ {"type":"create","timestamp":"2026-07-12T14:04:34.94706Z","issue_id":"gmail-178","payload":{"description":"Add bounded attachment download/storage plus multi-recipient reply-all with independent allowTo checks for every To/Cc recipient. Cover MIME nesting, filename safety, size limits, and unsupported attachment behavior.","priority":"2","title":"Add Gmail attachments and reply-all","type":"task"}} {"type":"create","timestamp":"2026-07-12T14:04:35.041849Z","issue_id":"gmail-b74","payload":{"description":"Compare polling with History API cursors and Pub/Sub push notifications. Specify durable cursor storage, missed-history recovery, webhook authentication, operational requirements, and rate-limit behavior before implementation.","priority":"3","title":"Evaluate Gmail History API and push delivery","type":"task"}} {"type":"status_update","timestamp":"2026-07-12T14:08:41.12632Z","issue_id":"gmail-883.5","payload":{"status":"in_progress"}} +{"type":"comment","timestamp":"2026-07-12T16:34:53.232558Z","issue_id":"gmail-883.5","payload":{"body":"Validated with pnpm check (38 tests), dependency audit, package inspection, independent review, and runtime loading against OpenClaw origin/main 10853e82fdeb4939c8f3ed0f20697790a52fb617."}} +{"type":"close","timestamp":"2026-07-12T16:34:53.26207Z","issue_id":"gmail-883.5","payload":{}} +{"type":"comment","timestamp":"2026-07-12T16:34:53.290442Z","issue_id":"gmail-883","payload":{"body":"First milestone complete. Enhancements for outbound session reconciliation, OAuth setup, attachments/reply-all, and push delivery remain tracked separately."}} +{"type":"close","timestamp":"2026-07-12T16:34:53.317901Z","issue_id":"gmail-883","payload":{}}