nagoc-zerowork 1.0.3 → 1.0.5

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
@@ -48,7 +48,7 @@ Open your `claude_desktop_config.json` file and configure your bots using the `Z
48
48
  "mcpServers": {
49
49
  "nagoc-zerowork-mcp": {
50
50
  "command": "cmd",
51
- "args": ["/c", "npx", "-y", "nagoc-zerowork-mcp@latest"],
51
+ "args": ["/c", "npx", "-y", "nagoc-zerowork@latest"],
52
52
  "env": {
53
53
  "ZEROWORK_BOTS": "{\"scraperBot\":\"https://hook.zerowork.io/xxx\", \"dmBot\":\"https://hook.zerowork.io/yyy\"}"
54
54
  }
@@ -63,7 +63,7 @@ Open your `claude_desktop_config.json` file and configure your bots using the `Z
63
63
  "mcpServers": {
64
64
  "nagoc-zerowork-mcp": {
65
65
  "command": "npx",
66
- "args": ["-y", "nagoc-zerowork-mcp@latest"],
66
+ "args": ["-y", "nagoc-zerowork@latest"],
67
67
  "env": {
68
68
  "ZEROWORK_BOTS": "{\"scraperBot\":\"https://hook.zerowork.io/xxx\", \"dmBot\":\"https://hook.zerowork.io/yyy\"}"
69
69
  }
package/dist/index.js CHANGED
@@ -129,10 +129,10 @@ Common Problems:
129
129
  4. Incorrect Data format: Ensure JSON paths are correct.
130
130
  5. Loop skips or errors: Verify \`loop_index\` is correctly set and selector doesn't grab incorrect siblings.
131
131
  6. Check Expired Cookies: If the bot cannot access logged-in content, ensure cookies haven't expired.
132
- `};var jw=()=>{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."),{}}},lo=new Rn({name:"nagoc-zerowork",version:"1.0.3"},{capabilities:{tools:{},resources:{}}});lo.setRequestHandler(Cs,async()=>({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"}]}));lo.setRequestHandler(Ds,async t=>{let e=t.params.uri,r="";if(e==="resource://zerowork/general")r=Be.general;else if(e==="resource://zerowork/webhooks")r=Be.webhooks;else if(e==="resource://zerowork/variables")r=Be.variables;else if(e==="resource://zerowork/tables")r=Be.tables;else if(e==="resource://zerowork/selectors")r=Be.selectors;else if(e==="resource://zerowork/loops")r=Be.loops;else if(e==="resource://zerowork/chatgpt")r=Be.chatgpt;else if(e==="resource://zerowork/anti_bot")r=Be.anti_bot;else if(e==="resource://zerowork/troubleshooting")r=Be.troubleshooting;else throw new Error(`Resource not found: ${e}`);return{contents:[{uri:e,mimeType:"text/plain",text:r}]}});lo.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:"get_mcp_version",description:"Returns the version of this MCP server package currently running.",inputSchema:{type:"object",properties:{}}}]}));lo.setRequestHandler(Rr,async t=>{let{name:e,arguments:r}=t.params,o=jw();try{if(e==="list_taskbots"){let n=Object.keys(o);return n.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:
132
+ `};var jw=()=>{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."),{}}},lo=new Rn({name:"nagoc-zerowork",version:"1.0.5"},{capabilities:{tools:{},resources:{}}});lo.setRequestHandler(Cs,async()=>({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"}]}));lo.setRequestHandler(Ds,async t=>{let e=t.params.uri,r="";if(e==="resource://zerowork/general")r=Be.general;else if(e==="resource://zerowork/webhooks")r=Be.webhooks;else if(e==="resource://zerowork/variables")r=Be.variables;else if(e==="resource://zerowork/tables")r=Be.tables;else if(e==="resource://zerowork/selectors")r=Be.selectors;else if(e==="resource://zerowork/loops")r=Be.loops;else if(e==="resource://zerowork/chatgpt")r=Be.chatgpt;else if(e==="resource://zerowork/anti_bot")r=Be.anti_bot;else if(e==="resource://zerowork/troubleshooting")r=Be.troubleshooting;else throw new Error(`Resource not found: ${e}`);return{contents:[{uri:e,mimeType:"text/plain",text:r}]}});lo.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:"get_mcp_version",description:"Returns the version of this MCP server package currently running.",inputSchema:{type:"object",properties:{}}}]}));lo.setRequestHandler(Rr,async t=>{let{name:e,arguments:r}=t.params,o=jw();try{if(e==="list_taskbots"){let n=Object.keys(o);return n.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:
133
133
  ${n.map(s=>`- ${s}`).join(`
134
134
  `)}`}]}}if(e==="trigger_taskbot"||e==="trigger_taskbot_with_data"){let n=String(r?.botName),s=o[n];if(!s)throw new Error(`Bot '${n}' not found in configuration. Use list_taskbots to see available bots.`);let i=e==="trigger_taskbot_with_data",a=i?r?.payload:null,c={method:i?"POST":"GET",headers:i?{"Content-Type":"application/json"}:void 0,body:i?JSON.stringify(a):void 0},u=await fetch(s,c),l=await u.text();return{content:[{type:"text",text:`Successfully triggered ${n}.
135
135
  Status: ${u.status}
136
136
  Response: ${l}`}]}}if(e==="trigger_webhook_url"){let n=String(r?.url),s=r?.payload,i={method:s?"POST":"GET",headers:s?{"Content-Type":"application/json"}:void 0,body:s?JSON.stringify(s):void 0},a=await fetch(n,i),c=await a.text();return{content:[{type:"text",text:`Successfully triggered webhook.
137
137
  Status: ${a.status}
138
- Response: ${c}`}]}}if(e==="get_mcp_version")return{content:[{type:"text",text:"nagoc-zerowork-mcp version 1.0.3"}]};throw new Error(`Unknown tool: ${e}`)}catch(n){return{content:[{type:"text",text:`Error executing tool ${e}: ${n.message}`}],isError:!0}}});async function Zw(){let t=new Nn;await lo.connect(t),console.error("ZeroWork MCP Server running on stdio")}Zw().catch(t=>{console.error("Fatal error in main():",t),process.exit(1)});
138
+ Response: ${c}`}]}}if(e==="get_mcp_version")return{content:[{type:"text",text:"nagoc-zerowork-mcp version 1.0.5"}]};throw new Error(`Unknown tool: ${e}`)}catch(n){return{content:[{type:"text",text:`Error executing tool ${e}: ${n.message}`}],isError:!0}}});async function Zw(){let t=new Nn;await lo.connect(t),console.error("ZeroWork MCP Server running on stdio")}Zw().catch(t=>{console.error("Fatal error in main():",t),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nagoc-zerowork",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
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",