@corenel/cli 0.3.2 → 0.4.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.
Files changed (4) hide show
  1. package/LICENSE +93 -0
  2. package/README.md +34 -6
  3. package/dist/cli.js +5190 -2711
  4. package/package.json +10 -5
package/LICENSE ADDED
@@ -0,0 +1,93 @@
1
+ Elastic License 2.0
2
+
3
+ URL: https://www.elastic.co/licensing/elastic-license
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor's trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising out
70
+ of these terms or the use or nature of the software, under any kind of legal
71
+ claim.*
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion of
77
+ it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over, are
83
+ under the control of, or are under common control with that organization.
84
+ **control** means ownership of substantially all the assets of an entity, or the
85
+ power to direct its management and policies by vote, contract, or otherwise.
86
+ Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under these
89
+ terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
package/README.md CHANGED
@@ -21,13 +21,21 @@ Assistant replies render as markdown. More verbs (`run` / `ask` / `chat` /
21
21
  ## Releasing
22
22
 
23
23
  `@corenel/term` (the terminal face) is a real runtime dependency, not bundled
24
- into `dist/cli.js` -- see the note at the top of `build.mjs`. It therefore has
25
- to be published FIRST; publishing `@corenel/cli` against an unpublished
26
- `@corenel/term` yields a package that cannot install at all, so `npx
27
- @corenel/cli` fails before any verb runs.
24
+ into `dist/cli.js` -- see the note at the top of `build.mjs`. `@corenel/term`'s
25
+ own dist is bundled but keeps `@corenel/harness` and `@corenel/protocol`
26
+ EXTERNAL (see `packages/term/build.mjs`) -- both the CLI and term import the
27
+ harness directly, and they must resolve to the SAME installed copy, or the
28
+ `llm-execution` feature guard and `--debug` logging silently apply to the
29
+ wrong module instance. That makes all four packages real runtime dependencies
30
+ of each other, and publish order matters:
28
31
 
29
- pnpm --filter @corenel/term build && pnpm --filter @corenel/term publish
30
- pnpm --filter @corenel/cli build && pnpm --filter @corenel/cli publish
32
+ pnpm --filter @corenel/protocol build && pnpm --filter @corenel/protocol publish
33
+ pnpm --filter @corenel/harness build && pnpm --filter @corenel/harness publish
34
+ pnpm --filter @corenel/term build && pnpm --filter @corenel/term publish
35
+ pnpm --filter @corenel/cli build && pnpm --filter @corenel/cli publish
36
+
37
+ Publishing any package against an unpublished dependency yields one that
38
+ cannot install at all, so `npx @corenel/cli` fails before any verb runs.
31
39
 
32
40
  Publish with **pnpm, never npm**: this CLI depends on `@corenel/term` as
33
41
  `workspace:*`, and pnpm rewrites the `workspace:` protocol to a real version at
@@ -36,4 +44,24 @@ workspace produces a manifest whose install fails with
36
44
  `EUNSUPPORTEDPROTOCOL / Unsupported URL Type "workspace:"`, which is the very
37
45
  breakage this section exists to prevent.
38
46
 
47
+ **All four versions must be bumped and published together, in the order
48
+ above, every release -- even one that only touches a single package.** pnpm
49
+ rewrites every `workspace:*` dependency to the EXACT current version of that
50
+ dependency at pack time. All four packages are pinned to the same harness
51
+ version today, so a normal `npm install` of `@corenel/cli` resolves to one
52
+ harness copy. Bump `@corenel/harness` and publish a new `@corenel/term`
53
+ without also republishing `@corenel/cli`, and the tree that installs
54
+ `@corenel/cli` gets the OLD harness version nested under it (frozen into the
55
+ manifest `@corenel/cli` published against) plus the NEW harness version
56
+ hoisted at the top level for `@corenel/term` -- two separate harness module
57
+ instances again, silently. That is exactly the bug this section's ordering
58
+ exists to prevent (see `harnessSingleInstance.test.ts` in this package's
59
+ `test/`): `registerGuard()`/`setAgentLogging()` calls made through one
60
+ instance configure a module the other never reads, so the `llm-execution`
61
+ feature gate silently stops running and `--debug` logging can't be turned
62
+ off. Every test in this repo stays green when that happens, because the
63
+ in-repo workspace is symlinked (one instance by construction) and the
64
+ build-output regression test only exercises that same symlinked layout --
65
+ neither one can see a real, version-skewed `npm install`.
66
+
39
67
  Licensed under Elastic-2.0.