UNPKG

wowok_agent

Version:

Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.

35 lines (34 loc) 2.71 kB
import { z } from "zod"; import { CallEnvSchema, SubmissionCallSchema } from "./base.js"; import { OperateSchema } from "./progress.js"; import { AccountOrMark_AddressSchema, DescriptionSchema, LongNameSchema, ManyAccountOrMark_AddressSchema, NameOrAddressSchema } from "../common/index.js"; import { QueryReceivedResultSchema } from "../common/index.js"; export const ArbConfirmSchema = z.object({ arb: NameOrAddressSchema.describe("Arb object ID or name."), confirm: z.boolean().describe("Whether to confirm that the submitted arbitration materials are valid for arbitration."), description: DescriptionSchema.optional().describe("Message description for compensation application."), proposition: z.array(LongNameSchema).optional().describe("Compensation claims.") }).strict(); export const ArbObjectionSchema = z.object({ arb: NameOrAddressSchema.describe("Arb object ID or name."), objection: DescriptionSchema.describe("Oppose and appeal the arbitration result, request re-arbitration"), }).strict(); export const ArbClaimCompensationSchema = z.object({ arb: NameOrAddressSchema.describe("Arb object ID or name."), }).strict(); export const CallOrder_DataSchema = z.object({ object: NameOrAddressSchema.describe("Order object ID or name."), agents: ManyAccountOrMark_AddressSchema.optional().describe("Order agents. Agents can operate the order, such as canceling the order, modifying the order status, etc.; but cannot receive the funds received by the order."), required_info: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID (recipient) or WTS Proof object (delivery proof) that information has been delivered via Wowok Messenger."), progress: OperateSchema.optional().describe("Advance order process"), arb_confirm: ArbConfirmSchema.optional().describe("Submit compensation request and apply for arbitration"), arb_objection: ArbObjectionSchema.optional().describe("Oppose and appeal the arbitration result, request re-arbitration."), arb_claim_compensation: ArbClaimCompensationSchema.optional().describe("Specify the adjudicated Arb object to obtain order compensation."), receive: QueryReceivedResultSchema.optional().describe("Unwrap CoinWrapper objects or other objects received by the order and transfer them to the order owner"), transfer_to: AccountOrMark_AddressSchema.optional().describe("Set new owner of the order. Requires order owner permission to set."), }).strict().describe("On-chain, operate on an Order object."); export const CallOrder_InputSchema = z.object({ data: CallOrder_DataSchema, env: CallEnvSchema.optional(), submission: SubmissionCallSchema.optional(), }).strict();