@wowok/agent-mcp 2.7.5 → 2.7.7

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.
Files changed (50) hide show
  1. package/dist/project/evaluation-fix.spec.d.ts +1 -0
  2. package/dist/project/evaluation-fix.spec.js +1 -0
  3. package/dist/project/evaluation.js +1 -1
  4. package/dist/project/index.js +1 -1
  5. package/dist/project/rollback-policy.js +1 -1
  6. package/dist/safety/confirm-gate.js +1 -1
  7. package/dist/schema/call/allocation.d.ts +9 -0
  8. package/dist/schema/call/arbitration.d.ts +10 -0
  9. package/dist/schema/call/contact.d.ts +10 -0
  10. package/dist/schema/call/demand.d.ts +10 -0
  11. package/dist/schema/call/machine.d.ts +10 -0
  12. package/dist/schema/call/order.d.ts +10 -0
  13. package/dist/schema/call/payment.d.ts +3 -3
  14. package/dist/schema/call/payment.js +1 -1
  15. package/dist/schema/call/permission.d.ts +10 -0
  16. package/dist/schema/call/progress.d.ts +10 -0
  17. package/dist/schema/call/repository.d.ts +10 -0
  18. package/dist/schema/call/reward.d.ts +16 -0
  19. package/dist/schema/call/semantic.js +1 -1
  20. package/dist/schema/call/service.d.ts +16 -0
  21. package/dist/schema/call/treasury.d.ts +16 -0
  22. package/dist/schema/common/index.d.ts +21 -0
  23. package/dist/schema/common/index.js +1 -1
  24. package/dist/schema/local/index.js +1 -1
  25. package/dist/schema/operations.d.ts +68 -1
  26. package/dist/schema/operations.js +1 -1
  27. package/dist/schema/query/index.d.ts +5 -0
  28. package/dist/schema/schema-version.js +1 -1
  29. package/dist/schema-query-impl/index.js +1 -1
  30. package/dist/schemas/index.json +1 -1
  31. package/dist/schemas/onchain_operations.schema.json +274 -7
  32. package/dist/schemas/onchain_operations_allocation.schema.json +12 -0
  33. package/dist/schemas/onchain_operations_arbitration.schema.json +20 -0
  34. package/dist/schemas/onchain_operations_contact.schema.json +20 -0
  35. package/dist/schemas/onchain_operations_demand.schema.json +20 -0
  36. package/dist/schemas/onchain_operations_machine.schema.json +20 -0
  37. package/dist/schemas/onchain_operations_order.schema.json +20 -0
  38. package/dist/schemas/onchain_operations_payment.schema.json +6 -7
  39. package/dist/schemas/onchain_operations_permission.schema.json +20 -0
  40. package/dist/schemas/onchain_operations_progress.schema.json +20 -0
  41. package/dist/schemas/onchain_operations_repository.schema.json +20 -0
  42. package/dist/schemas/onchain_operations_reward.schema.json +32 -0
  43. package/dist/schemas/onchain_operations_service.schema.json +32 -0
  44. package/dist/schemas/onchain_operations_treasury.schema.json +32 -0
  45. package/dist/schemas/query_toolkit.output.json +20 -0
  46. package/dist/tools/handlers/config.js +1 -1
  47. package/dist/tools/handlers/onchain.js +1 -1
  48. package/dist/tools/index.js +1 -1
  49. package/dist/tools/shared.js +1 -1
  50. package/package.json +2 -2
@@ -1 +1 @@
1
- import{confirmGate}from'../safety/confirm-gate.js';import{renderPreview}from'../safety/preview.js';import{validateOperation,hasBlockingViolations,getWarningViolations}from'../knowledge/index.js';import{getHarness}from'../harness/index.js';import{isEnabled as a374a}from'../config/index.js';import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{strictParse}from'../schema/index.js';export function withHarness(a,b,c){if(!a374a('harness'))return a;try{const d=getHarness(),e=d['expect'](b,c,a['operation_type'],a['data']);return{...a,'harness':d,'expected':e,'operation_id':a['operation_type']+'_'+Date['now']()};}catch{return a;}}export function wrapLocalHandler(a){const {schema:b,operationFn:c,parseLabel:d,buildContext:e}=a;return async f=>{let g;try{g=strictParse(b,f,d);const h=await c(g),i=e(g);return{'content':[{'type':'text','text':JSON['stringify'](h)}],'structuredContent':{'result':{'status':'success','data':h},'semantic':buildDataSemantic(h,i)}};}catch(j){const k=j instanceof Error?j['message']:String(j),l=g?e(g):undefined,m=classifyError(k),n={'status':'error','error':k};if(m['error_code']!==undefined)n['error_code']=m['error_code'];if(m['retryable']!==undefined)n['retryable']=m['retryable'];if(m['recovery_hint']!==undefined)n['recovery_hint']=m['recovery_hint'];return{'content':[{'type':'text','text':'Error:\x20'+k}],'structuredContent':{'result':n,'semantic':buildDataSemantic(undefined,l,!![],k)}};}};}export function buildPendingConfirmation(a,b,c,d){const e=confirmGate(a,b,c,c?.['user_intent_phrases'],d);if(e['pass'])return{'content':[],'structuredContent':null};const f=e['preview'],g=renderPreview(f),h={'message':g,'result':{'type':'pending_confirmation','preview':f,'rule_id':e['rule_id']},'semantic':{'intent':a+'_awaiting_confirmation','status':'pending_input','summary':'Operation\x20blocked\x20by\x20ConfirmGate\x20('+e['level']+').\x20Review\x20the\x20preview\x20and\x20re-call\x20with\x20env.confirmed=true\x20to\x20proceed.','next_actions':[{'action':'confirm:\x20re-call\x20the\x20SAME\x20operation\x20with\x20env.confirmed=true','reason':'ConfirmGate\x20rule\x20\x27'+e['rule_id']+'\x27\x20matched.\x20The\x20operation\x20was\x20NOT\x20executed.','tool':'onchain_operations','priority':'required'}],'warnings':f['warnings']??[]}};return{'content':[{'type':'text','text':g}],'structuredContent':h};}export function buildConstraintError(a,b){const c=b['filter'](g=>g['severity']==='error'),d=c['map'](g=>'\x20\x20•\x20['+g['field']+']\x20'+g['message'])['join']('\x0a'),e='Pre-call\x20constraint\x20violations\x20for\x20\x27'+a+'\x27:\x0a'+d+'\x0a\x0aFix\x20the\x20listed\x20field(s)\x20and\x20retry.',f={'message':e,'result':{'type':'error','error':e,'error_code':'invalid_parameter','retryable':![],'recovery_hint':'Review\x20the\x20constraint\x20violations\x20above\x20and\x20correct\x20the\x20corresponding\x20fields.'}};return{'content':[{'type':'text','text':e}],'structuredContent':f};}export function buildClassifiedErrorResult(a,b,c){const d={...a,'error':b};if(c['error_code']!==undefined)d['error_code']=c['error_code'];if(c['retryable']!==undefined)d['retryable']=c['retryable'];if(c['recovery_hint']!==undefined)d['recovery_hint']=c['recovery_hint'];return d;}export{validateOperation,hasBlockingViolations,getWarningViolations};
1
+ import{confirmGate}from'../safety/confirm-gate.js';import{renderPreview}from'../safety/preview.js';import{validateOperation,hasBlockingViolations,getWarningViolations}from'../knowledge/index.js';import{getHarness}from'../harness/index.js';import{isEnabled as a375a}from'../config/index.js';import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{strictParse}from'../schema/index.js';export function withHarness(a,b,c){if(!a375a('harness'))return a;try{const d=getHarness(),e=d['expect'](b,c,a['operation_type'],a['data']);return{...a,'harness':d,'expected':e,'operation_id':a['operation_type']+'_'+Date['now']()};}catch{return a;}}export function wrapLocalHandler(a){const {schema:b,operationFn:c,parseLabel:d,buildContext:e}=a;return async f=>{let g;try{g=strictParse(b,f,d);const h=await c(g),i=e(g);return{'content':[{'type':'text','text':JSON['stringify'](h)}],'structuredContent':{'result':{'status':'success','data':h},'semantic':buildDataSemantic(h,i)}};}catch(j){const k=j instanceof Error?j['message']:String(j),l=g?e(g):undefined,m=classifyError(k),n={'status':'error','error':k};if(m['error_code']!==undefined)n['error_code']=m['error_code'];if(m['retryable']!==undefined)n['retryable']=m['retryable'];if(m['recovery_hint']!==undefined)n['recovery_hint']=m['recovery_hint'];return{'content':[{'type':'text','text':'Error:\x20'+k}],'structuredContent':{'result':n,'semantic':buildDataSemantic(undefined,l,!![],k)}};}};}export function buildPendingConfirmation(a,b,c,d){const e=confirmGate(a,b,c,c?.['user_intent_phrases'],d);if(e['pass'])return{'content':[],'structuredContent':null};const f=e['preview'],g=renderPreview(f),h={'message':g,'result':{'type':'pending_confirmation','preview':f,'rule_id':e['rule_id']},'semantic':{'intent':a+'_awaiting_confirmation','status':'pending_input','summary':'Operation\x20blocked\x20by\x20ConfirmGate\x20('+e['level']+').\x20Review\x20the\x20preview\x20and\x20re-call\x20with\x20env.confirmed=true\x20to\x20proceed.','next_actions':[{'action':'confirm:\x20re-call\x20the\x20SAME\x20operation\x20with\x20env.confirmed=true','reason':'ConfirmGate\x20rule\x20\x27'+e['rule_id']+'\x27\x20matched.\x20The\x20operation\x20was\x20NOT\x20executed.','tool':'onchain_operations','priority':'required'}],'warnings':f['warnings']??[]}};return{'content':[{'type':'text','text':g}],'structuredContent':h};}export function buildConstraintError(a,b){const c=b['filter'](g=>g['severity']==='error'),d=c['map'](g=>'\x20\x20•\x20['+g['field']+']\x20'+g['message'])['join']('\x0a'),e='Pre-call\x20constraint\x20violations\x20for\x20\x27'+a+'\x27:\x0a'+d+'\x0a\x0aFix\x20the\x20listed\x20field(s)\x20and\x20retry.',f={'message':e,'result':{'type':'error','error':e,'error_code':'invalid_parameter','retryable':![],'recovery_hint':'Review\x20the\x20constraint\x20violations\x20above\x20and\x20correct\x20the\x20corresponding\x20fields.'}};return{'content':[{'type':'text','text':e}],'structuredContent':f};}export function buildClassifiedErrorResult(a,b,c){const d={...a,'error':b};if(c['error_code']!==undefined)d['error_code']=c['error_code'];if(c['retryable']!==undefined)d['retryable']=c['retryable'];if(c['recovery_hint']!==undefined)d['recovery_hint']=c['recovery_hint'];return d;}export{validateOperation,hasBlockingViolations,getWarningViolations};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/agent-mcp",
3
- "version": "2.7.5",
3
+ "version": "2.7.7",
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",
@@ -50,7 +50,7 @@
50
50
  "license": "Apache-2.0",
51
51
  "dependencies": {
52
52
  "@modelcontextprotocol/server": "^2.0.0",
53
- "@wowok/wowok": "2.7.5",
53
+ "@wowok/wowok": "2.7.7",
54
54
  "lodash": "^4.18.1",
55
55
  "zod": "^4.2.0"
56
56
  },