kaizen-agent 1.49.1 → 1.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agents/kaizen-reviewer.md +1 -1
- package/cli/notes.test.ts +1 -1
- package/cli/settings.test.ts +2 -0
- package/cli/settings.ts +2 -2
- package/cli/state.test.ts +11 -0
- package/cli/state.ts +6 -0
- package/package.json +1 -1
- package/skills/kaizen/README.md +5 -5
- package/skills/kaizen/SKILL.md +10 -14
- package/skills/kaizen/config.default.yml +3 -3
- package/skills/kaizen/spec-main.md +18 -16
- package/skills/kaizen/spec-plan.md +6 -6
- package/skills/kaizen/spec-review.md +2 -2
- package/skills/kaizen-help/SKILL.md +6 -5
- package/web/board/approvals.ts +2 -2
- package/web/board/cards.ts +4 -4
- package/web/board/icebox.ts +6 -5
- package/web/board/panel.ts +2 -2
- package/web/board.html +23 -8
- package/web/board.js +24 -24
- package/web/notebook.js +10 -10
- package/web/notebook.ts +5 -1
- package/web/notes.html +19 -3
- package/web/term.js +1 -1
- package/web/video.html +19 -3
- package/web/video.js +1 -1
package/web/notebook.ts
CHANGED
|
@@ -1203,14 +1203,18 @@ addEventListener("pagehide", () => {
|
|
|
1203
1203
|
dir = [want, kept, S.dir].find(known) ?? S.projects[0]?.dir ?? "";
|
|
1204
1204
|
const sel = $<HTMLSelectElement>("proj");
|
|
1205
1205
|
sel.innerHTML = S.projects
|
|
1206
|
-
.map((p) => `<option value="${esc(p.dir)}"${p.dir === dir ? " selected" : ""}>${esc(p.label)}</option>`)
|
|
1206
|
+
.map((p) => `<option value="${esc(p.dir)}" title="${esc(p.label)}"${p.dir === dir ? " selected" : ""}>${esc(p.label.split(/[\\/]/).filter(Boolean).pop() || p.label)}</option>`)
|
|
1207
1207
|
.join("");
|
|
1208
|
+
// Folder names only, as on the board; the full path is the tooltip.
|
|
1209
|
+
const full = () => (sel.title = S.projects.find((p) => p.dir === sel.value)?.label ?? "");
|
|
1210
|
+
full();
|
|
1208
1211
|
sel.onchange = async () => {
|
|
1209
1212
|
if (!(await openNote(null))) {
|
|
1210
1213
|
sel.value = dir;
|
|
1211
1214
|
return;
|
|
1212
1215
|
}
|
|
1213
1216
|
dir = sel.value;
|
|
1217
|
+
full();
|
|
1214
1218
|
// window.: `history` here is CodeMirror's undo extension.
|
|
1215
1219
|
const u = new URL(location.href);
|
|
1216
1220
|
u.searchParams.set("dir", dir);
|
package/web/notes.html
CHANGED
|
@@ -55,6 +55,7 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
55
55
|
[data-rail=min] .theme{flex-direction:column}
|
|
56
56
|
[data-rail=min] .theme button{width:34px;flex:none}
|
|
57
57
|
@media(max-width:640px){#fold{display:none}}
|
|
58
|
+
.mtab{display:none}
|
|
58
59
|
/* phones: the side menu is a bottom tab bar, in the page flow so nothing sits under it; it owns the bottom safe area */
|
|
59
60
|
@media(max-width:640px){body{flex-direction:column;padding-bottom:0}.app{flex:1;min-height:0}
|
|
60
61
|
.rail,[data-rail=min] .rail{order:2;width:auto;flex-direction:row;align-items:stretch;gap:0;padding:4px 6px calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg-2);overflow:visible}
|
|
@@ -62,6 +63,16 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
62
63
|
.rail a.it,[data-rail=min] .rail a.it{flex:1;width:auto;flex-direction:column;justify-content:center;gap:2px;height:auto;min-height:48px;padding:4px 0;font-size:11px}
|
|
63
64
|
.rail a.it[aria-current=page]{background:none;color:var(--accent)}
|
|
64
65
|
[data-rail=min] .rail .lbl{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
|
|
66
|
+
.rail a.it.fold{display:none}
|
|
67
|
+
.mtab{display:flex;flex:1;position:relative}
|
|
68
|
+
.mtab summary{flex:1;list-style:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:4px 0;font-size:11px;font-weight:500;color:var(--dim);cursor:pointer}
|
|
69
|
+
.mtab summary::-webkit-details-marker{display:none}
|
|
70
|
+
.mtab svg{width:18px;height:18px}
|
|
71
|
+
.mtab[open] summary,.rail:has(a.it.fold[aria-current=page]) .mtab summary{color:var(--accent)}
|
|
72
|
+
.mpop{position:absolute;right:0;bottom:calc(100% + 8px);z-index:30;min-width:160px;display:flex;flex-direction:column;padding:6px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-2)}
|
|
73
|
+
.mpop a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:var(--r-s);font-size:14px;color:var(--ink);text-decoration:none}
|
|
74
|
+
.mpop a:hover{background:var(--hover)}
|
|
75
|
+
.rail:has(a.it.fold.upd) .mtab summary{position:relative}.rail:has(a.it.fold.upd) .mtab summary::after{content:"";position:absolute;left:calc(50% + 6px);top:4px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--bg)}
|
|
65
76
|
body .rail a.upd::after{left:calc(50% + 6px);top:4px}body .toast{left:16px;bottom:calc(68px + env(safe-area-inset-bottom))}}
|
|
66
77
|
/* end side menu */
|
|
67
78
|
/* the work area: an inset rounded panel on the canvas the side menu sits on */
|
|
@@ -221,6 +232,7 @@ select.sel{cursor:pointer;appearance:none;padding-right:30px;max-width:min(320px
|
|
|
221
232
|
<symbol id="i-link" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.1.4l3-3a5 5 0 0 0-7.1-7.1l-1.7 1.7M14 11a5 5 0 0 0-7.1-.4l-3 3a5 5 0 0 0 7.1 7.1l1.7-1.7"/></symbol>
|
|
222
233
|
<symbol id="i-note" viewBox="0 0 24 24"><path d="M6 3h9l4 4v14H6z"/><path d="M14 3v5h5M9 13h6M9 17h6"/></symbol>
|
|
223
234
|
<symbol id="i-video" viewBox="0 0 24 24"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="M16 10.5l5-3v9l-5-3z"/></symbol>
|
|
235
|
+
<symbol id="i-more" viewBox="0 0 24 24"><circle cx="5" cy="12" r="1.2" fill="currentColor"/><circle cx="12" cy="12" r="1.2" fill="currentColor"/><circle cx="19" cy="12" r="1.2" fill="currentColor"/></symbol>
|
|
224
236
|
<symbol id="i-board" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16M15 4v16"/></symbol>
|
|
225
237
|
<symbol id="i-side" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/></symbol>
|
|
226
238
|
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></symbol>
|
|
@@ -243,9 +255,10 @@ select.sel{cursor:pointer;appearance:none;padding-right:30px;max-width:min(320px
|
|
|
243
255
|
<a class="it" href="/?view=icebox" data-view="sources" title="Icebox: requests gathered from your sources"><svg><use href="#i-inbox"/></svg><span class="lbl">Icebox</span></a>
|
|
244
256
|
<a class="it" href="/" data-view="board" title="Board"><svg><use href="#i-board"/></svg><span class="lbl">Board</span></a>
|
|
245
257
|
<a class="it" href="/notebook" data-view="notes" title="Notes"><svg><use href="#i-note"/></svg><span class="lbl">Notes</span></a>
|
|
246
|
-
<a class="it" href="/video" data-view="video" title="Video: make and edit videos"><svg><use href="#i-video"/></svg><span class="lbl">Video</span></a>
|
|
258
|
+
<a class="it fold" href="/video" data-view="video" title="Video: make and edit videos"><svg><use href="#i-video"/></svg><span class="lbl">Video</span></a>
|
|
247
259
|
<a class="it" href="/?view=terminal" data-view="terminal" title="Terminal: every agent running in its card"><svg><use href="#i-term"/></svg><span class="lbl">Terminal</span></a>
|
|
248
|
-
<a class="it" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
|
|
260
|
+
<a class="it fold" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
|
|
261
|
+
<details class="mtab"><summary title="More"><svg><use href="#i-more"/></svg><span class="lbl">More</span></summary><div class="mpop"><a href="/video" data-view="video"><svg><use href="#i-video"/></svg>Video</a><a href="/?view=settings" data-view="settings"><svg><use href="#i-gear"/></svg>Settings</a></div></details>
|
|
249
262
|
<span class="end"></span>
|
|
250
263
|
<div class="theme" role="group" aria-label="Theme"><button data-t="light" title="Light theme"><svg><use href="#i-sun"/></svg><span class="lbl">Light</span></button><button data-t="dark" title="Dark theme"><svg><use href="#i-moon"/></svg><span class="lbl">Dark</span></button></div>
|
|
251
264
|
</nav>
|
|
@@ -266,7 +279,10 @@ select.sel{cursor:pointer;appearance:none;padding-right:30px;max-width:min(320px
|
|
|
266
279
|
window.setMotion=m=>{if(m==="system")delete r.dataset.motion;else r.dataset.motion=m;try{m==="system"?localStorage.removeItem("kz-motion"):localStorage.setItem("kz-motion",m)}catch(e){}};
|
|
267
280
|
try{const m=localStorage.getItem("kz-motion");if(m)r.dataset.motion=m}catch(e){}
|
|
268
281
|
os.addEventListener("change",paint);paint();
|
|
269
|
-
document.querySelectorAll(".theme button").forEach(b=>b.onclick=()=>setTheme(b.dataset.t))
|
|
282
|
+
document.querySelectorAll(".theme button").forEach(b=>b.onclick=()=>setTheme(b.dataset.t));
|
|
283
|
+
// Phones: More holds the tabs that do not fit; a pick or a tap elsewhere closes it.
|
|
284
|
+
const more=document.querySelector(".mtab");more.querySelectorAll("a").forEach(a=>a.addEventListener("click",()=>more.open=false));
|
|
285
|
+
addEventListener("pointerdown",e=>{if(more.open&&!more.contains(e.target))more.open=false},true)})();
|
|
270
286
|
</script>
|
|
271
287
|
<div class="app">
|
|
272
288
|
<div class="hdr">
|
package/web/term.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* kaizen terminal
|
|
1
|
+
/* kaizen terminal 5064c25cdfb8f236 -- generated by bun run build:web from web/term.ts; do not edit */
|
|
2
2
|
(()=>{var{defineProperty:Ao,getOwnPropertyDescriptor:Jh}=Object,Qh=(e,t)=>{for(var i in t)Ao(e,i,{get:t[i],enumerable:!0})},he=(e,t,i,s)=>{for(var r=s>1?void 0:s?Jh(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&Ao(t,i,r),r},P=(e,t)=>(i,s)=>t(i,s,e),Rn="Terminal input",rr={get:()=>Rn,set:(e)=>Rn=e},Dn="Too much output to announce, navigate to rows manually to read",nr={get:()=>Dn,set:(e)=>Dn=e};function el(e){return e.replace(/\r?\n/g,"\r")}function tl(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function il(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function sl(e,t,i,s){if(e.stopPropagation(),e.clipboardData){let r=e.clipboardData.getData("text/plain");Po(r,t,i,s)}}function Po(e,t,i,s){e=el(e),e=tl(e,i.decPrivateModes.bracketedPasteMode&&s.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Oo(e,t,i){let s=i.getBoundingClientRect(),r=e.clientX-s.left-10,n=e.clientY-s.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${r}px`,t.style.top=`${n}px`,t.style.zIndex="1000",t.focus()}function Tn(e,t,i,s,r){Oo(e,t,i),r&&s.rightClickSelect(e),t.value=s.selectionText,t.select()}function Bt(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function us(e,t=0,i=e.length){let s="";for(let r=t;r<i;++r){let n=e[r];n>65535?(n-=65536,s+=String.fromCharCode((n>>10)+55296)+String.fromCharCode(n%1024+56320)):s+=String.fromCharCode(n)}return s}var rl=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r=0;if(this._interim){let n=e.charCodeAt(r++);56320<=n&&n<=57343?t[s++]=(this._interim-55296)*1024+n-56320+65536:(t[s++]=this._interim,t[s++]=n),this._interim=0}for(let n=r;n<i;++n){let o=e.charCodeAt(n);if(55296<=o&&o<=56319){if(++n>=i)return this._interim=o,s;let a=e.charCodeAt(n);56320<=a&&a<=57343?t[s++]=(o-55296)*1024+a-56320+65536:(t[s++]=o,t[s++]=a);continue}o!==65279&&(t[s++]=o)}return s}},nl=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let s=0,r,n,o,a,l=0,h=0;if(this.interim[0]){let u=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let v=0,b;for(;(b=this.interim[++v]&63)&&v<4;)f<<=6,f|=b;let E=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,A=E-v;for(;h<A;){if(h>=i)return 0;if(b=e[h++],(b&192)!==128){h--,u=!0;break}else this.interim[v++]=b,f<<=6,f|=b&63}u||(E===2?f<128?h--:t[s++]=f:E===3?f<2048||f>=55296&&f<=57343||f===65279||(t[s++]=f):f<65536||f>1114111||(t[s++]=f)),this.interim.fill(0)}let d=i-4,c=h;for(;c<i;){for(;c<d&&!((r=e[c])&128)&&!((n=e[c+1])&128)&&!((o=e[c+2])&128)&&!((a=e[c+3])&128);)t[s++]=r,t[s++]=n,t[s++]=o,t[s++]=a,c+=4;if(r=e[c++],r<128)t[s++]=r;else if((r&224)===192){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(l=(r&31)<<6|n&63,l<128){c--;continue}t[s++]=l}else if((r&240)===224){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[c++],(o&192)!==128){c--;continue}if(l=(r&15)<<12|(n&63)<<6|o&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[s++]=l}else if((r&248)===240){if(c>=i)return this.interim[0]=r,s;if(n=e[c++],(n&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,s;if(o=e[c++],(o&192)!==128){c--;continue}if(c>=i)return this.interim[0]=r,this.interim[1]=n,this.interim[2]=o,s;if(a=e[c++],(a&192)!==128){c--;continue}if(l=(r&7)<<18|(n&63)<<12|(o&63)<<6|a&63,l<65536||l>1114111)continue;t[s++]=l}}return s}},Io="",At=" ",Ri=class e{constructor(){this.fg=0,this.bg=0,this.extended=new ss}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},ss=class e{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new e(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Ye=class e extends Ri{constructor(){super(...arguments);this.content=0,this.fg=0,this.bg=0,this.extended=new ss,this.combinedData=""}static fromCharData(t){let i=new e;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Bt(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let s=t[1].charCodeAt(0);if(55296<=s&&s<=56319){let r=t[1].charCodeAt(1);56320<=r&&r<=57343?this.content=(s-55296)*1024+r-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Bn="di$target",or="di$dependencies",$s=new Map;function ol(e){return e[or]||[]}function xe(e){if($s.has(e))return $s.get(e);let t=function(i,s,r){if(arguments.length!==3)throw Error("@IServiceName-decorator can only be used to decorate a parameter");al(t,i,r)};return t._id=e,$s.set(e,t),t}function al(e,t,i){t[Bn]===t?t[or].push({id:e,index:i}):(t[or]=[{id:e,index:i}],t[Bn]=t)}var Pe=xe("BufferService"),No=xe("CoreMouseService"),Gt=xe("CoreService"),hl=xe("CharsetService"),Pr=xe("InstantiationService"),Fo=xe("LogService"),Oe=xe("OptionsService"),Wo=xe("OscLinkService"),ll=xe("UnicodeService"),Di=xe("DecorationService"),ar=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let s=[],r=this._optionsService.rawOptions.linkHandler,n=new Ye,o=i.getTrimmedLength(),a=-1,l=-1,h=!1;for(let d=0;d<o;d++)if(!(l===-1&&!i.hasContent(d))){if(i.loadCell(d,n),n.hasExtendedAttrs()&&n.extended.urlId)if(l===-1){l=d,a=n.extended.urlId;continue}else h=n.extended.urlId!==a;else l!==-1&&(h=!0);if(h||l!==-1&&d===o-1){let c=this._oscLinkService.getLinkData(a)?.uri;if(c){let u={start:{x:l+1,y:e},end:{x:d+(!h&&d===o-1?1:0),y:e}},f=!1;if(!r?.allowNonHttpProtocols)try{let v=new URL(c);["http:","https:"].includes(v.protocol)||(f=!0)}catch{f=!0}f||s.push({text:c,range:u,activate:(v,b)=>r?r.activate(v,b,u):cl(v,b),hover:(v,b)=>r?.hover?.(v,b,u),leave:(v,b)=>r?.leave?.(v,b,u)})}h=!1,n.hasExtendedAttrs()&&n.extended.urlId?(l=d,a=n.extended.urlId):(l=-1,a=-1)}}t(s)}};ar=he([P(0,Pe),P(1,Oe),P(2,Wo)],ar);function cl(e,t){if(confirm(`Do you want to navigate to ${t}?
|
|
3
3
|
|
|
4
4
|
WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var _s=xe("CharSizeService"),gt=xe("CoreBrowserService"),Or=xe("MouseService"),pt=xe("RenderService"),dl=xe("SelectionService"),zo=xe("CharacterJoinerService"),Qt=xe("ThemeService"),Ho=xe("LinkProviderService"),ul=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?An.isErrorNoTelemetry(e)?new An(e.message+`
|
package/web/video.html
CHANGED
|
@@ -55,6 +55,7 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
55
55
|
[data-rail=min] .theme{flex-direction:column}
|
|
56
56
|
[data-rail=min] .theme button{width:34px;flex:none}
|
|
57
57
|
@media(max-width:640px){#fold{display:none}}
|
|
58
|
+
.mtab{display:none}
|
|
58
59
|
/* phones: the side menu is a bottom tab bar, in the page flow so nothing sits under it; it owns the bottom safe area */
|
|
59
60
|
@media(max-width:640px){body{flex-direction:column;padding-bottom:0}.app{flex:1;min-height:0}
|
|
60
61
|
.rail,[data-rail=min] .rail{order:2;width:auto;flex-direction:row;align-items:stretch;gap:0;padding:4px 6px calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg-2);overflow:visible}
|
|
@@ -62,6 +63,16 @@ svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.6;stroke
|
|
|
62
63
|
.rail a.it,[data-rail=min] .rail a.it{flex:1;width:auto;flex-direction:column;justify-content:center;gap:2px;height:auto;min-height:48px;padding:4px 0;font-size:11px}
|
|
63
64
|
.rail a.it[aria-current=page]{background:none;color:var(--accent)}
|
|
64
65
|
[data-rail=min] .rail .lbl{position:static;width:auto;height:auto;overflow:visible;clip-path:none}
|
|
66
|
+
.rail a.it.fold{display:none}
|
|
67
|
+
.mtab{display:flex;flex:1;position:relative}
|
|
68
|
+
.mtab summary{flex:1;list-style:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:48px;padding:4px 0;font-size:11px;font-weight:500;color:var(--dim);cursor:pointer}
|
|
69
|
+
.mtab summary::-webkit-details-marker{display:none}
|
|
70
|
+
.mtab svg{width:18px;height:18px}
|
|
71
|
+
.mtab[open] summary,.rail:has(a.it.fold[aria-current=page]) .mtab summary{color:var(--accent)}
|
|
72
|
+
.mpop{position:absolute;right:0;bottom:calc(100% + 8px);z-index:30;min-width:160px;display:flex;flex-direction:column;padding:6px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-2)}
|
|
73
|
+
.mpop a{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;border-radius:var(--r-s);font-size:14px;color:var(--ink);text-decoration:none}
|
|
74
|
+
.mpop a:hover{background:var(--hover)}
|
|
75
|
+
.rail:has(a.it.fold.upd) .mtab summary{position:relative}.rail:has(a.it.fold.upd) .mtab summary::after{content:"";position:absolute;left:calc(50% + 6px);top:4px;width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 2px var(--bg)}
|
|
65
76
|
body .rail a.upd::after{left:calc(50% + 6px);top:4px}body .toast{left:16px;bottom:calc(68px + env(safe-area-inset-bottom))}}
|
|
66
77
|
/* end side menu */
|
|
67
78
|
/* the work area: an inset rounded panel on the canvas the side menu sits on */
|
|
@@ -259,6 +270,7 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
259
270
|
<symbol id="i-link" viewBox="0 0 24 24"><path d="M10 13a5 5 0 0 0 7.1.4l3-3a5 5 0 0 0-7.1-7.1l-1.7 1.7M14 11a5 5 0 0 0-7.1-.4l-3 3a5 5 0 0 0 7.1 7.1l1.7-1.7"/></symbol>
|
|
260
271
|
<symbol id="i-note" viewBox="0 0 24 24"><path d="M6 3h9l4 4v14H6z"/><path d="M14 3v5h5M9 13h6M9 17h6"/></symbol>
|
|
261
272
|
<symbol id="i-video" viewBox="0 0 24 24"><rect x="3" y="6" width="13" height="12" rx="2"/><path d="M16 10.5l5-3v9l-5-3z"/></symbol>
|
|
273
|
+
<symbol id="i-more" viewBox="0 0 24 24"><circle cx="5" cy="12" r="1.2" fill="currentColor"/><circle cx="12" cy="12" r="1.2" fill="currentColor"/><circle cx="19" cy="12" r="1.2" fill="currentColor"/></symbol>
|
|
262
274
|
<symbol id="i-board" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16M15 4v16"/></symbol>
|
|
263
275
|
<symbol id="i-side" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/></symbol>
|
|
264
276
|
<symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/></symbol>
|
|
@@ -282,9 +294,10 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
282
294
|
<a class="it" href="/?view=icebox" data-view="sources" title="Icebox: requests gathered from your sources"><svg><use href="#i-inbox"/></svg><span class="lbl">Icebox</span></a>
|
|
283
295
|
<a class="it" href="/" data-view="board" title="Board"><svg><use href="#i-board"/></svg><span class="lbl">Board</span></a>
|
|
284
296
|
<a class="it" href="/notebook" data-view="notes" title="Notes"><svg><use href="#i-note"/></svg><span class="lbl">Notes</span></a>
|
|
285
|
-
<a class="it" href="/video" data-view="video" title="Video: make and edit videos"><svg><use href="#i-video"/></svg><span class="lbl">Video</span></a>
|
|
297
|
+
<a class="it fold" href="/video" data-view="video" title="Video: make and edit videos"><svg><use href="#i-video"/></svg><span class="lbl">Video</span></a>
|
|
286
298
|
<a class="it" href="/?view=terminal" data-view="terminal" title="Terminal: every agent running in its card"><svg><use href="#i-term"/></svg><span class="lbl">Terminal</span></a>
|
|
287
|
-
<a class="it" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
|
|
299
|
+
<a class="it fold" href="/?view=settings" data-view="settings" title="Settings"><svg><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
|
|
300
|
+
<details class="mtab"><summary title="More"><svg><use href="#i-more"/></svg><span class="lbl">More</span></summary><div class="mpop"><a href="/video" data-view="video"><svg><use href="#i-video"/></svg>Video</a><a href="/?view=settings" data-view="settings"><svg><use href="#i-gear"/></svg>Settings</a></div></details>
|
|
288
301
|
<span class="end"></span>
|
|
289
302
|
<div class="theme" role="group" aria-label="Theme"><button data-t="light" title="Light theme"><svg><use href="#i-sun"/></svg><span class="lbl">Light</span></button><button data-t="dark" title="Dark theme"><svg><use href="#i-moon"/></svg><span class="lbl">Dark</span></button></div>
|
|
290
303
|
</nav>
|
|
@@ -305,7 +318,10 @@ pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:
|
|
|
305
318
|
window.setMotion=m=>{if(m==="system")delete r.dataset.motion;else r.dataset.motion=m;try{m==="system"?localStorage.removeItem("kz-motion"):localStorage.setItem("kz-motion",m)}catch(e){}};
|
|
306
319
|
try{const m=localStorage.getItem("kz-motion");if(m)r.dataset.motion=m}catch(e){}
|
|
307
320
|
os.addEventListener("change",paint);paint();
|
|
308
|
-
document.querySelectorAll(".theme button").forEach(b=>b.onclick=()=>setTheme(b.dataset.t))
|
|
321
|
+
document.querySelectorAll(".theme button").forEach(b=>b.onclick=()=>setTheme(b.dataset.t));
|
|
322
|
+
// Phones: More holds the tabs that do not fit; a pick or a tap elsewhere closes it.
|
|
323
|
+
const more=document.querySelector(".mtab");more.querySelectorAll("a").forEach(a=>a.addEventListener("click",()=>more.open=false));
|
|
324
|
+
addEventListener("pointerdown",e=>{if(more.open&&!more.contains(e.target))more.open=false},true)})();
|
|
309
325
|
</script>
|
|
310
326
|
<div class="app">
|
|
311
327
|
<div class="hdr">
|
package/web/video.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* kaizen video page
|
|
1
|
+
/* kaizen video page 5064c25cdfb8f236 -- generated by bun run build:web from web/video.ts; do not edit */
|
|
2
2
|
(()=>{var W={TikTok:"9x16","Instagram Reels":"9x16","YouTube Shorts":"9x16","WhatsApp Status":"9x16",YouTube:"16x9","Instagram feed":"4x5"},de={"9x16":[1080,1920],"16x9":[1920,1080],"4x5":[1080,1350]},X=["#b4462f","#a8720a","#2d50a5","#0f8fa3","#1f9d55","#7a4fb5","#c2416b","#5b6b8c"],p=(e)=>document.getElementById(e),l=(e)=>String(e??"").replace(/[&<>"']/g,(t)=>`&#${t.charCodeAt(0)};`),E=(e)=>e==null?"":`${Math.floor(e/60)}:${String(Math.round(e%60)).padStart(2,"0")}`,O=(e)=>(e??"9x16").replace("x",":"),I=(e,t)=>`/video/f/${e.place}/${encodeURIComponent(e.name)}/${t.split("/").map(encodeURIComponent).join("/")}`,ce={draft:"Draft",queued:"Queued",building:"Building preview",rendering:"Rendering",ready:"Ready",failed:"Failed"},_=[],ue=[],pe=[],He=(e,t)=>ue.filter((n)=>n.place===e&&n.name===t).sort((n,i)=>i.at-n.at)[0],D="",Ee;function h(e){let t=p("toast");t.textContent=e,t.classList.add("on"),clearTimeout(Ee),Ee=setTimeout(()=>t.classList.remove("on"),3200)}async function M(e,t){let n=await fetch(e,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}),i=await n.json().catch(()=>({}));if(!n.ok)throw Error(i.error||i.why||`${n.status}`);return i}async function R(){let e;try{e=await fetch("/video/list")}catch{h("The board is not running");return}let t=await e.json();if(_=t.videos,ue=t.agents??[],pe=t.places,p("emptyhow").innerHTML=`Videos are folders under <code>videos/</code> in ${t.places.map((n)=>`<code>${l(n.dir)}</code>`).join(" or ")}. Ask the kaizen-video skill to make one, and it shows up here.`,me(),y)xe(),Ae();ye()}function De(){return _.flatMap((e)=>{let t=e.outputs.filter((s)=>s.kind!=="history"&&s.kind!=="trying"),n=t.length?t:[null],i=new Map;for(let s of n)if(!i.has(s?.format??e.formats[0]))i.set(s?.format??e.formats[0],s);return[...i].map(([s,a])=>({v:e,f:s,o:a}))})}function me(){let e=p("q").value.trim().toLowerCase().split(/\s+/).filter(Boolean),t=De(),n=t.filter(({v:s})=>{let a=[s.title,s.name,s.text,s.preset,s.where,s.mode,...s.platforms].join(" ").toLowerCase();return(D==="busy"?["queued","building","rendering"].includes(s.status):!D||s.status===D)&&e.every((o)=>a.includes(o))}),i=ue.filter((s)=>s.alive&&!_.some((a)=>a.place===s.place&&a.name===s.name)&&e.every((a)=>s.name.includes(a))&&(!D||D==="busy"||D==="draft"));p("grid").removeAttribute("aria-busy"),p("grid").innerHTML=i.map((s)=>`<article class="vid" tabindex="0" data-p="${s.place}" data-n="${l(s.name)}" aria-label="${l(s.name)}, being made">
|
|
3
3
|
<div class="thumb making" style="--ar:9/16"><span class="t">${s.asking?"Claude is asking you something":"Claude is making this"}</span></div>
|
|
4
4
|
<div class="meta"><b>${l(s.name)}</b><div class="plats"><i class="where">${l(pe[s.place]?.label??"")}</i></div>
|