@sagentlab/navarch-runtime 0.1.139 → 0.1.141
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/dist/delivery.cjs +5 -4
- package/dist/local-browser.cjs +9 -3
- package/dist/prompt.cjs +1 -1
- package/package.json +1 -1
package/dist/delivery.cjs
CHANGED
|
@@ -176,10 +176,11 @@ function deliveryIncompleteSection(args) {
|
|
|
176
176
|
"so your earlier edits, commits, and branch are all still here — start with `git status` and",
|
|
177
177
|
"`git log --oneline` and continue from there rather than redoing the work.",
|
|
178
178
|
"",
|
|
179
|
-
"Inspect tracked and untracked changes before deciding what is undelivered work.
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
179
|
+
"Inspect tracked and untracked changes before deciding what is undelivered work. Required evidence",
|
|
180
|
+
"belongs in your final report or in task or issue comments; files in the worktree are not evidence.",
|
|
181
|
+
"Remove only temporary files you created (such as `.review-*/` scratch directories or evidence files",
|
|
182
|
+
"whose content you already reported), and restore only tracked edits you made solely for local checks.",
|
|
183
|
+
"Do not delete unfamiliar or pre-existing changes, hide leftovers with ignore rules, or commit scratch files.",
|
|
183
184
|
...(args.taskType === "review"
|
|
184
185
|
? [
|
|
185
186
|
"This is a read-only review task. The generic delivery failure does not authorize commits,",
|
package/dist/local-browser.cjs
CHANGED
|
@@ -97,6 +97,7 @@ function createLocalBrowser(options) {
|
|
|
97
97
|
await context?.close().catch(() => undefined);
|
|
98
98
|
context = undefined;
|
|
99
99
|
page = undefined;
|
|
100
|
+
notes = [];
|
|
100
101
|
try {
|
|
101
102
|
browser ??= await options.launch();
|
|
102
103
|
}
|
|
@@ -159,14 +160,20 @@ function createLocalBrowser(options) {
|
|
|
159
160
|
}
|
|
160
161
|
if (tree.length > MAX_SNAPSHOT_CHARS)
|
|
161
162
|
tree = `${tree.slice(0, MAX_SNAPSHOT_CHARS)}\n… (truncated)`;
|
|
163
|
+
const title = await active.title().catch(() => "");
|
|
164
|
+
// Take the notes only after the last await, so a tab that opens while
|
|
165
|
+
// this snapshot is being built is reported here (its body may still show
|
|
166
|
+
// the previous tab) instead of being cleared unreported.
|
|
167
|
+
const reported = notes;
|
|
168
|
+
notes = [];
|
|
162
169
|
const lines = [
|
|
163
170
|
...(heading ? [heading] : []),
|
|
164
|
-
...
|
|
171
|
+
...reported,
|
|
165
172
|
...(active.url().startsWith("chrome-error://")
|
|
166
173
|
? ["The last navigation failed or tried to leave this machine and was blocked. Use local_browser_open to continue."]
|
|
167
174
|
: []),
|
|
168
175
|
`URL: ${active.url()}`,
|
|
169
|
-
`Title: ${
|
|
176
|
+
`Title: ${title}`,
|
|
170
177
|
`Viewport: ${viewport}`,
|
|
171
178
|
...(logs.length ? ["Recent console/page errors:", ...logs.map((line) => ` ${line}`)] : []),
|
|
172
179
|
...(blocked.size
|
|
@@ -175,7 +182,6 @@ function createLocalBrowser(options) {
|
|
|
175
182
|
"",
|
|
176
183
|
tree,
|
|
177
184
|
];
|
|
178
|
-
notes = [];
|
|
179
185
|
return [{ type: "text", text: lines.join("\n") }];
|
|
180
186
|
}
|
|
181
187
|
/** Runs tool calls one at a time; a lease ending stops further use. */
|
package/dist/prompt.cjs
CHANGED
|
@@ -12,7 +12,7 @@ exports.renderCompletionRemediationPrompt = renderCompletionRemediationPrompt;
|
|
|
12
12
|
exports.renderResumedCompletionRemediationPrompt = renderResumedCompletionRemediationPrompt;
|
|
13
13
|
exports.renderHostedCheckpointNote = renderHostedCheckpointNote;
|
|
14
14
|
const CODE_GRAPH_GUIDANCE = "For JS/TS dependency inspection, the runtime provides `navarch-runtime code-graph --query <symbol-or-file> --mode search|callers|callees|impact --commit HEAD`. If the runtime is not on PATH, use its installed entry point; do not install another copy mid-task. Results describe committed source and include commit/freshness warnings; inspect current files for uncommitted changes and unresolved dependencies.";
|
|
15
|
-
const PROCESS_GUIDANCE = "Process management: this host may run other agent sessions. Keep the PID or tool handle of each preview server you start and stop only that owned process. Never use broad process-name or command-line matching (pkill, killall) to clean up servers: the agent launcher carries the task prompt in its arguments and can match those patterns, terminating your own session. Use a different port when a port is occupied by a process you do not own. Keep scratch files in the current worktree; paths in previous transcripts belong to earlier sessions. Before your final report, inspect `git status --short`, including untracked files.
|
|
15
|
+
const PROCESS_GUIDANCE = "Process management: this host may run other agent sessions. Keep the PID or tool handle of each preview server you start and stop only that owned process. Never use broad process-name or command-line matching (pkill, killall) to clean up servers: the agent launcher carries the task prompt in its arguments and can match those patterns, terminating your own session. Use a different port when a port is occupied by a process you do not own. Keep scratch files in the current worktree; paths in previous transcripts belong to earlier sessions. Before your final report, inspect `git status --short`, including untracked files. Put required evidence in your final report or in task or issue comments, not in files: a file left in the worktree is not delivered evidence, and an untracked one fails delivery as uncommitted work. Then remove only temporary files you created, including evidence files whose content you already reported, and restore only tracked edits you made solely for local checks. Do not delete unfamiliar or pre-existing changes, hide leftovers with ignore rules, or commit scratch files merely to make the worktree clean. Review tasks deliver a native review and attestation, never commits, pushes, or a new PR.";
|
|
16
16
|
/** Overrides the playbooks' "default branch" PR base when the project sets a working branch. */
|
|
17
17
|
function workingBranchNote(workingBranch) {
|
|
18
18
|
if (!workingBranch)
|
package/package.json
CHANGED