@webappwiz/arbor 0.0.29 → 0.0.31
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.
- package/README.md +30 -10
- package/dev.d.ts +3 -2
- package/index.js +374 -378
- package/package.json +2 -2
- package/snapshot.d.ts +5 -1
- package/todo.d.ts +41 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webappwiz/arbor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"description": "Runs several AI coding agents on one repository at once, each in its own git worktree",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jared Johnson",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"webappwiz": "^0.0.
|
|
23
|
+
"webappwiz": "^0.0.31",
|
|
24
24
|
"zod": "^4.4.3"
|
|
25
25
|
},
|
|
26
26
|
"main": "./index.js",
|
package/snapshot.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type { WorktreeService } from "./worktree-service.js";
|
|
|
9
9
|
export interface Snapshot {
|
|
10
10
|
/** The repository's directory name, so a page among many says whose it is. */
|
|
11
11
|
repo: string;
|
|
12
|
+
/** Where the repository sits, with the home directory as `~`. */
|
|
13
|
+
path: string;
|
|
12
14
|
/** Past this age a todo is offered for removal rather than recommended. */
|
|
13
15
|
todoStalenessMs: number;
|
|
14
16
|
todos: TodoState[];
|
|
@@ -18,10 +20,12 @@ export interface Snapshot {
|
|
|
18
20
|
* Reads the whole repo the way the CLI's read commands do. Takes no lease, so
|
|
19
21
|
* the page can sit open on a live tree without disturbing the agent in it.
|
|
20
22
|
*/
|
|
21
|
-
export declare function snapshot({ service, todos, fs, }: {
|
|
23
|
+
export declare function snapshot({ service, todos, fs, home, }: {
|
|
22
24
|
service: WorktreeService;
|
|
23
25
|
todos: Todos;
|
|
24
26
|
fs: Fs;
|
|
27
|
+
/** The home directory to show as `~`, when there is one. */
|
|
28
|
+
home?: string;
|
|
25
29
|
}): Promise<Snapshot>;
|
|
26
30
|
/**
|
|
27
31
|
* What the page is actually showing, minus the fields that move on their own.
|
package/todo.d.ts
CHANGED
|
@@ -18,7 +18,16 @@ export interface TodoState {
|
|
|
18
18
|
takenBy: string | null;
|
|
19
19
|
/** Absolute paths of the files attached, in `todos/<id>/`. */
|
|
20
20
|
files: string[];
|
|
21
|
+
/** What it belongs to, sorted: the areas or goals it adds up to with others. */
|
|
22
|
+
tags: string[];
|
|
21
23
|
}
|
|
24
|
+
/** A tag in use, with how many todos have it. */
|
|
25
|
+
export interface TagState {
|
|
26
|
+
tag: string;
|
|
27
|
+
todos: number;
|
|
28
|
+
}
|
|
29
|
+
/** `tags` deduped and sorted, refusing any not written the one way. */
|
|
30
|
+
export declare function tagList(tags: string[]): string[];
|
|
22
31
|
/** A todo's words, place or files changed: new ones added, some of the old kept. */
|
|
23
32
|
export interface TodoChange {
|
|
24
33
|
/** A new line; the old one stays when this is absent. */
|
|
@@ -31,6 +40,8 @@ export interface TodoChange {
|
|
|
31
40
|
files?: Attachment[];
|
|
32
41
|
/** The paths of the files it has now to keep; absent keeps them all. */
|
|
33
42
|
keep?: string[];
|
|
43
|
+
/** Its tags from now on; the old stay when this is absent. */
|
|
44
|
+
tags?: string[];
|
|
34
45
|
}
|
|
35
46
|
/** What a new todo has besides its subject, all of it optional. */
|
|
36
47
|
export interface TodoNew {
|
|
@@ -39,6 +50,7 @@ export interface TodoNew {
|
|
|
39
50
|
files?: Attachment[];
|
|
40
51
|
/** Where it goes in the list, pushing those from there down; the bottom by default. */
|
|
41
52
|
position?: number;
|
|
53
|
+
tags?: string[];
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
44
56
|
* Work deferred for later: what an agent notes when something outside its
|
|
@@ -64,12 +76,13 @@ export declare class Todo {
|
|
|
64
76
|
/** Puts it back on the list, as when the task that took it is removed. */
|
|
65
77
|
release(): Promise<Todo>;
|
|
66
78
|
get files(): string[];
|
|
79
|
+
get tags(): string[];
|
|
67
80
|
get attachments(): Attachments;
|
|
68
81
|
/**
|
|
69
82
|
* Says what is left to do in other words, with other files, or higher or
|
|
70
83
|
* lower in the list, keeping its id and history.
|
|
71
84
|
*/
|
|
72
|
-
update({ subject, text, position, files, keep, }: TodoChange): Promise<Todo>;
|
|
85
|
+
update({ subject, text, position, files, keep, tags, }: TodoChange): Promise<Todo>;
|
|
73
86
|
remove(): Promise<void>;
|
|
74
87
|
}
|
|
75
88
|
/** What `Todos` is stored through; the real filesystem by default. */
|
|
@@ -100,7 +113,7 @@ export declare class Todos {
|
|
|
100
113
|
attachments(id: number): Attachments;
|
|
101
114
|
/** Whether `path` is a file some todo holds, and not a way out of here. */
|
|
102
115
|
owns(path: string): boolean;
|
|
103
|
-
add(subject: string, from: string | null, { text, files, position }?: TodoNew): Promise<Todo>;
|
|
116
|
+
add(subject: string, from: string | null, { text, files, position, tags }?: TodoNew): Promise<Todo>;
|
|
104
117
|
/**
|
|
105
118
|
* Top of the list first. A file that will not parse is skipped rather than
|
|
106
119
|
* fatal, and positions are counted again from 1 as they are read, so a
|
|
@@ -109,6 +122,8 @@ export declare class Todos {
|
|
|
109
122
|
*/
|
|
110
123
|
all(): Promise<Todo[]>;
|
|
111
124
|
find(id: number): Promise<Todo>;
|
|
125
|
+
/** Every tag a todo on the list has, by name, with how many have it. */
|
|
126
|
+
tags(): Promise<TagState[]>;
|
|
112
127
|
/** The todos `task` has taken; what a merge or remove settles. */
|
|
113
128
|
takenBy(task: string): Promise<Todo[]>;
|
|
114
129
|
/**
|
|
@@ -150,16 +165,21 @@ export interface Recommendation {
|
|
|
150
165
|
}
|
|
151
166
|
/**
|
|
152
167
|
* Which todo to take up after `task`: one that came up in it first, since
|
|
153
|
-
* whoever just finished it knows that context best, then
|
|
168
|
+
* whoever just finished it knows that context best, then one sharing a tag
|
|
169
|
+
* in `settled`, those of the todos it finished, the same area of work, then the open one highest
|
|
154
170
|
* on the list, which is how whoever keeps the list says what matters most.
|
|
155
171
|
* Todos past `staleness` are never recommended, only offered for removal.
|
|
156
172
|
*/
|
|
157
|
-
export declare function recommend(todos: Todos, task: string | null, staleness: number): Promise<Recommendation>;
|
|
173
|
+
export declare function recommend(todos: Todos, task: string | null, staleness: number, settled?: string[]): Promise<Recommendation>;
|
|
158
174
|
/** The lines `merge` ends with, or none when there is nothing to say. */
|
|
159
175
|
export declare function recommendation({ next, stale }: Recommendation): string[];
|
|
160
176
|
export interface TodoListOptions {
|
|
161
177
|
/** Print the todos as JSON instead of a table. */
|
|
162
178
|
json?: boolean;
|
|
179
|
+
/** Only those no task has taken: the ones free to pick up. */
|
|
180
|
+
open?: boolean;
|
|
181
|
+
/** Only those with this tag. */
|
|
182
|
+
tag?: string;
|
|
163
183
|
}
|
|
164
184
|
export interface TodoFileOptions {
|
|
165
185
|
/** Files to attach, relative to the current directory or absolute. */
|
|
@@ -170,17 +190,18 @@ export interface TodoAddOptions extends TodoFileOptions {
|
|
|
170
190
|
text?: string;
|
|
171
191
|
/** Where it goes in the list, 1 at the top; the bottom by default. */
|
|
172
192
|
position?: number;
|
|
193
|
+
tags?: string[];
|
|
173
194
|
}
|
|
174
195
|
export declare function todoAdd(deps: {
|
|
175
196
|
todos: Todos;
|
|
176
197
|
log: Logger;
|
|
177
198
|
fs: Fs;
|
|
178
199
|
ps: Ps;
|
|
179
|
-
}, subject: string, from: string | null, { text, files, position }?: TodoAddOptions): Promise<Todo>;
|
|
200
|
+
}, subject: string, from: string | null, { text, files, position, tags }?: TodoAddOptions): Promise<Todo>;
|
|
180
201
|
export declare function todoList({ todos, log }: {
|
|
181
202
|
todos: Todos;
|
|
182
203
|
log: Logger;
|
|
183
|
-
}, { json }?: TodoListOptions): Promise<void>;
|
|
204
|
+
}, { json, open, tag }?: TodoListOptions): Promise<void>;
|
|
184
205
|
export interface TodoShowOptions {
|
|
185
206
|
/** Print the todo as JSON instead of prose. */
|
|
186
207
|
json?: boolean;
|
|
@@ -199,13 +220,17 @@ export interface TodoUpdateOptions extends TodoFileOptions {
|
|
|
199
220
|
position?: number;
|
|
200
221
|
/** Attached files to drop, by path or by the name they were stored under. */
|
|
201
222
|
removeFiles?: string[];
|
|
223
|
+
/** Tags to add. */
|
|
224
|
+
tags?: string[];
|
|
225
|
+
/** Tags to drop. */
|
|
226
|
+
removeTags?: string[];
|
|
202
227
|
}
|
|
203
228
|
export declare function todoUpdate(deps: {
|
|
204
229
|
todos: Todos;
|
|
205
230
|
log: Logger;
|
|
206
231
|
fs: Fs;
|
|
207
232
|
ps: Ps;
|
|
208
|
-
}, id: number, { subject, text, position, files, removeFiles, }?: TodoUpdateOptions): Promise<Todo>;
|
|
233
|
+
}, id: number, { subject, text, position, files, removeFiles, tags, removeTags, }?: TodoUpdateOptions): Promise<Todo>;
|
|
209
234
|
/**
|
|
210
235
|
* Takes up todos for `task` after it started, as when one turns out to be
|
|
211
236
|
* part of the work. Every id is checked before any is taken, so one that is
|
|
@@ -228,3 +253,12 @@ export declare function todoRemove({ todos, log }: {
|
|
|
228
253
|
todos: Todos;
|
|
229
254
|
log: Logger;
|
|
230
255
|
}, id: number): Promise<void>;
|
|
256
|
+
export interface TodoTagsOptions {
|
|
257
|
+
/** Print the tags as JSON instead of a table. */
|
|
258
|
+
json?: boolean;
|
|
259
|
+
}
|
|
260
|
+
/** Every tag in use, with how many todos have it: the names to reuse first. */
|
|
261
|
+
export declare function todoTags({ todos, log }: {
|
|
262
|
+
todos: Todos;
|
|
263
|
+
log: Logger;
|
|
264
|
+
}, { json }?: TodoTagsOptions): Promise<void>;
|