nagoc-zerowork 1.1.7 → 1.1.9

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/README.md CHANGED
@@ -120,6 +120,15 @@ Once connected, you can ask Claude things like:
120
120
  - `resource://zerowork/dynamic_inputs`
121
121
  - `resource://zerowork/tutorials/tutorial_1` (up to `tutorial_39` for full video transcripts)
122
122
 
123
+ ## Adding More Subtitles (For Maintainers)
124
+
125
+ If you are maintaining this MCP server and want to add more video tutorials or automation guides to the knowledge base:
126
+ 1. Drop your new `.txt` subtitle files directly into the `Elias Subtitles/` folder.
127
+ 2. Run `npm version patch` to bump the package version.
128
+ 3. Run `npm publish`.
129
+
130
+ The prebuild script (`scripts/bundle-tutorials.ts`) will automatically scan the folder, compile the new subtitles into the server's memory bundle, and publish the clean package to npm without exposing your raw `.txt` files to the public registry!
131
+
123
132
  ## License
124
133
 
125
134
  ISC © nagoc
package/dist/index.js CHANGED
@@ -9304,9 +9304,9 @@ It should open WhatsApp automatically, send all the messages. You can just sit b
9304
9304
 
9305
9305
  Speaker 1
9306
9306
  04:29 - 04:41
9307
- Like this, you can just run it, you can schedule it to run as much as you like. I hope you enjoyed this video. Please like and subscribe and good luck automating. Bye bye!`}];var NI=()=>{let t=process.env.ZEROWORK_BOTS;if(!t)return{};try{return JSON.parse(t)}catch{return console.error("Failed to parse ZEROWORK_BOTS environment variable. Must be valid JSON."),{}}},cr=new Eo({name:"nagoc-zerowork",version:"1.1.7"},{capabilities:{tools:{},resources:{}}});function Fi(){return sf}cr.setRequestHandler(Cs,async()=>{let e=Fi().map(n=>({uri:`resource://zerowork/tutorials/${n.id}`,name:`ZeroWork Video Tutorial: ${n.title}`,mimeType:"text/plain",description:`Official video masterclass transcript for: ${n.title}`}));return{resources:[{uri:"resource://zerowork/general",name:"ZeroWork General Knowledge",mimeType:"text/plain",description:"General concepts about ZeroWork RPA, TaskBots, and Architecture"},{uri:"resource://zerowork/webhooks",name:"ZeroWork Webhooks Guide",mimeType:"text/plain",description:"How to trigger ZeroWork bots and pass dynamic data via webhooks"},{uri:"resource://zerowork/variables",name:"ZeroWork Variables Guide",mimeType:"text/plain",description:"How variables work in ZeroWork"},{uri:"resource://zerowork/tables",name:"ZeroWork Tables Guide",mimeType:"text/plain",description:"How data tables work in ZeroWork"},{uri:"resource://zerowork/selectors",name:"ZeroWork Selectors Guide",mimeType:"text/plain",description:"How CSS and XPath selectors work in ZeroWork"},{uri:"resource://zerowork/loops",name:"ZeroWork Loops Guide",mimeType:"text/plain",description:"How loops and repeats work in ZeroWork"},{uri:"resource://zerowork/chatgpt",name:"ZeroWork ChatGPT Guide",mimeType:"text/plain",description:"How to integrate ChatGPT via Ask ChatGPT block"},{uri:"resource://zerowork/anti_bot",name:"ZeroWork Anti-Bot Guide",mimeType:"text/plain",description:"Best practices to avoid bot detection and handle dynamic states"},{uri:"resource://zerowork/troubleshooting",name:"ZeroWork Troubleshooting Guide",mimeType:"text/plain",description:"Common problems and troubleshooting steps"},{uri:"resource://zerowork/building_blocks",name:"ZeroWork Building Blocks Guide",mimeType:"text/plain",description:"Comprehensive catalog of all ZeroWork building blocks and their options"},{uri:"resource://zerowork/dynamic_inputs",name:"ZeroWork Dynamic Inputs Guide",mimeType:"text/plain",description:"How to use dynamic inputs: variable/table references, code expressions, code blocks, and spintax in ZeroWork building blocks"},...e]}});cr.setRequestHandler(Ds,async t=>{let e=t.params.uri,n="";if(e.startsWith("resource://zerowork/tutorials/")){let r=e.replace("resource://zerowork/tutorials/",""),s=Fi().find(a=>a.id===r);if(!s)throw new Error(`Tutorial resource not found: ${e}`);n=`=== ${s.title} ===
9307
+ Like this, you can just run it, you can schedule it to run as much as you like. I hope you enjoyed this video. Please like and subscribe and good luck automating. Bye bye!`}];var NI=()=>{let t=process.env.ZEROWORK_BOTS;if(!t)return{};try{return JSON.parse(t)}catch{return console.error("Failed to parse ZEROWORK_BOTS environment variable. Must be valid JSON."),{}}},cr=new Eo({name:"nagoc-zerowork",version:"1.1.9"},{capabilities:{tools:{},resources:{}}});function Fi(){return sf}cr.setRequestHandler(Cs,async()=>{let e=Fi().map(n=>({uri:`resource://zerowork/tutorials/${n.id}`,name:`ZeroWork Video Tutorial: ${n.title}`,mimeType:"text/plain",description:`Official video masterclass transcript for: ${n.title}`}));return{resources:[{uri:"resource://zerowork/general",name:"ZeroWork General Knowledge",mimeType:"text/plain",description:"General concepts about ZeroWork RPA, TaskBots, and Architecture"},{uri:"resource://zerowork/webhooks",name:"ZeroWork Webhooks Guide",mimeType:"text/plain",description:"How to trigger ZeroWork bots and pass dynamic data via webhooks"},{uri:"resource://zerowork/variables",name:"ZeroWork Variables Guide",mimeType:"text/plain",description:"How variables work in ZeroWork"},{uri:"resource://zerowork/tables",name:"ZeroWork Tables Guide",mimeType:"text/plain",description:"How data tables work in ZeroWork"},{uri:"resource://zerowork/selectors",name:"ZeroWork Selectors Guide",mimeType:"text/plain",description:"How CSS and XPath selectors work in ZeroWork"},{uri:"resource://zerowork/loops",name:"ZeroWork Loops Guide",mimeType:"text/plain",description:"How loops and repeats work in ZeroWork"},{uri:"resource://zerowork/chatgpt",name:"ZeroWork ChatGPT Guide",mimeType:"text/plain",description:"How to integrate ChatGPT via Ask ChatGPT block"},{uri:"resource://zerowork/anti_bot",name:"ZeroWork Anti-Bot Guide",mimeType:"text/plain",description:"Best practices to avoid bot detection and handle dynamic states"},{uri:"resource://zerowork/troubleshooting",name:"ZeroWork Troubleshooting Guide",mimeType:"text/plain",description:"Common problems and troubleshooting steps"},{uri:"resource://zerowork/building_blocks",name:"ZeroWork Building Blocks Guide",mimeType:"text/plain",description:"Comprehensive catalog of all ZeroWork building blocks and their options"},{uri:"resource://zerowork/dynamic_inputs",name:"ZeroWork Dynamic Inputs Guide",mimeType:"text/plain",description:"How to use dynamic inputs: variable/table references, code expressions, code blocks, and spintax in ZeroWork building blocks"},...e]}});cr.setRequestHandler(Ds,async t=>{let e=t.params.uri,n="";if(e.startsWith("resource://zerowork/tutorials/")){let r=e.replace("resource://zerowork/tutorials/",""),s=Fi().find(a=>a.id===r);if(!s)throw new Error(`Tutorial resource not found: ${e}`);n=`=== ${s.title} ===
9308
9308
 
9309
- ${s.content}`}else if(e==="resource://zerowork/general")n=Pe.general;else if(e==="resource://zerowork/webhooks")n=Pe.webhooks;else if(e==="resource://zerowork/variables")n=Pe.variables;else if(e==="resource://zerowork/tables")n=Pe.tables;else if(e==="resource://zerowork/selectors")n=Pe.selectors;else if(e==="resource://zerowork/loops")n=Pe.loops;else if(e==="resource://zerowork/chatgpt")n=Pe.chatgpt;else if(e==="resource://zerowork/anti_bot")n=Pe.anti_bot;else if(e==="resource://zerowork/troubleshooting")n=Pe.troubleshooting;else if(e==="resource://zerowork/building_blocks")n=Pe.building_blocks;else if(e==="resource://zerowork/dynamic_inputs")n=Pe.dynamic_inputs;else throw new Error(`Resource not found: ${e}`);return{contents:[{uri:e,mimeType:"text/plain",text:n}]}});cr.setRequestHandler(Vs,async()=>({tools:[{name:"list_taskbots",description:"Lists all configured TaskBots and their names that are available to trigger.",inputSchema:{type:"object",properties:{}}},{name:"trigger_taskbot",description:"Triggers a specific ZeroWork TaskBot by its configured name. Does not send data.",inputSchema:{type:"object",properties:{botName:{type:"string",description:"The name of the TaskBot to trigger (must be one from list_taskbots)"}},required:["botName"]}},{name:"trigger_taskbot_with_data",description:"Triggers a specific ZeroWork TaskBot and sends dynamic JSON data to its zw_webhook_data variable.",inputSchema:{type:"object",properties:{botName:{type:"string",description:"The name of the TaskBot to trigger"},payload:{type:"object",description:"The JSON object payload to send to the bot"}},required:["botName","payload"]}},{name:"trigger_webhook_url",description:"Triggers an arbitrary ZeroWork webhook URL directly.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The full ZeroWork webhook URL"},payload:{type:"object",description:"Optional JSON object payload to send to the bot"}},required:["url"]}},{name:"generate_robust_selector",description:"Analyzes an HTML snippet and target requirements to generate robust, non-brittle CSS and XPath selectors tailored for ZeroWork TaskBots.",inputSchema:{type:"object",properties:{htmlSnippet:{type:"string",description:"The raw HTML snippet containing the target element and its surrounding container hierarchy."},targetText:{type:"string",description:"Optional exact or partial visible text of the target element (e.g., 'Connect', 'Follow')."},description:{type:"string",description:"Optional description of what the element is or its context (e.g., 'The experience list container on LinkedIn', 'Submit button on a dynamic form')."}},required:["htmlSnippet"]}},{name:"get_mcp_version",description:"Returns the version of this MCP server package currently running.",inputSchema:{type:"object",properties:{}}},{name:"search_zerowork_docs",description:"Search and query the ENTIRE ZeroWork official documentation at docs.zerowork.io. Use this tool for ANY question about ZeroWork including features, building blocks, dynamic inputs, TaskBots, spintax, variables, code in inputs, agents, triggers, actions, conditions, loops, integrations, webhooks, selectors, device storage, or any how-to guides. ALWAYS use this tool before answering any ZeroWork-related questions.",inputSchema:{type:"object",properties:{question:{type:"string",description:"The natural language question to search the docs for"}},required:["question"]}},{name:"search_zerowork_tutorials",description:"Search and query the complete library of official ZeroWork video masterclasses, tutorial transcripts, and automation guides. Use this tool to find step-by-step video instructions, advanced CSS selector walkthroughs, dynamic loop setups, and WhatsApp outreach guides.",inputSchema:{type:"object",properties:{query:{type:"string",description:"The natural language search query or keywords to find in the video tutorials"}},required:["query"]}}]}));cr.setRequestHandler(Rn,async t=>{let{name:e,arguments:n}=t.params,r=NI();try{if(e==="list_taskbots"){let o=Object.keys(r);return o.length===0?{content:[{type:"text",text:'No TaskBots are configured. Please set the ZEROWORK_BOTS environment variable in your Claude config (e.g., {"myBot": "https://hook.zerowork.io/..."}).'}]}:{content:[{type:"text",text:`Configured TaskBots:
9309
+ ${s.content}`}else if(e==="resource://zerowork/general")n=Pe.general;else if(e==="resource://zerowork/webhooks")n=Pe.webhooks;else if(e==="resource://zerowork/variables")n=Pe.variables;else if(e==="resource://zerowork/tables")n=Pe.tables;else if(e==="resource://zerowork/selectors")n=Pe.selectors;else if(e==="resource://zerowork/loops")n=Pe.loops;else if(e==="resource://zerowork/chatgpt")n=Pe.chatgpt;else if(e==="resource://zerowork/anti_bot")n=Pe.anti_bot;else if(e==="resource://zerowork/troubleshooting")n=Pe.troubleshooting;else if(e==="resource://zerowork/building_blocks")n=Pe.building_blocks;else if(e==="resource://zerowork/dynamic_inputs")n=Pe.dynamic_inputs;else throw new Error(`Resource not found: ${e}`);return{contents:[{uri:e,mimeType:"text/plain",text:n}]}});cr.setRequestHandler(Vs,async()=>({tools:[{name:"list_taskbots",description:"Lists all configured TaskBots and their names that are available to trigger.",inputSchema:{type:"object",properties:{}}},{name:"trigger_taskbot",description:"Triggers a specific ZeroWork TaskBot by its configured name. Does not send data.",inputSchema:{type:"object",properties:{botName:{type:"string",description:"The name of the TaskBot to trigger (must be one from list_taskbots)"}},required:["botName"]}},{name:"trigger_taskbot_with_data",description:"Triggers a specific ZeroWork TaskBot and sends dynamic JSON data to its zw_webhook_data variable.",inputSchema:{type:"object",properties:{botName:{type:"string",description:"The name of the TaskBot to trigger"},payload:{type:"object",description:"The JSON object payload to send to the bot"}},required:["botName","payload"]}},{name:"trigger_webhook_url",description:"Triggers an arbitrary ZeroWork webhook URL directly.",inputSchema:{type:"object",properties:{url:{type:"string",description:"The full ZeroWork webhook URL"},payload:{type:"object",description:"Optional JSON object payload to send to the bot"}},required:["url"]}},{name:"generate_robust_selector",description:"Analyzes an HTML snippet and target requirements to generate robust, non-brittle CSS and XPath selectors tailored for ZeroWork TaskBots.",inputSchema:{type:"object",properties:{htmlSnippet:{type:"string",description:"The raw HTML snippet containing the target element and its surrounding container hierarchy."},targetText:{type:"string",description:"Optional exact or partial visible text of the target element (e.g., 'Connect', 'Follow')."},description:{type:"string",description:"Optional description of what the element is or its context (e.g., 'The experience list container on LinkedIn', 'Submit button on a dynamic form')."}},required:["htmlSnippet"]}},{name:"get_mcp_version",description:"Returns the version of this MCP server package currently running.",inputSchema:{type:"object",properties:{}}},{name:"search_zerowork_docs",description:"Search and query the ENTIRE ZeroWork official documentation at docs.zerowork.io. Use this tool for ANY question about ZeroWork including features, building blocks, dynamic inputs, TaskBots, spintax, variables, code in inputs, agents, triggers, actions, conditions, loops, integrations, webhooks, selectors, device storage, or any how-to guides. ALWAYS use this tool before answering any ZeroWork-related questions. IMPORTANT: If the user is asking about specific automation workflows, step-by-step use cases (e.g. WhatsApp, LinkedIn, cold outreach), or advanced selector strategies, you MUST ALSO call search_zerowork_tutorials to check the expert video masterclass knowledge base!",inputSchema:{type:"object",properties:{question:{type:"string",description:"The natural language question to search the docs for"}},required:["question"]}},{name:"search_zerowork_tutorials",description:"Search and query the complete library of official ZeroWork video masterclasses, tutorial transcripts, and expert automation guides. ALWAYS call this tool when the user asks about specific automation workflows, step-by-step use cases (e.g., WhatsApp, LinkedIn, cold outreach, lead generation), advanced CSS selector walkthroughs, or dynamic loop setups, EVEN IF the user does not explicitly mention the words 'tutorials', 'videos', or 'guides'.",inputSchema:{type:"object",properties:{query:{type:"string",description:"The natural language search query or keywords to find in the video tutorials"}},required:["query"]}}]}));cr.setRequestHandler(Rn,async t=>{let{name:e,arguments:n}=t.params,r=NI();try{if(e==="list_taskbots"){let o=Object.keys(r);return o.length===0?{content:[{type:"text",text:'No TaskBots are configured. Please set the ZEROWORK_BOTS environment variable in your Claude config (e.g., {"myBot": "https://hook.zerowork.io/..."}).'}]}:{content:[{type:"text",text:`Configured TaskBots:
9310
9310
  ${o.map(s=>`- ${s}`).join(`
9311
9311
  `)}`}]}}if(e==="trigger_taskbot"||e==="trigger_taskbot_with_data"){let o=String(n?.botName),s=r[o];if(!s)throw new Error(`Bot '${o}' not found in configuration. Use list_taskbots to see available bots.`);let a=e==="trigger_taskbot_with_data",i=a?n?.payload:null,h={method:a?"POST":"GET",headers:a?{"Content-Type":"application/json"}:void 0,body:a?JSON.stringify(i):void 0,signal:AbortSignal.timeout(15e3)},u=await fetch(s,h),l=await u.text();return{content:[{type:"text",text:`Successfully triggered ${o}.
9312
9312
  Status: ${u.status}
@@ -9345,7 +9345,7 @@ ${o.slice(0,500)}${o.length>500?`
9345
9345
  ... (truncated)`:""}
9346
9346
  \`\`\`
9347
9347
 
9348
- `,i+="*Guidance*: Use the strategies above to construct your selector in ZeroWork. Test the selector in your browser console using `document.querySelectorAll('your-selector')` to verify uniqueness before adding it to your TaskBot.",{content:[{type:"text",text:i}]}}if(e==="get_mcp_version")return{content:[{type:"text",text:"nagoc-zerowork version 1.1.7"}]};if(e==="search_zerowork_tutorials"){let o=String(n?.query||"");if(!o)throw new Error("The 'query' parameter is required.");let s=Fi();if(s.length===0)return{content:[{type:"text",text:"No video tutorial subtitles found. Please check that subtitle files are bundled correctly."}]};let a=o.toLowerCase(),i=a.split(/\s+/).filter(c=>c.length>1),h=s.map(c=>{let d=0,m=c.title.toLowerCase(),p=c.content.toLowerCase();return m.includes(a)&&(d+=10),p.includes(a)&&(d+=5),i.forEach(w=>{m.includes(w)&&(d+=3);let y=p.match(new RegExp(w,"g"));y&&(d+=y.length)}),{tutorial:c,score:d}}).filter(c=>c.score>0).sort((c,d)=>d.score-c.score);if(h.length===0)return{content:[{type:"text",text:`No tutorial subtitles matched the query "${o}". Try searching with different keywords or use search_zerowork_docs for official written documentation.`}]};let u=h.slice(0,5),l=`### \u{1F3AC} ZeroWork Video Tutorial Search Results
9348
+ `,i+="*Guidance*: Use the strategies above to construct your selector in ZeroWork. Test the selector in your browser console using `document.querySelectorAll('your-selector')` to verify uniqueness before adding it to your TaskBot.",{content:[{type:"text",text:i}]}}if(e==="get_mcp_version")return{content:[{type:"text",text:"nagoc-zerowork version 1.1.9"}]};if(e==="search_zerowork_tutorials"){let o=String(n?.query||"");if(!o)throw new Error("The 'query' parameter is required.");let s=Fi();if(s.length===0)return{content:[{type:"text",text:"No video tutorial subtitles found. Please check that subtitle files are bundled correctly."}]};let a=o.toLowerCase(),i=a.split(/\s+/).filter(c=>c.length>1),h=s.map(c=>{let d=0,m=c.title.toLowerCase(),p=c.content.toLowerCase();return m.includes(a)&&(d+=10),p.includes(a)&&(d+=5),i.forEach(w=>{m.includes(w)&&(d+=3);let y=p.match(new RegExp(w,"g"));y&&(d+=y.length)}),{tutorial:c,score:d}}).filter(c=>c.score>0).sort((c,d)=>d.score-c.score);if(h.length===0)return{content:[{type:"text",text:`No tutorial subtitles matched the query "${o}". Try searching with different keywords or use search_zerowork_docs for official written documentation.`}]};let u=h.slice(0,5),l=`### \u{1F3AC} ZeroWork Video Tutorial Search Results
9349
9349
 
9350
9350
  *Crawled from official video masterclasses and automation guides*
9351
9351
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nagoc-zerowork",
3
- "version": "1.1.7",
3
+ "version": "1.1.9",
4
4
  "description": "An MCP Server for ZeroWork.io — trigger TaskBots, send dynamic data via webhooks, and get full ZeroWork documentation",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",