@overlordai/server 1.0.60 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/database/migrations/002-task-type.sql +2 -0
- package/dist/adapters/lark/lark-message.parser.d.ts +1 -0
- package/dist/adapters/lark/lark-message.parser.d.ts.map +1 -1
- package/dist/adapters/lark/lark-message.parser.js +9 -0
- package/dist/adapters/lark/lark-message.parser.js.map +1 -1
- package/dist/adapters/slack/slack-message.parser.d.ts.map +1 -1
- package/dist/adapters/slack/slack-message.parser.js +9 -0
- package/dist/adapters/slack/slack-message.parser.js.map +1 -1
- package/dist/database/repositories/task.repository.d.ts +2 -0
- package/dist/database/repositories/task.repository.d.ts.map +1 -1
- package/dist/database/repositories/task.repository.js +6 -2
- package/dist/database/repositories/task.repository.js.map +1 -1
- package/dist/database/repositories/workspace.repository.d.ts +1 -0
- package/dist/database/repositories/workspace.repository.d.ts.map +1 -1
- package/dist/database/repositories/workspace.repository.js +14 -0
- package/dist/database/repositories/workspace.repository.js.map +1 -1
- package/dist/dispatcher/dispatcher.service.d.ts.map +1 -1
- package/dist/dispatcher/dispatcher.service.js +1 -0
- package/dist/dispatcher/dispatcher.service.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +2 -0
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/dispatcher/task-creation.service.d.ts.map +1 -1
- package/dist/dispatcher/task-creation.service.js +2 -0
- package/dist/dispatcher/task-creation.service.js.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/web/frame-handlers/progress.handler.d.ts +3 -1
- package/dist/web/frame-handlers/progress.handler.d.ts.map +1 -1
- package/dist/web/frame-handlers/progress.handler.js +7 -1
- package/dist/web/frame-handlers/progress.handler.js.map +1 -1
- package/dist/web/task.controller.d.ts +2 -0
- package/dist/web/task.controller.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.d.ts +2 -1
- package/dist/web/worker-channel.gateway.d.ts.map +1 -1
- package/dist/web/worker-channel.gateway.js +5 -3
- package/dist/web/worker-channel.gateway.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-CV8VN5V1.js → AccessTokensPage-DcOzH6vQ.js} +1 -1
- package/public/assets/{AdminPage-Bo3P5iZr.js → AdminPage-DjzkTi-Z.js} +1 -1
- package/public/assets/{ApiReferencePage-CmYuc51e.js → ApiReferencePage-Cn1nZmYJ.js} +1 -1
- package/public/assets/{AuditLogPage-AZg7lGzK.js → AuditLogPage-CkE1EJZh.js} +1 -1
- package/public/assets/{BindPlatformPage-B6UZICVu.js → BindPlatformPage-DYNztOnJ.js} +1 -1
- package/public/assets/{BotManage-BmO8KcyJ.js → BotManage-B4YAKqEk.js} +1 -1
- package/public/assets/{CliReferencePage-C94W05JK.js → CliReferencePage-DyfbBqGH.js} +1 -1
- package/public/assets/{DeveloperManage-DCDaMC7Q.js → DeveloperManage-DgwZWjLh.js} +1 -1
- package/public/assets/{EditProjectPage-BppWlins.js → EditProjectPage-DjGCEool.js} +1 -1
- package/public/assets/{EmptyState-Wu8ZN3Cr.js → EmptyState-C7-kuf8X.js} +1 -1
- package/public/assets/{HomePage-l0ArgLuo.js → HomePage-CWYmPB1e.js} +1 -1
- package/public/assets/{InfoRow-g3rebB-5.js → InfoRow-DGZv5P3m.js} +1 -1
- package/public/assets/{LandingPage-boW1qkFr.js → LandingPage-ZuEWmIZL.js} +1 -1
- package/public/assets/{LoginPage-BnrBN7Pm.js → LoginPage-ZN3nJzEX.js} +1 -1
- package/public/assets/{MetricBar-DJTYljvt.js → MetricBar-CH5ccxZr.js} +1 -1
- package/public/assets/{NotFoundPage-DJfS5CJ3.js → NotFoundPage-DkoNgmQ4.js} +1 -1
- package/public/assets/{OnboardingGuide-DnA7icKO.js → OnboardingGuide-dk4OyOgV.js} +1 -1
- package/public/assets/{PipelineEditorPage-CeJlcFvd.js → PipelineEditorPage-CtUnQDef.js} +1 -1
- package/public/assets/{ProfilePage-CA89g3ZV.js → ProfilePage-B0CWDm55.js} +1 -1
- package/public/assets/{ProjectDetailPage-BWbDAdFB.js → ProjectDetailPage-BbOgUrnR.js} +1 -1
- package/public/assets/{ProjectListPage-DS1H39MT.js → ProjectListPage-CtGknAYM.js} +1 -1
- package/public/assets/{task-constants-5g7L_hzP.js → PtyTerminal-C28RQ62I.js} +4 -4
- package/public/assets/{QuickAuth-Zna-TvoV.js → QuickAuth-8eT76fKz.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-l1wwa1W6.js → RemoveMemberConfirmDialog-Ctyx8n2a.js} +1 -1
- package/public/assets/{Select-DZq-bKgi.js → Select-8MUED_Fj.js} +1 -1
- package/public/assets/{SettingsPage-TEGcISlB.js → SettingsPage-CXDXq71S.js} +1 -1
- package/public/assets/{Skeleton-Dj8lxPoL.js → Skeleton-B0x9oN6a.js} +1 -1
- package/public/assets/{SkillPage-C8Ajp8QF.js → SkillPage-CeTlmMdA.js} +1 -1
- package/public/assets/{TaskDetailPage-BtKpmra7.js → TaskDetailPage-jyeOPtsb.js} +2 -2
- package/public/assets/TaskListPage-DMYTWhw_.js +1 -0
- package/public/assets/{TaskStatusBadge-acWzsl5J.js → TaskStatusBadge-yU5DIpkP.js} +1 -1
- package/public/assets/TerminalHomePage-D3Z-uJUx.js +16 -0
- package/public/assets/{TokenManage-BIb_820M.js → TokenManage-NYgoI8yJ.js} +1 -1
- package/public/assets/{TotpSetupPage-BqZ_9PoT.js → TotpSetupPage-lw418pBO.js} +1 -1
- package/public/assets/{WorkerDetailPage-DjJH105s.js → WorkerDetailPage-CF7FWzQn.js} +1 -1
- package/public/assets/{WorkerListPage-BtbmZFmW.js → WorkerListPage-Dd6P84ye.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-Dj4Uw6lE.js → WorkerSetupGuidePage-dRLxcC1D.js} +1 -1
- package/public/assets/{arrow-left-BIZegN7f.js → arrow-left-D3hlGpFa.js} +1 -1
- package/public/assets/{arrow-right-Cz2VYV06.js → arrow-right-DbRiIkn5.js} +1 -1
- package/public/assets/{bot-DEczKx10.js → bot-DJcm4TDu.js} +1 -1
- package/public/assets/{chevron-right-BP3RjJKD.js → chevron-right-Cz1_0u26.js} +1 -1
- package/public/assets/{copy--Yno9vb0.js → copy-BSpogfAn.js} +1 -1
- package/public/assets/{external-link-CcU-f6-c.js → external-link-BYnHDfTq.js} +1 -1
- package/public/assets/{index-BkCeTWBV.js → index-C5ry7bCb.js} +3 -3
- package/public/assets/index-DBZN6iTO.css +1 -0
- package/public/assets/{key-CMkJGiSp.js → key-B7y18xnM.js} +1 -1
- package/public/assets/{loader-circle-bii_pnUR.js → loader-circle-j2WCDelv.js} +1 -1
- package/public/assets/{pencil-D5GJfzl9.js → pencil-CkuHyqYU.js} +1 -1
- package/public/assets/{plus-D1YuxwcM.js → plus-DETa4kg0.js} +1 -1
- package/public/assets/{rotate-ccw-DowaAMVF.js → rotate-ccw-oPqSTHU8.js} +1 -1
- package/public/assets/{scroll-text-BUhyeA5Y.js → scroll-text--ZQgIRbt.js} +1 -1
- package/public/assets/{settings-CZ-y53-I.js → settings-COdENdI-.js} +1 -1
- package/public/assets/{status-colors-iyCXeYpO.js → status-colors-C_xltR1x.js} +1 -1
- package/public/assets/task-constants-BisV3uAk.js +1 -0
- package/public/assets/{trash-2-BOrTcn3-.js → trash-2-BLxwKGg4.js} +1 -1
- package/public/assets/{useFetch-HnnJMiuj.js → useFetch-CKA2R0HW.js} +1 -1
- package/public/assets/{users-3lnyKPXK.js → users-Cm06VaAm.js} +1 -1
- package/public/assets/{wifi-7vpmfpr3.js → wifi-CoOrgHWP.js} +1 -1
- package/public/assets/{zap-BWW7mt1l.js → zap-CZBm69SW.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/TaskListPage-CvipzH6U.js +0 -1
- package/public/assets/TerminalHomePage-CcAC6dSC.js +0 -16
- package/public/assets/index-BS0Fbx5V.css +0 -1
- package/public/assets/task.store-CtHlNDEq.js +0 -1
- /package/public/assets/{task-constants-Beg8tuEN.css → PtyTerminal-Beg8tuEN.css} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as j,r as a,a as w,j as t,X as N,C as L,L as D,D as m}from"./index-
|
|
1
|
+
import{u as j,r as a,a as w,j as t,X as N,C as L,L as D,D as m}from"./index-C5ry7bCb.js";import{C as S}from"./chevron-right-Cz1_0u26.js";function y(e){return[{id:"admin_create_project",title:e("onboarding.admin_create_project_title"),description:e("onboarding.admin_create_project_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects"),autoDetect:!0},{id:"admin_register_worker",title:e("onboarding.admin_register_worker_title"),description:e("onboarding.admin_register_worker_desc"),link:"/workers",linkLabel:e("onboarding.go_to_workers"),autoDetect:!0},{id:"admin_create_developer",title:e("onboarding.admin_create_developer_title"),description:e("onboarding.admin_create_developer_desc"),link:"/admin/developers",linkLabel:e("onboarding.manage_developers"),autoDetect:!0},{id:"admin_configure_bot",title:e("onboarding.admin_configure_bot_title"),description:e("onboarding.admin_configure_bot_desc"),link:"/admin/bots",linkLabel:e("onboarding.go_to_bots")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"admin_first_task",title:e("onboarding.admin_first_task_title"),description:e("onboarding.admin_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks"),autoDetect:!0}]}function C(e){return[{id:"lead_view_projects",title:e("onboarding.lead_view_projects_title"),description:e("onboarding.lead_view_projects_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"lead_configure_pipeline",title:e("onboarding.lead_configure_pipeline_title"),description:e("onboarding.lead_configure_pipeline_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"lead_add_member",title:e("onboarding.lead_add_member_title"),description:e("onboarding.lead_add_member_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"lead_first_task",title:e("onboarding.lead_first_task_title"),description:e("onboarding.lead_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks")}]}function E(e){return[{id:"dev_install_cli",title:e("onboarding.dev_install_cli_title"),description:e("onboarding.dev_install_cli_desc"),link:"/docs/cli",linkLabel:e("onboarding.cli")},{id:"dev_setup_cli",title:e("onboarding.dev_setup_cli_title"),description:e("onboarding.dev_setup_cli_desc"),link:"/docs/cli",linkLabel:e("onboarding.setup_guide")},{id:"dev_link_chat",title:e("onboarding.dev_link_chat_title"),description:e("onboarding.dev_link_chat_desc")},{id:"dev_view_projects",title:e("onboarding.dev_view_projects_title"),description:e("onboarding.dev_view_projects_desc"),link:"/projects",linkLabel:e("onboarding.go_to_projects")},{id:"dev_first_task",title:e("onboarding.dev_first_task_title"),description:e("onboarding.dev_first_task_desc"),link:"/tasks",linkLabel:e("onboarding.go_to_tasks"),autoDetect:!0}]}const p="overlord_onboarding";function v(){try{const e=localStorage.getItem(p);if(e)return JSON.parse(e)}catch{}return{dismissed:!1,completed:{}}}function R(){return v().dismissed}function u(e){localStorage.setItem(p,JSON.stringify(e))}function $({data:e}){const l=j(i=>{var n;return(n=i.user)==null?void 0:n.role}),[s,c]=a.useState(v),{t:r}=w();function x(){return l===m.ADMIN?y(r):l===m.LEAD?C(r):E(r)}const o=x(),_=a.useCallback(i=>{if(s.completed[i.id])return!0;if(!i.autoDetect)return!1;switch(i.id){case"admin_create_project":return e.totalProjects>0;case"admin_register_worker":return e.totalWorkers>0;case"admin_create_developer":return e.totalDevelopers>1;case"admin_first_task":case"dev_first_task":return e.activeTasks>0;default:return!1}},[s.completed,e]),d=o.filter(_).length,k=d===o.length,h=a.useCallback(i=>{c(n=>{const g={...n,completed:{...n.completed,[i]:!n.completed[i]}};return u(g),g})},[]),b=a.useCallback(()=>{c(i=>{const n={...i,dismissed:!0};return u(n),window.dispatchEvent(new Event("onboarding-dismissed")),n})},[]);if(s.dismissed)return null;const f=Math.round(d/o.length*100);return t.jsxs("div",{className:"mb-6 md:mb-8 rounded-[4px] border border-[var(--accent)]/30 bg-[var(--bg-card)]",children:[t.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-4 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:r("onboarding.getting_started")}),t.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[d,"/",o.length," completed"]})]}),t.jsx("button",{onClick:b,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",title:r("onboarding.dismiss"),children:t.jsx(N,{className:"h-3.5 w-3.5"})})]}),t.jsx("div",{className:"h-0.5 bg-[var(--border)]",children:t.jsx("div",{className:"h-full bg-[var(--accent)] transition-all duration-500",style:{width:`${f}%`}})}),t.jsx("div",{className:"divide-y divide-[var(--border)]",children:o.map(i=>{const n=_(i);return t.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 transition-colors hover:bg-[var(--bg-input)]",children:[t.jsx("button",{onClick:()=>!i.autoDetect&&h(i.id),className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors ${n?"border-[var(--accent)] bg-[var(--accent)]":"border-[var(--border)] hover:border-[var(--text-muted)]"} ${i.autoDetect?"cursor-default":"cursor-pointer"}`,children:n&&t.jsx(L,{className:"h-2.5 w-2.5 text-black"})}),t.jsxs("div",{className:"flex flex-1 items-center justify-between min-w-0",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:`text-xs ${n?"text-[var(--text-muted)] line-through":"text-[var(--text-primary)]"}`,children:i.title}),t.jsx("p",{className:"text-[11px] text-[var(--text-muted)] truncate",children:i.description})]}),i.link&&!n&&t.jsxs(D,{to:i.link,className:"ml-3 flex shrink-0 items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[i.linkLabel," ",t.jsx(S,{className:"h-3 w-3"})]})]})]},i.id)})}),k&&t.jsxs("div",{className:"border-t border-[var(--border)] px-4 py-3 text-center",children:[t.jsx("span",{className:"text-xs text-[var(--accent)]",children:r("onboarding.all_done")}),t.jsx("button",{onClick:b,className:"ml-3 text-[11px] text-[var(--text-muted)] underline hover:text-[var(--text-primary)]",children:r("onboarding.dismiss")})]})]})}export{$ as O,R as i};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as g,r as d,j as e,v as $,e as I,g as S,t as y}from"./index-
|
|
1
|
+
import{a as g,r as d,j as e,v as $,e as I,g as S,t as y}from"./index-C5ry7bCb.js";import{S as C}from"./Select-8MUED_Fj.js";import{t as M}from"./string-B39tzdVK.js";const O={stages:[]};function q(){return{name:"",prompt:""}}function b({children:t}){return e.jsx("label",{className:"mb-1 block font-mono text-[11px] text-[var(--text-secondary)]",children:t})}function j({value:t,onChange:o,placeholder:a,type:r="text",className:c=""}){return e.jsx("input",{type:r,value:t,onChange:s=>o(s.target.value),placeholder:a,className:`w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none ${c}`})}function J({checked:t,onChange:o}){return e.jsx("button",{type:"button",role:"switch","aria-checked":t,onClick:()=>o(!t),className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border border-[var(--border)] transition-colors ${t?"bg-[var(--accent)]":"bg-[var(--bg-primary)]"}`,children:e.jsx("span",{className:`inline-block h-3.5 w-3.5 rounded-full bg-white shadow transition-transform ${t?"translate-x-[18px]":"translate-x-[2px]"}`})})}function N({value:t,onChange:o,placeholder:a,rows:r=4}){return e.jsx("textarea",{value:t,onChange:c=>o(c.target.value),placeholder:a,rows:r,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-2.5 py-1.5 font-mono text-xs leading-relaxed text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:border-[var(--accent)] focus:outline-none"})}function T({stage:t,index:o,selected:a,onSelect:r,onDelete:c}){const{t:s}=g(),i=t.prompt?M(t.prompt,60):"";return e.jsxs("button",{type:"button",onClick:r,className:`group relative flex w-full items-start gap-3 rounded-[4px] border px-4 py-3 text-left transition-colors ${a?"border-[var(--accent)] bg-[var(--bg-card)]":"border-[var(--border)] bg-[var(--bg-card)] hover:border-[var(--text-muted)]"}`,style:{borderLeftWidth:3,borderLeftColor:"var(--accent)"},children:[e.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-[var(--text-muted)]",children:String(o+1).padStart(2,"0")}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-mono text-xs font-bold text-[var(--text-primary)]",children:t.name||"unnamed"}),t.label&&e.jsx("span",{className:"truncate font-mono text-[11px] text-[var(--text-muted)]",children:t.label})]}),i&&e.jsxs("div",{className:"mt-0.5 truncate font-mono text-[11px] text-[var(--text-muted)]",children:["// ",i]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 font-mono text-[11px] text-[var(--text-muted)]",children:[t.gate&&e.jsx("span",{children:"gate"}),t.requireConfirm&&e.jsx("span",{children:"confirm"}),t.timeout!=null&&e.jsxs("span",{children:["timeout:",t.timeout,"s"]})]})]}),e.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),c()},className:"mt-0.5 shrink-0 rounded-[4px] p-0.5 text-[var(--text-muted)] opacity-0 transition-opacity hover:text-[var(--destructive)] group-hover:opacity-100","aria-label":s("pipeline.delete_stage"),children:e.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"3 6 5 6 21 6"}),e.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})}function _({stage:t,onChange:o,allStageNames:a}){const{t:r}=g(),c=d.useMemo(()=>{const s=[{value:"",label:"-- select --"}];for(const i of a)i&&i!==t.name&&s.push({value:i,label:i});return s},[a,t.name]);return e.jsxs("div",{className:"space-y-4",children:[e.jsx("h3",{className:"font-mono text-sm font-semibold text-[var(--accent)]",children:r("pipeline.stage_properties")}),e.jsx("p",{className:"font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.editing",{name:t.name||r("pipeline.unnamed")})}),e.jsxs("div",{children:[e.jsxs(b,{children:[r("pipeline.name")," *"]}),e.jsx(j,{value:t.name,onChange:s=>o({name:s}),placeholder:r("pipeline.stage_name")})]}),e.jsxs("div",{children:[e.jsx(b,{children:"label"}),e.jsx(j,{value:t.label??"",onChange:s=>o({label:s||void 0}),placeholder:"optional display label"})]}),e.jsxs("div",{children:[e.jsx(b,{children:"prompt *"}),e.jsx(N,{value:t.prompt,onChange:s=>o({prompt:s}),placeholder:"instructions for the agent...",rows:8})]}),e.jsxs("div",{children:[e.jsx(b,{children:"gate"}),e.jsx(j,{value:t.gate??"",onChange:s=>o({gate:s||void 0}),placeholder:"Pass condition, e.g.: no P1-P3 issues"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(b,{children:r("pipeline.confirm_required")}),e.jsx(J,{checked:t.requireConfirm??!1,onChange:s=>o({requireConfirm:s})})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.timeout")}),e.jsx(j,{type:"number",value:String(t.timeout??""),onChange:s=>o({timeout:s?parseInt(s,10):void 0}),placeholder:"600"})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("p",{className:"mb-3 font-mono text-[11px] text-[var(--text-muted)]",children:r("pipeline.on_failure_section")}),e.jsxs("div",{className:"mb-3",children:[e.jsx(b,{children:r("pipeline.on_failure")}),e.jsx(C,{value:t.onFailure?"goto":"stop",onChange:s=>{o(s==="stop"?{onFailure:void 0}:{onFailure:{goto:"",maxLoops:3}})},options:[{value:"stop",label:r("pipeline.stop")},{value:"goto",label:r("pipeline.goto_stage")}]})]}),t.onFailure&&e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.goto")}),e.jsx(C,{value:t.onFailure.goto,onChange:s=>{var i;return o({onFailure:{goto:s,maxLoops:((i=t.onFailure)==null?void 0:i.maxLoops)??3}})},options:c})]}),e.jsxs("div",{children:[e.jsx(b,{children:r("pipeline.max_loops")}),e.jsx(j,{type:"number",value:String(t.onFailure.maxLoops),onChange:s=>{var i;return o({onFailure:{goto:((i=t.onFailure)==null?void 0:i.goto)??"",maxLoops:s?parseInt(s,10):3}})},placeholder:"3"})]})]})]}),e.jsxs("div",{className:"border-t border-[var(--border)] pt-3",children:[e.jsx("h4",{className:"mb-2 font-mono text-xs font-semibold text-[var(--accent)]",children:"params"}),e.jsx(N,{value:t.params?Object.entries(t.params).map(([s,i])=>`${s}=${i}`).join(`
|
|
2
2
|
`):"",onChange:s=>{if(!s.trim()){o({params:void 0});return}const i={};s.split(`
|
|
3
3
|
`).forEach(p=>{const l=p.indexOf("=");l>0&&(i[p.slice(0,l).trim()]=p.slice(l+1).trim())}),o({params:i})},placeholder:"KEY=value (one per line)",rows:3})]})]})}function B({value:t,onChange:o}){const[a,r]=d.useState(t.trim().length>0);return d.useEffect(()=>{!a&&t.trim().length>0&&r(!0)},[t,a]),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("button",{type:"button",onClick:()=>r(c=>!c),className:"flex w-full items-center justify-between px-4 py-3 text-left font-mono text-xs font-semibold text-[var(--accent)]",children:[e.jsx("span",{children:"preamble"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a?"[-]":"[+]"})]}),a&&e.jsx("div",{className:"border-t border-[var(--border)] px-4 py-3",children:e.jsx(N,{value:t,onChange:o,placeholder:"Global pre-prompt injected before all stages",rows:4})})]})}function G({value:t,onChange:o}){const{t:a}=g(),[r,c]=d.useState(null),[s,i]=d.useState(!1),p=d.useMemo(()=>t??O,[t]),l=p.stages,h=r!=null?l[r]??null:null,f=d.useMemo(()=>l.map(n=>n.name),[l]),v=d.useCallback(n=>{o({...p,stages:n})},[o,p]),F=d.useCallback(()=>{const n=[...l,q()];v(n),c(n.length-1)},[l,v]),E=d.useCallback(n=>{const x=l.filter((m,u)=>u!==n);v(x),r===n?c(x.length>0?Math.min(n,x.length-1):null):r!=null&&r>n&&c(r-1)},[l,r,v]),w=d.useCallback((n,x)=>{const m=l.map((u,P)=>P===n?{...u,...x}:u);v(m)},[l,v]),k=d.useCallback((n,x)=>{const m=x==="up"?n-1:n+1;if(m<0||m>=l.length)return;const u=[...l];[u[n],u[m]]=[u[m],u[n]],v(u),r===n?c(m):r===m&&c(n)},[l,r,v]),L=d.useMemo(()=>JSON.stringify(p,null,2),[p]);return e.jsxs("div",{className:"flex flex-col gap-0",children:[e.jsx("div",{className:"mb-4 flex items-center gap-2",children:e.jsxs("button",{type:"button",onClick:()=>i(n=>!n),className:`rounded-[4px] border px-2 py-1 font-mono text-[11px] transition-colors ${s?"border-[var(--accent)] text-[var(--accent)]":"border-[var(--border)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:[a("pipeline.json_toggle")," ⇅"]})}),s&&e.jsx("pre",{className:"mb-4 max-h-[400px] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-3 font-mono text-[11px] leading-relaxed text-[var(--text-primary)]",children:L}),e.jsx("div",{className:"mb-4",children:e.jsx(B,{value:p.preamble??"",onChange:n=>o({...p,preamble:n||void 0})})}),e.jsxs("div",{className:"flex gap-6",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[l.map((n,x)=>{var m;return e.jsxs("div",{children:[e.jsx(T,{stage:n,index:x,selected:r===x,onSelect:()=>c(x),onDelete:()=>E(x)}),x<l.length-1&&e.jsxs("div",{className:"flex items-center justify-center gap-2 py-2",children:[e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:"▼"}),e.jsx("div",{className:"h-6 w-px bg-[var(--border)]"})]}),((m=n.onFailure)==null?void 0:m.goto)&&e.jsx("div",{className:"flex items-center justify-center gap-1.5 py-1",children:e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["↺ loop → ",n.onFailure.goto," (max ",n.onFailure.maxLoops,")"]})})]},`${x}-${n.name}`)}),r!=null&&l.length>1&&e.jsxs("div",{className:"flex items-center gap-1 pl-7 pt-2",children:[e.jsxs("button",{type:"button",disabled:r===0,onClick:()=>k(r,"up"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▲ ",a("pipeline.up")]}),e.jsxs("button",{type:"button",disabled:r===l.length-1,onClick:()=>k(r,"down"),className:"rounded-[4px] border border-[var(--border)] px-2 py-0.5 font-mono text-[11px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] disabled:opacity-30",children:["▼ ",a("pipeline.down")]})]}),e.jsx("div",{className:"flex items-center justify-center py-3",children:e.jsxs("button",{type:"button",onClick:F,className:"flex items-center gap-1.5 rounded-[4px] border border-dashed border-[var(--border)] px-4 py-2 font-mono text-xs text-[var(--accent)] transition-colors hover:border-[var(--accent)] hover:bg-[var(--bg-secondary)]",children:[e.jsx("span",{className:"text-sm leading-none",children:"+"})," ",a("pipeline.add_stage")]})}),h&&e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"font-mono text-xs font-semibold text-[var(--accent)]",children:a("pipeline.stage_properties")}),e.jsx("button",{type:"button",onClick:()=>c(null),className:"rounded-[4px] border border-[var(--border)] px-2 py-1 font-mono text-[11px] text-[var(--text-muted)]",children:"x"})]}),e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f})]})]}),e.jsx("div",{className:"hidden w-[360px] shrink-0 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 lg:block",style:{alignSelf:"flex-start",position:"sticky",top:0},children:h?e.jsx(_,{stage:h,onChange:n=>w(r,n),allStageNames:f}):e.jsx("div",{className:"flex min-h-[200px] items-center justify-center",children:e.jsx("p",{className:"font-mono text-xs text-[var(--text-muted)]",children:a("pipeline.select_stage")})})})]})]})}function A(){const{key:t}=$(),o=I(),{t:a}=g(),[r,c]=d.useState(null),[s,i]=d.useState(!0),[p,l]=d.useState(!1);d.useEffect(()=>{t&&S.get(`web/projects/${t}`).json().then(f=>{if(f.pipeline)try{c(JSON.parse(f.pipeline))}catch{c(null)}}).catch(()=>y.error(a("pipeline.failed_to_load_project"))).finally(()=>i(!1))},[t,a]);const h=d.useCallback(async()=>{if(t){l(!0);try{await S.put(`web/projects/${t}`,{json:{pipeline:r?JSON.stringify(r):null}}),y.success(a("pipeline.saved"))}catch{y.error(a("pipeline.failed_to_save"))}finally{l(!1)}}},[t,r,a]);return s?e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("pipeline.loading_pipeline")})}):e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[e.jsxs("div",{className:"flex flex-col gap-3 border-b border-[var(--border)] px-4 md:px-8 py-5 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"text-base font-medium text-[var(--text-primary)] shrink-0",children:a("pipeline.title")}),e.jsx("span",{className:"text-sm text-[var(--text-muted)] truncate",children:a("pipeline.subtitle",{key:t??""})})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("button",{type:"button",onClick:h,disabled:p,className:"rounded-[4px] bg-[var(--accent)] px-4 py-1.5 text-xs font-bold text-black disabled:opacity-50",children:a(p?"common.saving":"pipeline.save")}),e.jsx("button",{type:"button",onClick:()=>o(`/projects/${t}`),className:"rounded-[4px] border border-[var(--border)] px-4 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("pipeline.cancel")})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4 md:p-8",children:e.jsx(G,{value:r,onChange:c})})]})}export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,r as o,j as e,L as q,K as D,g as p,t as c}from"./index-
|
|
1
|
+
import{a as R,r as o,j as e,L as q,K as D,g as p,t as c}from"./index-C5ry7bCb.js";import{v as F}from"./password-CHk45-jw.js";import{I as s}from"./InfoRow-DGZv5P3m.js";import{u as T}from"./useFetch-CKA2R0HW.js";function z(){var N,y,k,P;const{t:r}=R(),{data:a,loading:C,refetch:E}=T(()=>p.get("web/profile").json(),[]),[x,m]=o.useState(""),[d,b]=o.useState(""),[u,f]=o.useState(""),[v,g]=o.useState(!1),[h,l]=o.useState(""),[i,j]=o.useState(""),[w,_]=o.useState(!1);async function L(){if(l(""),!x){l(r("profile.current_password_required"));return}if(!d){l(r("profile.new_password_required"));return}const t=F(d);if(t){l(r(t));return}if(d!==u){l(r("profile.passwords_do_not_match"));return}try{g(!0),await p.put("web/profile/password",{json:{currentPassword:x,newPassword:d}}),c.success(r("profile.password_changed")),m(""),b(""),f("")}catch(n){const U=n instanceof Error?n.message:r("profile.failed_to_change_password");l(U)}finally{g(!1)}}async function S(){if(!i||i.length!==6){c.error(r("profile.totp_code_required"));return}try{_(!0),await p.post("web/profile/totp/regenerate",{json:{code:i}}),c.success(r("profile.two_fa_regenerated")),j(""),E()}catch(t){const n=t instanceof Error?t.message:r("profile.totp_code_invalid");c.error(n)}finally{_(!1)}}return C?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-5 w-5 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):e.jsxs("div",{className:"mx-auto max-w-xl space-y-8 px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("h1",{className:"text-lg text-[var(--text-primary)]",children:[r("profile.title")," ",e.jsx("span",{className:"text-[var(--text-muted)]",children:r("profile.personal_settings")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.profile_info")}),a?e.jsxs("div",{className:"space-y-2",children:[e.jsx(s,{variant:"fixed-label",label:r("profile.username"),value:a.name}),e.jsx(s,{variant:"fixed-label",label:r("common.role"),value:a.role}),e.jsx(s,{variant:"fixed-label",label:r("profile.git_name"),value:a.gitName||r("common.not_set")}),e.jsx(s,{variant:"fixed-label",label:r("profile.git_email"),value:a.gitEmail||r("common.not_set")}),e.jsx(s,{variant:"fixed-label",label:r("profile.status"),value:a.status}),e.jsx(s,{variant:"fixed-label",label:r("profile.created_at"),value:new Date(a.createdAt).toLocaleDateString()})]}):e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:r("profile.unable_to_load_profile")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.platform_accounts")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(s,{variant:"fixed-label",label:"lark",value:(N=a==null?void 0:a.platformUids)!=null&&N.lark?`${a.platformUids.lark.slice(0,12)}... ✓`:r("profile.not_linked")}),e.jsx(s,{variant:"fixed-label",label:"slack",value:(y=a==null?void 0:a.platformUids)!=null&&y.slack?`${a.platformUids.slack.slice(0,12)}... ✓`:r("profile.not_linked")})]}),(!((k=a==null?void 0:a.platformUids)!=null&&k.lark)||!((P=a==null?void 0:a.platformUids)!=null&&P.slack))&&e.jsx("p",{className:"mt-3 text-xs text-[var(--text-muted)]",children:r("profile.bind_hint")})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.change_password")}),e.jsxs("div",{className:"space-y-4",children:[h&&e.jsx("div",{className:"rounded-[4px] border border-[var(--destructive)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--destructive)]",children:h}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_password")}),e.jsx("input",{type:"password",value:x,onChange:t=>m(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.new_password")}),e.jsx("input",{type:"password",value:d,onChange:t=>b(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-xs text-[var(--text-muted)]",children:r("profile.password_hint_10_20")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.confirm_password")}),e.jsx("input",{type:"password",value:u,onChange:t=>f(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:L,disabled:v,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black disabled:opacity-50",children:r(v?"common.updating":"profile.update_password")})})]})]}),e.jsxs("section",{className:"rounded-[4px] bg-[var(--bg-card)] border border-[var(--border)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("profile.two_factor_auth")}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"flex items-center gap-2 text-sm",children:a!=null&&a.totpEnabled?e.jsxs("span",{className:"text-[var(--accent)]",children:["● ",r("profile.two_fa_enabled")]}):e.jsxs("span",{className:"text-[var(--text-muted)]",children:["● ",r("profile.two_fa_not_setup")]})}),(a==null?void 0:a.totpEnabled)&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.regenerate_2fa_warning")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-xs text-[var(--text-secondary)]",children:r("profile.current_totp_code")}),e.jsx("input",{type:"text",inputMode:"numeric",maxLength:6,placeholder:r("profile.totp_code_placeholder"),value:i,onChange:t=>{const n=t.target.value.replace(/\D/g,"").slice(0,6);j(n)},className:"w-full max-w-xs rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-sm text-[var(--text-primary)] outline-none focus:border-[var(--accent)] font-mono tracking-widest"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:S,disabled:w||i.length!==6,className:"rounded-[4px] border border-[var(--warning)] bg-transparent px-4 py-2 text-xs font-medium text-[var(--warning)] hover:bg-[var(--warning)] hover:text-black disabled:opacity-50 transition-colors",children:r(w?"profile.regenerating":"profile.regenerate_2fa")})})]})]})]}),e.jsxs(q,{to:"/access-tokens",className:"flex items-center gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 transition-colors hover:border-[var(--accent)]",children:[e.jsx(D,{size:16,className:"text-[var(--accent)]"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-[var(--text-primary)]",children:r("profile.access_tokens")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("profile.access_tokens_desc")})]})]})]})}export{z as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as F,a as D,j as e,s as U,v as E,e as R,u as q,h as K,r as x,P as A,n as B,y as H,g as v}from"./index-
|
|
1
|
+
import{c as F,a as D,j as e,s as U,v as E,e as R,u as q,h as K,r as x,P as A,n as B,y as H,g as v}from"./index-C5ry7bCb.js";import{U as J,A as V,R as z}from"./RemoveMemberConfirmDialog-Ctyx8n2a.js";import{b as I}from"./date-BdNtiQTP.js";import{t as G}from"./status-colors-C_xltR1x.js";import{I as o}from"./InfoRow-DGZv5P3m.js";import{u as Q}from"./useFetch-CKA2R0HW.js";import{P as X}from"./pencil-CkuHyqYU.js";import{T as Y}from"./trash-2-BLxwKGg4.js";import{P as Z}from"./plus-DETa4kg0.js";import"./Select-8MUED_Fj.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as R,a as z,r as o,G as u,A as x,j as e,g as E,e as G,n as I}from"./index-
|
|
1
|
+
import{c as R,a as z,r as o,G as u,A as x,j as e,g as E,e as G,n as I}from"./index-C5ry7bCb.js";import{S as A}from"./Select-8MUED_Fj.js";import{E as M}from"./EmptyState-C7-kuf8X.js";import{T as D}from"./Skeleton-B0x9oN6a.js";import{t as H}from"./date-BdNtiQTP.js";import{u as O}from"./useFetch-CKA2R0HW.js";import{P as J}from"./plus-DETa4kg0.js";/**
|
|
2
2
|
* @license lucide-react v0.469.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|