Lines 1-43javascript
1var ke=Object.defineProperty;var rt=(o,t)=>()=>(o&&(t=o(o=0)),t);var Mt=(o,t)=>{for(var e in t)ke(o,e,{get:t[e],enumerable:!0})};var Dt,xe,nt,_,V=rt(()=>{Dt=()=>{},xe={debug:Dt,info:Dt,warn:(...o)=>console.warn("[workflow]",...o),error:(...o)=>console.error("[workflow]",...o)},nt={impl:xe},_={debug:(...o)=>nt.impl.debug?.(...o),info:(...o)=>nt.impl.info?.(...o),warn:(...o)=>nt.impl.warn?.(...o),error:(...o)=>nt.impl.error?.(...o)}});var zt=rt(()=>{});var Kt={};Mt(Kt,{clearSkills:()=>Le,getAllSkills:()=>Me,getSkill:()=>mt,hasSkill:()=>Ce,listSkillIds:()=>De,registerSkill:()=>Be});function Be(o) ...
5`)}`)}let $=r._currentNodeConfig?.stores;if(Array.isArray($)&&$.length>0&&typeof $[0]=="object"){let b=$.length<=8,h=$.map(f=>{let m=f?.id??f?.storeId??"",d=(f?.name??"").toString().trim()||m,I=f?.type?` \xB7 ${f.type}`:"",A=(f?.description||"").toString().replace(/\s+/g," ").trim(),B=`- ${d} \xB7 ${A||"(no description)"}${I} (id: ${m})`;if(b&&f?.schema&&typeof f.schema=="object"){let S=f.schema.properties&&typeof f.schema.properties=="object"?Object.keys(f.schema.properties):Object.
6 fields: ${S.join(", ")}`)}return B});y+=`
8AVAILABLE STORES (pick a store by its description and pass its NAME to the store tool):
10`)}`}let v=r._currentNodeConfig?.extraPromptInstructions?.trim();return v&&(y+=`
12\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
13PRIORITY OVERRIDE \u2014 THE FOLLOWING INSTRUCTIONS TAKE PRECEDENCE OVER ALL PREVIOUS CONTENT
14\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
17`),_.debug(`[workflow] prompt length: ${y.length} chars`),i.invoke(y,l)}var yt,U,_t=rt(()=>{zt();V();St();yt=Symbol.for("@zibby/agent-workflow.strategies");globalThis[yt]||(globalThis[yt]=[]);U=globalThis[yt]});var Oe=new Set(["__proto__","constructor"
19`)}`);return t}};V();import{writeFileSync as It,readFileSync as qt,existsSync as Xt,mkdirSync as Ge}from"node:fs";import{join as Et,dirname as Fe}from"node:path";import O from"chalk";var Pe="__WORKFLOW_GRAPH_LOG__",q=O.gray("\u2502"),Ne=O.gray("\u250C"),Lt=O.gray("\u2514"),dt=O.green("\u25C6"),jt=O.hex("#c084fc")("\u25C6"),Ut=O.hex("#2dd4bf")("\u25C6"),ft=O.red("\u25C6"),Wt=`${q} `,Gt=2;function Ft(o){return o<1e3?`${o}ms`:`${(o/1e3).toFixed(1)}s`}function Ht(o,t){return(e,r,s)=>{if(typeof e!="string")return o(e,r,s);let i=process.stdout.columns||120,n="";for(let a=0;a<e.length;a++){let u=e[a] ...
20`?(n+=u,t.lineStart=!0,t.col=0,t.inEsc=!1):u==="\x1B"?(t.inEsc=!0,n+=u):t.inEsc?(n+=u,(u>="A"&&u<="Z"||u>="a"&&u<="z")&&(t.inEsc=!
21${Wt}`,t.col=Gt))}return o(n,r,s)}}var ht=class{constructor(){this._currentNode=null,this._origStdoutWrite=null,this._origStderrWrite=null,this._emitWorkflowGraphMarkers=String(process.env.ZIBBY_EMIT_GRAPH_MARKERS||"").trim()==="1"||String(process.env.ZIBBY_WORKFLOW_GRAPH_LOG_MARKERS||"").
22`),process.stdout.write=this._origStdoutWrite),this._origStderrWrite&&(this._errState&&!this._errState.lineStart&&this._origStderrWrite(`
23`),process.stderr.write=this._origStderrWrite),this._origStdoutWrite=null,this._origStderrWrite=null}_rawWrite(t){(this._origStdoutWrite||process.stdout.write.bind(process.stdout))(`${t}
24`)}_emitGraphLogMarker(t){if(!this._emitWorkflowGraphMarkers)return;let e=`${Pe}${JSON.stringify(t)}
25`;this._origStdoutWrite?this._origStdoutWrite(e):process.stdout.write(e)}_writeDot(t,e){this._origStdoutWrite?(this._outState&&!this._outState.lineStart&&(this._origStdoutWrite(`
26`),this._outState.lineStart=!0,this._outState.col=0),this._origStdoutWrite(`${t} ${e}
27`)):process.stdout.write.bind(process.stdout)(`${t} ${e}
28`)}step(t){this._origStdoutWrite?this._writeDot(dt,t):process.stdout.write.bind(process.stdout)(`${q} ${dt} ${t}
29`)}stepInfo(t){this.step(t)}stepTool(t){this._origStdoutWrite?this._writeDot(jt,t):process.stdout.write.bind(process.stdout)(`${q} ${jt} ${t}
30`)}stepMemory(t){let e=O.hex("#2dd4bf")(t);this._origStdoutWrite?this._writeDot(Ut,e):process.stdout.write.bind(process.stdout)(`${q} ${Ut} ${e}
31`)}stepFail(t){this._origStdoutWrite?this._writeDot(ft,O.red(t)):process.stdout.write.bind(process.stdout)(`${q} ${ft} ${O.red(t)}
32`)}nodeStart(t){this._currentNode=t,this._emitGraphLogMarker({phase:"node_begin",node:t}),this._rawWrite(`${Ne} ${t}`),this._startIntercepting()}nodeComplete(t,e={}){this._stopIntercepting();let{duration:r,details:s}=e;if(s)for(let n of s)this._rawWrite(`${dt} ${n}`);let i=r?O.dim(` ${Ft
34${i}`);let a=r(),u=a.cwd||process.cwd(),p=a.sessionPath;try{if(p){let c=Et(p,Z);if(Xt(c)){let y=JSON.parse(qt(c,"utf-8"));y.currentNode=this.name,It(c,JSON.stringify(y,null,2),"utf-8")}let l=Et(p,"..",Z);if(Xt(l))try{let y=JSON.parse(qt(l,"utf-8"));y.currentNode=this.name,It(l,JSON.stringify(y,null,2),"utf-8")}catch{}}}catch(c){_.debug(`[workflow] could not update session info: ${c.message}`)}let g=null;for(let c=0;c<=this.retries;c++)try{_.debug(`[workflow] node '${this.name}' attempt ${c}`);let l=r().config||{},y=l.agents||{},w=this.config.agent??y[this.name]??null,$={state:r()};w&&($.prefer ...
35
HighSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/graph.jsView on unpkg · L20 HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/graph.jsView on unpkg · L18 HighChild Process
Package source references child process execution.
dist/graph.jsView on unpkg · L33 MediumDynamic Require
Package source references dynamic require/import behavior.
dist/graph.jsView on unpkg · L33 38`):s.every(n=>typeof n=="object")?Object.assign({},...s):s[s.length-1]}static async loadFile(t){let e=pr(t,"utf-8");if(t.endsWith(".json"))return JSON.parse(e);if(t.endsWith(".js")||t.
40`);console.log(`[zibby:session] stack (${o}):
41${g}`)}}function mr(){return process.env.ZIBBY_TRUST_SESSION_ENV==="1"||process.env.ZIBBY_TRUST_SESSION_ENV==="true"||process.env.ZIBBY_KEEP_SESSION_ENV==="1"||process.env.ZIBBY_KEEP_SESSION_ENV==="true"}function Sr(){if(!(process.env.ZIBBY_PIN_SESSION_PATH==="1"||process.env.ZIBBY_PIN_SESSION_PATH==="true"))return;let t=process.env.ZIBBY_SESSION_PATH;if(!(t==null||String(t).trim()===""))try{return ye(String(t).trim())}catch{return String(t).trim()}}function yr(){mr()||(delete process.env.ZIBBY_SESSION_PATH,delete process.env.ZIBBY_SESSION_ID)}function wr({sessionPath:o,sessionId:t}){o&&typeof ...
42\u{1F6D1} External stop requested \u2014 ending workflow.`),x.step("Workflow stopped externally"),{success:!0,state:h.getAll(),executionLog:Q,stoppedExternally:!0};let R=this.nodes.get(S);if(!R)throw new
Long lines were clipped for display.