@corenel/cli 0.5.0 → 0.7.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 (4) hide show
  1. package/README.md +68 -68
  2. package/dist/cli.js +2 -2
  3. package/dist/main.js +3502 -1029
  4. package/package.json +8 -8
package/README.md CHANGED
@@ -1,68 +1,68 @@
1
- # @corenel/cli
2
-
3
- The Corenel CLI — runs the host-agnostic agent harness in Node, in-process (no
4
- transport). Early/beta: the headless proof the kernel runs outside the browser.
5
-
6
- ```bash
7
- npx @corenel/cli
8
- ```
9
-
10
- Requires Node 18+. Bring your provider key via the environment.
11
-
12
- Running `corenel` with no command opens an interactive agent in the current
13
- directory. On a terminal it opens the full terminal face; when output is piped,
14
- under `TERM=dumb`, in CI, or with `--no-tui`, it falls back to a plain
15
- line-by-line loop. `--tui` demands the full face and fails rather than falling
16
- back. `--resume` reopens the last conversation.
17
-
18
- Assistant replies render as markdown. More verbs (`run` / `ask` / `chat` /
19
- `login`, and `start --sidecar`) are in progress.
20
-
21
- ## Releasing
22
-
23
- `@corenel/term` (the terminal face) is a real runtime dependency, not bundled
24
- into `dist/main.js` -- see the note at the top of `build.mjs`. (`dist/cli.js`,
25
- the bin, is only a Node >=18 check that then imports `main.js`.) `@corenel/term`'s
26
- own dist is bundled but keeps `@corenel/harness` and `@corenel/protocol`
27
- EXTERNAL (see `packages/term/build.mjs`) -- both the CLI and term import the
28
- harness directly, and they must resolve to the SAME installed copy, or the
29
- `llm-execution` feature guard and `--debug` logging silently apply to the
30
- wrong module instance. That makes all four packages real runtime dependencies
31
- of each other, and publish order matters:
32
-
33
- pnpm --filter @corenel/protocol build && pnpm --filter @corenel/protocol publish
34
- pnpm --filter @corenel/harness build && pnpm --filter @corenel/harness publish
35
- pnpm --filter @corenel/term build && pnpm --filter @corenel/term publish
36
- pnpm --filter @corenel/cli build && pnpm --filter @corenel/cli publish
37
-
38
- Publishing any package against an unpublished dependency yields one that
39
- cannot install at all, so `npx @corenel/cli` fails before any verb runs.
40
-
41
- Publish with **pnpm, never npm**: this CLI depends on `@corenel/term` as
42
- `workspace:*`, and pnpm rewrites the `workspace:` protocol to a real version at
43
- pack/publish time while npm ships it verbatim -- an `npm publish` from this
44
- workspace produces a manifest whose install fails with
45
- `EUNSUPPORTEDPROTOCOL / Unsupported URL Type "workspace:"`, which is the very
46
- breakage this section exists to prevent.
47
-
48
- **All four versions must be bumped and published together, in the order
49
- above, every release -- even one that only touches a single package.** pnpm
50
- rewrites every `workspace:*` dependency to the EXACT current version of that
51
- dependency at pack time. All four packages are pinned to the same harness
52
- version today, so a normal `npm install` of `@corenel/cli` resolves to one
53
- harness copy. Bump `@corenel/harness` and publish a new `@corenel/term`
54
- without also republishing `@corenel/cli`, and the tree that installs
55
- `@corenel/cli` gets the OLD harness version nested under it (frozen into the
56
- manifest `@corenel/cli` published against) plus the NEW harness version
57
- hoisted at the top level for `@corenel/term` -- two separate harness module
58
- instances again, silently. That is exactly the bug this section's ordering
59
- exists to prevent (see `harnessSingleInstance.test.ts` in this package's
60
- `test/`): `registerGuard()`/`setAgentLogging()` calls made through one
61
- instance configure a module the other never reads, so the `llm-execution`
62
- feature gate silently stops running and `--debug` logging can't be turned
63
- off. Every test in this repo stays green when that happens, because the
64
- in-repo workspace is symlinked (one instance by construction) and the
65
- build-output regression test only exercises that same symlinked layout --
66
- neither one can see a real, version-skewed `npm install`.
67
-
68
- Licensed under Elastic-2.0.
1
+ # @corenel/cli
2
+
3
+ The Corenel CLI — runs the host-agnostic agent harness in Node, in-process (no
4
+ transport). Early/beta: the headless proof the kernel runs outside the browser.
5
+
6
+ ```bash
7
+ npx @corenel/cli
8
+ ```
9
+
10
+ Requires Node 22+. Bring your provider key via the environment.
11
+
12
+ Running `corenel` with no command opens an interactive agent in the current
13
+ directory. On a terminal it opens the full terminal face; when output is piped,
14
+ under `TERM=dumb`, in CI, or with `--no-tui`, it falls back to a plain
15
+ line-by-line loop. `--tui` demands the full face and fails rather than falling
16
+ back. `--resume` reopens the last conversation.
17
+
18
+ Assistant replies render as markdown. More verbs (`run` / `ask` / `chat` /
19
+ `login`, and `start --sidecar`) are in progress.
20
+
21
+ ## Releasing
22
+
23
+ `@corenel/term` (the terminal face) is a real runtime dependency, not bundled
24
+ into `dist/main.js` -- see the note at the top of `build.mjs`. (`dist/cli.js`,
25
+ the bin, is only a Node >=22 check that then imports `main.js`.) `@corenel/term`'s
26
+ own dist is bundled but keeps `@corenel/harness` and `@corenel/protocol`
27
+ EXTERNAL (see `packages/term/build.mjs`) -- both the CLI and term import the
28
+ harness directly, and they must resolve to the SAME installed copy, or the
29
+ `llm-execution` feature guard and `--debug` logging silently apply to the
30
+ wrong module instance. That makes all four packages real runtime dependencies
31
+ of each other, and publish order matters:
32
+
33
+ pnpm --filter @corenel/protocol build && pnpm --filter @corenel/protocol publish
34
+ pnpm --filter @corenel/harness build && pnpm --filter @corenel/harness publish
35
+ pnpm --filter @corenel/term build && pnpm --filter @corenel/term publish
36
+ pnpm --filter @corenel/cli build && pnpm --filter @corenel/cli publish
37
+
38
+ Publishing any package against an unpublished dependency yields one that
39
+ cannot install at all, so `npx @corenel/cli` fails before any verb runs.
40
+
41
+ Publish with **pnpm, never npm**: this CLI depends on `@corenel/term` as
42
+ `workspace:*`, and pnpm rewrites the `workspace:` protocol to a real version at
43
+ pack/publish time while npm ships it verbatim -- an `npm publish` from this
44
+ workspace produces a manifest whose install fails with
45
+ `EUNSUPPORTEDPROTOCOL / Unsupported URL Type "workspace:"`, which is the very
46
+ breakage this section exists to prevent.
47
+
48
+ **All four versions must be bumped and published together, in the order
49
+ above, every release -- even one that only touches a single package.** pnpm
50
+ rewrites every `workspace:*` dependency to the EXACT current version of that
51
+ dependency at pack time. All four packages are pinned to the same harness
52
+ version today, so a normal `npm install` of `@corenel/cli` resolves to one
53
+ harness copy. Bump `@corenel/harness` and publish a new `@corenel/term`
54
+ without also republishing `@corenel/cli`, and the tree that installs
55
+ `@corenel/cli` gets the OLD harness version nested under it (frozen into the
56
+ manifest `@corenel/cli` published against) plus the NEW harness version
57
+ hoisted at the top level for `@corenel/term` -- two separate harness module
58
+ instances again, silently. That is exactly the bug this section's ordering
59
+ exists to prevent (see `harnessSingleInstance.test.ts` in this package's
60
+ `test/`): `registerGuard()`/`setAgentLogging()` calls made through one
61
+ instance configure a module the other never reads, so the `llm-execution`
62
+ feature gate silently stops running and `--debug` logging can't be turned
63
+ off. Every test in this repo stays green when that happens, because the
64
+ in-repo workspace is symlinked (one instance by construction) and the
65
+ build-output regression test only exercises that same symlinked layout --
66
+ neither one can see a real, version-skewed `npm install`.
67
+
68
+ Licensed under Elastic-2.0.
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  var major = Number(process.versions.node.split('.')[0]);
3
- if (!(major >= 18)) {
4
- process.stderr.write('corenel needs Node.js 18 or newer. This is ' + process.version + ' at ' + process.execPath + '.\n');
3
+ if (!(major >= 22)) {
4
+ process.stderr.write('corenel needs Node.js 22 or newer. This is ' + process.version + ' at ' + process.execPath + '.\n');
5
5
  process.exit(1);
6
6
  }
7
7
  import('./main.js');