@wowok/agent-mcp 3.4.2 → 3.4.3
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/.build-stamp.json +5 -0
- package/dist/chain-semantics/composition-truth.js +1 -1
- package/dist/chain-semantics/eval-order.js +1 -1
- package/dist/chain-semantics/field-capability.js +1 -1
- package/dist/chain-semantics/freeze-map.js +1 -1
- package/dist/chain-semantics/fund-flow.js +1 -1
- package/dist/chain-semantics/guard-verbs.js +1 -1
- package/dist/chain-semantics/object-graph.js +1 -1
- package/dist/composition/audit.js +1 -1
- package/dist/composition/compile.d.ts +10 -3
- package/dist/composition/compile.js +1 -1
- package/dist/composition/emit-phases.d.ts +30 -2
- package/dist/composition/emit-phases.js +1 -1
- package/dist/composition/guard-fill.d.ts +8 -0
- package/dist/composition/guard-fill.js +1 -1
- package/dist/composition/inflight.js +1 -1
- package/dist/composition/input-normalize.js +1 -1
- package/dist/composition/materialize.d.ts +2 -0
- package/dist/composition/materialize.js +1 -1
- package/dist/composition/mode-gates.js +1 -1
- package/dist/composition/param-disclosure.js +1 -1
- package/dist/composition/plan-retry-ledger.d.ts +16 -0
- package/dist/composition/plan-retry-ledger.js +1 -1
- package/dist/composition/plan.d.ts +15 -1
- package/dist/composition/plan.js +1 -1
- package/dist/config/config-audit.spec.js +1 -1
- package/dist/config/judgment.d.ts +5 -0
- package/dist/config/judgment.js +1 -1
- package/dist/evaluation/builtins/arbitration-score.d.ts +1 -0
- package/dist/evaluation/builtins/arbitration-score.js +1 -1
- package/dist/evaluation/builtins/demand-match.js +1 -1
- package/dist/evaluation/builtins/graph-service.d.ts +8 -0
- package/dist/evaluation/builtins/graph-service.js +1 -1
- package/dist/evaluation/capability.d.ts +9 -0
- package/dist/evaluation/engine.js +1 -1
- package/dist/evaluation/extract.d.ts +9 -1
- package/dist/evaluation/extract.js +1 -1
- package/dist/evaluation/match-operation.js +1 -1
- package/dist/evaluation/match-policy.d.ts +5 -3
- package/dist/evaluation/match-policy.js +1 -1
- package/dist/evaluation/standards.d.ts +1 -0
- package/dist/evaluation/standards.js +1 -1
- package/dist/evaluation/structured-lines.js +1 -1
- package/dist/evaluation/types.d.ts +1 -0
- package/dist/extensions/capability.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/index.js +1 -1
- package/dist/intent/types.d.ts +1 -1
- package/dist/intent/types.js +1 -1
- package/dist/knowledge/allocation-ledger.js +1 -1
- package/dist/knowledge/allocator-rail-verifier.d.ts +17 -1
- package/dist/knowledge/allocator-rail-verifier.js +1 -1
- package/dist/knowledge/arb-fund-facts.d.ts +7 -0
- package/dist/knowledge/arb-fund-facts.js +1 -1
- package/dist/knowledge/arbitration-rail-verifier.d.ts +35 -0
- package/dist/knowledge/arbitration-rail-verifier.js +1 -0
- package/dist/knowledge/audit-rules.d.ts +11 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/judgment-baselines.json +1 -0
- package/dist/knowledge/baselines/rules/guard.json +7 -6
- package/dist/knowledge/baselines/rules/progress.json +4 -4
- package/dist/knowledge/baselines/rules/reward.json +118 -3
- package/dist/knowledge/builtin-templates.d.ts +3 -2
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/chain-query-registry.d.ts +14 -0
- package/dist/knowledge/chain-query-registry.js +1 -0
- package/dist/knowledge/event-semantics.js +1 -1
- package/dist/knowledge/fee-param-bindings.d.ts +2 -0
- package/dist/knowledge/fee-param-bindings.js +1 -1
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-binding-table.js +1 -1
- package/dist/knowledge/guard-binding-verifier.d.ts +7 -0
- package/dist/knowledge/guard-binding-verifier.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-host-context.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-node-gates.d.ts +3 -1
- package/dist/knowledge/guard-node-gates.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-templates.d.ts +2 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +2 -0
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/knob-docs.js +1 -1
- package/dist/knowledge/param-schema.d.ts +1 -1
- package/dist/knowledge/param-schema.js +1 -1
- package/dist/knowledge/param-tiers.d.ts +2 -0
- package/dist/knowledge/param-tiers.js +1 -1
- package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
- package/dist/knowledge/pattern-resolutions.d.ts +2 -0
- package/dist/knowledge/pattern-resolutions.js +1 -1
- package/dist/knowledge/product-detail-source.d.ts +37 -0
- package/dist/knowledge/product-detail-source.js +1 -0
- package/dist/knowledge/product-doc-b5.d.ts +16 -0
- package/dist/knowledge/product-doc-b5.js +1 -0
- package/dist/knowledge/progress-ledger.js +1 -1
- package/dist/knowledge/projection.spec.js +1 -1
- package/dist/knowledge/publish-gate.d.ts +20 -0
- package/dist/knowledge/publish-gate.js +1 -0
- package/dist/knowledge/publish-readiness.d.ts +25 -0
- package/dist/knowledge/publish-readiness.js +1 -0
- package/dist/knowledge/publish-surface-contract.d.ts +16 -0
- package/dist/knowledge/publish-surface-contract.js +1 -0
- package/dist/knowledge/rail-exit-satisfiability.d.ts +25 -0
- package/dist/knowledge/rail-exit-satisfiability.js +1 -0
- package/dist/knowledge/reward-ledger.d.ts +1 -1
- package/dist/knowledge/reward-ledger.js +1 -1
- package/dist/knowledge/reward-risk.d.ts +1 -1
- package/dist/knowledge/reward-risk.js +1 -1
- package/dist/knowledge/service-ledger.d.ts +3 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/template-loader.d.ts +41 -2
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.d.ts +17 -0
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/workflow-guidance.d.ts +4 -0
- package/dist/knowledge/workflow-guidance.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/monitor/normalize.d.ts +1 -1
- package/dist/monitor/normalize.js +1 -1
- package/dist/monitor/types.js +1 -1
- package/dist/participation/game-context.js +1 -1
- package/dist/participation/radar-core.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.d.ts +28 -3
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +4 -0
- package/dist/playbooks/service-build/object-panorama.js +1 -1
- package/dist/playbooks/service-build/participation-radar.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/service-panorama.js +1 -1
- package/dist/playbooks/service-build/service-quote.js +1 -1
- package/dist/review/index.js +1 -1
- package/dist/review/order.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/benchmark-migration/index.d.ts +24 -0
- package/dist/schema/benchmark-migration/index.js +1 -1
- package/dist/schema/call/allocation.d.ts +11 -7
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.d.ts +4 -0
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +28 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +21 -0
- package/dist/schema/call/contact.d.ts +4 -0
- package/dist/schema/call/demand.d.ts +4 -0
- package/dist/schema/call/guard.d.ts +12 -0
- package/dist/schema/call/handler.d.ts +1 -0
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +16 -8
- package/dist/schema/call/normalize-error.d.ts +1 -0
- package/dist/schema/call/normalize-error.js +1 -0
- package/dist/schema/call/order.d.ts +7 -3
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/payment.d.ts +7 -3
- package/dist/schema/call/permission.d.ts +4 -0
- package/dist/schema/call/personal.d.ts +4 -0
- package/dist/schema/call/progress.d.ts +4 -0
- package/dist/schema/call/progress.js +1 -1
- package/dist/schema/call/proof.d.ts +8 -0
- package/dist/schema/call/receipt.js +1 -1
- package/dist/schema/call/repository.d.ts +4 -0
- package/dist/schema/call/reward.d.ts +6 -2
- package/dist/schema/call/reward.js +1 -1
- package/dist/schema/call/semantic.d.ts +2 -2
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +6 -2
- package/dist/schema/call/treasury.d.ts +10 -6
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/envelope-unify.d.ts +1 -0
- package/dist/schema/envelope-unify.js +1 -1
- package/dist/schema/evaluation/index.d.ts +43 -0
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +14 -2
- package/dist/schema/goal/planning.d.ts +18 -0
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +12 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +1 -0
- package/dist/schema/local/index.d.ts +10 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/local/wip.js +1 -1
- package/dist/schema/messenger/index.d.ts +1 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +95 -12
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +22 -0
- package/dist/schema/query/bi.d.ts +28 -2
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +67 -61
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.js +1 -1
- package/dist/schema-query-impl/index.d.ts +1 -0
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +2 -1
- package/dist/schemas/benchmark_migration_operation.output.json +74 -0
- package/dist/schemas/benchmark_migration_operation.schema.json +32 -0
- package/dist/schemas/bridge_operation.output.json +2 -1
- package/dist/schemas/bridge_operation.schema.json +40 -0
- package/dist/schemas/evaluation_operation.output.json +96 -0
- package/dist/schemas/evaluation_operation.schema.json +39 -0
- package/dist/schemas/goal_operation.schema.json +32 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/intent_radar.output.json +10 -2
- package/dist/schemas/intent_radar.schema.json +5 -1
- package/dist/schemas/keeper_operation.output.json +2 -1
- package/dist/schemas/local_cache_operation.output.json +2 -1
- package/dist/schemas/local_history_operation.output.json +2 -1
- package/dist/schemas/local_info_operation.output.json +2 -1
- package/dist/schemas/local_mark_operation.output.json +2 -1
- package/dist/schemas/local_mark_operation.schema.json +10 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +2 -1
- package/dist/schemas/messenger_operation.schema.json +2 -1
- package/dist/schemas/monitor_events.output.json +2 -1
- package/dist/schemas/monitor_subscription.output.json +2 -1
- package/dist/schemas/onchain_events.output.json +206 -13
- package/dist/schemas/onchain_events.schema.json +16 -0
- package/dist/schemas/onchain_operations.output.json +22 -3
- package/dist/schemas/onchain_operations.schema.json +971 -326
- package/dist/schemas/onchain_operations_allocation.schema.json +19 -12
- package/dist/schemas/onchain_operations_arbitration.schema.json +9 -1
- package/dist/schemas/onchain_operations_contact.schema.json +8 -0
- package/dist/schemas/onchain_operations_demand.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_guard.schema.json +654 -114
- package/dist/schemas/onchain_operations_machine.schema.json +11 -3
- package/dist/schemas/onchain_operations_order.schema.json +14 -11
- package/dist/schemas/onchain_operations_payment.schema.json +12 -9
- package/dist/schemas/onchain_operations_permission.schema.json +8 -0
- package/dist/schemas/onchain_operations_personal.schema.json +8 -0
- package/dist/schemas/onchain_operations_progress.schema.json +9 -1
- package/dist/schemas/onchain_operations_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_repository.schema.json +8 -0
- package/dist/schemas/onchain_operations_reward.schema.json +14 -11
- package/dist/schemas/onchain_operations_service.schema.json +13 -10
- package/dist/schemas/onchain_operations_treasury.schema.json +17 -19
- package/dist/schemas/onchain_table_data.output.json +52 -10
- package/dist/schemas/persona_operation.output.json +57 -0
- package/dist/schemas/persona_operation.schema.json +9 -0
- package/dist/schemas/query_toolkit.output.json +325 -22
- package/dist/schemas/query_toolkit.schema.json +18 -5
- package/dist/schemas/wip_file.output.json +2 -2
- package/dist/schemas/wip_file.schema.json +2 -2
- package/dist/schemas/workflow_operation.schema.json +1 -1
- package/dist/tools/error-catalog.d.ts +17 -0
- package/dist/tools/error-catalog.js +1 -0
- package/dist/tools/handlers/benchmark-migration.d.ts +20 -8
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/entry-edge-recipe.d.ts +101 -0
- package/dist/tools/handlers/entry-edge-recipe.js +1 -0
- package/dist/tools/handlers/escrow-deficit.d.ts +10 -0
- package/dist/tools/handlers/escrow-deficit.js +1 -0
- package/dist/tools/handlers/evaluation.js +1 -1
- package/dist/tools/handlers/fund-rail-recipe.d.ts +10 -0
- package/dist/tools/handlers/fund-rail-recipe.js +1 -0
- package/dist/tools/handlers/intent-radar.js +1 -1
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/mark-namespace.d.ts +30 -0
- package/dist/tools/handlers/mark-namespace.js +1 -0
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/onchain-name-registration.d.ts +1 -0
- package/dist/tools/handlers/onchain-name-registration.js +1 -1
- package/dist/tools/handlers/onchain-name-registration.spec.js +1 -1
- package/dist/tools/handlers/onchain.d.ts +30 -1
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/publish-binding-echo.d.ts +22 -0
- package/dist/tools/handlers/publish-binding-echo.js +1 -0
- package/dist/tools/handlers/query.d.ts +1 -1
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/handlers/review-chain.d.ts +1 -0
- package/dist/tools/handlers/review-chain.js +1 -1
- package/dist/tools/handlers/schema-query.js +1 -1
- package/dist/tools/handlers/stale-build-check.d.ts +9 -0
- package/dist/tools/handlers/stale-build-check.js +1 -0
- package/dist/tools/handlers/submission-assembly.d.ts +55 -0
- package/dist/tools/handlers/submission-assembly.js +1 -0
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/publish-gate-state.d.ts +5 -0
- package/dist/tools/publish-gate-state.js +1 -0
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/onchain.js +1 -1
- package/dist/tools/registry/query.js +1 -1
- package/dist/tools/retry.js +1 -1
- package/dist/tools/runtime-health.js +1 -1
- package/dist/tools/shared.js +1 -1
- package/dist/tools/upgrade-check.d.ts +1 -0
- package/dist/tools/upgrade-check.js +1 -1
- package/dist/tools/wip-verify-ledger.d.ts +2 -0
- package/dist/tools/wip-verify-ledger.js +1 -1
- package/dist/tools/wrap.d.ts +15 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ObjectType}from'@wowok/wowok';const OPERATION_PRIMARY_TYPE={'service':ObjectType['Service'],'machine':ObjectType['Machine'],'guard':ObjectType['Guard'],'progress':ObjectType['Progress'],'repository':ObjectType['Repository'],'arbitration':ObjectType['Arbitration'],'contact':ObjectType['Contact'],'treasury':ObjectType['Treasury'],'reward':ObjectType['Reward'],'allocation':ObjectType['Allocation'],'demand':ObjectType['Demand'],'order':ObjectType['Order'],'proof':ObjectType['Proof'],'permission':ObjectType['Permission']},NAMED_FIELD_TYPES={'namedNewOrder':ObjectType['Order'],'namedNewAllocation':ObjectType['Allocation'],'namedNewProgress':ObjectType['Progress'],'namedNewPayment':ObjectType['Payment'],'namedArb':ObjectType['Arb']};export function operationPrimaryType(a){return a?OPERATION_PRIMARY_TYPE[a]:undefined;}function expectedTypeForField(a,b){return NAMED_FIELD_TYPES[a]??operationPrimaryType(b);}export function collectOnChainNamedObjectRequests(a,b=0x8){const c=[],d=new WeakSet(),e=(f,g,h)=>{if(f==null||h>b)return;if(Array['isArray'](f)){for(const j of f)e(j,g,h+0x1);return;}if(typeof f!=='object')return;if(d['has'](f))return;d['add'](f);const i=f;if(i['onChain']===!![]&&typeof i['name']==='string'&&i['name']['trim']()['length']>0x0){const k={'name':i['name']['trim'](),'field':g,'onChain':!![]};if(Array['isArray'](i['tags'])){const l=i['tags']['filter'](m=>typeof m==='string'&&m['length']>0x0);if(l['length']>0x0)k['tags']=l;}if(i['replaceExistName']===!![])k['replaceExistName']=!![];c['push'](k);}for(const [m,n]of Object['entries'](i)){e(n,m,h+0x1);}};return e(a,'object',0x0),c;}export function planLocalMarkRegistrations(a,b,c){const d=new Map();for(const f of b??[]){if(f?.['change']!=='created')continue;if(typeof f['object']!=='string'||f['object']['length']===0x0)continue;if(f['type']==null)continue;const g=String(f['type']);if(!d['has'](g))d['set'](g,f['object']);}const e=[];for(const h of a??[]){const i=expectedTypeForField(h['field'],c);if(!i)continue;const j=d['get'](String(i));if(!j)continue;e['push']({'name':{'value':h['name'],'replaceExistName':h['replaceExistName']},'address':j,'tags':h['tags']});}return e;}export function autoLocalMarkName(a,b){return a['toLowerCase']()+'_'+b['slice'](-0x6)['toLowerCase']();}export function planAutoLocalMark(a){const b=a['operationType']?operationPrimaryType(a['operationType']):undefined;if(!b)return undefined;const c=(a['created']??[])['find'](g=>g?.['change']==='created'&&typeof g['object']==='string'&&g['object']['length']>0x0&&String(g['type'])===String(b));if(!c?.['object'])return undefined;const d=c['object'];if((a['existingNamesForAddress']??[])['some'](g=>typeof g?.['name']==='string'&&g['name']['length']>0x0))return undefined;const e=autoLocalMarkName(String(b),d),f=a['existingAddressForName']?.['toLowerCase']();if(f!==undefined&&f!==d['toLowerCase']())return undefined;return{'name':{'value':e},'address':d,'tags':['auto'],'note':e+'\x20->\x20'+d};}export async function registerLocalMarksForCreatedObjects(a,b,c,d){const e={'resolved':[],'written':[],'failed':[]},f=planLocalMarkRegistrations(a,b,c);for(const
|
|
1
|
+
import{ObjectType}from'@wowok/wowok';const OPERATION_PRIMARY_TYPE={'service':ObjectType['Service'],'machine':ObjectType['Machine'],'guard':ObjectType['Guard'],'progress':ObjectType['Progress'],'repository':ObjectType['Repository'],'arbitration':ObjectType['Arbitration'],'contact':ObjectType['Contact'],'treasury':ObjectType['Treasury'],'reward':ObjectType['Reward'],'allocation':ObjectType['Allocation'],'demand':ObjectType['Demand'],'order':ObjectType['Order'],'proof':ObjectType['Proof'],'permission':ObjectType['Permission']},NAMED_FIELD_TYPES={'namedNewOrder':ObjectType['Order'],'namedNewAllocation':ObjectType['Allocation'],'namedNewProgress':ObjectType['Progress'],'namedNewPayment':ObjectType['Payment'],'namedArb':ObjectType['Arb']};export function operationPrimaryType(a){return a?OPERATION_PRIMARY_TYPE[a]:undefined;}function expectedTypeForField(a,b){return NAMED_FIELD_TYPES[a]??operationPrimaryType(b);}export function collectOnChainNamedObjectRequests(a,b=0x8){const c=[],d=new WeakSet(),e=(f,g,h)=>{if(f==null||h>b)return;if(Array['isArray'](f)){for(const j of f)e(j,g,h+0x1);return;}if(typeof f!=='object')return;if(d['has'](f))return;d['add'](f);const i=f;if(i['onChain']===!![]&&typeof i['name']==='string'&&i['name']['trim']()['length']>0x0){const k={'name':i['name']['trim'](),'field':g,'onChain':!![]};if(Array['isArray'](i['tags'])){const l=i['tags']['filter'](m=>typeof m==='string'&&m['length']>0x0);if(l['length']>0x0)k['tags']=l;}if(i['replaceExistName']===!![])k['replaceExistName']=!![];c['push'](k);}for(const [m,n]of Object['entries'](i)){e(n,m,h+0x1);}};return e(a,'object',0x0),c;}export function planLocalMarkRegistrations(a,b,c){const d=new Map();for(const f of b??[]){if(f?.['change']!=='created')continue;if(typeof f['object']!=='string'||f['object']['length']===0x0)continue;if(f['type']==null)continue;const g=String(f['type']);if(!d['has'](g))d['set'](g,f['object']);}const e=[];for(const h of a??[]){const i=expectedTypeForField(h['field'],c);if(!i)continue;const j=d['get'](String(i));if(!j)continue;e['push']({'name':{'value':h['name'],'replaceExistName':h['replaceExistName']},'address':j,'tags':h['tags']});}return e;}export function autoLocalMarkName(a,b){return a['toLowerCase']()+'_'+b['slice'](-0x6)['toLowerCase']();}export function planAutoLocalMark(a){const b=a['operationType']?operationPrimaryType(a['operationType']):undefined;if(!b)return undefined;const c=(a['created']??[])['find'](g=>g?.['change']==='created'&&typeof g['object']==='string'&&g['object']['length']>0x0&&String(g['type'])===String(b));if(!c?.['object'])return undefined;const d=c['object'];if((a['existingNamesForAddress']??[])['some'](g=>typeof g?.['name']==='string'&&g['name']['length']>0x0))return undefined;const e=autoLocalMarkName(String(b),d),f=a['existingAddressForName']?.['toLowerCase']();if(f!==undefined&&f!==d['toLowerCase']())return undefined;return{'name':{'value':e},'address':d,'tags':['auto'],'note':e+'\x20->\x20'+d};}export async function registerLocalMarksForCreatedObjects(a,b,c,d){const e={'resolved':[],'written':[],'failed':[],'warnings':[]},f=planLocalMarkRegistrations(a,b,c),g=new Set((b??[])['filter'](h=>h?.['change']==='created'&&typeof h['object']==='string')['map'](h=>h['object']['toLowerCase']()));for(const h of f){try{const i=await d['getAddress'](h['name']['value']);if(i?.['toLowerCase']()===h['address']['toLowerCase']()){e['resolved']['push'](h['name']['value']);continue;}if(g['size']>0x0&&!g['has'](h['address']['toLowerCase']())){e['warnings']['push']('MARK\x20ROUND-INARIANT:\x20refusing\x20to\x20bind\x20\x27'+h['name']['value']+'\x27\x20->\x20'+h['address']+'\x20—\x20the\x20target\x20'+'is\x20NOT\x20in\x20this\x20round\x27s\x20created\x20set\x20(cross-round\x20contamination:\x20the\x20name\x20would\x20resolve\x20to\x20an\x20'+'object\x20from\x20an\x20earlier\x20run).\x20Name\x20the\x20object\x20explicitly\x20in\x20a\x20round\x20that\x20creates\x20it.');continue;}i&&h['name']['replaceExistName']!==!![]&&e['warnings']['push']('MARK\x20CONFLICT:\x20\x27'+h['name']['value']+'\x27\x20already\x20resolves\x20to\x20'+i+';\x20this\x20round\x20wanted\x20'+(h['address']+'.\x20Pass\x20replaceExistName=true\x20to\x20force\x20the\x20rebind\x20—\x20note\x20a\x20forced\x20rebind\x20starts\x20')+'a\x20FRESH\x20mark\x20record\x20(the\x20previous\x20round\x27s\x20createdAt\x20does\x20not\x20carry\x20over).'),await d['put']([h]),e['written']['push'](h['name']['value']),e['resolved']['push'](h['name']['value']);}catch(j){e['failed']['push']({'name':h['name']['value'],'error':j instanceof Error?j['message']:String(j)});}}return e;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{describe,expect,it}from'vitest';import{ObjectType}from'@wowok/wowok';import{collectOnChainNamedObjectRequests,planLocalMarkRegistrations,registerLocalMarksForCreatedObjects}from'./onchain-name-registration.js';function fakeMarkStore(a={}){const b=new Map(Object['entries'](a)),c=[];return{'writes':c,async 'getAddress'(d){return b['get'](String(d)['toLowerCase']());},async 'put'(d){for(const e of d){c['push'](e),b['set'](e['name']['value']['toLowerCase'](),e['address']);}return d;}};}const GUARD_ADDR='0x1111111111111111111111111111111111111111111111111111111111111111';describe('collectOnChainNamedObjectRequests',()=>{it('finds\x20a\x20Guard\x20named\x20with\x20onChain:true\x20under\x20`namedNew`',()=>{const a=collectOnChainNamedObjectRequests({'namedNew':{'name':'bkg_g_holder','onChain':!![]}});expect(a)['toEqual']([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}]);}),it('finds\x20a\x20Guard\x20named\x20with\x20onChain:true\x20under\x20the\x20`object`\x20alias',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'bkg_g_holder','onChain':!![]}});expect(a)['toHaveLength'](0x1),expect(a[0x0])['toMatchObject']({'name':'bkg_g_holder','field':'object'});}),it('ignores\x20a\x20local-only\x20(onChain\x20falsy)\x20name\x20—\x20that\x20path\x20already\x20writes\x20a\x20mark',()=>{expect(collectOnChainNamedObjectRequests({'object':{'name':'private_shop'}}))['toEqual']([]),expect(collectOnChainNamedObjectRequests({'object':{'name':'x','onChain':![]}}))['toEqual']([]);}),it('ignores\x20Guard\x20table\x20entries,\x20which\x20carry\x20a\x20`name`\x20but\x20never\x20request\x20onChain',()=>{const a=collectOnChainNamedObjectRequests({'namedNew':{'name':'g','onChain':!![]},'table':[{'identifier':0x1,'name':'order_id','b_submission':!![]}]});expect(a['map'](b=>b['name']))['toEqual'](['g']);}),it('carries\x20tags\x20and\x20replaceExistName\x20through',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'g','onChain':!![],'tags':['a','b'],'replaceExistName':!![]}});expect(a[0x0])['toEqual']({'name':'g','field':'object','onChain':!![],'tags':['a','b'],'replaceExistName':!![]});}),it('finds\x20a\x20nested\x20named\x20object\x20(order_new.namedNewOrder)',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'svc'},'order_new':{'namedNewOrder':{'name':'ord_1','onChain':!![]}}});expect(a)['toEqual']([{'name':'ord_1','field':'namedNewOrder','onChain':!![]}]);});}),describe('planLocalMarkRegistrations',()=>{it('pairs\x20the\x20Guard\x20request\x20with\x20the\x20Guard\x20the\x20transaction\x20created',()=>{const a=planLocalMarkRegistrations([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard');expect(a)['toEqual']([{'name':{'value':'bkg_g_holder','replaceExistName':undefined},'address':GUARD_ADDR,'tags':undefined}]);}),it('pairs\x20by\x20FIELD\x20hint\x20when\x20several\x20objects\x20are\x20created\x20in\x20one\x20call',()=>{const a='0x2222222222222222222222222222222222222222222222222222222222222222',b='0x3333333333333333333333333333333333333333333333333333333333333333',c=planLocalMarkRegistrations([{'name':'svc','field':'object','onChain':!![]},{'name':'ord','field':'namedNewOrder','onChain':!![]}],[{'type':ObjectType['Order'],'object':b,'change':'created'},{'type':ObjectType['Service'],'object':a,'change':'created'}],'service');expect(c)['toEqual']([{'name':{'value':'svc','replaceExistName':undefined},'address':a,'tags':undefined},{'name':{'value':'ord','replaceExistName':undefined},'address':b,'tags':undefined}]);}),it('drops\x20the\x20request\x20when\x20nothing\x20of\x20that\x20type\x20was\x20created\x20(never\x20guess)',()=>{const a=planLocalMarkRegistrations([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Payment'],'object':GUARD_ADDR,'change':'created'}],'guard');expect(a)['toEqual']([]);}),it('ignores\x20mutated\x20(not\x20created)\x20objects',()=>{const a=planLocalMarkRegistrations([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'mutated'}],'guard');expect(a)['toEqual']([]);});}),describe('registerLocalMarksForCreatedObjects\x20—\x20the\x20created\x20name\x20resolves\x20locally',()=>{it('writes\x20a\x20LocalMark\x20so\x20the\x20name\x20resolves\x20for\x20a\x20subsequent\x20reference',async()=>{const a=fakeMarkStore(),b=await registerLocalMarksForCreatedObjects([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(await a['getAddress']('bkg_g_holder'))['toBe'](GUARD_ADDR),expect(b['written'])['toEqual'](['bkg_g_holder']),expect(b['failed'])['toEqual']([]);}),it('is\x20idempotent\x20—\x20a\x20name\x20already\x20bound\x20to\x20the\x20same\x20address\x20is\x20not\x20rewritten',async()=>{const a=fakeMarkStore({'bkg_g_holder':GUARD_ADDR}),b=await registerLocalMarksForCreatedObjects([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(a['writes'])['toEqual']([]),expect(b['written'])['toEqual']([]),expect(b['resolved'])['toEqual'](['bkg_g_holder']);}),it('rebinds\x20a\x20stale\x20address\x20(SDK\x20left\x20the\x20name\x20pointing\x20at\x20an\x20older\x20object)',async()=>{const a='0x9999999999999999999999999999999999999999999999999999999999999999',b=fakeMarkStore({'g':a});await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',b),expect(await b['getAddress']('g'))['toBe'](GUARD_ADDR);}),it('reports\x20a\x20failed\x20write\x20instead\x20of\x20throwing\x20(chain\x20effect\x20already\x20succeeded)',async()=>{const a=fakeMarkStore();a['put']=async()=>{throw new Error('LocalMarkNameExist');};const b=await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(b['failed'])['toEqual']([{'name':'g','error':'LocalMarkNameExist'}]),expect(b['resolved'])['toEqual']([]);}),it('does\x20nothing\x20when\x20the\x20request\x20list\x20is\x20empty',async()=>{const a=fakeMarkStore(),b=await registerLocalMarksForCreatedObjects([],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(a['writes'])['toEqual']([]),expect(b)['toEqual']({'resolved':[],'written':[],'failed':[]});}),it('propagates\x20replaceExistName\x20so\x20a\x20forced\x20claim\x20still\x20works',async()=>{const a=fakeMarkStore();await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![],'replaceExistName':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a),expect(a['writes'][0x0]['name'])['toEqual']({'value':'g','replaceExistName':!![]});});});
|
|
1
|
+
import{describe,expect,it}from'vitest';import{ObjectType}from'@wowok/wowok';import{collectOnChainNamedObjectRequests,planLocalMarkRegistrations,registerLocalMarksForCreatedObjects}from'./onchain-name-registration.js';function fakeMarkStore(a={}){const b=new Map(Object['entries'](a)),c=[];return{'writes':c,async 'getAddress'(d){return b['get'](String(d)['toLowerCase']());},async 'put'(d){for(const e of d){c['push'](e),b['set'](e['name']['value']['toLowerCase'](),e['address']);}return d;}};}const GUARD_ADDR='0x1111111111111111111111111111111111111111111111111111111111111111';describe('collectOnChainNamedObjectRequests',()=>{it('finds\x20a\x20Guard\x20named\x20with\x20onChain:true\x20under\x20`namedNew`',()=>{const a=collectOnChainNamedObjectRequests({'namedNew':{'name':'bkg_g_holder','onChain':!![]}});expect(a)['toEqual']([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}]);}),it('finds\x20a\x20Guard\x20named\x20with\x20onChain:true\x20under\x20the\x20`object`\x20alias',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'bkg_g_holder','onChain':!![]}});expect(a)['toHaveLength'](0x1),expect(a[0x0])['toMatchObject']({'name':'bkg_g_holder','field':'object'});}),it('ignores\x20a\x20local-only\x20(onChain\x20falsy)\x20name\x20—\x20that\x20path\x20already\x20writes\x20a\x20mark',()=>{expect(collectOnChainNamedObjectRequests({'object':{'name':'private_shop'}}))['toEqual']([]),expect(collectOnChainNamedObjectRequests({'object':{'name':'x','onChain':![]}}))['toEqual']([]);}),it('ignores\x20Guard\x20table\x20entries,\x20which\x20carry\x20a\x20`name`\x20but\x20never\x20request\x20onChain',()=>{const a=collectOnChainNamedObjectRequests({'namedNew':{'name':'g','onChain':!![]},'table':[{'identifier':0x1,'name':'order_id','b_submission':!![]}]});expect(a['map'](b=>b['name']))['toEqual'](['g']);}),it('carries\x20tags\x20and\x20replaceExistName\x20through',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'g','onChain':!![],'tags':['a','b'],'replaceExistName':!![]}});expect(a[0x0])['toEqual']({'name':'g','field':'object','onChain':!![],'tags':['a','b'],'replaceExistName':!![]});}),it('finds\x20a\x20nested\x20named\x20object\x20(order_new.namedNewOrder)',()=>{const a=collectOnChainNamedObjectRequests({'object':{'name':'svc'},'order_new':{'namedNewOrder':{'name':'ord_1','onChain':!![]}}});expect(a)['toEqual']([{'name':'ord_1','field':'namedNewOrder','onChain':!![]}]);});}),describe('planLocalMarkRegistrations',()=>{it('pairs\x20the\x20Guard\x20request\x20with\x20the\x20Guard\x20the\x20transaction\x20created',()=>{const a=planLocalMarkRegistrations([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard');expect(a)['toEqual']([{'name':{'value':'bkg_g_holder','replaceExistName':undefined},'address':GUARD_ADDR,'tags':undefined}]);}),it('pairs\x20by\x20FIELD\x20hint\x20when\x20several\x20objects\x20are\x20created\x20in\x20one\x20call',()=>{const a='0x2222222222222222222222222222222222222222222222222222222222222222',b='0x3333333333333333333333333333333333333333333333333333333333333333',c=planLocalMarkRegistrations([{'name':'svc','field':'object','onChain':!![]},{'name':'ord','field':'namedNewOrder','onChain':!![]}],[{'type':ObjectType['Order'],'object':b,'change':'created'},{'type':ObjectType['Service'],'object':a,'change':'created'}],'service');expect(c)['toEqual']([{'name':{'value':'svc','replaceExistName':undefined},'address':a,'tags':undefined},{'name':{'value':'ord','replaceExistName':undefined},'address':b,'tags':undefined}]);}),it('drops\x20the\x20request\x20when\x20nothing\x20of\x20that\x20type\x20was\x20created\x20(never\x20guess)',()=>{const a=planLocalMarkRegistrations([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Payment'],'object':GUARD_ADDR,'change':'created'}],'guard');expect(a)['toEqual']([]);}),it('ignores\x20mutated\x20(not\x20created)\x20objects',()=>{const a=planLocalMarkRegistrations([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'mutated'}],'guard');expect(a)['toEqual']([]);});}),describe('registerLocalMarksForCreatedObjects\x20—\x20the\x20created\x20name\x20resolves\x20locally',()=>{it('writes\x20a\x20LocalMark\x20so\x20the\x20name\x20resolves\x20for\x20a\x20subsequent\x20reference',async()=>{const a=fakeMarkStore(),b=await registerLocalMarksForCreatedObjects([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(await a['getAddress']('bkg_g_holder'))['toBe'](GUARD_ADDR),expect(b['written'])['toEqual'](['bkg_g_holder']),expect(b['failed'])['toEqual']([]);}),it('is\x20idempotent\x20—\x20a\x20name\x20already\x20bound\x20to\x20the\x20same\x20address\x20is\x20not\x20rewritten',async()=>{const a=fakeMarkStore({'bkg_g_holder':GUARD_ADDR}),b=await registerLocalMarksForCreatedObjects([{'name':'bkg_g_holder','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(a['writes'])['toEqual']([]),expect(b['written'])['toEqual']([]),expect(b['resolved'])['toEqual'](['bkg_g_holder']);}),it('rebinds\x20a\x20stale\x20address\x20(SDK\x20left\x20the\x20name\x20pointing\x20at\x20an\x20older\x20object)',async()=>{const a='0x9999999999999999999999999999999999999999999999999999999999999999',b=fakeMarkStore({'g':a});await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',b),expect(await b['getAddress']('g'))['toBe'](GUARD_ADDR);}),it('reports\x20a\x20failed\x20write\x20instead\x20of\x20throwing\x20(chain\x20effect\x20already\x20succeeded)',async()=>{const a=fakeMarkStore();a['put']=async()=>{throw new Error('LocalMarkNameExist');};const b=await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(b['failed'])['toEqual']([{'name':'g','error':'LocalMarkNameExist'}]),expect(b['resolved'])['toEqual']([]);}),it('does\x20nothing\x20when\x20the\x20request\x20list\x20is\x20empty',async()=>{const a=fakeMarkStore(),b=await registerLocalMarksForCreatedObjects([],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a);expect(a['writes'])['toEqual']([]),expect(b)['toEqual']({'resolved':[],'written':[],'failed':[],'warnings':[]});}),it('propagates\x20replaceExistName\x20so\x20a\x20forced\x20claim\x20still\x20works',async()=>{const a=fakeMarkStore();await registerLocalMarksForCreatedObjects([{'name':'g','field':'namedNew','onChain':!![],'replaceExistName':!![]}],[{'type':ObjectType['Guard'],'object':GUARD_ADDR,'change':'created'}],'guard',a),expect(a['writes'][0x0]['name'])['toEqual']({'value':'g','replaceExistName':!![]});});});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type DualPayoutTrack } from "../../knowledge/recipient-constraint.js";
|
|
1
2
|
import { type ParsedMachineNode } from "../../graph/onchain/sdk-batch.js";
|
|
2
3
|
import type { ToolDispatchResult } from "../types.js";
|
|
3
4
|
export declare function assertRewardReplayStamp(entries: unknown, network?: string, warnings?: string[]): Promise<void>;
|
|
@@ -41,7 +42,17 @@ export declare function arbClaimEscrowEmptyDualPayout(inputs: {
|
|
|
41
42
|
escrowBalance?: number;
|
|
42
43
|
poolValue?: number;
|
|
43
44
|
acknowledged: boolean;
|
|
44
|
-
|
|
45
|
+
escrowPayoutTrack?: DualPayoutTrack;
|
|
46
|
+
compensationRecipient?: string;
|
|
47
|
+
}): "refuse" | "acknowledged" | "advisory" | null;
|
|
48
|
+
export declare function claimDualPayoutRecipientAwareFacts(inputs: {
|
|
49
|
+
orderAddr: string;
|
|
50
|
+
escrowRecipients: string[];
|
|
51
|
+
compensationRecipient: string;
|
|
52
|
+
}): {
|
|
53
|
+
warning: string;
|
|
54
|
+
redFlag: Record<string, unknown>;
|
|
55
|
+
};
|
|
45
56
|
export declare function dualPayoutReleaseGuidance(inputs: {
|
|
46
57
|
allocAddr?: string;
|
|
47
58
|
indemnityRaw?: number;
|
|
@@ -64,6 +75,10 @@ export declare function claimPoolInsufficient(inputs: {
|
|
|
64
75
|
export declare function disputeFeeReceipt(inputs: {
|
|
65
76
|
venueFee?: number;
|
|
66
77
|
}): string | undefined;
|
|
78
|
+
export declare function arbConfirmDeadlineVerdict(votingDeadline: unknown, now?: number): {
|
|
79
|
+
refuse?: string;
|
|
80
|
+
warning?: string;
|
|
81
|
+
};
|
|
67
82
|
export declare function gateOrderNewAmountLegCoverage(data: any, network: unknown): Promise<ToolDispatchResult | null>;
|
|
68
83
|
interface SaleItemOpPreparation {
|
|
69
84
|
op: string;
|
|
@@ -88,6 +103,20 @@ export declare function prepareSalesAddDuplicateGate(data: any, network: unknown
|
|
|
88
103
|
export declare function prepareSaleWipSetOp(data: any, network: unknown): Promise<ToolDispatchResult | null>;
|
|
89
104
|
export declare function gateBuyWipPinDoctrine(data: any, network: unknown, constraintWarnings: string[]): Promise<ToolDispatchResult | null>;
|
|
90
105
|
export declare function gateServicePublishPreflight(data: any): ToolDispatchResult | null;
|
|
106
|
+
export declare const PROGRESS_NO_OP_NOTE: string;
|
|
107
|
+
export declare const PAUSE_SCOPE_NOTE: string;
|
|
108
|
+
export declare function isPauseToggleOperation(operationType: string, data: unknown): boolean;
|
|
109
|
+
export declare function appendPauseScopeDisclosure(output: {
|
|
110
|
+
content?: Array<{
|
|
111
|
+
type: string;
|
|
112
|
+
text: string;
|
|
113
|
+
}>;
|
|
114
|
+
structuredContent?: {
|
|
115
|
+
outcome?: string;
|
|
116
|
+
};
|
|
117
|
+
}, operationType: string, data: unknown): void;
|
|
118
|
+
export declare const REFUND_CREDENTIAL_NOTE: string;
|
|
119
|
+
export declare function withRefundCredentialNotice(railNotice: string): string;
|
|
91
120
|
export declare function invalidateResolvedNameCache(): void;
|
|
92
121
|
export declare function isPassportVerifyFailure(msg: string, hasGuardContext: boolean): boolean;
|
|
93
122
|
export declare function synthesizeBuyGuardSubmissionForDiagnosis(validated: any): Promise<{
|