claude_agent 0.4.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/rules/releases.md +56 -38
- data/CHANGELOG.md +15 -0
- data/SPEC.md +71 -26
- data/lib/claude_agent/client.rb +36 -0
- data/lib/claude_agent/control_protocol.rb +32 -0
- data/lib/claude_agent/message_parser.rb +43 -2
- data/lib/claude_agent/messages.rb +153 -4
- data/lib/claude_agent/version.rb +1 -1
- data/sig/claude_agent.rbs +66 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 47641ba77d22b8a0f150ddad47d58593e05027355f278d233fa3905e9463ff0b
|
|
4
|
+
data.tar.gz: 8615b423941943ec78c76100e4acbf313f2f038033fe1dd21ff85df3ffbd7a11
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f683a79341de2cfd99db5a287562bc93d4cb9c8c46c1378e997d5c1ef6eff55d5aeed4596d74388d62bb6235484f7ddb9ffc75ff967fa6e716da971293fc64f0
|
|
7
|
+
data.tar.gz: 0dca9c4ce8ea188c9dbab54637c03ce9f291dfb7b60a81594f2098acf64253609e9a3150c1397a16cdb2e7f255d67f753409f6676cf17803a5b081813b73e8e5
|
data/.claude/rules/releases.md
CHANGED
|
@@ -14,66 +14,84 @@ Follow [Semantic Versioning 2.0.0](https://semver.org/):
|
|
|
14
14
|
|
|
15
15
|
## Changelog Format
|
|
16
16
|
|
|
17
|
-
Follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
|
|
17
|
+
Follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format. Add changes to the `[Unreleased]` section as you work. The release script will automatically move them to a versioned section.
|
|
18
18
|
|
|
19
19
|
## Release Process
|
|
20
20
|
|
|
21
21
|
### Prerequisites
|
|
22
22
|
|
|
23
23
|
1. All tests pass (`bundle exec rake`)
|
|
24
|
-
2.
|
|
25
|
-
3. You have push access to
|
|
26
|
-
4.
|
|
24
|
+
2. Changes documented in `[Unreleased]` section of CHANGELOG.md
|
|
25
|
+
3. You have push access to the repository
|
|
26
|
+
4. Trusted Publishing configured on RubyGems (one-time setup)
|
|
27
27
|
|
|
28
|
-
### Release
|
|
28
|
+
### Step 1: Prepare Release PR
|
|
29
29
|
|
|
30
|
-
```bash
|
|
31
|
-
bin/release VERSION
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Example:
|
|
35
30
|
```bash
|
|
36
31
|
bin/release 1.2.0
|
|
37
32
|
```
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
This will:
|
|
35
|
+
1. Create branch `release-1.2.0`
|
|
36
|
+
2. Update `lib/claude_agent/version.rb`
|
|
37
|
+
3. Update `Gemfile.lock`
|
|
38
|
+
4. Move `[Unreleased]` changelog entries to `[1.2.0]`
|
|
39
|
+
5. Commit, push, and open a PR
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
2. Checks CHANGELOG.md has entry for version
|
|
43
|
-
3. Checks tag doesn't already exist
|
|
44
|
-
4. Updates `lib/claude_agent/version.rb`
|
|
45
|
-
5. Updates `Gemfile.lock`
|
|
46
|
-
6. Commits with message "Bump version for X.Y.Z"
|
|
47
|
-
7. Pushes to current branch
|
|
48
|
-
8. Creates and pushes tag `vX.Y.Z`
|
|
49
|
-
9. Builds and publishes gem to RubyGems
|
|
41
|
+
### Step 2: Review and Merge
|
|
50
42
|
|
|
51
|
-
|
|
43
|
+
- Review the release PR
|
|
44
|
+
- Ensure CI passes
|
|
45
|
+
- Merge to main
|
|
52
46
|
|
|
53
|
-
|
|
54
|
-
# 1. Ensure tests pass
|
|
55
|
-
bundle exec rake
|
|
47
|
+
### Step 3: Publish
|
|
56
48
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
```bash
|
|
50
|
+
git checkout main && git pull
|
|
51
|
+
bin/publish 1.2.0
|
|
52
|
+
```
|
|
60
53
|
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
This will:
|
|
55
|
+
1. Verify you're on main with correct version
|
|
56
|
+
2. Create and push tag `v1.2.0`
|
|
57
|
+
3. Create GitHub release
|
|
58
|
+
4. GitHub Actions publishes to RubyGems automatically
|
|
63
59
|
|
|
64
|
-
|
|
65
|
-
git add CHANGELOG.md
|
|
66
|
-
git commit -m "docs: update changelog for 1.2.0"
|
|
67
|
-
git push
|
|
60
|
+
### Workflow Diagram
|
|
68
61
|
|
|
69
|
-
|
|
62
|
+
```
|
|
70
63
|
bin/release 1.2.0
|
|
64
|
+
│
|
|
65
|
+
├── Creates branch: release-1.2.0
|
|
66
|
+
├── Updates version.rb, Gemfile.lock, CHANGELOG.md
|
|
67
|
+
├── Commits and pushes
|
|
68
|
+
└── Opens PR
|
|
69
|
+
│
|
|
70
|
+
▼
|
|
71
|
+
[Review & merge PR]
|
|
72
|
+
│
|
|
73
|
+
▼
|
|
74
|
+
bin/publish 1.2.0
|
|
75
|
+
│
|
|
76
|
+
├── Creates tag v1.2.0
|
|
77
|
+
├── Pushes tag
|
|
78
|
+
└── Creates GitHub release
|
|
79
|
+
│
|
|
80
|
+
▼
|
|
81
|
+
[GitHub Actions]
|
|
82
|
+
│
|
|
83
|
+
└── Publishes to RubyGems via Trusted Publishing
|
|
71
84
|
```
|
|
72
85
|
|
|
73
|
-
|
|
86
|
+
## Setting Up Trusted Publishing (One-Time)
|
|
74
87
|
|
|
75
|
-
1.
|
|
76
|
-
2.
|
|
88
|
+
1. Go to [rubygems.org](https://rubygems.org) → Your gems → claude_agent → Trusted Publishers
|
|
89
|
+
2. Add a new publisher:
|
|
90
|
+
- Repository owner: `protocollar`
|
|
91
|
+
- Repository name: `claude_agent-ruby`
|
|
92
|
+
- Workflow filename: `push_gem.yml`
|
|
93
|
+
- Environment: `release`
|
|
94
|
+
3. Create a GitHub environment named `release` in your repository settings
|
|
77
95
|
|
|
78
96
|
## Version Bumping Guidelines
|
|
79
97
|
|
|
@@ -95,4 +113,4 @@ bin/release 1.2.0
|
|
|
95
113
|
|
|
96
114
|
- Bug fixes
|
|
97
115
|
- Documentation corrections
|
|
98
|
-
- Performance improvements (no API change)
|
|
116
|
+
- Performance improvements (no API change)
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.0] - 2026-01-25
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- `HookStartedMessage` for hook lifecycle visibility
|
|
14
|
+
- `HookProgressMessage` for hook progress updates
|
|
15
|
+
- `ToolUseSummaryMessage` for tool use summaries
|
|
16
|
+
- `mcp_reconnect` and `mcp_toggle` control methods for MCP server lifecycle management
|
|
17
|
+
- `hook_id`, `output`, and `outcome` fields on `HookResponseMessage`
|
|
18
|
+
- Helper methods on `HookResponseMessage`: `success?`, `error?`, `cancelled?`
|
|
19
|
+
|
|
20
|
+
## [0.4.3] - 2026-01-18
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Updated release workflow to use trusted publisher
|
|
24
|
+
|
|
10
25
|
## [0.4.2] - 2026-01-18
|
|
11
26
|
|
|
12
27
|
### Fixed
|
data/SPEC.md
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
This document provides a comprehensive specification of the Claude Agent SDK, comparing feature parity across the official TypeScript and Python SDKs with this Ruby implementation.
|
|
4
4
|
|
|
5
5
|
**Reference Versions:**
|
|
6
|
-
- TypeScript SDK: v0.2.
|
|
7
|
-
- Python SDK: v0.1.
|
|
6
|
+
- TypeScript SDK: v0.2.19 (npm package)
|
|
7
|
+
- Python SDK: v0.1.22 from GitHub (commit 6a0140a)
|
|
8
8
|
- Ruby SDK: This repository
|
|
9
9
|
|
|
10
|
+
**Last Updated:** 2025-01-25
|
|
11
|
+
|
|
10
12
|
---
|
|
11
13
|
|
|
12
14
|
## Table of Contents
|
|
@@ -58,6 +60,7 @@ Configuration options for SDK queries and clients.
|
|
|
58
60
|
| `strictMcpConfig` | ✅ | ❌ | ✅ | Strict validation of MCP config |
|
|
59
61
|
| `hooks` | ✅ | ✅ | ✅ | Hook callbacks |
|
|
60
62
|
| `agents` | ✅ | ✅ | ✅ | Custom subagent definitions |
|
|
63
|
+
| `agent` | ✅ | ❌ | ✅ | Agent name for main thread |
|
|
61
64
|
| `cwd` | ✅ | ✅ | ✅ | Working directory |
|
|
62
65
|
| `additionalDirectories` | ✅ | ✅ | ✅ | Extra allowed directories |
|
|
63
66
|
| `env` | ✅ | ✅ | ✅ | Environment variables |
|
|
@@ -66,7 +69,6 @@ Configuration options for SDK queries and clients.
|
|
|
66
69
|
| `settingSources` | ✅ | ✅ | ✅ | Which settings to load |
|
|
67
70
|
| `plugins` | ✅ | ✅ | ✅ | Plugin configurations |
|
|
68
71
|
| `betas` | ✅ | ✅ | ✅ | Beta features (e.g., context-1m-2025-08-07) |
|
|
69
|
-
| `agent` | ✅ | ❌ | ✅ | Agent name for main thread |
|
|
70
72
|
| `abortController` | ✅ | ❌ | ✅ | Cancellation controller |
|
|
71
73
|
| `stderr` | ✅ | ✅ | ✅ | Stderr callback |
|
|
72
74
|
| `spawnClaudeCodeProcess` | ✅ | ❌ | ✅ | Custom spawn function |
|
|
@@ -85,20 +87,23 @@ Configuration options for SDK queries and clients.
|
|
|
85
87
|
|
|
86
88
|
Messages exchanged between SDK and CLI.
|
|
87
89
|
|
|
88
|
-
| Message Type
|
|
89
|
-
|
|
90
|
-
| `UserMessage`
|
|
91
|
-
| `UserMessageReplay`
|
|
92
|
-
| `AssistantMessage`
|
|
93
|
-
| `SystemMessage`
|
|
94
|
-
| `ResultMessage`
|
|
95
|
-
| `StreamEvent`
|
|
96
|
-
| `CompactBoundaryMessage`
|
|
97
|
-
| `StatusMessage`
|
|
98
|
-
| `ToolProgressMessage`
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
90
|
+
| Message Type | TypeScript | Python | Ruby | Notes |
|
|
91
|
+
|---------------------------|:----------:|:------:|:----:|------------------------------------|
|
|
92
|
+
| `UserMessage` | ✅ | ✅ | ✅ | User input |
|
|
93
|
+
| `UserMessageReplay` | ✅ | ❌ | ✅ | Replayed user message on resume |
|
|
94
|
+
| `AssistantMessage` | ✅ | ✅ | ✅ | Claude response |
|
|
95
|
+
| `SystemMessage` | ✅ | ✅ | ✅ | System/init messages |
|
|
96
|
+
| `ResultMessage` | ✅ | ✅ | ✅ | Final result with usage |
|
|
97
|
+
| `StreamEvent` | ✅ | ✅ | ✅ | Partial streaming events |
|
|
98
|
+
| `CompactBoundaryMessage` | ✅ | ❌ | ✅ | Conversation compaction marker |
|
|
99
|
+
| `StatusMessage` | ✅ | ❌ | ✅ | Status updates (compacting) |
|
|
100
|
+
| `ToolProgressMessage` | ✅ | ❌ | ✅ | Long-running tool progress |
|
|
101
|
+
| `HookStartedMessage` | ✅ | ❌ | ✅ | Hook execution started |
|
|
102
|
+
| `HookProgressMessage` | ✅ | ❌ | ✅ | Hook progress during execution |
|
|
103
|
+
| `HookResponseMessage` | ✅ | ❌ | ✅ | Hook execution output |
|
|
104
|
+
| `AuthStatusMessage` | ✅ | ❌ | ✅ | Authentication status |
|
|
105
|
+
| `TaskNotificationMessage` | ✅ | ❌ | ✅ | Background task completion |
|
|
106
|
+
| `ToolUseSummaryMessage` | ✅ | ❌ | ✅ | Summary of tool use (collapsed) |
|
|
102
107
|
|
|
103
108
|
### Message Fields
|
|
104
109
|
|
|
@@ -131,6 +136,34 @@ Messages exchanged between SDK and CLI.
|
|
|
131
136
|
| `error_max_budget_usd` | ✅ | ✅ | ✅ | Budget exceeded |
|
|
132
137
|
| `error_max_structured_output_retries` | ✅ | ❌ | ✅ | Structured output retries exceeded |
|
|
133
138
|
|
|
139
|
+
#### HookResponseMessage Fields
|
|
140
|
+
|
|
141
|
+
| Field | TypeScript | Python | Ruby | Notes |
|
|
142
|
+
|--------------|:----------:|:------:|:----:|------------------------------------------|
|
|
143
|
+
| `uuid` | ✅ | ❌ | ✅ | Message UUID |
|
|
144
|
+
| `session_id` | ✅ | ❌ | ✅ | Session ID |
|
|
145
|
+
| `hook_id` | ✅ | ❌ | ✅ | Unique hook execution ID |
|
|
146
|
+
| `hook_name` | ✅ | ❌ | ✅ | Hook name |
|
|
147
|
+
| `hook_event` | ✅ | ❌ | ✅ | Event type (PreToolUse, PostToolUse...) |
|
|
148
|
+
| `output` | ✅ | ❌ | ✅ | Combined output string |
|
|
149
|
+
| `stdout` | ✅ | ❌ | ✅ | Standard output |
|
|
150
|
+
| `stderr` | ✅ | ❌ | ✅ | Standard error |
|
|
151
|
+
| `exit_code` | ✅ | ❌ | ✅ | Hook process exit code |
|
|
152
|
+
| `outcome` | ✅ | ❌ | ✅ | 'success' / 'error' / 'cancelled' |
|
|
153
|
+
|
|
154
|
+
#### HookProgressMessage Fields
|
|
155
|
+
|
|
156
|
+
| Field | TypeScript | Python | Ruby | Notes |
|
|
157
|
+
|--------------|:----------:|:------:|:----:|------------------------------------------|
|
|
158
|
+
| `uuid` | ✅ | ❌ | ✅ | Message UUID |
|
|
159
|
+
| `session_id` | ✅ | ❌ | ✅ | Session ID |
|
|
160
|
+
| `hook_id` | ✅ | ❌ | ✅ | Unique hook execution ID |
|
|
161
|
+
| `hook_name` | ✅ | ❌ | ✅ | Hook name |
|
|
162
|
+
| `hook_event` | ✅ | ❌ | ✅ | Event type |
|
|
163
|
+
| `output` | ✅ | ❌ | ✅ | Combined output so far |
|
|
164
|
+
| `stdout` | ✅ | ❌ | ✅ | Standard output so far |
|
|
165
|
+
| `stderr` | ✅ | ❌ | ✅ | Standard error so far |
|
|
166
|
+
|
|
134
167
|
---
|
|
135
168
|
|
|
136
169
|
## 3. Content Blocks
|
|
@@ -185,6 +218,8 @@ Bidirectional control protocol for SDK-CLI communication.
|
|
|
185
218
|
| `mcp_message` | ✅ | ✅ | ✅ | Route MCP message |
|
|
186
219
|
| `mcp_set_servers` | ✅ | ❌ | ✅ | Dynamically set MCP servers |
|
|
187
220
|
| `mcp_status` | ✅ | ❌ | ✅ | Get MCP server status |
|
|
221
|
+
| `mcp_reconnect` | ✅ | ❌ | ✅ | Reconnect to MCP server |
|
|
222
|
+
| `mcp_toggle` | ✅ | ❌ | ✅ | Enable/disable MCP server |
|
|
188
223
|
| `supported_commands` | ✅ | ❌ | ✅ | Get available slash commands |
|
|
189
224
|
| `supported_models` | ✅ | ❌ | ✅ | Get available models |
|
|
190
225
|
| `account_info` | ✅ | ❌ | ✅ | Get account information |
|
|
@@ -264,7 +299,7 @@ Event-specific fields returned via `hookSpecificOutput`:
|
|
|
264
299
|
|
|
265
300
|
| Field | TypeScript | Python | Ruby | Notes |
|
|
266
301
|
|----------------------------|:----------:|:------:|:----:|------------------------------------|
|
|
267
|
-
| `permissionDecision` | ✅ |
|
|
302
|
+
| `permissionDecision` | ✅ | ✅ | ✅ | `allow`, `deny`, or `ask` |
|
|
268
303
|
| `permissionDecisionReason` | ✅ | ❌ | ✅ | Reason for permission decision |
|
|
269
304
|
| `updatedInput` | ✅ | ✅ | ✅ | Modified tool input |
|
|
270
305
|
| `additionalContext` | ✅ | ❌ | ✅ | Context string returned to model |
|
|
@@ -273,7 +308,7 @@ Event-specific fields returned via `hookSpecificOutput`:
|
|
|
273
308
|
|
|
274
309
|
| Field | TypeScript | Python | Ruby | Notes |
|
|
275
310
|
|------------------------|:----------:|:------:|:----:|----------------------------------|
|
|
276
|
-
| `additionalContext` | ✅ |
|
|
311
|
+
| `additionalContext` | ✅ | ✅ | ✅ | Context string returned to model |
|
|
277
312
|
| `updatedMCPToolOutput` | ✅ | ❌ | ✅ | Modified MCP tool output |
|
|
278
313
|
|
|
279
314
|
#### PostToolUseFailureHookSpecificOutput
|
|
@@ -304,7 +339,7 @@ Event-specific fields returned via `hookSpecificOutput`:
|
|
|
304
339
|
|
|
305
340
|
| Field | TypeScript | Python | Ruby | Notes |
|
|
306
341
|
|---------------------|:----------:|:------:|:----:|----------------------------------|
|
|
307
|
-
| `additionalContext` | ✅ |
|
|
342
|
+
| `additionalContext` | ✅ | ✅ | ✅ | Context string returned to model |
|
|
308
343
|
|
|
309
344
|
#### PermissionRequestHookSpecificOutput
|
|
310
345
|
|
|
@@ -312,6 +347,12 @@ Event-specific fields returned via `hookSpecificOutput`:
|
|
|
312
347
|
|------------|:----------:|:------:|:----:|------------------------------------------|
|
|
313
348
|
| `decision` | ✅ | ❌ | ✅ | `{ behavior: 'allow'/'deny', ... }` obj |
|
|
314
349
|
|
|
350
|
+
#### NotificationHookSpecificOutput
|
|
351
|
+
|
|
352
|
+
| Field | TypeScript | Python | Ruby | Notes |
|
|
353
|
+
|---------------------|:----------:|:------:|:----:|----------------------------------|
|
|
354
|
+
| `additionalContext` | ✅ | ❌ | ✅ | Context string returned to model |
|
|
355
|
+
|
|
315
356
|
### Hook Matcher
|
|
316
357
|
|
|
317
358
|
| Field | TypeScript | Python | Ruby |
|
|
@@ -569,6 +610,7 @@ Public API surface for SDK clients.
|
|
|
569
610
|
| `rewindFiles()` | ✅ | ✅ | ✅ | Rewind file changes |
|
|
570
611
|
| `setMcpServers()` | ✅ | ❌ | ✅ | Dynamic MCP servers |
|
|
571
612
|
| `streamInput()` | ✅ | ❌ | ✅ | Stream user input |
|
|
613
|
+
| `close()` | ✅ | ❌ | ✅ | Close query/session |
|
|
572
614
|
|
|
573
615
|
### Client Class
|
|
574
616
|
|
|
@@ -611,21 +653,24 @@ Public API surface for SDK clients.
|
|
|
611
653
|
- Adds `deno` as supported executable option
|
|
612
654
|
- Includes experimental `criticalSystemReminder_EXPERIMENTAL` for agent definitions
|
|
613
655
|
- `SessionStartHookInput` includes `model` field
|
|
614
|
-
- v0.2.12 adds `Setup` hook event for init/maintenance
|
|
615
|
-
- v0.2.12 adds `skills` and `maxTurns` to AgentDefinition
|
|
616
|
-
- v0.2.12 adds `TaskNotificationMessage` for background task completion
|
|
617
|
-
- v0.2.12 adds `user` option to SDKSessionOptions
|
|
656
|
+
- v0.2.12+ adds `Setup` hook event for init/maintenance
|
|
657
|
+
- v0.2.12+ adds `skills` and `maxTurns` to AgentDefinition
|
|
658
|
+
- v0.2.12+ adds `TaskNotificationMessage` for background task completion
|
|
659
|
+
- v0.2.12+ adds `user` option to SDKSessionOptions
|
|
660
|
+
- v0.2.19 adds `mcp_reconnect` and `mcp_toggle` control requests
|
|
661
|
+
- v0.2.19 adds `HookStartedMessage`, `HookProgressMessage`, and `ToolUseSummaryMessage`
|
|
618
662
|
|
|
619
663
|
### Python SDK
|
|
620
|
-
- Full source available (v0.1.
|
|
664
|
+
- Full source available (v0.1.22)
|
|
621
665
|
- Fewer control protocol features than TypeScript
|
|
622
666
|
- Does not support SessionStart/SessionEnd/Notification hooks due to setup limitations
|
|
623
667
|
- Missing several permission modes (delegate, dontAsk)
|
|
624
668
|
- `excludedCommands` in sandbox now supported
|
|
625
669
|
- `tool_use_id` now included in PreToolUseHookInput
|
|
670
|
+
- `additionalContext` now supported in UserPromptSubmitHookSpecificOutput
|
|
626
671
|
|
|
627
672
|
### Ruby SDK (This Repository)
|
|
628
|
-
-
|
|
673
|
+
- Complete TypeScript SDK feature parity
|
|
629
674
|
- Ruby-idiomatic patterns (Data.define, snake_case)
|
|
630
675
|
- Complete control protocol support
|
|
631
676
|
- Dedicated Client class for multi-turn conversations
|
data/lib/claude_agent/client.rb
CHANGED
|
@@ -289,6 +289,42 @@ module ClaudeAgent
|
|
|
289
289
|
@protocol.set_mcp_servers(servers)
|
|
290
290
|
end
|
|
291
291
|
|
|
292
|
+
# Reconnect to an MCP server (TypeScript SDK parity)
|
|
293
|
+
#
|
|
294
|
+
# Attempts to reconnect to a disconnected or errored MCP server.
|
|
295
|
+
#
|
|
296
|
+
# @param server_name [String] Name of the MCP server to reconnect
|
|
297
|
+
# @return [Hash] Response from the CLI
|
|
298
|
+
#
|
|
299
|
+
# @example
|
|
300
|
+
# client.mcp_reconnect("my-server")
|
|
301
|
+
#
|
|
302
|
+
def mcp_reconnect(server_name)
|
|
303
|
+
require_connection!
|
|
304
|
+
|
|
305
|
+
@protocol.mcp_reconnect(server_name)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Enable or disable an MCP server (TypeScript SDK parity)
|
|
309
|
+
#
|
|
310
|
+
# Toggles an MCP server on or off without removing its configuration.
|
|
311
|
+
#
|
|
312
|
+
# @param server_name [String] Name of the MCP server to toggle
|
|
313
|
+
# @param enabled [Boolean] Whether to enable (true) or disable (false) the server
|
|
314
|
+
# @return [Hash] Response from the CLI
|
|
315
|
+
#
|
|
316
|
+
# @example Enable a server
|
|
317
|
+
# client.mcp_toggle("my-server", enabled: true)
|
|
318
|
+
#
|
|
319
|
+
# @example Disable a server
|
|
320
|
+
# client.mcp_toggle("my-server", enabled: false)
|
|
321
|
+
#
|
|
322
|
+
def mcp_toggle(server_name, enabled:)
|
|
323
|
+
require_connection!
|
|
324
|
+
|
|
325
|
+
@protocol.mcp_toggle(server_name, enabled: enabled)
|
|
326
|
+
end
|
|
327
|
+
|
|
292
328
|
private
|
|
293
329
|
|
|
294
330
|
def require_connection!
|
|
@@ -363,6 +363,38 @@ module ClaudeAgent
|
|
|
363
363
|
)
|
|
364
364
|
end
|
|
365
365
|
|
|
366
|
+
# Reconnect to an MCP server (TypeScript SDK parity)
|
|
367
|
+
#
|
|
368
|
+
# Attempts to reconnect to a disconnected or errored MCP server.
|
|
369
|
+
#
|
|
370
|
+
# @param server_name [String] Name of the MCP server to reconnect
|
|
371
|
+
# @return [Hash] Response from the CLI
|
|
372
|
+
#
|
|
373
|
+
# @example
|
|
374
|
+
# protocol.mcp_reconnect("my-server")
|
|
375
|
+
#
|
|
376
|
+
def mcp_reconnect(server_name)
|
|
377
|
+
send_control_request(subtype: "mcp_reconnect", serverName: server_name)
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
# Enable or disable an MCP server (TypeScript SDK parity)
|
|
381
|
+
#
|
|
382
|
+
# Toggles an MCP server on or off without removing its configuration.
|
|
383
|
+
#
|
|
384
|
+
# @param server_name [String] Name of the MCP server to toggle
|
|
385
|
+
# @param enabled [Boolean] Whether to enable (true) or disable (false) the server
|
|
386
|
+
# @return [Hash] Response from the CLI
|
|
387
|
+
#
|
|
388
|
+
# @example Enable a server
|
|
389
|
+
# protocol.mcp_toggle("my-server", enabled: true)
|
|
390
|
+
#
|
|
391
|
+
# @example Disable a server
|
|
392
|
+
# protocol.mcp_toggle("my-server", enabled: false)
|
|
393
|
+
#
|
|
394
|
+
def mcp_toggle(server_name, enabled:)
|
|
395
|
+
send_control_request(subtype: "mcp_toggle", serverName: server_name, enabled: enabled)
|
|
396
|
+
end
|
|
397
|
+
|
|
366
398
|
# Dynamically set MCP servers for this session (TypeScript SDK parity)
|
|
367
399
|
#
|
|
368
400
|
# This replaces the current set of dynamically-added MCP servers.
|
|
@@ -11,7 +11,7 @@ module ClaudeAgent
|
|
|
11
11
|
# Parse a raw message hash into a typed message object
|
|
12
12
|
#
|
|
13
13
|
# @param raw [Hash] Raw message from CLI
|
|
14
|
-
# @return [UserMessage, UserMessageReplay, AssistantMessage, SystemMessage, ResultMessage, StreamEvent, CompactBoundaryMessage, StatusMessage, ToolProgressMessage, HookResponseMessage, AuthStatusMessage, TaskNotificationMessage]
|
|
14
|
+
# @return [UserMessage, UserMessageReplay, AssistantMessage, SystemMessage, ResultMessage, StreamEvent, CompactBoundaryMessage, StatusMessage, ToolProgressMessage, HookResponseMessage, AuthStatusMessage, TaskNotificationMessage, HookStartedMessage, HookProgressMessage, ToolUseSummaryMessage]
|
|
15
15
|
# @raise [MessageParseError] If message cannot be parsed
|
|
16
16
|
def parse(raw)
|
|
17
17
|
type = raw["type"]
|
|
@@ -32,6 +32,10 @@ module ClaudeAgent
|
|
|
32
32
|
parse_hook_response_message(raw)
|
|
33
33
|
when "task_notification"
|
|
34
34
|
parse_task_notification_message(raw)
|
|
35
|
+
when "hook_started"
|
|
36
|
+
parse_hook_started_message(raw)
|
|
37
|
+
when "hook_progress"
|
|
38
|
+
parse_hook_progress_message(raw)
|
|
35
39
|
else
|
|
36
40
|
parse_system_message(raw)
|
|
37
41
|
end
|
|
@@ -43,6 +47,8 @@ module ClaudeAgent
|
|
|
43
47
|
parse_tool_progress_message(raw)
|
|
44
48
|
when "auth_status"
|
|
45
49
|
parse_auth_status_message(raw)
|
|
50
|
+
when "tool_use_summary"
|
|
51
|
+
parse_tool_use_summary_message(raw)
|
|
46
52
|
else
|
|
47
53
|
raise MessageParseError.new("Unknown message type: #{type}", raw_message: raw)
|
|
48
54
|
end
|
|
@@ -243,11 +249,14 @@ module ClaudeAgent
|
|
|
243
249
|
HookResponseMessage.new(
|
|
244
250
|
uuid: raw["uuid"] || "",
|
|
245
251
|
session_id: fetch_dual(raw, :session_id, ""),
|
|
252
|
+
hook_id: fetch_dual(raw, :hook_id),
|
|
246
253
|
hook_name: fetch_dual(raw, :hook_name, ""),
|
|
247
254
|
hook_event: fetch_dual(raw, :hook_event, ""),
|
|
248
255
|
stdout: raw["stdout"] || "",
|
|
249
256
|
stderr: raw["stderr"] || "",
|
|
250
|
-
|
|
257
|
+
output: raw["output"] || "",
|
|
258
|
+
exit_code: fetch_dual(raw, :exit_code),
|
|
259
|
+
outcome: raw["outcome"]
|
|
251
260
|
)
|
|
252
261
|
end
|
|
253
262
|
|
|
@@ -271,5 +280,37 @@ module ClaudeAgent
|
|
|
271
280
|
summary: raw["summary"] || ""
|
|
272
281
|
)
|
|
273
282
|
end
|
|
283
|
+
|
|
284
|
+
def parse_hook_started_message(raw)
|
|
285
|
+
HookStartedMessage.new(
|
|
286
|
+
uuid: raw["uuid"] || "",
|
|
287
|
+
session_id: fetch_dual(raw, :session_id, ""),
|
|
288
|
+
hook_id: fetch_dual(raw, :hook_id, ""),
|
|
289
|
+
hook_name: fetch_dual(raw, :hook_name, ""),
|
|
290
|
+
hook_event: fetch_dual(raw, :hook_event, "")
|
|
291
|
+
)
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
def parse_hook_progress_message(raw)
|
|
295
|
+
HookProgressMessage.new(
|
|
296
|
+
uuid: raw["uuid"] || "",
|
|
297
|
+
session_id: fetch_dual(raw, :session_id, ""),
|
|
298
|
+
hook_id: fetch_dual(raw, :hook_id, ""),
|
|
299
|
+
hook_name: fetch_dual(raw, :hook_name, ""),
|
|
300
|
+
hook_event: fetch_dual(raw, :hook_event, ""),
|
|
301
|
+
stdout: raw["stdout"] || "",
|
|
302
|
+
stderr: raw["stderr"] || "",
|
|
303
|
+
output: raw["output"] || ""
|
|
304
|
+
)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
def parse_tool_use_summary_message(raw)
|
|
308
|
+
ToolUseSummaryMessage.new(
|
|
309
|
+
uuid: raw["uuid"] || "",
|
|
310
|
+
session_id: fetch_dual(raw, :session_id, ""),
|
|
311
|
+
summary: raw["summary"] || "",
|
|
312
|
+
preceding_tool_use_ids: fetch_dual(raw, :preceding_tool_use_ids, [])
|
|
313
|
+
)
|
|
314
|
+
end
|
|
274
315
|
end
|
|
275
316
|
end
|
|
@@ -337,30 +337,47 @@ module ClaudeAgent
|
|
|
337
337
|
# msg = HookResponseMessage.new(
|
|
338
338
|
# uuid: "msg-123",
|
|
339
339
|
# session_id: "session-abc",
|
|
340
|
+
# hook_id: "hook-456",
|
|
340
341
|
# hook_name: "my-hook",
|
|
341
342
|
# hook_event: "PreToolUse",
|
|
342
343
|
# stdout: "Hook output",
|
|
343
344
|
# stderr: "",
|
|
344
|
-
#
|
|
345
|
+
# output: "Combined output",
|
|
346
|
+
# exit_code: 0,
|
|
347
|
+
# outcome: "success"
|
|
345
348
|
# )
|
|
349
|
+
# msg.success? # => true
|
|
350
|
+
# msg.error? # => false
|
|
351
|
+
# msg.cancelled? # => false
|
|
352
|
+
#
|
|
353
|
+
# Outcome values:
|
|
354
|
+
# - "success" - Hook completed successfully
|
|
355
|
+
# - "error" - Hook encountered an error
|
|
356
|
+
# - "cancelled" - Hook was cancelled
|
|
346
357
|
#
|
|
347
358
|
HookResponseMessage = Data.define(
|
|
348
359
|
:uuid,
|
|
349
360
|
:session_id,
|
|
361
|
+
:hook_id,
|
|
350
362
|
:hook_name,
|
|
351
363
|
:hook_event,
|
|
352
364
|
:stdout,
|
|
353
365
|
:stderr,
|
|
354
|
-
:
|
|
366
|
+
:output,
|
|
367
|
+
:exit_code,
|
|
368
|
+
:outcome
|
|
355
369
|
) do
|
|
356
370
|
def initialize(
|
|
357
371
|
uuid:,
|
|
358
372
|
session_id:,
|
|
373
|
+
hook_id: nil,
|
|
359
374
|
hook_name:,
|
|
360
375
|
hook_event:,
|
|
361
376
|
stdout: "",
|
|
362
377
|
stderr: "",
|
|
363
|
-
|
|
378
|
+
output: "",
|
|
379
|
+
exit_code: nil,
|
|
380
|
+
outcome: nil
|
|
364
381
|
)
|
|
365
382
|
super
|
|
366
383
|
end
|
|
@@ -368,6 +385,24 @@ module ClaudeAgent
|
|
|
368
385
|
def type
|
|
369
386
|
:hook_response
|
|
370
387
|
end
|
|
388
|
+
|
|
389
|
+
# Check if hook completed successfully
|
|
390
|
+
# @return [Boolean]
|
|
391
|
+
def success?
|
|
392
|
+
outcome == "success"
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Check if hook encountered an error
|
|
396
|
+
# @return [Boolean]
|
|
397
|
+
def error?
|
|
398
|
+
outcome == "error"
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Check if hook was cancelled
|
|
402
|
+
# @return [Boolean]
|
|
403
|
+
def cancelled?
|
|
404
|
+
outcome == "cancelled"
|
|
405
|
+
end
|
|
371
406
|
end
|
|
372
407
|
|
|
373
408
|
# Auth status message (TypeScript SDK parity)
|
|
@@ -468,6 +503,117 @@ module ClaudeAgent
|
|
|
468
503
|
end
|
|
469
504
|
end
|
|
470
505
|
|
|
506
|
+
# Hook started message (TypeScript SDK parity)
|
|
507
|
+
#
|
|
508
|
+
# Sent when a hook execution starts.
|
|
509
|
+
#
|
|
510
|
+
# @example
|
|
511
|
+
# msg = HookStartedMessage.new(
|
|
512
|
+
# uuid: "msg-123",
|
|
513
|
+
# session_id: "session-abc",
|
|
514
|
+
# hook_id: "hook-456",
|
|
515
|
+
# hook_name: "my-hook",
|
|
516
|
+
# hook_event: "PreToolUse"
|
|
517
|
+
# )
|
|
518
|
+
#
|
|
519
|
+
HookStartedMessage = Data.define(
|
|
520
|
+
:uuid,
|
|
521
|
+
:session_id,
|
|
522
|
+
:hook_id,
|
|
523
|
+
:hook_name,
|
|
524
|
+
:hook_event
|
|
525
|
+
) do
|
|
526
|
+
def initialize(
|
|
527
|
+
uuid:,
|
|
528
|
+
session_id:,
|
|
529
|
+
hook_id:,
|
|
530
|
+
hook_name:,
|
|
531
|
+
hook_event:
|
|
532
|
+
)
|
|
533
|
+
super
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
def type
|
|
537
|
+
:hook_started
|
|
538
|
+
end
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# Hook progress message (TypeScript SDK parity)
|
|
542
|
+
#
|
|
543
|
+
# Reports progress during hook execution.
|
|
544
|
+
#
|
|
545
|
+
# @example
|
|
546
|
+
# msg = HookProgressMessage.new(
|
|
547
|
+
# uuid: "msg-123",
|
|
548
|
+
# session_id: "session-abc",
|
|
549
|
+
# hook_id: "hook-456",
|
|
550
|
+
# hook_name: "my-hook",
|
|
551
|
+
# hook_event: "PreToolUse",
|
|
552
|
+
# stdout: "Hook output so far...",
|
|
553
|
+
# stderr: "",
|
|
554
|
+
# output: "Combined output"
|
|
555
|
+
# )
|
|
556
|
+
#
|
|
557
|
+
HookProgressMessage = Data.define(
|
|
558
|
+
:uuid,
|
|
559
|
+
:session_id,
|
|
560
|
+
:hook_id,
|
|
561
|
+
:hook_name,
|
|
562
|
+
:hook_event,
|
|
563
|
+
:stdout,
|
|
564
|
+
:stderr,
|
|
565
|
+
:output
|
|
566
|
+
) do
|
|
567
|
+
def initialize(
|
|
568
|
+
uuid:,
|
|
569
|
+
session_id:,
|
|
570
|
+
hook_id:,
|
|
571
|
+
hook_name:,
|
|
572
|
+
hook_event:,
|
|
573
|
+
stdout: "",
|
|
574
|
+
stderr: "",
|
|
575
|
+
output: ""
|
|
576
|
+
)
|
|
577
|
+
super
|
|
578
|
+
end
|
|
579
|
+
|
|
580
|
+
def type
|
|
581
|
+
:hook_progress
|
|
582
|
+
end
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
# Tool use summary message (TypeScript SDK parity)
|
|
586
|
+
#
|
|
587
|
+
# Contains a summary of tool use for collapsed display.
|
|
588
|
+
#
|
|
589
|
+
# @example
|
|
590
|
+
# msg = ToolUseSummaryMessage.new(
|
|
591
|
+
# uuid: "msg-123",
|
|
592
|
+
# session_id: "session-abc",
|
|
593
|
+
# summary: "Read 3 files",
|
|
594
|
+
# preceding_tool_use_ids: ["tool-1", "tool-2", "tool-3"]
|
|
595
|
+
# )
|
|
596
|
+
#
|
|
597
|
+
ToolUseSummaryMessage = Data.define(
|
|
598
|
+
:uuid,
|
|
599
|
+
:session_id,
|
|
600
|
+
:summary,
|
|
601
|
+
:preceding_tool_use_ids
|
|
602
|
+
) do
|
|
603
|
+
def initialize(
|
|
604
|
+
uuid:,
|
|
605
|
+
session_id:,
|
|
606
|
+
summary:,
|
|
607
|
+
preceding_tool_use_ids: []
|
|
608
|
+
)
|
|
609
|
+
super
|
|
610
|
+
end
|
|
611
|
+
|
|
612
|
+
def type
|
|
613
|
+
:tool_use_summary
|
|
614
|
+
end
|
|
615
|
+
end
|
|
616
|
+
|
|
471
617
|
# All message types
|
|
472
618
|
MESSAGE_TYPES = [
|
|
473
619
|
UserMessage,
|
|
@@ -481,6 +627,9 @@ module ClaudeAgent
|
|
|
481
627
|
ToolProgressMessage,
|
|
482
628
|
HookResponseMessage,
|
|
483
629
|
AuthStatusMessage,
|
|
484
|
-
TaskNotificationMessage
|
|
630
|
+
TaskNotificationMessage,
|
|
631
|
+
HookStartedMessage,
|
|
632
|
+
HookProgressMessage,
|
|
633
|
+
ToolUseSummaryMessage
|
|
485
634
|
].freeze
|
|
486
635
|
end
|
data/lib/claude_agent/version.rb
CHANGED
data/sig/claude_agent.rbs
CHANGED
|
@@ -393,7 +393,7 @@ module ClaudeAgent
|
|
|
393
393
|
CONTENT_BLOCK_TYPES: Array[Class]
|
|
394
394
|
|
|
395
395
|
# Message types
|
|
396
|
-
type message = UserMessage | UserMessageReplay | AssistantMessage | SystemMessage | ResultMessage | StreamEvent | CompactBoundaryMessage | StatusMessage | ToolProgressMessage | HookResponseMessage | AuthStatusMessage
|
|
396
|
+
type message = UserMessage | UserMessageReplay | AssistantMessage | SystemMessage | ResultMessage | StreamEvent | CompactBoundaryMessage | StatusMessage | ToolProgressMessage | HookResponseMessage | AuthStatusMessage | TaskNotificationMessage | HookStartedMessage | HookProgressMessage | ToolUseSummaryMessage
|
|
397
397
|
|
|
398
398
|
MESSAGE_TYPES: Array[Class]
|
|
399
399
|
|
|
@@ -534,14 +534,20 @@ module ClaudeAgent
|
|
|
534
534
|
class HookResponseMessage
|
|
535
535
|
attr_reader uuid: String
|
|
536
536
|
attr_reader session_id: String
|
|
537
|
+
attr_reader hook_id: String?
|
|
537
538
|
attr_reader hook_name: String
|
|
538
539
|
attr_reader hook_event: String
|
|
539
540
|
attr_reader stdout: String
|
|
540
541
|
attr_reader stderr: String
|
|
542
|
+
attr_reader output: String
|
|
541
543
|
attr_reader exit_code: Integer?
|
|
544
|
+
attr_reader outcome: String?
|
|
542
545
|
|
|
543
|
-
def initialize: (uuid: String, session_id: String, hook_name: String, hook_event: String, ?stdout: String, ?stderr: String, ?exit_code: Integer?) -> void
|
|
546
|
+
def initialize: (uuid: String, session_id: String, ?hook_id: String?, hook_name: String, hook_event: String, ?stdout: String, ?stderr: String, ?output: String, ?exit_code: Integer?, ?outcome: String?) -> void
|
|
544
547
|
def type: () -> :hook_response
|
|
548
|
+
def success?: () -> bool
|
|
549
|
+
def error?: () -> bool
|
|
550
|
+
def cancelled?: () -> bool
|
|
545
551
|
end
|
|
546
552
|
|
|
547
553
|
# Auth status message (TypeScript SDK parity)
|
|
@@ -556,6 +562,60 @@ module ClaudeAgent
|
|
|
556
562
|
def type: () -> :auth_status
|
|
557
563
|
end
|
|
558
564
|
|
|
565
|
+
# Task notification message (TypeScript SDK parity)
|
|
566
|
+
class TaskNotificationMessage
|
|
567
|
+
attr_reader uuid: String
|
|
568
|
+
attr_reader session_id: String
|
|
569
|
+
attr_reader task_id: String
|
|
570
|
+
attr_reader status: String
|
|
571
|
+
attr_reader output_file: String
|
|
572
|
+
attr_reader summary: String
|
|
573
|
+
|
|
574
|
+
def initialize: (uuid: String, session_id: String, task_id: String, status: String, output_file: String, summary: String) -> void
|
|
575
|
+
def type: () -> :task_notification
|
|
576
|
+
def completed?: () -> bool
|
|
577
|
+
def failed?: () -> bool
|
|
578
|
+
def stopped?: () -> bool
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Hook started message (TypeScript SDK parity)
|
|
582
|
+
class HookStartedMessage
|
|
583
|
+
attr_reader uuid: String
|
|
584
|
+
attr_reader session_id: String
|
|
585
|
+
attr_reader hook_id: String
|
|
586
|
+
attr_reader hook_name: String
|
|
587
|
+
attr_reader hook_event: String
|
|
588
|
+
|
|
589
|
+
def initialize: (uuid: String, session_id: String, hook_id: String, hook_name: String, hook_event: String) -> void
|
|
590
|
+
def type: () -> :hook_started
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
# Hook progress message (TypeScript SDK parity)
|
|
594
|
+
class HookProgressMessage
|
|
595
|
+
attr_reader uuid: String
|
|
596
|
+
attr_reader session_id: String
|
|
597
|
+
attr_reader hook_id: String
|
|
598
|
+
attr_reader hook_name: String
|
|
599
|
+
attr_reader hook_event: String
|
|
600
|
+
attr_reader stdout: String
|
|
601
|
+
attr_reader stderr: String
|
|
602
|
+
attr_reader output: String
|
|
603
|
+
|
|
604
|
+
def initialize: (uuid: String, session_id: String, hook_id: String, hook_name: String, hook_event: String, ?stdout: String, ?stderr: String, ?output: String) -> void
|
|
605
|
+
def type: () -> :hook_progress
|
|
606
|
+
end
|
|
607
|
+
|
|
608
|
+
# Tool use summary message (TypeScript SDK parity)
|
|
609
|
+
class ToolUseSummaryMessage
|
|
610
|
+
attr_reader uuid: String
|
|
611
|
+
attr_reader session_id: String
|
|
612
|
+
attr_reader summary: String
|
|
613
|
+
attr_reader preceding_tool_use_ids: Array[String]
|
|
614
|
+
|
|
615
|
+
def initialize: (uuid: String, session_id: String, summary: String, ?preceding_tool_use_ids: Array[String]) -> void
|
|
616
|
+
def type: () -> :tool_use_summary
|
|
617
|
+
end
|
|
618
|
+
|
|
559
619
|
# Message parser
|
|
560
620
|
class MessageParser
|
|
561
621
|
def initialize: () -> void
|
|
@@ -765,6 +825,8 @@ module ClaudeAgent
|
|
|
765
825
|
def rewind_files: (String user_message_id, ?dry_run: bool) -> RewindFilesResult
|
|
766
826
|
def set_max_thinking_tokens: (Integer? tokens) -> Hash[String, untyped]
|
|
767
827
|
def set_mcp_servers: (Hash[String, untyped] servers) -> McpSetServersResult
|
|
828
|
+
def mcp_reconnect: (String server_name) -> Hash[String, untyped]
|
|
829
|
+
def mcp_toggle: (String server_name, enabled: bool) -> Hash[String, untyped]
|
|
768
830
|
def supported_commands: () -> Array[SlashCommand]
|
|
769
831
|
def supported_models: () -> Array[ModelInfo]
|
|
770
832
|
def mcp_server_status: () -> Array[McpServerStatus]
|
|
@@ -798,6 +860,8 @@ module ClaudeAgent
|
|
|
798
860
|
def rewind_files: (String user_message_id, ?dry_run: bool) -> RewindFilesResult
|
|
799
861
|
def set_max_thinking_tokens: (Integer? tokens) -> Hash[String, untyped]
|
|
800
862
|
def set_mcp_servers: (Hash[String, untyped] servers) -> McpSetServersResult
|
|
863
|
+
def mcp_reconnect: (String server_name) -> Hash[String, untyped]
|
|
864
|
+
def mcp_toggle: (String server_name, enabled: bool) -> Hash[String, untyped]
|
|
801
865
|
def supported_commands: () -> Array[SlashCommand]
|
|
802
866
|
def supported_models: () -> Array[ModelInfo]
|
|
803
867
|
def mcp_server_status: () -> Array[McpServerStatus]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: claude_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Carr
|
|
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
93
|
version: '0'
|
|
94
94
|
requirements: []
|
|
95
|
-
rubygems_version:
|
|
95
|
+
rubygems_version: 3.6.9
|
|
96
96
|
specification_version: 4
|
|
97
97
|
summary: Ruby SDK for building AI agents with Claude Code
|
|
98
98
|
test_files: []
|