diff --git a/apps/cli-docs/src/content/docs/agent-guidance.md b/apps/cli-docs/src/content/docs/agent-guidance.md index d712ed921..05203ce21 100644 --- a/apps/cli-docs/src/content/docs/agent-guidance.md +++ b/apps/cli-docs/src/content/docs/agent-guidance.md @@ -198,6 +198,35 @@ sentry release deploy my-org/1.0.0 production - `--auto` requires a Sentry repository integration (GitHub/GitLab/Bitbucket) **and** a local git checkout. It matches your `origin` remote against Sentry's repo list. Without a checkout, use `--local`. - With no flag, `set-commits` tries `--auto` first and falls back to `--local` on failure. +### View Agent Conversations + +```bash +# List recent agent conversations (org auto-detected) +sentry agent-conversation list + +# Explicit org, last 24 hours +sentry agent-conversation list my-org --period 24h + +# View a conversation transcript +sentry agent-conversation view my-org/conv-123 + +# JSON output for programmatic access +sentry agent-conversation view conv-123 --json +``` + +### Process WebAssembly Modules + +```bash +# Add a build id to a wasm module (no auth required) +sentry wasm-split app.wasm + +# Capture the build id for a later debug-files upload +BUILD_ID=$(sentry wasm-split app.wasm) + +# Split debug data into a companion and strip the shipped binary +sentry wasm-split app.wasm --debug-out app.debug.wasm --strip +``` + ### Arbitrary API Access ```bash diff --git a/apps/cli-docs/src/content/docs/agentic-usage.md b/apps/cli-docs/src/content/docs/agentic-usage.md index 5ec3c85b6..81012bb0a 100644 --- a/apps/cli-docs/src/content/docs/agentic-usage.md +++ b/apps/cli-docs/src/content/docs/agentic-usage.md @@ -56,6 +56,9 @@ With this skill, agents can: - **Query documentation** - Ask questions about Sentry setup and configuration with `sentry docs` - **Make API calls** - Execute arbitrary Sentry API requests - **Authenticate** - Help you set up CLI authentication +- **View agent conversations** - List and inspect AI agent conversation transcripts with `sentry agent-conversation` +- **Check service status** - Query the Sentry status page with `sentry status` (no auth required) +- **Process WebAssembly** - Add build IDs and split debug data from wasm modules with `sentry wasm-split` (no auth required) ## How It Works @@ -67,6 +70,7 @@ When you ask your agent about Sentry errors or want to investigate an issue, the - "What API endpoints exist for releases?" → `sentry schema releases` - "How do I set up source maps for Next.js?" → `sentry docs "source maps Next.js"` - "What is Sentry's status right now?" → `sentry status` +- "Show me recent agent conversations" → `sentry agent-conversation list` The CLI has dedicated commands for most Sentry tasks, so agents should prefer `sentry` commands over constructing raw API calls. The `sentry docs` command queries Sentry's documentation directly from the terminal, the `sentry schema` command provides built-in API exploration, and `sentry api` handles authenticated requests for anything not covered by a dedicated command. diff --git a/apps/cli-docs/src/fragments/commands/agent-conversation.md b/apps/cli-docs/src/fragments/commands/agent-conversation.md index ca9b2b2e3..9ae15932f 100644 --- a/apps/cli-docs/src/fragments/commands/agent-conversation.md +++ b/apps/cli-docs/src/fragments/commands/agent-conversation.md @@ -25,9 +25,12 @@ sentry agent-conversation list my-org -c next ### View a conversation transcript ```bash -# View full transcript -sentry agent-conversation view my-org conv-123 +# View full transcript (org auto-detected) +sentry agent-conversation view conv-123 + +# Explicit org (slash-separated) +sentry agent-conversation view my-org/conv-123 # JSON output -sentry agent-conversation view my-org conv-123 --json +sentry agent-conversation view my-org/conv-123 --json ``` diff --git a/packages/cli/AGENTS.md b/packages/cli/AGENTS.md index 8a2b147b2..7e46a48b4 100644 --- a/packages/cli/AGENTS.md +++ b/packages/cli/AGENTS.md @@ -113,10 +113,14 @@ Top-level layout: - **`src/bin.ts`** — entry point; **`src/app.ts`** — Stricli application setup; **`src/context.ts`** — dependency-injection context. -- **`src/commands/`** — one directory per command group (`auth`, `cli`, `dashboard`, - `event`, `issue`, `log`, `org`, `project`, `release`, `replay`, `repo`, `sourcemap`, - `span`, `team`, `trace`, `trial`, `local`, …) plus standalone command files - (`api.ts`, `explore.ts`, `help.ts`, `init.ts`, `schema.ts`). +- **`src/commands/`** — one directory per command group (`agent-conversation`, + `alert`, `auth`, `build`, `cli`, `code-mappings`, `dart-symbol-map`, + `dashboard`, `debug-files`, `docs`, `event`, `feedback`, `issue`, `local`, + `log`, `monitor`, `org`, `platform`, `proguard`, `project`, `react-native`, + `release`, `replay`, `repo`, `snapshots`, `sourcemap`, `span`, `status`, + `team`, `trace`, `trial`) plus standalone command files (`api.ts`, + `explore.ts`, `help.ts`, `info.ts`, `init.ts`, `schema.ts`, + `wasm-split.ts`). - **`src/lib/`** — shared utilities. Key subtrees: `api/` (domain API modules), `db/` (SQLite layer), `dsn/` (DSN detection, with per-language extractors under `dsn/languages/`), and `formatters/` (output formatting). See the file-locations diff --git a/packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md b/packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md index 9fb20ac1f..66c6161ba 100644 --- a/packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md +++ b/packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md @@ -210,6 +210,35 @@ sentry release deploy my-org/1.0.0 production - `--auto` requires a Sentry repository integration (GitHub/GitLab/Bitbucket) **and** a local git checkout. It matches your `origin` remote against Sentry's repo list. Without a checkout, use `--local`. - With no flag, `set-commits` tries `--auto` first and falls back to `--local` on failure. +#### View Agent Conversations + +```bash +# List recent agent conversations (org auto-detected) +sentry agent-conversation list + +# Explicit org, last 24 hours +sentry agent-conversation list my-org --period 24h + +# View a conversation transcript +sentry agent-conversation view my-org/conv-123 + +# JSON output for programmatic access +sentry agent-conversation view conv-123 --json +``` + +#### Process WebAssembly Modules + +```bash +# Add a build id to a wasm module (no auth required) +sentry wasm-split app.wasm + +# Capture the build id for a later debug-files upload +BUILD_ID=$(sentry wasm-split app.wasm) + +# Split debug data into a companion and strip the shipped binary +sentry wasm-split app.wasm --debug-out app.debug.wasm --strip +``` + #### Arbitrary API Access ```bash diff --git a/packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md b/packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md index cf5fe8217..dd6ffe1d6 100644 --- a/packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md +++ b/packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md @@ -74,11 +74,14 @@ View an agent conversation transcript **Examples:** ```bash -# View full transcript -sentry agent-conversation view my-org conv-123 +# View full transcript (org auto-detected) +sentry agent-conversation view conv-123 + +# Explicit org (slash-separated) +sentry agent-conversation view my-org/conv-123 # JSON output -sentry agent-conversation view my-org conv-123 --json +sentry agent-conversation view my-org/conv-123 --json ``` All commands also support `--json`, `--fields`, `--help`, `--log-level`, and `--verbose` flags.