@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
@@ -0,0 +1,344 @@
1
+ /**
2
+ * `trazum proactive`: the three places Trazum can speak first, turned on and
3
+ * off from one command.
4
+ *
5
+ * It edits files in a person's home directory, so this module is written for
6
+ * restraint before features. The rules, each held by `proactive.test.js`:
7
+ *
8
+ * - **One door for every write.** `applyChange` takes the target, the text the
9
+ * caller read and the text it wants, and is the only function here that
10
+ * writes. It refuses a target that is not on the allowlist it prints, one
11
+ * that is a symlink, one whose parent leaves its root, and one that changed
12
+ * since it was read. It writes a temporary file beside the target and renames
13
+ * it over, keeps the mode, and makes one backup beside the file on the first
14
+ * change only.
15
+ * - **Nothing is written because nobody said no.** Planning never writes; the
16
+ * caller decides, per item, and a decision of "no" is the default.
17
+ * - **JSON is edited as data.** A file `JSON.parse` rejects, or one this
18
+ * module could not write back exactly as it was apart from the lines it
19
+ * adds, is left alone and named.
20
+ * - **Its own lines are recognisable without a marker.** JSON has no comments,
21
+ * so a hook and a status line are Trazum's by the exact command written, and
22
+ * a server entry by being exactly the entry written and recorded in the
23
+ * manifest. The crontab line carries a trailing comment.
24
+ * - **The home directory is a parameter.** Nothing below reads the real
25
+ * environment; `Ctx` carries every fact about the machine, so a test passes a
26
+ * made-up one.
27
+ *
28
+ * Nothing here sends anything anywhere. What it turns on reads files already
29
+ * on the machine.
30
+ */
31
+ import type { PricingCatalogue } from '@trazum/core';
32
+ import type { CrontabResult } from './git.js';
33
+ import type { ProactiveCode } from './i18n/types.js';
34
+ export type Item = 'statusline' | 'watch' | 'mcp';
35
+ export declare const ITEMS: readonly Item[];
36
+ export type Verdict = 'on' | 'off' | 'not-ready' | 'not-available' | 'could-not-tell';
37
+ /** A reason as data: the command turns it into a sentence in the reader's language. */
38
+ export interface Finding {
39
+ code: ProactiveCode;
40
+ params: Record<string, string>;
41
+ }
42
+ export interface ItemStatus extends Finding {
43
+ item: Item;
44
+ verdict: Verdict;
45
+ /** Files this item reads or would write, as absolute paths. */
46
+ files: string[];
47
+ /** Things left alone while the item went on or off, each with its reason. */
48
+ notes: Finding[];
49
+ }
50
+ /** The crontab, behind a seam so a test never touches the real one. */
51
+ export type CrontabRead = {
52
+ kind: 'ok';
53
+ text: string;
54
+ } | {
55
+ kind: 'none';
56
+ } | {
57
+ kind: 'missing';
58
+ } | {
59
+ kind: 'error';
60
+ message: string;
61
+ };
62
+ export interface CrontabIO {
63
+ read(): CrontabRead | Promise<CrontabRead>;
64
+ write(text: string): void | Promise<void>;
65
+ }
66
+ /** The real crontab, through the one module that may start a process. */
67
+ export declare function systemCrontab(run: (args: readonly ['-l'] | readonly ['-'], input?: string) => CrontabResult): CrontabIO;
68
+ /** Every fact about the machine the command needs, so a test can make one up. */
69
+ export interface Ctx {
70
+ /** The person's home directory, resolved once by the caller. */
71
+ home: string;
72
+ /** The project: where `watch` runs and where project MCP configs live. */
73
+ cwd: string;
74
+ platform: NodeJS.Platform;
75
+ /** The node binary running this CLI. */
76
+ execPath: string;
77
+ /** The CLI's entry file, symlinks resolved. */
78
+ entry: string;
79
+ /** `TRAZUM_BIN`, when the person set one: a CLI they chose to keep. */
80
+ trazumBin: string | undefined;
81
+ crontab: CrontabIO;
82
+ /** The status line script, as shipped in the CLI package. */
83
+ script: () => Promise<string>;
84
+ catalogue: PricingCatalogue;
85
+ }
86
+ /** The pseudo-target for the user's crontab: not a path, and on the allowlist. */
87
+ export declare const CRONTAB = "crontab";
88
+ export declare const BACKUP_SUFFIX = ".trazum-backup";
89
+ export declare const MANAGED_MARK = "# trazum watch (managed)";
90
+ export declare const MCP_ENTRY: {
91
+ readonly command: 'npx';
92
+ readonly args: readonly ['-y', '@trazum/mcp'];
93
+ };
94
+ export interface Paths {
95
+ settings: string;
96
+ scriptDir: string;
97
+ script: string;
98
+ stateDir: string;
99
+ manifest: string;
100
+ cronBackup: string;
101
+ mcp: {
102
+ client: 'claude-code' | 'cursor';
103
+ path: string;
104
+ dir: string;
105
+ folder: string | null;
106
+ }[];
107
+ }
108
+ export declare function pathsFor(ctx: Ctx): Paths;
109
+ interface Allowed {
110
+ target: string;
111
+ /** The directory a target must stay inside once symlinks are resolved. */
112
+ root: string;
113
+ /** Whether a first change keeps a copy of what the person had. */
114
+ backup: boolean;
115
+ }
116
+ /** Every target a write may name. The list is printed when one is refused. */
117
+ export declare function allowlist(ctx: Ctx): Allowed[];
118
+ export declare class RefusedWrite extends Error {
119
+ readonly reason: 'not-allowed' | 'symlink' | 'outside' | 'changed' | 'unreadable';
120
+ readonly target: string;
121
+ readonly allowed: string[];
122
+ constructor(reason: 'not-allowed' | 'symlink' | 'outside' | 'changed' | 'unreadable', target: string, allowed: string[]);
123
+ }
124
+ /** A path in the shape a person reads: `~` for the home directory. */
125
+ export declare function shown(ctx: Ctx, path: string): string;
126
+ export interface Change {
127
+ item: Item | 'manifest';
128
+ /** An absolute path, or `CRONTAB`. */
129
+ target: string;
130
+ /** What the caller read: `null` when the file was not there. */
131
+ before: string | null;
132
+ /** What it wants there: `null` removes the file. */
133
+ after: string | null;
134
+ /** The mode of a file this creates. An existing file keeps its own. */
135
+ mode: number;
136
+ /** Lines that appear, and lines that go, as a person reads them. */
137
+ added: string[];
138
+ removed: string[];
139
+ /** Keep a copy of `before` beside the target, unless one is there already. */
140
+ backup: boolean;
141
+ }
142
+ export type Existing = {
143
+ kind: 'absent';
144
+ } | {
145
+ kind: 'symlink';
146
+ } | {
147
+ kind: 'other';
148
+ } | {
149
+ kind: 'file';
150
+ text: string;
151
+ mode: number;
152
+ };
153
+ /**
154
+ * What is at a path, and its text when it is a file, through one open.
155
+ *
156
+ * Asking what a path is and then reading it are two looks at the path, and it
157
+ * can be swapped for something else between them: a file checked not to be a
158
+ * symbolic link and then read through one. So the file is opened once, told
159
+ * not to follow a link, and both the kind and the text are taken from that
160
+ * one handle. What was checked is what was read.
161
+ */
162
+ export declare function readExisting(path: string): Promise<Existing>;
163
+ /**
164
+ * The only function in this module that writes.
165
+ *
166
+ * It takes the target, the text the caller read (`before`) and the text it
167
+ * wants (`after`). It does not decide anything; it refuses.
168
+ */
169
+ export declare function applyChange(ctx: Ctx, change: Change): Promise<void>;
170
+ export interface Format {
171
+ indent: string;
172
+ eol: '\n' | '\r\n';
173
+ final: boolean;
174
+ }
175
+ export declare function detectFormat(raw: string): Format;
176
+ export declare function serialise(value: unknown, format: Format): string;
177
+ type Obj = Record<string, unknown>;
178
+ export type JsonRead = {
179
+ kind: 'absent';
180
+ } | {
181
+ kind: 'ok';
182
+ raw: string;
183
+ value: Obj;
184
+ format: Format;
185
+ reformatted: boolean;
186
+ } | {
187
+ kind: 'refused';
188
+ finding: Finding;
189
+ };
190
+ /**
191
+ * A JSON object file, read for editing, or the reason it is to be left alone.
192
+ *
193
+ * The last check is the strict one: the parsed value, written back untouched,
194
+ * has to say what the file says. Spacing and line breaks may be normalised (the
195
+ * snippet in plugin/README.md has inline arrays, and refusing every file that
196
+ * pasted it would refuse the people this is for), and that is reported. A value
197
+ * that would not survive the round trip is left alone.
198
+ */
199
+ export declare function readJsonObject(ctx: Ctx, file: string, root: string): Promise<JsonRead>;
200
+ /** Lines that appear and lines that go, in order: a longest-common-subsequence diff. */
201
+ export declare function diffLines(before: string | null, after: string | null): {
202
+ added: string[];
203
+ removed: string[];
204
+ };
205
+ export interface Manifest {
206
+ v: 1;
207
+ /**
208
+ * `script` is the sha256 of the status line script as this command wrote it:
209
+ * how it knows, later, that the file there is still its own and not one the
210
+ * person changed.
211
+ */
212
+ statusline?: {
213
+ createdFile: boolean;
214
+ created: string[];
215
+ script?: string;
216
+ };
217
+ mcp?: Record<string, {
218
+ createdFile: boolean;
219
+ createdKey: boolean;
220
+ }>;
221
+ }
222
+ /** A path that can sit inside single quotes, in a shell string and in a crontab. */
223
+ export declare function quotable(path: string): boolean;
224
+ export type Runtime = {
225
+ ok: true;
226
+ entry: string;
227
+ node: string;
228
+ } | {
229
+ ok: false;
230
+ code: 'unstable' | 'unsafe';
231
+ path: string;
232
+ };
233
+ /**
234
+ * The CLI a scheduled job and a hook can call tomorrow.
235
+ *
236
+ * `npx @trazum/cli` unpacks into a cache nobody promised to keep, and the
237
+ * status line script is not published inside the package. So a path written
238
+ * into somebody's settings must be one that stays: a CLI installed where the
239
+ * person keeps it, or one they named with `TRAZUM_BIN`. A run from the npx
240
+ * cache is refused, with the reason.
241
+ */
242
+ export declare function stableRuntime(ctx: Ctx): Promise<Runtime>;
243
+ /** Whether a command is the one this writes, and which CLI it names. */
244
+ export declare function parseManaged(command: string, script: string): {
245
+ refresh: boolean;
246
+ bin: string | null;
247
+ } | null;
248
+ interface SettingsView {
249
+ statusLine: 'none' | 'ours' | 'foreign';
250
+ foreign: string;
251
+ hook: 'none' | 'ours';
252
+ bin: string | null;
253
+ shape: string | null;
254
+ }
255
+ export declare function viewSettings(value: Obj, script: string): SettingsView;
256
+ /** Adds what is missing; never replaces what is there. Returns the keys it created. */
257
+ export declare function withStatusLine(value: Obj, script: string, entry: string): string[];
258
+ /** Removes exactly what `withStatusLine` writes, and the containers it made when they are empty. */
259
+ export declare function withoutStatusLine(value: Obj, script: string, created: string[]): void;
260
+ export interface ManagedLine {
261
+ index: number;
262
+ line: string;
263
+ project: string;
264
+ node: string;
265
+ entry: string;
266
+ }
267
+ /** The line this writes for a project. */
268
+ export declare function cronLine(project: string, node: string, entry: string): string;
269
+ /** A line is Trazum's when it ends in the marker and has the shape `cronLine` writes. */
270
+ export declare function parseManagedLine(line: string): Omit<ManagedLine, 'index'> | null;
271
+ export declare function managedLines(text: string | null): ManagedLine[];
272
+ /** The crontab with this project's managed line in it, once. Every other line is untouched. */
273
+ export declare function withManagedLine(text: string | null, line: string, project: string): string;
274
+ /** The crontab without this project's managed lines. A line that only mentions trazum stays. */
275
+ export declare function withoutManagedLines(text: string, project: string): string;
276
+ export interface WatchReadiness {
277
+ records: number;
278
+ measuredUsd: number | null;
279
+ budget: boolean;
280
+ configError: string | null;
281
+ }
282
+ /** What `watch` needs before it is worth scheduling: something in the store and a limit somebody chose. */
283
+ export declare function watchReadiness(ctx: Ctx): Promise<WatchReadiness>;
284
+ export interface Plan {
285
+ changes: Change[];
286
+ /** How the manifest changes once the changes are written. */
287
+ patch: (m: Manifest) => void;
288
+ }
289
+ export interface ItemInspection {
290
+ status: ItemStatus;
291
+ install: Plan | null;
292
+ uninstall: Plan | null;
293
+ }
294
+ export interface Inspection {
295
+ items: Record<Item, ItemInspection>;
296
+ manifest: Manifest;
297
+ manifestRead: JsonRead;
298
+ /** Set when the manifest could not be read: nothing is changed until it can be. */
299
+ blocked: Finding | null;
300
+ }
301
+ export declare function inspectAll(ctx: Ctx): Promise<Inspection>;
302
+ /**
303
+ * Puts back what an item wrote before it failed, newest first, through the
304
+ * same door it was written by. Returns the targets it could not put back.
305
+ *
306
+ * An item is several writes: two MCP files, or the script and the settings,
307
+ * and then the record of what was added. Written half, it leaves an entry no
308
+ * record claims, which `off` would then take for the person's and never
309
+ * remove.
310
+ */
311
+ export declare function undo(ctx: Ctx, applied: readonly Change[]): Promise<string[]>;
312
+ export type Action = 'on' | 'off';
313
+ export type Outcome = 'written' | 'declined' | 'would-write' | 'nothing' | 'failed';
314
+ export interface ItemResult {
315
+ item: Item;
316
+ outcome: Outcome;
317
+ changes: {
318
+ target: string;
319
+ added: string[];
320
+ removed: string[];
321
+ }[];
322
+ error: Finding | null;
323
+ }
324
+ export interface RunOptions {
325
+ action: Action;
326
+ items: readonly Item[];
327
+ /** True writes nothing, whatever `decide` says. */
328
+ dryRun: boolean;
329
+ /** Asked once per item, with what it would write. */
330
+ decide: (item: Item, changes: Change[]) => boolean | Promise<boolean>;
331
+ }
332
+ /**
333
+ * Turns the chosen items on or off, one item at a time, each only on a yes.
334
+ *
335
+ * Returns the statuses before, what each item did, and the statuses after,
336
+ * read again from the disk rather than assumed.
337
+ */
338
+ export declare function run(ctx: Ctx, options: RunOptions): Promise<{
339
+ before: ItemStatus[];
340
+ results: ItemResult[];
341
+ after: ItemStatus[];
342
+ }>;
343
+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