dominus-cli 2.0.0 → 2.1.1
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.
- package/CHANGELOG.md +195 -0
- package/README.md +162 -248
- package/dist/install-plugin.js +75 -0
- package/dist/install-plugin.js.map +1 -0
- package/dist/mcp.js +1394 -4764
- package/dist/mcp.js.map +1 -1
- package/docs/DOMINUS_2_PLAN.md +75 -0
- package/package.json +27 -26
- package/plugin/Dominus.rbxmx +3674 -0
- package/plugin/src/BridgeConfig.lua +2 -0
- package/plugin/src/CommandRouter.lua +94 -0
- package/plugin/src/Explorer.lua +530 -373
- package/plugin/src/InstanceRegistry.lua +122 -0
- package/plugin/src/Mutation.lua +135 -0
- package/plugin/src/Properties.lua +859 -785
- package/plugin/src/Protocol.lua +30 -30
- package/plugin/src/Reflection.lua +91 -59
- package/plugin/src/TestRunner.lua +69 -141
- package/plugin/src/UIBuilder.lua +857 -727
- package/plugin/src/ValueCodec.lua +231 -0
- package/plugin/src/Watcher.lua +85 -85
- package/plugin/src/WsClient.lua +166 -81
- package/plugin/src/init.server.lua +191 -365
- package/dist/index.js +0 -7998
- package/dist/index.js.map +0 -1
- package/plugin/Dominus.rbxm +0 -0
- package/plugin/src/Executor.lua +0 -117
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Dominus 2 Rewrite Plan
|
|
2
|
+
|
|
3
|
+
## Product direction
|
|
4
|
+
|
|
5
|
+
Dominus 2 is a Roblox Studio MCP server, not a standalone AI chat CLI. The MCP
|
|
6
|
+
host supplies the model and consent UI. Dominus supplies a small, strongly typed
|
|
7
|
+
set of Studio inspection, mutation, documentation, and verification tools.
|
|
8
|
+
|
|
9
|
+
## July 2026 compatibility target
|
|
10
|
+
|
|
11
|
+
- Target the stable MCP 2025-11-25 protocol through the official TypeScript SDK.
|
|
12
|
+
- Use `registerTool`, strict input schemas, output schemas, `structuredContent`,
|
|
13
|
+
text fallbacks, `isError`, and accurate tool risk annotations.
|
|
14
|
+
- Keep stdio as the MCP transport. It limits the MCP server itself to the process
|
|
15
|
+
that launched it and avoids exposing another localhost HTTP endpoint.
|
|
16
|
+
- Do not depend on legacy sampling, roots, or MCP logging. They are deprecated in
|
|
17
|
+
the 2026-07-28 release candidate.
|
|
18
|
+
- Do not adopt the legacy experimental Tasks API. Long Studio calls remain normal
|
|
19
|
+
cancellable tool calls until the July Tasks extension is final and broadly
|
|
20
|
+
supported by clients and the TypeScript SDK.
|
|
21
|
+
|
|
22
|
+
Official references:
|
|
23
|
+
|
|
24
|
+
- https://modelcontextprotocol.io/specification/2025-11-25/server/tools
|
|
25
|
+
- https://ts.sdk.modelcontextprotocol.io/server
|
|
26
|
+
- https://modelcontextprotocol.io/docs/tutorials/security/security_best_practices
|
|
27
|
+
- https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/
|
|
28
|
+
|
|
29
|
+
## Architecture
|
|
30
|
+
|
|
31
|
+
1. MCP host starts `dominus-mcp` over stdio.
|
|
32
|
+
2. Dominus owns or securely relays to one loopback WebSocket bridge on port 18088.
|
|
33
|
+
3. The installer embeds a persistent random bridge token into that user's local
|
|
34
|
+
Studio plugin, allowing automatic authentication without a manual pairing flow.
|
|
35
|
+
4. Every Studio window receives a unique connection ID. MCP callers select that
|
|
36
|
+
ID, so two windows editing the same place cannot overwrite each other's target.
|
|
37
|
+
5. Studio instances are returned as session-scoped instance references with path
|
|
38
|
+
segments for display and fallback. Dot-separated names are not identifiers.
|
|
39
|
+
6. Mutations run through a command allowlist and ChangeHistoryService recordings.
|
|
40
|
+
Failed batches are cancelled and automatically undone.
|
|
41
|
+
7. Script writes require the revision hash returned by the read operation.
|
|
42
|
+
8. There is no arbitrary Luau execution tool.
|
|
43
|
+
|
|
44
|
+
## MCP tool surface
|
|
45
|
+
|
|
46
|
+
- `dominus_status`, `dominus_select_studio`
|
|
47
|
+
- `studio_get_tree`, `studio_inspect`, `studio_get_selection`
|
|
48
|
+
- `studio_read_script`, `studio_update_script`
|
|
49
|
+
- `studio_apply`, `studio_delete_instances`
|
|
50
|
+
- `studio_build_ui`, `studio_snapshot_ui`
|
|
51
|
+
- `studio_run_test`, `studio_get_output`
|
|
52
|
+
- `roblox_search_api`, `roblox_get_api`
|
|
53
|
+
|
|
54
|
+
The intended agent loop is inspect, plan, apply, read back, test. Tool descriptions
|
|
55
|
+
and the server prompt make that workflow explicit without embedding another LLM
|
|
56
|
+
inside the MCP server.
|
|
57
|
+
|
|
58
|
+
## Safety limits
|
|
59
|
+
|
|
60
|
+
- Loopback-only listener and authenticated controller/plugin handshakes.
|
|
61
|
+
- One MiB WebSocket payload limit, handshake timeout, request timeout, and bounded
|
|
62
|
+
tool arrays/depth/source lengths.
|
|
63
|
+
- Dedicated mutation tools only; no `loadstring` or generic `run_code` path.
|
|
64
|
+
- Explicit destructive tool for deletion.
|
|
65
|
+
- Atomic UI replacement: build and validate off-tree before replacing the live UI.
|
|
66
|
+
- Output watcher filters every Dominus-prefixed message to prevent feedback loops.
|
|
67
|
+
|
|
68
|
+
## Verification
|
|
69
|
+
|
|
70
|
+
- Transport tests cover authentication, credential rejection, wrong-target responses,
|
|
71
|
+
disconnect isolation, duplicate place sessions, and payload rejection.
|
|
72
|
+
- Protocol and MCP tests cover schema validation and structured result shapes.
|
|
73
|
+
- Static plugin checks plus `rojo build` verify the packaged plugin model.
|
|
74
|
+
- Final gates: TypeScript typecheck, targeted Vitest, full Vitest, build, and
|
|
75
|
+
`npm pack --dry-run`.
|
package/package.json
CHANGED
|
@@ -1,40 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dominus-cli",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.1.1",
|
|
4
|
+
"description": "Dominus 2: a secure, MCP-native Roblox Studio engineering agent bridge.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"dominus": "./dist/
|
|
8
|
-
"dominus-
|
|
7
|
+
"dominus-mcp": "./dist/mcp.js",
|
|
8
|
+
"dominus-install-plugin": "./dist/install-plugin.js"
|
|
9
9
|
},
|
|
10
|
-
"main": "./dist/
|
|
10
|
+
"main": "./dist/mcp.js",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"dev": "tsx src/index.
|
|
13
|
-
"dev:mcp": "
|
|
12
|
+
"dev": "tsx src/mcp/index.ts",
|
|
13
|
+
"dev:mcp": "tsx src/mcp/index.ts",
|
|
14
14
|
"build": "tsup",
|
|
15
|
-
"build:plugin": "rojo build plugin/default.project.json -o plugin/Dominus.
|
|
16
|
-
"start": "node dist/
|
|
15
|
+
"build:plugin": "rojo build plugin/default.project.json -o plugin/Dominus.rbxmx",
|
|
16
|
+
"start": "node dist/mcp.js",
|
|
17
17
|
"test": "vitest run",
|
|
18
18
|
"test:watch": "vitest",
|
|
19
19
|
"test:coverage": "vitest run --coverage",
|
|
20
20
|
"lint": "prettier --check .",
|
|
21
21
|
"format": "prettier --write .",
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
|
-
"prepublishOnly": "pnpm build",
|
|
24
|
-
"install-plugin": "
|
|
23
|
+
"prepublishOnly": "pnpm typecheck && pnpm test && pnpm build && pnpm build:plugin",
|
|
24
|
+
"install-plugin": "node dist/install-plugin.js"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
28
|
-
"chalk": "^5.4.1",
|
|
29
|
-
"commander": "^13.1.0",
|
|
30
|
-
"figures": "^6.1.0",
|
|
31
|
-
"ink": "^5.1.0",
|
|
32
|
-
"ink-spinner": "^5.0.0",
|
|
33
|
-
"ink-text-input": "^6.0.0",
|
|
27
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
34
28
|
"nanoid": "^5.1.0",
|
|
35
|
-
"openai": "^4.77.0",
|
|
36
|
-
"react": "^18.3.1",
|
|
37
|
-
"sql.js": "^1.14.0",
|
|
38
29
|
"ws": "^8.18.0",
|
|
39
30
|
"zod": "^3.24.0"
|
|
40
31
|
},
|
|
@@ -43,8 +34,17 @@
|
|
|
43
34
|
"@types/react": "^18.3.0",
|
|
44
35
|
"@types/ws": "^8.5.0",
|
|
45
36
|
"@vitest/coverage-v8": "^2.1.0",
|
|
37
|
+
"chalk": "^5.4.1",
|
|
38
|
+
"commander": "^13.1.0",
|
|
39
|
+
"figures": "^6.1.0",
|
|
40
|
+
"ink": "^5.1.0",
|
|
41
|
+
"ink-spinner": "^5.0.0",
|
|
42
|
+
"ink-text-input": "^6.0.0",
|
|
46
43
|
"nodemon": "^3.1.14",
|
|
44
|
+
"openai": "^4.77.0",
|
|
47
45
|
"prettier": "^3.4.0",
|
|
46
|
+
"react": "^18.3.1",
|
|
47
|
+
"sql.js": "^1.14.0",
|
|
48
48
|
"tsup": "^8.3.0",
|
|
49
49
|
"tsx": "^4.19.0",
|
|
50
50
|
"typescript": "^5.7.0",
|
|
@@ -55,19 +55,20 @@
|
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist",
|
|
58
|
-
"plugin"
|
|
58
|
+
"plugin/default.project.json",
|
|
59
|
+
"plugin/Dominus.rbxmx",
|
|
60
|
+
"plugin/src",
|
|
61
|
+
"CHANGELOG.md",
|
|
62
|
+
"docs/DOMINUS_2_PLAN.md"
|
|
59
63
|
],
|
|
60
64
|
"keywords": [
|
|
61
65
|
"roblox",
|
|
62
66
|
"roblox-studio",
|
|
63
|
-
"
|
|
64
|
-
"tui",
|
|
65
|
-
"ai",
|
|
67
|
+
"mcp-server",
|
|
66
68
|
"agent",
|
|
67
69
|
"luau",
|
|
68
70
|
"dominus",
|
|
69
71
|
"websocket",
|
|
70
|
-
"openrouter",
|
|
71
72
|
"mcp",
|
|
72
73
|
"model-context-protocol"
|
|
73
74
|
],
|