@codeledger/cli 0.10.18 → 0.10.19
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/README.md +6 -6
- package/package.json +2 -2
- package/scripts/postinstall.js +12 -28
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @codeledger/cli — CodeLedger
|
|
1
|
+
# @codeledger/cli — CodeLedger
|
|
2
2
|
|
|
3
3
|
**Deterministic, bounded context selection for AI coding agents.**
|
|
4
|
-
Published by [
|
|
4
|
+
Published by [Intelligent Context AI, Inc.](https://codeledger.dev).
|
|
5
5
|
|
|
6
6
|
- Website: https://codeledger.dev
|
|
7
7
|
- Live demo: https://demo.codeledger.dev
|
|
@@ -10,7 +10,7 @@ Published by [ContextECF](https://codeledger.dev) (Intelligent Context AI, Inc.)
|
|
|
10
10
|
|
|
11
11
|
> **Installing?** Make sure you use the scope: `npm install -g @codeledger/cli`.
|
|
12
12
|
> There is an unrelated unscoped `codeledger` package on npm by a different
|
|
13
|
-
> author. The real CodeLedger
|
|
13
|
+
> author. The real CodeLedger package is published under the
|
|
14
14
|
> `@codeledger` scope.
|
|
15
15
|
|
|
16
16
|
## Install
|
|
@@ -121,6 +121,6 @@ CodeLedger Core Engine License.
|
|
|
121
121
|
|
|
122
122
|
## Source
|
|
123
123
|
|
|
124
|
-
Source code lives at <https://github.com/codeledgerECF/codeledger
|
|
125
|
-
The hardened binary shipped with this wrapper is
|
|
126
|
-
|
|
124
|
+
Source code lives at <https://github.com/codeledgerECF/codeledger>.
|
|
125
|
+
The hardened binary shipped with this wrapper is published through the
|
|
126
|
+
same public GitHub Releases channel used by the installer.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codeledger/cli",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.19",
|
|
4
4
|
"mcpName": "io.github.codeledgerECF/codeledger",
|
|
5
5
|
"description": "Thin npm wrapper that installs the hardened CodeLedger binary from GitHub Releases. Zero engine code ships in this package.",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "github:codeledgerECF/codeledger
|
|
25
|
+
"url": "github:codeledgerECF/codeledger"
|
|
26
26
|
},
|
|
27
27
|
"license": "SEE LICENSE IN LICENSE",
|
|
28
28
|
"keywords": [
|
package/scripts/postinstall.js
CHANGED
|
@@ -46,11 +46,10 @@ if (process.env.CODELEDGER_SKIP_POSTINSTALL === '1') {
|
|
|
46
46
|
process.exit(0);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
// Skip when running inside
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
// version may not even exist yet.
|
|
49
|
+
// Skip when running inside this source workspace (dev mode). The presence of
|
|
50
|
+
// pnpm-workspace.yaml two directories up is a reliable signal that this is not
|
|
51
|
+
// a real end-user install, and the release binary for this version may not
|
|
52
|
+
// exist yet.
|
|
54
53
|
try {
|
|
55
54
|
const path = require('node:path');
|
|
56
55
|
const fs = require('node:fs');
|
|
@@ -69,8 +68,7 @@ try {
|
|
|
69
68
|
// Mac runner on the release CI plan as of 2026-04-09. Intel Mac
|
|
70
69
|
// users hit the "unsupported platform" soft-fail below, which tells
|
|
71
70
|
// them to download manually from the GitHub Release. Re-add when a
|
|
72
|
-
// working Intel Mac
|
|
73
|
-
// matrix comment).
|
|
71
|
+
// working Intel Mac binary is available.
|
|
74
72
|
const PLATFORM_MAP = {
|
|
75
73
|
'darwin-arm64': 'darwin-arm64',
|
|
76
74
|
'linux-x64': 'linux-x64',
|
|
@@ -104,7 +102,7 @@ if (!platformSuffix) {
|
|
|
104
102
|
`codeledger: v${version} does not provide a hardened binary for ${platformKey}.`,
|
|
105
103
|
);
|
|
106
104
|
console.error(
|
|
107
|
-
'codeledger: you can still
|
|
105
|
+
'codeledger: you can still use the published source package or a supported release asset.',
|
|
108
106
|
);
|
|
109
107
|
}
|
|
110
108
|
// Fail softly: don't block `npm install` for unsupported platforms. The
|
|
@@ -112,13 +110,8 @@ if (!platformSuffix) {
|
|
|
112
110
|
process.exit(0);
|
|
113
111
|
}
|
|
114
112
|
|
|
115
|
-
// Binaries are hosted on the
|
|
116
|
-
//
|
|
117
|
-
// assets are not anonymously downloadable). The release pipeline in
|
|
118
|
-
// codeledger-blackbox builds the binaries, then a promote_binaries
|
|
119
|
-
// job uploads them cross-repo to the public release using a PAT.
|
|
120
|
-
// Users' `npm install -g @codeledger/cli` fetches from the public
|
|
121
|
-
// URL with no auth required.
|
|
113
|
+
// Binaries are hosted on the public CodeLedger GitHub Releases page so
|
|
114
|
+
// `npm install -g @codeledger/cli` can fetch them without authentication.
|
|
122
115
|
const RELEASE_BASE =
|
|
123
116
|
process.env.CODELEDGER_BINARY_URL ||
|
|
124
117
|
`https://github.com/codeledgerECF/codeledger/releases/download/v${version}`;
|
|
@@ -181,18 +174,9 @@ function fetchBufferOnce(url, redirectDepth = 0) {
|
|
|
181
174
|
});
|
|
182
175
|
}
|
|
183
176
|
|
|
184
|
-
// Retry wrapper that tolerates the
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
// binaries land on the public GitHub release (see the Phase 1d comment
|
|
188
|
-
// in release-dispatch.yml). For up to ~10 minutes after a user first
|
|
189
|
-
// sees @codeledger/cli@<version> on npm, the hardened binary URL may
|
|
190
|
-
// 404. This wrapper retries 404s with exponential backoff (10s, 20s,
|
|
191
|
-
// 40s, 60s, 60s, 60s, 60s, 60s, 60s, 60s → 450s total) so installs
|
|
192
|
-
// during the race window eventually succeed instead of hard-failing.
|
|
193
|
-
//
|
|
194
|
-
// Non-404 errors (DNS, network, timeouts) fail fast — retrying a DNS
|
|
195
|
-
// failure won't help.
|
|
177
|
+
// Retry wrapper that tolerates the short propagation window where a freshly
|
|
178
|
+
// published package may be visible before all release assets are available.
|
|
179
|
+
// A 404 is retried with exponential backoff; non-404 errors fail fast.
|
|
196
180
|
async function fetchBuffer(url) {
|
|
197
181
|
const backoffs = [10, 20, 40, 60, 60, 60, 60, 60, 60, 60]; // seconds
|
|
198
182
|
let lastErr;
|
|
@@ -297,7 +281,7 @@ if (require.main === module) {
|
|
|
297
281
|
console.error(' CODELEDGER_BINARY_URL=https://your-mirror/path npm install -g @codeledger/cli');
|
|
298
282
|
console.error('');
|
|
299
283
|
console.error(
|
|
300
|
-
`Manual download: https://github.com/codeledgerECF/codeledger
|
|
284
|
+
`Manual download: https://github.com/codeledgerECF/codeledger/releases/tag/v${version}`,
|
|
301
285
|
);
|
|
302
286
|
process.exit(1);
|
|
303
287
|
});
|