Lines 388-428javascript
388- If SLACK_CHANNEL / LARK_RECEIVE_ID is set, that is the default destination \u2014 use it.
389- If NO destination env var is set but your instructions name a channel (e.g. "post to #bla"), post to THAT channel \u2014 pass it as the \`channel\` arg (a "#name" or "C0123" id both work).
390- If neither an env var NOR an instruction gives you a channel, do NOT post \u2014 there is nowhere to send it.`,resolve(n){return process.env.SLACK_CHANNEL&&typeof j.resolve=="function"?j.resolve(n):process.env.LARK_RECEIVE_ID&&typeof K.resolve=="function"?K.resolve(n):process.env.SLACK_BOT_TOKEN&&typeof j.resolve=="function"?j.resolve(n):null},async handleToolCall(n,e,t){return typeof n=="string"&&n.startsWith("slack_")?j.handleToolCall(n,e,t):typeof n=="string"&&n.startsWith("lark_")?K.handleToolCall(n,e,t):JSON.stringify({error:`chat_notify: unknown tool "${n}". Expected slack_* or lark_*. ...
391- Review any test memory/history above. Prefer selectors proven to work.
392- If a previous run failed, avoid the same approach.
393- After setup/login completes, navigate directly to the target page instead of clicking through menus.
395DURING execution \u2014 when a selector fails and you switch to a fallback:
396- Call memory_save_insight IMMEDIATELY with category: selector_tip
397- Include: which stableId/selector failed, which fallback worked, and the page URL.
399AFTER completing the test, you MUST call memory_save_insight at least once:
400- Save any useful finding: reliable selectors, timing quirks, navigation patterns, workarounds.
401- Category: selector_tip | timing | navigation | workaround | flaky | general
402- Be specific \u2014 future runs will read your insights.`,resolve(){let n=ba();if(!n)return console.warn("[memory] @zibby/ui-memory not found \u2014 memory tools disabled for this run"),null;let e=Br(process.cwd(),".zibby","memory");if(!ga(Br(e,".dolt")))return console.warn("[memory] DB/dolt unavailable \u2014 memory tools disabled for this run"),null;try{let t=ya("dolt",["sql","-q","SELECT COUNT(*) AS cnt FROM test_runs","-r","json"],{cwd:e,encoding:"utf-8",timeout:5e3}),r=JSON.parse(t.trim()).rows||[];if(!r[0]||r[0].cnt===0)return console.log("[memory] Database empty \u2014 memory tools act ...
4031. Go to Settings \u2192 Integrations (https://studio.zibby.dev/integrations)
4042. Click "Connect Jira" and authorize via Atlassian OAuth
4053. After OAuth completes, ask me to install Jira again`},github:{description:"GitHub issues, PRs, repository management",integrationProvider:"github",envKeys:[],setupInstructions:`To connect GitHub:
4061. Go to Settings \u2192 Integrations (https://studio.zibby.dev/integrations)
4072. Click "Connect GitHub" and authorize
4083. After OAuth completes, ask me to install GitHub again`},slack:{description:"Slack messages, channels, reactions",integrationProvider:"slack",envKeys:[],setupInstructions:`To connect Slack:
4091. Go to Settings \u2192 Integrations (https://studio.zibby.dev/integrations)
4102. Click "Connect Slack" and authorize
4113. After OAuth completes, ask me to install Slack again`},sentry:{description:"Sentry error tracking \u2014 projects, issues, events",integrationProvider:"sentry",envKeys:[],setupInstructions:`To connect Sentry:
4121. Go to Settings \u2192 Integrations (https://studio.zibby.dev/integrations)
4132. Click "Connect Sentry" and authorize
4143. After OAuth completes, ask me to install Sentry again`},runner:{description:"Run zibby test workflows from chat (parallel supported)",envKeys:[],setupInstructions:"Ready to use. Runs zibby test workflows as background processes \u2014 each with its own browser and session."},browser:{description:"Playwright browser automation (navigate, click, fill, screenshot)",envKeys:[],setupInstructions:"Ready to use. Starts a Playwright browser for web automation."},memory:{description:"Test memory database (Dolt) \u2014 history, selectors, insights",envKeys:[],setupInstructions:"Ready to use. Requires ...
415`)}function Oa(){if(process.env.ZIBBY_USER_TOKEN)return process.env.ZIBBY_USER_TOKEN;try{let n=Ia(Sa(),".zibby","config.json");return ka(n)&&JSON.parse(wa(n,"utf-8")).sessionToken||null}catch{return null}}function Ra(){return(process.env.ZIBBY_API_URL||process.env.ZIBBY_PROD_API_URL||"https://api-prod.zibby.app").replace(/\/$/,"")}function St(){return`${(process.env.ZIBBY_FRONTEND_URL||process.env.ZIBBY_PROD_FRONTEND_URL||"https://studio.zibby.dev").replace(/\/$/,"")}/integrations`}function Ta(n){try{let e=process.platform;return va(e==="darwin"?"open":e==="win32"?"cmd":"xdg-open",e==="win32"? ...
416`)}function Ja(n,e){let t=n.cwd?Ye(n.cwd,e):e;return Yr(n.command,{cwd:t,encoding:"utf-8",timeout:3e4,maxBuffer:Ca,stdio:["pipe","pipe","pipe"]})||"(no output)"}function Ba(n){let{url:e}=n;if(
417You have access to the user's Sentry. Use these tools:
418- sentry_list_projects: List projects in the organization
419- sentry_list_issues: List errors/issues (supports Sentry search query, project filter, sort)
420- sentry_get_issue: Get detailed info about a specific issue (requires issueId)
421- sentry_update_issue: Change an issue's status (resolved / resolvedInNextRelease / ignored / unresolved / muted), assignment, or bookmark (requires issueId; needs write scope)
422- sentry_add_comment: Post a comment/note on an issue (requires issueId + text; needs write scope)`,resolve(){let n=za();if(!n)return null;let e={};for(let t of["PROJECT_API_TOKEN","ZIBBY_USER_TOKEN","ZIBBY_ACCOUNT_API_URL","ZIBBY_ENV","ZIBBY_PROD_ACCOUNT_API_URL","PROGRESS_API_URL","EXECUTION_ID","PROJECT_ID","STAGE","ZIBBY_SELF_HOST","SENTRY_URL","SENTRY_ORG","SENTRY_AUTH_TOKEN"])process.env[t]&&(e[t]=process.env[t]);return{type:"stdio",command:"node",args:[n],env:e,alwaysLoad:!0}},async handleToolCall(n,e={}){try{switch(n){case"sentry_list_projects":{let t=await Ya();return JSON.stringify({ ...
424`;try{process.stderr.write(r)}catch{}}function Tt(){ne.length=0;for(let[,n]of U)if(n.status==="queued"&&(n.status="cancelled"),n.status==="running"&&n._child)try{n._child.kill("SIGTERM")}catch{}}process.on("exit",Tt);process.
425You can run zibby test workflows directly from chat:
HighCommand Output Exfiltration
Source combines command execution, command-output handling, and outbound requests; review data flow before blocking.
dist/index.jsView on unpkg · L408 427**CRITICAL: When user asks to test a ticket:**
4281. Load the issue with your tracker tools (whatever is connected)
Long lines were clipped for display.