flowviant 0.41.0 → 0.44.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/lib/claude.mjs +43 -437
- package/bin/lib/fleet.mjs +274 -49
- package/bin/lib/live.mjs +29 -1
- package/bin/lib/patch.mjs +73 -5
- package/bin/lib/prompts.mjs +610 -0
- package/bin/lib/runtimes.mjs +48 -7
- package/bin/lib/work.mjs +875 -0
- package/package.json +1 -1
package/bin/lib/runtimes.mjs
CHANGED
|
@@ -299,11 +299,11 @@ export const RUNTIMES = {
|
|
|
299
299
|
live: true,
|
|
300
300
|
/**
|
|
301
301
|
* Every profile, because every profile is DEFINED in its vocabulary: the
|
|
302
|
-
*
|
|
303
|
-
* "consult" currently mean. That is a statement about where the
|
|
304
|
-
* written, not a claim that only Claude could ever satisfy it.
|
|
302
|
+
* four `--allowedTools` lists in claude.mjs are what "build", "wiki",
|
|
303
|
+
* "consult" and "plan" currently mean. That is a statement about where the
|
|
304
|
+
* contract was written, not a claim that only Claude could ever satisfy it.
|
|
305
305
|
*/
|
|
306
|
-
profiles: ['build', 'wiki', 'consult'],
|
|
306
|
+
profiles: ['build', 'wiki', 'consult', 'plan'],
|
|
307
307
|
mcp: claudeMcp,
|
|
308
308
|
/**
|
|
309
309
|
* Claude takes the operating contract as a real system prompt, which is the
|
|
@@ -349,7 +349,7 @@ export const RUNTIMES = {
|
|
|
349
349
|
* and Windows are UNTESTED; if this daemon starts running there, re-verify
|
|
350
350
|
* before trusting the consult posture on those platforms.
|
|
351
351
|
*/
|
|
352
|
-
profiles: ['build', 'consult', 'wiki'],
|
|
352
|
+
profiles: ['build', 'consult', 'wiki', 'plan'],
|
|
353
353
|
mcp: codexMcp,
|
|
354
354
|
/**
|
|
355
355
|
* Codex has NO system-prompt flag. The contract therefore rides inside the
|
|
@@ -418,6 +418,30 @@ export const RUNTIMES = {
|
|
|
418
418
|
// we are asserting on their behalf — silently, and on the one turn whose
|
|
419
419
|
// prompt comes from someone else's typing.
|
|
420
420
|
a.push('--ignore-user-config', '--ignore-rules');
|
|
421
|
+
} else if (profile === 'plan') {
|
|
422
|
+
// A PLANNING SESSION. Read-only on the filesystem, exactly like a
|
|
423
|
+
// consult — the writes it makes go through the control plane, not
|
|
424
|
+
// through this box — so the kernel sandbox is the same one, and for the
|
|
425
|
+
// same reason: this turn's prompt is steered by anything a project
|
|
426
|
+
// editor can type.
|
|
427
|
+
//
|
|
428
|
+
// Everything the consult branch above closes stays closed, and the
|
|
429
|
+
// reasoning is unchanged, so it is not restated: web_search egresses
|
|
430
|
+
// server-side at OpenAI where no local sandbox reaches it, sub-agents
|
|
431
|
+
// would be a turn whose posture nobody here chose, and a user's own
|
|
432
|
+
// config or MCP servers must not widen a posture we are asserting on
|
|
433
|
+
// their behalf.
|
|
434
|
+
//
|
|
435
|
+
// What differs from a consult is the ONE thing this profile exists for:
|
|
436
|
+
// an MCP config IS passed, carrying the plan principal's token. That
|
|
437
|
+
// token's whole tool set is the five plan tools — the server refuses
|
|
438
|
+
// anything else on it — so the control plane being open here does not
|
|
439
|
+
// widen what a hijacked turn could reach beyond the plan it is already
|
|
440
|
+
// sitting in.
|
|
441
|
+
a.push('--sandbox', 'read-only');
|
|
442
|
+
a.push('-c', 'tools.web_search=false', '-c', 'web_search="disabled"');
|
|
443
|
+
a.push('-c', 'features.multi_agent=false', '-c', 'features.goals=false');
|
|
444
|
+
a.push('--ignore-user-config', '--ignore-rules');
|
|
421
445
|
} else if (profile === 'wiki' && vaultDir) {
|
|
422
446
|
// THE CARTOGRAPHER, AND THIS ONE IS STRICTER THAN CLAUDE'S.
|
|
423
447
|
//
|
|
@@ -572,6 +596,17 @@ export const RUNTIMES = {
|
|
|
572
596
|
* MCP connection and the CLI just returns schema-enforced JSON via
|
|
573
597
|
* `--json-schema`), which needs no per-invocation MCP config from the vendor
|
|
574
598
|
* at all.
|
|
599
|
+
*
|
|
600
|
+
* PLAN IS ABSENT ON PURPOSE, and NOT because a planning turn is beyond it —
|
|
601
|
+
* it reads code as well as anything here. A plan session is a conversation
|
|
602
|
+
* that makes many control-plane calls as it goes (spawn a slice, re-shape
|
|
603
|
+
* it, drop it, rewrite the spec), and mediation turns a turn into ONE
|
|
604
|
+
* schema-enforced form the daemon then applies. That shape fits a build,
|
|
605
|
+
* whose outcome is a single structured result; it does not yet fit an
|
|
606
|
+
* argument. Note that `canRun` would otherwise say yes via `mediated()` and
|
|
607
|
+
* hand this runtime a job it cannot finish — declaring the profile is the
|
|
608
|
+
* only thing standing between here and that. Mediated planning is a real
|
|
609
|
+
* design (the session returns its writes as a batch), just not a built one.
|
|
575
610
|
*/
|
|
576
611
|
profiles: ['build', 'wiki', 'consult'],
|
|
577
612
|
mcp: null,
|
|
@@ -687,7 +722,7 @@ export const runtimeById = (id) => RUNTIMES[id] ?? RUNTIMES.claude;
|
|
|
687
722
|
* disagree the daemon either claims work it cannot build or refuses work it can.
|
|
688
723
|
*/
|
|
689
724
|
/**
|
|
690
|
-
* WHICH PROFILES NEED THE MCP CONTROL PLANE.
|
|
725
|
+
* WHICH PROFILES NEED THE MCP CONTROL PLANE. Two do.
|
|
691
726
|
*
|
|
692
727
|
* A BUILD has to claim work, report a blocker, attach a PR and complete — that
|
|
693
728
|
* is the control plane, and a runtime that cannot reach it cannot participate.
|
|
@@ -696,11 +731,17 @@ export const runtimeById = (id) => RUNTIMES[id] ?? RUNTIMES.claude;
|
|
|
696
731
|
* included — check the two call sites in fleet.mjs, they hand `runTurn` no
|
|
697
732
|
* `mcpArgs` at all.
|
|
698
733
|
*
|
|
734
|
+
* A PLAN is the second one, and it is the reason the consult stopped being the
|
|
735
|
+
* whole story: a planning session does not answer a question, it WRITES the plan
|
|
736
|
+
* — spawns the slices, re-shapes them, drops them, maintains the spec. Every one
|
|
737
|
+
* of those is a control-plane call, so a runtime that cannot reach MCP cannot
|
|
738
|
+
* host a session, however well it reads code.
|
|
739
|
+
*
|
|
699
740
|
* Conflating them cost Antigravity every capability it has: `mcp && args` was
|
|
700
741
|
* the single drivability test, so a machine-wide MCP config disqualified it from
|
|
701
742
|
* two jobs that never open an MCP connection.
|
|
702
743
|
*/
|
|
703
|
-
const PROFILE_NEEDS_MCP = { build: true, wiki: false, consult: false };
|
|
744
|
+
const PROFILE_NEEDS_MCP = { build: true, wiki: false, consult: false, plan: true };
|
|
704
745
|
|
|
705
746
|
/**
|
|
706
747
|
* A build needs the control plane, but NOT necessarily an MCP config of its own.
|