@linguacode/cli 2.0.0 → 2.2.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.
- package/README.md +3 -3
- package/bin/lingua.cjs +24 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ execution contract without loading Electron, React, or renderer code.
|
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
On macOS, Homebrew installs the release-owned CLI archive and its Node
|
|
9
|
+
On macOS, Homebrew installs the release-owned CLI archive and its Node 26
|
|
10
10
|
runtime without invoking npm:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
@@ -17,7 +17,7 @@ lingua --version
|
|
|
17
17
|
Homebrew also installs Bash, Zsh, and Fish completion files automatically.
|
|
18
18
|
|
|
19
19
|
The npm package remains available on every Node-supported platform and
|
|
20
|
-
requires Node.js
|
|
20
|
+
requires Node.js 26:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
pnpm add --global @linguacode/cli
|
|
@@ -27,7 +27,7 @@ lingua --version
|
|
|
27
27
|
Release pages also carry standalone Windows and Linux x64 archives. Those
|
|
28
28
|
archives embed the matching Node.js runtime for the CLI itself, so utilities
|
|
29
29
|
and Capsule validation do not require a separate Node installation. Running or
|
|
30
|
-
replaying JavaScript and TypeScript still requires Node.js
|
|
30
|
+
replaying JavaScript and TypeScript still requires Node.js 26 on `PATH`; other
|
|
31
31
|
languages need their own command-line toolchains. Extract the archive, place
|
|
32
32
|
`lingua` or `lingua.exe` on `PATH`, and verify it against the release
|
|
33
33
|
`SHA256SUMS.txt` before use.
|
package/bin/lingua.cjs
CHANGED
|
@@ -6803,7 +6803,7 @@ var RUNTIMES = {
|
|
|
6803
6803
|
node: {
|
|
6804
6804
|
name: "Node.js",
|
|
6805
6805
|
verifyExecutable: "node",
|
|
6806
|
-
homebrewFormula: "node@
|
|
6806
|
+
homebrewFormula: "node@26",
|
|
6807
6807
|
installGuide: "https://nodejs.org/en/download"
|
|
6808
6808
|
}
|
|
6809
6809
|
};
|
|
@@ -8441,7 +8441,7 @@ var MAX_REQUEST_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
|
8441
8441
|
function looksSecret(key) {
|
|
8442
8442
|
if (typeof key !== "string" || key.length === 0) return false;
|
|
8443
8443
|
const normalised = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toUpperCase();
|
|
8444
|
-
return /(^|[^A-Z0-9])(TOKEN|KEY|SECRET|PASSWORD)$/.test(normalised) || normalised.includes("PASSWORD");
|
|
8444
|
+
return /(^|[^A-Z0-9])(TOKEN|KEY|APIKEY|SECRET|PASSWORD|JWT|BEARER|AUTH|COOKIE|SESSION|SESSION_ID|SID|CSRF|XSRF)$/.test(normalised) || normalised.includes("PASSWORD");
|
|
8445
8445
|
}
|
|
8446
8446
|
|
|
8447
8447
|
// src/shared/ai/explainError.ts
|
|
@@ -8754,7 +8754,7 @@ function resolveReproEffectivePolicy(approved, probe2) {
|
|
|
8754
8754
|
required: required.has(control)
|
|
8755
8755
|
}));
|
|
8756
8756
|
const missing = controls.filter((status) => status.required && status.support !== "enforced").map((status) => status.control);
|
|
8757
|
-
if (missing.length > 0) return { ok: false, reason: "unenforceable", missing };
|
|
8757
|
+
if (missing.length > 0) return { ok: false, reason: "unenforceable", missing, controls };
|
|
8758
8758
|
return {
|
|
8759
8759
|
ok: true,
|
|
8760
8760
|
value: {
|
|
@@ -9470,6 +9470,7 @@ async function prepareReview(args, io) {
|
|
|
9470
9470
|
token: await computeReproApprovalToken(approval.approval),
|
|
9471
9471
|
backend,
|
|
9472
9472
|
effective: resolved?.ok ? resolved.value : null,
|
|
9473
|
+
controls: resolved ? resolved.ok ? resolved.value.controls : resolved.controls : [],
|
|
9473
9474
|
missing: resolved ? resolved.ok ? [] : resolved.missing : requiredReproControls(approval.policy),
|
|
9474
9475
|
node: await (args.resolveNode ?? resolveReproNodeRuntime)()
|
|
9475
9476
|
}
|
|
@@ -9510,6 +9511,12 @@ function describeRuntime(review) {
|
|
|
9510
9511
|
if (!review.node) return `${wanted} requested; Node.js not found; run refuses before launch`;
|
|
9511
9512
|
return runtimeMatches(review) ? `node ${review.node.version}` : `${wanted} requested; found ${review.node.version}; run refuses before launch`;
|
|
9512
9513
|
}
|
|
9514
|
+
function describeAmbient(review) {
|
|
9515
|
+
const grants = review.backend?.probe.ambientGrants ?? [];
|
|
9516
|
+
if (grants.length === 0)
|
|
9517
|
+
return [["ambient", review.backend ? "none" : "unavailable (no backend)"]];
|
|
9518
|
+
return grants.map((grant) => ["ambient", neutralizeControlCharacters(grant)]);
|
|
9519
|
+
}
|
|
9513
9520
|
async function runReproReviewCommand(args, io) {
|
|
9514
9521
|
const label2 = "lingua repro review";
|
|
9515
9522
|
const prepared = await prepareReview(args, io);
|
|
@@ -9519,6 +9526,7 @@ async function runReproReviewCommand(args, io) {
|
|
|
9519
9526
|
}
|
|
9520
9527
|
const review = prepared.value;
|
|
9521
9528
|
const { envelope } = review;
|
|
9529
|
+
const ambientGrants = review.backend?.probe.ambientGrants ?? [];
|
|
9522
9530
|
if (args.json) {
|
|
9523
9531
|
io.writeStdout(
|
|
9524
9532
|
`${JSON.stringify({
|
|
@@ -9536,6 +9544,9 @@ async function runReproReviewCommand(args, io) {
|
|
|
9536
9544
|
requiredControls: requiredReproControls(review.approved),
|
|
9537
9545
|
backend: review.backend?.probe.backend ?? null,
|
|
9538
9546
|
missingControls: review.missing,
|
|
9547
|
+
effectivePolicy: review.effective,
|
|
9548
|
+
probedControls: review.controls,
|
|
9549
|
+
ambientGrants,
|
|
9539
9550
|
approval: {
|
|
9540
9551
|
contentDigest: review.contentDigest,
|
|
9541
9552
|
policyDigest: review.policyDigest,
|
|
@@ -9560,9 +9571,16 @@ async function runReproReviewCommand(args, io) {
|
|
|
9560
9571
|
["limits", describeLimits(review.approved)],
|
|
9561
9572
|
["evidence", `denials ${review.approved.evidence.denials}`],
|
|
9562
9573
|
["backend", describeBackend(review)],
|
|
9574
|
+
["effective", review.effective ? "available" : "unavailable"],
|
|
9575
|
+
...review.controls.map(({ control, support, required }) => [
|
|
9576
|
+
"control",
|
|
9577
|
+
`${control}: ${support} (${required ? "required" : "optional"})`
|
|
9578
|
+
]),
|
|
9579
|
+
...describeAmbient(review),
|
|
9563
9580
|
["approve", `lingua repro run ${shellQuote(args.envelopePath)} --approve ${review.token}`]
|
|
9564
9581
|
];
|
|
9565
|
-
|
|
9582
|
+
const width = Math.max(...rows.map(([key]) => key.length)) + 1;
|
|
9583
|
+
io.writeStdout(rows.map(([key, value]) => `${key.padEnd(width)}${value}`).join("\n") + "\n");
|
|
9566
9584
|
return CLI_EXIT_CODES.ok;
|
|
9567
9585
|
}
|
|
9568
9586
|
function receiptHost(review, args, launched) {
|
|
@@ -13321,8 +13339,8 @@ function assertSingleTarget(command, positionals, help, label2) {
|
|
|
13321
13339
|
|
|
13322
13340
|
// src/cli/lingua.ts
|
|
13323
13341
|
function resolveCliVersion() {
|
|
13324
|
-
if ("2.
|
|
13325
|
-
return "2.
|
|
13342
|
+
if ("2.2.0".length > 0) {
|
|
13343
|
+
return "2.2.0";
|
|
13326
13344
|
}
|
|
13327
13345
|
return "0.0.0-dev";
|
|
13328
13346
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linguacode/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "Headless offline CLI for Lingua utilities, local runners, and Run Capsules",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://linguacode.dev",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"LICENSE"
|
|
28
28
|
],
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": "
|
|
30
|
+
"node": ">=26.13.0"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"access": "public"
|