@lazyingart/agintiflow 0.20.78 → 0.20.79
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazyingart/agintiflow",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.79",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Low-cost, project-aware Web and CLI agents with DeepSeek/Venice/OpenAI routing, visible tool calls, durable sessions, scouts, AAPS, SCS, and guarded local execution.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -4,6 +4,7 @@ import os from "node:os";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { repairModelMessageHistory, runAgent, shouldShortCircuitToolBatch, skippedAfterBlockedToolResult } from "../src/agent-runner.js";
|
|
7
|
+
import { formatBehaviorContractForPrompt } from "../src/behavior-contract.js";
|
|
7
8
|
import { resolveRuntimeConfig } from "../src/config.js";
|
|
8
9
|
import { readCodebaseMap } from "../src/codebase-map.js";
|
|
9
10
|
import { evaluateCommandPolicy } from "../src/command-policy.js";
|
|
@@ -249,6 +250,15 @@ try {
|
|
|
249
250
|
guidance.includes("find . -type d -name __pycache__"),
|
|
250
251
|
"engineering guidance did not include recursive Python transient checks"
|
|
251
252
|
);
|
|
253
|
+
const behaviorContract = formatBehaviorContractForPrompt();
|
|
254
|
+
assert(
|
|
255
|
+
behaviorContract.includes("For tmux one-shot jobs"),
|
|
256
|
+
"behavior contract did not include tmux one-shot evidence guidance"
|
|
257
|
+
);
|
|
258
|
+
assert(
|
|
259
|
+
behaviorContract.includes("do not claim stdout, stderr, or exit status"),
|
|
260
|
+
"behavior contract did not forbid inferring tmux output after capture failure"
|
|
261
|
+
);
|
|
252
262
|
const dockerWorkspacePolicy = {
|
|
253
263
|
allowShellTool: true,
|
|
254
264
|
useDockerSandbox: true,
|
|
@@ -30,5 +30,6 @@ Workflow:
|
|
|
30
30
|
3. Use `tmux_start_session` for new durable host jobs rooted in the workspace.
|
|
31
31
|
4. Use `tmux_send_keys` sparingly and never send secrets, sudo passwords, destructive commands, or unreviewed pasted scripts.
|
|
32
32
|
5. For long commands, capture progress periodically and summarize the latest useful lines instead of flooding the chat.
|
|
33
|
+
6. For one-shot tmux jobs, redirect stdout, stderr, and exit status to a durable workspace log or keep the shell open long enough for `tmux_capture_pane`. If capture fails because the session already ended, do not infer output or exit status; say the tmux output is unavailable and rely only on separately verified evidence.
|
|
33
34
|
|
|
34
35
|
If host tmux is unavailable, report that limitation and suggest installing tmux on the host or using a future persistent service-container mode. If a package or sudo install is missing, report the exact command and whether it should run in Docker, host, or a user-owned tmux session.
|
package/src/agent-runner.js
CHANGED
|
@@ -428,8 +428,9 @@ async function createInitialState(config, sessionId) {
|
|
|
428
428
|
"Permission contract: current-workspace file writes are allowed through workspace file tools when enabled. Outside-workspace paths, host sudo, host OS package installs, destructive git/shell actions, and blocked network/setup must not be bypassed 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.",
|
|
429
429
|
"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.",
|
|
430
430
|
config.allowShellTool
|
|
431
|
-
|
|
432
|
-
|
|
431
|
+
? "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."
|
|
432
|
+
+ " 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."
|
|
433
|
+
: "",
|
|
433
434
|
config.allowFileTools
|
|
434
435
|
? `Workspace file tools are available in ${config.commandCwd}: inspect_project, list_files, read_file, search_files, write_file, apply_patch, open_workspace_file, and preview_workspace. For large or unfamiliar repositories, call inspect_project first, then search/read AGINTI.md/AGENTS.md/README/manifests as relevant before editing. apply_patch supports exact single-file replacements plus Codex-style/unified multi-file patches; prefer it for source edits after reading/searching the relevant context. Always use workspace-relative paths such as plot_fx.svg or docs/report.tex, never absolute host paths. For newly generated standalone prose/docs/stories/assets, choose a descriptive non-conflicting filename from the topic/language and use mode=create; do not overwrite existing files unless the user explicitly asked to update/replace/overwrite that file. Secret paths, .git internals, node_modules writes, and huge files are blocked. For generated local websites/pages, use open_workspace_file or preview_workspace instead of starting a localhost server inside Docker.`
|
|
435
436
|
: "No workspace file tools are available.",
|
|
@@ -884,7 +885,7 @@ async function captureSyntheticSnapshot(store, step, config) {
|
|
|
884
885
|
: `Shell tool available in: ${config.commandCwd} on ${platformLabel(platform)}. Use OS-compatible commands; prefer WSL/Docker for bash-heavy workflows on Windows.`
|
|
885
886
|
: "Shell tool disabled.",
|
|
886
887
|
config.allowShellTool
|
|
887
|
-
? "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."
|
|
888
|
+
? "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. 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."
|
|
888
889
|
: "",
|
|
889
890
|
config.allowFileTools
|
|
890
891
|
? `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.`
|
package/src/behavior-contract.js
CHANGED
|
@@ -75,6 +75,7 @@ export function formatBehaviorContractForPrompt({ mode = "runtime" } = {}) {
|
|
|
75
75
|
"Keep artifacts durable and discoverable with descriptive non-conflicting names; never overwrite unless the user clearly asked.",
|
|
76
76
|
"When reporting shell, language, runtime, build, or test results, name the actual environment used (host vs Docker, relevant interpreter/tool path/version when it matters). Do not claim compatibility across untested runtimes, hosts, containers, or language versions; state the caveat or run an explicit check.",
|
|
77
77
|
"Do not self-invoke AgInTiFlow with npx/npm exec or nested aginti commands from inside the agent shell; it can resolve stale project packages or create recursive sessions. Use current runtime evidence, project/session files, or ask for a host-side diagnostic instead.",
|
|
78
|
+
"For tmux one-shot jobs, do not claim stdout, stderr, or exit status after the session disappears unless that output was captured or redirected to a durable workspace log. Prefer commands that write `...; echo EXIT:$? > logs/...` or keep the pane open long enough for `tmux_capture_pane`; if capture fails, report tmux evidence unavailable and rely only on separately verified evidence.",
|
|
78
79
|
].join(" ");
|
|
79
80
|
}
|
|
80
81
|
|
package/src/model-client.js
CHANGED
|
@@ -769,7 +769,7 @@ export async function requestNextStep(client, config, messages) {
|
|
|
769
769
|
function: {
|
|
770
770
|
name: "tmux_capture_pane",
|
|
771
771
|
description:
|
|
772
|
-
"Capture recent text from a durable host tmux pane by target such as session:0.0. Use this to monitor progress or inspect a long-running job without interrupting it.",
|
|
772
|
+
"Capture recent text from a durable host tmux pane by target such as session:0.0. Use this to monitor progress or inspect a long-running job without interrupting it. If capture fails because the session ended, do not infer stdout/stderr/exit status; use a durable workspace log or rerun with output redirected to a file.",
|
|
773
773
|
parameters: {
|
|
774
774
|
type: "object",
|
|
775
775
|
properties: {
|
|
@@ -812,7 +812,7 @@ export async function requestNextStep(client, config, messages) {
|
|
|
812
812
|
function: {
|
|
813
813
|
name: "tmux_start_session",
|
|
814
814
|
description:
|
|
815
|
-
"Start a detached durable host tmux session rooted inside the workspace, optionally with a startup command. Use for long-running local jobs that should be monitored with tmux_capture_pane instead of blocking the agent. This is the correct tmux path in Docker mode because run_command containers are ephemeral.",
|
|
815
|
+
"Start a detached durable host tmux session rooted inside the workspace, optionally with a startup command. Use for long-running local jobs that should be monitored with tmux_capture_pane instead of blocking the agent. For one-shot commands, redirect output and exit status to a durable workspace log or keep the shell open so capture can verify; do not claim results from an auto-terminated session. This is the correct tmux path in Docker mode because run_command containers are ephemeral.",
|
|
816
816
|
parameters: {
|
|
817
817
|
type: "object",
|
|
818
818
|
properties: {
|