@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.
- package/dist/project/evaluation-fix.spec.d.ts +1 -0
- package/dist/project/evaluation-fix.spec.js +1 -0
- package/dist/project/evaluation.js +1 -1
- package/dist/project/index.js +1 -1
- package/dist/project/rollback-policy.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +9 -0
- package/dist/schema/call/arbitration.d.ts +10 -0
- package/dist/schema/call/contact.d.ts +10 -0
- package/dist/schema/call/demand.d.ts +10 -0
- package/dist/schema/call/machine.d.ts +10 -0
- package/dist/schema/call/order.d.ts +10 -0
- package/dist/schema/call/payment.d.ts +3 -3
- package/dist/schema/call/payment.js +1 -1
- package/dist/schema/call/permission.d.ts +10 -0
- package/dist/schema/call/progress.d.ts +10 -0
- package/dist/schema/call/repository.d.ts +10 -0
- package/dist/schema/call/reward.d.ts +16 -0
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +16 -0
- package/dist/schema/call/treasury.d.ts +16 -0
- package/dist/schema/common/index.d.ts +21 -0
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/operations.d.ts +68 -1
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/index.d.ts +5 -0
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/onchain_operations.schema.json +274 -7
- package/dist/schemas/onchain_operations_allocation.schema.json +12 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +20 -0
- package/dist/schemas/onchain_operations_contact.schema.json +20 -0
- package/dist/schemas/onchain_operations_demand.schema.json +20 -0
- package/dist/schemas/onchain_operations_machine.schema.json +20 -0
- package/dist/schemas/onchain_operations_order.schema.json +20 -0
- package/dist/schemas/onchain_operations_payment.schema.json +6 -7
- package/dist/schemas/onchain_operations_permission.schema.json +20 -0
- package/dist/schemas/onchain_operations_progress.schema.json +20 -0
- package/dist/schemas/onchain_operations_repository.schema.json +20 -0
- package/dist/schemas/onchain_operations_reward.schema.json +32 -0
- package/dist/schemas/onchain_operations_service.schema.json +32 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +32 -0
- package/dist/schemas/query_toolkit.output.json +20 -0
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/package.json +2 -2
package/dist/tools/shared.js
CHANGED
|
@@ -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
|
|
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.
|
|
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.
|
|
53
|
+
"@wowok/wowok": "2.7.7",
|
|
54
54
|
"lodash": "^4.18.1",
|
|
55
55
|
"zod": "^4.2.0"
|
|
56
56
|
},
|