Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 84 additions & 120 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 20 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kit"
version = "0.1.91"
version = "0.1.92"
edition = "2024"
rust-version = "1.94.0"
publish = false
Expand All @@ -9,9 +9,9 @@ publish = false
a2a-protocol-client = "=0.9.0"
a2a-protocol-server = { version = "=0.9.0", default-features = false }
a2a-protocol-types = "=0.9.0"
agent-client-protocol = { version = "=2.0.0", features = ["unstable_session_fork"] }
agent-client-protocol = { version = "=2.0.0", features = ["unstable_session_fork", "unstable_session_inject"] }
agent-client-protocol-http = { version = "=2.0.0", default-features = false, features = ["server"] }
agentkit-acp = "=0.10.7"
agentkit-acp = { version = "=0.10.9", features = ["unstable-inject"] }
agentkit-adapter-completions = "=0.10.6"
agentkit-core = "=0.10.5"
agentkit-context = "=0.10.5"
Expand Down Expand Up @@ -81,3 +81,20 @@ windows-sys = { version = "=0.61.2", features = [
[dev-dependencies]
jsonwebtoken = { version = "=11.0.0", default-features = false, features = ["aws_lc_rs", "use_pem"] }
tempfile = "=3.27.0"

[patch.crates-io]
agentkit-acp = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-adapter-completions = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-core = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-context = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-compaction = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-loop = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-mcp = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-http = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-plugins = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-provider-openrouter = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-task-manager = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-tool-compose = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agentkit-tools-core = { git = "https://github.com/danielkov/agentkit.git", rev = "4299f31ec1455ea8ee4c46b4dce8e5bec4fdc597" }
agent-client-protocol = { git = "https://github.com/danielkov/rust-sdk.git", rev = "2f039993d1d6ed8da35b38c31f54a7cbb7338c70" }
agent-client-protocol-http = { git = "https://github.com/danielkov/rust-sdk.git", rev = "2f039993d1d6ed8da35b38c31f54a7cbb7338c70" }
23 changes: 23 additions & 0 deletions docs/issues/background-subagents-stuck-starting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Background subagents remain in `starting`

## Summary

Subagents launched from one background `compose` call remained in the `starting` state indefinitely. The same subagent workflow started and completed normally when launched alone in a foreground `compose` call.

## Environment

- Kit harness: 0.1.86
- Parent subagent depth: 1/2
- Three independent `subagent` calls were launched from one `compose` program with `background: 1`.

## Observed behavior

The three sessions remained in `starting` for more than two minutes. Closing completed inspection sessions did not unblock them. The parent had to close the three starting sessions and relaunch each task in a foreground call. This delayed implementation and prevented the intended parallel edit phase.

## Expected behavior

Background subagents should leave `starting`, or fail with an actionable startup error. If concurrent startup is unsupported, `compose` should queue the calls visibly instead of leaving them indefinitely in `starting`.

## Workaround

Close the stuck sessions and launch each subagent in a foreground `compose` call.
13 changes: 13 additions & 0 deletions docs/issues/subagent-edits-not-applied-to-requested-worktree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Subagent reported edits that were absent from the requested worktree

## Summary

A completed subagent reported that it edited `src/protocols/acp/v2.rs` in an explicitly named worktree and passed targeted checks. The parent session immediately inspected that worktree, but the file still matched `HEAD` and `git status` showed no modification for it. Re-prompting the same subagent to reapply the patch made the diff appear.

## Impact

The completion report and check results were not sufficient evidence that edits reached the requested worktree. The parent had to detect the missing diff and repeat the implementation step.

## Expected behavior

When a subagent is told to edit an absolute worktree path, its reported file changes and checks should apply to that path. If the harness uses an isolated fallback instead, the result should say so and return a patch or provide an explicit promotion step.
9 changes: 5 additions & 4 deletions docs/user/getting-started-and-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ kit prompt --root /path/to/project \

### ACP and A2A server commands

Use `kit serve` for ACP on stdio plus a selectable HTTP protocol surface:
Use `kit serve` for ACP v1 on stdio plus selectable HTTP protocol surfaces:

```sh
kit serve --root /path/to/project # A2A
Expand All @@ -136,12 +136,13 @@ kit serve --root /path/to/project --http 127.0.0.1:7331
kit serve --remote-acp --no-a2a --no-stdio --http 0.0.0.0:8081 # daemon
```

Without `--a2a` (or its `--http` alias), `serve` binds an available loopback port. Remote ACP is available at `/acp` over HTTP/SSE or WebSocket. Stdout remains reserved for ACP, so local stdio and remote ACP can run together. Add `--no-stdio` for a foreground daemon that does not depend on stdin; this option requires `--remote-acp`. SIGINT and, on Unix, SIGTERM stop accepts, interrupt active ACP sessions, and allow about five seconds for concurrent cleanup before remaining session actors are aborted.
Without `--a2a` (or its `--http` alias), `serve` binds an available loopback port. Remote ACP v1 and v2 negotiate on the standard `/acp` endpoint; `/acp/v2` is an explicit v2-only alias. Both routes use the same HTTP listener, bearer-token policy, and HTTP/SSE or WebSocket transports. The `kit serve` stdio connection remains ACP v1. Stdout remains reserved for ACP, so local stdio and remote ACP can run together. Add `--no-stdio` for a foreground daemon that does not depend on stdin; this option requires `--remote-acp`. SIGINT and, on Unix, SIGTERM stop accepts, interrupt active ACP sessions, and allow about five seconds for concurrent cleanup before remaining session actors are aborted.

Add `--server-credential-file /private/token` to require the file's single bearer token for every request on the HTTP listener. A non-loopback daemon must not be exposed without authentication and suitable network controls. Use `kit acp` when the host needs only ACP on stdio and no HTTP listener:
Add `--server-credential-file /private/token` to require the file's single bearer token for every request on the HTTP listener. A non-loopback daemon must not be exposed without authentication and suitable network controls. Use `kit acp` when the host needs only ACP on stdio and no HTTP listener. Select the wire version explicitly with `--protocol-version 1|2`; omitting it defaults to ACP v1:

```sh
kit acp --root /path/to/project
kit acp --root /path/to/project --protocol-version 1
kit acp --root /path/to/project --protocol-version 2
```

## Configure `~/.kit/config.toml`
Expand Down
4 changes: 2 additions & 2 deletions docs/user/subagents-and-acp-harnesses.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Text-only turns omit `updates`. Capture is limited to 64 update objects and 64 K

## Choose the built-in `acp.kit` harness

`acp.kit` is always available and is the default when `[subagent].harness` is not configured. By default Kit launches the installed `kit` executable as `kit acp`. A built-in child inherits the runtime root, provider, model, MCP configuration and credential storage, cancellation, and nesting depth. An explicit `subagent.model` selection overrides the inherited model for that ACP session. It does not start an A2A listener.
`acp.kit` is always available and is the default when `[subagent].harness` is not configured. By default Kit launches the installed `kit` executable as `kit acp`, whose default stdio protocol is ACP v1. A built-in child inherits the runtime root, provider, model, MCP configuration and credential storage, cancellation, and nesting depth. An explicit `subagent.model` selection overrides the inherited model for that ACP session. It does not start an A2A listener.

You can override only the executable and base arguments while preserving built-in Kit behavior:

Expand All @@ -82,7 +82,7 @@ Built-in subagent transcripts are durable on disk, but their reusable parent-own

## Configure a generic ACP v1 harness

A generic harness must speak ACP v1 as newline-delimited JSON-RPC over stdio and support `initialize`, `session/new`, and `session/prompt`. `session/fork` and `session/close` are optional capabilities. Keep stdout protocol-only; the agent may log to stderr. Kit runs the executable directly with the runtime root as its current working directory and inherits the parent environment. It does not invoke a shell, so pipes, environment assignments, compound commands, and shell quoting in `command` or `args` do not work.
Generic external child harnesses remain ACP v1: they must speak newline-delimited JSON-RPC over stdio and support `initialize`, `session/new`, and `session/prompt`. `session/fork` and `session/close` are optional capabilities. Keep stdout protocol-only; the agent may log to stderr. Kit runs the executable directly with the runtime root as its current working directory and inherits the parent environment. It does not invoke a shell, so pipes, environment assignments, compound commands, and shell quoting in `command` or `args` do not work.

Configure trusted argv profiles in `~/.kit/config.toml`:

Expand Down
Loading