tesseract-agent 0.10.1 → 0.10.3
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-bundle/cli.js +64 -10
- package/package.json +1 -1
package/dist-bundle/cli.js
CHANGED
|
@@ -24216,6 +24216,29 @@ CRITICAL RULES:
|
|
|
24216
24216
|
- When element selectors are provided, use click or evaluate to interact.
|
|
24217
24217
|
- You can read and edit project source files if a project directory is configured.
|
|
24218
24218
|
- Always confirm before making destructive changes to source files.`
|
|
24219
|
+
},
|
|
24220
|
+
{
|
|
24221
|
+
id: "agent.system.unattended-report",
|
|
24222
|
+
group: "agent",
|
|
24223
|
+
label: "Unattended run \u2014 closing report",
|
|
24224
|
+
help: "Appended for the whole of any unattended run (the user opted in, or a scheduled fire). Nobody watched it, so the final message is the only account anyone will read \u2014 this asks for it in plain language, with the status and anything still blocked stated outright.",
|
|
24225
|
+
vars: [],
|
|
24226
|
+
content: `UNATTENDED RUN \u2014 FINISH WITH AN EXECUTIVE REPORT.
|
|
24227
|
+
|
|
24228
|
+
Nobody is watching this run, so your final message is the only account of it anyone will read.
|
|
24229
|
+
End with a short report in PLAIN LANGUAGE \u2014 no jargon, no tool names, no file paths or symbols
|
|
24230
|
+
unless one of them IS the point, and do not restate these instructions. Cover, briefly:
|
|
24231
|
+
|
|
24232
|
+
- WHAT WAS DONE \u2014 the outcome in a sentence or two, described as what changed for the user
|
|
24233
|
+
rather than which steps you took.
|
|
24234
|
+
- STATUS \u2014 finished, partly finished, or not done. Say which plainly, in those terms.
|
|
24235
|
+
- BLOCKERS AND DECISIONS \u2014 anything that stopped you, anything you skipped, any choice you made
|
|
24236
|
+
on the user's behalf, and anything a person now has to do themselves. Write "nothing
|
|
24237
|
+
outstanding" when that is genuinely true.
|
|
24238
|
+
|
|
24239
|
+
Be honest rather than reassuring. A run that half-worked and says so is useful; one that claims
|
|
24240
|
+
a success it cannot show is worse than a failure. If you were declined something, or answered
|
|
24241
|
+
your own question because no one was there, say so here.`
|
|
24219
24242
|
},
|
|
24220
24243
|
{
|
|
24221
24244
|
id: "agent.system.page-info",
|
|
@@ -24257,6 +24280,30 @@ This is a guided website build. Read \`.tesseract/brief.md\` (the user's brief),
|
|
|
24257
24280
|
3. After approval, scaffold and implement the project (use the appropriate framework for the brief), reproducing the reference's structure & style with ORIGINAL copy, themed strictly by the design tokens.
|
|
24258
24281
|
4. Keep the dev server runnable and tell the user the local preview URL.
|
|
24259
24282
|
Never paste these protocol instructions into the conversation.`
|
|
24283
|
+
},
|
|
24284
|
+
{
|
|
24285
|
+
id: "agent.unattended.decide",
|
|
24286
|
+
group: "agent",
|
|
24287
|
+
label: "Unattended \u2014 answer it yourself",
|
|
24288
|
+
help: "Sent back to the agent when it asks a question during an unattended run. There is no human to pick an option in either mode, so the question is handed straight back rather than parked.",
|
|
24289
|
+
vars: [],
|
|
24290
|
+
content: `This is an unattended run \u2014 nobody is at the keyboard to answer, and no answer is coming. Choose the best option yourself, proceed, and briefly note which decision you made and why.`
|
|
24291
|
+
},
|
|
24292
|
+
{
|
|
24293
|
+
id: "agent.unattended.decline",
|
|
24294
|
+
group: "agent",
|
|
24295
|
+
label: "Unattended \u2014 request declined",
|
|
24296
|
+
help: "Sent when a scheduled run asks for something it will not be granted. Declining unblocks the turn; parking would hang it for ever, since a scheduled fire has no client to answer.",
|
|
24297
|
+
vars: [],
|
|
24298
|
+
content: `This is a scheduled unattended run \u2014 there is no one to approve this, so it is declined rather than left waiting. Continue with what you can do without it, and say clearly in your final message what you skipped and why.`
|
|
24299
|
+
},
|
|
24300
|
+
{
|
|
24301
|
+
id: "agent.unattended.capped",
|
|
24302
|
+
group: "agent",
|
|
24303
|
+
label: "Unattended \u2014 decision budget spent",
|
|
24304
|
+
help: "Sent once a turn has burned its whole auto-answer budget, which means it is looping rather than progressing. Ends the turn with whatever it has instead of spinning.",
|
|
24305
|
+
vars: ["max"],
|
|
24306
|
+
content: `This turn has already been auto-answered {{max}} times, which means it is looping rather than progressing. No further prompts will be answered. Stop asking, finish with what you have, and report what remains unresolved.`
|
|
24260
24307
|
}
|
|
24261
24308
|
];
|
|
24262
24309
|
}
|
|
@@ -33851,7 +33898,7 @@ function unattendedAnswer(mode, prompt2, opts) {
|
|
|
33851
33898
|
case "question":
|
|
33852
33899
|
return {
|
|
33853
33900
|
behavior: "deny",
|
|
33854
|
-
message: capped ?
|
|
33901
|
+
message: capped ? unattendedCappedNote() : unattendedDecideNote(),
|
|
33855
33902
|
decision: capped ? "Told the agent to stop asking and finish" : "Handed back to the agent to decide and continue"
|
|
33856
33903
|
};
|
|
33857
33904
|
case "plan":
|
|
@@ -33859,7 +33906,7 @@ function unattendedAnswer(mode, prompt2, opts) {
|
|
|
33859
33906
|
return { behavior: "allow", decision: "Approved the plan and continued" };
|
|
33860
33907
|
return {
|
|
33861
33908
|
behavior: "deny",
|
|
33862
|
-
message: capped ?
|
|
33909
|
+
message: capped ? unattendedCappedNote() : unattendedDeclineNote(),
|
|
33863
33910
|
decision: "Declined to approve the plan (nobody was there to approve it)"
|
|
33864
33911
|
};
|
|
33865
33912
|
case "permission":
|
|
@@ -33868,13 +33915,13 @@ function unattendedAnswer(mode, prompt2, opts) {
|
|
|
33868
33915
|
}
|
|
33869
33916
|
return {
|
|
33870
33917
|
behavior: "deny",
|
|
33871
|
-
message: capped ?
|
|
33918
|
+
message: capped ? unattendedCappedNote() : unattendedDeclineNote(),
|
|
33872
33919
|
decision: `Declined ${prompt2.displayName || prompt2.tool}`
|
|
33873
33920
|
};
|
|
33874
33921
|
case "elicitation":
|
|
33875
33922
|
return {
|
|
33876
33923
|
behavior: "decline",
|
|
33877
|
-
message:
|
|
33924
|
+
message: unattendedDeclineNote(),
|
|
33878
33925
|
decision: `Declined \u201C${prompt2.serverName}\u201D request for input`
|
|
33879
33926
|
};
|
|
33880
33927
|
case "skill_ui":
|
|
@@ -33984,17 +34031,18 @@ function scheduleUnattendedAnswer(prompt2, deps) {
|
|
|
33984
34031
|
}, deps.delayMs ?? UNATTENDED_ANSWER_DELAY_MS);
|
|
33985
34032
|
timer2.unref?.();
|
|
33986
34033
|
}
|
|
33987
|
-
var UNATTENDED_ANSWER_DELAY_MS, UNATTENDED_MAX_DECISIONS,
|
|
34034
|
+
var UNATTENDED_ANSWER_DELAY_MS, UNATTENDED_MAX_DECISIONS, unattendedDecideNote, unattendedDeclineNote, unattendedCappedNote, DIALOG_ANSWERS;
|
|
33988
34035
|
var init_unattended = __esm({
|
|
33989
34036
|
"../../packages/agent-core/dist/unattended.js"() {
|
|
33990
34037
|
"use strict";
|
|
33991
34038
|
init_dist();
|
|
33992
34039
|
init_unattended_log();
|
|
34040
|
+
init_prompts();
|
|
33993
34041
|
UNATTENDED_ANSWER_DELAY_MS = 700;
|
|
33994
34042
|
UNATTENDED_MAX_DECISIONS = 100;
|
|
33995
|
-
|
|
33996
|
-
|
|
33997
|
-
|
|
34043
|
+
unattendedDecideNote = () => prompt("agent.unattended.decide");
|
|
34044
|
+
unattendedDeclineNote = () => prompt("agent.unattended.decline");
|
|
34045
|
+
unattendedCappedNote = () => prompt("agent.unattended.capped", { max: UNATTENDED_MAX_DECISIONS });
|
|
33998
34046
|
DIALOG_ANSWERS = {
|
|
33999
34047
|
refusal_fallback_prompt: { result: "retry_fallback", decision: "Retried on the fallback model" },
|
|
34000
34048
|
fable_overage_consent_prompt: { result: "switch_default", decision: "Switched models rather than spend usage credits" }
|
|
@@ -39273,11 +39321,17 @@ ${prompt("agent.system.website-build")}` : "";
|
|
|
39273
39321
|
// END, so without this the agent has already built the whole thing monolithically by
|
|
39274
39322
|
// the time anything can ask it to work in slices — and rewriting the user's message
|
|
39275
39323
|
// is the mistake that made `/compact` the graded task.
|
|
39324
|
+
// The unattended directive is computed from the SEND, not read off `live`: this runs
|
|
39325
|
+
// during query setup and must not depend on turn-start ordering. Both unattended
|
|
39326
|
+
// modes get it — an opted-in run and a scheduled fire are equally unwatched, and in
|
|
39327
|
+
// both the final message is the only account of the run anyone will read.
|
|
39276
39328
|
systemPrompt: { type: "preset", preset: "claude_code", append: this.applyPromptHook(this.buildSystemPrompt(params.url) + (params.appendSystemPrompt ? `
|
|
39277
39329
|
|
|
39278
39330
|
${params.appendSystemPrompt}` : "") + (params.reinforcedVerification ? `
|
|
39279
39331
|
|
|
39280
|
-
${rvPhaseDirective()}` : ""),
|
|
39332
|
+
${rvPhaseDirective()}` : "") + (unattendedModeFor({ optedIn: params.unattended, origin: params.origin }) !== "off" ? `
|
|
39333
|
+
|
|
39334
|
+
${prompt("agent.system.unattended-report")}` : ""), live.sessionId) },
|
|
39281
39335
|
includePartialMessages: true,
|
|
39282
39336
|
// Emit a predicted follow-up prompt after each turn (git/context-aware) — rendered
|
|
39283
39337
|
// as a clickable suggestion chip. Off by default in the SDK, so opt in here.
|
|
@@ -40674,7 +40728,6 @@ __export(dist_exports2, {
|
|
|
40674
40728
|
TOKENS_CSS_FILE: () => TOKENS_CSS_FILE,
|
|
40675
40729
|
TOKENS_FILE: () => TOKENS_FILE,
|
|
40676
40730
|
UNATTENDED_ANSWER_DELAY_MS: () => UNATTENDED_ANSWER_DELAY_MS,
|
|
40677
|
-
UNATTENDED_DECIDE_NOTE: () => UNATTENDED_DECIDE_NOTE,
|
|
40678
40731
|
UNATTENDED_MAX_DECISIONS: () => UNATTENDED_MAX_DECISIONS,
|
|
40679
40732
|
appendCanvasArtifact: () => appendCanvasArtifact,
|
|
40680
40733
|
appendImageArtifact: () => appendImageArtifact,
|
|
@@ -40745,6 +40798,7 @@ __export(dist_exports2, {
|
|
|
40745
40798
|
toolSpecJsonSchema: () => specParametersJsonSchema,
|
|
40746
40799
|
transferSession: () => transferSession,
|
|
40747
40800
|
unattendedAnswer: () => unattendedAnswer,
|
|
40801
|
+
unattendedDecideNote: () => unattendedDecideNote,
|
|
40748
40802
|
unattendedLogPath: () => unattendedLogPath,
|
|
40749
40803
|
unattendedModeFor: () => unattendedModeFor,
|
|
40750
40804
|
walkTokens: () => walkTokens,
|