feat(agentmail): 迁入 agentmail 技能包(13 个 skills),修正 baoyu-fetch 行尾并忽略 node_modules

This commit is contained in:
2026-09-15 06:57:11 +08:00
parent 832004bd6f
commit a9c4518b06
15 changed files with 591 additions and 5 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules/
.DS_Store

View File

@@ -0,0 +1,30 @@
---
name: "agentmail-agent"
description: "AgentMail: Operations on agent"
---
# agent
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail agent <method> [flags]
```
## API Resources
- `sign-up` — Sign Up
- `verify` — Verify
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail agent --schema
agentmail agent <method> --schema
# Human-readable help (for humans)
agentmail agent --help
```

View File

@@ -0,0 +1,42 @@
---
name: "agentmail-api-keys"
description: "AgentMail: Operations on api-keys"
---
# api-keys
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail api-keys <method> [flags]
```
## API Resources
- `cancel-browser-enrollment` — Cancel Browser Enrollment
- `create` — Create API Key
- `create-public-key` — Register Public-Key Credential
- `delete` — Delete API Key
- `delete-browser-consent` — Delete Browser Consent
- `delete-browser-credential` — Delete Browser Credential
- `list` — List API Keys
- `list-browser-consents` — List Browser Consents
- `list-browser-credential-events` — List Browser Credential Events
- `list-browser-credentials` — List Browser Credentials
- `list-public-keys` — List Public-Key Credentials
- `revoke-all-agent-id-sign-in-keys` — Revoke All AgentID Sign-In Keys
- `revoke-public-key` — Revoke Public-Key Credential
- `update-public-key-name` — Rename Public-Key Credential
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail api-keys --schema
agentmail api-keys <method> --schema
# Human-readable help (for humans)
agentmail api-keys --help
```

View File

@@ -0,0 +1,29 @@
---
name: "agentmail-auth"
description: "AgentMail: Operations on auth"
---
# auth
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail auth <method> [flags]
```
## API Resources
- `me` — Who Am I
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail auth --schema
agentmail auth <method> --schema
# Human-readable help (for humans)
agentmail auth --help
```

View File

@@ -0,0 +1,35 @@
---
name: "agentmail-domains"
description: "AgentMail: Operations on domains"
---
# domains
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail domains <method> [flags]
```
## API Resources
- `create` — Create Domain
- `delete` — Delete Domain
- `get` — Get Domain
- `get-zone-file` — Get Zone File
- `list` — List Domains
- `update` — Update Domain
- `verify` — Verify Domain
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail domains --schema
agentmail domains <method> --schema
# Human-readable help (for humans)
agentmail domains --help
```

View File

@@ -0,0 +1,31 @@
---
name: "agentmail-drafts"
description: "AgentMail: Operations on drafts"
---
# drafts
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail drafts <method> [flags]
```
## API Resources
- `get` — Get Draft
- `get-attachment` — Get Attachment
- `list` — List Drafts
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail drafts --schema
agentmail drafts <method> --schema
# Human-readable help (for humans)
agentmail drafts --help
```

View File

@@ -0,0 +1,104 @@
---
name: "agentmail-inboxes"
description: "AgentMail: Operations on inboxes"
---
# inboxes
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail inboxes <method> [flags]
```
## API Resources
- `create` — Create Inbox
- `delete` — Delete Inbox
- `get` — Get Inbox
- `list` — List Inboxes
- `update` — Update Inbox
### api-keys
- `create` — Create API Key
- `delete` — Delete API Key
- `list` — List API Keys
### browser-credentials
- `create-enrollment` — Create Browser Enrollment
### drafts
- `create` — Create Draft
- `delete` — Delete Draft
- `get` — Get Draft
- `get-attachment` — Get Attachment
- `list` — List Drafts
- `send` — Send Draft
- `update` — Update Draft
### events
- `list` — List Inbox Events
### lists
- `create` — Create List Entry
- `delete` — Delete List Entry
- `get` — Get List Entry
- `list` — List Entries
### messages
- `batch-get` — Batch Get Messages
- `batch-update` — Batch Update Messages
- `delete` — Delete Message
- `forward` — Forward Message
- `get` — Get Message
- `get-attachment` — Get Attachment
- `get-raw` — Get Raw Message
- `list` — List Messages
- `reply` — Reply To Message
- `reply-all` — Reply All Message
- `search` — Search Messages
- `send` — Send Message
- `update` — Update Message
### metrics
- `query-events` — Query Events
- `query-usage` — Query Usage
### threads
- `delete` — Delete Thread
- `get` — Get Thread
- `get-attachment` — Get Attachment
- `list` — List Threads
- `search` — Search Threads
- `update` — Update Thread
### webhooks
- `create` — Create Webhook
- `delete` — Delete Webhook
- `get` — Get Webhook
- `get-headers` — Get Webhook Headers
- `list` — List Webhooks
- `update` — Update Webhook
- `update-headers` — Update Webhook Headers
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail inboxes --schema
agentmail inboxes <method> --schema
# Human-readable help (for humans)
agentmail inboxes --help
```

View File

@@ -0,0 +1,32 @@
---
name: "agentmail-lists"
description: "AgentMail: Operations on lists"
---
# lists
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail lists <method> [flags]
```
## API Resources
- `create` — Create List Entry
- `delete` — Delete List Entry
- `get` — Get List Entry
- `list` — List Entries
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail lists --schema
agentmail lists <method> --schema
# Human-readable help (for humans)
agentmail lists --help
```

View File

@@ -0,0 +1,30 @@
---
name: "agentmail-metrics"
description: "AgentMail: Operations on metrics"
---
# metrics
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail metrics <method> [flags]
```
## API Resources
- `query-events` — Query Events
- `query-usage` — Query Usage
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail metrics --schema
agentmail metrics <method> --schema
# Human-readable help (for humans)
agentmail metrics --help
```

View File

@@ -0,0 +1,29 @@
---
name: "agentmail-organizations"
description: "AgentMail: Operations on organizations"
---
# organizations
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail organizations <method> [flags]
```
## API Resources
- `get` — Get Organization
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail organizations --schema
agentmail organizations <method> --schema
# Human-readable help (for humans)
agentmail organizations --help
```

View File

@@ -0,0 +1,93 @@
---
name: "agentmail-pods"
description: "AgentMail: Operations on pods"
---
# pods
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail pods <method> [flags]
```
## API Resources
- `create` — Create Pod
- `delete` — Delete Pod
- `get` — Get Pod
- `list` — List Pods
### api-keys
- `create` — Create API Key
- `delete` — Delete API Key
- `list` — List API Keys
### domains
- `create` — Create Domain
- `delete` — Delete Domain
- `get` — Get Domain
- `get-zone-file` — Get Zone File
- `list` — List Domains
- `update` — Update Domain
- `verify` — Verify Domain
### drafts
- `get` — Get Draft
- `get-attachment` — Get Attachment
- `list` — List Drafts
### inboxes
- `create` — Create Inbox
- `delete` — Delete Inbox
- `get` — Get Inbox
- `list` — List Inboxes
- `update` — Update Inbox
### lists
- `create` — Create List Entry
- `delete` — Delete List Entry
- `get` — Get List Entry
- `list` — List Entries
### metrics
- `query-events` — Query Events
- `query-usage` — Query Usage
### threads
- `delete` — Delete Thread
- `get` — Get Thread
- `get-attachment` — Get Attachment
- `list` — List Threads
- `search` — Search Threads
- `update` — Update Thread
### webhooks
- `create` — Create Webhook
- `delete` — Delete Webhook
- `get` — Get Webhook
- `get-headers` — Get Webhook Headers
- `list` — List Webhooks
- `update` — Update Webhook
- `update-headers` — Update Webhook Headers
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail pods --schema
agentmail pods <method> --schema
# Human-readable help (for humans)
agentmail pods --help
```

View File

@@ -0,0 +1,60 @@
---
name: "agentmail-shared"
description: "agentmail CLI: Shared patterns for authentication, global flags, and output formatting."
---
# agentmail — Shared Reference
## Authentication
- **BearerAuth** (bearer token): `AGENTMAIL_API_KEY` env var or keyring `agentmail:BearerAuth` (populated by `auth login`)
- **TokenAuth** (bearer token): `AGENTMAIL_TOKEN` env var or keyring `agentmail:TokenAuth` (populated by `auth login`)
These are alternative schemes for the same request — set **one** of:
```bash
export AGENTMAIL_API_KEY="<your-token>"
export AGENTMAIL_TOKEN="<your-token>"
```
Verify authentication resolves:
```bash
agentmail auth status
```
## Global Flags
These flags are available on every command in this CLI.
| Flag | Description | Default |
|------|-------------|---------|
| `--dry-run` | Validate locally without sending the request | |
| `--format <FMT>` | Output format: `json`, `table`, `yaml`, `csv`, `raw`, `jsonl`, `http` | `table` on a TTY, `json` when piped |
| `--base-url <URL>` | Override the API base URL | |
| `--params <JSON>` | URL/query/path parameters as JSON | |
| `--json <JSON>` | Request body for POST/PATCH/PUT | |
| `--no-retry` | Disable retries | |
| `--no-extract` | Print the full response body | |
## Output Formatting
```bash
# JSON (default)
agentmail <resource> <method> --format json
# Table view
agentmail <resource> <method> --format table
# Pipe-friendly: jq, grep, etc.
agentmail <resource> <method> | jq '.fieldName'
```
## Dry Run
Use `--dry-run` to preview the HTTP request without sending it:
```bash
agentmail <resource> <method> --dry-run
```

View File

@@ -0,0 +1,34 @@
---
name: "agentmail-threads"
description: "AgentMail: Operations on threads"
---
# threads
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail threads <method> [flags]
```
## API Resources
- `delete` — Delete Thread
- `get` — Get Thread
- `get-attachment` — Get Attachment
- `list` — List Threads
- `search` — Search Threads
- `update` — Update Thread
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail threads --schema
agentmail threads <method> --schema
# Human-readable help (for humans)
agentmail threads --help
```

View File

@@ -0,0 +1,35 @@
---
name: "agentmail-webhooks"
description: "AgentMail: Operations on webhooks"
---
# webhooks
> **PREREQUISITE:** Read `../agentmail-shared/SKILL.md` for auth, global flags, and output formatting. If missing, run `agentmail generate-skills` to create it.
```bash
agentmail webhooks <method> [flags]
```
## API Resources
- `create` — Create Webhook
- `delete` — Delete Webhook
- `get` — Get Webhook
- `get-headers` — Get Webhook Headers
- `list` — List Webhooks
- `update` — Update Webhook
- `update-headers` — Update Webhook Headers
## Discovering Commands
**Agents: always prefer `--schema` over `--help`** — `--schema` returns JSON; `--help` returns human prose.
```bash
# Machine-readable surface (use this)
agentmail webhooks --schema
agentmail webhooks <method> --schema
# Human-readable help (for humans)
agentmail webhooks --help
```

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env sh
set -eu
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec bun "$script_dir/lib/cli.ts" "$@"
#!/usr/bin/env sh
set -eu
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
exec bun "$script_dir/lib/cli.ts" "$@"