@hachej/boring-agent 0.1.50 → 0.1.51
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 +2 -1
- package/dist/server/index.js +7 -2
- package/docs/runtime.md +25 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -54,7 +54,8 @@ function App() {
|
|
|
54
54
|
|
|
55
55
|
Set an API key for the model provider (e.g. `ANTHROPIC_API_KEY`). Common env
|
|
56
56
|
vars: `BORING_AGENT_MODE` (default `direct`), `BORING_AGENT_WORKSPACE_ROOT`
|
|
57
|
-
(default cwd), `
|
|
57
|
+
(default cwd), `BORING_AGENT_SESSION_ROOT` (durable Pi session storage),
|
|
58
|
+
`BORING_AGENT_PORT`, and the `BORING_AGENT_DEFAULT_MODEL*` /
|
|
58
59
|
`BORING_AGENT_CUSTOM_MODEL*` / `BORING_AGENT_INFOMANIAK*` provider settings. See
|
|
59
60
|
[docs/runtime.md](./docs/runtime.md) and [docs/API.md](./docs/API.md).
|
|
60
61
|
|
package/dist/server/index.js
CHANGED
|
@@ -6053,19 +6053,24 @@ import {
|
|
|
6053
6053
|
parseSessionEntries,
|
|
6054
6054
|
CURRENT_SESSION_VERSION
|
|
6055
6055
|
} from "@mariozechner/pi-coding-agent";
|
|
6056
|
+
function sessionBaseDir() {
|
|
6057
|
+
const configured = getEnv(SESSION_ROOT_ENV)?.trim();
|
|
6058
|
+
return configured ? resolve7(configured) : join10(homedir3(), ".pi", "agent", "sessions");
|
|
6059
|
+
}
|
|
6056
6060
|
function defaultSessionDir(cwd) {
|
|
6057
6061
|
const safePath = `--${cwd.replace(/^[/\\]/, "").replace(/[/\\:]/g, "-")}--`;
|
|
6058
|
-
return join10(
|
|
6062
|
+
return join10(sessionBaseDir(), safePath);
|
|
6059
6063
|
}
|
|
6060
6064
|
var SAFE_ID = /^[a-zA-Z0-9_-]+$/;
|
|
6061
6065
|
var SAFE_SESSION_NAMESPACE = /^[a-zA-Z0-9_-]+$/;
|
|
6066
|
+
var SESSION_ROOT_ENV = "BORING_AGENT_SESSION_ROOT";
|
|
6062
6067
|
var SUMMARY_PREFIX_BYTES = 64 * 1024;
|
|
6063
6068
|
function sessionDirForNamespace(namespace) {
|
|
6064
6069
|
const safeNamespace = namespace.trim();
|
|
6065
6070
|
if (!SAFE_SESSION_NAMESPACE.test(safeNamespace)) {
|
|
6066
6071
|
throw new Error("session namespace must contain only letters, numbers, underscores, and dashes");
|
|
6067
6072
|
}
|
|
6068
|
-
return join10(
|
|
6073
|
+
return join10(sessionBaseDir(), safeNamespace);
|
|
6069
6074
|
}
|
|
6070
6075
|
function normalizeListOptions(options) {
|
|
6071
6076
|
return {
|
package/docs/runtime.md
CHANGED
|
@@ -199,6 +199,31 @@ In `direct` mode this is also the model-visible workspace root. In isolated
|
|
|
199
199
|
modes, the adapter maps that host path into the public runtime namespace
|
|
200
200
|
(`/workspace`).
|
|
201
201
|
|
|
202
|
+
### Production storage roots in `vercel-sandbox` mode
|
|
203
|
+
|
|
204
|
+
In a Fly-hosted app using `BORING_AGENT_MODE=vercel-sandbox`, there are two
|
|
205
|
+
filesystems with different jobs:
|
|
206
|
+
|
|
207
|
+
```txt
|
|
208
|
+
Fly app container / mounted volume:
|
|
209
|
+
/data/workspaces/<workspaceId> host/control-plane workspace anchor
|
|
210
|
+
/data/pi-sessions/<workspaceId> durable chat transcript storage
|
|
211
|
+
|
|
212
|
+
Vercel sandbox:
|
|
213
|
+
/workspace agent-visible cwd, file tree, and shell root
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
`BORING_AGENT_WORKSPACE_ROOT=/data/workspaces` is a host-side configuration
|
|
217
|
+
input. Core resolves each authorized workspace to `/data/workspaces/<id>` and
|
|
218
|
+
ensures that directory exists so host-side resource lookups have a durable,
|
|
219
|
+
workspace-scoped anchor. In `vercel-sandbox` mode, it is not where normal agent
|
|
220
|
+
file edits, shell output, Python files, or uploaded workspace files should live.
|
|
221
|
+
Those belong to the sandbox runtime root, `/workspace`.
|
|
222
|
+
|
|
223
|
+
Production chat history also must not use the container root filesystem. Set
|
|
224
|
+
`BORING_AGENT_SESSION_ROOT` to a mounted-volume path such as `/data/pi-sessions`
|
|
225
|
+
so Pi wrapper/native transcripts survive Fly deploys and restarts.
|
|
226
|
+
|
|
202
227
|
## Adding a custom runtime mode
|
|
203
228
|
|
|
204
229
|
A mode is a `RuntimeModeAdapter` (defined in `src/server/runtime/mode.ts`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hachej/boring-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Pane-embeddable coding agent. Ships direct/local/vercel-sandbox execution modes behind one interface.",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"use-stick-to-bottom": "^1.1.3",
|
|
75
75
|
"yaml": "^2.8.3",
|
|
76
76
|
"zod": "^3.25.76",
|
|
77
|
-
"@hachej/boring-ui-kit": "0.1.
|
|
77
|
+
"@hachej/boring-ui-kit": "0.1.51"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@antithesishq/bombadil": "0.5.0",
|