@open-mercato/cezar 0.20.0-pr2131.5043 → 0.20.0-pr2133.5040

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 (23) hide show
  1. package/dist/handoff.d.ts +2 -2
  2. package/dist/handoff.js +1 -4
  3. package/dist/handoff.js.map +1 -1
  4. package/package.json +3 -3
  5. package/web/dist/assets/{agent-task-pickers-DpilQVCl.js → agent-task-pickers-UHVrLuLG.js} +1 -1
  6. package/web/dist/assets/{assets-view-DI5xZv8V.js → assets-view-CsuHLF8G.js} +1 -1
  7. package/web/dist/assets/{automations-route-lSK6ie6L.js → automations-route-BwVmv32D.js} +1 -1
  8. package/web/dist/assets/{compare-variants-B_T9vgLF.js → compare-variants-CZjUVymW.js} +1 -1
  9. package/web/dist/assets/{dashboard-Ch293IzL.js → dashboard-BINBOUOK.js} +1 -1
  10. package/web/dist/assets/{github-4rKRX8w_.js → github-B5QMmNsJ.js} +1 -1
  11. package/web/dist/assets/{index-BBKdPdRT.js → index-FEgJOGSj.js} +2 -2
  12. package/web/dist/assets/{manager-chat-DfgjeLPa.js → manager-chat-CHIPlyCh.js} +1 -1
  13. package/web/dist/assets/{manager-index-Cjg2gsXt.js → manager-index-Dfn8_cW1.js} +1 -1
  14. package/web/dist/assets/{manager-new-C5rFvdw2.js → manager-new-pj_k7vsK.js} +1 -1
  15. package/web/dist/assets/{mascot-picker-gpi2JEOi.js → mascot-picker-BH2Nozd7.js} +1 -1
  16. package/web/dist/assets/{repo-git-hFok-XLF.js → repo-git-BbK8jDBn.js} +1 -1
  17. package/web/dist/assets/{skills-wKCsN1zS.js → skills-RSP4_lZt.js} +1 -1
  18. package/web/dist/assets/{task-graph-nmdJQRap.js → task-graph-Dlw6dFbl.js} +1 -1
  19. package/web/dist/assets/task-workspace-B6f4CDFE.js +28 -0
  20. package/web/dist/assets/{tracker-CjVlRywm.js → tracker-hkXGNWxb.js} +1 -1
  21. package/web/dist/assets/{workflow-graph-Y1VKrWCm.js → workflow-graph-j5jN6nG9.js} +1 -1
  22. package/web/dist/index.html +1 -1
  23. package/web/dist/assets/task-workspace-DJTR-ioK.js +0 -28
package/dist/handoff.d.ts CHANGED
@@ -70,7 +70,7 @@ export declare function followupsEnabled(env?: NodeJS.ProcessEnv): boolean;
70
70
  * inherited value from a parent cezar cannot shine through
71
71
  * (`RunManager.agentEnv`).
72
72
  */
73
- export declare const HANDOFF_ONLY_INSTRUCTIONS = "## Handoff (cezar)\n\nCEZ_HANDOFF_FILE (env) is the absolute path to this task's rolling handoff file. Treat it like a HANDOFF.md:\n1. At the start of work, read it \u2014 \"Resume notes\" left by a previous session is your starting context.\n2. After every meaningful milestone (passing tests, a commit, a PR, a scope decision), append one terse timestamped line under \"## Progress log\", newest at the top.\n3. Before finishing or pausing, update \"## Resume notes\" with what's done, what's next and any blockers. Leave it empty only when the task is truly complete.\nUse the commands, never a hand-written script: node \"$CEZ_BIN\" handoff log \"<terse line>\" inserts the timestamped line under \"## Progress log\"; node \"$CEZ_BIN\" handoff resume \"<notes>\" (or the notes on stdin, for several lines) replaces \"## Resume notes\", and handoff resume \"\" clears it. Only if CEZ_BIN is unset, edit the file directly.\n\nTask completion marker: when the task's goal is fully achieved and you have no question for the user, end your final message with a line containing exactly CEZ:DONE \u2014 cez then closes the session and marks the task finished. If you are waiting on the user (a question, a decision, missing input), just end your message normally; the session stays open for their reply. Never emit CEZ:DONE while anything is unfinished or unverified.\n\nStill-working marker: if you end a turn while still working on your OWN downstream work \u2014 a sub-agent you dispatched, or a long-running command you're monitoring \u2014 and are NOT waiting on the user for anything, end your final message with a line containing exactly CEZ:MONITORING. cez then shows the task as \"monitoring\" (still working) instead of asking for your attention. Dispatching a sub-agent is exactly this case, and it counts whether the sub-agent finishes inside this turn or runs in the background and reports back later through its own completion notification \u2014 cez has no sub-agent-completion event of its own, so an unmarked turn-end is indistinguishable from you asking the user a question, and it raises \"needs you\" and a browser notification for work nobody needs to look at. The test is one question: is the only thing between you and the next step work YOU started? Then the marker belongs there. A turn that fans work out ends like this, marker on the very last line:\n\n Dispatched 3 sub-agents to investigate the failing migration; I'll continue as soon as they report.\n CEZ:MONITORING\n\nUse CEZ:MONITORING only for that in-progress case; use CEZ:DONE when the goal is done; end plainly (no marker) only when you are genuinely waiting on the user. Never combine CEZ:MONITORING with CEZ:DONE. A park is bounded, not indefinite: with an automatic re-check cadence configured cez wakes you on that cadence and, after the configured number of re-checks with no progress, hands the task to the user unless a dispatched child is still in flight; with no cadence configured it does the same after four times the configured waiting-session idle timeout (60 minutes by default, also the fallback when idle timeout is disabled), unless a dispatched child is still in flight. An unanswered hand-off ends the run as failed with a Continue button when the configured idle timeout closes the session; with idle timeout disabled it raises attention and rests at waiting \u2014 so end each re-check turn with CEZ:MONITORING again while the downstream work is still pending.\n\nStructured question marker: when you are blocked on a decision that is genuinely the user's to make \u2014 one you cannot resolve from the request, the code, or sensible defaults \u2014 and it comes down to a few concrete choices, end your turn with a single line CEZ:ASK <json> instead of asking in prose. cez renders it as clickable option chips in the cockpit so the user can answer in one tap. The <json> is ONE object on ONE line, the last thing in your message: {\"questions\":[{\"header\":\"\u226412-char label\",\"question\":\"a clear question ending in ?\",\"multiSelect\":false,\"options\":[{\"label\":\"short choice\",\"description\":\"what it means / the trade-off\"}]}]} \u2014 use only those keys (plus an optional non-empty \"id\" up to 64 characters), with 1\u201320 questions, 2\u201310 options per question, unique question text and option labels, header 1\u201312 characters, question 1\u2013400, option label 1\u201360, and description at most 280. The JSON must be syntactically valid \u2014 every brace and bracket closed, no trailing commas; re-read the line before you send it, because a payload cez cannot parse is shown to the user as raw JSON instead of chips. The card itself gives every question an \"Other\u2026\" field for the user's own answer and a \"Need more info\" choice, so never add either as an option yourself. An answer that is not one of your labels is the user's own: act on it. An answer asking for more information means the user cannot decide yet: explain what that question hinges on \u2014 the context, the trade-offs, what each option would change \u2014 then ask it again with CEZ:ASK; never guess an answer for it. Several decisions that are genuinely all the user's ride ONE card \u2014 do not drop any to fit a count, and do not split them across turns. Prefer sensible defaults over asking; use CEZ:ASK only when the choice is truly the user's. Never combine CEZ:ASK with CEZ:DONE or CEZ:MONITORING.\n\nTask reference markers: as soon as you know which GitHub pull request or issue this task is ABOUT (it was named in the task, or you just opened it), declare it by emitting, on its own line in your message text: CEZ:PR=<number> and/or CEZ:ISSUE=<number>. Re-emit with the new number if the subject changes (e.g. you open a PR later in the task). Declare only the task's own subject \u2014 never a PR/issue you merely mention, list, or compare against. You may also emit CEZ:TITLE=<terse gerund phrase, max 40 chars, e.g. \"implementing comment threads\"> once the work has a clearer shape than its current title; cez uses these instead of guessing from the transcript. Put markers in plain message text, never inside a code fence, and above any CEZ:DONE / CEZ:MONITORING line \u2014 those two always come last.\n\n## Pasted attachments\nUser-attached screenshots and files (PDF, text, archives \u2014 any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.\n\n## File links (#1923)\nA file link in your message \u2014 relative (`temp/summary.txt`) or absolute \u2014 is not clickable in the cockpit: it renders as inert text, and the Files tab lists only tracked or non-ignored files, so a gitignored file (such as one under `temp/`) is not there either. Put short deliverables (a summary, a result, a snippet) inline in your message. For a file the user must reach, write it to the artifacts directory ($CEZ_ARTIFACTS_DIR) and name it there, or to a non-ignored path in the worktree and give that worktree-relative path \u2014 never link to a gitignored file as if it could be opened.";
73
+ export declare const HANDOFF_ONLY_INSTRUCTIONS = "## Handoff (cezar)\n\nCEZ_HANDOFF_FILE (env) is the absolute path to this task's rolling handoff file. Treat it like a HANDOFF.md:\n1. At the start of work, read it \u2014 \"Resume notes\" left by a previous session is your starting context.\n2. After every meaningful milestone (passing tests, a commit, a PR, a scope decision), append one terse timestamped line under \"## Progress log\", newest at the top.\n3. Before finishing or pausing, update \"## Resume notes\" with what's done, what's next and any blockers. Leave it empty only when the task is truly complete.\nUse the commands, never a hand-written script: node \"$CEZ_BIN\" handoff log \"<terse line>\" inserts the timestamped line under \"## Progress log\"; node \"$CEZ_BIN\" handoff resume \"<notes>\" (or the notes on stdin, for several lines) replaces \"## Resume notes\", and handoff resume \"\" clears it. Only if CEZ_BIN is unset, edit the file directly.\n\nTask completion marker: when the task's goal is fully achieved and you have no question for the user, end your final message with a line containing exactly CEZ:DONE \u2014 cez then closes the session and marks the task finished. If you are waiting on the user (a question, a decision, missing input), just end your message normally; the session stays open for their reply. Never emit CEZ:DONE while anything is unfinished or unverified.\n\nStill-working marker: if you end a turn while still working on your OWN downstream work \u2014 a sub-agent you dispatched, or a long-running command you're monitoring \u2014 and are NOT waiting on the user for anything, end your final message with a line containing exactly CEZ:MONITORING. cez then shows the task as \"monitoring\" (still working) instead of asking for your attention. Dispatching a sub-agent is exactly this case, and it counts whether the sub-agent finishes inside this turn or runs in the background and reports back later through its own completion notification \u2014 cez has no sub-agent-completion event of its own, so an unmarked turn-end is indistinguishable from you asking the user a question, and it raises \"needs you\" and a browser notification for work nobody needs to look at. The test is one question: is the only thing between you and the next step work YOU started? Then the marker belongs there. A turn that fans work out ends like this, marker on the very last line:\n\n Dispatched 3 sub-agents to investigate the failing migration; I'll continue as soon as they report.\n CEZ:MONITORING\n\nUse CEZ:MONITORING only for that in-progress case; use CEZ:DONE when the goal is done; end plainly (no marker) only when you are genuinely waiting on the user. Never combine CEZ:MONITORING with CEZ:DONE. A park is bounded, not indefinite: with an automatic re-check cadence configured cez wakes you on that cadence and, after the configured number of re-checks with no progress, hands the task to the user unless a dispatched child is still in flight; with no cadence configured it does the same after four times the configured waiting-session idle timeout (60 minutes by default, also the fallback when idle timeout is disabled), unless a dispatched child is still in flight. An unanswered hand-off ends the run as failed with a Continue button when the configured idle timeout closes the session; with idle timeout disabled it raises attention and rests at waiting \u2014 so end each re-check turn with CEZ:MONITORING again while the downstream work is still pending.\n\nStructured question marker: when you are blocked on a decision that is genuinely the user's to make \u2014 one you cannot resolve from the request, the code, or sensible defaults \u2014 and it comes down to a few concrete choices, end your turn with a single line CEZ:ASK <json> instead of asking in prose. cez renders it as clickable option chips in the cockpit so the user can answer in one tap. The <json> is ONE object on ONE line, the last thing in your message: {\"questions\":[{\"header\":\"\u226412-char label\",\"question\":\"a clear question ending in ?\",\"multiSelect\":false,\"options\":[{\"label\":\"short choice\",\"description\":\"what it means / the trade-off\"}]}]} \u2014 use only those keys (plus an optional non-empty \"id\" up to 64 characters), with 1\u201320 questions, 2\u201310 options per question, unique question text and option labels, header 1\u201312 characters, question 1\u2013400, option label 1\u201360, and description at most 280. The JSON must be syntactically valid \u2014 every brace and bracket closed, no trailing commas; re-read the line before you send it, because a payload cez cannot parse is shown to the user as raw JSON instead of chips. The card itself gives every question an \"Other\u2026\" field for the user's own answer and a \"Need more info\" choice, so never add either as an option yourself. An answer that is not one of your labels is the user's own: act on it. An answer asking for more information means the user cannot decide yet: explain what that question hinges on \u2014 the context, the trade-offs, what each option would change \u2014 then ask it again with CEZ:ASK; never guess an answer for it. Several decisions that are genuinely all the user's ride ONE card \u2014 do not drop any to fit a count, and do not split them across turns. Prefer sensible defaults over asking; use CEZ:ASK only when the choice is truly the user's. Never combine CEZ:ASK with CEZ:DONE or CEZ:MONITORING.\n\nTask reference markers: as soon as you know which GitHub pull request or issue this task is ABOUT (it was named in the task, or you just opened it), declare it by emitting, on its own line in your message text: CEZ:PR=<number> and/or CEZ:ISSUE=<number>. Re-emit with the new number if the subject changes (e.g. you open a PR later in the task). Declare only the task's own subject \u2014 never a PR/issue you merely mention, list, or compare against. You may also emit CEZ:TITLE=<terse gerund phrase, max 40 chars, e.g. \"implementing comment threads\"> once the work has a clearer shape than its current title; cez uses these instead of guessing from the transcript. Put markers in plain message text, never inside a code fence, and above any CEZ:DONE / CEZ:MONITORING line \u2014 those two always come last.\n\n## Pasted attachments\nUser-attached screenshots and files (PDF, text, archives \u2014 any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.";
74
74
  export declare const FOLLOWUP_INSTRUCTIONS = "## Follow-ups (cezar)\n\nCEZ_TODOS_FILE (env) is the absolute path to the user's follow-up inbox \u2014 a JSON array. Only append an entry when a genuinely actionable follow-up remains: something concrete a human or the next agent still needs to decide or do (a review nit worth a dedicated pass, a manual step you cannot take yourself, a decision blocked on the user, a known next task). Do NOT append filler \u2014 a restated summary of what you just finished, a congratulatory note, or \"no further action needed\" is not a follow-up; when the task is simply done, skip this file entirely. When (and only when) a real follow-up exists, read the file (treat a missing file as []), append ONE object and write the whole array back:\n{ \"ts\": \"<ISO 8601>\", \"taskId\": \"<value of CEZ_TASK_ID>\", \"summary\": \"<one sentence: the concrete next action, not a status report>\", \"action\": \"<imperative user action, optional>\", \"prUrl\": \"<optional>\", \"suggestedSkill\": \"<optional skill name for the follow-up>\", \"suggestedArgs\": \"<optional>\", \"suggestedPrompt\": \"<optional freeform prompt for the follow-up task>\", \"runnable\": <true when an agent can execute this follow-up, false when it is a note> }\nSet \"runnable\": false for anything a human must do or merely read \u2014 manual QA, \"remember to\u2026\", informational notes \u2014 and leave out suggestedSkill/suggestedPrompt for those; the inbox then offers \"Acknowledge\" instead of \"Run\". Set \"runnable\": true only when suggestedSkill or suggestedPrompt says what to actually execute.\nNever modify or remove existing entries \u2014 append only.";
75
75
  /** Default-on combined contract retained for old callers and runs. */
76
- export declare const HANDOFF_INSTRUCTIONS = "## Handoff (cezar)\n\nCEZ_HANDOFF_FILE (env) is the absolute path to this task's rolling handoff file. Treat it like a HANDOFF.md:\n1. At the start of work, read it \u2014 \"Resume notes\" left by a previous session is your starting context.\n2. After every meaningful milestone (passing tests, a commit, a PR, a scope decision), append one terse timestamped line under \"## Progress log\", newest at the top.\n3. Before finishing or pausing, update \"## Resume notes\" with what's done, what's next and any blockers. Leave it empty only when the task is truly complete.\nUse the commands, never a hand-written script: node \"$CEZ_BIN\" handoff log \"<terse line>\" inserts the timestamped line under \"## Progress log\"; node \"$CEZ_BIN\" handoff resume \"<notes>\" (or the notes on stdin, for several lines) replaces \"## Resume notes\", and handoff resume \"\" clears it. Only if CEZ_BIN is unset, edit the file directly.\n\nTask completion marker: when the task's goal is fully achieved and you have no question for the user, end your final message with a line containing exactly CEZ:DONE \u2014 cez then closes the session and marks the task finished. If you are waiting on the user (a question, a decision, missing input), just end your message normally; the session stays open for their reply. Never emit CEZ:DONE while anything is unfinished or unverified.\n\nStill-working marker: if you end a turn while still working on your OWN downstream work \u2014 a sub-agent you dispatched, or a long-running command you're monitoring \u2014 and are NOT waiting on the user for anything, end your final message with a line containing exactly CEZ:MONITORING. cez then shows the task as \"monitoring\" (still working) instead of asking for your attention. Dispatching a sub-agent is exactly this case, and it counts whether the sub-agent finishes inside this turn or runs in the background and reports back later through its own completion notification \u2014 cez has no sub-agent-completion event of its own, so an unmarked turn-end is indistinguishable from you asking the user a question, and it raises \"needs you\" and a browser notification for work nobody needs to look at. The test is one question: is the only thing between you and the next step work YOU started? Then the marker belongs there. A turn that fans work out ends like this, marker on the very last line:\n\n Dispatched 3 sub-agents to investigate the failing migration; I'll continue as soon as they report.\n CEZ:MONITORING\n\nUse CEZ:MONITORING only for that in-progress case; use CEZ:DONE when the goal is done; end plainly (no marker) only when you are genuinely waiting on the user. Never combine CEZ:MONITORING with CEZ:DONE. A park is bounded, not indefinite: with an automatic re-check cadence configured cez wakes you on that cadence and, after the configured number of re-checks with no progress, hands the task to the user unless a dispatched child is still in flight; with no cadence configured it does the same after four times the configured waiting-session idle timeout (60 minutes by default, also the fallback when idle timeout is disabled), unless a dispatched child is still in flight. An unanswered hand-off ends the run as failed with a Continue button when the configured idle timeout closes the session; with idle timeout disabled it raises attention and rests at waiting \u2014 so end each re-check turn with CEZ:MONITORING again while the downstream work is still pending.\n\nStructured question marker: when you are blocked on a decision that is genuinely the user's to make \u2014 one you cannot resolve from the request, the code, or sensible defaults \u2014 and it comes down to a few concrete choices, end your turn with a single line CEZ:ASK <json> instead of asking in prose. cez renders it as clickable option chips in the cockpit so the user can answer in one tap. The <json> is ONE object on ONE line, the last thing in your message: {\"questions\":[{\"header\":\"\u226412-char label\",\"question\":\"a clear question ending in ?\",\"multiSelect\":false,\"options\":[{\"label\":\"short choice\",\"description\":\"what it means / the trade-off\"}]}]} \u2014 use only those keys (plus an optional non-empty \"id\" up to 64 characters), with 1\u201320 questions, 2\u201310 options per question, unique question text and option labels, header 1\u201312 characters, question 1\u2013400, option label 1\u201360, and description at most 280. The JSON must be syntactically valid \u2014 every brace and bracket closed, no trailing commas; re-read the line before you send it, because a payload cez cannot parse is shown to the user as raw JSON instead of chips. The card itself gives every question an \"Other\u2026\" field for the user's own answer and a \"Need more info\" choice, so never add either as an option yourself. An answer that is not one of your labels is the user's own: act on it. An answer asking for more information means the user cannot decide yet: explain what that question hinges on \u2014 the context, the trade-offs, what each option would change \u2014 then ask it again with CEZ:ASK; never guess an answer for it. Several decisions that are genuinely all the user's ride ONE card \u2014 do not drop any to fit a count, and do not split them across turns. Prefer sensible defaults over asking; use CEZ:ASK only when the choice is truly the user's. Never combine CEZ:ASK with CEZ:DONE or CEZ:MONITORING.\n\nTask reference markers: as soon as you know which GitHub pull request or issue this task is ABOUT (it was named in the task, or you just opened it), declare it by emitting, on its own line in your message text: CEZ:PR=<number> and/or CEZ:ISSUE=<number>. Re-emit with the new number if the subject changes (e.g. you open a PR later in the task). Declare only the task's own subject \u2014 never a PR/issue you merely mention, list, or compare against. You may also emit CEZ:TITLE=<terse gerund phrase, max 40 chars, e.g. \"implementing comment threads\"> once the work has a clearer shape than its current title; cez uses these instead of guessing from the transcript. Put markers in plain message text, never inside a code fence, and above any CEZ:DONE / CEZ:MONITORING line \u2014 those two always come last.\n\n## Pasted attachments\nUser-attached screenshots and files (PDF, text, archives \u2014 any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.\n\n## File links (#1923)\nA file link in your message \u2014 relative (`temp/summary.txt`) or absolute \u2014 is not clickable in the cockpit: it renders as inert text, and the Files tab lists only tracked or non-ignored files, so a gitignored file (such as one under `temp/`) is not there either. Put short deliverables (a summary, a result, a snippet) inline in your message. For a file the user must reach, write it to the artifacts directory ($CEZ_ARTIFACTS_DIR) and name it there, or to a non-ignored path in the worktree and give that worktree-relative path \u2014 never link to a gitignored file as if it could be opened.\n\n## Follow-ups (cezar)\n\nCEZ_TODOS_FILE (env) is the absolute path to the user's follow-up inbox \u2014 a JSON array. Only append an entry when a genuinely actionable follow-up remains: something concrete a human or the next agent still needs to decide or do (a review nit worth a dedicated pass, a manual step you cannot take yourself, a decision blocked on the user, a known next task). Do NOT append filler \u2014 a restated summary of what you just finished, a congratulatory note, or \"no further action needed\" is not a follow-up; when the task is simply done, skip this file entirely. When (and only when) a real follow-up exists, read the file (treat a missing file as []), append ONE object and write the whole array back:\n{ \"ts\": \"<ISO 8601>\", \"taskId\": \"<value of CEZ_TASK_ID>\", \"summary\": \"<one sentence: the concrete next action, not a status report>\", \"action\": \"<imperative user action, optional>\", \"prUrl\": \"<optional>\", \"suggestedSkill\": \"<optional skill name for the follow-up>\", \"suggestedArgs\": \"<optional>\", \"suggestedPrompt\": \"<optional freeform prompt for the follow-up task>\", \"runnable\": <true when an agent can execute this follow-up, false when it is a note> }\nSet \"runnable\": false for anything a human must do or merely read \u2014 manual QA, \"remember to\u2026\", informational notes \u2014 and leave out suggestedSkill/suggestedPrompt for those; the inbox then offers \"Acknowledge\" instead of \"Run\". Set \"runnable\": true only when suggestedSkill or suggestedPrompt says what to actually execute.\nNever modify or remove existing entries \u2014 append only.";
76
+ export declare const HANDOFF_INSTRUCTIONS = "## Handoff (cezar)\n\nCEZ_HANDOFF_FILE (env) is the absolute path to this task's rolling handoff file. Treat it like a HANDOFF.md:\n1. At the start of work, read it \u2014 \"Resume notes\" left by a previous session is your starting context.\n2. After every meaningful milestone (passing tests, a commit, a PR, a scope decision), append one terse timestamped line under \"## Progress log\", newest at the top.\n3. Before finishing or pausing, update \"## Resume notes\" with what's done, what's next and any blockers. Leave it empty only when the task is truly complete.\nUse the commands, never a hand-written script: node \"$CEZ_BIN\" handoff log \"<terse line>\" inserts the timestamped line under \"## Progress log\"; node \"$CEZ_BIN\" handoff resume \"<notes>\" (or the notes on stdin, for several lines) replaces \"## Resume notes\", and handoff resume \"\" clears it. Only if CEZ_BIN is unset, edit the file directly.\n\nTask completion marker: when the task's goal is fully achieved and you have no question for the user, end your final message with a line containing exactly CEZ:DONE \u2014 cez then closes the session and marks the task finished. If you are waiting on the user (a question, a decision, missing input), just end your message normally; the session stays open for their reply. Never emit CEZ:DONE while anything is unfinished or unverified.\n\nStill-working marker: if you end a turn while still working on your OWN downstream work \u2014 a sub-agent you dispatched, or a long-running command you're monitoring \u2014 and are NOT waiting on the user for anything, end your final message with a line containing exactly CEZ:MONITORING. cez then shows the task as \"monitoring\" (still working) instead of asking for your attention. Dispatching a sub-agent is exactly this case, and it counts whether the sub-agent finishes inside this turn or runs in the background and reports back later through its own completion notification \u2014 cez has no sub-agent-completion event of its own, so an unmarked turn-end is indistinguishable from you asking the user a question, and it raises \"needs you\" and a browser notification for work nobody needs to look at. The test is one question: is the only thing between you and the next step work YOU started? Then the marker belongs there. A turn that fans work out ends like this, marker on the very last line:\n\n Dispatched 3 sub-agents to investigate the failing migration; I'll continue as soon as they report.\n CEZ:MONITORING\n\nUse CEZ:MONITORING only for that in-progress case; use CEZ:DONE when the goal is done; end plainly (no marker) only when you are genuinely waiting on the user. Never combine CEZ:MONITORING with CEZ:DONE. A park is bounded, not indefinite: with an automatic re-check cadence configured cez wakes you on that cadence and, after the configured number of re-checks with no progress, hands the task to the user unless a dispatched child is still in flight; with no cadence configured it does the same after four times the configured waiting-session idle timeout (60 minutes by default, also the fallback when idle timeout is disabled), unless a dispatched child is still in flight. An unanswered hand-off ends the run as failed with a Continue button when the configured idle timeout closes the session; with idle timeout disabled it raises attention and rests at waiting \u2014 so end each re-check turn with CEZ:MONITORING again while the downstream work is still pending.\n\nStructured question marker: when you are blocked on a decision that is genuinely the user's to make \u2014 one you cannot resolve from the request, the code, or sensible defaults \u2014 and it comes down to a few concrete choices, end your turn with a single line CEZ:ASK <json> instead of asking in prose. cez renders it as clickable option chips in the cockpit so the user can answer in one tap. The <json> is ONE object on ONE line, the last thing in your message: {\"questions\":[{\"header\":\"\u226412-char label\",\"question\":\"a clear question ending in ?\",\"multiSelect\":false,\"options\":[{\"label\":\"short choice\",\"description\":\"what it means / the trade-off\"}]}]} \u2014 use only those keys (plus an optional non-empty \"id\" up to 64 characters), with 1\u201320 questions, 2\u201310 options per question, unique question text and option labels, header 1\u201312 characters, question 1\u2013400, option label 1\u201360, and description at most 280. The JSON must be syntactically valid \u2014 every brace and bracket closed, no trailing commas; re-read the line before you send it, because a payload cez cannot parse is shown to the user as raw JSON instead of chips. The card itself gives every question an \"Other\u2026\" field for the user's own answer and a \"Need more info\" choice, so never add either as an option yourself. An answer that is not one of your labels is the user's own: act on it. An answer asking for more information means the user cannot decide yet: explain what that question hinges on \u2014 the context, the trade-offs, what each option would change \u2014 then ask it again with CEZ:ASK; never guess an answer for it. Several decisions that are genuinely all the user's ride ONE card \u2014 do not drop any to fit a count, and do not split them across turns. Prefer sensible defaults over asking; use CEZ:ASK only when the choice is truly the user's. Never combine CEZ:ASK with CEZ:DONE or CEZ:MONITORING.\n\nTask reference markers: as soon as you know which GitHub pull request or issue this task is ABOUT (it was named in the task, or you just opened it), declare it by emitting, on its own line in your message text: CEZ:PR=<number> and/or CEZ:ISSUE=<number>. Re-emit with the new number if the subject changes (e.g. you open a PR later in the task). Declare only the task's own subject \u2014 never a PR/issue you merely mention, list, or compare against. You may also emit CEZ:TITLE=<terse gerund phrase, max 40 chars, e.g. \"implementing comment threads\"> once the work has a clearer shape than its current title; cez uses these instead of guessing from the transcript. Put markers in plain message text, never inside a code fence, and above any CEZ:DONE / CEZ:MONITORING line \u2014 those two always come last.\n\n## Pasted attachments\nUser-attached screenshots and files (PDF, text, archives \u2014 any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.\n\n## Follow-ups (cezar)\n\nCEZ_TODOS_FILE (env) is the absolute path to the user's follow-up inbox \u2014 a JSON array. Only append an entry when a genuinely actionable follow-up remains: something concrete a human or the next agent still needs to decide or do (a review nit worth a dedicated pass, a manual step you cannot take yourself, a decision blocked on the user, a known next task). Do NOT append filler \u2014 a restated summary of what you just finished, a congratulatory note, or \"no further action needed\" is not a follow-up; when the task is simply done, skip this file entirely. When (and only when) a real follow-up exists, read the file (treat a missing file as []), append ONE object and write the whole array back:\n{ \"ts\": \"<ISO 8601>\", \"taskId\": \"<value of CEZ_TASK_ID>\", \"summary\": \"<one sentence: the concrete next action, not a status report>\", \"action\": \"<imperative user action, optional>\", \"prUrl\": \"<optional>\", \"suggestedSkill\": \"<optional skill name for the follow-up>\", \"suggestedArgs\": \"<optional>\", \"suggestedPrompt\": \"<optional freeform prompt for the follow-up task>\", \"runnable\": <true when an agent can execute this follow-up, false when it is a note> }\nSet \"runnable\": false for anything a human must do or merely read \u2014 manual QA, \"remember to\u2026\", informational notes \u2014 and leave out suggestedSkill/suggestedPrompt for those; the inbox then offers \"Acknowledge\" instead of \"Run\". Set \"runnable\": true only when suggestedSkill or suggestedPrompt says what to actually execute.\nNever modify or remove existing entries \u2014 append only.";
package/dist/handoff.js CHANGED
@@ -257,10 +257,7 @@ Structured question marker: when you are blocked on a decision that is genuinely
257
257
  Task reference markers: as soon as you know which GitHub pull request or issue this task is ABOUT (it was named in the task, or you just opened it), declare it by emitting, on its own line in your message text: CEZ:PR=<number> and/or CEZ:ISSUE=<number>. Re-emit with the new number if the subject changes (e.g. you open a PR later in the task). Declare only the task's own subject — never a PR/issue you merely mention, list, or compare against. You may also emit CEZ:TITLE=<terse gerund phrase, max 40 chars, e.g. "implementing comment threads"> once the work has a clearer shape than its current title; cez uses these instead of guessing from the transcript. Put markers in plain message text, never inside a code fence, and above any CEZ:DONE / CEZ:MONITORING line — those two always come last.
258
258
 
259
259
  ## Pasted attachments
260
- User-attached screenshots and files (PDF, text, archives — any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.
261
-
262
- ## File links (#1923)
263
- A file link in your message — relative (\`temp/summary.txt\`) or absolute — is not clickable in the cockpit: it renders as inert text, and the Files tab lists only tracked or non-ignored files, so a gitignored file (such as one under \`temp/\`) is not there either. Put short deliverables (a summary, a result, a snippet) inline in your message. For a file the user must reach, write it to the artifacts directory ($CEZ_ARTIFACTS_DIR) and name it there, or to a non-ignored path in the worktree and give that worktree-relative path — never link to a gitignored file as if it could be opened.`;
260
+ User-attached screenshots and files (PDF, text, archives — any type) are saved as real files; their absolute paths are listed in the message that carries them. Read a file from its path when you need its contents, and use the path when a task needs the file itself (saving, uploading, attaching to issues/PRs). An image also rides along inline, but that copy is for viewing only and does not survive later workflow steps, some backends or a compacted context, while the file on disk always does; a non-image attachment exists ONLY as the file at that path. Read the file whenever the user refers to a screenshot you cannot see inline, and never tell the user their attachment did not reach you without opening its path first.`;
264
261
  export const FOLLOWUP_INSTRUCTIONS = `## Follow-ups (cezar)
265
262
 
266
263
  CEZ_TODOS_FILE (env) is the absolute path to the user's follow-up inbox — a JSON array. Only append an entry when a genuinely actionable follow-up remains: something concrete a human or the next agent still needs to decide or do (a review nit worth a dedicated pass, a manual step you cannot take yourself, a decision blocked on the user, a known next task). Do NOT append filler — a restated summary of what you just finished, a congratulatory note, or "no further action needed" is not a follow-up; when the task is simply done, skip this file entirely. When (and only when) a real follow-up exists, read the file (treat a missing file as []), append ONE object and write the whole array back:
@@ -1 +1 @@
1
- {"version":3,"file":"handoff.js","sourceRoot":"","sources":["../src/handoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;GAOG;AAEH,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,KAAa;IACxD,OAAO,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,aAAa,CAAC,CAAC;AACtD,CAAC;AAWD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAU1C,MAAM,YAAY,GAAG,6GAA6G,CAAC;AACnI,MAAM,eAAe,GAAG,cAAc,CAAC;AAEvC,SAAS,cAAc,CAAC,IAAY;IAClC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAC7B,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,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MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;stBAsB6qB,CAAC;AAEvtB,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;uDAKkB,CAAC;AAExD,sEAAsE;AACtE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,yBAAyB,OAAO,qBAAqB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-mercato/cezar",
3
- "version": "0.20.0-pr2131.5043",
3
+ "version": "0.20.0-pr2133.5040",
4
4
  "description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -56,8 +56,8 @@
56
56
  "zod": "^4.4.3"
57
57
  },
58
58
  "devDependencies": {
59
- "@open-mercato/cezar-api-client": "0.20.0-pr2131.5043",
60
- "@open-mercato/cezar-contract": "0.20.0-pr2131.5043",
59
+ "@open-mercato/cezar-api-client": "0.20.0-pr2133.5040",
60
+ "@open-mercato/cezar-contract": "0.20.0-pr2133.5040",
61
61
  "@types/node": "^20.14.0",
62
62
  "@types/proper-lockfile": "4.1.4",
63
63
  "@types/ws": "^8.18.1",
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-BcpPARdP.js";import{t as i}from"./project-router-CQgKXb1Q.js";import{k as a}from"./run-actions-No2Smzdn.js";import{t as o}from"./check-BhsriX7I.js";import{s}from"./dist-D8pw0dgI.js";import{v as c}from"./impact-model-nuLHTUiq.js";import{C as l,S as u,b as d,g as f,w as p}from"./composer-B9FK-_rN.js";import{t as m}from"./workflow-CC7fkrF4.js";import{_ as h,h as g,v as _}from"./use-now-BZ4hGfby.js";import{a as v,i as y,o as b,r as x,s as S,t as C}from"./command-DtTevltZ.js";import{a as w}from"./picker-pill-Cuhq9z1L.js";import{l as T}from"./index-BBKdPdRT.js";var E=n();function D({name:e,route:t,selected:n,list:i,detail:a}){return(0,E.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,E.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,E.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function O({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,E.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,E.jsx)(i,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var k=e(t(),1);function A({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[a,c]=(0,k.useState)(!1),[u,d]=(0,k.useState)(``),f=(0,k.useRef)(null),T=l(e,u);return(0,E.jsxs)(g,{open:a,onOpenChange:e=>{c(e),e||d(``)},children:[(0,E.jsx)(_,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(w,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,E.jsx)(m,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,E.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search workflows…`,value:u,onValueChange:d,onInput:()=>f.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:f,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[T.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,(0,E.jsx)(y,{children:T.map(e=>{let r=t===e.name;return(0,E.jsxs)(b,{value:`workflow ${e.name}`,keywords:p(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),c(!1)},children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,E.jsx)(o,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function j({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:l,slotPrefix:m=`gh`}){let[D,O]=(0,k.useState)(!1),[A,j]=(0,k.useState)(``),[M,N]=(0,k.useState)(null),P=(0,k.useRef)(null),{mostUsed:F,project:I,global:L}=d(u(e,A,t),t),R=(e,t)=>{let a=n.includes(e.name);return(0,E.jsxs)(b,{value:`skill ${e.name} ${e.path}`,keywords:p(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&l!==void 0&&n.length>=l,onSelect:()=>i(e.name),children:[(0,E.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,E.jsx)(`button`,{type:`button`,"data-slot":`${m}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),N(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,E.jsx)(c,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,E.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(T,{skill:M,onClose:()=>N(null)}),(0,E.jsxs)(g,{open:D,onOpenChange:e=>{O(e),e||j(``)},children:[(0,E.jsx)(_,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${m}-skills-trigger`,"aria-label":`Choose skills`,className:r(w,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,E.jsx)(a,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose skills`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search skills…`,value:A,onValueChange:j,onInput:()=>P.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:P,"data-slot":`${m}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[F.length===0&&I.length===0&&L.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,F.length>0?(0,E.jsx)(y,{heading:`Most used`,children:F.map(e=>R(e,f(e)))}):null,I.length>0?(0,E.jsx)(y,{heading:`Project skills`,children:I.map(e=>R(e,!0))}):null,L.length>0?(0,E.jsx)(y,{heading:`Global`,children:L.map(e=>R(e,!1))}):null]})]})})]})]})}export{D as i,A as n,O as r,j as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-BcpPARdP.js";import{t as i}from"./project-router-CQgKXb1Q.js";import{k as a}from"./run-actions-No2Smzdn.js";import{t as o}from"./check-BhsriX7I.js";import{s}from"./dist-D8pw0dgI.js";import{v as c}from"./impact-model-nuLHTUiq.js";import{C as l,S as u,b as d,g as f,w as p}from"./composer-B9FK-_rN.js";import{t as m}from"./workflow-CC7fkrF4.js";import{_ as h,h as g,v as _}from"./use-now-BZ4hGfby.js";import{a as v,i as y,o as b,r as x,s as S,t as C}from"./command-DtTevltZ.js";import{a as w}from"./picker-pill-Cuhq9z1L.js";import{l as T}from"./index-FEgJOGSj.js";var E=n();function D({name:e,route:t,selected:n,list:i,detail:a}){return(0,E.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,E.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,E.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function O({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,E.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,E.jsx)(i,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var k=e(t(),1);function A({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[a,c]=(0,k.useState)(!1),[u,d]=(0,k.useState)(``),f=(0,k.useRef)(null),T=l(e,u);return(0,E.jsxs)(g,{open:a,onOpenChange:e=>{c(e),e||d(``)},children:[(0,E.jsx)(_,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(w,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,E.jsx)(m,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,E.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search workflows…`,value:u,onValueChange:d,onInput:()=>f.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:f,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[T.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,(0,E.jsx)(y,{children:T.map(e=>{let r=t===e.name;return(0,E.jsxs)(b,{value:`workflow ${e.name}`,keywords:p(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),c(!1)},children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,E.jsx)(o,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function j({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:l,slotPrefix:m=`gh`}){let[D,O]=(0,k.useState)(!1),[A,j]=(0,k.useState)(``),[M,N]=(0,k.useState)(null),P=(0,k.useRef)(null),{mostUsed:F,project:I,global:L}=d(u(e,A,t),t),R=(e,t)=>{let a=n.includes(e.name);return(0,E.jsxs)(b,{value:`skill ${e.name} ${e.path}`,keywords:p(e.name,e.description),"data-slot":`${m}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&l!==void 0&&n.length>=l,onSelect:()=>i(e.name),children:[(0,E.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,E.jsx)(`button`,{type:`button`,"data-slot":`${m}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),N(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,E.jsx)(c,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,E.jsx)(o,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(T,{skill:M,onClose:()=>N(null)}),(0,E.jsxs)(g,{open:D,onOpenChange:e=>{O(e),e||j(``)},children:[(0,E.jsx)(_,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${m}-skills-trigger`,"aria-label":`Choose skills`,className:r(w,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,E.jsx)(a,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(h,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(C,{label:`Choose skills`,shouldFilter:!1,children:[(0,E.jsx)(v,{placeholder:`search skills…`,value:A,onValueChange:j,onInput:()=>P.current?.scrollTo(0,0)}),(0,E.jsxs)(S,{ref:P,"data-slot":`${m}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[F.length===0&&I.length===0&&L.length===0?(0,E.jsx)(x,{children:`Nothing matches.`}):null,F.length>0?(0,E.jsx)(y,{heading:`Most used`,children:F.map(e=>R(e,f(e)))}):null,I.length>0?(0,E.jsx)(y,{heading:`Project skills`,children:I.map(e=>R(e,!0))}):null,L.length>0?(0,E.jsx)(y,{heading:`Global`,children:L.map(e=>R(e,!1))}):null]})]})})]})]})}export{D as i,A as n,O as r,j as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ca as r,Ct as i,wt as a}from"./queries-B1yOm5FO.js";import{t as o,wt as s}from"./utils-BcpPARdP.js";import{c,x as l}from"./project-router-CQgKXb1Q.js";import{N as u,t as d}from"./button-B9KJXL33.js";import{T as f}from"./run-actions-No2Smzdn.js";import{s as p}from"./dist-D8pw0dgI.js";import{a as m,i as h,l as g,n as _,o as v,t as y}from"./dropdown-menu-BvyLO0fy.js";import{t as b}from"./download-D-226CPv.js";import{t as x}from"./external-link-B3QmKZmO.js";import{t as S}from"./file-preview-C06GdnoF.js";import{t as C}from"./file-DydsvqNX.js";import{t as w}from"./layers-CVxU7Gt9.js";import{t as T}from"./loader-circle-BkAW5kVY.js";import{a as E,c as D,d as O,f as k,i as A,l as j,o as M,r as N,s as P,t as F,u as I}from"./follow-up-engine-DHEqVRXm.js";import{t as L}from"./triangle-alert-B43b3C3i.js";import{t as ee}from"./x-Bc3zGWEA.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-CiuYjBsy.js";import{t as B}from"./markdown-Qe0hfZ7N.js";import{Ot as V,ct as H,kt as U,mt as W,wt as G}from"./index-BBKdPdRT.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=s.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function $({run:e,reference:t,onClearReference:n}){let r=F(e),i=N(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,p]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),p(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`truncate`,title:`${t.ref} — ${t.label}`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(ee,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-xs text-soft-foreground`,children:u??v}):null]})}var te=`No assets yet`,ne=`Agents publish pages here when they write to the run's artifacts folder.`;function re({runId:e,routed:t,run:n}){let i=a(e),s=l(),u=c(),[f,p]=(0,J.useState)(void 0),m=t?s.name:f,h=i.data?.artifacts??[],g=D(h,m),_=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):p(n)},[u,t,e]),[v,y]=oe(),[S,C]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),A=g?.kind===`html`?ie(i.data?.versions,g.name):[],j=A.at(-1)?.version,M=E&&g&&E.name===g.name&&E.version!==j&&A.some(e=>e.version===E.version)?E.version:void 0,N=(0,J.useRef)(null),[P,F]=(0,J.useState)(null);return Z(N,F),i.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):i.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:i.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[g?(0,Q.jsx)(se,{artifacts:h,current:g,onSelect:_}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),g?.kind===`html`?(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,title:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]}):null,g&&A.length>1?(0,Q.jsx)(ae,{versions:A,viewing:M,onSelect:e=>O(e===j?void 0:{name:g.name,version:e})}):null,M===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,M,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),i.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,i.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":v,"aria-label":v?`Leave focus`:`Focus`,title:v?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,className:o(`text-muted-foreground`,v&&`bg-muted text-foreground`),onClick:()=>y(!v),children:v?(0,Q.jsx)(V,{"aria-hidden":`true`}):(0,Q.jsx)(U,{"aria-hidden":`true`})}),g?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-open`,href:r(e,g.name,M),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:(0,Q.jsx)(x,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-download`,href:r(e,g.name,M),download:g.name,"aria-label":`Download`,title:`Download`,children:(0,Q.jsx)(b,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-reload`,"aria-label":`Reload`,title:`Reload`,className:`text-muted-foreground`,onClick:()=>C(e=>e+1),children:(0,Q.jsx)(k,{"aria-hidden":`true`})})]}):null]})]}),g?(0,Q.jsx)(ce,{runId:e,artifact:g,version:M,frameRef:N},`${g.name}@${g.updatedAt}#${S}v${M??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:te,subtitle:ne}),n&&g?(0,Q.jsx)($,{run:n,reference:P,onClearReference:()=>F(null)}):null]})}function ie(e,t){return(e??[]).filter(e=>e.files.includes(t))}function ae({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(y,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(_,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(m,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(v,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function oe(){let[e,t]=(0,J.useState)(()=>j(`assets`)),n=(0,J.useCallback)(e=>{I(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return H(()=>n(!1))},[e,n]),[e,n]}function se({artifacts:e,current:t,onSelect:n}){let r=P(e);return(0,Q.jsxs)(y,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${M(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(_,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(m,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(v,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function ce({runId:e,artifact:t,version:n,frameRef:i}){let a=W(),o=r(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:i,"data-slot":`assets-frame`,title:M(t),src:`${o}#theme=${a}`,sandbox:A,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:M(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(le,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(C,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(b,{"aria-hidden":`true`}),`Download`]})})})}}function le({runId:e,artifact:t}){let n=i(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(S,{path:t.name,text:n.data})})}export{re as AssetsView};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ca as r,Ct as i,wt as a}from"./queries-B1yOm5FO.js";import{t as o,wt as s}from"./utils-BcpPARdP.js";import{c,x as l}from"./project-router-CQgKXb1Q.js";import{N as u,t as d}from"./button-B9KJXL33.js";import{T as f}from"./run-actions-No2Smzdn.js";import{s as p}from"./dist-D8pw0dgI.js";import{a as m,i as h,l as g,n as _,o as v,t as y}from"./dropdown-menu-BvyLO0fy.js";import{t as b}from"./download-D-226CPv.js";import{t as x}from"./external-link-B3QmKZmO.js";import{t as S}from"./file-preview-C06GdnoF.js";import{t as C}from"./file-DydsvqNX.js";import{t as w}from"./layers-CVxU7Gt9.js";import{t as T}from"./loader-circle-BkAW5kVY.js";import{a as E,c as D,d as O,f as k,i as A,l as j,o as M,r as N,s as P,t as F,u as I}from"./follow-up-engine-DHEqVRXm.js";import{t as L}from"./triangle-alert-B43b3C3i.js";import{t as ee}from"./x-Bc3zGWEA.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-CiuYjBsy.js";import{t as B}from"./markdown-Qe0hfZ7N.js";import{Ot as V,ct as H,kt as U,mt as W,wt as G}from"./index-FEgJOGSj.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=s.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function $({run:e,reference:t,onClearReference:n}){let r=F(e),i=N(e,r.continueWith),a=f(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,p]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),p(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){p(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`truncate`,title:`${t.ref} — ${t.label}`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(ee,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-xs text-soft-foreground`,children:u??v}):null]})}var te=`No assets yet`,ne=`Agents publish pages here when they write to the run's artifacts folder.`;function re({runId:e,routed:t,run:n}){let i=a(e),s=l(),u=c(),[f,p]=(0,J.useState)(void 0),m=t?s.name:f,h=i.data?.artifacts??[],g=D(h,m),_=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):p(n)},[u,t,e]),[v,y]=oe(),[S,C]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),A=g?.kind===`html`?ie(i.data?.versions,g.name):[],j=A.at(-1)?.version,M=E&&g&&E.name===g.name&&E.version!==j&&A.some(e=>e.version===E.version)?E.version:void 0,N=(0,J.useRef)(null),[P,F]=(0,J.useState)(null);return Z(N,F),i.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):i.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:i.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[g?(0,Q.jsx)(se,{artifacts:h,current:g,onSelect:_}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),g?.kind===`html`?(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,title:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground sm:inline-flex`,children:[(0,Q.jsx)(G,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]}):null,g&&A.length>1?(0,Q.jsx)(ae,{versions:A,viewing:M,onSelect:e=>O(e===j?void 0:{name:g.name,version:e})}):null,M===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,M,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),i.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,i.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":v,"aria-label":v?`Leave focus`:`Focus`,title:v?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,className:o(`text-muted-foreground`,v&&`bg-muted text-foreground`),onClick:()=>y(!v),children:v?(0,Q.jsx)(V,{"aria-hidden":`true`}):(0,Q.jsx)(U,{"aria-hidden":`true`})}),g?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-open`,href:r(e,g.name,M),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:(0,Q.jsx)(x,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-download`,href:r(e,g.name,M),download:g.name,"aria-label":`Download`,title:`Download`,children:(0,Q.jsx)(b,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-reload`,"aria-label":`Reload`,title:`Reload`,className:`text-muted-foreground`,onClick:()=>C(e=>e+1),children:(0,Q.jsx)(k,{"aria-hidden":`true`})})]}):null]})]}),g?(0,Q.jsx)(ce,{runId:e,artifact:g,version:M,frameRef:N},`${g.name}@${g.updatedAt}#${S}v${M??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:te,subtitle:ne}),n&&g?(0,Q.jsx)($,{run:n,reference:P,onClearReference:()=>F(null)}):null]})}function ie(e,t){return(e??[]).filter(e=>e.files.includes(t))}function ae({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(y,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(_,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(h,{children:`Versions`}),(0,Q.jsx)(m,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(v,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function oe(){let[e,t]=(0,J.useState)(()=>j(`assets`)),n=(0,J.useCallback)(e=>{I(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return H(()=>n(!1))},[e,n]),[e,n]}function se({artifacts:e,current:t,onSelect:n}){let r=P(e);return(0,Q.jsxs)(y,{children:[(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${M(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(p,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(_,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(h,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(m,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(v,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function ce({runId:e,artifact:t,version:n,frameRef:i}){let a=W(),o=r(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:i,"data-slot":`assets-frame`,title:M(t),src:`${o}#theme=${a}`,sandbox:A,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:M(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(le,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(C,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(b,{"aria-hidden":`true`}),`Download`]})})})}}function le({runId:e,artifact:t}){let n=i(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(S,{path:t.name,text:n.data})})}export{re as AssetsView};