@trazum/cli 2.7.12 → 3.0.1

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 (47) hide show
  1. package/README.md +4 -2
  2. package/assets/trazum-statusline.sh +131 -0
  3. package/dist/git.d.ts +38 -0
  4. package/dist/git.d.ts.map +1 -1
  5. package/dist/git.js +54 -0
  6. package/dist/git.js.map +1 -1
  7. package/dist/i18n/en.d.ts.map +1 -1
  8. package/dist/i18n/en.js +170 -3
  9. package/dist/i18n/en.js.map +1 -1
  10. package/dist/i18n/es.d.ts.map +1 -1
  11. package/dist/i18n/es.js +174 -3
  12. package/dist/i18n/es.js.map +1 -1
  13. package/dist/i18n/types.d.ts +84 -0
  14. package/dist/i18n/types.d.ts.map +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +670 -262
  17. package/dist/index.js.map +1 -1
  18. package/dist/proactive.d.ts +344 -0
  19. package/dist/proactive.d.ts.map +1 -0
  20. package/dist/proactive.js +1079 -0
  21. package/dist/proactive.js.map +1 -0
  22. package/dist/style.d.ts +305 -26
  23. package/dist/style.d.ts.map +1 -1
  24. package/dist/style.js +449 -47
  25. package/dist/style.js.map +1 -1
  26. package/dist/watch-notify.d.ts +82 -0
  27. package/dist/watch-notify.d.ts.map +1 -0
  28. package/dist/watch-notify.js +118 -0
  29. package/dist/watch-notify.js.map +1 -0
  30. package/dist/watch-run.d.ts +7 -0
  31. package/dist/watch-run.d.ts.map +1 -1
  32. package/dist/watch-run.js.map +1 -1
  33. package/dist/weekly.d.ts +32 -0
  34. package/dist/weekly.d.ts.map +1 -0
  35. package/dist/weekly.js +119 -0
  36. package/dist/weekly.js.map +1 -0
  37. package/package.json +3 -2
  38. package/src/git.ts +77 -0
  39. package/src/i18n/en.ts +198 -3
  40. package/src/i18n/es.ts +202 -3
  41. package/src/i18n/types.ts +130 -0
  42. package/src/index.ts +715 -302
  43. package/src/proactive.ts +1319 -0
  44. package/src/style.ts +502 -54
  45. package/src/watch-notify.ts +152 -0
  46. package/src/watch-run.ts +7 -0
  47. package/src/weekly.ts +133 -0
package/src/i18n/types.ts CHANGED
@@ -39,6 +39,57 @@ export interface SlotCopy {
39
39
  unlocks: string;
40
40
  }
41
41
 
42
+ /**
43
+ * Why an item of `trazum proactive` is in the state it is in. Data, not a sentence:
44
+ * the command renders each in the reader's language, and a test holds the list
45
+ * to both catalogues.
46
+ */
47
+ export type ProactiveCode =
48
+ | 'statusline.on'
49
+ | 'statusline.off'
50
+ | 'statusline.partial'
51
+ | 'statusline.stale'
52
+ | 'statusline.windows'
53
+ | 'statusline.noClaude'
54
+ | 'statusline.foreign'
55
+ | 'watch.on'
56
+ | 'watch.off'
57
+ | 'watch.stale'
58
+ | 'watch.windows'
59
+ | 'watch.noCrontab'
60
+ | 'watch.crontabError'
61
+ | 'watch.configError'
62
+ | 'watch.noStore'
63
+ | 'watch.noBudget'
64
+ | 'watch.noStoreNoBudget'
65
+ | 'watch.scheduledNotReady'
66
+ | 'watch.otherProjects'
67
+ | 'mcp.on'
68
+ | 'mcp.off'
69
+ | 'mcp.noClient'
70
+ | 'mcp.noClientClaude'
71
+ | 'mcp.other'
72
+ | 'mcp.changed'
73
+ | 'mcp.notAdded'
74
+ | 'cli.unstable'
75
+ | 'cli.unsafe'
76
+ | 'cli.notExecutable'
77
+ | 'statusline.scriptChanged'
78
+ | 'file.unparseable'
79
+ | 'file.symlink'
80
+ | 'file.shape'
81
+ | 'file.notExact'
82
+ | 'file.reformat'
83
+ | 'file.unreadable'
84
+ | 'file.outside'
85
+ | 'write.not-allowed'
86
+ | 'write.symlink'
87
+ | 'write.outside'
88
+ | 'write.changed'
89
+ | 'write.unreadable'
90
+ | 'write.partial'
91
+ | 'write.failed';
92
+
42
93
  export interface CliMessages {
43
94
  locale: Locale;
44
95
  /** BCP 47 tag used to format numbers. */
@@ -2073,6 +2124,16 @@ export interface CliMessages {
2073
2124
  allWithin(gates: string): string;
2074
2125
  webhookFailed(status: string): string;
2075
2126
  watching(minutes: string): string;
2127
+ /** `--sessions` names each folder it reads, so nothing is read silently. */
2128
+ readingSessions(agent: string, dir: string): string;
2129
+ /** `--sessions` and `--payload` name two sources, and a cycle has one. */
2130
+ sessionsAndPayload(): string;
2131
+ /** Sessions were found and none of them holds usage a price can be put on. */
2132
+ noSessionUsage(): string;
2133
+ /** `--notify` on a platform with no notifier: said, and the other transports carry on. */
2134
+ notifyUnavailable(command: string): string;
2135
+ /** The notifier is there and refused, usually because nobody is at a desktop. */
2136
+ notifyFailed(command: string, why: string): string;
2076
2137
  };
2077
2138
 
2078
2139
  /**
@@ -2295,4 +2356,73 @@ export interface CliMessages {
2295
2356
  moneyIncomparableScenario(): string;
2296
2357
  moneyIncomparablePricing(was: string, now: string): string;
2297
2358
  };
2359
+ /**
2360
+ * `trazum weekly`: the week in Markdown, written to be read in an issue by
2361
+ * somebody who did not run it.
2362
+ *
2363
+ * Every figure these sentences carry is handed in already formatted, and
2364
+ * `strayFigures` reads the finished text back against the two weeks' bills,
2365
+ * so a sentence here cannot introduce a number of its own. The three words a
2366
+ * reader must never have to infer are in them: *measured* for the two
2367
+ * weeks, *projected* for a saving that has not happened, and what `verify`
2368
+ * will say afterwards.
2369
+ */
2370
+ weekly: {
2371
+ heading(firstDay: string, lastDay: string): string;
2372
+ billHeading(): string;
2373
+ billTotal(usd: string, calls: string): string;
2374
+ /** The week holds no call: said as that, never as a bill of nothing. */
2375
+ noCalls(firstDay: string, lastDay: string): string;
2376
+ colModel(): string;
2377
+ colCalls(): string;
2378
+ colUsd(): string;
2379
+ moreModels(count: string): string;
2380
+ unpriced(models: string, calls: string): string;
2381
+ undated(count: string): string;
2382
+ movedHeading(firstDay: string, lastDay: string): string;
2383
+ /** The week before holds no call, so there is nothing to compare with. */
2384
+ noWeekBefore(): string;
2385
+ moved(delta: string, pct: string | null, now: string, before: string, calls: string): string;
2386
+ unchanged(now: string, before: string): string;
2387
+ moversHeading(): string;
2388
+ mover(model: string, before: string, now: string, delta: string): string;
2389
+ changesHeading(): string;
2390
+ noChanges(): string;
2391
+ projected(usd: string): string;
2392
+ stake(usd: string): string;
2393
+ measuredBefore(usd: string, calls: string): string;
2394
+ moreChanges(count: string): string;
2395
+ verifyHow(): string;
2396
+ footer(): string;
2397
+ /** The summary was not written: a figure in it is in neither week's bill. */
2398
+ strayFigures(figures: string): string;
2399
+ wrote(path: string): string;
2400
+ /** The one sentence a desktop notification carries: the bill, and the movement when there is one to state. */
2401
+ notifyUnavailable(command: string): string;
2402
+ notifyFailed(command: string, why: string): string;
2403
+ headline(usd: string, calls: string, delta: string | null, pct: string | null): string;
2404
+ };
2405
+ /** `trazum proactive`: what speaks first, turned on and off from one command. */
2406
+ proactive: {
2407
+ heading(): string;
2408
+ item: Record<'statusline' | 'watch' | 'mcp', string>;
2409
+ verdict: Record<'on' | 'off' | 'not-ready' | 'not-available' | 'could-not-tell', string>;
2410
+ reason: Record<ProactiveCode, (params: Record<string, string>) => string>;
2411
+ unknownAction(given: string): string;
2412
+ unknownItem(given: string, allowed: string): string;
2413
+ wouldTurnOn(item: string): string;
2414
+ wouldTurnOff(item: string): string;
2415
+ nothingToChange(item: string): string;
2416
+ dryRunAsked(): string;
2417
+ dryRunNoTerminal(): string;
2418
+ askOn(item: string, files: string): string;
2419
+ askOff(item: string, files: string): string;
2420
+ didTurnOn(item: string): string;
2421
+ didTurnOff(item: string): string;
2422
+ declined(item: string): string;
2423
+ failed(item: string, reason: string): string;
2424
+ backupNote(suffix: string): string;
2425
+ crontab(): string;
2426
+ };
2427
+
2298
2428
  }