cyberlegion 0.0.0 → 0.0.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/dist/cli.mjs +0 -0
- package/package.json +59 -60
- package/readme.md +98 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 unional
|
|
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/dist/cli.mjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,61 +1,60 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
2
|
+
"name": "cyberlegion",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Harness-agnostic agent session spawning, messaging, and dispatch over the filesystem",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agent",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"cursor",
|
|
9
|
+
"codex",
|
|
10
|
+
"inter-agent",
|
|
11
|
+
"dispatch",
|
|
12
|
+
"tmux"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/cyberuni/cyberplace.git",
|
|
17
|
+
"directory": "packages/cyberlegion"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "unional <homawong@gmail.com>",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"bin": {
|
|
23
|
+
"cyberlegion": "bin/cyberlegion.mjs"
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"import": "./dist/index.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./package.json": "./package.json"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"bin",
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"commander": "^14.0.3"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/node": "^24.10.1",
|
|
41
|
+
"tsdown": "^0.22.0",
|
|
42
|
+
"tsx": "^4.22.3",
|
|
43
|
+
"typescript": "^6.0.0",
|
|
44
|
+
"vitest": "^4.1.7"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=22"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public",
|
|
51
|
+
"provenance": true
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"dev": "tsx src/cli.ts",
|
|
56
|
+
"test": "pnpm build && vitest run src",
|
|
57
|
+
"test:watch": "vitest",
|
|
58
|
+
"typecheck": "tsc --noEmit"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# cyberlegion
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/cyberlegion)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Harness-agnostic, MCP-free agent session spawning, messaging, and dispatch over the filesystem (Claude Code, Cursor, Codex).
|
|
7
|
+
|
|
8
|
+
The CLI is pure mechanism — dumb hands a routing layer composes. It never decides *how* to reach a peer (warm-peer session vs cold subagent vs run-inline); it just spawns, messages, and dispatches. State lives under a shared hub root (`$CYBERLEGION_ROOT`, else the global hub).
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
No install required — run with `npx`:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx cyberlegion <command>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Or pin to an exact version for reproducible hooks:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npx cyberlegion@0.1.0 <command>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
### identity — self-identify and discover peers
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npx cyberlegion identity register --handle scout # register/refresh this session
|
|
30
|
+
npx cyberlegion identity whoami # print your own identity
|
|
31
|
+
npx cyberlegion identity who # list addressable peers
|
|
32
|
+
npx cyberlegion identity prune # mark dead agents exited and sweep
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### session — warm peer session lifecycle over a multiplexer
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
npx cyberlegion session spawn --agent reviewer # launch a peer in its own git worktree (tmux/herdr)
|
|
39
|
+
npx cyberlegion session list # list live peer sessions
|
|
40
|
+
npx cyberlegion session focus <ref> # move input focus to a peer's session
|
|
41
|
+
npx cyberlegion session nudge <ref> # ring a peer's session (doorbell)
|
|
42
|
+
npx cyberlegion session read <ref> # scrape a peer's session screen
|
|
43
|
+
npx cyberlegion session close <id> # tear down worktree + session, reap state
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### mail — durable inter-agent messaging
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
npx cyberlegion mail send --to scout --body "ready" # send a message (by handle or id)
|
|
50
|
+
npx cyberlegion mail inbox # list your mail
|
|
51
|
+
npx cyberlegion mail read <msg-id> # peek without acknowledging
|
|
52
|
+
npx cyberlegion mail ack <msg-id> # acknowledge (move out of unread)
|
|
53
|
+
npx cyberlegion mail delete <msg-id> # permanently remove a message
|
|
54
|
+
npx cyberlegion mail await # block until a thread reply arrives, print + ack
|
|
55
|
+
npx cyberlegion mail watch # stream new matching mail (observer only)
|
|
56
|
+
npx cyberlegion mail hook # emit the harness hook injection payload (JSON)
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### dispatch — delegate work and await a result
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
npx cyberlegion dispatch prep # allocate id + brief + result slot (spawns nothing)
|
|
63
|
+
npx cyberlegion dispatch channel --agent worker --wait # prep + spawn + await the reply
|
|
64
|
+
npx cyberlegion dispatch collect <id> # read + validate a subagent's result file
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### agent — resolve reusable agent definitions
|
|
68
|
+
|
|
69
|
+
Reads definitions under `.agents/agents/`.
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
npx cyberlegion agent list # list resolvable agent definitions
|
|
73
|
+
npx cyberlegion agent show <name> # show a resolved def (model/effort/harness/…)
|
|
74
|
+
npx cyberlegion agent resolve <name> # emit the full machine payload for a routing caller
|
|
75
|
+
npx cyberlegion agent path <name> # print the resolved def file path
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### admin — setup and diagnostics
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
npx cyberlegion admin install # wire the mail-surfacing hook into a harness config
|
|
82
|
+
npx cyberlegion admin doctor # probe harness, multiplexer, hub root, self-id
|
|
83
|
+
npx cyberlegion admin mode # report the detected session-backend mode
|
|
84
|
+
npx cyberlegion admin migrate # merge one hub root state into another
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Top-level shortcuts are provided for the common verbs: `spawn`, `send`, `inbox`, `who`.
|
|
88
|
+
|
|
89
|
+
## Global options
|
|
90
|
+
|
|
91
|
+
| Option | Description |
|
|
92
|
+
|---------------------|-------------------------------------------------------------------|
|
|
93
|
+
| `--space <path>` | Isolate the hub root (overrides the global hub / `$CYBERLEGION_ROOT`) |
|
|
94
|
+
| `--format <format>` | Output format: `toon` (default) or `json` |
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
MIT
|