@codeledger/cli 0.10.52 → 0.10.54
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.
- package/LICENSE +16 -56
- package/LICENSE-CORE +61 -0
- package/NOTICE +11 -0
- package/README.md +11 -2
- package/bin/codeledger.js +0 -1
- package/package.json +5 -3
- package/scripts/postinstall.js +29 -27
package/LICENSE
CHANGED
|
@@ -1,61 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
Version 1.0, 2025
|
|
1
|
+
MIT License
|
|
3
2
|
|
|
4
|
-
Copyright (c)
|
|
5
|
-
All rights reserved.
|
|
3
|
+
Copyright (c) 2026 Intelligent Context AI, Inc.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
CodeLedger Core Engine binary ("Software") under the following conditions:
|
|
12
|
-
|
|
13
|
-
1. INDIVIDUAL USE (FREE)
|
|
14
|
-
You may use the Software for personal, non-commercial development work
|
|
15
|
-
at no cost. This includes individual developers using the Software on
|
|
16
|
-
their own projects or contributing to open-source projects.
|
|
17
|
-
|
|
18
|
-
2. OPEN-SOURCE PROJECTS (FREE)
|
|
19
|
-
You may use the Software in open-source projects licensed under
|
|
20
|
-
OSI-approved licenses at no cost.
|
|
21
|
-
|
|
22
|
-
3. COMMERCIAL USE (LICENSE REQUIRED)
|
|
23
|
-
Use of the Software in commercial settings, including but not limited to:
|
|
24
|
-
- CI/CD pipelines
|
|
25
|
-
- Team development environments (>1 developer)
|
|
26
|
-
- Enterprise deployments
|
|
27
|
-
- Products or services that incorporate the Software
|
|
28
|
-
requires a CodeLedger Pro license. Contact team@codeledger.dev for pricing.
|
|
29
|
-
|
|
30
|
-
RESTRICTIONS
|
|
31
|
-
|
|
32
|
-
You may NOT:
|
|
33
|
-
- Reverse engineer, decompile, or disassemble the Software
|
|
34
|
-
- Redistribute the Software as a standalone product
|
|
35
|
-
- Remove or modify any license notices or proprietary markings
|
|
36
|
-
- Use the Software to build a competing product or service
|
|
37
|
-
|
|
38
|
-
PRIVACY GUARANTEE
|
|
39
|
-
|
|
40
|
-
The Software:
|
|
41
|
-
- Runs entirely on your local machine
|
|
42
|
-
- Makes no network calls
|
|
43
|
-
- Collects no telemetry, analytics, or usage data
|
|
44
|
-
- Does not transmit your source code or any data to external services
|
|
45
|
-
|
|
46
|
-
DISCLAIMER
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
47
14
|
|
|
48
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49
|
-
IMPLIED
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Upon termination, you must destroy all copies of the Software.
|
|
56
|
-
|
|
57
|
-
CONTACT
|
|
58
|
-
|
|
59
|
-
Intelligent Context AI, Inc.
|
|
60
|
-
team@codeledger.dev
|
|
61
|
-
https://codeledger.dev/license
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/LICENSE-CORE
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
CodeLedger Core Engine License
|
|
2
|
+
Version 1.0, 2025
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2025 Intelligent Context AI, Inc.
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
GRANT OF LICENSE
|
|
8
|
+
|
|
9
|
+
Subject to the terms of this license, Intelligent Context AI, Inc. ("Licensor")
|
|
10
|
+
grants you a non-exclusive, non-transferable, revocable license to use the
|
|
11
|
+
CodeLedger Core Engine binary ("Software") under the following conditions:
|
|
12
|
+
|
|
13
|
+
1. INDIVIDUAL USE (FREE)
|
|
14
|
+
You may use the Software for personal, non-commercial development work
|
|
15
|
+
at no cost. This includes individual developers using the Software on
|
|
16
|
+
their own projects or contributing to open-source projects.
|
|
17
|
+
|
|
18
|
+
2. OPEN-SOURCE PROJECTS (FREE)
|
|
19
|
+
You may use the Software in open-source projects licensed under
|
|
20
|
+
OSI-approved licenses at no cost.
|
|
21
|
+
|
|
22
|
+
3. COMMERCIAL USE (LICENSE REQUIRED)
|
|
23
|
+
Use of the Software in commercial settings, including but not limited to:
|
|
24
|
+
- CI/CD pipelines
|
|
25
|
+
- Team development environments (>1 developer)
|
|
26
|
+
- Enterprise deployments
|
|
27
|
+
- Products or services that incorporate the Software
|
|
28
|
+
requires a CodeLedger Pro license. Contact team@codeledger.dev for pricing.
|
|
29
|
+
|
|
30
|
+
RESTRICTIONS
|
|
31
|
+
|
|
32
|
+
You may NOT:
|
|
33
|
+
- Reverse engineer, decompile, or disassemble the Software
|
|
34
|
+
- Redistribute the Software as a standalone product
|
|
35
|
+
- Remove or modify any license notices or proprietary markings
|
|
36
|
+
- Use the Software to build a competing product or service
|
|
37
|
+
|
|
38
|
+
PRIVACY GUARANTEE
|
|
39
|
+
|
|
40
|
+
The Software:
|
|
41
|
+
- Runs entirely on your local machine
|
|
42
|
+
- Makes no network calls
|
|
43
|
+
- Collects no telemetry, analytics, or usage data
|
|
44
|
+
- Does not transmit your source code or any data to external services
|
|
45
|
+
|
|
46
|
+
DISCLAIMER
|
|
47
|
+
|
|
48
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
49
|
+
IMPLIED. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR
|
|
50
|
+
OTHER LIABILITY ARISING FROM THE USE OF THE SOFTWARE.
|
|
51
|
+
|
|
52
|
+
TERMINATION
|
|
53
|
+
|
|
54
|
+
This license terminates automatically if you breach any of its terms.
|
|
55
|
+
Upon termination, you must destroy all copies of the Software.
|
|
56
|
+
|
|
57
|
+
CONTACT
|
|
58
|
+
|
|
59
|
+
Intelligent Context AI, Inc.
|
|
60
|
+
team@codeledger.dev
|
|
61
|
+
https://codeledger.dev/license
|
package/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
CodeLedger CLI Wrapper Notice
|
|
2
|
+
|
|
3
|
+
The npm package @codeledger/cli is a thin JavaScript wrapper licensed under
|
|
4
|
+
the MIT License in LICENSE.
|
|
5
|
+
|
|
6
|
+
During installation, the wrapper may download a platform-specific CodeLedger
|
|
7
|
+
hardened binary from the matching GitHub Release. That downloaded binary is
|
|
8
|
+
not part of the npm wrapper source package and is governed by LICENSE-CORE.
|
|
9
|
+
|
|
10
|
+
The wrapper contains no CodeLedger engine source, scoring formulas, or model
|
|
11
|
+
weights. It fetches, verifies, caches, and launches the hardened binary.
|
package/README.md
CHANGED
|
@@ -27,6 +27,12 @@ the matching GitHub Release, verifies its SHA256 against
|
|
|
27
27
|
`SHA256SUMS-v<version>.txt`, and caches it under
|
|
28
28
|
`~/.cache/codeledger/bin/`.
|
|
29
29
|
|
|
30
|
+
Installation downloads and verifies the binary only. It does not rewrite repo
|
|
31
|
+
hooks, vendored runtimes, or ambient setup by default. After install, run
|
|
32
|
+
`cd your-repo && codeledger ready`. Existing repos can opt into the ambient
|
|
33
|
+
refresh step with `codeledger upgrade`, or by setting `CODELEDGER_RUN_UPGRADE=1`
|
|
34
|
+
during installation.
|
|
35
|
+
|
|
30
36
|
No engine code, scoring logic, or formulas ship to npm. The wrapper is
|
|
31
37
|
~30 KB of plain JavaScript that fetches, verifies, and launches the
|
|
32
38
|
real CodeLedger binary.
|
|
@@ -104,6 +110,7 @@ invoke the repo-local wrapper directly:
|
|
|
104
110
|
| Variable | Purpose |
|
|
105
111
|
|---|---|
|
|
106
112
|
| `CODELEDGER_SKIP_POSTINSTALL=1` | Skip the binary download during `npm install`. Useful for air-gapped environments. You are responsible for placing the binary at the expected cache path afterwards. |
|
|
113
|
+
| `CODELEDGER_RUN_UPGRADE=1` | After a successful binary download, also run `codeledger upgrade`. This is opt-in because upgrade may refresh repo-local wrappers, hooks, and ambient setup. |
|
|
107
114
|
| `CODELEDGER_BINARY_URL=<url>` | Override the download base URL. Use this to fetch the binary from a corporate mirror or internal CDN. The URL must serve the same filenames as the GitHub Release, plus a `SHA256SUMS-v<version>.txt` sibling. |
|
|
108
115
|
| `CODELEDGER_CACHE_DIR=<path>` | Override the cache directory (default `~/.cache/codeledger/bin`). |
|
|
109
116
|
|
|
@@ -143,8 +150,10 @@ node $(npm root -g)/@codeledger/cli/scripts/postinstall.js
|
|
|
143
150
|
|
|
144
151
|
## License
|
|
145
152
|
|
|
146
|
-
|
|
147
|
-
|
|
153
|
+
The npm wrapper is MIT licensed; see `LICENSE`.
|
|
154
|
+
|
|
155
|
+
The downloaded CodeLedger hardened binary is governed by the CodeLedger Core
|
|
156
|
+
Engine License; see `LICENSE-CORE`. `NOTICE` describes the wrapper/binary split.
|
|
148
157
|
|
|
149
158
|
## Source
|
|
150
159
|
|
package/bin/codeledger.js
CHANGED
|
@@ -66,7 +66,6 @@ function runRepoLocal(runtime) {
|
|
|
66
66
|
stdio: 'inherit',
|
|
67
67
|
cwd: runtime.repoRoot,
|
|
68
68
|
env: { ...process.env, CODELEDGER_DELEGATED: '1' },
|
|
69
|
-
shell: runtime.kind === 'wrapper',
|
|
70
69
|
});
|
|
71
70
|
if (result.error) {
|
|
72
71
|
die(`failed to spawn repo-local runtime: ${result.error.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeledger/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.54",
|
|
4
4
|
"mcpName": "io.github.codeledgerECF/codeledger",
|
|
5
5
|
"description": "Official ContextECF CodeLedger CLI wrapper. Installs the hardened binary from GitHub Releases; zero engine code ships in this package.",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
"bin/",
|
|
12
12
|
"scripts/",
|
|
13
13
|
"README.md",
|
|
14
|
-
"LICENSE"
|
|
14
|
+
"LICENSE",
|
|
15
|
+
"LICENSE-CORE",
|
|
16
|
+
"NOTICE"
|
|
15
17
|
],
|
|
16
18
|
"dependencies": {},
|
|
17
19
|
"devDependencies": {
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
"type": "git",
|
|
25
27
|
"url": "github:codeledgerECF/codeledger"
|
|
26
28
|
},
|
|
27
|
-
"license": "
|
|
29
|
+
"license": "MIT",
|
|
28
30
|
"keywords": [
|
|
29
31
|
"codeledger",
|
|
30
32
|
"contextecf",
|
package/scripts/postinstall.js
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Environment variables (all optional):
|
|
11
11
|
* CODELEDGER_SKIP_POSTINSTALL=1 — skip entirely (air-gapped installs)
|
|
12
|
+
* CODELEDGER_RUN_UPGRADE=1 — after the binary download succeeds,
|
|
13
|
+
* also run `codeledger upgrade`
|
|
12
14
|
* CODELEDGER_BINARY_URL=<url> — override the release download base URL
|
|
13
15
|
* (for corporate mirrors / internal CDNs).
|
|
14
16
|
* Must serve the same filenames and a
|
|
@@ -128,6 +130,7 @@ const CACHE_DIR =
|
|
|
128
130
|
join(homedir(), '.cache', 'codeledger', 'bin');
|
|
129
131
|
const BINARY_LOCAL_NAME = `codeledger-hardened-v${version}`;
|
|
130
132
|
const BINARY_LOCAL_PATH = join(CACHE_DIR, BINARY_LOCAL_NAME);
|
|
133
|
+
const FETCH_TIMEOUT_MS = 60_000;
|
|
131
134
|
|
|
132
135
|
// ─── http ────────────────────────────────────────────────────────────────────
|
|
133
136
|
|
|
@@ -139,6 +142,7 @@ function fetchBufferOnce(url, redirectDepth = 0) {
|
|
|
139
142
|
const req = https.get(
|
|
140
143
|
url,
|
|
141
144
|
{
|
|
145
|
+
timeout: FETCH_TIMEOUT_MS,
|
|
142
146
|
headers: {
|
|
143
147
|
'User-Agent': `codeledger-installer/${version}`,
|
|
144
148
|
Accept: 'application/octet-stream',
|
|
@@ -171,7 +175,7 @@ function fetchBufferOnce(url, redirectDepth = 0) {
|
|
|
171
175
|
},
|
|
172
176
|
);
|
|
173
177
|
req.on('error', reject);
|
|
174
|
-
req.setTimeout(
|
|
178
|
+
req.setTimeout(FETCH_TIMEOUT_MS, () => {
|
|
175
179
|
req.destroy(new Error(`timeout fetching ${url}`));
|
|
176
180
|
});
|
|
177
181
|
});
|
|
@@ -267,32 +271,30 @@ async function main() {
|
|
|
267
271
|
console.log(` sha256: ${actualSha}`);
|
|
268
272
|
console.log('');
|
|
269
273
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
console.log('codeledger: upgrade step encountered an issue. Run manually:');
|
|
295
|
-
console.log(' codeledger upgrade');
|
|
274
|
+
console.log('codeledger: install complete.');
|
|
275
|
+
console.log(' Next: cd your-repo && codeledger ready');
|
|
276
|
+
console.log(' Existing repos can refresh ambient hooks/runtime with: codeledger upgrade');
|
|
277
|
+
|
|
278
|
+
if (process.env.CODELEDGER_RUN_UPGRADE === '1') {
|
|
279
|
+
const { spawnSync } = require('node:child_process');
|
|
280
|
+
const path = require('node:path');
|
|
281
|
+
const fs = require('node:fs');
|
|
282
|
+
const codeledgerBin = path.join(__dirname, '..', 'bin', 'codeledger.js');
|
|
283
|
+
const initCwd = process.env['INIT_CWD'];
|
|
284
|
+
const homeCwd = process.env['HOME'] ?? process.env['USERPROFILE'] ?? process.cwd();
|
|
285
|
+
const upgradeCwd =
|
|
286
|
+
initCwd && fs.existsSync(path.join(initCwd, '.codeledger')) ? initCwd : homeCwd;
|
|
287
|
+
console.log('codeledger: CODELEDGER_RUN_UPGRADE=1 set, running upgrade...');
|
|
288
|
+
const upgradeResult = spawnSync(process.execPath, [codeledgerBin, 'upgrade'], {
|
|
289
|
+
stdio: 'inherit',
|
|
290
|
+
cwd: upgradeCwd,
|
|
291
|
+
env: { ...process.env, CODELEDGER_SKIP_AMBIENT_ACTIVATION: '1' },
|
|
292
|
+
});
|
|
293
|
+
if ((upgradeResult.status ?? 0) !== 0) {
|
|
294
|
+
console.log('');
|
|
295
|
+
console.log('codeledger: upgrade step encountered an issue. Run manually:');
|
|
296
|
+
console.log(' codeledger upgrade');
|
|
297
|
+
}
|
|
296
298
|
}
|
|
297
299
|
}
|
|
298
300
|
|