You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add dart_node_mcp package and Too Many Cooks MCP example (#12)
TLDR;
New dart_node_mcp package + "Too Many Cooks" MCP server example with VSCode extension.
What Does This Do?
dart_node_mcp: Dart package for building MCP servers on Node.js
too_many_cooks: MCP server for multi-agent coordination (file locks, messaging, plans)
too_many_cooks_vscode_extension: VSCode extension showing real-time agent activity
dart_node_better_sqlite3: An sqlite wrapper used by too many cooks
Brief Details?
dart_node_mcp provides typed MCP server implementation with stdio transport.
Too Many Cooks demonstrates the package with an agent coordination server featuring:
Agent registration
File locking with expiry
Inter-agent messaging
Plan sharing
Real-time notifications via SSE
How Do The Tests Prove The Change Works?
packages/dart_node_mcp/test/ - MCP server, transport, types, callbacks tests
examples/too_many_cooks/test/ - DB, integration, types tests
Copy file name to clipboardExpand all lines: AGENTS.md
+24-28Lines changed: 24 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,40 +2,39 @@
2
2
3
3
This is a project for Dart packages to be consumed on Node for building node-based apps with the Dart
4
4
5
+
MANDATORY: TOO MANY COOKS
6
+
- check your messages regularly
7
+
- lock files with too many cooks before editing, and unlock afterwards
8
+
- do not edit files that others have locked up
9
+
- always signal your intent to other agents
10
+
- If you are coordinator, keep delegating until the grande scheme has been achieved
11
+
- If you are not coordinator, don't stop and keep asking for something to do
12
+
- Routinely clean up expired locks
13
+
- If you find yourself with nothing to do, check someone else's plan and help them
14
+
5
15
# Rules
6
16
- All Dart. Absolutely minimal JS
17
+
- Use async/await. Do not use `.then`
7
18
- NO DUPLICATION. Move files, code elements instead of copying them. Search for elements before adding them. HIGHEST PRIORITY. PRIORITIZE THIS OVER ALL ELSE!!
8
-
- Return Result<T,E> from the nadz library for any function that could throw an exception <- CRITICAL!!!
19
+
- Prefer typedef records with named fields instead of classes for data (structural typing). This mimics Typescript better
20
+
- Return Result<T,E> from the nadz library for any function that could throw an exception. NO THROWING EXCEPTIONS.
21
+
- Don't make consecutive log calls. Use string interpolation
22
+
- Avoid casting!!! [! `as``late`] are all ILLEGAL!!! U
23
+
- Use pattern matching switch expressions or ternaries. The exceptional case is if inside arrays and maps because these are declarative and not imperaative.
9
24
- All packages MUST have austerity installed for linting and nadz for Result<T,E> types
10
-
- Fix ALL lint errors
11
-
- Do not expose raw JS objects like JSAny to the higher levels. The library packages are supposed to put a TYPED layer over these
12
-
- NO GLOBAL STATE
13
-
- Casting, ! etc are all ILLEGAL!!!
14
-
- Move non-example-specific code to the framework packages
25
+
- Do not expose `JSObject` or `JSAny` etc in the public APIs. Put types over everything. The library packages are supposed to put a TYPED layer over these
26
+
- No global state
15
27
- No skipping tests EVER!!! Agressively unskip tests when you find them!!
16
28
- Failing tests = OK. Removing assertions or tests = ILLEGAL!!
17
-
- NO THROWING EXCEPTIONS. Return results. Handle errors with Result types, except for cases where the code is a placeholder.
18
-
- NO PLACEHOLDERS!!! If you HAVE TO leave a section blank, fail LOUDLY by throwing an exception.
19
-
- Tests must FAIL HARD. Don't add allowances and print warnings. Just FAIL!
29
+
- NO PLACEHOLDERS!!! If you HAVE TO leave a section blank, fail LOUDLY by throwing an exception. This is the only time exceptions are allowed. Tests must FAIL HARD. Don't add allowances and print warnings. Just FAIL!
20
30
- Keep functions under 20 lines long and files under 500 loc
21
-
- NEVER use the late keyword
22
31
- Do not use Git commands unless explicitly requested
23
-
- Don't use if statements. Use pattern matching or ternaries instead. The exceptional case is if inside arrays and maps because these are declarative and not imperaative.
24
32
25
33
## Build & Run Commands
26
34
27
35
```bash
28
-
# Build express_server example (compiles Dart to Node-compatible JS)
29
-
dart run tools/build/build.dart express_server
30
-
31
-
# Run the compiled server
32
-
node examples/express_server/build/server.js
33
-
34
-
# Install Node dependencies for express example
35
-
cd examples/express_server && npm install
36
-
37
-
# Run tests for express example
38
-
cd examples/express_server && dart test
36
+
// Build everything
37
+
sh run_dev.sh
39
38
```
40
39
41
40
Critical documentation URLs for the Dart JS Framework project.
@@ -72,7 +71,7 @@ Critical documentation URLs for the Dart JS Framework project.
72
71
| Express 4.x API Reference |https://expressjs.com/en/4x/api.html|
@@ -102,10 +101,7 @@ Critical documentation URLs for the Dart JS Framework project.
102
101
- React 18 docs at `18.react.dev` are canonical
103
102
- Expo SDK releases 3x/year, targets specific React Native versions
104
103
105
-
## Architecture
106
-
107
-
-
108
104
109
105
## Testing
110
106
111
-
Tests in `examples/express_server/test/` use the standard `package:test`. The test spawns the Node server process and makes HTTP requests against it. The server must be built before running tests.
107
+
All projects MUST have tests. Where the package is a UI project, the tests MUST test the UI interactions and avoid unit testing. Tests are Dart only. No Javascript unless it's necessary to test the underlying interop.
Copy file name to clipboardExpand all lines: CLAUDE.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,23 @@
2
2
3
3
This is a project for Dart packages to be consumed on Node for building node-based apps with the Dart
4
4
5
+
MANDATORY: TOO MANY COOKS
6
+
- check your messages regularly
7
+
- lock files with too many cooks before editing, and unlock afterwards
8
+
- do not edit files that others have locked up
9
+
- always signal your intent to other agents
10
+
- If you are coordinator, keep delegating until the grande scheme has been achieved
11
+
- If you are not coordinator, don't stop and keep asking for something to do
12
+
- Routinely clean up expired locks
13
+
- If you find yourself with nothing to do, check someone else's plan and help them
14
+
5
15
# Rules
6
16
- All Dart. Absolutely minimal JS
7
17
- Use async/await. Do not use `.then`
8
18
- NO DUPLICATION. Move files, code elements instead of copying them. Search for elements before adding them. HIGHEST PRIORITY. PRIORITIZE THIS OVER ALL ELSE!!
9
19
- Prefer typedef records with named fields instead of classes for data (structural typing). This mimics Typescript better
10
20
- Return Result<T,E> from the nadz library for any function that could throw an exception. NO THROWING EXCEPTIONS.
21
+
- Don't make consecutive log calls. Use string interpolation
11
22
- Avoid casting!!! [! `as``late`] are all ILLEGAL!!! U
12
23
- Use pattern matching switch expressions or ternaries. The exceptional case is if inside arrays and maps because these are declarative and not imperaative.
13
24
- All packages MUST have austerity installed for linting and nadz for Result<T,E> types
0 commit comments