specrails-desktop 2.47.0 → 2.48.0
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/README.md +2 -0
- package/client/dist/assets/{ActivityFeedPage-DSCpSOGV.js → ActivityFeedPage-CGq6QhP5.js} +1 -1
- package/client/dist/assets/AgentBrowserCapture-C4GZ-kdf.js +1 -0
- package/client/dist/assets/AgentModeAnalyticsPane-_IPmL0ZS.js +2 -0
- package/client/dist/assets/AgentModeCodePane-B5WG5DOP.js +2 -0
- package/client/dist/assets/{AgentModeJobsPane-Dw3DNFkh.js → AgentModeJobsPane-w1N_HIXh.js} +1 -1
- package/client/dist/assets/AgentsPage-CmwnnT46.js +87 -0
- package/client/dist/assets/AnalyticsPage-BUMsKtsJ.js +1 -0
- package/client/dist/assets/CodePage-PjgywJPS.js +3 -0
- package/client/dist/assets/DesktopAnalyticsPage-BXY1pH4y.js +1 -0
- package/client/dist/assets/DocsDialog-ccQETHKB.js +11 -0
- package/client/dist/assets/DocsPage-DzEgplB3.js +11 -0
- package/client/dist/assets/{ExportDropdown-BwuvqS2Y.js → ExportDropdown-B8bBGopr.js} +1 -1
- package/client/dist/assets/InteractiveJobComposer-CEwGkJ8F.js +19 -0
- package/client/dist/assets/JobDetailModal-BYXmuTDe.js +1 -0
- package/client/dist/assets/JobDetailPage-CWp6MwJj.js +1 -0
- package/client/dist/assets/JobsPage-D1O1uyG8.js +1 -0
- package/client/dist/assets/{LoopBuilderPage-Byvq8Oqx.js → LoopBuilderPage-DQE-7Vby.js} +2 -2
- package/client/dist/assets/{LoopPreviewModal-BMC9Mgj1.js → LoopPreviewModal-Bk7zIXD5.js} +1 -1
- package/client/dist/assets/LoopsPage-CqG7mx56.js +1 -0
- package/client/dist/assets/MinimizedChatsContext-UpnqccPx.js +1 -0
- package/client/dist/assets/PluginsPage-CjgVvmpW.js +2 -0
- package/client/dist/assets/{ProjectSettingsDialog-nspqxH-M.js → ProjectSettingsDialog-D6vBCoay.js} +1 -1
- package/client/dist/assets/{RepositoryDeliveries-Dq9NJOWi.js → RepositoryDeliveries-C36ipKp_.js} +1 -1
- package/client/dist/assets/{RepositoryScopeSelector-C3jKG2z0.js → RepositoryScopeSelector-0Gz_fR1E.js} +1 -1
- package/client/dist/assets/ReviewPacketPage-Dr9RYs7q.js +1 -0
- package/client/dist/assets/TemplatePreviewModal-sCMHYFJo.js +1 -0
- package/client/dist/assets/TicketDetailModalContext-C5GgJlEt.js +14 -0
- package/client/dist/assets/{Trans-C0KyPo2O.js → Trans-9pHTy2fH.js} +1 -1
- package/client/dist/assets/{addspec-D2YIQ0GU.js → addspec-BOvgmcgk.js} +1 -1
- package/client/dist/assets/{addspec-B_TPJt-R.js → addspec-Clmyfn_R.js} +1 -1
- package/client/dist/assets/{addspec-A1lDQa4M.js → addspec-CsNaBpHp.js} +1 -1
- package/client/dist/assets/{addspec-CQBjzt24.js → addspec-D2tvWmmV.js} +1 -1
- package/client/dist/assets/{addspec-CLYLvaVP.js → addspec-D3nFwvD0.js} +1 -1
- package/client/dist/assets/{addspec-BPpZ_olp.js → addspec-DVLEhK3w.js} +1 -1
- package/client/dist/assets/{addspec-iFdQ6D99.js → addspec-DXbK-tb0.js} +1 -1
- package/client/dist/assets/{addspec-BHZd0N5F.js → addspec-OHG8DFEn.js} +1 -1
- package/client/dist/assets/agentRuntime-BUimiX__.js +1 -0
- package/client/dist/assets/agentRuntime-BcN97sAB.js +1 -0
- package/client/dist/assets/agentRuntime-Ckyg-ahT.js +1 -0
- package/client/dist/assets/agentRuntime-DJCwyX4t.js +1 -0
- package/client/dist/assets/agentRuntime-DVzPJOl0.js +1 -0
- package/client/dist/assets/agentRuntime-V9AZTG3c.js +1 -0
- package/client/dist/assets/agentRuntime-bAAjw1vw.js +1 -0
- package/client/dist/assets/agentRuntime-v4qKAYH-.js +1 -0
- package/client/dist/assets/{agents-DyI4rbHa.js → agents-CA5eT1d0.js} +1 -1
- package/client/dist/assets/{agents-_5mJMkAE.js → agents-CAgy-5uS.js} +1 -1
- package/client/dist/assets/{agents-BIT1UdTy.js → agents-CNm6Qzlv.js} +1 -1
- package/client/dist/assets/{agents-CST-lpYX.js → agents-CTwbx-fb.js} +1 -1
- package/client/dist/assets/{agents-C7fKfvm8.js → agents-DEGV1Vao.js} +1 -1
- package/client/dist/assets/{agents-DsgGMGwU.js → agents-HsDF1aQU.js} +1 -1
- package/client/dist/assets/{agents-Cm2JYrAa.js → agents-IQjdA-z9.js} +1 -1
- package/client/dist/assets/{agents-H6tVQUNP.js → agents-RkGoteXh.js} +1 -1
- package/client/dist/assets/analytics-BNgZ1Nj7.js +1 -0
- package/client/dist/assets/analytics-BlypLLR6.js +1 -0
- package/client/dist/assets/analytics-CoEzWPx4.js +1 -0
- package/client/dist/assets/analytics-DFh5lSOl.js +1 -0
- package/client/dist/assets/analytics-DZp-DS2U.js +1 -0
- package/client/dist/assets/analytics-DjLlE7jS.js +1 -0
- package/client/dist/assets/analytics-jzCkOec3.js +1 -0
- package/client/dist/assets/analytics-nZIjjtCc.js +1 -0
- package/client/dist/assets/{dashboard-BK_mez-z.js → dashboard-C29Qwa-L.js} +1 -1
- package/client/dist/assets/{dashboard-BwkjxI6H.js → dashboard-CSJzf5OT.js} +1 -1
- package/client/dist/assets/{dashboard-C3bDKf7s.js → dashboard-CTfEtkqX.js} +1 -1
- package/client/dist/assets/{dashboard-Bt0cCzeG.js → dashboard-Cr4D8oMn.js} +1 -1
- package/client/dist/assets/{dashboard-fRrP0Kv0.js → dashboard-Csf1yGSN.js} +1 -1
- package/client/dist/assets/{dashboard-CdvjGfog.js → dashboard-D40HP2ks.js} +1 -1
- package/client/dist/assets/dashboard-DBAP2_SQ.js +1 -0
- package/client/dist/assets/{dashboard-B14uYXkG.js → dashboard-DMklepmz.js} +1 -1
- package/client/dist/assets/file-text-CFT-xXKN.js +1 -0
- package/client/dist/assets/{formatDistanceToNow-D44phX1J.js → formatDistanceToNow-w_2U5pm0.js} +1 -1
- package/client/dist/assets/{getTimezoneOffsetInMilliseconds-EAh9LFSx.js → getTimezoneOffsetInMilliseconds-BRymg1Kk.js} +1 -1
- package/client/dist/assets/index-D0ScFZvR.css +2 -0
- package/client/dist/assets/index-DORCrgbI.js +77 -0
- package/client/dist/assets/jira-api-BqHbSdxK.js +1 -0
- package/client/dist/assets/jobs-C6qmvUAi.js +1 -0
- package/client/dist/assets/jobs-C9j2PuwW.js +1 -0
- package/client/dist/assets/jobs-DLHdDkHc.js +1 -0
- package/client/dist/assets/jobs-DSp9DoD_.js +1 -0
- package/client/dist/assets/jobs-DTQO08nJ.js +1 -0
- package/client/dist/assets/jobs-DoFaEl9g.js +1 -0
- package/client/dist/assets/jobs-Dpw6AEOP.js +1 -0
- package/client/dist/assets/jobs-DrF8Do8s.js +1 -0
- package/client/dist/assets/{narration-UWi_xIZ-.js → narration--hUhjM5v.js} +1 -1
- package/client/dist/assets/{narration-DiPyj06T.js → narration-CHI06czm.js} +1 -1
- package/client/dist/assets/{narration-DrBAf8uv.js → narration-DjKB3pQZ.js} +1 -1
- package/client/dist/assets/{narration-CqNvgRi9.js → narration-DtCYvRLM.js} +1 -1
- package/client/dist/assets/{narration-B1uGfofH.js → narration-DvLQBW9U.js} +1 -1
- package/client/dist/assets/{narration-BKcL4Srl.js → narration-eSx3gR0W.js} +1 -1
- package/client/dist/assets/{narration-OyujFouL.js → narration-n3hOA7LY.js} +1 -1
- package/client/dist/assets/{narration-BtjKyHVM.js → narration-thJOeT2-.js} +1 -1
- package/client/dist/assets/packet-BNW8ODQw.js +1 -0
- package/client/dist/assets/packet-CXYvfdjy.js +1 -0
- package/client/dist/assets/packet-CtIlB8YE.js +1 -0
- package/client/dist/assets/packet-DA1SJkMH.js +1 -0
- package/client/dist/assets/packet-DYcWfBip.js +1 -0
- package/client/dist/assets/packet-DseX9yKC.js +1 -0
- package/client/dist/assets/packet-_m5aOy_d.js +1 -0
- package/client/dist/assets/packet-qOemUAm3.js +1 -0
- package/client/dist/assets/{project-repositories-GRYdjlKB.js → project-repositories-BsCs1PPA.js} +1 -1
- package/client/dist/assets/provider-capabilities-Vi1ZGvAK.js +1 -0
- package/client/dist/assets/settings-BsehKpty.js +1 -0
- package/client/dist/assets/settings-CQWob3SB.js +1 -0
- package/client/dist/assets/settings-CgCl0hzy.js +1 -0
- package/client/dist/assets/settings-DLRLd22L.js +1 -0
- package/client/dist/assets/settings-Dn5prAFl.js +1 -0
- package/client/dist/assets/settings-HZSu-K4l.js +1 -0
- package/client/dist/assets/{settings-DEgcA0jd.js → settings-p4OVIyRh.js} +1 -1
- package/client/dist/assets/settings-rddaldUp.js +1 -0
- package/client/dist/assets/setup-B5FHuxvB.js +1 -0
- package/client/dist/assets/setup-BihzXadx.js +1 -0
- package/client/dist/assets/setup-BtC6Hg4K.js +1 -0
- package/client/dist/assets/setup-C9Fy9PKQ.js +1 -0
- package/client/dist/assets/setup-CROyqD5N.js +1 -0
- package/client/dist/assets/setup-DpqzaEEA.js +1 -0
- package/client/dist/assets/setup-Dwzt5nO1.js +1 -0
- package/client/dist/assets/setup-zLEDnG7N.js +1 -0
- package/client/dist/assets/{spending-CN9PHM65.js → spending-hcgxHP4O.js} +1 -1
- package/client/dist/assets/{useDesktop-iius_s5d.js → useDesktop-CAisjKWC.js} +1 -1
- package/client/dist/assets/{useSharedWebSocket-D7hkZ3Ka.js → useSharedWebSocket-BHIfW4QT.js} +2 -2
- package/client/dist/assets/wrench-BfmNO9Vw.js +1 -0
- package/client/dist/index.html +27 -26
- package/docs/guide/de/integrations/7-local-engines.md +37 -0
- package/docs/guide/en/integrations/7-local-engines.md +37 -0
- package/docs/guide/es/integrations/7-local-engines.md +37 -0
- package/docs/guide/fr/integrations/7-local-engines.md +37 -0
- package/docs/guide/it/integrations/7-local-engines.md +37 -0
- package/docs/guide/ja/integrations/7-local-engines.md +37 -0
- package/docs/guide/pt/integrations/7-local-engines.md +37 -0
- package/docs/guide/zh/integrations/7-local-engines.md +37 -0
- package/docs/internals/adding-a-provider.md +12 -0
- package/docs/internals/local-agent-runner.md +153 -0
- package/docs/internals/review-packet.md +8 -0
- package/docs/local-providers.md +215 -0
- package/local-runner/dist/specrails-local-runner.js +15815 -0
- package/package.json +7 -5
- package/server/dist/agent-chat-manager.js +8 -1
- package/server/dist/agent-chat-router.js +5 -2
- package/server/dist/agent-fence-promotion.js +53 -0
- package/server/dist/agent-mcp-config.js +4 -1
- package/server/dist/agent-runtime-bridge.js +7 -2
- package/server/dist/agent-runtime-controls-router.js +12 -1
- package/server/dist/agent-runtime-controls.js +37 -2
- package/server/dist/agent-runtime-effective-config.js +28 -7
- package/server/dist/agent-runtime-metrics.js +1 -1
- package/server/dist/agent-runtime-settings-router.js +76 -6
- package/server/dist/agent-runtime-settings.js +137 -7
- package/server/dist/agent-spec-framing.js +10 -4
- package/server/dist/binary-probe.js +12 -0
- package/server/dist/blueprint-router.js +3 -2
- package/server/dist/chat-manager.js +5 -1
- package/server/dist/desktop-router.js +87 -4
- package/server/dist/index.js +13 -0
- package/server/dist/interactive-job-session.js +3 -1
- package/server/dist/local-engine-detection.js +118 -0
- package/server/dist/loop-executors.js +2 -1
- package/server/dist/loop-role-engines.js +129 -0
- package/server/dist/loop-run-manager.js +4 -4
- package/server/dist/mcp/tools/app-settings.js +30 -4
- package/server/dist/mcp/tools/rails.js +1 -1
- package/server/dist/pr-body.js +11 -2
- package/server/dist/pricing.js +15 -0
- package/server/dist/provider-detection.js +63 -1
- package/server/dist/provider-selection.js +26 -1
- package/server/dist/providers/index.js +4 -1
- package/server/dist/providers/local-adapter-registry.js +56 -0
- package/server/dist/providers/local-adapter.js +426 -0
- package/server/dist/providers/registry.js +39 -4
- package/server/dist/rail-isolated-launch.js +3 -3
- package/server/dist/rails-router.js +66 -10
- package/server/dist/result-event.js +17 -0
- package/server/dist/review-packet.js +1 -0
- package/server/dist/schemas/agent-runtime.schema.json +10 -2
- package/server/dist/setup-manager.js +5 -1
- package/server/dist/spec-models.js +14 -2
- package/server/dist/worktree-node-modules.js +97 -65
- package/client/dist/assets/AgentBrowserCapture-mc1c5pgS.js +0 -1
- package/client/dist/assets/AgentModeAnalyticsPane--UkamBTm.js +0 -2
- package/client/dist/assets/AgentModeCodePane-DJCswsvU.js +0 -2
- package/client/dist/assets/AgentsPage-ChElPUL9.js +0 -87
- package/client/dist/assets/AnalyticsPage-BGtkFHBp.js +0 -1
- package/client/dist/assets/CodePage-BBnw3VGn.js +0 -3
- package/client/dist/assets/DesktopAnalyticsPage-B85tNScc.js +0 -1
- package/client/dist/assets/DocsDialog-D4cXrOMl.js +0 -11
- package/client/dist/assets/DocsPage-BCAbC6qy.js +0 -11
- package/client/dist/assets/InteractiveJobComposer-Coq-Zhk0.js +0 -19
- package/client/dist/assets/JobDetailModal--Mjam0Nc.js +0 -1
- package/client/dist/assets/JobDetailPage-B6ShWSBh.js +0 -1
- package/client/dist/assets/JobsPage-DHU_ep_B.js +0 -1
- package/client/dist/assets/LoopsPage-CFGl-Nw8.js +0 -1
- package/client/dist/assets/MinimizedChatsContext-DHjHBYqa.js +0 -1
- package/client/dist/assets/PluginsPage-BHygRnW6.js +0 -2
- package/client/dist/assets/ReviewPacketPage-C9mqhi65.js +0 -1
- package/client/dist/assets/TemplatePreviewModal-BmwoAjOr.js +0 -1
- package/client/dist/assets/TicketDetailModalContext-lYmoONrd.js +0 -14
- package/client/dist/assets/agentRuntime-62GWdc26.js +0 -1
- package/client/dist/assets/agentRuntime-BN1mKAuY.js +0 -1
- package/client/dist/assets/agentRuntime-BNBCzQLM.js +0 -1
- package/client/dist/assets/agentRuntime-BQE_K1GG.js +0 -1
- package/client/dist/assets/agentRuntime-CCU3HCtS.js +0 -1
- package/client/dist/assets/agentRuntime-DT72Bpdv.js +0 -1
- package/client/dist/assets/agentRuntime-ZfMPeeiP.js +0 -1
- package/client/dist/assets/agentRuntime-g3W8Ry4d.js +0 -1
- package/client/dist/assets/analytics-47pYygtV.js +0 -1
- package/client/dist/assets/analytics-B0vt1g5U.js +0 -1
- package/client/dist/assets/analytics-BMzCvrCU.js +0 -1
- package/client/dist/assets/analytics-BlFN3Zwx.js +0 -1
- package/client/dist/assets/analytics-CZYzL-nR.js +0 -1
- package/client/dist/assets/analytics-DAsb9MJ8.js +0 -1
- package/client/dist/assets/analytics-FXQlQ2Yt.js +0 -1
- package/client/dist/assets/analytics-RnFCNkah.js +0 -1
- package/client/dist/assets/dashboard-BfBir_6o.js +0 -1
- package/client/dist/assets/file-text-BcLCfcWZ.js +0 -1
- package/client/dist/assets/index-Cfh9aaep.css +0 -2
- package/client/dist/assets/index-DgMBighL.js +0 -76
- package/client/dist/assets/jira-api-BQR6G0YY.js +0 -1
- package/client/dist/assets/jobs-5PQJbdOf.js +0 -1
- package/client/dist/assets/jobs-B2B08Oy9.js +0 -1
- package/client/dist/assets/jobs-BJZtBbwb.js +0 -1
- package/client/dist/assets/jobs-BlWEsQb7.js +0 -1
- package/client/dist/assets/jobs-ConfD8xD.js +0 -1
- package/client/dist/assets/jobs-DMPU64ms.js +0 -1
- package/client/dist/assets/jobs-DojASiTp.js +0 -1
- package/client/dist/assets/jobs-kVHkNpB-.js +0 -1
- package/client/dist/assets/packet-BQ2tXfJI.js +0 -1
- package/client/dist/assets/packet-BdpOJ1Cy.js +0 -1
- package/client/dist/assets/packet-C3Ievb9R.js +0 -1
- package/client/dist/assets/packet-C4zJIG0Y.js +0 -1
- package/client/dist/assets/packet-Cx-zRuWn.js +0 -1
- package/client/dist/assets/packet-DUTGX52M.js +0 -1
- package/client/dist/assets/packet-DhsKtUPB.js +0 -1
- package/client/dist/assets/packet-z3LJ8Zyy.js +0 -1
- package/client/dist/assets/provider-capabilities-CXipwrXJ.js +0 -1
- package/client/dist/assets/settings-B3rWEwOx.js +0 -1
- package/client/dist/assets/settings-BcVoiMyw.js +0 -1
- package/client/dist/assets/settings-BlYvaQ7w.js +0 -1
- package/client/dist/assets/settings-CD5uEBiL.js +0 -1
- package/client/dist/assets/settings-CyhS0DLJ.js +0 -1
- package/client/dist/assets/settings-DCMFUGDs.js +0 -1
- package/client/dist/assets/settings-DmbYKyMJ.js +0 -1
- package/client/dist/assets/setup-2xGgu4Sk.js +0 -1
- package/client/dist/assets/setup-Ba11l2JA.js +0 -1
- package/client/dist/assets/setup-BzW4kMok.js +0 -1
- package/client/dist/assets/setup-COzwYhkJ.js +0 -1
- package/client/dist/assets/setup-CRVULhtF.js +0 -1
- package/client/dist/assets/setup-DgvlxwpE.js +0 -1
- package/client/dist/assets/setup-Dw_wYeEY.js +0 -1
- package/client/dist/assets/setup-ZPtEeJPW.js +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-B3mKBIh5.js","assets/rolldown-runtime-CNC7AqOf.js","assets/dist-js-Rlh4FLH5.js","assets/event-Bt7f3wXe.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{n as t,t as n}from"./jsx-runtime-zu2_FqZY.js";import{t as r}from"./react-dom-DiWzBDP9.js";import{t as i}from"./preload-helper-Czpn1I53.js";import{u as a}from"./chunk-KS7C4IRE-DEKu087k.js";import{D as o,E as s,a as c,h as l,l as u,m as d,r as f,w as p,x as m}from"./useSharedWebSocket-D7hkZ3Ka.js";import{t as h}from"./Trans-C0KyPo2O.js";import{n as g,t as _}from"./createLucideIcon-Bjbbp_KS.js";import{a as v,r as y,s as b}from"./useDesktop-iius_s5d.js";import{n as x,t as S}from"./save-B6wGWwBR.js";import{n as C,r as w}from"./spending-CN9PHM65.js";import{c as T,d as E,f as D,n as O}from"./MinimizedChatsContext-DHjHBYqa.js";import{t as k}from"./file-text-BcLCfcWZ.js";import{t as A}from"./circle-x-CMYsN4ZH.js";import{t as j}from"./download-CFHyyHcw.js";import{t as M}from"./git-branch-BRM0F5GN.js";import{t as N}from"./loader-circle-DcygOQpC.js";import{t as ee}from"./pencil-C9RkrIPZ.js";import{n as P,t as F}from"./square-Ci-PFcFe.js";import{t as te}from"./plus-CsnjfkmX.js";import{t as I}from"./search-Cq_gE3Ik.js";import{t as L}from"./trash-2-BOU3WdZZ.js";import{t as R}from"./triangle-alert-H9T4jAmh.js";import{n as ne,t as z}from"./jira-api-BQR6G0YY.js";import{t as re}from"./x-CBMI9ejn.js";import{t as B}from"./zap-CHo3aCD1.js";import{M as ie,N as ae,a as V,i as oe,j as se,l as ce,o as le,r as ue,t as de}from"./dialog-xXB2q5HJ.js";import{t as H}from"./utils-BC4DHlz2.js";import{n as fe,t as pe}from"./lib-CGdyxIWg.js";import{t as U}from"./formatDistanceToNow-D44phX1J.js";import{t as W}from"./button-Ccc9Dc-D.js";import{t as me}from"./RepositoryScopeSelector-C3jKG2z0.js";import{n as he}from"./provider-capabilities-CXipwrXJ.js";function ge(){return typeof window<`u`&&window.__TAURI_INTERNALS__!==void 0}async function G(e){if(!ge())return;let{invoke:t}=await i(async()=>{let{invoke:e}=await import(`./core-B3mKBIh5.js`).then(e=>e.i);return{invoke:e}},__vite__mapDeps([0,1]));await t(`desktop_reveal_path`,{path:e})}async function _e(e){if(ge())try{let t=await i(()=>import(`./dist-js-Rlh4FLH5.js`),__vite__mapDeps([2,0,1]));if(typeof t.open==`function`){await t.open(e);return}}catch(e){console.warn(`[openExternalUrl] tauri shell open failed:`,e)}try{window.open(e,`_blank`,`noopener,noreferrer`)}catch{}}function ve(e=``){return e||(typeof window<`u`&&(`__TAURI_INTERNALS__`in window||window.location.hostname===`tauri.localhost`)||typeof window<`u`&&window.location.protocol!==`http:`&&window.location.protocol!==`https:`?`ws://127.0.0.1:4200`:`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}`)}var ye=ve(),be=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_TERMINAL_PANEL;return typeof e!=`string`||e!==`false`})(),xe=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_AGENTS_SECTION;return typeof e!=`string`||e!==`false`})(),Se=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_CODE_EXPLORER;return typeof e!=`string`||e!==`false`})(),Ce=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_JIRA;return typeof e!=`string`||e!==`false`})(),we=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_MCP;return typeof e!=`string`||e!==`false`})(),Te=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_AGENT_CHAT;return typeof e!=`string`||e!==`false`})(),Ee=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_AGENT_MODE;return Te&&(typeof e!=`string`||e!==`false`)})();(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_INTERACTIVE_JOBS;return typeof e!=`string`||e!==`false`})();var De=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_LOOPS_SECTION;return typeof e!=`string`||e!==`false`})(),Oe=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_NATIVE_BROWSER;return typeof e!=`string`||e!==`false`})(),ke=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_PROJECT_BUILDER;return typeof e!=`string`||e!==`false`})(),Ae=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_REVIEW_PACKET;return typeof e!=`string`||e!==`false`})(),je=(()=>{let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_NARRATED_PROGRESS;return typeof e!=`string`||e!==`false`})(),Me=_(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Ne=_(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),Pe=_(`circle-arrow-right`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m12 16 4-4-4-4`,key:`1i9zcv`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]),Fe=_(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ie=_(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Le=_(`droplet`,[[`path`,{d:`M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z`,key:`c7niix`}]]),Re=_(`file-minus-corner`,[[`path`,{d:`M20 14V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12`,key:`l9p8hp`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),ze=_(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),Be=_(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Ve=_(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),K=_(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),He=_(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),Ue=_(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),We=_(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),Ge=_(`redo-2`,[[`path`,{d:`m15 14 5-5-5-5`,key:`12vg1m`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`,key:`6uklza`}]]),Ke=_(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),qe=_(`split`,[[`path`,{d:`M16 3h5v5`,key:`1806ms`}],[`path`,{d:`M8 3H3v5`,key:`15dfkv`}],[`path`,{d:`M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3`,key:`1qrqzj`}],[`path`,{d:`m15 9 6-6`,key:`ko1vev`}]]),Je=_(`ticket`,[[`path`,{d:`M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z`,key:`qn84l0`}],[`path`,{d:`M13 5v2`,key:`dyzc3o`}],[`path`,{d:`M13 17v2`,key:`1ont0d`}],[`path`,{d:`M13 11v2`,key:`1wjjxi`}]]),Ye=_(`type`,[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]),Xe=_(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),Ze=_(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qe=_(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),q=new Map,$e=2e3;function et(e){q.set(e,(q.get(e)??0)+1)}function tt(e){(q.get(e)??0)<=0||setTimeout(()=>{let t=(q.get(e)??0)-1;t<=0?q.delete(e):q.set(e,t)},$e)}function nt(e){return e?(q.get(e)??0)>0:!1}var J=e(t(),1),rt=3e3,it=`
|
|
3
|
-
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
## Contract Layer
|
|
7
|
-
|
|
8
|
-
`;function Y(e){return`${u}/api/projects/${encodeURIComponent(e)}`}function at(e,t){return JSON.stringify(e)===JSON.stringify(t)}function ot(e,t){let n=new Map(e.map(e=>[e.id,e])),r=t.map(e=>{let t=n.get(e.id);return t&&at(t,e)?t:e});return r.length===e.length&&r.every((t,n)=>t===e[n])?e:r}function st(){let{t:e}=g(`tickets`),{activeProjectId:t}=y(),[n,r]=(0,J.useState)([]),[i,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(null),[c,l]=(0,J.useState)(new Set),[u,d]=(0,J.useState)(new Set),p=(0,J.useRef)(t);p.current=t;let m=(0,J.useRef)(0),h=(0,J.useRef)(null),_=(0,J.useRef)(new Set),{registerHandler:v,unregisterHandler:x,connectionStatus:S}=f(),C=(0,J.useId)(),w=(0,J.useCallback)(async(e,t)=>{let n=Y(e),r=await fetch(`${n}/tickets`,{signal:t,cache:`no-store`});if(!r.ok)throw Error(`Failed to fetch tickets: ${r.status}`);let i=await r.json();return Array.isArray(i)?i:i.tickets??[]},[]),T=(0,J.useCallback)(async(t,n)=>{let i=++m.current;h.current?.abort();let o=new AbortController;h.current=o,p.current===t&&(a(!0),s(null));try{let a=await w(t,o.signal);if(o.signal.aborted||i!==m.current||p.current!==t)return;let s=_.current,c=new Set;if(n===`merge`)for(let e of a)s.size>0&&!s.has(e.id)&&c.add(e.id);_.current=new Set(a.map(e=>e.id)),r(n===`replace`?a:e=>ot(e,a)),c.size>0&&s.size>0&&(l(c),b.success(e(`toasts.newTicketsAdded`,{count:c.size}),{id:`tickets-added-${t}`}),setTimeout(()=>{p.current===t&&l(e=>{let t=new Set(e);for(let e of c)t.delete(e);return t})},rt))}catch(e){if(o.signal.aborted||i!==m.current||p.current!==t)return;s(e instanceof Error?e.message:String(e))}finally{i===m.current&&(h.current===o&&(h.current=null),p.current===t&&a(!1))}},[w,e]),E=(0,J.useCallback)(async()=>{t&&await T(t,`merge`)},[t,T]);(0,J.useEffect)(()=>{if(m.current+=1,h.current?.abort(),h.current=null,r([]),a(!1),s(null),_.current=new Set,l(new Set),d(new Set),t)return T(t,`replace`),()=>{m.current+=1,h.current?.abort(),h.current=null}},[t,T]);let D=(0,J.useCallback)(t=>{let n=t;if(!n||typeof n.type!=`string`)return;let i=p.current;if(!(n.projectId&&n.projectId!==i))switch(n.type){case`desktop.project_recovered`:n.projectId===i&&E();break;case`mcp.activity`:n.affectedProjectId&&n.affectedProjectId===i&&E();break;case`ticket_created`:{if(!n.ticket)break;let t=n.ticket;r(e=>e.some(e=>e.id===t.id)?e:[...e,t]),_.current.add(t.id),l(e=>new Set([...e,t.id])),nt(i)||b.success(e(`toasts.newTicket`,{title:t.title}),{id:`new-ticket-${t.id}`}),setTimeout(()=>{l(e=>{let n=new Set(e);return n.delete(t.id),n})},rt);break}case`ticket_updated`:{if(!n.ticket)break;if(n.ticket.id===0){E();break}let e=n.ticket;r(t=>t.map(t=>t.id===e.id?e:t)),typeof e.description==`string`&&e.description.includes(it)&&d(t=>{if(!t.has(e.id))return t;let n=new Set(t);return n.delete(e.id),n});break}case`ticket_deleted`:{if(n.ticketId==null)break;let e=n.ticketId;r(t=>t.filter(t=>t.id!==e)),_.current.delete(e);break}case`explore.contract_refine_started`:if(n.ticketId==null)break;d(e=>new Set([...e,n.ticketId]));break;case`explore.contract_refine_failed`:{if(n.ticketId==null)break;let e=n.ticketId;d(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n});break}}},[E,e]);(0,J.useLayoutEffect)(()=>(v(`tickets-${C}`,D),()=>x(`tickets-${C}`)),[D,v,x,C]);let O=(0,J.useRef)(S);return(0,J.useEffect)(()=>{O.current!==`connected`&&S===`connected`&&p.current&&E(),O.current=S},[S,E]),{tickets:n,loading:i,isLoading:i,error:o,newTicketIds:c,contractRefiningIds:u,refetch:E,refresh:E,deleteTicket:(0,J.useCallback)(async e=>{let n=t;if(!n)return!1;try{let t=await fetch(`${Y(n)}/tickets/${e}`,{method:`DELETE`});return t.ok&&p.current===n&&await T(n,`merge`),t.ok}catch{return!1}},[t,T]),updateTicketStatus:(0,J.useCallback)(async(e,n)=>{let r=t;if(!r)return!1;try{let t=await fetch(`${Y(r)}/tickets/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({status:n})});return t.ok&&p.current===r&&await T(r,`merge`),t.ok}catch{return!1}},[t,T]),updateTicketPriority:(0,J.useCallback)(async(e,n)=>{let r=t;if(!r)return!1;try{let t=await fetch(`${Y(r)}/tickets/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({priority:n})});return t.ok&&p.current===r&&await T(r,`merge`),t.ok}catch{return!1}},[t,T]),createTicket:(0,J.useCallback)(async e=>{let n=t;if(!n)return!1;try{let t=await fetch(`${Y(n)}/tickets`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});return t.ok&&p.current===n&&await T(n,`merge`),t.ok}catch{return!1}},[t,T]),updateTicket:(0,J.useCallback)(async(e,n)=>{let r=t;if(!r)return!1;try{let t=await fetch(`${Y(r)}/tickets/${e}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return t.ok&&p.current===r&&await T(r,`merge`),t.ok}catch{return!1}},[t,T])}}function ct(e,t){let n=()=>p(t?.in,NaN),r=t?.additionalDigits??2,i=pt(e),a;if(i.date){let e=mt(i.date,r);a=ht(e.restDateString,e.year)}if(!a||isNaN(+a))return n();let o=+a,s=0,c;if(i.time&&(s=_t(i.time),isNaN(s)))return n();if(i.timezone){if(c=yt(i.timezone),isNaN(c))return n()}else{let e=new Date(o+s),n=m(0,t?.in);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}return m(o+s+c,t?.in)}var lt={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ut=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,dt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ft=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pt(e){let t={},n=e.split(lt.dateTimeDelimiter),r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],lt.timeZoneDelimiter.test(t.date)&&(t.date=e.split(lt.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){let e=lt.timezone.exec(r);e?(t.time=r.replace(e[1],``),t.timezone=e[1]):t.time=r}return t}function mt(e,t){let n=RegExp(`^(?:(\\d{4}|[+-]\\d{`+(4+t)+`})|(\\d{2}|[+-]\\d{`+(2+t)+`})$)`),r=e.match(n);if(!r)return{year:NaN,restDateString:``};let i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function ht(e,t){if(t===null)return new Date(NaN);let n=e.match(ut);if(!n)return new Date(NaN);let r=!!n[4],i=gt(n[1]),a=gt(n[2])-1,o=gt(n[3]),s=gt(n[4]),c=gt(n[5])-1;if(r)return Tt(t,s,c)?bt(t,s,c):new Date(NaN);{let e=new Date(0);return!Ct(t,a,o)||!wt(t,i)?new Date(NaN):(e.setUTCFullYear(t,a,Math.max(i,o)),e)}}function gt(e){return e?parseInt(e):1}function _t(e){let t=e.match(dt);if(!t)return NaN;let n=vt(t[1]),r=vt(t[2]),i=vt(t[3]);return Et(n,r,i)?n*s+r*o+i*1e3:NaN}function vt(e){return e&&parseFloat(e.replace(`,`,`.`))||0}function yt(e){if(e===`Z`)return 0;let t=e.match(ft);if(!t)return 0;let n=t[1]===`+`?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return Dt(r,i)?n*(r*s+i*o):NaN}function bt(e,t,n){let r=new Date(0);r.setUTCFullYear(e,0,4);let i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}var xt=[31,null,31,30,31,30,31,31,30,31,30,31];function St(e){return e%400==0||e%4==0&&e%100!=0}function Ct(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(xt[t]||(St(e)?29:28))}function wt(e,t){return t>=1&&t<=(St(e)?366:365)}function Tt(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function Et(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function Dt(e,t){return t>=0&&t<=59}async function Ot(e,t,n){let r=new FormData;r.append(`file`,t);let i=await fetch(`${v()}/tickets/${e}/attachments`,{method:`POST`,body:r,signal:n});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error??l.t(`attachments:errors.uploadFailed`,{status:i.status}))}return(await i.json()).attachment}async function kt(e,t){let n=await fetch(`${v()}/tickets/${e}/attachments/${t}`,{method:`DELETE`});if(!n.ok&&n.status!==404)throw Error(l.t(`attachments:errors.deleteFailed`,{status:n.status}))}async function At(e){let t=await fetch(`${v()}/tickets/${e}/attachments`,{method:`DELETE`});if(!t.ok&&t.status!==404)throw Error(l.t(`attachments:errors.bulkDeleteFailed`,{status:t.status}))}async function jt(e){let t=await fetch(`${v()}/tickets/${e}/attachments`);if(!t.ok)throw Error(l.t(`attachments:errors.listFailed`,{status:t.status}));return(await t.json()).attachments}function Mt(e,t){return`${v()}/tickets/${e}/attachments/${t}`}async function Nt(e,t){let n=await fetch(Mt(e,t));if(!n.ok)throw Error(l.t(`attachments:errors.fetchFailed`,{status:n.status}));return n.blob()}var Pt=`image/jpeg,image/png,image/gif,image/webp,application/pdf,text/csv,text/plain,application/json,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/sql,application/x-sql,text/sql,text/x-sql,.sql`,Ft=new Set(Pt.split(`,`).filter(e=>!e.startsWith(`.`))),It=/\.sql$/i,Lt=/\.(png|jpe?g|gif|webp)$/i;function Rt(e){return Ft.has(e.type)||It.test(e.name)||Lt.test(e.name)}var X=n();function zt({ticketKey:e,attachment:t,onClose:n}){let{t:r}=g(`attachments`),[i,a]=(0,J.useState)(null),[o,s]=(0,J.useState)(null);if((0,J.useEffect)(()=>{if(!t)return;function e(e){e.key===`Escape`&&n()}document.addEventListener(`keydown`,e);let r=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.removeEventListener(`keydown`,e),document.body.style.overflow=r}},[t,n]),(0,J.useEffect)(()=>{if(!t){a(null),s(null);return}let n=!1;return a(null),s(null),Nt(e,t.id).then(e=>{n||a(URL.createObjectURL(e))}).catch(e=>{n||s(e instanceof Error?e.message:r(`errors.loadFailed`))}),()=>{n=!0}},[t,e]),(0,J.useEffect)(()=>()=>{i&&URL.revokeObjectURL(i)},[i]),!t)return null;let c=t.mimeType.startsWith(`image/`),l=t.mimeType===`application/pdf`;return(0,X.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":r(`lightbox.preview`,{name:t.filename}),className:`fixed inset-0 z-[100] flex flex-col bg-black/85 backdrop-blur-sm animate-in fade-in-0 duration-200`,onClick:n,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-white/10 bg-black/40`,onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`button`,{type:`button`,onClick:n,"aria-label":r(`lightbox.backToDesktop`),className:`inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-white/85 hover:bg-white/10 hover:text-white transition-colors`,children:[(0,X.jsx)(x,{className:`w-4 h-4`}),r(`common:actions.back`)]}),(0,X.jsxs)(`div`,{className:`flex-1 text-center min-w-0 px-4`,children:[(0,X.jsx)(`div`,{className:`text-sm font-medium text-white/95 truncate`,children:t.filename}),(0,X.jsx)(`div`,{className:`text-[11px] text-white/50`,children:t.mimeType})]}),(0,X.jsxs)(`a`,{href:i??`#`,download:t.filename,onClick:e=>{e.stopPropagation(),i||e.preventDefault()},className:`inline-flex items-center gap-2 px-3 py-1.5 rounded-md text-sm text-white/85 hover:bg-white/10 hover:text-white transition-colors`,"aria-label":r(`lightbox.download`),children:[(0,X.jsx)(j,{className:`w-4 h-4`}),r(`lightbox.download`)]})]}),(0,X.jsx)(`div`,{className:H(`flex-1 flex items-center justify-center overflow-auto p-6`),onClick:n,children:o?(0,X.jsx)(`div`,{onClick:e=>e.stopPropagation(),className:`text-center text-white/80 px-8 py-10 rounded-lg bg-white/5 border border-white/10`,children:(0,X.jsx)(`p`,{className:`text-sm`,children:r(`lightbox.loadError`,{error:o})})}):i?c?(0,X.jsx)(`img`,{src:i,alt:t.filename,onClick:e=>e.stopPropagation(),className:`max-h-full max-w-full rounded-lg shadow-2xl animate-in zoom-in-95 duration-200`}):l?(0,X.jsx)(`iframe`,{src:i,title:t.filename,onClick:e=>e.stopPropagation(),className:`w-full h-full max-w-5xl bg-white rounded-lg shadow-2xl`}):(0,X.jsxs)(`div`,{onClick:e=>e.stopPropagation(),className:`text-center text-white/80 px-8 py-10 rounded-lg bg-white/5 border border-white/10`,children:[(0,X.jsx)(`p`,{className:`text-sm mb-3`,children:r(`lightbox.previewUnavailable`)}),(0,X.jsxs)(`a`,{href:i,download:t.filename,className:`inline-flex items-center gap-2 px-4 py-2 rounded-md bg-white/10 hover:bg-white/20 text-white transition-colors`,children:[(0,X.jsx)(j,{className:`w-4 h-4`}),r(`lightbox.downloadFile`,{name:t.filename})]})]}):(0,X.jsx)(`div`,{onClick:e=>e.stopPropagation(),className:`text-center text-white/70 px-8 py-10 rounded-lg bg-white/5 border border-white/10`,children:(0,X.jsx)(`p`,{className:`text-sm`,children:r(`lightbox.loading`)})})})]})}function Bt(e,t){let n=new Set,r=[];for(let i of[...e,...t])n.has(i.id)||(n.add(i.id),r.push(i));return r}function Vt(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Ht(e){return e.startsWith(`image/`)?`🖼`:e===`application/pdf`?`📄`:e===`text/csv`||e.includes(`spreadsheetml`)||e===`application/vnd.ms-excel`?`📊`:e===`application/json`?`{ }`:e===`text/plain`||e.includes(`sql`)?`📝`:`📎`}function Ut(e){try{return new Date(e).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}catch{return e}}function Wt({ticketKey:e,attachments:t,onChange:n,className:r}){let{t:i}=g(`attachments`),[a,o]=(0,J.useState)(new Set),[s,c]=(0,J.useState)(null),[l,u]=(0,J.useState)(null);if((0,J.useEffect)(()=>{let r=!1;return jt(e).then(e=>{if(r)return;let i=Bt(t,e);i.length!==t.length&&n?.(i)}).catch(()=>{}),()=>{r=!0}},[e]),!t||t.length===0)return null;let d=[...t].sort((e,t)=>e.addedAt<t.addedAt?1:-1);async function f(r){c(null),o(e=>{let t=new Set(e);return t.add(r.id),t});try{await kt(e,r.id),await new Promise(e=>setTimeout(e,160)),n?.(t.filter(e=>e.id!==r.id))}catch(e){c(e instanceof Error?e.message:i(`errors.removeFailed`)),o(e=>{let t=new Set(e);return t.delete(r.id),t})}}return(0,X.jsxs)(`section`,{className:H(`mt-4`,r),"aria-label":i(`section.ariaLabel`),children:[(0,X.jsxs)(`header`,{className:`flex items-center justify-between mb-2`,children:[(0,X.jsx)(`h3`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:i(`section.title`)}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:i(`section.fileCount`,{count:d.length})})]}),(0,X.jsx)(`ul`,{className:`flex flex-col gap-1`,children:d.map(e=>{let t=a.has(e.id);return(0,X.jsxs)(`li`,{className:H(`flex items-center gap-3 px-2.5 py-2 rounded-md border border-border bg-card/60 hover:bg-card transition-all duration-200`,t&&`opacity-0 scale-95 max-h-0 py-0 border-transparent overflow-hidden`),children:[(0,X.jsx)(`span`,{"aria-hidden":!0,className:`w-6 text-center text-sm shrink-0`,children:Ht(e.mimeType)}),(0,X.jsxs)(`button`,{type:`button`,onClick:()=>u(e),className:`flex-1 min-w-0 flex flex-col text-sm text-left hover:text-primary transition-colors`,children:[(0,X.jsx)(`span`,{className:`font-medium truncate text-foreground`,children:e.filename}),(0,X.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[Vt(e.size),` · `,Ut(e.addedAt)]})]}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>u(e),className:`text-[11px] text-primary hover:underline shrink-0`,children:i(`common:actions.open`)}),(0,X.jsx)(`button`,{type:`button`,onClick:()=>f(e),"aria-label":i(`removeFile`,{name:e.filename}),disabled:t,className:`w-6 h-6 inline-flex items-center justify-center rounded text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50`,children:`×`})]},e.id)})}),s&&(0,X.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:s}),(0,X.jsx)(zt,{ticketKey:e,attachment:l,onClose:()=>u(null)})]})}function Gt({ticketId:e,onClose:t}){let{t:n}=g(`code`),r=a(),{activeProjectId:i}=y(),o=`${i}:${e}`,s=(0,J.useRef)(o);s.current=o;let c=(0,J.useRef)(0),l=(0,J.useRef)(null),[u,d]=(0,J.useState)(null),[f,p]=(0,J.useState)(!1),[m,h]=(0,J.useState)(!1),[_,b]=(0,J.useState)(null),x=(0,J.useCallback)(async(t=null)=>{l.current?.abort();let n=new AbortController;l.current=n;let r=++c.current,i=()=>!n.signal.aborted&&c.current===r&&s.current===o;p(!0),h(!1),b(t);try{let r=new URLSearchParams({ticketId:String(e),limit:`50`});t&&r.set(`cursor`,t);let a=await fetch(`${v()}/code/activity?${r}`,{signal:n.signal});if(!a.ok)throw Error(`activity unavailable`);let s=await a.json();if(!Array.isArray(s.entries))throw Error(`invalid activity response`);if(!i())return;d(e=>{let n=t&&e?.scope===o?[...e.rows]:[],r=new Set(n.map(e=>`${e.repositoryId}\0${e.path}`));for(let e of s.entries){let t=`${e.repositoryId}\0${e.path}`;r.has(t)||(r.add(t),n.push(e))}return{scope:o,rows:n,nextCursor:s.nextCursor,truncated:!!s.truncated||!!t&&!!e?.truncated}})}catch{i()&&h(!0)}finally{i()&&p(!1)}},[o,e]);if((0,J.useEffect)(()=>{if(Se)return d(null),x(),()=>{l.current?.abort(),c.current++}},[x]),!Se)return null;let S=u?.scope===o?u:null;return!f&&!m&&S&&!S.rows.length&&!S.truncated&&!S.nextCursor?null:(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:n(`ticketFiles.title`)}),f&&!S&&(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,role:`status`,children:n(`ticketFiles.loading`)}),m&&(0,X.jsxs)(`div`,{className:`text-xs`,role:`alert`,children:[(0,X.jsx)(`span`,{children:n(`ticketFiles.loadFailed`)}),` `,(0,X.jsx)(`button`,{type:`button`,onClick:()=>{x(_)},className:`underline`,children:n(`ticketFiles.retry`)})]}),S?.truncated&&(0,X.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[n(`ticketFiles.partial`),` `,(0,X.jsx)(`button`,{type:`button`,disabled:f,onClick:()=>{x()},className:`underline`,children:n(`ticketFiles.retry`)})]}),(0,X.jsx)(`ul`,{className:`space-y-1`,children:S?.rows.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{let n=new URLSearchParams({repositoryId:e.repositoryId,path:e.path});e.jobId&&n.set(`changeJobId`,e.jobId),t(),r(`/code?${n}`)},className:`w-full text-left flex items-center gap-2 rounded px-2 py-1 text-xs hover:bg-muted/40`,children:[(0,X.jsx)(e.kind===`created`?ze:e.kind===`deleted`?Re:k,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground truncate max-w-24`,title:e.repositoryName,children:e.repositoryName}),(0,X.jsx)(`span`,{className:`font-mono truncate flex-1`,children:e.path}),e.jobId&&(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-muted-foreground font-mono shrink-0`,title:n(`ticketFiles.jobTitle`,{jobId:e.jobId}),children:[(0,X.jsx)(Be,{className:`h-3 w-3`}),e.jobId.length>10?e.jobId.slice(0,10):e.jobId]}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider shrink-0`,children:n(`kind.${e.kind}`)})]})},`${e.repositoryId}:${e.path}`))}),S?.nextCursor&&(0,X.jsx)(`button`,{type:`button`,disabled:f,onClick:()=>{x(S.nextCursor)},className:`text-xs underline mt-2`,children:n(f?`ticketFiles.loading`:`ticketFiles.loadMore`)})]})}function Kt(e){return e<.005?`$${e.toFixed(4)}`:e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}function qt(e){return e<1e3?`${e} ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/6e4)}m ${Math.floor(e%6e4/1e3)}s`}function Jt({ticketId:e}){let{t}=g(`tickets`),[n,r]=(0,J.useState)(null),i=a(),{activeProjectId:o}=y(),{closeTicketDetail:s}=Ti();if((0,J.useEffect)(()=>{let t=new AbortController;return r(null),fetch(`${v()}/tickets/${e}/spending-summary`,{signal:t.signal}).then(e=>e.ok?e.json():null).then(e=>{e&&r(e)}).catch(()=>{}),()=>t.abort()},[e,o]),!n||!n.bySurface||!n.totalRuns||n.totalRuns===0)return null;let c=Object.entries(n.bySurface).filter(([,e])=>e.count>0).map(([e,n])=>t(`spendingLine.breakdownItem`,{n:n.count,label:C[e].toLowerCase()})).join(` + `),l=n.unpricedRuns??0,u=n.pricedRuns??Math.max(0,n.totalRuns-l),d=l>0&&u===0,f=l>0&&u>0,p=n.turnsUnavailableRuns??0,m=n.totalTurns==null||p>0&&(n.turnsReportedRuns??0)===0,h=!m&&p>0;return(0,X.jsxs)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),s(),i(`/analytics?ticketId=${e}`)},className:`mt-1.5 group inline-flex items-center gap-1.5 text-[11px] text-muted-foreground hover:text-foreground transition-colors cursor-pointer`,"aria-label":t(`spendingLine.ariaLabel`),children:[(0,X.jsx)(`span`,{className:`tabular-nums font-medium text-foreground`,"data-testid":d?`ticket-cost-unavailable`:void 0,title:d?t(`spendingLine.costUnavailableTooltip`):f?t(`spendingLine.costPartiallyUnavailableTooltip`):(n.estimatedCostUsd??0)>0?t(`spendingLine.estimatedTooltip`):void 0,children:d?`—`:`${(n.estimatedCostUsd??0)>0?`~`:``}${f?`≥`:``}${Kt(n.totalCostUsd)}`}),(0,X.jsx)(`span`,{className:`text-muted-foreground/60`,children:`·`}),(0,X.jsx)(`span`,{className:`tabular-nums`,"data-testid":m?`ticket-turns-unavailable`:void 0,title:m?t(`spendingLine.turnsUnavailableTooltip`):h?t(`spendingLine.turnsPartiallyUnavailableTooltip`):void 0,children:m?`—`:`${h?`≥`:``}${t(`spendingLine.turns`,{count:n.totalTurns})}`}),(0,X.jsx)(`span`,{className:`text-muted-foreground/60`,children:`·`}),(0,X.jsx)(`span`,{className:`tabular-nums`,children:t(`spendingLine.active`,{duration:qt(n.activeDurationMs)})}),c&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`text-muted-foreground/60`,children:`·`}),(0,X.jsx)(`span`,{children:c})]}),(0,X.jsx)(Me,{className:`w-3 h-3 opacity-0 group-hover:opacity-100 transition-opacity`})]})}var Yt={draft:{dotClass:`bg-accent-secondary/60`,textClass:`text-accent-secondary`,borderClass:`border-l-[3px] border-dashed border-accent-secondary/50 pl-3`,labelKey:`common:status.draft`,pulsing:!1},todo:{dotClass:`bg-slate-500/70`,textClass:`text-muted-foreground`,borderClass:`border-l-[3px] border-dashed border-slate-500/40 pl-3`,labelKey:`status.todo`,pulsing:!1},in_progress:{dotClass:`bg-blue-400 aurora-light:bg-accent-info`,textClass:`text-foreground font-semibold`,borderClass:`border-l-[3px] border-solid border-blue-500 pl-3`,labelKey:`status.inProgress`,pulsing:!0},on_review:{dotClass:`bg-accent-warning/80`,textClass:`text-accent-warning`,borderClass:`border-l-[3px] border-solid border-accent-warning/60 pl-3`,labelKey:`status.onReview`,pulsing:!1},done:{dotClass:`text-emerald-400 aurora-light:text-accent-success`,textClass:`text-emerald-400/80 aurora-light:text-accent-success`,borderClass:`border-l-[3px] border-solid border-emerald-500 pl-3`,labelKey:`status.done`,pulsing:!1},cancelled:{dotClass:`text-red-400/60 aurora-light:text-destructive/70`,textClass:`text-muted-foreground/50`,borderClass:`pl-3`,labelKey:`status.cancelled`,pulsing:!1}};function Xt({status:e,className:t}){let{t:n}=g(`specs`),r=Yt[e];return e===`done`?(0,X.jsx)(E,{className:H(`w-3.5 h-3.5 shrink-0`,r.dotClass,t),"aria-label":n(`status.done`)}):e===`cancelled`?(0,X.jsx)(re,{className:H(`w-3.5 h-3.5 shrink-0`,r.dotClass,t),"aria-label":n(`status.cancelled`)}):r.pulsing?(0,X.jsxs)(`span`,{className:H(`relative flex shrink-0 h-2.5 w-2.5`,t),"aria-label":n(`status.inProgress`),children:[(0,X.jsx)(`span`,{className:H(`animate-ping absolute inline-flex h-full w-full rounded-full opacity-60`,r.dotClass)}),(0,X.jsx)(`span`,{className:H(`relative inline-flex rounded-full h-2.5 w-2.5`,r.dotClass)})]}):(0,X.jsx)(`span`,{className:H(`inline-flex rounded-full h-2.5 w-2.5 shrink-0`,r.dotClass,t),"aria-label":n(r.labelKey)})}function Zt({status:e,className:t}){let{t:n}=g(`specs`),r=Yt[e];return(0,X.jsxs)(`span`,{className:H(`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[11px] font-medium border`,e===`todo`&&`bg-slate-500/10 border-slate-500/30 text-slate-400 aurora-light:bg-muted aurora-light:border-border aurora-light:text-muted-foreground`,e===`in_progress`&&`bg-blue-500/10 border-blue-500/30 text-blue-400 aurora-light:bg-accent-info/10 aurora-light:border-accent-info/30 aurora-light:text-accent-info`,e===`on_review`&&`bg-accent-warning/10 border-accent-warning/30 text-accent-warning`,e===`done`&&`bg-emerald-500/10 border-emerald-500/30 text-emerald-400 aurora-light:bg-accent-success/10 aurora-light:border-accent-success/30 aurora-light:text-accent-success`,e===`cancelled`&&`bg-red-500/10 border-red-500/30 text-red-400/60 aurora-light:bg-destructive/10 aurora-light:border-destructive/30 aurora-light:text-destructive/70`,t),children:[(0,X.jsx)(Xt,{status:e}),n(r.labelKey)]})}function Qt(){let{activeProjectId:e}=y(),[t,n]=(0,J.useState)({connected:!1,key:null,discardStatus:null}),[r,i]=(0,J.useState)(!0);return(0,J.useEffect)(()=>{if(!Ce||!e){n({connected:!1,key:null,discardStatus:null}),i(!1);return}let t=!1;return i(!0),z.getConnection().then(e=>{if(t)return;let r=!!(e.connected&&e.connection?.enabled);n({connected:r,key:e.connection?.jiraProjectKey??null,discardStatus:r?e.connection?.discardStatus??null:null})}).catch(()=>{t||n({connected:!1,key:null,discardStatus:null})}).finally(()=>{t||i(!1)}),()=>{t=!0}},[e]),{connected:t.connected,jiraProjectKey:t.key,discardStatus:t.discardStatus,loading:r}}function $t({open:e,onOpenChange:t,ticket:n,discardStatus:r,onDiscarded:i}){let{t:a}=g(`jira`),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1);async function u(){l(!0);try{await z.discardSpec(n.id,o.trim()||null),b.success(a(`discard.movedToast`,{status:r,key:n.jira_key??`#${n.id}`})),t(!1),s(``),i?.()}catch(e){b.error(e instanceof Error?e.message:a(`errors.generic`))}finally{l(!1)}}return(0,X.jsx)(de,{open:e,onOpenChange:e=>{c||t(e)},children:(0,X.jsxs)(ue,{movableResizable:!0,className:`max-w-md`,"data-testid":`jira-discard-dialog`,children:[(0,X.jsxs)(le,{children:[(0,X.jsx)(ce,{children:a(`discard.title`,{status:r})}),(0,X.jsx)(oe,{children:a(`discard.body`,{status:r,key:n.jira_key??`#${n.id}`})})]}),(0,X.jsxs)(`label`,{className:`block space-y-1`,children:[(0,X.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:a(`discard.commentLabel`)}),(0,X.jsx)(`textarea`,{value:o,onChange:e=>s(e.target.value),placeholder:a(`discard.commentPlaceholder`),rows:3,className:`w-full rounded-md border border-border bg-input px-3 py-2 text-xs text-foreground placeholder:text-muted-foreground resize-none`,"data-testid":`jira-discard-comment`})]}),(0,X.jsxs)(V,{children:[(0,X.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>t(!1),disabled:c,children:a(`wizard.cancel`)}),(0,X.jsxs)(W,{size:`sm`,onClick:u,disabled:c,"data-testid":`jira-discard-confirm`,children:[(0,X.jsx)(Me,{className:`w-3.5 h-3.5 mr-1.5`}),c?a(`discard.moving`):a(`discard.confirm`,{status:r})]})]})]})})}var en=/^\d{4}-\d{2}-\d{2}T/;function tn(e){if(en.test(e))try{return{text:U(ct(e),{addSuffix:!0,locale:d()}),title:e}}catch{}return{text:e}}function nn({localId:e}){let{t}=g(`jira`),{activeProjectId:n}=y(),r=Qt(),[i,a]=(0,J.useState)(null);if((0,J.useEffect)(()=>{if(!Ce||!r.connected)return;let t=!1;return a(null),z.getSpecDetails(e).then(e=>{t||a(e)}).catch(()=>{t||a(null)}),()=>{t=!0}},[e,n,r.connected]),!Ce||!r.connected||!i)return null;let o=i.development,s=i.fields.length>0,c=o.pullRequests.length>0,l=o.branches.length>0,u=(o.commits?.length??0)>0;return!s&&!c&&!l&&!u?null:(0,X.jsxs)(`div`,{className:`space-y-4`,"data-testid":`jira-details-panel`,children:[s&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:t(`detail.detailsTitle`)}),(0,X.jsx)(`div`,{className:`space-y-1.5`,children:i.fields.map((e,t)=>{let n=tn(e.value);return(0,X.jsxs)(`div`,{className:`text-xs`,children:[(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wide block`,children:e.label}),e.href?(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{_e(e.href)},className:`inline-flex items-center gap-1 text-accent-info hover:underline text-left`,children:[(0,X.jsx)(`span`,{className:`truncate`,children:e.value}),(0,X.jsx)(T,{className:`w-3 h-3 shrink-0`})]}):(0,X.jsx)(`span`,{className:`text-foreground/80 whitespace-pre-line`,title:n.title,children:n.text})]},`${e.label}-${t}`)})})]}),(c||l||u)&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:t(`detail.developmentTitle`)}),c&&(0,X.jsxs)(`div`,{className:`mb-2`,children:[(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wide block mb-1`,children:t(`detail.dev.pullRequests`)}),(0,X.jsx)(`div`,{className:`space-y-1`,children:o.pullRequests.map(e=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{_e(e.url)},className:`w-full flex items-start gap-1.5 text-left text-xs hover:bg-accent-info/10 rounded px-1 py-0.5`,"data-testid":`jira-dev-pr`,children:[(0,X.jsx)(Ve,{className:`w-3 h-3 mt-0.5 shrink-0 text-accent-info`}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,X.jsx)(`span`,{className:`truncate text-foreground/80 block`,children:e.title}),(0,X.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[e.status,e.sourceBranch?` · ${e.sourceBranch} → ${e.destBranch??``}`:``]})]})]},e.url))})]}),l&&(0,X.jsxs)(`div`,{className:`mb-2`,children:[(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wide block mb-1`,children:t(`detail.dev.branches`)}),(0,X.jsx)(`div`,{className:`space-y-1`,children:o.branches.map(e=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{_e(e.url)},className:`w-full flex items-center gap-1.5 text-left text-xs hover:bg-accent-info/10 rounded px-1 py-0.5`,"data-testid":`jira-dev-branch`,children:[(0,X.jsx)(M,{className:`w-3 h-3 shrink-0 text-accent-info`}),(0,X.jsx)(`span`,{className:`truncate font-mono text-foreground/80`,children:e.name}),e.repo&&(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground truncate`,children:e.repo})]},e.url))})]}),u&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wide block mb-1`,children:t(`detail.dev.commits`)}),(0,X.jsx)(`div`,{className:`space-y-1`,children:o.commits.map(e=>(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{_e(e.url)},className:`w-full flex items-center gap-1.5 text-left text-xs hover:bg-accent-info/10 rounded px-1 py-0.5`,"data-testid":`jira-dev-commit`,children:[(0,X.jsx)(Be,{className:`w-3 h-3 shrink-0 text-accent-info`}),(0,X.jsx)(`span`,{className:`font-mono text-[10px] text-muted-foreground shrink-0`,children:e.displayId}),(0,X.jsx)(`span`,{className:`truncate text-foreground/80`,children:e.message})]},e.url))})]})]})]})}var rn=/\n*##\s*Acceptance Criteria\s*\n([\s\S]*?)(?=\n##\s|\n*$)/i;function an(e){if(!e)return{body:``,criteria:[]};let t=rn.exec(e);if(!t)return{body:e.replace(/\s+$/,``),criteria:[]};let n=t[1],r=e.slice(0,t.index),i=e.slice(t.index+t[0].length),a=`${r.replace(/\s+$/,``)}${i?`\n\n${i.replace(/^\s+/,``)}`:``}`,o=n.split(/\r?\n/).map(e=>e.replace(/^\s*[-*+]\s+/,``).trim()).filter(e=>e.length>0);return{body:a.replace(/\s+$/,``),criteria:o}}var on=new Set([`draft`,`todo`]);function sn(e){return!!(on.has(e.status)||e.source===`jira`&&e.jira_key&&e.status!==`cancelled`)}function cn(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID():`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e===`x`?t:t&3|8).toString(16)})}function ln(){let e={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_FEATURE_BROWSER_CAPTURE;return typeof e!=`string`||e!==`false`}var un={desktop:{width:1280,height:800},tablet:{width:768,height:1024},mobile:{width:375,height:667}},dn=class extends Error{},fn=class extends Error{};function pn(e){if(!e)throw Error(`A project owner is required for browser sessions`);return`${u}/api/projects/${encodeURIComponent(e)}`}async function mn(e,t){let n=await fetch(`${pn(e)}/browser/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({initialUrl:t})});if(n.status===409)throw new dn(`Too many open browser sessions`);if(n.status===502)throw new fn(`The browser failed to launch`);if(!n.ok)throw Error(`Failed to open browser (${n.status})`);return(await n.json()).session}async function hn(e,t,n,r){let i=await fetch(`${pn(e)}/browser/sessions/${t}/navigate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:n,url:r})});if(!i.ok)throw Error(`Navigation failed (${i.status})`);return await i.json()}async function gn(e,t,n,r,i){let a=await fetch(`${pn(e)}/browser/sessions/${t}/capture`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({rect:n,pendingSpecId:r,captureNetwork:i?.captureNetwork??!0})});if(!a.ok)throw Error(await _n(a));return await a.json()}async function _n(e){let t=await e.json().then(e=>e.error).catch(()=>void 0);return t?`Capture failed (${e.status}): ${t}`:`Capture failed (${e.status})`}async function vn(e,t,n,r,i,a=un){let o=await fetch(`${pn(e)}/browser/sessions/${t}/capture-breakpoints`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({rect:n,anchorPoint:r,pendingSpecId:i,breakpoints:a})});if(!o.ok)throw Error(await _n(o));return await o.json()}async function yn(e,t,n){let r=new FormData;r.append(`file`,t,n);let i=await fetch(`${v()}/tickets/${e}/attachments`,{method:`POST`,body:r});if(!i.ok)throw Error(`Upload failed (${i.status})`);return(await i.json()).attachment}async function bn(e,t,n,r){let i=await fetch(`${pn(e)}/browser/sessions/${t}/clipboard`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:n,text:r})});if(!i.ok)throw Error(`Clipboard failed (${i.status})`);return await i.json()}async function xn(e,t,n,r){let i=await fetch(`${pn(e)}/browser/sessions/${t}/element`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({selector:n,direction:r})});if(!i.ok)throw Error(`Element navigate failed (${i.status})`);return(await i.json()).probe}async function Sn(e,t,n){let r=await fetch(`${pn(e)}/browser/sessions/${t}/popup-view`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({target:n})});if(!r.ok)throw Error(`Could not switch browser view (${r.status})`)}function Cn(e){if(!e||e===`about:blank`)return`…`;try{return new URL(e).hostname||`…`}catch{return`…`}}async function wn(e,t){try{await fetch(`${pn(e)}/browser/sessions/${t}`,{method:`DELETE`})}catch{}}function Tn(e,t){return`${ye||(typeof window<`u`?`${window.location.protocol===`https:`?`wss:`:`ws:`}//${window.location.host}`:`ws://localhost:4200`)}/ws/browser/${e}?projectId=${encodeURIComponent(t)}`}function En(e,t){let n=Tn(e,t),r=c(),i=r?new WebSocket(n,[`specrails-desktop`,r]):new WebSocket(n);return i.binaryType=`arraybuffer`,i}function Dn(e,t=e=>requestAnimationFrame(e),n=e=>cancelAnimationFrame(e)){let r=null,i=null,a=null,o=!1,s=()=>{a!=null&&(n(a),a=null);let t=r,o=i;r=null,i=null,t&&(!o||t.x!==o.x||t.y!==o.y)&&e({type:`mouse`,action:`move`,x:t.x,y:t.y}),o&&e({type:`wheel`,x:o.x,y:o.y,deltaX:o.deltaX,deltaY:o.deltaY})},c=()=>{a==null&&!o&&(a=t(()=>{a=null,s()}))};return{move(e,t){o||(r={x:e,y:t},c())},wheel(e,t,n,r){o||(i?(i.x=e,i.y=t,i.deltaX+=n,i.deltaY+=r):i={x:e,y:t,deltaX:n,deltaY:r},c())},flush(){o||s()},dispose(){o||(o=!0,a!=null&&(n(a),a=null),r=null,i=null)}}}function On(e,t,n){let r=t.width>0?(e.x-t.left)/t.width:0,i=t.height>0?(e.y-t.top)/t.height:0,a=Math.min(Math.max(r,0),1)*n.width,o=Math.min(Math.max(i,0),1)*n.height;return{x:Math.round(a),y:Math.round(o)}}function kn(e,t,n){let r=n.width>0?t.width/n.width:0,i=n.height>0?t.height/n.height:0;return{left:t.left+e.x*r,top:t.top+e.y*i,width:e.width*r,height:e.height*i}}function An(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),width:Math.abs(e.x-t.x),height:Math.abs(e.y-t.y)}}function jn(e,t=8){return e.width>=t&&e.height>=t}function Mn(e,t){let n=Math.max(1,t.width),r=Math.max(1,t.height),i=Math.max(0,Math.min(e.x,n-1)),a=Math.max(0,Math.min(e.y,r-1)),o=Math.min(n,Math.max(i+1,e.x+e.width)),s=Math.min(r,Math.max(a+1,e.y+e.height));return{x:Math.round(i),y:Math.round(a),width:Math.round(o-i),height:Math.round(s-a)}}function Nn(e){return{nodeCount:e.nodes.length,htmlBytes:e.html.length,truncated:e.htmlTruncated,networkCount:e.networkRequests?.length??0}}function Pn(e,t){let n=e.indexOf(`,`);if(!e.startsWith(`data:`)||n===-1)throw Error(`dataUrlToFile: not a data URL`);let r=e.slice(0,n),i=/^data:([^;,]+)/.exec(r)?.[1]||`application/octet-stream`,a=e.slice(n+1);if(/;base64$/i.test(r)){let e=atob(a),n=new Uint8Array(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return new File([n],t,{type:i})}return new File([decodeURIComponent(a)],t,{type:i})}var Fn={objects:[],past:[],future:[]};function In(e,t){switch(t.type){case`add`:return{objects:[...e.objects,t.obj],past:[...e.past,e.objects],future:[]};case`delete`:return e.objects.some(e=>e.id===t.id)?{objects:e.objects.filter(e=>e.id!==t.id),past:[...e.past,e.objects],future:[]}:e;case`undo`:return e.past.length===0?e:{objects:e.past[e.past.length-1],past:e.past.slice(0,-1),future:[e.objects,...e.future]};case`redo`:return e.future.length===0?e:{objects:e.future[0],past:[...e.past,e.objects],future:e.future.slice(1)};case`clear`:return e.objects.length===0?e:{objects:[],past:[...e.past,e.objects],future:[]};default:return e}}function Ln(e){let t=e.filter(e=>e.kind===`step`).map(e=>e.n);return t.length===0?1:Math.max(...t)+1}function Rn(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),w:Math.abs(e.x-t.x),h:Math.abs(e.y-t.y)}}function zn(e,t,n=.04){let r=Math.atan2(t.y-e.y,t.x-e.x),i=r-Math.PI/7,a=r+Math.PI/7;return{left:{x:t.x-n*Math.cos(i),y:t.y-n*Math.sin(i)},right:{x:t.x-n*Math.cos(a),y:t.y-n*Math.sin(a)}}}function Bn(e,t,n=.01){return Math.abs(e.x-t.x)>=n||Math.abs(e.y-t.y)>=n}function Vn(e,t=.05){let n=e=>Math.min(1+t,Math.max(-t,e));return{x:n(e.x),y:n(e.y)}}function Hn(e,t,n){return{schemaVersion:1,objects:e,baseWidth:t,baseHeight:n}}function Un({result:e,pendingSpecId:t,onConfirm:n,...r}){let i=(0,J.useCallback)(async r=>{if(!r.annotations){await n(e);return}let i=`screen-annotated-${Date.now()}.png`,a=await yn(t,Pn(r.screenshotDataUrl,i),i);await n({...e,rawScreenshot:e.screenshot,screenshot:a,screenshotDataUrl:r.screenshotDataUrl,annotations:r.annotations,...e.breakpoints?{breakpoints:Object.fromEntries(Object.entries(e.breakpoints).map(([t,n])=>[t,n.attachment.id===e.screenshot.id?{...n,attachment:a,dataUrl:r.screenshotDataUrl}:n]))}:{}})},[n,t,e]);return(0,X.jsx)(Yn,{...r,responsive:Object.keys(e.breakpoints??{}).length>1,screenshotDataUrl:e.screenshotDataUrl,onConfirm:i})}var Wn=[`#ef4444`,`#f59e0b`,`#3b82f6`,`#22c55e`,`#ffffff`],Gn=`#111827`,Kn=[{tool:`arrow`,icon:w,labelKey:`editor.tools.arrow`,key:`a`},{tool:`box`,icon:F,labelKey:`editor.tools.box`,key:`r`},{tool:`text`,icon:Ye,labelKey:`editor.tools.text`,key:`t`},{tool:`blur`,icon:Le,labelKey:`editor.tools.blur`,key:`b`},{tool:`step`,icon:He,labelKey:`editor.tools.step`,key:`n`}],qn=0,Jn=()=>`a${++qn}-${Date.now().toString(36)}`;function Yn({screenshotDataUrl:e,responsive:t,macOverlay:n,confirmLabel:r,onConfirm:i,onReselect:a,onCancel:o}){let{t:s}=g(`browser`),[c,l]=(0,J.useReducer)(In,Fn),[u,d]=(0,J.useState)(`arrow`),[f,p]=(0,J.useState)(Wn[0]),[m,h]=(0,J.useState)(null),[_,v]=(0,J.useState)({w:1,h:1}),[y,b]=(0,J.useState)(!1),[S,C]=(0,J.useState)(!1),w=(0,J.useRef)(!1),T=(0,J.useRef)(null),D=(0,J.useRef)(null),O=c.objects,k=(0,J.useCallback)(()=>{let e=T.current;if(!e)return;let t=D.current?.getBoundingClientRect();if(!t||t.width<=0||t.height<=0||e.naturalWidth<=0||e.naturalHeight<=0)return;let n=Math.min(1,t.width/e.naturalWidth,t.height/e.naturalHeight),r=e.naturalWidth*n,i=e.naturalHeight*n;v(e=>e.w===r&&e.h===i?e:{w:r,h:i})},[]);(0,J.useEffect)(()=>{k();let e=typeof ResizeObserver>`u`?null:new ResizeObserver(k);return D.current&&e?.observe(D.current),window.addEventListener(`resize`,k),()=>{e?.disconnect(),window.removeEventListener(`resize`,k)}},[k]);let A=(0,J.useCallback)((e,t)=>{let n=T.current;if(!n)return{x:0,y:0};let r=n.getBoundingClientRect();return Vn({x:r.width>0?(e-r.left)/r.width:0,y:r.height>0?(t-r.top)/r.height:0})},[]),j=(0,J.useCallback)(e=>{if(y)return;e.target.setPointerCapture?.(e.pointerId);let t=A(e.clientX,e.clientY);if(u===`text`){let e=window.prompt(s(`editor.notePrompt`))?.trim();e&&l({type:`add`,obj:{id:Jn(),kind:`text`,x:t.x,y:t.y,text:e,color:f}});return}if(u===`step`){l({type:`add`,obj:{id:Jn(),kind:`step`,x:t.x,y:t.y,n:Ln(O),color:f}});return}h({start:t,cur:t})},[y,u,f,O,A,s]),M=(0,J.useCallback)(e=>{m&&h(t=>t&&{...t,cur:A(e.clientX,e.clientY)})},[m,A]),ee=(0,J.useCallback)(()=>{if(!m)return;let{start:e,cur:t}=m;if(h(null),Bn(e,t)){if(u===`arrow`)l({type:`add`,obj:{id:Jn(),kind:`arrow`,from:e,to:t,color:f}});else if(u===`box`){let n=Rn(e,t);l({type:`add`,obj:{id:Jn(),kind:`box`,...n,color:f}})}else if(u===`blur`){let n=Rn(e,t);l({type:`add`,obj:{id:Jn(),kind:`blur`,...n}})}}},[m,u,f]),P=(0,J.useCallback)(()=>{let e=T.current;if(!e||!e.naturalWidth||!e.naturalHeight)throw Error(`Capture image is not loaded`);let t=e.naturalWidth,n=e.naturalHeight,r=document.createElement(`canvas`);r.width=t,r.height=n;let i=r.getContext(`2d`);if(!i)throw Error(`Image rendering is unavailable`);i.drawImage(e,0,0,t,n);for(let e of O)e.kind===`blur`&&(i.fillStyle=Gn,i.fillRect(e.x*t,e.y*n,e.w*t,e.h*n));let a=Math.max(2,t*.004);for(let e of O)if(e.kind===`box`)i.strokeStyle=e.color,i.lineWidth=a,i.strokeRect(e.x*t,e.y*n,e.w*t,e.h*n);else if(e.kind===`arrow`){let r={x:e.from.x*t,y:e.from.y*n},o={x:e.to.x*t,y:e.to.y*n},s=zn(e.from,e.to,.035);i.strokeStyle=e.color,i.lineWidth=a,i.lineCap=`round`,i.beginPath(),i.moveTo(r.x,r.y),i.lineTo(o.x,o.y),i.moveTo(s.left.x*t,s.left.y*n),i.lineTo(o.x,o.y),i.lineTo(s.right.x*t,s.right.y*n),i.stroke()}else if(e.kind===`text`){let r=Math.max(12,n*.03);i.font=`600 ${r}px sans-serif`,i.textBaseline=`top`,i.lineWidth=Math.max(2,r*.18),i.strokeStyle=`rgba(0,0,0,0.55)`,i.strokeText(e.text,e.x*t,e.y*n),i.fillStyle=e.color,i.fillText(e.text,e.x*t,e.y*n)}else if(e.kind===`step`){let r=Math.max(10,n*.025);i.beginPath(),i.arc(e.x*t,e.y*n,r,0,Math.PI*2),i.fillStyle=e.color,i.fill(),i.fillStyle=`#000`,i.font=`700 ${r*1.1}px sans-serif`,i.textAlign=`center`,i.textBaseline=`middle`,i.fillText(String(e.n),e.x*t,e.y*n),i.textAlign=`start`}let o=r.toDataURL(`image/png`);if(!o.startsWith(`data:image/png;base64,`))throw Error(`Image encoding failed`);return{screenshotDataUrl:o,annotations:Hn(O,t,n)}},[O]),F=(0,J.useCallback)(async()=>{if(!w.current){w.current=!0,b(!0),C(!1);try{await i(O.length===0?{screenshotDataUrl:e}:P())}catch{C(!0)}finally{w.current=!1,b(!1)}}},[O,P,e,i]),te=(0,J.useCallback)(()=>{O.length>0&&!window.confirm(s(`editor.discardConfirm`))||o()},[O.length,o,s]);(0,J.useEffect)(()=>{let e=e=>{if(y)return;let t=e.metaKey||e.ctrlKey;if(t&&e.key.toLowerCase()===`z`){e.preventDefault(),l({type:e.shiftKey?`redo`:`undo`});return}if(t&&e.key===`Enter`){e.preventDefault(),F();return}if(t)return;let n=Kn.find(t=>t.key===e.key.toLowerCase());if(n){d(n.tool);return}e.key===`Escape`&&(e.preventDefault(),te())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[y,F,te]);let I=(e,t)=>e*(t===`w`?_.w:_.h),L=m?Rn(m.start,m.cur):null;return(0,X.jsxs)(`div`,{className:`flex-1 min-h-0 min-w-0 flex flex-col items-center overflow-hidden p-3 gap-2`,children:[(0,X.jsxs)(`div`,{className:`flex shrink-0 max-w-full items-center gap-1 overflow-x-auto rounded-lg border border-border/60 bg-surface/90 px-1.5 py-1 shadow-xl ${n?`ml-[80px]`:``}`,children:[Kn.map(({tool:e,icon:t,labelKey:n})=>(0,X.jsx)(`button`,{type:`button`,title:s(n),"aria-label":s(n),"aria-pressed":u===e,onClick:()=>d(e),className:`h-7 w-7 inline-flex items-center justify-center rounded transition-colors ${u===e?`bg-primary/15 text-primary`:`text-muted-foreground hover:text-foreground hover:bg-card/60`}`,children:(0,X.jsx)(t,{className:`w-3.5 h-3.5`})},e)),(0,X.jsx)(`span`,{className:`w-px h-5 bg-border/60 mx-0.5`}),Wn.map(e=>(0,X.jsx)(`button`,{type:`button`,"aria-label":s(`editor.colorLabel`,{color:e}),onClick:()=>p(e),className:`h-5 w-5 rounded-full border transition-transform ${f===e?`scale-110 border-foreground`:`border-border/60`}`,style:{background:e}},e)),(0,X.jsx)(`span`,{className:`w-px h-5 bg-border/60 mx-0.5`}),(0,X.jsx)(`button`,{type:`button`,"aria-label":s(`editor.undo`),title:s(`editor.undoTitle`),disabled:c.past.length===0,onClick:()=>l({type:`undo`}),className:`h-7 w-7 inline-flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-card/60 disabled:opacity-40`,children:(0,X.jsx)(Xe,{className:`w-3.5 h-3.5`})}),(0,X.jsx)(`button`,{type:`button`,"aria-label":s(`editor.redo`),title:s(`editor.redoTitle`),disabled:c.future.length===0,onClick:()=>l({type:`redo`}),className:`h-7 w-7 inline-flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-card/60 disabled:opacity-40`,children:(0,X.jsx)(Ge,{className:`w-3.5 h-3.5`})})]}),t&&(0,X.jsx)(`p`,{className:`shrink-0 max-w-prose text-center text-xs text-muted-foreground`,children:s(`editor.responsiveHint`)}),(0,X.jsx)(`div`,{ref:D,className:`relative flex-1 min-h-0 w-full flex items-center justify-center`,children:(0,X.jsxs)(`div`,{className:`relative shrink-0`,style:{width:_.w,height:_.h},children:[(0,X.jsx)(`img`,{ref:T,src:e,alt:s(`editor.capturedAlt`),onLoad:k,draggable:!1,className:`block w-full h-full select-none rounded shadow-2xl`}),O.map(e=>e.kind===`blur`?(0,X.jsx)(`div`,{className:`absolute pointer-events-none`,style:{backgroundColor:Gn,left:`${e.x*100}%`,top:`${e.y*100}%`,width:`${e.w*100}%`,height:`${e.h*100}%`}},e.id):null),m&&u===`blur`&&L&&(0,X.jsx)(`div`,{className:`absolute border border-accent-info pointer-events-none`,style:{backgroundColor:Gn,left:`${L.x*100}%`,top:`${L.y*100}%`,width:`${L.w*100}%`,height:`${L.h*100}%`}}),(0,X.jsxs)(`svg`,{className:`absolute inset-0 w-full h-full ${u===`text`||u===`step`?`cursor-pointer`:`cursor-crosshair`}`,viewBox:`0 0 ${_.w} ${_.h}`,preserveAspectRatio:`none`,onPointerDown:j,onPointerMove:M,onPointerUp:ee,children:[O.map(e=>{if(e.kind===`box`)return(0,X.jsx)(`rect`,{x:I(e.x,`w`),y:I(e.y,`h`),width:I(e.w,`w`),height:I(e.h,`h`),fill:`none`,stroke:e.color,strokeWidth:Math.max(2,_.w*.004)},e.id);if(e.kind===`arrow`){let t=zn(e.from,e.to,.035),n=Math.max(2,_.w*.004);return(0,X.jsxs)(`g`,{stroke:e.color,strokeWidth:n,strokeLinecap:`round`,fill:`none`,children:[(0,X.jsx)(`line`,{x1:I(e.from.x,`w`),y1:I(e.from.y,`h`),x2:I(e.to.x,`w`),y2:I(e.to.y,`h`)}),(0,X.jsx)(`polyline`,{points:`${I(t.left.x,`w`)},${I(t.left.y,`h`)} ${I(e.to.x,`w`)},${I(e.to.y,`h`)} ${I(t.right.x,`w`)},${I(t.right.y,`h`)}`})]},e.id)}if(e.kind===`text`)return(0,X.jsx)(`text`,{x:I(e.x,`w`),y:I(e.y,`h`),dominantBaseline:`hanging`,fontSize:Math.max(12,_.h*.03),fontWeight:600,fill:e.color,stroke:`rgba(0,0,0,0.55)`,strokeWidth:1,paintOrder:`stroke`,children:e.text},e.id);if(e.kind===`step`){let t=Math.max(10,_.h*.025);return(0,X.jsxs)(`g`,{children:[(0,X.jsx)(`circle`,{cx:I(e.x,`w`),cy:I(e.y,`h`),r:t,fill:e.color}),(0,X.jsx)(`text`,{x:I(e.x,`w`),y:I(e.y,`h`),textAnchor:`middle`,dominantBaseline:`central`,fontSize:t*1.1,fontWeight:700,fill:`#000`,children:e.n})]},e.id)}return null}),m&&u===`box`&&L&&(0,X.jsx)(`rect`,{x:I(L.x,`w`),y:I(L.y,`h`),width:I(L.w,`w`),height:I(L.h,`h`),fill:`none`,stroke:f,strokeDasharray:`4 3`,strokeWidth:Math.max(2,_.w*.004)}),m&&u===`arrow`&&(0,X.jsx)(`line`,{x1:I(m.start.x,`w`),y1:I(m.start.y,`h`),x2:I(m.cur.x,`w`),y2:I(m.cur.y,`h`),stroke:f,strokeWidth:Math.max(2,_.w*.004),strokeLinecap:`round`})]}),y&&(0,X.jsxs)(`div`,{className:`absolute inset-0 flex items-center justify-center gap-2 bg-background-deep/50 text-sm text-foreground`,children:[(0,X.jsx)(N,{className:`w-4 h-4 animate-spin`}),` `,s(`common:states.saving`)]})]})}),S&&(0,X.jsx)(`p`,{role:`alert`,className:`shrink-0 text-sm text-destructive`,children:s(`modal.toast.captureFailed`)}),(0,X.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,X.jsxs)(W,{size:`sm`,variant:`ghost`,className:`gap-1.5`,onClick:a,disabled:y,children:[(0,X.jsx)(x,{className:`w-3.5 h-3.5`}),` `,s(`editor.reselect`)]}),(0,X.jsxs)(W,{size:`sm`,variant:`ghost`,className:`gap-1.5`,onClick:te,disabled:y,children:[(0,X.jsx)(re,{className:`w-3.5 h-3.5`}),` `,s(`common:actions.cancel`)]}),(0,X.jsxs)(W,{size:`sm`,className:`gap-1.5`,onClick:()=>void F(),disabled:y,"data-testid":`annotation-confirm`,children:[(0,X.jsx)(E,{className:`w-3.5 h-3.5`}),` `,O.length>0?r??s(`editor.createSpec`):s(`editor.skipContinue`)]})]})]})}var Xn=`native-browser:event`;function Zn(e){let t=(e??``).trim();if(!t)return null;if(t===`about:blank`)return t;let n=Qn(t);if(n){if(n.protocol===`http:`||n.protocol===`https:`)return n.toString();let e=`${n.pathname}${n.search}${n.hash}`;if(!/^\d+([/?#].*)?$/.test(e))return null}let r=Qn(`https://${t}`);if(r&&r.protocol===`https:`){let e=r.hostname.toLowerCase();return(e===`localhost`||e.endsWith(`.localhost`)||e===`[::1]`||/^127\./.test(e))&&(r.protocol=`http:`),r.toString()}return null}function Qn(e){try{return new URL(e)}catch{return null}}function $n(e){let t=(e,t)=>Number.isFinite(e)?e:t;return{x:Math.max(0,Math.round(t(e.left,0))),y:Math.max(0,Math.round(t(e.top,0))),width:Math.max(1,Math.round(t(e.width,1))),height:Math.max(1,Math.round(t(e.height,1)))}}var er=null,tr=null,nr=Promise.resolve();async function rr(){return(await i(()=>import(`./core-B3mKBIh5.js`).then(e=>e.i),__vite__mapDeps([0,1]))).invoke}function ir(e){let t=e?.flag??Oe,n=e?.tauri??ge();return!t||!n?Promise.resolve(!1):(er||=(async()=>{try{return await(await rr())(`browser_supported`)===!0}catch{return er=null,!1}})(),er)}async function ar(e){return await ir(e)?(tr||=Z(`browser_capture_supported`).then(e=>e===!0).catch(()=>(tr=null,!1)),tr):!1}async function Z(e,t){return(await rr())(e,t)}function or(e){let t=nr.then(e,e);return nr=t.catch(()=>{}),t}var Q={open:(e,t,n)=>or(()=>Z(`browser_open`,{ownerId:e,url:t,bounds:n})),navigate:(e,t)=>Z(`browser_navigate`,{ownerId:e,url:t}),back:e=>Z(`browser_back`,{ownerId:e}),forward:e=>Z(`browser_forward`,{ownerId:e}),reload:e=>Z(`browser_reload`,{ownerId:e}),setBounds:(e,t)=>Z(`browser_set_bounds`,{ownerId:e,bounds:t}),show:e=>Z(`browser_show`,{ownerId:e}),hide:e=>Z(`browser_hide`,{ownerId:e}),close:e=>or(()=>Z(`browser_close`,{ownerId:e})),devtools:e=>Z(`browser_devtools`,{ownerId:e}),zoom:(e,t)=>Z(`browser_zoom`,{ownerId:e,factor:t}),setSelectMode:(e,t)=>Z(`browser_set_select_mode`,{ownerId:e,enabled:t}),selection:e=>Z(`browser_selection`,{ownerId:e}),capture:(e,t)=>Z(`browser_capture`,{ownerId:e,selectionOnly:t}),onEvent:async(e,t)=>{let n=n=>{n.payload.ownerId===e&&t(n.payload)},{listen:r}=await i(async()=>{let{listen:e}=await import(`./event-Bt7f3wXe.js`).then(e=>e.i);return{listen:e}},__vite__mapDeps([3,1,0]));return r(Xn,n)}},sr=e(r(),1),cr=new Map,lr=new Map;function ur(e,t){let n=(lr.get(e)??Promise.resolve()).catch(()=>{}).then(t);return lr.set(e,n),n.finally(()=>{lr.get(e)===n&&lr.delete(e)}).catch(()=>{}),n}function dr({ownerId:e,leaseRevision:t=0,onBusyChange:n,transferError:r,url:i,onClose:a,onFallback:o,onUrlChange:s,onCaptured:c,confirmLabel:l,selectLabel:u}){let{t:d}=g(`browser`),f=(0,J.useRef)(null),p=(0,J.useRef)(!1),[m,h]=(0,J.useState)(i),[_,v]=(0,J.useState)(i),[y,b]=(0,J.useState)(null),[S,C]=(0,J.useState)(!0),[w,E]=(0,J.useState)(!1),[D,O]=(0,J.useState)(null),[k,A]=(0,J.useState)(!1),[j,M]=(0,J.useState)(null),[N,ee]=(0,J.useState)(!1),[P,F]=(0,J.useState)(null);(0,J.useEffect)(()=>(n?.(k||j!==null||N||P!==null),()=>{n?.(!1)}),[n,k,j,N,P]);let te=(0,J.useRef)(1),I=(0,J.useRef)(null),L=(0,J.useRef)(!1),R=(0,J.useRef)(!1),z=(0,J.useRef)(!1),B=(0,J.useRef)(null),ie=(0,J.useRef)(i),ae=(0,J.useRef)({url:i,onFallback:o,onUrlChange:s});ae.current={url:i,onFallback:o,onUrlChange:s},z.current=P!==null;let V=(0,J.useCallback)(async e=>{let t=I.current;if(!(!t||!L.current)){O(null);try{await e(t)}catch(e){I.current===t&&O(e instanceof Error?e.message:String(e))}}},[]);(0,J.useEffect)(()=>{let t=!1,n=null,r=0,i=null,a=e??crypto.randomUUID(),o=Symbol(a);cr.set(a,o);let s=()=>{ur(a,async()=>{cr.get(a)===o&&(cr.delete(a),await Q.close(a))}).catch(()=>{})};I.current=a,L.current=!1,E(!1);let c=()=>{t||r||(r=requestAnimationFrame(()=>{if(r=0,!L.current||z.current||R.current)return;let e=f.current?.getBoundingClientRect();if(!e||e.width<=0||e.height<=0)return;let t=$n(e);JSON.stringify(t)!==JSON.stringify(B.current)&&(B.current=t,Q.setBounds(a,t).catch(()=>{B.current=null}))}))};return(async()=>{try{let e=await Q.onEvent(a,e=>{if(!t){if(e.kind===`resume`){!z.current&&!R.current&&ur(a,async()=>{if(t||cr.get(a)!==o||z.current||R.current)return;let n=f.current?.getBoundingClientRect();n&&await Q.open(a,e.url??ie.current,$n(n))}).catch(e=>{t||O(String(e))});return}e.kind===`nav`&&e.url?(v(e.url),ae.current.onUrlChange?.(e.url),M(null),A(!1),p.current||h(e.url)):e.kind===`title`?b(e.title??null):e.kind===`load-started`?C(!0):e.kind===`load-finished`?(C(!1),e.url&&!p.current&&h(e.url)):e.kind===`popup-error`?O(d(`popup.openFailed`)):e.kind===`popup-opened`&&O(null)}});if(t){e();return}n=e;let r=f.current?.getBoundingClientRect();if(!r)throw Error(`hole not measurable`);ie.current=Zn(ae.current.url)??`about:blank`,B.current=$n(r);let l=B.current;if(!await ur(a,async()=>t||cr.get(a)!==o?!1:(await Q.open(a,ie.current,l),!0)))return;if(t){s();return}L.current=!0,E(!0),i=new ResizeObserver(c),f.current&&i.observe(f.current),window.addEventListener(`resize`,c),window.addEventListener(`scroll`,c,!0),window.visualViewport?.addEventListener(`resize`,c),window.visualViewport?.addEventListener(`scroll`,c),c()}catch{t||ae.current.onFallback()}})(),()=>{t=!0,cancelAnimationFrame(r),i?.disconnect(),window.removeEventListener(`resize`,c),window.removeEventListener(`scroll`,c,!0),window.visualViewport?.removeEventListener(`resize`,c),window.visualViewport?.removeEventListener(`scroll`,c),n?.(),I.current===a&&(I.current=null,L.current=!1),s()}},[e,t]),(0,J.useEffect)(()=>{let e=Zn(i)??`about:blank`;!w||e===ie.current||(ie.current=e,h(e),V(t=>Q.navigate(t,e)))},[i,w,V]);let oe=(0,J.useCallback)(async e=>{let t=I.current;if(!(!t||!L.current||R.current)){R.current=!0,ee(!0),O(null);try{let n=await Q.capture(t,e);if(I.current!==t||(await Q.hide(t),I.current!==t))return;z.current=!0,A(!1),F(n)}catch(e){I.current===t&&O(e instanceof Error?e.message:String(e))}finally{R.current=!1,I.current===t&&ee(!1)}}},[]);(0,J.useEffect)(()=>{if(!k||!w)return;let e=I.current,t=!1,n,r=async()=>{try{let n=await Q.selection(e);if(t||I.current!==e)return;if(n){if(await Q.setSelectMode(e,!1),t||I.current!==e)return;M(n),A(!1),await oe(!0);return}}catch(n){if(t||I.current!==e)return;O(String(n));try{await Q.setSelectMode(e,!1),!t&&I.current===e&&A(!1)}catch(n){!t&&I.current===e&&O(String(n))}return}t||(n=setTimeout(r,200))};return r(),()=>{t=!0,clearTimeout(n)}},[k,w,oe]);let se=async()=>{await V(async e=>{await Q.setSelectMode(e,!k),M(null),A(!k)})},ce=async()=>{F(null),await V(async e=>{await new Promise(e=>requestAnimationFrame(()=>e()));let t=f.current?.getBoundingClientRect();t&&t.width>0&&t.height>0&&(B.current=$n(t),await Q.setBounds(e,B.current)),await Q.show(e)})};(0,J.useEffect)(()=>{let e=e=>{e.key===`Escape`&&!z.current&&a()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[a]);let le=(0,J.useCallback)(()=>{let e=Zn(m);e&&(h(e),V(t=>Q.navigate(t,e)))},[m,V]),ue=(0,J.useCallback)(e=>{te.current=Math.min(3,Math.max(.25,e)),V(e=>Q.zoom(e,te.current))},[V]);return typeof document>`u`?null:(0,sr.createPortal)((0,X.jsx)(`div`,{className:`fixed inset-0 z-[80] bg-background-deep/60 backdrop-blur-md pointer-events-auto`,onClick:e=>{e.target===e.currentTarget&&!P&&a()},"data-testid":`native-browser-modal`,children:(0,X.jsxs)(`div`,{className:`absolute inset-x-[4%] inset-y-[3.5%] flex flex-col border border-border/70 rounded-2xl bg-background-deep overflow-hidden shadow-2xl ring-1 ring-black/20`,role:`dialog`,"aria-modal":`true`,"aria-label":d(`modal.dialogLabel`),onClick:e=>e.stopPropagation(),children:[!P&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b border-border/50 bg-surface/80 shrink-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(W,{disabled:!w,variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`common:actions.back`),onClick:()=>void V(Q.back),children:(0,X.jsx)(x,{className:`w-4 h-4`})}),(0,X.jsx)(W,{disabled:!w,variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`modal.nav.forward`),onClick:()=>void V(Q.forward),children:(0,X.jsx)(Me,{className:`w-4 h-4`})}),(0,X.jsx)(W,{disabled:!w,variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`modal.nav.reload`),onClick:()=>void V(Q.reload),children:(0,X.jsx)(Ke,{className:`w-4 h-4`})})]}),(0,X.jsxs)(`form`,{className:`flex-1 flex items-center gap-2 min-w-0`,onSubmit:e=>{e.preventDefault(),le()},children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 rounded-md border border-border bg-background px-2.5 py-1`,children:[(0,X.jsx)(K,{className:`w-3.5 h-3.5 text-muted-foreground shrink-0`}),(0,X.jsx)(`input`,{value:m,onChange:e=>h(e.target.value),onFocus:()=>{p.current=!0},onBlur:()=>{p.current=!1},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),le())},placeholder:d(`modal.address.placeholder`),"aria-label":d(`modal.address.label`),className:`flex-1 min-w-0 bg-transparent outline-none text-sm`})]}),(0,X.jsx)(W,{type:`submit`,size:`sm`,variant:`secondary`,className:`shrink-0`,children:d(`modal.address.go`)})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`native.zoomOut`),title:d(`native.zoomOut`),onClick:()=>ue(te.current-.1),children:(0,X.jsx)(Qe,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`native.zoomIn`),title:d(`native.zoomIn`),onClick:()=>ue(te.current+.1),children:(0,X.jsx)(Ze,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`native.devtools`),title:d(`native.devtools`),onClick:()=>void V(Q.devtools),children:(0,X.jsx)(ne,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`native.openExternal`),title:d(`native.openExternal`),onClick:()=>void _e(_),children:(0,X.jsx)(T,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":d(`modal.closeBrowser`),onClick:a,children:(0,X.jsx)(re,{className:`w-4 h-4`})})]})]}),(0,X.jsxs)(`div`,{className:`px-3 py-1 text-[11px] text-muted-foreground truncate shrink-0 flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full shrink-0 ${S?`bg-accent-warning animate-pulse`:`bg-accent-success`}`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:y||_}),(0,X.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-accent-success/30 bg-accent-success/10 text-accent-success px-2 py-px text-[10px] font-medium`,children:d(`native.badge`)})]}),c&&(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-b border-border/50 px-3 py-2 shrink-0`,children:[(0,X.jsxs)(W,{variant:k?`secondary`:`ghost`,size:`sm`,disabled:!w||N,"aria-pressed":k,onClick:()=>void se(),children:[(0,X.jsx)(We,{className:`mr-1.5 h-3.5 w-3.5`}),u??d(`native.selectElement`)]}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:k?d(`native.selectHint`):j?.selector}),(0,X.jsxs)(W,{variant:`secondary`,size:`sm`,disabled:!w||N||k||_===`about:blank`,onClick:()=>void oe(j!==null),children:[(0,X.jsx)(Ne,{className:`mr-1.5 h-3.5 w-3.5`}),d(N?`native.capturing`:j?`native.captureSelection`:`native.capturePage`)]})]})]}),(D||r)&&(0,X.jsx)(`div`,{role:`alert`,className:`border-b border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive shrink-0`,children:D||r}),P&&c&&(0,X.jsx)(Yn,{screenshotDataUrl:P.screenshotDataUrl,confirmLabel:l,onConfirm:async e=>{await c({...P,screenshotDataUrl:e.screenshotDataUrl})},onReselect:()=>{ce()},onCancel:a}),(0,X.jsx)(`div`,{ref:f,className:P?`hidden`:`relative flex-1 min-h-0 overflow-hidden`,children:S&&(0,X.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center text-sm text-muted-foreground`,children:d(`modal.status.opening`)})})]})}),document.body)}function fr(e){let t=e.schedule??(e=>requestAnimationFrame(e)),n=e.cancel??(e=>cancelAnimationFrame(e)),r=e.now??(()=>typeof performance<`u`?performance.now():Date.now()),i=e.release??(()=>{}),a={received:0,decoded:0,drawn:0,droppedStale:0,droppedUndrawn:0,decodeMsTotal:0,drawMsTotal:0},o=!1,s=!1,c=null,l=null,u=null,d=()=>{u=null;let t=l;if(l=null,t==null||o){t!=null&&f(t);return}let n=r();try{e.draw(t),a.drawn++,a.drawMsTotal+=r()-n}catch{}finally{f(t)}},f=e=>{try{i(e)}catch{}},p=()=>{u==null&&!o&&(u=t(d))},m=t=>{s=!0;let n=r();e.decode(t).then(e=>{if(o){f(e);return}a.decoded++,a.decodeMsTotal+=r()-n,l!=null&&(a.droppedUndrawn++,f(l)),l=e,p(),h()},()=>{h()})},h=()=>{if(o){s=!1;return}let e=c;c=null,e==null?s=!1:m(e)};return{push(e){if(!o){if(a.received++,s){c!=null&&a.droppedStale++,c=e;return}m(e)}},stats(){return{...a}},dispose(){if(!o){if(o=!0,c=null,u!=null){try{n(u)}catch{}u=null}l!=null&&(f(l),l=null)}}}}var pr=`specrails-desktop:browser-capture-debug`;function mr(){try{return typeof localStorage<`u`&&localStorage.getItem(pr)===`1`}catch{return!1}}function hr(e,t,n){let r=Math.max(1,n),i=t.decoded-e.decoded,a=t.drawn-e.drawn,o=e=>Math.round(e*10)/10;return{fpsReceived:o((t.received-e.received)*1e3/r),fpsDrawn:o(a*1e3/r),droppedStale:t.droppedStale-e.droppedStale,droppedUndrawn:t.droppedUndrawn-e.droppedUndrawn,avgDecodeMs:i>0?o((t.decodeMsTotal-e.decodeMsTotal)/i):0,avgDrawMs:a>0?o((t.drawMsTotal-e.drawMsTotal)/a):0}}function gr(e,t=e=>console.table([e]),n=2e3,r=()=>Date.now()){let i=e(),a=r(),o=setInterval(()=>{let n=e(),o=r();t(hr(i,n,o-a)),i=n,a=o},n);return()=>clearInterval(o)}function _r(e){let{projectId:t,open:n,initialUrl:r}=e,i=(0,J.useRef)(null),a=(0,J.useRef)(null),o=(0,J.useRef)(null),s=(0,J.useRef)(0),c=(0,J.useRef)(0),u=(0,J.useRef)(null),d=(0,J.useRef)(null),f=(0,J.useCallback)(()=>{let e=u.current,t=d.current,n=a.current;if(!(!e||!n||n.readyState!==WebSocket.OPEN)&&!(t&&t.width===e.width&&t.height===e.height&&t.deviceScaleFactor===e.deviceScaleFactor))try{n.send(JSON.stringify({type:`input`,event:{type:`resize`,...e}})),d.current=e}catch{}},[]),p=(0,J.useRef)(0),m=(0,J.useRef)(new Map),h=(0,J.useCallback)(()=>{if(p.current!==0||m.current.size===0)return;let e=[...m.current.values()];m.current.clear();for(let t of e)wn(t.projectId,t.sessionId)},[]),[g,_]=(0,J.useState)({status:`connecting`,errorMsg:null,url:null,title:null,viewport:{width:1280,height:800},hoverRect:null,hoverSelector:null,hoverPath:null,popup:null,popupError:null});(0,J.useEffect)(()=>{if(!n||!t)return;let e=!1,c=null;d.current=null,_(e=>({...e,status:`connecting`,errorMsg:null,popup:null,popupError:null}));let h=fr({decode:e=>createImageBitmap(new Blob([e],{type:`image/jpeg`})),draw:e=>{let t=i.current;t&&(t.width!==e.width&&(t.width=e.width),t.height!==e.height&&(t.height=e.height),t.getContext(`2d`)?.drawImage(e,0,0))},release:e=>e.close()}),g=mr()?gr(()=>h.stats()):null;return(async()=>{try{let n=await mn(t,r);if(e){wn(t,n.id);return}c=n.id,o.current={id:n.id,projectId:t},_(e=>({...e,url:n.url,title:n.title,viewport:u.current??{width:n.viewportWidth,height:n.viewportHeight}}));let i=En(n.id,t);a.current=i,i.onmessage=e=>{if(typeof e.data==`string`){try{let t=JSON.parse(e.data);if(t.type===`ready`)_(e=>({...e,status:`ready`,url:t.url??e.url,title:t.title??e.title,viewport:u.current??t.viewport??e.viewport})),f();else if(t.type===`nav`)_(e=>({...e,url:t.url??e.url,title:t.title??e.title}));else if(t.type===`hover`)_(e=>({...e,hoverRect:t.rect??null,hoverSelector:t.selector??null,hoverPath:t.path??null}));else if(t.type===`popup`){let e=typeof t.count==`number`?t.count:0;s.current+=1,_(n=>({...n,popup:e>0?{count:e,active:t.active===!0,url:t.url??null}:null,popupError:null}))}}catch{}return}h.push(e.data)},i.onopen=()=>{e||(f(),_(e=>({...e,status:`ready`})))},i.onerror=()=>{e||_(e=>({...e,status:`error`,errorMsg:l.t(`browser:session.connectionError`)}))},i.onclose=()=>{e||_(e=>({...e,status:`error`,errorMsg:l.t(`browser:session.lostConnection`)}))}}catch(t){if(e)return;let n=t instanceof dn?l.t(`browser:session.tooManySessions`):t instanceof fn?l.t(`browser:session.launchFailed`):l.t(`browser:session.openFailed`);_(e=>({...e,status:`error`,errorMsg:n}))}})(),()=>{e=!0,g?.(),h.dispose();let n=a.current;if(n){n.onmessage=null,n.onopen=null,n.onerror=null,n.onclose=null;try{n.close()}catch{}}a.current=null;let r=c;r&&o.current?.id===r&&o.current.projectId===t&&(o.current=null),r&&(p.current>0?m.current.set(`${t}\0${r}`,{sessionId:r,projectId:t}):wn(t,r))}},[n,t,r,h,f]);let v=(0,J.useCallback)(e=>{let t=a.current;if(t&&t.readyState===WebSocket.OPEN)try{t.send(JSON.stringify({type:`input`,event:e}))}catch{}},[]),y=(0,J.useCallback)(async(e,t)=>{let n=o.current;if(n)try{let r=await hn(n.projectId,n.id,e,t);if(o.current!==n)return;r.target!==`popup`&&_(e=>({...e,url:r.url,title:r.title}))}catch{}},[]),b=(0,J.useCallback)(async(e,t,n)=>{let r=o.current;if(!r)throw Error(`No active browser session`);p.current+=1;try{return await gn(r.projectId,r.id,e,t,n)}finally{p.current=Math.max(0,p.current-1),h()}},[h]),x=(0,J.useCallback)(async(e,t,n,r)=>{let i=o.current;if(!i)throw Error(`No active browser session`);p.current+=1;try{return await vn(i.projectId,i.id,e,t,n,r)}finally{p.current=Math.max(0,p.current-1),h()}},[h]),S=(0,J.useCallback)(async(e,t)=>{let n=o.current;return n?bn(n.projectId,n.id,e,t):{text:``}},[]),C=(0,J.useCallback)((e,t,n=window.devicePixelRatio||1)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||e<=0||t<=0)return;let r=Math.max(1,Math.round(e)),i=Math.max(1,Math.round(t));u.current={width:r,height:i,deviceScaleFactor:Number.isFinite(n)?Math.min(2,Math.max(1,n)):1},_(e=>e.viewport.width===r&&e.viewport.height===i?e:{...e,viewport:{width:r,height:i}}),f()},[f]),w=(0,J.useCallback)(e=>{let t=a.current;if(t&&t.readyState===WebSocket.OPEN)try{t.send(JSON.stringify({type:`probe`,x:e.x,y:e.y}))}catch{}},[]),T=(0,J.useCallback)(()=>{_(e=>e.hoverRect||e.hoverPath?{...e,hoverRect:null,hoverSelector:null,hoverPath:null}:e)},[]),E=(0,J.useCallback)(async(e,t)=>{let n=o.current;return n?xn(n.projectId,n.id,e,t):null},[]),D=(0,J.useCallback)(async e=>{let t=o.current;if(!t)return;let n=s.current,r=++c.current,i=()=>o.current===t&&s.current===n&&c.current===r;try{await Sn(t.projectId,t.id,e),i()&&_(e=>({...e,popupError:null}))}catch{i()&&_(e=>({...e,popupError:l.t(`browser:session.connectionError`)}))}},[]);return{...g,canvasRef:i,forwardInput:v,navigate:y,capture:b,captureBreakpoints:x,clipboard:S,navigateElement:E,setViewport:C,probe:w,clearHover:T,setPopupView:D}}function vr(e,t,n,r){let i=(0,J.useRef)(t);i.current=t,(0,J.useEffect)(()=>{let t=e.current;if(!n||!t)return;let a=!1,o=null,s=0,c=0,l=0,u=null,d=()=>{if(o=null,a)return;let e=r??t.getBoundingClientRect();if(!Number.isFinite(e.width)||!Number.isFinite(e.height)||e.width<=0||e.height<=0)return;let n=Math.max(1,Math.round(e.width)),u=Math.max(1,Math.round(e.height)),d=window.devicePixelRatio,f=Number.isFinite(d)?Math.min(2,Math.max(1,d)):1;n===s&&u===c&&f===l||(s=n,c=u,l=f,i.current(n,u,f))},f=()=>{a||o===null&&(o=requestAnimationFrame(d))},p=()=>{u?.removeEventListener(`change`,m),u=typeof window.matchMedia==`function`?window.matchMedia(`(resolution: ${window.devicePixelRatio||1}dppx)`):null,u?.addEventListener(`change`,m)},m=()=>{f(),p()};d();let h=typeof ResizeObserver>`u`?null:new ResizeObserver(f);return h?.observe(t),window.addEventListener(`resize`,f),p(),()=>{a=!0,o!==null&&cancelAnimationFrame(o),h?.disconnect(),u?.removeEventListener(`change`,m),window.removeEventListener(`resize`,f)}},[e,n,r?.width,r?.height])}function yr({open:e,url:t,projectId:n,onClose:r}){let[i,a]=(0,J.useState)(`probing`);(0,J.useEffect)(()=>{if(!e||i!==`probing`)return;let t=!0;return ir().then(e=>{t&&a(e?`native`:`screencast`)}),()=>{t=!1}},[e,i]);let o=(0,J.useCallback)(()=>a(`screencast`),[]);return!e||i===`probing`?null:i===`native`?(0,X.jsx)(dr,{url:t,onClose:r,onFallback:o}):(0,X.jsx)(br,{open:e,url:t,projectId:n,onClose:r})}function br({open:e,url:t,projectId:n,onClose:r}){let{t:i}=g(`browser`),a=_r({projectId:n,open:e,initialUrl:t}),{canvasRef:o,viewport:s,status:c,errorMsg:l,url:u,title:d,popup:f,popupError:p,setViewport:m}=a,[h,_]=(0,J.useState)(t),v=(0,J.useRef)(null);vr(v,m,e);let y=(0,J.useRef)(a.forwardInput);y.current=a.forwardInput;let b=(0,J.useRef)(null),S=(0,J.useCallback)(()=>(b.current??=Dn(e=>y.current(e)),b.current),[]);(0,J.useEffect)(()=>()=>{b.current?.dispose(),b.current=null},[]);let C=f?.active?f.url??`about:blank`:u??``;(0,J.useEffect)(()=>{_(C)},[C,f?.active]),(0,J.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&r()};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e,r]);let w=(0,J.useCallback)((e,t)=>{let n=o.current?.getBoundingClientRect();return n?On({x:e,y:t},{left:n.left,top:n.top,width:n.width,height:n.height},s):{x:0,y:0}},[o,s]),E=e=>e===2?`right`:e===1?`middle`:`left`,D=(0,J.useCallback)(e=>{let t=w(e.clientX,e.clientY);S().move(t.x,t.y)},[w,S]),O=(0,J.useCallback)(e=>{let t=w(e.clientX,e.clientY),n=S();n.move(t.x,t.y),n.flush(),a.forwardInput({type:`mouse`,action:`down`,x:t.x,y:t.y,button:E(e.button),clickCount:e.detail||1})},[w,a,S]),k=(0,J.useCallback)(e=>{let t=w(e.clientX,e.clientY),n=S();n.move(t.x,t.y),n.flush(),a.forwardInput({type:`mouse`,action:`up`,x:t.x,y:t.y,button:E(e.button),clickCount:e.detail||1})},[w,a,S]),A=(0,J.useCallback)(e=>{let t=w(e.clientX,e.clientY);S().wheel(t.x,t.y,e.deltaX,e.deltaY)},[w,S]),j=(0,J.useCallback)(e=>{if(e.key===`Escape`)return;let t=e.metaKey||e.ctrlKey;if(t&&(e.key===`c`||e.key===`v`||e.key===`x`)){e.preventDefault();let t=e.key;(async()=>{try{if(t===`v`){let e=await navigator.clipboard.readText();e&&await a.clipboard(`paste`,e)}else{let{text:e}=await a.clipboard(t===`x`?`cut`:`copy`);e&&await navigator.clipboard.writeText(e)}}catch{}})();return}let n={type:`key`,action:`down`,key:e.key,code:e.code,text:!t&&e.key.length===1?e.key:void 0};a.forwardInput(n),(e.key===`Tab`||e.key===` `||e.key.startsWith(`Arrow`))&&e.preventDefault()},[a]),M=(0,J.useCallback)(e=>{e.key!==`Escape`&&a.forwardInput({type:`key`,action:`up`,key:e.key,code:e.code})},[a]),N=(0,J.useCallback)(()=>{a.navigate(`goto`,h)},[a,h]);return!e||typeof document>`u`?null:(0,sr.createPortal)((0,X.jsx)(`div`,{className:`fixed inset-0 z-[80] bg-background-deep/60 backdrop-blur-md pointer-events-auto`,onClick:e=>{e.target===e.currentTarget&&r()},"data-testid":`webview-modal`,children:(0,X.jsxs)(`div`,{className:`absolute inset-x-[4%] inset-y-[3.5%] flex flex-col border border-border/70 rounded-2xl bg-background-deep overflow-hidden shadow-2xl ring-1 ring-black/20`,role:`dialog`,"aria-modal":`true`,"aria-label":i(`modal.dialogLabel`),onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 border-b border-border/50 bg-surface/80 shrink-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":i(`common:actions.back`),onClick:()=>a.navigate(`back`),children:(0,X.jsx)(x,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":i(`modal.nav.forward`),onClick:()=>a.navigate(`forward`),children:(0,X.jsx)(Me,{className:`w-4 h-4`})}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":i(`modal.nav.reload`),onClick:()=>a.navigate(`reload`),children:(0,X.jsx)(Ke,{className:`w-4 h-4`})})]}),(0,X.jsxs)(`form`,{className:`flex-1 flex items-center gap-2 min-w-0`,onSubmit:e=>{e.preventDefault(),N()},children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2 flex-1 min-w-0 rounded-md border border-border bg-background px-2.5 py-1`,children:[(0,X.jsx)(K,{className:`w-3.5 h-3.5 text-muted-foreground shrink-0`}),(0,X.jsx)(`input`,{value:h,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),N())},placeholder:i(`modal.address.placeholder`),"aria-label":i(`modal.address.label`),className:`flex-1 min-w-0 bg-transparent outline-none text-sm`})]}),(0,X.jsx)(W,{type:`submit`,size:`sm`,variant:`secondary`,className:`shrink-0`,disabled:c===`error`,children:i(`modal.address.go`)})]}),(0,X.jsx)(W,{variant:`ghost`,size:`icon`,className:`h-7 w-7`,"aria-label":i(`modal.closeBrowser`),onClick:r,children:(0,X.jsx)(re,{className:`w-4 h-4`})})]}),(0,X.jsxs)(`div`,{className:`px-3 py-1 text-[11px] text-muted-foreground truncate shrink-0 flex items-center gap-2`,children:[(0,X.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full shrink-0 ${c===`ready`?`bg-accent-success`:c===`error`?`bg-destructive`:`bg-accent-warning animate-pulse`}`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`truncate`,children:c===`connecting`?i(`modal.status.connecting`):c===`error`?l??i(`modal.status.unavailable`):f?.active?i(`popup.loginWindow`,{origin:Cn(f.url)}):d||``})]}),p&&(0,X.jsx)(`div`,{role:`alert`,className:`px-3 py-1.5 text-xs text-destructive border-b border-border/40 shrink-0`,children:p}),f&&(0,X.jsxs)(`div`,{"data-testid":`webview-popup-bar`,className:`flex items-center gap-2 px-3 py-1.5 text-xs border-b shrink-0 ${f.active?`bg-accent-info/10 border-accent-info/30 text-accent-info`:`bg-surface/70 border-border/40 text-muted-foreground`}`,children:[(0,X.jsx)(T,{className:`w-3.5 h-3.5 shrink-0`}),f.active?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`truncate font-medium`,children:i(`popup.loginWindow`,{origin:Cn(f.url)})}),f.count>1&&(0,X.jsx)(`span`,{className:`shrink-0 opacity-70`,children:i(`popup.stacked`,{count:f.count-1})}),(0,X.jsxs)(`button`,{type:`button`,onClick:()=>a.setPopupView(`root`),className:`ml-auto shrink-0 inline-flex items-center gap-1 h-6 px-2 rounded-md border border-current/30 hover:bg-card/60 transition-colors`,children:[(0,X.jsx)(x,{className:`w-3 h-3`}),i(`popup.backToPage`)]})]}):(0,X.jsxs)(`button`,{type:`button`,onClick:()=>a.setPopupView(`popup`),className:`inline-flex items-center gap-1 h-6 px-2 rounded-md border border-border/50 hover:bg-card/60 hover:text-foreground transition-colors`,children:[i(`popup.show`),f.count>1&&(0,X.jsx)(`span`,{className:`opacity-70`,children:i(`popup.stacked`,{count:f.count-1})})]})]}),(0,X.jsx)(`div`,{ref:v,className:`relative flex-1 min-h-0 overflow-hidden flex items-center justify-center outline-none`,tabIndex:0,onKeyDown:j,onKeyUp:M,children:c===`error`?(0,X.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-center max-w-md px-6`,children:[(0,X.jsx)(R,{className:`w-8 h-8 text-accent-warning`}),(0,X.jsx)(`p`,{className:`text-sm text-foreground/90`,children:l??i(`modal.error.unavailable`)})]}):(0,X.jsx)(`canvas`,{ref:o,style:{maxWidth:`min(100%, ${s.width}px)`,maxHeight:`min(100%, ${s.height}px)`},className:`max-w-full max-h-full block shadow-2xl cursor-default`,onPointerMove:D,onPointerDown:O,onPointerUp:k,onContextMenu:e=>e.preventDefault(),onWheel:A})})]})}),document.body)}var xr=(0,J.createContext)(null);function Sr({children:e}){let{activeProjectId:t}=y(),[n,r]=(0,J.useState)(null),i=(0,J.useCallback)(e=>r(e),[]),a=ln();return(0,X.jsxs)(xr.Provider,{value:{openWebView:i,canOpenWebView:a&&!!t},children:[e,a&&n&&t&&(0,X.jsx)(yr,{open:!0,url:n,projectId:t,onClose:()=>r(null)})]})}function Cr(){return(0,J.useContext)(xr)??{openWebView:()=>{},canOpenWebView:!1}}var wr={analyzing:`activity:smash.stage.analyzing`,identifying:`activity:smash.stage.identifying`,ordering:`activity:smash.stage.ordering`},Tr=(0,J.createContext)(null);function $(e){return`smash:${e}`}async function Er(e,t){try{let n=await fetch(`${u}/api/projects/${e}/tickets/${t}/smash`,{method:`POST`});if(n.ok)b.loading(l.t(`activity:smash.retrying`),{id:$(t)});else{let e=await n.json().catch(()=>({}));b.error(e.reason?l.t(`activity:smash.couldNotRetryWithReason`,{reason:e.reason}):l.t(`activity:smash.couldNotRetry`),{id:$(t)})}}catch(e){b.error(l.t(`activity:smash.retryFailed`,{message:e.message}),{id:$(t)})}}async function Dr(e,t,n){try{let r=await fetch(`${u}/api/projects/${e}/tickets/${t}/smash/undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({smashedAt:n})});if(r.ok)b.success(l.t(`activity:smash.undone`),{id:$(t),duration:3e3});else{let e=await r.json().catch(()=>({}));b.error(e.reason?l.t(`activity:smash.undoFailedWithReason`,{reason:e.reason}):l.t(`activity:smash.undoFailed`),{id:$(t)})}}catch(e){b.error(l.t(`activity:smash.undoFailedWithReason`,{reason:e.message}),{id:$(t)})}}function Or({children:e}){let{registerHandler:t,unregisterHandler:n}=f(),[r,i]=(0,J.useState)({}),a=(0,J.useRef)(new Map),o=(0,J.useRef)(new Map),s=(0,J.useCallback)(e=>{let t=e;if(!t||t.type!==`smash.started`)return;let n=t.ticketId,r=t.runId,o=t.projectId,s=t.timestamp,c=t.ticketTitle;typeof n!=`number`||!r||!o||(a.current.set(n,o),i(e=>({...e,[n]:{ticketId:n,runId:r,stage:`analyzing`,startedAt:s??new Date().toISOString(),ticketTitle:c}})),b.loading(l.t(wr.analyzing),{id:$(n),description:c?l.t(`activity:smash.onTitled`,{title:c}):l.t(`activity:smash.onThisSpec`)}))},[]),c=(0,J.useCallback)(e=>{let t=e;if(!t||t.type!==`smash.progress`)return;let n=t.ticketId,r=t.stage;if(typeof n!=`number`||!r)return;let a;i(e=>{let t=e[n];return t?(a=t.ticketTitle,{...e,[n]:{...t,stage:r}}):e}),b.loading(l.t(wr[r]),{id:$(n),description:a?l.t(`activity:smash.onTitled`,{title:a}):l.t(`activity:smash.onThisSpec`)})},[]),u=(0,J.useCallback)(e=>{let t=e;if(!t||t.type!==`smash.completed`)return;let n=t.ticketId,r=t.runId,a=t.projectId,s=t.smashedAt,c=t.childrenIds;typeof n!=`number`||!r||!a||!s||!c||(o.current.set(r,s),i(e=>{let t={...e};return delete t[n],t}),b.success(l.t(`activity:smash.split`,{count:c.length}),{id:$(n),duration:1e4,action:{label:l.t(`activity:smash.undoAction`),onClick:()=>void Dr(a,n,s)}}))},[]),d=(0,J.useCallback)(e=>{let t=e;if(!t||t.type!==`smash.failed`)return;let n=t.ticketId,r=t.projectId,o=t.reason??`unknown`;if(typeof n!=`number`||!r)return;a.current.set(n,r),i(e=>{let t={...e};return delete t[n],t});let s=o===`invalid-output`?l.t(`activity:smash.failReason.invalidOutput`):o===`timeout`?l.t(`activity:smash.failReason.timeout`):o===`model_error`?l.t(`activity:smash.failReason.modelError`):o===`crashed`?l.t(`activity:smash.failReason.crashed`):l.t(`activity:smash.failReason.generic`,{reason:o});b.error(l.t(`activity:smash.couldNotComplete`),{id:$(n),description:s,action:{label:l.t(`common:actions.retry`),onClick:()=>void Er(r,n)},duration:15e3})},[]),p=(0,J.useCallback)(e=>{let t=e;if(!t||t.type!==`smash.undone`)return;let n=t.ticketId;typeof n==`number`&&(b.dismiss($(n)),b.success(l.t(`activity:smash.undone`),{id:$(n),duration:3e3}))},[]);(0,J.useLayoutEffect)(()=>(t(`_smash_started`,s),t(`_smash_progress`,c),t(`_smash_completed`,u),t(`_smash_failed`,d),t(`_smash_undone`,p),()=>{n(`_smash_started`),n(`_smash_progress`),n(`_smash_completed`),n(`_smash_failed`),n(`_smash_undone`)}),[t,n,s,c,u,d,p]),(0,J.useEffect)(()=>()=>{a.current.clear(),o.current.clear()},[]);let m=(0,J.useMemo)(()=>({inflight:r}),[r]);return(0,X.jsx)(Tr.Provider,{value:m,children:e})}function kr(e){let t=(0,J.useContext)(Tr);return!t||e==null?null:t.inflight[e]??null}var Ar=150,jr={analyzing:0,identifying:1,ordering:2},Mr={analyzing:`smash.stage.analyzing`,identifying:`smash.stage.identifying`,ordering:`smash.stage.ordering`};function Nr({stage:e,minDisplayMs:t=Ar}){let{t:n}=g(`activity`),[r,i]=(0,J.useState)(e),a=(0,J.useRef)(Date.now()),o=(0,J.useRef)(null);if((0,J.useEffect)(()=>{if(e===r)return;let n=Date.now()-a.current,s=Math.max(0,t-n);return o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i(e),a.current=Date.now(),o.current=null},s),()=>{o.current&&clearTimeout(o.current)}},[e,r,t]),!r)return null;let s=jr[r];return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-md border border-accent-highlight/40 bg-accent-highlight/10 text-sm text-foreground`,role:`status`,"aria-live":`polite`,"data-testid":`smash-status-pills`,children:[(0,X.jsx)(N,{className:`h-4 w-4 animate-spin text-accent-highlight`,"aria-hidden":!0}),(0,X.jsx)(`div`,{className:`flex items-center gap-1.5`,children:[`analyzing`,`identifying`,`ordering`].map(e=>(0,X.jsx)(`span`,{className:[`inline-block w-1.5 h-1.5 rounded-full transition-all`,jr[e]<=s?`bg-accent-highlight`:`bg-muted`,e===r?`scale-125`:`scale-100`].join(` `),"aria-hidden":!0},e))}),(0,X.jsx)(`span`,{className:`font-medium`,children:n(Mr[r])})]})}var Pr={simple:{titleKey:`smashModal.modes.simple.title`,bulletKeys:[`smashModal.modes.simple.bullet1`,`smashModal.modes.simple.bullet2`,`smashModal.modes.simple.bullet3`],etaKey:`smashModal.modes.simple.eta`},full:{titleKey:`smashModal.modes.full.title`,bulletKeys:[`smashModal.modes.full.bullet1`,`smashModal.modes.full.bullet2`,`smashModal.modes.full.bullet3`,`smashModal.modes.full.bullet4`],etaKey:`smashModal.modes.full.eta`}};function Fr({open:e,ticketTitle:t,isReSmash:n,childrenCount:r,submitting:i=!1,onCancel:a,onConfirm:o}){let{t:s}=g(`activity`),[c,l]=(0,J.useState)(`simple`),{panelRef:u,panelStyle:d,headerHandleProps:f,resizeHandles:p,isFloating:m,guardBackdrop:_}=ie();return e?(0,sr.createPortal)((0,X.jsxs)(`div`,{className:`fixed inset-0 z-[60] flex items-center justify-center`,role:`dialog`,"aria-modal":`true`,"data-testid":`smash-confirm-modal`,children:[(0,X.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm`,onClick:_(a)}),(0,X.jsxs)(`div`,{ref:u,className:`relative w-full max-w-lg m-4 rounded-xl glass-card border border-border/30 animate-in fade-in zoom-in-95 duration-150`,style:d,children:[(0,X.jsxs)(`div`,{...f,className:`flex items-start justify-between gap-3 px-5 py-4 border-b border-border/30 ${m?`cursor-grab active:cursor-grabbing`:``}`,children:[(0,X.jsxs)(`div`,{className:`flex items-start gap-2 min-w-0`,children:[(0,X.jsx)(qe,{className:`w-5 h-5 text-accent-highlight shrink-0 mt-0.5`,"aria-hidden":!0}),(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:s(`smashModal.title`)}),(0,X.jsx)(`p`,{className:`text-[11px] text-muted-foreground truncate`,title:t,children:t})]})]}),(0,X.jsx)(`button`,{type:`button`,onClick:a,className:`h-7 w-7 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-surface/50 transition-colors shrink-0`,"aria-label":s(`common:actions.close`),children:(0,X.jsx)(re,{className:`w-4 h-4`})})]}),n&&r>0&&(0,X.jsx)(`div`,{className:`mx-5 mt-4 rounded-md border border-accent-warning/40 bg-accent-warning/10 px-3 py-2 text-xs text-foreground`,children:(0,X.jsx)(h,{t:s,i18nKey:`smashModal.reSmashWarning`,count:r})}),(0,X.jsxs)(`div`,{className:`px-5 py-4 space-y-3`,children:[(0,X.jsx)(`p`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium`,children:s(`smashModal.modePickerLabel`)}),[`simple`,`full`].map(e=>{let t=Pr[e],n=c===e;return(0,X.jsx)(`button`,{type:`button`,onClick:()=>l(e),disabled:i,className:`w-full text-left rounded-lg border px-3 py-3 transition-colors ${n?`border-accent-highlight/60 bg-accent-highlight/10`:`border-border/40 bg-card/40 hover:bg-card/60 hover:border-border/60`}`,"data-testid":`smash-mode-${e}`,children:(0,X.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,X.jsx)(`div`,{className:`mt-0.5 h-3.5 w-3.5 rounded-full border-2 shrink-0 ${n?`border-accent-highlight bg-accent-highlight`:`border-muted-foreground/60`}`,"aria-hidden":!0}),(0,X.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-1`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-1.5 text-sm font-semibold text-foreground`,children:[e===`full`&&(0,X.jsx)(B,{className:`w-3.5 h-3.5 text-accent-highlight`,"aria-hidden":!0}),s(t.titleKey)]}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground tabular-nums`,children:s(t.etaKey)})]}),(0,X.jsx)(`ul`,{className:`space-y-0.5`,children:t.bulletKeys.map(e=>(0,X.jsxs)(`li`,{className:`text-[11px] text-foreground/70 leading-snug`,children:[`• `,s(e)]},e))})]})]})},e)})]}),(0,X.jsxs)(`div`,{className:`flex items-center justify-end gap-2 px-5 py-3 border-t border-border/30 bg-surface/20`,children:[(0,X.jsx)(W,{variant:`ghost`,size:`sm`,onClick:a,disabled:i,children:s(`common:actions.cancel`)}),(0,X.jsxs)(W,{size:`sm`,onClick:()=>o(c),disabled:i,"data-testid":`smash-confirm-modal-continue`,children:[(0,X.jsx)(qe,{className:`w-3.5 h-3.5 mr-1.5`}),s(i?`smashModal.starting`:n?`smashModal.confirmReSmash`:`smashModal.smash`)]})]})]}),(0,X.jsx)(se,{handles:p})]}),document.body):null}var Ir=`## Contract Layer`;function Lr(e,t){return!(!t||e.status===`draft`||e.parent_epic_id!=null||!e.description?.includes(Ir))}function Rr({ticket:e,projectId:t,provider:n,featureFlagOn:r,childrenCount:i}){let{t:a}=g(`activity`),o=kr(e.id),[s,c]=(0,J.useState)(!1),[l,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(e.origin_conversation_id?void 0:null);(0,J.useEffect)(()=>{let r=e.origin_conversation_id;if(!r){p(null);return}let i=!1;return p(void 0),fetch(`${u}/api/projects/${t}/chat/conversations/${encodeURIComponent(r)}`).then(async e=>{if(!e.ok)throw Error(`origin conversation lookup failed (${e.status})`);let t=await e.json();i||p(t.conversation?.provider??n??null)}).catch(()=>{i||p(null)}),()=>{i=!0}},[t,n,e.origin_conversation_id]);let m=e.origin_conversation_id?f:n,h=r&&he(m),_=e.is_epic===!0,v=!_&&Lr(e,h),y=_&&h,x=_&&i>0,S=(0,J.useCallback)(async n=>{if(h){d(!0);try{let r=await fetch(`${u}/api/projects/${t}/tickets/${e.id}/smash`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({mode:n})});if(!r.ok){let e=await r.json().catch(()=>({}));b.error(e.reason?a(`smash.couldNotStartWithReason`,{reason:e.reason}):a(`smash.couldNotStart`));return}c(!1)}catch(e){b.error(a(`smash.smashFailed`,{message:e.message}))}finally{d(!1)}}},[t,e.id,a,h]),C=(0,J.useCallback)(async n=>{if(h){if(x){d(!0);try{if(!(await fetch(`${u}/api/projects/${t}/tickets/${e.id}/children`,{method:`DELETE`})).ok){b.error(a(`smash.couldNotDeleteChildren`)),d(!1);return}}catch(e){b.error(a(`smash.deleteFailed`,{message:e.message})),d(!1);return}}await S(n)}},[x,S,t,e.id,a,h]);return!v&&!y?null:o?(0,X.jsx)(`div`,{className:`flex flex-col gap-2`,"data-testid":`smash-actions-streaming`,children:(0,X.jsx)(Nr,{stage:o.stage})}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(W,{size:`sm`,variant:`outline`,onClick:()=>c(!0),className:`border-accent-highlight/40 text-accent-highlight hover:bg-accent-highlight/10`,"data-testid":y?`resmash-button`:`smash-button`,children:[(0,X.jsx)(qe,{className:`w-3.5 h-3.5 mr-1.5`}),a(y?`smash.reSmashButton`:`smash.smashButton`)]}),(0,X.jsx)(Fr,{open:s,ticketTitle:e.title,isReSmash:x,childrenCount:i,submitting:l,onCancel:()=>c(!1),onConfirm:C})]})}function zr({epic:e,childExecutionOrder:t,totalChildren:n,onOpenEpic:r}){let{t:i}=g(`activity`);return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-accent-secondary/30 bg-accent-secondary/10 px-3 py-1.5 text-xs`,"data-testid":`epic-breadcrumb`,children:[(0,X.jsxs)(`button`,{type:`button`,onClick:r,className:`text-accent-secondary hover:underline font-medium`,children:[`← `,e.title]}),t!=null&&n>0&&(0,X.jsx)(`span`,{className:`text-foreground/60`,children:i(`epicChildren.step`,{order:t,total:n})})]})}var Br={critical:`bg-red-400`,high:`bg-orange-400`,medium:`bg-yellow-400`,low:`bg-slate-400`};function Vr(e){return e?Br[e]:`bg-muted`}function Hr(e){return[...e].sort((e,t)=>{let n=e.execution_order??1/0,r=t.execution_order??1/0;return n===r?e.id-t.id:n-r})}function Ur({ticket:e,allTickets:t,onOpenTicket:n}){let{t:r}=g(`activity`),i=e.is_epic===!0,a=e.parent_epic_id!=null;if(!i&&!a)return null;if(i){let i=Hr(t.filter(t=>t.parent_epic_id===e.id));return(0,X.jsx)(Wr,{header:r(`family.subSpecsHeader`,{count:i.length}),rows:i,currentId:e.id,onOpenTicket:n,emptyMessage:r(`family.emptySubSpecs`)})}let o=t.find(t=>t.id===e.parent_epic_id)??null,s=Hr(t.filter(t=>t.parent_epic_id===e.parent_epic_id)),c=o?[o,...s]:s;return(0,X.jsx)(Wr,{header:r(`family.familyHeader`,{count:s.length}),rows:c,currentId:e.id,onOpenTicket:n,emptyMessage:r(`family.noSiblings`)})}function Wr({header:e,rows:t,currentId:n,onOpenTicket:r,emptyMessage:i}){let{t:a}=g(`activity`);return(0,X.jsxs)(`div`,{"data-testid":`epic-family-sidebar`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-1.5`,children:[(0,X.jsx)(qe,{className:`w-3 h-3 text-accent-highlight`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:e})]}),t.length===0?(0,X.jsx)(`p`,{className:`text-[10px] text-foreground/50 italic`,children:i}):(0,X.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:t.map(e=>{let t=e.id===n,i=e.is_epic===!0;return(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{t||r(e.id)},disabled:t,"aria-label":a(i?`family.openParentEpic`:`family.openSubSpec`,{title:e.title}),"aria-current":t?`page`:void 0,className:[`w-full flex items-center gap-1.5 rounded px-1.5 py-1 text-left transition-colors`,t?`bg-accent-highlight/15 cursor-default`:`hover:bg-muted/30 cursor-pointer`].join(` `),"data-testid":`epic-family-row-${e.id}`,children:[i?(0,X.jsx)(D,{className:`w-3 h-3 text-accent-highlight flex-shrink-0`,"aria-hidden":!0}):(0,X.jsx)(`span`,{className:`text-[9px] tabular-nums text-foreground/40 w-3 text-center flex-shrink-0`,children:e.execution_order??`–`}),(0,X.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full flex-shrink-0 ${Vr(e.priority)}`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`text-[11px] truncate ${t?`text-foreground font-medium`:`text-foreground/80`}`,title:e.title,children:e.title})]})},e.id)})})]})}var Gr=224,Kr=8,qr=8;function Jr({rails:e,onMoveToRail:t,onClose:n,anchorRect:r}){let{t:i}=g(`tickets`),a=(0,J.useRef)(null),[o,s]=(0,J.useState)(!1);(0,J.useLayoutEffect)(()=>{let e=requestAnimationFrame(()=>s(!0));return()=>cancelAnimationFrame(e)},[]),(0,J.useEffect)(()=>{function e(e){a.current&&(a.current.contains(e.target)||n())}function t(e){e.key===`Escape`&&n()}return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]);let{top:c,left:l,caretLeft:u}=(0,J.useMemo)(()=>{let e=r.left+r.width/2,t=e-Gr/2,n=window.innerWidth-Gr-Kr,i=Math.max(Kr,Math.min(n,t)),a=e-i,o=Math.max(12,Math.min(Gr-12,a));return{top:r.bottom+qr,left:i,caretLeft:o}},[r]);return(0,X.jsxs)(`div`,{ref:a,role:`dialog`,"aria-label":i(`rail.popoverTitle`),"data-testid":`move-to-rail-popover`,style:{top:c,left:l,width:Gr,opacity:+!!o,transform:o?`translateY(0) scale(1)`:`translateY(-4px) scale(0.97)`,transformOrigin:`${u}px top`,transition:`opacity 140ms ease-out, transform 160ms cubic-bezier(0.2, 0.9, 0.3, 1)`},className:`fixed z-50 rounded-xl border border-border/60 bg-card/95 backdrop-blur shadow-xl shadow-black/40 p-1`,children:[(0,X.jsx)(`div`,{"aria-hidden":!0,className:`absolute w-2 h-2 rotate-45 bg-card/95 border-l border-t border-border/60`,style:{top:-5,left:u-4}}),(0,X.jsx)(`div`,{className:`px-2 py-1.5 text-[10px] uppercase tracking-wider text-muted-foreground/70 font-medium`,children:i(`rail.popoverTitle`)}),e.length===0?(0,X.jsx)(`div`,{className:`px-2 py-2 text-xs text-muted-foreground`,children:i(`rail.noRails`)}):(0,X.jsx)(`ul`,{className:`flex flex-col`,children:e.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{t(e.id),n()},className:`w-full flex items-center gap-2 px-2 py-1.5 rounded-lg text-left text-sm hover:bg-accent-info/10 hover:text-accent-info transition-colors`,children:[e.status===`running`?(0,X.jsx)(P,{className:`w-3 h-3 text-accent-success animate-pulse shrink-0`,"aria-hidden":!0}):(0,X.jsx)(Fe,{className:`w-3 h-3 text-muted-foreground/60 shrink-0`,"aria-hidden":!0}),(0,X.jsx)(`span`,{className:`flex-1 truncate`,children:e.label}),(0,X.jsx)(Pe,{className:`w-3.5 h-3.5 text-muted-foreground/40 shrink-0`,"aria-hidden":!0})]})},e.id))})]})}var Yr=900,Xr=.2,Zr=[`todo`,`in_progress`,`done`,`cancelled`],Qr={draft:`ticketStatus.draft`,todo:`ticketStatus.todo`,in_progress:`ticketStatus.inProgress`,on_review:`ticketStatus.onReview`,done:`ticketStatus.done`,cancelled:`ticketStatus.cancelled`},$r=[{value:`critical`,labelKey:`priority.critical`,className:`text-red-400`},{value:`high`,labelKey:`priority.high`,className:`text-orange-400`},{value:`medium`,labelKey:`priority.medium`,className:`text-yellow-400`},{value:`low`,labelKey:`priority.low`,className:`text-slate-400`}];function ei(e){return e.jira_epic_key&&e.jira_url?e.jira_url.replace(/\/browse\/[^/]+$/,`/browse/${e.jira_epic_key}`):null}var ti={manual:`source.manual`,"product-backlog":`source.productBacklog`,"propose-spec":`source.proposeSpec`,"get-backlog-specs":`source.getBacklogSpecs`,"free-prompt":`source.freePrompt`};function ni({ticket:e,allLabels:t,allTickets:n,onClose:r,onOpenTicket:i,onSave:a,onDelete:o,rails:s,onMoveToRail:c,onRemoveFromRail:l,embedded:u=!1}){let{t:d}=g(`tickets`),{t:f}=g(`jira`),{activeProjectId:p,projects:m}=y(),{enterSplit:_,state:v}=Ti(),x=v.originSide!==null,C=m.find(e=>e.id===p)?.provider,w=he(C),E=(0,J.useMemo)(()=>(n??[]).filter(t=>t.parent_epic_id===e.id),[n,e.id]),D=(0,J.useMemo)(()=>e.parent_epic_id==null?null:(n??[]).find(t=>t.id===e.parent_epic_id)??null,[n,e.parent_epic_id]),O=(0,J.useMemo)(()=>D?(n??[]).filter(e=>e.parent_epic_id===D.id).length:0,[n,D]),[k,j]=(0,J.useState)(e.title),[M,P]=(0,J.useState)(e.description),[F,I]=(0,J.useState)(e.priority??`medium`),[R,ne]=(0,J.useState)([...e.labels??[]]),[B,H]=(0,J.useState)(e.repositoryIds),[fe,pe]=(0,J.useState)(!1),[U,ge]=(0,J.useState)(!1),[G,ve]=(0,J.useState)(``),[ye,be]=(0,J.useState)(!1),[xe,Se]=(0,J.useState)(!1),[Ce,we]=(0,J.useState)(!1),[Te,Ee]=(0,J.useState)(!1),[De,Oe]=(0,J.useState)(!1),[ke,Ae]=(0,J.useState)(!1),je=Qt(),Ne=je.connected&&!!je.discardStatus&&e.source===`jira`&&!!e.jira_key,Pe=je.connected&&e.source===`jira`&&!!e.jira_key,[Fe,Le]=(0,J.useState)(e.attachments??[]);(0,J.useEffect)(()=>{Le(e.attachments??[])},[e.attachments,e.id]);let[Re,ze]=(0,J.useState)(!1),[Be,Ve]=(0,J.useState)(null);(0,J.useEffect)(()=>{if(!Pe)return;let e=!0;return z.listStatuses().then(t=>{e&&Ve(t.statuses)}).catch(()=>{e&&Ve([])}),()=>{e=!1}},[Pe,e.id]);let K=e.jira_status??``,He=async t=>{if(t!==e.status){ze(!0);try{await a(e.id,{status:t})}finally{ze(!1)}}},Ue=async t=>{if(!(!t||t===K)){ze(!0);try{await z.moveSpecToStatus(e.id,t),b.success(f(`moveToStatus.queued`,{status:t}))}catch{b.error(f(`moveToStatus.failed`))}finally{ze(!1)}}},We=(0,J.useRef)(null),Ge=(0,J.useRef)(null),Ke=(0,J.useRef)(null),qe=(0,J.useMemo)(()=>k!==e.title||M!==e.description||F!==e.priority||JSON.stringify(R)!==JSON.stringify(e.labels)||JSON.stringify(B)!==JSON.stringify(e.repositoryIds),[k,M,F,R,B,e]);(0,J.useEffect)(()=>{fe&&We.current?.focus()},[fe]),(0,J.useEffect)(()=>{if(U){let e=Ge.current;e&&(e.focus(),e.selectionStart=e.value.length)}},[U]),(0,J.useEffect)(()=>{ye&&Ke.current?.focus()},[ye]),(0,J.useEffect)(()=>{function e(e){e.key===`Escape`&&!fe&&!U&&!xe&&r()}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,fe,U,xe]);let Je=(0,J.useMemo)(()=>{if(!G.trim())return[];let e=G.toLowerCase();return t.filter(t=>t.toLowerCase().includes(e)&&!R.includes(t)).slice(0,5)},[G,t,R]),Ye=(0,J.useCallback)(e=>{let t=e.trim();t&&!R.includes(t)&&ne(e=>[...e,t]),ve(``)},[R]),Xe=(0,J.useCallback)(e=>{ne(t=>t.filter(t=>t!==e))},[]),Ze=(0,J.useCallback)(async()=>{let t={};if(k!==e.title&&(t.title=k),M!==e.description&&(t.description=M),F!==e.priority&&(t.priority=F),JSON.stringify(R)!==JSON.stringify(e.labels)&&(t.labels=R),JSON.stringify(B)!==JSON.stringify(e.repositoryIds)&&(t.repositoryIds=B),Object.keys(t).length===0){r();return}Oe(!0);let n=await a(e.id,t);Oe(!1),n?(b.success(d(`detailModal.toast.updated`)),r()):b.error(d(`detailModal.toast.updateFailed`))},[k,M,F,R,B,e,a,r,d]),Qe=(0,J.useCallback)(async()=>{if(ke)return;Ae(!0);let t=!1;try{t=await o(e.id)}catch{t=!1}if(Ae(!1),!t){b.error(d(`detailModal.toast.deleteFailed`));return}Se(!1),r()},[ke,e.id,o,r,d]),[q,$e]=(0,J.useState)(0),et=(0,J.useRef)(null),[tt,nt]=(0,J.useState)(()=>typeof window<`u`&&window.innerWidth>=Yr);(0,J.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>nt(window.innerWidth>=Yr);return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let rt=!u&&!x&&tt,it=(0,J.useCallback)(e=>{et.current&&$e(e.clientX-et.current.startX)},[]),Y=(0,J.useCallback)(t=>{if(!et.current)return;let n=t.clientX-et.current.startX,i=window.innerWidth*Xr;if(window.removeEventListener(`pointermove`,it),window.removeEventListener(`pointerup`,Y),window.removeEventListener(`pointercancel`,Y),et.current=null,$e(0),Math.abs(n)>=i&&window.innerWidth>=Yr){let t=v.leftId===e.id;_(n<0?`left`:`right`,e.id),t||r()}},[_,it,v.leftId,e.id,r]),at=(0,J.useCallback)(e=>{rt&&e.button===0&&(e.target.closest(`button, input, textarea, select, [contenteditable="true"]`)||(et.current={startX:e.clientX,pointerId:e.pointerId},window.addEventListener(`pointermove`,it),window.addEventListener(`pointerup`,Y),window.addEventListener(`pointercancel`,Y)))},[rt,it,Y]);(0,J.useEffect)(()=>()=>{et.current&&(window.removeEventListener(`pointermove`,it),window.removeEventListener(`pointerup`,Y),window.removeEventListener(`pointercancel`,Y))},[it,Y]);let ot=(0,J.useCallback)(()=>{if(!rt||window.innerWidth<Yr)return;let t=v.leftId===e.id;_(`right`,e.id),t||r()},[rt,_,v.leftId,e.id,r]),{panelRef:st,panelStyle:ct,resizeHandles:lt,guardBackdrop:ut}=ie({enabled:!u,allowMove:!1}),dt=(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{ref:st,className:u?`relative w-full h-full rounded-xl bg-card border border-border/40 shadow-2xl shadow-black/50 flex flex-col overflow-hidden`:`relative w-full max-w-[67rem] m-4 rounded-xl bg-card border border-border/40 shadow-2xl shadow-black/50 flex flex-col animate-in fade-in zoom-in-95 duration-200 h-[90vh] max-h-[calc(100%-2rem)]`,style:{...q===0?{transition:`transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1)`}:{transform:`translateX(${q}px)`,transition:`none`},...ct},children:[D&&(0,X.jsx)(`div`,{className:`px-5 pt-3`,children:(0,X.jsx)(zr,{epic:D,childExecutionOrder:e.execution_order??null,totalChildren:O,onOpenEpic:()=>i?.(D.id)})}),(0,X.jsxs)(`div`,{className:`flex items-start justify-between gap-3 px-5 py-4 border-b border-border/30 ${rt?`cursor-grab active:cursor-grabbing`:``}`,onPointerDown:at,"data-testid":`ticket-modal-header`,children:[(0,X.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[fe?(0,X.jsx)(`input`,{ref:We,value:k,onChange:e=>j(e.target.value),onBlur:()=>pe(!1),onKeyDown:t=>{t.key===`Enter`&&pe(!1),t.key===`Escape`&&(j(e.title),pe(!1))},className:`w-full bg-transparent border-b border-accent-primary/50 text-sm font-semibold text-foreground outline-none pb-0.5`}):(0,X.jsxs)(`button`,{type:`button`,onClick:()=>pe(!0),className:`group flex items-center gap-1.5 text-left w-full`,children:[(0,X.jsx)(`h2`,{className:`text-sm font-semibold text-foreground truncate`,children:k||d(`untitled`)}),(0,X.jsx)(ee,{className:`w-3 h-3 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0`})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-2 mt-1.5`,children:[(0,X.jsxs)(`span`,{className:`text-[10px] text-foreground font-mono`,children:[`#`,e.id]}),e.status===`on_review`&&(0,X.jsx)(`span`,{title:d(`specs:status.onReviewHint`),"data-testid":`ticket-modal-on-review-badge`,children:(0,X.jsx)(Zt,{status:`on_review`})})]}),(0,X.jsx)(Jt,{ticketId:e.id})]}),p&&(0,X.jsx)(`div`,{className:`shrink-0`,children:(0,X.jsx)(Rr,{ticket:e,projectId:p,provider:C,featureFlagOn:w,childrenCount:E.length})}),(0,X.jsx)(ii,{ticket:e,title:k,description:M,priority:F,labels:R,repositoryIds:B,onClose:r}),s&&(c||l)&&(0,X.jsx)(ai,{ticket:e,rails:s,onMoveToRail:c,onRemoveFromRail:l}),rt&&(0,X.jsxs)(W,{variant:`outline`,size:`sm`,className:`shrink-0 mr-1 gap-1.5`,"data-testid":`ticket-modal-compare`,onClick:ot,title:d(`detailModal.compareTooltip`),children:[(0,X.jsx)(Ie,{className:`w-3.5 h-3.5`}),d(`detailModal.compare`)]}),(0,X.jsx)(`button`,{onClick:r,className:`h-7 w-7 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-surface/50 transition-colors cursor-pointer shrink-0`,"data-testid":`ticket-modal-close`,children:(0,X.jsx)(re,{className:`w-4 h-4`})})]}),(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto min-h-0`,children:(0,X.jsxs)(`div`,{className:`flex flex-col sm:flex-row h-full`,children:[(0,X.jsxs)(`div`,{className:`flex-1 min-w-0 px-5 py-4 space-y-4 flex flex-col`,children:[(0,X.jsxs)(`div`,{className:`flex-1 flex flex-col`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between mb-1.5`,children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-1.5`,children:d(`fields.description`)}),!U&&(0,X.jsxs)(`button`,{type:`button`,onClick:()=>ge(!0),className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors flex items-center gap-1`,children:[(0,X.jsx)(ee,{className:`w-2.5 h-2.5`}),d(`common:actions.edit`)]})]}),U?(0,X.jsxs)(`div`,{className:`space-y-1.5 flex-1 flex flex-col`,children:[(0,X.jsx)(`textarea`,{ref:Ge,value:M,onChange:e=>P(e.target.value),className:`w-full flex-1 rounded-lg border border-border bg-input px-3 py-2 text-xs text-foreground placeholder:text-muted-foreground resize-none min-h-[300px]`,placeholder:d(`fields.markdownPlaceholder`)}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,X.jsx)(W,{variant:`ghost`,size:`sm`,className:`h-6 text-[10px]`,onClick:()=>ge(!1),children:d(`detailModal.doneEditing`)}),(0,X.jsx)(`span`,{className:`text-[9px] text-muted-foreground`,children:d(`fields.supportsMarkdown`)})]})]}):M?(0,X.jsx)(li,{description:M,onEdit:()=>ge(!0)}):(0,X.jsx)(`button`,{type:`button`,onClick:()=>ge(!0),className:`w-full rounded-lg border border-dashed border-border/40 bg-muted/10 px-3 py-4 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/20 transition-colors text-center`,children:d(`detailModal.addDescription`)})]}),(0,X.jsx)(Wt,{ticketKey:e.id,attachments:Fe,onChange:Le}),(0,X.jsx)(Gt,{ticketId:e.id,onClose:r}),e.prerequisites&&e.prerequisites.length>0&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:d(`detailModal.prerequisites`)}),(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.prerequisites.map(e=>(0,X.jsxs)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[10px] font-mono bg-accent/60 text-foreground/70`,children:[`#`,e]},e))})]})]}),(0,X.jsxs)(`div`,{className:`sm:w-56 sm:border-l border-t sm:border-t-0 border-border/30 px-4 py-4 space-y-4 bg-muted/5`,children:[e.jira_url&&e.jira_key&&(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{_e(e.jira_url)},"data-testid":`jira-go-to-ticket`,className:`w-full inline-flex items-center justify-center gap-1.5 h-7 rounded border border-accent-info/50 bg-accent-info/10 px-2 text-xs font-medium text-accent-info hover:bg-accent-info/20 transition-colors`,children:[(0,X.jsx)(T,{className:`w-3.5 h-3.5 shrink-0`}),f(`detail.goToTicket`,{key:e.jira_key})]}),e.jira_epic_key&&(0,X.jsxs)(`div`,{"data-testid":`jira-epic`,children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:f(`detail.epic`)}),(0,X.jsxs)(`button`,{type:`button`,onClick:()=>{let t=ei(e);t&&_e(t)},title:e.jira_epic_name??e.jira_epic_key,className:`w-full inline-flex items-center gap-1.5 rounded border border-accent-highlight/40 bg-accent-highlight/5 px-2 py-1.5 text-left text-xs hover:bg-accent-highlight/10 transition-colors`,children:[(0,X.jsx)(`span`,{className:`font-mono text-accent-highlight shrink-0`,children:e.jira_epic_key}),e.jira_epic_name&&(0,X.jsx)(`span`,{className:`truncate text-foreground/80`,children:e.jira_epic_name})]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:d(`fields.status`)}),Pe?(0,X.jsx)(`select`,{value:K,disabled:Re||Be===null,onChange:e=>{Ue(e.target.value)},className:`w-full h-7 rounded border border-border bg-input px-2 text-xs text-foreground disabled:opacity-60`,"data-testid":`ticket-jira-status-select`,children:Be===null?(0,X.jsx)(`option`,{value:K,children:K||d(`states.loading`,{ns:`common`})}):(0,X.jsxs)(X.Fragment,{children:[K&&!Be.some(e=>e.name===K)&&(0,X.jsx)(`option`,{value:K,children:K}),Be.map(e=>(0,X.jsx)(`option`,{value:e.name,children:e.name},e.name))]})}):(0,X.jsxs)(`select`,{value:e.status,disabled:Re,onChange:e=>{He(e.target.value)},className:`w-full h-7 rounded border border-border bg-input px-2 text-xs text-foreground disabled:opacity-60`,"data-testid":`ticket-status-select`,children:[!Zr.includes(e.status)&&(0,X.jsx)(`option`,{value:e.status,children:d(Qr[e.status],{ns:`tickets`})}),Zr.map(e=>(0,X.jsx)(`option`,{value:e,children:d(Qr[e],{ns:`tickets`})},e))]})]}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:d(`fields.priority`)}),(0,X.jsx)(`select`,{value:F,onChange:e=>I(e.target.value),className:`w-full h-7 rounded border border-border bg-input px-2 text-xs text-foreground`,children:$r.map(e=>(0,X.jsx)(`option`,{value:e.value,children:d(e.labelKey)},e.value))})]}),(0,X.jsx)(me,{value:B,onChange:H,disabled:De}),(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-1.5`,children:d(`fields.labels`)}),(0,X.jsx)(`div`,{className:`flex flex-wrap gap-1 mb-1.5`,children:R.map(e=>(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-0.5 rounded px-1.5 py-0.5 text-[10px] font-medium bg-accent/60 text-foreground/70 group`,children:[e,(0,X.jsx)(`button`,{type:`button`,onClick:()=>Xe(e),className:`text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity`,children:(0,X.jsx)(A,{className:`w-2.5 h-2.5`})})]},e))}),ye?(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(`input`,{ref:Ke,value:G,onChange:e=>ve(e.target.value),onKeyDown:e=>{e.key===`Enter`&&G.trim()&&(e.preventDefault(),Ye(G)),e.key===`Escape`&&(be(!1),ve(``))},onBlur:()=>{G.trim()&&Ye(G),be(!1),ve(``)},placeholder:d(`detailModal.addLabelPlaceholder`),className:`w-full h-6 rounded border border-border bg-input px-2 text-[10px] text-foreground placeholder:text-muted-foreground`}),Je.length>0&&(0,X.jsx)(`div`,{className:`absolute left-0 right-0 top-full mt-0.5 rounded border border-border/50 bg-popover shadow-lg z-10 py-0.5`,children:Je.map(e=>(0,X.jsx)(`button`,{type:`button`,onMouseDown:t=>{t.preventDefault(),Ye(e)},className:`w-full text-left px-2 py-1 text-[10px] hover:bg-accent/50 text-foreground/80`,children:e},e))})]}):(0,X.jsxs)(`button`,{type:`button`,onClick:()=>be(!0),className:`flex items-center gap-1 text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:[(0,X.jsx)(te,{className:`w-2.5 h-2.5`}),d(`detailModal.addLabel`)]})]}),(0,X.jsx)(Ur,{ticket:e,allTickets:n??[],onOpenTicket:e=>i?.(e)}),e.source===`jira`&&e.jira_key&&(0,X.jsx)(nn,{localId:e.id}),e.metadata?.effort_level&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-0.5`,children:d(`detailModal.effort`)}),(0,X.jsx)(`span`,{className:`text-xs text-foreground/70`,children:e.metadata.effort_level})]}),e.assignee&&(0,X.jsxs)(`div`,{children:[(0,X.jsx)(`span`,{className:`text-[10px] font-medium text-muted-foreground uppercase tracking-wider block mb-0.5`,children:d(`detailModal.assignee`)}),(0,X.jsx)(`span`,{className:`text-xs text-foreground/70`,children:e.assignee})]})]})]})}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between px-5 py-3 border-t border-border/30`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground`,children:[(0,X.jsx)(`span`,{children:d(`meta.createdAgo`,{time:ri(e.created_at)})}),(0,X.jsx)(`span`,{children:d(`meta.updatedAgo`,{time:ri(e.updated_at)})}),e.source&&(0,X.jsx)(`span`,{className:`bg-muted/30 rounded px-1.5 py-0.5`,children:ti[e.source]?d(ti[e.source]):e.source})]}),(0,X.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[Ne?(0,X.jsxs)(W,{variant:`ghost`,size:`sm`,className:`h-7 text-xs text-accent-info hover:bg-accent-info/10`,onClick:()=>we(!0),"data-testid":`jira-move-to-button`,children:[(0,X.jsx)(Me,{className:`w-3 h-3 mr-1`}),f(`discard.moveButton`,{status:je.discardStatus})]}):(0,X.jsxs)(W,{variant:`ghost`,size:`sm`,className:`h-7 text-xs text-red-400 aurora-light:text-destructive hover:text-red-300 aurora-light:hover:text-destructive hover:bg-red-500/10 aurora-light:hover:bg-destructive/10`,onClick:()=>Se(!0),children:[(0,X.jsx)(L,{className:`w-3 h-3 mr-1`}),d(`common:actions.delete`)]}),qe&&(0,X.jsxs)(W,{size:`sm`,className:`h-7 text-xs`,onClick:()=>{Pe?Ee(!0):Ze()},disabled:De||!k.trim(),children:[(0,X.jsx)(S,{className:`w-3 h-3 mr-1`}),d(De?`common:states.saving`:`common:actions.save`)]})]})]})]}),(0,X.jsx)(de,{open:xe,onOpenChange:e=>{ke||Se(e)},children:(0,X.jsxs)(ue,{className:`max-w-sm`,children:[(0,X.jsxs)(le,{children:[(0,X.jsx)(ce,{children:d(`deleteDialog.title`)}),(0,X.jsx)(oe,{children:(0,X.jsx)(h,{t:d,i18nKey:`deleteDialog.body`,values:{id:e.id,title:e.title},components:{strong:(0,X.jsx)(`span`,{className:`font-semibold text-foreground`})}})})]}),(0,X.jsxs)(V,{children:[(0,X.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>Se(!1),disabled:ke,children:d(`common:actions.cancel`)}),(0,X.jsxs)(W,{variant:`destructive`,size:`sm`,onClick:()=>{Qe()},disabled:ke,"aria-busy":ke,children:[ke?(0,X.jsx)(N,{className:`w-3.5 h-3.5 mr-1.5 animate-spin`}):(0,X.jsx)(L,{className:`w-3.5 h-3.5 mr-1.5`}),d(`common:actions.delete`)]})]})]})}),Ne&&je.discardStatus&&(0,X.jsx)($t,{open:Ce,onOpenChange:we,ticket:{id:e.id,title:e.title,jira_key:e.jira_key},discardStatus:je.discardStatus,onDiscarded:r}),(0,X.jsx)(de,{open:Te,onOpenChange:Ee,children:(0,X.jsxs)(ue,{className:`max-w-md`,"data-testid":`jira-save-confirm`,children:[(0,X.jsxs)(le,{children:[(0,X.jsx)(ce,{children:f(`detail.saveTitle`)}),(0,X.jsx)(oe,{children:f(`detail.saveBody`,{key:e.jira_key??`#${e.id}`})})]}),(0,X.jsxs)(V,{children:[(0,X.jsx)(W,{variant:`outline`,size:`sm`,onClick:()=>Ee(!1),children:d(`common:actions.cancel`)}),(0,X.jsxs)(W,{size:`sm`,onClick:()=>{Ee(!1),Ze()},disabled:De,"data-testid":`jira-save-confirm-btn`,children:[(0,X.jsx)(S,{className:`w-3.5 h-3.5 mr-1.5`}),f(`detail.saveConfirm`)]})]})]})})]});return u?dt:(0,sr.createPortal)((0,X.jsxs)(`div`,{style:ae(),className:`fixed inset-0 z-[68] flex items-center justify-center`,children:[(0,X.jsx)(`div`,{className:`absolute inset-0 bg-black/70`,onClick:ut(r)}),dt,(0,X.jsx)(se,{handles:lt})]}),document.body)}function ri(e){try{return U(new Date(e),{addSuffix:!0,locale:d()})}catch{return e}}function ii({ticket:e,title:t,description:n,priority:r,labels:i,repositoryIds:a,onClose:o}){let{t:s}=g(`tickets`),{triggerResume:c}=O(),{activeProjectId:l}=y(),{closeTicketDetail:u}=Ti();return sn(e)?(0,X.jsxs)(W,{variant:`default`,size:`sm`,onClick:()=>{if(!l)return;let{body:d,criteria:f}=an(n);c({kind:`explore-spec`,projectId:l,label:t||e.title||s(`detailModal.ticketFallbackLabel`,{id:e.id}),restoreRoute:`/`,params:{initialIdea:``,pendingSpecId:cn(),initialAttachmentIds:[],resumeConversationId:e.origin_conversation_id??void 0,editTicket:{id:e.id,title:t,description:d,labels:i,priority:r,repositoryIds:a,acceptanceCriteria:f,status:e.status}}}),u(),o()},className:`shrink-0 mr-2`,"data-testid":`continue-editing`,children:[(0,X.jsx)(Ue,{className:`w-3.5 h-3.5 mr-1.5`}),s(`detailModal.continueEditing`)]}):null}function ai({ticket:e,rails:t,onMoveToRail:n,onRemoveFromRail:r}){let{t:i}=g(`tickets`),[a,o]=(0,J.useState)(null),s=(0,J.useRef)(null),c=t.find(t=>t.ticketIds.includes(e.id));return c?r?(0,X.jsxs)(W,{variant:`outline`,size:`sm`,className:`shrink-0 mr-2 gap-1.5 border-accent-warning/30 text-accent-warning hover:bg-accent-warning/10 hover:text-accent-warning`,"data-testid":`modal-remove-from-rail`,onClick:()=>r(e.id),title:i(`rail.currentlyOn`,{rail:c.label}),children:[(0,X.jsx)(x,{className:`w-3.5 h-3.5`,"aria-hidden":!0}),i(`rail.removeFromRail`)]}):null:n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(W,{ref:s,variant:`outline`,size:`sm`,className:`shrink-0 mr-2 gap-1.5 border-accent-info/30 text-accent-info hover:bg-accent-info/10 hover:text-accent-info`,"data-testid":`modal-move-to-rail`,onClick:()=>{s.current&&o(s.current.getBoundingClientRect())},children:[i(`rail.moveToRail`),(0,X.jsx)(Me,{className:`w-3.5 h-3.5`,"aria-hidden":!0})]}),a&&(0,X.jsx)(Jr,{rails:t,anchorRect:a,onMoveToRail:t=>n(e.id,t),onClose:()=>o(null)})]}):null}var oi=`
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Contract Layer
|
|
13
|
-
|
|
14
|
-
`;function si(e){let t=e.indexOf(oi);return t<0?{user:e,contract:null}:{user:e.slice(0,t),contract:e.slice(t+26)}}function ci(e){let t=[`### Naming Contract`,`### Data Shapes`,`### State Machine`,`### Invariants`,`### File Touch List`],n=0;for(let r of t){let t=e.indexOf(r);if(t<0)continue;let i=e.slice(t+r.length),a=i.indexOf(`N/A — model did not produce items`),o=i.indexOf(`### `);a>=0&&(o<0||a<o)||n++}return n}function li({description:e,onEdit:t}){let{t:n}=g(`tickets`),{openWebView:r}=Cr(),{user:i,contract:a}=si(e),o=i||e,s=(0,J.useMemo)(()=>({a:({href:e,children:t})=>(0,X.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,onClick:t=>{typeof e==`string`&&/^https?:\/\//i.test(e)&&(t.preventDefault(),t.stopPropagation(),r(e))},children:t})}),[r]);return(0,X.jsxs)(`div`,{className:`flex-1 rounded-lg bg-muted/20 px-3 py-2 overflow-y-auto transition-colors`,onClick:e=>{e.target.closest(`details, summary`)||t()},role:`button`,style:{cursor:`pointer`},children:[(0,X.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none prose-p:my-1 prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold prose-ul:my-1 prose-ol:my-1 prose-li:my-0 prose-code:text-cyan-300 prose-code:text-[10px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded text-foreground/80 text-xs`,children:(0,X.jsx)(fe,{remarkPlugins:[pe],components:s,children:o})}),a&&(0,X.jsxs)(`details`,{"data-testid":`contract-layer-disclosure`,className:`mt-3 rounded-md border border-border/40 bg-muted/10 px-2 py-1`,onClick:e=>e.stopPropagation(),children:[(0,X.jsxs)(`summary`,{className:`cursor-pointer text-[10px] font-medium text-foreground/80 select-none flex items-center gap-2`,children:[n(`contractLayer.title`),(0,X.jsx)(`span`,{className:`rounded-full bg-muted/40 px-1.5 text-[9px] text-foreground/60`,children:n(`contractLayer.populated`,{n:ci(a)})})]}),(0,X.jsx)(`div`,{className:`mt-2 prose prose-invert prose-xs max-w-none prose-p:my-1 prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold prose-ul:my-1 prose-ol:my-1 prose-li:my-0 prose-code:text-cyan-300 prose-code:text-[10px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded text-foreground/80 text-xs`,children:(0,X.jsx)(fe,{remarkPlugins:[pe],components:s,children:a})})]})]})}var ui={critical:`bg-red-500/15 aurora-light:bg-destructive/10 text-red-400 aurora-light:text-destructive border-red-500/30 aurora-light:border-destructive/30`,high:`bg-orange-500/15 aurora-light:bg-accent-warning/10 text-orange-400 aurora-light:text-accent-warning border-orange-500/30 aurora-light:border-accent-warning/30`,medium:``,low:`bg-gray-500/15 aurora-light:bg-muted text-gray-400 aurora-light:text-muted-foreground border-gray-500/30 aurora-light:border-border`};function di(e){try{return U(new Date(e),{addSuffix:!0,locale:d()})}catch{return e}}function fi({tickets:e,excludeIds:t,onSelect:n}){let{t:r}=g(`tickets`),[i,a]=(0,J.useState)(``),o=(0,J.useMemo)(()=>{let n=new Set(t),r=e.filter(e=>e.status!==`cancelled`&&!n.has(e.id));if(!i.trim())return r;let a=i.toLowerCase();return r.filter(e=>e.title.toLowerCase().includes(a)||e.description.toLowerCase().includes(a))},[e,t,i]);return(0,X.jsxs)(`div`,{"data-testid":`spec-compare-picker`,className:`h-full flex flex-col rounded-xl bg-card border border-border/40 shadow-2xl shadow-black/50 overflow-hidden`,children:[(0,X.jsxs)(`div`,{className:`px-4 py-3 border-b border-border/30 flex items-center gap-2`,children:[(0,X.jsx)(Je,{className:`w-3.5 h-3.5 text-muted-foreground`}),(0,X.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:r(`comparePicker.title`)}),(0,X.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:r(`comparePicker.count`,{n:o.length})})]}),(0,X.jsx)(`div`,{className:`px-4 py-2 border-b border-border/20`,children:(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(I,{className:`absolute left-2 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground`}),(0,X.jsx)(`input`,{type:`text`,value:i,onChange:e=>a(e.target.value),placeholder:r(`comparePicker.searchPlaceholder`),className:`w-full h-7 rounded border border-border bg-input pl-7 pr-2 text-[11px] text-foreground placeholder:text-muted-foreground outline-none focus:border-accent-primary/60`})]})}),(0,X.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`spec-compare-picker-list`,children:o.length===0?(0,X.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full text-center px-4 py-8 gap-2`,children:[(0,X.jsx)(Je,{className:`w-6 h-6 text-muted-foreground/40`}),(0,X.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:i.trim()?r(`comparePicker.noMatches`):r(`comparePicker.empty`)})]}):(0,X.jsx)(`ul`,{className:`divide-y divide-border/10`,children:o.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,"data-testid":`spec-compare-card-${e.id}`,onClick:()=>n(e.id),className:`w-full text-left px-4 py-2.5 hover:bg-accent/30 transition-colors flex items-start gap-2 group`,children:[(0,X.jsx)(Xt,{status:e.status}),(0,X.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,X.jsxs)(`span`,{className:`text-[10px] font-mono text-muted-foreground`,children:[`#`,e.id]}),e.priority&&ui[e.priority]&&(0,X.jsx)(`span`,{className:`inline-flex items-center rounded px-1 py-0.5 text-[9px] font-medium border ${ui[e.priority]}`,children:r(`priority.${e.priority}`)})]}),(0,X.jsx)(`p`,{className:`mt-0.5 text-xs text-foreground truncate group-hover:text-accent-primary transition-colors`,children:e.title||r(`untitled`)}),e.description&&(0,X.jsx)(`p`,{className:`mt-0.5 text-[10px] text-muted-foreground line-clamp-1`,children:e.description.slice(0,120)}),e.labels&&e.labels.length>0&&(0,X.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:[e.labels.slice(0,3).map(e=>(0,X.jsx)(`span`,{className:`inline-flex items-center rounded px-1 py-0.5 text-[9px] bg-accent/40 text-foreground/60`,children:e},e)),e.labels.length>3&&(0,X.jsxs)(`span`,{className:`text-[9px] text-muted-foreground`,children:[`+`,e.labels.length-3]})]}),(0,X.jsx)(`p`,{className:`mt-1 text-[9px] text-muted-foreground`,children:r(`meta.updatedAgo`,{time:di(e.updated_at)})})]})]})},e.id))})})]})}var pi=.25,mi=.75;function hi({state:e,leftTicket:t,rightTicket:n,allTickets:r,allLabels:i,onSave:a,onDelete:o,onOpenTicket:s,onCloseAll:c,onSetCompared:l,onSetRatio:u,onExitSplit:d}){let f=(0,J.useRef)(null),p=(0,J.useRef)(null),[m,h]=(0,J.useState)(!0);(0,J.useEffect)(()=>{let e=setTimeout(()=>h(!1),320);return()=>clearTimeout(e)},[]);let g=(0,J.useCallback)(e=>{if(!p.current)return;let t=window.innerWidth,n=e.clientX/t;u(Math.min(mi,Math.max(pi,n)))},[u]),_=(0,J.useCallback)(e=>{if(!p.current)return;let{pointerId:t,element:n}=p.current;try{n.releasePointerCapture(t)}catch{}p.current=null,window.removeEventListener(`pointermove`,g),window.removeEventListener(`pointerup`,_),window.removeEventListener(`pointercancel`,_)},[g]),v=(0,J.useCallback)(e=>{let t=e.currentTarget;try{t.setPointerCapture(e.pointerId)}catch{}p.current={pointerId:e.pointerId,element:t},window.addEventListener(`pointermove`,g),window.addEventListener(`pointerup`,_),window.addEventListener(`pointercancel`,_)},[g,_]);(0,J.useEffect)(()=>()=>{window.removeEventListener(`pointermove`,g),window.removeEventListener(`pointerup`,_),window.removeEventListener(`pointercancel`,_);let e=p.current;if(e){try{e.element.releasePointerCapture(e.pointerId)}catch{}p.current=null}},[g,_]);let y=(0,J.useCallback)(t=>{let n=.04;t.key===`ArrowLeft`?(t.preventDefault(),u(Math.max(pi,e.splitRatio-n))):t.key===`ArrowRight`?(t.preventDefault(),u(Math.min(mi,e.splitRatio+n))):t.key===`Home`?(t.preventDefault(),u(pi)):t.key===`End`?(t.preventDefault(),u(mi)):t.key===`0`&&(t.preventDefault(),u(.5))},[u,e.splitRatio]),b=e=>{e.target===e.currentTarget&&c()},x=u=>{let d=u===e.originSide,f=u===`left`?t:n;return f?(0,X.jsx)(ni,{ticket:f,allLabels:i,allTickets:r,onClose:d?c:()=>l(null,u),onOpenTicket:s,onSave:a,onDelete:o,embedded:!0},`${u}-${f.id}`):(0,X.jsx)(fi,{tickets:r,excludeIds:[t?.id,n?.id].filter(e=>e!=null),onSelect:e=>l(e,u)})},S=(e.splitRatio*100).toFixed(2),C=((1-e.splitRatio)*100).toFixed(2);return(0,sr.createPortal)((0,X.jsxs)(`div`,{ref:f,"data-testid":`split-view-shell`,style:ae(),className:`fixed inset-0 z-[68] flex`,onClick:b,children:[(0,X.jsx)(`div`,{className:`absolute inset-0 bg-black/70 pointer-events-none`,"aria-hidden":!0}),(0,X.jsxs)(`div`,{className:`relative flex w-full h-full`,style:{transition:m?`opacity 280ms cubic-bezier(0.34, 1.56, 0.64, 1)`:void 0},children:[(0,X.jsx)(`div`,{"data-testid":`split-panel-left`,className:`relative h-full overflow-hidden`,style:{width:`${S}%`,transition:m?`width 280ms cubic-bezier(0.34, 1.56, 0.64, 1)`:void 0},children:(0,X.jsx)(`div`,{className:`h-full flex items-center justify-center p-2`,children:(0,X.jsx)(`div`,{className:`w-full h-full max-h-[95vh]`,children:x(`left`)})})}),(0,X.jsx)(`div`,{"data-testid":`split-divider`,role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":Math.round(e.splitRatio*100),"aria-valuemin":Math.round(pi*100),"aria-valuemax":Math.round(mi*100),tabIndex:0,onPointerDown:v,onKeyDown:y,className:`relative z-10 w-2 cursor-col-resize bg-border/40 hover:bg-accent-primary/40 transition-colors focus:outline-none focus:bg-accent-primary/60`}),(0,X.jsx)(`div`,{"data-testid":`split-panel-right`,className:`relative h-full overflow-hidden`,style:{width:`${C}%`,transition:m?`width 280ms cubic-bezier(0.34, 1.56, 0.64, 1)`:void 0},children:(0,X.jsx)(`div`,{className:`h-full flex items-center justify-center p-2`,children:(0,X.jsx)(`div`,{className:`w-full h-full max-h-[95vh]`,children:x(`right`)})})})]})]}),document.body)}var gi=.5,_i=.25,vi=.75,yi={leftId:null,rightId:null,originSide:null,splitRatio:gi};function bi(e){return Number.isFinite(e)?Math.min(vi,Math.max(_i,e)):gi}function xi(e,t){switch(t.type){case`openCentered`:return e.originSide!==null&&e.leftId!==t.id&&e.rightId!==t.id?{leftId:t.id,rightId:null,originSide:null,splitRatio:gi}:e.originSide!==null&&(e.leftId===t.id||e.rightId===t.id)?e:{...yi,leftId:t.id};case`closeAll`:return yi;case`enterSplit`:{let n=t.ticketId??e.leftId;return n===null||e.originSide!==null?e:t.side===`left`?{leftId:n,rightId:null,originSide:`left`,splitRatio:gi}:{leftId:null,rightId:n,originSide:`right`,splitRatio:gi}}case`setComparedTicket`:{if(e.originSide===null)return e;let n=e.originSide===`left`?`right`:`left`;return t.side===n?t.side===`left`?{...e,leftId:t.id}:{...e,rightId:t.id}:e}case`exitSplit`:{if(e.originSide===null)return e;let t=e.originSide===`left`?e.leftId:e.rightId;return{...yi,leftId:t}}case`setSplitRatio`:return{...e,splitRatio:bi(t.ratio)};default:return e}}var Si=(0,J.createContext)(null),Ci=900;function wi({children:e}){let[t,n]=(0,J.useReducer)(xi,yi),{tickets:r,updateTicket:i,deleteTicket:a}=st(),{activeProjectId:o,setActiveProjectId:s}=y(),c=(0,J.useRef)(null);(0,J.useEffect)(()=>{n({type:`closeAll`});let e=c.current;e&&(c.current=null,e.projectId===o&&n({type:`openCentered`,id:e.ticketId}))},[o]);let l=(0,J.useCallback)(e=>n({type:`openCentered`,id:e}),[]),u=(0,J.useCallback)((e,t)=>{if(e===o){n({type:`openCentered`,id:t});return}c.current={projectId:e,ticketId:t},s(e)},[o,s]),d=(0,J.useCallback)(()=>n({type:`closeAll`}),[]),f=(0,J.useCallback)((e,t)=>{typeof window<`u`&&window.innerWidth<Ci||n({type:`enterSplit`,side:e,ticketId:t})},[]),p=(0,J.useCallback)((e,t)=>n({type:`setComparedTicket`,id:e,side:t}),[]),m=(0,J.useCallback)(()=>n({type:`exitSplit`}),[]),h=(0,J.useCallback)(e=>n({type:`setSplitRatio`,ratio:e}),[]);(0,J.useEffect)(()=>{if(typeof window>`u`)return;function e(){window.innerWidth<Ci&&n({type:`exitSplit`})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let g=(0,J.useMemo)(()=>{let e=new Set;for(let t of r)for(let n of t.labels??[])e.add(n);return Array.from(e).sort()},[r]),_=t.leftId==null?null:r.find(e=>e.id===t.leftId)??null,v=t.rightId==null?null:r.find(e=>e.id===t.rightId)??null,b=(0,J.useMemo)(()=>({openTicketDetail:l,openTicketDetailInProject:u,closeTicketDetail:d,enterSplit:f,setComparedTicket:p,exitSplit:m,setSplitRatio:h,state:t}),[l,u,d,f,p,m,h,t]),x=t.originSide!==null;return(0,X.jsxs)(Si.Provider,{value:b,children:[e,!x&&_&&(0,X.jsx)(ni,{ticket:_,allLabels:g,allTickets:r,onClose:d,onOpenTicket:l,onSave:i,onDelete:a},_.id),x&&(0,X.jsx)(hi,{state:t,leftTicket:_,rightTicket:v,allTickets:r,allLabels:g,onSave:i,onDelete:a,onOpenTicket:l,onCloseAll:d,onSetCompared:p,onSetRatio:h,onExitSplit:m})]})}function Ti(){return(0,J.useContext)(Si)||{openTicketDetail:()=>{typeof console<`u`&&console.warn(`[TicketDetailModalContext] openTicketDetail called without provider`)},openTicketDetailInProject:()=>{typeof console<`u`&&console.warn(`[TicketDetailModalContext] openTicketDetailInProject called without provider`)},closeTicketDetail:()=>{},enterSplit:()=>{},setComparedTicket:()=>{},exitSplit:()=>{},setSplitRatio:()=>{},state:yi}}export{Ee as $,Xt as A,Ue as B,Cn as C,an as D,sn as E,st as F,ze as G,K as H,et as I,Fe as J,Re as K,tt as L,At as M,Rt as N,$t as O,Ot as P,Te as Q,Je as R,kn as S,cn as T,Ve as U,He as V,Be as W,Me as X,Ne as Y,xe as Z,Dn as _,Or as a,ke as at,jn as b,vr as c,ye as ct,ar as d,G as dt,Se as et,Zn as f,Mn as g,un as h,Jr as i,je as it,Pt as j,Qt as k,_r as l,ge as lt,Pn as m,Ti as n,De as nt,Sr as o,Ae as ot,Un as p,Ie as q,ni as r,we as rt,Cr as s,be as st,wi as t,Ce as tt,dr as u,_e as ut,Nn as v,An as w,On as x,ln as y,Ke as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`エージェント実行エンジン`,t=`アーキテクト、デベロッパー、レビュアーが別々のフェーズとして実行され、その間に決定的な検証が入ります。役割ごとにプロバイダーを選ぶだけで、他はそのまま動く既定値です。`,n=`実行設定を読み込み中…`,r=`実行設定を読み込めませんでした。変更する前に再試行してください。`,i=`再試行`,a=`この Core にはエージェント実行エンジンが含まれていません。有効にする前に Core を更新してください。無効な状態で設定を準備できます。`,o=`実行設定を保存`,s=`保存中…`,c=`実行設定を保存しました`,l=`実行設定を保存できませんでした。`,u=`ワークフロー完了前に承認を待つ`,d={title:`プロバイダー`,hint:`CLI は既存のログインを使用します。API には環境変数名のみを指定し、キー自体は入力しないでください。ローカルの場合は空欄にできます。削除前に役割を別のプロバイダーに割り当ててください。`,entry:`プロバイダー {{index}}`,id:`プロバイダー ID`,kind:`接続方式`,cli:`インストール済みの開発 CLI`,compatible:`OpenAI 互換エンドポイント`,command:`開発 CLI`,baseUrl:`API ベース URL`,apiKeyEnv:`API キーの環境変数(任意)`,remove:`プロバイダーを削除`,addCli:`CLI プロバイダーを追加`,addLocal:`ローカル / API プロバイダーを追加`,show:`プロバイダー接続を表示`,hide:`プロバイダー接続を隠す`,globalTitle:`プロバイダー接続`,globalHint:`接続はすべてのプロジェクトで利用できます。プロジェクト設定で各ロールにプロバイダーとモデルを割り当てます。変更は新しい実行に適用されます。`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`設計担当`,developer:`開発担当`,reviewer:`レビュー担当`,verify:`検証`,archive:`完了`},m={title:`役割の割り当て`,hint:`各ロールで異なるプロバイダーとモデルを使用できます。接続は一般設定 → Specrails Agentsで管理します。既定の上限はエージェントごとに{{turns}}ターンです。`,provider:`プロバイダー`,model:`モデル`,modelPlaceholder:`モデル ID または CLI の既定値`,maxTurns:`最大ターン数(既定 {{turns}})`,defaultModel:`既定({{model}})`},h={title:`ワークフローの制限`,hint:`空欄は Core の既定値を使います: デベロッパーの試行 {{attempts}} 回、ワークフローあたり {{minutes}} 分。トークンと USD の上限は任意で、USD 上限にはすべての AI 役割で Claude が必要です。`,maxAttempts:`デベロッパーの最大試行回数(既定 {{attempts}})`,timeoutMinutes:`タイムアウト(分、既定 {{minutes}})`,maxTokens:`最大トークン数`,maxCostUsd:`最大コスト(USD)`,unlimited:`制限なし`},g={title:`検証コマンド`,hint:`任意。デベロッパー完了後に実行され、失敗はデベロッパーに戻されます。空のままなら、毎回アーキテクトがプロジェクト自身のチェックを提案します。自動チェックのないリポジトリもレビューされます。`,detect:`プロジェクトのチェックを検出`,detecting:`検出中…`,detected:`このプロジェクトが定義済みのチェックで埋めました。`,nothingDetected:`テスト・型チェック・ビルドのコマンドは見つかりませんでした。問題ありません。可能な場合はアーキテクトが実行時にチェックを提案します。`,detectFailed:`プロジェクトのリポジトリを調べられませんでした。`,repository:`リポジトリ`,command:`コマンド`,reason:`{{reason}} から検出`,remove:`削除`,add:`コマンドを追加`,invalidLine:`検証コマンドが空か、引用符が閉じていません: {{line}}`,label:`チェック名(任意)`,moveUp:`上へ`,moveDown:`下へ`},_={title:`保存された実行`,refresh:`更新`,hint:`元のワークツリーで保存された範囲と設定を使って続行し、進行状況はそのジョブのログに表示されます。公開や Desktop の配信再開は行いません。実行中のレールはジョブの操作から停止してください。`,empty:`保存された実行はありません。`,loadFailed:`保存された実行を読み込めませんでした。`,actionFailed:`この実行を更新できませんでした。`,phase:`次のフェーズ: {{phase}}`,approve:`完了を承認`,recover:`中断したフェーズを復旧`,resume:`再開`,cancel:`続行をキャンセル`,status:{running:`続行中…`,succeeded:`成功`,failed:`失敗`,blocked:`ブロック中`,paused:`一時停止`,cancelled:`キャンセル済み`,interrupted:`中断`,unavailable:`利用不可`},question:`アーキテクトからの質問:`,answerLabel:`あなたの回答`,answerPlaceholder:`質問に回答すると、アーキテクトはそれをもとに続行します。`,answer:`回答して再開`,viewLog:`ジョブログを表示`,implementation:`実装`,preserveProgress:`表示されたフェーズから、既存の作業と保存済み設定を保持して続行します。`,reviewDelivery:`実装が完了しました。引き渡しの前にジョブログで結果を確認してください。この続行では公開していません。`,prepareDelivery:`引き渡しを準備`},v={architect:`コードを読み、提案・設計・タスク・仕様を書きます。読み取り専用。`,developer:`タスクをテスト付きで実装します。CLI のサンドボックス内でファイル編集とコマンド実行ができます。`,reviewer:`仕様と検証結果に照らして成果を確認します。読み取り専用。`},y={title:`レビュー基準`,hint:`空欄は Core の基準を使います。値は基準を厳しくする方向にのみ設定できます: 総合スコア {{score}} 以上、セキュリティ {{security}} 以上、その他の観点 {{aspect}} 以上。`,minScore:`最低総合スコア(既定 {{score}})`,aspects:{type_correctness:`型の正確さ(既定 {{score}})`,pattern_adherence:`パターン準拠(既定 {{score}})`,test_coverage:`テストカバレッジ(既定 {{score}})`,security:`セキュリティ(既定 {{score}})`,architectural_alignment:`アーキテクチャ整合性(既定 {{score}})`}},b={title:`アーキテクトの確信度`,hint:`自律的な調査を1回行っても確信度が低い設計は、アーキテクトの質問で一時停止するか、明示した前提のもとで続行します。`,onLowConfidence:`確信度が低いとき`,ask:`質問する(質問で一時停止)`,proceed:`明示した前提で続行`},x={title:`使用量と時間`,hint:`修正と失敗した呼び出しを含みます。エージェント時間にはツールの実行時間を含みます。キャッシュトークンは入力トークンの一部です。`,unknown:`取得不可`,duration:`実行時間`,agentTime:`エージェント時間`,cost:`報告された費用`,providerCalls:`エージェント呼び出し`,toolCalls:`ツール呼び出し`,input:`入力トークン`,output:`出力トークン`,uncached:`キャッシュなしの入力`,cacheRead:`キャッシュ読み取り`,cacheWrite:`キャッシュ書き込み`,partial:`一部の試行には詳細な計測値がありません。`,phases:`フェーズ別使用量`,phase:`フェーズ`,attempts:`試行回数`},S={title:`エージェントのロール別プロンプト`,description:`各ロールの指示を表示・編集します。すべてのプロジェクトとプロバイダーで共有され、変更は新しいジョブに適用されます。再開したジョブは元のプロンプトを使用します。`,definition:`{{role}}の定義`,default:`初期設定`,custom:`カスタマイズ済み`,restore:`初期設定に戻す`,contracts:`Spec のコンテキスト、OpenSpec ワークフロー、必須の応答形式は自動的に追加されるため、ここでは編集できません。`,invalid:`各定義は 1~20,000 文字で、空白以外のテキストを含み、ヌルバイトを含まない必要があります。`,saved:`ロール別プロンプトを保存しました`,unsaved:`未保存の変更`,discard:`変更を破棄`,save:`プロンプトを保存`},C={title:`実装の効率`,scope:`新しい実行に適用されます。保存済みの実行は元の設定とランタイムを維持します。`,effort:`推論の強度`,providerDefault:`プロバイダーの既定値`,unconfirmed:`未確認`,unknownSupport:`このモデルと通信方式の対応状況は未確認です。`,escalation:`同じプロバイダーの上位モデルを1段階許可`,baseRequired:`まず基本モデルを明示的に選択してください。`,escalationModel:`上位モデル`,triggers:{architect:`既存の追加調査のみがこの段階を選択できます。`,developer:`候補が2回失敗した後、次の許可された試行で選択できます。`,reviewer:`不正な形式の応答の修復のみ。コードの却下では昇格しません。`},contextMode:`リポジトリのコンテキスト`,reviewMode:`修正のレビュー`,planning:`計画の深さ`,adaptive:`適応型`,full:`完全`,developerChecks:`開発者が提案する追加チェックを許可`,concurrency:`同時チェック数の上限`,concurrencyHint:`既定値は1。ホストが独立と宣言した異なるリポジトリのチェックのみ並行実行できます。既定では再利用しません。`,checkCapabilities:`モデルの互換性を確認`,capabilitiesFailed:`互換性を確認できません。対応するCoreを更新するか、既定値を維持してください。`},w={title:`検証の証拠`,acceptance:`技術的な受け入れ`,acceptanceStatus:{pending:`保留中`,validated:`検証済み`,"with-exceptions":`例外あり`,blocked:`ブロック済み`},calls:`エージェント呼び出し`,executed:`実行したチェック`,reused:`再利用したチェック`,unknown:`利用不可`,unavailable:`証拠は利用できません。記録された結果は現在の有効性を保証しません。`,current:`現在の候補と計画`,historical:`過去の結果`,moreChecks:`その他のチェック`,output:`検証出力`,empty:`出力なし`,truncated:`制限されたページまたは切り詰められた記録です。`,nextPage:`次の出力ページ`,status:{passed:`成功`,failed:`失敗`,cancelled:`キャンセル`,interrupted:`中断`},disposition:{executed:`実行済み`,reused:`再利用`,"not-run":`未実行`},origin:`出所`,origins:{host:`ホスト`,architect:`アーキテクト`,developer:`開発者`,"frozen-runtime-config":`保存済み設定`,"project-role":`プロジェクトの役割`,default:`既定`,"explicit-launch-override":`この実行で選択したプロバイダー`},reuseDisabled:`このチェックの再利用は無効です。`,reuseConfirmed:`入力とツールの一致を確認して再利用しました。`,inputsChanged:`検証中に入力が変化したため、結果は無効です。`,reuseUnproven:`入力の一致を証明できる有効な結果がないため、再実行しました。`,original:`元の実行`,requested:`要求値`,reported:`報告値`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Moteur d’agents`,t=`Architecte, développeur et relecteur s’exécutent en phases séparées avec une vérification déterministe entre elles. Choisissez un fournisseur par rôle ; tout le reste a une valeur par défaut qui fonctionne.`,n=`Chargement des paramètres…`,r=`Impossible de charger les paramètres. Réessayez avant de les modifier.`,i=`Réessayer`,a=`Cette installation de Core ne contient pas le moteur d’agents. Mettez Core à jour avant de l’activer ; vous pouvez préparer les paramètres en attendant.`,o=`Enregistrer les paramètres`,s=`Enregistrement…`,c=`Paramètres enregistrés`,l=`Impossible d’enregistrer les paramètres.`,u=`Demander une approbation avant de terminer le workflow`,d={title:`Fournisseurs`,hint:`Les CLI utilisent leur connexion existante. Pour les API, indiquez uniquement un nom de variable d’environnement, jamais une clé. Il peut rester vide en local. Réaffectez les rôles avant de supprimer leur fournisseur.`,entry:`Fournisseur {{index}}`,id:`ID du fournisseur`,kind:`Type de connexion`,cli:`CLI de programmation installé`,compatible:`API compatible OpenAI`,command:`CLI de programmation`,baseUrl:`URL de base de l’API`,apiKeyEnv:`Variable d’environnement de la clé (facultative)`,remove:`Supprimer le fournisseur`,addCli:`Ajouter un fournisseur CLI`,addLocal:`Ajouter un fournisseur local / API`,show:`Afficher les connexions aux fournisseurs`,hide:`Masquer les connexions aux fournisseurs`,globalTitle:`Connexions des fournisseurs`,globalHint:`Ces connexions sont disponibles pour tous les projets. Attribuez les fournisseurs et modèles aux rôles dans les paramètres du projet. Les changements s’appliquent aux nouvelles exécutions.`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`Architecte`,developer:`Développeur`,reviewer:`Réviseur`,verify:`Vérification`,archive:`Finalisation`},m={title:`Attribution des rôles`,hint:`Chaque rôle peut utiliser un fournisseur et un modèle différents. Connexions : Paramètres généraux → Specrails Agents. Limite par défaut : {{turns}} tours par agent.`,provider:`Fournisseur`,model:`Modèle`,modelPlaceholder:`ID du modèle ou modèle par défaut du CLI`,maxTurns:`Nombre maximal de tours (par défaut {{turns}})`,defaultModel:`Par défaut ({{model}})`},h={title:`Limites du workflow`,hint:`Les champs vides utilisent les valeurs de Core : {{attempts}} tentatives du développeur et {{minutes}} minutes par workflow. Les plafonds de jetons et USD sont facultatifs ; un plafond USD exige Claude pour chaque rôle IA.`,maxAttempts:`Tentatives maximales du développeur (par défaut {{attempts}})`,timeoutMinutes:`Délai en minutes (par défaut {{minutes}})`,maxTokens:`Jetons maximum`,maxCostUsd:`Coût maximum (USD)`,unlimited:`Sans limite`},g={title:`Commandes de vérification`,hint:`Facultatif. Elles s’exécutent quand le développeur a terminé et leurs échecs lui reviennent. Liste vide : l’architecte propose les vérifications propres au projet à chaque exécution ; les dépôts sans vérification automatique sont quand même relus.`,detect:`Détecter les vérifications du projet`,detecting:`Détection…`,detected:`Rempli avec les vérifications que ce projet définit déjà.`,nothingDetected:`Aucune commande de test, de vérification de types ou de build trouvée. Ce n’est pas grave : l’architecte propose des vérifications à chaque exécution quand c’est possible.`,detectFailed:`Impossible d’inspecter les dépôts du projet.`,repository:`Dépôt`,command:`Commande`,reason:`Détecté depuis {{reason}}`,remove:`Retirer`,add:`Ajouter une commande`,invalidLine:`Commande de vérification vide ou guillemet non fermé : {{line}}`,label:`Libellé du contrôle (facultatif)`,moveUp:`Monter`,moveDown:`Descendre`},_={title:`Exécutions enregistrées`,refresh:`Actualiser`,hint:`Continue dans le worktree d’origine avec le périmètre et les paramètres enregistrés ; la progression apparaît dans le journal de ce job. Ne publie pas et ne relance pas la livraison Desktop. Les exécutions actives s’arrêtent depuis les contrôles du job.`,empty:`Aucune exécution enregistrée.`,loadFailed:`Impossible de charger les exécutions.`,actionFailed:`Impossible de mettre à jour cette exécution.`,phase:`Phase suivante : {{phase}}`,approve:`Approuver la fin`,recover:`Récupérer la phase interrompue`,resume:`Reprendre`,cancel:`Annuler la reprise`,status:{running:`Reprise en cours…`,succeeded:`Réussi`,failed:`Échec`,blocked:`Bloqué`,paused:`En pause`,cancelled:`Annulé`,interrupted:`Interrompu`,unavailable:`Indisponible`},question:`L'architecte demande :`,answerLabel:`Votre réponse`,answerPlaceholder:`Répondez à la question ; l'architecte poursuit avec elle.`,answer:`Répondre et reprendre`,viewLog:`Voir le journal du job`,implementation:`Implémentation`,preserveProgress:`Reprendre à la phase indiquée en conservant le travail et les paramètres enregistrés.`,reviewDelivery:`Implémentation terminée. Vérifiez le résultat dans le journal avant la livraison ; cette reprise ne l’a pas publié.`,prepareDelivery:`Préparer la livraison`},v={architect:`Lit le code et rédige la proposition, la conception, les tâches et la spec. Lecture seule.`,developer:`Implémente les tâches avec des tests. Peut modifier des fichiers et exécuter des commandes dans le bac à sable du CLI.`,reviewer:`Vérifie le résultat par rapport à la spec et aux preuves de vérification. Lecture seule.`},y={title:`Seuil de revue`,hint:`Les champs vides utilisent le seuil de Core. Les valeurs ne peuvent que le relever : score global d'au moins {{score}}, sécurité d'au moins {{security}}, autres aspects d'au moins {{aspect}}.`,minScore:`Score global minimal (par défaut {{score}})`,aspects:{type_correctness:`Exactitude des types (par défaut {{score}})`,pattern_adherence:`Respect des patrons (par défaut {{score}})`,test_coverage:`Couverture de tests (par défaut {{score}})`,security:`Sécurité (par défaut {{score}})`,architectural_alignment:`Alignement architectural (par défaut {{score}})`}},b={title:`Confiance de l'architecte`,hint:`Après une passe d'investigation autonome, une conception encore peu sûre se met en pause avec la question de l'architecte ou continue sur des hypothèses explicites.`,onLowConfidence:`En cas de faible confiance`,ask:`Demander (pause avec la question)`,proceed:`Continuer sur des hypothèses explicites`},x={title:`Consommation et durée`,hint:`Inclut les corrections et les appels échoués. La durée des agents inclut les outils. Les tokens en cache font partie des tokens en entrée.`,unknown:`Indisponible`,duration:`Durée d’exécution`,agentTime:`Durée des agents`,cost:`Coût déclaré`,providerCalls:`Appels aux agents`,toolCalls:`Appels aux outils`,input:`Tokens en entrée`,output:`Tokens en sortie`,uncached:`Entrée sans cache`,cacheRead:`Lectures du cache`,cacheWrite:`Écritures du cache`,partial:`Certains essais ne disposent pas de mesures détaillées.`,phases:`Consommation par phase`,phase:`Phase`,attempts:`Essais`},S={title:`Prompts des rôles des agents`,description:`Consultez et modifiez les instructions de chaque rôle. Elles sont partagées par tous les projets et fournisseurs ; les modifications s’appliquent aux nouveaux travaux. Les travaux repris conservent leurs prompts d’origine.`,definition:`Définition de {{role}}`,default:`Valeur par défaut`,custom:`Personnalisé`,restore:`Rétablir la valeur par défaut`,contracts:`Le contexte de la spec, le workflow OpenSpec et le format de réponse requis sont ajoutés automatiquement et ne sont pas modifiables ici.`,invalid:`Chaque définition doit contenir entre 1 et 20 000 caractères, du texte non vide et aucun octet nul.`,saved:`Prompts des rôles enregistrés`,unsaved:`Modifications non enregistrées`,discard:`Annuler les modifications`,save:`Enregistrer les prompts`},C={title:`Efficacité de l’implémentation`,scope:`S’applique aux nouvelles exécutions. Les exécutions enregistrées conservent leur configuration et leur moteur.`,effort:`Effort de raisonnement`,providerDefault:`Valeur du fournisseur`,unconfirmed:`Non confirmé`,unknownSupport:`La prise en charge de ce modèle et de ce transport reste à confirmer.`,escalation:`Autoriser un niveau supérieur avec le même fournisseur`,baseRequired:`Sélectionnez d’abord un modèle de base explicite.`,escalationModel:`Modèle supérieur`,triggers:{architect:`Seule l’investigation approfondie existante peut sélectionner ce niveau.`,developer:`Après deux candidats en échec, la prochaine tentative autorisée peut sélectionner ce niveau.`,reviewer:`Uniquement pour réparer une réponse mal formée, jamais pour un refus du code.`},contextMode:`Contexte du dépôt`,reviewMode:`Revue des corrections`,planning:`Profondeur de planification`,adaptive:`Adaptatif`,full:`Complet`,developerChecks:`Accepter les contrôles supplémentaires proposés par le développeur`,concurrency:`Contrôles simultanés maximum`,concurrencyHint:`Par défaut : 1. Seuls les contrôles indépendants déclarés par l’hôte dans différents dépôts peuvent s’exécuter ensemble. Aucune réutilisation par défaut.`,checkCapabilities:`Vérifier la compatibilité des modèles`,capabilitiesFailed:`Compatibilité non confirmée. Mettez à jour Core ou conservez les valeurs du fournisseur.`},w={title:`Preuves de vérification`,acceptance:`Acceptation technique`,acceptanceStatus:{pending:`En attente`,validated:`Validé`,"with-exceptions":`Avec exceptions`,blocked:`Bloqué`},calls:`Appels aux agents`,executed:`Contrôles exécutés`,reused:`Contrôles réutilisés`,unknown:`Indisponible`,unavailable:`Preuves indisponibles. Le résultat enregistré ne prouve pas la validité actuelle.`,current:`Candidat et plan actuels`,historical:`Résultat historique`,moreChecks:`Plus de contrôles`,output:`Sortie de vérification`,empty:`Aucune sortie`,truncated:`Page limitée ou capture tronquée.`,nextPage:`Page de sortie suivante`,status:{passed:`Réussi`,failed:`Échec`,cancelled:`Annulé`,interrupted:`Interrompu`},disposition:{executed:`Exécuté`,reused:`Réutilisé`,"not-run":`Non exécuté`},origin:`Origine`,origins:{host:`Hôte`,architect:`Architecte`,developer:`Développeur`,"frozen-runtime-config":`Configuration enregistrée`,"project-role":`Rôle du projet`,default:`Par défaut`,"explicit-launch-override":`Fournisseur choisi pour le lancement`},reuseDisabled:`Réutilisation désactivée pour ce contrôle.`,reuseConfirmed:`Réutilisé après confirmation des entrées et outils identiques.`,inputsChanged:`Entrées modifiées pendant la vérification ; résultat invalidé.`,reuseUnproven:`Aucun résultat actuel avec des entrées identiques prouvées ; contrôle relancé.`,original:`Exécution originale`,requested:`Demandé`,reported:`Rapporté`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-CNC7AqOf.js";var t=e({agents:()=>g,approvalBeforeArchive:()=>f,architect:()=>S,cliNames:()=>m,default:()=>D,description:()=>r,efficiency:()=>T,evidence:()=>E,limits:()=>_,loadFailed:()=>a,loading:()=>i,metrics:()=>C,prompts:()=>w,providers:()=>p,retry:()=>o,review:()=>x,roleHints:()=>b,roles:()=>h,runs:()=>y,save:()=>c,saveFailed:()=>d,saved:()=>u,saving:()=>l,title:()=>n,unavailable:()=>s,verification:()=>v}),n=`Agent runtime`,r=`Architect, developer and reviewer run as separate phases with deterministic verification in between. Pick a provider per role; everything else has a working default.`,i=`Loading runtime settings…`,a=`Could not load runtime settings. Retry before making changes.`,o=`Retry`,s=`This Core installation does not include the agent runtime. Update Core before enabling it; you can prepare settings while disabled.`,c=`Save runtime settings`,l=`Saving…`,u=`Runtime settings saved`,d=`Could not save runtime settings.`,f=`Pause for approval before completing the workflow`,p={title:`Providers`,hint:`CLI providers use their existing login. API providers accept an environment variable name only, never an API key. Local endpoints can leave it blank. Assign another provider to a role before removing its current provider.`,entry:`Provider {{index}}`,id:`Provider ID`,kind:`Connection type`,cli:`Installed coding CLI`,compatible:`OpenAI-compatible endpoint`,command:`Coding CLI`,baseUrl:`API base URL`,apiKeyEnv:`API key environment variable (optional)`,remove:`Remove provider`,addCli:`Add CLI provider`,addLocal:`Add local / API provider`,show:`Show provider connections`,hide:`Hide provider connections`,globalTitle:`Provider connections`,globalHint:`These connections are available to every project. Assign providers and models to roles in project settings. Changes apply to new executions.`},m={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},h={architect:`Architect`,developer:`Developer`,reviewer:`Reviewer`,verify:`Verification`,archive:`Completion`},g={title:`Role assignments`,hint:`Each role can use a different provider and model. Manage connections in General settings → Specrails Agents. Default limit: {{turns}} turns per agent.`,provider:`Provider`,model:`Model`,modelPlaceholder:`Model ID or CLI default`,maxTurns:`Maximum turns (default {{turns}})`,defaultModel:`Default ({{model}})`},_={title:`Workflow limits`,hint:`Empty fields use Core defaults: {{attempts}} developer attempts and {{minutes}} minutes per workflow. Token and USD caps are optional; USD caps require Claude for every AI role.`,maxAttempts:`Maximum developer attempts (default {{attempts}})`,timeoutMinutes:`Timeout in minutes (default {{minutes}})`,maxTokens:`Maximum tokens`,maxCostUsd:`Maximum cost (USD)`,unlimited:`No limit`},v={title:`Verification commands`,hint:`Optional. These run after the developer finishes and their failures go back to the developer. Leave the list empty and the architect proposes the project's own checks on each run; repositories without any automated check are still reviewed.`,detect:`Detect project checks`,detecting:`Detecting…`,detected:`Filled in from the checks this project already defines.`,nothingDetected:`No test, type-check or build command was found. That is fine: the architect proposes checks at run time when possible.`,detectFailed:`Could not inspect the project repositories.`,repository:`Repository`,command:`Command`,reason:`Detected from {{reason}}`,remove:`Remove`,add:`Add command`,invalidLine:`Verification command is empty or has an unterminated quote: {{line}}`,label:`Check label (optional)`,moveUp:`Move up`,moveDown:`Move down`},y={title:`Saved executions`,refresh:`Refresh`,hint:`Continue in the original worktree with the frozen scope and settings; progress appears in that job's log. This does not publish or restart Desktop delivery. Active rail executions are stopped from their job controls.`,empty:`No saved runtime executions.`,loadFailed:`Could not load saved executions.`,actionFailed:`Could not update this execution.`,phase:`Next phase: {{phase}}`,approve:`Approve completion`,recover:`Recover interrupted phase`,resume:`Resume`,cancel:`Cancel continuation`,status:{running:`Continuing…`,succeeded:`Succeeded`,failed:`Failed`,blocked:`Blocked`,paused:`Paused`,cancelled:`Cancelled`,interrupted:`Interrupted`,unavailable:`Unavailable`},question:`The architect asks:`,answerLabel:`Your answer`,answerPlaceholder:`Answer the question; the architect continues with it.`,answer:`Answer and resume`,viewLog:`View job log`,implementation:`Implementation`,preserveProgress:`Continue from the indicated phase, preserving your existing work and saved settings.`,reviewDelivery:`Implementation completed. Review the result in this job log before arranging delivery; this continuation has not published it.`,prepareDelivery:`Prepare delivery`},b={architect:`Reads the code and writes the proposal, design, tasks and spec. Read-only.`,developer:`Implements the tasks with tests. Can edit files and run commands inside the CLI sandbox.`,reviewer:`Checks the result against the spec and the verification evidence. Read-only.`},x={title:`Review gate`,hint:`Empty fields use Core's gate. Values can only raise it: overall score at least {{score}}, security at least {{security}}, other aspects at least {{aspect}}.`,minScore:`Minimum overall score (default {{score}})`,aspects:{type_correctness:`Type correctness (default {{score}})`,pattern_adherence:`Pattern adherence (default {{score}})`,test_coverage:`Test coverage (default {{score}})`,security:`Security (default {{score}})`,architectural_alignment:`Architectural alignment (default {{score}})`}},S={title:`Architect confidence`,hint:`After one autonomous investigation pass, a design that is still low in confidence either pauses with the architect's question or proceeds on stated assumptions.`,onLowConfidence:`On low confidence`,ask:`Ask (pause with the question)`,proceed:`Proceed on stated assumptions`},C={title:`Usage and time`,hint:`Includes corrections and failed calls. Agent time includes tool work. Cached tokens are part of input tokens.`,unknown:`Unavailable`,duration:`Execution time`,agentTime:`Agent time`,cost:`Reported cost`,providerCalls:`Agent calls`,toolCalls:`Tool calls`,input:`Input tokens`,output:`Output tokens`,uncached:`Uncached input`,cacheRead:`Cache reads`,cacheWrite:`Cache writes`,partial:`Some attempts have no detailed measurements.`,phases:`Usage by phase`,phase:`Phase`,attempts:`Attempts`},w={title:`Agent role prompts`,description:`View and edit the instructions for each role. Shared by all projects and providers; changes apply to new jobs. Resumed jobs keep their original prompts.`,definition:`{{role}} definition`,default:`Factory default`,custom:`Customized`,restore:`Restore default`,contracts:`Spec context, OpenSpec workflow and required response format are added automatically and are not edited here.`,invalid:`Each definition must contain 1–20,000 characters, with nonblank text and no null bytes.`,saved:`Role prompts saved`,unsaved:`Unsaved changes`,discard:`Discard changes`,save:`Save prompts`},T={title:`Implementation efficiency`,scope:`Applies to new runs. Saved runs retain their original configuration and runtime.`,effort:`Reasoning effort`,providerDefault:`Provider default`,unconfirmed:`Unconfirmed`,unknownSupport:`Support is not confirmed for this model and transport. Provider default remains available.`,escalation:`Allow one higher tier with the same provider`,baseRequired:`Select an explicit base model first.`,escalationModel:`Higher-tier model`,triggers:{architect:`Only the existing deeper investigation pass can select this tier.`,developer:`After two failed candidates, the next permitted attempt can select this tier.`,reviewer:`Only a malformed-response repair can select this tier; rejecting code does not trigger it.`},contextMode:`Repository context`,reviewMode:`Correction review`,planning:`Planning depth`,adaptive:`Adaptive`,full:`Full`,developerChecks:`Accept additional checks proposed by the developer`,concurrency:`Maximum concurrent checks`,concurrencyHint:`Default 1. Only host-declared independent checks across different repositories may run together. Checks are never reused by default.`,checkCapabilities:`Check model compatibility`,capabilitiesFailed:`Could not confirm model capabilities. Update the paired Core runtime or keep provider defaults.`},E={title:`Verification evidence`,acceptance:`Technical acceptance`,acceptanceStatus:{pending:`Pending`,validated:`Validated`,"with-exceptions":`With exceptions`,blocked:`Blocked`},calls:`Agent calls`,executed:`Executed checks`,reused:`Reused checks`,unknown:`Unavailable`,unavailable:`Evidence is unavailable for this execution. Its recorded outcome is not proof of current validity.`,current:`Current candidate and plan`,historical:`Historical result`,moreChecks:`More checks`,output:`Verification output`,empty:`No output`,truncated:`This is a bounded page or a truncated capture.`,nextPage:`Next output page`,status:{passed:`Passed`,failed:`Failed`,cancelled:`Cancelled`,interrupted:`Interrupted`},disposition:{executed:`Executed`,reused:`Reused`,"not-run":`Not run`},origin:`Origin`,origins:{host:`Host`,architect:`Architect`,developer:`Developer`,"frozen-runtime-config":`Frozen configuration`,"project-role":`Project role`,default:`Default`,"explicit-launch-override":`Selected launch provider`},reuseDisabled:`Reuse disabled for this check.`,reuseConfirmed:`Reused after verifying matching inputs and toolchain.`,inputsChanged:`Inputs changed during verification; result invalidated.`,reuseUnproven:`No current result with proven matching inputs; the check ran again.`,original:`Original execution`,requested:`Requested`,reported:`Reported`},D={title:n,description:r,loading:i,loadFailed:a,retry:o,unavailable:s,save:c,saving:l,saved:u,saveFailed:d,approvalBeforeArchive:f,providers:p,cliNames:m,roles:h,agents:g,limits:_,verification:v,runs:y,roleHints:b,review:x,architect:S,metrics:C,prompts:w,efficiency:T,evidence:E};export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`代理运行引擎`,t=`架构师、开发者和审阅者作为独立阶段运行,中间进行确定性验证。为每个角色选择提供商即可,其余都有可用的默认值。`,n=`正在加载运行设置…`,r=`无法加载运行设置。请先重试再修改。`,i=`重试`,a=`当前 Core 安装不包含代理运行引擎。启用前请更新 Core;停用时仍可提前配置。`,o=`保存运行设置`,s=`正在保存…`,c=`运行设置已保存`,l=`无法保存运行设置。`,u=`完成工作流前暂停并等待批准`,d={title:`提供商`,hint:`CLI 提供商使用现有登录。API 仅接受环境变量名称,请勿输入密钥。本地端点可留空。删除提供商前,请先重新分配使用它的角色。`,entry:`提供商 {{index}}`,id:`提供商 ID`,kind:`连接类型`,cli:`已安装的编程 CLI`,compatible:`兼容 OpenAI 的端点`,command:`编程 CLI`,baseUrl:`API 基础 URL`,apiKeyEnv:`API 密钥环境变量(可选)`,remove:`移除提供商`,addCli:`添加 CLI 提供商`,addLocal:`添加本地 / API 提供商`,show:`显示提供商连接`,hide:`隐藏提供商连接`,globalTitle:`提供商连接`,globalHint:`这些连接可供所有项目使用。在项目设置中为角色分配提供商和模型。更改适用于新的执行。`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`架构师`,developer:`开发者`,reviewer:`审查者`,verify:`验证`,archive:`完成`},m={title:`角色分配`,hint:`每个角色可以使用不同的提供商和模型。在常规设置 → Specrails Agents中管理连接。默认每个代理最多{{turns}}轮。`,provider:`提供商`,model:`模型`,modelPlaceholder:`模型 ID 或 CLI 默认值`,maxTurns:`最大轮数(默认 {{turns}})`,defaultModel:`默认({{model}})`},h={title:`工作流限制`,hint:`空字段使用 Core 默认值:开发者尝试 {{attempts}} 次,每个工作流 {{minutes}} 分钟。令牌和 USD 上限可选;USD 上限要求所有 AI 角色使用 Claude。`,maxAttempts:`开发者最大尝试次数(默认 {{attempts}})`,timeoutMinutes:`超时(分钟,默认 {{minutes}})`,maxTokens:`最大令牌数`,maxCostUsd:`最大成本(USD)`,unlimited:`无限制`},g={title:`验证命令`,hint:`可选。在开发者完成后运行,失败会返回给开发者。留空时,架构师会在每次运行时提出项目自身的检查;没有自动检查的仓库仍会被审阅。`,detect:`检测项目检查`,detecting:`检测中…`,detected:`已根据此项目已定义的检查填写。`,nothingDetected:`未找到测试、类型检查或构建命令。没关系:架构师会在可能时于运行时提出检查。`,detectFailed:`无法检查项目仓库。`,repository:`仓库`,command:`命令`,reason:`检测自 {{reason}}`,remove:`移除`,add:`添加命令`,invalidLine:`验证命令为空或引号未闭合:{{line}}`,label:`检查名称(可选)`,moveUp:`上移`,moveDown:`下移`},_={title:`已保存的执行`,refresh:`刷新`,hint:`在原始工作树中使用冻结的范围和设置继续执行,进度显示在该任务的日志中。此操作不会发布或重启 Desktop 交付。请从任务控件停止活动中的执行。`,empty:`没有已保存的执行。`,loadFailed:`无法加载已保存的执行。`,actionFailed:`无法更新此执行。`,phase:`下一阶段:{{phase}}`,approve:`批准完成`,recover:`恢复中断阶段`,resume:`继续`,cancel:`取消继续执行`,status:{running:`继续中…`,succeeded:`成功`,failed:`失败`,blocked:`已阻止`,paused:`已暂停`,cancelled:`已取消`,interrupted:`已中断`,unavailable:`不可用`},question:`架构师提问:`,answerLabel:`你的回答`,answerPlaceholder:`回答该问题后,架构师将据此继续。`,answer:`回答并继续`,viewLog:`查看任务日志`,implementation:`实现`,preserveProgress:`从所示阶段继续,保留已有工作和保存的设置。`,reviewDelivery:`实现已完成。交付前请在任务日志中检查结果;本次继续执行未发布结果。`,prepareDelivery:`准备交付`},v={architect:`阅读代码并撰写提案、设计、任务和规范。只读。`,developer:`带测试地实现任务。可在 CLI 沙箱内编辑文件并运行命令。`,reviewer:`对照规范和验证证据检查结果。只读。`},y={title:`评审门槛`,hint:`留空则使用 Core 的门槛。数值只能提高门槛:总体分数至少 {{score}},安全性至少 {{security}},其他方面至少 {{aspect}}。`,minScore:`最低总体分数(默认 {{score}})`,aspects:{type_correctness:`类型正确性(默认 {{score}})`,pattern_adherence:`模式遵循(默认 {{score}})`,test_coverage:`测试覆盖率(默认 {{score}})`,security:`安全性(默认 {{score}})`,architectural_alignment:`架构一致性(默认 {{score}})`}},b={title:`架构师置信度`,hint:`经过一轮自主调查后,若设计的置信度仍然较低,则带着架构师的问题暂停,或基于已声明的假设继续。`,onLowConfidence:`置信度低时`,ask:`询问(带问题暂停)`,proceed:`基于已声明的假设继续`},x={title:`用量与时间`,hint:`包含修正和失败的调用。代理时间包含工具执行时间。缓存令牌属于输入令牌的一部分。`,unknown:`不可用`,duration:`执行时间`,agentTime:`代理时间`,cost:`已报告费用`,providerCalls:`代理调用`,toolCalls:`工具调用`,input:`输入令牌`,output:`输出令牌`,uncached:`未缓存输入`,cacheRead:`缓存读取`,cacheWrite:`缓存写入`,partial:`部分尝试没有详细测量数据。`,phases:`各阶段用量`,phase:`阶段`,attempts:`尝试次数`},S={title:`代理角色提示词`,description:`查看和编辑各角色的指令。所有项目和提供商共用这些指令;更改适用于新任务。恢复的任务保留原始提示词。`,definition:`{{role}}定义`,default:`出厂默认值`,custom:`已自定义`,restore:`恢复默认值`,contracts:`Spec 上下文、OpenSpec 工作流程和所需的响应格式会自动添加,无法在此编辑。`,invalid:`每个定义必须包含 1–20,000 个字符,不能仅包含空白字符,也不能包含空字节。`,saved:`角色提示词已保存`,unsaved:`未保存的更改`,discard:`放弃更改`,save:`保存提示词`},C={title:`实现效率`,scope:`适用于新运行。已保存的运行保留原始配置和运行时。`,effort:`推理强度`,providerDefault:`提供商默认值`,unconfirmed:`未确认`,unknownSupport:`尚未确认此模型和传输方式的支持情况。`,escalation:`允许使用同一提供商的一个更高等级`,baseRequired:`请先明确选择基础模型。`,escalationModel:`更高等级模型`,triggers:{architect:`仅现有的深入调查步骤可选择此等级。`,developer:`两个候选实现失败后,下一次允许的尝试可选择此等级。`,reviewer:`仅用于修复格式错误的响应;拒绝代码不会触发升级。`},contextMode:`仓库上下文`,reviewMode:`修正审查`,planning:`规划深度`,adaptive:`自适应`,full:`完整`,developerChecks:`接受开发者提出的额外检查`,concurrency:`最大并发检查数`,concurrencyHint:`默认值为 1。只有主机声明为独立且属于不同仓库的检查才能并发运行。默认不复用检查。`,checkCapabilities:`检查模型兼容性`,capabilitiesFailed:`无法确认兼容性。请更新配套 Core 或保留提供商默认值。`},w={title:`验证证据`,acceptance:`技术验收`,acceptanceStatus:{pending:`待处理`,validated:`已验证`,"with-exceptions":`存在例外`,blocked:`已阻止`},calls:`代理调用`,executed:`已执行检查`,reused:`已复用检查`,unknown:`不可用`,unavailable:`证据不可用。已记录的结果不代表当前仍然有效。`,current:`当前候选实现和计划`,historical:`历史结果`,moreChecks:`更多检查`,output:`验证输出`,empty:`无输出`,truncated:`此页面有长度限制或记录已截断。`,nextPage:`下一页输出`,status:{passed:`通过`,failed:`失败`,cancelled:`已取消`,interrupted:`已中断`},disposition:{executed:`已执行`,reused:`已复用`,"not-run":`未执行`},origin:`来源`,origins:{host:`主机`,architect:`架构师`,developer:`开发者`,"frozen-runtime-config":`已保存配置`,"project-role":`项目角色`,default:`默认`,"explicit-launch-override":`本次运行选择的提供商`},reuseDisabled:`此检查已禁用复用。`,reuseConfirmed:`确认输入和工具链一致后复用。`,inputsChanged:`验证期间输入发生变化;结果已失效。`,reuseUnproven:`没有输入一致且仍然有效的结果;已重新执行检查。`,original:`原始执行`,requested:`请求值`,reported:`报告值`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Agenten-Laufzeit`,t=`Architekt, Entwickler und Reviewer laufen als getrennte Phasen mit deterministischer Verifikation dazwischen. Wähle pro Rolle einen Anbieter; alles andere hat funktionierende Standardwerte.`,n=`Einstellungen werden geladen…`,r=`Einstellungen konnten nicht geladen werden. Vor Änderungen erneut versuchen.`,i=`Erneut versuchen`,a=`Diese Core-Installation enthält die Agenten-Laufzeit nicht. Aktualisieren Sie Core vor der Aktivierung. Die Einstellungen können Sie bereits vorbereiten.`,o=`Laufzeit-Einstellungen speichern`,s=`Wird gespeichert…`,c=`Einstellungen gespeichert`,l=`Einstellungen konnten nicht gespeichert werden.`,u=`Vor Abschluss des Workflows auf Freigabe warten`,d={title:`Anbieter`,hint:`CLI-Anbieter nutzen die bestehende Anmeldung. APIs akzeptieren nur den Namen einer Umgebungsvariablen, niemals den Schlüssel selbst. Lokal kann er leer bleiben. Rollen vor dem Entfernen ihres Anbieters neu zuweisen.`,entry:`Anbieter {{index}}`,id:`Anbieter-ID`,kind:`Verbindungstyp`,cli:`Installierte Programmier-CLI`,compatible:`OpenAI-kompatibler Endpunkt`,command:`Programmier-CLI`,baseUrl:`API-Basis-URL`,apiKeyEnv:`Umgebungsvariable für API-Schlüssel (optional)`,remove:`Anbieter entfernen`,addCli:`CLI-Anbieter hinzufügen`,addLocal:`Lokalen / API-Anbieter hinzufügen`,show:`Anbieterverbindungen anzeigen`,hide:`Anbieterverbindungen ausblenden`,globalTitle:`Anbieterverbindungen`,globalHint:`Diese Verbindungen stehen allen Projekten zur Verfügung. Anbieter und Modelle werden in den Projekteinstellungen Rollen zugewiesen. Änderungen gelten für neue Ausführungen.`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`Architekt`,developer:`Entwickler`,reviewer:`Prüfer`,verify:`Prüfung`,archive:`Abschluss`},m={title:`Rollenzuweisungen`,hint:`Jede Rolle kann einen anderen Anbieter und ein anderes Modell verwenden. Verbindungen: Allgemeine Einstellungen → Specrails Agents. Standard: {{turns}} Runden pro Agent.`,provider:`Anbieter`,model:`Modell`,modelPlaceholder:`Modell-ID oder CLI-Standard`,maxTurns:`Maximale Runden (Standard {{turns}})`,defaultModel:`Standard ({{model}})`},h={title:`Workflow-Limits`,hint:`Leere Felder verwenden die Core-Standards: {{attempts}} Entwicklerversuche und {{minutes}} Minuten pro Workflow. Token- und USD-Obergrenzen sind optional; USD-Obergrenzen erfordern Claude für jede KI-Rolle.`,maxAttempts:`Maximale Entwicklerversuche (Standard {{attempts}})`,timeoutMinutes:`Zeitlimit in Minuten (Standard {{minutes}})`,maxTokens:`Maximale Tokens`,maxCostUsd:`Maximale Kosten (USD)`,unlimited:`Kein Limit`},g={title:`Verifikationsbefehle`,hint:`Optional. Sie laufen, nachdem der Entwickler fertig ist; Fehler gehen an den Entwickler zurück. Bleibt die Liste leer, schlägt der Architekt bei jedem Lauf die projekteigenen Prüfungen vor; Repositories ohne automatische Prüfung werden trotzdem reviewt.`,detect:`Projektprüfungen erkennen`,detecting:`Erkenne…`,detected:`Ausgefüllt mit den Prüfungen, die dieses Projekt bereits definiert.`,nothingDetected:`Kein Test-, Typprüfungs- oder Build-Befehl gefunden. Kein Problem: der Architekt schlägt bei jedem Lauf Prüfungen vor, wenn möglich.`,detectFailed:`Die Projekt-Repositories konnten nicht untersucht werden.`,repository:`Repository`,command:`Befehl`,reason:`Erkannt aus {{reason}}`,remove:`Entfernen`,add:`Befehl hinzufügen`,invalidLine:`Verifikationsbefehl ist leer oder hat ein nicht geschlossenes Anführungszeichen: {{line}}`,label:`Prüfbezeichnung (optional)`,moveUp:`Nach oben`,moveDown:`Nach unten`},_={title:`Gespeicherte Ausführungen`,refresh:`Aktualisieren`,hint:`Setzt im ursprünglichen Worktree mit gespeichertem Umfang und Einstellungen fort; der Fortschritt erscheint im Protokoll dieses Jobs. Es wird nichts veröffentlicht und keine Desktop-Auslieferung neu gestartet. Aktive Rail-Ausführungen werden über ihre Job-Steuerung gestoppt.`,empty:`Keine gespeicherten Ausführungen.`,loadFailed:`Ausführungen konnten nicht geladen werden.`,actionFailed:`Ausführung konnte nicht aktualisiert werden.`,phase:`Nächste Phase: {{phase}}`,approve:`Abschluss freigeben`,recover:`Unterbrochene Phase wiederherstellen`,resume:`Fortsetzen`,cancel:`Fortsetzung abbrechen`,status:{running:`Wird fortgesetzt…`,succeeded:`Erfolgreich`,failed:`Fehlgeschlagen`,blocked:`Blockiert`,paused:`Pausiert`,cancelled:`Abgebrochen`,interrupted:`Unterbrochen`,unavailable:`Nicht verfügbar`},question:`Der Architekt fragt:`,answerLabel:`Ihre Antwort`,answerPlaceholder:`Beantworten Sie die Frage; der Architekt macht damit weiter.`,answer:`Antworten und fortsetzen`,viewLog:`Job-Protokoll anzeigen`,implementation:`Implementierung`,preserveProgress:`Ab der angezeigten Phase fortsetzen; bisherige Arbeit und gespeicherte Einstellungen bleiben erhalten.`,reviewDelivery:`Implementierung abgeschlossen. Prüfe das Ergebnis im Job-Protokoll vor der Auslieferung; diese Fortsetzung hat es nicht veröffentlicht.`,prepareDelivery:`Auslieferung vorbereiten`},v={architect:`Liest den Code und schreibt Vorschlag, Design, Aufgaben und Spezifikation. Nur lesend.`,developer:`Setzt die Aufgaben mit Tests um. Darf Dateien bearbeiten und Befehle in der CLI-Sandbox ausführen.`,reviewer:`Prüft das Ergebnis gegen Spezifikation und Verifikationsnachweise. Nur lesend.`},y={title:`Review-Schwelle`,hint:`Leere Felder verwenden Cores Schwelle. Werte können sie nur anheben: Gesamtwert mindestens {{score}}, Sicherheit mindestens {{security}}, andere Aspekte mindestens {{aspect}}.`,minScore:`Mindestgesamtwert (Standard {{score}})`,aspects:{type_correctness:`Typkorrektheit (Standard {{score}})`,pattern_adherence:`Mustertreue (Standard {{score}})`,test_coverage:`Testabdeckung (Standard {{score}})`,security:`Sicherheit (Standard {{score}})`,architectural_alignment:`Architekturkonformität (Standard {{score}})`}},b={title:`Zuversicht des Architekten`,hint:`Nach einem autonomen Untersuchungsdurchlauf pausiert ein weiterhin unsicherer Entwurf mit der Frage des Architekten oder fährt mit benannten Annahmen fort.`,onLowConfidence:`Bei geringer Zuversicht`,ask:`Fragen (mit der Frage pausieren)`,proceed:`Mit benannten Annahmen fortfahren`},x={title:`Verbrauch und Zeit`,hint:`Enthält Korrekturen und fehlgeschlagene Aufrufe. Die Agentenzeit umfasst Werkzeuge. Cache-Tokens sind Teil der Eingabe-Tokens.`,unknown:`Nicht verfügbar`,duration:`Ausführungszeit`,agentTime:`Agentenzeit`,cost:`Gemeldete Kosten`,providerCalls:`Agentenaufrufe`,toolCalls:`Werkzeugaufrufe`,input:`Eingabe-Tokens`,output:`Ausgabe-Tokens`,uncached:`Eingabe ohne Cache`,cacheRead:`Cache-Lesezugriffe`,cacheWrite:`Cache-Schreibzugriffe`,partial:`Für einige Versuche fehlen detaillierte Messungen.`,phases:`Verbrauch nach Phase`,phase:`Phase`,attempts:`Versuche`},S={title:`Prompts der Agentenrollen`,description:`Anweisungen für jede Rolle anzeigen und bearbeiten. Sie gelten für alle Projekte und Anbieter; Änderungen gelten für neue Jobs. Fortgesetzte Jobs behalten ihre ursprünglichen Prompts.`,definition:`Definition für {{role}}`,default:`Werkseinstellung`,custom:`Angepasst`,restore:`Standard wiederherstellen`,contracts:`Spec-Kontext, OpenSpec-Workflow und erforderliches Antwortformat werden automatisch ergänzt und hier nicht bearbeitet.`,invalid:`Jede Definition muss 1–20.000 Zeichen mit nicht leerem Text und ohne Nullbytes enthalten.`,saved:`Rollen-Prompts gespeichert`,unsaved:`Ungespeicherte Änderungen`,discard:`Änderungen verwerfen`,save:`Prompts speichern`},C={title:`Effizienz der Implementierung`,scope:`Gilt für neue Ausführungen. Gespeicherte Ausführungen behalten ihre Konfiguration und Laufzeit.`,effort:`Denkaufwand`,providerDefault:`Anbietervorgabe`,unconfirmed:`Unbestätigt`,unknownSupport:`Unterstützung für dieses Modell und diesen Transport ist nicht bestätigt.`,escalation:`Eine höhere Stufe beim gleichen Anbieter erlauben`,baseRequired:`Zuerst ein konkretes Basismodell auswählen.`,escalationModel:`Modell der höheren Stufe`,triggers:{architect:`Nur die bestehende vertiefte Untersuchung kann diese Stufe wählen.`,developer:`Nach zwei fehlgeschlagenen Kandidaten kann der nächste erlaubte Versuch diese Stufe wählen.`,reviewer:`Nur zur Reparatur ungültiger Antworten, nicht bei Ablehnung des Codes.`},contextMode:`Repository-Kontext`,reviewMode:`Korrekturprüfung`,planning:`Planungstiefe`,adaptive:`Adaptiv`,full:`Vollständig`,developerChecks:`Zusätzliche Prüfungen des Entwicklers akzeptieren`,concurrency:`Maximale gleichzeitige Prüfungen`,concurrencyHint:`Standard: 1. Nur vom Host als unabhängig deklarierte Prüfungen verschiedener Repositories laufen gleichzeitig. Standardmäßig keine Wiederverwendung.`,checkCapabilities:`Modellkompatibilität prüfen`,capabilitiesFailed:`Kompatibilität nicht bestätigt. Core aktualisieren oder Anbietervorgaben beibehalten.`},w={title:`Prüfnachweise`,acceptance:`Technische Abnahme`,acceptanceStatus:{pending:`Ausstehend`,validated:`Validiert`,"with-exceptions":`Mit Ausnahmen`,blocked:`Blockiert`},calls:`Agentenaufrufe`,executed:`Ausgeführte Prüfungen`,reused:`Wiederverwendete Prüfungen`,unknown:`Nicht verfügbar`,unavailable:`Nachweise nicht verfügbar. Das gespeicherte Ergebnis beweist keine aktuelle Gültigkeit.`,current:`Aktueller Kandidat und Plan`,historical:`Historisches Ergebnis`,moreChecks:`Weitere Prüfungen`,output:`Prüfausgabe`,empty:`Keine Ausgabe`,truncated:`Begrenzte Seite oder gekürzte Erfassung.`,nextPage:`Nächste Ausgabeseite`,status:{passed:`Bestanden`,failed:`Fehlgeschlagen`,cancelled:`Abgebrochen`,interrupted:`Unterbrochen`},disposition:{executed:`Ausgeführt`,reused:`Wiederverwendet`,"not-run":`Nicht ausgeführt`},origin:`Herkunft`,origins:{host:`Host`,architect:`Architekt`,developer:`Entwickler`,"frozen-runtime-config":`Gespeicherte Konfiguration`,"project-role":`Projektrolle`,default:`Standard`,"explicit-launch-override":`Für diesen Start gewählter Anbieter`},reuseDisabled:`Wiederverwendung für diese Prüfung deaktiviert.`,reuseConfirmed:`Nach Prüfung identischer Eingaben und Werkzeuge wiederverwendet.`,inputsChanged:`Eingaben während der Prüfung geändert; Ergebnis ungültig.`,reuseUnproven:`Kein aktuelles Ergebnis mit nachweislich identischen Eingaben; erneut ausgeführt.`,original:`Ursprüngliche Ausführung`,requested:`Angefordert`,reported:`Gemeldet`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Motor de agentes`,t=`Arquitecto, desarrollador y revisor se ejecutan como fases separadas con verificación determinista entre ellas. Elige un proveedor por rol; todo lo demás tiene un valor por defecto que funciona.`,n=`Cargando configuración…`,r=`No se pudo cargar la configuración. Reintenta antes de modificarla.`,i=`Reintentar`,a=`Esta instalación de Core no incluye el motor de agentes. Actualiza Core antes de activarlo; puedes preparar la configuración mientras está desactivado.`,o=`Guardar configuración`,s=`Guardando…`,c=`Configuración guardada`,l=`No se pudo guardar la configuración.`,u=`Pausar para aprobación antes de completar el flujo`,d={title:`Proveedores`,hint:`Los proveedores CLI usan su sesión existente. Los proveedores API solo aceptan el nombre de una variable de entorno, nunca una clave. Los servicios locales pueden dejarlo vacío. Asigna otro proveedor al rol antes de eliminar el actual.`,entry:`Proveedor {{index}}`,id:`ID del proveedor`,kind:`Tipo de conexión`,cli:`CLI de programación instalado`,compatible:`API compatible con OpenAI`,command:`CLI de programación`,baseUrl:`URL base de la API`,apiKeyEnv:`Variable de entorno de la clave (opcional)`,remove:`Eliminar proveedor`,addCli:`Añadir proveedor CLI`,addLocal:`Añadir proveedor local / API`,show:`Mostrar conexiones de proveedores`,hide:`Ocultar conexiones de proveedores`,globalTitle:`Conexiones de proveedores`,globalHint:`Estas conexiones están disponibles para todos los proyectos. Asigna proveedores y modelos a cada rol en los ajustes del proyecto. Los cambios se aplican a nuevas ejecuciones.`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`Arquitecto`,developer:`Desarrollador`,reviewer:`Revisor`,verify:`Verificación`,archive:`Finalización`},m={title:`Asignación de roles`,hint:`Cada rol puede usar un proveedor y un modelo distintos. Las conexiones se gestionan en Ajustes generales → Specrails Agents. Límite por defecto: {{turns}} turnos por agente.`,provider:`Proveedor`,model:`Modelo`,modelPlaceholder:`ID del modelo o predeterminado del CLI`,maxTurns:`Máximo de turnos (por defecto {{turns}})`,defaultModel:`Predeterminado ({{model}})`},h={title:`Límites del flujo`,hint:`Los campos vacíos usan los valores de Core: {{attempts}} intentos del desarrollador y {{minutes}} minutos por flujo. Los topes de tokens y USD son opcionales; el tope en USD requiere Claude en todos los roles.`,maxAttempts:`Máximo de intentos del desarrollador (por defecto {{attempts}})`,timeoutMinutes:`Tiempo máximo en minutos (por defecto {{minutes}})`,maxTokens:`Máximo de tokens`,maxCostUsd:`Coste máximo (USD)`,unlimited:`Sin límite`},g={title:`Comandos de verificación`,hint:`Opcional. Se ejecutan cuando el desarrollador termina y sus fallos vuelven al desarrollador. Si dejas la lista vacía, el arquitecto propone las comprobaciones propias del proyecto en cada ejecución; los repositorios sin comprobación automática se revisan igualmente.`,detect:`Detectar comprobaciones del proyecto`,detecting:`Detectando…`,detected:`Rellenado con las comprobaciones que este proyecto ya define.`,nothingDetected:`No se encontró ningún comando de test, comprobación de tipos o build. No pasa nada: el arquitecto propone comprobaciones en cada ejecución cuando es posible.`,detectFailed:`No se pudieron inspeccionar los repositorios del proyecto.`,repository:`Repositorio`,command:`Comando`,reason:`Detectado en {{reason}}`,remove:`Eliminar`,add:`Añadir comando`,invalidLine:`El comando de verificación está vacío o tiene comillas sin cerrar: {{line}}`,label:`Nombre de la comprobación (opcional)`,moveUp:`Subir`,moveDown:`Bajar`},_={title:`Ejecuciones guardadas`,refresh:`Actualizar`,hint:`Continúa en el worktree original con el alcance y la configuración guardados; el progreso aparece en el registro de ese trabajo. No publica ni reinicia la entrega de Desktop. Las ejecuciones activas se detienen desde sus controles de trabajo.`,empty:`No hay ejecuciones guardadas.`,loadFailed:`No se pudieron cargar las ejecuciones.`,actionFailed:`No se pudo actualizar esta ejecución.`,phase:`Siguiente fase: {{phase}}`,approve:`Aprobar finalización`,recover:`Recuperar fase interrumpida`,resume:`Reanudar`,cancel:`Cancelar continuación`,status:{running:`Continuando…`,succeeded:`Completado`,failed:`Fallido`,blocked:`Bloqueado`,paused:`En pausa`,cancelled:`Cancelado`,interrupted:`Interrumpido`,unavailable:`No disponible`},question:`El arquitecto pregunta:`,answerLabel:`Tu respuesta`,answerPlaceholder:`Responde a la pregunta; el arquitecto continúa con ella.`,answer:`Responder y reanudar`,viewLog:`Ver log del job`,implementation:`Implementación`,preserveProgress:`Continúa desde la fase indicada, conservando el trabajo anterior y la configuración guardada.`,reviewDelivery:`Implementación completada. Revisa el resultado en el log de este job antes de preparar la entrega; esta continuación no lo ha publicado.`,prepareDelivery:`Preparar entrega`},v={architect:`Lee el código y escribe la propuesta, el diseño, las tareas y la spec. Solo lectura.`,developer:`Implementa las tareas con tests. Puede editar archivos y ejecutar comandos dentro del sandbox del CLI.`,reviewer:`Comprueba el resultado contra la spec y la evidencia de verificación. Solo lectura.`},y={title:`Umbral de revisión`,hint:`Los campos vacíos usan el umbral de Core. Los valores solo pueden elevarlo: puntuación global mínima {{score}}, seguridad mínima {{security}}, resto de aspectos mínimo {{aspect}}.`,minScore:`Puntuación global mínima (por defecto {{score}})`,aspects:{type_correctness:`Corrección de tipos (por defecto {{score}})`,pattern_adherence:`Adhesión a patrones (por defecto {{score}})`,test_coverage:`Cobertura de pruebas (por defecto {{score}})`,security:`Seguridad (por defecto {{score}})`,architectural_alignment:`Alineación arquitectónica (por defecto {{score}})`}},b={title:`Confianza del arquitecto`,hint:`Tras una pasada de investigación autónoma, un diseño con confianza aún baja se pausa con la pregunta del arquitecto o continúa con supuestos declarados.`,onLowConfidence:`Con confianza baja`,ask:`Preguntar (pausar con la pregunta)`,proceed:`Continuar con supuestos declarados`},x={title:`Consumo y tiempo`,hint:`Incluye correcciones y llamadas fallidas. El tiempo del agente incluye sus herramientas. Los tokens de caché forman parte de los tokens de entrada.`,unknown:`No disponible`,duration:`Tiempo de ejecución`,agentTime:`Tiempo de agentes`,cost:`Coste informado`,providerCalls:`Llamadas a agentes`,toolCalls:`Llamadas a herramientas`,input:`Tokens de entrada`,output:`Tokens de salida`,uncached:`Entrada sin caché`,cacheRead:`Lecturas de caché`,cacheWrite:`Escrituras de caché`,partial:`Algunos intentos no tienen mediciones detalladas.`,phases:`Consumo por fase`,phase:`Fase`,attempts:`Intentos`},S={title:`Prompts de los agentes`,description:`Consulta y edita las instrucciones de cada rol. Son comunes a todos los proyectos y proveedores; los cambios se aplican a los nuevos jobs. Los jobs reanudados conservan sus prompts originales.`,definition:`Definición de {{role}}`,default:`Valor de fábrica`,custom:`Personalizado`,restore:`Restaurar valor de fábrica`,contracts:`El contexto de la spec, el flujo de OpenSpec y el formato de respuesta se añaden automáticamente y no se editan aquí.`,invalid:`Cada definición debe contener entre 1 y 20.000 caracteres, con texto no vacío y sin caracteres nulos.`,saved:`Prompts guardados`,unsaved:`Cambios sin guardar`,discard:`Descartar cambios`,save:`Guardar prompts`},C={title:`Eficiencia de implementación`,scope:`Se aplica a nuevas ejecuciones. Las guardadas conservan su configuración y runtime originales.`,effort:`Esfuerzo de razonamiento`,providerDefault:`Predeterminado del proveedor`,unconfirmed:`Sin confirmar`,unknownSupport:`Compatibilidad sin confirmar para este modelo y transporte. Puedes usar el valor predeterminado del proveedor.`,escalation:`Permitir un nivel superior con el mismo proveedor`,baseRequired:`Selecciona primero un modelo base explícito.`,escalationModel:`Modelo del nivel superior`,triggers:{architect:`Solo puede activarse en la pasada adicional de investigación ya permitida.`,developer:`Tras dos candidatos fallidos, puede activarse en el siguiente intento permitido.`,reviewer:`Solo puede activarse para reparar una respuesta mal formada; rechazar código no lo activa.`},contextMode:`Contexto de repositorios`,reviewMode:`Revisión de correcciones`,planning:`Profundidad del plan`,adaptive:`Adaptativa`,full:`Completa`,developerChecks:`Aceptar checks adicionales propuestos por el developer`,concurrency:`Máximo de checks simultáneos`,concurrencyHint:`Por defecto, 1. Solo se solapan checks declarados independientes por el host en repositorios distintos. La reutilización está desactivada por defecto.`,checkCapabilities:`Comprobar compatibilidad de modelos`,capabilitiesFailed:`No se pudo confirmar la compatibilidad. Actualiza el Core emparejado o conserva los valores predeterminados del proveedor.`},w={title:`Evidencia de verificación`,acceptance:`Aceptación técnica`,acceptanceStatus:{pending:`Pendiente`,validated:`Validada`,"with-exceptions":`Con excepciones`,blocked:`Bloqueada`},calls:`Llamadas de agentes`,executed:`Checks ejecutados`,reused:`Checks reutilizados`,unknown:`No disponible`,unavailable:`La evidencia no está disponible para esta ejecución. El resultado registrado no confirma su validez actual.`,current:`Candidato y plan actuales`,historical:`Resultado histórico`,moreChecks:`Más checks`,output:`Salida de verificación`,empty:`Sin salida`,truncated:`Esta es una página limitada o una captura truncada.`,nextPage:`Siguiente página de salida`,status:{passed:`Correcto`,failed:`Fallido`,cancelled:`Cancelado`,interrupted:`Interrumpido`},disposition:{executed:`Ejecutado`,reused:`Reutilizado`,"not-run":`No ejecutado`},origin:`Origen`,origins:{host:`Host`,architect:`Arquitecto`,developer:`Desarrollador`,"frozen-runtime-config":`Configuración guardada`,"project-role":`Rol del proyecto`,default:`Por defecto`,"explicit-launch-override":`Proveedor elegido para el lanzamiento`},reuseDisabled:`Reutilización desactivada para esta comprobación.`,reuseConfirmed:`Reutilizado tras comprobar entradas y herramientas idénticas.`,inputsChanged:`Las entradas cambiaron durante la verificación; resultado invalidado.`,reuseUnproven:`No hay un resultado vigente con entradas idénticas demostradas; se ejecutó de nuevo.`,original:`Ejecución original`,requested:`Solicitado`,reported:`Reportado`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Motore degli agenti`,t=`Architetto, sviluppatore e revisore girano come fasi separate con verifica deterministica in mezzo. Scegli un fornitore per ruolo; tutto il resto ha un valore predefinito funzionante.`,n=`Caricamento delle impostazioni…`,r=`Impossibile caricare le impostazioni. Riprova prima di modificarle.`,i=`Riprova`,a=`Questa installazione di Core non include il motore degli agenti. Aggiorna Core prima di attivarlo; puoi preparare le impostazioni mentre è disattivato.`,o=`Salva impostazioni`,s=`Salvataggio…`,c=`Impostazioni salvate`,l=`Impossibile salvare le impostazioni.`,u=`Richiedi approvazione prima di completare il flusso`,d={title:`Fornitori`,hint:`I CLI usano l’accesso esistente. Le API accettano solo il nome di una variabile d’ambiente, mai la chiave. Per servizi locali può restare vuoto. Riassegna i ruoli prima di rimuovere il fornitore.`,entry:`Fornitore {{index}}`,id:`ID del fornitore`,kind:`Tipo di connessione`,cli:`CLI di programmazione installato`,compatible:`Endpoint compatibile con OpenAI`,command:`CLI di programmazione`,baseUrl:`URL base dell’API`,apiKeyEnv:`Variabile d’ambiente della chiave (facoltativa)`,remove:`Rimuovi fornitore`,addCli:`Aggiungi fornitore CLI`,addLocal:`Aggiungi fornitore locale / API`,show:`Mostra connessioni dei fornitori`,hide:`Nascondi connessioni dei fornitori`,globalTitle:`Connessioni dei provider`,globalHint:`Queste connessioni sono disponibili per tutti i progetti. Assegna provider e modelli ai ruoli nelle impostazioni del progetto. Le modifiche si applicano alle nuove esecuzioni.`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`Architetto`,developer:`Sviluppatore`,reviewer:`Revisore`,verify:`Verifica`,archive:`Completamento`},m={title:`Assegnazione dei ruoli`,hint:`Ogni ruolo può usare un provider e un modello diversi. Connessioni: Impostazioni generali → Specrails Agents. Limite predefinito: {{turns}} turni per agente.`,provider:`Fornitore`,model:`Modello`,modelPlaceholder:`ID del modello o predefinito del CLI`,maxTurns:`Numero massimo di turni (predefinito {{turns}})`,defaultModel:`Predefinito ({{model}})`},h={title:`Limiti del flusso`,hint:`I campi vuoti usano i valori di Core: {{attempts}} tentativi dello sviluppatore e {{minutes}} minuti per flusso. I limiti di token e USD sono facoltativi; il limite in USD richiede Claude per ogni ruolo IA.`,maxAttempts:`Tentativi massimi dello sviluppatore (predefinito {{attempts}})`,timeoutMinutes:`Timeout in minuti (predefinito {{minutes}})`,maxTokens:`Token massimi`,maxCostUsd:`Costo massimo (USD)`,unlimited:`Nessun limite`},g={title:`Comandi di verifica`,hint:`Facoltativo. Vengono eseguiti quando lo sviluppatore termina e i fallimenti tornano allo sviluppatore. Lista vuota: l’architetto propone i controlli propri del progetto a ogni esecuzione; i repository senza controllo automatico vengono comunque revisionati.`,detect:`Rileva i controlli del progetto`,detecting:`Rilevamento…`,detected:`Compilato con i controlli che questo progetto già definisce.`,nothingDetected:`Nessun comando di test, controllo tipi o build trovato. Va bene: l’architetto propone controlli a ogni esecuzione quando possibile.`,detectFailed:`Impossibile ispezionare i repository del progetto.`,repository:`Repository`,command:`Comando`,reason:`Rilevato da {{reason}}`,remove:`Rimuovi`,add:`Aggiungi comando`,invalidLine:`Comando di verifica vuoto o con virgolette non chiuse: {{line}}`,label:`Nome del controllo (facoltativo)`,moveUp:`Sposta su`,moveDown:`Sposta giù`},_={title:`Esecuzioni salvate`,refresh:`Aggiorna`,hint:`Continua nel worktree originale con ambito e impostazioni salvati; l’avanzamento compare nel log di quel job. Non pubblica né riavvia la consegna Desktop. Le esecuzioni attive si fermano dai controlli del job.`,empty:`Nessuna esecuzione salvata.`,loadFailed:`Impossibile caricare le esecuzioni.`,actionFailed:`Impossibile aggiornare questa esecuzione.`,phase:`Prossima fase: {{phase}}`,approve:`Approva completamento`,recover:`Recupera fase interrotta`,resume:`Riprendi`,cancel:`Annulla continuazione`,status:{running:`Continuazione in corso…`,succeeded:`Riuscito`,failed:`Fallito`,blocked:`Bloccato`,paused:`In pausa`,cancelled:`Annullato`,interrupted:`Interrotto`,unavailable:`Non disponibile`},question:`L'architetto chiede:`,answerLabel:`La tua risposta`,answerPlaceholder:`Rispondi alla domanda; l'architetto prosegue con essa.`,answer:`Rispondi e riprendi`,viewLog:`Visualizza log del job`,implementation:`Implementazione`,preserveProgress:`Riprendi dalla fase indicata, conservando il lavoro e le impostazioni salvate.`,reviewDelivery:`Implementazione completata. Controlla il risultato nel log prima della consegna; questa ripresa non lo ha pubblicato.`,prepareDelivery:`Prepara consegna`},v={architect:`Legge il codice e scrive proposta, design, attività e spec. Sola lettura.`,developer:`Implementa le attività con i test. Può modificare file ed eseguire comandi nella sandbox del CLI.`,reviewer:`Controlla il risultato rispetto alla spec e alle prove di verifica. Sola lettura.`},y={title:`Soglia di revisione`,hint:`I campi vuoti usano la soglia di Core. I valori possono solo alzarla: punteggio complessivo almeno {{score}}, sicurezza almeno {{security}}, altri aspetti almeno {{aspect}}.`,minScore:`Punteggio complessivo minimo (predefinito {{score}})`,aspects:{type_correctness:`Correttezza dei tipi (predefinito {{score}})`,pattern_adherence:`Aderenza ai pattern (predefinito {{score}})`,test_coverage:`Copertura dei test (predefinito {{score}})`,security:`Sicurezza (predefinito {{score}})`,architectural_alignment:`Allineamento architetturale (predefinito {{score}})`}},b={title:`Confidenza dell'architetto`,hint:`Dopo un passaggio di indagine autonoma, un progetto ancora poco sicuro si mette in pausa con la domanda dell'architetto oppure procede su ipotesi dichiarate.`,onLowConfidence:`Con bassa confidenza`,ask:`Chiedere (pausa con la domanda)`,proceed:`Procedere su ipotesi dichiarate`},x={title:`Consumo e tempo`,hint:`Include correzioni e chiamate non riuscite. Il tempo degli agenti include gli strumenti. I token della cache fanno parte dei token di input.`,unknown:`Non disponibile`,duration:`Tempo di esecuzione`,agentTime:`Tempo degli agenti`,cost:`Costo dichiarato`,providerCalls:`Chiamate agli agenti`,toolCalls:`Chiamate agli strumenti`,input:`Token di input`,output:`Token di output`,uncached:`Input senza cache`,cacheRead:`Letture della cache`,cacheWrite:`Scritture della cache`,partial:`Alcuni tentativi non hanno misurazioni dettagliate.`,phases:`Consumo per fase`,phase:`Fase`,attempts:`Tentativi`},S={title:`Prompt dei ruoli degli agenti`,description:`Visualizza e modifica le istruzioni di ogni ruolo. Sono condivise da tutti i progetti e provider; le modifiche si applicano ai nuovi lavori. I lavori ripresi mantengono i prompt originali.`,definition:`Definizione di {{role}}`,default:`Impostazione predefinita`,custom:`Personalizzato`,restore:`Ripristina predefinito`,contracts:`Il contesto della spec, il workflow OpenSpec e il formato di risposta richiesto vengono aggiunti automaticamente e non sono modificabili qui.`,invalid:`Ogni definizione deve contenere da 1 a 20.000 caratteri, con testo non vuoto e senza byte nulli.`,saved:`Prompt dei ruoli salvati`,unsaved:`Modifiche non salvate`,discard:`Scarta modifiche`,save:`Salva prompt`},C={title:`Efficienza dell’implementazione`,scope:`Si applica alle nuove esecuzioni. Quelle salvate mantengono configurazione e motore originali.`,effort:`Sforzo di ragionamento`,providerDefault:`Predefinito del fornitore`,unconfirmed:`Non confermato`,unknownSupport:`Il supporto per questo modello e trasporto non è confermato.`,escalation:`Consenti un livello superiore con lo stesso fornitore`,baseRequired:`Seleziona prima un modello base esplicito.`,escalationModel:`Modello di livello superiore`,triggers:{architect:`Solo l’approfondimento già previsto può selezionare questo livello.`,developer:`Dopo due candidati falliti, il tentativo successivo consentito può selezionare questo livello.`,reviewer:`Solo per correggere risposte malformate; il rifiuto del codice non lo attiva.`},contextMode:`Contesto del repository`,reviewMode:`Revisione delle correzioni`,planning:`Profondità della pianificazione`,adaptive:`Adattivo`,full:`Completo`,developerChecks:`Accetta controlli aggiuntivi proposti dallo sviluppatore`,concurrency:`Controlli simultanei massimi`,concurrencyHint:`Predefinito: 1. Solo controlli indipendenti dichiarati dall’host in repository diversi possono essere simultanei. Nessun riutilizzo predefinito.`,checkCapabilities:`Verifica compatibilità dei modelli`,capabilitiesFailed:`Compatibilità non confermata. Aggiorna Core o mantieni i valori del fornitore.`},w={title:`Evidenze di verifica`,acceptance:`Accettazione tecnica`,acceptanceStatus:{pending:`In attesa`,validated:`Validato`,"with-exceptions":`Con eccezioni`,blocked:`Bloccato`},calls:`Chiamate agli agenti`,executed:`Controlli eseguiti`,reused:`Controlli riutilizzati`,unknown:`Non disponibile`,unavailable:`Evidenza non disponibile. Il risultato registrato non prova la validità attuale.`,current:`Candidato e piano attuali`,historical:`Risultato storico`,moreChecks:`Altri controlli`,output:`Output della verifica`,empty:`Nessun output`,truncated:`Pagina limitata o acquisizione troncata.`,nextPage:`Pagina successiva`,status:{passed:`Superato`,failed:`Fallito`,cancelled:`Annullato`,interrupted:`Interrotto`},disposition:{executed:`Eseguito`,reused:`Riutilizzato`,"not-run":`Non eseguito`},origin:`Origine`,origins:{host:`Host`,architect:`Architetto`,developer:`Sviluppatore`,"frozen-runtime-config":`Configurazione salvata`,"project-role":`Ruolo del progetto`,default:`Predefinito`,"explicit-launch-override":`Provider scelto per questo avvio`},reuseDisabled:`Riutilizzo disabilitato per questo controllo.`,reuseConfirmed:`Riutilizzato dopo la conferma di input e strumenti identici.`,inputsChanged:`Input cambiati durante la verifica; risultato invalidato.`,reuseUnproven:`Nessun risultato attuale con input identici comprovati; controllo rieseguito.`,original:`Esecuzione originale`,requested:`Richiesto`,reported:`Segnalato`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Motor de agentes`,t=`Arquiteto, programador e revisor correm como fases separadas com verificação determinista entre elas. Escolha um fornecedor por função; tudo o resto tem um valor por defeito que funciona.`,n=`A carregar configurações…`,r=`Não foi possível carregar as configurações. Tente novamente antes de alterar.`,i=`Tentar novamente`,a=`Esta instalação do Core não inclui o motor de agentes. Atualize o Core antes de ativar; pode preparar as configurações enquanto está desativado.`,o=`Guardar configurações`,s=`A guardar…`,c=`Configurações guardadas`,l=`Não foi possível guardar as configurações.`,u=`Pausar para aprovação antes de concluir o fluxo`,d={title:`Fornecedores`,hint:`Os CLI usam a sessão existente. As API aceitam apenas o nome da variável de ambiente, nunca a chave. Em serviços locais, pode ficar vazio. Reatribua as funções antes de remover o fornecedor.`,entry:`Fornecedor {{index}}`,id:`ID do fornecedor`,kind:`Tipo de ligação`,cli:`CLI de programação instalado`,compatible:`Endpoint compatível com OpenAI`,command:`CLI de programação`,baseUrl:`URL base da API`,apiKeyEnv:`Variável de ambiente da chave (opcional)`,remove:`Remover fornecedor`,addCli:`Adicionar fornecedor CLI`,addLocal:`Adicionar fornecedor local / API`,show:`Mostrar ligações a fornecedores`,hide:`Ocultar ligações a fornecedores`,globalTitle:`Conexões de fornecedores`,globalHint:`Estas conexões estão disponíveis para todos os projetos. Atribua fornecedores e modelos aos papéis nas definições do projeto. As alterações aplicam-se a novas execuções.`},f={claude:`Claude`,codex:`Codex`,gemini:`Gemini`,kimi:`Kimi`},p={architect:`Arquiteto`,developer:`Desenvolvedor`,reviewer:`Revisor`,verify:`Verificação`,archive:`Conclusão`},m={title:`Atribuição de funções`,hint:`Cada papel pode usar um fornecedor e um modelo diferentes. Conexões: Definições gerais → Specrails Agents. Limite padrão: {{turns}} turnos por agente.`,provider:`Fornecedor`,model:`Modelo`,modelPlaceholder:`ID do modelo ou padrão do CLI`,maxTurns:`Máximo de turnos (por defeito {{turns}})`,defaultModel:`Por defeito ({{model}})`},h={title:`Limites do fluxo`,hint:`Os campos vazios usam os valores do Core: {{attempts}} tentativas do programador e {{minutes}} minutos por fluxo. Os limites de tokens e USD são opcionais; o limite em USD exige Claude em todas as funções de IA.`,maxAttempts:`Máximo de tentativas do programador (por defeito {{attempts}})`,timeoutMinutes:`Tempo limite em minutos (por defeito {{minutes}})`,maxTokens:`Máximo de tokens`,maxCostUsd:`Custo máximo (USD)`,unlimited:`Sem limite`},g={title:`Comandos de verificação`,hint:`Opcional. Correm quando o programador termina e as falhas voltam ao programador. Com a lista vazia, o arquiteto propõe as verificações do próprio projeto em cada execução; os repositórios sem verificação automática são revistos na mesma.`,detect:`Detetar verificações do projeto`,detecting:`A detetar…`,detected:`Preenchido com as verificações que este projeto já define.`,nothingDetected:`Não foi encontrado nenhum comando de teste, verificação de tipos ou build. Não há problema: o arquiteto propõe verificações em cada execução quando possível.`,detectFailed:`Não foi possível inspecionar os repositórios do projeto.`,repository:`Repositório`,command:`Comando`,reason:`Detetado em {{reason}}`,remove:`Remover`,add:`Adicionar comando`,invalidLine:`Comando de verificação vazio ou com aspas por fechar: {{line}}`,label:`Nome da verificação (opcional)`,moveUp:`Subir`,moveDown:`Descer`},_={title:`Execuções guardadas`,refresh:`Atualizar`,hint:`Continua no worktree original com o âmbito e as configurações guardadas; o progresso aparece no registo desse trabalho. Não publica nem reinicia a entrega do Desktop. As execuções ativas param a partir dos controlos do trabalho.`,empty:`Não há execuções guardadas.`,loadFailed:`Não foi possível carregar as execuções.`,actionFailed:`Não foi possível atualizar esta execução.`,phase:`Próxima fase: {{phase}}`,approve:`Aprovar conclusão`,recover:`Recuperar fase interrompida`,resume:`Retomar`,cancel:`Cancelar continuação`,status:{running:`A continuar…`,succeeded:`Concluído`,failed:`Falhou`,blocked:`Bloqueado`,paused:`Em pausa`,cancelled:`Cancelado`,interrupted:`Interrompido`,unavailable:`Indisponível`},question:`O arquiteto pergunta:`,answerLabel:`A sua resposta`,answerPlaceholder:`Responda à pergunta; o arquiteto continua com ela.`,answer:`Responder e retomar`,viewLog:`Ver log do job`,implementation:`Implementação`,preserveProgress:`Continue a partir da fase indicada, preservando o trabalho e as configurações guardadas.`,reviewDelivery:`Implementação concluída. Reveja o resultado no log antes da entrega; esta continuação não o publicou.`,prepareDelivery:`Preparar entrega`},v={architect:`Lê o código e escreve a proposta, o design, as tarefas e a spec. Só leitura.`,developer:`Implementa as tarefas com testes. Pode editar ficheiros e executar comandos na sandbox do CLI.`,reviewer:`Confere o resultado com a spec e a evidência de verificação. Só leitura.`},y={title:`Limite de revisão`,hint:`Campos vazios usam o limite do Core. Os valores só podem elevá-lo: pontuação geral de pelo menos {{score}}, segurança de pelo menos {{security}}, outros aspetos de pelo menos {{aspect}}.`,minScore:`Pontuação geral mínima (padrão {{score}})`,aspects:{type_correctness:`Correção de tipos (padrão {{score}})`,pattern_adherence:`Aderência a padrões (padrão {{score}})`,test_coverage:`Cobertura de testes (padrão {{score}})`,security:`Segurança (padrão {{score}})`,architectural_alignment:`Alinhamento arquitetural (padrão {{score}})`}},b={title:`Confiança do arquiteto`,hint:`Após uma passagem de investigação autónoma, um design ainda com baixa confiança pausa com a pergunta do arquiteto ou prossegue com suposições declaradas.`,onLowConfidence:`Com baixa confiança`,ask:`Perguntar (pausar com a pergunta)`,proceed:`Prosseguir com suposições declaradas`},x={title:`Consumo e tempo`,hint:`Inclui correções e chamadas falhadas. O tempo dos agentes inclui as ferramentas. Os tokens em cache fazem parte dos tokens de entrada.`,unknown:`Indisponível`,duration:`Tempo de execução`,agentTime:`Tempo dos agentes`,cost:`Custo reportado`,providerCalls:`Chamadas a agentes`,toolCalls:`Chamadas a ferramentas`,input:`Tokens de entrada`,output:`Tokens de saída`,uncached:`Entrada sem cache`,cacheRead:`Leituras da cache`,cacheWrite:`Escritas na cache`,partial:`Algumas tentativas não têm medições detalhadas.`,phases:`Consumo por fase`,phase:`Fase`,attempts:`Tentativas`},S={title:`Prompts dos papéis dos agentes`,description:`Veja e edite as instruções de cada papel. São partilhadas por todos os projetos e fornecedores; as alterações aplicam-se a novos trabalhos. Os trabalhos retomados mantêm os prompts originais.`,definition:`Definição de {{role}}`,default:`Predefinição de fábrica`,custom:`Personalizado`,restore:`Restaurar predefinição`,contracts:`O contexto da spec, o fluxo OpenSpec e o formato de resposta obrigatório são adicionados automaticamente e não são editados aqui.`,invalid:`Cada definição deve conter entre 1 e 20.000 caracteres, com texto não vazio e sem bytes nulos.`,saved:`Prompts dos papéis guardados`,unsaved:`Alterações por guardar`,discard:`Descartar alterações`,save:`Guardar prompts`},C={title:`Eficiência da implementação`,scope:`Aplica-se a novas execuções. As execuções guardadas mantêm a configuração e o motor originais.`,effort:`Esforço de raciocínio`,providerDefault:`Padrão do fornecedor`,unconfirmed:`Não confirmado`,unknownSupport:`O suporte deste modelo e transporte não está confirmado.`,escalation:`Permitir um nível superior com o mesmo fornecedor`,baseRequired:`Selecione primeiro um modelo base explícito.`,escalationModel:`Modelo de nível superior`,triggers:{architect:`Apenas a investigação aprofundada existente pode selecionar este nível.`,developer:`Após dois candidatos falhados, a próxima tentativa permitida pode selecionar este nível.`,reviewer:`Apenas para reparar respostas inválidas; rejeitar código não ativa este nível.`},contextMode:`Contexto do repositório`,reviewMode:`Revisão de correções`,planning:`Profundidade do planeamento`,adaptive:`Adaptativo`,full:`Completo`,developerChecks:`Aceitar verificações adicionais propostas pelo programador`,concurrency:`Máximo de verificações simultâneas`,concurrencyHint:`Padrão: 1. Apenas verificações independentes declaradas pelo anfitrião em repositórios diferentes podem executar em conjunto. Sem reutilização por padrão.`,checkCapabilities:`Verificar compatibilidade dos modelos`,capabilitiesFailed:`Compatibilidade não confirmada. Atualize Core ou mantenha os padrões do fornecedor.`},w={title:`Evidências de verificação`,acceptance:`Aceitação técnica`,acceptanceStatus:{pending:`Pendente`,validated:`Validado`,"with-exceptions":`Com exceções`,blocked:`Bloqueado`},calls:`Chamadas aos agentes`,executed:`Verificações executadas`,reused:`Verificações reutilizadas`,unknown:`Indisponível`,unavailable:`Evidência indisponível. O resultado guardado não prova a validade atual.`,current:`Candidato e plano atuais`,historical:`Resultado histórico`,moreChecks:`Mais verificações`,output:`Saída da verificação`,empty:`Sem saída`,truncated:`Página limitada ou captura truncada.`,nextPage:`Página seguinte`,status:{passed:`Aprovado`,failed:`Falhou`,cancelled:`Cancelado`,interrupted:`Interrompido`},disposition:{executed:`Executado`,reused:`Reutilizado`,"not-run":`Não executado`},origin:`Origem`,origins:{host:`Anfitrião`,architect:`Arquiteto`,developer:`Programador`,"frozen-runtime-config":`Configuração guardada`,"project-role":`Papel do projeto`,default:`Padrão`,"explicit-launch-override":`Fornecedor escolhido para esta execução`},reuseDisabled:`Reutilização desativada para esta verificação.`,reuseConfirmed:`Reutilizado após confirmar entradas e ferramentas idênticas.`,inputsChanged:`As entradas mudaram durante a verificação; resultado invalidado.`,reuseUnproven:`Sem resultado atual com entradas idênticas comprovadas; executado novamente.`,original:`Execução original`,requested:`Solicitado`,reported:`Reportado`},T={title:e,description:t,loading:n,loadFailed:r,retry:i,unavailable:a,save:o,saving:s,saved:c,saveFailed:l,approvalBeforeArchive:u,providers:d,cliNames:f,roles:p,agents:m,limits:h,verification:g,runs:_,roleHints:v,review:y,architect:b,metrics:x,prompts:S,efficiency:C,evidence:w};export{m as agents,u as approvalBeforeArchive,b as architect,f as cliNames,T as default,t as description,C as efficiency,w as evidence,h as limits,r as loadFailed,n as loading,x as metrics,S as prompts,d as providers,i as retry,y as review,v as roleHints,p as roles,_ as runs,o as save,l as saveFailed,c as saved,s as saving,e as title,a as unavailable,g as verification};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={job:`Job`,quickSpec:`Quick`,exploreSpec:`Explore`,aiEdit:`Raffinamento`,smash:`SMASH`,fileSummary:`Riepiloghi file`,loop:`Loops`,chatSidebar:`Chat`,specLauncher:`Avvio spec`,proposal:`Proposta`,agentStudio:`Agent Studio`,setup:`Configurazione`},t={d7:`7d`,d30:`30d`,d90:`90d`,all:`Tutto`,custom:`Personalizzato`,startDate:`Data di inizio`,endDate:`Data di fine`,to:`a`},n=`{{count}} esecuzione`,r=`{{count}} esecuzioni`,i={title:`Analytics`,all:`Tutti`,engine:`Engine`,ticketChip:`ticket #{{id}} · ✕`,failedToLoad:`Caricamento non riuscito: {{error}}`,modelChip:`Modello: {{model}}`,clearModelFilter:`Rimuovi filtro modello`},a={spending:`Spesa`,vsPrev:`{{pct}}% vs prec.`,invocations_one:`{{count}} invocazione`,invocations_other:`{{count}} invocazioni`,tokens:`· {{tokens}} token`,tokensTooltip:`Token totali = input nuovo + output + lettura cache + creazione cache su tutte le invocazioni in questa finestra.`,usageUnavailable:`· utilizzo dei token non disponibile`,usageUnavailableTooltip:`Il provider ha completato queste invocazioni senza esporre la telemetria dei token.`,usagePartiallyUnavailable:`· {{tokens}} token noti; senza dati: {{count}}`,usagePartiallyUnavailableTooltip:`Solo subtotale noto; alcune invocazioni non espongono la telemetria dei token.`,costUnavailable:`costo non disponibile`,costUnavailableTooltip:`Il provider ha completato queste invocazioni senza esporre telemetria sufficiente per determinarne il costo.`,costPartiallyUnavailable:`· subtotale noto; senza costo: {{count}}`,costPartiallyUnavailableTooltip:`Solo subtotale noto; alcune invocazioni non espongono telemetria sufficiente per determinarne il costo.`,includesEstimated:`· include ~{{amount}} stimati`,includesEstimatedTooltip:`Include {{amount}} di costo stimato da provider senza un campo di costo nativo (es. codex tramite la tabella prezzi locale).`,trackingStarted:`Tracciamento iniziato il {{date}}`,trackingStartedFallback:`Il tracciamento inizia alla prima invocazione`,emptyState:`Ancora nessuna invocazione per questa finestra di filtri.`,segmentTitle:`{{label}}: {{value}}`},o={title:`Per provider`,description:`Come si ripartisce il costo tra le CLI AI di questo progetto. Il prefisso <tilde>~</tilde> indica le righe in cui il costo è stimato dalla tabella prezzi locale (il provider non lo riporta nativamente).`,noCost:`Ancora nessun costo registrato in questa finestra.`,segmentTitle:`{{label}}: {{value}} ({{count}})`,costUnavailable:`costo non disponibile`,costUnavailableTooltip:`Questo provider è stato eseguito ma il suo modello non è nella tabella prezzi, quindi non è stato possibile calcolare alcun costo.`,costPartiallyUnavailable:`· non disponibili: {{count}}`,costPartiallyUnavailableTooltip:`Solo subtotale noto; il costo di alcune esecuzioni non è disponibile.`},s={title:`Timeline giornaliera`,subtitle:`impilata per origine`,empty:`Nessuna spesa in questo periodo.`,costUnavailable:`Sono state registrate invocazioni, ma la telemetria dei costi non è disponibile.`,costPartiallyUnavailable:`costi noti · non disponibili: {{count}}`},c={title:`Quick vs Explore`,quick:`Quick`,explore:`Explore`,sparseCta:`Prova Explore per spec più ricche`,runsSoFar_one:`{{count}} esecuzione finora`,runsSoFar_other:`{{count}} esecuzioni finora`,perSpec:`per spec`,createdRuns:`<strong>{{created}}</strong> create · {{runs}} esecuzioni`,avgDuration:`{{duration}} in media`,ratio:`{{ratio}}× in più per spec`,estimatedTooltip:`Costo stimato (stima da tabella prezzi per codex/gemini, non fatturato dal provider)`,estimatedFootnote:`~ Include costi stimati (codex/gemini)`,costUnavailable:`costo per spec non disponibile`,costUnavailableTooltip:`Non è possibile calcolare la media per spec perché una o più esecuzioni non espongono il costo.`},l={title:`Modelli`,empty:`Nessun modello registrato.`,estimatedTooltip:`Stimato dalla tabella prezzi locale — questo provider non riporta il costo in modo nativo.`,others:`Altri`,costUnavailableWithRuns:`— · {{count}}`,costUnavailableTooltip:`La telemetria dei costi non è disponibile per tutte le esecuzioni di questo modello.`,costPartiallyUnavailable:`· non disponibili: {{count}}`,costPartiallyUnavailableTooltip:`Solo subtotale noto; alcune esecuzioni di questo modello non hanno telemetria dei costi.`},u={title:`Costo vs Turni`,empty:`Nessuna invocazione da rappresentare.`,turnsLabel:`turni`,costLabel:`costo`,truncated:`Visualizzati {{shown}} di {{total}} — il punto più costoso viene mantenuto, ma i punti precedenti sono nascosti`,costUnavailable:`Sono state registrate invocazioni, ma non sono disponibili dati di costo da rappresentare.`,costPartiallyUnavailable:`Il grafico include solo le esecuzioni con costo; costo non disponibile: {{count}}.`},d={title:`Top ticket`,empty:`Nessuna attività sui ticket in questo periodo.`,breakdownItem:`{{n}} {{label}}`,unattributed:`Non attribuito`,deletedTicket:`ticket eliminato #{{id}}`,costUnavailable:`costo non disponibile`,costUnavailableTooltip:`Nessuna esecuzione di questo ticket ha esposto telemetria dei costi.`,costPartiallyUnavailable:`non disponibili: {{count}}`,costPartiallyUnavailableTooltip:`Solo subtotale noto; alcune esecuzioni di questo ticket non hanno un costo disponibile.`},f={title:`Tutte le invocazioni`,statusFilterAria:`Filtro stato`,minCostFilterAria:`Filtro costo minimo`,minCostPlaceholder:`≥ $0.00`,allStatus:`Tutti gli stati`,success:`Riuscita`,failed:`Fallita`,aborted:`Interrotta`,empty:`Nessuna invocazione corrisponde ai filtri attuali.`,colSurface:`Origine`,colTicket:`Ticket`,colCost:`Costo`,colTurns:`Turni`,colTokens:`Token`,colModel:`Modello`,colStatus:`Stato`,colStarted:`Avvio`,contractLayer:`Contract Layer`,contractLayerRefinement:`Raffinamento Contract Layer`,deleted:`(eliminato)`,provisionalTitleTooltip:`Titolo Explore provvisorio — non ancora confermato`,estimatedCostTooltip:`Stimato dalla tabella prezzi locale — questo provider non riporta il costo nativamente.`,inferred:`dedotto`,statusValue:{success:`riuscita`,failed:`fallita`,aborted:`interrotta`},truncated:`Mostrate le prime {{shown}} di {{total}} righe corrispondenti.`,colProvider:`Provider`,sortLabel:`Ordina`,sortRecency:`Recenti`,sortCost:`Costo`},p={title:`Analytics di Desktop`,refreshAria:`Aggiorna le analytics`,failedToLoad:`Impossibile caricare le analytics: {{error}}`,totalCost:`Costo totale`,costToday:`{{value}} oggi`,costTodayUnavailable:`costo non disponibile oggi`,totalJobs:`Job totali`,jobsToday:`{{n}} oggi`,successRate:`Tasso di successo`,acrossAllProjects:`su tutti i progetti`,avgCostPerJob:`Costo medio / job`,periodAverage:`media del periodo`,averageUnavailable:`media non disponibile con telemetria dei costi incompleta`,costOverTime:`Costo nel tempo tra i progetti`,noCostData:`Nessun dato di costo per questo periodo`,projectComparison:`Confronto progetti`,noProjects:`Nessun progetto registrato.`,jobsCount_one:`{{count}} job`,jobsCount_other:`{{count}} job`,successPct:`{{pct}}% di successo`,costByProject:`Costo per progetto`,includesEstimated:`~{{amount}} stimato`,includesEstimatedTooltip:`Include {{amount}} di costo stimato da tabella prezzi (codex/gemini), non fatturato dal provider.`,includesEstimatedShort:`incl. stimato`,timelineEstimatedTooltip:`Alcuni giorni includono un costo stimato da tabella prezzi (codex/gemini) contrassegnato con ~.`,estimatedBadge:`stim.`,projectEstimatedTooltip:`{{amount}} del costo di questo progetto è una stima da tabella prezzi (codex/gemini), non fatturato dal provider.`,statusBarEstimatedTooltip:`Include un costo stimato da tabella prezzi (codex/gemini), non fatturato dal provider.`,costUnavailable:`Sono state registrate invocazioni, ma la telemetria dei costi non è disponibile.`,costUnavailableShort:`non disponibile`,costPartiallyUnavailable:`Subtotale dei costi noti; invocazioni senza costo: {{count}}.`},m={"7d":`Ultimi 7 giorni`,"30d":`Ultimi 30 giorni`,"90d":`Ultimi 90 giorni`,all:`Sempre`,custom:`Intervallo personalizzato`},h={title:`Missioni dell’agente`,subtitle:`Turni di Agent Chat fissati a questo progetto`,vsPrev:`vs periodo precedente`,turnsAndTokens:`{{turns}} turni · {{tokens}} token`,untitled:`Missione senza titolo`,estimatedNote:`Include costi stimati`},g={surfaces:e,periods:t,runs_one:n,runs_other:r,page:i,hero:a,providerCard:o,timeline:s,quickVsExplore:c,models:l,scatter:u,topTickets:d,table:f,export:{summaryCsv:`CSV riepilogo`,rawCsv:`CSV raw`,summaryJson:`JSON riepilogo`,rawJson:`JSON raw`,downloading:`Download in corso…`,noData:`Nessun dato per i filtri attuali`,failed:`Esportazione non riuscita`},desktop:p,windowLabels:m,agentMissions:h};export{h as agentMissions,g as default,p as desktop,a as hero,l as models,i as page,t as periods,o as providerCard,c as quickVsExplore,n as runs_one,r as runs_other,u as scatter,e as surfaces,f as table,s as timeline,d as topTickets,m as windowLabels};
|