cyberlegion 0.4.0 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberlegion",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Agent session spawning, messaging, and dispatch — the Legion and its Legate.",
5
5
  "author": {
6
6
  "name": "unional"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cyberlegion",
3
- "version": "0.4.0",
3
+ "version": "1.0.0",
4
4
  "description": "Agent session spawning, messaging, and dispatch — the Legion and its Legate.",
5
5
  "author": {
6
6
  "name": "unional"
package/.plugin/pins.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "cyberlegion": "0.3.1"
2
+ "cyberlegion": "1.0.0"
3
3
  }
@@ -1,7 +1,24 @@
1
1
  #!/usr/bin/env node
2
+ import { existsSync, readFileSync } from 'node:fs'
2
3
  import { dirname, join } from 'node:path'
3
4
  import { fileURLToPath } from 'node:url'
4
5
 
5
6
  const dir = dirname(fileURLToPath(import.meta.url))
6
- const { runCli } = await import(join(dir, '..', 'dist', 'cli.mjs'))
7
+ const cli = join(dir, '..', 'dist', 'cli.mjs')
8
+
9
+ // A plugin installed from a source checkout carries whatever the checkout carries, and no install
10
+ // step runs after the copy. Without the built CLI, a bare import dies with ERR_MODULE_NOT_FOUND and
11
+ // no way forward; say what is missing and name the exact published version that runs instead.
12
+ if (!existsSync(cli)) {
13
+ const { version } = JSON.parse(readFileSync(join(dir, '..', 'package.json'), 'utf8'))
14
+ process.stderr.write(
15
+ `cyberlegion: the built CLI is missing: ${cli}\n` +
16
+ 'This install has no dist/ — it is a source checkout that was never built.\n' +
17
+ `Run the published CLI of the same version instead: npx -y cyberlegion@${version}\n` +
18
+ `Or build it in place: pnpm install && pnpm build (in ${join(dir, '..')})\n`,
19
+ )
20
+ process.exit(1)
21
+ }
22
+
23
+ const { runCli } = await import(cli)
7
24
  await runCli()