Skip to content

Commit 8edb985

Browse files
authored
chore: update protocol references to v0.4 (#14)
## Summary - update CLI, SDK, bridge, and docs to reference the MEW Protocol v0.4 release - bump runtime constants to `mew/v0.4` across agents, clients, and tests - add migration notes calling out remaining gaps between the implementation and the v0.4 specification ## Testing - npm run build - ./tests/run-all-tests.sh --no-llm --verbose ------ https://chatgpt.com/codex/tasks/task_e_68d75b23555c83259993b4bf0bee6e06
1 parent d76cf1e commit 8edb985

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+177
-164
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sdk/typescript-sdk/ # Core packages
1717
bridge/ # MCP-MEW bridge
1818
cli/ # Command-line tool
1919
tests/ # Integration tests (scenario-*)
20-
spec/ # Protocol specs (v0.3=current, draft=next)
20+
spec/ # Protocol specs (v0.4=current, draft=next)
2121
docs/ # Guides in architecture/, guides/, bugs/, progress/
2222
```
2323

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sdk/typescript-sdk/ # Core packages
1717
bridge/ # MCP-MEW bridge
1818
cli/ # Command-line tool
1919
tests/ # Integration tests (scenario-*)
20-
spec/ # Protocol specs (v0.3=current, draft=next)
20+
spec/ # Protocol specs (v0.4=current, draft=next)
2121
docs/ # Guides in architecture/, guides/, bugs/, progress/
2222
```
2323

MIGRATION.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# MEW Protocol v0.4 Migration Notes
2+
3+
The repository now references the v0.4 protocol specification. The following implementation gaps remain and should be addressed in follow-up work before claiming full compliance with the v0.4 MEW Protocol.
4+
5+
## CLI
6+
- The built-in `client connect` and `agent start` workflows still send a legacy `{ type: 'join' }` handshake instead of a v0.4 MEW envelope. The gateway continues to translate this legacy format, but participants should emit full envelopes going forward.
7+
- `gateway` back-fills envelope fields (protocol, id, timestamps) when participants omit them. Under the v0.4 spec every message on the wire should already be a complete envelope.
8+
- The note-taker template agent uses the rejected `system/join` message kind. A compliant join/authorization sequence needs to be defined for v0.4.
9+
10+
## SDK
11+
- The shared `Envelope` type still allows `correlation_id` to be a single string for backward compatibility, whereas v0.4 requires an array of strings. Client code should emit arrays once the ecosystem is ready.
12+
13+
If additional incompatibilities are discovered while adopting the v0.4 protocol, add them here so the work can be prioritized.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ The **proposal mechanism** ensures humans stay in control. New agents start with
4949

5050
## 📦 Current Version
5151

52-
**v0.3** - Released 2025-01-09 🎉
52+
**v0.4** - Released 2025-09-26 🎉
5353

54-
MEW Protocol is in experimental phase (v0.x) with breaking changes allowed between versions. See [spec/v0.3/SPEC.md](/spec/v0.3/SPEC.md) for the current specification.
54+
MEW Protocol is in experimental phase (v0.x) with breaking changes allowed between versions. See [spec/v0.4/SPEC.md](/spec/v0.4/SPEC.md) for the current specification.
5555

5656
## 🚀 Quick Start
5757

@@ -89,9 +89,9 @@ That's it! MEW guides you through setting up your workspace with:
8989

9090
## 📚 Learn More
9191

92-
- 📋 [Current Specification (v0.3)](/spec/v0.3/SPEC.md)
92+
- 📋 [Current Specification (v0.4)](/spec/v0.4/SPEC.md)
9393
- 📝 [Draft Specification (next version)](/spec/draft/SPEC.md)
94-
- 🏗️ [Architecture Decision Records](/spec/v0.3/decisions/)
94+
- 🏗️ [Architecture Decision Records](/spec/v0.4/decisions/)
9595
- 📜 [Changelog](/CHANGELOG.md)
9696

9797
## 🐈 Why "MEW"?

bridge/spec/draft/SPEC.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Out of scope:
3535
MEW Space
3636
3737
├── Gateway (WebSocket)
38-
│ ↕ MEW Protocol v0.3
38+
│ ↕ MEW Protocol v0.4
3939
4040
├── MCP Bridge Process (@mew-protocol/bridge)
4141
│ ├── MEWParticipant (SDK base class)
@@ -145,7 +145,7 @@ Identifies this participant as an MCP bridge (required for gateway to use bridge
145145
```javascript
146146
// MEW Request (incoming)
147147
{
148-
"protocol": "mew/v0.3",
148+
"protocol": "mew/v0.4",
149149
"id": "req-123",
150150
"from": "client",
151151
"to": ["filesystem"],
@@ -164,7 +164,7 @@ Identifies this participant as an MCP bridge (required for gateway to use bridge
164164
```javascript
165165
// MEW Request (incoming)
166166
{
167-
"protocol": "mew/v0.3",
167+
"protocol": "mew/v0.4",
168168
"id": "req-456",
169169
"from": "client",
170170
"to": ["filesystem"],
@@ -200,7 +200,7 @@ Identifies this participant as an MCP bridge (required for gateway to use bridge
200200
201201
// MEW Response (automatic from MEWParticipant)
202202
{
203-
"protocol": "mew/v0.3",
203+
"protocol": "mew/v0.4",
204204
"id": "resp-789",
205205
"from": "filesystem",
206206
"to": ["client"],
@@ -437,7 +437,7 @@ Log categories:
437437

438438
## References
439439

440-
- [MEW Protocol Specification v0.3](../../spec/v0.3/SPEC.md)
440+
- [MEW Protocol Specification v0.4](../../spec/v0.4/SPEC.md)
441441
- [MCP Specification](https://modelcontextprotocol.org)
442442
- [MEW SDK Documentation](../../sdk/spec/draft/SPEC.md)
443443
- [Test Scenarios](../../tests/scenario-7-mcp-bridge/)

cli/spec/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
### Changed
1313
- Updated all references from MEUP to MEW protocol
14-
- Updated protocol version from v0.2 to v0.3
14+
- Updated protocol version from v0.2 to v0.4
1515
- Enhanced participant resolution with multiple fallback strategies
1616

1717
### Features

cli/spec/draft/SPEC.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ ls -la .mew/tokens/
760760
761761
## FIFO Message Format
762762
763-
Messages sent to/from FIFOs use MEW v0.3 protocol format.
763+
Messages sent to/from FIFOs use MEW v0.4 protocol format.
764764
765765
**Input (to fifo-in):**
766766
Simplified format - CLI adds protocol envelope fields:
@@ -774,10 +774,10 @@ Simplified format - CLI adds protocol envelope fields:
774774
```
775775
776776
**Output (from fifo-out):**
777-
Full MEW v0.3 envelope:
777+
Full MEW v0.4 envelope:
778778
```json
779779
{
780-
"protocol": "mew/v0.3",
780+
"protocol": "mew/v0.4",
781781
"id": "msg-123",
782782
"ts": "2025-01-05T12:00:00Z",
783783
"from": "other-agent",
@@ -897,7 +897,7 @@ defaults:
897897
898898
#### Capability Patterns
899899
900-
Capabilities use JSON pattern matching as defined in MEW v0.3:
900+
Capabilities use JSON pattern matching as defined in MEW v0.4:
901901
902902
**Simple patterns:**
903903
```yaml

cli/spec/draft/decisions/accepted/005-iui-interactive-ui-architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ This debug mode should be:
2727

2828
Show only JSON messages, require full JSON input:
2929
```
30-
< {"protocol":"mew/v0.3","kind":"system/welcome",...}
31-
> {"protocol":"mew/v0.3","kind":"chat","payload":{"text":"hello"}}
32-
< {"protocol":"mew/v0.3","kind":"chat","from":"echo",...}
30+
< {"protocol":"mew/v0.4","kind":"system/welcome",...}
31+
> {"protocol":"mew/v0.4","kind":"chat","payload":{"text":"hello"}}
32+
< {"protocol":"mew/v0.4","kind":"chat","from":"echo",...}
3333
```
3434

3535
**Pros:**
@@ -174,7 +174,7 @@ Verbose mode (`/verbose` command) shows full JSON:
174174
```
175175
[10:23:45] → you chat
176176
{
177-
"protocol": "mew/v0.3",
177+
"protocol": "mew/v0.4",
178178
"id": "msg-123",
179179
"kind": "chat",
180180
"payload": {"text": "Hello"}
@@ -335,7 +335,7 @@ Active participants:
335335
> {"kind": "invalid"}
336336
[10:25:00] → you invalid
337337
{
338-
"protocol": "mew/v0.3",
338+
"protocol": "mew/v0.4",
339339
"id": "msg-456",
340340
"ts": "2025-01-10T10:25:00Z",
341341
"from": "human",
@@ -344,7 +344,7 @@ Active participants:
344344
345345
[10:25:01] ← system system/error
346346
{
347-
"protocol": "mew/v0.3",
347+
"protocol": "mew/v0.4",
348348
"kind": "system/error",
349349
"payload": {
350350
"error": "Unknown message kind: invalid",

cli/spec/draft/decisions/accepted/008-f4x-safe-fifo-input-mechanism.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,4 +431,4 @@ For backward compatibility, FIFO mode is still supported but not recommended for
431431
- [Express.js Documentation](https://expressjs.com/)
432432
- [Unix Domain Sockets](https://man7.org/linux/man-pages/man7/unix.7.html)
433433
- [MEW CLI Specification](../SPEC.md)
434-
- [MEW Protocol v0.3 Specification](../../../../spec/v0.3/SPEC.md)
434+
- [MEW Protocol v0.4 Specification](../../../../spec/v0.4/SPEC.md)

cli/spec/draft/decisions/accepted/009-aud-approval-dialog-ux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ This ensures users always know:
182182
When user selects "Yes, allow all X during this session", the CLI sends a capability grant message:
183183
```json
184184
{
185-
"protocol": "mew/v0.3",
185+
"protocol": "mew/v0.4",
186186
"from": "human",
187187
"to": ["coder-agent"],
188188
"kind": "capability/grant",
@@ -452,7 +452,7 @@ function ProposalDialog({ proposal, onApprove, onDeny, sessionPermissions }) {
452452
case 2:
453453
// Grant capability for all similar operations
454454
const grant = {
455-
protocol: "mew/v0.3",
455+
protocol: "mew/v0.4",
456456
from: participantId,
457457
to: [proposal.from],
458458
kind: "capability/grant",

0 commit comments

Comments
 (0)