proof-of-commitment 1.18.1 → 1.18.2

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.
Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/index.js +38 -21
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -63,14 +63,14 @@ poc login sk_commit_your_key_here
63
63
  poc status # check tier + usage anytime
64
64
  poc logout # remove saved key
65
65
 
66
- # Monitoring (Pro tier — daily scans + alerts):
66
+ # Monitoring (Developer $15/mo+ — daily scans + alerts):
67
67
  poc watch chalk
68
68
  poc watch requests --ecosystem pypi
69
69
  poc watch serde --ecosystem cargo
70
70
  poc watchlist # view scores + risk levels
71
71
  poc unwatch chalk
72
72
 
73
- # Upgrade to Pro: https://getcommit.dev/pricing
73
+ # Enable monitoring: https://getcommit.dev/pricing
74
74
  ```
75
75
 
76
76
  Alerts fire on: score drop ≥10 points · package crosses CRITICAL threshold · recovery to HEALTHY.
@@ -132,12 +132,12 @@ When `comment-on-pr: true` (default), the action automatically posts the audit t
132
132
  | `max-packages` | `20` | Max packages to audit when auto-detecting |
133
133
  | `include-dev-dependencies` | `false` | Include `devDependencies` from `package.json` |
134
134
  | `comment-on-pr` | `true` | Post audit results as a PR comment (requires `pull-requests: write` permission) |
135
- | `api-key` | _(none)_ | [Commit Pro](https://getcommit.dev/pricing) API key — enables batch requests and 10K requests/month |
135
+ | `api-key` | _(none)_ | [Commit](https://getcommit.dev/pricing) API key — enables batch requests; Developer ($15/mo) gets 10K requests/month |
136
136
  | `api-url` | _(prod)_ | Override API endpoint (useful for self-hosting) |
137
137
 
138
138
  **Outputs:** `has-critical`, `critical-count`, `audit-summary` (markdown table, also written to Step Summary).
139
139
 
140
- **Free vs Pro:** Without an API key, packages are audited one at a time (with delays to respect rate limits). With a Pro API key, all packages are audited in a single batch request — faster and with higher monthly limits.
140
+ **Free vs paid:** Without an API key, packages are audited one at a time (with delays to respect rate limits). With any API key (free or paid), all packages are audited in a single batch request — faster. Paid tiers (Developer $15/mo+) raise the monthly request limit and unlock daily monitoring.
141
141
 
142
142
  Example PR comment / Step Summary output:
143
143
 
package/index.js CHANGED
@@ -367,7 +367,7 @@ async function inlineSignup(results) {
367
367
  console.log(clr(c.bold, ' Next steps:'));
368
368
  console.log(clr(c.dim, ' • ') + clr(c.cyan, 'poc status') + clr(c.dim, ' — check your account'));
369
369
  if (critPkgs.length > 0) {
370
- console.log(clr(c.dim, ' • ') + clr(c.cyan, `poc watch ${critPkgs[0].name}`) + clr(c.dim, ' — start monitoring (Pro)'));
370
+ console.log(clr(c.dim, ' • ') + clr(c.cyan, `poc watch ${critPkgs[0].name}`) + clr(c.dim, ' — start monitoring (Developer $15/mo)'));
371
371
  }
372
372
  console.log(clr(c.dim, ' • ') + clr(c.cyan, 'poc init') + clr(c.dim, ' — add CI gate to this project'));
373
373
  } else if (data.message) {
@@ -384,7 +384,7 @@ async function inlineSignup(results) {
384
384
 
385
385
  function printHelp() {
386
386
  console.log(`
387
- ${clr(c.bold, 'proof-of-commitment')} v1.18.1 — supply chain risk scorer
387
+ ${clr(c.bold, 'proof-of-commitment')} v1.18.2 — supply chain risk scorer
388
388
 
389
389
  ${clr(c.bold, 'Usage:')}
390
390
  npx proof-of-commitment Auto-detect manifest in current dir
@@ -415,14 +415,14 @@ ${clr(c.bold, 'Account:')}
415
415
  poc status Show current tier, usage, and limits
416
416
  poc logout Remove saved API key
417
417
 
418
- ${clr(c.bold, 'Monitoring (Pro):')}
418
+ ${clr(c.bold, 'Monitoring (Developer $15/mo+):')}
419
419
  poc watch <package> [--ecosystem npm|pypi|cargo|golang]
420
420
  Add a package to daily monitoring
421
421
  poc watchlist List monitored packages with current scores + risk
422
422
  poc unwatch <pkg> Remove a package from monitoring
423
423
 
424
- Get a free key: https://getcommit.dev/get-started?utm_source=cli
425
- Upgrade to Pro: https://getcommit.dev/pricing
424
+ Get a free key: https://getcommit.dev/get-started?utm_source=cli
425
+ Enable monitoring: https://getcommit.dev/pricing?utm_source=cli&utm_campaign=help
426
426
 
427
427
  ${clr(c.bold, 'Options:')}
428
428
  --json Output results as JSON
@@ -965,13 +965,14 @@ async function cmdLogin(keyArg) {
965
965
  console.log(clr(c.dim, ` Saved to: ${configPath}`));
966
966
  console.log();
967
967
 
968
- if (info.tier === 'pro' || info.tier === 'enterprise') {
969
- console.log(clr(c.cyan, ' Pro features unlocked:'));
968
+ if (info.tier === 'developer' || info.tier === 'pro' || info.tier === 'enterprise') {
969
+ console.log(clr(c.cyan, ' Monitoring unlocked:'));
970
970
  console.log(clr(c.dim, ' poc watch <package> Add a package to daily monitoring'));
971
971
  console.log(clr(c.dim, ' poc watchlist View monitored packages'));
972
972
  console.log(clr(c.dim, ' poc unwatch <package> Remove from monitoring'));
973
973
  } else {
974
- console.log(clr(c.dim, ' Upgrade to Pro for monitoring + alerts: https://getcommit.dev/pricing?utm_source=cli'));
974
+ console.log(clr(c.dim, ' Enable monitoring + alerts on Developer ($15/mo):'));
975
+ console.log(clr(c.cyan, ' https://getcommit.dev/pricing?utm_source=cli&utm_campaign=post-login'));
975
976
  }
976
977
  console.log();
977
978
  }
@@ -1009,7 +1010,8 @@ async function cmdStatus() {
1009
1010
  if (info.tier === 'free') {
1010
1011
  const pct = info.requests_limit > 0 ? Math.round((info.requests_used / info.requests_limit) * 100) : 0;
1011
1012
  if (pct >= 80) {
1012
- console.log(clr(c.yellow, ` ⚠ ${pct}% of daily limit used. Upgrade for 10K/month: https://getcommit.dev/pricing`));
1013
+ console.log(clr(c.yellow, ` ⚠ ${pct}% of daily limit used. Developer ($15/mo) gets 10K/month + monitoring:`));
1014
+ console.log(clr(c.cyan, ` https://getcommit.dev/pricing?utm_source=cli&utm_campaign=status-limit`));
1013
1015
  }
1014
1016
  }
1015
1017
  }
@@ -1036,11 +1038,24 @@ function tierLabel(tier) {
1036
1038
 
1037
1039
  /**
1038
1040
  * Handle 402 upgrade response from watchlist endpoints.
1041
+ * Reads server response so the tier name, price, and URL stay authoritative
1042
+ * (server is canonical — CLI was historically out of date saying "Pro" when
1043
+ * "Developer" was the actual gate). Appends CLI UTM for attribution.
1039
1044
  */
1040
- function printUpgradeRequired() {
1041
- console.error(clr(c.yellow + c.bold, '\n ✦ Commit Pro required'));
1042
- console.error(clr(c.dim, ' Monitoring, daily scans, and alerts are Pro features.'));
1043
- console.error(clr(c.cyan, ' Upgrade at https://getcommit.dev/pricing\n'));
1045
+ async function printUpgradeRequired(res, campaign = 'watchlist-402') {
1046
+ let body = null;
1047
+ try { body = await res.json(); } catch {}
1048
+ const plan = (body && body.upgrade && body.upgrade.plan) || 'developer';
1049
+ const planLabel = plan.charAt(0).toUpperCase() + plan.slice(1);
1050
+ const price = (body && body.upgrade && body.upgrade.price) || '$15/month';
1051
+ const baseUrl = (body && body.upgrade && body.upgrade.url) || 'https://getcommit.dev/pricing';
1052
+ const url = baseUrl + (baseUrl.includes('?') ? '&' : '?') + `utm_source=cli&utm_campaign=${campaign}`;
1053
+ const currentTier = body && body.current_tier ? body.current_tier : 'free';
1054
+
1055
+ console.error(clr(c.yellow + c.bold, `\n ✦ ${planLabel} (${price}) required`));
1056
+ console.error(clr(c.dim, ` Monitoring, daily scans, and alerts start on ${planLabel}.`));
1057
+ console.error(clr(c.dim, ` Current tier: ${currentTier}`));
1058
+ console.error(clr(c.cyan, ` Upgrade at ${url}\n`));
1044
1059
  }
1045
1060
 
1046
1061
  /**
@@ -1061,7 +1076,7 @@ async function cmdWatch(pkg, ecosystem) {
1061
1076
  body: JSON.stringify({ package: pkg, ecosystem }),
1062
1077
  });
1063
1078
 
1064
- if (res.status === 402) { printUpgradeRequired(); process.exit(1); }
1079
+ if (res.status === 402) { process.stdout.write('\n'); await printUpgradeRequired(res, 'watch-cmd'); process.exit(1); }
1065
1080
 
1066
1081
  const data = await res.json();
1067
1082
  if (!res.ok) {
@@ -1093,7 +1108,7 @@ async function cmdWatchlist() {
1093
1108
  headers: { 'Authorization': `Bearer ${key}` },
1094
1109
  });
1095
1110
 
1096
- if (res.status === 402) { printUpgradeRequired(); process.exit(1); }
1111
+ if (res.status === 402) { await printUpgradeRequired(res, 'watchlist-cmd'); process.exit(1); }
1097
1112
 
1098
1113
  const data = await res.json();
1099
1114
  if (!res.ok) {
@@ -1132,7 +1147,7 @@ async function cmdWatchlist() {
1132
1147
  const divider = '─'.repeat(divWidth);
1133
1148
 
1134
1149
  console.log('\n' + divider);
1135
- console.log(clr(c.dim, ` Commit Pro watchlist · ${pkgs.length}/${data.limit} packages · tier: ${data.tier}`));
1150
+ console.log(clr(c.dim, ` Commit watchlist · ${pkgs.length}/${data.limit} packages · tier: ${data.tier}`));
1136
1151
  console.log(divider);
1137
1152
  console.log(header);
1138
1153
  console.log(divider);
@@ -1175,7 +1190,7 @@ async function cmdUnwatch(pkg, ecosystem) {
1175
1190
  body: JSON.stringify({ package: pkg, ecosystem }),
1176
1191
  });
1177
1192
 
1178
- if (res.status === 402) { printUpgradeRequired(); process.exit(1); }
1193
+ if (res.status === 402) { process.stdout.write('\n'); await printUpgradeRequired(res, 'unwatch-cmd'); process.exit(1); }
1179
1194
 
1180
1195
  const data = await res.json();
1181
1196
  if (!res.ok) {
@@ -1315,7 +1330,7 @@ ${rows}
1315
1330
  <div class="footer">
1316
1331
  <span>Generated by <a href="${WEB}" target="_blank">proof-of-commitment</a></span>
1317
1332
  <span><a href="https://github.com/piiiico/commit-action" target="_blank">GitHub Action</a></span>
1318
- <span><a href="https://getcommit.dev/pricing?utm_source=cli&amp;utm_medium=report" target="_blank">Commit Pro</a></span>
1333
+ <span><a href="https://getcommit.dev/pricing?utm_source=cli&amp;utm_medium=report" target="_blank">Enable monitoring</a></span>
1319
1334
  </div>
1320
1335
  <script>
1321
1336
  function copyMd() {
@@ -1573,9 +1588,11 @@ jobs:
1573
1588
  console.log(clr(c.white, ' 1. The badge updates daily with your project\'s score'));
1574
1589
  console.log(clr(c.white, ' 2. Push to trigger the existing workflow'));
1575
1590
  }
1576
- console.log(clr(c.dim, `\n Want daily monitoring + alerts? Get a free key:`));
1577
- console.log(clr(c.cyan, ' https://getcommit.dev/get-started?utm_source=cli'));
1578
- console.log(clr(c.dim, ' Then run: ') + clr(c.cyan, 'poc login') + clr(c.dim, ' + ') + clr(c.cyan, 'poc watch <package>\n'));
1591
+ console.log(clr(c.dim, `\n Want daily monitoring + alerts on your dependencies?`));
1592
+ console.log(clr(c.dim, ' 1. Free key (200 scans/day): ') + clr(c.cyan, 'https://getcommit.dev/get-started?utm_source=cli'));
1593
+ console.log(clr(c.dim, ' 2. Authenticate: ') + clr(c.cyan, 'poc login'));
1594
+ console.log(clr(c.dim, ' 3. Enable monitoring ($15/mo): ') + clr(c.cyan, 'https://getcommit.dev/pricing?utm_source=cli&utm_campaign=init'));
1595
+ console.log(clr(c.dim, ' 4. Watch a package: ') + clr(c.cyan, 'poc watch <package>\n'));
1579
1596
  }
1580
1597
 
1581
1598
  async function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proof-of-commitment",
3
- "version": "1.18.1",
3
+ "version": "1.18.2",
4
4
  "mcpName": "io.github.piiiico/proof-of-commitment",
5
5
  "description": "Supply chain risk scorer for npm, PyPI, Cargo, and Go packages — behavioral signals that can't be faked",
6
6
  "type": "module",