Compare commits

...

4 Commits

Author SHA1 Message Date
acp-release-bot[bot]
764fb84f9f chore(main): release 0.113.0 (#1713)
🤖 I have created a release *beep* *boop*
---


##
[0.113.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.112.0...v0.113.0)
(2026-11-26)


### Features

* serve /plugin in ACP sessions
([#1716](https://github.com/agentclientprotocol/claude-agent-acp/issues/1716))
([0f095f6](0f095f678d))
* start Remote Control with the session when Claude Code asks for it
([#1523](https://github.com/agentclientprotocol/claude-agent-acp/issues/1523))
([893f768](893f7680c7))


### Bug Fixes

* **background:** keep a tool call whose task joins the live set after
its result
([#1639](https://github.com/agentclientprotocol/claude-agent-acp/issues/1639))
([677a6d9](677a6d9afa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: acp-release-bot[bot] <246668977+acp-release-bot[bot]@users.noreply.github.com>
2026-11-26 14:34:17 +01:00
Mark Tkachenko
0f095f678d feat: serve /plugin in ACP sessions (#1716)
Closes #580.

In an ACP session, `/plugin …` (and its aliases `/plugins`,
`/marketplace`) answers "/plugin isn't available in this environment."
Claude Code defines `/plugin` as an Ink-only `local-jsx` command and
refuses it outside the interactive terminal by design, so the adapter
can't just forward it. The adapter now serves it itself, as it already
does for `/remote-control`.
2026-11-26 14:01:08 +01:00
PerryLink
677a6d9afa fix(background): keep a tool call whose task joins the live set after its result (#1639)
## What

A `Monitor` or `Workflow` call whose task joins Claude Code's live
background set after the call's result now stays that task's entity: the
call is kept `in_progress`, and a later level names it instead of
`adoptTasks()` starting a separate `task_<taskId>` card.

I have not seen this order with the real CLI; #1537 described it from
the adapter's own tests. The SDK promises no order between a tool result
and `background_tasks_changed`, so it can happen.

## Why

`toolResults()` kept a task call only when the live set (the list of
running tasks that Claude Code sends in `background_tasks_changed`)
already named the task; when the level named it later, the call had
ended and `adoptTasks()` could start a separate card. This ports the fix
from the closed branch #1537 to current main, where
`src/background-work.ts` no longer exists:

- `toolResults()` keeps the call in `toolCalls` with an `unleveled` flag
when the level does not name the task yet, and keeps that call running
in the result's own updates. A task that already ended before the result
is remembered (`endedTasks`), so its call is not kept for a level that
can no longer name it;
- `levelChanged()` clears the flag and reports the call `in_progress`
when the level names the task; if the task is not the call's (for
example a `local_bash` task of a PowerShell call), the call ends
`completed` as its result reported it, before the level publishes;
- one `keepsTaskCall()` helper applies the existing rule in both places
— always skip `local_agent`, and skip `local_bash` only when the tool is
not in `TASK_TOOLS` (Claude Code reports a Monitor's task as
`local_bash`) — so the two copies cannot drift apart again;
- because the call lives in `toolCalls`, `closeTurn()`, `queryEnded()`
and `backgroundCalls()` end it as they end any background call.

Comments in the file header, `levelChanged()`, `adoptTasks()` and the
`task_<taskId>` example match the behaviour.

## Tests

In `src/tests/v2/acp-v2.test.ts`:

- `it.each` over a Monitor (`local_bash` task, as the CLI sends it) and
a Workflow whose level arrives after the result: the whole trace asserts
the call goes `pending` → `in_progress` (result) → `in_progress`
(level), never `completed` before the notification, and no
`task_<taskId>` card is listed;
- a Monitor call whose task ends before the result arrives (level,
`task_started`, `task_notification`, a level without the task, then the
result): the call stays `completed` and is unlisted — this order failed
on the previous revision;
- a PowerShell call whose level names a `local_bash` task that is not
the call's: the call ends `completed` rather than staying `in_progress`;
- `monitorStarts()` gained a result-first order; the Workflow helper
reuses the `workflow` task constant.

```console
$ npx tsc --noEmit       # clean
$ npx eslint src/v2/tasks.ts src/tests/v2/acp-v2.test.ts
$ npx prettier --check src/v2/tasks.ts src/tests/v2/acp-v2.test.ts
$ npx vitest run src/tests/v2/   # 555 passed, 4 skipped
```

I also applied the patch to current `main` (`9d71d12`) locally: it
applies cleanly and `src/tests/v2/` is 567 passed / 5 skipped there. The
PR branch itself is not rebased.

## Related

Supersedes #1537, which was based on the removed
`src/background-work.ts`. The Monitor-as-`local_bash` task type comes
from #1606.

---------

Co-authored-by: Andrey Bragin <andrey.bragin@jetbrains.com>
2026-11-25 16:28:25 +01:00
Jeremy Espinoza
893f7680c7 feat: start Remote Control with the session when Claude Code asks for it (#1523)
Closes #1396.

Terminal sessions connect to Remote Control on their own when
`remoteControlAtStartup` is on. Sessions started over ACP don't, so you
have to type `/remote-control` in each one.

Claude Code already reports this at startup: `initializationResult()`
includes `remote_control_auto_enable`. When it's true, the adapter now
turns Remote Control on right after the session is set up, with the same
`enableRemoteControl` call that `/remote-control` uses.

- It works for new, loaded, resumed and forked sessions, on ACP v1 and
v2. It runs once per query, so a session whose query restarts (after a
provider change or a sign-out, for example) connects again, since Remote
Control ended with the old query. A `/remote-control off` holds across
those restarts: the new query doesn't turn it back on. On v1, a plan
approved with a fresh context also restarts the query, but in the middle
of the turn, so it doesn't connect then.
- The result goes out as a notice instead of an agent message, since
nothing is mid-turn at that point. Clients without notice support get a
transcript line.
- A notice can't be withdrawn, so it says "Remote Control connected" (an
event) rather than "is active", which `/remote-control off` would make
untrue.
- Like `/remote-control`, it holds prompts back while it connects, and
it does nothing while Claude is already working. On v1, a
`/remote-control` sent while it connects is refused ("Try again in a
moment"), as during another `/remote-control`.
- `remote_control_auto_enable` isn't in the SDK's published types, so
it's typed locally like `enableRemoteControl`. A missing field means
off.
- Both cores share the startup steps through `RemoteControlAtStartup` in
`src/remote-control.ts`, beside the existing Remote Control helpers.
Each core holds prompts back and sends the notice its own way: v2 in
`src/v2/remote-control.ts`, v1 in the new `src/v1/remote-control.ts`,
which `/remote-control` now uses too.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Andrey Bragin <andrey.bragin@jetbrains.com>
2026-11-25 16:08:07 +01:00
119 changed files with 4767 additions and 392 deletions

View File

@@ -1,3 +1,3 @@
{
".": "0.112.0"
".": "0.113.0"
}

View File

@@ -1,5 +1,18 @@
# Changelog
## [0.113.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.112.0...v0.113.0) (2026-11-26)
### Features
* serve /plugin in ACP sessions ([#1716](https://github.com/agentclientprotocol/claude-agent-acp/issues/1716)) ([0f095f6](https://github.com/agentclientprotocol/claude-agent-acp/commit/0f095f678dac9cf4a7ca3623261fa3f6729e73b0))
* start Remote Control with the session when Claude Code asks for it ([#1523](https://github.com/agentclientprotocol/claude-agent-acp/issues/1523)) ([893f768](https://github.com/agentclientprotocol/claude-agent-acp/commit/893f7680c7ed57be7fc7be7f4e9abac268884ff2))
### Bug Fixes
* **background:** keep a tool call whose task joins the live set after its result ([#1639](https://github.com/agentclientprotocol/claude-agent-acp/issues/1639)) ([677a6d9](https://github.com/agentclientprotocol/claude-agent-acp/commit/677a6d9afab3c7bad41fdf2587a24b2414236b29))
## [0.112.0](https://github.com/agentclientprotocol/claude-agent-acp/compare/v0.111.0...v0.112.0) (2026-11-24)

View File

@@ -19,6 +19,7 @@ This tool implements an ACP agent by using the official [Claude Agent SDK](https
- Client MCP servers, including the ones that the client serves over the ACP connection ([MCP-over-ACP](https://agentclientprotocol.com/rfds/mcp-over-acp), `"type": "acp"`). Where an organization's managed settings (`disableSideloadFlags`) keep them out, a session starts without them and says so in a notice
- An Ultracode session config option, which turns on Claude Code's dynamic workflows for every task. It appears when dynamic workflows are enabled and the model supports ultracode (any model with `xhigh` effort)
- `/mcp` in the chat: the MCP server status as a list. The adapter runs `/mcp reconnect`, `/mcp enable`, and `/mcp disable` through the SDK control API, because Claude Code refuses them in SDK mode. A reconnect of an ACP server that needs authentication starts MCP OAuth through URL elicitation
- `/plugin` (aliases `/plugins`, `/marketplace`) in the chat: the adapter runs `claude plugin …` for install, uninstall, enable, disable, update, and list, and `marketplace add|list|remove|update`, because Claude Code refuses `/plugin` in SDK mode, then reloads the session's plugins. It is not available in remote (`sdk-url`) sessions
- Prompt suggestions: the prompt that Claude Code predicts the user sends next, as ACP's unstable `prompt_suggestions_update`, for a client that advertises `session.promptSuggestions`
- Session-scoped long-running goals for AIR through the [goal extension](docs/air-extensions.md#goal) under `_meta.jetbrains.air.goal`
- Structured errors, recovery, and warnings through the opt-in [session failure extension](docs/air-extensions.md#session-failure)

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@agentclientprotocol/claude-agent-acp",
"version": "0.112.0",
"version": "0.113.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@agentclientprotocol/claude-agent-acp",
"version": "0.112.0",
"version": "0.113.0",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "2.12.0",

View File

@@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "0.112.0",
"version": "0.113.0",
"description": "An ACP-compatible coding agent powered by the Claude Agent SDK (TypeScript)",
"main": "dist/lib.js",
"types": "dist/lib.d.ts",

146
src/adapter-command.ts Normal file
View File

@@ -0,0 +1,146 @@
/**
* The commands the adapter serves itself instead of passing to Claude Code
* (`/remote-control` and `/plugin`), in one place so that the command list and
* the dispatch in the v1 and v2 cores apply the same rule.
*/
import type { AvailableCommand } from "@agentclientprotocol/sdk/unstable";
import type { Query, SlashCommand } from "@anthropic-ai/claude-agent-sdk";
import { claudeCliPath, isRemoteSession } from "./claude-cli.js";
import type { NewSessionMeta } from "./new-session-meta.js";
import {
parsePluginCommand,
pluginCommandMarkdown,
PLUGIN_AVAILABLE_COMMAND,
PLUGIN_COMMAND_NAME,
runPluginCommand,
} from "./plugin-command.js";
import {
adapterRemoteControlCommand,
claudeCodeOffersCommand,
parseRemoteControlCommand,
REMOTE_CONTROL_COMMAND_NAME,
type RemoteControlCommand,
runRemoteControlCommand,
supportsRemoteControl,
} from "./remote-control.js";
type PromptContent = ReadonlyArray<{ type: string; text?: unknown }>;
export interface AdapterCommand {
readonly name: typeof REMOTE_CONTROL_COMMAND_NAME | typeof PLUGIN_COMMAND_NAME;
/** The `RequestError` text while Claude is working. */
readonly busyMessage: string;
/** The `RequestError` text while another adapter command runs. */
readonly inFlightMessage: string;
/** What `/remote-control` was asked to do. A core records it before the
* command runs, so that a restart of the query keeps what the user chose
* (see `RemoteControlAtStartup.commandRan`). */
readonly remoteControl?: RemoteControlCommand;
/** Returns the reply text. A failure is in the text: this never throws. */
run(signal: AbortSignal): Promise<string>;
}
export interface AdapterCommandContext {
cwd: string;
env: Record<string, string | undefined>;
/** The session runs Claude Code remotely (`sdk-url`). */
remoteSession: boolean;
query: () => Query | undefined;
logError: (message: string) => void;
}
/** The session's client options (`_meta.claudeCode.options`) that decide where
* an adapter command runs: the CLI's `env`, and whether Claude Code is remote. */
export function sessionAdapterOptions(creationParams: { _meta?: unknown } | undefined): {
env: Record<string, string | undefined>;
remoteSession: boolean;
} {
const options = (creationParams?._meta as NewSessionMeta | undefined)?.claudeCode?.options;
return {
env: { ...process.env, ...options?.env },
remoteSession: isRemoteSession(options?.extraArgs),
};
}
const REMOTE_CONTROL_ENTRY: AvailableCommand = {
name: REMOTE_CONTROL_COMMAND_NAME,
description:
"Continue this session from claude.ai/code or the Claude mobile app; `off` disconnects",
input: { hint: "[session name | off]" },
};
/** A cheap synchronous check for the cores, before any await: the prompt has
* the form of an adapter command. Whether the adapter serves it is
* {@link adapterCommand}'s decision. */
export function mayBeAdapterCommand(prompt: PromptContent): boolean {
return parseRemoteControlCommand(prompt) !== null || parsePluginCommand(prompt) !== null;
}
/** The adapter command of `prompt` that the adapter runs, or `null` for a
* prompt that goes to Claude Code. */
export async function adapterCommand(
prompt: PromptContent,
query: Query,
terminalCommands: readonly string[] | undefined,
context: AdapterCommandContext,
): Promise<AdapterCommand | null> {
const remoteControl = await adapterRemoteControlCommand(prompt, query, terminalCommands);
if (remoteControl) {
return {
name: REMOTE_CONTROL_COMMAND_NAME,
busyMessage:
"Remote Control can't be changed while Claude is working. Try again when the turn ends.",
inFlightMessage: "Remote Control is already being changed. Try again in a moment.",
remoteControl: remoteControl.command,
run: () =>
runRemoteControlCommand(remoteControl.query, remoteControl.command, context.logError),
};
}
const command = parsePluginCommand(prompt);
// A session with `sdk-url` runs Claude Code on another machine; the CLI that
// the adapter would start here changes the plugins of this machine instead.
if (!command || context.remoteSession) return null;
const typed = typedCommandName(prompt);
if (claudeCodeOffersCommand(await query.supportedCommands(), terminalCommands, typed)) {
return null;
}
return {
name: PLUGIN_COMMAND_NAME,
busyMessage: "/plugin can't run while Claude is working. Try again when the turn ends.",
inFlightMessage: "Another command is still running. Try again in a moment.",
run: async (signal) =>
pluginCommandMarkdown(
await runPluginCommand(command, {
cliPath: claudeCliPath,
cwd: context.cwd,
env: context.env,
signal,
query: context.query,
logError: context.logError,
}),
),
};
}
/** The name the user typed: `plugin`, `plugins` or `marketplace`. */
function typedCommandName(prompt: PromptContent): string {
const text = typeof prompt[0]?.text === "string" ? prompt[0].text : "";
return /^\/([^\s]+)/.exec(text.trim())?.[1] ?? PLUGIN_COMMAND_NAME;
}
/** The entries of `available_commands_update` that the adapter serves,
* without those that Claude Code offers under the same name. */
export function adapterAvailableCommands(
commands: readonly SlashCommand[],
terminalCommands: readonly string[] | undefined,
query: Query | undefined,
{ remoteSession }: { remoteSession: boolean },
): AvailableCommand[] {
const entries: AvailableCommand[] = [];
if (query && supportsRemoteControl(query)) entries.push(REMOTE_CONTROL_ENTRY);
if (!remoteSession) entries.push(PLUGIN_AVAILABLE_COMMAND);
return entries.filter(
(entry) => !claudeCodeOffersCommand(commands, terminalCommands, entry.name),
);
}

View File

@@ -34,6 +34,13 @@ export async function claudeCliPath(): Promise<string> {
/** How an option reaches the Claude CLI: in a flag, or over stdin in the SDK's initialize request. */
type Delivery = NonNullable<Options["mcpServersDelivery"]>;
/** Whether the client's `extraArgs` name `sdk-url`: a remote session. */
export function isRemoteSession(clientExtraArgs: Options["extraArgs"]): boolean {
return Object.keys(clientExtraArgs ?? {}).some(
(name) => name === "sdk-url" || name.startsWith("sdk-url="),
);
}
/**
* The SDK options that say how a session's MCP servers and its `settings`
* reach the CLI of {@link claudeCliPath}. A client's own options replace them.
@@ -65,9 +72,7 @@ export function cliDelivery(clientExtraArgs: Options["extraArgs"]): {
settingsDelivery: Delivery;
} {
const delivery = process.env.CLAUDE_CODE_EXECUTABLE ? "argv" : "initialize";
const settingsInFlag = Object.keys(clientExtraArgs ?? {}).some(
(name) => name === "settings" || name === "sdk-url" || name.startsWith("sdk-url="),
);
const settingsInFlag = "settings" in (clientExtraArgs ?? {}) || isRemoteSession(clientExtraArgs);
return { mcpServersDelivery: delivery, settingsDelivery: settingsInFlag ? "argv" : delivery };
}

View File

@@ -1,6 +1,6 @@
import type { AvailableCommand } from "@agentclientprotocol/sdk/unstable";
import type { McpServerStatus, Query } from "@anthropic-ai/claude-agent-sdk";
import { escapeMarkdown } from "./usage-markdown.js";
import { codeSpan, escapeMarkdown } from "./usage-markdown.js";
import { raceTimeoutAndAbort } from "./utils.js";
/** The `/mcp` entry of `available_commands_update`. The adapter shows the
@@ -105,20 +105,6 @@ function needsReconnect(status: McpServerStatus): boolean {
);
}
/** The text as a Markdown code span. The fence is longer than the longest
* backtick run in the text, so the span shows the text unchanged. The user
* can copy a server name from it into `/mcp reconnect`. */
function codeSpan(text: string): string {
const longestRun = Math.max(0, ...(text.match(/`+/g) ?? []).map((run) => run.length));
const fence = "`".repeat(longestRun + 1);
// CommonMark strips one space from each end of a span that is not all spaces
// (line endings count as spaces), so a pad keeps the text unchanged. Plain
// string checks, not one regex: `^ .*[^ ].* $` backtracks quadratically.
const strippedByCommonMark = text.startsWith(" ") && text.endsWith(" ") && /[^ \r\n]/.test(text);
const pad = text.startsWith("`") || text.endsWith("`") || strippedByCommonMark ? " " : "";
return `${fence}${pad}${text}${pad}${fence}`;
}
function isErrorCode(segment: string): boolean {
return /^-?\d+$/.test(segment);
}

793
src/plugin-command.ts Normal file
View File

@@ -0,0 +1,793 @@
/**
* `/plugin` (aliases `/plugins`, `/marketplace`), which the adapter serves
* itself. Claude Code's own `/plugin` is an interactive terminal screen and
* answers "/plugin isn't available in this environment." in a session without
* a terminal, which is every ACP session. The adapter instead runs the CLI's
* `claude plugin ...` commands, which have a `--json` form, and then reloads
* the live session so the new plugin's commands, skills and MCP servers appear.
*
* Plugins bring hooks and MCP servers that run as the user, so the set of
* commands and flags below is an allowlist, and it is the only guard. Anything
* outside it, such as `-y`, `--accept-command` or `--json`, gets the usage
* text and never reaches the CLI. Shared by the v1 core and the v2 core.
*/
import { execFile } from "node:child_process";
import type { AvailableCommand } from "@agentclientprotocol/sdk/unstable";
import type { Query } from "@anthropic-ai/claude-agent-sdk";
import { codeSpan, escapeMarkdown } from "./usage-markdown.js";
/** The content blocks of a prompt, in v1 or v2 form: the command is one text block. */
type PromptContent = ReadonlyArray<{ type: string; text?: unknown }>;
export const PLUGIN_COMMAND_NAME = "plugin";
/** The `/plugin` entry of `available_commands_update`. */
export const PLUGIN_AVAILABLE_COMMAND: AvailableCommand = {
name: PLUGIN_COMMAND_NAME,
description: "Manage Claude Code plugins and marketplaces",
input: { hint: "[install|uninstall|enable|disable|update|list|marketplace …] …" },
};
/** The CLI operations that the adapter runs. */
export type PluginCliOperation =
| "list"
| "install"
| "uninstall"
| "enable"
| "disable"
| "update"
| "marketplace-add"
| "marketplace-list"
| "marketplace-remove"
| "marketplace-update";
export type PluginOperation = PluginCliOperation | "overview" | "usage";
export type PluginCommand =
/** Bare `/plugin` and `/plugin help`: usage, installed plugins and marketplaces. */
| { kind: "overview" }
/** Anything outside the allowlist, or a missing argument. `reason` says which. */
| { kind: "usage"; reason?: string }
/** One CLI run. `argv` is what follows `claude plugin`, without `--json`.
* `target` is the plugin or marketplace name the command is about, if it has one. */
| { kind: "cli"; operation: PluginCliOperation; argv: string[]; target?: string };
const SCOPES = ["user", "project", "local"];
type FlagKind = "bool" | "value" | "list" | "variadic";
interface FlagSpec {
/** The flag's names, such as `["-s", "--scope"]`. The first is its key. */
names: string[];
kind: FlagKind;
/** The allowed values; any value if absent. */
values?: string[];
}
interface Scanned {
positionals: string[];
/** Per flag key: `true` for a bool, else the values in the order given. */
flags: Map<string, true | string[]>;
}
const SCOPE_FLAG: FlagSpec = { names: ["-s", "--scope"], kind: "value", values: SCOPES };
/** Splits `tokens` into positionals and the flags of `specs`. Any other token
* that starts with `-` is an error, so no user text becomes a CLI option. */
function scan(tokens: string[], specs: FlagSpec[]): Scanned | { error: string | undefined } {
const positionals: string[] = [];
const flags = new Map<string, true | string[]>();
for (let i = 0; i < tokens.length; i++) {
let token = tokens[i]!;
if (!token.startsWith("-")) {
positionals.push(token);
continue;
}
if (token === "-h" || token === "--help") return { error: undefined };
let inline: string | undefined;
const equals = token.startsWith("--") ? token.indexOf("=") : -1;
if (equals > 0) {
inline = token.slice(equals + 1);
token = token.slice(0, equals);
if (inline.startsWith("-")) return { error: `\`${token}\` needs a value.` };
}
const spec = specs.find((candidate) => candidate.names.includes(token));
if (!spec) return { error: `\`${token}\` is not supported here.` };
const key = spec.names[0]!;
if (spec.kind === "bool") {
if (inline !== undefined) return { error: `\`${token}\` takes no value.` };
flags.set(key, true);
continue;
}
const values: string[] = [];
if (inline !== undefined) {
values.push(inline);
} else if (spec.kind === "variadic") {
while (i + 1 < tokens.length && !tokens[i + 1]!.startsWith("-")) values.push(tokens[++i]!);
} else if (i + 1 < tokens.length && !tokens[i + 1]!.startsWith("-")) {
values.push(tokens[++i]!);
}
if (values.length === 0 || values.some((value) => value === "")) {
return { error: `\`${token}\` needs a value.` };
}
if (spec.values && !values.every((value) => spec.values!.includes(value))) {
return { error: `\`${token}\` takes one of ${spec.values.join(", ")}.` };
}
const previous = flags.get(key);
if (previous !== undefined && spec.kind !== "list" && spec.kind !== "variadic") {
return { error: `\`${token}\` is given twice.` };
}
flags.set(key, [...(Array.isArray(previous) ? previous : []), ...values]);
}
return { positionals, flags };
}
function flagArgs(scanned: Scanned, specs: FlagSpec[]): string[] {
const args: string[] = [];
for (const spec of specs) {
const key = spec.names[0]!;
const value = scanned.flags.get(key);
if (value === undefined) continue;
const flag = spec.names.find((name) => name.startsWith("--")) ?? key;
if (value === true) args.push(flag);
else if (spec.kind === "list") for (const item of value) args.push(flag, item);
else args.push(flag, ...value);
}
return args;
}
const USAGE_PLUGIN_ARGUMENT = "Give a plugin name, as `name` or `name@marketplace`.";
/** Parses the arguments of a CLI subcommand into a `cli` command. */
function parseSubcommand(
operation: PluginCliOperation,
words: string[],
specs: FlagSpec[],
prefix: string[],
options: { positional: "none" | "one" | "optional"; missing?: string },
): PluginCommand {
const scanned = scan(words, specs);
if ("error" in scanned) return { kind: "usage", reason: scanned.error };
const max = options.positional === "none" ? 0 : 1;
if (scanned.positionals.length > max) {
return { kind: "usage", reason: `Unexpected argument \`${scanned.positionals[max]}\`.` };
}
if (options.positional === "one" && scanned.positionals.length === 0) {
return { kind: "usage", reason: options.missing };
}
const target = scanned.positionals[0];
return {
kind: "cli",
operation,
argv: [...prefix, ...scanned.positionals, ...flagArgs(scanned, specs)],
...(target === undefined ? {} : { target }),
};
}
const LIST_FLAGS: FlagSpec[] = [{ names: ["--available"], kind: "bool" }];
const INSTALL_FLAGS: FlagSpec[] = [
SCOPE_FLAG,
{ names: ["--marketplace"], kind: "value" },
{ names: ["--config"], kind: "list" },
];
const UNINSTALL_FLAGS: FlagSpec[] = [SCOPE_FLAG, { names: ["--keep-data"], kind: "bool" }];
const ENABLE_FLAGS: FlagSpec[] = [SCOPE_FLAG];
const DISABLE_FLAGS: FlagSpec[] = [SCOPE_FLAG, { names: ["-a", "--all"], kind: "bool" }];
const MARKETPLACE_ADD_FLAGS: FlagSpec[] = [SCOPE_FLAG, { names: ["--sparse"], kind: "variadic" }];
function parseMarketplace(words: string[]): PluginCommand {
const [sub, ...rest] = words;
switch (sub) {
case "add":
return parseSubcommand(
"marketplace-add",
rest,
MARKETPLACE_ADD_FLAGS,
["marketplace", "add"],
{
positional: "one",
missing: "Give a marketplace source: a GitHub `owner/repo`, a git URL, or a path.",
},
);
case "list":
case "ls":
return parseSubcommand("marketplace-list", rest, [], ["marketplace", "list"], {
positional: "none",
});
case "remove":
case "rm":
return parseSubcommand("marketplace-remove", rest, [SCOPE_FLAG], ["marketplace", "remove"], {
positional: "one",
missing: "Give the name of the marketplace to remove.",
});
case "update":
return parseSubcommand("marketplace-update", rest, [], ["marketplace", "update"], {
positional: "optional",
});
default:
return { kind: "usage" };
}
}
/**
* Parses `/plugin ...` (also `/plugins ...` and `/marketplace ...`, which are
* aliases: `/marketplace marketplace add x` is `/plugin marketplace add x`,
* and `/marketplace add x` is usage, like `/plugin add x`) from a single-text
* prompt. `null` for any other prompt, which goes to Claude Code.
*/
export function parsePluginCommand(prompt: PromptContent): PluginCommand | null {
const [first] = prompt;
if (prompt.length !== 1 || first?.type !== "text" || typeof first.text !== "string") return null;
// Check the first word before splitting, so a long prompt is not split into words.
const text = first.text.trim();
if (!/^\/(?:plugins?|marketplace)(?:\s|$)/.test(text)) return null;
const [, ...words] = text.split(/\s+/);
const [sub, ...rest] = words;
switch (sub) {
case undefined:
case "help":
return { kind: "overview" };
case "list":
case "ls":
return parseSubcommand("list", rest, LIST_FLAGS, ["list"], { positional: "none" });
case "install":
case "i":
return parseSubcommand("install", rest, INSTALL_FLAGS, ["install"], {
positional: "one",
missing: USAGE_PLUGIN_ARGUMENT,
});
case "uninstall":
case "remove":
case "rm":
return parseSubcommand("uninstall", rest, UNINSTALL_FLAGS, ["uninstall"], {
positional: "one",
missing: USAGE_PLUGIN_ARGUMENT,
});
case "enable":
return parseSubcommand("enable", rest, ENABLE_FLAGS, ["enable"], {
positional: "one",
missing: USAGE_PLUGIN_ARGUMENT,
});
case "disable": {
const command = parseSubcommand("disable", rest, DISABLE_FLAGS, ["disable"], {
positional: "optional",
});
if (command.kind !== "cli") return command;
const all = command.argv.includes("--all");
if (all === (command.target !== undefined)) {
return {
kind: "usage",
reason: all
? "Give either a plugin name or `--all`, not both."
: `${USAGE_PLUGIN_ARGUMENT} Or use \`--all\` to disable every plugin.`,
};
}
return command;
}
case "update":
return parseSubcommand("update", rest, [SCOPE_FLAG], ["update"], {
positional: "one",
missing: USAGE_PLUGIN_ARGUMENT,
});
case "marketplace":
case "market":
return parseMarketplace(rest);
default:
return { kind: "usage", reason: `Unknown subcommand \`${sub}\`.` };
}
}
export type PluginReload = {
status: "applied" | "busy" | "failed" | "unavailable";
/** The names of the plugins the session has after a reload; with `applied`. */
plugins?: string[];
/** Why the reload failed; with `failed`. */
error?: string;
};
export interface PluginCommandResult {
ok: boolean;
operation: PluginOperation;
/** The CLI's own message, or the adapter's when the CLI did not run or did not answer. */
message: string;
/** The CLI's `failureCode`, such as `not_found` or `command_source_refused`. */
failureCode?: string;
/** With `command_source_refused`: the command that the marketplace declares as the install. */
shownCommand?: string;
/** With `shownCommand`: the terminal command that lets the user confirm it. */
terminalCommand?: string;
/** The parsed `--json` output of a list: an array, or `{installed, available}`; for an overview, `{plugins, marketplaces}` plus `pluginsError` or `marketplacesError` for a list that failed. */
data?: unknown;
reload?: PluginReload;
}
export interface ExecOptions {
cwd: string;
env: Record<string, string | undefined>;
signal: AbortSignal;
timeoutMs: number;
}
export interface ExecOutput {
stdout: string;
stderr: string;
/** The exit code. A run that ends with a non-zero code is a result, not an error. */
code: number;
}
/** Runs a program without a shell. Rejects when it cannot start, is aborted,
* times out, or prints too much. */
export type ExecLike = (file: string, args: string[], options: ExecOptions) => Promise<ExecOutput>;
export interface PluginCommandDeps {
cliPath: () => Promise<string>;
cwd: string;
env: Record<string, string | undefined>;
signal: AbortSignal;
/** Read after the CLI ends: the session's query can be replaced while it runs. */
query: () => Query | undefined;
logError: (message: string) => void;
exec?: ExecLike;
}
/** The time that one CLI run can take. A git clone of a marketplace is the slow case. */
const PLUGIN_CLI_TIMEOUT_MS = 5 * 60_000;
const MAX_OUTPUT_BYTES = 16 * 1024 * 1024;
const defaultExec: ExecLike = (file, args, options) =>
new Promise((resolve, reject) => {
const child = execFile(
file,
args,
{
cwd: options.cwd,
env: options.env,
signal: options.signal,
timeout: options.timeoutMs,
maxBuffer: MAX_OUTPUT_BYTES,
encoding: "utf8",
},
(error, stdout, stderr) => {
if (!error) return resolve({ stdout, stderr, code: 0 });
if (typeof error.code === "number") return resolve({ stdout, stderr, code: error.code });
if (error.killed && !options.signal.aborted) {
return reject(new Error(`Timed out after ${options.timeoutMs / 60_000} minutes.`));
}
reject(error);
},
);
// The CLI must not wait on a terminal that does not exist.
child.stdin?.end();
});
/** The operations after which the live session reloads its plugins. */
const RELOADING_OPERATIONS: ReadonlySet<PluginOperation> = new Set([
"install",
"uninstall",
"enable",
"disable",
"update",
"marketplace-remove",
]);
type CliRun =
| { type: "cancelled" }
| { type: "error"; message: string }
| { type: "done"; code: number; stdout: string; stderr: string };
interface CliJson {
outcome?: unknown;
message?: unknown;
failureCode?: unknown;
alreadyInGoalState?: unknown;
shownCommand?: unknown;
}
function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
/** The result line of a `--json` run: the last non-empty line of stdout. The
* CLI can print human-readable lines before it. */
function lastJsonLine(stdout: string): CliJson | undefined {
const lines = stdout.split(/\r?\n/).filter((line) => line.trim() !== "");
const last = lines[lines.length - 1];
if (last === undefined) return undefined;
try {
const parsed: unknown = JSON.parse(last);
return isRecord(parsed) ? (parsed as CliJson) : undefined;
} catch {
return undefined;
}
}
/** The whole of stdout as JSON: a list prints an indented array or object. */
function wholeJson(stdout: string): unknown {
try {
return JSON.parse(stdout.trim());
} catch {
return undefined;
}
}
const MAX_TEXT_LENGTH = 1500;
function plainText(text: string): string {
// eslint-disable-next-line no-control-regex
const stripped = text.replace(/\u001b\[[0-9;]*[A-Za-z]/g, "").trim();
return stripped.length > MAX_TEXT_LENGTH ? `${stripped.slice(0, MAX_TEXT_LENGTH)}…` : stripped;
}
function isJsonOptionUnknown(run: { stdout: string; stderr: string }): boolean {
return /unknown option.*--json/i.test(`${run.stderr}\n${run.stdout}`);
}
/** Whether the CLI takes `--json` for the command: `marketplace update` without a name does not. */
function takesJson(command: Extract<PluginCommand, { kind: "cli" }>): boolean {
return !(command.operation === "marketplace-update" && command.target === undefined);
}
async function runCli(
deps: PluginCommandDeps,
exec: ExecLike,
env: Record<string, string | undefined>,
argv: string[],
json: boolean,
): Promise<CliRun> {
if (deps.signal.aborted) return { type: "cancelled" };
const run = async (args: string[]): Promise<CliRun> => {
try {
const file = await deps.cliPath();
const output = await exec(file, args, {
cwd: deps.cwd,
env,
signal: deps.signal,
timeoutMs: PLUGIN_CLI_TIMEOUT_MS,
});
return { type: "done", ...output };
} catch (error) {
if (deps.signal.aborted) return { type: "cancelled" };
const message = error instanceof Error ? error.message : String(error);
deps.logError(`Failed to run \`claude plugin ${argv.join(" ")}\`: ${message}`);
return { type: "error", message: `Could not run the Claude CLI: ${message}` };
}
};
const first = await run(["plugin", ...argv, ...(json ? ["--json"] : [])]);
// A CLI named by CLAUDE_CODE_EXECUTABLE can predate `--json`. It rejects the
// flag before doing anything, so the run is repeated for its text and exit code.
if (json && first.type === "done" && first.code !== 0 && isJsonOptionUnknown(first)) {
return run(["plugin", ...argv]);
}
return first;
}
function cancelled(operation: PluginOperation): PluginCommandResult {
return { ok: false, operation, message: "Cancelled." };
}
function failedToRun(operation: PluginOperation, run: CliRun): PluginCommandResult {
return run.type === "cancelled"
? cancelled(operation)
: { ok: false, operation, message: run.type === "error" ? run.message : "" };
}
function describeCliRun(
command: Extract<PluginCommand, { kind: "cli" }>,
run: Extract<CliRun, { type: "done" }>,
): PluginCommandResult {
const { operation } = command;
const isList = operation === "list" || operation === "marketplace-list";
const json = lastJsonLine(run.stdout);
if (isList) {
const data = wholeJson(run.stdout);
if (run.code === 0 && data !== undefined && typeof data === "object" && data !== null) {
return { ok: true, operation, message: "", data };
}
}
if (!json || typeof json.outcome !== "string") {
const text = plainText(run.code === 0 ? run.stdout || run.stderr : run.stderr || run.stdout);
return {
ok: run.code === 0,
operation,
message: text || (run.code === 0 ? "Done." : `The Claude CLI exited with code ${run.code}.`),
};
}
const message =
typeof json.message === "string" && json.message.trim() !== ""
? plainText(json.message)
: run.code === 0
? "Done."
: `The Claude CLI exited with code ${run.code}.`;
const ok = json.alreadyInGoalState === true || (json.outcome !== "failed" && run.code === 0);
const result: PluginCommandResult = { ok, operation, message };
if (!ok && typeof json.failureCode === "string") result.failureCode = json.failureCode;
if (!ok && isRecord(json.shownCommand) && typeof json.shownCommand.command === "string") {
result.shownCommand = json.shownCommand.command;
if (operation === "install" || operation === "update") {
result.terminalCommand = `claude plugin ${command.argv.map(shellQuote).join(" ")}`;
}
}
return result;
}
// terminalCommand is pasted into a POSIX shell, and argv values are arbitrary
// text: `&` would background, `*` glob and `$(x)` expand unless quoted.
function shellQuote(arg: string): string {
return /^[A-Za-z0-9@%+=:,./_-]+$/.test(arg) ? arg : `'${arg.replaceAll("'", "'\\''")}'`;
}
async function reloadSession(deps: PluginCommandDeps): Promise<PluginReload> {
const query = deps.query();
if (!query) return { status: "unavailable" };
try {
const response = await query.reloadPlugins({ refuseIfBusy: true });
return { status: "applied", plugins: response.plugins.map((plugin) => plugin.name) };
} catch (error) {
if ((error as { errorCode?: unknown } | null)?.errorCode === "reload_plugins_busy") {
return { status: "busy" };
}
const message = error instanceof Error ? error.message : String(error);
deps.logError(`Failed to reload plugins after /plugin: ${message}`);
return { status: "failed", error: message };
}
}
/** Whether `plugin` (`name` or `name@marketplace`) is among the installed plugin ids. */
function isInstalled(installed: unknown[], plugin: string): boolean {
return installed.some((entry) => {
const id = isRecord(entry) ? entry.id : undefined;
if (typeof id !== "string") return false;
return plugin.includes("@") ? id === plugin : id.split("@")[0] === plugin;
});
}
/**
* Runs a parsed `/plugin` command and, after a change, reloads the session's
* plugins. A failure is in the result: this never throws.
*/
export async function runPluginCommand(
command: PluginCommand,
deps: PluginCommandDeps,
): Promise<PluginCommandResult> {
if (command.kind === "usage") {
return {
ok: false,
operation: "usage",
message: command.reason ?? "",
};
}
const exec = deps.exec ?? defaultExec;
const env = { ...deps.env };
delete env.CLAUDECODE;
delete env.CLAUDE_CODE_CHILD_SESSION;
if (command.kind === "overview") {
const [plugins, marketplaces] = await Promise.all([
runCli(deps, exec, env, ["list"], true),
runCli(deps, exec, env, ["marketplace", "list"], true),
]);
if (plugins.type === "cancelled" || marketplaces.type === "cancelled") {
return cancelled("overview");
}
const read = (run: CliRun): { value?: unknown; error?: string } => {
if (run.type === "error") return { error: run.message };
if (run.type === "done" && run.code === 0) {
const value = wholeJson(run.stdout);
return Array.isArray(value)
? { value }
: { error: "The Claude CLI did not return a list." };
}
const text = run.type === "done" ? plainText(run.stderr || run.stdout) : "";
return {
error: text || `The Claude CLI exited with code ${run.type === "done" ? run.code : "?"}.`,
};
};
const listed = { plugins: read(plugins), marketplaces: read(marketplaces) };
const errors = [listed.plugins.error, listed.marketplaces.error].filter((e) => e !== undefined);
return {
ok: errors.length === 0,
operation: "overview",
message: errors.join("\n"),
data: {
plugins: listed.plugins.value,
marketplaces: listed.marketplaces.value,
pluginsError: listed.plugins.error,
marketplacesError: listed.marketplaces.error,
},
};
}
const { operation } = command;
if (operation === "enable" && command.target !== undefined) {
const listing = await runCli(deps, exec, env, ["list"], true);
if (listing.type === "cancelled") return cancelled(operation);
// When the list cannot be read (an old CLI), the enable runs as typed.
const installed =
listing.type === "done" && listing.code === 0 ? wholeJson(listing.stdout) : undefined;
if (Array.isArray(installed) && !isInstalled(installed, command.target)) {
return {
ok: false,
operation,
message: `Plugin ${command.target} is not installed, so it can't be enabled. Install it first.`,
failureCode: "not_installed",
};
}
}
const run = await runCli(deps, exec, env, command.argv, takesJson(command));
if (run.type !== "done") return failedToRun(operation, run);
const result = describeCliRun(command, run);
if (result.ok && RELOADING_OPERATIONS.has(operation)) {
if (deps.signal.aborted) return cancelled(operation);
result.reload = await reloadSession(deps);
}
return result;
}
const USAGE_LINES = [
"- `/plugin list [--available]`",
"- `/plugin install <plugin>[@marketplace] [--scope user|project|local] [--marketplace <source>] [--config key=value]`",
"- `/plugin uninstall <plugin> [--scope …] [--keep-data]`",
"- `/plugin enable <plugin> [--scope …]`",
"- `/plugin disable <plugin>|--all [--scope …]`",
"- `/plugin update <plugin> [--scope …]`",
"- `/plugin marketplace add <source> [--scope …] [--sparse <path>…]`",
"- `/plugin marketplace list`",
"- `/plugin marketplace remove <name> [--scope …]`",
"- `/plugin marketplace update [<name>]`",
];
function usageMarkdown(): string {
return ["**Usage**", "", ...USAGE_LINES].join("\n");
}
/** Escapes CLI or plugin text. A `claude plugin X` hint in backticks becomes
* the `/plugin X` that works in this chat. */
function renderCliText(text: string): string {
return text
.split(/\r?\n/)
.filter((line) => line.trim() !== "")
.map((line) =>
line
.split(/(`[^`\n]+`)/)
.map((part, index) => {
if (index % 2 === 0) return escapeMarkdown(part);
const code = part.slice(1, -1).replace(/^claude plugins? /, "/plugin ");
return codeSpan(code);
})
.join(""),
)
.join("\n\n");
}
function str(value: unknown): string | undefined {
return typeof value === "string" && value !== "" ? value : undefined;
}
function installedLine(entry: unknown): string | undefined {
if (!isRecord(entry)) return undefined;
const id = str(entry.id);
if (!id) return undefined;
const details = [
str(entry.version) && `v${str(entry.version)}`,
str(entry.scope) && `${str(entry.scope)} scope`,
entry.enabled === false ? "disabled" : "enabled",
].filter((part): part is string => typeof part === "string");
return `- ${codeSpan(id)} — ${escapeMarkdown(details.join(", "))}`;
}
function availableLine(entry: unknown): string | undefined {
if (!isRecord(entry)) return undefined;
const id = str(entry.pluginId) ?? str(entry.name);
if (!id) return undefined;
const description = str(entry.description);
return `- ${codeSpan(id)}${description ? ` — ${escapeMarkdown(description)}` : ""}`;
}
function marketplaceLine(entry: unknown): string | undefined {
if (!isRecord(entry)) return undefined;
const name = str(entry.name);
if (!name) return undefined;
const source = str(entry.repo) ?? str(entry.url) ?? str(entry.path) ?? str(entry.source);
return `- ${codeSpan(name)}${source ? ` — ${escapeMarkdown(source)}` : ""}`;
}
/** The most available plugins that a reply lists. The official directory has hundreds. */
const MAX_AVAILABLE_LISTED = 40;
function section(title: string, lines: (string | undefined)[], empty: string): string {
const shown = lines.filter((line): line is string => line !== undefined);
return shown.length === 0 ? `**${title}**\n\n${empty}` : `**${title}**\n\n${shown.join("\n")}`;
}
function installedSection(data: unknown): string {
return section(
"Installed plugins",
Array.isArray(data) ? data.map(installedLine) : [],
"None. Run `/plugin install <plugin>` to add one.",
);
}
function marketplacesSection(data: unknown): string {
return section(
"Marketplaces",
Array.isArray(data) ? data.map(marketplaceLine) : [],
"None. Run `/plugin marketplace add <source>` to add one.",
);
}
function availableSection(entries: unknown[]): string {
const lines = entries.map(availableLine).filter((line) => line !== undefined);
const more = lines.length - MAX_AVAILABLE_LISTED;
if (more > 0) lines.splice(MAX_AVAILABLE_LISTED, more, `- … and ${more} more`);
return section("Available plugins", lines, "None.");
}
function reloadLine(reload: PluginReload): string {
if (reload.status === "applied") {
const plugins = reload.plugins ?? [];
return plugins.length === 0
? "Reloaded: the session now has no plugins."
: `Reloaded: the session now has ${plugins.map(codeSpan).join(", ")}.`;
}
if (reload.status === "busy") {
return "The session is busy, so the change was not loaded into it. It applies to new sessions.";
}
if (reload.status === "failed") {
return `Reloading the session's plugins failed${reload.error ? `: ${escapeMarkdown(reload.error)}` : ""}. The change applies to new sessions.`;
}
return "The change applies to new sessions.";
}
/** The chat reply for a result of {@link runPluginCommand}. */
export function pluginCommandMarkdown(result: PluginCommandResult): string {
const blocks: string[] = [];
const data = result.data;
switch (result.operation) {
case "usage":
if (result.message) blocks.push(renderCliText(result.message));
blocks.push(usageMarkdown());
return blocks.join("\n\n");
case "overview": {
const parts = isRecord(data) ? data : {};
const failure = (title: string, error: unknown): string =>
`**${title}**\n\nCould not list: ${renderCliText(String(error))}`;
return [
typeof parts.pluginsError === "string"
? failure("Installed plugins", parts.pluginsError)
: installedSection(parts.plugins),
typeof parts.marketplacesError === "string"
? failure("Marketplaces", parts.marketplacesError)
: marketplacesSection(parts.marketplaces),
usageMarkdown(),
].join("\n\n");
}
case "list":
if (result.ok && isRecord(data)) {
blocks.push(installedSection(data.installed));
blocks.push(availableSection(Array.isArray(data.available) ? data.available : []));
} else if (result.ok && data !== undefined) {
blocks.push(installedSection(data));
}
break;
case "marketplace-list":
if (result.ok && data !== undefined) blocks.push(marketplacesSection(data));
break;
default:
break;
}
if (blocks.length === 0 && result.message) blocks.push(renderCliText(result.message));
if (result.shownCommand !== undefined) {
blocks.push(
`The marketplace declares that this plugin is installed by running a command. The adapter does not run it:\n\n${codeSpan(result.shownCommand)}`,
);
if (result.terminalCommand) {
blocks.push(
`To confirm that command, run ${codeSpan(result.terminalCommand)} in a terminal.`,
);
}
}
if (result.reload) blocks.push(reloadLine(result.reload));
return blocks.join("\n\n");
}

View File

@@ -1,5 +1,6 @@
/**
* `/remote-control`, which the adapter serves itself, and the messages that a
* `/remote-control`, which the adapter serves itself, Remote Control at the
* start of a session when Claude Code asks for it, and the messages that a
* person types in another client of the session (claude.ai or the Claude
* mobile app, over Remote Control). Shared by the v1 core and the v2
* core, which run the command each in their own turn model.
@@ -9,10 +10,13 @@ type PromptContent = ReadonlyArray<{ type: string; text?: unknown }>;
import type {
Query,
SDKControlInitializeResponse,
SDKUserMessage,
SDKUserMessageReplay,
SlashCommand,
} from "@anthropic-ai/claude-agent-sdk";
import type { Logger } from "./logger.js";
import type { SessionNotice } from "./session-notices.js";
/** Runtime Remote Control control exposed by the pinned Agent SDK. Like
* `mcpAuthenticate`, it is not in the public `Query` declaration yet. The CLI's
@@ -115,6 +119,129 @@ export async function runRemoteControlCommand(
}
}
/** The `initialize` result with `remote_control_auto_enable`, which Claude Code
* resolves from `remoteControlAtStartup` in the settings, else the policy
* default, else a rollout, so it can be on although the user never turned it
* on. An SDK host reads it to start Remote Control with the session as the
* terminal does. Like `enableRemoteControl`, it is not in the public
* declaration yet. */
type RemoteControlInitializeResponse = SDKControlInitializeResponse & {
remote_control_auto_enable?: boolean;
};
/** Whether Claude Code asks for Remote Control to start with the session:
* `remoteControlAtStartup` in the settings, else the policy default, else a
* rollout (see `RemoteControlInitializeResponse`). `false` when the field is
* missing, as from a CLI that predates it. */
export function startsWithRemoteControl(
initializationResult: SDKControlInitializeResponse,
): boolean {
return (
(initializationResult as RemoteControlInitializeResponse).remote_control_auto_enable === true
);
}
/** Starts Remote Control for a session that starts with it, and returns the
* notice that tells the user how it went. A notice cannot be withdrawn once
* sent, so its title reports the connection as an event rather than a state
* that `/remote-control off` would make untrue. A refusal, such as Remote
* Control being disabled by policy, comes back as a warning instead of a
* throw. */
export async function startRemoteControl(
query: RemoteControlQuery,
logger: { error: (...args: unknown[]) => void },
): Promise<SessionNotice> {
try {
const { session_url } = await query.enableRemoteControl(true);
const link = session_url
? `Continue this session from claude.ai/code or the Claude mobile app: ${session_url}`
: "Claude Code did not return a session URL.";
return {
severity: "info",
title: "Remote Control connected",
description: `${link}\nRun /remote-control off to disconnect.`,
};
} catch (error) {
logger.error(`Failed to enable Remote Control: ${error}`);
return {
severity: "warning",
title: "Could not start Remote Control",
description: error instanceof Error ? error.message : String(error),
};
}
}
/** What starting Remote Control with a query needs of the query's session. */
export type RemoteControlAtStartupSession = {
readonly sessionId: string;
readonly logger: Logger;
/** The session's query, or `undefined` when it has none to start Remote Control on. */
query(): Query | undefined;
/** Whether the session is busy in its core's sense, such as Claude working. */
working(): boolean;
};
/**
* Remote Control at the start of a query that Claude Code asked to start with
* it (see {@link startsWithRemoteControl}). Each core keeps one per query and
* connects it after the query's setup response and after a restart, whose new
* query asks again: closing the old query ended its Remote Control. Unless the
* user turned it off: a restart carries the user's last `/remote-control` into
* the new query (see {@link restartedFrom}). A session that a failed restart
* lost carries nothing: the client sets it up again, and that setup asks
* afresh. Holding prompts back and sending the notice are each core's own, as
* they follow the core's turn model.
*/
export class RemoteControlAtStartup {
/** Whether the user's last `/remote-control` on this query turned it off. */
private turnedOff = false;
constructor(private asked: boolean) {}
/**
* The user ran `command` on this query. Recorded before its request goes
* out, so a restart that overlaps the request already knows.
*/
commandRan(command: RemoteControlCommand): void {
this.turnedOff = command.action === "disconnect";
}
/**
* A restart replaced the query of `previous` with this one. Remote Control
* that the user turned off there stays off: this query asks again only
* because the setting does, and the setting can come from a rollout the user
* never chose.
*/
restartedFrom(previous: RemoteControlAtStartup | undefined): void {
if (!previous?.turnedOff) return;
this.turnedOff = true;
this.asked = false;
}
/**
* Starts Remote Control on the first call, and resolves the notice that
* tells the user how it went. When nothing starts, it returns `undefined`
* rather than a promise, so a core can hold its prompts back in the same
* synchronous step: Claude Code did not ask, the user turned it off before
* a restart, an earlier call ran, the query is closed or has no Remote
* Control, or the session is busy, as the notice would land inside that
* work. `/remote-control` still connects the session then.
*/
connect(session: RemoteControlAtStartupSession): Promise<SessionNotice> | undefined {
if (!this.asked) return undefined;
this.asked = false;
const query = session.query();
if (!query || !supportsRemoteControl(query)) return undefined;
if (session.working()) {
session.logger.log(
`Session ${session.sessionId} is busy, so Remote Control does not start with it. /remote-control starts it.`,
);
return undefined;
}
return startRemoteControl(query, session.logger);
}
}
/** A top-level message a person typed in another client of the session, such
* as claude.ai or the Claude mobile app over Remote Control. Tool results and
* the CLI's own synthetic messages are user-role too, but carry no human

View File

@@ -4,13 +4,9 @@
*/
import type { AvailableCommand } from "@agentclientprotocol/sdk/unstable";
import type { Query, SlashCommand } from "@anthropic-ai/claude-agent-sdk";
import { adapterAvailableCommands } from "./adapter-command.js";
import { AIR_KIND_KEY, AIR_SKILL_PATH_KEY, withAirMeta } from "./air-extension.js";
import { MCP_AVAILABLE_COMMAND } from "./mcp-command.js";
import {
claudeCodeOffersCommand,
REMOTE_CONTROL_COMMAND_NAME,
supportsRemoteControl,
} from "./remote-control.js";
import { resolveSkillPath, type SkillScanCache } from "./tool-calls/reporters/interaction.js";
export function getAvailableSlashCommands(
@@ -29,6 +25,8 @@ export function getAvailableSlashCommands(
// A listed skill gets its path from here; one that is not listed, or has no
// path (remote connections), is looked up on disk.
skillFiles?: ReadonlyMap<string, { path?: string }>,
// A session that runs Claude Code remotely (`sdk-url`): the adapter cannot serve `/plugin` for it.
remoteSession = false,
): AvailableCommand[] {
// The container listings of this one pass, so a list of a hundred commands lists each container once.
const skillScans: SkillScanCache = new Map();
@@ -51,18 +49,6 @@ export function getAvailableSlashCommands(
"todos",
];
const remoteControlCommands: AvailableCommand[] =
query && supportsRemoteControl(query)
? [
{
name: REMOTE_CONTROL_COMMAND_NAME,
description:
"Continue this session from claude.ai/code or the Claude mobile app; `off` disconnects",
input: { hint: "[session name | off]" },
},
]
: [];
// The adapter replaces the terminal text of `/mcp` and runs its actions,
// even when Claude Code tags the command terminal-bound.
const advertised = commands
@@ -113,9 +99,7 @@ export function getAvailableSlashCommands(
return [
...advertised,
MCP_AVAILABLE_COMMAND,
...remoteControlCommands.filter(
(command) => !claudeCodeOffersCommand(commands, terminalCommands, command.name),
),
...adapterAvailableCommands(commands, terminalCommands, query, { remoteSession }),
].filter((command) => {
if (/\s/.test(command.name) || names.has(command.name)) return false;
names.add(command.name);

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"AskUserQuestion"}},"content":[],"kind":"other","name":"AskUserQuestion","sessionUpdate":"tool_call","status":"pending","title":"Asking for your input","toolCallId":"toolu_ask"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_1","canStop":true,"description":"Build assets","name":"Build assets","outputFilePath":"/tmp/tasks/workflow_1.output","sessionUpdate":"async_task_spawned","showInTranscript":true,"taskType":"workflow"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_1","sessionUpdate":"async_task_state_update","state":"completed","summary":"done"}}}
{"kind":"promptResponse","payload":{"_meta":{"quota":{"model_usage":[],"token_count":{"cachedInputTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"reasoningOutputTokens":0,"totalTokens":0}}},"stopReason":"end_turn","usage":{"cachedReadTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"totalTokens":0}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_3","canStop":true,"description":"Watch the logs","name":"Watch the logs","sessionUpdate":"async_task_spawned","showInTranscript":true,"taskType":"workflow","toolCallId":"toolu_workflow"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_3","sessionUpdate":"async_task_progress","summary":"first line","usage":{"durationMs":5,"toolUses":0,"totalTokens":0}}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_3","sessionUpdate":"async_task_progress","summary":"second line","usage":{"durationMs":6,"toolUses":0,"totalTokens":0}}}}

View File

@@ -1,3 +1,3 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"asyncTaskId":"workflow_2","canStop":true,"description":"Build assets","name":"Build assets","sessionUpdate":"async_task_spawned","showInTranscript":true,"taskType":"workflow"}}}
{"kind":"promptResponse","payload":{"_meta":{"quota":{"model_usage":[],"token_count":{"cachedInputTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"reasoningOutputTokens":0,"totalTokens":0}}},"stopReason":"end_turn","usage":{"cachedReadTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"totalTokens":0}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Bash"},"terminal_info":{"terminal_id":"toolu_bg"}},"content":[{"terminalId":"toolu_bg","type":"terminal"}],"kind":"execute","name":"Bash","sessionUpdate":"tool_call","status":"pending","title":"Terminal","toolCallId":"toolu_bg"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","title":"sleep 100","toolCallId":"toolu_bg"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Bash"},"terminal_info":{"terminal_id":"toolu_bash"}},"content":[{"terminalId":"toolu_bash","type":"terminal"}],"kind":"execute","name":"Bash","sessionUpdate":"tool_call","status":"pending","title":"Terminal","toolCallId":"toolu_bash"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","title":"false","toolCallId":"toolu_bash"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Bash"},"terminal_info":{"terminal_id":"toolu_bash"}},"content":[{"terminalId":"toolu_bash","type":"terminal"}],"kind":"execute","name":"Bash","sessionUpdate":"tool_call","status":"pending","title":"Terminal","toolCallId":"toolu_bash"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","title":"ls -la","toolCallId":"toolu_bash"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"version":1},"version":1}}},"kind":"think","sessionUpdate":"tool_call","status":"in_progress","title":"Compact conversation","toolCallId":"00000000-0000-4000-8000-000000000001"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"error":"Context too small","version":1}}}},"content":[{"content":{"text":"Compaction failed: Context too small","type":"text"},"type":"content"}],"sessionUpdate":"tool_call_update","status":"failed","toolCallId":"00000000-0000-4000-8000-000000000001"}}}
{"kind":"promptResponse","payload":{"_meta":{"quota":{"model_usage":[],"token_count":{"cachedInputTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"reasoningOutputTokens":0,"totalTokens":0}}},"stopReason":"end_turn","usage":{"cachedReadTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"totalTokens":0}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"version":1},"version":1}}},"kind":"think","sessionUpdate":"tool_call","status":"in_progress","title":"Compact conversation","toolCallId":"00000000-0000-4000-8000-000000000001"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","status":"in_progress","toolCallId":"00000000-0000-4000-8000-000000000001"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"durationMs":7,"postTokens":100,"preTokens":1000,"trigger":"automatic","version":1}}}},"sessionUpdate":"tool_call_update","status":"completed","toolCallId":"00000000-0000-4000-8000-000000000001"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"version":1},"version":1}}},"compactionId":"00000000-0000-4000-8000-000000000001","sessionUpdate":"compaction_update","status":"in_progress"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"compactionId":"00000000-0000-4000-8000-000000000001","content":{"text":"The summary.","type":"text"},"sessionUpdate":"compaction_summary_chunk"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"contextCompaction":{"durationMs":7,"postTokens":100,"preTokens":1000,"trigger":"automatic","version":1},"version":1}}},"compactionId":"00000000-0000-4000-8000-000000000001","sessionUpdate":"compaction_update","status":"completed"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Edit"}},"content":[],"kind":"edit","locations":[],"name":"Edit","sessionUpdate":"tool_call","status":"pending","title":"Edit","toolCallId":"toolu_edit"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"locations":[{"path":"<cwd>/src/app.ts"}],"sessionUpdate":"tool_call_update","title":"Edit src/app.ts","toolCallId":"toolu_edit"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Edit"}},"content":[],"kind":"edit","locations":[],"name":"Edit","sessionUpdate":"tool_call","status":"pending","title":"Edit","toolCallId":"toolu_edit"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"locations":[{"path":"<cwd>/src/app.ts"}],"sessionUpdate":"tool_call_update","title":"Edit src/app.ts","toolCallId":"toolu_edit"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"ExitPlanMode"}},"content":[],"kind":"switch_mode","name":"ExitPlanMode","sessionUpdate":"tool_call","status":"pending","title":"Approve Plan","toolCallId":"toolu_plan"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"ExitPlanMode"}},"content":[],"kind":"switch_mode","name":"ExitPlanMode","sessionUpdate":"tool_call","status":"pending","title":"Approve Plan","toolCallId":"toolu_plan"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,3 +1,3 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"jetbrains":{"air":{"goal":{"controlMethod":"_session/goal","objective":"Ship the feature","status":"active"},"version":1}}},"sessionUpdate":"session_info_update"}}}
{"kind":"promptResponse","payload":{"_meta":{"quota":{"model_usage":[],"token_count":{"cachedInputTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"reasoningOutputTokens":0,"totalTokens":0}}},"stopReason":"end_turn","usage":{"cachedReadTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"totalTokens":0}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Grep"}},"content":[],"kind":"search","name":"Grep","sessionUpdate":"tool_call","status":"pending","title":"grep","toolCallId":"toolu_grep"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","title":"grep \"value\"","toolCallId":"toolu_grep"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"mcp__docs__search"},"is_mcp_tool_call":true,"jetbrains":{"air":{"mcp":{"server":"docs","tool":"search"},"version":1}}},"content":[],"kind":"other","name":"mcp__docs__search","sessionUpdate":"tool_call","status":"pending","title":"docs: search","toolCallId":"toolu_mcp"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"memory_recall","toolResponse":{"mode":"select"}}},"kind":"read","locations":[{"path":"/memory/a.md"},{"path":"/memory/b.md"}],"sessionUpdate":"tool_call","status":"completed","title":"Recalled 2 memories","toolCallId":"00000000-0000-4000-8000-000000000001"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"memory_recall","toolResponse":{"mode":"synthesize"}}},"content":[{"content":{"text":"The user prefers tabs.","type":"text"},"type":"content"}],"kind":"read","sessionUpdate":"tool_call","status":"completed","title":"Recalled synthesized memory","toolCallId":"00000000-0000-4000-8000-000000000002"}}}
{"kind":"promptResponse","payload":{"_meta":{"quota":{"model_usage":[],"token_count":{"cachedInputTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"reasoningOutputTokens":0,"totalTokens":0}}},"stopReason":"end_turn","usage":{"cachedReadTokens":0,"cachedWriteTokens":0,"inputTokens":0,"outputTokens":0,"totalTokens":0}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"SandboxNetworkAccess"}},"content":[],"kind":"other","name":"SandboxNetworkAccess","rawInput":{"host":"example.com"},"sessionUpdate":"tool_call","status":"pending","title":"SandboxNetworkAccess","toolCallId":"toolu_net"}}}
{"kind":"requestPermission","payload":{"_meta":{"jetbrains":{"air":{"permission":{"description":"Reason: Sandbox blocks network","title":"example.com","version":1},"version":1}}},"options":[{"kind":"allow_once","name":"Yes","optionId":"allow-once"},{"kind":"reject_once","name":"No","optionId":"reject"}],"sessionId":"<session>","toolCall":{"rawInput":{"host":"example.com"},"title":"example.com","toolCallId":"toolu_net"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","status":"completed","toolCallId":"toolu_net"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"NotebookEdit"}},"content":[],"kind":"edit","locations":[],"name":"NotebookEdit","sessionUpdate":"tool_call","status":"pending","title":"Edit notebook","toolCallId":"toolu_nb"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"locations":[{"path":"<cwd>/n.ipynb"}],"sessionUpdate":"tool_call_update","title":"Edit cell in n.ipynb","toolCallId":"toolu_nb"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Bash"},"terminal_info":{"terminal_id":"toolu_denied"}},"content":[{"terminalId":"toolu_denied","type":"terminal"}],"kind":"execute","name":"Bash","sessionUpdate":"tool_call","status":"pending","title":"Terminal","toolCallId":"toolu_denied"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"content":{"text":"Work","type":"text"},"messageId":"msg_rate","sessionUpdate":"agent_message_chunk"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"content":{"text":"ing.","type":"text"},"messageId":"msg_rate","sessionUpdate":"agent_message_chunk"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Read"}},"content":[],"kind":"read","locations":[],"name":"Read","sessionUpdate":"tool_call","status":"pending","title":"Read File","toolCallId":"toolu_read"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -14,4 +14,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"subagent_state_update","state":"completed","subagentSessionId":"<session>:replay-subagent:toolu_r_task"}}}
{"kind":"loadSession","payload":{"configOptions":[{"category":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","id":"model","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","currentValue":"auto","description":"Session permission mode","id":"mode","name":"Mode","options":[{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Always ask before making changes","name":"Manual","value":"default"},{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"_meta":{"jetbrains":{"air":{"kind":"plan","version":1}}},"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"_meta":{"jetbrains":{"air":{"kind":"auto_review","version":1}}},"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"_meta":{"jetbrains":{"air":{"kind":"full_access","version":1}}},"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"modes":{"availableModes":[{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Always ask before making changes","id":"default","name":"Manual"},{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Automatically accept all file edits","id":"acceptEdits","name":"Accept edits"},{"_meta":{"jetbrains":{"air":{"kind":"plan","version":1}}},"description":"Create a plan before making changes","id":"plan","name":"Plan"},{"_meta":{"jetbrains":{"air":{"kind":"auto_review","version":1}}},"description":"Claude handles permission decisions","id":"auto","name":"Auto"},{"_meta":{"jetbrains":{"air":{"kind":"full_access","version":1}}},"description":"Accepts all permissions","id":"bypassPermissions","name":"Bypass permissions"}],"currentModeId":"auto"},"sessionId":"<session>"}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>:replay-subagent:toolu_r_task","update":{"configOptions":[{"category":"model","currentValue":"claude-sonnet-4-6","id":"model","name":"Model","options":[{"name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"}],"sessionUpdate":"config_option_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}

View File

@@ -1,3 +1,3 @@
{"kind":"initialize","payload":{"_meta":{"jetbrains":{"air":{"capabilities":["sessionFailure","agentFileChangeReport","nativeSubagentSessions","asyncTasks","customInstructions","recommendedValue","diffPatch","planFile","backgroundSubagents"],"goal":{"actions":["set","clear"],"controlMethod":"_session/goal","version":1},"version":1}},"steering":{"supported":true}},"agentCapabilities":{"_meta":{"authStatus":{},"claudeCode":{"promptQueueing":true}},"auth":{"logout":{},"status":{}},"loadSession":true,"mcpCapabilities":{"acp":true,"http":true,"sse":true},"promptCapabilities":{"embeddedContext":true,"image":true},"providers":{},"sessionCapabilities":{"additionalDirectories":{},"close":{},"delete":{},"fork":{},"list":{},"options":{},"resume":{},"status":{},"subagents":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"agentInfo":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"authMethods":[],"protocolVersion":1}}
{"kind":"newSession","payload":{"configOptions":[{"category":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","id":"model","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","currentValue":"auto","description":"Session permission mode","id":"mode","name":"Mode","options":[{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Always ask before making changes","name":"Manual","value":"default"},{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"_meta":{"jetbrains":{"air":{"kind":"plan","version":1}}},"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"_meta":{"jetbrains":{"air":{"kind":"auto_review","version":1}}},"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"_meta":{"jetbrains":{"air":{"kind":"full_access","version":1}}},"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"modes":{"availableModes":[{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Always ask before making changes","id":"default","name":"Manual"},{"_meta":{"jetbrains":{"air":{"kind":"standard","version":1}}},"description":"Automatically accept all file edits","id":"acceptEdits","name":"Accept edits"},{"_meta":{"jetbrains":{"air":{"kind":"plan","version":1}}},"description":"Create a plan before making changes","id":"plan","name":"Plan"},{"_meta":{"jetbrains":{"air":{"kind":"auto_review","version":1}}},"description":"Claude handles permission decisions","id":"auto","name":"Auto"},{"_meta":{"jetbrains":{"air":{"kind":"full_access","version":1}}},"description":"Accepts all permissions","id":"bypassPermissions","name":"Bypass permissions"}],"currentModeId":"auto"},"sessionId":"<session>"}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Skill"}},"content":[],"kind":"other","name":"Skill","sessionUpdate":"tool_call","status":"pending","title":"Load skill","toolCallId":"toolu_skill"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Background review","prompt":"Review the diff","sessionUpdate":"subagent_spawned","subagentSessionId":"a2","task":"Review the diff"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Check the logs","prompt":"Check logs","sessionUpdate":"subagent_spawned","subagentSessionId":"agent_late","task":"Check logs"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Fix the build","prompt":"Make the build pass","sessionUpdate":"subagent_spawned","subagentSessionId":"agent_n","task":"Make the build pass"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Plan the work","prompt":"Plan it","sessionUpdate":"subagent_spawned","subagentSessionId":"agent_outer","task":"Plan it"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Explore code","prompt":"Find the parser","sessionUpdate":"subagent_spawned","subagentSessionId":"agent_1","task":"Find the parser"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"capabilities":{},"name":"Summarize","prompt":"Summarize the repo","sessionUpdate":"subagent_spawned","subagentSessionId":"agent_t","task":"Summarize the repo"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"entries":[{"content":"Write tests","priority":"medium","status":"pending"}],"sessionUpdate":"plan"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"TaskOutput"}},"content":[],"kind":"other","name":"TaskOutput","sessionUpdate":"tool_call","status":"pending","title":"TaskOutput","toolCallId":"toolu_out"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"content":{"text":"Let me thin","type":"text"},"messageId":"msg_text","sessionUpdate":"agent_thought_chunk"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"content":{"text":"k about it.","type":"text"},"messageId":"msg_text","sessionUpdate":"agent_thought_chunk"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"entries":[{"content":"Writing tests","priority":"medium","status":"in_progress"},{"content":"Ship","priority":"medium","status":"pending"}],"sessionUpdate":"plan"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Bash"},"terminal_info":{"terminal_id":"toolu_slow"}},"content":[{"terminalId":"toolu_slow","type":"terminal"}],"kind":"execute","name":"Bash","sessionUpdate":"tool_call","status":"pending","title":"Terminal","toolCallId":"toolu_slow"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":3}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"WebFetch"}},"content":[],"kind":"fetch","name":"WebFetch","sessionUpdate":"tool_call","status":"pending","title":"Fetch","toolCallId":"toolu_fetch"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"sessionUpdate":"tool_call_update","title":"Fetch https://example.com","toolCallId":"toolu_fetch"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Write"}},"content":[],"kind":"edit","locations":[],"name":"Write","sessionUpdate":"tool_call","status":"pending","title":"Preparing file…","toolCallId":"toolu_write"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"locations":[{"path":"<cwd>/old.ts"}],"sessionUpdate":"tool_call_update","title":"Write old.ts","toolCallId":"toolu_write"}}}

View File

@@ -1,4 +1,4 @@
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]"},"name":"mcp"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …"},"name":"plugin"}],"sessionUpdate":"available_commands_update"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"_claude/model":"claude-sonnet-4-6"},"sessionUpdate":"usage_update","size":200000,"used":2}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"_meta":{"claudeCode":{"toolName":"Write"}},"content":[],"kind":"edit","locations":[],"name":"Write","sessionUpdate":"tool_call","status":"pending","title":"Preparing file…","toolCallId":"toolu_write"}}}
{"kind":"sessionUpdate","payload":{"sessionId":"<session>","update":{"locations":[{"path":"<cwd>/new.ts"}],"sessionUpdate":"tool_call_update","title":"Write new.ts","toolCallId":"toolu_write"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"/goal Ship the feature","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -20,4 +20,4 @@
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"description":"The history of 1 subagent of this session could not be restored.","sessionUpdate":"notice","severity":"info","title":"Some subagent history is not available"}}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"sessionUpdate":"session_info_update","title":"Fix the app","updatedAt":"2026-01-01T00:00:00.000Z"}}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"idle"}}}
{"kind":"response","method":"session/resume","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}]}}
{"kind":"response","method":"session/resume","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}]}}

View File

@@ -1,2 +1,2 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -1,5 +1,5 @@
{"kind":"response","method":"initialize","payload":{"authMethods":[],"capabilities":{"_meta":{"authStatus":{}},"auth":{"status":{}},"providers":{},"session":{"additionalDirectories":{},"delete":{},"fork":{},"mcp":{"acp":{},"http":{},"stdio":{}},"options":{},"prompt":{"embeddedContext":{},"image":{}},"status":{},"systemPrompt":{"mode":{"override":{}}},"title":{}}},"info":{"name":"@agentclientprotocol/claude-agent-acp","title":"Claude Agent","version":"<version>"},"protocolVersion":2}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"response","method":"session/new","payload":{"availableCommands":[{"description":"Show the MCP servers and their status, or reconnect, enable, or disable a server","input":{"hint":"[reconnect|enable|disable [<server>|all]]","type":"text"},"name":"mcp","type":"command"},{"description":"Manage Claude Code plugins and marketplaces","input":{"hint":"[install|uninstall|enable|disable|update|list|marketplace …] …","type":"text"},"name":"plugin","type":"command"}],"configOptions":[{"category":"model","configId":"model","currentValue":"claude-sonnet-4-6","description":"AI model to use","name":"Model","options":[{"description":"Fast","name":"Claude Sonnet 4.6","value":"claude-sonnet-4-6"}],"type":"select"},{"category":"mode","configId":"mode","currentValue":"auto","description":"Session permission mode","name":"Mode","options":[{"description":"Always ask before making changes","name":"Manual","value":"default"},{"description":"Automatically accept all file edits","name":"Accept edits","value":"acceptEdits"},{"description":"Create a plan before making changes","name":"Plan","value":"plan"},{"description":"Claude handles permission decisions","name":"Auto","value":"auto"},{"description":"Accepts all permissions","name":"Bypass permissions","value":"bypassPermissions"}],"type":"select"}],"sessionId":"<session>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"content":[{"text":"prompt 1","type":"text"}],"messageId":"<id-1>","sessionUpdate":"user_message"}}}
{"kind":"response","method":"session/prompt","payload":{"messageId":"<id-1>"}}
{"kind":"notification","method":"session/update","payload":{"sessionId":"<session>","update":{"background":[],"sessionUpdate":"state_update","state":"running"}}}

View File

@@ -18,9 +18,10 @@
* `compaction_summary_chunk` text that went out before it.
* - A subagent message or thought is not sent again in full when the chunks
* of the same message that went out before it hold the same text.
* - An `available_commands_update` also lists the `mcp` command of the
* adapter (see {@link ADAPTER_COMMANDS}), when origin/main did not list
* `mcp`. The adapter replaces the text of `/mcp` for every client.
* - An `available_commands_update` also lists the `mcp` and `plugin`
* commands of the adapter (see {@link ADAPTER_COMMANDS}), when origin/main
* did not list them. The adapter replaces the text of `/mcp` for every
* client, and serves `/plugin`, which Claude Code refuses in SDK mode.
* - The `initialize` response does not advertise
* `agentCapabilities.sessionCapabilities.subagents`: the subagents RFD has
* only the client capability, and only AIR's draft keeps the agent one.
@@ -70,7 +71,7 @@ export const AIR_ONLY_META_KEYS = new Set([
export const AIR_ONLY_CLAUDE_CODE_KEYS = new Set(["title", "subagent", "skill", "skillPath"]);
/** The names of the commands that the adapter adds to `available_commands_update`. */
export const ADAPTER_COMMANDS = new Set(["mcp"]);
export const ADAPTER_COMMANDS = new Set(["mcp", "plugin"]);
/** The tool call fields that an update replaces as a whole. */
const REPLACED_FIELDS = [

View File

@@ -0,0 +1,166 @@
import type { Query, SlashCommand } from "@anthropic-ai/claude-agent-sdk";
import { describe, expect, it } from "vitest";
import {
adapterAvailableCommands,
adapterCommand,
mayBeAdapterCommand,
type AdapterCommandContext,
} from "../adapter-command.js";
const text = (value: string) => [{ type: "text", text: value }];
const slash = (name: string): SlashCommand =>
({ name, description: "", argumentHint: "" }) as SlashCommand;
function fakeQuery(commands: string[], remoteControl = true): Query {
return {
supportedCommands: async () => commands.map(slash),
...(remoteControl
? { enableRemoteControl: async () => ({ session_url: "https://example.test/s" }) }
: {}),
} as unknown as Query;
}
const context = (remoteSession = false): AdapterCommandContext => ({
cwd: "/tmp",
env: {},
remoteSession,
query: () => undefined,
logError: () => {},
});
describe("adapterCommand", () => {
it("serves /remote-control and runs it", async () => {
const command = await adapterCommand(
text("/remote-control"),
fakeQuery([]),
undefined,
context(),
);
expect(command?.name).toBe("remote-control");
expect(command?.busyMessage).toBe(
"Remote Control can't be changed while Claude is working. Try again when the turn ends.",
);
expect(command?.inFlightMessage).toBe(
"Remote Control is already being changed. Try again in a moment.",
);
await expect(command!.run(new AbortController().signal)).resolves.toContain(
"https://example.test/s",
);
});
it("does not serve /remote-control without SDK support or when Claude Code offers it", async () => {
expect(
await adapterCommand(text("/remote-control"), fakeQuery([], false), undefined, context()),
).toBeNull();
expect(
await adapterCommand(
text("/remote-control"),
fakeQuery(["remote-control"]),
undefined,
context(),
),
).toBeNull();
});
it.each(["/plugin", "/plugins", "/marketplace list", "/plugin list"])(
"serves %s",
async (prompt) => {
const command = await adapterCommand(text(prompt), fakeQuery([]), undefined, context());
expect(command?.name).toBe("plugin");
expect(command?.busyMessage).toContain("/plugin can't run while Claude is working");
},
);
it.each(["plugin", "plugins", "marketplace"])(
"does not serve /%s when Claude Code offers it",
async (name) => {
expect(
await adapterCommand(text(`/${name}`), fakeQuery([name]), undefined, context()),
).toBeNull();
},
);
it("serves /plugins when Claude Code offers only /plugin", async () => {
expect(
await adapterCommand(text("/plugins"), fakeQuery(["plugin"]), undefined, context()),
).not.toBeNull();
});
it("serves /plugin when Claude Code's is terminal-bound", async () => {
expect(
await adapterCommand(text("/plugin"), fakeQuery(["plugin"]), ["plugin"], context()),
).not.toBeNull();
});
it("does not serve /plugin for a remote session", async () => {
expect(
await adapterCommand(text("/plugin"), fakeQuery([]), undefined, context(true)),
).toBeNull();
});
it.each(["/review", "plugin", "/pluginx", "/remote-controls"])("passes %s on", async (prompt) => {
expect(await adapterCommand(text(prompt), fakeQuery([]), undefined, context())).toBeNull();
});
});
describe("mayBeAdapterCommand", () => {
it.each<[string, boolean]>([
["/remote-control", true],
["/remote-control off", true],
["/plugin", true],
["/plugins list", true],
["/marketplace", true],
["/pluginx", false],
["hello /plugin", false],
["/review", false],
])("%s -> %s", (prompt, expected) => {
expect(mayBeAdapterCommand(text(prompt))).toBe(expected);
});
it("is false for multi-block prompts", () => {
expect(mayBeAdapterCommand([...text("/plugin"), ...text("x")])).toBe(false);
});
});
describe("adapterAvailableCommands", () => {
const names = (list: { name: string }[]) => list.map((command) => command.name);
it("lists remote-control and plugin", () => {
expect(
names(adapterAvailableCommands([], undefined, fakeQuery([]), { remoteSession: false })),
).toEqual(["remote-control", "plugin"]);
});
it("omits plugin for a remote session and remote-control without support", () => {
expect(
names(adapterAvailableCommands([], undefined, fakeQuery([]), { remoteSession: true })),
).toEqual(["remote-control"]);
expect(
names(adapterAvailableCommands([], undefined, fakeQuery([], false), { remoteSession: true })),
).toEqual([]);
expect(
names(adapterAvailableCommands([], undefined, undefined, { remoteSession: false })),
).toEqual(["plugin"]);
});
it("agrees with dispatch on a bare /plugin", async () => {
const cases: { offered: string[]; terminal?: string[]; remoteSession: boolean }[] = [
{ offered: [], remoteSession: false },
{ offered: ["plugin"], remoteSession: false },
{ offered: ["plugin"], terminal: ["plugin"], remoteSession: false },
{ offered: ["plugins"], remoteSession: false },
{ offered: [], remoteSession: true },
];
for (const { offered, terminal, remoteSession } of cases) {
const query = fakeQuery(offered);
const listed = names(
adapterAvailableCommands(offered.map(slash), terminal, query, { remoteSession }),
).includes("plugin");
const served =
(await adapterCommand(text("/plugin"), query, terminal, context(remoteSession))) !== null;
expect(listed, JSON.stringify({ offered, terminal, remoteSession })).toBe(served);
}
});
});

View File

@@ -102,3 +102,18 @@ describe("cliDelivery", () => {
});
});
});
describe("isRemoteSession", () => {
it.each<{ extraArgs: Record<string, string | null> | undefined; remote: boolean }>([
{ extraArgs: undefined, remote: false },
{ extraArgs: {}, remote: false },
{ extraArgs: { settings: "{}" }, remote: false },
{ extraArgs: { "sdk-url": "wss://example.test" }, remote: true },
{ extraArgs: { "sdk-url=wss://example.test": null }, remote: true },
{ extraArgs: { "sdk-urls": "x" }, remote: false },
])("is $remote for $extraArgs", async ({ extraArgs, remote }) => {
const { isRemoteSession } = await load();
expect(isRemoteSession(extraArgs)).toBe(remote);
});
});

View File

@@ -0,0 +1,107 @@
import { execFile } from "node:child_process";
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import * as path from "node:path";
import { promisify } from "node:util";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { Query } from "@anthropic-ai/claude-agent-sdk";
import { claudeCliPath } from "../claude-cli.js";
import { parsePluginCommand, runPluginCommand } from "../plugin-command.js";
const execFileAsync = promisify(execFile);
/**
* The `/plugin` command of the adapter (see `plugin-command.ts`) with the
* bundled Claude Code CLI, in an empty home directory and a marketplace that
* is a local directory. The cases need no account, no network and no API usage.
*/
describe.skipIf(!process.env.RUN_INTEGRATION_TESTS)("/plugin with Claude Code", () => {
let home: string;
let env: Record<string, string>;
beforeEach(async () => {
home = await mkdtemp(path.join(tmpdir(), "acp-plugin-integration-"));
env = {
PATH: process.env.PATH ?? "",
HOME: home,
CLAUDE_CONFIG_DIR: path.join(home, "config"),
ANTHROPIC_API_KEY: "dummy",
NO_COLOR: "1",
};
});
afterEach(async () => {
await rm(home, { recursive: true, force: true });
});
it("still refuses /plugin in a headless run, which is why the adapter serves it", async () => {
const { stdout } = await execFileAsync(
await claudeCliPath(),
["-p", "--output-format", "stream-json", "--verbose", "/plugin"],
{ cwd: home, env },
);
const result = stdout
.split("\n")
.filter((line) => line.startsWith("{"))
.map((line) => JSON.parse(line) as { type?: string; result?: string })
.find((message) => message.type === "result");
expect(result?.result).toContain("/plugin isn't available in this environment");
}, 60_000);
it("installs, lists, refuses and uninstalls a plugin of a local marketplace", async () => {
const marketplace = path.join(home, "marketplace");
const plugin = path.join(marketplace, "plugins", "p");
await mkdir(path.join(marketplace, ".claude-plugin"), { recursive: true });
await mkdir(path.join(plugin, ".claude-plugin"), { recursive: true });
await mkdir(path.join(plugin, "commands"));
await writeFile(
path.join(marketplace, ".claude-plugin", "marketplace.json"),
JSON.stringify({
name: "m",
owner: { name: "x" },
plugins: [{ name: "p", source: "./plugins/p" }],
}),
);
await writeFile(
path.join(plugin, ".claude-plugin", "plugin.json"),
JSON.stringify({ name: "p", version: "1.0.0", description: "test plugin" }),
);
await writeFile(path.join(plugin, "commands", "hello.md"), "Say hello.\n");
const reloadPlugins = vi.fn(async () => ({ plugins: [{ name: "p" }] }));
const run = (prompt: string) => {
const command = parsePluginCommand([{ type: "text", text: prompt }]);
if (!command) throw new Error(`not a /plugin command: ${prompt}`);
return runPluginCommand(command, {
cliPath: claudeCliPath,
cwd: home,
env,
signal: new AbortController().signal,
query: () => ({ reloadPlugins }) as unknown as Query,
logError: (message) => {
throw new Error(message);
},
});
};
const added = await run(`/plugin marketplace add ${marketplace}`);
expect(added.ok, added.message).toBe(true);
const installed = await run("/plugin install p@m");
expect(installed.ok, installed.message).toBe(true);
expect(installed.reload?.status).toBe("applied");
expect(reloadPlugins).toHaveBeenCalledTimes(1);
const listed = await run("/plugin list");
expect(listed.ok, listed.message).toBe(true);
expect(JSON.stringify(listed.data)).toContain("p@m");
const enabled = await run("/plugin enable unknown");
expect(enabled).toMatchObject({ ok: false, failureCode: "not_installed" });
const uninstalled = await run("/plugin uninstall p");
expect(uninstalled.ok, uninstalled.message).toBe(true);
expect(reloadPlugins).toHaveBeenCalledTimes(2);
expect(JSON.stringify((await run("/plugin list")).data)).not.toContain("p@m");
}, 120_000);
});

View File

@@ -0,0 +1,642 @@
import { describe, expect, it, vi } from "vitest";
import type { Query } from "@anthropic-ai/claude-agent-sdk";
import {
PLUGIN_AVAILABLE_COMMAND,
parsePluginCommand,
pluginCommandMarkdown,
runPluginCommand,
type ExecLike,
type PluginCommand,
type PluginCommandDeps,
type PluginCommandResult,
} from "../plugin-command.js";
const text = (value: string) => [{ type: "text", text: value }];
const cli = (operation: string, argv: string[], target?: string): PluginCommand =>
({ kind: "cli", operation, argv, ...(target === undefined ? {} : { target }) }) as PluginCommand;
describe("PLUGIN_AVAILABLE_COMMAND", () => {
it("is named plugin with an input hint", () => {
expect(PLUGIN_AVAILABLE_COMMAND.name).toBe("plugin");
expect(PLUGIN_AVAILABLE_COMMAND.input).toMatchObject({ hint: expect.any(String) });
});
});
describe("parsePluginCommand", () => {
it.each<[string, PluginCommand | null]>([
["/plugin", { kind: "overview" }],
[" /plugins ", { kind: "overview" }],
["/marketplace", { kind: "overview" }],
["/plugin help", { kind: "overview" }],
["/pluginx", null],
["/pluginfoo list", null],
["/plugins-extra", null],
["plugin list", null],
["hello /plugin", null],
["/plugin list", cli("list", ["list"])],
["/plugin ls --available", cli("list", ["list", "--available"])],
["/plugins list", cli("list", ["list"])],
["/plugin install p@m", cli("install", ["install", "p@m"], "p@m")],
["/plugin i p", cli("install", ["install", "p"], "p")],
[
"/plugin install p --scope project --marketplace owner/repo --config a=1 --config b=2",
cli(
"install",
[
"install",
"p",
"--scope",
"project",
"--marketplace",
"owner/repo",
"--config",
"a=1",
"--config",
"b=2",
],
"p",
),
],
["/plugin install p -s local", cli("install", ["install", "p", "--scope", "local"], "p")],
["/plugin install p --scope=user", cli("install", ["install", "p", "--scope", "user"], "p")],
["/plugin uninstall p --keep-data", cli("uninstall", ["uninstall", "p", "--keep-data"], "p")],
["/plugin remove p", cli("uninstall", ["uninstall", "p"], "p")],
["/plugin rm p -s user", cli("uninstall", ["uninstall", "p", "--scope", "user"], "p")],
["/plugin enable p@m", cli("enable", ["enable", "p@m"], "p@m")],
["/plugin disable p", cli("disable", ["disable", "p"], "p")],
["/plugin disable -a", cli("disable", ["disable", "--all"])],
["/plugin disable --all --scope user", cli("disable", ["disable", "--scope", "user", "--all"])],
["/plugin update p@m", cli("update", ["update", "p@m"], "p@m")],
[
"/plugin marketplace add ./dir --scope local --sparse .claude-plugin plugins",
cli(
"marketplace-add",
[
"marketplace",
"add",
"./dir",
"--scope",
"local",
"--sparse",
".claude-plugin",
"plugins",
],
"./dir",
),
],
["/plugin market list", cli("marketplace-list", ["marketplace", "list"])],
["/plugin marketplace rm m", cli("marketplace-remove", ["marketplace", "remove", "m"], "m")],
["/plugin marketplace update", cli("marketplace-update", ["marketplace", "update"])],
[
"/plugin marketplace update m",
cli("marketplace-update", ["marketplace", "update", "m"], "m"),
],
])("%s", (prompt, expected) => {
expect(parsePluginCommand(text(prompt))).toEqual(expected);
});
it.each([
"/plugin install",
"/plugin install p -y",
"/plugin install p --yes",
"/plugin install p --accept-command abc",
"/plugin install p --accept-command=abc",
"/plugin install p --config=--yes",
"/plugin marketplace add x --sparse=-y",
"/plugin install p --marketplace=--accept-command",
"/plugin install p --json",
"/plugin install p --scope managed",
"/plugin install p --scope",
"/plugin install p q",
"/plugin install p --marketplace --scope user",
"/plugin uninstall p --prune",
"/plugin update p --all",
"/plugin list --json",
"/plugin list --data-size",
"/plugin list extra",
"/plugin enable",
"/plugin disable",
"/plugin disable p --all",
"/plugin marketplace",
"/plugin marketplace add",
"/marketplace add owner/repo",
"/plugin add owner/repo",
"/plugin marketplace add x --claudeai",
"/plugin marketplace remove",
"/plugin marketplace update m extra",
"/plugin marketplace frob",
"/plugin install --help",
"/plugin tag",
"/plugin validate .",
"/plugin configure p",
"/plugin init",
"/plugin eval",
"/plugin test",
"/plugin prune",
"/plugin restore-set-aside",
"/plugin details p",
])("%s is usage and no CLI call", (prompt) => {
expect(parsePluginCommand(text(prompt))).toMatchObject({ kind: "usage" });
});
it.each([
["two blocks", [...text("/plugin list"), ...text("more")]],
["an image", [{ type: "image" }]],
["no blocks", []],
])("ignores a prompt with %s", (_name, prompt) => {
expect(parsePluginCommand(prompt)).toBeNull();
});
});
type Call = { file: string; args: string[]; cwd: string; env: Record<string, string | undefined> };
type Reply = { stdout?: string; stderr?: string; code?: number } | Error;
function setup(replies: Reply[], overrides: Partial<PluginCommandDeps> = {}) {
const calls: Call[] = [];
const exec: ExecLike = async (file, args, options) => {
calls.push({ file, args, cwd: options.cwd, env: options.env });
const reply = replies.shift() ?? { stdout: "", code: 0 };
if (reply instanceof Error) throw reply;
return { stdout: reply.stdout ?? "", stderr: reply.stderr ?? "", code: reply.code ?? 0 };
};
const reloadPlugins = vi.fn().mockResolvedValue({ plugins: [{ name: "p" }, { name: "q" }] });
const logError = vi.fn();
const deps: PluginCommandDeps = {
cliPath: async () => "/bin/claude",
cwd: "/work",
env: { PATH: "/bin", CLAUDECODE: "1", CLAUDE_CODE_CHILD_SESSION: "1", KEEP: "yes" },
signal: new AbortController().signal,
query: () => ({ reloadPlugins }) as unknown as Query,
logError,
exec,
...overrides,
};
return { deps, calls, reloadPlugins, logError };
}
const ok = (fields: Record<string, unknown>) => JSON.stringify({ outcome: "ok", ...fields }) + "\n";
const INSTALL_OK = ok({
command: "install",
plugin: "p@m",
pluginId: "p@m",
scope: "user",
message: "Successfully installed plugin: p@m (scope: user)",
});
const LIST_JSON = JSON.stringify(
[
{
id: "p@m",
version: "1.0.0",
scope: "user",
enabled: true,
installPath: "/h/.claude/plugins/cache/m/p/1.0.0",
projectEnabled: false,
},
],
null,
2,
);
describe("runPluginCommand", () => {
it("runs the CLI with --json, the session cwd, and an env without the session markers", async () => {
const { deps, calls } = setup([{ stdout: INSTALL_OK }]);
const result = await runPluginCommand(cli("install", ["install", "p@m"], "p@m"), deps);
expect(calls).toHaveLength(1);
expect(calls[0]).toMatchObject({
file: "/bin/claude",
args: ["plugin", "install", "p@m", "--json"],
cwd: "/work",
});
expect(calls[0]!.env).toEqual({ PATH: "/bin", KEEP: "yes" });
expect(result).toMatchObject({
ok: true,
operation: "install",
message: "Successfully installed plugin: p@m (scope: user)",
});
});
it("reads the last stdout line when text comes before it", async () => {
const { deps } = setup([{ stdout: `Cloning…\nValidating\n${INSTALL_OK}\n` }]);
const result = await runPluginCommand(cli("install", ["install", "p@m"], "p@m"), deps);
expect(result.ok).toBe(true);
expect(result.message).toContain("Successfully installed");
});
it("fails with the CLI message on exit 1 with JSON", async () => {
const failure = JSON.stringify({
command: "marketplace-add",
outcome: "failed",
message: "Path does not exist: /nonexistent",
failureCode: "invalid_source",
});
const { deps, reloadPlugins } = setup([
{ stdout: failure + "\n", stderr: "✘ Path does not exist: /nonexistent\n", code: 1 },
]);
const result = await runPluginCommand(
cli("marketplace-add", ["marketplace", "add", "/nonexistent"], "/nonexistent"),
deps,
);
expect(result).toEqual({
ok: false,
operation: "marketplace-add",
message: "Path does not exist: /nonexistent",
failureCode: "invalid_source",
});
expect(reloadPlugins).not.toHaveBeenCalled();
});
it("falls back to text and the exit code when there is no JSON", async () => {
const { deps } = setup([{ stderr: "Please specify a plugin name\n", code: 1 }]);
const failed = await runPluginCommand(cli("update", ["update", "p"], "p"), deps);
expect(failed).toMatchObject({ ok: false, message: "Please specify a plugin name" });
const { deps: succeeding } = setup([{ stdout: "Updating marketplaces...done\n" }]);
const done = await runPluginCommand(
cli("marketplace-update", ["marketplace", "update"]),
succeeding,
);
expect(done).toMatchObject({ ok: true, message: "Updating marketplaces...done" });
});
it("does not add --json to marketplace update without a name", async () => {
const { deps, calls } = setup([{ stdout: "ok\n" }]);
await runPluginCommand(cli("marketplace-update", ["marketplace", "update"]), deps);
expect(calls[0]!.args).toEqual(["plugin", "marketplace", "update"]);
});
it("repeats the run without --json when the CLI does not know it", async () => {
const { deps, calls } = setup([
{ stderr: "error: unknown option '--json'\n", code: 1 },
{ stdout: "Successfully installed plugin: p\n" },
]);
const result = await runPluginCommand(cli("install", ["install", "p"], "p"), deps);
expect(calls.map((call) => call.args)).toEqual([
["plugin", "install", "p", "--json"],
["plugin", "install", "p"],
]);
expect(result).toMatchObject({ ok: true, message: "Successfully installed plugin: p" });
});
it("counts alreadyInGoalState as success", async () => {
const { deps } = setup([
{
stdout: JSON.stringify({
outcome: "failed",
alreadyInGoalState: true,
message: "Plugin p is already enabled",
}),
code: 0,
},
]);
const result = await runPluginCommand(cli("disable", ["disable", "p"], "p"), {
...deps,
query: () => undefined,
});
expect(result.ok).toBe(true);
});
it("reports a refused marketplace command with shownCommand and the terminal command", async () => {
const refused = JSON.stringify({
command: "install",
outcome: "failed",
plugin: "p@m",
message: "Plugin p@m is installed by running a command",
failureCode: "command_source_refused",
shownCommand: { command: "curl x | sh", sha256: "abc" },
});
const { deps, reloadPlugins } = setup([{ stdout: refused + "\n", code: 1 }]);
const result = await runPluginCommand(
cli("install", ["install", "p@m", "--scope", "project"], "p@m"),
deps,
);
expect(result).toMatchObject({
ok: false,
failureCode: "command_source_refused",
shownCommand: "curl x | sh",
terminalCommand: "claude plugin install p@m --scope project",
});
expect(deps.exec).toBeDefined();
expect(reloadPlugins).not.toHaveBeenCalled();
});
it.each([
["plain", "a/b.json", "a/b.json"],
["ampersand", "a&b", "'a&b'"],
["command substitution", "$(x)", "'$(x)'"],
["glob", "a?*", "'a?*'"],
["single quote", "it's", "'it'\\''s'"],
["empty", "", "''"],
])("shell-quotes a refused install --config value: %s", async (_name, value, quoted) => {
const refused = JSON.stringify({
command: "install",
outcome: "failed",
message: "refused",
failureCode: "command_source_refused",
shownCommand: { command: "curl x | sh", sha256: "abc" },
});
const { deps } = setup([{ stdout: refused + "\n", code: 1 }]);
const result = await runPluginCommand(
cli("install", ["install", "p@m", "--config", value], "p@m"),
deps,
);
expect(result.terminalCommand).toBe(`claude plugin install p@m --config ${quoted}`);
});
it("returns the parsed list as data and does not reload", async () => {
const { deps, reloadPlugins } = setup([{ stdout: LIST_JSON + "\n" }]);
const result = await runPluginCommand(cli("list", ["list"]), deps);
expect(result).toMatchObject({ ok: true, operation: "list", data: [{ id: "p@m" }] });
expect(reloadPlugins).not.toHaveBeenCalled();
});
it("is cancelled when the signal is aborted before or during the run", async () => {
const controller = new AbortController();
controller.abort();
const before = setup([{ stdout: INSTALL_OK }], { signal: controller.signal });
expect(await runPluginCommand(cli("install", ["install", "p"], "p"), before.deps)).toEqual({
ok: false,
operation: "install",
message: "Cancelled.",
});
expect(before.calls).toHaveLength(0);
const during = new AbortController();
const { deps, reloadPlugins } = setup([], {
signal: during.signal,
exec: async () => {
during.abort();
throw new Error("The operation was aborted");
},
});
const result = await runPluginCommand(cli("install", ["install", "p"], "p"), deps);
expect(result).toMatchObject({ ok: false, message: "Cancelled." });
expect(reloadPlugins).not.toHaveBeenCalled();
});
it("turns a spawn error into a failed result and logs it", async () => {
const { deps, logError } = setup([new Error("spawn /bin/claude ENOENT")]);
const result = await runPluginCommand(cli("install", ["install", "p"], "p"), deps);
expect(result).toMatchObject({ ok: false });
expect(result.message).toContain("ENOENT");
expect(logError).toHaveBeenCalled();
});
it("turns a failing cliPath into a failed result", async () => {
const { deps } = setup([], {
cliPath: async () => {
throw new Error("The Claude CLI is missing");
},
});
const result = await runPluginCommand(cli("list", ["list"]), deps);
expect(result).toMatchObject({ ok: false });
expect(result.message).toContain("The Claude CLI is missing");
});
describe("enable", () => {
it("refuses a plugin that is not installed, without calling enable", async () => {
const { deps, calls } = setup([{ stdout: LIST_JSON }]);
const result = await runPluginCommand(
cli("enable", ["enable", "nothere@m"], "nothere@m"),
deps,
);
expect(result).toMatchObject({
ok: false,
operation: "enable",
failureCode: "not_installed",
});
expect(calls.map((call) => call.args)).toEqual([["plugin", "list", "--json"]]);
});
it.each(["p@m", "p"])("enables the installed plugin %s", async (name) => {
const enabled = ok({
command: "enable",
plugin: name,
message: "Successfully enabled plugin: p",
});
const { deps, calls } = setup([{ stdout: LIST_JSON }, { stdout: enabled }]);
const result = await runPluginCommand(cli("enable", ["enable", name], name), deps);
expect(result.ok).toBe(true);
expect(calls[1]!.args).toEqual(["plugin", "enable", name, "--json"]);
});
});
describe("reload", () => {
it.each([
["install", cli("install", ["install", "p@m"], "p@m")],
["uninstall", cli("uninstall", ["uninstall", "p@m"], "p@m")],
["disable", cli("disable", ["disable", "p@m"], "p@m")],
["update", cli("update", ["update", "p@m"], "p@m")],
["marketplace-remove", cli("marketplace-remove", ["marketplace", "remove", "m"], "m")],
])("runs after %s", async (_name, command) => {
const { deps, reloadPlugins } = setup([{ stdout: INSTALL_OK }]);
const result = await runPluginCommand(command, deps);
expect(reloadPlugins).toHaveBeenCalledWith({ refuseIfBusy: true });
expect(result.reload).toEqual({ status: "applied", plugins: ["p", "q"] });
});
it("runs after enable", async () => {
const { deps, reloadPlugins } = setup([{ stdout: LIST_JSON }, { stdout: INSTALL_OK }]);
await runPluginCommand(cli("enable", ["enable", "p@m"], "p@m"), deps);
expect(reloadPlugins).toHaveBeenCalledTimes(1);
});
it.each([
["list", cli("list", ["list"])],
["marketplace-list", cli("marketplace-list", ["marketplace", "list"])],
["marketplace-add", cli("marketplace-add", ["marketplace", "add", "x"], "x")],
["marketplace-update", cli("marketplace-update", ["marketplace", "update", "m"], "m")],
])("does not run after %s", async (_name, command) => {
const { deps, reloadPlugins } = setup([{ stdout: LIST_JSON }]);
const result = await runPluginCommand(command, deps);
expect(reloadPlugins).not.toHaveBeenCalled();
expect(result.reload).toBeUndefined();
});
it.each([
[
"busy",
Object.assign(new Error("busy"), { errorCode: "reload_plugins_busy" }),
{ status: "busy" },
],
["failed", new Error("boom"), { status: "failed", error: "boom" }],
])("reports %s", async (_name, error, expected) => {
const { deps, reloadPlugins, logError } = setup([{ stdout: INSTALL_OK }]);
reloadPlugins.mockRejectedValue(error);
const result = await runPluginCommand(cli("install", ["install", "p@m"], "p@m"), deps);
expect(result.ok).toBe(true);
expect(result.reload).toEqual(expected);
expect(logError).toHaveBeenCalledTimes(expected.status === "failed" ? 1 : 0);
});
it("reports unavailable without a query, and reads the query after the CLI ends", async () => {
let current: Query | undefined = { reloadPlugins: vi.fn() } as unknown as Query;
const replacement = vi.fn().mockResolvedValue({ plugins: [] });
const { deps } = setup([], {
query: () => current,
exec: async () => {
current ??= undefined;
if (current) current = { reloadPlugins: replacement } as unknown as Query;
return { stdout: INSTALL_OK, stderr: "", code: 0 };
},
});
const replaced = await runPluginCommand(cli("install", ["install", "p"], "p"), deps);
expect(replacement).toHaveBeenCalledTimes(1);
expect(replaced.reload).toEqual({ status: "applied", plugins: [] });
current = undefined;
const none = await runPluginCommand(cli("install", ["install", "p"], "p"), deps);
expect(none.reload).toEqual({ status: "unavailable" });
});
});
it("returns usage and an overview without running a mutating command", async () => {
const usage = setup([]);
expect(await runPluginCommand({ kind: "usage", reason: "no" }, usage.deps)).toMatchObject({
ok: false,
operation: "usage",
message: "no",
});
expect(usage.calls).toHaveLength(0);
const overview = setup([
{ stdout: LIST_JSON },
{ stdout: JSON.stringify([{ name: "m", source: "directory", path: "/x" }]) },
]);
const result = await runPluginCommand({ kind: "overview" }, overview.deps);
expect(overview.calls.map((call) => call.args).sort()).toEqual([
["plugin", "list", "--json"],
["plugin", "marketplace", "list", "--json"],
]);
expect(result.data).toMatchObject({ plugins: [{ id: "p@m" }], marketplaces: [{ name: "m" }] });
});
describe("overview failures", () => {
const section = (markdown: string, title: string) =>
markdown.split("\n\n**").find((block) => block.replace(/^\*\*/, "").startsWith(title)) ?? "";
it("reports both lists failing instead of None", async () => {
const { deps } = setup([new Error("spawn ENOENT"), { stderr: "boom", code: 2 }]);
const result = await runPluginCommand({ kind: "overview" }, deps);
expect(result.ok).toBe(false);
const markdown = pluginCommandMarkdown(result);
expect(markdown).not.toContain("None");
expect(markdown).toContain("spawn ENOENT");
expect(markdown).toContain("boom");
});
it("reports only the list that failed", async () => {
const { deps } = setup([{ stdout: LIST_JSON }, { stderr: "no marketplaces", code: 1 }]);
const result = await runPluginCommand({ kind: "overview" }, deps);
expect(result.ok).toBe(false);
const markdown = pluginCommandMarkdown(result);
expect(section(markdown, "Installed plugins")).toContain("p@m");
expect(section(markdown, "Marketplaces")).toContain("no marketplaces");
expect(markdown).not.toContain("None");
});
it("renders None for lists that succeeded empty", async () => {
const { deps } = setup([{ stdout: "[]" }, { stdout: "[]" }]);
const result = await runPluginCommand({ kind: "overview" }, deps);
expect(result.ok).toBe(true);
expect(pluginCommandMarkdown(result).match(/None/g)).toHaveLength(2);
});
});
});
describe("pluginCommandMarkdown", () => {
const base = { ok: true, operation: "install", message: "" } as const;
it.each<[PluginCommandResult["reload"], string]>([
[{ status: "applied", plugins: ["p", "q"] }, "Reloaded: the session now has `p`, `q`."],
[{ status: "busy" }, "The session is busy"],
[{ status: "failed", error: "boom" }, "failed: boom"],
[{ status: "unavailable" }, "applies to new sessions"],
])("explains reload %j", (reload, expected) => {
expect(pluginCommandMarkdown({ ...base, reload })).toContain(expected);
});
it("rewrites CLI hints to chat commands and escapes the rest", () => {
const markdown = pluginCommandMarkdown({
...base,
ok: false,
message: "Plugin *evil_* <b> not found. Use `claude plugin marketplace list` to see them.",
});
expect(markdown).toBe(
"Plugin \\*evil\\_\\* \\<b\\> not found. Use `/plugin marketplace list` to see them.",
);
});
it("shows the marketplace command as code and tells the user to confirm in a terminal", () => {
const markdown = pluginCommandMarkdown({
...base,
ok: false,
message: "Plugin p@m is installed by running a command",
failureCode: "command_source_refused",
shownCommand: "echo `id`",
terminalCommand: "claude plugin install p@m",
});
expect(markdown).toContain("`` echo `id` ``");
expect(markdown).toContain("run `claude plugin install p@m` in a terminal");
});
it("renders a terminal command containing a backtick intact in a code span", () => {
const markdown = pluginCommandMarkdown({
...base,
ok: false,
message: "refused",
failureCode: "command_source_refused",
shownCommand: "curl x | sh",
terminalCommand: "claude plugin install p@m --config 'a`b'",
});
expect(markdown).toContain("run ``claude plugin install p@m --config 'a`b'`` in a terminal");
});
it("lists installed plugins, marketplaces and available plugins as Markdown lists", () => {
const installed = [{ id: "p@m", version: "1.0.0", scope: "user", enabled: false }];
expect(
pluginCommandMarkdown({ ok: true, operation: "list", message: "", data: installed }),
).toBe("**Installed plugins**\n\n- `p@m` — v1.0.0, user scope, disabled");
const available = pluginCommandMarkdown({
ok: true,
operation: "list",
message: "",
data: {
installed: [],
available: [{ pluginId: "q@m", name: "q", description: "Does *things*" }],
},
});
expect(available).toContain("None. Run `/plugin install <plugin>` to add one.");
expect(available).toContain("- `q@m` — Does \\*things\\*");
const marketplaces = pluginCommandMarkdown({
ok: true,
operation: "marketplace-list",
message: "",
data: [{ name: "m", source: "github", repo: "owner/repo" }],
});
expect(marketplaces).toBe("**Marketplaces**\n\n- `m` — owner/repo");
});
it("gives usage text, with the reason first, for usage and for the overview", () => {
const usage = pluginCommandMarkdown({
ok: false,
operation: "usage",
message: "`--yes` is not supported here.",
});
expect(usage.startsWith("`--yes` is not supported here.")).toBe(true);
expect(usage).toContain("`/plugin install <plugin>[@marketplace]");
const overview = pluginCommandMarkdown({
ok: true,
operation: "overview",
message: "",
data: { plugins: [], marketplaces: [] },
});
expect(overview).toContain("**Installed plugins**");
expect(overview).toContain("**Marketplaces**");
expect(overview).toContain("**Usage**");
});
});

View File

@@ -0,0 +1,151 @@
import { describe, expect, it, vi } from "vitest";
import type { Query } from "@anthropic-ai/claude-agent-sdk";
import {
RemoteControlAtStartup,
type RemoteControlCommand,
startsWithRemoteControl,
} from "../remote-control.js";
type EnableRemoteControl = (enabled: boolean) => Promise<{ session_url?: string }>;
/** A session for `RemoteControlAtStartup.connect` whose query serves
* `enableRemoteControl` when it is given. */
function startupSession(
enableRemoteControl: EnableRemoteControl | undefined,
{ working = false, closed = false } = {},
) {
const query = (enableRemoteControl ? { enableRemoteControl } : {}) as unknown as Query;
return {
sessionId: "session-1",
logger: { log: vi.fn(), error: vi.fn() },
query: () => (closed ? undefined : query),
working: () => working,
};
}
const connects = () => vi.fn(async () => ({ session_url: "https://claude.ai/code/session_123" }));
describe("startsWithRemoteControl", () => {
/** The Remote Control fields of the `initialize` result of Claude Code
* 2.1.303 with `remoteControlAtStartup: true` in the user settings. */
const reported = {
remote_control_auto_enable: true,
remote_control_auto_connect_default: false,
remote_control_available: true,
remote_control_auto_on_by_default: false,
};
it.each([
[true, "asks for it", reported],
[
false,
"does not ask for it",
{ ...reported, remote_control_auto_enable: false, remote_control_auto_on_by_default: true },
],
[false, "predates the field", {}],
])("is %s when Claude Code %s", (expected, _case, fields) => {
expect(startsWithRemoteControl({ models: [], ...fields } as any)).toBe(expected);
});
});
describe("RemoteControlAtStartup", () => {
it.each([
[
{ session_url: "https://claude.ai/code/session_123" },
"Continue this session from claude.ai/code or the Claude mobile app: https://claude.ai/code/session_123\nRun /remote-control off to disconnect.",
],
[{}, "Claude Code did not return a session URL.\nRun /remote-control off to disconnect."],
])("connects once and resolves a notice of %j", async (result, description) => {
const enableRemoteControl = vi.fn(async () => result);
const session = startupSession(enableRemoteControl);
const startup = new RemoteControlAtStartup(true);
const notice = await startup.connect(session);
const again = startup.connect(session);
expect(notice).toEqual({ severity: "info", title: "Remote Control connected", description });
expect(again).toBeUndefined();
expect(enableRemoteControl).toHaveBeenCalledExactlyOnceWith(true);
});
it("resolves a refusal as a warning", async () => {
const session = startupSession(async () => {
throw new Error("Remote Control is disabled by policy");
});
const notice = await new RemoteControlAtStartup(true).connect(session);
expect(notice).toEqual({
severity: "warning",
title: "Could not start Remote Control",
description: "Remote Control is disabled by policy",
});
expect(session.logger.error).toHaveBeenCalledExactlyOnceWith(
"Failed to enable Remote Control: Error: Remote Control is disabled by policy",
);
});
it.each([
["Claude Code did not ask for it", false, { supported: true, closed: false }],
["the query has no Remote Control", true, { supported: false, closed: false }],
["the query is closed", true, { supported: true, closed: true }],
])("starts nothing when %s", (_case, asked, { supported, closed }) => {
const enableRemoteControl = connects();
const session = startupSession(supported ? enableRemoteControl : undefined, { closed });
const notice = new RemoteControlAtStartup(asked).connect(session);
expect(notice).toBeUndefined();
expect(enableRemoteControl).not.toHaveBeenCalled();
});
it("starts nothing while the session is busy, and says so in the log", () => {
const enableRemoteControl = connects();
const session = startupSession(enableRemoteControl, { working: true });
const notice = new RemoteControlAtStartup(true).connect(session);
expect(notice).toBeUndefined();
expect(enableRemoteControl).not.toHaveBeenCalled();
expect(session.logger.log).toHaveBeenCalledExactlyOnceWith(
"Session session-1 is busy, so Remote Control does not start with it. /remote-control starts it.",
);
});
it.each<[string, RemoteControlCommand[], number]>([
["no /remote-control", [], 1],
["/remote-control off", [{ action: "disconnect" }], 0],
[
"/remote-control off, then /remote-control",
[{ action: "disconnect" }, { action: "connect" }],
1,
],
])(
"after %s on the old query, a restart's query connects %i times",
async (_case, commands, calls) => {
const previous = new RemoteControlAtStartup(true);
commands.forEach((command) => previous.commandRan(command));
const enableRemoteControl = connects();
const restarted = new RemoteControlAtStartup(true);
restarted.restartedFrom(previous);
await restarted.connect(startupSession(enableRemoteControl));
expect(enableRemoteControl).toHaveBeenCalledTimes(calls);
},
);
it("keeps Remote Control off through a second restart", async () => {
const first = new RemoteControlAtStartup(true);
first.commandRan({ action: "disconnect" });
const second = new RemoteControlAtStartup(true);
second.restartedFrom(first);
const enableRemoteControl = connects();
const third = new RemoteControlAtStartup(true);
third.restartedFrom(second);
await third.connect(startupSession(enableRemoteControl));
expect(enableRemoteControl).not.toHaveBeenCalled();
});
});

View File

@@ -5198,6 +5198,7 @@ describe("request validation", () => {
["review", "first"],
["compact", "Compact the conversation"],
["mcp", expect.any(String)],
["plugin", expect.any(String)],
]);
});
});
@@ -14838,10 +14839,11 @@ describe("terminal slash command filtering", () => {
const updates = sessionUpdate.mock.calls.map((c: any[]) => (c[0] as { update: any }).update);
const commandsUpdate = updates.find((u) => u.sessionUpdate === "available_commands_update");
expect(commandsUpdate).toBeDefined();
// `mcp` is the adapter's own entry, advertised after the CLI's commands.
// `mcp` and `plugin` are the adapter's own entries, advertised after the CLI's commands.
expect(commandsUpdate.availableCommands.map((c: { name: string }) => c.name)).toEqual([
"compact",
"mcp",
"plugin",
]);
});
@@ -15014,6 +15016,7 @@ describe("skill commands in available_commands_update", () => {
["missing", undefined],
["mcp:review", undefined],
["mcp", undefined],
["plugin", undefined],
]);
});
@@ -15038,6 +15041,7 @@ describe("skill commands in available_commands_update", () => {
["missing", undefined],
["mcp:review", undefined],
["mcp", undefined],
["plugin", undefined],
]);
});
});

View File

@@ -46,6 +46,11 @@ let mcpAuthenticateImpl: (serverName: string) => Promise<{
requiresUserAction: boolean;
callbackExpected: boolean;
}>;
/** `remote_control_auto_enable` of the `initialize` result; left out when unset. */
let remoteControlAutoEnable: boolean | undefined;
/** The query's `enableRemoteControl`; left off the query when unset. */
let enableRemoteControlImpl:
((enabled: boolean, name?: string) => Promise<{ session_url?: string }>) | undefined;
vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
const actual = await vi.importActual<typeof import("@anthropic-ai/claude-agent-sdk")>(
"@anthropic-ai/claude-agent-sdk",
@@ -87,6 +92,7 @@ vi.mock("@anthropic-ai/claude-agent-sdk", async () => {
},
mcpServerStatus: () => mcpServerStatusResult(),
mcpAuthenticate: (serverName: string) => mcpAuthenticateImpl(serverName),
...(enableRemoteControlImpl ? { enableRemoteControl: enableRemoteControlImpl } : {}),
});
},
getSessionMessages: vi.fn(() => sessionMessagesResult()),
@@ -104,6 +110,9 @@ function initializationResponse() {
supportsAutoMode: true,
},
],
...(remoteControlAutoEnable === undefined
? {}
: { remote_control_auto_enable: remoteControlAutoEnable }),
};
}
@@ -150,6 +159,8 @@ describe("createSession options merging", () => {
requiresUserAction: false,
callbackExpected: false,
});
remoteControlAutoEnable = undefined;
enableRemoteControlImpl = undefined;
vi.resetModules();
const acpAgent = await import("../../v1/acp-agent.js");
@@ -2161,6 +2172,131 @@ describe("createSession options merging", () => {
});
});
describe("Remote Control at session start", () => {
it("starts after the session/new response when Claude Code asks for it", async () => {
remoteControlAutoEnable = true;
const enableRemoteControl = vi.fn(async () => ({
session_url: "https://claude.ai/code/session_123",
}));
enableRemoteControlImpl = enableRemoteControl;
await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
const startedAtResponse = enableRemoteControl.mock.calls.length;
await vi.waitFor(() => expect(enableRemoteControl).toHaveBeenCalled());
expect(startedAtResponse).toBe(0);
expect(enableRemoteControl).toHaveBeenCalledExactlyOnceWith(true);
});
it("starts again on the new query of a provider switch, and not at a later resume", async () => {
remoteControlAutoEnable = true;
const enableRemoteControl = vi.fn(async () => ({
session_url: "https://claude.ai/code/session_123",
}));
enableRemoteControlImpl = enableRemoteControl;
const sessionUpdate = vi.spyOn(agent.client, "sessionUpdate");
const notices = () =>
sessionUpdate.mock.calls.filter(([{ update }]) =>
JSON.stringify(update).includes("Remote Control connected"),
);
const params = { cwd: process.cwd(), mcpServers: [] };
const { sessionId } = await agent.newSession(params);
await vi.waitFor(() => expect(notices()).toHaveLength(1));
// Closing the old query ends its Remote Control.
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gw.example",
headers: {},
});
await vi.waitFor(() => expect(notices()).toHaveLength(2));
await agent.resumeSession({ sessionId, ...params });
// Past the timer of the resume's setup response, which runs the connect.
await new Promise((resolve) => setTimeout(resolve, 20));
expect(enableRemoteControl).toHaveBeenCalledTimes(2);
expect(enableRemoteControl).toHaveBeenLastCalledWith(true);
expect(notices()).toHaveLength(2);
});
it.each<[string, (agent: ClaudeAcpAgentType, sessionId: string) => Promise<unknown>]>([
[
"a provider switch",
(agent) =>
agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gw.example",
headers: {},
}),
],
[
"a resume that changes its options",
(agent, sessionId) =>
agent.resumeSession({
sessionId,
cwd: process.cwd(),
mcpServers: [],
_meta: { claudeCode: { options: { maxTurns: 10 } } },
}),
],
])(
"keeps Remote Control off on the new query of %s after /remote-control off",
async (_case, restart) => {
remoteControlAutoEnable = true;
const enableRemoteControl = vi.fn(async () => ({
session_url: "https://claude.ai/code/session_123",
}));
enableRemoteControlImpl = enableRemoteControl;
const { sessionId } = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
await vi.waitFor(() => expect(enableRemoteControl).toHaveBeenCalledOnce());
await agent.prompt({ sessionId, prompt: [{ type: "text", text: "/remote-control off" }] });
const optionsBefore = capturedOptions;
await restart(agent, sessionId);
// Past the timer of a setup response, which connects a new query.
await new Promise((resolve) => setTimeout(resolve, 20));
expect(capturedOptions).not.toBe(optionsBefore);
expect(enableRemoteControl.mock.calls).toEqual([[true], [false]]);
},
);
it("keeps Remote Control off on the new query of a provider switch while /remote-control off is still out", async () => {
remoteControlAutoEnable = true;
let turnOff!: () => void;
const enableRemoteControl = vi.fn(async (enabled: boolean) => {
// The off request is still out when the provider switch restarts the query.
if (!enabled) await new Promise<void>((resolve) => (turnOff = resolve));
return { session_url: "https://claude.ai/code/session_123" };
});
enableRemoteControlImpl = enableRemoteControl;
const { sessionId } = await agent.newSession({ cwd: process.cwd(), mcpServers: [] });
await vi.waitFor(() => expect(enableRemoteControl).toHaveBeenCalledOnce());
const off = agent.prompt({
sessionId,
prompt: [{ type: "text", text: "/remote-control off" }],
});
await vi.waitFor(() => expect(enableRemoteControl).toHaveBeenCalledTimes(2));
const optionsBefore = capturedOptions;
await agent.unstable_setProvider({
providerId: "main",
apiType: "anthropic",
baseUrl: "https://gw.example",
headers: {},
});
turnOff();
await off;
// Past the timers of the restart's setup work.
await new Promise((resolve) => setTimeout(resolve, 20));
expect(capturedOptions).not.toBe(optionsBefore);
expect(enableRemoteControl.mock.calls).toEqual([[true], [false]]);
});
});
describe("context window seeding", () => {
function sessionFor(sessionId: string) {
return (agent as unknown as { sessions: Record<string, any> }).sessions[sessionId];

View File

@@ -12,7 +12,7 @@ import type { Options, SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
import type { ClaudeAcpAgent } from "../../v1/acp-agent.js";
import type { AcpClient } from "../../acp-client.js";
import { initializeClient } from "../helpers.js";
import { successfulResultMessage } from "./session-doubles.js";
import { runningAdapterCommands, successfulResultMessage } from "./session-doubles.js";
const execFileSpy = vi.hoisted(() => vi.fn());
@@ -463,6 +463,21 @@ describe("idle compaction in the agent", () => {
await agent.dispose();
});
it("does not compact while an adapter command runs", async () => {
const claude = scriptClaudeCode();
const { agent, sessionId } = await connect();
await promptHi(agent, sessionId);
await claude.untilIdle();
agent.sessions[sessionId]!.adapterCommands = runningAdapterCommands(new Promise(() => {}), {
abortable: true,
});
await vi.advanceTimersByTimeAsync(54 * MINUTE_MS);
expect(claude.received).toEqual(["hi"]);
await agent.dispose();
});
/** The idle `/compact` is not a user prompt, so it asks for no title; a client prompt in the same session does. */
it("does not feed the idle compaction's prompt to the title machinery", async () => {
const claude = scriptClaudeCode();

Some files were not shown because too many files have changed in this diff Show More