@bpinhosilva/agent-orchestrator 1.0.0-alpha.21 → 1.0.0-alpha.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/ui/assets/AgentFleet-CC0h_Ar0.js +1 -0
  3. package/dist/ui/assets/AgentFleet-CC0h_Ar0.js.map +1 -0
  4. package/dist/ui/assets/ConfirmDialog-mRH8i_xK.js +10 -0
  5. package/dist/ui/assets/ConfirmDialog-mRH8i_xK.js.map +1 -0
  6. package/dist/ui/assets/InitialsAvatar-0mIRaTK8.js +1 -0
  7. package/dist/ui/assets/InitialsAvatar-0mIRaTK8.js.map +1 -0
  8. package/dist/ui/assets/MarkdownField-flCuU7w3.js +1 -0
  9. package/dist/ui/assets/MarkdownField-flCuU7w3.js.map +1 -0
  10. package/dist/ui/assets/ProjectDetail-CY-VSV2D.js +1 -0
  11. package/dist/ui/assets/ProjectDetail-CY-VSV2D.js.map +1 -0
  12. package/dist/ui/assets/Providers-C9_lxOG1.js +1 -0
  13. package/dist/ui/assets/Providers-C9_lxOG1.js.map +1 -0
  14. package/dist/ui/assets/Scheduler-Du2cIGfB.js +1 -0
  15. package/dist/ui/assets/Scheduler-Du2cIGfB.js.map +1 -0
  16. package/dist/ui/assets/TaskDetail-BdQJCVo3.js +1 -0
  17. package/dist/ui/assets/TaskDetail-BdQJCVo3.js.map +1 -0
  18. package/dist/ui/assets/TaskManager-CWDh69pf.js +8 -0
  19. package/dist/ui/assets/TaskManager-CWDh69pf.js.map +1 -0
  20. package/dist/ui/assets/{activity-CYFCUKYz.js → activity-CIlCK2jL.js} +1 -1
  21. package/dist/ui/assets/activity-CIlCK2jL.js.map +1 -0
  22. package/dist/ui/assets/{brain-D1LPqnhA.js → brain-_N041Xks.js} +1 -1
  23. package/dist/ui/assets/brain-_N041Xks.js.map +1 -0
  24. package/dist/ui/assets/check-DgCfni6J.js +1 -0
  25. package/dist/ui/assets/check-DgCfni6J.js.map +1 -0
  26. package/dist/ui/assets/clock-C0d1RzP_.js +1 -0
  27. package/dist/ui/assets/clock-C0d1RzP_.js.map +1 -0
  28. package/dist/ui/assets/cn-i-5ItZGU.js +1 -0
  29. package/dist/ui/assets/cn-i-5ItZGU.js.map +1 -0
  30. package/dist/ui/assets/{eye-DSoNYXlu.js → eye-RB18-re_.js} +1 -1
  31. package/dist/ui/assets/eye-RB18-re_.js.map +1 -0
  32. package/dist/ui/assets/index-CCsHBe__.css +1 -0
  33. package/dist/ui/assets/index-yzhzS93F.js +2 -0
  34. package/dist/ui/assets/index-yzhzS93F.js.map +1 -0
  35. package/dist/ui/assets/{layers-BQR0gbW3.js → layers-D5ECV506.js} +1 -1
  36. package/dist/ui/assets/layers-D5ECV506.js.map +1 -0
  37. package/dist/ui/assets/providers-BMRq_pkm.js +1 -0
  38. package/dist/ui/assets/providers-BMRq_pkm.js.map +1 -0
  39. package/dist/ui/assets/rolldown-runtime-COnpUsM8.js +1 -0
  40. package/dist/ui/assets/{send-Cgv_rLex.js → send-BA7-sXzg.js} +1 -1
  41. package/dist/ui/assets/send-BA7-sXzg.js.map +1 -0
  42. package/dist/ui/assets/{shield-check-02qtz3Au.js → shield-check-D7JIluse.js} +1 -1
  43. package/dist/ui/assets/shield-check-D7JIluse.js.map +1 -0
  44. package/dist/ui/assets/{sparkles-cO3r5TCU.js → sparkles-CCXaTT3H.js} +1 -1
  45. package/dist/ui/assets/sparkles-CCXaTT3H.js.map +1 -0
  46. package/dist/ui/assets/{tasks-BZ0wO0e9.js → tasks-DEHCZk48.js} +1 -1
  47. package/dist/ui/assets/tasks-DEHCZk48.js.map +1 -0
  48. package/dist/ui/assets/{trash-2-7e8TY3SJ.js → trash-2-BNP4kC5c.js} +1 -1
  49. package/dist/ui/assets/trash-2-BNP4kC5c.js.map +1 -0
  50. package/dist/ui/assets/{trending-up-Dh3I3BnW.js → trending-up-DBTQIgW8.js} +1 -1
  51. package/dist/ui/assets/trending-up-DBTQIgW8.js.map +1 -0
  52. package/dist/ui/assets/useNotification-DK-pV16c.js +6 -0
  53. package/dist/ui/assets/useNotification-DK-pV16c.js.map +1 -0
  54. package/dist/ui/assets/{user-sikuVJBW.js → user-Cp55HCCi.js} +1 -1
  55. package/dist/ui/assets/user-Cp55HCCi.js.map +1 -0
  56. package/dist/ui/assets/vendor-dnd-CxfOy4-Z.js +5 -0
  57. package/dist/ui/assets/vendor-dnd-CxfOy4-Z.js.map +1 -0
  58. package/dist/ui/assets/vendor-forms-HC2wK6B9.js +39 -0
  59. package/dist/ui/assets/vendor-forms-HC2wK6B9.js.map +1 -0
  60. package/dist/ui/assets/vendor-markdown-Dl_1qnne.js +29 -0
  61. package/dist/ui/assets/vendor-markdown-Dl_1qnne.js.map +1 -0
  62. package/dist/ui/assets/vendor-motion-CkXYvnuI.js +9 -0
  63. package/dist/ui/assets/vendor-motion-CkXYvnuI.js.map +1 -0
  64. package/dist/ui/assets/vendor-query-DQlZ8h7P.js +1 -0
  65. package/dist/ui/assets/vendor-query-DQlZ8h7P.js.map +1 -0
  66. package/dist/ui/assets/vendor-react-CiDbU5Ns.js +11 -0
  67. package/dist/ui/assets/vendor-react-CiDbU5Ns.js.map +1 -0
  68. package/dist/ui/assets/{zap-CFqyHdPJ.js → zap-D1sST66b.js} +1 -1
  69. package/dist/ui/assets/zap-D1sST66b.js.map +1 -0
  70. package/dist/ui/index.html +9 -4
  71. package/package.json +1 -1
  72. package/dist/ui/assets/AgentFleet-CQIXvils.js +0 -6
  73. package/dist/ui/assets/ConfirmDialog-nQ8F6FEz.js +0 -1
  74. package/dist/ui/assets/MarkdownField-BvkVHJZh.js +0 -29
  75. package/dist/ui/assets/ProjectDetail-CZ-tFtQo.js +0 -1
  76. package/dist/ui/assets/Providers-C61nXOPZ.js +0 -1
  77. package/dist/ui/assets/Scheduler-BwWeFfsh.js +0 -1
  78. package/dist/ui/assets/TaskDetail-BKQ3Vgnu.js +0 -1
  79. package/dist/ui/assets/TaskManager-CCOnj4Gq.js +0 -16
  80. package/dist/ui/assets/check-BZcW41Vk.js +0 -1
  81. package/dist/ui/assets/clock-vIUNSAVw.js +0 -1
  82. package/dist/ui/assets/file-text-DyBkf5PF.js +0 -1
  83. package/dist/ui/assets/index-BX3YIi49.css +0 -1
  84. package/dist/ui/assets/index-Ctbpa_Ei.js +0 -20
  85. package/dist/ui/assets/providers-C3SQm75E.js +0 -1
  86. package/dist/ui/assets/useNotification-nXJIHD_q.js +0 -6
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskDetail-BdQJCVo3.js","names":["__iconNode","__iconNode","__iconNode","__iconNode","__iconNode"],"sources":["../../node_modules/lucide-react/dist/esm/icons/arrow-left-right.js","../../node_modules/lucide-react/dist/esm/icons/circle-stop.js","../../node_modules/lucide-react/dist/esm/icons/download.js","../../node_modules/lucide-react/dist/esm/icons/messages-square.js","../../node_modules/lucide-react/dist/esm/icons/settings-2.js","../../node_modules/lucide-react/dist/esm/icons/wallet.js","../../src/api/comments.ts","../../src/components/tasks/AttachmentItem.tsx","../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs/plugin/relativeTime.js","../../src/components/tasks/CommentItem.tsx","../../src/components/tasks/CommentList.tsx","../../src/components/tasks/CommentEditor.tsx","../../src/components/tasks/CommentSection.tsx","../../src/pages/TaskDetail.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M8 3 4 7l4 4\", key: \"9rb6wj\" }],\n [\"path\", { d: \"M4 7h16\", key: \"6tx8e3\" }],\n [\"path\", { d: \"m16 21 4-4-4-4\", key: \"siv7j2\" }],\n [\"path\", { d: \"M20 17H4\", key: \"h6l3hr\" }]\n];\nconst ArrowLeftRight = createLucideIcon(\"arrow-left-right\", __iconNode);\n\nexport { __iconNode, ArrowLeftRight as default };\n//# sourceMappingURL=arrow-left-right.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"rect\", { x: \"9\", y: \"9\", width: \"6\", height: \"6\", rx: \"1\", key: \"1ssd4o\" }]\n];\nconst CircleStop = createLucideIcon(\"circle-stop\", __iconNode);\n\nexport { __iconNode, CircleStop as default };\n//# sourceMappingURL=circle-stop.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }]\n];\nconst Download = createLucideIcon(\"download\", __iconNode);\n\nexport { __iconNode, Download as default };\n//# sourceMappingURL=download.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\",\n key: \"1n2ejm\"\n }\n ],\n [\n \"path\",\n {\n d: \"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1\",\n key: \"1qfcsi\"\n }\n ]\n];\nconst MessagesSquare = createLucideIcon(\"messages-square\", __iconNode);\n\nexport { __iconNode, MessagesSquare as default };\n//# sourceMappingURL=messages-square.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M14 17H5\", key: \"gfn3mx\" }],\n [\"path\", { d: \"M19 7h-9\", key: \"6i9tg\" }],\n [\"circle\", { cx: \"17\", cy: \"17\", r: \"3\", key: \"18b49y\" }],\n [\"circle\", { cx: \"7\", cy: \"7\", r: \"3\", key: \"dfmy0x\" }]\n];\nconst Settings2 = createLucideIcon(\"settings-2\", __iconNode);\n\nexport { __iconNode, Settings2 as default };\n//# sourceMappingURL=settings-2.js.map\n","/**\n * @license lucide-react v0.577.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1\",\n key: \"18etb6\"\n }\n ],\n [\"path\", { d: \"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4\", key: \"xoc0q4\" }]\n];\nconst Wallet = createLucideIcon(\"wallet\", __iconNode);\n\nexport { __iconNode, Wallet as default };\n//# sourceMappingURL=wallet.js.map\n","import client from './client';\n\nexport const CommentAuthorType = {\n USER: 'user',\n AGENT: 'agent',\n} as const;\n\nexport type CommentAuthorType = typeof CommentAuthorType[keyof typeof CommentAuthorType];\n\nexport interface TaskComment {\n id: string;\n content: string;\n authorType: CommentAuthorType;\n authorUser?: {\n id: string;\n username: string;\n avatarUrl?: string;\n };\n authorAgent?: {\n id: string;\n name: string;\n avatarUrl?: string;\n };\n artifacts?: {\n id: string;\n originalName: string;\n mimeType: string;\n filePath: string;\n }[];\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface CreateCommentDto {\n content: string;\n authorType: CommentAuthorType;\n authorUserId?: string;\n authorAgentId?: string;\n artifacts?: {\n originalName: string;\n mimeType: string;\n filePath: string;\n }[];\n}\n\nexport const commentsApi = {\n create: async (taskId: string, data: CreateCommentDto): Promise<TaskComment> => {\n const response = await client.post(`/tasks/${taskId}/comments`, data);\n return response.data;\n },\n\n findAllByTask: async (taskId: string): Promise<TaskComment[]> => {\n const response = await client.get(`/tasks/${taskId}/comments`);\n return response.data;\n },\n\n remove: async (taskId: string, commentId: string): Promise<void> => {\n await client.delete(`/tasks/${taskId}/comments/${commentId}`);\n },\n};\n","import React from 'react';\nimport { FileText, Download } from 'lucide-react';\n\ninterface AttachmentItemProps {\n name: string;\n size?: string;\n type: 'pdf' | 'png' | 'jpg' | 'svg' | 'jpeg' | 'gif' | string;\n filePath: string;\n}\n\nconst AttachmentItem: React.FC<AttachmentItemProps> = ({ name, size, type, filePath }) => {\n const isImage = ['png', 'jpg', 'jpeg', 'svg', 'gif'].includes(type.toLowerCase());\n // The backend uses api/v1 global prefix and uploads/artifacts as the controller path.\n // We use a relative path starting with /api/v1 to hit the Vite proxy correctly.\n const artifactUrl = filePath.startsWith('http') ? filePath : `/api/v1/${filePath}`;\n\n return (\n <div \n className=\"flex items-center gap-4 p-3 bg-surface-container-highest/40 rounded-lg border border-outline-variant/10 group hover:border-primary/20 transition-all cursor-pointer\"\n onClick={() => window.open(artifactUrl, '_blank')}\n >\n <div className={`h-10 w-10 rounded shadow-inner flex items-center justify-center overflow-hidden ${isImage ? 'bg-secondary/10 text-secondary' : 'bg-primary/10 text-primary'}`}>\n {isImage ? (\n <img src={artifactUrl} alt={name} className=\"h-full w-full object-cover\" />\n ) : (\n <FileText size={20} />\n )}\n </div>\n \n <div className=\"flex-1 min-w-0\">\n <p className=\"text-xs font-bold text-on-surface truncate\">{name}</p>\n <p className=\"text-[10px] text-on-surface-variant/60 font-medium uppercase tracking-tighter\">{size || 'Artifact'}</p>\n </div>\n\n <div className=\"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <button className=\"p-1.5 hover:bg-surface-container-highest rounded text-on-surface-variant hover:text-primary transition-colors\">\n <Download size={14} />\n </button>\n </div>\n </div>\n );\n};\n\nexport default AttachmentItem;\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","import React from 'react';\nimport { CommentAuthorType } from '../../api/comments';\nimport type { TaskComment } from '../../api/comments';\nimport AttachmentItem from './AttachmentItem';\nimport { Bot, User, Trash2 } from 'lucide-react';\nimport dayjs from 'dayjs';\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport ReactMarkdown from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\ndayjs.extend(relativeTime);\n\ninterface CommentItemProps {\n comment: TaskComment;\n onDelete?: (id: string) => void;\n}\n\nconst CommentItem: React.FC<CommentItemProps> = ({ comment, onDelete }) => {\n const isAgent = comment.authorType === CommentAuthorType.AGENT;\n const authorName = isAgent ? comment.authorAgent?.name : comment.authorUser?.username;\n const avatarUrl = isAgent ? comment.authorAgent?.avatarUrl : comment.authorUser?.avatarUrl;\n\n return (\n <div className=\"flex gap-4 group\">\n {/* Avatar */}\n <div className={`flex-shrink-0 h-10 w-10 rounded-xl flex items-center justify-center border transition-all ${\n isAgent \n ? 'bg-tertiary/10 border-tertiary/20 text-tertiary shadow-[0_0_15px_rgba(221,183,255,0.1)]' \n : 'bg-primary/10 border-primary/20 text-primary shadow-[0_0_15px_rgba(173,198,255,0.1)]'\n }`}>\n {avatarUrl ? (\n <img src={avatarUrl} alt={authorName} className=\"h-full w-full object-cover p-1\" />\n ) : (\n isAgent ? <Bot size={20} /> : <User size={20} />\n )}\n </div>\n\n {/* Content Area */}\n <div className=\"flex-1 space-y-3\">\n <div className=\"flex items-baseline justify-between\">\n <div className=\"flex items-center gap-2\">\n <span className={`text-sm font-headline font-bold ${isAgent ? 'text-tertiary' : 'text-primary'}`}>\n {authorName || 'Anonymous'}\n </span>\n {isAgent && (\n <span className=\"px-1.5 py-0.5 bg-tertiary/10 text-tertiary text-[9px] font-black uppercase tracking-widest rounded border border-tertiary/20\">\n Agent\n </span>\n )}\n </div>\n <div className=\"flex items-center gap-3\">\n <span className=\"text-xs font-mono text-on-surface-variant/40 lowercase\">\n {dayjs(comment.createdAt).format('MMM DD, YYYY HH:mm:ss')}\n </span>\n {onDelete && (\n <button \n onClick={() => onDelete(comment.id)}\n className=\"opacity-0 group-hover:opacity-100 p-2 hover:bg-error/10 text-on-surface-variant/40 hover:text-error rounded-lg transition-all\"\n title=\"Delete comment\"\n >\n <Trash2 size={18} />\n </button>\n )}\n </div>\n </div>\n\n <div className=\"bg-surface-container-high/40 border border-outline-variant/5 p-4 rounded-xl shadow-sm group-hover:bg-surface-container-high/60 transition-colors\">\n <div className=\"prose prose-invert prose-xs max-w-none text-on-surface leading-relaxed\">\n <ReactMarkdown remarkPlugins={[remarkGfm]}>\n {comment.content}\n </ReactMarkdown>\n </div>\n \n {comment.artifacts && comment.artifacts.length > 0 && (\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-3 mt-4 pt-4 border-t border-outline-variant/10\">\n {comment.artifacts.map((artifact) => (\n <AttachmentItem \n key={artifact.id}\n name={artifact.originalName}\n type={artifact.mimeType.split('/')[1] || 'file'}\n filePath={artifact.filePath}\n size=\"Artifact\" \n />\n ))}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport default CommentItem;\n","import React from 'react';\nimport type { TaskComment } from '../../api/comments';\nimport CommentItem from './CommentItem';\n\ninterface CommentListProps {\n comments: TaskComment[];\n isLoading: boolean;\n onDelete?: (id: string) => void;\n}\n\nconst CommentList: React.FC<CommentListProps> = ({ comments, isLoading, onDelete }) => {\n const content = (() => {\n if (isLoading) {\n return (\n <div className=\"space-y-6 animate-pulse\">\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"flex gap-4\">\n <div className=\"h-10 w-10 bg-surface-container-highest rounded-xl\"></div>\n <div className=\"flex-1 space-y-3\">\n <div className=\"h-4 w-1/4 bg-surface-container-highest rounded\"></div>\n <div className=\"h-20 w-full bg-surface-container-highest rounded-xl\"></div>\n </div>\n </div>\n ))}\n </div>\n );\n }\n\n if (comments.length === 0) {\n return (\n <div className=\"flex flex-col items-center justify-center p-12 text-center space-y-4 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20\">\n <div className=\"h-12 w-12 rounded-full bg-surface-container-highest flex items-center justify-center text-on-surface-variant/40\">\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z\"></path>\n </svg>\n </div>\n <div className=\"space-y-1\">\n <p className=\"text-sm font-bold text-on-surface\">No comments yet</p>\n <p className=\"text-xs text-on-surface-variant/60\">Start the conversation by adding a comment below.</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-8\">\n {comments.map((comment) => (\n <CommentItem key={comment.id} comment={comment} onDelete={onDelete} />\n ))}\n </div>\n );\n })();\n\n return (\n <div className=\"flex-1 overflow-y-auto px-6 py-6 custom-scrollbar\">\n {content}\n </div>\n );\n};\n\nexport default CommentList;\n","import React, { useState } from 'react';\nimport { Send } from 'lucide-react';\nimport MarkdownField from '../MarkdownField';\n\ninterface CommentEditorProps {\n onSend: (content: string) => void;\n isSending: boolean;\n}\n\nconst CommentEditor: React.FC<CommentEditorProps> = ({ onSend, isSending }) => {\n const [content, setContent] = useState('');\n\n const handleSend = () => {\n if (content.trim() && !isSending) {\n onSend(content);\n setContent('');\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {\n handleSend();\n }\n };\n\n return (\n <div className=\"bg-surface-container-low border border-outline-variant/10 rounded-2xl p-4 shadow-2xl shadow-primary/5 focus-within:border-primary/30 transition-all space-y-4\">\n <MarkdownField\n value={content}\n onChange={setContent}\n onKeyDown={handleKeyDown}\n placeholder=\"Write a comment...\"\n height=\"min-h-[120px]\"\n />\n \n <div className=\"flex items-center justify-between pt-4 border-t border-outline-variant/5\">\n <div className=\"flex items-center gap-1\">\n {/* Toolbar buttons removed as MarkdownField handles preview/write */}\n </div>\n\n <button\n onClick={handleSend}\n disabled={!content.trim() || isSending}\n className={`flex items-center gap-2 px-5 py-2.5 rounded-xl font-bold text-xs uppercase tracking-widest transition-all active:scale-95 disabled:opacity-50 disabled:active:scale-100 ${\n content.trim() \n ? 'bg-gradient-to-r from-primary to-primary/80 text-on-primary shadow-lg shadow-primary/20 hover:brightness-110' \n : 'bg-surface-container-highest text-on-surface-variant cursor-not-allowed'\n }`}\n >\n {isSending ? (\n <div className=\"w-4 h-4 rounded-full border-2 border-on-primary/30 border-t-on-primary animate-spin\"></div>\n ) : (\n <>\n Send\n <Send size={14} />\n </>\n )}\n </button>\n </div>\n </div>\n );\n};\n\nexport default CommentEditor;\n","import React, { useState, useCallback } from 'react';\nimport { MessagesSquare } from 'lucide-react';\nimport { useQuery, useQueryClient } from '@tanstack/react-query';\nimport { commentsApi, CommentAuthorType } from '../../api/comments';\nimport { useAuth } from '../../contexts/AuthContextInstance';\nimport CommentList from './CommentList';\nimport CommentEditor from './CommentEditor';\nimport ConfirmDialog from '../ConfirmDialog';\nimport { useNotification } from '../../hooks/useNotification';\n\ninterface CommentSectionProps {\n taskId: string;\n}\n\nconst CommentSection: React.FC<CommentSectionProps> = ({ taskId }) => {\n const [isSending, setIsSending] = useState(false);\n const [deleteConfirmId, setDeleteConfirmId] = useState<string | null>(null);\n const [isDeleting, setIsDeleting] = useState(false);\n const { user } = useAuth();\n const { notifySuccess, notifyApiError } = useNotification();\n const queryClient = useQueryClient();\n\n const { data: comments = [], isLoading } = useQuery({\n queryKey: ['comments', taskId],\n queryFn: async () => {\n const data = await commentsApi.findAllByTask(taskId);\n return [...data].sort(\n (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),\n );\n },\n enabled: Boolean(taskId),\n refetchInterval: 10_000,\n });\n\n const invalidateComments = useCallback(() => {\n queryClient.invalidateQueries({ queryKey: ['comments', taskId] });\n }, [queryClient, taskId]);\n\n const handleSendComment = async (content: string) => {\n if (!taskId || !user) return;\n\n try {\n setIsSending(true);\n\n await commentsApi.create(taskId, {\n content,\n authorType: CommentAuthorType.USER,\n authorUserId: user.id,\n });\n\n invalidateComments();\n } catch (error) {\n console.error('Failed to send comment:', error);\n } finally {\n setIsSending(false);\n }\n };\n\n const handleDeleteComment = (commentId: string) => {\n setDeleteConfirmId(commentId);\n };\n\n const confirmDelete = async () => {\n if (!taskId || !deleteConfirmId) return;\n \n try {\n setIsDeleting(true);\n await commentsApi.remove(taskId, deleteConfirmId);\n invalidateComments();\n setDeleteConfirmId(null);\n notifySuccess('Protocol Cleared', 'The comment data has been purged from the orchestration logs.');\n } catch (error) {\n console.error('Failed to delete comment:', error);\n notifyApiError(error, 'Purge Failed');\n } finally {\n setIsDeleting(false);\n }\n };\n\n return (\n <div className=\"bg-surface-container-low rounded-2xl border border-outline-variant/10 shadow-2xl shadow-primary/5 overflow-hidden flex flex-col h-full\">\n {/* Header */}\n <div className=\"p-6 border-b border-outline-variant/5 flex items-center justify-between bg-surface-container-low/50 backdrop-blur-md sticky top-0 z-10\">\n <div className=\"flex items-center gap-3\">\n <div className=\"bg-primary/20 p-2.5 rounded-xl shadow-lg shadow-primary/10\">\n <MessagesSquare size={22} className=\"text-secondary stroke-[2.5]\" />\n </div>\n <h2 className=\"text-lg font-headline font-black tracking-tight text-on-surface\">Comments & Activity</h2>\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-[10px] bg-white/5 border border-white/10 px-2 py-0.5 rounded text-white/40 font-mono tracking-widest uppercase\">\n {comments.length} Logged\n </span>\n </div>\n </div>\n\n {/* Comment List Area */}\n <div className=\"flex-1 min-h-0 flex flex-col\">\n <CommentList \n comments={comments} \n isLoading={isLoading} \n onDelete={handleDeleteComment} \n />\n </div>\n\n {/* Editor Area */}\n <div className=\"p-6 bg-surface-container-low/50 border-t border-outline-variant/5 backdrop-blur-md\">\n <CommentEditor onSend={handleSendComment} isSending={isSending} />\n </div>\n\n <ConfirmDialog\n isOpen={!!deleteConfirmId}\n onClose={() => !isDeleting && setDeleteConfirmId(null)}\n onConfirm={confirmDelete}\n title=\"Purge Communication Protocol?\"\n message=\"This action will permanently erase the selected entry and all its associated artifacts from the neural stream. This operation is irreversible.\"\n confirmText=\"Execute Purge\"\n variant=\"danger\"\n loading={isDeleting}\n />\n </div>\n );\n};\n\nexport default CommentSection;\n","import { useEffect, useId, useMemo } from 'react';\nimport { Controller, useForm, useWatch } from 'react-hook-form';\nimport { zodResolver } from '@hookform/resolvers/zod';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useNavigate, useParams } from 'react-router-dom';\nimport {\n ArrowLeftRight,\n ChevronRight,\n Save,\n Settings2,\n ShieldCheck,\n StopCircle,\n Trash2,\n Wallet,\n Zap,\n} from 'lucide-react';\nimport { agentsApi, type Agent } from '../api/agents';\nimport { tasksApi, TaskPriority, TaskStatus, type Task } from '../api/tasks';\nimport MarkdownField from '../components/MarkdownField';\nimport CommentSection from '../components/tasks/CommentSection';\nimport InitialsAvatar from '../components/InitialsAvatar';\nimport { useNotification } from '../hooks/useNotification';\nimport { taskDetailSchema, type TaskDetailFormValues } from '../lib/taskFormSchemas';\n\ninterface ExtendedTask extends Omit<Task, 'id'> {\n id: string;\n llm_latency?: number;\n cost_estimate?: number;\n}\n\nconst taskDetailDefaults: TaskDetailFormValues = {\n title: '',\n description: '',\n status: TaskStatus.BACKLOG,\n priority: TaskPriority.MEDIUM,\n assigneeId: '',\n};\n\nconst TaskDetail = () => {\n const { projectId, taskId } = useParams<{ projectId: string; taskId: string }>();\n const navigate = useNavigate();\n const queryClient = useQueryClient();\n const { notifyApiError, notifyError, notifySuccess } = useNotification();\n const statusErrorId = useId();\n const titleErrorId = useId();\n const priorityErrorId = useId();\n const descriptionErrorId = useId();\n const assigneeErrorId = useId();\n\n const {\n control,\n formState: { errors, isDirty },\n handleSubmit,\n register,\n reset,\n setValue,\n } = useForm<TaskDetailFormValues>({\n resolver: zodResolver(taskDetailSchema),\n defaultValues: taskDetailDefaults,\n mode: 'onBlur',\n });\n\n const taskQuery = useQuery({\n queryKey: ['task', projectId, taskId],\n enabled: Boolean(projectId && taskId),\n queryFn: async () => {\n const response = await tasksApi.findOne(projectId!, taskId!);\n return response.data as ExtendedTask;\n },\n });\n\n const agentsQuery = useQuery({\n queryKey: ['agents'],\n queryFn: async () => {\n const response = await agentsApi.findAll();\n return response.data;\n },\n });\n\n useEffect(() => {\n if (taskQuery.error) {\n notifyApiError(taskQuery.error, 'Fetch Error');\n }\n }, [notifyApiError, taskQuery.error]);\n\n useEffect(() => {\n if (agentsQuery.error) {\n notifyApiError(agentsQuery.error, 'Agents Load Failed');\n }\n }, [agentsQuery.error, notifyApiError]);\n\n useEffect(() => {\n if (!taskQuery.data) {\n return;\n }\n\n const normalizedStatus =\n taskQuery.data.status === TaskStatus.ARCHIVED ? TaskStatus.BACKLOG : taskQuery.data.status;\n\n reset({\n title: taskQuery.data.title,\n description: taskQuery.data.description,\n status: normalizedStatus,\n priority: taskQuery.data.priority,\n assigneeId: taskQuery.data.assignee?.id ?? '',\n });\n }, [reset, taskQuery.data]);\n\n const updateMutation = useMutation({\n mutationFn: async (values: TaskDetailFormValues) => {\n if (!projectId || !taskId) {\n throw new Error('Task route is missing required identifiers');\n }\n\n await tasksApi.update(projectId, taskId, {\n title: values.title,\n description: values.description,\n status: values.status,\n priority: values.priority as TaskPriority,\n assigneeId: values.assigneeId || null,\n });\n\n return values;\n },\n onSuccess: (values) => {\n if (!projectId || !taskId) {\n return;\n }\n\n queryClient.invalidateQueries({ queryKey: ['task', projectId, taskId] });\n queryClient.invalidateQueries({ queryKey: ['tasks', projectId] });\n reset(values);\n notifySuccess('Task Updated', 'Intelligence node parameters successfully reconfigured.');\n },\n onError: (error) => {\n notifyApiError(error, 'Update Failed');\n },\n });\n\n const deleteMutation = useMutation({\n mutationFn: async () => {\n if (!projectId || !taskId) {\n throw new Error('Task route is missing required identifiers');\n }\n\n await tasksApi.delete(projectId, taskId);\n },\n onSuccess: () => {\n if (projectId) {\n queryClient.invalidateQueries({ queryKey: ['tasks', projectId] });\n }\n queryClient.removeQueries({ queryKey: ['task', projectId, taskId] });\n notifySuccess('Task Decommissioned', 'Intelligence node removed from the orchestration grid.');\n navigate('/');\n },\n onError: (error) => {\n notifyApiError(error, 'Decommission Failed');\n },\n });\n\n const task = taskQuery.data;\n const agents = useMemo(() => agentsQuery.data ?? [], [agentsQuery.data]);\n const currentTitle = useWatch({ control, name: 'title' });\n const currentStatus = useWatch({ control, name: 'status' });\n const currentPriority = useWatch({ control, name: 'priority' });\n const currentAssigneeId = useWatch({ control, name: 'assigneeId' });\n const selectedAgent = useMemo(\n () => agents.find((agent) => agent.id === currentAssigneeId) ?? null,\n [agents, currentAssigneeId],\n );\n\n const isBusy = taskQuery.isPending || updateMutation.isPending || deleteMutation.isPending;\n\n const handleSave = handleSubmit(\n async (values) => {\n await updateMutation.mutateAsync(values);\n },\n () => {\n notifyError('Validation Error', 'Please review the highlighted fields before saving.');\n },\n );\n\n const handleDelete = () => {\n if (deleteMutation.isPending) {\n return;\n }\n\n if (!window.confirm('Are you sure you want to decommission this task node?')) {\n return;\n }\n\n deleteMutation.mutate();\n };\n\n if (taskQuery.isPending) {\n return (\n <div className=\"w-full h-[60vh] flex items-center justify-center\" aria-busy=\"true\">\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin\"></div>\n <p className=\"text-on-surface-variant text-sm font-black uppercase tracking-[0.3em] animate-pulse\">\n Accessing Node Data\n </p>\n </div>\n </div>\n );\n }\n\n if (!task) {\n return (\n <div className=\"max-w-4xl mx-auto w-full py-16 text-center space-y-4\">\n <p className=\"text-sm font-black uppercase tracking-[0.2em] text-on-surface-variant/60\">\n Task intelligence node unavailable\n </p>\n <button\n type=\"button\"\n onClick={() => navigate('/')}\n className=\"px-5 py-2 rounded-xl bg-surface-container-high text-on-surface hover:bg-surface-container-highest transition-colors\"\n >\n Return to Task Manager\n </button>\n </div>\n );\n }\n\n const nodeCode = `#NODE-${task.id.substring(0, 4).toUpperCase()}`;\n\n return (\n <div className=\"max-w-7xl mx-auto w-full space-y-8 animate-in fade-in duration-500\">\n <div className=\"flex flex-wrap items-center justify-between gap-4\">\n <nav className=\"flex items-center space-x-2 text-sm text-on-surface-variant font-medium\" aria-label=\"Task breadcrumb\">\n <button\n type=\"button\"\n className=\"hover:text-primary transition-colors\"\n onClick={() => navigate('/')}\n >\n Task Manager\n </button>\n <ChevronRight size={16} aria-hidden=\"true\" />\n <span className=\"text-on-surface\">{nodeCode}</span>\n </nav>\n <div className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={isBusy}\n className=\"flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-error hover:bg-error/10 transition-all rounded-xl active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <Trash2 size={16} aria-hidden=\"true\" />\n Decommission\n </button>\n <button\n type=\"button\"\n disabled\n aria-disabled=\"true\"\n className=\"flex items-center gap-2 px-4 py-2 text-xs font-black uppercase tracking-widest text-on-surface bg-surface-container-high hover:bg-surface-container-highest transition-all rounded-xl opacity-50 cursor-not-allowed\"\n >\n <StopCircle size={16} aria-hidden=\"true\" />\n Halt execution\n </button>\n <button\n type=\"button\"\n onClick={handleSave}\n disabled={isBusy || !isDirty}\n className=\"flex items-center gap-2 px-6 py-2 text-xs font-black uppercase tracking-widest bg-primary text-on-primary rounded-xl shadow-lg shadow-primary/20 hover:scale-105 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100\"\n >\n <Save size={16} aria-hidden=\"true\" />\n {updateMutation.isPending ? 'Synchronizing...' : 'Save Protocol'}\n </button>\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 lg:grid-cols-12 gap-6\">\n <div className=\"lg:col-span-8 flex flex-col gap-6\">\n <div className=\"bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-2xl relative overflow-hidden\">\n <div className=\"absolute top-0 right-0 w-32 h-32 bg-primary/5 rounded-full blur-3xl -mr-16 -mt-16\" />\n\n <div className=\"flex items-start justify-between mb-10 relative z-10 gap-4\">\n <div className=\"space-y-1 min-w-0\">\n <label className=\"text-[10px] font-black uppercase tracking-[0.2em] text-primary/70\">\n Intelligence Node identifier\n </label>\n <h2 className=\"text-3xl font-headline font-black text-white tracking-tight break-words\">\n {nodeCode}: {currentTitle || task.title}\n </h2>\n </div>\n <div className=\"relative shrink-0\">\n <select\n {...register('status')}\n aria-invalid={Boolean(errors.status)}\n aria-describedby={errors.status ? statusErrorId : undefined}\n className={`appearance-none cursor-pointer px-6 py-2 rounded-xl border font-black text-[10px] uppercase tracking-widest outline-none transition-all hover:brightness-110 active:scale-95 ${\n currentStatus === TaskStatus.DONE\n ? 'bg-secondary/10 border-secondary/20 text-secondary'\n : currentStatus === TaskStatus.IN_PROGRESS\n ? 'bg-primary/10 border-primary/20 text-primary'\n : 'bg-surface-container-highest/50 border-outline-variant/20 text-on-surface-variant'\n }`}\n >\n <option value={TaskStatus.BACKLOG} className=\"bg-surface-container-low\">\n Backlog\n </option>\n <option value={TaskStatus.IN_PROGRESS} className=\"bg-surface-container-low\">\n In Progress\n </option>\n <option value={TaskStatus.REVIEW} className=\"bg-surface-container-low\">\n Review\n </option>\n <option value={TaskStatus.DONE} className=\"bg-surface-container-low\">\n Done\n </option>\n </select>\n {currentStatus === TaskStatus.IN_PROGRESS && (\n <span className=\"absolute -left-1 -top-1 flex h-2 w-2\" aria-hidden=\"true\">\n <span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-primary opacity-75\"></span>\n <span className=\"relative inline-flex rounded-full h-2 w-2 bg-primary\"></span>\n </span>\n )}\n </div>\n </div>\n {errors.status && (\n <p id={statusErrorId} className=\"mb-6 text-xs text-error font-semibold\">\n {errors.status.message}\n </p>\n )}\n\n <div className=\"space-y-8 relative z-10\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-8\">\n <div className=\"space-y-2\">\n <label\n htmlFor=\"task-detail-title\"\n className=\"text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1\"\n >\n Node Designation\n </label>\n <input\n id=\"task-detail-title\"\n className=\"w-full bg-surface-container-highest/30 border border-outline-variant/10 rounded-xl px-4 py-3 text-sm text-white focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50 transition-all outline-none font-medium\"\n type=\"text\"\n aria-invalid={Boolean(errors.title)}\n aria-describedby={errors.title ? titleErrorId : undefined}\n {...register('title')}\n />\n {errors.title && (\n <p id={titleErrorId} className=\"text-xs text-error font-semibold\">\n {errors.title.message}\n </p>\n )}\n </div>\n <div className=\"space-y-2\">\n <label\n htmlFor=\"task-detail-priority\"\n className=\"text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1\"\n >\n Operational Priority\n </label>\n <Controller\n control={control}\n name=\"priority\"\n render={({ field }) => (\n <select\n id=\"task-detail-priority\"\n value={field.value}\n onChange={(event) => field.onChange(Number(event.target.value))}\n onBlur={field.onBlur}\n aria-invalid={Boolean(errors.priority)}\n aria-describedby={errors.priority ? priorityErrorId : undefined}\n className={`w-full border rounded-xl px-4 py-3 text-sm transition-all outline-none font-black tracking-widest uppercase appearance-none ${\n currentPriority === TaskPriority.CRITICAL\n ? 'bg-error/30 text-white border-error shadow-[0_0_15px_rgba(255,107,107,0.15)] ring-1 ring-error/20'\n : 'bg-surface-container-highest/30 text-white border-outline-variant/10 focus:ring-1 focus:ring-primary/40 focus:bg-surface-container-highest/50'\n }`}\n >\n <option value={TaskPriority.CRITICAL} className=\"bg-surface-container-low\">\n CRITICAL\n </option>\n <option value={TaskPriority.HIGH} className=\"bg-surface-container-low\">\n HIGH\n </option>\n <option value={TaskPriority.MEDIUM} className=\"bg-surface-container-low\">\n MEDIUM\n </option>\n <option value={TaskPriority.LOW} className=\"bg-surface-container-low\">\n LOW\n </option>\n </select>\n )}\n />\n {errors.priority && (\n <p id={priorityErrorId} className=\"text-xs text-error font-semibold\">\n {errors.priority.message}\n </p>\n )}\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <Controller\n control={control}\n name=\"description\"\n render={({ field }) => (\n <MarkdownField\n label=\"Objective / Parameters\"\n value={field.value}\n onChange={(value) => field.onChange(value)}\n placeholder=\"Describe the desired output and constraints for this node...\"\n height=\"h-56\"\n helperText=\"Supports GitHub Flavored Markdown for logic structure\"\n initialMode=\"preview\"\n maxLength={2000}\n />\n )}\n />\n {errors.description && (\n <p id={descriptionErrorId} className=\"text-xs text-error font-semibold\">\n {errors.description.message}\n </p>\n )}\n </div>\n </div>\n </div>\n\n <div className=\"flex-1 min-h-0\">\n <CommentSection taskId={taskId || ''} />\n </div>\n </div>\n\n <div className=\"lg:col-span-4 space-y-6\">\n <div className=\"bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl\">\n <label className=\"text-[10px] font-black uppercase tracking-widest text-tertiary/80 block mb-6\">\n Assigned Intelligence\n </label>\n\n <div className=\"space-y-4\">\n <div className=\"relative\">\n <select\n value={currentAssigneeId}\n onChange={(event) => {\n setValue('assigneeId', event.target.value, {\n shouldDirty: true,\n shouldValidate: true,\n });\n }}\n aria-invalid={Boolean(errors.assigneeId)}\n aria-describedby={errors.assigneeId ? assigneeErrorId : undefined}\n className=\"w-full bg-surface-container-high/50 border border-outline-variant/5 rounded-2xl p-5 appearance-none cursor-pointer focus:ring-1 focus:ring-tertiary/40 outline-none text-white font-headline font-black transition-all hover:border-tertiary/30\"\n >\n <option value=\"\">Protocol Unassigned</option>\n {agents.map((agent: Agent) => (\n <option key={agent.id} value={agent.id} className=\"bg-surface-container-low\">\n {agent.name}\n </option>\n ))}\n </select>\n <div className=\"absolute right-5 top-1/2 -translate-y-1/2 pointer-events-none text-on-surface-variant/40\">\n <ArrowLeftRight size={20} aria-hidden=\"true\" />\n </div>\n </div>\n {errors.assigneeId && (\n <p id={assigneeErrorId} className=\"text-xs text-error font-semibold\">\n {errors.assigneeId.message}\n </p>\n )}\n\n {selectedAgent ? (\n <div className=\"flex items-center gap-5 p-5 bg-tertiary/5 rounded-2xl border border-tertiary/10 animate-in fade-in slide-in-from-top-2 duration-300\">\n <div className=\"h-14 w-14 rounded-xl bg-tertiary/10 flex items-center justify-center text-tertiary overflow-hidden shadow-inner\">\n <InitialsAvatar\n name={selectedAgent.name || 'U'}\n size={48}\n className=\"rounded-lg\"\n />\n </div>\n <div className=\"flex-1\">\n <h4 className=\"font-headline font-black text-white\">{selectedAgent.name}</h4>\n <p className=\"text-[10px] text-tertiary/60 font-black uppercase tracking-widest mt-1\">\n {selectedAgent.role || 'Intelligence Unit'}\n </p>\n </div>\n </div>\n ) : (\n <div className=\"flex items-center gap-5 p-5 bg-surface-container-high/20 rounded-2xl border border-dashed border-outline-variant/20 italic\">\n <div className=\"h-14 w-14 rounded-xl bg-surface-container-highest/30 flex items-center justify-center text-on-surface-variant/20\">\n <Zap size={24} aria-hidden=\"true\" />\n </div>\n <div className=\"flex-1\">\n <h4 className=\"font-headline font-bold text-on-surface-variant/40\">Awaiting Assignment</h4>\n <p className=\"text-[9px] text-on-surface-variant/30 font-black uppercase tracking-widest mt-1\">\n Grid performance limited\n </p>\n </div>\n </div>\n )}\n </div>\n\n <button\n type=\"button\"\n disabled\n aria-disabled=\"true\"\n className=\"w-full mt-6 py-3 text-[10px] font-black uppercase tracking-[0.2em] text-on-surface-variant transition-all flex items-center justify-center gap-3 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5 opacity-50 cursor-not-allowed\"\n >\n <Settings2 size={16} className=\"text-primary\" aria-hidden=\"true\" />\n Tune Node Parameters\n </button>\n </div>\n\n <div className=\"bg-surface-container-low p-8 rounded-2xl border border-outline-variant/10 shadow-xl\">\n <label className=\"text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 block mb-8\">\n Execution metrics\n </label>\n <div className=\"space-y-8\">\n <div className=\"space-y-3\">\n <div className=\"flex justify-between items-end\">\n <span className=\"text-[10px] font-black uppercase tracking-widest text-on-surface\">\n Node Progress\n </span>\n <span className=\"text-xs font-mono text-primary font-bold\">\n {currentStatus === TaskStatus.DONE ? '100' : currentStatus === TaskStatus.IN_PROGRESS ? '42' : '0'}%\n </span>\n </div>\n <div className=\"h-2 w-full bg-surface-container-highest rounded-full overflow-hidden\">\n <div\n className={`h-full rounded-full transition-all duration-1000 ${currentStatus === TaskStatus.DONE ? 'bg-secondary' : 'bg-primary'}`}\n style={{ width: `${currentStatus === TaskStatus.DONE ? 100 : currentStatus === TaskStatus.IN_PROGRESS ? 42 : 0}%` }}\n ></div>\n </div>\n </div>\n\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5\">\n <div className=\"flex items-center gap-2 mb-1 text-on-surface-variant/60\">\n <Zap size={14} className=\"text-secondary\" aria-hidden=\"true\" />\n <span className=\"text-[9px] font-black uppercase tracking-widest\">Latency</span>\n </div>\n <div className=\"text-lg font-mono font-bold text-white\">{task.llm_latency || 0}ms</div>\n </div>\n <div className=\"p-4 bg-surface-container-highest/20 rounded-xl border border-outline-variant/5\">\n <div className=\"flex items-center gap-2 mb-1 text-on-surface-variant/60\">\n <Wallet size={14} className=\"text-tertiary\" aria-hidden=\"true\" />\n <span className=\"text-[9px] font-black uppercase tracking-widest\">Node Cost</span>\n </div>\n <div className=\"text-lg font-mono font-bold text-white\">${(task.cost_estimate || 0).toFixed(6)}</div>\n </div>\n </div>\n </div>\n </div>\n\n <div className=\"bg-gradient-to-br from-secondary/5 to-primary/5 p-8 rounded-2xl border border-secondary/10 relative overflow-hidden group shadow-xl\">\n <div className=\"absolute top-0 right-0 -mr-4 -mt-4 text-secondary/5 opacity-50 transition-transform group-hover:scale-110\">\n <ShieldCheck size={120} aria-hidden=\"true\" />\n </div>\n <div className=\"relative z-10\">\n <div className=\"flex items-center gap-2 mb-3\">\n <span className=\"text-[10px] font-black uppercase tracking-[0.2em] text-secondary/80\">\n Integrity status\n </span>\n <span className=\"px-2 py-0.5 bg-secondary/20 text-secondary text-[9px] font-black rounded uppercase\">\n Optimal\n </span>\n </div>\n <div className=\"text-4xl font-headline font-black text-white tracking-tighter\">99.8%</div>\n <p className=\"text-[10px] text-on-surface-variant/60 mt-2 italic font-medium leading-relaxed\">\n Intelligence stream verified and synchronized across grid.\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport default TaskDetail;\n"],"x_google_ignoreList":[0,1,2,3,4,5,8,9],"mappings":"q6BAeA,IAAM,EAAiB,EAAiB,mBANrB,CACjB,CAAC,OAAQ,CAAE,EAAG,eAAgB,IAAK,SAAU,CAAC,CAC9C,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,SAAU,CAAC,CACzC,CAAC,OAAQ,CAAE,EAAG,iBAAkB,IAAK,SAAU,CAAC,CAChD,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,SAAU,CAAC,CAC3C,CACsE,CCFjE,GAAa,EAAiB,cAJjB,CACjB,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,KAAM,IAAK,SAAU,CAAC,CAC1D,CAAC,OAAQ,CAAE,EAAG,IAAK,EAAG,IAAK,MAAO,IAAK,OAAQ,IAAK,GAAI,IAAK,IAAK,SAA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EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,mEAAf,EACE,EAAA,EAAA,KAAC,GAAD,CAAQ,KAAM,GAAI,UAAU,gBAAgB,cAAY,OAAS,CAAA,EACjE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,2DAAkD,YAAgB,CAAA,CAC9E,IACN,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,kDAAf,CAAwD,KAAG,EAAK,eAAiB,GAAG,QAAQ,EAAE,CAAO,GACjG,GACF,GACF,GACF,IAEN,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,+IAAf,EACE,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,sHACb,EAAA,EAAA,KAAC,EAAD,CAAa,KAAM,IAAK,cAAY,OAAS,CAAA,CACzC,CAAA,EACN,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,yBAAf,EACE,EAAA,EAAA,MAAC,MAAD,CAAK,UAAU,wCAAf,EACE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,+EAAsE,mBAE/E,CAAA,EACP,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,8FAAqF,UAE9F,CAAA,CACH,IACN,EAAA,EAAA,KAAC,MAAD,CAAK,UAAU,yEAAgE,QAAW,CAAA,EAC1F,EAAA,EAAA,KAAC,IAAD,CAAG,UAAU,0FAAiF,6DAE1F,CAAA,CACA,GACF,GACF,GACF,GACF"}
@@ -0,0 +1,8 @@
1
+ import{a as e}from"./rolldown-runtime-COnpUsM8.js";import{a as t,c as n,d as r,f as i,g as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./vendor-dnd-CxfOy4-Z.js";import{r as g,s as _}from"./vendor-react-CiDbU5Ns.js";import{i as v,n as y,t as b}from"./vendor-query-DQlZ8h7P.js";import{r as x}from"./vendor-markdown-Dl_1qnne.js";import{o as S,t as C}from"./useNotification-DK-pV16c.js";import{t as w}from"./check-DgCfni6J.js";import{t as T}from"./clock-C0d1RzP_.js";import{t as E}from"./sparkles-CCXaTT3H.js";import{n as D,t as O}from"./InitialsAvatar-0mIRaTK8.js";import{t as ee}from"./trash-2-BNP4kC5c.js";import{a as te,r as k,t as A}from"./ConfirmDialog-mRH8i_xK.js";import{t as j}from"./user-Cp55HCCi.js";import{n as M,t as N}from"./vendor-motion-CkXYvnuI.js";import{f as P,g as F,i as I,n as ne,o as L,s as re,t as R}from"./index-yzhzS93F.js";import{t as ie}from"./MarkdownField-flCuU7w3.js";import{a as ae,c as z,o as oe,s as se}from"./vendor-forms-HC2wK6B9.js";import{n as B,r as V,t as H}from"./tasks-DEHCZk48.js";import{t as U}from"./cn-i-5ItZGU.js";var W=S(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),G=S(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ce=S(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),K=S(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),le=S(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),q=S(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),J=S(`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`}]]),Y=S(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),ue=S(`shield-alert`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),X=e(a(),1),Z=x(),Q=e=>e===0?`bg-error text-white shadow-[0_0_10px_rgba(255,107,107,0.3)]`:e===1?`bg-error-container/40 font-black text-error`:e===2?`bg-secondary-container/40 font-black text-secondary`:`bg-surface-container-highest font-black text-on-surface-variant`,de=e=>e===0?`Critical`:e===1?`High`:e===2?`Medium`:`Low`,fe=e=>e===0?`CRIT`:e===1?`HIGH`:e===2?`MED`:`LOW`,pe=e=>{switch(e){case`schedule`:return(0,Z.jsx)(T,{size:14,className:`mr-1`,"aria-hidden":`true`});case`attach_file`:return(0,Z.jsx)(Y,{size:14,className:`mr-1`,"aria-hidden":`true`});case`comment`:return(0,Z.jsx)(J,{size:14,className:`mr-1`,"aria-hidden":`true`});default:return null}},me=(0,X.memo)(({task:e,isOverlay:t})=>{let n=_(),{attributes:r,listeners:i,setNodeRef:a,transform:s,transition:l,isDragging:u}=o({id:t?`overlay-${e.id}`:e.id,data:{...e}}),d=t?!1:u,f=e.status===`done`,p=e.isActive,m=p||t,h=de(e.priority),g={transform:c.Transform.toString(s),transition:l},v=()=>{t||n(`/projects/${e.projectId}/tasks/${e.id}`)};return(0,Z.jsxs)(`div`,{ref:a,style:g,...r,...i,className:U(`group relative flex h-full cursor-grab flex-col overflow-hidden rounded-xl border p-4 shadow-xl transition-all duration-300 active:cursor-grabbing`,d&&`scale-[0.98] border-outline-variant/20 bg-surface-container-low opacity-40 grayscale`,t&&`z-[100] scale-[1.05] cursor-grabbing border-primary/60 bg-surface-container-high shadow-[0_20px_50px_rgba(173,198,255,0.3)] ring-2 ring-primary/40 antialiased`,!d&&!t&&f&&`border-outline-variant/10 bg-surface-container-low opacity-70 shadow-sm grayscale hover:opacity-100 hover:grayscale-0`,!d&&!t&&!f&&`border-outline-variant/10 bg-surface-container-low hover:border-primary/30 hover:shadow-primary/5`,!d&&!t&&!f&&p&&`border-primary/40 bg-surface-container-high/50 shadow-lg`),onClick:v,"aria-label":`Task ${e.code}: ${e.title}. ${h} priority. Status ${e.status}.${t?` Drag preview active.`:` Drag to move or open details.`}`,"aria-roledescription":`Draggable task card`,children:[(0,Z.jsx)(`span`,{className:`sr-only`,children:t?`Dragging preview.`:`Press space to start dragging this task, then use arrow keys to move it.`}),(0,Z.jsxs)(`div`,{className:`mb-3 flex items-start justify-between`,children:[(0,Z.jsx)(`span`,{className:U(`rounded px-2 py-0.5 font-headline text-[10px] font-black uppercase tracking-widest transition-colors`,m?`border border-primary/20 bg-primary-container/30 text-primary`:`bg-surface-container-highest/30 text-on-surface-variant/40`),children:e.code}),f?(0,Z.jsx)(`div`,{"aria-label":`Completed task`,className:`flex h-4 w-4 items-center justify-center rounded-full bg-secondary-container/30`,children:(0,Z.jsx)(w,{size:10,className:`font-bold text-secondary`,"aria-hidden":`true`})}):(0,Z.jsx)(`span`,{"aria-label":`${h} priority`,className:U(`rounded px-2 py-0.5 text-[10px] font-black uppercase tracking-widest transition-colors`,m||t?Q(e.priority):`bg-transparent text-on-surface-variant/60`),children:fe(e.priority)})]}),(0,Z.jsx)(`h4`,{className:U(`mb-4 text-base font-headline font-extrabold leading-tight transition-colors`,f?`text-outline line-through`:`text-on-surface group-hover:text-primary`),children:e.title}),(0,Z.jsxs)(`div`,{className:`mt-auto flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,Z.jsx)(`div`,{className:U(`rounded border border-outline-variant/10 bg-surface-container-highest/50 p-1`,m&&`border-primary/30`),children:e.agent.avatar?(0,Z.jsx)(`img`,{src:e.agent.avatar,alt:`${e.agent.name} avatar`,className:U(`h-5 w-5 rounded-sm object-cover`,f&&`grayscale`)}):(0,Z.jsx)(O,{name:e.agent.name,size:20,className:U(`rounded-sm text-[8px]`,f&&`grayscale`)})}),(0,Z.jsx)(`span`,{className:U(`text-[11px] font-bold tracking-tight`,m?`text-on-surface`:`text-on-surface-variant/40`),children:e.agent.name})]}),f?(0,Z.jsx)(`span`,{className:`text-[10px] font-black tracking-widest text-secondary`,children:`COMPLETED`}):e.timeIcon&&!m&&(0,Z.jsxs)(`div`,{className:`flex items-center text-[10px] font-black uppercase tracking-widest text-on-surface-variant/30`,"aria-label":`${e.timeLabel??`Task detail`} ${e.timeValue??``}`.trim(),children:[pe(e.timeIcon),e.timeValue]})]})]})}),he=(0,X.memo)(({id:e,title:n,tasks:i,dotColorClass:a,badgeBgClass:o,badgeTextClass:s})=>{let{setNodeRef:c,isOver:l}=r({id:e}),u=(0,X.useId)(),d=(0,X.useMemo)(()=>i.map(e=>e.id),[i]);return(0,Z.jsxs)(`section`,{"aria-labelledby":u,className:`flex flex-col gap-5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-1`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:U(`h-2 w-2 rounded-full`,a)}),(0,Z.jsx)(`h3`,{id:u,className:U(`font-headline text-sm font-bold uppercase tracking-widest`,s),children:n}),(0,Z.jsx)(`span`,{"aria-label":`${i.length} tasks`,className:U(`rounded px-1.5 py-0.5 text-[10px] font-bold`,o,s),children:i.length})]}),(0,Z.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`${n} column options unavailable`,title:`${n} column options unavailable`,className:U(`transition-colors`,`text-outline hover:text-primary`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:text-outline`),children:(0,Z.jsx)(K,{size:18,"aria-hidden":`true`})})]}),(0,Z.jsxs)(`div`,{ref:c,role:`list`,"aria-labelledby":u,className:U(`flex min-h-[300px] flex-col gap-5 rounded-xl transition-colors duration-200`,l&&`bg-surface-container-high/30 ring-2 ring-outline-variant/20`),children:[(0,Z.jsx)(m,{items:d,strategy:t,children:i.map(e=>(0,Z.jsx)(me,{task:e},e.id))}),i.length===0?(0,Z.jsxs)(`p`,{className:`sr-only`,children:[n,` column is empty.`]}):null]})]})}),ge=[{id:`backlog`,title:`Backlog`,dotColorClass:`bg-outline`,badgeBgClass:`bg-surface-container-high`,badgeTextClass:`text-outline-variant`},{id:`in-progress`,title:`In Progress`,dotColorClass:`bg-primary animate-pulse`,badgeBgClass:`bg-primary-container`,badgeTextClass:`text-primary`},{id:`review`,title:`Review`,dotColorClass:`bg-tertiary`,badgeBgClass:`bg-tertiary-container`,badgeTextClass:`text-tertiary`},{id:`done`,title:`Done`,dotColorClass:`bg-secondary`,badgeBgClass:`bg-secondary-container/20`,badgeTextClass:`text-secondary`}],_e=(0,X.memo)(({tasks:e})=>{let t=(0,X.useMemo)(()=>{let t={backlog:[],"in-progress":[],review:[],done:[]};return e.forEach(e=>{e.status!==`archived`&&t[e.status].push(e)}),t},[e]);return(0,Z.jsx)(`section`,{"aria-label":`Kanban task board`,className:U(`grid grid-cols-1 items-start gap-6 md:grid-cols-2 lg:grid-cols-4`),children:ge.map(e=>(0,Z.jsx)(he,{id:e.id,title:e.title,dotColorClass:e.dotColorClass,badgeBgClass:e.badgeBgClass,badgeTextClass:e.badgeTextClass,tasks:t[e.id]},e.id))})}),ve=({tasks:e,taskCounts:t,projectTitle:n})=>(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-6`,children:[(0,Z.jsxs)(`div`,{className:`glass-card p-6 rounded-2xl border border-outline-variant/10 col-span-1 md:col-span-2 flex flex-col md:flex-row justify-between items-center gap-6`,style:{background:`rgba(34, 42, 61, 0.4)`,backdropFilter:`blur(12px)`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h3`,{className:`font-headline font-bold text-lg text-on-surface`,children:`Efficiency Matrix`}),(0,Z.jsx)(`p`,{className:`text-outline text-sm`,children:`System performance metrics for active sector.`}),(0,Z.jsxs)(`div`,{className:`mt-4 flex gap-6`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{className:`text-2xl font-extrabold text-primary`,children:t.done}),(0,Z.jsx)(`span`,{className:`text-[10px] font-bold text-outline uppercase tracking-wider`,children:`Completed`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{className:`text-2xl font-extrabold text-secondary`,children:t[`in-progress`]}),(0,Z.jsx)(`span`,{className:`text-[10px] font-bold text-outline uppercase tracking-wider`,children:`Active Nodes`})]})]})]}),(0,Z.jsxs)(`div`,{className:`w-full md:w-48 h-24 bg-surface-container-highest/30 rounded-lg relative overflow-hidden flex items-end px-2 gap-1`,children:[[`backlog`,`in-progress`,`review`,`done`].map((n,r)=>{let i=t[n],a=e.length>0?i/e.length*100:10;return(0,Z.jsx)(`div`,{className:`w-full bg-primary/40 rounded-t transition-all duration-500`,style:{height:`${Math.max(a,5)}%`,opacity:.3+r*.2}},n)}),(0,Z.jsx)(`div`,{className:`absolute inset-0 pointer-events-none opacity-30 flex items-center justify-center`,children:(0,Z.jsx)(`span`,{className:`text-primary text-[8px] font-mono uppercase tracking-[0.5em]`,children:`Live Stats`})})]})]}),(0,Z.jsxs)(`div`,{className:`bg-tertiary-container/10 p-6 rounded-2xl border border-tertiary/10 relative overflow-hidden group`,children:[(0,Z.jsx)(`div`,{className:`absolute -right-4 -top-4 text-tertiary/5 text-8xl transition-transform group-hover:scale-110`,children:(0,Z.jsx)(E,{size:80})}),(0,Z.jsx)(`h3`,{className:`font-headline font-bold text-tertiary`,children:`Orchestration Info`}),(0,Z.jsx)(`p`,{className:`text-on-surface-variant text-sm mt-2 relative z-10`,children:e.length>0?`Managing ${e.length} tasks across ${n}. Drag tasks between columns to update their operational status.`:`Initialize new tasks to begin sector orchestration. Tasks will automatically be mapped to assigned intelligence nodes.`})]})]}),$={title:``,description:k,status:B.BACKLOG,priority:H.MEDIUM,assigneeId:``,projectId:``},ye=({isOpen:e,onClose:t,onCreated:n})=>{let r=v(),{notifyApiError:i,notifyError:a,notifySuccess:o}=C(),s=(0,X.useId)(),c=(0,X.useId)(),l=(0,X.useId)(),u=(0,X.useId)(),d=(0,X.useId)(),f=(0,X.useId)(),p=(0,X.useId)(),m=(0,X.useId)(),h=(0,X.useId)(),{control:g,formState:{errors:_},handleSubmit:x,register:S,reset:w,setValue:T}=se({resolver:ae(te),defaultValues:$,mode:`onBlur`}),O=y({queryKey:[`agents`],enabled:e,queryFn:async()=>(await ne.findAll()).data}),A=y({queryKey:[`projects`],enabled:e,queryFn:async()=>(await I.findAll()).data});(0,X.useEffect)(()=>{if(!e){w($);return}let n=e=>{e.key===`Escape`&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,w]),(0,X.useEffect)(()=>{e&&O.error&&i(O.error,`Agents Load Failed`)},[O.error,e,i]),(0,X.useEffect)(()=>{e&&A.error&&i(A.error,`Projects Load Failed`)},[e,i,A.error]);let P=(0,X.useMemo)(()=>A.data??[],[A.data]),L=z({control:g,name:`projectId`});(0,X.useEffect)(()=>{!e||P.length===0||L||T(`projectId`,P[0].id,{shouldDirty:!1,shouldValidate:!0})},[L,e,P,T]);let R=b({mutationFn:async e=>(await V.create(e.projectId,{title:e.title,description:e.description,status:e.status,priority:e.priority,assigneeId:e.assigneeId||void 0,projectId:e.projectId}),e),onSuccess:e=>{r.invalidateQueries({queryKey:[`tasks`,e.projectId]}),r.invalidateQueries({queryKey:[`projects`]}),o(`Task Commissioned`,`The task node has been added to the orchestration grid.`),n?.(),t(),w({...$,projectId:e.projectId})},onError:e=>{i(e,`Task Creation Failed`)}}),U=O.data??[],W=O.isPending||A.isPending,G=R.isPending,K=z({control:g,name:`priority`}),q=z({control:g,name:`status`}),J=z({control:g,name:`assigneeId`}),Y=z({control:g,name:`projectId`}),ue=x(async e=>{await R.mutateAsync(e)},()=>{a(`Validation Error`,`Please review the highlighted fields before commissioning the task.`)}),Q=()=>{G||t()};return e?(0,Z.jsx)(M,{children:(0,Z.jsxs)(`div`,{className:`fixed inset-0 z-[100] flex items-center justify-center p-4 md:p-8`,children:[(0,Z.jsx)(N.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:Q,className:`absolute inset-0 bg-surface/80 backdrop-blur-xl`,"aria-hidden":`true`}),(0,Z.jsxs)(N.div,{initial:{opacity:0,scale:.95,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:20},role:`dialog`,"aria-modal":`true`,"aria-labelledby":m,"aria-describedby":h,"aria-busy":W||G,className:`relative w-full max-w-3xl h-full max-h-[750px] bg-surface-container-low rounded-2xl shadow-2xl overflow-hidden flex flex-col ring-1 ring-outline-variant/10`,children:[(0,Z.jsxs)(`div`,{className:`px-8 py-6 border-b border-outline-variant/10 flex items-center justify-between bg-surface-container-low/50 backdrop-blur-md sticky top-0 z-10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(`div`,{className:`w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary`,children:(0,Z.jsx)(ce,{size:22,"aria-hidden":`true`})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h2`,{id:m,className:`text-xl font-black font-headline text-white tracking-tight`,children:`Comission New Task`}),(0,Z.jsx)(`p`,{id:h,className:`text-[10px] uppercase tracking-widest text-on-surface-variant/60 font-bold`,children:`Node Specification Protocol`})]})]}),(0,Z.jsx)(`button`,{type:`button`,onClick:Q,disabled:G,"aria-label":`Close create task modal`,className:`w-10 h-10 rounded-full flex items-center justify-center text-on-surface-variant hover:bg-surface-container-highest transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,children:(0,Z.jsx)(re,{size:20,"aria-hidden":`true`})})]}),(0,Z.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-10 space-y-10 custom-scrollbar`,children:[(0,Z.jsxs)(`section`,{className:`space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(`div`,{className:`w-1 bg-primary h-4 rounded-full`}),(0,Z.jsx)(`h3`,{className:`text-xs font-black uppercase tracking-[0.2em] text-on-surface-variant`,children:`Essential Intelligence`})]}),(0,Z.jsxs)(`div`,{className:`space-y-6`,children:[(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(`label`,{htmlFor:p,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Task Title`}),(0,Z.jsx)(`div`,{className:`bg-surface-container-highest/30 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 focus-within:bg-surface-container-highest/50 transition-all`,children:(0,Z.jsx)(`input`,{id:p,type:`text`,placeholder:`e.g. Synthesize Vector DB results`,"aria-invalid":!!_.title,"aria-describedby":_.title?s:void 0,className:`w-full bg-transparent border-none text-sm text-on-surface h-12 px-4 focus:outline-none placeholder:text-on-surface-variant/30 font-medium`,...S(`title`)})}),_.title&&(0,Z.jsx)(`p`,{id:s,className:`text-xs text-error font-semibold`,children:_.title.message})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center justify-between px-1`,children:[(0,Z.jsx)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60`,children:`Objective / Description`}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>T(`description`,k,{shouldDirty:!0,shouldValidate:!0}),className:`flex items-center gap-1 px-2 py-1 rounded hover:bg-surface-container-highest text-[9px] font-black text-on-surface-variant/60 uppercase tracking-widest transition-colors`,title:`Reset to template`,children:[(0,Z.jsx)(D,{size:10,"aria-hidden":`true`}),`Template`]}),(0,Z.jsx)(`div`,{className:`w-px h-3 bg-outline-variant/10`}),(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>T(`description`,``,{shouldDirty:!0,shouldValidate:!0}),className:`flex items-center gap-1 px-2 py-1 rounded hover:bg-error/10 text-[9px] font-black text-error/60 hover:text-error uppercase tracking-widest transition-colors`,title:`Clear field`,children:[(0,Z.jsx)(ee,{size:10,"aria-hidden":`true`}),`Clear`]})]})]}),(0,Z.jsx)(oe,{control:g,name:`description`,render:({field:e})=>(0,Z.jsx)(ie,{value:e.value,onChange:e.onChange,placeholder:`Describe the desired output and constraints for this node...`,height:`h-52`,maxLength:2e3})}),_.description&&(0,Z.jsx)(`p`,{id:c,className:`text-xs text-error font-semibold`,children:_.description.message})]})]})]}),(0,Z.jsxs)(`section`,{className:`space-y-6 pt-10 border-t border-outline-variant/10`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-2`,children:[(0,Z.jsx)(`div`,{className:`w-1 bg-secondary h-4 rounded-full`}),(0,Z.jsx)(`h3`,{className:`text-xs font-black uppercase tracking-[0.2em] text-on-surface-variant`,children:`Operational Configuration`})]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-8`,children:[(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsxs)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1 flex items-center gap-1.5`,children:[(0,Z.jsx)(le,{size:12,className:`text-secondary`,"aria-hidden":`true`}),`Priority Level`]}),(0,Z.jsx)(`div`,{className:`grid grid-cols-4 gap-2 p-1 bg-surface-container-highest/30 rounded-xl ring-1 ring-outline-variant/10`,children:[{id:H.LOW,label:`LOW`},{id:H.MEDIUM,label:`MED`},{id:H.HIGH,label:`HIGH`},{id:H.CRITICAL,label:`CRIT`}].map(e=>(0,Z.jsx)(`button`,{type:`button`,"aria-pressed":K===e.id,onClick:()=>T(`priority`,e.id,{shouldDirty:!0,shouldValidate:!0}),className:`py-2 rounded-lg text-[10px] font-black tracking-widest transition-all ${K===e.id?e.id===H.CRITICAL||e.id===H.HIGH?`bg-error text-on-error shadow-lg shadow-error/30`:`bg-primary text-on-primary shadow-lg shadow-primary/30`:`hover:bg-surface-container-highest text-on-surface-variant`}`,children:e.label},e.id))}),_.priority&&(0,Z.jsx)(`p`,{id:u,className:`text-xs text-error font-semibold`,children:_.priority.message})]}),(0,Z.jsxs)(`div`,{className:`space-y-3`,children:[(0,Z.jsx)(`label`,{htmlFor:`create-task-status`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Initial Status`}),(0,Z.jsxs)(`div`,{className:`bg-surface-container-highest/30 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all relative`,children:[(0,Z.jsx)(`select`,{id:`create-task-status`,value:q,onChange:e=>T(`status`,e.target.value,{shouldDirty:!0,shouldValidate:!0}),"aria-invalid":!!_.status,"aria-describedby":_.status?l:void 0,className:`w-full bg-transparent border-none text-xs font-bold text-on-surface h-10 px-4 focus:outline-none appearance-none cursor-pointer uppercase tracking-widest`,children:[B.BACKLOG,B.IN_PROGRESS,B.REVIEW].map(e=>(0,Z.jsx)(`option`,{value:e,className:`bg-surface-container-low text-on-surface uppercase`,children:e},e))}),(0,Z.jsx)(`div`,{className:`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-on-surface-variant/60`,children:(0,Z.jsx)(F,{size:16,"aria-hidden":`true`})})]}),_.status&&(0,Z.jsx)(`p`,{id:l,className:`text-xs text-error font-semibold`,children:_.status.message})]}),(0,Z.jsxs)(`div`,{className:`space-y-3 col-span-full`,children:[(0,Z.jsxs)(`label`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1 flex items-center gap-1.5`,children:[(0,Z.jsx)(j,{size:12,className:`text-primary`,"aria-hidden":`true`}),`Assigned Intelligence (Optional)`]}),(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 gap-3`,children:[U.map(e=>(0,Z.jsxs)(`button`,{type:`button`,"aria-pressed":J===e.id,onClick:()=>T(`assigneeId`,J===e.id?``:e.id,{shouldDirty:!0,shouldValidate:!0}),className:`p-3 rounded-xl border flex items-center gap-3 transition-all text-left ${J===e.id?`bg-primary/10 border-primary shadow-[0_0_15px_rgba(173,198,255,0.1)]`:`bg-surface-container-highest/20 border-outline-variant/5 hover:border-outline-variant/30 hover:bg-surface-container-highest/30`}`,children:[(0,Z.jsx)(`div`,{className:`w-8 h-8 rounded-lg flex items-center justify-center font-bold text-xs ${J===e.id?`bg-primary text-surface`:`bg-surface-container-high text-on-surface-variant`}`,children:e.name.substring(0,2).toUpperCase()}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`div`,{className:`text-[11px] font-bold ${J===e.id?`text-white`:`text-on-surface-variant`}`,children:e.name}),(0,Z.jsx)(`div`,{className:`text-[9px] text-on-surface-variant/50 uppercase tracking-widest font-black leading-none mt-0.5`,children:e.role||`Agent`})]})]},e.id)),U.length===0&&!O.isPending&&(0,Z.jsx)(`div`,{className:`col-span-full py-4 text-center border-2 border-dashed border-outline-variant/10 rounded-xl`,children:(0,Z.jsx)(`span`,{className:`text-[10px] font-bold text-on-surface-variant/30 uppercase tracking-[0.2em]`,children:`No active intelligence found`})})]}),_.assigneeId&&(0,Z.jsx)(`p`,{id:d,className:`text-xs text-error font-semibold`,children:_.assigneeId.message})]}),P.length>1?(0,Z.jsxs)(`div`,{className:`space-y-3 col-span-full`,children:[(0,Z.jsx)(`label`,{htmlFor:`create-task-project`,className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/60 ml-1`,children:`Target Project`}),(0,Z.jsxs)(`div`,{className:`bg-surface-container-highest/30 rounded-xl p-0.5 ring-1 ring-outline-variant/10 focus-within:ring-primary/40 transition-all relative`,children:[(0,Z.jsx)(`select`,{id:`create-task-project`,value:Y,onChange:e=>T(`projectId`,e.target.value,{shouldDirty:!0,shouldValidate:!0}),"aria-invalid":!!_.projectId,"aria-describedby":_.projectId?f:void 0,className:`w-full bg-transparent border-none text-xs font-bold text-on-surface h-10 px-4 focus:outline-none appearance-none cursor-pointer`,children:P.map(e=>(0,Z.jsx)(`option`,{value:e.id,className:`bg-surface-container-low text-on-surface`,children:e.title},e.id))}),(0,Z.jsx)(`div`,{className:`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-on-surface-variant/60`,children:(0,Z.jsx)(F,{size:16,"aria-hidden":`true`})})]}),_.projectId&&(0,Z.jsx)(`p`,{id:f,className:`text-xs text-error font-semibold`,children:_.projectId.message})]}):P.length===1?(0,Z.jsxs)(`div`,{className:`col-span-full px-4 py-2 bg-surface-container-highest/10 rounded-lg border border-outline-variant/10 flex items-center justify-between`,children:[(0,Z.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-widest text-on-surface-variant/40`,children:`Target Sector`}),(0,Z.jsx)(`span`,{className:`text-xs font-bold text-primary/80`,children:P[0].title})]}):(0,Z.jsxs)(`div`,{className:`col-span-full p-4 bg-error/5 border border-error/20 rounded-xl text-center`,children:[(0,Z.jsx)(`p`,{className:`text-xs font-bold text-error`,children:`No Project Sector Detected`}),(0,Z.jsx)(`p`,{className:`text-[10px] text-on-surface-variant/60 mt-1 uppercase tracking-widest font-black`,children:`Initialize a sector in the sidebar before commissioning tasks`})]})]})]})]}),(0,Z.jsxs)(`div`,{className:`px-8 py-6 bg-surface-container-low/80 backdrop-blur-md border-t border-outline-variant/10 flex items-center justify-between`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-bold text-on-surface-variant/50 uppercase tracking-widest`,children:[(0,Z.jsx)(E,{size:12,className:`text-primary animate-pulse`,"aria-hidden":`true`}),`Agentic Orchestration Active`]}),(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:Q,disabled:G,className:`px-6 py-2.5 rounded-lg text-sm font-bold text-on-surface-variant hover:text-white transition-all hover:bg-surface-container-highest disabled:opacity-50 disabled:cursor-not-allowed`,children:`Discard`}),(0,Z.jsxs)(`button`,{type:`button`,onClick:ue,disabled:G||W||P.length===0,className:`px-10 py-2.5 rounded-lg bg-primary text-on-primary text-sm font-black shadow-[0_8px_20px_rgba(173,198,255,0.2)] hover:scale-[1.02] active:scale-[0.98] transition-all disabled:opacity-50 disabled:grayscale disabled:cursor-not-allowed group relative overflow-hidden disabled:hover:scale-100`,children:[(0,Z.jsx)(`div`,{className:`absolute inset-0 bg-white/10 translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-700 skew-x-12`}),G?`Processing...`:`Comission Task`]})]})]})]})]})}):null},be=({isDragging:e})=>{let{setNodeRef:t,isOver:n}=r({id:`archive`});return(0,Z.jsxs)(`div`,{ref:t,className:`
2
+ flex-1 flex items-center gap-4 px-6 py-3 rounded-2xl border-2 border-dashed transition-all duration-500 min-w-[240px]
3
+ ${n?`bg-error/20 border-error text-error scale-[1.02] shadow-xl shadow-error/10 z-50`:e?`bg-article-container/40 border-primary/40 text-primary animate-pulse shadow-lg`:`bg-surface-container-low/20 border-outline-variant/10 text-on-surface-variant/40 hover:bg-surface-container-low/40 hover:border-outline-variant/30`}
4
+ `,children:[(0,Z.jsx)(`div`,{className:`
5
+ w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-500
6
+ ${n?`bg-error text-white rotate-12`:e?`bg-primary/20 text-primary`:`bg-surface-container-highest/50`}
7
+ `,children:(0,Z.jsx)(W,{size:20})}),(0,Z.jsxs)(`div`,{className:`flex flex-col flex-1`,children:[(0,Z.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.2em] leading-none transition-colors ${n?`text-error`:e?`text-primary`:`text-on-surface-variant/60`}`,children:n?`Authorization Required`:`Archival Logic Sink`}),(0,Z.jsx)(`span`,{className:`text-[9px] font-bold opacity-40 uppercase tracking-widest mt-1.5 whitespace-nowrap`,children:n?`Release to decommissioning`:e?`Drag node here to decommission`:`Sector dormant`})]}),e&&!n&&(0,Z.jsx)(`div`,{className:`flex gap-1`,children:[1,2,3].map(e=>(0,Z.jsx)(`div`,{className:`w-1 h-1 rounded-full bg-primary/40 animate-ping`,style:{animationDelay:`${e*.2}s`}},e))})]})};async function xe(e,t){let n=e.getReader(),r;for(;!(r=await n.read()).done;)t(r.value)}function Se(e){let t,n,r,i=!1;return function(a){t===void 0?(t=a,n=0,r=-1):t=we(t,a);let o=t.length,s=0;for(;n<o;){i&&(t[n]===10&&(s=++n),i=!1);let a=-1;for(;n<o&&a===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-s);break;case 13:i=!0;case 10:a=n;break}if(a===-1)break;e(t.subarray(s,a),r),s=n,r=-1}s===o?t=void 0:s!==0&&(t=t.subarray(s),n-=s)}}function Ce(e,t,n){let r=Te(),i=new TextDecoder;return function(a,o){if(a.length===0)n?.(r),r=Te();else if(o>0){let n=i.decode(a.subarray(0,o)),s=o+(a[o+1]===32?2:1),c=i.decode(a.subarray(s));switch(n){case`data`:r.data=r.data?r.data+`
8
+ `+c:c;break;case`event`:r.event=c;break;case`id`:e(r.id=c);break;case`retry`:let n=parseInt(c,10);isNaN(n)||t(r.retry=n);break}}}}function we(e,t){let n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function Te(){return{data:``,event:``,id:``,retry:void 0}}var Ee=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},De=`text/event-stream`,Oe=1e3,ke=`last-event-id`;function Ae(e,t){var{signal:n,headers:r,onopen:i,onmessage:a,onclose:o,onerror:s,openWhenHidden:c,fetch:l}=t,u=Ee(t,[`signal`,`headers`,`onopen`,`onmessage`,`onclose`,`onerror`,`openWhenHidden`,`fetch`]);return new Promise((t,d)=>{let f=Object.assign({},r);f.accept||(f.accept=De);let p;function m(){p.abort(),document.hidden||b()}c||document.addEventListener(`visibilitychange`,m);let h=Oe,g=0;function _(){document.removeEventListener(`visibilitychange`,m),window.clearTimeout(g),p.abort()}n?.addEventListener(`abort`,()=>{_(),t()});let v=l??window.fetch,y=i??je;async function b(){p=new AbortController;try{let n=await v(e,Object.assign(Object.assign({},u),{headers:f,signal:p.signal}));await y(n),await xe(n.body,Se(Ce(e=>{e?f[ke]=e:delete f[ke]},e=>{h=e},a))),o?.(),_(),t()}catch(e){if(!p.signal.aborted)try{let t=s?.(e)??h;window.clearTimeout(g),g=window.setTimeout(b,t)}catch(e){_(),d(e)}}}b()})}function je(e){let t=e.headers.get(`content-type`);if(!t?.startsWith(`text/event-stream`))throw Error(`Expected content-type to be ${De}, Actual: ${t}`)}var Me=(e,t)=>{let n=(0,X.useRef)(null),r=(0,X.useRef)(t);(0,X.useEffect)(()=>{r.current=t},[t]),(0,X.useEffect)(()=>e?(n.current=new AbortController,(async()=>{try{await Ae(`/api/v1/projects/${e}/tasks/events`,{method:`GET`,headers:{Accept:`text/event-stream`},credentials:`include`,signal:n.current?.signal,onmessage(e){if(e.data)try{let t=JSON.parse(e.data);t&&t.task&&t.event&&r.current(t.event,t.task)}catch(e){console.error(`Failed to parse SSE message`,e)}},onclose(){},onerror(e){console.error(`SSE connection error:`,e)}})}catch(e){console.error(`SSE initialization failed`,e)}})(),()=>{n.current&&n.current.abort()}):void 0,[e])};function Ne({tasks:e,setTasks:t,onStatusChange:r,skipArchiveConfirm:a}){let[o,c]=(0,X.useState)(null),[u,p]=(0,X.useState)(null),[m,g]=(0,X.useState)(!1),[_,v]=(0,X.useState)(null);return{activeId:o,sensors:d(i(s,{activationConstraint:{distance:5}}),i(n,{coordinateGetter:f})),collisionDetection:h,handleDragStart:(0,X.useCallback)(t=>{let n=t.active.id;c(n);let r=e.find(e=>e.id===n);r&&p(r.status)},[e]),handleDragOver:(0,X.useCallback)(n=>{let{active:r,over:i}=n;if(!i)return;let a=r.id,o=i.id;if(a===o)return;let s=e.findIndex(e=>e.id===a),c=e.findIndex(e=>e.id===o);if(s===-1)return;let u=o===`backlog`||o===`in-progress`||o===`review`||o===`done`;if(!u&&c>=0){if(e[s].status!==e[c].status){let n=[...e],r=e[c].status;n[s]={...n[s],status:r,isActive:r===`in-progress`},t(l(n,s,c))}}else if(u&&e[s].status!==o){let n=[...e],r=o;n[s]={...n[s],status:r,isActive:r===`in-progress`},t(l(n,s,e.length-1))}},[e,t]),handleDragEnd:(0,X.useCallback)(async n=>{let{active:i,over:o}=n;if(c(null),!o)return;let s=i.id,d=o.id;if(!e.find(e=>e.id===s))return;if(d===`archive`){a?await r(s,`archived`):(v(s),g(!0)),p(null);return}let f=d===`backlog`||d===`in-progress`||d===`review`||d===`done`?d:e.find(e=>e.id===d)?.status;if(f&&u!==f&&await r(s,f),p(null),s===d)return;let m=e.findIndex(e=>e.id===s),h=e.findIndex(e=>e.id===d);m!==-1&&!(d===`backlog`||d===`in-progress`||d===`review`||d===`done`)&&h>=0&&e[m].status===e[h].status&&t(l(e,m,h))},[e,t,u,a,r]),isConfirmOpen:m,setIsConfirmOpen:g,pendingArchiveId:_,setPendingArchiveId:v}}var Pe=()=>{let{activeProject:e,loading:t}=L(),{notifyApiError:n,notifyError:r}=C(),[i,a]=(0,X.useState)(!1),[o,s]=(0,X.useState)([]),[c,l]=(0,X.useState)(!1),[d,f]=(0,X.useState)(0),[m,h]=(0,X.useState)(()=>localStorage.getItem(`skipArchiveConfirm`)===`true`),[_,v]=(0,X.useState)(!1),y=(0,X.useCallback)(async()=>{if(e)try{l(!0),s([...(await V.fetchAll(e.id)).filter(e=>e.status!==`archived`).map(t=>({id:t.id,status:t.status,code:`#TASK-${t.id.substring(0,4).toUpperCase()}`,title:t.title,priority:t.priority,agent:{name:t.assignee?.name||`Unassigned`,colorClass:`bg-surface-container-highest border-outline-variant/30`},isActive:t.status===`in-progress`,progress:t.status===`done`?100:t.status===`in-progress`?50:0,projectId:e.id,updatedAt:t.updatedAt}))].sort((e,t)=>e.status===`backlog`&&t.status===`backlog`?(e.priority||0)-(t.priority||0):e.status!==`backlog`&&t.status!==`backlog`?new Date(t.updatedAt||0).getTime()-new Date(e.updatedAt||0).getTime():0))}catch(e){console.error(`Failed to fetch tasks in TaskManager:`,e),n(e,`Fetch Error`)}finally{l(!1)}},[e,n]);(0,X.useEffect)(()=>{y()},[y,d]);let b=(0,X.useCallback)((t,n)=>{if(!e||n.projectId!==e.id)return;let r={id:n.id,status:n.status,code:`#TASK-${n.id.substring(0,4).toUpperCase()}`,title:n.title,priority:n.priority,agent:{name:n.assignee?.name||`Unassigned`,colorClass:`bg-surface-container-highest border-outline-variant/30`},isActive:n.status===`in-progress`,progress:n.status===`done`?100:n.status===`in-progress`?50:0,projectId:n.projectId,updatedAt:n.updatedAt};s(e=>t===`deleted`||n.status===`archived`?e.filter(e=>e.id!==n.id):e.some(e=>e.id===n.id)?e.map(e=>e.id===n.id?r:e).sort((e,t)=>e.status===`backlog`&&t.status===`backlog`?(e.priority||0)-(t.priority||0):e.status!==`backlog`&&t.status!==`backlog`?new Date(t.updatedAt||0).getTime()-new Date(e.updatedAt||0).getTime():0):[r,...e].sort((e,t)=>e.status===`backlog`&&t.status===`backlog`?(e.priority||0)-(t.priority||0):e.status!==`backlog`&&t.status!==`backlog`?new Date(t.updatedAt||0).getTime()-new Date(e.updatedAt||0).getTime():0))},[e]);Me(e?.id,b);let x=()=>{f(e=>e+1)},S=(0,X.useCallback)(async(t,n)=>{if(e)try{await V.update(e.id,t,{status:n}),s(n===`archived`?e=>e.filter(e=>e.id!==t):e=>e.map(e=>e.id===t?{...e,status:n,isActive:n===`in-progress`}:e))}catch(e){console.error(`Failed to update task status:`,e),r(`Status Update Failed`,`Failed to update task status in the neural mesh.`),y()}},[e,r,y]),{activeId:w,sensors:T,collisionDetection:E,handleDragStart:D,handleDragOver:O,handleDragEnd:ee,isConfirmOpen:te,setIsConfirmOpen:k,pendingArchiveId:j,setPendingArchiveId:M}=Ne({tasks:o,setTasks:s,onStatusChange:S,skipArchiveConfirm:m}),N=(0,X.useCallback)(async()=>{j&&(_&&(localStorage.setItem(`skipArchiveConfirm`,`true`),h(!0)),await S(j,`archived`)),k(!1),M(null)},[j,_,S,k,M]),F=(0,X.useMemo)(()=>o.find(e=>e.id===w),[o,w]),I=(0,X.useMemo)(()=>o.reduce((e,t)=>(e[t.status]+=1,e),{backlog:0,"in-progress":0,review:0,done:0,archived:0}),[o]);return t?(0,Z.jsx)(`div`,{className:`w-full h-[60vh] flex items-center justify-center`,children:(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,Z.jsx)(`div`,{className:`w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin`}),(0,Z.jsx)(`p`,{className:`text-on-surface-variant text-sm font-black uppercase tracking-[0.3em] animate-pulse`,children:`Initializing Neural Mesh`})]})}):e?(0,Z.jsxs)(u,{sensors:T,collisionDetection:E,onDragStart:D,onDragOver:O,onDragEnd:ee,children:[(0,Z.jsxs)(`div`,{className:`space-y-10 animate-in fade-in duration-700`,children:[!e.ownerAgent&&(0,Z.jsxs)(`div`,{className:`bg-error/10 border border-error/20 p-4 rounded-2xl flex flex-col md:flex-row items-center justify-between gap-4 animate-in fade-in slide-in-from-top-4 duration-500 shadow-lg shadow-error/5`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,Z.jsx)(`div`,{className:`w-12 h-12 rounded-2xl bg-error/20 flex items-center justify-center text-error border border-error/30`,children:(0,Z.jsx)(ue,{size:24})}),(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`h4`,{className:`text-sm font-black text-white uppercase tracking-tight`,children:`Administrative Protocol Warning`}),(0,Z.jsxs)(`p`,{className:`text-xs text-on-surface-variant max-w-2xl leading-relaxed mt-0.5`,children:[`The `,(0,Z.jsxs)(`span`,{className:`text-error font-bold italic`,children:[`"`,e.title,`"`]}),` sector currently lacks a Designated Lead Agent. A lead is required to oversee autonomous task assignment, token allocation, and critical sector operations.`]})]})]}),(0,Z.jsx)(g,{to:`/projects/${e.id}`,className:`w-full md:w-auto px-6 py-2.5 rounded-xl bg-error text-on-error text-xs font-black uppercase tracking-widest hover:scale-[1.02] active:scale-[0.98] transition-all whitespace-nowrap text-center shadow-lg shadow-error/20`,children:`Assign Protocol Lead`})]}),(0,Z.jsxs)(`div`,{className:`flex flex-col md:flex-row justify-between items-start md:items-center gap-4`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3 mb-1`,children:[(0,Z.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.3em] text-primary/60`,children:`Fleet Command`}),(0,Z.jsx)(`div`,{className:`h-1 w-1 rounded-full bg-outline-variant/30`}),(0,Z.jsx)(`span`,{className:`text-[10px] font-black uppercase tracking-[0.3em] text-on-surface-variant/40`,children:e.title})]}),(0,Z.jsx)(`h1`,{className:`text-4xl font-extrabold font-headline tracking-tight text-white`,children:`Agentic Task Canvas`}),(0,Z.jsxs)(`p`,{className:`text-outline text-sm mt-1`,children:[`Orchestrating `,(0,Z.jsx)(`span`,{className:`text-primary font-bold`,children:o.length}),` parallel node operations`]})]}),(0,Z.jsxs)(`div`,{className:`flex-1 flex items-center justify-end gap-6 max-w-4xl`,children:[(0,Z.jsx)(be,{isDragging:!!w}),(0,Z.jsxs)(`button`,{onClick:()=>a(!0),className:`bg-primary hover:bg-primary/90 text-on-primary px-8 py-3.5 rounded-2xl flex items-center gap-2 font-black text-xs uppercase tracking-widest transition-all shadow-lg shadow-primary/20 hover:scale-[1.02] active:scale-[0.98] whitespace-nowrap`,children:[(0,Z.jsx)(q,{size:18}),`Commission Task`]})]})]}),(0,Z.jsx)(ye,{isOpen:i,onClose:()=>a(!1),onCreated:x}),(0,Z.jsx)(R,{title:`Unable to render task board`,description:`The Kanban board hit an unexpected error. You can still use the rest of Task Manager while retrying this section.`,children:(0,Z.jsx)(`section`,{"aria-label":`Task board panel`,"aria-busy":c,className:U(`space-y-4`,c&&o.length===0&&`min-h-96`),children:c&&o.length===0?(0,Z.jsx)(`div`,{className:`flex h-96 w-full items-center justify-center`,children:(0,Z.jsx)(`div`,{className:`h-12 w-12 animate-spin rounded-full border-4 border-outline-variant/30 border-t-primary`})}):(0,Z.jsx)(_e,{tasks:o})})}),(0,Z.jsx)(ve,{tasks:o,taskCounts:I,projectTitle:e.title})]}),(0,Z.jsx)(p,{children:F?(0,Z.jsx)(me,{task:F,isOverlay:!0}):null}),(0,Z.jsx)(A,{isOpen:te,onClose:()=>k(!1),onConfirm:N,title:`Archive Protocol Task`,message:`Are you sure you want to transfer this task to the archival sector? This operation will remove the task node from the active grid.`,confirmText:`Archive Task`,variant:`warning`,showCheckbox:!0,onCheckboxChange:v})]}):(0,Z.jsx)(`div`,{className:`w-full h-[60vh] flex items-center justify-center`,children:(0,Z.jsxs)(`div`,{className:`text-center space-y-6 max-w-md`,children:[(0,Z.jsx)(`div`,{className:`w-20 h-20 bg-surface-container-highest rounded-3xl flex items-center justify-center text-on-surface-variant/20 mx-auto border border-outline-variant/10 shadow-xl`,children:(0,Z.jsx)(P,{size:40})}),(0,Z.jsxs)(`div`,{className:`space-y-2`,children:[(0,Z.jsx)(`h2`,{className:`text-2xl font-black font-headline text-white tracking-tight`,children:`No Active Sectors Found`}),(0,Z.jsx)(`p`,{className:`text-on-surface-variant text-sm leading-relaxed`,children:`The orchestration grid is currently offline. Please initialize a new project sector in the sidebar to begin commissioning agentic tasks.`})]}),(0,Z.jsxs)(g,{to:`/`,className:`inline-flex items-center gap-2 px-8 py-3 bg-primary text-on-primary rounded-xl font-black text-xs uppercase tracking-widest hover:scale-105 active:scale-95 transition-all shadow-lg shadow-primary/20`,children:[`Go to Dashboard`,(0,Z.jsx)(G,{size:16})]})]})})};export{Pe as default};