tesseract-agent 0.10.2 → 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.
Files changed (2) hide show
  1. package/dist-bundle/cli.js +34 -9
  2. package/package.json +1 -1
@@ -24280,6 +24280,30 @@ This is a guided website build. Read \`.tesseract/brief.md\` (the user's brief),
24280
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.
24281
24281
  4. Keep the dev server runnable and tell the user the local preview URL.
24282
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.`
24283
24307
  }
24284
24308
  ];
24285
24309
  }
@@ -33874,7 +33898,7 @@ function unattendedAnswer(mode, prompt2, opts) {
33874
33898
  case "question":
33875
33899
  return {
33876
33900
  behavior: "deny",
33877
- message: capped ? UNATTENDED_CAPPED_NOTE : UNATTENDED_DECIDE_NOTE,
33901
+ message: capped ? unattendedCappedNote() : unattendedDecideNote(),
33878
33902
  decision: capped ? "Told the agent to stop asking and finish" : "Handed back to the agent to decide and continue"
33879
33903
  };
33880
33904
  case "plan":
@@ -33882,7 +33906,7 @@ function unattendedAnswer(mode, prompt2, opts) {
33882
33906
  return { behavior: "allow", decision: "Approved the plan and continued" };
33883
33907
  return {
33884
33908
  behavior: "deny",
33885
- message: capped ? UNATTENDED_CAPPED_NOTE : UNATTENDED_DECLINE_NOTE,
33909
+ message: capped ? unattendedCappedNote() : unattendedDeclineNote(),
33886
33910
  decision: "Declined to approve the plan (nobody was there to approve it)"
33887
33911
  };
33888
33912
  case "permission":
@@ -33891,13 +33915,13 @@ function unattendedAnswer(mode, prompt2, opts) {
33891
33915
  }
33892
33916
  return {
33893
33917
  behavior: "deny",
33894
- message: capped ? UNATTENDED_CAPPED_NOTE : UNATTENDED_DECLINE_NOTE,
33918
+ message: capped ? unattendedCappedNote() : unattendedDeclineNote(),
33895
33919
  decision: `Declined ${prompt2.displayName || prompt2.tool}`
33896
33920
  };
33897
33921
  case "elicitation":
33898
33922
  return {
33899
33923
  behavior: "decline",
33900
- message: UNATTENDED_DECLINE_NOTE,
33924
+ message: unattendedDeclineNote(),
33901
33925
  decision: `Declined \u201C${prompt2.serverName}\u201D request for input`
33902
33926
  };
33903
33927
  case "skill_ui":
@@ -34007,17 +34031,18 @@ function scheduleUnattendedAnswer(prompt2, deps) {
34007
34031
  }, deps.delayMs ?? UNATTENDED_ANSWER_DELAY_MS);
34008
34032
  timer2.unref?.();
34009
34033
  }
34010
- var UNATTENDED_ANSWER_DELAY_MS, UNATTENDED_MAX_DECISIONS, UNATTENDED_DECIDE_NOTE, UNATTENDED_DECLINE_NOTE, UNATTENDED_CAPPED_NOTE, DIALOG_ANSWERS;
34034
+ var UNATTENDED_ANSWER_DELAY_MS, UNATTENDED_MAX_DECISIONS, unattendedDecideNote, unattendedDeclineNote, unattendedCappedNote, DIALOG_ANSWERS;
34011
34035
  var init_unattended = __esm({
34012
34036
  "../../packages/agent-core/dist/unattended.js"() {
34013
34037
  "use strict";
34014
34038
  init_dist();
34015
34039
  init_unattended_log();
34040
+ init_prompts();
34016
34041
  UNATTENDED_ANSWER_DELAY_MS = 700;
34017
34042
  UNATTENDED_MAX_DECISIONS = 100;
34018
- UNATTENDED_DECIDE_NOTE = "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.";
34019
- UNATTENDED_DECLINE_NOTE = "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.";
34020
- UNATTENDED_CAPPED_NOTE = `This turn has already been auto-answered ${UNATTENDED_MAX_DECISIONS} 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.`;
34043
+ unattendedDecideNote = () => prompt("agent.unattended.decide");
34044
+ unattendedDeclineNote = () => prompt("agent.unattended.decline");
34045
+ unattendedCappedNote = () => prompt("agent.unattended.capped", { max: UNATTENDED_MAX_DECISIONS });
34021
34046
  DIALOG_ANSWERS = {
34022
34047
  refusal_fallback_prompt: { result: "retry_fallback", decision: "Retried on the fallback model" },
34023
34048
  fable_overage_consent_prompt: { result: "switch_default", decision: "Switched models rather than spend usage credits" }
@@ -40703,7 +40728,6 @@ __export(dist_exports2, {
40703
40728
  TOKENS_CSS_FILE: () => TOKENS_CSS_FILE,
40704
40729
  TOKENS_FILE: () => TOKENS_FILE,
40705
40730
  UNATTENDED_ANSWER_DELAY_MS: () => UNATTENDED_ANSWER_DELAY_MS,
40706
- UNATTENDED_DECIDE_NOTE: () => UNATTENDED_DECIDE_NOTE,
40707
40731
  UNATTENDED_MAX_DECISIONS: () => UNATTENDED_MAX_DECISIONS,
40708
40732
  appendCanvasArtifact: () => appendCanvasArtifact,
40709
40733
  appendImageArtifact: () => appendImageArtifact,
@@ -40774,6 +40798,7 @@ __export(dist_exports2, {
40774
40798
  toolSpecJsonSchema: () => specParametersJsonSchema,
40775
40799
  transferSession: () => transferSession,
40776
40800
  unattendedAnswer: () => unattendedAnswer,
40801
+ unattendedDecideNote: () => unattendedDecideNote,
40777
40802
  unattendedLogPath: () => unattendedLogPath,
40778
40803
  unattendedModeFor: () => unattendedModeFor,
40779
40804
  walkTokens: () => walkTokens,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tesseract-agent",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "license": "UNLICENSED",
5
5
  "publishConfig": {
6
6
  "access": "public",