@zinn-dev/cli 0.39.0 → 0.41.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 (113) hide show
  1. package/README.md +171 -40
  2. package/index.d.ts +2 -0
  3. package/index.js +34 -0
  4. package/package.json +27 -18
  5. package/skills/zinn/SKILL.md +63 -0
  6. package/src/actor.d.ts +7 -0
  7. package/src/actor.js +129 -0
  8. package/src/capabilities-schema.d.ts +163 -0
  9. package/src/capabilities-schema.js +124 -0
  10. package/src/capabilities.d.ts +21 -0
  11. package/src/capabilities.js +22 -0
  12. package/src/database.d.ts +6 -0
  13. package/src/database.js +27 -0
  14. package/src/errors.d.ts +158 -0
  15. package/src/errors.js +224 -0
  16. package/src/input.d.ts +116 -0
  17. package/src/input.js +119 -0
  18. package/src/lib.d.ts +66 -0
  19. package/src/lib.js +333 -0
  20. package/src/presentation/activity-presentation.d.ts +23 -0
  21. package/src/presentation/activity-presentation.js +403 -0
  22. package/src/presentation/color.d.ts +9 -0
  23. package/src/presentation/color.js +21 -0
  24. package/src/presentation/column-presentation.d.ts +14 -0
  25. package/src/presentation/column-presentation.js +29 -0
  26. package/src/presentation/description-presentation.d.ts +3 -0
  27. package/src/presentation/description-presentation.js +11 -0
  28. package/src/presentation/info-presentation.d.ts +4 -0
  29. package/src/presentation/info-presentation.js +96 -0
  30. package/src/presentation/row-layout.d.ts +22 -0
  31. package/src/presentation/row-layout.js +58 -0
  32. package/src/presentation/section.d.ts +4 -0
  33. package/src/presentation/section.js +9 -0
  34. package/src/presentation/task-presentation.d.ts +9 -0
  35. package/src/presentation/task-presentation.js +62 -0
  36. package/src/presentation/time.d.ts +1 -0
  37. package/src/presentation/time.js +13 -0
  38. package/src/project.d.ts +12 -0
  39. package/src/project.js +44 -0
  40. package/src/release-identity.d.ts +2 -0
  41. package/src/release-identity.js +1 -0
  42. package/src/result-schemas.d.ts +987 -0
  43. package/src/result-schemas.js +220 -0
  44. package/src/results.d.ts +23 -0
  45. package/src/results.js +17 -0
  46. package/src/routes/activity-router.d.ts +81 -0
  47. package/src/routes/activity-router.js +119 -0
  48. package/src/routes/backup-router.d.ts +21 -0
  49. package/src/routes/backup-router.js +30 -0
  50. package/src/routes/capabilities-router.d.ts +21 -0
  51. package/src/routes/capabilities-router.js +28 -0
  52. package/src/routes/comment-router.d.ts +203 -0
  53. package/src/routes/comment-router.js +241 -0
  54. package/src/routes/info-router.d.ts +21 -0
  55. package/src/routes/info-router.js +29 -0
  56. package/src/routes/label-router.d.ts +183 -0
  57. package/src/routes/label-router.js +218 -0
  58. package/src/routes/migrate-router.d.ts +21 -0
  59. package/src/routes/migrate-router.js +49 -0
  60. package/src/routes/project-router.d.ts +389 -0
  61. package/src/routes/project-router.js +514 -0
  62. package/src/routes/reindex-router.d.ts +21 -0
  63. package/src/routes/reindex-router.js +33 -0
  64. package/src/routes/relation-router.d.ts +124 -0
  65. package/src/routes/relation-router.js +223 -0
  66. package/src/routes/restore-router.d.ts +33 -0
  67. package/src/routes/restore-router.js +88 -0
  68. package/src/routes/router.d.ts +6 -0
  69. package/src/routes/router.js +204 -0
  70. package/src/routes/routes.d.ts +1735 -0
  71. package/src/routes/routes.js +23 -0
  72. package/src/routes/task-router.d.ts +945 -0
  73. package/src/routes/task-router.js +789 -0
  74. package/src/text-edit.d.ts +43 -0
  75. package/src/text-edit.js +57 -0
  76. package/src/types.d.ts +24 -0
  77. package/src/types.js +1 -0
  78. package/index.ts +0 -26
  79. package/release-stamp.json +0 -1
  80. package/src/actor.test.ts +0 -41
  81. package/src/actor.ts +0 -78
  82. package/src/database.test.ts +0 -70
  83. package/src/database.ts +0 -41
  84. package/src/lib.test.ts +0 -86
  85. package/src/lib.ts +0 -159
  86. package/src/presentation/activity-presentation.test.ts +0 -112
  87. package/src/presentation/activity-presentation.ts +0 -490
  88. package/src/presentation/color.ts +0 -29
  89. package/src/presentation/column-presentation.ts +0 -48
  90. package/src/presentation/description-presentation.ts +0 -18
  91. package/src/presentation/row-layout.ts +0 -77
  92. package/src/presentation/section.ts +0 -16
  93. package/src/presentation/task-presentation.ts +0 -92
  94. package/src/presentation/time.ts +0 -17
  95. package/src/project.test.ts +0 -479
  96. package/src/project.ts +0 -53
  97. package/src/routes/activity-router.ts +0 -81
  98. package/src/routes/backup-router.ts +0 -24
  99. package/src/routes/comment-router.ts +0 -171
  100. package/src/routes/label-router.ts +0 -168
  101. package/src/routes/migrate-router.test.ts +0 -31
  102. package/src/routes/migrate-router.ts +0 -48
  103. package/src/routes/project-router.ts +0 -415
  104. package/src/routes/reindex-router.ts +0 -27
  105. package/src/routes/relation-router.ts +0 -194
  106. package/src/routes/restore-router.test.ts +0 -44
  107. package/src/routes/restore-router.ts +0 -90
  108. package/src/routes/router.test.ts +0 -136
  109. package/src/routes/router.ts +0 -248
  110. package/src/routes/routes.ts +0 -20
  111. package/src/routes/task-router.ts +0 -649
  112. package/src/text-edit.ts +0 -68
  113. package/src/types.ts +0 -6
@@ -0,0 +1,203 @@
1
+ import type { PresentedComment } from "../result-schemas.js";
2
+ export declare function presentComments(taskKey: string): {
3
+ key: string;
4
+ text: string;
5
+ created_at: number;
6
+ updated_at: number;
7
+ }[];
8
+ export declare function formatComment(commentMatch: PresentedComment): string;
9
+ export declare function formatComments(comments: Array<PresentedComment>): string;
10
+ export declare const commentRouter: {
11
+ create: {
12
+ summary: string;
13
+ effects: {
14
+ domain: "create";
15
+ storage: "normal-open";
16
+ };
17
+ confirmation: {
18
+ kind: "none";
19
+ };
20
+ input: {
21
+ readonly options: {
22
+ readonly text: {
23
+ readonly type: "string";
24
+ readonly required: true;
25
+ readonly value: {
26
+ readonly kind: "text";
27
+ readonly name: "text";
28
+ };
29
+ };
30
+ };
31
+ readonly forms: readonly [{
32
+ readonly id: "default";
33
+ readonly positionals: readonly [{
34
+ readonly name: "task-key";
35
+ readonly min: 1;
36
+ readonly max: 1;
37
+ readonly value: {
38
+ readonly kind: "task-key";
39
+ };
40
+ }];
41
+ }];
42
+ readonly constraints: readonly [];
43
+ };
44
+ results: import("../results.js").CommandResult[];
45
+ run: (args: string[]) => void;
46
+ help: string;
47
+ };
48
+ list: {
49
+ summary: string;
50
+ effects: {
51
+ domain: "read";
52
+ storage: "normal-open";
53
+ };
54
+ confirmation: {
55
+ kind: "none";
56
+ };
57
+ input: {
58
+ readonly options: {};
59
+ readonly forms: readonly [{
60
+ readonly id: "default";
61
+ readonly positionals: readonly [{
62
+ readonly name: "task-key";
63
+ readonly min: 1;
64
+ readonly max: 1;
65
+ readonly value: {
66
+ readonly kind: "task-key";
67
+ };
68
+ }];
69
+ }];
70
+ readonly constraints: readonly [];
71
+ };
72
+ results: import("../results.js").CommandResult[];
73
+ run: (args: string[]) => void;
74
+ help: string;
75
+ };
76
+ view: {
77
+ summary: string;
78
+ effects: {
79
+ domain: "read";
80
+ storage: "normal-open";
81
+ };
82
+ confirmation: {
83
+ kind: "none";
84
+ };
85
+ input: {
86
+ readonly options: {};
87
+ readonly forms: readonly [{
88
+ readonly id: "default";
89
+ readonly positionals: readonly [{
90
+ readonly name: "comment-key";
91
+ readonly min: 1;
92
+ readonly max: 1;
93
+ readonly value: {
94
+ readonly kind: "comment-key";
95
+ };
96
+ }];
97
+ }];
98
+ readonly constraints: readonly [];
99
+ };
100
+ results: import("../results.js").CommandResult[];
101
+ run: (args: string[]) => void;
102
+ help: string;
103
+ };
104
+ edit: {
105
+ summary: string;
106
+ effects: {
107
+ domain: "update";
108
+ storage: "normal-open";
109
+ };
110
+ confirmation: {
111
+ kind: "none";
112
+ };
113
+ input: {
114
+ readonly options: {
115
+ readonly append: {
116
+ readonly type: "boolean";
117
+ };
118
+ readonly replacing: {
119
+ readonly type: "string";
120
+ readonly value: {
121
+ readonly kind: "text";
122
+ readonly name: "old";
123
+ };
124
+ };
125
+ readonly all: {
126
+ readonly type: "boolean";
127
+ };
128
+ readonly text: {
129
+ readonly type: "string";
130
+ readonly required: true;
131
+ readonly value: {
132
+ readonly kind: "text";
133
+ readonly name: "text";
134
+ };
135
+ };
136
+ };
137
+ readonly forms: readonly [{
138
+ readonly id: "default";
139
+ readonly positionals: readonly [{
140
+ readonly name: "comment-key";
141
+ readonly min: 1;
142
+ readonly max: 1;
143
+ readonly value: {
144
+ readonly kind: "comment-key";
145
+ };
146
+ }];
147
+ }];
148
+ readonly constraints: readonly [{
149
+ readonly kind: "exclusive";
150
+ readonly members: readonly ["option:append", "option:replacing"];
151
+ }, {
152
+ readonly kind: "requires";
153
+ readonly input: "option:append";
154
+ readonly requires: `option:${string}`;
155
+ }, {
156
+ readonly kind: "requires";
157
+ readonly input: "option:replacing";
158
+ readonly requires: `option:${string}`;
159
+ }, {
160
+ readonly kind: "requires";
161
+ readonly input: "option:all";
162
+ readonly requires: "option:replacing";
163
+ }];
164
+ readonly notes: readonly [string];
165
+ };
166
+ results: import("../results.js").CommandResult[];
167
+ run: (args: string[]) => void;
168
+ help: string;
169
+ };
170
+ delete: {
171
+ summary: string;
172
+ effects: {
173
+ domain: "delete";
174
+ storage: "normal-open";
175
+ };
176
+ confirmation: {
177
+ kind: "prompt";
178
+ description: string;
179
+ };
180
+ input: {
181
+ readonly options: {
182
+ readonly yes: {
183
+ readonly type: "boolean";
184
+ };
185
+ };
186
+ readonly forms: readonly [{
187
+ readonly id: "default";
188
+ readonly positionals: readonly [{
189
+ readonly name: "comment-key";
190
+ readonly min: 1;
191
+ readonly max: 1;
192
+ readonly value: {
193
+ readonly kind: "comment-key";
194
+ };
195
+ }];
196
+ }];
197
+ readonly constraints: readonly [];
198
+ };
199
+ results: import("../results.js").CommandResult[];
200
+ run: (args: string[]) => Promise<void>;
201
+ help: string;
202
+ };
203
+ };
@@ -0,0 +1,241 @@
1
+ import { jsonResult } from "../results.js";
2
+ import { parseArgs } from "node:util";
3
+ import { comment } from "@zinn-dev/core";
4
+ import { generateCommandUsage, taskKeyPositional } from "../input.js";
5
+ import { confirmationDescription, confirmAction, dashValueHelp, output, validatePositionals, requireStringOption, validateUniqueOptions, } from "../lib.js";
6
+ import { resolveTextEdit, textEditHelp, textEditOptions, textEditConstraints, } from "../text-edit.js";
7
+ import { currentActor } from "../actor.js";
8
+ import { formatRows } from "../presentation/row-layout.js";
9
+ import { formatLocalTime } from "../presentation/time.js";
10
+ function presentComment(commentMatch) {
11
+ return {
12
+ key: commentMatch.key,
13
+ text: commentMatch.text,
14
+ created_at: commentMatch.created_at,
15
+ updated_at: commentMatch.updated_at,
16
+ };
17
+ }
18
+ export function presentComments(taskKey) {
19
+ return comment.getAll(taskKey).map(presentComment);
20
+ }
21
+ function commentRow(commentMatch, options) {
22
+ const createdAtCells = options.showsCreatedAt
23
+ ? [{ text: formatLocalTime(commentMatch.created_at), style: "dim" }]
24
+ : [];
25
+ return [{ text: commentMatch.key }, ...createdAtCells, { text: commentMatch.text }];
26
+ }
27
+ export function formatComment(commentMatch) {
28
+ return formatRows([commentRow(commentMatch, { showsCreatedAt: false })], {
29
+ indentsContinuationLines: true,
30
+ });
31
+ }
32
+ export function formatComments(comments) {
33
+ return formatRows(comments.map((commentMatch) => commentRow(commentMatch, { showsCreatedAt: true })), { indentsContinuationLines: true });
34
+ }
35
+ function parseTextArgs(args) {
36
+ const { values, positionals, tokens } = parseArgs({
37
+ args,
38
+ options: commentInputs.create.options,
39
+ allowPositionals: true,
40
+ strict: true,
41
+ tokens: true,
42
+ });
43
+ validateUniqueOptions(tokens, commentInputs.create.options);
44
+ validatePositionals(positionals, commentInputs.create.forms[0]);
45
+ const text = requireStringOption(commentInputs.create.options.text, values.text, "text", "Comment text must be specified with --text");
46
+ return { key: positionals[0], text };
47
+ }
48
+ function parseCommentEditArgs(args) {
49
+ const { values, positionals, tokens } = parseArgs({
50
+ args,
51
+ options: commentInputs.edit.options,
52
+ allowPositionals: true,
53
+ strict: true,
54
+ tokens: true,
55
+ });
56
+ validateUniqueOptions(tokens, commentInputs.edit.options);
57
+ validatePositionals(positionals, commentInputs.edit.forms[0]);
58
+ const text = resolveTextEdit(values.text, values, "--text");
59
+ requireStringOption(commentInputs.edit.options.text, values.text, "text", "Comment text must be specified with --text");
60
+ return { key: positionals[0], text: text };
61
+ }
62
+ const commentInputs = {
63
+ create: {
64
+ options: { text: { type: "string", required: true, value: { kind: "text", name: "text" } } },
65
+ forms: [
66
+ {
67
+ id: "default",
68
+ positionals: [taskKeyPositional],
69
+ },
70
+ ],
71
+ constraints: [],
72
+ },
73
+ list: {
74
+ options: {},
75
+ forms: [
76
+ {
77
+ id: "default",
78
+ positionals: [taskKeyPositional],
79
+ },
80
+ ],
81
+ constraints: [],
82
+ },
83
+ view: {
84
+ options: {},
85
+ forms: [
86
+ {
87
+ id: "default",
88
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
89
+ },
90
+ ],
91
+ constraints: [],
92
+ },
93
+ edit: {
94
+ options: {
95
+ text: { type: "string", required: true, value: { kind: "text", name: "text" } },
96
+ ...textEditOptions,
97
+ },
98
+ forms: [
99
+ {
100
+ id: "default",
101
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
102
+ },
103
+ ],
104
+ constraints: [...textEditConstraints("--text")],
105
+ notes: [textEditHelp("--text")],
106
+ },
107
+ delete: {
108
+ options: { yes: { type: "boolean" } },
109
+ forms: [
110
+ {
111
+ id: "default",
112
+ positionals: [{ name: "comment-key", min: 1, max: 1, value: { kind: "comment-key" } }],
113
+ },
114
+ ],
115
+ constraints: [],
116
+ },
117
+ };
118
+ export const commentRouter = {
119
+ create: {
120
+ summary: "Add a comment to a task. Comment text cannot be blank.",
121
+ effects: { domain: "create", storage: "normal-open" },
122
+ confirmation: { kind: "none" },
123
+ input: commentInputs.create,
124
+ results: [jsonResult("Comment")],
125
+ run: (args) => {
126
+ const props = parseTextArgs(args);
127
+ const created = comment.create({ taskKey: props.key, text: props.text }, currentActor());
128
+ output(presentComment(created), formatComment);
129
+ },
130
+ help: `${generateCommandUsage("task comment create", commentInputs.create)}
131
+
132
+ Add a comment to a task. Comment text cannot be blank.
133
+ Archived tasks can be commented on.
134
+
135
+ ${dashValueHelp("--text")}
136
+
137
+ Example: zinn task comment create MDR-1 --text 'Ready for review'`,
138
+ },
139
+ list: {
140
+ summary: "List a task's comments by oldest first.",
141
+ effects: { domain: "read", storage: "normal-open" },
142
+ confirmation: { kind: "none" },
143
+ input: commentInputs.list,
144
+ results: [jsonResult("CommentList")],
145
+ run: (args) => {
146
+ const { positionals } = parseArgs({
147
+ options: commentInputs.list.options,
148
+ args,
149
+ allowPositionals: true,
150
+ strict: true,
151
+ });
152
+ validatePositionals(positionals, commentInputs.list.forms[0]);
153
+ output(presentComments(positionals[0]), formatComments);
154
+ },
155
+ help: `${generateCommandUsage("task comment list", commentInputs.list)}
156
+
157
+ List a task's comments by oldest first.
158
+
159
+ Example: zinn task comment list MDR-1`,
160
+ },
161
+ view: {
162
+ summary: "Show a comment's current text in full, keeping its line breaks.",
163
+ effects: { domain: "read", storage: "normal-open" },
164
+ confirmation: { kind: "none" },
165
+ input: commentInputs.view,
166
+ results: [jsonResult("Comment")],
167
+ run: (args) => {
168
+ const { positionals } = parseArgs({
169
+ options: commentInputs.view.options,
170
+ args,
171
+ allowPositionals: true,
172
+ strict: true,
173
+ });
174
+ validatePositionals(positionals, commentInputs.view.forms[0]);
175
+ output(presentComment(comment.getByKey(positionals[0])), formatComment);
176
+ },
177
+ help: `${generateCommandUsage("task comment view", commentInputs.view)}
178
+
179
+ Show a comment's current text in full, keeping its line breaks.
180
+ Comments on archived tasks can be viewed.
181
+ With --json, return one object with key, text, created_at and updated_at.
182
+
183
+ Example: zinn task comment view 'MDR-1#1'`,
184
+ },
185
+ edit: {
186
+ summary: "Replace a comment's text. Comment text cannot be blank.",
187
+ effects: { domain: "update", storage: "normal-open" },
188
+ confirmation: { kind: "none" },
189
+ input: commentInputs.edit,
190
+ results: [jsonResult("Comment")],
191
+ run: (args) => {
192
+ const props = parseCommentEditArgs(args);
193
+ const edited = comment.edit({ commentKey: props.key, text: props.text }, currentActor());
194
+ output(presentComment(edited), formatComment);
195
+ },
196
+ help: `${generateCommandUsage("task comment edit", commentInputs.edit)}
197
+
198
+ Replace a comment's text. Comment text cannot be blank.
199
+
200
+ ${textEditHelp("--text")}
201
+
202
+ ${dashValueHelp("--text")}
203
+
204
+ Examples:
205
+ zinn task comment edit 'MDR-1#2' --text Approved
206
+ zinn task comment edit 'MDR-1#2' --text 'Also approved.' --append`,
207
+ },
208
+ delete: {
209
+ summary: "Permanently delete a comment after confirmation.",
210
+ effects: { domain: "delete", storage: "normal-open" },
211
+ confirmation: { kind: "prompt", description: confirmationDescription },
212
+ input: commentInputs.delete,
213
+ results: [jsonResult("Comment")],
214
+ run: async (args) => {
215
+ const { values, positionals, tokens } = parseArgs({
216
+ args,
217
+ options: commentInputs.delete.options,
218
+ allowPositionals: true,
219
+ strict: true,
220
+ tokens: true,
221
+ });
222
+ validateUniqueOptions(tokens, commentInputs.delete.options);
223
+ validatePositionals(positionals, commentInputs.delete.forms[0]);
224
+ const commentMatch = comment.getByKey(positionals[0]);
225
+ const canDelete = await confirmAction(`Are you sure you want to delete ${commentMatch.key}?`, values.yes === true);
226
+ const presented = presentComment(commentMatch);
227
+ if (!canDelete) {
228
+ output(presented, (entry) => `Deletion cancelled for ${entry.key}`);
229
+ return;
230
+ }
231
+ comment.delete({ commentKey: commentMatch.key }, currentActor());
232
+ output(presented, (entry) => `Deleted ${entry.key}`);
233
+ },
234
+ help: `${generateCommandUsage("task comment delete", commentInputs.delete)}
235
+
236
+ Permanently delete a comment after confirmation.
237
+ Use --yes to skip the confirmation prompt, for example in scripts or with --json.
238
+
239
+ Example: zinn task comment delete 'MDR-1#2'`,
240
+ },
241
+ };
@@ -0,0 +1,21 @@
1
+ export declare const infoCommand: {
2
+ summary: string;
3
+ effects: {
4
+ domain: "none";
5
+ storage: "inspect";
6
+ };
7
+ confirmation: {
8
+ kind: "none";
9
+ };
10
+ input: {
11
+ readonly options: {};
12
+ readonly forms: readonly [{
13
+ readonly id: "default";
14
+ readonly positionals: readonly [];
15
+ }];
16
+ readonly constraints: readonly [];
17
+ };
18
+ results: import("../results.js").CommandResult[];
19
+ run: (args: string[]) => void;
20
+ help: string;
21
+ };
@@ -0,0 +1,29 @@
1
+ import { jsonResult } from "../results.js";
2
+ import { parseArgs } from "node:util";
3
+ import { info } from "@zinn-dev/core";
4
+ import { generateCommandUsage, noInput } from "../input.js";
5
+ import { output, validatePositionals } from "../lib.js";
6
+ import { formatInfo, presentInfo } from "../presentation/info-presentation.js";
7
+ export const infoCommand = {
8
+ summary: "Show the selected store, settings sources, database schema state and CLI, core and runtime versions.",
9
+ effects: { domain: "none", storage: "inspect" },
10
+ confirmation: { kind: "none" },
11
+ input: noInput,
12
+ results: [jsonResult("Info")],
13
+ run: (args) => {
14
+ const { positionals } = parseArgs({
15
+ options: noInput.options,
16
+ args,
17
+ strict: true,
18
+ allowPositionals: true,
19
+ });
20
+ validatePositionals(positionals, noInput.forms[0]);
21
+ output(presentInfo(info.get()), formatInfo);
22
+ },
23
+ help: `${generateCommandUsage("info", noInput)}
24
+
25
+ Show the selected store, settings sources, database schema state and CLI, core and runtime versions.
26
+
27
+ Reports unusable settings and database errors and exits successfully.
28
+ SQLite may perform its normal file housekeeping when this command is triggered.`,
29
+ };
@@ -0,0 +1,183 @@
1
+ export declare const labelRouter: {
2
+ create: {
3
+ summary: string;
4
+ effects: {
5
+ domain: "create";
6
+ storage: "normal-open";
7
+ };
8
+ confirmation: {
9
+ kind: "none";
10
+ };
11
+ input: {
12
+ readonly options: {
13
+ readonly description: {
14
+ readonly type: "string";
15
+ readonly value: {
16
+ readonly kind: "text";
17
+ readonly name: "text";
18
+ };
19
+ };
20
+ readonly color: {
21
+ readonly type: "string";
22
+ readonly value: {
23
+ readonly kind: "enum";
24
+ readonly name: "color";
25
+ readonly choices: ("red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray")[];
26
+ };
27
+ };
28
+ };
29
+ readonly forms: readonly [{
30
+ readonly id: "default";
31
+ readonly positionals: readonly [{
32
+ readonly name: "name";
33
+ readonly min: 1;
34
+ readonly max: 1;
35
+ readonly value: {
36
+ readonly kind: "name";
37
+ };
38
+ }];
39
+ }];
40
+ readonly constraints: readonly [];
41
+ };
42
+ results: import("../results.js").CommandResult[];
43
+ run: (args: string[]) => void;
44
+ help: string;
45
+ };
46
+ list: {
47
+ summary: string;
48
+ effects: {
49
+ domain: "read";
50
+ storage: "normal-open";
51
+ };
52
+ confirmation: {
53
+ kind: "none";
54
+ };
55
+ input: {
56
+ readonly options: {};
57
+ readonly forms: readonly [{
58
+ readonly id: "default";
59
+ readonly positionals: readonly [];
60
+ }];
61
+ readonly constraints: readonly [];
62
+ };
63
+ results: import("../results.js").CommandResult[];
64
+ run: (args: string[]) => void;
65
+ help: string;
66
+ };
67
+ edit: {
68
+ summary: string;
69
+ effects: {
70
+ domain: "update";
71
+ storage: "normal-open";
72
+ };
73
+ confirmation: {
74
+ kind: "none";
75
+ };
76
+ input: {
77
+ readonly options: {
78
+ readonly color: {
79
+ readonly type: "string";
80
+ readonly value: {
81
+ readonly kind: "enum";
82
+ readonly name: "color";
83
+ readonly choices: ("red" | "green" | "yellow" | "blue" | "magenta" | "cyan" | "white" | "gray")[];
84
+ };
85
+ };
86
+ readonly append: {
87
+ readonly type: "boolean";
88
+ };
89
+ readonly replacing: {
90
+ readonly type: "string";
91
+ readonly value: {
92
+ readonly kind: "text";
93
+ readonly name: "old";
94
+ };
95
+ };
96
+ readonly all: {
97
+ readonly type: "boolean";
98
+ };
99
+ readonly name: {
100
+ readonly type: "string";
101
+ readonly value: {
102
+ readonly kind: "text";
103
+ readonly name: "text";
104
+ };
105
+ };
106
+ readonly description: {
107
+ readonly type: "string";
108
+ readonly value: {
109
+ readonly kind: "text";
110
+ readonly name: "text";
111
+ };
112
+ };
113
+ };
114
+ readonly forms: readonly [{
115
+ readonly id: "default";
116
+ readonly positionals: readonly [{
117
+ readonly name: "name";
118
+ readonly min: 1;
119
+ readonly max: 1;
120
+ readonly value: {
121
+ readonly kind: "name";
122
+ };
123
+ }];
124
+ }];
125
+ readonly constraints: readonly [{
126
+ readonly kind: "exclusive";
127
+ readonly members: readonly ["option:append", "option:replacing"];
128
+ }, {
129
+ readonly kind: "requires";
130
+ readonly input: "option:append";
131
+ readonly requires: `option:${string}`;
132
+ }, {
133
+ readonly kind: "requires";
134
+ readonly input: "option:replacing";
135
+ readonly requires: `option:${string}`;
136
+ }, {
137
+ readonly kind: "requires";
138
+ readonly input: "option:all";
139
+ readonly requires: "option:replacing";
140
+ }, {
141
+ readonly kind: "atLeastOne";
142
+ readonly members: `option:${string}`[];
143
+ }];
144
+ readonly notes: readonly [string];
145
+ };
146
+ results: import("../results.js").CommandResult[];
147
+ run: (args: string[]) => void;
148
+ help: string;
149
+ };
150
+ delete: {
151
+ summary: string;
152
+ effects: {
153
+ domain: "delete";
154
+ storage: "normal-open";
155
+ };
156
+ confirmation: {
157
+ kind: "prompt";
158
+ description: string;
159
+ };
160
+ input: {
161
+ readonly options: {
162
+ readonly yes: {
163
+ readonly type: "boolean";
164
+ };
165
+ };
166
+ readonly forms: readonly [{
167
+ readonly id: "default";
168
+ readonly positionals: readonly [{
169
+ readonly name: "name";
170
+ readonly min: 1;
171
+ readonly max: 1;
172
+ readonly value: {
173
+ readonly kind: "name";
174
+ };
175
+ }];
176
+ }];
177
+ readonly constraints: readonly [];
178
+ };
179
+ results: import("../results.js").CommandResult[];
180
+ run: (args: string[]) => Promise<void>;
181
+ help: string;
182
+ };
183
+ };