@wowok/agent-mcp 3.3.0 → 3.3.1

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/rules.js CHANGED
@@ -1 +1 @@
1
- export{validateOperation,hasBlockingViolations,getWarningViolations}from'./knowledge/tool-constraints.js';export{AUDIT_RULES,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./knowledge/audit-rules.js';export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed,getFailMode}from'./safety/confirm-gate.js';export{renderPreview,renderPreviewHuman}from'./safety/preview.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings}from'./knowledge/safety-rules.js';export{distillIntent,extractSignals}from'./experience/intent-distill.js';export{Harness,getHarness,setHarness}from'./harness/index.js';export{getDefaultPreferences,getIndustryTemplate,mergePreferences,validatePreferences,SUPPORTED_INDUSTRIES}from'./customer/user-preferences.js';import{CONFIRMATION_RULES,DEFAULT_AMOUNT_THRESHOLD,formatAmount,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_CLASS_META,NAMING_CONVENTIONS}from'./knowledge/safety-rules.js';const PERMISSION_INDEX_RANGE='1000-65535\x20(0-999\x20reserved)';export function buildSoftRulesPrompt(){const a=[];a['push']('##\x20Token\x20amounts'),a['push']('-\x20Token\x20amounts\x20are\x20U64\x20integers\x20in\x20the\x20smallest\x20unit.\x201\x20WOW\x20=\x201_000_000_000\x20(9\x20decimals).'),a['push']('-\x20Amount\x20input\x20accepts\x20\x272WOW\x27\x20/\x20\x2710.5WOW\x27\x20(auto-converted)\x20or\x20a\x20raw\x20integer\x20\x272000000000\x27.'),a['push']('-\x20Always\x20query\x20token\x20precision\x20via\x20query_toolkit\x20before\x20using\x20a\x20non-WOW\x20token.'),a['push'](''),a['push']('##\x20Operation\x20classes');for(const [c,d]of Object['entries'](OPERATION_CLASS_META)){a['push']('-\x20'+c+':\x20'+d['note']);}a['push'](''),a['push']('##\x20Object\x20reuse\x20vs\x20create'),a['push']('-\x20'+CREATE_VS_MODIFY_PATTERN['note']);for(const e of OBJECT_REUSE_RULES){a['push']('\x20\x20-\x20'+e['object_type']+':\x20'+e['recommendation']['replace'](/_/g,'\x20')+'\x20—\x20'+e['reason']);}a['push'](''),a['push']('##\x20Immutability');for(const f of IMMUTABILITY_RULES){const g=f['mutable_after']?.['length']?'\x20(still\x20mutable:\x20'+f['mutable_after']['join'](',\x20')+')':'';a['push']('-\x20'+f['object_type']+'\x20'+f['trigger']+':\x20'+f['message']+g);}a['push'](''),a['push']('##\x20Confirmation\x20levels');const b=[...new Set(CONFIRMATION_RULES['map'](h=>h['level']))];a['push']('-\x20Amount\x20threshold\x20for\x20extra\x20scrutiny:\x20'+formatAmount(DEFAULT_AMOUNT_THRESHOLD)+'\x20WOW.'),a['push']('-\x20Confirm-gate\x20levels:\x20'+b['join'](',\x20')+'.'),a['push'](''),a['push']('##\x20Naming\x20conventions'),a['push']('-\x20Scheme:\x20'+NAMING_CONVENTIONS['scheme']);for(const h of NAMING_CONVENTIONS['recommendations']){a['push']('-\x20'+h);}return a['push']('-\x20Custom\x20permission\x20indices:\x20'+PERMISSION_INDEX_RANGE+'.'),a['push'](''),a['join']('\x0a');}export{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,classifyTool,checkObjectReuseRules,checkImmutabilityRules}from'./knowledge/safety-rules.js';
1
+ export{validateOperation,hasBlockingViolations,getWarningViolations}from'./knowledge/tool-constraints.js';export{AUDIT_RULES,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./knowledge/audit-rules.js';export{confirmGate,isConfirmGateEnabled,isExplicitlyConfirmed,getFailMode}from'./safety/confirm-gate.js';export{renderPreview,renderPreviewHuman}from'./safety/preview.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,DEFAULT_AMOUNT_THRESHOLD,getAmountThreshold,formatAmount,collectDefaultWarnings}from'./knowledge/safety-rules.js';export{distillIntent,extractSignals}from'./experience/intent-distill.js';export{Harness,getHarness,setHarness}from'./harness/index.js';export{getDefaultPreferences,getIndustryTemplate,mergePreferences,validatePreferences,SUPPORTED_INDUSTRIES}from'./customer/user-preferences.js';import{CONFIRMATION_RULES,DEFAULT_AMOUNT_THRESHOLD,formatAmount,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_CLASS_META,NAMING_CONVENTIONS}from'./knowledge/safety-rules.js';const PERMISSION_INDEX_RANGE='1000-65535\x20(0-999\x20reserved)';export function buildSoftRulesPrompt(){const a=[];a['push']('##\x20Token\x20amounts'),a['push']('-\x20Token\x20amounts\x20are\x20U64\x20integers\x20in\x20the\x20smallest\x20unit.\x201\x20WOW\x20=\x201_000_000_000\x20(9\x20decimals).'),a['push']('-\x20Amount\x20input\x20accepts\x20\x272WOW\x27\x20/\x20\x2710.5WOW\x27\x20(auto-converted)\x20or\x20a\x20raw\x20integer\x20\x272000000000\x27.'),a['push']('-\x20Always\x20query\x20token\x20precision\x20via\x20query_toolkit\x20before\x20using\x20a\x20non-WOW\x20token.'),a['push'](''),a['push']('##\x20Network\x20discipline'),a['push']('-\x20Omitting\x20the\x20network\x20field\x20means\x20\x22run\x20on\x20the\x20CURRENT\x20operating\x20network\x22\x20(the\x20app\x27s\x20active\x20selection,\x20echoed\x20in\x20your\x20system\x20prompt).\x20NEVER\x20guess\x20or\x20invent\x20a\x20network.'),a['push']('-\x20When\x20the\x20user\x27s\x20request\x20clearly\x20targets\x20a\x20DIFFERENT\x20network\x20(e.g.\x20\x22build\x20and\x20test\x20on\x20testnet\x22\x20while\x20the\x20app\x20is\x20on\x20mainnet),\x20set\x20env.network\x20(onchain_operations\x20/\x20bridge_operation)\x20or\x20the\x20call\x27s\x20network\x20field\x20to\x20that\x20network\x20in\x20THIS\x20call.\x20The\x20client\x20detects\x20the\x20mismatch\x20and\x20switches\x20the\x20whole\x20app\x20before\x20executing\x20—\x20via\x20a\x20confirmation\x20card,\x20or\x20automatically\x20when\x20the\x20user\x27s\x20message\x20itself\x20names\x20the\x20target\x20network.'),a['push']('-\x20Read-only\x20queries\x20(query_toolkit\x20context_network)\x20select\x20a\x20network\x20per\x20call\x20and\x20never\x20switch\x20the\x20app.'),a['push'](''),a['push']('##\x20Testnet\x20funds\x20(faucet)'),a['push']('-\x20Test\x20coins\x20are\x20claimable\x20IN-APP:\x20account_operation\x20with\x20{\x20faucet:\x20{\x20name_or_address:\x20\x22\x22,\x20network:\x20\x22testnet\x22\x20}\x20}\x20(\x27\x27\x20=\x20default\x20account;\x20network\x20accepts\x20testnet/localnet\x20only\x20—\x20mainnet\x20has\x20no\x20faucet).'),a['push']('-\x20Never\x20tell\x20the\x20user\x20to\x20visit\x20an\x20external\x20faucet\x20website\x20—\x20the\x20in-app\x20faucet\x20call\x20above\x20is\x20the\x20supported\x20flow.'),a['push'](''),a['push']('##\x20Operation\x20classes');for(const [c,d]of Object['entries'](OPERATION_CLASS_META)){a['push']('-\x20'+c+':\x20'+d['note']);}a['push'](''),a['push']('##\x20Object\x20reuse\x20vs\x20create'),a['push']('-\x20'+CREATE_VS_MODIFY_PATTERN['note']);for(const e of OBJECT_REUSE_RULES){a['push']('\x20\x20-\x20'+e['object_type']+':\x20'+e['recommendation']['replace'](/_/g,'\x20')+'\x20—\x20'+e['reason']);}a['push'](''),a['push']('##\x20Immutability');for(const f of IMMUTABILITY_RULES){const g=f['mutable_after']?.['length']?'\x20(still\x20mutable:\x20'+f['mutable_after']['join'](',\x20')+')':'';a['push']('-\x20'+f['object_type']+'\x20'+f['trigger']+':\x20'+f['message']+g);}a['push'](''),a['push']('##\x20Confirmation\x20levels');const b=[...new Set(CONFIRMATION_RULES['map'](h=>h['level']))];a['push']('-\x20Amount\x20threshold\x20for\x20extra\x20scrutiny:\x20'+formatAmount(DEFAULT_AMOUNT_THRESHOLD)+'\x20WOW.'),a['push']('-\x20Confirm-gate\x20levels:\x20'+b['join'](',\x20')+'.'),a['push'](''),a['push']('##\x20Naming\x20conventions'),a['push']('-\x20Scheme:\x20'+NAMING_CONVENTIONS['scheme']);for(const h of NAMING_CONVENTIONS['recommendations']){a['push']('-\x20'+h);}return a['push']('-\x20Custom\x20permission\x20indices:\x20'+PERMISSION_INDEX_RANGE+'.'),a['push'](''),a['join']('\x0a');}export{OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,NAMING_CONVENTIONS,classifyTool,checkObjectReuseRules,checkImmutabilityRules}from'./knowledge/safety-rules.js';
@@ -103,6 +103,10 @@ export declare const WorkspaceOperationOutputSchema: z.ZodObject<{
103
103
  }, z.core.$strip>>;
104
104
  total_matches: z.ZodNumber;
105
105
  truncated: z.ZodBoolean;
106
+ engine: z.ZodOptional<z.ZodEnum<{
107
+ ripgrep: "ripgrep";
108
+ js: "js";
109
+ }>>;
106
110
  }, z.core.$strip>, z.ZodObject<{
107
111
  action: z.ZodLiteral<"glob">;
108
112
  pattern: z.ZodString;
@@ -113,6 +117,11 @@ export declare const WorkspaceOperationOutputSchema: z.ZodObject<{
113
117
  mtime: z.ZodNumber;
114
118
  }, z.core.$strip>>;
115
119
  count: z.ZodNumber;
120
+ truncated: z.ZodOptional<z.ZodBoolean>;
121
+ engine: z.ZodOptional<z.ZodEnum<{
122
+ ripgrep: "ripgrep";
123
+ js: "js";
124
+ }>>;
116
125
  }, z.core.$strip>, z.ZodObject<{
117
126
  action: z.ZodLiteral<"edit">;
118
127
  path: z.ZodString;
@@ -1 +1 @@
1
- import{z}from'zod';export const WorkspaceOperationInputSchema=z['object']({'action':z['enum'](['resolve','list','read','write','delete','create_file','create_dir','copy','move','rename','search','glob','edit'])['describe']('Action:\x20\x27resolve\x27\x20=\x20return\x20the\x20workspace\x20root\x20directory;\x20\x27list\x27\x20=\x20list\x20files;\x20'+'\x27read\x27\x20=\x20read\x20a\x20file\x20(path\x20required);\x20\x27write\x27\x20=\x20write/overwrite\x20a\x20file\x20'+'(path\x20+\x20content\x20required);\x20\x27delete\x27\x20=\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x20'+'\x27create_file\x27\x20=\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x20'+'\x27create_dir\x27\x20=\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x20'+'\x27copy\x27\x20=\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27move\x27\x20/\x20\x27rename\x27\x20=\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27search\x27\x20=\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required).\x20'+'\x27glob\x27\x20=\x20list\x20files\x20whose\x20workspace-relative\x20path\x20matches\x20a\x20wildcard\x20pattern\x20(pattern\x20required).\x20'+'\x27edit\x27\x20=\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required).'),'path':z['string']()['optional']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root\x20(required\x20for\x20read/write/delete/create_file/create_dir).'),'content':z['string']()['optional']()['describe']('File\x20content\x20(required\x20for\x20write;\x20optional\x20for\x20create_file).'),'from':z['string']()['optional']()['describe']('Source\x20path\x20relative\x20to\x20root\x20(required\x20for\x20copy/move/rename).'),'to':z['string']()['optional']()['describe']('Destination\x20path\x20relative\x20to\x20root\x20(required\x20for\x20copy/move/rename).'),'pattern':z['string']()['optional']()['describe']('search:\x20regular\x20expression\x20matched\x20against\x20every\x20file\x20line\x20(required\x20for\x20search).\x20'+'glob:\x20wildcard\x20pattern\x20matched\x20against\x20workspace-relative\x20paths\x20—\x20\x27**\x27\x20spans\x20directory\x20'+'segments,\x20\x27*\x27\x20stays\x20within\x20one\x20segment,\x20\x27?\x27\x20is\x20a\x20single\x20char\x20(e.g.\x20\x27**/*.json\x27,\x20\x27*.md\x27;\x20required\x20for\x20glob).'),'glob':z['string']()['optional']()['describe']('search\x20only:\x20optional\x20filename\x20wildcard\x20filter\x20matched\x20on\x20the\x20file\x20basename\x20(e.g.\x20\x27*.md\x27,\x20\x27*.{ts,tsx}\x27).'),'ignore_case':z['boolean']()['optional']()['describe']('search\x20only:\x20case-insensitive\x20pattern\x20matching\x20(default\x20false).'),'max_results':z['number']()['int']()['min'](0x1)['max'](0xc8)['optional']()['describe']('search\x20only:\x20maximum\x20matches\x20returned\x20(default\x2050,\x20hard\x20cap\x20200);\x20total_matches\x20still\x20counts\x20every\x20match.'),'context_lines':z['number']()['int']()['min'](0x0)['max'](0x5)['optional']()['describe']('search\x20only:\x20context\x20lines\x20included\x20before/after\x20each\x20match\x20(default\x202).'),'old_string':z['string']()['optional']()['describe']('edit\x20only:\x20exact\x20text\x20to\x20replace\x20(non-empty;\x20required\x20for\x20edit).'),'new_string':z['string']()['optional']()['describe']('edit\x20only:\x20replacement\x20text\x20(required\x20for\x20edit;\x20may\x20be\x20empty\x20to\x20delete).'),'replace_all':z['boolean']()['optional']()['describe']('edit\x20only:\x20replace\x20every\x20occurrence\x20of\x20old_string\x20(default\x20false\x20—\x20errors\x20when\x20old_string\x20is\x20not\x20unique).'),'offset':z['number']()['int']()['min'](0x1)['optional']()['describe']('read\x20only:\x201-based\x20line\x20number\x20to\x20start\x20from\x20(default\x201).'),'limit':z['number']()['int']()['min'](0x1)['max'](0x7d0)['optional']()['describe']('read\x20only:\x20maximum\x20lines\x20to\x20return\x20(default\x20and\x20hard\x20cap\x202000;\x20only\x20applied\x20when\x20offset\x20or\x20limit\x20is\x20given).'),'encoding':z['enum'](['text','base64'])['optional']()['describe']('read:\x20\x27text\x27\x20(default,\x20utf-8)\x20or\x20\x27base64\x27\x20(raw\x20bytes,\x20files\x20up\x20to\x2010MB).\x20'+'write/create_file:\x20\x27text\x27\x20(default,\x20utf-8)\x20or\x20\x27base64\x27\x20(content\x20is\x20base64-encoded\x20raw\x20bytes,\x20e.g.\x20binary\x20files).')})['strict']();export const WorkspaceOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('resolve'),'dir':z['string']()['describe']('Absolute\x20workspace\x20root\x20directory.')}),z['object']({'action':z['literal']('list'),'dir':z['string']()['describe']('Absolute\x20workspace\x20root\x20directory.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20under\x20the\x20workspace\x20root.')}),z['object']({'action':z['literal']('read'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20read\x20file.'),'content':z['string']()['describe']('File\x20content\x20(text,\x20possibly\x20sliced\x20by\x20offset/limit;\x20base64\x20when\x20encoding=\x27base64\x27).'),'encoding':z['enum'](['text','base64'])['optional']()['describe']('\x27base64\x27\x20when\x20raw\x20bytes\x20are\x20returned;\x20absent/undefined\x20for\x20text.'),'size':z['number']()['optional']()['describe']('File\x20size\x20in\x20bytes\x20(base64\x20reads\x20only).'),'total_lines':z['number']()['optional']()['describe']('Total\x20line\x20count\x20of\x20the\x20file\x20(text\x20reads\x20only).'),'offset':z['number']()['optional']()['describe']('1-based\x20start\x20line\x20of\x20the\x20returned\x20slice\x20(text\x20reads\x20only).'),'limit':z['number']()['optional']()['describe']('Max\x20lines\x20in\x20the\x20returned\x20slice\x20(text\x20reads\x20only).'),'truncated':z['boolean']()['optional']()['describe']('True\x20when\x20lines\x20were\x20cut\x20off\x20by\x20offset/limit\x20(text\x20reads\x20only).')}),z['object']({'action':z['literal']('write'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20written\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('delete'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20deleted\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_dir'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('copy'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('move'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('rename'),'from':z['string']()['describe']('Absolute\x20old\x20path.'),'to':z['string']()['describe']('Absolute\x20new\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('search'),'pattern':z['string']()['describe']('The\x20regex\x20pattern\x20that\x20was\x20searched.'),'matches':z['array'](z['object']({'path':z['string']()['describe']('Workspace-relative\x20file\x20path.'),'line':z['number']()['describe']('1-based\x20line\x20number\x20of\x20the\x20match.'),'text':z['string']()['describe']('The\x20matched\x20line.'),'before':z['array'](z['string']())['optional']()['describe']('Context\x20lines\x20before\x20the\x20match.'),'after':z['array'](z['string']())['optional']()['describe']('Context\x20lines\x20after\x20the\x20match.')}))['describe']('Matches\x20(at\x20most\x20max_results).'),'total_matches':z['number']()['describe']('Total\x20number\x20of\x20matches\x20found\x20across\x20all\x20scanned\x20files.'),'truncated':z['boolean']()['describe']('True\x20when\x20matches\x20were\x20cut\x20off\x20by\x20max_results.')}),z['object']({'action':z['literal']('glob'),'pattern':z['string']()['describe']('The\x20wildcard\x20pattern\x20that\x20was\x20matched.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20whose\x20workspace-relative\x20path\x20matches\x20the\x20pattern.'),'count':z['number']()['describe']('Number\x20of\x20matching\x20files.')}),z['object']({'action':z['literal']('edit'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20edited\x20file.'),'replacements':z['number']()['describe']('Number\x20of\x20replacements\x20performed.'),'ok':z['boolean']()})])})['strict']();
1
+ import{z}from'zod';export const WorkspaceOperationInputSchema=z['object']({'action':z['enum'](['resolve','list','read','write','delete','create_file','create_dir','copy','move','rename','search','glob','edit'])['describe']('Action:\x20\x27resolve\x27\x20=\x20return\x20the\x20workspace\x20root\x20directory;\x20\x27list\x27\x20=\x20list\x20files;\x20'+'\x27read\x27\x20=\x20read\x20a\x20file\x20(path\x20required);\x20\x27write\x27\x20=\x20write/overwrite\x20a\x20file\x20'+'(path\x20+\x20content\x20required);\x20\x27delete\x27\x20=\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x20'+'\x27create_file\x27\x20=\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x20'+'\x27create_dir\x27\x20=\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x20'+'\x27copy\x27\x20=\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27move\x27\x20/\x20\x27rename\x27\x20=\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x20'+'\x27search\x27\x20=\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required).\x20'+'\x27glob\x27\x20=\x20list\x20files\x20by\x20wildcard\x20name\x20/\x20path\x20pattern\x20(pattern\x20required).\x20'+'\x27edit\x27\x20=\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required).'),'path':z['string']()['optional']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root\x20(required\x20for\x20read/write/delete/create_file/create_dir).'),'content':z['string']()['optional']()['describe']('File\x20content\x20(required\x20for\x20write;\x20optional\x20for\x20create_file).'),'from':z['string']()['optional']()['describe']('Source\x20path\x20relative\x20to\x20root\x20(required\x20for\x20copy/move/rename).'),'to':z['string']()['optional']()['describe']('Destination\x20path\x20relative\x20to\x20root\x20(required\x20for\x20copy/move/rename).'),'pattern':z['string']()['optional']()['describe']('search:\x20regular\x20expression\x20matched\x20against\x20every\x20file\x20line\x20(required\x20for\x20search).\x20Runs\x20on\x20the\x20bundled\x20ripgrep\x20engine,\x20so\x20no\x20lookaround\x20or\x20backreferences;\x20such\x20patterns\x20fall\x20back\x20to\x20a\x20JavaScript\x20scan.\x20'+'glob:\x20wildcard\x20pattern\x20matched\x20against\x20file\x20names\x20—\x20\x27*\x27\x20stays\x20within\x20one\x20path\x20'+'segment,\x20\x27?\x27\x20is\x20a\x20single\x20char,\x20\x27**/\x27\x20spans\x20directories.\x20A\x20pattern\x20without\x20\x27/\x27\x20'+'matches\x20the\x20BASENAME\x20at\x20any\x20depth\x20(\x27*.json\x27,\x20\x27readme*\x27);\x20one\x20containing\x20\x27/\x27\x20is\x20'+'anchored\x20to\x20the\x20search\x20scope\x20—\x20the\x20\x27path\x27\x20directory,\x20or\x20the\x20workspace\x20root\x20when\x20'+'\x27path\x27\x20is\x20absent\x20—\x20and\x20a\x20leading\x20\x27/\x27\x20states\x20that\x20anchor\x20explicitly\x20'+'(required\x20for\x20glob).'),'glob':z['string']()['optional']()['describe']('search\x20only:\x20optional\x20filename\x20filter,\x20ripgrep\x20--glob\x20syntax\x20—\x20\x27*.md\x27\x20matches\x20at\x20any\x20depth,\x20\x27src/*.md\x27\x20is\x20anchored\x20to\x20the\x20search\x20scope,\x20a\x20leading\x20\x27!\x27\x20negates.'),'ignore_case':z['boolean']()['optional']()['describe']('search\x20only:\x20case-insensitive\x20pattern\x20matching\x20(default\x20false).'),'max_results':z['number']()['int']()['min'](0x1)['max'](0xc8)['optional']()['describe']('search\x20only:\x20maximum\x20matches\x20returned\x20(default\x2050,\x20hard\x20cap\x20200);\x20total_matches\x20still\x20counts\x20every\x20match.'),'context_lines':z['number']()['int']()['min'](0x0)['max'](0x5)['optional']()['describe']('search\x20only:\x20context\x20lines\x20included\x20before/after\x20each\x20match\x20(default\x202).'),'old_string':z['string']()['optional']()['describe']('edit\x20only:\x20exact\x20text\x20to\x20replace\x20(non-empty;\x20required\x20for\x20edit).'),'new_string':z['string']()['optional']()['describe']('edit\x20only:\x20replacement\x20text\x20(required\x20for\x20edit;\x20may\x20be\x20empty\x20to\x20delete).'),'replace_all':z['boolean']()['optional']()['describe']('edit\x20only:\x20replace\x20every\x20occurrence\x20of\x20old_string\x20(default\x20false\x20—\x20errors\x20when\x20old_string\x20is\x20not\x20unique).'),'offset':z['number']()['int']()['min'](0x1)['optional']()['describe']('read\x20only:\x201-based\x20line\x20number\x20to\x20start\x20from\x20(default\x201).'),'limit':z['number']()['int']()['min'](0x1)['max'](0x7d0)['optional']()['describe']('read\x20only:\x20maximum\x20lines\x20to\x20return\x20(default\x20and\x20hard\x20cap\x202000;\x20only\x20applied\x20when\x20offset\x20or\x20limit\x20is\x20given).'),'encoding':z['enum'](['text','base64'])['optional']()['describe']('read:\x20\x27text\x27\x20(default,\x20utf-8)\x20or\x20\x27base64\x27\x20(raw\x20bytes,\x20files\x20up\x20to\x2010MB).\x20'+'write/create_file:\x20\x27text\x27\x20(default,\x20utf-8)\x20or\x20\x27base64\x27\x20(content\x20is\x20base64-encoded\x20raw\x20bytes,\x20e.g.\x20binary\x20files).')})['strict']();export const WorkspaceOperationOutputSchema=z['object']({'result':z['discriminatedUnion']('action',[z['object']({'action':z['literal']('resolve'),'dir':z['string']()['describe']('Absolute\x20workspace\x20root\x20directory.')}),z['object']({'action':z['literal']('list'),'dir':z['string']()['describe']('Absolute\x20workspace\x20root\x20directory.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20under\x20the\x20workspace\x20root.')}),z['object']({'action':z['literal']('read'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20read\x20file.'),'content':z['string']()['describe']('File\x20content\x20(text,\x20possibly\x20sliced\x20by\x20offset/limit;\x20base64\x20when\x20encoding=\x27base64\x27).'),'encoding':z['enum'](['text','base64'])['optional']()['describe']('\x27base64\x27\x20when\x20raw\x20bytes\x20are\x20returned;\x20absent/undefined\x20for\x20text.'),'size':z['number']()['optional']()['describe']('File\x20size\x20in\x20bytes\x20(base64\x20reads\x20only).'),'total_lines':z['number']()['optional']()['describe']('Total\x20line\x20count\x20of\x20the\x20file\x20(text\x20reads\x20only).'),'offset':z['number']()['optional']()['describe']('1-based\x20start\x20line\x20of\x20the\x20returned\x20slice\x20(text\x20reads\x20only).'),'limit':z['number']()['optional']()['describe']('Max\x20lines\x20in\x20the\x20returned\x20slice\x20(text\x20reads\x20only).'),'truncated':z['boolean']()['optional']()['describe']('True\x20when\x20lines\x20were\x20cut\x20off\x20by\x20offset/limit\x20(text\x20reads\x20only).')}),z['object']({'action':z['literal']('write'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20written\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('delete'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20deleted\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_file'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20file.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('create_dir'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20created\x20directory.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('copy'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('move'),'from':z['string']()['describe']('Absolute\x20source\x20path.'),'to':z['string']()['describe']('Absolute\x20destination\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('rename'),'from':z['string']()['describe']('Absolute\x20old\x20path.'),'to':z['string']()['describe']('Absolute\x20new\x20path.'),'ok':z['boolean']()}),z['object']({'action':z['literal']('search'),'pattern':z['string']()['describe']('The\x20regex\x20pattern\x20that\x20was\x20searched.'),'matches':z['array'](z['object']({'path':z['string']()['describe']('Workspace-relative\x20file\x20path.'),'line':z['number']()['describe']('1-based\x20line\x20number\x20of\x20the\x20match.'),'text':z['string']()['describe']('The\x20matched\x20line.'),'before':z['array'](z['string']())['optional']()['describe']('Context\x20lines\x20before\x20the\x20match.'),'after':z['array'](z['string']())['optional']()['describe']('Context\x20lines\x20after\x20the\x20match.')}))['describe']('Matches\x20(at\x20most\x20max_results).'),'total_matches':z['number']()['describe']('Total\x20number\x20of\x20matches\x20found\x20across\x20all\x20scanned\x20files.'),'truncated':z['boolean']()['describe']('True\x20when\x20matches\x20were\x20cut\x20off\x20by\x20max_results,\x20the\x20scan\x20budget\x20or\x20the\x20timeout.'),'engine':z['enum'](['ripgrep','js'])['optional']()['describe']('Which\x20scanner\x20answered:\x20\x27ripgrep\x27\x20(bundled\x20binary)\x20or\x20\x27js\x27\x20(in-process\x20fallback\x20—\x20ripgrep\x20absent,\x20or\x20a\x20pattern\x20its\x20regex\x20engine\x20rejects).')}),z['object']({'action':z['literal']('glob'),'pattern':z['string']()['describe']('The\x20wildcard\x20pattern\x20that\x20was\x20matched.'),'files':z['array'](z['object']({'path':z['string']()['describe']('Path\x20relative\x20to\x20the\x20workspace\x20root.'),'is_dir':z['boolean'](),'size':z['number']()['describe']('File\x20size\x20in\x20bytes\x20(0\x20for\x20directories).'),'mtime':z['number']()['describe']('Last-modified\x20time\x20(epoch\x20ms).')}))['describe']('Files\x20matching\x20the\x20pattern,\x20at\x20most\x201000.'),'count':z['number']()['describe']('Number\x20of\x20files\x20returned\x20(at\x20most\x201000).'),'truncated':z['boolean']()['optional']()['describe']('True\x20when\x20more\x20files\x20matched\x20than\x20the\x201000-file\x20cap,\x20or\x20the\x20listing\x20was\x20cut\x20short.'),'engine':z['enum'](['ripgrep','js'])['optional']()['describe']('Which\x20scanner\x20answered:\x20\x27ripgrep\x27\x20(bundled\x20binary)\x20or\x20\x27js\x27\x20(in-process\x20fallback).')}),z['object']({'action':z['literal']('edit'),'path':z['string']()['describe']('Absolute\x20path\x20of\x20the\x20edited\x20file.'),'replacements':z['number']()['describe']('Number\x20of\x20replacements\x20performed.'),'ok':z['boolean']()})])})['strict']();
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "WoWok MCP Schema Index",
4
4
  "description": "Index of all available JSON schemas for WoWok MCP tools",
5
- "generatedAt": "2026-10-16T09:16:30.649Z",
5
+ "generatedAt": "2026-10-16T23:13:07.046Z",
6
6
  "tools": [
7
7
  {
8
8
  "name": "onchain_operations",
@@ -353,7 +353,15 @@
353
353
  },
354
354
  "truncated": {
355
355
  "type": "boolean",
356
- "description": "True when matches were cut off by max_results."
356
+ "description": "True when matches were cut off by max_results, the scan budget or the timeout."
357
+ },
358
+ "engine": {
359
+ "description": "Which scanner answered: 'ripgrep' (bundled binary) or 'js' (in-process fallback — ripgrep absent, or a pattern its regex engine rejects).",
360
+ "type": "string",
361
+ "enum": [
362
+ "ripgrep",
363
+ "js"
364
+ ]
357
365
  }
358
366
  },
359
367
  "required": [
@@ -405,11 +413,23 @@
405
413
  ],
406
414
  "additionalProperties": false
407
415
  },
408
- "description": "Files whose workspace-relative path matches the pattern."
416
+ "description": "Files matching the pattern, at most 1000."
409
417
  },
410
418
  "count": {
411
419
  "type": "number",
412
- "description": "Number of matching files."
420
+ "description": "Number of files returned (at most 1000)."
421
+ },
422
+ "truncated": {
423
+ "description": "True when more files matched than the 1000-file cap, or the listing was cut short.",
424
+ "type": "boolean"
425
+ },
426
+ "engine": {
427
+ "description": "Which scanner answered: 'ripgrep' (bundled binary) or 'js' (in-process fallback).",
428
+ "type": "string",
429
+ "enum": [
430
+ "ripgrep",
431
+ "js"
432
+ ]
413
433
  }
414
434
  },
415
435
  "required": [
@@ -22,7 +22,7 @@
22
22
  "glob",
23
23
  "edit"
24
24
  ],
25
- "description": "Action: 'resolve' = return the workspace root directory; 'list' = list files; 'read' = read a file (path required); 'write' = write/overwrite a file (path + content required); 'delete' = delete a file or directory (path required). 'create_file' = create an empty file (path required; content optional). 'create_dir' = create a directory recursively (path required). 'copy' = copy a file or directory (from + to required). 'move' / 'rename' = move or rename a file or directory (from + to required). 'search' = regex content search across workspace files (pattern required). 'glob' = list files whose workspace-relative path matches a wildcard pattern (pattern required). 'edit' = exact string replacement inside a file (path + old_string + new_string required)."
25
+ "description": "Action: 'resolve' = return the workspace root directory; 'list' = list files; 'read' = read a file (path required); 'write' = write/overwrite a file (path + content required); 'delete' = delete a file or directory (path required). 'create_file' = create an empty file (path required; content optional). 'create_dir' = create a directory recursively (path required). 'copy' = copy a file or directory (from + to required). 'move' / 'rename' = move or rename a file or directory (from + to required). 'search' = regex content search across workspace files (pattern required). 'glob' = list files by wildcard name / path pattern (pattern required). 'edit' = exact string replacement inside a file (path + old_string + new_string required)."
26
26
  },
27
27
  "path": {
28
28
  "description": "Path relative to the workspace root (required for read/write/delete/create_file/create_dir).",
@@ -41,11 +41,11 @@
41
41
  "type": "string"
42
42
  },
43
43
  "pattern": {
44
- "description": "search: regular expression matched against every file line (required for search). glob: wildcard pattern matched against workspace-relative paths — '**' spans directory segments, '*' stays within one segment, '?' is a single char (e.g. '**/*.json', '*.md'; required for glob).",
44
+ "description": "search: regular expression matched against every file line (required for search). Runs on the bundled ripgrep engine, so no lookaround or backreferences; such patterns fall back to a JavaScript scan. glob: wildcard pattern matched against file names — '*' stays within one path segment, '?' is a single char, '**/' spans directories. A pattern without '/' matches the BASENAME at any depth ('*.json', 'readme*'); one containing '/' is anchored to the search scope — the 'path' directory, or the workspace root when 'path' is absent — and a leading '/' states that anchor explicitly (required for glob).",
45
45
  "type": "string"
46
46
  },
47
47
  "glob": {
48
- "description": "search only: optional filename wildcard filter matched on the file basename (e.g. '*.md', '*.{ts,tsx}').",
48
+ "description": "search only: optional filename filter, ripgrep --glob syntax — '*.md' matches at any depth, 'src/*.md' is anchored to the search scope, a leading '!' negates.",
49
49
  "type": "string"
50
50
  },
51
51
  "ignore_case": {
@@ -1 +1 @@
1
- import{readdirSync,readFileSync,writeFileSync,existsSync,mkdirSync,rmSync,statSync,cpSync,renameSync}from'node:fs';import{join,relative,resolve,sep,dirname,basename}from'node:path';import{getWowokWorkspaceDir}from'@wowok/wowok';import{strictParse}from'../../schema/index.js';import{WorkspaceOperationInputSchema}from'../../schema/workspace/index.js';const WORKSPACE_ROOT=getWowokWorkspaceDir();function resolveWorkspacePath(a){const b=resolve(WORKSPACE_ROOT,a);if(b!==WORKSPACE_ROOT&&!b['startsWith'](WORKSPACE_ROOT+sep))throw new Error('path\x20\x27'+a+'\x27\x20escapes\x20the\x20workspace\x20root');return b;}function decodeWriteContent(a,b){if(b!=='base64')return Buffer['from'](a,'utf-8');const c=a['replace'](/\s+/g,''),d=Buffer['from'](c,'base64');if(d['toString']('base64')['replace'](/\s+/g,'')!==c)throw new Error('\x27content\x27\x20is\x20not\x20valid\x20base64');if(d['length']>0xa*0x400*0x400)throw new Error('base64\x20write\x20payload\x20exceeds\x20the\x2010MB\x20limit');return d;}export function workspaceReadmeContent(){return['#\x20WoWok\x20Workspace','','>\x20This\x20folder\x20is\x20your\x20WoWok\x20file\x20workspace.\x20Files\x20here\x20are\x20managed\x20by\x20the','>\x20`workspace_operation`\x20tool\x20and\x20can\x20be\x20selected\x20as\x20AI\x20context\x20in\x20the\x20chat.','','##\x20What\x20lives\x20here','','-\x20**Generated\x20files**\x20—\x20`machineNode2file`\x20/\x20`guard2file`\x20exports\x20land\x20here','\x20\x20(`workspace/<kind>_<name>.<json|md>`)\x20for\x20review\x20before\x20deployment.','-\x20**WIP\x20/\x20WTS**\x20—\x20`generate_wip`,\x20`sign_wip`\x20/\x20`sign_wts`\x20and\x20`generate_wts`','\x20\x20write\x20their\x20outputs\x20here\x20(`wip_<ts>.wip`,\x20`signed_<name>`,\x20`wts/`).','-\x20**Your\x20documents**\x20—\x20anything\x20you\x20want\x20the\x20AI\x20to\x20read\x20as\x20context.','','##\x20How\x20to\x20use\x20it','','1.\x20Click\x20a\x20file\x20in\x20the\x20Workspace\x20drawer\x20to\x20load\x20it\x20into\x20the\x20chat\x20as\x20context.','2.\x20Ask\x20the\x20AI\x20to\x20generate\x20a\x20Machine\x20or\x20Guard\x20—\x20the\x20export\x20is\x20saved\x20here.','3.\x20Use\x20`workspace_operation`\x20(list\x20/\x20read\x20/\x20write\x20/\x20create\x20/\x20delete\x20/\x20move\x20/','\x20\x20\x20rename)\x20from\x20the\x20client\x20or\x20an\x20MCP-capable\x20AI\x20client.','','Everything\x20is\x20local\x20to\x20this\x20device\x20—\x20nothing\x20here\x20touches\x20the\x20chain.']['join']('\x0a');}export function ensureWorkspaceReadme(){mkdirSync(WORKSPACE_ROOT,{'recursive':!![]});const a=join(WORKSPACE_ROOT,'README.md');return!existsSync(a)&&writeFileSync(a,workspaceReadmeContent(),'utf-8'),a;}function listRecursive(a,b,c,d=0x0){if(d>0x8)return;let f;try{f=readdirSync(a,{'withFileTypes':!![]});}catch{return;}for(const g of f){const h=join(a,g['name']),i=relative(b,h)['split'](sep)['join']('/');let j=0x0,k=0x0;try{const l=statSync(h);k=l['size'],j=l['mtimeMs'];}catch{}g['isDirectory']()?(c['push']({'path':i,'is_dir':!![],'size':0x0,'mtime':j}),listRecursive(h,b,c,d+0x1)):c['push']({'path':i,'is_dir':![],'size':k,'mtime':j});}}const SEARCH_MAX_FILE_BYTES=0x5*0x400*0x400,EDIT_MAX_FILE_BYTES=0x2*0x400*0x400,READ_BASE64_MAX_BYTES=0xa*0x400*0x400,SEARCH_DEFAULT_MAX_RESULTS=0x32,SEARCH_HARD_CAP_MAX_RESULTS=0xc8,READ_DEFAULT_LINE_LIMIT=0x7d0;function escapeRegExpLiteral(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}function wildcardToRegExp(a){let b='';for(let d=0x0;d<a['length'];d++){const e=a[d];if(e==='*')a[d+0x1]==='*'?(d++,a[d+0x1]==='/'?(b+='(?:.*/)?',d++):b+='.*'):b+='[^/]*';else{if(e==='?')b+='[^/]';else{if(e==='{'){const f=a['indexOf']('}',d);if(f===-0x1){b+='\x5c{';continue;}const g=a['slice'](d+0x1,f)['split'](',')['map'](escapeRegExpLiteral)['join']('|');b+='(?:'+g+')',d=f;}else b+=escapeRegExpLiteral(e);}}}return new RegExp('^'+b+'$');}export async function handleWorkspaceOperation(a){const b=strictParse(WorkspaceOperationInputSchema,a,'workspace_operation\x20input');mkdirSync(WORKSPACE_ROOT,{'recursive':!![]}),ensureWorkspaceReadme();let c;switch(b['action']){case'resolve':c={'action':'resolve','dir':WORKSPACE_ROOT};break;case'list':{const d=[];listRecursive(WORKSPACE_ROOT,WORKSPACE_ROOT,d),c={'action':'list','dir':WORKSPACE_ROOT,'files':d};break;}case'read':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27read\x27');const g=resolveWorkspacePath(b['path']);if(!existsSync(g))throw new Error('file\x20not\x20found:\x20'+b['path']);if(b['encoding']==='base64'){const q=statSync(g);if(q['size']>READ_BASE64_MAX_BYTES)throw new Error('file\x20too\x20large\x20for\x20base64\x20read\x20(>10MB):\x20'+b['path']);const r=readFileSync(g)['toString']('base64');c={'action':'read','encoding':'base64','path':g,'content':r,'size':q['size']};break;}const h=readFileSync(g,'utf-8'),j=h['split']('\x0a')['length'];if(b['offset']===undefined&&b['limit']===undefined){c={'action':'read','path':g,'content':h,'total_lines':j,'offset':0x1,'limit':j,'truncated':![]};break;}const k=b['offset']??0x1,l=Math['min'](b['limit']??READ_DEFAULT_LINE_LIMIT,READ_DEFAULT_LINE_LIMIT),n=h['split']('\x0a'),o=n['slice'](k-0x1,k-0x1+l),p=k-0x1+l<j;c={'action':'read','path':g,'content':o['join']('\x0a'),'total_lines':j,'offset':k,'limit':l,'truncated':p};break;}case'write':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27write\x27');if(b['content']===undefined)throw new Error('\x27content\x27\x20is\x20required\x20for\x20action=\x27write\x27');const s=resolveWorkspacePath(b['path']);mkdirSync(dirname(s),{'recursive':!![]}),writeFileSync(s,decodeWriteContent(b['content'],b['encoding'])),c={'action':'write','path':s,'ok':!![]};break;}case'delete':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27delete\x27');const t=resolveWorkspacePath(b['path']);if(!existsSync(t))throw new Error('file\x20not\x20found:\x20'+b['path']);rmSync(t,{'recursive':!![],'force':!![]}),c={'action':'delete','path':t,'ok':!![]};break;}case'create_file':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27create_file\x27');const u=resolveWorkspacePath(b['path']);if(existsSync(u))throw new Error('file\x20already\x20exists:\x20'+b['path']);mkdirSync(dirname(u),{'recursive':!![]}),writeFileSync(u,decodeWriteContent(b['content']??'',b['encoding'])),c={'action':'create_file','path':u,'ok':!![]};break;}case'create_dir':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27create_dir\x27');const v=resolveWorkspacePath(b['path']);mkdirSync(v,{'recursive':!![]}),c={'action':'create_dir','path':v,'ok':!![]};break;}case'copy':{if(!b['from'])throw new Error('\x27from\x27\x20is\x20required\x20for\x20action=\x27copy\x27');if(!b['to'])throw new Error('\x27to\x27\x20is\x20required\x20for\x20action=\x27copy\x27');const w=resolveWorkspacePath(b['from']);let x=resolveWorkspacePath(b['to']);if(!existsSync(w))throw new Error('source\x20not\x20found:\x20'+b['from']);try{existsSync(x)&&statSync(x)['isDirectory']()&&(x=join(x,basename(w)));}catch{}if(x===w)throw new Error('\x27copy\x27\x20cannot\x20copy\x20a\x20file\x20onto\x20itself');mkdirSync(dirname(x),{'recursive':!![]}),cpSync(w,x,{'recursive':!![],'force':!![]}),c={'action':'copy','from':w,'to':x,'ok':!![]};break;}case'move':case'rename':{if(!b['from'])throw new Error('\x27from\x27\x20is\x20required\x20for\x20action=\x27'+b['action']+'\x27');if(!b['to'])throw new Error('\x27to\x27\x20is\x20required\x20for\x20action=\x27'+b['action']+'\x27');const y=resolveWorkspacePath(b['from']);let z=resolveWorkspacePath(b['to']);if(!existsSync(y))throw new Error('source\x20not\x20found:\x20'+b['from']);try{existsSync(z)&&statSync(z)['isDirectory']()&&(z=join(z,basename(y)));}catch{}if(z===y)throw new Error('\x27'+b['action']+'\x27\x20cannot\x20move\x20onto\x20itself');mkdirSync(dirname(z),{'recursive':!![]}),renameSync(y,z),c={'action':b['action'],'from':y,'to':z,'ok':!![]};break;}case'search':{if(!b['pattern'])throw new Error('\x27pattern\x27\x20is\x20required\x20for\x20action=\x27search\x27');let A;try{A=new RegExp(b['pattern'],b['ignore_case']?'i':'');}catch(I){throw new Error('invalid\x20search\x20pattern\x20\x27'+b['pattern']+'\x27:\x20'+(I instanceof Error?I['message']:String(I)));}const B=Math['min'](b['max_results']??SEARCH_DEFAULT_MAX_RESULTS,SEARCH_HARD_CAP_MAX_RESULTS),C=b['context_lines']??0x2;let D=WORKSPACE_ROOT;if(b['path']){D=resolveWorkspacePath(b['path']);if(!existsSync(D))throw new Error('path\x20not\x20found:\x20'+b['path']);if(!statSync(D)['isDirectory']())throw new Error('search\x20path\x20must\x20be\x20a\x20directory:\x20'+b['path']);}const E=b['glob']?wildcardToRegExp(b['glob']):null,F=[];listRecursive(D,WORKSPACE_ROOT,F);const G=[];let H=0x0;for(const J of F){if(J['is_dir'])continue;if(J['size']>SEARCH_MAX_FILE_BYTES)continue;if(E&&!E['test'](basename(J['path'])))continue;const K=join(WORKSPACE_ROOT,J['path']);let L;try{L=readFileSync(K,'utf-8');}catch{continue;}if(L['slice'](0x0,0x2000)['includes']('\x00'))continue;const M=new RegExp(A['source'],A['flags']),N=L['split']('\x0a');if(N['length']>0x1&&N[N['length']-0x1]==='')N['pop']();for(let O=0x0;O<N['length'];O++){if(!M['test'](N[O]))continue;H++;if(G['length']>=B)continue;const P={'path':J['path'],'line':O+0x1,'text':N[O]};if(C>0x0){const Q=N['slice'](Math['max'](0x0,O-C),O),R=N['slice'](O+0x1,Math['min'](N['length'],O+0x1+C));if(Q['length']>0x0)P['before']=Q;if(R['length']>0x0)P['after']=R;}G['push'](P);}}c={'action':'search','pattern':b['pattern'],'matches':G,'total_matches':H,'truncated':H>G['length']};break;}case'glob':{if(!b['pattern'])throw new Error('\x27pattern\x27\x20is\x20required\x20for\x20action=\x27glob\x27');const S=wildcardToRegExp(b['pattern']);let T=WORKSPACE_ROOT;if(b['path']){T=resolveWorkspacePath(b['path']);if(!existsSync(T))throw new Error('path\x20not\x20found:\x20'+b['path']);if(!statSync(T)['isDirectory']())throw new Error('glob\x20path\x20must\x20be\x20a\x20directory:\x20'+b['path']);}const U=[];listRecursive(T,WORKSPACE_ROOT,U);const V=U['filter'](W=>S['test'](W['path']));c={'action':'glob','pattern':b['pattern'],'files':V,'count':V['length']};break;}case'edit':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27edit\x27');if(!b['old_string'])throw new Error('\x27old_string\x27\x20must\x20be\x20a\x20non-empty\x20string\x20for\x20action=\x27edit\x27');if(b['new_string']===undefined)throw new Error('\x27new_string\x27\x20is\x20required\x20for\x20action=\x27edit\x27');const W=resolveWorkspacePath(b['path']);if(!existsSync(W))throw new Error('file\x20not\x20found:\x20'+b['path']);if(statSync(W)['size']>EDIT_MAX_FILE_BYTES)throw new Error('file\x20too\x20large\x20for\x20edit\x20(>2MB):\x20'+b['path']);const X=readFileSync(W,'utf-8'),Y=X['split'](b['old_string']),Z=Y['length']-0x1;if(Z===0x0)throw new Error('old_string\x20not\x20found\x20in\x20'+b['path']);if(Z>0x1&&!b['replace_all'])throw new Error('old_string\x20appears\x20'+Z+'\x20times\x20in\x20'+b['path']+';\x20provide\x20replace_all=true\x20or\x20a\x20longer\x20unique\x20string');writeFileSync(W,Y['join'](b['new_string']),'utf-8'),c={'action':'edit','path':W,'replacements':Z,'ok':!![]};break;}default:throw new Error('Unknown\x20workspace_operation\x20action:\x20'+String(b['action']));}return{'content':[{'type':'text','text':JSON['stringify']({'result':c})}],'structuredContent':{'result':c}};}
1
+ import{readdirSync,readFileSync,writeFileSync,existsSync,mkdirSync,rmSync,statSync,cpSync,renameSync}from'node:fs';import{spawn,spawnSync}from'node:child_process';import{createInterface}from'node:readline';import{join,relative,resolve,sep,dirname,basename}from'node:path';import{getWowokWorkspaceDir}from'@wowok/wowok';import{strictParse}from'../../schema/index.js';import{WorkspaceOperationInputSchema}from'../../schema/workspace/index.js';const WORKSPACE_ROOT=getWowokWorkspaceDir();function resolveWorkspacePath(a){const b=resolve(WORKSPACE_ROOT,a);if(b!==WORKSPACE_ROOT&&!b['startsWith'](WORKSPACE_ROOT+sep))throw new Error('path\x20\x27'+a+'\x27\x20escapes\x20the\x20workspace\x20root');return b;}function decodeWriteContent(a,b){if(b!=='base64')return Buffer['from'](a,'utf-8');const c=a['replace'](/\s+/g,''),d=Buffer['from'](c,'base64');if(d['toString']('base64')['replace'](/\s+/g,'')!==c)throw new Error('\x27content\x27\x20is\x20not\x20valid\x20base64');if(d['length']>0xa*0x400*0x400)throw new Error('base64\x20write\x20payload\x20exceeds\x20the\x2010MB\x20limit');return d;}export function workspaceReadmeContent(){return['#\x20WoWok\x20Workspace','','>\x20This\x20folder\x20is\x20your\x20WoWok\x20file\x20workspace.\x20Files\x20here\x20are\x20managed\x20by\x20the','>\x20`workspace_operation`\x20tool\x20and\x20can\x20be\x20selected\x20as\x20AI\x20context\x20in\x20the\x20chat.','','##\x20What\x20lives\x20here','','-\x20**Generated\x20files**\x20—\x20`machineNode2file`\x20/\x20`guard2file`\x20exports\x20land\x20here','\x20\x20(`workspace/<kind>_<name>.<json|md>`)\x20for\x20review\x20before\x20deployment.','-\x20**WIP\x20/\x20WTS**\x20—\x20`generate_wip`,\x20`sign_wip`\x20/\x20`sign_wts`\x20and\x20`generate_wts`','\x20\x20write\x20their\x20outputs\x20here\x20(`wip_<ts>.wip`,\x20`signed_<name>`,\x20`wts/`).','-\x20**Your\x20documents**\x20—\x20anything\x20you\x20want\x20the\x20AI\x20to\x20read\x20as\x20context.','','##\x20How\x20to\x20use\x20it','','1.\x20Click\x20a\x20file\x20in\x20the\x20Workspace\x20drawer\x20to\x20load\x20it\x20into\x20the\x20chat\x20as\x20context.','2.\x20Ask\x20the\x20AI\x20to\x20generate\x20a\x20Machine\x20or\x20Guard\x20—\x20the\x20export\x20is\x20saved\x20here.','3.\x20Use\x20`workspace_operation`\x20(list\x20/\x20read\x20/\x20write\x20/\x20create\x20/\x20delete\x20/\x20move\x20/','\x20\x20\x20rename)\x20from\x20the\x20client\x20or\x20an\x20MCP-capable\x20AI\x20client.','','Everything\x20is\x20local\x20to\x20this\x20device\x20—\x20nothing\x20here\x20touches\x20the\x20chain.']['join']('\x0a');}export function ensureWorkspaceReadme(){mkdirSync(WORKSPACE_ROOT,{'recursive':!![]});const a=join(WORKSPACE_ROOT,'README.md');return!existsSync(a)&&writeFileSync(a,workspaceReadmeContent(),'utf-8'),a;}function listRecursive(a,b,c,d=0x0){if(d>0x8)return;let f;try{f=readdirSync(a,{'withFileTypes':!![]});}catch{return;}for(const g of f){const h=join(a,g['name']),i=relative(b,h)['split'](sep)['join']('/');let j=0x0,k=0x0;try{const l=statSync(h);k=l['size'],j=l['mtimeMs'];}catch{}g['isDirectory']()?(c['push']({'path':i,'is_dir':!![],'size':0x0,'mtime':j}),listRecursive(h,b,c,d+0x1)):c['push']({'path':i,'is_dir':![],'size':k,'mtime':j});}}const SEARCH_MAX_FILE_BYTES=0x5*0x400*0x400,EDIT_MAX_FILE_BYTES=0x2*0x400*0x400,READ_BASE64_MAX_BYTES=0xa*0x400*0x400,SEARCH_DEFAULT_MAX_RESULTS=0x32,SEARCH_HARD_CAP_MAX_RESULTS=0xc8,READ_DEFAULT_LINE_LIMIT=0x7d0;function escapeRegExpLiteral(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}const SEARCH_EXCLUDES=['node_modules','.git','.hg','.svn','dist','build','out','target','__pycache__','.venv','venv','.next','.nuxt','.cache','coverage','.svelte-kit'],SEARCH_EVENT_BUDGET=0x4e20,GLOB_RESULT_CAP=0x3e8,RG_TIMEOUT_MS=0x7530;let rgProbed;function rgBin(){if(rgProbed)return rgProbed['bin'];const a=[],b=(process['env']['WOWOK_RG']??'')['trim']();if(b)a['push'](b);a['push']('rg');for(const d of a){try{const e=spawnSync(d,['--version'],{'timeout':0x1388,'windowsHide':!![]});if(e['status']===0x0&&/ripgrep/['test'](String(e['stdout'])))return rgProbed={'bin':d},d;}catch{}}return rgProbed={'bin':null},null;}function runRg(a,b,c){const d=rgBin();if(!d)return Promise['resolve']({'ok':![],'aborted':![],'timedOut':![]});return new Promise(e=>{let f;try{f=spawn(d,a,{'cwd':c,'windowsHide':!![]});}catch{e({'ok':![],'aborted':![],'timedOut':![]});return;}let g=![],h=![],i=![];const j=m=>{if(g)return;g=!![],clearTimeout(k),e({'ok':m===0x0||m===0x1,'aborted':i,'timedOut':h});},k=setTimeout(()=>{h=!![],f['kill']('SIGKILL');},RG_TIMEOUT_MS),l=createInterface({'input':f['stdout']});l['on']('line',m=>{!b(m)&&(i=!![],l['close'](),f['kill']('SIGKILL'));}),f['on']('error',()=>j(null)),f['on']('close',m=>{l['close'](),j(m);});});}function toWorkspaceRel(a,b){const c=resolve(a,b),d=relative(WORKSPACE_ROOT,c);return d['split'](sep)['join']('/');}const stripEol=a=>String(a??'')['replace'](/\r?\n$/,'');async function rgContentSearch(a){const b=['--json','--no-messages','--no-require-git','--max-filesize',Math['floor'](SEARCH_MAX_FILE_BYTES/(0x400*0x400))+'M','--max-depth','32','--max-count',String(a['maxResults'])];if(a['contextLines']>0x0)b['push']('--context',String(a['contextLines']),'--context-separator','NONE:');if(a['ignoreCase'])b['push']('--ignore-case');if(a['glob'])b['push']('--glob',a['glob']);for(const k of SEARCH_EXCLUDES)b['push']('--glob','!'+k);b['push']('--',a['pattern'],'.');const c=[];let d=0x0,f=![],g=[],h=null;const i=()=>{if(h&&g['length']&&!h['after'])h['after']=g['map'](l=>l['text']);g=[],h=null;},j=await runRg(b,l=>{let n;try{n=JSON['parse'](l);}catch{return!![];}if(!n||typeof n!=='object')return!![];if(n['type']==='context')return g['push']({'line':Number(n['data']?.['line_number']??0x0),'text':stripEol(n['data']?.['lines']?.['text'])}),!![];if(n['type']==='begin'||n['type']==='end')return i(),!![];if(n['type']!=='match')return!![];d++;const o=g['map'](p=>p['text']);g=[];if(c['length']<a['maxResults']){const p={'path':toWorkspaceRel(a['baseAbs'],String(n['data']?.['path']?.['text']??'')),'line':Number(n['data']?.['line_number']??0x0),'text':stripEol(n['data']?.['lines']?.['text'])};if(o['length'])p['before']=o;if(h&&o['length'])h['after']=o;c['push'](p),h=p;}else h=null;if(d>=SEARCH_EVENT_BUDGET)return f=!![],![];return!![];},a['baseAbs']);if(!j['ok'])return null;return i(),{'matches':c,'total':d,'truncated':d>c['length']||f||j['aborted']||j['timedOut']};}async function rgFileSearch(a,b){const c=['--files','--no-require-git','--max-depth','32'];for(const j of SEARCH_EXCLUDES)c['push']('--glob','!'+j);c['push']('--glob',a,'--','.');const d=[];let f=0x0,g=![];const h=await runRg(c,k=>{f++;if(d['length']<GLOB_RESULT_CAP)d['push'](k);else return g=!![],![];return!![];},b);if(!h['ok']&&f===0x0)return null;const i=[];for(const k of d){const l=toWorkspaceRel(b,k),m=resolve(b,k);let n=0x0,o=0x0;try{const q=statSync(m);n=q['size'],o=q['mtimeMs'];}catch{continue;}i['push']({'path':l,'is_dir':![],'size':n,'mtime':o});}return{'files':i,'scanned':f,'truncated':g||f>i['length']};}function isExcluded(a){return a['split']('/')['some'](b=>SEARCH_EXCLUDES['includes'](b));}function scopePrefix(a){const b=toWorkspaceRel(WORKSPACE_ROOT,a);return b?b+'/':'';}function globMatcher(a){const b=a['startsWith']('/')?a['slice'](0x1):a,c=wildcardToRegExp(b),d=!b['includes']('/');return e=>c['test'](d?e['slice'](e['lastIndexOf']('/')+0x1):e);}function jsContentSearch(a){const b=new RegExp(a['pattern'],a['ignoreCase']?'i':''),c=a['glob']?globMatcher(a['glob']):null,d=scopePrefix(a['baseAbs']),e=[];listRecursive(a['baseAbs'],WORKSPACE_ROOT,e);const g=[];let h=0x0;for(const j of e){if(j['is_dir']||isExcluded(j['path']))continue;if(j['size']>SEARCH_MAX_FILE_BYTES)continue;if(c&&!c(j['path']['slice'](d['length'])))continue;const k=join(WORKSPACE_ROOT,j['path']);let l;try{l=readFileSync(k,'utf-8');}catch{continue;}if(l['slice'](0x0,0x2000)['includes']('\x00'))continue;const n=l['split']('\x0a');if(n['length']>0x1&&n[n['length']-0x1]==='')n['pop']();for(let o=0x0;o<n['length'];o++){if(!b['test'](n[o]))continue;h++;if(g['length']>=a['maxResults'])continue;const p={'path':j['path'],'line':o+0x1,'text':n[o]};if(a['contextLines']>0x0){const q=n['slice'](Math['max'](0x0,o-a['contextLines']),o),r=n['slice'](o+0x1,Math['min'](n['length'],o+0x1+a['contextLines']));if(q['length']>0x0)p['before']=q;if(r['length']>0x0)p['after']=r;}g['push'](p);}}return{'matches':g,'total':h,'truncated':h>g['length']};}function jsFileSearch(a,b){const c=globMatcher(a),d=scopePrefix(b),e=[];listRecursive(b,WORKSPACE_ROOT,e);const f=e['filter'](g=>!isExcluded(g['path'])&&c(g['path']['slice'](d['length'])));return{'files':f['slice'](0x0,GLOB_RESULT_CAP),'truncated':f['length']>GLOB_RESULT_CAP};}function wildcardToRegExp(a){let b='';for(let d=0x0;d<a['length'];d++){const e=a[d];if(e==='*')a[d+0x1]==='*'?(d++,a[d+0x1]==='/'?(b+='(?:.*/)?',d++):b+='.*'):b+='[^/]*';else{if(e==='?')b+='[^/]';else{if(e==='{'){const f=a['indexOf']('}',d);if(f===-0x1){b+='\x5c{';continue;}const g=a['slice'](d+0x1,f)['split'](',')['map'](escapeRegExpLiteral)['join']('|');b+='(?:'+g+')',d=f;}else b+=escapeRegExpLiteral(e);}}}return new RegExp('^'+b+'$');}export async function handleWorkspaceOperation(a){const b=strictParse(WorkspaceOperationInputSchema,a,'workspace_operation\x20input');mkdirSync(WORKSPACE_ROOT,{'recursive':!![]}),ensureWorkspaceReadme();let c;switch(b['action']){case'resolve':c={'action':'resolve','dir':WORKSPACE_ROOT};break;case'list':{const d=[];listRecursive(WORKSPACE_ROOT,WORKSPACE_ROOT,d),c={'action':'list','dir':WORKSPACE_ROOT,'files':d};break;}case'read':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27read\x27');const f=resolveWorkspacePath(b['path']);if(!existsSync(f))throw new Error('file\x20not\x20found:\x20'+b['path']);if(b['encoding']==='base64'){const n=statSync(f);if(n['size']>READ_BASE64_MAX_BYTES)throw new Error('file\x20too\x20large\x20for\x20base64\x20read\x20(>10MB):\x20'+b['path']);const o=readFileSync(f)['toString']('base64');c={'action':'read','encoding':'base64','path':f,'content':o,'size':n['size']};break;}const g=readFileSync(f,'utf-8'),h=g['split']('\x0a')['length'];if(b['offset']===undefined&&b['limit']===undefined){c={'action':'read','path':f,'content':g,'total_lines':h,'offset':0x1,'limit':h,'truncated':![]};break;}const i=b['offset']??0x1,j=Math['min'](b['limit']??READ_DEFAULT_LINE_LIMIT,READ_DEFAULT_LINE_LIMIT),k=g['split']('\x0a'),l=k['slice'](i-0x1,i-0x1+j),m=i-0x1+j<h;c={'action':'read','path':f,'content':l['join']('\x0a'),'total_lines':h,'offset':i,'limit':j,'truncated':m};break;}case'write':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27write\x27');if(b['content']===undefined)throw new Error('\x27content\x27\x20is\x20required\x20for\x20action=\x27write\x27');const p=resolveWorkspacePath(b['path']);mkdirSync(dirname(p),{'recursive':!![]}),writeFileSync(p,decodeWriteContent(b['content'],b['encoding'])),c={'action':'write','path':p,'ok':!![]};break;}case'delete':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27delete\x27');const q=resolveWorkspacePath(b['path']);if(!existsSync(q))throw new Error('file\x20not\x20found:\x20'+b['path']);rmSync(q,{'recursive':!![],'force':!![]}),c={'action':'delete','path':q,'ok':!![]};break;}case'create_file':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27create_file\x27');const r=resolveWorkspacePath(b['path']);if(existsSync(r))throw new Error('file\x20already\x20exists:\x20'+b['path']);mkdirSync(dirname(r),{'recursive':!![]}),writeFileSync(r,decodeWriteContent(b['content']??'',b['encoding'])),c={'action':'create_file','path':r,'ok':!![]};break;}case'create_dir':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27create_dir\x27');const s=resolveWorkspacePath(b['path']);mkdirSync(s,{'recursive':!![]}),c={'action':'create_dir','path':s,'ok':!![]};break;}case'copy':{if(!b['from'])throw new Error('\x27from\x27\x20is\x20required\x20for\x20action=\x27copy\x27');if(!b['to'])throw new Error('\x27to\x27\x20is\x20required\x20for\x20action=\x27copy\x27');const t=resolveWorkspacePath(b['from']);let u=resolveWorkspacePath(b['to']);if(!existsSync(t))throw new Error('source\x20not\x20found:\x20'+b['from']);try{existsSync(u)&&statSync(u)['isDirectory']()&&(u=join(u,basename(t)));}catch{}if(u===t)throw new Error('\x27copy\x27\x20cannot\x20copy\x20a\x20file\x20onto\x20itself');mkdirSync(dirname(u),{'recursive':!![]}),cpSync(t,u,{'recursive':!![],'force':!![]}),c={'action':'copy','from':t,'to':u,'ok':!![]};break;}case'move':case'rename':{if(!b['from'])throw new Error('\x27from\x27\x20is\x20required\x20for\x20action=\x27'+b['action']+'\x27');if(!b['to'])throw new Error('\x27to\x27\x20is\x20required\x20for\x20action=\x27'+b['action']+'\x27');const v=resolveWorkspacePath(b['from']);let w=resolveWorkspacePath(b['to']);if(!existsSync(v))throw new Error('source\x20not\x20found:\x20'+b['from']);try{existsSync(w)&&statSync(w)['isDirectory']()&&(w=join(w,basename(v)));}catch{}if(w===v)throw new Error('\x27'+b['action']+'\x27\x20cannot\x20move\x20onto\x20itself');mkdirSync(dirname(w),{'recursive':!![]}),renameSync(v,w),c={'action':b['action'],'from':v,'to':w,'ok':!![]};break;}case'search':{if(!b['pattern'])throw new Error('\x27pattern\x27\x20is\x20required\x20for\x20action=\x27search\x27');const x=Math['min'](b['max_results']??SEARCH_DEFAULT_MAX_RESULTS,SEARCH_HARD_CAP_MAX_RESULTS),y=b['context_lines']??0x2;let z=WORKSPACE_ROOT;if(b['path']){z=resolveWorkspacePath(b['path']);if(!existsSync(z))throw new Error('path\x20not\x20found:\x20'+b['path']);if(!statSync(z)['isDirectory']())throw new Error('search\x20path\x20must\x20be\x20a\x20directory:\x20'+b['path']);}const A={'pattern':b['pattern'],'baseAbs':z,'glob':b['glob'],'ignoreCase':Boolean(b['ignore_case']),'maxResults':x,'contextLines':y},B=await rgContentSearch(A);let C=B;if(!C)try{C=jsContentSearch(A);}catch(D){throw new Error('invalid\x20search\x20pattern\x20\x27'+b['pattern']+'\x27:\x20'+(D instanceof Error?D['message']:String(D)));}c={'action':'search','pattern':b['pattern'],'engine':B?'ripgrep':'js','matches':C['matches'],'total_matches':C['total'],'truncated':C['truncated']};break;}case'glob':{if(!b['pattern'])throw new Error('\x27pattern\x27\x20is\x20required\x20for\x20action=\x27glob\x27');let E=WORKSPACE_ROOT;if(b['path']){E=resolveWorkspacePath(b['path']);if(!existsSync(E))throw new Error('path\x20not\x20found:\x20'+b['path']);if(!statSync(E)['isDirectory']())throw new Error('glob\x20path\x20must\x20be\x20a\x20directory:\x20'+b['path']);}const F=await rgFileSearch(b['pattern'],E),G=F??jsFileSearch(b['pattern'],E);c={'action':'glob','pattern':b['pattern'],'engine':F?'ripgrep':'js','files':G['files'],'count':G['files']['length'],'truncated':G['truncated']};break;}case'edit':{if(!b['path'])throw new Error('\x27path\x27\x20is\x20required\x20for\x20action=\x27edit\x27');if(!b['old_string'])throw new Error('\x27old_string\x27\x20must\x20be\x20a\x20non-empty\x20string\x20for\x20action=\x27edit\x27');if(b['new_string']===undefined)throw new Error('\x27new_string\x27\x20is\x20required\x20for\x20action=\x27edit\x27');const H=resolveWorkspacePath(b['path']);if(!existsSync(H))throw new Error('file\x20not\x20found:\x20'+b['path']);if(statSync(H)['size']>EDIT_MAX_FILE_BYTES)throw new Error('file\x20too\x20large\x20for\x20edit\x20(>2MB):\x20'+b['path']);const I=readFileSync(H,'utf-8'),J=I['split'](b['old_string']),K=J['length']-0x1;if(K===0x0)throw new Error('old_string\x20not\x20found\x20in\x20'+b['path']);if(K>0x1&&!b['replace_all'])throw new Error('old_string\x20appears\x20'+K+'\x20times\x20in\x20'+b['path']+';\x20provide\x20replace_all=true\x20or\x20a\x20longer\x20unique\x20string');writeFileSync(H,J['join'](b['new_string']),'utf-8'),c={'action':'edit','path':H,'replacements':K,'ok':!![]};break;}default:throw new Error('Unknown\x20workspace_operation\x20action:\x20'+String(b['action']));}return{'content':[{'type':'text','text':JSON['stringify']({'result':c})}],'structuredContent':{'result':c}};}
@@ -1 +1 @@
1
- import{handleAccountOperation,handleMarkOperation,handleInfoOperation,handleHistoryOperation,handleCacheOperation}from'../handlers/local.js';import{statusErrorShape}from'../wrap.js';import{createToolMeta,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,LocalCacheOperationSchema,AccountOperationOutputWrappedSchema,LocalMarkOperationOutputWrappedSchema,LocalInfoOperationOutputWrappedSchema,LocalHistoryOperationOutputWrappedSchema,LocalCacheOperationOutputWrappedSchema}from'../../schema/index.js';export const LOCAL_TOOLS=[{'name':'account_operation','handler':handleAccountOperation,'config':{'title':'Account\x20-\x20Wallet\x20Management\x20&\x20On-Chain\x20Coin\x20Transactions','summary':'Wallet\x20management\x20(local)\x20+\x20token\x20transfer\x20and\x20coin-object\x20production\x20(on-chain,\x20confirmed).','description':'Manage\x20WoWok\x20accounts\x20locally:\x20generate,\x20suspend,\x20resume,\x20faucet-test,\x20sign\x20data,\x20etc.\x0a\x0a💰\x20ON-CHAIN\x20COIN\x20TRANSACTIONS\x20(IRREVERSIBLE,\x20confirmed):\x20`transfer`\x20moves\x20tokens\x20to\x20another\x20account\x20(fund\x20movement);\x20`get`\x20splits/merges\x20the\x20account\x27s\x20coins\x20to\x20produce\x20a\x20coin\x20object\x20carrying\x20at\x20least\x20the\x20required\x20balance\x20and\x20self-delivers\x20it\x20to\x20the\x20same\x20account\x20(fund\x20never\x20leaves\x20the\x20account\x20minus\x20gas,\x20but\x20a\x20real\x20transaction\x20IS\x20executed\x20and\x20SPENDS\x20GAS,\x20and\x20its\x20digest\x20is\x20returned).\x20Both\x20amounts\x20accept\x20display\x20format\x20with\x20symbol\x20(\x222.5WOW\x22)\x20—\x20converted\x20with\x20the\x20token\x27s\x20decimals\x20—\x20or\x20raw\x20smallest-unit\x20integers;\x20bare\x20decimals\x20are\x20rejected.\x20The\x20first\x20call\x20returns\x20a\x20pending_confirmation\x20preview\x20(amount,\x20token\x20full\x20type,\x20counterparty/account);\x20re-call\x20with\x20transfer.confirmed=true\x20or\x20get.confirmed=true\x20after\x20user\x20consent\x20to\x20execute.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27account_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':AccountOperationSchema,'outputSchema':AccountOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['account','local','private','wallet','transfer','fund'])},'errorShapeBuilder':statusErrorShape,'timeoutMs':0x1d4c0},{'name':'local_mark_operation','handler':handleMarkOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalMark\x20-\x20Address\x20Book\x20Management','summary':'LOCAL\x20address\x20book\x20(name/tag\x20for\x20addresses\x20and\x20object\x20IDs).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20ID\x20names\x20and\x20tags\x20stored\x20ONLY\x20on\x20your\x20local\x20device\x20for\x20easy\x20identification\x20of\x20user\x20address\x20or\x20object\x20IDs\x20by\x20name.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_mark_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalMarkOperationSchema,'outputSchema':LocalMarkOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['mark','local','private','address-book','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_info_operation','handler':handleInfoOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalInfo\x20-\x20Private\x20Data\x20Management','summary':'LOCAL\x20private\x20data\x20(delivery\x20addresses,\x20phone\x20numbers).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20sensitive\x20personal\x20information\x20stored\x20ONLY\x20on\x20your\x20device:\x20delivery\x20addresses,\x20phone\x20numbers,\x20contacts.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_info_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalInfoOperationSchema,'outputSchema':LocalInfoOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['info','local','private','data-management','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_history_operation','handler':handleHistoryOperation,'config':{'title':'🕘\x20LOCAL\x20ONLY:\x20LocalHistory\x20-\x20Explorer\x20Visit\x20History','summary':'LOCAL\x20visit\x20history\x20of\x20Explorer\x20objects\x20(recently\x20viewed,\x20newest\x20first).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20the\x20Explorer\x20visit\x20history\x20stored\x20ONLY\x20on\x20your\x20device.\x20Each\x20entry\x20keeps\x20the\x20stable\x20object\x20key,\x20canonical\x200x\x20address,\x20object\x20type\x20tag\x20(detail\x20visits\x20only),\x20network\x20and\x20visit\x20timestamp\x20—\x20display\x20names\x20are\x20NEVER\x20stored\x20and\x20are\x20resolved\x20live\x20at\x20render\x20time.\x0a\x0aOmit\x20every\x20operation\x20field\x20to\x20LIST\x20history\x20(newest\x20first,\x20auto-pruned\x20to\x20the\x20last\x2030\x20recorded\x20days\x20/\x20300\x20entries).\x20Use\x20{add:{op:\x27add\x27,data:[...]}}\x20to\x20record\x20visits\x20(upsert\x20by\x20key),\x20{remove:{op:\x27remove\x27,keys:[...]}}\x20to\x20delete\x20entries,\x20or\x20{clear:{op:\x27clear\x27}}\x20to\x20erase\x20all\x20history.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_history_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalHistoryOperationSchema,'outputSchema':LocalHistoryOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['history','local','private','recent','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_cache_operation','handler':handleCacheOperation,'config':{'title':'🧹\x20LOCAL\x20ONLY:\x20SDK\x20Read\x20Cache\x20-\x20Diagnose\x20&\x20Clear','summary':'LOCAL\x20SDK\x20read\x20cache:\x20report\x20diagnostics,\x20clear\x20a\x20prefix\x20or\x20everything,\x20re-detect\x20chain\x20identity\x20after\x20a\x20node\x20reset.','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Inspect\x20and\x20clear\x20this\x20device\x27s\x20WoWok\x20SDK\x20read\x20cache.\x20Does\x20NOT\x20touch\x20accounts,\x20marks,\x20info\x20or\x20history\x20(separate\x20stores,\x20separate\x20tools)\x20and\x20never\x20touches\x20the\x20blockchain.\x0a\x0a'+'WHEN\x20TO\x20USE:\x20after\x20the\x20chain\x20node\x20was\x20restarted\x20or\x20reset,\x20or\x20when\x20a\x20call\x20fails\x20with\x20\x27object\x200x…\x20version\x200x…\x20is\x20unavailable\x27.\x20The\x20SDK\x20namespaces\x20its\x20cache\x20by\x20CHAIN\x20IDENTITY\x20(the\x20genesis\x20checkpoint\x20digest\x20from\x20w_getChainIdentifier),\x20which\x20changes\x20exactly\x20when\x20the\x20chain\x20is\x20replaced\x20—\x20so\x20a\x20reset\x20normally\x20needs\x20no\x20action.\x20Use\x20{refresh_chain_scope:\x20{op:\x27refresh_chain_scope\x27}}\x20to\x20force\x20that\x20re-detection\x20when\x20the\x20node\x20was\x20unreachable\x20at\x20startup\x20(leaving\x20the\x20cache\x20unscoped),\x20{status:\x20{op:\x27status\x27}}\x20to\x20see\x20whether\x20a\x20chain\x20identity\x20is\x20active,\x20{clear_prefix:\x20{op:\x27clear_prefix\x27,\x20prefix:\x27objectv2\x27}}\x20to\x20drop\x20only\x20the\x20on-chain\x20object\x20cache,\x20or\x20{clear:\x20{op:\x27clear\x27}}\x20to\x20drop\x20everything.\x0a\x0a'+'READ-ONLY\x20SUB-OP:\x20`status`\x20changes\x20nothing.\x20The\x20others\x20discard\x20cached\x20reads\x20only\x20—\x20the\x20next\x20call\x20re-reads\x20from\x20the\x20node.\x0a\x0a'+'💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_cache_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalCacheOperationSchema,'outputSchema':LocalCacheOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['cache','local','private','diagnostics','off-chain','stale'])},'errorShapeBuilder':statusErrorShape}];
1
+ import{handleAccountOperation,handleMarkOperation,handleInfoOperation,handleHistoryOperation,handleCacheOperation}from'../handlers/local.js';import{statusErrorShape}from'../wrap.js';import{createToolMeta,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,LocalCacheOperationSchema,AccountOperationOutputWrappedSchema,LocalMarkOperationOutputWrappedSchema,LocalInfoOperationOutputWrappedSchema,LocalHistoryOperationOutputWrappedSchema,LocalCacheOperationOutputWrappedSchema}from'../../schema/index.js';export const LOCAL_TOOLS=[{'name':'account_operation','handler':handleAccountOperation,'config':{'title':'Account\x20-\x20Wallet\x20Management\x20&\x20On-Chain\x20Coin\x20Transactions','summary':'Wallet\x20management\x20(local):\x20gen/faucet/suspend/resume/sign\x20+\x20on-chain\x20token\x20transfer\x20and\x20coin\x20production.','description':'Manage\x20WoWok\x20accounts\x20locally:\x20generate,\x20suspend,\x20resume,\x20sign\x20data,\x20and\x20claim\x20test\x20coins\x20via\x20the\x20faucet.\x0a\x0a🚰\x20FAUCET\x20(test\x20coins):\x20{faucet:\x20{name_or_address:\x20\x22\x22,\x20network:\x20\x22testnet\x22}}\x20claims\x20test\x20coins\x20IN-APP\x20(\x27\x27\x20=\x20default\x20account;\x20network\x20accepts\x20testnet/localnet\x20only\x20—\x20mainnet\x20has\x20no\x20faucet).\x20Never\x20send\x20the\x20user\x20to\x20an\x20external\x20faucet\x20website.\x0a\x0a💰\x20ON-CHAIN\x20COIN\x20TRANSACTIONS\x20(IRREVERSIBLE,\x20confirmed):\x20`transfer`\x20moves\x20tokens\x20to\x20another\x20account\x20(fund\x20movement);\x20`get`\x20splits/merges\x20the\x20account\x27s\x20coins\x20to\x20produce\x20a\x20coin\x20object\x20carrying\x20at\x20least\x20the\x20required\x20balance\x20and\x20self-delivers\x20it\x20to\x20the\x20same\x20account\x20(fund\x20never\x20leaves\x20the\x20account\x20minus\x20gas,\x20but\x20a\x20real\x20transaction\x20IS\x20executed\x20and\x20SPENDS\x20GAS,\x20and\x20its\x20digest\x20is\x20returned).\x20Both\x20amounts\x20accept\x20display\x20format\x20with\x20symbol\x20(\x222.5WOW\x22)\x20—\x20converted\x20with\x20the\x20token\x27s\x20decimals\x20—\x20or\x20raw\x20smallest-unit\x20integers;\x20bare\x20decimals\x20are\x20rejected.\x20The\x20first\x20call\x20returns\x20a\x20pending_confirmation\x20preview\x20(amount,\x20token\x20full\x20type,\x20counterparty/account);\x20re-call\x20with\x20transfer.confirmed=true\x20or\x20get.confirmed=true\x20after\x20user\x20consent\x20to\x20execute.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27account_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':AccountOperationSchema,'outputSchema':AccountOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['account','local','private','wallet','transfer','fund'])},'errorShapeBuilder':statusErrorShape,'timeoutMs':0x1d4c0},{'name':'local_mark_operation','handler':handleMarkOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalMark\x20-\x20Address\x20Book\x20Management','summary':'LOCAL\x20address\x20book\x20(name/tag\x20for\x20addresses\x20and\x20object\x20IDs).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20ID\x20names\x20and\x20tags\x20stored\x20ONLY\x20on\x20your\x20local\x20device\x20for\x20easy\x20identification\x20of\x20user\x20address\x20or\x20object\x20IDs\x20by\x20name.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_mark_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalMarkOperationSchema,'outputSchema':LocalMarkOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['mark','local','private','address-book','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_info_operation','handler':handleInfoOperation,'config':{'title':'🔒\x20LOCAL\x20ONLY:\x20LocalInfo\x20-\x20Private\x20Data\x20Management','summary':'LOCAL\x20private\x20data\x20(delivery\x20addresses,\x20phone\x20numbers).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20sensitive\x20personal\x20information\x20stored\x20ONLY\x20on\x20your\x20device:\x20delivery\x20addresses,\x20phone\x20numbers,\x20contacts.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_info_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalInfoOperationSchema,'outputSchema':LocalInfoOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['info','local','private','data-management','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_history_operation','handler':handleHistoryOperation,'config':{'title':'🕘\x20LOCAL\x20ONLY:\x20LocalHistory\x20-\x20Explorer\x20Visit\x20History','summary':'LOCAL\x20visit\x20history\x20of\x20Explorer\x20objects\x20(recently\x20viewed,\x20newest\x20first).','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Manage\x20the\x20Explorer\x20visit\x20history\x20stored\x20ONLY\x20on\x20your\x20device.\x20Each\x20entry\x20keeps\x20the\x20stable\x20object\x20key,\x20canonical\x200x\x20address,\x20object\x20type\x20tag\x20(detail\x20visits\x20only),\x20network\x20and\x20visit\x20timestamp\x20—\x20display\x20names\x20are\x20NEVER\x20stored\x20and\x20are\x20resolved\x20live\x20at\x20render\x20time.\x0a\x0aOmit\x20every\x20operation\x20field\x20to\x20LIST\x20history\x20(newest\x20first,\x20auto-pruned\x20to\x20the\x20last\x2030\x20recorded\x20days\x20/\x20300\x20entries).\x20Use\x20{add:{op:\x27add\x27,data:[...]}}\x20to\x20record\x20visits\x20(upsert\x20by\x20key),\x20{remove:{op:\x27remove\x27,keys:[...]}}\x20to\x20delete\x20entries,\x20or\x20{clear:{op:\x27clear\x27}}\x20to\x20erase\x20all\x20history.\x0a\x0a💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_history_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalHistoryOperationSchema,'outputSchema':LocalHistoryOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['history','local','private','recent','off-chain'])},'errorShapeBuilder':statusErrorShape},{'name':'local_cache_operation','handler':handleCacheOperation,'config':{'title':'🧹\x20LOCAL\x20ONLY:\x20SDK\x20Read\x20Cache\x20-\x20Diagnose\x20&\x20Clear','summary':'LOCAL\x20SDK\x20read\x20cache:\x20report\x20diagnostics,\x20clear\x20a\x20prefix\x20or\x20everything,\x20re-detect\x20chain\x20identity\x20after\x20a\x20node\x20reset.','description':'100%\x20LOCAL,\x20NEVER\x20ON-CHAIN\x20🔒\x20Inspect\x20and\x20clear\x20this\x20device\x27s\x20WoWok\x20SDK\x20read\x20cache.\x20Does\x20NOT\x20touch\x20accounts,\x20marks,\x20info\x20or\x20history\x20(separate\x20stores,\x20separate\x20tools)\x20and\x20never\x20touches\x20the\x20blockchain.\x0a\x0a'+'WHEN\x20TO\x20USE:\x20after\x20the\x20chain\x20node\x20was\x20restarted\x20or\x20reset,\x20or\x20when\x20a\x20call\x20fails\x20with\x20\x27object\x200x…\x20version\x200x…\x20is\x20unavailable\x27.\x20The\x20SDK\x20namespaces\x20its\x20cache\x20by\x20CHAIN\x20IDENTITY\x20(the\x20genesis\x20checkpoint\x20digest\x20from\x20w_getChainIdentifier),\x20which\x20changes\x20exactly\x20when\x20the\x20chain\x20is\x20replaced\x20—\x20so\x20a\x20reset\x20normally\x20needs\x20no\x20action.\x20Use\x20{refresh_chain_scope:\x20{op:\x27refresh_chain_scope\x27}}\x20to\x20force\x20that\x20re-detection\x20when\x20the\x20node\x20was\x20unreachable\x20at\x20startup\x20(leaving\x20the\x20cache\x20unscoped),\x20{status:\x20{op:\x27status\x27}}\x20to\x20see\x20whether\x20a\x20chain\x20identity\x20is\x20active,\x20{clear_prefix:\x20{op:\x27clear_prefix\x27,\x20prefix:\x27objectv2\x27}}\x20to\x20drop\x20only\x20the\x20on-chain\x20object\x20cache,\x20or\x20{clear:\x20{op:\x27clear\x27}}\x20to\x20drop\x20everything.\x0a\x0a'+'READ-ONLY\x20SUB-OP:\x20`status`\x20changes\x20nothing.\x20The\x20others\x20discard\x20cached\x20reads\x20only\x20—\x20the\x20next\x20call\x20re-reads\x20from\x20the\x20node.\x0a\x0a'+'💡\x20Schema\x20hint:\x20call\x20the\x20OTHER\x20tool\x20`schema_query`\x20with\x20action=\x27get\x27\x20and\x20name=\x27local_cache_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema\x20before\x20calling.','inputSchema':LocalCacheOperationSchema,'outputSchema':LocalCacheOperationOutputWrappedSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('operation',['cache','local','private','diagnostics','off-chain','stale'])},'errorShapeBuilder':statusErrorShape}];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/agent-mcp",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,7 +54,7 @@
54
54
  "license": "Apache-2.0",
55
55
  "dependencies": {
56
56
  "@modelcontextprotocol/server": "^2.0.0",
57
- "@wowok/wowok": "3.3.1",
57
+ "@wowok/wowok": "3.3.2",
58
58
  "lodash": "^4.18.1",
59
59
  "zod": "^4.2.0"
60
60
  },