@earntori/cli 0.2.14 → 0.2.16
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 +12 -9
- package/dist/index.js +4 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
# @earntori/cli
|
|
2
2
|
|
|
3
|
-
The Tori command line.
|
|
3
|
+
The Tori command line. One command holds your coding agent to a standard.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
npx @earntori/cli
|
|
7
|
-
npx @earntori/cli
|
|
8
|
-
npx @earntori/cli
|
|
9
|
-
npx @earntori/cli
|
|
10
|
-
npx @earntori/cli
|
|
11
|
-
npx @earntori/cli
|
|
6
|
+
npx @earntori/cli init set up this repo (signs you in with GitHub the first time)
|
|
7
|
+
npx @earntori/cli standards what this project is held to; `standards enable <id…>` adds one
|
|
8
|
+
npx @earntori/cli rules add "…" add a rule of your own
|
|
9
|
+
npx @earntori/cli check [paths…] run the checks yourself
|
|
10
|
+
npx @earntori/cli ledger the signed record of every check and fix
|
|
11
|
+
npx @earntori/cli receipt <id> verify one receipt
|
|
12
|
+
npx @earntori/cli connector new --label … a connector for Claude (Chat, Cowork) and agents you build
|
|
12
13
|
npx @earntori/cli logout
|
|
13
14
|
```
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
Tori checks the code your coding agent writes against OWASP- and CWE-aligned coding standards, and the standards your industry is held to, before the agent calls a task done. Each finding comes with its fix; the agent applies it. Every check and fix goes on a signed record you can verify offline and show whoever needs proof.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Coding agents (CLI and IDE): Claude Code, Codex, Cursor. Desktop agents: Claude (Chat, Cowork).
|
|
19
|
+
|
|
20
|
+
Guide: https://github.com/GAishZOEish/tori-examples#readme · https://usetori.dev · Issues: https://github.com/usetori/Tori-MCP/issues
|
package/dist/index.js
CHANGED
|
@@ -163,7 +163,7 @@ function writeJson(p, o) { mkdirSync(dirname(resolve(p)), { recursive: true });
|
|
|
163
163
|
// `install` writes that harness's files and returns their paths. Add a harness = add a row.
|
|
164
164
|
// Pinned package versions written into agent config (B1b). CLI version = this package's own;
|
|
165
165
|
// MCP version is a constant: bump it in the same commit as a @earntori/mcp release.
|
|
166
|
-
const TORI_MCP_VERSION = "0.1.
|
|
166
|
+
const TORI_MCP_VERSION = "0.1.9";
|
|
167
167
|
function cliVersion(cliBin) {
|
|
168
168
|
try {
|
|
169
169
|
return JSON.parse(readFileSync(resolve(dirname(realpathSync(cliBin)), "..", "package.json"), "utf8")).version ?? "latest";
|
|
@@ -336,7 +336,7 @@ function formatRun(r, n) {
|
|
|
336
336
|
return `\u2713 Tori checks clean \u2014 ${n} file(s), no open findings.`;
|
|
337
337
|
const L = [`Tori checks: ${r.findings.length} finding(s) in ${n} file(s). Fix each one, then call the checks_resolve tool with the finding_id and file path so the fix is verified.`];
|
|
338
338
|
for (const f of r.findings)
|
|
339
|
-
L.push("", `[${f.severity.toUpperCase()}] ${f.path}${f.line ? ":" + f.line : ""} (${f.rule_id})`, `finding_id: ${f.id}`, f.message, "", "How to fix:", f.fix_hint);
|
|
339
|
+
L.push("", `[${f.severity.toUpperCase()}] ${f.path}${f.line ? ":" + f.line : ""} (${f.rule_id}${f.area ? " · " + f.area : ""})`, `finding_id: ${f.id}`, f.message, "", "How to fix:", f.fix_hint);
|
|
340
340
|
if (r.waived?.length)
|
|
341
341
|
L.push("", `Waived (${r.waived.length}, not blocking): ` + r.waived.map((w) => `${w.path}${w.line ? ":" + w.line : ""} ${w.rule_id} \u2014 ${w.reason ?? "no reason"}`).join("; "));
|
|
342
342
|
if (r.reward?.issued)
|
|
@@ -539,7 +539,8 @@ async function standards() {
|
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
541
|
const r = await api(cfg, "GET", `/api/v1/standards?project=${encodeURIComponent(project)}`);
|
|
542
|
-
const line = (s) => ` ${s.enabled ? "on " : "off"} ${s.id.padEnd(20)} ${s.name}${s.rules ? ` (${s.rules} checks)` : " (no checks yet)"}
|
|
542
|
+
const line = (s) => ` ${s.enabled ? "on " : "off"} ${s.id.padEnd(20)} ${s.name}${s.rules ? ` (${s.rules} checks)` : " (no checks yet)"}` +
|
|
543
|
+
(s.areas?.length ? `\n ${" ".repeat(20)} ${s.areas.map((a) => `${a.name} ${a.rules}`).join(" · ")}` : "");
|
|
543
544
|
out(r, `${project.startsWith("connector:") ? `Project: ${project}\n\n` : ""}Coding standards \u2014 always on:\n${r.standards.filter((s) => s.tier === "coding").map(line).join("\n")}\n\nDomain standards \u2014 choose per project:\n${r.standards.filter((s) => s.tier === "domain").map(line).join("\n")}\n\nEnable: tori standards enable <id…> Disable: tori standards disable <id…>`);
|
|
544
545
|
}
|
|
545
546
|
async function rules() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earntori/cli",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Tori CLI —
|
|
3
|
+
"version": "0.2.16",
|
|
4
|
+
"description": "Tori CLI — holds your coding agent to a standard: checks before it calls a task done, each finding with its fix, on a signed record you can verify offline.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"homepage": "https://
|
|
29
|
+
"homepage": "https://usetori.dev",
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|
|
32
32
|
"url": "git+https://github.com/usetori/tori.git"
|
|
33
33
|
},
|
|
34
34
|
"bugs": {
|
|
35
|
-
"url": "https://github.com/
|
|
35
|
+
"url": "https://github.com/usetori/Tori-MCP/issues"
|
|
36
36
|
}
|
|
37
37
|
}
|