flowcollab 0.1.2 → 0.1.4
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/_client.mjs +1 -1
- package/bin/init.mjs +7 -12
- package/bin/pull.mjs +4 -5
- package/bin/standup.mjs +2 -2
- package/bin/sync.mjs +2 -2
- package/package.json +1 -1
package/bin/_client.mjs
CHANGED
package/bin/init.mjs
CHANGED
|
@@ -96,14 +96,12 @@ async function main() {
|
|
|
96
96
|
process.exit(1);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
console.log('\nFlow
|
|
100
|
-
console.log('You signed up
|
|
99
|
+
console.log('\nFlow — CLI setup\n');
|
|
100
|
+
console.log('You signed up at https://flow-production-84b7.up.railway.app');
|
|
101
101
|
console.log('This writes your .env and CLAUDE.md — no Supabase config needed.\n');
|
|
102
102
|
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
const token = (await ask('Your API token (from setup page): ')).trim();
|
|
106
|
-
const actorId = (await ask('Your actor ID (from setup page, e.g. "alice"): ')).trim() || 'owner';
|
|
103
|
+
const token = (await ask('Your API token (from the board setup page): ')).trim();
|
|
104
|
+
const actorId = (await ask('Your actor ID (from the board, e.g. "alice"): ')).trim() || 'owner';
|
|
107
105
|
const scopeRaw = (await ask('Your scope [owner/contributor, default: owner]: ')).trim().toLowerCase();
|
|
108
106
|
const scope = scopeRaw === 'contributor' ? 'contributor' : 'owner';
|
|
109
107
|
|
|
@@ -142,13 +140,10 @@ async function main() {
|
|
|
142
140
|
rl.close();
|
|
143
141
|
|
|
144
142
|
const tokenVar = scope === 'owner' ? 'FLOW_API_TOKEN_OWNER' : 'FLOW_API_TOKEN_CONTRIBUTOR';
|
|
145
|
-
const actorVar = scope === 'owner' ? 'FLOW_TOKEN_OWNER_ACTOR' : 'FLOW_TOKEN_CONTRIBUTOR_ACTOR';
|
|
146
143
|
const envLines = [
|
|
147
144
|
`${tokenVar}=${token}`,
|
|
148
|
-
`${actorVar}=${actorId}`,
|
|
149
|
-
`FLOW_API_BASE=${apiBase}`,
|
|
150
|
-
`FLOW_ACTING_VIA=claude`,
|
|
151
145
|
`FLOW_DEFAULT_ASSIGNEE=${actorId}`,
|
|
146
|
+
`FLOW_ACTING_VIA=claude`,
|
|
152
147
|
];
|
|
153
148
|
|
|
154
149
|
console.log('\n========== .env ==========\n');
|
|
@@ -172,7 +167,7 @@ async function main() {
|
|
|
172
167
|
}
|
|
173
168
|
|
|
174
169
|
if (writeClaude) {
|
|
175
|
-
const content = buildWebClaudeMd({ actorId, ownerActorId, boardUrl:
|
|
170
|
+
const content = buildWebClaudeMd({ actorId, ownerActorId, boardUrl: 'https://flow-production-84b7.up.railway.app/flow/', scope, areas: localAreas });
|
|
176
171
|
writeFileSync(claudeMdTarget, content, 'utf8');
|
|
177
172
|
console.log(`✓ CLAUDE.md written. Commit this so every agent on the team gets the workflow.`);
|
|
178
173
|
}
|
|
@@ -180,7 +175,7 @@ async function main() {
|
|
|
180
175
|
console.log('\n========== Next steps ==========\n');
|
|
181
176
|
console.log(`1. Verify your connection: flow-whoami`);
|
|
182
177
|
console.log(`2. See your board: flow-pull`);
|
|
183
|
-
console.log(`3. Open the board:
|
|
178
|
+
console.log(`3. Open the board: https://flow-production-84b7.up.railway.app/flow/`);
|
|
184
179
|
console.log('');
|
|
185
180
|
}
|
|
186
181
|
|
package/bin/pull.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* flow:pull — fetch tasks + decisions + recent timeline and print a Claude-ready summary.
|
|
3
3
|
|
|
4
4
|
Usage:
|
|
5
|
-
flow-pull #
|
|
5
|
+
flow-pull # actor from ~/.flow/config.json or FLOW_DEFAULT_ASSIGNEE env
|
|
6
6
|
flow-pull --assignee=nate # explicit filter
|
|
7
7
|
flow-pull --assignee=all # unfiltered (full board)
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
3. Recent timeline activity on YOUR tasks (last 5 per task)
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
import { flowFetch, arg } from './_client.mjs';
|
|
15
|
+
import { flowFetch, arg, RESOLVED_ACTOR } from './_client.mjs';
|
|
16
16
|
import { existsSync, writeFileSync } from 'fs';
|
|
17
17
|
import { join } from 'path';
|
|
18
18
|
|
|
@@ -94,8 +94,7 @@ function mentionRegex(assignee) {
|
|
|
94
94
|
|
|
95
95
|
async function main() {
|
|
96
96
|
const explicit = arg('assignee');
|
|
97
|
-
const
|
|
98
|
-
const filterAssignee = explicit === 'all' ? '' : (explicit || envDefault);
|
|
97
|
+
const filterAssignee = explicit === 'all' ? '' : (explicit || RESOLVED_ACTOR);
|
|
99
98
|
const focusMode = arg('focus') !== undefined;
|
|
100
99
|
const filterMilestone = arg('milestone') || '';
|
|
101
100
|
|
|
@@ -121,7 +120,7 @@ async function main() {
|
|
|
121
120
|
|
|
122
121
|
// 0. Active agents — other agents heartbeating right now
|
|
123
122
|
if (presenceRes?.agents?.length) {
|
|
124
|
-
const myActorId =
|
|
123
|
+
const myActorId = RESOLVED_ACTOR;
|
|
125
124
|
const others = presenceRes.agents.filter(a => a.actor_id !== myActorId);
|
|
126
125
|
if (others.length) {
|
|
127
126
|
out.push(`[active agents — ${others.length} other${others.length === 1 ? '' : 's'} online]`);
|
package/bin/standup.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
flow-standup --velocity # include week-over-week velocity (last 4 weeks)
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { flowFetch, arg } from './_client.mjs';
|
|
12
|
+
import { flowFetch, arg, RESOLVED_ACTOR } from './_client.mjs';
|
|
13
13
|
|
|
14
14
|
function sanitizeText(s, maxLen = 200) {
|
|
15
15
|
if (!s || typeof s !== 'string') return '';
|
|
@@ -42,7 +42,7 @@ async function main() {
|
|
|
42
42
|
const decisions = decRes.decisions || [];
|
|
43
43
|
const agents = presenceRes?.agents || [];
|
|
44
44
|
const taskById = new Map(tasks.map(t => [t.id, t]));
|
|
45
|
-
const myId =
|
|
45
|
+
const myId = RESOLVED_ACTOR;
|
|
46
46
|
|
|
47
47
|
// Done since N hours — de-dup by task (most recent close per task)
|
|
48
48
|
const doneEvents = timeline
|
package/bin/sync.mjs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
flow-sync --since=30 # last 30 minutes
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { flowFetch, arg } from './_client.mjs';
|
|
12
|
+
import { flowFetch, arg, RESOLVED_ACTOR } from './_client.mjs';
|
|
13
13
|
|
|
14
14
|
// Same sanitizer as pull.mjs — keep parity for injection defense.
|
|
15
15
|
function sanitizeText(s, maxLen = 400) {
|
|
@@ -42,7 +42,7 @@ async function main() {
|
|
|
42
42
|
|
|
43
43
|
// Active agents
|
|
44
44
|
if (r.agents?.length) {
|
|
45
|
-
const myId =
|
|
45
|
+
const myId = RESOLVED_ACTOR;
|
|
46
46
|
const others = r.agents.filter(a => a.actor_id !== myId);
|
|
47
47
|
if (others.length) {
|
|
48
48
|
out.push(`\n[active agents — ${others.length} online]`);
|