@wowok/agent-mcp 3.1.5 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/evaluation/arbitration-game.js +1 -1
- package/dist/evaluation/builtins/graph-service.js +1 -1
- package/dist/graph/onchain/analyze.js +1 -1
- package/dist/graph/onchain/analyze.spec.js +1 -1
- package/dist/graph/onchain/extract.js +1 -1
- package/dist/graph/onchain/facts.d.ts +1 -0
- package/dist/graph/onchain/facts.js +1 -1
- package/dist/graph/onchain/fixtures.js +1 -1
- package/dist/graph/onchain/onchain.spec.js +1 -1
- package/dist/graph/onchain/strategy.js +1 -1
- package/dist/graph/onchain/strategy.spec.js +1 -1
- package/dist/harness/recover.js +1 -1
- package/dist/knowledge/alloc-audit-policy.spec.js +1 -1
- package/dist/knowledge/allocation-risk.js +1 -1
- package/dist/knowledge/arbitration-ledger.js +1 -1
- package/dist/knowledge/audit-rules.d.ts +1 -0
- package/dist/knowledge/audit-rules.js +1 -1
- package/dist/knowledge/baselines/rules/alloc_audit.json +20 -0
- package/dist/knowledge/baselines/rules/allocation.json +1 -19
- package/dist/knowledge/baselines/rules/arb.json +1 -1
- package/dist/knowledge/baselines/rules/guard.json +8 -8
- package/dist/knowledge/fund-layer.js +1 -1
- package/dist/knowledge/guard-design-patterns.d.ts +2 -1
- package/dist/knowledge/guard-design-patterns.js +1 -1
- package/dist/knowledge/guard-design-patterns.spec.d.ts +1 -0
- package/dist/knowledge/guard-design-patterns.spec.js +1 -0
- package/dist/knowledge/guard-lint.d.ts +1 -1
- package/dist/knowledge/guard-lint.js +1 -1
- package/dist/knowledge/guard-puzzle.js +1 -1
- package/dist/knowledge/guard-render.js +1 -1
- package/dist/knowledge/guard-risk.js +1 -1
- package/dist/knowledge/guard-translation.js +1 -1
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge/industry-registry.js +1 -1
- package/dist/knowledge/jsonrpc-enum.js +1 -1
- package/dist/knowledge/permission-ledger.js +1 -1
- package/dist/knowledge/recipient-constraint.js +1 -1
- package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +1 -0
- package/dist/knowledge/safety-rules.extract-amount.spec.js +1 -0
- package/dist/knowledge/safety-rules.js +1 -1
- package/dist/knowledge/service-ledger.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.js +1 -1
- package/dist/monitor/MonitorLoop.js +1 -1
- package/dist/playbooks/service-build/business-puzzle.js +1 -1
- package/dist/playbooks/service-build/pipeline-actions.d.ts +1 -1
- package/dist/playbooks/service-build/pipeline-actions.js +1 -1
- package/dist/playbooks/service-build/risk-aggregator.js +1 -1
- package/dist/role/derivation.d.ts +1 -1
- package/dist/role/derivation.js +1 -1
- package/dist/safety/confirm-gate.js +1 -1
- package/dist/schema/call/allocation.d.ts +7 -0
- package/dist/schema/call/allocation.js +1 -1
- package/dist/schema/call/arbitration.d.ts +4 -0
- package/dist/schema/call/arbitration.js +1 -1
- package/dist/schema/call/base.d.ts +52 -0
- package/dist/schema/call/base.js +1 -1
- package/dist/schema/call/bridge.d.ts +27 -0
- package/dist/schema/call/contact.d.ts +4 -0
- package/dist/schema/call/demand.d.ts +4 -0
- package/dist/schema/call/error-codes.d.ts +1 -1
- package/dist/schema/call/error-codes.js +1 -1
- package/dist/schema/call/guard.d.ts +12 -0
- package/dist/schema/call/handler.js +1 -1
- package/dist/schema/call/machine.d.ts +8 -0
- package/dist/schema/call/order.d.ts +4 -0
- package/dist/schema/call/order.js +1 -1
- package/dist/schema/call/payment.d.ts +4 -0
- package/dist/schema/call/permission.d.ts +4 -0
- package/dist/schema/call/personal.d.ts +4 -0
- package/dist/schema/call/progress.d.ts +4 -0
- package/dist/schema/call/proof.d.ts +8 -0
- package/dist/schema/call/repository.d.ts +4 -0
- package/dist/schema/call/repository.js +1 -1
- package/dist/schema/call/reward.d.ts +4 -0
- package/dist/schema/call/semantic-customer-advice.spec.js +1 -1
- package/dist/schema/call/semantic.d.ts +11 -0
- package/dist/schema/call/semantic.js +1 -1
- package/dist/schema/call/service.d.ts +14 -0
- package/dist/schema/call/service.js +1 -1
- package/dist/schema/call/treasury.d.ts +4 -0
- package/dist/schema/common/index.js +1 -1
- package/dist/schema/keeper/index.d.ts +5 -0
- package/dist/schema/local/index.d.ts +36 -0
- package/dist/schema/local/index.js +1 -1
- package/dist/schema/local/wip.d.ts +73 -0
- package/dist/schema/local/wip.js +1 -1
- package/dist/schema/messenger/index.d.ts +5 -0
- package/dist/schema/messenger/index.js +1 -1
- package/dist/schema/operations.d.ts +101 -0
- package/dist/schema/operations.js +1 -1
- package/dist/schema/query/bi.js +1 -1
- package/dist/schema/query/index.d.ts +19 -3
- package/dist/schema/query/index.js +1 -1
- package/dist/schema/schema-version.js +1 -1
- package/dist/schema/workflow/index.d.ts +2 -0
- package/dist/schema/workflow/index.js +1 -1
- package/dist/schema-query-impl/index.js +1 -1
- package/dist/schemas/account_operation.output.json +26 -1
- package/dist/schemas/bridge_operation.output.json +26 -1
- package/dist/schemas/bridge_operation.schema.json +40 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/keeper_operation.output.json +24 -1
- package/dist/schemas/local_history_operation.output.json +26 -1
- package/dist/schemas/local_info_operation.output.json +26 -1
- package/dist/schemas/local_mark_operation.output.json +26 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +24 -1
- package/dist/schemas/messenger_operation.schema.json +2 -2
- package/dist/schemas/monitor_events.output.json +24 -1
- package/dist/schemas/monitor_subscription.output.json +24 -1
- package/dist/schemas/onchain_events.output.json +24 -1
- package/dist/schemas/onchain_operations.output.json +74 -3
- package/dist/schemas/onchain_operations.schema.json +3286 -821
- package/dist/schemas/onchain_operations_allocation.schema.json +12 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +18 -10
- package/dist/schemas/onchain_operations_contact.schema.json +8 -0
- package/dist/schemas/onchain_operations_demand.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_guard.schema.json +2896 -596
- package/dist/schemas/onchain_operations_machine.schema.json +8 -0
- package/dist/schemas/onchain_operations_order.schema.json +10 -2
- package/dist/schemas/onchain_operations_payment.schema.json +8 -0
- package/dist/schemas/onchain_operations_permission.schema.json +8 -0
- package/dist/schemas/onchain_operations_personal.schema.json +8 -0
- package/dist/schemas/onchain_operations_progress.schema.json +8 -0
- package/dist/schemas/onchain_operations_proof.schema.json +8 -0
- package/dist/schemas/onchain_operations_repository.schema.json +14 -6
- package/dist/schemas/onchain_operations_reward.schema.json +8 -0
- package/dist/schemas/onchain_operations_service.schema.json +43 -10
- package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
- package/dist/schemas/onchain_table_data.output.json +35 -12
- package/dist/schemas/query_toolkit.output.json +1179 -10
- package/dist/schemas/query_toolkit.schema.json +11 -11
- package/dist/schemas/wip_file.output.json +221 -0
- package/dist/schemas/wip_file.schema.json +125 -0
- package/dist/schemas/workflow_operation.schema.json +8 -0
- package/dist/tools/handlers/config.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.js +1 -1
- package/dist/tools/handlers/dispatch-expectations.spec.d.ts +1 -0
- package/dist/tools/handlers/dispatch-expectations.spec.js +1 -0
- package/dist/tools/handlers/onchain.js +1 -1
- package/dist/tools/handlers/wip-upload.d.ts +22 -0
- package/dist/tools/handlers/wip-upload.js +1 -0
- package/dist/tools/handlers/wip.js +1 -1
- package/dist/tools/handlers/workflow.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/move-fn-index.gen.js +1 -1
- package/dist/tools/registry/files.js +1 -1
- package/dist/tools/wip-deploy-assist.js +1 -1
- package/package.json +2 -2
|
@@ -576,6 +576,10 @@ export declare const CallMachine_InputSchema: z.ZodObject<{
|
|
|
576
576
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
577
577
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
578
578
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
579
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
580
|
+
compact: "compact";
|
|
581
|
+
full: "full";
|
|
582
|
+
}>>;
|
|
579
583
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
580
584
|
full: "full";
|
|
581
585
|
streamlined: "streamlined";
|
|
@@ -667,6 +671,10 @@ export declare const MachineNode2File_InputSchema: z.ZodObject<{
|
|
|
667
671
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
668
672
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
669
673
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
674
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
675
|
+
compact: "compact";
|
|
676
|
+
full: "full";
|
|
677
|
+
}>>;
|
|
670
678
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
671
679
|
full: "full";
|
|
672
680
|
streamlined: "streamlined";
|
|
@@ -148,6 +148,10 @@ export declare const CallOrder_InputSchema: z.ZodObject<{
|
|
|
148
148
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
149
149
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
150
150
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
152
|
+
compact: "compact";
|
|
153
|
+
full: "full";
|
|
154
|
+
}>>;
|
|
151
155
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
152
156
|
full: "full";
|
|
153
157
|
streamlined: "streamlined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{CallEnvSchema,SubmissionCallSchema}from'./base.js';import{OperateSchema}from'./progress.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const ArbConfirmSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.'),'confirm':z['boolean']()['describe']('Whether\x20to\x20confirm\x20that\x20the\x20submitted\x20arbitration\x20materials\x20are\x20valid\x20for\x20arbitration.'),'description':DescriptionSchema['optional']()['describe']('Message\x20description\x20for\x20compensation\x20application.'),'proposition':z['array'](LongNameSchema)['optional']()['describe']('Compensation\x20claims.')})['strict']();export const ArbObjectionSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.'),'objection':DescriptionSchema['describe']('Oppose\x20and\x20appeal\x20the\x20arbitration\x20result,\x20request\x20re-arbitration')})['strict']();export const ArbClaimCompensationSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.')})['strict']();export const CallOrder_DataSchema=z['object']({'object':NameOrAddressSchema['describe']('Order\x20object\x20ID\x20or\x20name.'),'agent':ManyAccountOrMark_AddressSchema['optional']()['describe']('Order\x20agent.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'required_info':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20(recipient)\x20or\x20WTS\x20Proof\x20object\x20(delivery\x20proof)\x20that\x20information\x20has\x20been\x20delivered\x20via\x20Wowok\x20Messenger.'),'progress':OperateSchema['optional']()['describe']('Advance\x20order\x20process'),'arb_confirm':ArbConfirmSchema['optional']()['describe']('
|
|
1
|
+
import{z}from'zod';import{CallEnvSchema,SubmissionCallSchema}from'./base.js';import{OperateSchema}from'./progress.js';import{AccountOrMark_AddressSchema,DescriptionSchema,LongNameSchema,ManyAccountOrMark_AddressSchema,NameOrAddressSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';export const ArbConfirmSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.'),'confirm':z['boolean']()['describe']('Whether\x20to\x20confirm\x20that\x20the\x20submitted\x20arbitration\x20materials\x20are\x20valid\x20for\x20arbitration.'),'description':DescriptionSchema['optional']()['describe']('Message\x20description\x20for\x20compensation\x20application.'),'proposition':z['array'](LongNameSchema)['optional']()['describe']('Compensation\x20claims.')})['strict']();export const ArbObjectionSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.'),'objection':DescriptionSchema['describe']('Oppose\x20and\x20appeal\x20the\x20arbitration\x20result,\x20request\x20re-arbitration')})['strict']();export const ArbClaimCompensationSchema=z['object']({'arb':NameOrAddressSchema['describe']('Arb\x20object\x20ID\x20or\x20name.')})['strict']();export const CallOrder_DataSchema=z['object']({'object':NameOrAddressSchema['describe']('Order\x20object\x20ID\x20or\x20name.'),'agent':ManyAccountOrMark_AddressSchema['optional']()['describe']('Order\x20agent.\x20Agents\x20can\x20operate\x20the\x20order,\x20such\x20as\x20canceling\x20the\x20order,\x20modifying\x20the\x20order\x20status,\x20etc.;\x20but\x20cannot\x20receive\x20the\x20funds\x20received\x20by\x20the\x20order.'),'required_info':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20(recipient)\x20or\x20WTS\x20Proof\x20object\x20(delivery\x20proof)\x20that\x20information\x20has\x20been\x20delivered\x20via\x20Wowok\x20Messenger.'),'progress':OperateSchema['optional']()['describe']('Advance\x20order\x20process'),'arb_confirm':ArbConfirmSchema['optional']()['describe']('CUSTOMER-side\x20confirm\x20on\x20an\x20Arb\x20case\x20(the\x20order\x20owner;\x20the\x20arbitration\x20object\x27s\x20own\x20confirm\x20tool\x20is\x20the\x20arbitrator\x27s\x20and\x20rejects\x20customers).\x20'+'Moves\x20the\x20case\x20from\x20state\x200\x20to\x20state\x201.\x20REQUIRED\x20after\x20an\x20arbitrator\x20reset\x20—\x20a\x20reset\x20returns\x20the\x20case\x20to\x20state\x200\x20with\x20the\x20indemnity\x20cleared,\x20'+'and\x20only\x20the\x20customer\x20can\x20advance\x20it\x20again;\x20the\x20fee\x20stays\x20locked\x20until\x20this\x20is\x20called.\x20Not\x20the\x20filing\x20step:\x20filing\x20(dispute)\x20lands\x20the\x20case\x20directly\x20in\x20state\x201.'),'arb_objection':ArbObjectionSchema['optional']()['describe']('Oppose\x20and\x20appeal\x20the\x20arbitration\x20result,\x20request\x20re-arbitration.'),'arb_claim_compensation':ArbClaimCompensationSchema['optional']()['describe']('Specify\x20the\x20adjudicated\x20Arb\x20object\x20to\x20obtain\x20order\x20compensation.\x20Succeeds\x20even\x20when\x20the\x20ruled\x20indemnity\x20is\x200\x20—\x20'+'the\x20claim\x20closes\x20the\x20case\x20(state\x205)\x20and\x20lets\x20the\x20arbitrator\x20withdraw\x20the\x20dispute\x20fee\x20immediately.'),'receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20or\x20other\x20objects\x20received\x20by\x20the\x20order\x20and\x20transfer\x20them\x20to\x20the\x20order\x20owner.\x20'+'Consistent\x20with\x20`owner_receive`\x20on\x20other\x20objects\x20(arbitration/contact/demand/machine/permission/repository/reward/service/treasury).'+RECEIVE_FORMAT_BLOCK_OBJECTS),'transfer_to':AccountOrMark_AddressSchema['optional']()['describe']('Set\x20new\x20owner\x20of\x20the\x20order.\x20Requires\x20order\x20owner\x20permission\x20to\x20set.')})['strict']()['describe']('On-chain,\x20operate\x20on\x20an\x20Order\x20object.');export const CallOrder_InputSchema=z['object']({'data':CallOrder_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -119,6 +119,10 @@ export declare const CallPayment_InputSchema: z.ZodObject<{
|
|
|
119
119
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
120
120
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
121
121
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
compact: "compact";
|
|
124
|
+
full: "full";
|
|
125
|
+
}>>;
|
|
122
126
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
123
127
|
full: "full";
|
|
124
128
|
streamlined: "streamlined";
|
|
@@ -525,6 +525,10 @@ export declare const CallPermission_InputSchema: z.ZodObject<{
|
|
|
525
525
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
526
526
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
527
527
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
528
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
529
|
+
compact: "compact";
|
|
530
|
+
full: "full";
|
|
531
|
+
}>>;
|
|
528
532
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
529
533
|
full: "full";
|
|
530
534
|
streamlined: "streamlined";
|
|
@@ -457,6 +457,10 @@ export declare const CallPersonal_InputSchema: z.ZodObject<{
|
|
|
457
457
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
458
458
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
459
459
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
460
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
compact: "compact";
|
|
462
|
+
full: "full";
|
|
463
|
+
}>>;
|
|
460
464
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
461
465
|
full: "full";
|
|
462
466
|
streamlined: "streamlined";
|
|
@@ -144,6 +144,10 @@ export declare const CallProgress_InputSchema: z.ZodObject<{
|
|
|
144
144
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
145
145
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
146
146
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
148
|
+
compact: "compact";
|
|
149
|
+
full: "full";
|
|
150
|
+
}>>;
|
|
147
151
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
148
152
|
full: "full";
|
|
149
153
|
streamlined: "streamlined";
|
|
@@ -47,6 +47,10 @@ export declare const CallProof_InputSchema: z.ZodObject<{
|
|
|
47
47
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
48
48
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
49
49
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
50
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
compact: "compact";
|
|
52
|
+
full: "full";
|
|
53
|
+
}>>;
|
|
50
54
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
51
55
|
full: "full";
|
|
52
56
|
streamlined: "streamlined";
|
|
@@ -79,6 +83,10 @@ export declare const CallGenProof_InputSchema: z.ZodObject<{
|
|
|
79
83
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
80
84
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
81
85
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
compact: "compact";
|
|
88
|
+
full: "full";
|
|
89
|
+
}>>;
|
|
82
90
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
83
91
|
full: "full";
|
|
84
92
|
streamlined: "streamlined";
|
|
@@ -429,6 +429,10 @@ export declare const CallRepository_InputSchema: z.ZodObject<{
|
|
|
429
429
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
430
430
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
431
431
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
432
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
433
|
+
compact: "compact";
|
|
434
|
+
full: "full";
|
|
435
|
+
}>>;
|
|
432
436
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
433
437
|
full: "full";
|
|
434
438
|
streamlined: "streamlined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z}from'zod';import{WithPermissionObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';import{PolicyRuleSchema}from'../query/index.js';import{SupportedValueSchema}from'../common/index.js';export const RepositoryIdSchema=z['union']([z['string'](),z['number'](),AccountOrMark_AddressSchema])['describe']('Data\x20item\x20ID.\x20Supports:\x20plain\x20string(bigint),\x20number\x20(such\x20as\x20timestamp),\x20or\x20AccountOrMark_Address\x20format.');export const KeyDataSchema=z['object']({'id':RepositoryIdSchema,'data':SupportedValueSchema})['strict']()['describe']('Data\x20ID\x20and\x20value.');export const RepDataItemSchema=z['object']({'data':z['array'](KeyDataSchema)['describe']('Data\x20item\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_add\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0):\x20it\x20must\x20reference\x20one\x20of\x20that\x20policy\x27s\x20write_guard\x20guards,\x20otherwise\x20the\x20chain\x20aborts\x20with\x2022\x20(E_POLICY_WRITE_GUARD_REQUIRED).\x20Optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('List\x20of\x20data\x20items\x20to\x20write.');export const SignerOrClockBaseSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.')})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20ID.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const SignerOrClockSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.'),'data':SupportedValueSchema})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20data.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const DataRemoveItemSchema=z['object']({'id':z['array'](RepositoryIdSchema)['describe']('Data\x20item\x20ID\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_remove\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0);\x20optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('Delete\x20data\x20items\x20by\x20name\x20and\x20ID\x20list.');export const PoliciesAddSetSchema=z['object']({'op':z['enum'](['add','set']),'policy':z['array'](PolicyRuleSchema)['describe']('Policy\x20rule\x20list.')})['strict']()['describe']('
|
|
1
|
+
import{z}from'zod';import{WithPermissionObjectSchema,ObjectsSchema,CallEnvSchema,SubmissionCallSchema}from'./base.js';import{AccountOrMark_AddressSchema,DescriptionSchema,NameOrAddressSchema,NameSchema,ReceivedObjectsOrRecentlySchema,RECEIVE_FORMAT_BLOCK_OBJECTS}from'../common/index.js';import{PolicyRuleSchema}from'../query/index.js';import{SupportedValueSchema}from'../common/index.js';export const RepositoryIdSchema=z['union']([z['string'](),z['number'](),AccountOrMark_AddressSchema])['describe']('Data\x20item\x20ID.\x20Supports:\x20plain\x20string(bigint),\x20number\x20(such\x20as\x20timestamp),\x20or\x20AccountOrMark_Address\x20format.');export const KeyDataSchema=z['object']({'id':RepositoryIdSchema,'data':SupportedValueSchema})['strict']()['describe']('Data\x20ID\x20and\x20value.');export const RepDataItemSchema=z['object']({'data':z['array'](KeyDataSchema)['describe']('Data\x20item\x20list.\x20MUST\x20be\x20non-empty\x20unless\x20the\x20matching\x20policy\x20guard\x20sets\x20BOTH\x20id_from_submission\x20AND\x20data_from_submission\x20(then\x20pass\x20data:[]\x20—\x20the\x20id\x20AND\x20value\x20are\x20derived\x20from\x20the\x20passport\x20submission\x20table,\x20and\x20any\x20item-level\x20id/data\x20would\x20be\x20ignored).\x20With\x20only\x20ONE\x20of\x20the\x20two\x20submission\x20settings,\x20\x27data\x27\x20must\x20carry\x20the\x20missing\x20side;\x20with\x20none,\x20\x27data\x27\x20is\x20required.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_add\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0):\x20it\x20must\x20reference\x20one\x20of\x20that\x20policy\x27s\x20write_guard\x20guards,\x20otherwise\x20the\x20chain\x20aborts\x20with\x2022\x20(E_POLICY_WRITE_GUARD_REQUIRED).\x20Optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('List\x20of\x20data\x20items\x20to\x20write.');export const SignerOrClockBaseSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.')})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20ID.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const SignerOrClockSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20Used\x20to\x20specify\x20the\x20policy\x20write\x20permissions\x20and\x20rules\x20corresponding\x20to\x20this\x20Guard.'),'data':SupportedValueSchema})['strict']()['describe']('Specify\x20data\x20items\x20by\x20name\x20and\x20data.\x20ID\x20is\x20the\x20on-chain\x20timestamp\x20or\x20signer\x20ID\x20(depending\x20on\x20how\x20write_guard\x20specifies\x20the\x20ID\x20source).');export const DataRemoveItemSchema=z['object']({'id':z['array'](RepositoryIdSchema)['describe']('Data\x20item\x20ID\x20list.'),'write_guard':NameOrAddressSchema['optional']()['describe']('Guard\x20ID\x20or\x20name.\x20REQUIRED\x20for\x20data_remove\x20items\x20when\x20the\x20matching\x20policy\x20uses\x20id_from=None(0);\x20optional\x20for\x20Clock/Signer\x20policies.')})['strict']()['describe']('Delete\x20data\x20items\x20by\x20name\x20and\x20ID\x20list.');export const PoliciesAddSetSchema=z['object']({'op':z['enum'](['add','set']),'policy':z['array'](PolicyRuleSchema)['describe']('Policy\x20rule\x20list.')})['strict']()['describe']('op:\x27set\x27\x20REPLACES\x20THE\x20WHOLE\x20policy\x20list\x20(policies\x20not\x20included\x20are\x20deleted,\x20and\x20once\x20the\x20Permission\x20is\x20locked\x20they\x20cannot\x20be\x20restored)\x20—\x20use\x20op:\x27add\x27\x20to\x20append\x20or\x20update\x20individual\x20policies\x20without\x20touching\x20the\x20others.');export const PoliciesRemoveSchema=z['object']({'op':z['literal']('remove'),'policy':z['array'](NameSchema)['describe']('Policy\x20rule\x20name\x20list.')})['strict']()['describe']('Remove\x20policy\x20rules.');export const PoliciesClearSchema=z['object']({'op':z['literal']('clear')})['strict']()['describe']('Clear\x20policy\x20rules.');export const PoliciesSchema=z['discriminatedUnion']('op',[PoliciesAddSetSchema,PoliciesRemoveSchema,PoliciesClearSchema]);export const DataAddWithItemsSchema=z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](RepDataItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20add.\x20WORKED\x20EXAMPLES\x20by\x20policy\x20id_from\x20mode\x20—\x20(a)\x20id_from=None(0),\x20policy\x20has\x20NO\x20write\x20guards:\x20items:[{data:[{id:\x220x2::example::0x123...\x22,\x20data:\x22value\x22}]}]\x20(no\x20write_guard).\x20(b)\x20id_from=None(0),\x20policy\x20HAS\x20write\x20guards\x20without\x20submission\x20settings:\x20items:[{write_guard:\x22<policy\x20guard>\x22,\x20data:[{id:...,\x20data:...}]}].\x20(c)\x20id_from=None(0),\x20policy\x20guard\x20sets\x20BOTH\x20id_from_submission\x20AND\x20data_from_submission:\x20items:[{write_guard:\x22<policy\x20guard>\x22,\x20data:[]}]\x20—\x20the\x20id\x20AND\x20value\x20come\x20from\x20the\x20passport\x20submission\x20table\x20(send\x20\x27submission\x27\x20in\x20the\x20same\x20call);\x20item-level\x20id/data\x20are\x20IGNORED\x20for\x20such\x20guards\x20and\x20one\x20record\x20is\x20written\x20per\x20guard.\x20(d)\x20id_from=Clock(1)/Signer(2):\x20use\x20the\x20SignerOrClock\x20form\x20{name,\x20data,\x20write_guard?}\x20instead\x20—\x20the\x20id\x20is\x20derived\x20on-chain\x20from\x20the\x20transaction\x20clock\x20or\x20signer;\x20write_guard\x20is\x20required\x20when\x20the\x20policy\x20declares\x20guards.')})['strict']()['describe']('Add\x20data\x20by\x20name\x20and\x20data\x20item\x20list.\x20Each\x20data\x20item\x20contains\x20name,\x20ID,\x20and\x20data\x20parts,\x20where\x20name\x20and\x20ID\x20together\x20form\x20the\x20unique\x20key\x20for\x20the\x20data.\x20See\x20\x27items\x27\x20for\x20worked\x20examples\x20per\x20policy\x20id_from\x20mode.');export const DataAddSchema=z['union']([SignerOrClockSchema,DataAddWithItemsSchema]);export const DataRemoveSchema=z['union']([SignerOrClockBaseSchema,z['object']({'name':NameSchema['describe']('Data\x20item\x20name.\x20Must\x20match\x20the\x20name\x20in\x20PolicyRule.'),'items':z['array'](DataRemoveItemSchema)['describe']('List\x20of\x20data\x20items\x20to\x20delete.')})['strict']()]);export const CallRepository_DataSchema=z['object']({'object':WithPermissionObjectSchema,'description':DescriptionSchema['optional'](),'policies':PoliciesSchema['optional']()['describe']('Write\x20and\x20read\x20permission\x20rules\x20governing\x20the\x20data\x20records\x20of\x20this\x20Repository.'),'data_add':DataAddSchema['optional']()['describe']('Add\x20data\x20items\x20to\x20an\x20ALREADY-EXISTING\x20Repository.\x20TWO-PHASE:\x20if\x20\x27object\x27\x20creates\x20a\x20NEW\x20Repository\x20in\x20this\x20same\x20call,\x20data_add\x20FAILS\x20(\x27Repository\x20content\x20not\x20ready\x27)\x20—\x20first\x20create\x20the\x20Repository\x20(one\x20call),\x20then\x20add\x20data\x20in\x20a\x20follow-up\x20call.\x20The\x20data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name\x20defined\x20in\x20\x27policies\x27.\x20SUBMISSION\x20GUARDS:\x20when\x20the\x20matched\x20policy\x20guard\x20sets\x20both\x20id_from_submission\x20and\x20data_from_submission,\x20the\x20id\x20AND\x20value\x20are\x20read\x20from\x20the\x20passport\x20submission\x20table\x20—\x20pass\x20items:[{write_guard,\x20data:[]}]\x20with\x20a\x20\x27submission\x27\x20in\x20the\x20same\x20call;\x20empty\x20items\x20or\x20entries\x20that\x20would\x20write\x20nothing\x20are\x20rejected\x20instead\x20of\x20silently\x20succeeding.\x20See\x20DataAddWithItemsSchema.items\x20for\x20worked\x20examples\x20per\x20id_from\x20mode.'),'data_remove':DataRemoveSchema['optional']()['describe']('Delete\x20data\x20items'),'rewards':ObjectsSchema['optional']()['describe']('Reward\x20objects\x20bound\x20to\x20this\x20Repository\x20to\x20incentivize\x20data\x20contribution.'),'owner_receive':ReceivedObjectsOrRecentlySchema['optional']()['describe']('Unwrap\x20CoinWrapper\x20objects\x20and\x20other\x20objects\x20received\x20by\x20this\x20Repository\x20object\x20and\x20send\x20them\x20to\x20the\x20owner\x20of\x20its\x20Permission\x20object.'+RECEIVE_FORMAT_BLOCK_OBJECTS),'um':z['union']([NameOrAddressSchema,z['null']()])['optional']()['describe']('Contact\x20object\x20ID\x20or\x20name.')})['strict']()['describe']('On-chain\x20Repository\x20operations.\x20USAGE:\x20(1)\x20CREATE\x20NEW:\x20Set\x20\x27object\x27\x20field\x20with\x20OBJECT\x20format\x20{name,\x20permission,\x20...}\x20to\x20create\x20a\x20Repository.\x20NOTE:\x20\x27name\x27\x20goes\x20INSIDE\x20\x27object\x27,\x20NOT\x20at\x20the\x20data\x20root\x20level.\x20\x27permission\x27\x20can\x20be\x20a\x20new\x20Permission\x20object\x20or\x20reference\x20an\x20existing\x20one\x20-\x20check\x20\x27object\x27\x20field\x20description\x20for\x20details.\x20(2)\x20OPERATE\x20EXISTING:\x20Set\x20\x27object\x27\x20field\x20with\x20STRING\x20format\x20(object\x20ID\x20or\x20name).\x20The\x20\x27object\x27\x20field\x20is\x20CRITICAL\x20and\x20REQUIRED\x20in\x20both\x20cases.\x20STRING\x20for\x20existing,\x20OBJECT\x20for\x20new\x20creation.');export const CallRepository_InputSchema=z['object']({'data':CallRepository_DataSchema,'env':CallEnvSchema['optional'](),'submission':SubmissionCallSchema['optional']()})['strict']();
|
|
@@ -173,6 +173,10 @@ export declare const CallReward_InputSchema: z.ZodObject<{
|
|
|
173
173
|
client_schema_version: z.ZodOptional<z.ZodString>;
|
|
174
174
|
schema_strict_mode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
175
175
|
dry_run: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
response_level: z.ZodOptional<z.ZodEnum<{
|
|
177
|
+
compact: "compact";
|
|
178
|
+
full: "full";
|
|
179
|
+
}>>;
|
|
176
180
|
confirm_mode: z.ZodOptional<z.ZodEnum<{
|
|
177
181
|
full: "full";
|
|
178
182
|
streamlined: "streamlined";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{afterEach,describe,expect,it}from'vitest';import{setEnabled,reset}from'../../config/runtime.js';import{buildDataSemantic}from'./semantic.js';function trustResult(){return{'evaluation_id':'graph_service_trust','total':0x2b,'level':'high','breakdown':[{'rule_id':'trust_arbitration','dimension':'trust','score':0x0,'weight':0x14,'reason':'No\x20arbitration\x20binding\x20configured\x20(verified\x20absence)\x20—\x20binding\x20table\x20empty','mismatched':['arbitration_binding']},{'rule_id':'trust_fund_safety','dimension':'trust','score':0x28,'weight':0xf,'reason':'Fund\x20safety\x206/15\x20—\x20Compensation\x20fund\x200\x20base\x20units','mismatched':['no\x20compensation\x20fund']},{'rule_id':'trust_reviews','dimension':'trust','score':0x32,'weight':0x23,'reason':'No\x20reputation\x20signal\x20(verified\x20empty\x20window)\x20—\x200\x20votes'}],'red_flags':['service\x20paused\x20by\x20merchant'],'blocked':!![],'trace':[],'summary':'Service\x20trust\x2043/100\x20(high)\x20—\x20weakest\x20trust_arbitration\x200/100\x20—\x20binding\x20table\x20empty','unverified':[]};}function riskResult(){return{'evaluation_id':'graph_service_risk','total':0x41,'level':'medium_high','breakdown':[{'rule_id':'risk_workflow','dimension':'workflow','score':0x4e,'weight':0x23,'reason':'1\x20structural\x20finding(s):\x20[high]\x20Forward\x20sink\x20—\x20analyzer\x20findings','mismatched':['wf_sink']}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20risk\x2065/100\x20(medium_high)\x20—\x20weakest\x20risk_workflow\x2078/100\x20—\x201\x20structural\x20finding(s)','unverified':[]};}function fixtureEvaluation(){return{'target':'0xsvc','trust':trustResult(),'risk':riskResult(),'completeness':0x56,'coverage':[{'slot':'service_snapshot','label':'Service\x20snapshot','gloss':'g','required':!![],'state':'present','facts':[]},{'slot':'reviews','label':'Review\x20votes','gloss':'g','required':![],'state':'empty','facts':[]},{'slot':'machine_workflow','label':'Workflow','gloss':'g','required':!![],'state':'gap','facts':[]}],'unverified':['trust_reviews'],'vocabulary':{'present':'p','empty':'e','gap':'g','unverified':'u','completeness':'c'}};}const BUY_DATA={'object':'0xsvc','order_new':{'buy':{'items':[],'total_pay':{'balance':'1'}}}};afterEach(()=>{reset('customer_intelligence');}),describe('Task\x2021\x20—\x20customer_advice\x20projects\x20the\x20graph\x20evaluation\x20(TR-21.1)',()=>{it('preorder\x20advice:\x20findings\x20text\x20cites\x20the\x20breakdown\x20evidence,\x20red\x20flag\x20at\x20required\x20priority',()=>{const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),b=a?.['customer_advice'];expect(b)['toBeDefined'](),expect(b['risk_score'])['toBe'](0x41),expect(b['risk_level'])['toBe']('medium_high');const c=b['reminders']['filter'](i=>i['priority']==='required');expect(c)['toHaveLength'](0x1),expect(c[0x0]['stage'])['toBe']('preorder'),expect(c[0x0]['message'])['toContain']('
|
|
1
|
+
import{afterEach,describe,expect,it}from'vitest';import{setEnabled,reset}from'../../config/runtime.js';import{buildDataSemantic,buildSemantic}from'./semantic.js';function trustResult(){return{'evaluation_id':'graph_service_trust','total':0x2b,'level':'high','breakdown':[{'rule_id':'trust_arbitration','dimension':'trust','score':0x0,'weight':0x14,'reason':'No\x20arbitration\x20binding\x20configured\x20(verified\x20absence)\x20—\x20binding\x20table\x20empty','mismatched':['arbitration_binding']},{'rule_id':'trust_fund_safety','dimension':'trust','score':0x28,'weight':0xf,'reason':'Fund\x20safety\x206/15\x20—\x20Compensation\x20fund\x200\x20base\x20units','mismatched':['no\x20compensation\x20fund']},{'rule_id':'trust_reviews','dimension':'trust','score':0x32,'weight':0x23,'reason':'No\x20reputation\x20signal\x20(verified\x20empty\x20window)\x20—\x200\x20votes'}],'red_flags':['service\x20paused\x20by\x20merchant'],'blocked':!![],'trace':[],'summary':'Service\x20trust\x2043/100\x20(high)\x20—\x20weakest\x20trust_arbitration\x200/100\x20—\x20binding\x20table\x20empty','unverified':[]};}function riskResult(){return{'evaluation_id':'graph_service_risk','total':0x41,'level':'medium_high','breakdown':[{'rule_id':'risk_workflow','dimension':'workflow','score':0x4e,'weight':0x23,'reason':'1\x20structural\x20finding(s):\x20[high]\x20Forward\x20sink\x20—\x20analyzer\x20findings','mismatched':['wf_sink']}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20risk\x2065/100\x20(medium_high)\x20—\x20weakest\x20risk_workflow\x2078/100\x20—\x201\x20structural\x20finding(s)','unverified':[]};}function fixtureEvaluation(){return{'target':'0xsvc','trust':trustResult(),'risk':riskResult(),'completeness':0x56,'coverage':[{'slot':'service_snapshot','label':'Service\x20snapshot','gloss':'g','required':!![],'state':'present','facts':[]},{'slot':'reviews','label':'Review\x20votes','gloss':'g','required':![],'state':'empty','facts':[]},{'slot':'machine_workflow','label':'Workflow','gloss':'g','required':!![],'state':'gap','facts':[]}],'unverified':['trust_reviews'],'vocabulary':{'present':'p','empty':'e','gap':'g','unverified':'u','completeness':'c'}};}const BUY_DATA={'object':'0xsvc','order_new':{'buy':{'items':[],'total_pay':{'balance':'1'}}}};afterEach(()=>{reset('customer_intelligence');}),describe('Task\x2021\x20—\x20customer_advice\x20projects\x20the\x20graph\x20evaluation\x20(TR-21.1)',()=>{it('preorder\x20advice:\x20findings\x20text\x20cites\x20the\x20breakdown\x20evidence,\x20red\x20flag\x20at\x20required\x20priority',()=>{const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),b=a?.['customer_advice'];expect(b)['toBeDefined'](),expect(b['risk_score'])['toBe'](0x41),expect(b['risk_level'])['toBe']('medium_high');const c=b['reminders']['filter'](i=>i['priority']==='required');expect(c)['toHaveLength'](0x1),expect(c[0x0]['stage'])['toBe']('preorder'),expect(c[0x0]['message'])['toContain']('Pre-payment\x20advisory\x20(the\x20gate\x20does\x20not\x20stop\x20the\x20payment)'),expect(c[0x0]['message'])['toContain']('service\x20paused\x20by\x20merchant');const d=b['reminders']['filter'](i=>i['priority']==='recommended'),e=d['map'](i=>i['message'])['join']('\x20|\x20');expect(e)['toContain']('Arbitration\x200/100\x20—\x20No\x20arbitration\x20binding\x20configured\x20(verified\x20absence)'),expect(e)['toContain']('missing/unmet:\x20arbitration_binding'),expect(e)['toContain']('Fund\x20safety\x206/15\x20—\x20Compensation\x20fund\x200\x20base\x20units'),expect(e)['toContain']('1\x20structural\x20finding(s):\x20[high]\x20Forward\x20sink'),expect(d[0x0]['message'])['toContain']('Arbitration\x200/100');const f=b['reminders']['map'](i=>i['message'])['join']('\x20|\x20');expect(f)['toContain']('Unverifiable\x20dimensions\x20(excluded\x20from\x20the\x20score\x20due\x20to\x20fetch\x20gaps):\x20Reputation'),expect(f)['toContain']('treat\x20them\x20as\x20unknown,\x20not\x20as\x20passed'),expect(f)['toContain']('Coverage\x20gap:\x20required\x20material\x20\x22machine_workflow\x22'),expect(f)['not']['toContain']('\x22reviews\x22'),expect(b['recommendations'])['toContain']('Resolve\x20the\x20red\x20flags\x20with\x20the\x20merchant\x20or\x20pick\x20another\x20service\x20before\x20paying');const g=b['recommendations']['filter'](i=>i['includes']('below\x20your\x20risk\x20appetite'));expect(g)['toHaveLength'](0x1),expect(g[0x0])['toContain']('Trust\x2043/100\x20is\x20below\x20your\x20risk\x20appetite\x20(50)'),expect(g[0x0])['toContain']('Service\x20trust\x2043/100\x20(high)');const h=b['reminders']['map'](i=>i['priority']);expect(h['indexOf']('required'))['toBeLessThan'](h['indexOf']('recommended')),expect(h['lastIndexOf']('info'))['toBeGreaterThan'](h['lastIndexOf']('recommended'));}),it('browse\x20advice:\x20reuses\x20the\x20evaluation\x20embedded\x20in\x20the\x20response\x20envelope\x20(no\x20threading)',()=>{const a=buildDataSemantic({'evaluation':fixtureEvaluation()},{'operation_type':'query_toolkit','data':{}}),b=a?.['customer_advice'];expect(b)['toBeDefined'](),expect(b['reminders']['every'](c=>c['stage']==='browse'))['toBe'](!![]),expect(b['reminders']['map'](c=>c['message'])['join']('\x20'))['toContain']('service\x20paused\x20by\x20merchant'),expect(b['reminders']['map'](c=>c['message'])['join']('\x20'))['not']['toContain']('Blocked:');}),it('executed\x20order:\x20red\x20flags\x20become\x20a\x20post-hoc\x20advisory,\x20never\x20\x27Blocked\x27\x20(docs#45)',()=>{const a={'kind':'transaction','executed':!![],'digest':'0xdigest','objectChanges':[],'created':[],'modified':[],'events':[],'balanceChanges':[],'raw':{}},b=buildSemantic(a,{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),c=b?.['customer_advice'];expect(c)['toBeDefined']();const d=c['reminders']['filter'](e=>e['priority']==='required');expect(d)['toHaveLength'](0x1),expect(d[0x0]['message'])['toContain']('the\x20order\x20already\x20executed'),expect(d[0x0]['message'])['toContain']('service\x20paused\x20by\x20merchant'),expect(c['reminders']['map'](e=>e['message'])['join']('\x20'))['not']['toContain']('Blocked:');}),it('no\x20evaluation\x20→\x20no\x20advice\x20(order\x20ops,\x20bare\x20service\x20ops,\x20unevaluated\x20queries)',()=>{expect(buildDataSemantic({},{'operation_type':'order','data':{'object':'0xorder'}})?.['customer_advice'])['toBeUndefined'](),expect(buildDataSemantic({},{'operation_type':'service','data':{'object':'0xsvc'}})?.['customer_advice'])['toBeUndefined'](),expect(buildDataSemantic({},{'operation_type':'query_toolkit','data':{}})?.['customer_advice'])['toBeUndefined']();}),it('clean\x20evaluation:\x20a\x20single\x20info\x20reminder\x20cites\x20both\x20measured\x20summaries',()=>{const a={'target':'0xsvc','trust':{'evaluation_id':'graph_service_trust','total':0x5c,'level':'low','breakdown':[{'rule_id':'trust_arbitration','dimension':'trust','score':0x64,'weight':0x14,'reason':'Arbitration\x2020/20\x20—\x20binding\x20active'}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20trust\x2092/100\x20(low)','unverified':[]},'risk':{'evaluation_id':'graph_service_risk','total':0x64,'level':'low','breakdown':[{'rule_id':'risk_workflow','dimension':'workflow','score':0x64,'weight':0x23,'reason':'No\x20structural\x20risk\x20fired\x20—\x20clean\x20findings'}],'red_flags':[],'blocked':![],'trace':[],'summary':'Service\x20risk\x20100/100\x20(low)','unverified':[]},'completeness':0x64,'coverage':[{'slot':'service_snapshot','label':'Service\x20snapshot','gloss':'g','required':!![],'state':'present','facts':[]}],'unverified':[],'vocabulary':{'present':'p','empty':'e','gap':'g','unverified':'u','completeness':'c'}},b=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':a}),c=b?.['customer_advice'];expect(c)['toBeDefined'](),expect(c['reminders'])['toHaveLength'](0x1),expect(c['reminders'][0x0]['priority'])['toBe']('info'),expect(c['reminders'][0x0]['message'])['toContain']('No\x20adverse\x20findings\x20in\x20the\x20graph\x20evaluation\x20—\x20Service\x20trust\x2092/100\x20(low)\x20—\x20Service\x20risk\x20100/100\x20(low)');}),it('customer_intelligence\x20disabled\x20→\x20advice\x20never\x20populates',()=>{setEnabled('customer_intelligence',![]);const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()});expect(a?.['customer_advice'])['toBeUndefined']();}),it('no\x20heuristic\x20leakage:\x20reminder\x20text\x20never\x20falls\x20back\x20to\x20the\x20retired\x20reminder\x20table',()=>{const a=buildDataSemantic({},{'operation_type':'service','data':BUY_DATA,'evaluation':fixtureEvaluation()}),b=JSON['stringify'](a?.['customer_advice']);expect(b)['not']['toContain']('Require\x20the\x20merchant\x20to\x20configure\x20an\x20Arbitration\x20service\x20before\x20placing\x20the\x20order'),expect(b)['not']['toContain']('Require\x20the\x20merchant\x20to\x20set\x20a\x20compensation_fund\x20to\x20guarantee');});});
|
|
@@ -9,7 +9,18 @@ export interface SemanticContext {
|
|
|
9
9
|
operation_id?: string;
|
|
10
10
|
pre_warnings?: string[];
|
|
11
11
|
schema_check?: import("../schema-version.js").SchemaCheckResult;
|
|
12
|
+
response_level?: "compact" | "full";
|
|
12
13
|
evaluation?: GraphServiceEvaluation;
|
|
14
|
+
passport_test?: {
|
|
15
|
+
passport_id?: string;
|
|
16
|
+
result?: boolean;
|
|
17
|
+
has_verified?: boolean;
|
|
18
|
+
info?: {
|
|
19
|
+
guard: string;
|
|
20
|
+
result: boolean;
|
|
21
|
+
impack?: boolean;
|
|
22
|
+
}[];
|
|
23
|
+
};
|
|
13
24
|
}
|
|
14
25
|
export type ErrorCode = ErrorCodeValue;
|
|
15
26
|
export interface MoveAbortInfo {
|