@nathanstephenson/flow 0.1.10-beta.3 → 0.1.10-beta.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/README.md +9 -1
- package/build/backend-worker-chunks/{chunk-LO7O6NAM.mjs → chunk-JOI2POLP.mjs} +1 -1
- package/build/backend-worker-chunks/{chunk-UQDH2COY.mjs → chunk-K774KOGL.mjs} +2 -7
- package/build/backend-worker-chunks/chunk-LAEUXDNH.mjs +130 -0
- package/build/backend-worker-chunks/{chunk-MLOUI3ZM.mjs → chunk-NZZME2I3.mjs} +6 -1
- package/build/backend-worker-chunks/claude-GY27HBAY.mjs +35739 -0
- package/build/backend-worker-chunks/{pi-QNU2YE4G.mjs → pi-JV6MWPW7.mjs} +1891 -35
- package/build/backend-worker.mjs +25 -126
- package/dist/backend/claude/index.js +69 -11
- package/dist/backend/claude/subagents.js +11 -0
- package/dist/backend/fake/index.js +8 -2
- package/dist/backend/pi/cache-warming.js +8 -0
- package/dist/backend/pi/canonical-json.js +120 -0
- package/dist/backend/pi/compaction-model.js +3 -2
- package/dist/backend/pi/host-auth.js +258 -0
- package/dist/backend/pi/index.js +37 -12
- package/dist/backend/pi/model-auth.js +159 -0
- package/dist/backend/pi/model-catalog.js +120 -0
- package/dist/backend/pi/model-config.js +5 -0
- package/dist/backend/pi/model-selection.js +32 -0
- package/dist/backend/pi/work.js +9 -1
- package/dist/backend/pi/workflow-subagent.js +4 -3
- package/dist/backend/worker/entry.js +13 -1
- package/dist/backend/worker/index.js +66 -5
- package/dist/build-id +1 -1
- package/dist/cli/bootstrap.js +1 -1
- package/dist/client/reduce.js +2 -0
- package/dist/client/tool-summary.js +26 -15
- package/dist/daemon/host.js +13 -2
- package/dist/daemon/models.js +2 -2
- package/dist/daemon/pi-model-cache.js +44 -0
- package/dist/isolation/filesystem.js +5 -1
- package/dist/isolation/sandbox.js +31 -4
- package/package.json +7 -5
- package/web/dist/assets/index-BWKZK5HD.css +2 -0
- package/web/dist/assets/index-nIc09tKZ.js +40 -0
- package/web/dist/assets/{settings-mcp-Vf_fCXyE.js → settings-mcp-bcNKV147.js} +1 -1
- package/web/dist/assets/{settings-workflows-DVKxJWQm.js → settings-workflows-C_TKOhVa.js} +2 -2
- package/web/dist/assets/{workflows-Dobqzjg-.js → workflows-DHG-CIo3.js} +36 -36
- package/web/dist/assets/{workflows-pane-KB-Q76KZ.js → workflows-pane-9u_hJvgQ.js} +1 -1
- package/web/dist/index.html +3 -3
- package/build/backend-worker-chunks/claude-6L5KCQWJ.mjs +0 -30894
- package/web/dist/assets/index-BGu3YSP7.css +0 -2
- package/web/dist/assets/index-Miy2nveb.js +0 -40
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Flow runs coding-agent sessions. You can watch and control them from a terminal
|
|
|
21
21
|
|
|
22
22
|
## Requirements
|
|
23
23
|
|
|
24
|
-
- Node.js 22 or later, and npm. CI checks installs on Linux and macOS.
|
|
24
|
+
- Node.js 22.19.0 or later, and npm. CI checks installs on Linux and macOS.
|
|
25
25
|
- A user-owned npm prefix, for example from a Node version manager. Do not use sudo or a shared
|
|
26
26
|
system prefix.
|
|
27
27
|
- For filesystem isolation on Linux: Bubblewrap. See [docs/isolation.md](docs/isolation.md).
|
|
@@ -73,6 +73,14 @@ Configure credentials for the Backend Adapter that you use.
|
|
|
73
73
|
- **pi** — pi keeps its own credential store. Run `pi`, then `/login`, before you start a pi
|
|
74
74
|
session. Flow reads pi state from `PI_CODING_AGENT_DIR` (default `~/.pi/agent`).
|
|
75
75
|
|
|
76
|
+
Flow uses its own Pi SDK. Update Flow, not only standalone pi, to get a newer model catalogue.
|
|
77
|
+
Pi 1.6 calls the Azure Provider `azure`. Flow accepts saved `azure-openai-responses/<model>`
|
|
78
|
+
references, but legacy Provider keys in Pi's `auth.json` and `models.json` must change to `azure`.
|
|
79
|
+
The API name `azure-openai-responses` does not change. Unavailable models require an explicit new
|
|
80
|
+
selection; Flow does not substitute another model.
|
|
81
|
+
|
|
82
|
+
Pi cache warming stays limited to active runs unless Pi's global `cacheWarming` setting is `idle`.
|
|
83
|
+
|
|
76
84
|
## Everyday use
|
|
77
85
|
|
|
78
86
|
### Commands
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __flowCreateRequire } from 'node:module'; const require = __flowCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
external_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NZZME2I3.mjs";
|
|
5
5
|
|
|
6
6
|
// src/backend/effort.ts
|
|
7
7
|
var EFFORT_ORDER = ["off", "minimal", "low", "medium", "high", "xhigh", "max"];
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
toJSONSchema,
|
|
33
33
|
union,
|
|
34
34
|
unknown
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-NZZME2I3.mjs";
|
|
36
36
|
|
|
37
37
|
// node_modules/ajv/dist/compile/codegen/code.js
|
|
38
38
|
var require_code = __commonJS({
|
|
@@ -7188,10 +7188,6 @@ var require_dist = __commonJS({
|
|
|
7188
7188
|
}
|
|
7189
7189
|
});
|
|
7190
7190
|
|
|
7191
|
-
// src/backend/permission-errors.ts
|
|
7192
|
-
var AutoPermissionUnavailable = class extends Error {
|
|
7193
|
-
};
|
|
7194
|
-
|
|
7195
7191
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
7196
7192
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
7197
7193
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
@@ -15291,6 +15287,5 @@ export {
|
|
|
15291
15287
|
mergeCapabilities,
|
|
15292
15288
|
AjvJsonSchemaValidator,
|
|
15293
15289
|
assertToolsCallTaskCapability,
|
|
15294
|
-
assertClientRequestTaskCapability
|
|
15295
|
-
AutoPermissionUnavailable
|
|
15290
|
+
assertClientRequestTaskCapability
|
|
15296
15291
|
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { createRequire as __flowCreateRequire } from 'node:module'; const require = __flowCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
AutoPermissionUnavailable
|
|
4
|
+
} from "./chunk-NZZME2I3.mjs";
|
|
5
|
+
|
|
6
|
+
// src/backend/worker/rpc.ts
|
|
7
|
+
function waitForAbort(work, signal) {
|
|
8
|
+
if (!signal) return work;
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
const abort = () => {
|
|
11
|
+
reject(signal.reason);
|
|
12
|
+
};
|
|
13
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
14
|
+
void work.then(resolve, reject).finally(() => signal.removeEventListener("abort", abort));
|
|
15
|
+
if (signal.aborted) {
|
|
16
|
+
signal.removeEventListener("abort", abort);
|
|
17
|
+
abort();
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function errorText(error) {
|
|
22
|
+
return error instanceof Error ? error.message : String(error);
|
|
23
|
+
}
|
|
24
|
+
var WorkerRpc = class {
|
|
25
|
+
nextId = 0;
|
|
26
|
+
failure;
|
|
27
|
+
pending = /* @__PURE__ */ new Map();
|
|
28
|
+
incoming = /* @__PURE__ */ new Map();
|
|
29
|
+
send;
|
|
30
|
+
dispatch;
|
|
31
|
+
notification;
|
|
32
|
+
constructor(send, dispatch, notification) {
|
|
33
|
+
this.send = send;
|
|
34
|
+
this.dispatch = dispatch;
|
|
35
|
+
this.notification = notification;
|
|
36
|
+
}
|
|
37
|
+
call(method, args = [], signal) {
|
|
38
|
+
if (this.failure) return Promise.reject(this.failure);
|
|
39
|
+
if (signal?.aborted) return Promise.reject(new Error("Worker call cancelled"));
|
|
40
|
+
const id = ++this.nextId;
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
const abort = () => {
|
|
43
|
+
this.pending.delete(id);
|
|
44
|
+
try {
|
|
45
|
+
this.send({ kind: "cancel", id });
|
|
46
|
+
} catch {
|
|
47
|
+
}
|
|
48
|
+
reject(new Error("Worker call cancelled"));
|
|
49
|
+
};
|
|
50
|
+
const cleanup = () => signal?.removeEventListener("abort", abort);
|
|
51
|
+
this.pending.set(id, {
|
|
52
|
+
resolve: (value) => {
|
|
53
|
+
cleanup();
|
|
54
|
+
resolve(value);
|
|
55
|
+
},
|
|
56
|
+
reject: (error) => {
|
|
57
|
+
cleanup();
|
|
58
|
+
reject(error);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
signal?.addEventListener("abort", abort, { once: true });
|
|
62
|
+
try {
|
|
63
|
+
this.send({ kind: "call", id, method, args });
|
|
64
|
+
} catch (error) {
|
|
65
|
+
this.pending.delete(id);
|
|
66
|
+
cleanup();
|
|
67
|
+
reject(error);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
notify(name, value) {
|
|
72
|
+
if (!this.failure) this.send({ kind: "notification", name, value });
|
|
73
|
+
}
|
|
74
|
+
receive(raw) {
|
|
75
|
+
if (this.failure || !raw || typeof raw !== "object") return;
|
|
76
|
+
const message = raw;
|
|
77
|
+
switch (message.kind) {
|
|
78
|
+
case "reply": {
|
|
79
|
+
const pending = this.pending.get(message.id);
|
|
80
|
+
this.pending.delete(message.id);
|
|
81
|
+
if (message.error !== void 0) pending?.reject(message.errorCode === "auto_permission_unavailable" ? new AutoPermissionUnavailable(message.error) : new Error(message.error));
|
|
82
|
+
else pending?.resolve(message.value);
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
case "cancel":
|
|
86
|
+
this.incoming.get(message.id)?.abort();
|
|
87
|
+
break;
|
|
88
|
+
case "notification":
|
|
89
|
+
this.notification(message.name, message.value);
|
|
90
|
+
break;
|
|
91
|
+
case "call": {
|
|
92
|
+
if (!Number.isSafeInteger(message.id) || typeof message.method !== "string" || !Array.isArray(message.args) || this.incoming.has(message.id)) return;
|
|
93
|
+
const controller = new AbortController();
|
|
94
|
+
this.incoming.set(message.id, controller);
|
|
95
|
+
void Promise.resolve().then(() => this.dispatch(message.method, message.args, controller.signal)).then(
|
|
96
|
+
(value) => this.reply({ kind: "reply", id: message.id, value }),
|
|
97
|
+
(error) => this.reply({
|
|
98
|
+
kind: "reply",
|
|
99
|
+
id: message.id,
|
|
100
|
+
error: errorText(error),
|
|
101
|
+
...error instanceof AutoPermissionUnavailable ? { errorCode: "auto_permission_unavailable" } : {}
|
|
102
|
+
})
|
|
103
|
+
).finally(() => this.incoming.delete(message.id));
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
reply(message) {
|
|
109
|
+
if (this.failure) return;
|
|
110
|
+
try {
|
|
111
|
+
this.send(message);
|
|
112
|
+
} catch (error) {
|
|
113
|
+
this.close(new Error(errorText(error)));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
close(error) {
|
|
117
|
+
if (this.failure) return;
|
|
118
|
+
this.failure = error;
|
|
119
|
+
for (const pending of this.pending.values()) pending.reject(error);
|
|
120
|
+
this.pending.clear();
|
|
121
|
+
for (const controller of this.incoming.values()) controller.abort();
|
|
122
|
+
this.incoming.clear();
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export {
|
|
127
|
+
waitForAbort,
|
|
128
|
+
errorText,
|
|
129
|
+
WorkerRpc
|
|
130
|
+
};
|
|
@@ -39,6 +39,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
39
|
mod
|
|
40
40
|
));
|
|
41
41
|
|
|
42
|
+
// src/backend/permission-errors.ts
|
|
43
|
+
var AutoPermissionUnavailable = class extends Error {
|
|
44
|
+
};
|
|
45
|
+
|
|
42
46
|
// node_modules/zod/v4/classic/external.js
|
|
43
47
|
var external_exports = {};
|
|
44
48
|
__export(external_exports, {
|
|
@@ -19748,5 +19752,6 @@ export {
|
|
|
19748
19752
|
ZodIssueCode,
|
|
19749
19753
|
iso_exports,
|
|
19750
19754
|
coerce_exports,
|
|
19751
|
-
external_exports
|
|
19755
|
+
external_exports,
|
|
19756
|
+
AutoPermissionUnavailable
|
|
19752
19757
|
};
|