@wowok/agent-mcp 3.2.0 → 3.2.2
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/communication/wts-attestation.d.ts +34 -0
- package/dist/communication/wts-attestation.js +1 -0
- package/dist/config/exposure.d.ts +8 -8
- package/dist/config/judgment.d.ts +45 -20
- package/dist/config/rule-engine.d.ts +30 -20
- package/dist/config/rule-engine.js +1 -1
- package/dist/evaluation/builtins/graph-service.spec.js +1 -1
- package/dist/evaluation/engine.js +1 -1
- package/dist/experience/realtime-feedback.js +1 -1
- package/dist/extensions/industry-pack.js +1 -1
- package/dist/graph/onchain/expand.js +1 -1
- package/dist/graph/onchain/exposure.js +1 -1
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/graph/onchain/sdk-batch.d.ts +1 -0
- package/dist/graph/onchain/sdk-batch.js +1 -1
- package/dist/graph/onchain/sdk-dataplane.d.ts +1 -0
- package/dist/graph/onchain/sdk-dataplane.js +1 -1
- package/dist/knowledge/allocation-risk.d.ts +2 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/allocation-templates.d.ts +1 -1
- package/dist/knowledge/allocation-templates.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +1 -1
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/allocation.json +31 -1
- package/dist/knowledge/builtin-templates.d.ts +3 -1
- package/dist/knowledge/builtin-templates.js +1 -1
- package/dist/knowledge/discount-threshold.d.ts +15 -0
- package/dist/knowledge/discount-threshold.js +1 -0
- package/dist/knowledge/entity-recipient-guard.d.ts +21 -0
- package/dist/knowledge/entity-recipient-guard.js +1 -0
- package/dist/knowledge/getting-started.js +1 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-templates.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.d.ts +2 -2
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-generalizer.d.ts +38 -1
- package/dist/knowledge/industry-generalizer.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/industry-strategy.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/machine-topology.d.ts +34 -0
- package/dist/knowledge/machine-topology.js +1 -1
- package/dist/knowledge/onchain-constants.d.ts +2 -2
- package/dist/knowledge/onchain-constants.js +1 -1
- package/dist/knowledge/scenario-modes.d.ts +11 -0
- package/dist/knowledge/scenario-modes.js +1 -1
- package/dist/knowledge/strategy-manuals.d.ts +1 -1
- package/dist/knowledge/strategy-manuals.js +1 -1
- package/dist/knowledge/template-loader.d.ts +41 -0
- package/dist/knowledge/template-loader.js +1 -1
- package/dist/knowledge/template-registry.js +1 -1
- package/dist/knowledge/template-scanner.js +1 -1
- package/dist/knowledge/tool-constraints.js +1 -1
- package/dist/knowledge/tools-reference.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/participation/arbitrator-interest.js +1 -1
- package/dist/participation/customer-interest.js +1 -1
- package/dist/participation/merchant-interest.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/index.d.ts +1 -0
- package/dist/playbooks/service-build/intent-analyzer.d.ts +1 -0
- package/dist/playbooks/service-build/intent-analyzer.js +1 -1
- package/dist/playbooks/service-build/machine-nodes.d.ts +1 -1
- package/dist/playbooks/service-build/machine-nodes.js +1 -1
- package/dist/playbooks/service-build/machine-panorama.js +1 -1
- package/dist/playbooks/service-build/merchant-guide.js +1 -1
- package/dist/playbooks/service-build/mode-actions.d.ts +12 -1
- package/dist/playbooks/service-build/mode-actions.js +1 -1
- package/dist/playbooks/service-build/object-panorama.d.ts +27 -1
- 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/pipeline-actions.d.ts +4 -0
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/relationship-profile.js +1 -1
- package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.d.ts +1 -0
- package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.js +1 -0
- package/dist/playbooks/service-build/reverse-mapping.js +1 -1
- package/dist/playbooks/service-build/semantic-graph.d.ts +1 -0
- package/dist/playbooks/service-build/semantic-graph.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/role/profiles.js +1 -1
- package/dist/role/types.d.ts +2 -0
- package/dist/role/types.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +7 -7
- package/dist/schema/call/arbitration.d.ts +1 -1
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +5 -5
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +5 -9
- package/dist/schema/call/bridge.js +1 -1
- package/dist/schema/call/contact.d.ts +1 -1
- package/dist/schema/call/demand.d.ts +1 -1
- package/dist/schema/call/guard.d.ts +11 -11
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +3 -2
- package/dist/schema/call/machine.js +1 -1
- package/dist/schema/call/order.d.ts +1 -1
- package/dist/schema/call/payment.d.ts +1 -1
- package/dist/schema/call/permission.d.ts +1 -1
- package/dist/schema/call/personal.d.ts +1 -1
- package/dist/schema/call/progress.d.ts +1 -1
- package/dist/schema/call/proof.d.ts +2 -2
- package/dist/schema/call/repository.d.ts +1 -1
- package/dist/schema/call/reward.d.ts +1 -1
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +5 -5
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +1 -1
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/evaluation/index.d.ts +6 -2
- package/dist/schema/evaluation/index.js +1 -1
- package/dist/schema/goal/index.d.ts +8 -8
- package/dist/schema/goal/planning.d.ts +22 -15
- package/dist/schema/goal/planning.js +1 -1
- package/dist/schema/industry-pack/index.d.ts +39 -0
- package/dist/schema/industry-pack/index.js +1 -1
- package/dist/schema/industry-pack/modes.d.ts +15 -0
- package/dist/schema/industry-pack/modes.js +1 -1
- package/dist/schema/intent-radar/index.d.ts +3 -0
- package/dist/schema/intent-radar/index.js +1 -1
- package/dist/schema/local/index.d.ts +577 -18
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/messenger/index.d.ts +160 -20
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +32 -28
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +818 -708
- package/dist/schema/persona/index.js +1 -1
- package/dist/schema/query/bi.d.ts +22 -6
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +32 -32
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-query/index.d.ts +3 -3
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/utils/node-parser.js +1 -1
- package/dist/schema/watch/index.d.ts +2 -2
- package/dist/schema/workflow/index.d.ts +2 -2
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +6 -2
- package/dist/schemas/account_operation.schema.json +1 -1
- package/dist/schemas/bridge_operation.schema.json +2 -10
- package/dist/schemas/evaluation_operation.output.json +2 -0
- package/dist/schemas/evaluation_operation.schema.json +2 -0
- package/dist/schemas/index.json +7 -1
- package/dist/schemas/industry_pack_operation.output.json +196 -4
- package/dist/schemas/industry_pack_operation.schema.json +3 -1
- package/dist/schemas/intent_radar.output.json +2 -0
- package/dist/schemas/intent_radar.schema.json +1 -0
- package/dist/schemas/local_cache_operation.output.json +1536 -0
- package/dist/schemas/local_cache_operation.schema.json +101 -0
- package/dist/schemas/local_mark_operation.output.json +51 -36
- package/dist/schemas/local_mark_operation.schema.json +1 -0
- package/dist/schemas/messenger_operation.output.json +42 -4
- package/dist/schemas/messenger_operation.schema.json +358 -35
- package/dist/schemas/onchain_operations.schema.json +14 -14
- package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
- package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
- package/dist/schemas/onchain_operations_machine.schema.json +2 -2
- package/dist/schemas/onchain_operations_payment.schema.json +1 -1
- package/dist/schemas/onchain_operations_reward.schema.json +1 -1
- package/dist/schemas/onchain_operations_service.schema.json +5 -5
- package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
- package/dist/schemas/onchain_table_data.output.json +16 -1
- package/dist/schemas/persona_operation.output.json +266 -0
- package/dist/schemas/persona_operation.schema.json +42 -0
- package/dist/schemas/query_toolkit.output.json +12 -5
- package/dist/schemas/query_toolkit.schema.json +18 -3
- package/dist/tools/handlers/benchmark-migration.d.ts +17 -0
- package/dist/tools/handlers/benchmark-migration.js +1 -1
- package/dist/tools/handlers/bridge.js +1 -1
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/industry-pack.js +1 -1
- package/dist/tools/handlers/local.d.ts +1 -0
- package/dist/tools/handlers/local.js +1 -1
- package/dist/tools/handlers/messenger.d.ts +9 -2
- package/dist/tools/handlers/messenger.js +1 -1
- package/dist/tools/handlers/name-resolution.d.ts +4 -0
- package/dist/tools/handlers/name-resolution.js +1 -0
- package/dist/tools/handlers/name-resolution.spec.d.ts +1 -0
- package/dist/tools/handlers/name-resolution.spec.js +1 -0
- package/dist/tools/handlers/onchain-name-registration.d.ts +37 -0
- package/dist/tools/handlers/onchain-name-registration.js +1 -0
- package/dist/tools/handlers/onchain-name-registration.spec.d.ts +1 -0
- package/dist/tools/handlers/onchain-name-registration.spec.js +1 -0
- package/dist/tools/handlers/onchain.d.ts +1 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/query.d.ts +1 -0
- package/dist/tools/handlers/query.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/registry/business.js +1 -1
- package/dist/tools/registry/local.js +1 -1
- package/dist/tools/sanitize-description-roundtrip.spec.d.ts +1 -0
- package/dist/tools/sanitize-description-roundtrip.spec.js +1 -0
- package/dist/tools/sanitize-output.d.ts +1 -0
- package/dist/tools/sanitize-output.js +1 -1
- package/dist/tools/wrap.js +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleIndustryPackOperation}from'../handlers/industry-pack.js';import{handleBenchmarkMigrationOperation}from'../handlers/benchmark-migration.js';import{handleStrategyReviewOperation}from'../handlers/strategy-review.js';import{handleWorkspaceOperation}from'../handlers/workspace.js';import{handleWorkflowOperation}from'../handlers/workflow.js';import{handlePermissionOperation}from'../handlers/permission.js';import{createToolMeta,IndustryPackOperationInputSchema,IndustryPackOperationOutputSchema,BenchmarkMigrationSchema,BenchmarkMigrationOutputSchema,StrategyReviewOperationInputSchema,StrategyReviewOperationOutputSchema,WorkspaceOperationInputSchema,WorkspaceOperationOutputSchema,WorkflowOperationInputSchema,WorkflowOperationOutputSchema,PermissionOperationInputSchema,PermissionOperationOutputSchema}from'../../schema/index.js';export const BUSINESS_TOOLS=[{'name':'industry_pack_operation','handler':handleIndustryPackOperation,'config':{'title':'🧩\x20Industry\x20Pack\x20-\x20Knowledge\x20Template\x20Orchestration','summary':'Industry\x20knowledge\x20packs:\x20scaffold,\x20register,\x20list,\x20reset\x20templates.','description':'Manage\x20industry\x20knowledge\x20packs\x20(distributable,\x20registrable,\x20versionable\x20units\x20carrying\x20'+'one\x20industry\x27s\x20object-shape,\x20matching\x20rules,\x20and\x20role\x20personae).\x0a\x0a'+'Pack\x20layout\x20(merged\x20v2):\x20pack.json\x20(settings\x20only\x20—\x20manifest\x20+\x20match\x20+\x20personae\x20+\x20'+'dispute/compliance/supply/rules\x20sections;\x20field\x20explanations\x20live\x20in\x20the\x20industry-root\x20'+'README.md)\x20and\x20playbook.md\x20(chaptered\x20AI\x20prompt\x20guide).\x20Legacy\x20split-file\x20layouts\x20'+'(manifest.json/match.json/personae)\x20are\x20still\x20read\x20for\x20backward\x20compatibility.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20scaffold\x20—\x20generate\x20a\x20pack\x20template\x20skeleton\x20(pack.json\x20+\x20playbook.md,\x20settings\x20only)\x20'+'into\x20the\x20industry\x20directory;\x20the\x20user\x20fills\x20in\x20the\x20content.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20currently\x20registered\x20packs.\x0a'+'\x20\x20•\x20scan\x20—\x20scan\x20+\x20register\x20every\x20pack\x20under\x20the\x20default\x20industry\x20directory.\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20industry\x20root\x20directory.\x0a'+'\x20\x20•\x20list_files\x20—\x20list\x20files\x20under\x20the\x20industry\x20directory.\x0a'+'\x20\x20•\x20read_file\x20—\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20write_file\x20—\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required).\x0a'+'\x20\x20•\x20get\x20—\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook).\x0a'+'\x20\x20•\x20diff\x20—\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required).\x0a'+'\x20\x20•\x20reset\x20—\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x0a'+'\x20\x20•\x20delete_file\x20—\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20/\x20rename\x20—\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20recommend_industry\x20—\x20business\x20intent\x20text\x20→\x20top-3\x20similar\x20industry\x20modes\x20(trait\x20similarity;\x20optional\x20strategy\x20statements\x20re-rank\x20by\x20lever\x20alignment).\x0a'+'\x20\x20•\x20list_modes\x20—\x20list\x20builtin\x20+\x20caller\x27s\x20custom\x20industry\x20modes.\x0a'+'\x20\x20•\x20derive_user_mode\x20—\x20derive\x20(and\x20register)\x20a\x20custom\x20mode\x20from\x20a\x20builtin\x20mode.\x0a'+'\x20\x20•\x20evolve_user_mode\x20—\x20iterate\x20an\x20existing\x20custom\x20mode\x20(version-bumped\x20evolution\x20history).\x0a'+'\x20\x20•\x20register_user_mode\x20—\x20register\x20a\x20fully\x20custom\x20mode\x20(machine_shape\x20+\x20key_risk\x20required).\x0a'+'\x20\x20•\x20unregister_user_mode\x20—\x20delete\x20a\x20custom\x20mode\x20(owner\x20only).\x0a'+'\x20\x20•\x20register_custom_metric\x20—\x20register\x20a\x20global\x20custom\x20evaluation\x20metric\x20(risk/benefit;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_metric\x20—\x20delete\x20a\x20custom\x20metric\x20(custom\x20only;\x20builtin\x20metrics\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20register_custom_constraint\x20—\x20register\x20a\x20custom\x20mode\x20constraint\x20(4\x20rule\x20types;\x20hard/soft;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_constraint\x20—\x20delete\x20a\x20custom\x20constraint\x20(custom\x20only;\x20builtin\x20constraints\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20list_metrics_constraints\x20—\x20list\x20metrics\x20+\x20constraints\x20(filterable\x20by\x20type/scope).\x0a\x0a'+'Local\x20filesystem\x20+\x20in-memory\x20registry\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27industry_pack_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':IndustryPackOperationInputSchema,'outputSchema':IndustryPackOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('industry_pack',['industry','pack','mode','match','persona','scaffold','template'])}},{'name':'benchmark_migration_operation','handler':handleBenchmarkMigrationOperation,'config':{'title':'🏆\x20Template\x20Migration\x20-\x20Industry\x20Templates\x20&\x20Competitor\x20Migration','summary':'MD\x20industry-archetype\x20templates\x20(hot-loaded,\x2012\x20built-ins)\x20+\x20pre-deploy\x20risk\x20scan\x20+\x20one-click\x20competitor\x20migration.','description':'Industry-archetype\x20MD\x20templates\x20and\x20one-click\x20competitor\x20migration\x20(V2\x20MD-template\x20architecture).\x20'+'Templates\x20live\x20in\x20`.wowok/industry/<industry>/templates/<variant>.md`\x20(the\x20client\x27s\x20industry\x20drawer\x20tree\x20—\x20hot-loaded,\x20zod-validated\x20frontmatter;\x20'+'12\x20built-in\x20archetypes\x20—\x206\x20industries\x20x\x20leader\x20+\x20challenger\x20—\x20are\x20seeded\x20idempotently\x20and\x20never\x20'+'overwritten).\x20Each\x20template\x20is\x20a\x20ScenarioMode-compatible\x20build\x20shape\x20(machine_shape\x20/\x20guards\x20/\x20'+'allocator)\x20plus\x20fee\x20parameters\x20and\x20R1-R10\x20trust\x20mechanisms.\x0a\x0a'+'Product\x20tagging:\x20every\x20built-in\x20carries\x20a\x20`product_ref`\x20benchmark\x20slug\x20(e.g.\x20retail/scale-marketplace\x20→\x20'+'\x27amazon\x27,\x20travel/global-ota\x20→\x20\x27booking-com\x27).\x20This\x20is\x20the\x20ONLY\x20sanctioned\x20company\x20name\x20—\x20it\x20lets\x20a\x20user\x20'+'pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product\x20they\x20want\x20to\x20migrate\x20from.\x20When\x20the\x20user\x20names\x20a\x20product,\x20'+'call\x20template_list\x20and\x20match\x20on\x20product_ref,\x20then\x20template_generate/migration_apply\x20with\x20that\x20template_id.\x0a\x0a'+'Three\x20build\x20modes\x20(choose\x20from\x20the\x20user\x27s\x20intent):\x0a'+'\x20\x20•\x20template-driven\x20—\x20pick\x20the\x20closest\x20product_ref/industry\x20template,\x20adopt\x20it\x20as-is\x20(template_generate).\x0a'+'\x20\x20•\x20template\x20+\x20partial\x20customization\x20—\x20start\x20from\x20a\x20template,\x20then\x20override\x20fee_params\x20(fee_overrides)\x20or\x20'+'edit\x20the\x20MD\x20file\x20via\x20industry_pack_operation\x20write_file\x20before\x20generating.\x0a'+'\x20\x20•\x20fully\x20custom\x20—\x20skip\x20templates;\x20drive\x20the\x20merchant-guide\x20pipeline\x20from\x20a\x20free-text\x20description.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20template_list\x20—\x20list\x20the\x20loaded\x20MD\x20templates\x20(optional\x20industry\x20filter;\x20rows\x20carry\x20product_ref);\x20load\x20errors\x20are\x20'+'reported,\x20never\x20silently\x20dropped.\x0a'+'\x20\x20•\x20template_get\x20—\x20fetch\x20one\x20template\x20by\x20template_id\x20(full\x20machine_shape/guards/allocator/'+'fee_params/trust_mechanisms/body).\x0a'+'\x20\x20•\x20template_generate\x20—\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20description\x20optional\x20as\x20the\x20intent\x20'+'text;\x20fee_overrides\x20optional;\x20never\x20executes\x20on-chain).\x0a'+'\x20\x20•\x20template_scan\x20—\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required):\x20synthetic\x20draft\x20'+'topology\x20through\x20the\x20same\x20rule\x20surface\x20as\x20on-chain\x20analyze\x20+\x20static\x20R1-R10\x20checks;\x20returns\x20'+'risk_level/findings/red_flags;\x20CRITICAL\x20blocks\x20generation/apply.\x0a'+'\x20\x20•\x20migration_import\x20—\x20competitor\x20URL/description\x20→\x20structured\x20MigrationLog:\x20mapped\x20/\x20'+'unmapped\x20/\x20manual_review\x20entries,\x20WoWok\x20advantages,\x20customizable\x20modules,\x20role\x20assessment\x20'+'and\x20a\x20dry-run\x20risk\x20check\x20(description\x20required;\x20url\x20recorded\x20as\x20provenance\x20only;\x20default\x20'+'network\x20testnet).\x0a'+'\x20\x20•\x20migration_review\x20—\x20surface\x20a\x20prior\x20MigrationLog\x20with\x20counts\x20+\x20risk\x20status\x20for\x20user\x20'+'confirmation\x20(log\x20required).\x0a'+'\x20\x20•\x20migration_apply\x20—\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20creation\x20plan\x20only\x20—\x20never\x20executes\x20'+'on-chain;\x20default\x20network\x20testnet,\x20mainnet\x20requires\x20explicit\x20user\x20confirmation).\x0a\x0a'+'Deterministic\x20knowledge\x20lookups\x20+\x20planning;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27benchmark_migration_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':BenchmarkMigrationSchema,'outputSchema':BenchmarkMigrationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('benchmark_migration',['template','migration','competitor','industry','leader','challenger','scan','risk'])}},{'name':'strategy_review_operation','handler':handleStrategyReviewOperation,'config':{'title':'📈\x20Strategy\x20Review\x20-\x20Posture-Weighted\x20Scorecard\x20&\x20Periodic\x20Review','summary':'Collect\x20on-chain/derived\x20evidence\x20for\x20an\x20(account,\x20industry),\x20snapshot\x20it\x20locally,\x20and\x20assemble\x20posture-weighted\x20strategy\x20reviews\x20with\x20current-layer\x20persona\x20proposals.','description':'Evidence-driven\x20operating\x20review\x20for\x20one\x20merchant\x20account\x20in\x20one\x20industry,\x20built\x20on\x20the\x20six-industry\x20'+'strategy\x20catalog\x20(education/rental/freelance/subscription/travel/retail\x20+\x20pack-registered\x20ids).\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20collect\x20—\x20gather\x20fresh\x20evidence\x20(journey\x20funnel,\x20order\x20flow,\x20market\x20metrics,\x20service\x20discovery\x20/\x20'+'competitor\x20count,\x20arbitration\x20trust,\x20account\x20attention),\x20persist\x20ONE\x20append-only\x20snapshot\x20in\x20local\x20'+'SQLite\x20KV,\x20and\x20return\x20the\x20raw\x20collection.\x20Failed\x20evidence\x20sources\x20degrade\x20single\x20metrics\x20to\x20'+'unavailable/error\x20—\x20never\x20zero-filled;\x20storage\x20failure\x20is\x20fail-soft\x20and\x20never\x20loses\x20the\x20collection.\x0a'+'\x20\x20•\x20review\x20—\x20gather\x20fresh\x20evidence\x20WITHOUT\x20persisting,\x20diff\x20against\x20the\x20latest\x20stored\x20snapshot,\x20'+'score\x200–100\x20under\x20the\x20persona\x27s\x20merchant\x20posture\x20(volume/balanced/margin,\x20renormalized\x20over\x20'+'available\x20anchored\x20metrics),\x20and\x20return\x20findings,\x20deterministic\x20pricing/posture\x20recommendations,\x20'+'cadence\x20status\x20and\x20at\x20most\x20two\x20persona\x20proposals.\x20Proposals\x20target\x20the\x20CURRENT\x20layer\x20ONLY\x20and\x20are\x20'+'applied\x20only\x20when\x20the\x20user\x20explicitly\x20calls\x20persona_operation\x20apply\x20—\x20this\x20tool\x20never\x20writes\x20the\x20'+'persona\x20and\x20never\x20mutates\x20chain\x20state.\x0a'+'\x20\x20•\x20list_snapshots\x20—\x20list\x20stored\x20snapshot\x20summaries\x20(oldest-first)\x20for\x20account+industry.\x0a\x0a'+'Posture\x20defaults:\x20explicit\x20`posture`\x20arg\x20→\x20merchant\x20posture\x20in\x20the\x20effective\x20persona\x20→\x20\x27balanced\x27.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27strategy_review_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':StrategyReviewOperationInputSchema,'outputSchema':StrategyReviewOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('strategy',['strategy','scorecard','review','posture','metrics','industry','competitor','retention','dispute'])},'timeoutMs':0x1d4c0},{'name':'workspace_operation','handler':handleWorkspaceOperation,'config':{'title':'📁\x20Workspace\x20-\x20File\x20Generation\x20&\x20User\x20Data','summary':'Local\x20workspace\x20files:\x20list,\x20read,\x20search,\x20glob,\x20edit,\x20write,\x20move,\x20copy,\x20delete.','description':'Manage\x20the\x20local\x20workspace\x20directory\x20(`.wowok/workspace`):\x20files\x20generated\x20for\x20review\x20'+'(machine/guard/wts/wip\x20JSON)\x20and\x20user-created\x20documents.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20workspace\x20root\x20directory.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20files\x20under\x20the\x20workspace.\x0a'+'\x20\x20•\x20read\x20—\x20read\x20a\x20file\x27s\x20content\x20(use\x20as\x20AI\x20context);\x20optional\x20offset/limit\x20line\x20slicing\x20'+'(1-based\x20offset,\x20max\x202000\x20lines)\x20and\x20encoding=\x27base64\x27\x20for\x20raw\x20bytes\x20(≤10MB).\x0a'+'\x20\x20•\x20search\x20—\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required;\x20optional\x20path\x20scope,\x20'+'glob\x20basename\x20filter,\x20ignore_case,\x20max_results\x20≤200,\x20context_lines\x20≤5).\x20Skips\x20binary/large\x20files.\x0a'+'\x20\x20•\x20glob\x20—\x20list\x20files\x20whose\x20workspace-relative\x20path\x20matches\x20a\x20wildcard\x20pattern\x20(\x27**\x27\x20spans\x20'+'directories,\x20\x27*\x27\x20stays\x20within\x20one\x20segment,\x20\x27?\x27\x20=\x20one\x20char,\x20\x27{a,b}\x27\x20alternation).\x0a'+'\x20\x20•\x20edit\x20—\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required;\x20'+'errors\x20when\x20old_string\x20is\x20not\x20unique\x20unless\x20replace_all=true;\x20files\x20≤2MB).\x0a'+'\x20\x20•\x20write\x20—\x20write/overwrite\x20a\x20file\x20(path\x20+\x20content).\x0a'+'\x20\x20•\x20delete\x20—\x20delete\x20a\x20file.\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20—\x20move\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20rename\x20—\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a\x0a'+'Local\x20filesystem\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workspace_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkspaceOperationInputSchema,'outputSchema':WorkspaceOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('workspace',['workspace','file','document','machine','guard','wts','wip','context'])}},{'name':'workflow_operation','handler':handleWorkflowOperation,'config':{'title':'🔀\x20Workflow\x20-\x20Local-Account\x20Progress\x20Tasks','summary':'List\x20local-account\x20progress\x20(actionable\x20+\x20related/history)\x20+\x20advance/hold/unhold\x20forwards\x20+\x20view\x20progress\x20history.','description':'Local-account\x20workflow\x20view\x20over\x20on-chain\x20Progress\x20objects.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20progress\x20related\x20to\x20local\x20accounts:\x20actionable\x20first\x20(a\x20'+'local\x20account\x20can\x20advance\x20a\x20forward),\x20plus\x20related\x20/\x20completed\x20progress\x20(order\x20'+'holder,\x20named\x20operator,\x20or\x20session\x20operator\x20involvement)\x20so\x20the\x20user\x20always\x20'+'keeps\x20visibility\x20of\x20their\x20own\x20progress\x20history.\x20Each\x20task\x20carries\x20every\x20'+'reachable\x20next\x20node\x20+\x20forward,\x20the\x20local\x20accounts\x20that\x20can\x20execute\x20each\x20'+'forward\x20(order\x20holder\x20/\x20named\x20operator\x20/\x20permission\x20index,\x20including\x20admin),\x20'+'guard\x20reminders\x20(a\x20forward\x20with\x20a\x20guard\x20must\x20be\x20verified\x20via\x20passport),\x20and\x20'+'the\x20on-chain\x20history_count.\x0a'+'\x20\x20•\x20operate\x20—\x20advance\x20(\x27next\x27)\x20/\x20block\x20(\x27hold\x27)\x20/\x20release\x20(\x27unhold\x27)\x20/\x20force-release\x20'+'(\x27adminUnhold\x27)\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account\x20(env.account).\x20Delegates\x20to\x20the\x20'+'on-chain\x20progress\x20operation\x20(guard-aware).\x0a'+'\x20\x20•\x20history\x20—\x20incrementally\x20sync\x20a\x20progress\x27s\x20ON-CHAIN\x20history\x20(Progress.history\x20'+'append-only\x20u64\x20index)\x20into\x20the\x20local\x20SQLite\x20mirror\x20via\x20a\x20per-progress\x20cursor\x20'+'(only\x20NEW\x20records\x20are\x20pulled),\x20then\x20return\x20the\x20migration\x20timeline\x20(newest\x20first)\x20'+'with\x20each\x20migration\x27s\x20session\x20snapshot\x20(forwards\x20/\x20operator\x20address\x20/\x20weight\x20/\x20time).\x20'+'Also\x20runs\x20a\x2090-day\x20retention\x20cleanup\x20of\x20stale\x20progress\x20histories\x20by\x20default.\x0a\x0a'+'Permission\x20model\x20(chain-authoritative):\x20a\x20forward\x20is\x20executable\x20by\x20an\x20account\x20when\x20'+'(a)\x20namedOperator=\x22\x22\x20and\x20the\x20account\x20is\x20the\x20order\x20holder\x20(order\x20builder\x20or\x20agent),\x20'+'or\x20(b)\x20namedOperator=name\x20and\x20the\x20account\x20is\x20in\x20progress.namedOperator[name],\x20or\x20'+'(c)\x20permissionIndex\x20is\x20set\x20and\x20the\x20account\x20is\x20in\x20permission.admin\x20or\x20permission.table.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workflow_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkflowOperationInputSchema,'outputSchema':WorkflowOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('workflow',['workflow','progress','forward','permission','named-operator','guard','advance','hold'])},'timeoutMs':0x1d4c0},{'name':'permission_operation','handler':handlePermissionOperation,'config':{'title':'🛡️\x20Permissions\x20-\x20Local-Account\x20Overview','summary':'List\x20Permissions\x20related\x20to\x20local\x20accounts\x20with\x20related\x20accounts/objects.','description':'Local-account\x20Permission\x20overview.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20every\x20on-chain\x20Permission\x20object\x20related\x20to\x20at\x20least\x20one\x20LOCAL\x20'+'account\x20(reverse-looked-up\x20via\x20the\x20global\x20entity_permission\x20index\x20@0xaad),\x20deduplicated\x20'+'and\x20merged.\x20Each\x20row\x20includes\x20description,\x20owner,\x20latest\x20on-chain\x20update\x20time,\x20related\x20'+'accounts\x20(owner/admin/entity),\x20and\x20related\x20objects\x20(grouped\x20by\x20type\x20via\x20the\x20registrar\x20'+'linker).\x20Pass\x20`permission`\x20to\x20scope\x20the\x20listing\x20to\x20ONE\x20Permission\x20address\x20—\x20fast\x20path\x20'+'(metadata\x20+\x20local-account\x20roles\x20only;\x20skips\x20the\x20per-permission\x20linker/tx-time\x20fan-out)\x20'+'for\x20detail-page\x20Permission\x20rows.\x0a\x0a'+'Read-only\x20(no\x20on-chain\x20mutation).\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27permission_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':PermissionOperationInputSchema,'outputSchema':PermissionOperationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('query',['permission','account','role','owner','admin','entity','overview','registrar','reverse-index'])}}];
|
|
1
|
+
import{handleIndustryPackOperation}from'../handlers/industry-pack.js';import{handleBenchmarkMigrationOperation}from'../handlers/benchmark-migration.js';import{handleStrategyReviewOperation}from'../handlers/strategy-review.js';import{handleWorkspaceOperation}from'../handlers/workspace.js';import{handleWorkflowOperation}from'../handlers/workflow.js';import{handlePermissionOperation}from'../handlers/permission.js';import{createToolMeta,IndustryPackOperationInputSchema,IndustryPackOperationOutputSchema,BenchmarkMigrationSchema,BenchmarkMigrationOutputSchema,StrategyReviewOperationInputSchema,StrategyReviewOperationOutputSchema,WorkspaceOperationInputSchema,WorkspaceOperationOutputSchema,WorkflowOperationInputSchema,WorkflowOperationOutputSchema,PermissionOperationInputSchema,PermissionOperationOutputSchema}from'../../schema/index.js';export const BUSINESS_TOOLS=[{'name':'industry_pack_operation','handler':handleIndustryPackOperation,'config':{'title':'🧩\x20Industry\x20Pack\x20-\x20Knowledge\x20Template\x20Orchestration','summary':'Industry\x20knowledge\x20packs:\x20scaffold,\x20register,\x20list,\x20reset\x20templates.','description':'Manage\x20industry\x20knowledge\x20packs\x20(distributable,\x20registrable,\x20versionable\x20units\x20carrying\x20'+'one\x20industry\x27s\x20object-shape,\x20matching\x20rules,\x20and\x20role\x20personae).\x0a\x0a'+'Pack\x20layout\x20(merged\x20v2):\x20pack.json\x20(settings\x20only\x20—\x20manifest\x20+\x20match\x20+\x20personae\x20+\x20'+'dispute/compliance/supply/rules\x20sections;\x20field\x20explanations\x20live\x20in\x20the\x20industry-root\x20'+'README.md)\x20and\x20playbook.md\x20(chaptered\x20AI\x20prompt\x20guide).\x20Legacy\x20split-file\x20layouts\x20'+'(manifest.json/match.json/personae)\x20are\x20still\x20read\x20for\x20backward\x20compatibility.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20scaffold\x20—\x20generate\x20a\x20pack\x20template\x20skeleton\x20(pack.json\x20+\x20playbook.md,\x20settings\x20only)\x20'+'into\x20the\x20industry\x20directory;\x20the\x20user\x20fills\x20in\x20the\x20content.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20currently\x20registered\x20packs.\x0a'+'\x20\x20•\x20scan\x20—\x20scan\x20+\x20register\x20every\x20pack\x20under\x20the\x20default\x20industry\x20directory.\x0a'+'\x20\x20?\x20template_drift\x20-\x20REPORT\x20builtin\x20template\x20files\x20whose\x20on-disk\x20body\x20differs\x20from\x20the\x20'+'in-code\x20catalog\x20(no_sentinel_legacy\x20/\x20stale_release\x20/\x20user_modified).\x20Run\x20this\x20FIRST\x20when\x20a\x20'+'template\x20change\x20appears\x20to\x20have\x20no\x20effect:\x20a\x20builtin\x20file\x20seeded\x20before\x20the\x20release\x20'+'sentinel\x20existed\x20carries\x20no\x20sentinel\x20and\x20is\x20never\x20upgraded\x20automatically.'+'\x20\x20?\x20repair_builtin_templates\x20-\x20RESEED\x20those\x20legacy\x20files\x20from\x20the\x20in-code\x20catalog.\x20'+'Identity-gated\x20on\x20a\x20known\x20builtin\x20id;\x20the\x20previous\x20body\x20is\x20kept\x20as\x20<file>.bak\x20and\x20a\x20'+'custom\x20(user)\x20template\x20is\x20never\x20touched.'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20industry\x20root\x20directory.\x0a'+'\x20\x20•\x20list_files\x20—\x20list\x20files\x20under\x20the\x20industry\x20directory.\x0a'+'\x20\x20•\x20read_file\x20—\x20read\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20write_file\x20—\x20write\x20content\x20to\x20a\x20file\x20under\x20the\x20industry\x20directory\x20(path\x20+\x20content\x20required).\x0a'+'\x20\x20•\x20get\x20—\x20return\x20registered\x20layer\x20data\x20for\x20an\x20industry\x20(name\x20required;\x20dispute/compliance/supply/rules/playbook).\x0a'+'\x20\x20•\x20diff\x20—\x20compare\x20registered\x20vs\x20on-disk\x20manifest\x20version/layers\x20(name\x20required).\x0a'+'\x20\x20•\x20reset\x20—\x20restore\x20a\x20file\x20or\x20entire\x20pack\x20folder\x20to\x20its\x20pristine\x20annotated\x20template\x20(path\x20required).\x0a'+'\x20\x20•\x20delete_file\x20—\x20delete\x20a\x20file\x20or\x20directory\x20(path\x20required).\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20/\x20rename\x20—\x20move\x20or\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20recommend_industry\x20—\x20business\x20intent\x20text\x20→\x20top-3\x20similar\x20industry\x20modes\x20(trait\x20similarity;\x20optional\x20strategy\x20statements\x20re-rank\x20by\x20lever\x20alignment).\x0a'+'\x20\x20•\x20list_modes\x20—\x20list\x20builtin\x20+\x20caller\x27s\x20custom\x20industry\x20modes.\x0a'+'\x20\x20•\x20derive_user_mode\x20—\x20derive\x20(and\x20register)\x20a\x20custom\x20mode\x20from\x20a\x20builtin\x20mode.\x0a'+'\x20\x20•\x20evolve_user_mode\x20—\x20iterate\x20an\x20existing\x20custom\x20mode\x20(version-bumped\x20evolution\x20history).\x0a'+'\x20\x20•\x20register_user_mode\x20—\x20register\x20a\x20fully\x20custom\x20mode\x20(machine_shape\x20+\x20key_risk\x20required).\x0a'+'\x20\x20•\x20unregister_user_mode\x20—\x20delete\x20a\x20custom\x20mode\x20(owner\x20only).\x0a'+'\x20\x20•\x20register_custom_metric\x20—\x20register\x20a\x20global\x20custom\x20evaluation\x20metric\x20(risk/benefit;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_metric\x20—\x20delete\x20a\x20custom\x20metric\x20(custom\x20only;\x20builtin\x20metrics\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20register_custom_constraint\x20—\x20register\x20a\x20custom\x20mode\x20constraint\x20(4\x20rule\x20types;\x20hard/soft;\x20persisted).\x0a'+'\x20\x20•\x20unregister_custom_constraint\x20—\x20delete\x20a\x20custom\x20constraint\x20(custom\x20only;\x20builtin\x20constraints\x20cannot\x20be\x20deleted).\x0a'+'\x20\x20•\x20list_metrics_constraints\x20—\x20list\x20metrics\x20+\x20constraints\x20(filterable\x20by\x20type/scope).\x0a\x0a'+'Local\x20filesystem\x20+\x20in-memory\x20registry\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27industry_pack_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':IndustryPackOperationInputSchema,'outputSchema':IndustryPackOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('industry_pack',['industry','pack','mode','match','persona','scaffold','template'])}},{'name':'benchmark_migration_operation','handler':handleBenchmarkMigrationOperation,'config':{'title':'🏆\x20Template\x20Migration\x20-\x20Industry\x20Templates\x20&\x20Competitor\x20Migration','summary':'MD\x20industry-archetype\x20templates\x20(hot-loaded,\x2012\x20built-ins)\x20+\x20pre-deploy\x20risk\x20scan\x20+\x20one-click\x20competitor\x20migration.','description':'Industry-archetype\x20MD\x20templates\x20and\x20one-click\x20competitor\x20migration\x20(V2\x20MD-template\x20architecture).\x20'+'Templates\x20live\x20in\x20`.wowok/industry/<industry>/templates/<variant>.md`\x20(the\x20client\x27s\x20industry\x20drawer\x20tree\x20—\x20hot-loaded,\x20zod-validated\x20frontmatter;\x20'+'12\x20built-in\x20archetypes\x20—\x206\x20industries\x20x\x20leader\x20+\x20challenger\x20—\x20are\x20seeded\x20idempotently\x20and\x20never\x20'+'overwritten).\x20Each\x20template\x20is\x20a\x20ScenarioMode-compatible\x20build\x20shape\x20(machine_shape\x20/\x20guards\x20/\x20'+'allocator)\x20plus\x20fee\x20parameters\x20and\x20R1-R10\x20trust\x20mechanisms.\x0a\x0a'+'Product\x20tagging:\x20every\x20built-in\x20carries\x20a\x20`product_ref`\x20benchmark\x20slug\x20(e.g.\x20retail/scale-marketplace\x20→\x20'+'\x27amazon\x27,\x20travel/global-ota\x20→\x20\x27booking-com\x27).\x20This\x20is\x20the\x20ONLY\x20sanctioned\x20company\x20name\x20—\x20it\x20lets\x20a\x20user\x20'+'pick\x20a\x20template\x20by\x20naming\x20the\x20incumbent\x20product\x20they\x20want\x20to\x20migrate\x20from.\x20When\x20the\x20user\x20names\x20a\x20product,\x20'+'call\x20template_list\x20and\x20match\x20on\x20product_ref,\x20then\x20template_generate/migration_apply\x20with\x20that\x20template_id.\x0a\x0a'+'Three\x20build\x20modes\x20(choose\x20from\x20the\x20user\x27s\x20intent):\x0a'+'\x20\x20•\x20template-driven\x20—\x20pick\x20the\x20closest\x20product_ref/industry\x20template,\x20adopt\x20it\x20as-is\x20(template_generate).\x0a'+'\x20\x20•\x20template\x20+\x20partial\x20customization\x20—\x20start\x20from\x20a\x20template,\x20then\x20override\x20fee_params\x20(fee_overrides)\x20or\x20'+'edit\x20the\x20MD\x20file\x20via\x20industry_pack_operation\x20write_file\x20before\x20generating.\x0a'+'\x20\x20•\x20fully\x20custom\x20—\x20skip\x20templates;\x20drive\x20the\x20merchant-guide\x20pipeline\x20from\x20a\x20free-text\x20description.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20template_list\x20—\x20list\x20the\x20loaded\x20MD\x20templates\x20(optional\x20industry\x20filter;\x20rows\x20carry\x20product_ref);\x20load\x20errors\x20are\x20'+'reported,\x20never\x20silently\x20dropped.\x0a'+'\x20\x20•\x20template_get\x20—\x20fetch\x20one\x20template\x20by\x20template_id\x20(full\x20machine_shape/guards/allocator/'+'fee_params/trust_mechanisms/body).\x0a'+'\x20\x20•\x20template_generate\x20—\x20generate\x20a\x20creation\x20plan\x20from\x20a\x20template\x20via\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20description\x20optional\x20as\x20the\x20intent\x20'+'text;\x20fee_overrides\x20optional;\x20never\x20executes\x20on-chain).\x0a'+'\x20\x20•\x20template_scan\x20—\x20pre-deploy\x20risk\x20scan\x20of\x20one\x20template\x20(template_id\x20required):\x20synthetic\x20draft\x20'+'topology\x20through\x20the\x20same\x20rule\x20surface\x20as\x20on-chain\x20analyze\x20+\x20static\x20R1-R10\x20checks;\x20returns\x20'+'risk_level/findings/red_flags;\x20CRITICAL\x20blocks\x20generation/apply.\x0a'+'\x20\x20•\x20migration_import\x20—\x20competitor\x20URL/description\x20→\x20structured\x20MigrationLog:\x20mapped\x20/\x20'+'unmapped\x20/\x20manual_review\x20entries,\x20WoWok\x20advantages,\x20customizable\x20modules,\x20role\x20assessment\x20'+'and\x20a\x20dry-run\x20risk\x20check\x20(description\x20required;\x20url\x20recorded\x20as\x20provenance\x20only;\x20default\x20'+'network\x20testnet).\x0a'+'\x20\x20•\x20migration_review\x20—\x20surface\x20a\x20prior\x20MigrationLog\x20with\x20counts\x20+\x20risk\x20status\x20for\x20user\x20'+'confirmation\x20(log\x20required).\x0a'+'\x20\x20•\x20migration_apply\x20—\x20run\x20the\x20approved\x20template\x20through\x20the\x20merchant-guide\x20pipeline\x20'+'(template_id\x20required;\x20scan-first\x20—\x20CRITICAL\x20findings\x20block;\x20creation\x20plan\x20only\x20—\x20never\x20executes\x20'+'on-chain;\x20default\x20network\x20testnet,\x20mainnet\x20requires\x20explicit\x20user\x20confirmation).\x0a\x0a'+'Deterministic\x20knowledge\x20lookups\x20+\x20planning;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27benchmark_migration_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':BenchmarkMigrationSchema,'outputSchema':BenchmarkMigrationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('benchmark_migration',['template','migration','competitor','industry','leader','challenger','scan','risk'])}},{'name':'strategy_review_operation','handler':handleStrategyReviewOperation,'config':{'title':'📈\x20Strategy\x20Review\x20-\x20Posture-Weighted\x20Scorecard\x20&\x20Periodic\x20Review','summary':'Collect\x20on-chain/derived\x20evidence\x20for\x20an\x20(account,\x20industry),\x20snapshot\x20it\x20locally,\x20and\x20assemble\x20posture-weighted\x20strategy\x20reviews\x20with\x20current-layer\x20persona\x20proposals.','description':'Evidence-driven\x20operating\x20review\x20for\x20one\x20merchant\x20account\x20in\x20one\x20industry,\x20built\x20on\x20the\x20six-industry\x20'+'strategy\x20catalog\x20(education/rental/freelance/subscription/travel/retail\x20+\x20pack-registered\x20ids).\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20collect\x20—\x20gather\x20fresh\x20evidence\x20(journey\x20funnel,\x20order\x20flow,\x20market\x20metrics,\x20service\x20discovery\x20/\x20'+'competitor\x20count,\x20arbitration\x20trust,\x20account\x20attention),\x20persist\x20ONE\x20append-only\x20snapshot\x20in\x20local\x20'+'SQLite\x20KV,\x20and\x20return\x20the\x20raw\x20collection.\x20Failed\x20evidence\x20sources\x20degrade\x20single\x20metrics\x20to\x20'+'unavailable/error\x20—\x20never\x20zero-filled;\x20storage\x20failure\x20is\x20fail-soft\x20and\x20never\x20loses\x20the\x20collection.\x0a'+'\x20\x20•\x20review\x20—\x20gather\x20fresh\x20evidence\x20WITHOUT\x20persisting,\x20diff\x20against\x20the\x20latest\x20stored\x20snapshot,\x20'+'score\x200–100\x20under\x20the\x20persona\x27s\x20merchant\x20posture\x20(volume/balanced/margin,\x20renormalized\x20over\x20'+'available\x20anchored\x20metrics),\x20and\x20return\x20findings,\x20deterministic\x20pricing/posture\x20recommendations,\x20'+'cadence\x20status\x20and\x20at\x20most\x20two\x20persona\x20proposals.\x20Proposals\x20target\x20the\x20CURRENT\x20layer\x20ONLY\x20and\x20are\x20'+'applied\x20only\x20when\x20the\x20user\x20explicitly\x20calls\x20persona_operation\x20apply\x20—\x20this\x20tool\x20never\x20writes\x20the\x20'+'persona\x20and\x20never\x20mutates\x20chain\x20state.\x0a'+'\x20\x20•\x20list_snapshots\x20—\x20list\x20stored\x20snapshot\x20summaries\x20(oldest-first)\x20for\x20account+industry.\x0a\x0a'+'Posture\x20defaults:\x20explicit\x20`posture`\x20arg\x20→\x20merchant\x20posture\x20in\x20the\x20effective\x20persona\x20→\x20\x27balanced\x27.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27strategy_review_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':StrategyReviewOperationInputSchema,'outputSchema':StrategyReviewOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('strategy',['strategy','scorecard','review','posture','metrics','industry','competitor','retention','dispute'])},'timeoutMs':0x1d4c0},{'name':'workspace_operation','handler':handleWorkspaceOperation,'config':{'title':'📁\x20Workspace\x20-\x20File\x20Generation\x20&\x20User\x20Data','summary':'Local\x20workspace\x20files:\x20list,\x20read,\x20search,\x20glob,\x20edit,\x20write,\x20move,\x20copy,\x20delete.','description':'Manage\x20the\x20local\x20workspace\x20directory\x20(`.wowok/workspace`):\x20files\x20generated\x20for\x20review\x20'+'(machine/guard/wts/wip\x20JSON)\x20and\x20user-created\x20documents.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20resolve\x20—\x20return\x20the\x20workspace\x20root\x20directory.\x0a'+'\x20\x20•\x20list\x20—\x20list\x20files\x20under\x20the\x20workspace.\x0a'+'\x20\x20•\x20read\x20—\x20read\x20a\x20file\x27s\x20content\x20(use\x20as\x20AI\x20context);\x20optional\x20offset/limit\x20line\x20slicing\x20'+'(1-based\x20offset,\x20max\x202000\x20lines)\x20and\x20encoding=\x27base64\x27\x20for\x20raw\x20bytes\x20(≤10MB).\x0a'+'\x20\x20•\x20search\x20—\x20regex\x20content\x20search\x20across\x20workspace\x20files\x20(pattern\x20required;\x20optional\x20path\x20scope,\x20'+'glob\x20basename\x20filter,\x20ignore_case,\x20max_results\x20≤200,\x20context_lines\x20≤5).\x20Skips\x20binary/large\x20files.\x0a'+'\x20\x20•\x20glob\x20—\x20list\x20files\x20whose\x20workspace-relative\x20path\x20matches\x20a\x20wildcard\x20pattern\x20(\x27**\x27\x20spans\x20'+'directories,\x20\x27*\x27\x20stays\x20within\x20one\x20segment,\x20\x27?\x27\x20=\x20one\x20char,\x20\x27{a,b}\x27\x20alternation).\x0a'+'\x20\x20•\x20edit\x20—\x20exact\x20string\x20replacement\x20inside\x20a\x20file\x20(path\x20+\x20old_string\x20+\x20new_string\x20required;\x20'+'errors\x20when\x20old_string\x20is\x20not\x20unique\x20unless\x20replace_all=true;\x20files\x20≤2MB).\x0a'+'\x20\x20•\x20write\x20—\x20write/overwrite\x20a\x20file\x20(path\x20+\x20content).\x0a'+'\x20\x20•\x20delete\x20—\x20delete\x20a\x20file.\x0a'+'\x20\x20•\x20create_file\x20—\x20create\x20an\x20empty\x20file\x20(path\x20required;\x20content\x20optional).\x0a'+'\x20\x20•\x20create_dir\x20—\x20create\x20a\x20directory\x20recursively\x20(path\x20required).\x0a'+'\x20\x20•\x20copy\x20—\x20copy\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20move\x20—\x20move\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a'+'\x20\x20•\x20rename\x20—\x20rename\x20a\x20file\x20or\x20directory\x20(from\x20+\x20to\x20required).\x0a\x0a'+'Local\x20filesystem\x20only;\x20never\x20mutates\x20chain\x20state.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workspace_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkspaceOperationInputSchema,'outputSchema':WorkspaceOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('workspace',['workspace','file','document','machine','guard','wts','wip','context'])}},{'name':'workflow_operation','handler':handleWorkflowOperation,'config':{'title':'🔀\x20Workflow\x20-\x20Local-Account\x20Progress\x20Tasks','summary':'List\x20local-account\x20progress\x20(actionable\x20+\x20related/history)\x20+\x20advance/hold/unhold\x20forwards\x20+\x20view\x20progress\x20history.','description':'Local-account\x20workflow\x20view\x20over\x20on-chain\x20Progress\x20objects.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20progress\x20related\x20to\x20local\x20accounts:\x20actionable\x20first\x20(a\x20'+'local\x20account\x20can\x20advance\x20a\x20forward),\x20plus\x20related\x20/\x20completed\x20progress\x20(order\x20'+'holder,\x20named\x20operator,\x20or\x20session\x20operator\x20involvement)\x20so\x20the\x20user\x20always\x20'+'keeps\x20visibility\x20of\x20their\x20own\x20progress\x20history.\x20Each\x20task\x20carries\x20every\x20'+'reachable\x20next\x20node\x20+\x20forward,\x20the\x20local\x20accounts\x20that\x20can\x20execute\x20each\x20'+'forward\x20(order\x20holder\x20/\x20named\x20operator\x20/\x20permission\x20index,\x20including\x20admin),\x20'+'guard\x20reminders\x20(a\x20forward\x20with\x20a\x20guard\x20must\x20be\x20verified\x20via\x20passport),\x20and\x20'+'the\x20on-chain\x20history_count.\x0a'+'\x20\x20•\x20operate\x20—\x20advance\x20(\x27next\x27)\x20/\x20block\x20(\x27hold\x27)\x20/\x20release\x20(\x27unhold\x27)\x20/\x20force-release\x20'+'(\x27adminUnhold\x27)\x20a\x20forward\x20as\x20a\x20chosen\x20local\x20account\x20(env.account).\x20Delegates\x20to\x20the\x20'+'on-chain\x20progress\x20operation\x20(guard-aware).\x0a'+'\x20\x20•\x20history\x20—\x20incrementally\x20sync\x20a\x20progress\x27s\x20ON-CHAIN\x20history\x20(Progress.history\x20'+'append-only\x20u64\x20index)\x20into\x20the\x20local\x20SQLite\x20mirror\x20via\x20a\x20per-progress\x20cursor\x20'+'(only\x20NEW\x20records\x20are\x20pulled),\x20then\x20return\x20the\x20migration\x20timeline\x20(newest\x20first)\x20'+'with\x20each\x20migration\x27s\x20session\x20snapshot\x20(forwards\x20/\x20operator\x20address\x20/\x20weight\x20/\x20time).\x20'+'Also\x20runs\x20a\x2090-day\x20retention\x20cleanup\x20of\x20stale\x20progress\x20histories\x20by\x20default.\x0a\x0a'+'Permission\x20model\x20(chain-authoritative):\x20a\x20forward\x20is\x20executable\x20by\x20an\x20account\x20when\x20'+'(a)\x20namedOperator=\x22\x22\x20and\x20the\x20account\x20is\x20the\x20order\x20holder\x20(order\x20builder\x20or\x20agent),\x20'+'or\x20(b)\x20namedOperator=name\x20and\x20the\x20account\x20is\x20in\x20progress.namedOperator[name],\x20or\x20'+'(c)\x20permissionIndex\x20is\x20set\x20and\x20the\x20account\x20is\x20in\x20permission.admin\x20or\x20permission.table.\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27workflow_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':WorkflowOperationInputSchema,'outputSchema':WorkflowOperationOutputSchema,'annotations':{'readOnlyHint':![],'destructiveHint':!![],'idempotentHint':![],'openWorldHint':!![]},'_meta':createToolMeta('workflow',['workflow','progress','forward','permission','named-operator','guard','advance','hold'])},'timeoutMs':0x1d4c0},{'name':'permission_operation','handler':handlePermissionOperation,'config':{'title':'🛡️\x20Permissions\x20-\x20Local-Account\x20Overview','summary':'List\x20Permissions\x20related\x20to\x20local\x20accounts\x20with\x20related\x20accounts/objects.','description':'Local-account\x20Permission\x20overview.\x0a\x0a'+'Actions:\x0a'+'\x20\x20•\x20list\x20—\x20enumerate\x20every\x20on-chain\x20Permission\x20object\x20related\x20to\x20at\x20least\x20one\x20LOCAL\x20'+'account\x20(reverse-looked-up\x20via\x20the\x20global\x20entity_permission\x20index\x20@0xaad),\x20deduplicated\x20'+'and\x20merged.\x20Each\x20row\x20includes\x20description,\x20owner,\x20latest\x20on-chain\x20update\x20time,\x20related\x20'+'accounts\x20(owner/admin/entity),\x20and\x20related\x20objects\x20(grouped\x20by\x20type\x20via\x20the\x20registrar\x20'+'linker).\x20Pass\x20`permission`\x20to\x20scope\x20the\x20listing\x20to\x20ONE\x20Permission\x20address\x20—\x20fast\x20path\x20'+'(metadata\x20+\x20local-account\x20roles\x20only;\x20skips\x20the\x20per-permission\x20linker/tx-time\x20fan-out)\x20'+'for\x20detail-page\x20Permission\x20rows.\x0a\x0a'+'Read-only\x20(no\x20on-chain\x20mutation).\x0a\x0a'+'💡\x20Schema\x20hint:\x20Use\x20schema_query\x20with\x20action=\x27get\x27\x20and\x20name=\x27permission_operation\x27\x20to\x20retrieve\x20the\x20exact\x20parameter\x20schema.','inputSchema':PermissionOperationInputSchema,'outputSchema':PermissionOperationOutputSchema,'annotations':{'readOnlyHint':!![],'destructiveHint':![],'idempotentHint':!![],'openWorldHint':![]},'_meta':createToolMeta('query',['permission','account','role','owner','admin','entity','overview','registrar','reverse-index'])}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleAccountOperation,handleMarkOperation,handleInfoOperation,handleHistoryOperation}from'../handlers/local.js';import{statusErrorShape}from'../wrap.js';import{createToolMeta,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,AccountOperationOutputWrappedSchema,LocalMarkOperationOutputWrappedSchema,LocalInfoOperationOutputWrappedSchema,LocalHistoryOperationOutputWrappedSchema}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:\x20Use\x20schema_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:\x20Use\x20schema_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:\x20Use\x20schema_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:\x20Use\x20schema_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}];
|
|
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:\x20Use\x20schema_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:\x20Use\x20schema_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:\x20Use\x20schema_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:\x20Use\x20schema_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:\x20Use\x20schema_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}];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{describe,expect,it}from'vitest';import{isVerbatimTextField,redactInternalSources,sanitizeToolDispatchResult}from'./sanitize-output.js';const REPRO_DESCRIPTION='...\x20Countermeasure\x20to\x20empty-name\x20namedOperator\x20escalation:\x20'+'service::order_progress\x20is\x20permissionless\x20and\x20self-registers\x20its\x20caller\x20'+'under\x20init-node\x20name\x20\x27\x27.';describe('C-7:\x20user-authored\x20description\x20survives\x20the\x20output\x20hygiene\x20pass',()=>{it('does\x20not\x20delete\x20a\x20qualified\x20Move\x20fn\x20token\x20from\x20a\x20description',()=>{expect(redactInternalSources(REPRO_DESCRIPTION))['not']['toContain']('service::order_progress');const a=sanitizeToolDispatchResult({'content':[],'structuredContent':{'result':[{'type':'Guard','description':REPRO_DESCRIPTION}]}}),b=a['structuredContent']['result'][0x0]['description'];expect(b)['toBe'](REPRO_DESCRIPTION);}),it('round-trips\x20other\x20::\x20tokens,\x20CamelCase\x20type\x20tags\x20and\x20file-like\x20words',()=>{const a='Refunds\x20go\x20through\x20the\x20escrow\x20at\x200x2::wow::WOW<0x2::wow::WOW>;\x20'+'the\x20seller\x20object\x20is\x20a\x20Service\x20and\x20the\x20buyer\x20object\x20is\x20an\x20Order.\x20'+'See\x20also\x20mod::alpha_beta\x20and\x20mod::gamma_delta,\x20and\x20my-notes.ts\x20stays.',b=sanitizeToolDispatchResult({'content':[],'structuredContent':{'result':{'description':a}}});expect(b['structuredContent']['result']['description'])['toBe'](a);}),it('survives\x20a\x20description\x20nested\x20at\x20any\x20depth\x20(created\x20record,\x20list,\x20wrapper)',()=>{const a=[{'description':REPRO_DESCRIPTION},{'created':[{'description':REPRO_DESCRIPTION}]},{'result':{'objects':[{'content':{'description':REPRO_DESCRIPTION}}]}},{'list':[{'nested':{'deep':{'description':REPRO_DESCRIPTION}}}]}];for(const b of a){const c=sanitizeToolDispatchResult({'content':[],'structuredContent':b});expect(JSON['stringify'](c['structuredContent']))['toContain']('service::order_progress');}}),it('survives\x20a\x20JSON\x20text\x20block\x20that\x20embeds\x20the\x20description',()=>{const a=sanitizeToolDispatchResult({'content':[{'type':'text','text':JSON['stringify']({'result':{'description':REPRO_DESCRIPTION}})}],'structuredContent':{'result':{'description':REPRO_DESCRIPTION}}}),b=a['content']?.[0x0]?.['text']??'';expect(b)['toContain']('service::order_progress'),expect(JSON['parse'](b)['result']['description'])['toBe'](REPRO_DESCRIPTION);}),it('survives\x20a\x20text\x20block\x20whose\x20description\x20contains\x20quotes\x20and\x20newlines',()=>{const a='He\x20said\x20\x22service::order_progress\x22\x20then\x0aleft.\x09Tab\x20too.',b=sanitizeToolDispatchResult({'content':[{'type':'text','text':JSON['stringify']({'description':a})}],'structuredContent':{'description':a}});expect(JSON['parse'](b['content']?.[0x0]?.['text']??'{}')['description'])['toBe'](a);}),it('STILL\x20redacts\x20machine-authored\x20narrative\x20in\x20the\x20same\x20payload',()=>{const a=sanitizeToolDispatchResult({'content':[{'type':'text','text':'payout\x20cap\x20(arb.move:302-358)'}],'structuredContent':{'description':REPRO_DESCRIPTION,'evidence':'service.move\x20L175-194','narrative':'the\x20guard\x20advances\x20via\x20progress::next\x20each\x20cycle'}}),b=a['structuredContent'];expect(b['description'])['toBe'](REPRO_DESCRIPTION),expect(b['evidence'])['not']['toContain']('.move'),expect(b['narrative'])['not']['toContain']('progress::next'),expect(a['content']?.[0x0]?.['text'])['toBe']('payout\x20cap');}),it('isVerbatimTextField\x20marks\x20exactly\x20the\x20free-text\x20fields,\x20not\x20narrative',()=>{expect(isVerbatimTextField('description'))['toBe'](!![]),expect(isVerbatimTextField('evidence'))['toBe'](![]),expect(isVerbatimTextField('message'))['toBe'](![]),expect(isVerbatimTextField('summary'))['toBe'](![]);}),it('passes\x20a\x20result\x20without\x20content\x20/\x20structuredContent\x20through\x20untouched',()=>{const a={'content':[],'structuredContent':undefined};expect(sanitizeToolDispatchResult(a))['toEqual'](a);});});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { ToolDispatchResult } from "./types.js";
|
|
2
|
+
export declare function isVerbatimTextField(key: string): boolean;
|
|
2
3
|
export declare function redactInternalSources(input: string): string;
|
|
3
4
|
export declare function sanitizeToolDispatchResult(result: ToolDispatchResult): ToolDispatchResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{MOVE_FUNCTIONS,MOVE_MODULE_NAMES}from'./move-fn-index.gen.js';const PROTOCOL_MOVE_MODULES=['object_linker','entity_order','entity_permission','entity_contact','arbitration','allocation','repository','permission','progress','registrar','passport','treasury','contact','service','machine','payment','reward','demand','guard','order','proof','resource','bridge','common','arb'],INTERNAL_TS_FILES=['onchain-constants','guard-ins','error-codes'],LINE_ANCHOR=String['raw']`(?:\s*[#:]\s*|\s+)L?\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*`,FILE_TOKEN_SOURCE=String['raw']`(?<![A-Za-z0-9_-])(?:${PROTOCOL_MOVE_MODULES['join']('|')})\.move(?:${LINE_ANCHOR})?`+String['raw']`|(?<![A-Za-z0-9_-])[A-Za-z_][A-Za-z0-9_-]*\.(?:move|ts|rs)(?:${LINE_ANCHOR})`+String['raw']`|(?<![A-Za-z0-9_-])(?:${INTERNAL_TS_FILES['join']('|')})\.ts\b`;function fileTokenRegex(){return new RegExp(FILE_TOKEN_SOURCE,'g');}const ORPHAN_LINE_ANCHOR=/\bL\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*/g,DANGLING_LINE_ANCHOR=/[#,\s]L\d{2,4}(?:\s*[\-,–/]\s*L?\d{2,4})+/g;function hasFileToken(a){return fileTokenRegex()['test'](a);}function escapeRegExp(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}let moveFnRefRegex=null;function moveFnRefTokenRegex(){if(!moveFnRefRegex){const a=[...MOVE_MODULE_NAMES]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp),b=[...new Set(Object['values'](MOVE_FUNCTIONS)['flat']())]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp);moveFnRefRegex=new RegExp('\x5cb(?:'+a['join']('|')+')::(?:'+b['join']('|')+')\x5cb','g');}return moveFnRefRegex;}export function redactInternalSources(a){if(!hasFileToken(a)&&!a['includes']('::'))return a;let b=a;for(let c=0x0;c<0x3;c++){const d=b;b=b['replace'](/\(([^()]*)\)/g,(e,f)=>{if(!hasFileToken(f)&&!f['includes']('::'))return e;let g=f['replace'](fileTokenRegex(),'')['replace'](moveFnRefTokenRegex(),'')['replace'](ORPHAN_LINE_ANCHOR,'');return g=g['replace'](/\s+/g,'\x20')['trim']()['replace'](/^[\s,;:/·.\-–—]+|[\s,;:/·.\-–—]+$/g,'')['trim'](),g?'('+g+')':'';});if(b===d)break;}b=b['replace'](fileTokenRegex(),''),b=b['replace'](moveFnRefTokenRegex(),'');if(!hasFileToken(a)&&b===a)return a;return b=b['replace'](DANGLING_LINE_ANCHOR,''),b=b['replace'](/\s+[,;:]\s+/g,'\x20'),b=b['replace'](/\(\s+/g,'(')['replace'](/\s+\)/g,')')['replace'](/\(\s*[\s,;:/·.\-–—]*\)/g,'')['replace'](/([(\[])\s+/g,'$1')['replace'](/\s{2,}/g,'\x20')['replace'](/\s+([,.;:])/g,'$1'),b=b['replace'](/[\s,;:+\u00b7\-–—]+(\.\s*)$/,'$1')['replace'](/[\s,;:+\u00b7\-–—]+\s*$/,''),b!==a&&(b=b['replace'](/^ /,'')['replace'](/ $/,'')),b;}function sanitizeDeep(a,b){if(typeof a==='string')return redactInternalSources(a);if(Array['isArray'](a))return a['map'](c=>sanitizeDeep(c,b));if(a&&typeof a==='object'){if(b['has'](a))return a;b['add'](a);const c={};for(const [d,e]of Object['entries'](a)){c[d]=sanitizeDeep(e,b);}return c;}return a;}
|
|
1
|
+
import{MOVE_FUNCTIONS,MOVE_MODULE_NAMES}from'./move-fn-index.gen.js';const PROTOCOL_MOVE_MODULES=['object_linker','entity_order','entity_permission','entity_contact','arbitration','allocation','repository','permission','progress','registrar','passport','treasury','contact','service','machine','payment','reward','demand','guard','order','proof','resource','bridge','common','arb'],INTERNAL_TS_FILES=['onchain-constants','guard-ins','error-codes'],LINE_ANCHOR=String['raw']`(?:\s*[#:]\s*|\s+)L?\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*`,FILE_TOKEN_SOURCE=String['raw']`(?<![A-Za-z0-9_-])(?:${PROTOCOL_MOVE_MODULES['join']('|')})\.move(?:${LINE_ANCHOR})?`+String['raw']`|(?<![A-Za-z0-9_-])[A-Za-z_][A-Za-z0-9_-]*\.(?:move|ts|rs)(?:${LINE_ANCHOR})`+String['raw']`|(?<![A-Za-z0-9_-])(?:${INTERNAL_TS_FILES['join']('|')})\.ts\b`;function fileTokenRegex(){return new RegExp(FILE_TOKEN_SOURCE,'g');}const ORPHAN_LINE_ANCHOR=/\bL\d{1,4}(?:\s*[\-,–/]\s*L?\d{1,4})*/g,DANGLING_LINE_ANCHOR=/[#,\s]L\d{2,4}(?:\s*[\-,–/]\s*L?\d{2,4})+/g;function hasFileToken(a){return fileTokenRegex()['test'](a);}function escapeRegExp(a){return a['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&');}let moveFnRefRegex=null;function moveFnRefTokenRegex(){if(!moveFnRefRegex){const a=[...MOVE_MODULE_NAMES]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp),b=[...new Set(Object['values'](MOVE_FUNCTIONS)['flat']())]['sort']((c,d)=>d['length']-c['length'])['map'](escapeRegExp);moveFnRefRegex=new RegExp('\x5cb(?:'+a['join']('|')+')::(?:'+b['join']('|')+')\x5cb','g');}return moveFnRefRegex;}const VERBATIM_TEXT_FIELDS=new Set(['description']);export function isVerbatimTextField(a){return VERBATIM_TEXT_FIELDS['has'](a);}export function redactInternalSources(a){if(!hasFileToken(a)&&!a['includes']('::'))return a;let b=a;for(let c=0x0;c<0x3;c++){const d=b;b=b['replace'](/\(([^()]*)\)/g,(e,f)=>{if(!hasFileToken(f)&&!f['includes']('::'))return e;let g=f['replace'](fileTokenRegex(),'')['replace'](moveFnRefTokenRegex(),'')['replace'](ORPHAN_LINE_ANCHOR,'');return g=g['replace'](/\s+/g,'\x20')['trim']()['replace'](/^[\s,;:/·.\-–—]+|[\s,;:/·.\-–—]+$/g,'')['trim'](),g?'('+g+')':'';});if(b===d)break;}b=b['replace'](fileTokenRegex(),''),b=b['replace'](moveFnRefTokenRegex(),'');if(!hasFileToken(a)&&b===a)return a;return b=b['replace'](DANGLING_LINE_ANCHOR,''),b=b['replace'](/\s+[,;:]\s+/g,'\x20'),b=b['replace'](/\(\s+/g,'(')['replace'](/\s+\)/g,')')['replace'](/\(\s*[\s,;:/·.\-–—]*\)/g,'')['replace'](/([(\[])\s+/g,'$1')['replace'](/\s{2,}/g,'\x20')['replace'](/\s+([,.;:])/g,'$1'),b=b['replace'](/[\s,;:+\u00b7\-–—]+(\.\s*)$/,'$1')['replace'](/[\s,;:+\u00b7\-–—]+\s*$/,''),b!==a&&(b=b['replace'](/^ /,'')['replace'](/ $/,'')),b;}function sanitizeDeep(a,b){if(typeof a==='string')return redactInternalSources(a);if(Array['isArray'](a))return a['map'](c=>sanitizeDeep(c,b));if(a&&typeof a==='object'){if(b['has'](a))return a;b['add'](a);const c={};for(const [d,e]of Object['entries'](a)){c[d]=isVerbatimTextField(d)?e:sanitizeDeep(e,b);}return c;}return a;}function collectVerbatimStrings(a,b,c){if(Array['isArray'](a)){for(const e of a)collectVerbatimStrings(e,b,c);return;}if(!a||typeof a!=='object')return;if(c['has'](a))return;c['add'](a);const d=a;for(const [f,g]of Object['entries'](d)){if(isVerbatimTextField(f)){if(typeof g==='string'&&g['length']>0x0)b['push'](g);continue;}collectVerbatimStrings(g,b,c);}}const MASK_PREFIX='\x00wv',MASK_SUFFIX='\x00';function redactTextBlockPreservingVerbatim(a,b){if(b['length']===0x0)return redactInternalSources(a);const c=[];for(const g of b){c['push'](g);const h=JSON['stringify'](g)['slice'](0x1,-0x1);if(h!==g)c['push'](h);}c['sort']((j,k)=>k['length']-j['length']);const d=[];let e=a;for(let j=0x0;j<c['length'];j++){if(c[j]['length']===0x0||!e['includes'](c[j]))continue;const k=''+MASK_PREFIX+j+MASK_SUFFIX;e=e['split'](c[j])['join'](k),d['push']({'marker':k,'original':c[j]});}if(d['length']===0x0)return redactInternalSources(a);let f=redactInternalSources(e);for(const {marker:l,original:m}of d){f=f['split'](l)['join'](m);}return f;}export function sanitizeToolDispatchResult(a){try{const b=a['structuredContent']?sanitizeDeep(a['structuredContent'],new WeakSet()):a['structuredContent'],c=[];a['structuredContent']&&collectVerbatimStrings(a['structuredContent'],c,new WeakSet());const d=a['content']?.['map'](e=>e['type']==='text'?{...e,'text':redactTextBlockPreservingVerbatim(e['text'],c)}:e);return{...a,'content':d,'structuredContent':b};}catch{return a;}}
|
package/dist/tools/wrap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{buildClassifiedErrorResult}from'./shared.js';import{shouldRunLightHooks,shouldRunHeavyHooks,recordOperationFailure,recordCriticalRisk,recordCriticalOperation,recordSubstepFailure}from'../harness/auto-escalation.js';import{getHarnessTier,setHarnessTier,isEnabled}from'../config/runtime.js';import{getHarness}from'../harness/index.js';import{recover}from'../harness/recover.js';import{recordOperationOutcome}from'../experience/index.js';import{recordIndustrySignal}from'../knowledge/flywheel-loop.js';import{getStageCache}from'../playbooks/service-build/index.js';import{SERVICE_BUILD_STAGES}from'../playbooks/service-build/process.js';import{extractAmount,getAmountThreshold,getFundCoverageMin,formatAmount}from'../knowledge/safety-rules.js';import{auditMachineNodes}from'../knowledge/audit-rules.js';import{fetchMachineNodes}from'../graph/onchain/sdk-batch.js';function stageIndexOf(a){const b=SERVICE_BUILD_STAGES['indexOf'](a);return b>=0x0?b:0x0;}export function withTimeout(a,b=0x7530,c='operation'){let d;return Promise['race']([a['finally'](()=>{if(d)clearTimeout(d);}),new Promise((e,f)=>{d=setTimeout(()=>{let g='';if(c['includes']('messenger'))g='\x20This\x20is\x20a\x20messenger\x20network\x20operation.\x20Possible\x20causes:\x20'+'(1)\x20messenger\x20server\x20(https://messenger.wowok.net)\x20unreachable,\x20'+'(2)\x20no\x20messenger-enabled\x20account\x20configured\x20(use\x20account_operation\x20to\x20set\x20messenger\x20name),\x20'+'(3)\x20network\x20connectivity\x20issue.\x20'+'Ensure\x20you\x20have\x20a\x20messenger-enabled\x20account\x20and\x20the\x20server\x20is\x20reachable.';else(c['includes']('onchain')||c['includes']('account_operation')||c['includes']('bridge')||c['includes']('workflow')||c['includes']('keeper')||c['includes']('wowok'))&&(g='\x20This\x20tool\x20may\x20submit\x20an\x20ON-CHAIN\x20transaction.\x20The\x20transaction\x20was\x20NOT\x20cancelled\x20'+'by\x20this\x20timeout\x20—\x20it\x20may\x20already\x20be\x20submitted\x20and\x20still\x20finalize\x20on-chain.\x20'+'DO\x20NOT\x20blindly\x20retry\x20(risk\x20of\x20duplicate\x20operations).\x20First\x20verify:\x20'+'(1)\x20if\x20the\x20error\x20above\x20carries\x20a\x20tx\x20digest,\x20check\x20it\x20via\x20query_toolkit\x20'+'(query_type=\x27onchain_transaction\x27);\x20(2)\x20otherwise\x20verify\x20via\x20query_toolkit\x20'+'onchain_events\x20(or\x20the\x20account\x27s\x20recent\x20transactions).\x20Do\x20NOT\x20rely\x20on\x20an\x20'+'onchain_objects\x20read\x20alone:\x20it\x20may\x20serve\x20a\x20pre-transaction\x20cached\x20snapshot,\x20'+'so\x20an\x20unchanged\x20object\x20must\x20never\x20on\x20its\x20own\x20justify\x20a\x20retry.');f(new Error('Operation\x20\x27'+c+'\x27\x20timed\x20out\x20after\x20'+b+'ms.'+g));},b);})]);}export function wrapHandlerWithErrorShape(a,b,c,d){return async(e,f)=>{try{return await withTimeout(a(e,f),b,c);}catch(g){if(d){const h=g instanceof Error?g['message']:String(g),i=classifyError(h),j={'operation_type':c,'data':e},k=d(h,i,j);return{'content':[{'type':'text','text':'Error:\x20'+h}],'structuredContent':k};}throw g;}};}export const statusErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'status':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const operationErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'operation':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const strictStatusErrorShape=(a,b,c)=>({'result':{'status':'error','error':a}});function checkProjectStage(a,b,c){const d={'analyze_intent':'puzzle','aggregate_risks':'risk','trace_substeps':'substeps'},e=d[a];if(!e)return null;const f=getStageCache(b,c);if(!f){if(a==='analyze_intent')return null;return'project_stage:\x20calling\x20\x27'+a+'\x27\x20before\x20\x27analyze_intent\x27\x20—\x20recommend\x20calling\x20analyze_intent\x20first\x20for\x20project\x20\x27'+b+':'+c+'\x27';}if(stageIndexOf(f['stage'])<stageIndexOf(e)-0x1)return'project_stage:\x20calling\x20\x27'+a+'\x27\x20(stage\x20\x27'+e+'\x27)\x20but\x20project\x20is\x20at\x20stage\x20\x27'+f['stage']+'\x27\x20—\x20recommend\x20completing\x20prior\x20stages\x20first\x20for\x20\x27'+b+':'+c+'\x27';return null;}export function dispatchWithHarness(a,b){return async(d,f)=>{const g=[],h=getHarness(),i=shouldRunLightHooks(),j=shouldRunHeavyHooks(),k=isPublishOperation(b,d),l=isSignOperation(b,d),m=getHarnessTier();if(b==='goal_operation'&&i)try{const o=d,p=o?.['action'],q=o?.['project'],r=o?.['version'];if(p&&q&&r){const s=checkProjectStage(p,q,r);s&&g['push'](s);}}catch{}k&&m==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&m!=='off')try{const t=await runPrePublishChecks(b,d);g['push'](...t['warnings']);if(t['critical']['length']>0x0){for(const u of t['critical']){const v=recordCriticalRisk(u);if(v)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+v['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(t['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),t['critical'],t['warnings'],'immutable_violation','Fix\x20the\x20CRITICAL\x20risks\x20listed\x20in\x20the\x20message\x20(e.g.\x20rename\x20dispute/refund\x20nodes\x20per\x20R-M1-11,\x20add\x20the\x20entry\x20pair\x20prev_node=\x22\x22),\x20then\x20retry\x20publish.\x20Nodes/pairs/forwards\x20are\x20immutable\x20after\x20publish\x20—\x20verify\x20via\x20machineNode2file\x20first.');}}catch(x){g['push']('pre_publish\x20hook\x20failed:\x20'+(x instanceof Error?x['message']:String(x)));}if(l&&j)try{const y=extractData(d),z=y?extractAmount(y,{'excludeConfigAmounts':!![]}):null;if(z!==null){const A=getAmountThreshold();let B=null;try{B=BigInt(z);}catch{B=null;}if(B!==null&&B>A)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(B)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(A)+'\x20WOW.',['amount\x20'+z+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+A['toString']()+'\x20(smallest\x20unit)'],[],'invalid_parameter','Raise\x20WOWOK_AMOUNT_THRESHOLD\x20to\x20match\x20the\x20intended\x20amount,\x20split\x20the\x20transaction,\x20or\x20reset\x20the\x20harness\x20tier\x20to\x20lightweight\x20(config_operation)\x20after\x20explicit\x20user\x20confirmation.');}}catch(C){g['push']('pre_sign\x20hook\x20failed:\x20'+(C instanceof Error?C['message']:String(C)));}let n;try{n=await a(d,f);}catch(D){const E=D instanceof Error?D['message']:String(D),F=recordOperationFailure(b,E);F&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+F['reason']);if(b==='onchain_operations')try{const G=classifyError(E,D);if(!G['retryable']&&G['error_code']!=='unknown'){const H=recordCriticalOperation(b,G['error_code']);if(H)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+H['reason']);}}catch{}throw D;}if(b==='onchain_operations')try{if(classifyOutcome(n)==='failed'){const I=extractErrorCode(n)??'',J=classifyError(I);if(!J['retryable']&&J['error_code']!=='unknown'){const K=recordCriticalOperation(b,J['error_code']);if(K)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(n)){const L=extractIntent(b,d)??b;try{const M=classifyOutcome(n);if(M==='failed'){const N=extractErrorCode(n)??'',O=classifyError(N),P=h['recover'](O['error_code'],L,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+P['strategy']+('\x20(attempt\x20'+P['current_attempt']+'/'+P['max_attempts']+')')+(P['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(P['user_prompt']?'\x20—\x20'+P['user_prompt']:'\x20—\x20'+P['detail']));}else M==='success'&&h['resetRecovery'](L);}catch(Q){g['push']('recover\x20hook\x20failed:\x20'+(Q instanceof Error?Q['message']:String(Q)));}}if(b==='goal_operation')try{const R=d?.['action'];if(R==='trace_substeps'){const S=extractCriticalFindingCount(n);if(S>0x0){const T=recordSubstepFailure(String(R)+':\x20'+S+'\x20critical\x20finding(s)');if(T)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+T['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const U=extractOperationType(b,d)??b,V=extractIntent(b,d)??b,W=extractData(d)??d,X=classifyOutcome(n),Y=extractErrorCode(n),Z=isEnabled('experience_layer');if(Z)recordOperationOutcome(U,W,V,X,Y);else{const a0=extractIndustry(d);a0&&isEnabled('industry_evolution')&&recordIndustrySignal(a0,{'type':U},{'success':X==='success','error_code':Y});}}catch(a1){g['push']('signal\x20collection\x20failed:\x20'+(a1 instanceof Error?a1['message']:String(a1)));}if(g['length']>0x0){if(n?.['structuredContent']){const a2=n['structuredContent'],a3=a2['semantic'];if(a3){const a4=Array['isArray'](a3['warnings'])?a3['warnings']:[];a3['warnings']=[...a4,...g];}else for(const a5 of g){console['warn']('[harness]\x20'+a5);}}else for(const a6 of g){console['warn']('[harness]\x20'+a6);}}return n;};}function isPublishOperation(a,b){if(a!=='onchain_operations')return![];const c=extractOperationType(a,b);if(c!=='service'&&c!=='machine')return![];const d=extractData(b);return d?.['publish']===!![]||d?.['bPublished']===!![];}function isSignOperation(a,b){if(a==='wip_file'){const c=b?.['operation_type'];return c==='sign';}return a==='onchain_operations';}function extractOperationType(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if(a==='onchain_operations')return typeof c['operation_type']==='string'?c['operation_type']:undefined;if(a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')return typeof c['action']==='string'?c['action']:undefined;return typeof c['operation_type']==='string'?c['operation_type']:undefined;}function extractIntent(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if((a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')&&typeof c['action']==='string')return a+':'+c['action'];const d=c['operation_type'];if(typeof d==='string')return a+':'+d;return a;}function extractData(a){if(!a||typeof a!=='object')return undefined;const b=a,c=b['data'];return c&&typeof c==='object'?c:undefined;}const WRITE_CLASS_TOOLS=new Set(['onchain_operations','goal_operation','industry_pack_operation','strategy_review_operation','wip_file','messenger_operation','bridge_operation']),SEMANTIC_RECORDED_TOOLS=new Set(['onchain_operations','bridge_operation']);function isWriteClassTool(a){return WRITE_CLASS_TOOLS['has'](a);}function classifyOutcome(a){if(!a?.['structuredContent'])return'failed';const b=a['structuredContent'];if(b['outcome']==='failed')return'failed';if(b['outcome']==='executed')return'success';if(b['outcome']==='pending_input')return'partial';const c=typeof b['status']==='string'?b['status']:typeof b['result_type']==='string'?b['result_type']:'';if(c==='error'||c==='failed')return'failed';if(c==='partial')return'partial';return'success';}function isOutcomeDiscriminated(a){const b=a?.['structuredContent'];return!!b&&typeof b==='object'&&'outcome'in b;}function extractErrorCode(a){if(!a?.['structuredContent'])return undefined;const b=a['structuredContent'];if(typeof b['error_code']==='string')return b['error_code'];const c=b['error'];if(typeof c==='string')return c;if(c&&typeof c==='object'){const d=c['code'];if(typeof d==='string')return d;}return undefined;}function extractIndustry(a){if(!a||typeof a!=='object')return undefined;const b=a;if(typeof b['industry']==='string')return b['industry'];const c=b['data'];if(c&&typeof c==='object'){const e=c;if(typeof e['industry']==='string')return e['industry'];}return undefined;}function numericBalance(a){if(typeof a==='number'&&Number['isFinite'](a))return a;if(typeof a==='string'&&a['trim']()!==''&&Number['isFinite'](Number(a)))return Number(a);return undefined;}async function runPrePublishChecks(a,b){const c=[],d=[],f=extractOperationType(a,b),g=extractData(b)??{};if(f==='machine'){const h=g['node'];let i=Array['isArray'](h)?h:Array['isArray'](h?.['nodes'])?h['nodes']:[];if(i['length']===0x0&&typeof g['object']==='string'){const j=g['object'],k=b?.['env']?.['network'];try{const l=await fetchMachineNodes(j,k,!![]);l['length']>0x0&&(i=l,d['push']('pre_publish:\x20machine\x20\x22'+j+'\x22\x20published\x20by\x20reference\x20—\x20audited\x20against\x20its\x20'+(l['length']+'\x20on-chain\x20node(s)\x20(effective-state\x20gate)')));}catch(m){d['push']('pre_publish:\x20could\x20not\x20fetch\x20on-chain\x20nodes\x20for\x20machine\x20\x22'+j+'\x22\x20'+('('+(m instanceof Error?m['message']:String(m))+')\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20')+'verify\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');}}if(i['length']>0x0){const n=auditMachineNodes(i);c['push'](...n['critical']),d['push'](...n['warnings']);}else typeof g['object']!=='string'&&d['push']('pre_publish:\x20publishing\x20machine\x20without\x20inline\x20node\x20data\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20'+'verify\x20nodes/pairs/forwards\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');d['push']('pre_publish:\x20machine\x20nodes/pairs/forwards\x20become\x20immutable\x20after\x20publish\x20(IMMUT-001)');}if(f==='service'){d['push']('pre_publish:\x20service\x20machine/order_allocators/arbitrations\x20become\x20immutable\x20after\x20publish\x20(IMMUT-002);\x20sales\x20remains\x20modifiable');g['machine']===undefined&&d['push']('pre_publish:\x20\x27machine\x27\x20not\x20set\x20in\x20this\x20call\x20—\x20if\x20the\x20service\x20was\x20never\x20bound\x20to\x20a\x20published\x20machine,\x20'+'it\x20cannot\x20process\x20orders\x20and\x20CANNOT\x20be\x20fixed\x20after\x20publish');g['order_allocators']===undefined&&d['push']('pre_publish:\x20\x27order_allocators\x27\x20not\x20set\x20in\x20this\x20call\x20—\x20immutable\x20after\x20publish;\x20'+'orders\x20will\x20have\x20no\x20fund\x20distribution\x20if\x20never\x20configured');const o=g,p=numericBalance(o['compensation_fund_add']?.['balance']);if(p!==undefined&&p>0x0){const q=o['sales'],r=(Array['isArray'](q?.['sales'])?q['sales']:[])['map'](s=>numericBalance(s?.['price']?.['balance']))['filter'](s=>s!==undefined);if(r['length']>0x0){const s=r['reduce']((u,v)=>u+v,0x0),t=s*0x3;if(t>0x0){const u=p/t,v=getFundCoverageMin(),w='fund='+p+',\x20max\x20single\x20order=Σ(price×1)='+s+'\x20(quantity\x20set\x20at\x20buy\x20time),\x20'+('award\x20cap=3×order='+t+'\x20(MAX_INDEMNITY_MULTIPLE),\x20coverage='+u['toFixed'](0x2));if(v>0x0&&u<v)d['push']('pre_publish:\x20G7\x20advisory\x20—\x20compensation-fund\x20coverage\x20below\x20the\x20configured\x20minimum\x20—\x20'+w+'\x20<\x20'+v+'.\x20'+'Awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20'+'Consider\x20adding\x20funds\x20(compensation_fund_add),\x20or\x20set\x20WOWOK_FUND_COVERAGE_MIN\x20'+'(0\x20silences\x20this\x20advisory).\x20Informational\x20—\x20does\x20not\x20block\x20publish');else u<0x1&&d['push']('pre_publish:\x20compensation-fund\x20coverage\x20below\x20the\x20award\x20ceiling\x20—\x20'+w+'\x20<\x201\x20—\x20'+'awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20Informational');}}else d['push']('pre_publish:\x20compensation_fund_add\x20present\x20but\x20sales\x20not\x20set\x20in\x20this\x20call\x20—\x20verify\x20coverage\x20manually:\x20'+'the\x20fund\x20must\x20cover\x203×\x20the\x20maximum\x20single-order\x20amount\x20(MAX_INDEMNITY_MULTIPLE=3)');}}return{'critical':c,'warnings':d};}function buildHarnessBlockResult(a,b,c,d,e,f){const g=[...c['map'](i=>'CRITICAL:\x20'+i),...d['map'](i=>'WARN:\x20'+i)]['join']('\x0a'),h='Error:\x20'+b+(g?'\x0a'+g:'')+'\x0aRecovery:\x20'+f;return{'content':[{'type':'text','text':h}],'structuredContent':{'outcome':'failed','result':{'type':'error','error':b+'\x20[gate='+a+']','error_code':e,'retryable':![],'recovery_hint':f},'message':h,'recovery':recover(e,'harness:'+a)}};}function extractCriticalFindingCount(a){const b=a?.['structuredContent'];if(!b)return 0x0;const c=b['semantic'],d=c?.['summary'];if(typeof d?.['critical_count']==='number'&&d['critical_count']>0x0)return d['critical_count'];const e=b['findings']??c?.['findings'];if(Array['isArray'](e))return e['filter'](h=>h?.['severity']==='error')['length'];const f=a?.['content']?.['map'](h=>'text'in h?h['text']:'')['join']('\x0a')??'',g=f['match'](/\[AUDIT ERROR\]/g);return g?g['length']:0x0;}
|
|
1
|
+
import{classifyError,buildDataSemantic}from'../schema/call/semantic.js';import{buildClassifiedErrorResult}from'./shared.js';import{shouldRunLightHooks,shouldRunHeavyHooks,recordOperationFailure,recordCriticalRisk,recordCriticalOperation,recordSubstepFailure}from'../harness/auto-escalation.js';import{getHarnessTier,setHarnessTier,isEnabled}from'../config/runtime.js';import{getHarness}from'../harness/index.js';import{recover}from'../harness/recover.js';import{recordOperationOutcome}from'../experience/index.js';import{recordIndustrySignal}from'../knowledge/flywheel-loop.js';import{getStageCache}from'../playbooks/service-build/index.js';import{SERVICE_BUILD_STAGES}from'../playbooks/service-build/process.js';import{extractAmount,getAmountThreshold,getFundCoverageMin,formatAmount}from'../knowledge/safety-rules.js';import{auditMachineNodes}from'../knowledge/audit-rules.js';import{fetchMachineNodes}from'../graph/onchain/sdk-batch.js';function stageIndexOf(a){const b=SERVICE_BUILD_STAGES['indexOf'](a);return b>=0x0?b:0x0;}export function withTimeout(a,b=0x7530,c='operation'){let d;return Promise['race']([a['finally'](()=>{if(d)clearTimeout(d);}),new Promise((e,f)=>{d=setTimeout(()=>{let g='';if(c['includes']('messenger'))g='\x20This\x20is\x20a\x20messenger\x20network\x20operation.\x20Possible\x20causes:\x20'+'(1)\x20messenger\x20server\x20(https://messenger.wowok.net)\x20unreachable,\x20'+'(2)\x20no\x20messenger-enabled\x20account\x20configured\x20(use\x20account_operation\x20to\x20set\x20messenger\x20name),\x20'+'(3)\x20network\x20connectivity\x20issue.\x20'+'Ensure\x20you\x20have\x20a\x20messenger-enabled\x20account\x20and\x20the\x20server\x20is\x20reachable.';else(c['includes']('onchain')||c['includes']('account_operation')||c['includes']('bridge')||c['includes']('workflow')||c['includes']('keeper')||c['includes']('wowok'))&&(g='\x20This\x20tool\x20may\x20submit\x20an\x20ON-CHAIN\x20transaction.\x20The\x20transaction\x20was\x20NOT\x20cancelled\x20'+'by\x20this\x20timeout\x20—\x20it\x20may\x20already\x20be\x20submitted\x20and\x20still\x20finalize\x20on-chain.\x20'+'DO\x20NOT\x20blindly\x20retry\x20(risk\x20of\x20duplicate\x20operations).\x20First\x20verify:\x20'+'(1)\x20if\x20the\x20error\x20above\x20carries\x20a\x20tx\x20digest,\x20check\x20it\x20via\x20query_toolkit\x20'+'(query_type=\x27onchain_transaction\x27);\x20(2)\x20otherwise\x20verify\x20via\x20query_toolkit\x20'+'onchain_events\x20(or\x20the\x20account\x27s\x20recent\x20transactions).\x20Do\x20NOT\x20rely\x20on\x20an\x20'+'onchain_objects\x20read\x20alone:\x20it\x20may\x20serve\x20a\x20pre-transaction\x20cached\x20snapshot,\x20'+'so\x20an\x20unchanged\x20object\x20must\x20never\x20on\x20its\x20own\x20justify\x20a\x20retry.');f(new Error('Operation\x20\x27'+c+'\x27\x20timed\x20out\x20after\x20'+b+'ms.'+g));},b);})]);}export function wrapHandlerWithErrorShape(a,b,c,d){return async(e,f)=>{try{return await withTimeout(a(e,f),b,c);}catch(g){if(d){const h=g instanceof Error?g['message']:String(g),i=classifyError(h),j={'operation_type':c,'data':e},k=d(h,i,j);return{'content':[{'type':'text','text':'Error:\x20'+h}],'structuredContent':k};}throw g;}};}export const statusErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'status':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const operationErrorShape=(a,b,c)=>({'result':buildClassifiedErrorResult({'operation':'error'},a,b),'semantic':buildDataSemantic(undefined,c,!![],a)});export const strictStatusErrorShape=(a,b,c)=>({'result':{'status':'error','error':a}});function checkProjectStage(a,b,c){const d={'analyze_intent':'puzzle','aggregate_risks':'risk','trace_substeps':'substeps'},e=d[a];if(!e)return null;const f=getStageCache(b,c);if(!f){if(a==='analyze_intent')return null;return'project_stage:\x20calling\x20\x27'+a+'\x27\x20before\x20\x27analyze_intent\x27\x20—\x20recommend\x20calling\x20analyze_intent\x20first\x20for\x20project\x20\x27'+b+':'+c+'\x27';}if(stageIndexOf(f['stage'])<stageIndexOf(e)-0x1)return'project_stage:\x20calling\x20\x27'+a+'\x27\x20(stage\x20\x27'+e+'\x27)\x20but\x20project\x20is\x20at\x20stage\x20\x27'+f['stage']+'\x27\x20—\x20recommend\x20completing\x20prior\x20stages\x20first\x20for\x20\x27'+b+':'+c+'\x27';return null;}export function dispatchWithHarness(a,b){return async(d,f)=>{const g=[],h=getHarness(),i=shouldRunLightHooks(),j=shouldRunHeavyHooks(),k=isPublishOperation(b,d),l=isSignOperation(b,d),m=getHarnessTier();if(b==='goal_operation'&&i)try{const o=d,p=o?.['action'],q=o?.['project'],r=o?.['version'];if(p&&q&&r){const s=checkProjectStage(p,q,r);s&&g['push'](s);}}catch{}k&&m==='lightweight'&&(setHarnessTier('full'),g['push']('pre_publish:\x20tier\x20forced\x20to\x20full\x20for\x20publish-class\x20operation\x20(GLM5-21\x20§3.3)'));if(k&&m!=='off')try{const t=await runPrePublishChecks(b,d);g['push'](...t['warnings']);if(t['critical']['length']>0x0){for(const u of t['critical']){const v=recordCriticalRisk(u);if(v)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+v['reason']);}return buildHarnessBlockResult('pre_publish','Publish\x20BLOCKED\x20by\x20Harness\x20pre-publish\x20gate\x20(GLM5-21\x20V6):\x20'+(t['critical']['length']+'\x20CRITICAL\x20risk(s)\x20must\x20be\x20resolved\x20before\x20publish.'),t['critical'],t['warnings'],'immutable_violation','Fix\x20the\x20CRITICAL\x20risks\x20listed\x20in\x20the\x20message\x20(e.g.\x20rename\x20dispute/refund\x20nodes\x20per\x20R-M1-11,\x20add\x20the\x20entry\x20pair\x20prev_node=\x22\x22),\x20then\x20retry\x20publish.\x20Nodes/pairs/forwards\x20are\x20immutable\x20after\x20publish\x20—\x20verify\x20via\x20machineNode2file\x20first.');}}catch(x){g['push']('pre_publish\x20hook\x20failed:\x20'+(x instanceof Error?x['message']:String(x)));}if(l&&j)try{const y=extractData(d),z=y?extractAmount(y,{'excludeConfigAmounts':!![]}):null;if(z!==null){const A=getAmountThreshold();let B=null;try{B=BigInt(z);}catch{B=null;}if(B!==null&&B>A)return buildHarnessBlockResult('pre_sign','Sign\x20BLOCKED\x20by\x20Harness\x20pre-sign\x20gate\x20(GLM5-21\x20V7):\x20amount\x20'+formatAmount(B)+'\x20WOW\x20exceeds\x20the\x20full-tier\x20threshold\x20'+formatAmount(A)+'\x20WOW.',['amount\x20'+z+'\x20(smallest\x20unit)\x20>\x20threshold\x20'+A['toString']()+'\x20(smallest\x20unit)'],[],'invalid_parameter','Raise\x20WOWOK_AMOUNT_THRESHOLD\x20to\x20match\x20the\x20intended\x20amount,\x20split\x20the\x20transaction,\x20or\x20reset\x20the\x20harness\x20tier\x20to\x20lightweight\x20(config_operation)\x20after\x20explicit\x20user\x20confirmation.');}}catch(C){g['push']('pre_sign\x20hook\x20failed:\x20'+(C instanceof Error?C['message']:String(C)));}let n;try{n=await a(d,f);}catch(D){const E=D instanceof Error?D['message']:String(D),F=recordOperationFailure(b,E);F&&g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+F['reason']);if(b==='onchain_operations')try{const G=classifyError(E,D);if(!G['retryable']&&G['error_code']!=='unknown'){const H=recordCriticalOperation(b,G['error_code']);if(H)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+H['reason']);}}catch{}throw D;}if(b==='onchain_operations')try{if(classifyOutcome(n)==='failed'){const I=extractErrorCode(n)??'',J=classifyError(I);if(!J['retryable']&&J['error_code']!=='unknown'){const K=recordCriticalOperation(b,J['error_code']);if(K)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+K['reason']);}}}catch{}if(i&&!isOutcomeDiscriminated(n)){const L=extractIntent(b,d)??b;try{const M=classifyOutcome(n);if(M==='failed'){const N=extractErrorCode(n)??'',O=classifyError(N),P=h['recover'](O['error_code'],L,{'operation_type':b,'data':extractData(d)});g['push']('Harness\x20recover:\x20strategy='+P['strategy']+('\x20(attempt\x20'+P['current_attempt']+'/'+P['max_attempts']+')')+(P['should_retry']?'\x20—\x20retryable':'\x20—\x20do\x20NOT\x20retry\x20blindly')+(P['user_prompt']?'\x20—\x20'+P['user_prompt']:'\x20—\x20'+P['detail']));}else M==='success'&&h['resetRecovery'](L);}catch(Q){g['push']('recover\x20hook\x20failed:\x20'+(Q instanceof Error?Q['message']:String(Q)));}}if(b==='goal_operation')try{const R=d?.['action'];if(R==='trace_substeps'){const S=extractCriticalFindingCount(n);if(S>0x0){const T=recordSubstepFailure(String(R)+':\x20'+S+'\x20critical\x20finding(s)');if(T)g['push']('Harness\x20escalated\x20to\x20full\x20tier:\x20'+T['reason']);}}}catch{}if(isWriteClassTool(b)&&!SEMANTIC_RECORDED_TOOLS['has'](b))try{const U=extractOperationType(b,d)??b,V=extractIntent(b,d)??b,W=extractData(d)??d,X=classifyOutcome(n),Y=extractErrorCode(n),Z=isEnabled('experience_layer');if(Z)recordOperationOutcome(U,W,V,X,Y);else{const a0=extractIndustry(d);a0&&isEnabled('industry_evolution')&&recordIndustrySignal(a0,{'type':U},{'success':X==='success','error_code':Y});}}catch(a1){g['push']('signal\x20collection\x20failed:\x20'+(a1 instanceof Error?a1['message']:String(a1)));}if(g['length']>0x0){if(n?.['structuredContent']){const a2=n['structuredContent'],a3=a2['semantic'];if(a3){const a4=Array['isArray'](a3['warnings'])?a3['warnings']:[];a3['warnings']=[...a4,...g];}else for(const a5 of g){console['warn']('[harness]\x20'+a5);}}else for(const a6 of g){console['warn']('[harness]\x20'+a6);}}return n;};}function isPublishOperation(a,b){if(a!=='onchain_operations')return![];const c=extractOperationType(a,b);if(c!=='service'&&c!=='machine')return![];const d=extractData(b);return d?.['publish']===!![]||d?.['bPublished']===!![];}function isSignOperation(a,b){if(a==='wip_file'){const c=b?.['operation_type'];return c==='sign';}return a==='onchain_operations';}function extractOperationType(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if(a==='onchain_operations')return typeof c['operation_type']==='string'?c['operation_type']:undefined;if(a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')return typeof c['action']==='string'?c['action']:undefined;return typeof c['operation_type']==='string'?c['operation_type']:undefined;}function extractIntent(a,b){if(!b||typeof b!=='object')return undefined;const c=b;if((a==='goal_operation'||a==='industry_pack_operation'||a==='strategy_review_operation')&&typeof c['action']==='string')return a+':'+c['action'];const d=c['operation_type'];if(typeof d==='string')return a+':'+d;return a;}function extractData(a){if(!a||typeof a!=='object')return undefined;const b=a,c=b['data'];return c&&typeof c==='object'?c:undefined;}const WRITE_CLASS_TOOLS=new Set(['onchain_operations','goal_operation','industry_pack_operation','strategy_review_operation','wip_file','messenger_operation','bridge_operation']),SEMANTIC_RECORDED_TOOLS=new Set(['onchain_operations','bridge_operation']);function isWriteClassTool(a){return WRITE_CLASS_TOOLS['has'](a);}function classifyOutcome(a){if(!a?.['structuredContent'])return'failed';const b=a['structuredContent'];if(b['outcome']==='failed')return'failed';if(b['outcome']==='executed')return'success';if(b['outcome']==='pending_input')return'partial';const c=typeof b['status']==='string'?b['status']:typeof b['result_type']==='string'?b['result_type']:'';if(c==='error'||c==='failed')return'failed';if(c==='partial')return'partial';return'success';}function isOutcomeDiscriminated(a){const b=a?.['structuredContent'];return!!b&&typeof b==='object'&&'outcome'in b;}function extractErrorCode(a){if(!a?.['structuredContent'])return undefined;const b=a['structuredContent'];if(typeof b['error_code']==='string')return b['error_code'];const c=b['error'];if(typeof c==='string')return c;if(c&&typeof c==='object'){const d=c['code'];if(typeof d==='string')return d;}return undefined;}function extractIndustry(a){if(!a||typeof a!=='object')return undefined;const b=a;if(typeof b['industry']==='string')return b['industry'];const c=b['data'];if(c&&typeof c==='object'){const e=c;if(typeof e['industry']==='string')return e['industry'];}return undefined;}function numericBalance(a){if(typeof a==='number'&&Number['isFinite'](a))return a;if(typeof a==='string'&&a['trim']()!==''&&Number['isFinite'](Number(a)))return Number(a);return undefined;}async function runPrePublishChecks(a,b){const c=[],d=[],f=extractOperationType(a,b),g=extractData(b)??{};if(f==='machine'){const h=g['node'];let i=Array['isArray'](h)?h:Array['isArray'](h?.['nodes'])?h['nodes']:[];if(i['length']===0x0&&typeof g['object']==='string'){const j=g['object'],k=b?.['env']?.['network'];try{const l=await fetchMachineNodes(j,k,!![]);l['length']>0x0&&(i=l,d['push']('pre_publish:\x20machine\x20\x22'+j+'\x22\x20published\x20by\x20reference\x20—\x20audited\x20against\x20its\x20'+(l['length']+'\x20on-chain\x20node(s)\x20(effective-state\x20gate)')));}catch(m){d['push']('pre_publish:\x20could\x20not\x20fetch\x20on-chain\x20nodes\x20for\x20machine\x20\x22'+j+'\x22\x20'+('('+(m instanceof Error?m['message']:String(m))+')\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20')+'verify\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');}}if(i['length']>0x0){const n=auditMachineNodes(i);c['push'](...n['critical']),d['push'](...n['warnings']);}else typeof g['object']!=='string'&&d['push']('pre_publish:\x20publishing\x20machine\x20without\x20inline\x20node\x20data\x20—\x20topology\x20not\x20verifiable\x20in\x20this\x20call;\x20'+'verify\x20nodes/pairs/forwards\x20via\x20machineNode2file\x20BEFORE\x20publish\x20(immutable\x20after\x20publish,\x20IMMUT-001)');d['push']('pre_publish:\x20machine\x20nodes/pairs/forwards\x20become\x20immutable\x20after\x20publish\x20(IMMUT-001)');}if(f==='service'){d['push']('pre_publish:\x20service\x20machine/order_allocators/arbitrations\x20become\x20immutable\x20after\x20publish\x20(IMMUT-002);\x20sales\x20remains\x20modifiable');g['machine']===undefined&&d['push']('pre_publish:\x20\x27machine\x27\x20absent\x20from\x20THIS\x20call\x20(the\x20store\x20may\x20already\x20be\x20bound\x20—\x20verify\x20before\x20assuming\x20otherwise):\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20and\x20read\x20service.machine;\x20an\x20unset\x20machine\x20cannot\x20process\x20orders\x20and\x20CANNOT\x20be\x20fixed\x20after\x20publish\x20(IMMUT-002)');g['order_allocators']===undefined&&d['push']('pre_publish:\x20\x27order_allocators\x27\x20absent\x20from\x20THIS\x20call\x20(the\x20store\x20may\x20already\x20be\x20configured\x20—\x20verify\x20before\x20assuming\x20otherwise):\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20and\x20read\x20order_allocators;\x20immutable\x20after\x20publish,\x20so\x20orders\x20get\x20no\x20fund\x20distribution\x20if\x20never\x20configured\x20(IMMUT-002)');const o=g,p=numericBalance(o['compensation_fund_add']?.['balance']);if(p!==undefined&&p>0x0){const q=o['sales'],r=(Array['isArray'](q?.['sales'])?q['sales']:[])['map'](s=>numericBalance(s?.['price']?.['balance']))['filter'](s=>s!==undefined);if(r['length']>0x0){const s=r['reduce']((u,v)=>u+v,0x0),t=s*0x3;if(t>0x0){const u=p/t,v=getFundCoverageMin(),w='fund='+p+',\x20max\x20single\x20order=Σ(price×1)='+s+'\x20(quantity\x20set\x20at\x20buy\x20time),\x20'+('award\x20cap=3×order='+t+'\x20(MAX_INDEMNITY_MULTIPLE),\x20coverage='+u['toFixed'](0x2));if(v>0x0&&u<v)d['push']('pre_publish:\x20G7\x20advisory\x20—\x20compensation-fund\x20coverage\x20below\x20the\x20configured\x20minimum\x20—\x20'+w+'\x20<\x20'+v+'.\x20'+'Awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20'+'Consider\x20adding\x20funds\x20(compensation_fund_add),\x20or\x20set\x20WOWOK_FUND_COVERAGE_MIN\x20'+'(0\x20silences\x20this\x20advisory).\x20Informational\x20—\x20does\x20not\x20block\x20publish');else u<0x1&&d['push']('pre_publish:\x20compensation-fund\x20coverage\x20below\x20the\x20award\x20ceiling\x20—\x20'+w+'\x20<\x201\x20—\x20'+'awards\x20beyond\x20the\x20fund\x20draw\x20from\x20the\x20merchant\x20wallet.\x20Informational');}}else d['push']('pre_publish:\x20compensation_fund_add\x20present\x20but\x20\x27sales\x27\x20absent\x20from\x20THIS\x20call\x20(sales\x20may\x20already\x20be\x20configured\x20—\x20verify,\x20do\x20not\x20assume):\x20'+'the\x20fund\x20should\x20cover\x203×\x20the\x20maximum\x20single-order\x20amount\x20(MAX_INDEMNITY_MULTIPLE=3).\x20'+'query_toolkit\x20query_type=\x27service_panorama\x27\x20to\x20read\x20the\x20current\x20sales\x20prices,\x20then\x20re-check\x20coverage');}}return{'critical':c,'warnings':d};}function buildHarnessBlockResult(a,b,c,d,e,f){const g=[...c['map'](i=>'CRITICAL:\x20'+i),...d['map'](i=>'WARN:\x20'+i)]['join']('\x0a'),h='Error:\x20'+b+(g?'\x0a'+g:'')+'\x0aRecovery:\x20'+f;return{'content':[{'type':'text','text':h}],'structuredContent':{'outcome':'failed','result':{'type':'error','error':b+'\x20[gate='+a+']','error_code':e,'retryable':![],'recovery_hint':f},'message':h,'recovery':recover(e,'harness:'+a)}};}function extractCriticalFindingCount(a){const b=a?.['structuredContent'];if(!b)return 0x0;const c=b['semantic'],d=c?.['summary'];if(typeof d?.['critical_count']==='number'&&d['critical_count']>0x0)return d['critical_count'];const e=b['findings']??c?.['findings'];if(Array['isArray'](e))return e['filter'](h=>h?.['severity']==='error')['length'];const f=a?.['content']?.['map'](h=>'text'in h?h['text']:'')['join']('\x0a')??'',g=f['match'](/\[AUDIT ERROR\]/g);return g?g['length']:0x0;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/agent-mcp",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
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.2.
|
|
57
|
+
"@wowok/wowok": "3.2.2",
|
|
58
58
|
"lodash": "^4.18.1",
|
|
59
59
|
"zod": "^4.2.0"
|
|
60
60
|
},
|
|
@@ -67,9 +67,10 @@
|
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"clean": "node -e \"fs.rmSync('dist',{recursive:true,force:true})\"",
|
|
70
|
-
"build": "pnpm clean && pnpm check:hygiene && pnpm check:baselines && tsc && pnpm copy:standards && pnpm generate:schemas && pnpm obfuscate",
|
|
70
|
+
"build": "pnpm clean && pnpm check:hygiene && pnpm check:baselines && pnpm check:citations && tsc && pnpm copy:standards && pnpm generate:schemas && pnpm obfuscate",
|
|
71
71
|
"check:hygiene": "node --import tsx/esm scripts/check-hygiene.ts",
|
|
72
72
|
"check:baselines": "node --import tsx/esm scripts/check-baselines.ts",
|
|
73
|
+
"check:citations": "node --import tsx/esm scripts/check-citations.ts",
|
|
73
74
|
"copy:standards": "node -e \"const fs=require('fs');fs.mkdirSync('dist/knowledge/baselines',{recursive:true});fs.copyFileSync('src/knowledge/baselines/judgment-baselines.json','dist/knowledge/baselines/judgment-baselines.json');try{fs.cpSync('src/knowledge/baselines/rules','dist/knowledge/baselines/rules',{recursive:true})}catch{fs.mkdirSync('dist/knowledge/baselines/rules',{recursive:true})}\"",
|
|
74
75
|
"obfuscate": "javascript-obfuscator dist --output dist --config obfuscator.json",
|
|
75
76
|
"watch": "tsc --watch",
|