@lazyingart/agintiflow 0.20.117 → 0.20.118

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 CHANGED
@@ -170,7 +170,7 @@ aginti --resume <session-id> \
170
170
  "Take a fresh screenshot of the running app in the emulator, save it with a durable filename in this project, and keep git status clean."
171
171
  ```
172
172
 
173
- Permission behavior is intentionally consistent. Use `-s safe` for read-first sessions that ask before writes/setup, `-s normal` for current-project writes plus Docker setup, and `-s danger` for trusted host/full-access work. Inside chat, `/safe`, `/normal`, and `/danger` switch the current session. When a blocked action appears, CLI and web can offer `No`, `Yes this time`, or `Yes and always for this session` instead of making the agent retry command variants. Android/Gradle builds can use safe local env assignments such as `ANDROID_HOME=... JAVA_HOME=... ./gradlew assembleDebug` and relative workspace logs without requiring whole-host destructive mode. See [runtime modes and autonomy](docs/runtime-modes-and-autonomy.md) for the full contract.
173
+ Permission behavior is intentionally consistent. Use `-s safe` for read-first sessions that ask before writes/setup, `-s normal` for current-project writes plus Docker setup, and `-s danger` for trusted host/full-access work. In Docker workspace mode, common host data roots such as the user's home parent are mounted read-only at their original absolute paths so sibling projects and datasets can be inspected without granting host-write permission. Inside chat, `/safe`, `/normal`, and `/danger` switch the current session, and `/status` remains available while a run is active. When a blocked action appears, CLI and web can offer `No`, `Yes this time`, or `Yes and always for this session` instead of making the agent retry command variants. Android/Gradle builds can use safe local env assignments such as `ANDROID_HOME=... JAVA_HOME=... ./gradlew assembleDebug` and relative workspace logs without requiring whole-host destructive mode. See [runtime modes and autonomy](docs/runtime-modes-and-autonomy.md) for the full contract.
174
174
 
175
175
  Tmux follows the same rule. In Docker sandbox mode, `tmux_start_session` and `tmux_send_keys` are durable host tools, but their commands must stay workspace-bound. In host mode, tmux startup/send command text follows the same host shell policy as `run_command`; broad host shell work needs explicit `--allow-destructive`. Use `--sandbox-mode host --allow-destructive` only when a tmux task really needs trusted whole-host execution.
176
176
 
@@ -52,7 +52,7 @@ The runtime must be consistent when an action is not permitted. A blocked action
52
52
  Current contract:
53
53
 
54
54
  - `safe` asks before file-tool writes and package/setup actions. It is the right mode for inspection, review, and cautious first passes.
55
- - `normal` allows writes inside the current project folder and package/setup inside Docker workspace mode. It still blocks outside-project writes and host-system changes until approved.
55
+ - `normal` allows writes inside the current project folder, read-only inspection of visible host data roots, and package/setup inside Docker workspace mode. It still blocks outside-project writes and host-system changes until approved.
56
56
  - `danger` is trusted host/full-access mode: host shell, destructive actions, host installs, password typing, and outside-workspace file paths are enabled. Use it only for tasks you trust; obvious secret/publish exfiltration guards remain hard stops.
57
57
  - Workspace file tools may read and write inside the configured project folder when file tools are enabled.
58
58
  - Narrow workspace-local shell actions such as safe probes, Gradle/TeX builds, and `chmod +x` on a project script may run when the command policy can classify them precisely.
@@ -111,6 +111,8 @@ aginti
111
111
 
112
112
  This starts interactive chat with Docker workspace mode, file tools, shell tools, web search, and package installs allowed inside Docker.
113
113
 
114
+ Docker workspace mode also mounts common host data roots, such as the user's home parent, read-only at their original absolute paths. This lets a task in `/home/lachlan/ProjectsLFS/aginti-test` inspect a sibling dataset such as `/home/lachlan/ProjectsLFS/ProteinStructure` without switching to host-write mode. Outputs and edits still belong under `/workspace` unless the user explicitly approves stronger host permissions. Set `AGINTI_DOCKER_READONLY_HOST_MOUNTS=/path/a:/path/b` to override the read-only mounts, or set it to `off` to disable them.
115
+
114
116
  Direct trusted host mode:
115
117
 
116
118
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.20.117",
3
+ "version": "0.20.118",
4
4
  "type": "module",
5
5
  "description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
6
6
  "license": "Apache-2.0",
@@ -10,6 +10,7 @@ import {
10
10
  buildPromptLayout,
11
11
  buildPromptRenderSequence,
12
12
  ComposerHistory,
13
+ activeRunSlashCommandAction,
13
14
  canonicalSlashPromptBuffer,
14
15
  classifyEscapeAction,
15
16
  formatElapsedDuration,
@@ -368,6 +369,15 @@ try {
368
369
  if (classifyEscapeAction({ active: true, pendingAsap: [] }) !== "abort") {
369
370
  throw new Error("active Esc should abort when no ASAP pipe messages are pending");
370
371
  }
372
+ if (activeRunSlashCommandAction("/status") !== "status" || activeRunSlashCommandAction("/status verbose") !== "status") {
373
+ throw new Error("active /status should be allowed during a run");
374
+ }
375
+ if (activeRunSlashCommandAction("/scs") !== "blocked") {
376
+ throw new Error("active mutating slash commands should remain blocked during a run");
377
+ }
378
+ if (activeRunSlashCommandAction("continue writing") !== "") {
379
+ throw new Error("active normal input should still pipe into the running task");
380
+ }
371
381
  const composerHistory = new ComposerHistory([
372
382
  "first prompt",
373
383
  "second prompt\nwith code",
@@ -5,7 +5,7 @@ import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { readArtifactContent } from "../src/artifact-tunnel.js";
7
7
  import { evaluateCommandPolicy } from "../src/command-policy.js";
8
- import { runDockerPreflight, runDockerSandboxCommand } from "../src/docker-sandbox.js";
8
+ import { dockerReadOnlyHostMounts, runDockerPreflight, runDockerSandboxCommand } from "../src/docker-sandbox.js";
9
9
  import { resolveRuntimeConfig } from "../src/config.js";
10
10
 
11
11
  const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
@@ -13,7 +13,10 @@ const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), "agintiflow-toolchain-"
13
13
  process.env.AGINTIFLOW_HOME = path.join(tempRoot, ".agintiflow-home");
14
14
  const runtimeDir = path.join(tempRoot, "runtime");
15
15
  const workspace = path.join(tempRoot, "workspace");
16
+ const outsideData = path.join(tempRoot, "outside-data");
16
17
  await fs.mkdir(workspace, { recursive: true });
18
+ await fs.mkdir(outsideData, { recursive: true });
19
+ process.env.AGINTI_DOCKER_READONLY_HOST_MOUNTS = tempRoot;
17
20
 
18
21
  function assert(condition, message) {
19
22
  if (!condition) throw new Error(message);
@@ -53,6 +56,14 @@ try {
53
56
 
54
57
  const preflight = await runDockerPreflight(config, { buildImage: false });
55
58
  assert(preflight.ok, "Docker toolchain preflight failed. Run scripts/setup-agent-toolchain-docker.sh first.");
59
+ assert(
60
+ dockerReadOnlyHostMounts(config).includes(tempRoot),
61
+ "Docker read-only host mount configuration did not include the requested outside-data root"
62
+ );
63
+
64
+ await fs.writeFile(path.join(outsideData, "source-note.txt"), "READ_ONLY_HOST_MOUNT_OK\n", "utf8");
65
+ const outsideRead = await runToolchainCommand(`cat ${path.join(outsideData, "source-note.txt")}`, config);
66
+ assert(outsideRead.stdout.includes("READ_ONLY_HOST_MOUNT_OK"), "Docker normal mode could not read the configured outside data root");
56
67
 
57
68
  await fs.writeFile(
58
69
  path.join(workspace, "plot_fx.py"),
@@ -174,6 +185,7 @@ try {
174
185
  ok: true,
175
186
  image: config.dockerSandboxImage,
176
187
  workspace,
188
+ outsideReadRoot: outsideData,
177
189
  outputs: ["plot_fx.svg", "paper.pdf", "figure-note/fx_figure.pdf", "figure-note/figure_note.pdf"],
178
190
  artifactKinds: ["image/svg+xml", "application/pdf"],
179
191
  },
@@ -580,13 +580,13 @@ async function createInitialState(config, sessionId) {
580
580
  "Treat AGINTI.md as durable project memory and operating instructions for this project. The user can edit it manually or ask you in chat to update it; use workspace file tools for that and never store secrets there.",
581
581
  config.allowShellTool
582
582
  ? config.useDockerSandbox
583
- ? `A shell command tool is available inside Docker sandbox mode ${config.sandboxMode}. Docker workspace mode with approved package installs supports broader setup and network commands. The project is mounted at /workspace and the persistent agent toolchain is mounted at /aginti-env with caches under /aginti-cache. Do not run npx aginti, npm exec aginti, or nested aginti diagnostics from this Docker shell; they may resolve stale project packages or create recursive agent sessions.`
583
+ ? `A shell command tool is available inside Docker sandbox mode ${config.sandboxMode}. Docker workspace mode with approved package installs supports broader setup and network commands. The project is mounted at /workspace, persistent agent toolchain state is mounted at /aginti-env with caches under /aginti-cache, and common host data roots such as the user's home parent are mounted read-only at their original absolute paths. Use /workspace for outputs and writes; use absolute host paths only for read-only inspection when visible. Do not run npx aginti, npm exec aginti, or nested aginti diagnostics from this Docker shell; they may resolve stale project packages or create recursive agent sessions.`
584
584
  : `A host shell command tool is available under the configured trust policy on ${platformLabel(platform)}. On native Windows, prefer PowerShell/cmd-compatible commands or switch to WSL/Docker for bash-like toolchains.`
585
585
  : "No shell command tool is available.",
586
- `Permission contract: permission mode is ${config.permissionMode || "normal"}. Safe mode asks before workspace writes/setup. Normal mode allows current-project writes and approved Docker setup, but outside-workspace paths and host-system changes require approval. Danger mode is trusted host/full-access mode. Do not bypass blockers by retrying variants. If a tool result includes permissionAdvice or suggestedCommand, stop, explain the blocker, copy the exact suggestedCommand when giving a rerun path, and ask the user to approve/rerun that mode or choose a safer workspace-relative path. Never invent legacy AgInTi syntax such as \`aginti run --sandbox host\`; use the exact flags from permissionAdvice.`,
586
+ `Permission contract: permission mode is ${config.permissionMode || "normal"}. Safe mode asks before workspace writes/setup. Normal mode allows current-project writes, read-only inspection of visible host paths, and approved Docker setup, but outside-workspace writes and host-system changes require approval. Danger mode is trusted host/full-access mode. Do not bypass blockers by retrying variants. If a tool result includes permissionAdvice or suggestedCommand, stop, explain the blocker, copy the exact suggestedCommand when giving a rerun path, and ask the user to approve/rerun that mode or choose a safer workspace-relative path. Never invent legacy AgInTi syntax such as \`aginti run --sandbox host\`; use the exact flags from permissionAdvice.`,
587
587
  "If an operation fails but a directory, artifact, or file already exists, treat it as pre-existing unless you have evidence this run created or updated it. Verify expected outputs before claiming success.",
588
588
  config.allowShellTool
589
- ? "Host tmux tools are available for long-running terminals: list sessions, capture panes, send safe keys/text, and start detached sessions. Prefer these tools for monitoring long installs/tests/dev servers without blocking; capture before sending input and never send secrets or sudo passwords. Do not start or install tmux inside Docker run_command containers because those containers are short-lived. In Docker sandbox mode, tmux start/send commands must stay workspace-bound and must not reference absolute host paths outside the project; ask for --sandbox-mode host for trusted whole-host work."
589
+ ? "Host tmux tools are available for long-running terminals: list sessions, capture panes, send safe keys/text, and start detached sessions. Prefer these tools for monitoring long installs/tests/dev servers without blocking; capture before sending input and never send secrets or sudo passwords. Do not start or install tmux inside Docker run_command containers because those containers are short-lived. In Docker sandbox mode, tmux start/send commands must stay workspace-write-bound; prefer run_command for read-only host absolute path inspection through read-only mounts, and ask for --sandbox-mode host for trusted whole-host write/system work."
590
590
  + " For one-shot tmux commands, redirect stdout/stderr and exit status to a durable workspace log or keep the pane alive for capture; if capture fails because the session ended, do not infer output or exit status."
591
591
  : "",
592
592
  config.allowFileTools
@@ -640,7 +640,7 @@ async function createInitialState(config, sessionId) {
640
640
  config.allowedDomains.length > 0 ? `Allowed domains: ${config.allowedDomains.join(", ")}` : "",
641
641
  config.allowShellTool
642
642
  ? config.useDockerSandbox
643
- ? `Shell working directory mounted into Docker as /workspace from ${config.commandCwd}. Use relative paths or /workspace paths, not absolute host temp paths. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
643
+ ? `Shell working directory mounted into Docker as /workspace from ${config.commandCwd}. Use relative paths or /workspace paths for outputs/writes; common host data roots are read-only at original absolute paths for inspection. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
644
644
  : `Shell working directory: ${config.commandCwd}`
645
645
  : "",
646
646
  config.allowFileTools
@@ -1008,7 +1008,7 @@ async function applyContinuationPrompt(state, config, observers) {
1008
1008
  config.allowedDomains.length > 0 ? `Allowed domains: ${config.allowedDomains.join(", ")}` : "",
1009
1009
  config.allowShellTool
1010
1010
  ? config.useDockerSandbox
1011
- ? `Shell working directory mounted into Docker as /workspace from ${config.commandCwd}. Use relative paths or /workspace paths. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
1011
+ ? `Shell working directory mounted into Docker as /workspace from ${config.commandCwd}. Use relative paths or /workspace paths for outputs/writes; common host data roots are read-only at original absolute paths for inspection. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
1012
1012
  : `Shell working directory: ${config.commandCwd}. Host platform: ${platformLabel(platform)}. Use OS-compatible commands; prefer WSL/Docker for bash-heavy workflows on Windows.`
1013
1013
  : "",
1014
1014
  config.allowFileTools
@@ -1297,11 +1297,11 @@ async function captureSyntheticSnapshot(store, step, config) {
1297
1297
  config.startUrl ? `Suggested start URL: ${config.startUrl}` : "",
1298
1298
  config.allowShellTool
1299
1299
  ? config.useDockerSandbox
1300
- ? `Shell tool available in Docker with mounted workspace /workspace from ${config.commandCwd}. Use relative paths or /workspace paths. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
1300
+ ? `Shell tool available in Docker with mounted workspace /workspace from ${config.commandCwd}. Use relative paths or /workspace paths for outputs/writes; common host data roots are read-only at original absolute paths for inspection. Persistent Docker env: /aginti-env, caches: /aginti-cache. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}.`
1301
1301
  : `Shell tool available in: ${config.commandCwd} on ${platformLabel(platform)}. Use OS-compatible commands; prefer WSL/Docker for bash-heavy workflows on Windows.`
1302
1302
  : "Shell tool disabled.",
1303
1303
  config.allowShellTool
1304
- ? "Host tmux tools available: tmux_list_sessions, tmux_capture_pane, tmux_send_keys, tmux_start_session. Use them for long-running jobs and agent terminals; capture before sending input. Docker run_command containers are ephemeral, so tmux there will not persist. In Docker sandbox mode, tmux start/send commands must stay workspace-bound and cannot reference absolute host paths outside the project; when sending text into a shell pane, tmux follows the same Docker workspace command policy as run_command and is not a bypass for package installs, destructive git history rewrites, or broad shell text. Use --sandbox-mode host for trusted whole-host work. In host mode, tmux startup/send command text follows the same host shell policy as run_command; if a broad host command is blocked, present the approval/rerun path instead of trying tmux as a workaround. For one-shot tmux commands, redirect output and exit status to a durable workspace log or keep the pane alive for capture; if capture fails because the session ended, do not infer output or exit status."
1304
+ ? "Host tmux tools available: tmux_list_sessions, tmux_capture_pane, tmux_send_keys, tmux_start_session. Use them for long-running jobs and agent terminals; capture before sending input. Docker run_command containers are ephemeral, so tmux there will not persist. In Docker sandbox mode, tmux start/send commands must stay workspace-write-bound; when sending text into a shell pane, tmux follows the same Docker workspace command policy as run_command and is not a bypass for package installs, destructive git history rewrites, or broad shell text. Prefer run_command for read-only host absolute path inspection through read-only mounts. Use --sandbox-mode host for trusted whole-host write/system work. In host mode, tmux startup/send command text follows the same host shell policy as run_command; if a broad host command is blocked, present the approval/rerun path instead of trying tmux as a workaround. For one-shot tmux commands, redirect output and exit status to a durable workspace log or keep the pane alive for capture; if capture fails because the session ended, do not infer output or exit status."
1305
1305
  : "",
1306
1306
  config.allowFileTools
1307
1307
  ? `Workspace file tools available in: ${config.commandCwd}. Use inspect_project first for large or unfamiliar codebases, then search/read exact files before editing. Use workspace-relative paths. Use apply_patch for code edits; it supports exact single-file replacement and multi-file Codex-style/unified patches. For new standalone generated content, pick a descriptive non-conflicting filename and avoid overwriting unless explicitly requested.`
@@ -1,4 +1,4 @@
1
- import { constants as fsConstants } from "node:fs";
1
+ import fsSync, { constants as fsConstants } from "node:fs";
2
2
  import fs from "node:fs/promises";
3
3
  import os from "node:os";
4
4
  import path from "node:path";
@@ -15,6 +15,7 @@ const DOCKER_ENV = "/aginti-env";
15
15
  const READY_IMAGES = new Set();
16
16
  const SANDBOX_LOG_LIMIT = 80;
17
17
  const sandboxLogs = [];
18
+ const DISABLE_HOST_READ_MOUNTS = new Set(["0", "false", "no", "off", "none"]);
18
19
 
19
20
  function recordSandboxLog(type, data = {}) {
20
21
  sandboxLogs.push({
@@ -140,6 +141,30 @@ function persistentDockerDirs(config) {
140
141
  };
141
142
  }
142
143
 
144
+ function uniqueHostMounts(mounts = []) {
145
+ const seen = new Set();
146
+ const result = [];
147
+ for (const mount of mounts) {
148
+ const normalized = path.resolve(String(mount || "").trim());
149
+ if (!normalized || normalized === "/" || seen.has(normalized)) continue;
150
+ if (!path.isAbsolute(normalized) || !fsSync.existsSync(normalized)) continue;
151
+ seen.add(normalized);
152
+ result.push(normalized);
153
+ }
154
+ return result;
155
+ }
156
+
157
+ export function dockerReadOnlyHostMounts(config = {}, sandboxMode = normalizeSandboxMode(config.sandboxMode)) {
158
+ if (sandboxMode !== "docker-workspace") return [];
159
+ const configured = process.env.AGINTI_DOCKER_READONLY_HOST_MOUNTS || process.env.AGINTI_DOCKER_HOST_READ_MOUNTS || "";
160
+ if (DISABLE_HOST_READ_MOUNTS.has(configured.trim().toLowerCase())) return [];
161
+ if (Array.isArray(config.readOnlyHostMounts)) return uniqueHostMounts(config.readOnlyHostMounts);
162
+ if (configured.trim()) return uniqueHostMounts(configured.split(path.delimiter));
163
+
164
+ const homeParent = path.dirname(os.homedir() || "");
165
+ return uniqueHostMounts([homeParent, "/mnt", "/media", "/Volumes"]);
166
+ }
167
+
143
168
  async function ensurePersistentDockerDirs(config) {
144
169
  const dirs = persistentDockerDirs(config);
145
170
  await Promise.all([fs.mkdir(dirs.home, { recursive: true }), fs.mkdir(dirs.cache, { recursive: true }), fs.mkdir(dirs.env, { recursive: true })]);
@@ -265,6 +290,7 @@ function dockerRunArgs(command, config, policy = evaluateCommandPolicy(command,
265
290
  const mountMode = sandboxMode === "docker-workspace" ? "rw" : "ro";
266
291
  const networkMode = policy.needsNetwork ? "bridge" : "none";
267
292
  const toolchain = policy.category === "toolchain";
293
+ const readOnlyHostMountArgs = dockerReadOnlyHostMounts(config, sandboxMode).flatMap((mount) => ["-v", `${mount}:${mount}:ro`]);
268
294
  const readOnlyArgs =
269
295
  mountMode === "ro"
270
296
  ? ["--read-only", "--tmpfs", "/tmp:rw,nosuid,nodev,size=128m"]
@@ -291,6 +317,7 @@ function dockerRunArgs(command, config, policy = evaluateCommandPolicy(command,
291
317
  "NPM_CONFIG_USERCONFIG=/tmp/.npmrc",
292
318
  "-e",
293
319
  "PIP_DISABLE_PIP_VERSION_CHECK=1",
320
+ ...readOnlyHostMountArgs,
294
321
  "-v",
295
322
  `${config.commandCwd}:${DOCKER_WORKSPACE}:${mountMode}`,
296
323
  "-v",
@@ -1182,6 +1182,13 @@ export function classifyEscapeAction({ active = false, pendingAsap = [] } = {})
1182
1182
  return Array.isArray(pendingAsap) && pendingAsap.length > 0 ? "wait-for-asap" : "abort";
1183
1183
  }
1184
1184
 
1185
+ export function activeRunSlashCommandAction(value = "") {
1186
+ const content = canonicalSlashPromptBuffer(value).trim();
1187
+ if (!content.startsWith("/")) return "";
1188
+ if (/^\/status(?:\s|$)/.test(content)) return "status";
1189
+ return "blocked";
1190
+ }
1191
+
1185
1192
  function readTtyPrompt(options = {}) {
1186
1193
  return new Promise((resolve, reject) => {
1187
1194
  emitKeypressEvents(input);
@@ -1581,8 +1588,18 @@ class LiveRunInput {
1581
1588
  async submitAsap() {
1582
1589
  const content = this.buffer.trim();
1583
1590
  if (!content) return;
1584
- if (content.startsWith("/")) {
1585
- this.printLine(`${label("warn", ansi.red)} Slash commands are disabled while a run is active. Press Esc/Ctrl+C to stop, or wait until idle.`);
1591
+ const slashAction = activeRunSlashCommandAction(content);
1592
+ if (slashAction === "status") {
1593
+ this.setBuffer("");
1594
+ printStatus(this.state);
1595
+ if (this.pendingAsap.length || this.pendingQueued.length) {
1596
+ printSystemLine(`pending asap=${this.pendingAsap.length} queued=${this.pendingQueued.length}`);
1597
+ }
1598
+ this.redraw();
1599
+ return;
1600
+ }
1601
+ if (slashAction === "blocked") {
1602
+ this.printLine(`${label("warn", ansi.red)} Slash commands are disabled while a run is active except /status. Press Esc/Ctrl+C to stop, or wait until idle.`);
1586
1603
  this.setStatus(`running · command ${compactLine(content, 24)} not accepted during active run`);
1587
1604
  return;
1588
1605
  }
@@ -1610,7 +1627,14 @@ class LiveRunInput {
1610
1627
  queueAfterFinish() {
1611
1628
  const content = this.buffer.trim();
1612
1629
  if (!content) return;
1613
- if (content.startsWith("/")) {
1630
+ const slashAction = activeRunSlashCommandAction(content);
1631
+ if (slashAction === "status") {
1632
+ this.setBuffer("");
1633
+ printStatus(this.state);
1634
+ this.redraw();
1635
+ return;
1636
+ }
1637
+ if (slashAction === "blocked") {
1614
1638
  this.printLine(`${label("warn", ansi.red)} Slash commands cannot be queued during a run. Wait until idle, then run ${content}.`);
1615
1639
  this.setStatus(`running · command ${compactLine(content, 24)} not queued`);
1616
1640
  return;
@@ -603,10 +603,10 @@ export async function createPlan(client, config, state) {
603
603
  state.startUrl ? `Suggested start URL: ${state.startUrl}` : "",
604
604
  config.allowedDomains.length > 0 ? `Allowed domains: ${config.allowedDomains.join(", ")}` : "",
605
605
  config.allowShellTool
606
- ? `Shell tool is enabled in ${config.commandCwd}. Host platform: ${platformLabel(platform)}. In Docker, this path is mounted as /workspace with persistent /aginti-env and /aginti-cache mounts. Use relative paths or /workspace paths, not absolute host temp paths. Permission mode: ${config.permissionMode || "normal"}. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}. For npm/pip/conda/venv setup, explain the need and wait for approval unless policy is allow. Do not run npx aginti, npm exec aginti, or nested aginti diagnostics from this shell; they may resolve stale project packages or create recursive agent sessions. On native Windows host mode, prefer PowerShell/cmd-compatible commands or WSL/Docker for bash-like toolchains.`
606
+ ? `Shell tool is enabled in ${config.commandCwd}. Host platform: ${platformLabel(platform)}. In Docker, this path is mounted as /workspace with persistent /aginti-env and /aginti-cache mounts, and common host data roots such as the user's home parent are mounted read-only at their original absolute paths for inspection. Use relative paths or /workspace for outputs and writes. Absolute host paths are acceptable for read-only inspection when visible, but do not write outside /workspace unless the user approves host mode. Permission mode: ${config.permissionMode || "normal"}. Sandbox mode: ${config.sandboxMode}. Package install policy: ${config.packageInstallPolicy}. For npm/pip/conda/venv setup, explain the need and wait for approval unless policy is allow. Do not run npx aginti, npm exec aginti, or nested aginti diagnostics from this shell; they may resolve stale project packages or create recursive agent sessions. On native Windows host mode, prefer PowerShell/cmd-compatible commands or WSL/Docker for bash-like toolchains.`
607
607
  : "",
608
608
  config.allowShellTool
609
- ? "Host tmux tools are enabled for long-running sessions. Plan to use tmux_start_session for durable jobs, tmux_capture_pane to monitor, tmux_send_keys to interact after capture, and tmux_list_sessions to discover existing sessions. Do not install or run tmux inside Docker run_command containers; those containers are short-lived and cannot preserve tmux servers. In Docker sandbox mode, tmux startup/send commands are still workspace-bound and shell-pane text follows the same Docker workspace command policy as run_command: use relative project paths, not absolute host paths outside the workspace, and do not use tmux as a workaround for package installs, destructive git rewrites, or broad shell commands. In host mode, tmux startup/send command text follows the same host shell policy as run_command; if blocked, present the suggested approval/rerun path instead of trying tmux as a workaround. Ask for --sandbox-mode host --allow-destructive before trusted whole-host tmux work."
609
+ ? "Host tmux tools are enabled for long-running sessions. Plan to use tmux_start_session for durable jobs, tmux_capture_pane to monitor, tmux_send_keys to interact after capture, and tmux_list_sessions to discover existing sessions. Do not install or run tmux inside Docker run_command containers; those containers are short-lived and cannot preserve tmux servers. In Docker sandbox mode, tmux startup/send commands are still workspace-write-bound and shell-pane text follows the same Docker workspace command policy as run_command: use relative project paths for writes and outputs. Read-only inspection of visible host absolute paths is allowed through run_command's read-only mounts; do not use tmux as a workaround for package installs, destructive git rewrites, or broad shell commands. In host mode, tmux startup/send command text follows the same host shell policy as run_command; if blocked, present the suggested approval/rerun path instead of trying tmux as a workaround. Ask for --sandbox-mode host --allow-destructive before trusted whole-host write/system work."
610
610
  : "",
611
611
  config.allowFileTools
612
612
  ? `Workspace file tools are enabled in ${config.commandCwd}: inspect_project, list_files, read_file, search_files, write_file, apply_patch, open_workspace_file, preview_workspace. For large or unfamiliar repos, plan to call inspect_project first, then search/read AGINTI.md/AGENTS.md/README/manifests and exact files. apply_patch supports exact single-file replacements and Codex-style/unified multi-file patches; prefer it for edits after reading relevant context. Keep all paths workspace-relative, for example plot_fx.svg or docs/report.tex, and avoid secrets. For newly generated standalone prose/docs/stories/assets, choose a descriptive non-conflicting filename from the topic/language instead of generic names like story.txt or output.txt; do not overwrite existing files unless the user explicitly asked to update/replace/overwrite that file. For generated local HTML/SVG/PDF/static sites, plan to use open_workspace_file or preview_workspace rather than starting a localhost server inside Docker.`