@zibby/core 0.4.3 → 0.4.4

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/dist/index.js CHANGED
@@ -149,7 +149,7 @@ ${g}
149
149
  `),f.debug(`Prompt length: ${p.length} chars`),process.env.STAGE!=="prod"&&f.debug(`Full prompt:
150
150
  ${p}`),r.invoke(p,d)}import{SKILLS as Ef}from"@zibby/agent-workflow";import{registerSkill as vf,getSkill as Af,hasSkill as If,getAllSkills as $f,listSkillIds as Of}from"@zibby/agent-workflow";var So={READ_FILE:"read_file",WRITE_FILE:"write_file",LIST_DIRECTORY:"list_directory",RUN_COMMAND:"run_command",OPEN_URL:"open_url",WAIT:"wait"},bo={LIST_PROJECTS:"jira_list_projects",SEARCH:"jira_search",GET_ISSUE:"jira_get_issue",CREATE_ISSUE:"jira_create_issue",LIST_SPRINTS:"jira_list_sprints",GET_SPRINT_ISSUES:"jira_get_sprint_issues",GET_COMMENTS:"jira_get_comments",ADD_COMMENT:"jira_add_comment",EDIT_ISSUE:"jira_edit_issue",TRANSITION_ISSUE:"jira_transition_issue"},wo={GET_USER:"github_get_user",LIST_ORGS:"github_list_orgs",LIST_REPOS:"github_list_repos",CLONE:"github_clone",SEARCH_REPOS:"github_search_repos",SEARCH_ISSUES:"github_search_issues",SEARCH_CODE:"github_search_code",GET_PR:"github_get_pr",GET_PR_DIFF:"github_get_pr_diff",LIST_PR_FILES:"github_list_pr_files",LIST_PR_COMMENTS:"github_list_pr_comments",LIST_COMMITS:"github_list_commits",GET_COMMIT:"github_get_commit",GET_FILE:"github_get_file",CREATE_ISSUE:"github_create_issue"},xo={LIST_CHANNELS:"slack_list_channels",POST_MESSAGE:"slack_post_message",REPLY_TO_THREAD:"slack_reply_to_thread",ADD_REACTION:"slack_add_reaction",GET_CHANNEL_HISTORY:"slack_get_channel_history",GET_THREAD_REPLIES:"slack_get_thread_replies",GET_USERS:"slack_get_users",GET_USER_PROFILE:"slack_get_user_profile"},_o={GENERATE:"run_generate",TEST:"run_test",STATUS:"run_status",CANCEL:"run_cancel",WAIT:"run_wait",ARTIFACTS:"run_artifacts",LIST_SPECS:"list_specs"},Eo={GET_TEST_HISTORY:"memory_get_test_history",GET_SELECTORS:"memory_get_selectors",GET_PAGE_MODEL:"memory_get_page_model",GET_NAVIGATION:"memory_get_navigation",SAVE_INSIGHT:"memory_save_insight"},To={STORE:"memory_store",RECALL:"memory_recall",BRIEF:"memory_brief",END_SESSION:"memory_end_session",TASK_LOG:"task_log",TASK_HISTORY:"task_history"},vo={INSTALL:"install_skill",UNINSTALL:"uninstall_skill",LIST_AVAILABLE:"list_available_skills"},Mc={...So,...bo,...wo,...xo,..._o,...Eo,...To,...vo};import{existsSync as Ao,readFileSync as Io}from"node:fs";import{homedir as $o}from"node:os";import{join as Oo}from"node:path";var ct=new Map;function Po(){if(process.env.ZIBBY_USER_TOKEN)return process.env.ZIBBY_USER_TOKEN;try{let o=Oo($o(),".zibby","config.json");return Ao(o)&&JSON.parse(Io(o,"utf-8")).sessionToken||null}catch{return null}}function Co(){return process.env.ZIBBY_ACCOUNT_API_URL?process.env.ZIBBY_ACCOUNT_API_URL.replace(/\/$/,""):(process.env.ZIBBY_ENV||"prod")==="local"?"http://localhost:3001":process.env.ZIBBY_PROD_ACCOUNT_API_URL||"https://account-api-prod.zibby.app"}async function No(o){let e=Date.now(),t=ct.get(o);if(t&&t.expiresAt>e)return t.data;let r=Po();if(!r)throw new Error("No session token. Run `zibby login` first.");let n=`${Co()}/integrations/token/${o}`,s=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${r}`}});if(!s.ok){let a=await s.text().catch(()=>"");throw s.status===404?new Error(`${o} is not connected. Connect it at https://studio.zibby.dev/integrations`):s.status===401||s.status===403?new Error("Session expired. Run `zibby login` to re-authenticate."):new Error(`Failed to resolve ${o} token (${s.status}): ${a}`)}let i=await s.json();if(!i||typeof i!="object")throw new Error(`Invalid response from ${o} token endpoint: expected object, got ${typeof i}`);if(o==="jira"){if(!i.token||typeof i.token!="string")throw new Error(`Invalid jira token response: token is ${typeof i.token}, expected string`);if(!i.cloudId)throw new Error("Invalid jira token response: missing cloudId")}else if(o==="github"&&(!i.token||typeof i.token!="string"))throw new Error(`Invalid github token response: token is ${typeof i.token}, expected string`);let c=((i.expiresInSec||3e3)-120)*1e3;return ct.set(o,{data:i,expiresAt:e+c}),i}function Ro(o){o?ct.delete(o):ct.clear()}import{readdir as ko,access as Jr,copyFile as Mo,constants as zr}from"fs/promises";import{join as ut,relative as Lo}from"node:path";async function Do(o={}){let{testResultsDir:e="test-results",testsDir:t="tests",projectRoot:r=process.cwd(),verbose:n=!0}=o;n&&console.log(`\u{1F3A5} Organizing test videos...
151
151
  `);let s=ut(r,e),i=ut(r,t);try{let c=await ko(s),a=0;for(let l of c){if(l.startsWith("."))continue;let u=ut(s,l,"video.webm");try{await Jr(u,zr.F_OK)}catch{continue}let d=l.replace(/-chromium$/,"").replace(/-firefox$/,"").replace(/-webkit$/,""),m=await Uo(i,d);if(m){let p=m.replace(/\.spec\.(js|ts)$/,".spec.webm");await Mo(u,p),n&&console.log(`\u2705 ${Lo(r,p)}`),a++}else n&&console.log(`\u26A0\uFE0F Could not find test file for: ${l}`)}return n&&(console.log(`
152
- \u{1F3AC} Organized ${a} video(s)`),console.log(`\u{1F4C2} Videos are now next to their test files in ${t}/`)),{movedCount:a,success:!0}}catch(c){return n&&console.error("\u274C Error organizing videos:",c.message),{movedCount:0,success:!1,error:c.message}}}async function Uo(o,e){let t=e.split("-");for(let r=t.length;r>0;r--){let s=t.slice(0,r).join("/");for(let i of["js","ts"]){let c=ut(o,`${s}.spec.${i}`);try{return await Jr(c,zr.F_OK),c}catch{}}}return null}var Ge=class{constructor(e,t={}){this.apiKey=e,this.baseUrl=t.baseUrl||process.env.ZIBBY_API_URL||"https://api-prod.zibby.app",this.enabled=!!e}isEnabled(){return this.enabled}};function Yr(){let o=process.env.ZIBBY_API_KEY;return new Ge(o)}import{execSync as Bo}from"node:child_process";import{existsSync as Fo,mkdirSync as jo}from"node:fs";import{join as Go}from"node:path";async function Ko(o={}){let{baseDir:e="/workspace/repos",repos:t=null,depth:r=1,branch:n=null}=o,s=process.env.REPOS;if(!s)throw new Error("REPOS environment variable not set. Are you running in a Zibby workflow container?");let i;try{i=JSON.parse(s)}catch(l){throw new Error(`Failed to parse REPOS env var: ${l.message}`,{cause:l})}if(!Array.isArray(i)||i.length===0)throw new Error("No repositories configured for this project");let c=t?i.filter(l=>t.includes(l.name)):i;if(c.length===0)throw new Error(`No matching repositories found. Available: ${i.map(l=>l.name).join(", ")}`);Fo(e)||jo(e,{recursive:!0});let a={};return await Promise.all(c.map(async l=>{let u=l.provider||"github",d=u==="gitlab"?process.env.GITLAB_TOKEN:process.env.GITHUB_TOKEN;if(!d){console.error(`${u.toUpperCase()}_TOKEN not set, skipping ${l.name}`),a[l.name]=null;return}let m=l.name.replace(/\//g,"-"),p=Go(e,m),g=l.cloneUrl||l.url;if(!g){console.error(`Repository "${l.name}" has no clone URL`),a[l.name]=null;return}let y;u==="gitlab"?y=g.replace(/^https:\/\//,`https://oauth2:${d}@`):y=g.replace(/^https:\/\//,`https://x-access-token:${d}@`);let h=["clone"];r>0&&h.push("--depth",r.toString()),n&&h.push("--branch",n),h.push(y,p);let S=`git ${h.join(" ")}`;console.log(`Cloning ${l.name} (${u}) to ${p}...`);try{Bo(S,{stdio:"pipe",env:{...process.env,GIT_TERMINAL_PROMPT:"0"}}),console.log(`Repository ${l.name} cloned successfully`),a[l.name]=p}catch(w){let T=w.message.replace(d,"***").replace(y,g);console.error(`Failed to clone ${l.name}: ${T}`),a[l.name]=null}})),a}var Hr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Jo(o){return typeof o=="string"&&Hr.test(o)}var Zr=Jo;function zo(o){if(!Zr(o))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(o.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(o.slice(9,13),16))>>>8,e&255,(e=parseInt(o.slice(14,18),16))>>>8,e&255,(e=parseInt(o.slice(19,23),16))>>>8,e&255,(e=parseInt(o.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}var Lt=zo;var G=[];for(let o=0;o<256;++o)G.push((o+256).toString(16).slice(1));function Wr(o,e=0){return(G[o[e+0]]+G[o[e+1]]+G[o[e+2]]+G[o[e+3]]+"-"+G[o[e+4]]+G[o[e+5]]+"-"+G[o[e+6]]+G[o[e+7]]+"-"+G[o[e+8]]+G[o[e+9]]+"-"+G[o[e+10]]+G[o[e+11]]+G[o[e+12]]+G[o[e+13]]+G[o[e+14]]+G[o[e+15]]).toLowerCase()}function Yo(o){o=unescape(encodeURIComponent(o));let e=new Uint8Array(o.length);for(let t=0;t<o.length;++t)e[t]=o.charCodeAt(t);return e}var Xr="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qr="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Dt(o,e,t,r,n,s){let i=typeof t=="string"?Yo(t):t,c=typeof r=="string"?Lt(r):r;if(typeof r=="string"&&(r=Lt(r)),r?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(c),a.set(i,c.length),a=e(a),a[6]=a[6]&15|o,a[8]=a[8]&63|128,n){if(s=s||0,s<0||s+16>n.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let l=0;l<16;++l)n[s+l]=a[l];return n}return Wr(a)}import{createHash as Ho}from"crypto";function Zo(o){return Array.isArray(o)?o=Buffer.from(o):typeof o=="string"&&(o=Buffer.from(o,"utf8")),Ho("sha1").update(o).digest()}var Vr=Zo;function Ut(o,e,t,r){return Dt(80,Vr,o,e,t,r)}Ut.DNS=Xr;Ut.URL=qr;var Bt=Ut;var Qr="@zibby/core ZibbySessionStore/1",Ke=class{constructor({apiUrl:e,apiKey:t,workflowUuid:r,fetchImpl:n=globalThis.fetch}){if(!e)throw new Error("ZibbySessionStore: apiUrl is required");if(!t)throw new Error("ZibbySessionStore: apiKey is required");if(!r)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(e).replace(/\/+$/,""),this._apiKey=t,this._workflowUuid=r,this._fetch=n}async append(e,t){if(!Array.isArray(t)||t.length===0)return;let r=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(e.sessionId)}/append`,n=await this._fetch(r,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":Qr},body:JSON.stringify({entries:t})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(e){let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(e.sessionId)}`,r;try{r=await this._fetch(t,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":Qr}})}catch{return null}if(r.status===404||!r.ok)return null;let n;try{n=await r.json()}catch{return null}let s=Array.isArray(n?.entries)?n.entries:null;return s&&s.length>0?s:null}};var Wo="6ba7b810-9dad-11d1-80b4-00c04fd430c8",en=new Set;function Xo(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function tn({namespace:o=Wo}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(e,t){let r=e?.conversationId,n=e?.workflowUuid;if(!r||!n)return null;let s=t?.agentType;if(s&&s!=="claude")return en.has(s)||(console.warn(`[SKILLS.SESSION] agent type '${s}' does not support native sessions \u2014 node running stateless`),en.add(s)),null;let i=Bt(`${n}:${r}`,o),c=Xo(),a=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,l=null;if(c&&a)try{l=new Ke({apiUrl:c,apiKey:a,workflowUuid:n})}catch(d){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${d.message}`),l=null}return e.resetConversation?{sessionId:i,resume:i,forkSession:!0,...l&&{sessionStore:l}}:l?{resume:i,sessionStore:l}:{sessionId:i}}}}import{spawn as rn}from"node:child_process";import{readFileSync as qo,writeFileSync as Vo,existsSync as pt}from"node:fs";import{homedir as nn}from"node:os";import{join as _e}from"node:path";async function Qo(){let o=_e(nn(),".local/share/cursor-agent/versions");if(!pt(o))throw new Error(`cursor-agent not found at ${o}. Please install cursor-agent first.`);return console.log(`\u{1F527} Patching cursor-agent for CI/CD...
152
+ \u{1F3AC} Organized ${a} video(s)`),console.log(`\u{1F4C2} Videos are now next to their test files in ${t}/`)),{movedCount:a,success:!0}}catch(c){return n&&console.error("\u274C Error organizing videos:",c.message),{movedCount:0,success:!1,error:c.message}}}async function Uo(o,e){let t=e.split("-");for(let r=t.length;r>0;r--){let s=t.slice(0,r).join("/");for(let i of["js","ts"]){let c=ut(o,`${s}.spec.${i}`);try{return await Jr(c,zr.F_OK),c}catch{}}}return null}var Ge=class{constructor(e,t={}){this.apiKey=e,this.baseUrl=t.baseUrl||process.env.ZIBBY_API_URL||"https://api-prod.zibby.app",this.enabled=!!e}isEnabled(){return this.enabled}};function Yr(){let o=process.env.ZIBBY_API_KEY;return new Ge(o)}import{execSync as Bo}from"node:child_process";import{existsSync as Fo,mkdirSync as jo}from"node:fs";import{join as Go}from"node:path";async function Ko(o={}){let{baseDir:e="/workspace/repos",repos:t=null,depth:r=1,branch:n=null}=o,s=process.env.REPOS;if(!s)throw new Error("REPOS environment variable not set. Are you running in a Zibby workflow container?");let i;try{i=JSON.parse(s)}catch(l){throw new Error(`Failed to parse REPOS env var: ${l.message}`,{cause:l})}if(!Array.isArray(i)||i.length===0)throw new Error("No repositories configured for this project");let c=t?i.filter(l=>t.includes(l.name)):i;if(c.length===0)throw new Error(`No matching repositories found. Available: ${i.map(l=>l.name).join(", ")}`);Fo(e)||jo(e,{recursive:!0});let a={};return await Promise.all(c.map(async l=>{let u=l.provider||"github",d=u==="gitlab"?process.env.GITLAB_TOKEN:process.env.GITHUB_TOKEN;if(!d){console.error(`${u.toUpperCase()}_TOKEN not set, skipping ${l.name}`),a[l.name]=null;return}let m=l.name.replace(/\//g,"-"),p=Go(e,m),g=l.cloneUrl||l.url;if(!g){console.error(`Repository "${l.name}" has no clone URL`),a[l.name]=null;return}let y;u==="gitlab"?y=g.replace(/^https:\/\//,`https://oauth2:${d}@`):y=g.replace(/^https:\/\//,`https://x-access-token:${d}@`);let h=["clone"];r>0&&h.push("--depth",r.toString()),n&&h.push("--branch",n),h.push(y,p);let S=`git ${h.join(" ")}`;console.log(`Cloning ${l.name} (${u}) to ${p}...`);try{Bo(S,{stdio:"pipe",env:{...process.env,GIT_TERMINAL_PROMPT:"0"}}),console.log(`Repository ${l.name} cloned successfully`),a[l.name]=p}catch(w){let T=w.message.replace(d,"***").replace(y,g);console.error(`Failed to clone ${l.name}: ${T}`),a[l.name]=null}})),a}var Hr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Jo(o){return typeof o=="string"&&Hr.test(o)}var Zr=Jo;function zo(o){if(!Zr(o))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(o.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(o.slice(9,13),16))>>>8,e&255,(e=parseInt(o.slice(14,18),16))>>>8,e&255,(e=parseInt(o.slice(19,23),16))>>>8,e&255,(e=parseInt(o.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}var Lt=zo;var G=[];for(let o=0;o<256;++o)G.push((o+256).toString(16).slice(1));function Wr(o,e=0){return(G[o[e+0]]+G[o[e+1]]+G[o[e+2]]+G[o[e+3]]+"-"+G[o[e+4]]+G[o[e+5]]+"-"+G[o[e+6]]+G[o[e+7]]+"-"+G[o[e+8]]+G[o[e+9]]+"-"+G[o[e+10]]+G[o[e+11]]+G[o[e+12]]+G[o[e+13]]+G[o[e+14]]+G[o[e+15]]).toLowerCase()}function Yo(o){o=unescape(encodeURIComponent(o));let e=new Uint8Array(o.length);for(let t=0;t<o.length;++t)e[t]=o.charCodeAt(t);return e}var Xr="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qr="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Dt(o,e,t,r,n,s){let i=typeof t=="string"?Yo(t):t,c=typeof r=="string"?Lt(r):r;if(typeof r=="string"&&(r=Lt(r)),r?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(c),a.set(i,c.length),a=e(a),a[6]=a[6]&15|o,a[8]=a[8]&63|128,n){if(s=s||0,s<0||s+16>n.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`);for(let l=0;l<16;++l)n[s+l]=a[l];return n}return Wr(a)}import{createHash as Ho}from"crypto";function Zo(o){return Array.isArray(o)?o=Buffer.from(o):typeof o=="string"&&(o=Buffer.from(o,"utf8")),Ho("sha1").update(o).digest()}var Vr=Zo;function Ut(o,e,t,r){return Dt(80,Vr,o,e,t,r)}Ut.DNS=Xr;Ut.URL=qr;var Bt=Ut;var Qr="@zibby/core ZibbySessionStore/1",Ke=class{constructor({apiUrl:e,apiKey:t,workflowUuid:r,fetchImpl:n=globalThis.fetch}){if(!e)throw new Error("ZibbySessionStore: apiUrl is required");if(!t)throw new Error("ZibbySessionStore: apiKey is required");if(!r)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(e).replace(/\/+$/,""),this._apiKey=t,this._workflowUuid=r,this._fetch=n}async append(e,t){if(!Array.isArray(t)||t.length===0)return;let r=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(e.sessionId)}/append`,n=await this._fetch(r,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":Qr},body:JSON.stringify({entries:t})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(e){let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(e.sessionId)}`,r;try{r=await this._fetch(t,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":Qr}})}catch{return null}if(r.status===404||!r.ok)return null;let n;try{n=await r.json()}catch{return null}let s=Array.isArray(n?.entries)?n.entries:null;return s&&s.length>0?s:null}};var Wo="6ba7b810-9dad-11d1-80b4-00c04fd430c8",en=new Set;function Xo(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function tn({namespace:o=Wo}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(e,t){let r=e?.conversationId,n=e?.workflowUuid;if(!r||!n)return null;let s=t?.agentType;if(s&&s!=="claude")return en.has(s)||(console.warn(`[SKILLS.SESSION] agent type '${s}' does not support native sessions \u2014 node running stateless`),en.add(s)),null;let i=Bt(`${n}:${r}`,o),c=Xo(),a=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,l=null;if(c&&a)try{l=new Ke({apiUrl:c,apiKey:a,workflowUuid:n})}catch(d){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${d.message}`),l=null}return e.resetConversation?{sessionId:i,resume:i,forkSession:!0,...l&&{sessionStore:l}}:{sessionId:i,...l&&{sessionStore:l}}}}}import{spawn as rn}from"node:child_process";import{readFileSync as qo,writeFileSync as Vo,existsSync as pt}from"node:fs";import{homedir as nn}from"node:os";import{join as _e}from"node:path";async function Qo(){let o=_e(nn(),".local/share/cursor-agent/versions");if(!pt(o))throw new Error(`cursor-agent not found at ${o}. Please install cursor-agent first.`);return console.log(`\u{1F527} Patching cursor-agent for CI/CD...
153
153
  `),new Promise((e,t)=>{let r=_e(__dirname,"../../scripts/patch-cursor-mcp.py");if(!pt(r)){t(new Error("Patch script not found"));return}let n=rn("python3",[r],{stdio:"inherit"});n.on("close",s=>{s===0?e({success:!0}):t(new Error(`Patch failed with code ${s}`))}),n.on("error",s=>{t(s)})})}function ei(){let o=_e(nn(),".local/share/cursor-agent/versions");if(!pt(o))return{patched:!1,installed:!1};try{let e=En("fs").readdirSync(o);if(e.length===0)return{patched:!1,installed:!1};let t=e.sort().reverse()[0],r=_e(o,t,"index.js");return pt(r)?{patched:qo(r,"utf-8").includes("AUTO-APPROVE MCP TOOLS FOR CI/CD"),installed:!0,path:r}:{patched:!1,installed:!1}}catch(e){return{patched:!1,installed:!1,error:e.message}}}async function ti(o){return console.log(`\u{1F511} Getting MCP approval keys...
154
154
  `),new Promise((e,t)=>{let r=rn("cursor-agent",["mcp","list"],{cwd:o,stdio:"pipe"}),n="";r.stdout.on("data",s=>{n+=s.toString(),process.stdout.write(s)}),r.stderr.on("data",s=>{process.stderr.write(s)}),r.on("close",s=>{if(s===0){let i=ri(n);e({success:!0,keys:i,output:n})}else t(new Error(`Failed to get approval keys (exit code ${s})`))}),r.on("error",s=>{t(s)})})}function ri(o){let e={},t=/🔑 APPROVAL KEY:\s+(\S+)\s+=>\s+(\S+)/g,r;for(;(r=t.exec(o))!==null;)e[r[1]]=r[2];return e}function ni(o,e){let t=_e(o,".cursor/projects"),r=_e(t,"mcp-approvals.json");Vo(r,JSON.stringify(e,null,2)),console.log(`
155
155
  \u2705 Saved approval keys to: ${r}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/core",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +1 @@
1
- var h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function _(e){return typeof e=="string"&&h.test(e)}var y=_;function A(e){if(!y(e))throw TypeError("Invalid UUID");let r;return Uint8Array.of((r=parseInt(e.slice(0,8),16))>>>24,r>>>16&255,r>>>8&255,r&255,(r=parseInt(e.slice(9,13),16))>>>8,r&255,(r=parseInt(e.slice(14,18),16))>>>8,r&255,(r=parseInt(e.slice(19,23),16))>>>8,r&255,(r=parseInt(e.slice(24,36),16))/1099511627776&255,r/4294967296&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255)}var c=A;var s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function m(e,r=0){return(s[e[r+0]]+s[e[r+1]]+s[e[r+2]]+s[e[r+3]]+"-"+s[e[r+4]]+s[e[r+5]]+"-"+s[e[r+6]]+s[e[r+7]]+"-"+s[e[r+8]]+s[e[r+9]]+"-"+s[e[r+10]]+s[e[r+11]]+s[e[r+12]]+s[e[r+13]]+s[e[r+14]]+s[e[r+15]]).toLowerCase()}function E(e){e=unescape(encodeURIComponent(e));let r=new Uint8Array(e.length);for(let o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r}var w="6ba7b810-9dad-11d1-80b4-00c04fd430c8",g="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function d(e,r,o,t,n,i){let l=typeof o=="string"?E(o):o,p=typeof t=="string"?c(t):t;if(typeof t=="string"&&(t=c(t)),t?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+l.length);if(f.set(p),f.set(l,p.length),f=r(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,n){if(i=i||0,i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)n[i+a]=f[a];return n}return m(f)}import{createHash as T}from"crypto";function $(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),T("sha1").update(e).digest()}var v=$;function x(e,r,o,t){return d(80,v,e,r,o,t)}x.DNS=w;x.URL=g;var S=x;var U="@zibby/core ZibbySessionStore/1",u=class{constructor({apiUrl:r,apiKey:o,workflowUuid:t,fetchImpl:n=globalThis.fetch}){if(!r)throw new Error("ZibbySessionStore: apiUrl is required");if(!o)throw new Error("ZibbySessionStore: apiKey is required");if(!t)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(r).replace(/\/+$/,""),this._apiKey=o,this._workflowUuid=t,this._fetch=n}async append(r,o){if(!Array.isArray(o)||o.length===0)return;let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}/append`,n=await this._fetch(t,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":U},body:JSON.stringify({entries:o})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(r){let o=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}`,t;try{t=await this._fetch(o,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":U}})}catch{return null}if(t.status===404||!t.ok)return null;let n;try{n=await t.json()}catch{return null}let i=Array.isArray(n?.entries)?n.entries:null;return i&&i.length>0?i:null}};var k="6ba7b810-9dad-11d1-80b4-00c04fd430c8",I=new Set;function R(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function B({namespace:e=k}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(r,o){let t=r?.conversationId,n=r?.workflowUuid;if(!t||!n)return null;let i=o?.agentType;if(i&&i!=="claude")return I.has(i)||(console.warn(`[SKILLS.SESSION] agent type '${i}' does not support native sessions \u2014 node running stateless`),I.add(i)),null;let l=S(`${n}:${t}`,e),p=R(),f=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,a=null;if(p&&f)try{a=new u({apiUrl:p,apiKey:f,workflowUuid:n})}catch(b){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${b.message}`),a=null}return r.resetConversation?{sessionId:l,resume:l,forkSession:!0,...a&&{sessionStore:a}}:a?{resume:l,sessionStore:a}:{sessionId:l}}}}export{u as ZibbySessionStore,B as sessionSkill};
1
+ var h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function _(e){return typeof e=="string"&&h.test(e)}var y=_;function A(e){if(!y(e))throw TypeError("Invalid UUID");let r;return Uint8Array.of((r=parseInt(e.slice(0,8),16))>>>24,r>>>16&255,r>>>8&255,r&255,(r=parseInt(e.slice(9,13),16))>>>8,r&255,(r=parseInt(e.slice(14,18),16))>>>8,r&255,(r=parseInt(e.slice(19,23),16))>>>8,r&255,(r=parseInt(e.slice(24,36),16))/1099511627776&255,r/4294967296&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255)}var c=A;var s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function m(e,r=0){return(s[e[r+0]]+s[e[r+1]]+s[e[r+2]]+s[e[r+3]]+"-"+s[e[r+4]]+s[e[r+5]]+"-"+s[e[r+6]]+s[e[r+7]]+"-"+s[e[r+8]]+s[e[r+9]]+"-"+s[e[r+10]]+s[e[r+11]]+s[e[r+12]]+s[e[r+13]]+s[e[r+14]]+s[e[r+15]]).toLowerCase()}function E(e){e=unescape(encodeURIComponent(e));let r=new Uint8Array(e.length);for(let o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r}var w="6ba7b810-9dad-11d1-80b4-00c04fd430c8",g="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function d(e,r,o,t,n,i){let l=typeof o=="string"?E(o):o,p=typeof t=="string"?c(t):t;if(typeof t=="string"&&(t=c(t)),t?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+l.length);if(f.set(p),f.set(l,p.length),f=r(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,n){if(i=i||0,i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)n[i+a]=f[a];return n}return m(f)}import{createHash as T}from"crypto";function $(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),T("sha1").update(e).digest()}var v=$;function x(e,r,o,t){return d(80,v,e,r,o,t)}x.DNS=w;x.URL=g;var S=x;var U="@zibby/core ZibbySessionStore/1",u=class{constructor({apiUrl:r,apiKey:o,workflowUuid:t,fetchImpl:n=globalThis.fetch}){if(!r)throw new Error("ZibbySessionStore: apiUrl is required");if(!o)throw new Error("ZibbySessionStore: apiKey is required");if(!t)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(r).replace(/\/+$/,""),this._apiKey=o,this._workflowUuid=t,this._fetch=n}async append(r,o){if(!Array.isArray(o)||o.length===0)return;let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}/append`,n=await this._fetch(t,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":U},body:JSON.stringify({entries:o})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(r){let o=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}`,t;try{t=await this._fetch(o,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":U}})}catch{return null}if(t.status===404||!t.ok)return null;let n;try{n=await t.json()}catch{return null}let i=Array.isArray(n?.entries)?n.entries:null;return i&&i.length>0?i:null}};var k="6ba7b810-9dad-11d1-80b4-00c04fd430c8",I=new Set;function R(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function B({namespace:e=k}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(r,o){let t=r?.conversationId,n=r?.workflowUuid;if(!t||!n)return null;let i=o?.agentType;if(i&&i!=="claude")return I.has(i)||(console.warn(`[SKILLS.SESSION] agent type '${i}' does not support native sessions \u2014 node running stateless`),I.add(i)),null;let l=S(`${n}:${t}`,e),p=R(),f=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,a=null;if(p&&f)try{a=new u({apiUrl:p,apiKey:f,workflowUuid:n})}catch(b){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${b.message}`),a=null}return r.resetConversation?{sessionId:l,resume:l,forkSession:!0,...a&&{sessionStore:a}}:{sessionId:l,...a&&{sessionStore:a}}}}}export{u as ZibbySessionStore,B as sessionSkill};
@@ -1 +1 @@
1
- var S=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function b(e){return typeof e=="string"&&S.test(e)}var m=b;function A(e){if(!m(e))throw TypeError("Invalid UUID");let r;return Uint8Array.of((r=parseInt(e.slice(0,8),16))>>>24,r>>>16&255,r>>>8&255,r&255,(r=parseInt(e.slice(9,13),16))>>>8,r&255,(r=parseInt(e.slice(14,18),16))>>>8,r&255,(r=parseInt(e.slice(19,23),16))>>>8,r&255,(r=parseInt(e.slice(24,36),16))/1099511627776&255,r/4294967296&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255)}var c=A;var s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function w(e,r=0){return(s[e[r+0]]+s[e[r+1]]+s[e[r+2]]+s[e[r+3]]+"-"+s[e[r+4]]+s[e[r+5]]+"-"+s[e[r+6]]+s[e[r+7]]+"-"+s[e[r+8]]+s[e[r+9]]+"-"+s[e[r+10]]+s[e[r+11]]+s[e[r+12]]+s[e[r+13]]+s[e[r+14]]+s[e[r+15]]).toLowerCase()}function E(e){e=unescape(encodeURIComponent(e));let r=new Uint8Array(e.length);for(let o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r}var g="6ba7b810-9dad-11d1-80b4-00c04fd430c8",v="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function d(e,r,o,t,n,i){let l=typeof o=="string"?E(o):o,p=typeof t=="string"?c(t):t;if(typeof t=="string"&&(t=c(t)),t?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+l.length);if(f.set(p),f.set(l,p.length),f=r(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,n){if(i=i||0,i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)n[i+a]=f[a];return n}return w(f)}import{createHash as T}from"crypto";function $(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),T("sha1").update(e).digest()}var U=$;function x(e,r,o,t){return d(80,U,e,r,o,t)}x.DNS=g;x.URL=v;var h=x;var I="@zibby/core ZibbySessionStore/1",u=class{constructor({apiUrl:r,apiKey:o,workflowUuid:t,fetchImpl:n=globalThis.fetch}){if(!r)throw new Error("ZibbySessionStore: apiUrl is required");if(!o)throw new Error("ZibbySessionStore: apiKey is required");if(!t)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(r).replace(/\/+$/,""),this._apiKey=o,this._workflowUuid=t,this._fetch=n}async append(r,o){if(!Array.isArray(o)||o.length===0)return;let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}/append`,n=await this._fetch(t,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":I},body:JSON.stringify({entries:o})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(r){let o=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}`,t;try{t=await this._fetch(o,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":I}})}catch{return null}if(t.status===404||!t.ok)return null;let n;try{n=await t.json()}catch{return null}let i=Array.isArray(n?.entries)?n.entries:null;return i&&i.length>0?i:null}};var R="6ba7b810-9dad-11d1-80b4-00c04fd430c8",y=new Set;function k(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function F({namespace:e=R}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(r,o){let t=r?.conversationId,n=r?.workflowUuid;if(!t||!n)return null;let i=o?.agentType;if(i&&i!=="claude")return y.has(i)||(console.warn(`[SKILLS.SESSION] agent type '${i}' does not support native sessions \u2014 node running stateless`),y.add(i)),null;let l=h(`${n}:${t}`,e),p=k(),f=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,a=null;if(p&&f)try{a=new u({apiUrl:p,apiKey:f,workflowUuid:n})}catch(_){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${_.message}`),a=null}return r.resetConversation?{sessionId:l,resume:l,forkSession:!0,...a&&{sessionStore:a}}:a?{resume:l,sessionStore:a}:{sessionId:l}}}}function Q(){y.clear()}export{Q as __resetSessionSkillWarnings,F as sessionSkill};
1
+ var S=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function b(e){return typeof e=="string"&&S.test(e)}var m=b;function A(e){if(!m(e))throw TypeError("Invalid UUID");let r;return Uint8Array.of((r=parseInt(e.slice(0,8),16))>>>24,r>>>16&255,r>>>8&255,r&255,(r=parseInt(e.slice(9,13),16))>>>8,r&255,(r=parseInt(e.slice(14,18),16))>>>8,r&255,(r=parseInt(e.slice(19,23),16))>>>8,r&255,(r=parseInt(e.slice(24,36),16))/1099511627776&255,r/4294967296&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255)}var c=A;var s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function w(e,r=0){return(s[e[r+0]]+s[e[r+1]]+s[e[r+2]]+s[e[r+3]]+"-"+s[e[r+4]]+s[e[r+5]]+"-"+s[e[r+6]]+s[e[r+7]]+"-"+s[e[r+8]]+s[e[r+9]]+"-"+s[e[r+10]]+s[e[r+11]]+s[e[r+12]]+s[e[r+13]]+s[e[r+14]]+s[e[r+15]]).toLowerCase()}function E(e){e=unescape(encodeURIComponent(e));let r=new Uint8Array(e.length);for(let o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r}var g="6ba7b810-9dad-11d1-80b4-00c04fd430c8",v="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function d(e,r,o,t,n,i){let l=typeof o=="string"?E(o):o,p=typeof t=="string"?c(t):t;if(typeof t=="string"&&(t=c(t)),t?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let f=new Uint8Array(16+l.length);if(f.set(p),f.set(l,p.length),f=r(f),f[6]=f[6]&15|e,f[8]=f[8]&63|128,n){if(i=i||0,i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)n[i+a]=f[a];return n}return w(f)}import{createHash as T}from"crypto";function $(e){return Array.isArray(e)?e=Buffer.from(e):typeof e=="string"&&(e=Buffer.from(e,"utf8")),T("sha1").update(e).digest()}var U=$;function x(e,r,o,t){return d(80,U,e,r,o,t)}x.DNS=g;x.URL=v;var h=x;var I="@zibby/core ZibbySessionStore/1",u=class{constructor({apiUrl:r,apiKey:o,workflowUuid:t,fetchImpl:n=globalThis.fetch}){if(!r)throw new Error("ZibbySessionStore: apiUrl is required");if(!o)throw new Error("ZibbySessionStore: apiKey is required");if(!t)throw new Error("ZibbySessionStore: workflowUuid is required");this._apiUrl=String(r).replace(/\/+$/,""),this._apiKey=o,this._workflowUuid=t,this._fetch=n}async append(r,o){if(!Array.isArray(o)||o.length===0)return;let t=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}/append`,n=await this._fetch(t,{method:"POST",headers:{Authorization:`Bearer ${this._apiKey}`,"Content-Type":"application/json","User-Agent":I},body:JSON.stringify({entries:o})});if(!n.ok)throw new Error(`ZibbySessionStore.append HTTP ${n.status}`)}async load(r){let o=`${this._apiUrl}/workflows/${encodeURIComponent(this._workflowUuid)}/sessions/${encodeURIComponent(r.sessionId)}`,t;try{t=await this._fetch(o,{method:"GET",headers:{Authorization:`Bearer ${this._apiKey}`,"User-Agent":I}})}catch{return null}if(t.status===404||!t.ok)return null;let n;try{n=await t.json()}catch{return null}let i=Array.isArray(n?.entries)?n.entries:null;return i&&i.length>0?i:null}};var R="6ba7b810-9dad-11d1-80b4-00c04fd430c8",y=new Set;function k(){return(process.env.PROGRESS_API_URL||process.env.ZIBBY_API_BASE||"").replace(/\/executions\/?$/,"").replace(/\/+$/,"")}function F({namespace:e=R}={}){return{id:"session",description:"Persist agent conversation state across invocations (Claude-only in v1)",envKeys:[],tools:[],invokeAgentOptions(r,o){let t=r?.conversationId,n=r?.workflowUuid;if(!t||!n)return null;let i=o?.agentType;if(i&&i!=="claude")return y.has(i)||(console.warn(`[SKILLS.SESSION] agent type '${i}' does not support native sessions \u2014 node running stateless`),y.add(i)),null;let l=h(`${n}:${t}`,e),p=k(),f=process.env.PROJECT_API_TOKEN||process.env.ZIBBY_USER_TOKEN,a=null;if(p&&f)try{a=new u({apiUrl:p,apiKey:f,workflowUuid:n})}catch(_){console.warn(`[SKILLS.SESSION] failed to build SessionStore: ${_.message}`),a=null}return r.resetConversation?{sessionId:l,resume:l,forkSession:!0,...a&&{sessionStore:a}}:{sessionId:l,...a&&{sessionStore:a}}}}}function Q(){y.clear()}export{Q as __resetSessionSkillWarnings,F as sessionSkill};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zibby/core",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Core test automation engine with multi-agent and multi-MCP support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",