flowcollab 0.2.0 → 0.2.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.
- package/bin/archive.mjs +33 -0
- package/bin/close-sprint.mjs +7 -2
- package/bin/completion.mjs +3 -2
- package/bin/flow.mjs +1 -0
- package/package.json +3 -2
package/bin/archive.mjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* flow-archive — archive or unarchive a task.
|
|
3
|
+
Archived tasks are hidden from GET /tasks by default; use flow-pull or
|
|
4
|
+
board "Show archived" toggle to see them.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
flow-archive <task-id> # archive
|
|
8
|
+
flow-archive <task-id> --undo # unarchive
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { flowFetch, RESOLVED_ACTOR } from './_client.mjs';
|
|
12
|
+
|
|
13
|
+
const [,, taskId, ...rest] = process.argv;
|
|
14
|
+
const undo = rest.includes('--undo');
|
|
15
|
+
|
|
16
|
+
if (!taskId || taskId.startsWith('-')) {
|
|
17
|
+
process.stderr.write('Usage: flow-archive <task-id> [--undo]\n');
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const endpoint = undo
|
|
22
|
+
? `/api/flow/tasks/${encodeURIComponent(taskId)}/unarchive`
|
|
23
|
+
: `/api/flow/tasks/${encodeURIComponent(taskId)}/archive`;
|
|
24
|
+
|
|
25
|
+
const res = await flowFetch(endpoint, { method: 'POST' }).catch(e => {
|
|
26
|
+
process.stderr.write('flow-archive: ' + (e.message || e) + '\n');
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const t = res.task;
|
|
31
|
+
const ref = `#${t.issue_num ?? taskId.slice(0, 6)}`;
|
|
32
|
+
const verb = undo ? 'Unarchived' : 'Archived';
|
|
33
|
+
process.stdout.write(`${verb} ${ref}: ${t.title}\n`);
|
package/bin/close-sprint.mjs
CHANGED
|
@@ -22,7 +22,9 @@ async function main() {
|
|
|
22
22
|
process.exit(1);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const
|
|
25
|
+
const archiveDone = process.argv.includes('--archive-done');
|
|
26
|
+
const qs = archiveDone ? '?archive=true' : '';
|
|
27
|
+
const res = await flowFetch(`/api/flow/milestones/${encodeURIComponent(milestone)}/close${qs}`, { method: 'POST' });
|
|
26
28
|
|
|
27
29
|
const { completed = [], carried_forward = [] } = res;
|
|
28
30
|
const total = completed.length + carried_forward.length;
|
|
@@ -51,7 +53,10 @@ async function main() {
|
|
|
51
53
|
out.push('');
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
const doneLabel = archiveDone
|
|
57
|
+
? 'Done tasks archived (milestone cleared + archived_at set). Carried tasks keep the milestone for the next sprint.'
|
|
58
|
+
: 'Done tasks archived (milestone cleared). Carried tasks keep the milestone for the next sprint.'
|
|
59
|
+
out.push(doneLabel);
|
|
55
60
|
process.stdout.write(out.join('\n') + '\n');
|
|
56
61
|
}
|
|
57
62
|
|
package/bin/completion.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const COMMANDS = [
|
|
|
12
12
|
'login', 'pull', 'claim', 'comment', 'close', 'create', 'edit', 'unblock',
|
|
13
13
|
'propose', 'approve', 'reject', 'assign', 'decisions', 'handoff', 'review',
|
|
14
14
|
'search', 'status', 'standup', 'sync', 'log', 'heartbeat', 'ping', 'pr',
|
|
15
|
-
'project', 'close-sprint', 'whoami', 'completion',
|
|
15
|
+
'project', 'archive', 'close-sprint', 'whoami', 'completion',
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const FLAGS = {
|
|
@@ -26,7 +26,8 @@ const FLAGS = {
|
|
|
26
26
|
review: ['--pr=', '--reviewer=', '--context='],
|
|
27
27
|
edit: ['--title=', '--priority=', '--area=', '--due=', '--milestone=', '--blocked-by='],
|
|
28
28
|
log: ['--task=', '--limit='],
|
|
29
|
-
|
|
29
|
+
archive: ['--undo'],
|
|
30
|
+
'close-sprint': ['--milestone=', '--archive-done'],
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
function bashScript() {
|
package/bin/flow.mjs
CHANGED
|
@@ -47,6 +47,7 @@ const CMDS = [
|
|
|
47
47
|
['ping', 'ping.mjs', 'Health check or send a direct agent message'],
|
|
48
48
|
['pr', 'pr.mjs', 'Record a PR link on a task timeline'],
|
|
49
49
|
['project', 'project.mjs', 'List GitHub Projects v2 items'],
|
|
50
|
+
['archive', 'archive.mjs', 'Archive or unarchive a task (--undo to restore)'],
|
|
50
51
|
['close-sprint', 'close-sprint.mjs', 'Close a sprint milestone (owner only)'],
|
|
51
52
|
['whoami', 'whoami.mjs', 'Verify token and show current identity'],
|
|
52
53
|
['completion', 'completion.mjs', 'Print shell completion script (bash/zsh/fish)'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowcollab",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Multi-Claude coordination layer — shared task board + CLI for teams running Claude Code",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
"flow-edit": "bin/edit.mjs",
|
|
35
35
|
"flow-unblock": "bin/unblock.mjs",
|
|
36
36
|
"flow-log": "bin/log.mjs",
|
|
37
|
-
"flow-completion": "bin/completion.mjs"
|
|
37
|
+
"flow-completion": "bin/completion.mjs",
|
|
38
|
+
"flow-archive": "bin/archive.mjs"
|
|
38
39
|
},
|
|
39
40
|
"scripts": {
|
|
40
41
|
"build": "node scripts/build.mjs",
|