flowviant 0.48.3 → 0.48.5
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/cli.mjs +15 -32
- package/bin/lib/config.mjs +4 -8
- package/bin/lib/fleet.mjs +7 -767
- package/bin/lib/prompts.mjs +22 -326
- package/package.json +2 -2
- package/bin/lib/live.mjs +0 -2151
- package/bin/lib/single.mjs +0 -66
package/bin/cli.mjs
CHANGED
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* flowviant — run your own Claude Code as headless Flowviant build agents.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* ONE mode, one credential:
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* FLOWVIANT_FLEET=fft_… npx flowviant@latest # the fleet daemon
|
|
8
|
+
*
|
|
9
|
+
* `FLOWVIANT_TOKEN` (one worker, current checkout) and `FLOWVIANT_TOKENS` (a
|
|
10
|
+
* comma list, one worktree each) stood beside it until 2026-08-19. Both ran the
|
|
11
|
+
* pre-daemon WORKER loop, whose first move was `claim_next_task` — a tool on the
|
|
12
|
+
* `worker` MCP principal, which was deleted with dispatch and now owns nothing.
|
|
13
|
+
* A worker token cannot be minted any more either, so those vars could only
|
|
14
|
+
* ever hold a credential issued before that. They authenticated fine and then
|
|
15
|
+
* sat against an empty tool list, which is a worse failure than not starting.
|
|
10
16
|
*
|
|
11
17
|
* Launch with `@latest` so each start pulls the newest published version (bare
|
|
12
18
|
* `npx flowviant` can reuse a stale cache). A running daemon also self-updates
|
|
@@ -36,11 +42,9 @@
|
|
|
36
42
|
*
|
|
37
43
|
* Implementation lives in ./lib/: config, ui, claude, git, fleet, single.
|
|
38
44
|
*/
|
|
39
|
-
import { FLEET_TOKEN
|
|
45
|
+
import { FLEET_TOKEN } from './lib/config.mjs';
|
|
40
46
|
import { runFleetDaemon } from './lib/fleet.mjs';
|
|
41
|
-
import { runWorker, runStaticFleet } from './lib/single.mjs';
|
|
42
47
|
import { runLogin } from './lib/login.mjs';
|
|
43
|
-
import { preflight } from './lib/preflight.mjs';
|
|
44
48
|
|
|
45
49
|
// `flowviant login` — device auth (recommended): approve a code in the app, the
|
|
46
50
|
// credential is stored locally, and then we KEEP GOING into the daemon.
|
|
@@ -155,35 +159,14 @@ if (process.argv[2] === 'env') {
|
|
|
155
159
|
process.exit(0);
|
|
156
160
|
}
|
|
157
161
|
|
|
158
|
-
if (!FLEET_TOKEN
|
|
162
|
+
if (!FLEET_TOKEN) {
|
|
159
163
|
console.error(
|
|
160
164
|
'error: no credential found. Easiest:\n' +
|
|
161
165
|
' flowviant login (approve in the app — recommended)\n' +
|
|
162
|
-
'Or set
|
|
163
|
-
' FLOWVIANT_FLEET=
|
|
164
|
-
' FLOWVIANT_TOKEN=fva_… (one agent, current checkout)\n' +
|
|
165
|
-
' FLOWVIANT_TOKENS=a,b,… (static fleet)'
|
|
166
|
+
'Or set:\n' +
|
|
167
|
+
' FLOWVIANT_FLEET=fft_… (fleet token, manage machines in Flowviant)'
|
|
166
168
|
);
|
|
167
169
|
process.exit(1);
|
|
168
170
|
}
|
|
169
171
|
|
|
170
|
-
|
|
171
|
-
if (FLEET_TOKEN) {
|
|
172
|
-
await runFleetDaemon();
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
console.log(
|
|
176
|
-
SAFE
|
|
177
|
-
? '» safe mode: restricted toolset (unset FLOWVIANT_SAFE for full autonomy).'
|
|
178
|
-
: '» unattended mode: permission prompts skipped so the agent runs hands-off.'
|
|
179
|
-
);
|
|
180
|
-
await preflight({ needGit: tokens.length > 1 });
|
|
181
|
-
if (tokens.length === 1) {
|
|
182
|
-
console.log(`» flowviant → ${MCP_URL} (1 worker · token fva_…${tokens[0].slice(-4)})`);
|
|
183
|
-
await runWorker({ token: tokens[0], cwd: process.cwd(), label: '' });
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
await runStaticFleet();
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
await main();
|
|
172
|
+
await runFleetDaemon();
|
package/bin/lib/config.mjs
CHANGED
|
@@ -168,13 +168,9 @@ export const ALLOW_PATCHES =
|
|
|
168
168
|
// them (Node's default UA is treated as a bot). Claude Code sends its own UA.
|
|
169
169
|
export const USER_AGENT = `flowviant/${VERSION}`;
|
|
170
170
|
|
|
171
|
-
//
|
|
171
|
+
// The ONE credential. `tokens` (FLOWVIANT_TOKEN / FLOWVIANT_TOKENS / --token /
|
|
172
|
+
// --tokens) stood beside it and carried WORKER tokens into the pre-daemon loop;
|
|
173
|
+
// that principal owns zero tools since dispatch was deleted, and the kind can no
|
|
174
|
+
// longer be minted, so the plumbing went with the entrypoint (2026-08-19).
|
|
172
175
|
export const FLEET_TOKEN =
|
|
173
176
|
argFlag('--fleet') || process.env.FLOWVIANT_FLEET || stored?.fleetToken || '';
|
|
174
|
-
const rawTokens =
|
|
175
|
-
argFlag('--tokens') ||
|
|
176
|
-
process.env.FLOWVIANT_TOKENS ||
|
|
177
|
-
argFlag('--token') ||
|
|
178
|
-
process.env.FLOWVIANT_TOKEN ||
|
|
179
|
-
'';
|
|
180
|
-
export const tokens = rawTokens.split(',').map((t) => t.trim()).filter(Boolean);
|