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
100 changes: 53 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 5 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ tokio-tungstenite = { version = "=0.29.0", default-features = false, features =
a2a-protocol-client = "=0.11.0"
a2a-protocol-server = { version = "=0.11.0", default-features = false }
a2a-protocol-types = "=0.11.0"
agent-client-protocol = { version = "=2.0.0", features = ["unstable_session_fork", "unstable_session_inject"] }
agent-client-protocol-schema = { git = "https://github.com/danielkov/agent-client-protocol", rev = "6e7e044f9464c4fd652d90699a09e9edc8b3bbad", features = ["unstable_session_notices", "unstable_session_compaction", "unstable_tool_call_name"] }
agent-client-protocol-http = { version = "=2.0.0", default-features = false, features = ["server", "client"] }
agentkit-acp = { version = "=0.10.11", features = ["unstable-inject"] }
agent-client-protocol = { package = "agentkit-acp-sdk", version = "=2.2.0", features = ["unstable_session_fork", "unstable_session_inject"] }
agent-client-protocol-schema = { package = "agentkit-acp-schema", version = "=1.9.1", features = ["unstable_session_notices", "unstable_session_compaction"] }
agent-client-protocol-http = { package = "agentkit-acp-http", version = "=2.2.0", default-features = false, features = ["server", "client"] }
agentkit-acp = { version = "=0.10.12", features = ["unstable-inject"] }
agentkit-adapter-completions = "=0.10.9"
agentkit-core = "=0.10.5"
agentkit-context = "=0.10.5"
agentkit-compaction = "=0.10.5"
agentkit-loop = { version = "=0.10.12", features = ["otel"] }
agentkit-loop = { version = "=0.10.13", features = ["otel"] }
agentkit-mcp = "=0.10.7"
agentkit-http = "=0.10.7"
agentkit-plugins = "=0.10.7"
Expand Down Expand Up @@ -124,18 +124,6 @@ windows-sys = { version = "=0.61.2", features = [
jsonwebtoken = { version = "=11.0.0", default-features = false, features = ["aws_lc_rs", "use_pem"] }
tokio = { version = "=1.53.1", features = ["test-util"] }

[patch.crates-io]
agentkit-loop = { git = "https://github.com/danielkov/agentkit.git", rev = "bec9dcc45ee0f436d538286bc220b16dc19fd5f3" }
agentkit-acp = { git = "https://github.com/daviddanialy/agentkit.git", rev = "6d519ed1e93e28e54ba1cc18889534e2e8337181" }
agent-client-protocol = { git = "https://github.com/danielkov/rust-sdk.git", rev = "423ba77cd555a09f68472b93c142c8f0baaabf43" }
agent-client-protocol-http = { git = "https://github.com/danielkov/rust-sdk.git", rev = "423ba77cd555a09f68472b93c142c8f0baaabf43" }

[patch."https://github.com/danielkov/agentkit.git"]
agentkit-capabilities = "=0.10.5"
agentkit-core = "=0.10.5"
agentkit-task-manager = "=0.10.7"
agentkit-tools-core = "=0.10.5"

# Deny also in test builds; only test-only scopes may relax ergonomics. Crate
# roots additionally forbid these in production so local allows cannot evade it.
[lints.clippy]
Expand All @@ -147,9 +135,3 @@ todo = "deny"
unimplemented = "deny"
disallowed_methods = "deny"
disallowed_macros = "deny"

# Keep the media-budget fork limited to ACP; share the existing loop and registry types.
[patch."https://github.com/daviddanialy/agentkit.git"]
agentkit-loop = { git = "https://github.com/danielkov/agentkit.git", rev = "bec9dcc45ee0f436d538286bc220b16dc19fd5f3" }
agentkit-core = "=0.10.5"
agentkit-tools-core = "=0.10.5"
2 changes: 1 addition & 1 deletion fixtures/mock-acp-v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def prompt(request):
if "MOCK_REJECT" in text:
send({"jsonrpc": "2.0", "id": request["id"], "error": {"code": -32602, "message": "prompt rejected"}})
return
respond(request["id"], {})
respond(request["id"], {"messageId": "user-1"})
send({"jsonrpc": "2.0", "method": "session/update", "params": {"sessionId": session_id, "update": {"sessionUpdate": "state_update", "state": "running"}}})
if "MOCK_PERMISSION" in text:
send({
Expand Down
2 changes: 1 addition & 1 deletion fixtures/mock-acp.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def prompt(request):
"sessionId": request["params"]["sessionId"],
"update": {"sessionUpdate": "state_update", "state": "idle", "stopReason": "refusal"}
}})
respond(request["id"], {})
respond(request["id"], {"messageId": "user-1"})
send({"jsonrpc": "2.0", "method": "session/update", "params": {
"sessionId": request["params"]["sessionId"],
"update": {"sessionUpdate": "state_update", "state": "running"}
Expand Down
4 changes: 2 additions & 2 deletions macos/ACP/Schema/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Pinned ACP v2 schema

`acp-v2.schema.json` and `acp-v2.meta.json` are copied verbatim from the ACP
unstable v2 schema at `agent-client-protocol` commit
`6e7e044f9464c4fd652d90699a09e9edc8b3bbad`, the same revision pinned through
unstable v2 schema at `danielkov/agent-client-protocol` commit
`b7ddb8370e72e3adb6b895f879876cdd3f717ab9`, the source of the `agentkit-acp-schema` 1.9.1 crate in
Kit's Rust dependency graph. They are persistent, versioned build inputs.

Run `scripts/generate-acp-swift.py` after intentionally updating the pin. CI runs
Expand Down
33 changes: 21 additions & 12 deletions macos/ACP/Schema/acp-v2.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@
]
},
"name": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nProgrammatic name of the tool being invoked.\n\nThis field is optional and has patch semantics. Omission means no\nchange, `null` clears the name, and a string replaces it. For a tool\ncall ID the client has not seen before, omission or `null` means that no\ntool name is available.",
"description": "Programmatic name of the tool being invoked.\n\nThis field is optional and has patch semantics. Omission means no\nchange, `null` clears the name, and a string replaces it. For a tool\ncall ID the client has not seen before, omission or `null` means that no\ntool name is available.",
"type": ["string", "null"],
"x-deserialize-default-on-error": true
},
Expand Down Expand Up @@ -5267,19 +5267,32 @@
"x-method": "session/set_config_option"
},
"PromptResponse": {
"description": "Response acknowledging that a user prompt was accepted.\n\nThis response does not indicate that the agent has finished processing.\nProcessing and completion are reported through `state_update` session updates.\n\nSee protocol docs: [Prompt Accepted](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#2-prompt-accepted)",
"description": "Response acknowledging that a user prompt was inserted into the ACP conversation.\n\nThis response does not indicate that the prompt was merely received or queued, nor that the\nagent has finished processing it.\nProcessing and completion are reported through `state_update` session updates.\n\nSee protocol docs: [Prompt Accepted](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle#2-prompt-accepted)",
"type": "object",
"properties": {
"messageId": {
"description": "Identifies the user message inserted into the ACP conversation.\n\nRequired and non-null. Omission and explicit `null` are both invalid.\n\nThe corresponding user-message session update carries this same identifier and may arrive\nbefore or after this response. Agents must echo the message during the live session, but are\nnot required to retain it. If retained and replayed, the message keeps this identifier.",
"allOf": [
{
"$ref": "#/$defs/MessageId"
}
]
},
"_meta": {
"description": "The _meta property is reserved by ACP to allow clients and agents to attach additional\nmetadata to their interactions. Implementations MUST NOT make assumptions about values at\nthese keys.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/v2/draft/extensibility)",
"type": ["object", "null"],
"x-deserialize-default-on-error": true,
"additionalProperties": true
}
},
"required": ["messageId"],
"x-side": "agent",
"x-method": "session/prompt"
},
"MessageId": {
"description": "Unique identifier for a message within a session.",
"type": "string"
},
"InjectSessionResponse": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse acknowledging that an injected message is pending delivery.",
"type": "object",
Expand All @@ -5303,10 +5316,6 @@
"x-side": "agent",
"x-method": "session/inject"
},
"MessageId": {
"description": "Unique identifier for a message within a session.",
"type": "string"
},
"RevokeInjectSessionResponse": {
"description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse confirming that a pending injected message was revoked.",
"type": "object",
Expand Down Expand Up @@ -7923,7 +7932,7 @@
},
{
"title": "ResumeSessionRequest",
"description": "Resumes an existing session.\n\nThe agent should resume the session context, allowing the conversation\nto continue. If `replayFrom` is set, the agent should replay\nconversation history before responding.",
"description": "Resumes an existing session.\n\nThe agent should resume the session context, allowing the conversation\nto continue. If `replayFrom` is set, the agent should replay\nretained conversation history before responding.",
"allOf": [
{
"$ref": "#/$defs/ResumeSessionRequest"
Expand All @@ -7950,7 +7959,7 @@
},
{
"title": "PromptRequest",
"description": "Processes a user prompt within a session.\n\nThis request accepts the prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Returns once the prompt is accepted\n\nAfter acceptance, the Agent reports the accepted user message,\nprocessing state, output, tool calls, and completion through\n`session/update` notifications.\n\nSee protocol docs: [Prompt Lifecycle](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle)",
"description": "Processes a user prompt within a session.\n\nAcceptance means insertion into the ACP conversation:\n- Receives user messages with optional context (files, images, etc.)\n- Returns the inserted user message's ID without waiting for processing to finish\n\nThe Agent reports the user message with the same ID through `session/update`;\nthis notification may arrive before or after the response. Processing state,\noutput, tool calls, and completion are also reported through session updates.\n\nSee protocol docs: [Prompt Lifecycle](https://agentclientprotocol.com/protocol/v2/draft/prompt-lifecycle)",
"allOf": [
{
"$ref": "#/$defs/PromptRequest"
Expand Down Expand Up @@ -8799,7 +8808,7 @@
"x-method": "session/fork"
},
"ResumeSessionRequest": {
"description": "Request parameters for resuming an existing session.\n\nResumes an existing session and optionally replays prior conversation\nhistory according to `replayFrom`.",
"description": "Request parameters for resuming an existing session.\n\nResumes an existing session and optionally replays retained conversation\nhistory according to `replayFrom`.",
"type": "object",
"properties": {
"sessionId": {
Expand Down Expand Up @@ -8837,7 +8846,7 @@
"x-deserialize-skip-invalid-items": true
},
"replayFrom": {
"description": "Inclusive cursor describing where conversation replay should begin.\n\nOptional. Omitted or `null` both mean the Agent should resume without\nreplaying previous conversation history. Replay cursors are inclusive:\nreplay includes the position identified by the cursor. Supplying\n`{ \"type\": \"start\" }` means the Agent should replay the whole\nconversation before responding.",
"description": "Inclusive cursor describing where conversation replay should begin.\n\nOptional. Omitted or `null` both mean the Agent should resume without\nreplaying previous conversation history. Replay cursors are inclusive:\nreplay includes the position identified by the cursor. Supplying\n`{ \"type\": \"start\" }` means the Agent should replay all retained\nconversation history before responding.",
"anyOf": [
{
"$ref": "#/$defs/ReplayFrom"
Expand All @@ -8863,7 +8872,7 @@
"description": "Inclusive cursor describing where replayed session history should begin.\n\nReplay includes the position identified by the cursor.",
"anyOf": [
{
"description": "Replay the whole conversation from its first replayable entry.",
"description": "Replay all retained conversation history from its first replayable entry.",
"type": "object",
"properties": {
"type": {
Expand Down Expand Up @@ -8914,7 +8923,7 @@
]
},
"ReplayFromStart": {
"description": "Inclusive replay cursor requesting replay from the start of the conversation.",
"description": "Inclusive replay cursor requesting replay from the start of retained conversation history.",
"type": "object",
"properties": {
"_meta": {
Expand Down
8 changes: 5 additions & 3 deletions macos/KitDesktop/Generated/ACPWireModels.generated.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by scripts/generate-acp-swift.py; DO NOT EDIT.
// Source: ACP v2 unstable schema, agent-client-protocol rev 6e7e044f9464c4fd652d90699a09e9edc8b3bbad
// Schema SHA-256: bd4bcc672f4cfcb3bd2a320d355ab6bf2d240a2a7177ca995cf6a36f24d3bd31
// Source: ACP v2 unstable schema, agent-client-protocol rev b7ddb8370e72e3adb6b895f879876cdd3f717ab9
// Schema SHA-256: 868810deef730e033dd413cc3dbb1d6524ef14c10c6abb18df00a9eb1e70979b

// swiftlint:disable file_length
import Foundation
Expand Down Expand Up @@ -122,7 +122,9 @@ struct ACPPromptRequest: Codable, Equatable {
var prompt: [JSONValue]
}

struct ACPPromptResponse: Codable, Equatable {}
struct ACPPromptResponse: Codable, Equatable {
var messageId: String
}

struct ACPInjectSessionRequest: Codable, Equatable {
var sessionId: String
Expand Down
Binary file not shown.
8 changes: 5 additions & 3 deletions scripts/generate-acp-swift.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"sessionId": ("allOf($ref:SessionId)", True),
"prompt": ("array[$ref:ContentBlock]", True),
},
"PromptResponse": {},
"PromptResponse": {"messageId": ("allOf($ref:MessageId)", True)},
"InjectSessionRequest": {
"sessionId": ("allOf($ref:SessionId)", True),
"mode": ("allOf($ref:SessionInjectMode)", True),
Expand Down Expand Up @@ -375,7 +375,9 @@
var prompt: [JSONValue]
}

struct ACPPromptResponse: Codable, Equatable {}
struct ACPPromptResponse: Codable, Equatable {
var messageId: String
}

struct ACPInjectSessionRequest: Codable, Equatable {
var sessionId: String
Expand Down Expand Up @@ -628,7 +630,7 @@ def render() -> str:
return (
"// Generated by scripts/generate-acp-swift.py; DO NOT EDIT.\n"
"// Source: ACP v2 unstable schema, agent-client-protocol rev "
"6e7e044f9464c4fd652d90699a09e9edc8b3bbad\n"
"b7ddb8370e72e3adb6b895f879876cdd3f717ab9\n"
f"// Schema SHA-256: {digest}\n\n" + BODY
)

Expand Down
Binary file not shown.
Loading
Loading