hanoman 0.9.25 → 0.9.26

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.
@@ -1 +1 @@
1
- import{u as l,j as s,n as f}from"./index-BDL3vexH.js";import{R as o}from"./react-DfGhg7ZW.js";const m=6e3;function p({className:a="",style:r={}}){const e=l(),t=!e.idle&&!e.connected&&!e.paused,[i,n]=o.useState(()=>Date.now());o.useEffect(()=>{if(!t)return;n(Date.now());const u=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(u)},[t,e.since]);const c=t&&i-e.since>=m;return s.jsx("span",{role:"status","aria-live":"polite",className:`hn-live-status ${a}`.trim(),style:r,children:c&&s.jsx(f,{tone:"warn",variant:"soft",icon:"wifi-off",children:"koneksi terputus · menyambung ulang…"})})}export{p as L};
1
+ import{u as l,j as s,n as f}from"./index-BvFCEJud.js";import{R as o}from"./react-DfGhg7ZW.js";const m=6e3;function p({className:a="",style:r={}}){const e=l(),t=!e.idle&&!e.connected&&!e.paused,[i,n]=o.useState(()=>Date.now());o.useEffect(()=>{if(!t)return;n(Date.now());const u=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(u)},[t,e.since]);const c=t&&i-e.since>=m;return s.jsx("span",{role:"status","aria-live":"polite",className:`hn-live-status ${a}`.trim(),style:r,children:c&&s.jsx(f,{tone:"warn",variant:"soft",icon:"wifi-off",children:"koneksi terputus · menyambung ulang…"})})}export{p as L};
@@ -1 +1 @@
1
- import{j as s,B as m,a1 as f}from"./index-BDL3vexH.js";import{R as c}from"./react-DfGhg7ZW.js";import"./markdown-CWEY34jk.js";/* empty css */function p(t,e=Date.now()){return f(t,e)||"—"}function b(t,e=Date.now()){if(!t)return"—";const r=new Date(t).getTime()-e;if(r<=0)return"jatuh tempo";const n=Math.ceil(r/6e4);return n<60?`${n} menit lagi`:`${Math.ceil(n/60)} jam lagi`}function g(t,e,r,n,a=!0){const i=t.trim()===""?NaN:Number(t.replace(",","."));if(!Number.isFinite(i))return n;const o=a?Math.round(i):i;return Math.min(r,Math.max(e,o))}function D(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function y(t,e){if(!t)return"—";const r=new Date(t);if(Number.isNaN(r.getTime()))return"—";const n={dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat("id-ID",e?{...n,timeZone:e}:n).format(r)}catch(a){if(a instanceof RangeError)return new Intl.DateTimeFormat("id-ID",n).format(r);throw a}}function w({message:t,onRetry:e,busy:r=!1}){return s.jsxs("div",{role:"alert",className:"hn-sched-error",children:[s.jsx("span",{className:"hn-sched-error-text",children:t}),s.jsx(m,{size:"sm",variant:"secondary",leftIcon:"rotate-ccw",disabled:r,onClick:e,children:"Coba lagi"})]})}function x(t){const[e,r]=c.useState(t),n=c.useRef(t),a=JSON.stringify(t);c.useEffect(()=>{const o=JSON.stringify(n.current);n.current=t,r(u=>JSON.stringify(u)===o?t:u)},[a]);const i=JSON.stringify(e)!==a;return{draft:e,setDraft:r,dirty:i}}export{w as I,p as a,D as b,g as c,b as d,y as f,x as u};
1
+ import{j as s,B as m,a1 as f}from"./index-BvFCEJud.js";import{R as c}from"./react-DfGhg7ZW.js";import"./markdown-CWEY34jk.js";/* empty css */function p(t,e=Date.now()){return f(t,e)||"—"}function b(t,e=Date.now()){if(!t)return"—";const r=new Date(t).getTime()-e;if(r<=0)return"jatuh tempo";const n=Math.ceil(r/6e4);return n<60?`${n} menit lagi`:`${Math.ceil(n/60)} jam lagi`}function g(t,e,r,n,a=!0){const i=t.trim()===""?NaN:Number(t.replace(",","."));if(!Number.isFinite(i))return n;const o=a?Math.round(i):i;return Math.min(r,Math.max(e,o))}function D(){return Intl.DateTimeFormat().resolvedOptions().timeZone}function y(t,e){if(!t)return"—";const r=new Date(t);if(Number.isNaN(r.getTime()))return"—";const n={dateStyle:"medium",timeStyle:"short"};try{return new Intl.DateTimeFormat("id-ID",e?{...n,timeZone:e}:n).format(r)}catch(a){if(a instanceof RangeError)return new Intl.DateTimeFormat("id-ID",n).format(r);throw a}}function w({message:t,onRetry:e,busy:r=!1}){return s.jsxs("div",{role:"alert",className:"hn-sched-error",children:[s.jsx("span",{className:"hn-sched-error-text",children:t}),s.jsx(m,{size:"sm",variant:"secondary",leftIcon:"rotate-ccw",disabled:r,onClick:e,children:"Coba lagi"})]})}function x(t){const[e,r]=c.useState(t),n=c.useRef(t),a=JSON.stringify(t);c.useEffect(()=>{const o=JSON.stringify(n.current);n.current=t,r(u=>JSON.stringify(u)===o?t:u)},[a]);const i=JSON.stringify(e)!==a;return{draft:e,setDraft:r,dirty:i}}export{w as I,p as a,D as b,g as c,b as d,y as f,x as u};
@@ -1 +1 @@
1
- import{j as a,cm as j,aH as g,F as u,bO as p,b1 as C,cn as N,g as x,aJ as $,bJ as k,co as S,cp as A,a9 as L,ac as F,ad as M}from"./index-BDL3vexH.js";import{R as O}from"./react-DfGhg7ZW.js";import"./markdown-CWEY34jk.js";/* empty css */const v=[{id:"claude",label:k.claude},{id:"codex",label:k.codex}],T=[{value:"inline",label:"Inline — agen fase mengerjakan task sendiri (cepat)"},{value:"subagent",label:"Subagen per task — implementer + review tiap task (lebih lambat)"}],_={model:null,effort:null};function I({flow:s,phase:n,runtime:r,cell:e,disabled:t,onPick:l}){const d=A(r),i=L(r,e.model??""),m=r==="codex"?F:M,b=[{value:"",label:"— warisi orchestrator"},...e.model&&!d.some(o=>o.id===e.model)?[{value:e.model,label:e.model}]:[],...d.map(o=>({value:o.id,label:o.label}))],E=[{value:"",label:"— warisi"},...e.effort&&!i.includes(e.effort)?[{value:e.effort,label:e.effort}]:[],...i.map(o=>({value:o,label:o}))];return a.jsxs("div",{className:"hn-sched-picks",children:[a.jsx(x,{size:"sm","aria-label":`Model ${s} ${n} ${r}`,value:e.model??"",className:"hn-sched-pick-model",options:b,disabled:t,onChange:o=>{const h=o.target.value||null;l({model:h,effort:h&&e.effort?m(h,e.effort):e.effort},`${n} (${r}) → ${h??"warisi"}`)}}),a.jsx(x,{size:"sm","aria-label":`Effort ${s} ${n} ${r}`,value:e.effort??"",className:"hn-sched-pick-effort",options:E,disabled:t,onChange:o=>l({...e,effort:o.target.value||null},`${n} (${r}) effort → ${o.target.value||"warisi"}`)})]})}function y({flow:s,f:n,putFlow:r}){return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hn-sched-flow-row",children:[a.jsx("span",{className:"hn-sched-flow-status",children:n.enabled?"Fase dikerjakan subagen":"Satu sesi biasa (subagen nonaktif)"}),a.jsx(C,{checked:n.enabled,"aria-label":`Orkestrasi ${s}`,onChange:e=>r(s,{...n,enabled:e},`Orkestrasi ${u[s]} · ${e?"aktif":"nonaktif"}`)})]}),N.has(s)&&a.jsxs("div",{className:"hn-sched-flow-mode",children:[a.jsx("span",{className:"hn-sched-flow-mode-label",children:"Cara mengerjakan rencana"}),a.jsx(x,{size:"sm","aria-label":`Mode Execute ${s}`,value:n.executeMode??"inline",className:"hn-sched-flow-mode-select",options:T,disabled:!n.enabled,onChange:e=>{const t=e.target.value==="subagent"?"subagent":"inline";r(s,{...n,executeMode:t},`Mode Execute ${u[s]} · ${t==="subagent"?"subagen per task":"inline"}`)}}),a.jsx("span",{className:"hn-sched-flow-mode-note",children:"khusus sesi Claude · Codex selalu inline"})]}),a.jsx($,{children:a.jsxs("table",{className:"hn-sched-matrix",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Fase"}),v.map(e=>a.jsx("th",{children:e.label},e.id))]})}),a.jsx("tbody",{children:S[s].map(e=>a.jsxs("tr",{children:[a.jsx("td",{children:e}),v.map(t=>a.jsx("td",{children:a.jsx(I,{flow:s,phase:e,runtime:t.id,cell:n[t.id][e]??_,disabled:!n.enabled,onPick:(l,d)=>r(s,{...n,[t.id]:{...n[t.id],[e]:l}},d)})},t.id))]},e))})]})})]})}function R({flow:s,f:n,putFlow:r}){const[e,t]=O.useState(!1),l=O.useId();return a.jsxs("div",{className:"hn-sched-flow","data-testid":`orch-flow-${s}`,children:[a.jsxs("button",{type:"button",className:"hn-sched-flow-head hn-touch-target","aria-expanded":e,"aria-controls":l,onClick:()=>t(d=>!d),children:[a.jsx("span",{children:u[s]}),a.jsx("span",{className:"hn-sched-flow-state",children:n.enabled?"aktif":"nonaktif"})]}),a.jsx("div",{id:l,className:"hn-sched-flow-body",hidden:!e,children:a.jsx(y,{flow:s,f:n,putFlow:r})})]})}function z({orchestration:s,onChange:n,variant:r="cards"}){const e=s??p,t=i=>e[i]??p[i],l=(i,m,b)=>n({...e,[i]:m},b),d=a.jsxs("div",{className:"hn-sched-group-hint",children:["Sesi utama berperan sebagai ",a.jsx("b",{children:"pengatur"}),"; setiap fase dikerjakan subagen dengan model & effort di bawah. ",a.jsx("b",{children:"Warisi"})," memakai pengaturan sesi utama yang dipilih saat ",a.jsx("b",{children:"Start"}),". Subagen selalu berjalan di runtime yang sama dengan sesi utama: sesi Claude memakai kolom Claude Code, sesi Codex kolom Codex CLI. Flow yang dimatikan berjalan sebagai satu sesi biasa seperti sebelumnya."]});return r==="accordion"?a.jsxs("div",{className:"hn-sched-panel",children:[d,j.map(i=>a.jsx(R,{flow:i,f:t(i),putFlow:l},i))]}):a.jsxs(a.Fragment,{children:[a.jsx(g,{eyebrow:"orkestrasi",title:"Orkestrasi subagen per fase",children:d}),j.map(i=>a.jsx("div",{"data-testid":`orch-flow-${i}`,children:a.jsx(g,{eyebrow:"flow",title:u[i],children:a.jsx(y,{flow:i,f:t(i),putFlow:l})})},i))]})}const c=s=>!!s&&typeof s=="object"&&!Array.isArray(s)&&Object.getPrototypeOf(s)===Object.prototype,f=(s,n)=>{if(s===n)return!0;if(Array.isArray(s)&&Array.isArray(n))return s.length===n.length&&s.every((r,e)=>f(r,n[e]));if(c(s)&&c(n)){const r=Object.keys(s).filter(t=>s[t]!==void 0),e=Object.keys(n).filter(t=>n[t]!==void 0);return r.length===e.length&&r.every(t=>f(s[t],n[t]))}return!1};function w(s,n,r){if(f(n,s)&&r!==void 0)return r;if(!c(s)||!c(n)||!c(r))return n;const e={...r};for(const t of Object.keys(n))e[t]=w(s[t],n[t],r[t]);return e}export{z as O,w as r};
1
+ import{j as a,cm as j,aH as g,F as u,bO as p,b1 as C,cn as N,g as x,aJ as $,bJ as k,co as S,cp as A,a9 as L,ac as F,ad as M}from"./index-BvFCEJud.js";import{R as O}from"./react-DfGhg7ZW.js";import"./markdown-CWEY34jk.js";/* empty css */const v=[{id:"claude",label:k.claude},{id:"codex",label:k.codex}],T=[{value:"inline",label:"Inline — agen fase mengerjakan task sendiri (cepat)"},{value:"subagent",label:"Subagen per task — implementer + review tiap task (lebih lambat)"}],_={model:null,effort:null};function I({flow:s,phase:n,runtime:r,cell:e,disabled:t,onPick:l}){const d=A(r),i=L(r,e.model??""),m=r==="codex"?F:M,b=[{value:"",label:"— warisi orchestrator"},...e.model&&!d.some(o=>o.id===e.model)?[{value:e.model,label:e.model}]:[],...d.map(o=>({value:o.id,label:o.label}))],E=[{value:"",label:"— warisi"},...e.effort&&!i.includes(e.effort)?[{value:e.effort,label:e.effort}]:[],...i.map(o=>({value:o,label:o}))];return a.jsxs("div",{className:"hn-sched-picks",children:[a.jsx(x,{size:"sm","aria-label":`Model ${s} ${n} ${r}`,value:e.model??"",className:"hn-sched-pick-model",options:b,disabled:t,onChange:o=>{const h=o.target.value||null;l({model:h,effort:h&&e.effort?m(h,e.effort):e.effort},`${n} (${r}) → ${h??"warisi"}`)}}),a.jsx(x,{size:"sm","aria-label":`Effort ${s} ${n} ${r}`,value:e.effort??"",className:"hn-sched-pick-effort",options:E,disabled:t,onChange:o=>l({...e,effort:o.target.value||null},`${n} (${r}) effort → ${o.target.value||"warisi"}`)})]})}function y({flow:s,f:n,putFlow:r}){return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"hn-sched-flow-row",children:[a.jsx("span",{className:"hn-sched-flow-status",children:n.enabled?"Fase dikerjakan subagen":"Satu sesi biasa (subagen nonaktif)"}),a.jsx(C,{checked:n.enabled,"aria-label":`Orkestrasi ${s}`,onChange:e=>r(s,{...n,enabled:e},`Orkestrasi ${u[s]} · ${e?"aktif":"nonaktif"}`)})]}),N.has(s)&&a.jsxs("div",{className:"hn-sched-flow-mode",children:[a.jsx("span",{className:"hn-sched-flow-mode-label",children:"Cara mengerjakan rencana"}),a.jsx(x,{size:"sm","aria-label":`Mode Execute ${s}`,value:n.executeMode??"inline",className:"hn-sched-flow-mode-select",options:T,disabled:!n.enabled,onChange:e=>{const t=e.target.value==="subagent"?"subagent":"inline";r(s,{...n,executeMode:t},`Mode Execute ${u[s]} · ${t==="subagent"?"subagen per task":"inline"}`)}}),a.jsx("span",{className:"hn-sched-flow-mode-note",children:"khusus sesi Claude · Codex selalu inline"})]}),a.jsx($,{children:a.jsxs("table",{className:"hn-sched-matrix",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Fase"}),v.map(e=>a.jsx("th",{children:e.label},e.id))]})}),a.jsx("tbody",{children:S[s].map(e=>a.jsxs("tr",{children:[a.jsx("td",{children:e}),v.map(t=>a.jsx("td",{children:a.jsx(I,{flow:s,phase:e,runtime:t.id,cell:n[t.id][e]??_,disabled:!n.enabled,onPick:(l,d)=>r(s,{...n,[t.id]:{...n[t.id],[e]:l}},d)})},t.id))]},e))})]})})]})}function R({flow:s,f:n,putFlow:r}){const[e,t]=O.useState(!1),l=O.useId();return a.jsxs("div",{className:"hn-sched-flow","data-testid":`orch-flow-${s}`,children:[a.jsxs("button",{type:"button",className:"hn-sched-flow-head hn-touch-target","aria-expanded":e,"aria-controls":l,onClick:()=>t(d=>!d),children:[a.jsx("span",{children:u[s]}),a.jsx("span",{className:"hn-sched-flow-state",children:n.enabled?"aktif":"nonaktif"})]}),a.jsx("div",{id:l,className:"hn-sched-flow-body",hidden:!e,children:a.jsx(y,{flow:s,f:n,putFlow:r})})]})}function z({orchestration:s,onChange:n,variant:r="cards"}){const e=s??p,t=i=>e[i]??p[i],l=(i,m,b)=>n({...e,[i]:m},b),d=a.jsxs("div",{className:"hn-sched-group-hint",children:["Sesi utama berperan sebagai ",a.jsx("b",{children:"pengatur"}),"; setiap fase dikerjakan subagen dengan model & effort di bawah. ",a.jsx("b",{children:"Warisi"})," memakai pengaturan sesi utama yang dipilih saat ",a.jsx("b",{children:"Start"}),". Subagen selalu berjalan di runtime yang sama dengan sesi utama: sesi Claude memakai kolom Claude Code, sesi Codex kolom Codex CLI. Flow yang dimatikan berjalan sebagai satu sesi biasa seperti sebelumnya."]});return r==="accordion"?a.jsxs("div",{className:"hn-sched-panel",children:[d,j.map(i=>a.jsx(R,{flow:i,f:t(i),putFlow:l},i))]}):a.jsxs(a.Fragment,{children:[a.jsx(g,{eyebrow:"orkestrasi",title:"Orkestrasi subagen per fase",children:d}),j.map(i=>a.jsx("div",{"data-testid":`orch-flow-${i}`,children:a.jsx(g,{eyebrow:"flow",title:u[i],children:a.jsx(y,{flow:i,f:t(i),putFlow:l})})},i))]})}const c=s=>!!s&&typeof s=="object"&&!Array.isArray(s)&&Object.getPrototypeOf(s)===Object.prototype,f=(s,n)=>{if(s===n)return!0;if(Array.isArray(s)&&Array.isArray(n))return s.length===n.length&&s.every((r,e)=>f(r,n[e]));if(c(s)&&c(n)){const r=Object.keys(s).filter(t=>s[t]!==void 0),e=Object.keys(n).filter(t=>n[t]!==void 0);return r.length===e.length&&r.every(t=>f(s[t],n[t]))}return!1};function w(s,n,r){if(f(n,s)&&r!==void 0)return r;if(!c(s)||!c(n)||!c(r))return n;const e={...r};for(const t of Object.keys(n))e[t]=w(s[t],n[t],r[t]);return e}export{z as O,w as r};
package/web/index.html CHANGED
@@ -12,7 +12,7 @@
12
12
  <noscript><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&amp;family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;0,700;1,400&amp;family=IBM+Plex+Mono:ital,wght@0,400;0,500;0,600;1,400&amp;display=swap" /></noscript>
13
13
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
14
14
  <title>hanoman</title>
15
- <script type="module" crossorigin src="/assets/index-BDL3vexH.js"></script>
15
+ <script type="module" crossorigin src="/assets/index-BvFCEJud.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="/assets/react-DfGhg7ZW.js">
17
17
  <link rel="modulepreload" crossorigin href="/assets/markdown-CWEY34jk.js">
18
18
  <link rel="modulepreload" crossorigin href="/assets/xterm-3VOAfa_q.js">