@zinn-dev/cli 0.42.0 → 0.44.0

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 (69) hide show
  1. package/README.md +1 -1
  2. package/index.js +3 -3
  3. package/package.json +6 -4
  4. package/skills/zinn/SKILL.md +1 -1
  5. package/src/actor.d.ts +8 -0
  6. package/src/actor.js +5 -1
  7. package/src/capabilities-schema.d.ts +4 -4
  8. package/src/column-hint.js +3 -4
  9. package/src/errors.d.ts +40 -3
  10. package/src/errors.js +93 -21
  11. package/src/failure-log.d.ts +6 -0
  12. package/src/failure-log.js +167 -0
  13. package/src/input.d.ts +11 -0
  14. package/src/input.js +25 -1
  15. package/src/lib.d.ts +21 -10
  16. package/src/lib.js +116 -62
  17. package/src/list-continuation.d.ts +11 -0
  18. package/src/list-continuation.js +18 -0
  19. package/src/list-limit.d.ts +11 -0
  20. package/src/list-limit.js +17 -0
  21. package/src/overview.d.ts +10 -0
  22. package/src/overview.js +41 -0
  23. package/src/presentation/activity-presentation.d.ts +2 -0
  24. package/src/presentation/activity-presentation.js +112 -38
  25. package/src/presentation/column-presentation.d.ts +17 -2
  26. package/src/presentation/column-presentation.js +45 -6
  27. package/src/presentation/description-presentation.d.ts +3 -16
  28. package/src/presentation/description-presentation.js +22 -21
  29. package/src/presentation/info-presentation.js +36 -6
  30. package/src/presentation/project-presentation.d.ts +6 -2
  31. package/src/presentation/project-presentation.js +9 -1
  32. package/src/presentation/relation-presentation.d.ts +12 -3
  33. package/src/presentation/relation-presentation.js +50 -26
  34. package/src/presentation/row-layout.d.ts +1 -1
  35. package/src/presentation/row-layout.js +6 -5
  36. package/src/presentation/task-blame-presentation.d.ts +11 -0
  37. package/src/presentation/task-blame-presentation.js +56 -0
  38. package/src/presentation/task-presentation.d.ts +6 -1
  39. package/src/presentation/task-presentation.js +28 -10
  40. package/src/presentation/text-width.d.ts +2 -0
  41. package/src/presentation/text-width.js +43 -0
  42. package/src/presentation/time.d.ts +3 -1
  43. package/src/presentation/time.js +5 -2
  44. package/src/result-schemas.d.ts +529 -18
  45. package/src/result-schemas.js +66 -4
  46. package/src/routes/activity-router.d.ts +53 -1
  47. package/src/routes/activity-router.js +126 -15
  48. package/src/routes/info-router.js +3 -2
  49. package/src/routes/migrate-router.js +2 -2
  50. package/src/routes/project-router.d.ts +41 -1
  51. package/src/routes/project-router.js +76 -24
  52. package/src/routes/relation-router.d.ts +7 -3
  53. package/src/routes/relation-router.js +73 -56
  54. package/src/routes/restore-router.js +10 -7
  55. package/src/routes/router.js +77 -37
  56. package/src/routes/routes.d.ts +213 -8
  57. package/src/routes/task-router.d.ts +119 -6
  58. package/src/routes/task-router.js +177 -32
  59. package/src/routes/whoami-router.js +1 -1
  60. package/src/run-facts.d.ts +14 -0
  61. package/src/run-facts.js +14 -0
  62. package/src/store-folder.d.ts +5 -0
  63. package/src/store-folder.js +16 -0
  64. package/src/telemetry.d.ts +31 -0
  65. package/src/telemetry.js +329 -0
  66. package/src/text-input.js +1 -5
  67. package/src/timestamp-input.d.ts +3 -0
  68. package/src/timestamp-input.js +31 -0
  69. package/src/types.d.ts +4 -4
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { activityActionSchema, activityEntityTypeSchema, actorKindSchema, infoDatabaseStateSchema, labelColorSchema, relationTypeSchema, settingsFileSourceSchema, settingsFileStateSchema, settingsSchema, storageSourceSchema, taskPrioritySchema, } from "@zinn-dev/core";
2
+ import { activityActionSchema, activityEntityTypeSchema, actorKindSchema, infoDatabaseStateSchema, labelColorSchema, relationTypeSchema, settingsFileSourceSchema, settingsFileStateSchema, settingsSchema, storageSourceSchema, taskPrioritySchema, telemetryModeSchema, telemetrySourceSchema, } from "@zinn-dev/core";
3
3
  import { errorDocumentSchema } from "./errors.js";
4
4
  import { capabilitiesSchema, jsonValueSchema } from "./capabilities-schema.js";
5
5
  const nullableText = z.string().nullable();
@@ -13,14 +13,21 @@ export const taskSchema = z.strictObject({
13
13
  status: taskStatus,
14
14
  column: z.string().describe("Current column name."),
15
15
  column_id: z.string().describe("Current column ID."),
16
+ is_first: z.boolean().describe("Whether the task's column is the first column of its board."),
17
+ is_last: z.boolean().describe("Whether the task's column is the last column of its board."),
16
18
  title: z.string(),
17
19
  description: nullableText,
18
20
  priority: z
19
21
  .string()
20
22
  .nullable()
21
23
  .describe(`Known priorities: ${taskPrioritySchema.options.join(", ")}. Other stored values may occur.`),
24
+ due_at: timestamp
25
+ .nullable()
26
+ .describe("Exact deadline in epoch milliseconds, or null when unset."),
22
27
  labels: z.array(z.string()).describe("Attached label names."),
23
28
  label_ids: z.array(z.string()).describe("Attached label IDs, in the same order as labels."),
29
+ created_at: timestamp,
30
+ updated_at: timestamp,
24
31
  });
25
32
  export const relationSchema = z.strictObject({
26
33
  id: z.string().describe("Stored relation ID."),
@@ -37,6 +44,8 @@ export const relationSchema = z.strictObject({
37
44
  project_id: true,
38
45
  column: true,
39
46
  column_id: true,
47
+ is_first: true,
48
+ is_last: true,
40
49
  title: true,
41
50
  status: true,
42
51
  }),
@@ -71,6 +80,7 @@ export const activitySchema = z.strictObject({
71
80
  actor_agent: nullableText,
72
81
  actor_model: nullableText,
73
82
  actor_effort: nullableText,
83
+ actor_client: nullableText,
74
84
  entity_type: z
75
85
  .string()
76
86
  .describe(`Known entity types: ${activityEntityTypeSchema.options.join(", ")}. Other stored values may occur.`),
@@ -93,10 +103,13 @@ export const actorSchema = activitySchema.pick({
93
103
  actor_agent: true,
94
104
  actor_model: true,
95
105
  actor_effort: true,
106
+ actor_client: true,
96
107
  });
97
- export const taskDetailSchema = taskSchema.extend({
108
+ export const taskAttributionSchema = actorSchema.extend({
109
+ id: activitySchema.shape.id,
98
110
  created_at: timestamp,
99
- updated_at: timestamp,
111
+ });
112
+ export const taskDetailSchema = taskSchema.extend({
100
113
  relations: z.array(relationSchema),
101
114
  comments: z.array(commentSchema),
102
115
  });
@@ -117,11 +130,19 @@ export const projectSchema = z.strictObject({
117
130
  export const projectChangeSchema = projectSchema.extend({
118
131
  changed: z.boolean().describe("Whether the project's fields changed."),
119
132
  });
133
+ export const projectListEntrySchema = projectSchema.extend({
134
+ taskCounts: z.strictObject({
135
+ active: count.describe("Unarchived tasks in any column."),
136
+ archived: count.describe("Archived tasks."),
137
+ }),
138
+ });
120
139
  export const columnSchema = z.strictObject({
121
140
  id: z.string().describe("Stored column ID."),
122
141
  project: z.string(),
123
142
  project_id: z.string().describe("Owning project ID."),
124
143
  name: z.string(),
144
+ is_first: z.boolean().describe("Whether this column is the first column of its board."),
145
+ is_last: z.boolean().describe("Whether this column is the last column of its board."),
125
146
  });
126
147
  export const columnChangeSchema = columnSchema.extend({
127
148
  changed: z.boolean().describe("Whether the column's name or position changed."),
@@ -129,6 +150,8 @@ export const columnChangeSchema = columnSchema.extend({
129
150
  export const columnTaskCountSchema = z.strictObject({
130
151
  id: columnSchema.shape.id,
131
152
  name: z.string(),
153
+ is_first: columnSchema.shape.is_first,
154
+ is_last: columnSchema.shape.is_last,
132
155
  taskCount: count,
133
156
  });
134
157
  export const projectViewSchema = projectSchema.extend({
@@ -146,6 +169,33 @@ export const labelSchema = z.strictObject({
146
169
  export const labelChangeSchema = labelSchema.extend({
147
170
  changed: z.boolean().describe("Whether the label's fields changed."),
148
171
  });
172
+ const blameTaskIdentity = taskSchema.pick({ id: true, key: true });
173
+ function blamedValue(value) {
174
+ return z.strictObject({ value, attribution: taskAttributionSchema.nullable() });
175
+ }
176
+ export const taskBlameSchema = z.strictObject({
177
+ task: blameTaskIdentity,
178
+ fields: z.strictObject({
179
+ title: blamedValue(z.string()),
180
+ column: blamedValue(columnSchema.pick({ id: true, name: true })),
181
+ priority: blamedValue(taskSchema.shape.priority),
182
+ due_at: blamedValue(taskSchema.shape.due_at),
183
+ labels: blamedValue(z.array(labelSchema.pick({ id: true, name: true }))),
184
+ parent: blamedValue(blameTaskIdentity.nullable()),
185
+ }),
186
+ relations: z.array(z.strictObject({
187
+ id: relationSchema.shape.id,
188
+ type: relationSchema.shape.type,
189
+ direction: relationSchema.shape.direction,
190
+ task: blameTaskIdentity,
191
+ attribution: taskAttributionSchema.nullable(),
192
+ })),
193
+ description: z.array(z.strictObject({
194
+ line: z.number().int().positive(),
195
+ text: z.string(),
196
+ attribution: taskAttributionSchema.nullable(),
197
+ })),
198
+ });
149
199
  export const commentChangeSchema = commentSchema.extend({
150
200
  changed: z.boolean().describe("Whether the comment's text changed."),
151
201
  });
@@ -179,6 +229,17 @@ export const infoSchema = z.strictObject({
179
229
  settingsPath: nullableText,
180
230
  error: nullableText,
181
231
  }),
232
+ telemetry: z.strictObject({
233
+ mode: telemetryModeSchema.nullable(),
234
+ source: telemetrySourceSchema.nullable(),
235
+ settingsPath: nullableText,
236
+ maxMegabytes: z.number().int().positive().nullable(),
237
+ maxAgeDays: z.number().int().positive().nullable(),
238
+ directory: nullableText,
239
+ exists: z.boolean().nullable(),
240
+ sizeBytes: count.nullable(),
241
+ error: nullableText,
242
+ }),
182
243
  database: z.strictObject({
183
244
  path: nullableText,
184
245
  state: infoDatabaseStateSchema,
@@ -211,6 +272,7 @@ export const resultSchemas = {
211
272
  Task: taskSchema,
212
273
  TaskList: z.array(taskSchema),
213
274
  TaskDetail: taskDetailSchema,
275
+ TaskBlame: taskBlameSchema,
214
276
  TaskDetailHistory: taskDetailHistorySchema,
215
277
  TaskChange: taskChangeSchema,
216
278
  TaskChanges: z.array(taskChangeSchema).min(2),
@@ -222,7 +284,7 @@ export const resultSchemas = {
222
284
  CommentList: z.array(commentSchema),
223
285
  Project: projectSchema,
224
286
  ProjectChange: projectChangeSchema,
225
- ProjectList: z.array(projectSchema),
287
+ ProjectList: z.array(projectListEntrySchema),
226
288
  ProjectView: projectViewSchema,
227
289
  Column: columnSchema,
228
290
  ColumnChange: columnChangeSchema,
@@ -57,12 +57,63 @@ export declare const activityRouter: {
57
57
  readonly name: "id";
58
58
  };
59
59
  };
60
+ readonly client: {
61
+ readonly type: "string";
62
+ readonly value: {
63
+ readonly kind: "text";
64
+ readonly name: "name";
65
+ readonly description: "Match a client name or its colon-separated parts, including case.";
66
+ };
67
+ };
68
+ readonly since: {
69
+ readonly type: "string";
70
+ readonly value: {
71
+ readonly kind: "timestamp";
72
+ readonly name: "time";
73
+ readonly description: "Inclusive lower bound. Integer epoch milliseconds or YYYY-MM-DDTHH:mm:ss with Z or a numeric offset. Optional fractional seconds have 1 to 3 digits.";
74
+ };
75
+ };
76
+ readonly until: {
77
+ readonly type: "string";
78
+ readonly value: {
79
+ readonly kind: "timestamp";
80
+ readonly name: "time";
81
+ readonly description: "Inclusive upper bound in the same formats as --since. Must be at or after --since.";
82
+ };
83
+ };
84
+ readonly action: {
85
+ readonly type: "string";
86
+ readonly multiple: true;
87
+ readonly value: {
88
+ readonly kind: "activity-action";
89
+ readonly name: "action";
90
+ readonly choices: ("create" | "delete" | "archive" | "edit" | "move" | "order" | "unarchive" | "relation_create" | "relation_delete" | "comment_create" | "comment_edit" | "comment_delete")[];
91
+ };
92
+ };
93
+ readonly changed: {
94
+ readonly type: "string";
95
+ readonly multiple: true;
96
+ readonly value: {
97
+ readonly kind: "activity-change";
98
+ readonly name: "field[=value]";
99
+ readonly pattern: `^((${string})|(${string})=.+)$`;
100
+ readonly description: `Fields: ${string}. Omit the value to match any change. Values apply to column, priority and added labels, ignoring case. priority=none matches an unassigned priority.`;
101
+ };
102
+ };
60
103
  readonly limit: {
61
104
  readonly type: "string";
62
105
  readonly value: {
63
106
  readonly kind: "positive-integer";
64
107
  readonly name: "n";
65
- readonly pattern: "^[1-9]\\d{0,14}\\d?$";
108
+ readonly pattern: string;
109
+ };
110
+ readonly description: "Return at most n results after all filters.";
111
+ };
112
+ readonly "starting-after": {
113
+ readonly type: "string";
114
+ readonly value: {
115
+ readonly kind: "activity-id";
116
+ readonly name: "id";
66
117
  };
67
118
  };
68
119
  };
@@ -78,6 +129,7 @@ export declare const activityRouter: {
78
129
  readonly input: "option:show-deleted";
79
130
  readonly members: readonly ["option:project", "option:task"];
80
131
  }];
132
+ readonly notes: readonly ["Repeated --action flags match any listed action. Repeated --changed filters for one field match any of them. Different fields must match the same event. All other filters must also match, before --limit applies."];
81
133
  };
82
134
  results: import("../results.js").CommandResult[];
83
135
  run: (args: string[]) => void;
@@ -1,10 +1,14 @@
1
+ import { listLimitOption, listLimitDescription, parseListLimit } from "../list-limit.js";
1
2
  import { jsonResult } from "../results.js";
2
3
  import { parseArgs } from "node:util";
3
- import { activity, activityLimitMessage, CoreError, positiveIntegerPattern } from "@zinn-dev/core";
4
+ import { activity, activityActionSchema, activityChangedFieldSchema, activityChangedSchema, CoreError, } from "@zinn-dev/core";
4
5
  import { generateCommandUsage, getOptionInputs, violatesConstraint } from "../input.js";
5
6
  import { CliError } from "../errors.js";
6
- import { output, quit, validatePositionals, validateUniqueOptions } from "../lib.js";
7
+ import { parseTimestampInput } from "../timestamp-input.js";
8
+ import { formatListContinuation } from "../list-continuation.js";
9
+ import { diagnostic, output, quit, validatePositionals, validateUniqueOptions } from "../lib.js";
7
10
  import { formatActivityList, presentActivities } from "../presentation/activity-presentation.js";
11
+ const changedFieldList = activityChangedFieldSchema.options.join(", ");
8
12
  const activityInputs = {
9
13
  list: {
10
14
  options: {
@@ -29,10 +33,47 @@ const activityInputs = {
29
33
  "show-deleted": { type: "boolean" },
30
34
  session: { type: "string", value: { kind: "text", name: "id" } },
31
35
  thread: { type: "string", value: { kind: "text", name: "id" } },
32
- limit: {
36
+ client: {
33
37
  type: "string",
34
- value: { kind: "positive-integer", name: "n", pattern: `^${positiveIntegerPattern}\\d?$` },
38
+ value: {
39
+ kind: "text",
40
+ name: "name",
41
+ description: "Match a client name or its colon-separated parts, including case.",
42
+ },
43
+ },
44
+ since: {
45
+ type: "string",
46
+ value: {
47
+ kind: "timestamp",
48
+ name: "time",
49
+ description: "Inclusive lower bound. Integer epoch milliseconds or YYYY-MM-DDTHH:mm:ss with Z or a numeric offset. Optional fractional seconds have 1 to 3 digits.",
50
+ },
51
+ },
52
+ until: {
53
+ type: "string",
54
+ value: {
55
+ kind: "timestamp",
56
+ name: "time",
57
+ description: "Inclusive upper bound in the same formats as --since. Must be at or after --since.",
58
+ },
59
+ },
60
+ action: {
61
+ type: "string",
62
+ multiple: true,
63
+ value: { kind: "activity-action", name: "action", choices: activityActionSchema.options },
64
+ },
65
+ changed: {
66
+ type: "string",
67
+ multiple: true,
68
+ value: {
69
+ kind: "activity-change",
70
+ name: "field[=value]",
71
+ pattern: `^((${activityChangedFieldSchema.options.join("|")})|(${activityChangedFieldSchema.exclude(["title", "description"]).options.join("|")})=.+)$`,
72
+ description: `Fields: ${changedFieldList}. Omit the value to match any change. Values apply to column, priority and added labels, ignoring case. priority=none matches an unassigned priority.`,
73
+ },
35
74
  },
75
+ limit: listLimitOption,
76
+ "starting-after": { type: "string", value: { kind: "activity-id", name: "id" } },
36
77
  },
37
78
  forms: [{ id: "default", positionals: [] }],
38
79
  constraints: [
@@ -46,6 +87,9 @@ const activityInputs = {
46
87
  members: ["option:project", "option:task"],
47
88
  },
48
89
  ],
90
+ notes: [
91
+ "Repeated --action flags match any listed action. Repeated --changed filters for one field match any of them. Different fields must match the same event. All other filters must also match, before --limit applies.",
92
+ ],
49
93
  },
50
94
  view: {
51
95
  options: {},
@@ -88,14 +132,10 @@ export const activityRouter = {
88
132
  argument: "--show-deleted",
89
133
  });
90
134
  }
91
- // Safe integers can have one more digit than readable task numbers.
92
- const limitPattern = new RegExp(activityInputs.list.options.limit.value.pattern);
93
- if (values.limit !== undefined && !limitPattern.test(values.limit)) {
94
- quit(activityLimitMessage, undefined, { argument: "--limit" });
95
- }
96
- let events;
135
+ const limit = parseListLimit(values.limit);
136
+ let page;
97
137
  try {
98
- events = activity.getAll({
138
+ page = activity.getAll({
99
139
  projectKey: values.project,
100
140
  projectId: values["project-id"],
101
141
  taskKey: values.task,
@@ -103,10 +143,33 @@ export const activityRouter = {
103
143
  showDeleted: values["show-deleted"],
104
144
  sessionId: values.session,
105
145
  threadId: values.thread,
106
- limit: values.limit === undefined ? undefined : Number(values.limit),
146
+ client: values.client,
147
+ actions: values.action?.map((action) => {
148
+ const parsed = activityActionSchema.safeParse(action);
149
+ if (!parsed.success) {
150
+ quit(`Unknown action "${action}". Use ${activityActionSchema.options.join(", ")}`, undefined, {
151
+ argument: "--action",
152
+ });
153
+ }
154
+ return parsed.data;
155
+ }),
156
+ changed: values.changed?.map(parseChangedFilter),
157
+ since: parseTimestampInput(values.since, "--since"),
158
+ until: parseTimestampInput(values.until, "--until"),
159
+ limit,
160
+ startingAfter: values["starting-after"],
107
161
  });
108
162
  }
109
163
  catch (error) {
164
+ const isInvalidUpperBound = error instanceof CoreError &&
165
+ error.kind === "input" &&
166
+ error.facts.field?.[0] === "until";
167
+ if (isInvalidUpperBound) {
168
+ throw new CliError(error.message, "invalid_input", {
169
+ argument: "--until",
170
+ field: error.facts.field,
171
+ });
172
+ }
110
173
  const isMissingCurrentSelection = (values.task !== undefined || values.project !== undefined) &&
111
174
  values["show-deleted"] !== true &&
112
175
  error instanceof CoreError &&
@@ -123,13 +186,16 @@ export const activityRouter = {
123
186
  }
124
187
  throw error;
125
188
  }
126
- output(events, (items) => formatActivityList(presentActivities(items, {
189
+ output(page.events, (items) => formatActivityList(presentActivities(items, {
127
190
  projectKey: values.project,
128
191
  projectId: values["project-id"],
129
192
  showDeleted: values["show-deleted"],
130
193
  taskKey: values.task,
131
194
  taskId: values["task-id"],
132
195
  })));
196
+ if (page.nextCursor !== undefined) {
197
+ diagnostic(`More activity. Continue with: ${formatListContinuation(["activity", "list"], [], tokens, "starting-after", page.nextCursor)}`);
198
+ }
133
199
  },
134
200
  help: `${generateCommandUsage("activity list", activityInputs.list)}
135
201
 
@@ -145,11 +211,35 @@ Returns all matching events unless --limit is supplied.
145
211
  Requires a full UUID.
146
212
  --session <id> Match an exact session ID, including case.
147
213
  --thread <id> Match an exact thread ID, including case.
148
- --limit <n> Return at most n matching events.
214
+ --client <name> Match a client name or its colon-separated parts, including case.
215
+ zinn-opencode matches zinn-opencode and zinn-opencode:panel.
216
+ Versions are ignored. Names are taken from whitespace-separated tokens.
217
+ --since <time> Include events at or after this time.
218
+ --until <time> Include events at or before this time.
219
+ --action <action> Match a recorded action. Repeat to match any listed action.
220
+ --changed <field>[=<value>] Match a task field change, with an optional value.
221
+ Fields: ${changedFieldList}.
222
+ Values apply to column, priority and added labels, ignoring case.
223
+ Without a value, labels match additions and removals.
224
+ Title and description match any change, without a value.
225
+ Use priority=none for an unassigned priority.
226
+ --limit <n> ${listLimitDescription}
227
+ --starting-after <id> Continue with older events after this activity ID.
228
+
229
+ Continuation accepts the same IDs as activity view. The cursor event need not
230
+ match the filters. Omit --limit to return every remaining match.
231
+ When more matches exist, stderr gives the command to continue, including with --json.
149
232
 
150
233
  Use one of --project, --project-id, --task or --task-id.
151
234
  --show-deleted requires --project or --task.
152
- All supplied filters must match.
235
+ Repeated --action flags match any listed action.
236
+ Repeated --changed filters for one field match any of them.
237
+ Different fields must match the same event. All other filters must also match.
238
+ Initial task values also match. Column and label names match as recorded.
239
+
240
+ Times accept integer epoch milliseconds or YYYY-MM-DDTHH:mm:ss with Z or a
241
+ numeric offset such as +01:00. Optional fractional seconds have 1 to 3 digits.
242
+ Both bounds are inclusive. --until must be at or after --since.
153
243
 
154
244
  Use activity view <activity-id> for complete recorded changes.
155
245
  With --json, return an array of full activity records.
@@ -157,6 +247,12 @@ With --json, return an array of full activity records.
157
247
  Examples:
158
248
  zinn activity list --limit 10
159
249
  zinn activity list --project APP
250
+ zinn activity list --client zinn-opencode:panel
251
+ zinn activity list --since 2026-10-25T00:00:00Z --until 2026-10-25T12:00:00Z
252
+ zinn activity list --action comment_create --action comment_edit
253
+ zinn activity list --action edit --changed description
254
+ zinn activity list --changed column=Review
255
+ zinn activity list --changed priority=high --changed labels=bug
160
256
  zinn activity list --task APP-2
161
257
  zinn activity list --task APP-2 --show-deleted`,
162
258
  },
@@ -190,3 +286,18 @@ With --json, return one full activity record.
190
286
  Example: zinn activity view 019abcdf-1234-7`,
191
287
  },
192
288
  };
289
+ function parseChangedFilter(input) {
290
+ const separator = input.indexOf("=");
291
+ const field = separator === -1 ? input : input.slice(0, separator);
292
+ const value = input.slice(separator + 1);
293
+ const filter = activityChangedSchema.safeParse(separator === -1
294
+ ? { field }
295
+ : {
296
+ field,
297
+ value: field === "priority" && value.toLowerCase() === "none" ? null : value,
298
+ });
299
+ if (!filter.success) {
300
+ quit(filter.error.issues[0].message, undefined, { argument: "--changed" });
301
+ }
302
+ return filter.data;
303
+ }
@@ -5,7 +5,7 @@ import { generateCommandUsage, noInput } from "../input.js";
5
5
  import { output, validatePositionals } from "../lib.js";
6
6
  import { formatInfo, presentInfo } from "../presentation/info-presentation.js";
7
7
  export const infoCommand = {
8
- summary: "Show the selected store, settings sources, database schema state and CLI, core and runtime versions.",
8
+ summary: "Show the selected store, settings sources, telemetry state, database schema state and CLI, core and runtime versions.",
9
9
  effects: { domain: "none", storage: "inspect" },
10
10
  confirmation: { kind: "none" },
11
11
  input: noInput,
@@ -22,8 +22,9 @@ export const infoCommand = {
22
22
  },
23
23
  help: `${generateCommandUsage("info", noInput)}
24
24
 
25
- Show the selected store, settings sources, database schema state and CLI, core and runtime versions.
25
+ Show the selected store, settings sources, telemetry state, database schema state and CLI, core and runtime versions.
26
26
 
27
27
  Reports unusable settings and database errors and exits successfully.
28
+ Telemetry is local (collected on this machine, never sent) or off. A telemetry.mode in a settings file overrides DO_NOT_TRACK=1 (https://donottrack.sh/). The telemetry folder is reported but never created.
28
29
  SQLite may perform its normal file housekeeping when this command is triggered.`,
29
30
  };
@@ -1,6 +1,6 @@
1
1
  import { jsonResult } from "../results.js";
2
2
  import { parseArgs } from "node:util";
3
- import { migrate, MigrationRefusedError, getStorage } from "@zinn-dev/core";
3
+ import { migrate, MigrationRefusedError, getBackupStorage } from "@zinn-dev/core";
4
4
  import { generateCommandUsage, noInput } from "../input.js";
5
5
  import { reportLockWait } from "../database.js";
6
6
  import { diagnostic, output, validatePositionals } from "../lib.js";
@@ -20,7 +20,7 @@ export const migrateCommand = {
20
20
  });
21
21
  validatePositionals(positionals, noInput.forms[0]);
22
22
  // Resolved before the try, so a store that cannot be resolved fails without the note about backups.
23
- const { backupDirectory } = getStorage();
23
+ const { backupDirectory } = getBackupStorage();
24
24
  try {
25
25
  const result = migrate.run({
26
26
  client: "cli",
@@ -365,7 +365,7 @@ export declare const projectRouter: {
365
365
  readonly max: 1;
366
366
  readonly value: {
367
367
  readonly kind: "enum";
368
- readonly choices: ("first" | "previous" | "next" | "last")[];
368
+ readonly choices: ("next" | "first" | "previous" | "last")[];
369
369
  };
370
370
  }];
371
371
  }, {
@@ -407,5 +407,45 @@ export declare const projectRouter: {
407
407
  run: (args: Array<string>) => void;
408
408
  help: string;
409
409
  };
410
+ delete: {
411
+ summary: string;
412
+ effects: {
413
+ domain: "delete";
414
+ storage: "normal-open";
415
+ };
416
+ confirmation: {
417
+ kind: "prompt";
418
+ description: string;
419
+ };
420
+ input: {
421
+ readonly options: {
422
+ readonly yes: {
423
+ readonly type: "boolean";
424
+ };
425
+ };
426
+ readonly forms: readonly [{
427
+ readonly id: "default";
428
+ readonly positionals: readonly [{
429
+ readonly name: "project-key";
430
+ readonly min: 1;
431
+ readonly max: 1;
432
+ readonly value: {
433
+ readonly kind: "project-key";
434
+ };
435
+ }, {
436
+ readonly name: "column-name";
437
+ readonly min: 1;
438
+ readonly max: 1;
439
+ readonly value: {
440
+ readonly kind: "column-name";
441
+ };
442
+ }];
443
+ }];
444
+ readonly constraints: readonly [];
445
+ };
446
+ results: import("../results.js").CommandResult[];
447
+ run: (args: string[]) => Promise<void>;
448
+ help: string;
449
+ };
410
450
  };
411
451
  };