@twin-build-orchestrate/cli 1.0.0-prerelease.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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cli.js +5609 -0
- package/dist/cli.js.map +1 -0
- package/package.json +45 -0
- package/scripts/orchestrator-status-line.mjs +179 -0
- package/templates/CLAUDE.md +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kei Yoshimoto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# @twin-build-orchestrate/cli
|
|
2
|
+
|
|
3
|
+
Local orchestrator (dispatcher + agent worker) for the [twin-build](https://github.com/reality-xrcloud-inc/twin-build) framework.
|
|
4
|
+
|
|
5
|
+
Runs on a developer's machine, polls the twin-build MCP server over HTTP, and dispatches agent workers to handle tickets autonomously. Does not require direct database access — communicates with the server via REST API.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @twin-build-orchestrate/cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# One-time config
|
|
17
|
+
cat > .twin-build.json <<EOF
|
|
18
|
+
{
|
|
19
|
+
"orchestrator": {
|
|
20
|
+
"serverUrl": "https://your-server.example.com",
|
|
21
|
+
"projectId": "your-project-uuid"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
EOF
|
|
25
|
+
export TWIN_BUILD_API_KEY="..."
|
|
26
|
+
|
|
27
|
+
# Run as a foreground process
|
|
28
|
+
twin-build-orchestrate start
|
|
29
|
+
|
|
30
|
+
# Run detached (daemon)
|
|
31
|
+
twin-build-orchestrate start --detach
|
|
32
|
+
twin-build-orchestrate status
|
|
33
|
+
twin-build-orchestrate stop
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Configuration
|
|
37
|
+
|
|
38
|
+
| Source | Field |
|
|
39
|
+
|--------|-------|
|
|
40
|
+
| `.twin-build.json` `orchestrator.serverUrl` / env `TWIN_BUILD_SERVER_URL` | MCP server base URL |
|
|
41
|
+
| `.twin-build.json` `orchestrator.projectId` / env `TWIN_BUILD_PROJECT_ID` | Project UUID to scope dispatch to |
|
|
42
|
+
| env `TWIN_BUILD_API_KEY` (required) | API key for authentication |
|
|
43
|
+
|
|
44
|
+
## Compatibility
|
|
45
|
+
|
|
46
|
+
This client communicates with the twin-build MCP server REST API at `/api/v1/orchestrator/*`. Server version `>= 0.5.x` required.
|
|
47
|
+
|
|
48
|
+
### Version matrix
|
|
49
|
+
|
|
50
|
+
| `@twin-build-orchestrate/cli` | Required `twin-build-server` | Notes |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| `0.1.0` | `>= 0.5.0` | initial release |
|
|
53
|
+
| `0.1.1` | **`>= 0.5.1`** | adds `POST /halt-task` endpoint for persistent worker setup failures (forsight #215). On older servers, the dispatcher leaves halted tasks in `in-progress` state and logs a warning — `agent_halt` events are still emitted so operators are notified. **Co-deploy server 0.5.1+ before upgrading the client.** |
|
|
54
|
+
| `0.1.2` | `>= 0.5.1` (unchanged) | **client-only fix, no server upgrade required.** `linkClaudeAssets` now skips symlinking when the worktree's `.claude/<asset>` is a tracked-clean directory — projects that commit `.claude/rules/*` to git for team sharing (instead of the gitignored-symlink convention) no longer hit a persistent halt requiring manual `rm -rf` per ticket. Additional fixes: (1) git inspection failures (locked index, concurrent operations) classify as **transient** so the dispatcher requeues instead of halting; (2) macOS HFS+/APFS case-mismatch (`.claude/Rules/` vs `.claude/rules/`) is detected and rejected with a clear rename instruction; (3) `agent_halt.recommendedAction` now embeds the explicit 3-step recovery recipe. |
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|