cyberlegion 0.3.2 → 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.
Files changed (33) hide show
  1. package/.claude-plugin/plugin.json +20 -0
  2. package/.codex-plugin/plugin.json +20 -0
  3. package/.plugin/pins.json +3 -0
  4. package/agents/headless-legate.md +59 -0
  5. package/bin/cyberlegion.mjs +18 -1
  6. package/dist/cli.mjs +7823 -72
  7. package/dist/index.d.mts +262 -11
  8. package/dist/index.mjs +2298 -4
  9. package/package.json +10 -3
  10. package/plugin.json +24 -0
  11. package/readme.md +63 -0
  12. package/skills/dispatch-governance/README.md +29 -0
  13. package/skills/dispatch-governance/SKILL.md +143 -0
  14. package/skills/dispatch-governance/scripts/cyberlegion.mjs +31 -0
  15. package/skills/init-cyberlegion/README.md +14 -0
  16. package/skills/init-cyberlegion/SKILL.md +112 -0
  17. package/skills/init-cyberlegion/scripts/cyberlegion.mjs +31 -0
  18. package/skills/legate/README.md +22 -0
  19. package/skills/legate/SKILL.md +62 -0
  20. package/skills/legate/scripts/cyberlegion.mjs +31 -0
  21. package/skills/manage-inbox/README.md +12 -0
  22. package/skills/manage-inbox/SKILL.md +90 -0
  23. package/skills/manage-inbox/scripts/cyberlegion.mjs +31 -0
  24. package/skills/relay-governance/README.md +36 -0
  25. package/skills/relay-governance/SKILL.md +204 -0
  26. package/skills/relay-governance/scripts/cyberlegion.mjs +31 -0
  27. package/skills/session-adapter-governance/README.md +17 -0
  28. package/skills/session-adapter-governance/SKILL.md +74 -0
  29. package/skills/subagent-backend-governance/README.md +35 -0
  30. package/skills/subagent-backend-governance/SKILL.md +99 -0
  31. package/skills/subagent-backend-governance/scripts/cyberlegion.mjs +31 -0
  32. package/dist/cli.d.mts +0 -12
  33. package/dist/watch-D33fQcUI.mjs +0 -2044
@@ -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
+ }
package/dist/cli.d.mts DELETED
@@ -1,12 +0,0 @@
1
- //#region src/cli.d.ts
2
- /**
3
- * Run the CLI. Exported rather than executed at module scope so the command bodies are reachable
4
- * from a test: with a bare `program.parseAsync(process.argv)` here, importing this module ran the
5
- * whole CLI, so every `.action()` body — and every option wire inside it — was unreachable, and a
6
- * flag that stopped being forwarded changed real behavior with the suite green.
7
- *
8
- * `bin/cyberlegion.mjs` calls this; nothing else should.
9
- */
10
- declare function runCli(argv?: string[]): Promise<void>;
11
- //#endregion
12
- export { runCli };