@bastani/atomic-acp 0.0.17 → 0.0.18
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 +7 -0
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -112,11 +112,18 @@ Set these in the `env` of your agent server entry:
|
|
|
112
112
|
| `ATOMIC_ACP_ATOMIC_ARGS` | unset | JSON array of extra arguments for every Atomic process |
|
|
113
113
|
| `ATOMIC_ACP_HEADLESS` | unset | `1` when no person can answer questions (see below) |
|
|
114
114
|
| `ATOMIC_ACP_ENABLE_EMBEDDED_CONTEXT` | unset | `true` lets the editor attach file contents directly to prompts |
|
|
115
|
+
| `ATOMIC_ACP_DIR` | unset | Directory for the adapter's own state (see below) |
|
|
115
116
|
|
|
116
117
|
Arguments after `--` also go to every Atomic process, for example `"args": ["--", "--model", "openai/gpt-6.1-sol"]`. Flags the adapter manages itself, such as `--mode` and the session flags, are refused at startup.
|
|
117
118
|
|
|
118
119
|
Everything else, including logins, models, skills, extensions and the session store, comes from your normal Atomic settings.
|
|
119
120
|
|
|
121
|
+
### The adapter's own state
|
|
122
|
+
|
|
123
|
+
The adapter keeps one file of its own, `session-map.json`, which records the project each session belongs to so it can be listed and loaded again. It lives in `~/.atomic/atomic-acp`, or in `ATOMIC_ACP_DIR` when that is set. The directory is made on first use, readable only by you.
|
|
124
|
+
|
|
125
|
+
Set `ATOMIC_ACP_DIR` when Atomic runs on a private agent directory (`ATOMIC_CODING_AGENT_DIR`) in a sandbox where your `~/.atomic` is read-only; otherwise starting a session fails because the map can't be written. A reload finds a session only through the same `ATOMIC_ACP_DIR` it was saved under.
|
|
126
|
+
|
|
120
127
|
### Headless clients
|
|
121
128
|
|
|
122
129
|
With `ATOMIC_ACP_HEADLESS=1`, questions end at once instead of waiting. `ask_user_question` tells the model that no person is available, and extension dialogs are cancelled.
|
package/dist/index.js
CHANGED
|
@@ -2249,16 +2249,17 @@ import { dirname } from "path";
|
|
|
2249
2249
|
// src/acp/paths.ts
|
|
2250
2250
|
import { homedir as homedir2 } from "os";
|
|
2251
2251
|
import { join as join4 } from "path";
|
|
2252
|
-
function getAtomicAcpDir() {
|
|
2253
|
-
|
|
2252
|
+
function getAtomicAcpDir(env = process.env) {
|
|
2253
|
+
const override = env.ATOMIC_ACP_DIR?.trim();
|
|
2254
|
+
return override ? resolveAtomicPath(override) : join4(homedir2(), ".atomic", "atomic-acp");
|
|
2254
2255
|
}
|
|
2255
|
-
function getAtomicAcpSessionMapPath() {
|
|
2256
|
-
return join4(getAtomicAcpDir(), "session-map.json");
|
|
2256
|
+
function getAtomicAcpSessionMapPath(env = process.env) {
|
|
2257
|
+
return join4(getAtomicAcpDir(env), "session-map.json");
|
|
2257
2258
|
}
|
|
2258
2259
|
|
|
2259
2260
|
// src/acp/session-store.ts
|
|
2260
2261
|
function ensureParentDir(path) {
|
|
2261
|
-
mkdirSync(dirname(path), { recursive: true });
|
|
2262
|
+
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
2262
2263
|
}
|
|
2263
2264
|
function loadFile(path) {
|
|
2264
2265
|
try {
|
|
@@ -2275,7 +2276,7 @@ function loadFile(path) {
|
|
|
2275
2276
|
function saveFile(path, data) {
|
|
2276
2277
|
ensureParentDir(path);
|
|
2277
2278
|
writeFileSync2(path, `${JSON.stringify(data, null, 2)}
|
|
2278
|
-
`, "utf-8");
|
|
2279
|
+
`, { encoding: "utf-8", mode: 384 });
|
|
2279
2280
|
}
|
|
2280
2281
|
var SessionStore = class {
|
|
2281
2282
|
path;
|