cyberlegion 0.4.0 → 0.5.0

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.
@@ -12,6 +12,11 @@ lifecycle, the same way `dispatch-governance` forces `run-inline` from "do I hav
12
12
  contract is loaded by `dispatch-governance` (to relay a callee's `needsInput`) and by every headless
13
13
  agent (`headless-legate`, `sdd-automaton`, the cold judges) to know how *it* reports.
14
14
 
15
+ > **Running the CLI.** Every `node scripts/cyberlegion.mjs …` command below runs the `cyberlegion` CLI
16
+ > this plugin ships. The path is relative to this skill's own directory, not the working directory.
17
+ > If you cannot resolve it, run the published CLI of the version that shipped this skill instead,
18
+ > with the same arguments: `npx -y cyberlegion@0.5.0`.
19
+
15
20
  ## The one probe: who, if anyone, collects my return?
16
21
 
17
22
  A model is not running between turns. Whatever a headless agent emits must reach a collector, or be
@@ -50,7 +55,7 @@ exiting. Resolve the owner recipient in this order:
50
55
  Then:
51
56
 
52
57
  ```bash
53
- npx cyberlegion@0.3.1 mail send --to <owner> --subject "<what>" --body-file <report> [--thread <t>]
58
+ node scripts/cyberlegion.mjs mail send --to <owner> --subject "<what>" --body-file <report> [--thread <t>]
54
59
  ```
55
60
 
56
61
  and **exit**. Do not park waiting for a live answer — a cron session has no one to answer live. The
@@ -135,7 +140,7 @@ the receiver's **own owner** — the unit that dispatched it — **and** the dec
135
140
  session by whoever is already in position to do so). Either one alone leaves it a peer steer. It is
136
141
  then adoptable **within its named scope and nothing adjacent**, provided it carries **four parts**:
137
142
 
138
- 1. the **Council's verbatim words** — what the position holding the user channel actually said,
143
+ 1. the **user-channel holder's verbatim words** — what the position holding the user channel actually said,
139
144
  quoted, not summarized;
140
145
  2. **where they were said** — the session, thread, or artifact the words came from;
141
146
  3. the **relaying unit** — who is passing it down;
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ // Runs the cyberlegion CLI this plugin ships, so the skill beside it never fetches a copy through npx.
3
+ // The package root is three levels up from this file (skills/<skill>/scripts/), resolved from the
4
+ // file's own location: the working directory is the repository the agent is working on, not the plugin.
5
+ // Arguments, output, and the exit code pass straight through the package's bin.
6
+ //
7
+ // A skill folder installed on its own has no package around it. Then this runs the published CLI of
8
+ // the version that shipped the skill instead, so the skill still works, only slower. The version sync
9
+ // run at release keeps FALLBACK at the package version.
10
+ import { spawnSync } from 'node:child_process'
11
+ import { existsSync } from 'node:fs'
12
+ import { fileURLToPath } from 'node:url'
13
+
14
+ const FALLBACK = 'npx -y cyberlegion@0.5.0'
15
+ const bin = new URL('../../../bin/cyberlegion.mjs', import.meta.url)
16
+
17
+ if (existsSync(fileURLToPath(bin))) {
18
+ await import(bin.href)
19
+ } else {
20
+ process.stderr.write(`cyberlegion: no plugin package around this skill; running ${FALLBACK}\n`)
21
+ const [command, ...args] = FALLBACK.split(' ')
22
+ const res = spawnSync(command, [...args, ...process.argv.slice(2)], {
23
+ stdio: 'inherit',
24
+ shell: process.platform === 'win32',
25
+ })
26
+ if (res.error) {
27
+ process.stderr.write(`cyberlegion: could not run ${FALLBACK}: ${res.error.message}\n`)
28
+ process.exit(1)
29
+ }
30
+ process.exit(res.status ?? 1)
31
+ }
@@ -11,10 +11,15 @@ one-shot unit with no live user channel, spawned through the caller's own Task t
11
11
  always in this order. What may reach that unit **mid-flight** is not decided by this backend but by
12
12
  the unit's **role** — see *Mid-turn messaging is scoped by role*, below.
13
13
 
14
+ > **Running the CLI.** Every `node scripts/cyberlegion.mjs …` command below runs the `cyberlegion` CLI
15
+ > this plugin ships. The path is relative to this skill's own directory, not the working directory.
16
+ > If you cannot resolve it, run the published CLI of the version that shipped this skill instead,
17
+ > with the same arguments: `npx -y cyberlegion@0.5.0`.
18
+
14
19
  ## 1. Resolve the agent def
15
20
 
16
21
  ```bash
17
- npx cyberlegion@0.3.1 agent resolve <R> --format json
22
+ node scripts/cyberlegion.mjs agent resolve <R> --format json
18
23
  ```
19
24
 
20
25
  Returns `model`, `effort`, `harness`, and `instructions` for role `R`. `cyberlegion` allocates no
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ // Runs the cyberlegion CLI this plugin ships, so the skill beside it never fetches a copy through npx.
3
+ // The package root is three levels up from this file (skills/<skill>/scripts/), resolved from the
4
+ // file's own location: the working directory is the repository the agent is working on, not the plugin.
5
+ // Arguments, output, and the exit code pass straight through the package's bin.
6
+ //
7
+ // A skill folder installed on its own has no package around it. Then this runs the published CLI of
8
+ // the version that shipped the skill instead, so the skill still works, only slower. The version sync
9
+ // run at release keeps FALLBACK at the package version.
10
+ import { spawnSync } from 'node:child_process'
11
+ import { existsSync } from 'node:fs'
12
+ import { fileURLToPath } from 'node:url'
13
+
14
+ const FALLBACK = 'npx -y cyberlegion@0.5.0'
15
+ const bin = new URL('../../../bin/cyberlegion.mjs', import.meta.url)
16
+
17
+ if (existsSync(fileURLToPath(bin))) {
18
+ await import(bin.href)
19
+ } else {
20
+ process.stderr.write(`cyberlegion: no plugin package around this skill; running ${FALLBACK}\n`)
21
+ const [command, ...args] = FALLBACK.split(' ')
22
+ const res = spawnSync(command, [...args, ...process.argv.slice(2)], {
23
+ stdio: 'inherit',
24
+ shell: process.platform === 'win32',
25
+ })
26
+ if (res.error) {
27
+ process.stderr.write(`cyberlegion: could not run ${FALLBACK}: ${res.error.message}\n`)
28
+ process.exit(1)
29
+ }
30
+ process.exit(res.status ?? 1)
31
+ }