runtrim 0.1.13 → 0.1.15

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.
@@ -10845,6 +10845,9 @@ async function syncRunsToCloud(input) {
10845
10845
  });
10846
10846
  const body = await res.json().catch(() => ({}));
10847
10847
  if (!res.ok || !body.ok) {
10848
+ if (res.status === 401 || res.status === 403) {
10849
+ return { status: "skipped_invalid_token" };
10850
+ }
10848
10851
  if (markPendingRunIds && markPendingRunIds.length > 0) {
10849
10852
  for (const id of markPendingRunIds) updateRun(id, { pendingSync: true }, cwd);
10850
10853
  }
@@ -11053,7 +11056,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11053
11056
  console.log(chalk.red(" Warning Sensitive file detected: ") + chalk.white(`${sensitiveUntracked2[0]} (untracked).`) + chalk.red(" This file may contain secrets and should not be committed or exposed."));
11054
11057
  }
11055
11058
  if (sensitiveIgnored2.length > 0) {
11056
- console.log(chalk.yellow(" Warning Sensitive file detected: ") + chalk.white(`${sensitiveIgnored2[0]} (ignored/untracked).`) + chalk.yellow(" It is currently ignored by git, but still requires secret-safe handling."));
11059
+ console.log(chalk.yellow(" Warning Sensitive ignored file detected: ") + chalk.white(`${sensitiveIgnored2[0]}.`) + chalk.yellow(" This is ignored by git. RunTrim did not read it."));
11057
11060
  }
11058
11061
  console.log("");
11059
11062
  console.log(GO_ACCENT.bold("Proof gaps"));
@@ -11066,7 +11069,9 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11066
11069
  console.log(DIM(" Cloud sync ") + chalk.green("synced"));
11067
11070
  } else if (cloudSync2.status === "failed") {
11068
11071
  console.log(DIM(" Cloud sync ") + chalk.yellow("failed \u2014 run runtrim sync to retry"));
11069
- } else if (cloudSync2.status !== "skipped_no_token" && cloudSync2.status !== "skipped_invalid_token") {
11072
+ } else if (cloudSync2.status === "skipped_no_token" || cloudSync2.status === "skipped_invalid_token") {
11073
+ console.log(DIM(" Cloud sync ") + DIM("skipped - local run saved; sign in or upgrade for cloud sync"));
11074
+ } else {
11070
11075
  console.log(DIM(" Cloud sync ") + DIM("skipped"));
11071
11076
  }
11072
11077
  }
@@ -11224,10 +11229,11 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11224
11229
  markPendingRunIds: [activeRun.id]
11225
11230
  });
11226
11231
  }
11227
- const blockedBySensitive = scope.sensitiveFiles.length > 0 || sensitiveUntracked.length > 0 || sensitiveIgnored.length > 0;
11232
+ const blockedBySensitive = scope.sensitiveFiles.length > 0 || sensitiveUntracked.length > 0;
11228
11233
  const blockedByContract = outOfContractFiles.length > 0 || forbiddenPathFiles.length > 0;
11229
11234
  const blockedByExistingHard = scope.forbiddenFiles.length > 0 || scope.status === "limit_exceeded";
11230
- const finishVerdict = blockedBySensitive || blockedByContract || blockedByExistingHard ? "BLOCKED" : scopeDriftStatus !== "passed" || evaluation.status === "needs_verification" || evaluation.status === "partial" ? "WARN" : "PASS";
11235
+ const warnBySensitiveIgnored = sensitiveIgnored.length > 0;
11236
+ const finishVerdict = blockedBySensitive || blockedByContract || blockedByExistingHard ? "BLOCKED" : warnBySensitiveIgnored || scopeDriftStatus !== "passed" || evaluation.status === "needs_verification" || evaluation.status === "partial" ? "WARN" : "PASS";
11231
11237
  const verdictColor = finishVerdict === "PASS" ? chalk.green : finishVerdict === "WARN" ? chalk.yellow : chalk.red;
11232
11238
  const scopeColor = scopeDriftStatus === "passed" ? chalk.green : scopeDriftStatus === "forbidden_touched" ? chalk.red : chalk.yellow;
11233
11239
  const riskAfter = (_m = activeRun.contract.wasteRiskAfter) != null ? _m : "medium";
@@ -11269,7 +11275,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11269
11275
  if (sensitiveIgnored.length > 0) {
11270
11276
  console.log(chalk.yellow.bold("Sensitive ignored file warning"));
11271
11277
  for (const file of sensitiveIgnored.slice(0, 3)) {
11272
- console.log(chalk.yellow(" Sensitive file detected: ") + chalk.white(`${file} (ignored/untracked).`) + chalk.yellow(" It is ignored by git, but still requires secret-safe handling."));
11278
+ console.log(chalk.yellow(" Sensitive ignored file detected: ") + chalk.white(`${file}.`) + chalk.yellow(" This is ignored by git. RunTrim did not read it."));
11273
11279
  }
11274
11280
  if (sensitiveIgnored.length > 3) {
11275
11281
  console.log(chalk.yellow(` ... and ${sensitiveIgnored.length - 3} more sensitive ignored files`));
@@ -11347,7 +11353,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11347
11353
  } else if (cloudSync.status === "failed") {
11348
11354
  console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
11349
11355
  } else if (cloudSync.status === "skipped_no_token" || cloudSync.status === "skipped_invalid_token") {
11350
- console.log(DIM(" Skipped. Run runtrim login to connect your dashboard."));
11356
+ console.log(DIM(" Cloud sync skipped. Local run saved. Sign in or upgrade for cloud sync."));
11351
11357
  } else {
11352
11358
  console.log(DIM(" Skipped."));
11353
11359
  }
@@ -11417,18 +11423,25 @@ program.command("sync").description("Sync local run history and project memory t
11417
11423
  runs
11418
11424
  });
11419
11425
  if (result.status !== "synced") {
11420
- spinner.fail(" Sync failed.");
11421
- console.log("");
11422
11426
  if (result.status === "skipped_no_token") {
11423
- console.log(chalk.yellow(" No CLI token found."));
11427
+ spinner.stop();
11428
+ console.log("");
11429
+ console.log(DIM(" Cloud sync not configured."));
11424
11430
  console.log(DIM(" Run ") + GO_ACCENT("runtrim login") + DIM(" to connect cloud sync."));
11425
11431
  console.log(DIM(" Local CLI still works without a token."));
11426
11432
  } else if (result.status === "skipped_invalid_token") {
11427
- console.log(chalk.yellow(" Stored token format is invalid. Re-run: runtrim login"));
11433
+ spinner.stop();
11434
+ console.log("");
11435
+ console.log(DIM(" Cloud sync not configured. Run saved locally."));
11436
+ console.log(DIM(" Re-run: runtrim login"));
11428
11437
  } else if (result.error) {
11438
+ spinner.fail(" Sync failed.");
11439
+ console.log("");
11429
11440
  console.log(chalk.red(" Error: ") + chalk.white(result.error));
11430
11441
  if (result.details) console.log(chalk.red(" Details: ") + chalk.white(result.details));
11431
11442
  } else {
11443
+ spinner.fail(" Sync failed.");
11444
+ console.log("");
11432
11445
  console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
11433
11446
  }
11434
11447
  console.log("");
@@ -10824,6 +10824,9 @@ async function syncRunsToCloud(input) {
10824
10824
  });
10825
10825
  const body = await res.json().catch(() => ({}));
10826
10826
  if (!res.ok || !body.ok) {
10827
+ if (res.status === 401 || res.status === 403) {
10828
+ return { status: "skipped_invalid_token" };
10829
+ }
10827
10830
  if (markPendingRunIds && markPendingRunIds.length > 0) {
10828
10831
  for (const id of markPendingRunIds) updateRun(id, { pendingSync: true }, cwd);
10829
10832
  }
@@ -11032,7 +11035,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11032
11035
  console.log(chalk.red(" Warning Sensitive file detected: ") + chalk.white(`${sensitiveUntracked2[0]} (untracked).`) + chalk.red(" This file may contain secrets and should not be committed or exposed."));
11033
11036
  }
11034
11037
  if (sensitiveIgnored2.length > 0) {
11035
- console.log(chalk.yellow(" Warning Sensitive file detected: ") + chalk.white(`${sensitiveIgnored2[0]} (ignored/untracked).`) + chalk.yellow(" It is currently ignored by git, but still requires secret-safe handling."));
11038
+ console.log(chalk.yellow(" Warning Sensitive ignored file detected: ") + chalk.white(`${sensitiveIgnored2[0]}.`) + chalk.yellow(" This is ignored by git. RunTrim did not read it."));
11036
11039
  }
11037
11040
  console.log("");
11038
11041
  console.log(GO_ACCENT.bold("Proof gaps"));
@@ -11045,7 +11048,9 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11045
11048
  console.log(DIM(" Cloud sync ") + chalk.green("synced"));
11046
11049
  } else if (cloudSync2.status === "failed") {
11047
11050
  console.log(DIM(" Cloud sync ") + chalk.yellow("failed \u2014 run runtrim sync to retry"));
11048
- } else if (cloudSync2.status !== "skipped_no_token" && cloudSync2.status !== "skipped_invalid_token") {
11051
+ } else if (cloudSync2.status === "skipped_no_token" || cloudSync2.status === "skipped_invalid_token") {
11052
+ console.log(DIM(" Cloud sync ") + DIM("skipped - local run saved; sign in or upgrade for cloud sync"));
11053
+ } else {
11049
11054
  console.log(DIM(" Cloud sync ") + DIM("skipped"));
11050
11055
  }
11051
11056
  }
@@ -11203,10 +11208,11 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11203
11208
  markPendingRunIds: [activeRun.id]
11204
11209
  });
11205
11210
  }
11206
- const blockedBySensitive = scope.sensitiveFiles.length > 0 || sensitiveUntracked.length > 0 || sensitiveIgnored.length > 0;
11211
+ const blockedBySensitive = scope.sensitiveFiles.length > 0 || sensitiveUntracked.length > 0;
11207
11212
  const blockedByContract = outOfContractFiles.length > 0 || forbiddenPathFiles.length > 0;
11208
11213
  const blockedByExistingHard = scope.forbiddenFiles.length > 0 || scope.status === "limit_exceeded";
11209
- const finishVerdict = blockedBySensitive || blockedByContract || blockedByExistingHard ? "BLOCKED" : scopeDriftStatus !== "passed" || evaluation.status === "needs_verification" || evaluation.status === "partial" ? "WARN" : "PASS";
11214
+ const warnBySensitiveIgnored = sensitiveIgnored.length > 0;
11215
+ const finishVerdict = blockedBySensitive || blockedByContract || blockedByExistingHard ? "BLOCKED" : warnBySensitiveIgnored || scopeDriftStatus !== "passed" || evaluation.status === "needs_verification" || evaluation.status === "partial" ? "WARN" : "PASS";
11210
11216
  const verdictColor = finishVerdict === "PASS" ? chalk.green : finishVerdict === "WARN" ? chalk.yellow : chalk.red;
11211
11217
  const scopeColor = scopeDriftStatus === "passed" ? chalk.green : scopeDriftStatus === "forbidden_touched" ? chalk.red : chalk.yellow;
11212
11218
  const riskAfter = (_m = activeRun.contract.wasteRiskAfter) != null ? _m : "medium";
@@ -11248,7 +11254,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11248
11254
  if (sensitiveIgnored.length > 0) {
11249
11255
  console.log(chalk.yellow.bold("Sensitive ignored file warning"));
11250
11256
  for (const file of sensitiveIgnored.slice(0, 3)) {
11251
- console.log(chalk.yellow(" Sensitive file detected: ") + chalk.white(`${file} (ignored/untracked).`) + chalk.yellow(" It is ignored by git, but still requires secret-safe handling."));
11257
+ console.log(chalk.yellow(" Sensitive ignored file detected: ") + chalk.white(`${file}.`) + chalk.yellow(" This is ignored by git. RunTrim did not read it."));
11252
11258
  }
11253
11259
  if (sensitiveIgnored.length > 3) {
11254
11260
  console.log(chalk.yellow(` ... and ${sensitiveIgnored.length - 3} more sensitive ignored files`));
@@ -11326,7 +11332,7 @@ program.command("finish").description("Bridge Mode: evaluate agent output, check
11326
11332
  } else if (cloudSync.status === "failed") {
11327
11333
  console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
11328
11334
  } else if (cloudSync.status === "skipped_no_token" || cloudSync.status === "skipped_invalid_token") {
11329
- console.log(DIM(" Skipped. Run runtrim login to connect your dashboard."));
11335
+ console.log(DIM(" Cloud sync skipped. Local run saved. Sign in or upgrade for cloud sync."));
11330
11336
  } else {
11331
11337
  console.log(DIM(" Skipped."));
11332
11338
  }
@@ -11396,18 +11402,25 @@ program.command("sync").description("Sync local run history and project memory t
11396
11402
  runs
11397
11403
  });
11398
11404
  if (result.status !== "synced") {
11399
- spinner.fail(" Sync failed.");
11400
- console.log("");
11401
11405
  if (result.status === "skipped_no_token") {
11402
- console.log(chalk.yellow(" No CLI token found."));
11406
+ spinner.stop();
11407
+ console.log("");
11408
+ console.log(DIM(" Cloud sync not configured."));
11403
11409
  console.log(DIM(" Run ") + GO_ACCENT("runtrim login") + DIM(" to connect cloud sync."));
11404
11410
  console.log(DIM(" Local CLI still works without a token."));
11405
11411
  } else if (result.status === "skipped_invalid_token") {
11406
- console.log(chalk.yellow(" Stored token format is invalid. Re-run: runtrim login"));
11412
+ spinner.stop();
11413
+ console.log("");
11414
+ console.log(DIM(" Cloud sync not configured. Run saved locally."));
11415
+ console.log(DIM(" Re-run: runtrim login"));
11407
11416
  } else if (result.error) {
11417
+ spinner.fail(" Sync failed.");
11418
+ console.log("");
11408
11419
  console.log(chalk.red(" Error: ") + chalk.white(result.error));
11409
11420
  if (result.details) console.log(chalk.red(" Details: ") + chalk.white(result.details));
11410
11421
  } else {
11422
+ spinner.fail(" Sync failed.");
11423
+ console.log("");
11411
11424
  console.log(chalk.yellow(" Failed. Run saved locally. Use runtrim sync later."));
11412
11425
  }
11413
11426
  console.log("");
package/package.json CHANGED
@@ -1,107 +1,75 @@
1
- {
2
- "name": "runtrim",
3
- "version": "0.1.13",
4
- "description": "CLI guard layer that scopes AI coding runs before they waste tokens.",
5
- "license": "MIT",
6
- "author": "RunTrim",
7
- "homepage": "https://runtrim.dev",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/michelpronkk-oss/rtrim.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/michelpronkk-oss/rtrim/issues"
14
- },
15
- "keywords": [
16
- "cli",
17
- "ai-coding",
18
- "codex",
19
- "claude",
20
- "cursor",
21
- "developer-tools",
22
- "prompt-guard"
23
- ],
24
- "bin": {
25
- "runtrim": "dist-cli/runtrim.cjs"
26
- },
27
- "files": [
28
- "dist-cli",
29
- "README.md",
30
- "LICENSE",
31
- "package.json"
32
- ],
33
- "scripts": {
34
- "dev": "next dev",
35
- "build": "npm run build:all",
36
- "build:web": "next build",
37
- "build:cli": "tsup --config tsup.config.ts && node scripts/verify-cli-build.mjs",
38
- "build:all": "npm run build:cli && npm run build:web",
39
- "verify:cli": "node scripts/verify-cli.mjs",
40
- "verify:package": "node scripts/verify-package.mjs",
41
- "start": "next start",
42
- "lint": "eslint",
43
- "prepublishOnly": "npm run build:cli",
44
- "runtrim": "tsx cli/runtrim.ts",
45
- "runtrim:build": "npm run build:cli",
46
- "remotion:preview": "remotion preview src/remotion/index.ts",
47
- "remotion:render:landscape": "remotion render src/remotion/index.ts RunTrimDemoLandscape out/runtrim-demo-landscape.mp4",
48
- "remotion:render:square": "remotion render src/remotion/index.ts RunTrimDemoSquare out/runtrim-demo-square.mp4"
49
- },
50
- "dependencies": {
51
- "@radix-ui/react-accordion": "^1.2.12",
52
- "@radix-ui/react-avatar": "^1.1.11",
53
- "@radix-ui/react-dialog": "^1.1.15",
54
- "@radix-ui/react-dropdown-menu": "^2.1.16",
55
- "@radix-ui/react-label": "^2.1.8",
56
- "@radix-ui/react-progress": "^1.1.8",
57
- "@radix-ui/react-select": "^2.2.6",
58
- "@radix-ui/react-separator": "^1.1.8",
59
- "@radix-ui/react-slot": "^1.2.4",
60
- "@radix-ui/react-switch": "^1.2.6",
61
- "@radix-ui/react-tabs": "^1.1.13",
62
- "@radix-ui/react-tooltip": "^1.2.8",
63
- "@remotion/cli": "^4.0.456",
64
- "@remotion/player": "^4.0.456",
65
- "@supabase/ssr": "^0.10.2",
66
- "@supabase/supabase-js": "^2.57.4",
67
- "chalk": "^5.6.2",
68
- "class-variance-authority": "^0.7.1",
69
- "clipboardy": "^5.3.1",
70
- "clsx": "^2.1.1",
71
- "commander": "^14.0.3",
72
- "dodopayments": "^2.32.0",
73
- "execa": "^9.6.1",
74
- "fast-glob": "^3.3.3",
75
- "framer-motion": "^12.38.0",
76
- "lucide-react": "^1.11.0",
77
- "motion": "^12.38.0",
78
- "nanoid": "^5.1.9",
79
- "next": "16.2.4",
80
- "next-themes": "^0.4.6",
81
- "ora": "^9.4.0",
82
- "prompts": "^2.4.2",
83
- "radix-ui": "^1.4.3",
84
- "react": "19.2.4",
85
- "react-dom": "19.2.4",
86
- "remotion": "^4.0.456",
87
- "resend": "^6.12.2",
88
- "shadcn": "^4.5.0",
89
- "sonner": "^2.0.7",
90
- "tailwind-merge": "^3.5.0",
91
- "tw-animate-css": "^1.4.0",
92
- "zod": "^4.3.6"
93
- },
94
- "devDependencies": {
95
- "@tailwindcss/postcss": "^4",
96
- "@types/node": "^20",
97
- "@types/prompts": "^2.4.9",
98
- "@types/react": "^19.2.14",
99
- "@types/react-dom": "^19.2.3",
100
- "eslint": "^9",
101
- "eslint-config-next": "16.2.4",
102
- "tailwindcss": "^4",
103
- "tsup": "^8.5.1",
104
- "tsx": "^4.21.0",
105
- "typescript": "^5"
106
- }
107
- }
1
+ {
2
+ "name": "runtrim",
3
+ "version": "0.1.15",
4
+ "description": "CLI guard layer that scopes AI coding runs before they waste tokens.",
5
+ "license": "MIT",
6
+ "author": "RunTrim",
7
+ "homepage": "https://runtrim.dev",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/michelpronkk-oss/rtrim.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/michelpronkk-oss/rtrim/issues"
14
+ },
15
+ "keywords": [
16
+ "cli",
17
+ "ai-coding",
18
+ "codex",
19
+ "claude",
20
+ "cursor",
21
+ "developer-tools",
22
+ "prompt-guard"
23
+ ],
24
+ "bin": {
25
+ "runtrim": "dist-cli/runtrim.cjs"
26
+ },
27
+ "files": [
28
+ "dist-cli",
29
+ "README.md",
30
+ "LICENSE",
31
+ "package.json"
32
+ ],
33
+ "scripts": {
34
+ "dev": "next dev",
35
+ "build": "npm run build:all",
36
+ "build:web": "next build",
37
+ "build:cli": "tsup --config tsup.config.ts && node scripts/verify-cli-build.mjs",
38
+ "build:all": "npm run build:cli && npm run build:web",
39
+ "verify:cli": "node scripts/verify-cli.mjs",
40
+ "verify:package": "node scripts/verify-package.mjs",
41
+ "prepack": "node scripts/prepare-cli-package-manifest.mjs",
42
+ "postpack": "node scripts/restore-package-manifest.mjs",
43
+ "start": "next start",
44
+ "lint": "eslint",
45
+ "prepublishOnly": "npm run build:cli",
46
+ "runtrim": "tsx cli/runtrim.ts",
47
+ "runtrim:build": "npm run build:cli",
48
+ "remotion:preview": "remotion preview src/remotion/index.ts",
49
+ "remotion:render:landscape": "remotion render src/remotion/index.ts RunTrimDemoLandscape out/runtrim-demo-landscape.mp4",
50
+ "remotion:render:square": "remotion render src/remotion/index.ts RunTrimDemoSquare out/runtrim-demo-square.mp4"
51
+ },
52
+ "dependencies": {
53
+ "chalk": "^5.6.2",
54
+ "clipboardy": "^5.3.1",
55
+ "commander": "^14.0.3",
56
+ "execa": "^9.6.1",
57
+ "nanoid": "^5.1.9",
58
+ "ora": "^9.4.0",
59
+ "prompts": "^2.4.2",
60
+ "zod": "^4.3.6"
61
+ },
62
+ "devDependencies": {
63
+ "@tailwindcss/postcss": "^4",
64
+ "@types/node": "^20",
65
+ "@types/prompts": "^2.4.9",
66
+ "@types/react": "^19.2.14",
67
+ "@types/react-dom": "^19.2.3",
68
+ "eslint": "^9",
69
+ "eslint-config-next": "16.2.4",
70
+ "tailwindcss": "^4",
71
+ "tsup": "^8.5.1",
72
+ "tsx": "^4.21.0",
73
+ "typescript": "^5"
74
+ }
75
+ }