wowok_agent 2.1.39 → 2.2.0
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/index.js +1237 -1
- package/dist/schema/call/allocation.js +24 -1
- package/dist/schema/call/arbitration.js +92 -1
- package/dist/schema/call/base.js +134 -1
- package/dist/schema/call/contact.js +37 -1
- package/dist/schema/call/demand.js +47 -1
- package/dist/schema/call/guard.js +58 -1
- package/dist/schema/call/handler.js +171 -1
- package/dist/schema/call/index.js +18 -1
- package/dist/schema/call/machine.js +152 -1
- package/dist/schema/call/order.js +34 -1
- package/dist/schema/call/payment.js +17 -1
- package/dist/schema/call/permission.js +105 -1
- package/dist/schema/call/personal.js +68 -1
- package/dist/schema/call/progress.js +26 -1
- package/dist/schema/call/proof.js +27 -1
- package/dist/schema/call/repository.js +76 -1
- package/dist/schema/call/reward.js +42 -1
- package/dist/schema/call/service.js +82 -1
- package/dist/schema/call/treasury.js +71 -1
- package/dist/schema/common/index.js +345 -1
- package/dist/schema/index.js +7 -1
- package/dist/schema/local/index.js +855 -1
- package/dist/schema/local/wip.js +187 -1
- package/dist/schema/messenger/index.d.ts +4 -4
- package/dist/schema/messenger/index.js +446 -1
- package/dist/schema/query/index.js +1265 -1
- package/dist/schema/utils/guard-parser.js +401 -1
- package/dist/schema/utils/guard-query-utils.js +22 -1
- package/dist/schema/utils/node-parser.js +353 -1
- package/dist/schema/utils/permission-index-utils.js +7 -1
- package/package.json +3 -5
package/dist/schema/local/wip.js
CHANGED
|
@@ -1 +1,187 @@
|
|
|
1
|
-
import{z}from'zod';export const WipConstraints={'maxImageSize':0x2*0x400*0x400,'maxTotalSize':0xa*0x400*0x400,'maxImageCount':0xa,'maxTextLength':0x2710,'schemaUrl':'https://schema.wip.wowok.net/v1','version':'1.0.0'};export const TextFormatSchema=z['union']([z['literal']('plain')['describe']('Plain\x20text\x20format'),z['literal']('markdown')['describe']('Markdown\x20format'),z['literal']('html')['describe']('HTML\x20format')])['describe']('Text\x20content\x20format');export const ImageMimeTypeSchema=z['union']([z['literal']('image/png')['describe']('PNG\x20image'),z['literal']('image/jpeg')['describe']('JPEG\x20image'),z['literal']('image/gif')['describe']('GIF\x20image'),z['literal']('image/webp')['describe']('WebP\x20image')])['describe']('Image\x20MIME\x20type');export const HashAlgorithmSchema=z['literal']('sha256')['describe']('Hash\x20algorithm,\x20fixed\x20as\x20sha256');export const SignatureAlgorithmSchema=z['literal']('Ed25519')['describe']('Signature\x20algorithm,\x20fixed\x20as\x20Ed25519');export const WipContentSchema=z['object']({'text':z['string']()['max'](WipConstraints['maxTextLength'])['describe']('Text\x20content'),'format':TextFormatSchema['describe']('Text\x20format')})['describe']('WIP\x20content');export const WipMediaSchema=z['object']({'id':z['string']()['describe']('Unique\x20media\x20file\x20identifier'),'type':ImageMimeTypeSchema['describe']('Media\x20file\x20MIME\x20type'),'data':z['string']()['describe']('Base64\x20encoded\x20file\x20data'),'filename':z['string']()['optional']()['describe']('Optional\x20file\x20name')})['describe']('WIP\x20media\x20file');export const WipPayloadSchema=z['object']({'content':WipContentSchema['describe']('Text\x20content'),'media':z['array'](WipMediaSchema)['max'](WipConstraints['maxImageCount'])['describe']('Media\x20file\x20array')})['describe']('WIP\x20content\x20payload');export const WipSignatureSchema=z['object']({'value':z['string']()['describe']('Base64\x20encoded\x20signature\x20value'),'publicKey':z['string']()['describe']('Verification\x20public\x20key\x20(Base64\x20encoded\x2032\x20bytes)\x20or\x20DID'),'algorithm':SignatureAlgorithmSchema['describe']('Signature\x20algorithm'),'address':z['string']()['optional']()['describe']('Signer\x20address')})['describe']('WIP\x20digital\x20signature');export const WipSignatureArraySchema=z['union']([WipSignatureSchema,z['array'](WipSignatureSchema)])['describe']('Single\x20signature\x20or\x20signature\x20array\x20(supports\x20multi-signature)');export const WipMetaSchema=z['object']({'type':z['literal']('wip')['describe']('File\x20type\x20identifier,\x20fixed\x20as\x20wip'),'version':z['string']()['describe']('Format\x20version\x20number'),'created':z['string']()['describe']('Creation\x20time\x20(ISO\x208601\x20format)'),'hash':z['string']()['describe']('SHA-256\x20hash\x20of\x20payload,\x20format:\x20sha256:hexString'),'algorithm':HashAlgorithmSchema['describe']('Hash\x20algorithm\x20identifier'),'signature':WipSignatureArraySchema['optional']()['describe']('Optional\x20digital\x20signature')})['describe']('WIP\x20metadata');export const WipFileSchema=z['object']({'wip':z['string']()['describe']('Root\x20identifier,\x20value\x20is\x20schema\x20URL'),'payload':WipPayloadSchema['describe']('Content\x20payload'),'meta':WipMetaSchema['describe']('Metadata')})['describe']('Complete\x20WIP\x20file\x20structure');export const ImageSourceSchema=z['object']({'source':z['string']()['describe']('Image\x20source\x20path\x20or\x20URL.\x20Supports:\x201)\x20Local\x20file\x20path\x20(e.g.,\x20\x27/path/to/image.png\x27,\x20\x27C:\x5cUsers\x5cname\x5cimage.jpg\x27),\x202)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/image.png\x27,\x20\x27http://site.com/photo.jpg\x27),\x203)\x20Data\x20URL\x20(e.g.,\x20\x27data:image/png;base64,iVBORw0K...\x27)'),'id':z['string']()['optional']()['describe']('Optional\x20image\x20ID\x20for\x20reference\x20in\x20the\x20WIP\x20content.\x20If\x20not\x20provided,\x20an\x20ID\x20will\x20be\x20auto-generated\x20based\x20on\x20index\x20(e.g.,\x20\x27image_0\x27,\x20\x27image_1\x27)'),'filename':z['string']()['optional']()['describe']('Optional\x20file\x20name.\x20If\x20not\x20provided,\x20will\x20be\x20extracted\x20from\x20URL\x20path\x20or\x20local\x20file\x20name')})['describe']('Image\x20source\x20for\x20WIP\x20generation');export const WipGenerationOptionsSchema=z['object']({'markdown_text':z['string']()['max'](WipConstraints['maxTextLength'])['describe']('Markdown\x20formatted\x20text\x20content'),'images':z['array'](ImageSourceSchema)['max'](WipConstraints['maxImageCount'])['optional']()['describe']('Optional\x20image\x20list'),'account':z['string']()['optional']()['describe']('Optional\x20signing\x20account\x20(account\x20name\x20or\x20address).\x20If\x20specified,\x20uses\x20Account\x20module\x20for\x20signing')})['required']({'markdown_text':!![]})['describe']('WIP\x20generation\x20options');export const WipSignatureVerificationSchema=z['object']({'publicKey':z['string']()['describe']('Signature\x20public\x20key'),'address':z['string']()['optional']()['describe']('Address\x20derived\x20from\x20public\x20key'),'valid':z['boolean']()['describe']('Whether\x20signature\x20is\x20valid')})['describe']('Single\x20signature\x20verification\x20result');export const WipVerificationResultSchema=z['object']({'valid':z['boolean']()['describe']('Whether\x20verification\x20passed'),'error':z['string']()['optional']()['describe']('Error\x20message\x20(when\x20verification\x20fails)'),'hashValid':z['boolean']()['describe']('Whether\x20hash\x20verification\x20passed'),'signatureValid':z['boolean']()['optional']()['describe']('Whether\x20signature\x20verification\x20passed\x20(when\x20signature\x20exists)'),'hasSignature':z['boolean']()['describe']('Whether\x20signature\x20exists'),'signatures':z['array'](WipSignatureVerificationSchema)['optional']()['describe']('Signature\x20verification\x20details\x20list')})['catchall'](z['record'](z['string'](),z['union']([z['string'](),z['number'](),z['boolean']()])))['describe']('WIP\x20verification\x20result');export const WipToHtmlOptionsSchema=z['object']({'title':z['string']()['optional']()['describe']('HTML\x20page\x20title'),'theme':z['union']([z['literal']('light'),z['literal']('dark')])['optional']()['describe']('Theme\x20style'),'outputPath':z['string']()['optional']()['describe']('Output\x20file\x20path\x20(if\x20specified,\x20saves\x20to\x20file).\x20For\x20single\x20file:\x20saves\x20HTML\x20to\x20this\x20path.\x20For\x20directory:\x20saves\x20all\x20converted\x20HTML\x20files\x20to\x20this\x20directory')})['describe']('WIP\x20to\x20HTML\x20conversion\x20options');export const GenerateWip_InputSchema=z['object']({'options':WipGenerationOptionsSchema['describe']('WIP\x20generation\x20options'),'outputPath':z['string']()['describe']('Output\x20file\x20path\x20(.wip\x20file).\x20If\x20file\x20exists,\x20it\x20will\x20be\x20overwritten')})['describe']('Generate\x20WIP\x20file\x20tool\x20input\x20parameters');export const VerifyWip_InputSchema=z['object']({'wipFilePath':z['string']()['describe']('WIP\x20file\x20path\x20to\x20verify.\x20Supports:\x201)\x20Local\x20file\x20path\x20(e.g.,\x20\x27/path/to/file.wip\x27,\x20\x27C:\x5cUsers\x5cname\x5cdoc.wip\x27),\x202)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27,\x20\x27http://site.com/file.wip\x27),\x203)\x20Data\x20URL\x20(e.g.,\x20\x27data:application/json;base64,eyJ3aXAiOi...\x27)'),'hash_equal':z['string']()['optional']()['describe']('Optional\x20expected\x20hash\x20value.\x20If\x20provided,\x20the\x20function\x20will\x20first\x20verify\x20if\x20the\x20file\x27s\x20hash\x20matches\x20this\x20value.\x20If\x20not\x20matched,\x20returns\x20hash\x20mismatch\x20error.'),'requireSignature':z['boolean']()['optional']()['describe']('Optional\x20flag\x20to\x20require\x20digital\x20signature.\x20If\x20true,\x20verification\x20will\x20fail\x20if\x20WIP\x20file\x20has\x20no\x20signature')})['describe']('Verify\x20WIP\x20file\x20tool\x20input\x20parameters');export const SignWip_InputSchema=z['object']({'wipFilePath':z['string']()['describe']('WIP\x20file\x20path\x20to\x20sign.\x20Supports:\x201)\x20Local\x20file\x20path\x20(e.g.,\x20\x27/path/to/file.wip\x27),\x202)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27).\x20The\x20file\x20will\x20be\x20loaded,\x20validated,\x20and\x20signed'),'account':z['string']()['optional']()['describe']('Signing\x20account\x20(account\x20name\x20or\x20address).\x20If\x20not\x20specified,\x20uses\x20default\x20account'),'outputPath':z['string']()['optional']()['describe']('Output\x20file\x20path.\x20If\x20not\x20specified,\x20adds\x20\x27signed_\x27\x20prefix\x20to\x20original\x20file\x20name\x20(e.g.,\x20\x27doc.wip\x27\x20becomes\x20\x27signed_doc.wip\x27)')})['describe']('Sign\x20WIP\x20file\x20tool\x20input\x20parameters');export const Wip2Html_InputSchema=z['object']({'wipPath':z['string']()['describe']('WIP\x20file\x20path\x20or\x20directory\x20path.\x20Supports:\x201)\x20Single\x20WIP\x20file\x20(e.g.,\x20\x27/path/to/file.wip\x27),\x202)\x20Directory\x20containing\x20.wip\x20files\x20(e.g.,\x20\x27/path/to/wips/\x27),\x203)\x20Network\x20URL\x20(e.g.,\x20\x27https://example.com/doc.wip\x27).\x20When\x20directory\x20is\x20provided,\x20all\x20.wip\x20files\x20in\x20the\x20directory\x20will\x20be\x20converted\x20to\x20HTML'),'options':WipToHtmlOptionsSchema['optional']()['describe']('Conversion\x20options')})['describe']('WIP\x20to\x20HTML\x20tool\x20input\x20parameters');export const GenerateWip_OutputSchema=z['object']({'filePath':z['string']()['describe']('Generated\x20WIP\x20file\x20path')})['describe']('Generate\x20WIP\x20file\x20tool\x20output\x20result');export const VerifyWip_OutputSchema=WipVerificationResultSchema['describe']('Verify\x20WIP\x20file\x20tool\x20output\x20result');export const SignWip_OutputSchema=z['object']({'filePath':z['string']()['describe']('Signed\x20WIP\x20file\x20path')})['describe']('Sign\x20WIP\x20file\x20tool\x20output\x20result');export const Wip2Html_OutputSchema=z['object']({'html':z['string']()['optional']()['describe']('HTML\x20string\x20content\x20(when\x20converting\x20single\x20file\x20without\x20outputPath)'),'filePath':z['string']()['optional']()['describe']('Output\x20file\x20path\x20(when\x20outputPath\x20is\x20specified)'),'files':z['array'](z['string']())['optional']()['describe']('Converted\x20file\x20path\x20array\x20(when\x20processing\x20directory)')})['describe']('WIP\x20to\x20HTML\x20tool\x20output\x20result');export const WipOperationOutputSchema=z['discriminatedUnion']('type',[z['object']({'type':z['literal']('generate'),'filePath':z['string']()}),z['object']({'type':z['literal']('verify'),'valid':z['boolean'](),'error':z['string']()['optional'](),'hashValid':z['boolean'](),'signatureValid':z['boolean']()['optional'](),'hasSignature':z['boolean'](),'signatures':z['array'](z['any']())['optional']()}),z['object']({'type':z['literal']('sign'),'filePath':z['string']()}),z['object']({'type':z['literal']('wip2html'),'html':z['string']()['optional'](),'filePath':z['string']()['optional'](),'files':z['array'](z['string']())['optional']()})])['describe']('WIP\x20operation\x20output\x20schema\x20with\x20discriminator');
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const WipConstraints = {
|
|
3
|
+
maxImageSize: 2 * 1024 * 1024,
|
|
4
|
+
maxTotalSize: 10 * 1024 * 1024,
|
|
5
|
+
maxImageCount: 10,
|
|
6
|
+
maxTextLength: 10000,
|
|
7
|
+
schemaUrl: "https://schema.wip.wowok.net/v1",
|
|
8
|
+
version: "1.0.0",
|
|
9
|
+
};
|
|
10
|
+
export const TextFormatSchema = z
|
|
11
|
+
.union([
|
|
12
|
+
z.literal("plain").describe("Plain text format"),
|
|
13
|
+
z.literal("markdown").describe("Markdown format"),
|
|
14
|
+
z.literal("html").describe("HTML format"),
|
|
15
|
+
])
|
|
16
|
+
.describe("Text content format");
|
|
17
|
+
export const ImageMimeTypeSchema = z
|
|
18
|
+
.union([
|
|
19
|
+
z.literal("image/png").describe("PNG image"),
|
|
20
|
+
z.literal("image/jpeg").describe("JPEG image"),
|
|
21
|
+
z.literal("image/gif").describe("GIF image"),
|
|
22
|
+
z.literal("image/webp").describe("WebP image"),
|
|
23
|
+
])
|
|
24
|
+
.describe("Image MIME type");
|
|
25
|
+
export const HashAlgorithmSchema = z
|
|
26
|
+
.literal("sha256")
|
|
27
|
+
.describe("Hash algorithm, fixed as sha256");
|
|
28
|
+
export const SignatureAlgorithmSchema = z
|
|
29
|
+
.literal("Ed25519")
|
|
30
|
+
.describe("Signature algorithm, fixed as Ed25519");
|
|
31
|
+
export const WipContentSchema = z
|
|
32
|
+
.object({
|
|
33
|
+
text: z.string().max(WipConstraints.maxTextLength).describe("Text content"),
|
|
34
|
+
format: TextFormatSchema.describe("Text format"),
|
|
35
|
+
})
|
|
36
|
+
.describe("WIP content");
|
|
37
|
+
export const WipMediaSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
id: z.string().describe("Unique media file identifier"),
|
|
40
|
+
type: ImageMimeTypeSchema.describe("Media file MIME type"),
|
|
41
|
+
data: z.string().describe("Base64 encoded file data"),
|
|
42
|
+
filename: z.string().optional().describe("Optional file name"),
|
|
43
|
+
})
|
|
44
|
+
.describe("WIP media file");
|
|
45
|
+
export const WipPayloadSchema = z
|
|
46
|
+
.object({
|
|
47
|
+
content: WipContentSchema.describe("Text content"),
|
|
48
|
+
media: z.array(WipMediaSchema).max(WipConstraints.maxImageCount).describe("Media file array"),
|
|
49
|
+
})
|
|
50
|
+
.describe("WIP content payload");
|
|
51
|
+
export const WipSignatureSchema = z
|
|
52
|
+
.object({
|
|
53
|
+
value: z.string().describe("Base64 encoded signature value"),
|
|
54
|
+
publicKey: z.string().describe("Verification public key (Base64 encoded 32 bytes) or DID"),
|
|
55
|
+
algorithm: SignatureAlgorithmSchema.describe("Signature algorithm"),
|
|
56
|
+
address: z.string().optional().describe("Signer address"),
|
|
57
|
+
})
|
|
58
|
+
.describe("WIP digital signature");
|
|
59
|
+
export const WipSignatureArraySchema = z
|
|
60
|
+
.union([WipSignatureSchema, z.array(WipSignatureSchema)])
|
|
61
|
+
.describe("Single signature or signature array (supports multi-signature)");
|
|
62
|
+
export const WipMetaSchema = z
|
|
63
|
+
.object({
|
|
64
|
+
type: z.literal("wip").describe("File type identifier, fixed as wip"),
|
|
65
|
+
version: z.string().describe("Format version number"),
|
|
66
|
+
created: z.string().describe("Creation time (ISO 8601 format)"),
|
|
67
|
+
hash: z.string().describe("SHA-256 hash of payload, format: sha256:hexString"),
|
|
68
|
+
algorithm: HashAlgorithmSchema.describe("Hash algorithm identifier"),
|
|
69
|
+
signature: WipSignatureArraySchema.optional().describe("Optional digital signature"),
|
|
70
|
+
})
|
|
71
|
+
.describe("WIP metadata");
|
|
72
|
+
export const WipFileSchema = z
|
|
73
|
+
.object({
|
|
74
|
+
wip: z.string().describe("Root identifier, value is schema URL"),
|
|
75
|
+
payload: WipPayloadSchema.describe("Content payload"),
|
|
76
|
+
meta: WipMetaSchema.describe("Metadata"),
|
|
77
|
+
})
|
|
78
|
+
.describe("Complete WIP file structure");
|
|
79
|
+
export const ImageSourceSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
source: z.string().describe("Image source path or URL. Supports: 1) Local file path (e.g., '/path/to/image.png', 'C:\\Users\\name\\image.jpg'), 2) Network URL (e.g., 'https://example.com/image.png', 'http://site.com/photo.jpg'), 3) Data URL (e.g., 'data:image/png;base64,iVBORw0K...')"),
|
|
82
|
+
id: z.string().optional().describe("Optional image ID for reference in the WIP content. If not provided, an ID will be auto-generated based on index (e.g., 'image_0', 'image_1')"),
|
|
83
|
+
filename: z.string().optional().describe("Optional file name. If not provided, will be extracted from URL path or local file name"),
|
|
84
|
+
})
|
|
85
|
+
.describe("Image source for WIP generation");
|
|
86
|
+
export const WipGenerationOptionsSchema = z
|
|
87
|
+
.object({
|
|
88
|
+
markdown_text: z.string().max(WipConstraints.maxTextLength).describe("Markdown formatted text content"),
|
|
89
|
+
images: z.array(ImageSourceSchema).max(WipConstraints.maxImageCount).optional().describe("Optional image list"),
|
|
90
|
+
account: z.string().optional().describe("Optional signing account (account name or address). If specified, uses Account module for signing"),
|
|
91
|
+
})
|
|
92
|
+
.required({ markdown_text: true })
|
|
93
|
+
.describe("WIP generation options");
|
|
94
|
+
export const WipSignatureVerificationSchema = z
|
|
95
|
+
.object({
|
|
96
|
+
publicKey: z.string().describe("Signature public key"),
|
|
97
|
+
address: z.string().optional().describe("Address derived from public key"),
|
|
98
|
+
valid: z.boolean().describe("Whether signature is valid"),
|
|
99
|
+
})
|
|
100
|
+
.describe("Single signature verification result");
|
|
101
|
+
export const WipVerificationResultSchema = z
|
|
102
|
+
.object({
|
|
103
|
+
valid: z.boolean().describe("Whether verification passed"),
|
|
104
|
+
error: z.string().optional().describe("Error message (when verification fails)"),
|
|
105
|
+
hashValid: z.boolean().describe("Whether hash verification passed"),
|
|
106
|
+
signatureValid: z.boolean().optional().describe("Whether signature verification passed (when signature exists)"),
|
|
107
|
+
hasSignature: z.boolean().describe("Whether signature exists"),
|
|
108
|
+
signatures: z.array(WipSignatureVerificationSchema).optional().describe("Signature verification details list"),
|
|
109
|
+
})
|
|
110
|
+
.catchall(z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])))
|
|
111
|
+
.describe("WIP verification result");
|
|
112
|
+
export const WipToHtmlOptionsSchema = z
|
|
113
|
+
.object({
|
|
114
|
+
title: z.string().optional().describe("HTML page title"),
|
|
115
|
+
theme: z.union([z.literal("light"), z.literal("dark")]).optional().describe("Theme style"),
|
|
116
|
+
outputPath: z.string().optional().describe("Output file path (if specified, saves to file). For single file: saves HTML to this path. For directory: saves all converted HTML files to this directory"),
|
|
117
|
+
})
|
|
118
|
+
.describe("WIP to HTML conversion options");
|
|
119
|
+
export const GenerateWip_InputSchema = z
|
|
120
|
+
.object({
|
|
121
|
+
options: WipGenerationOptionsSchema.describe("WIP generation options"),
|
|
122
|
+
outputPath: z.string().describe("Output file path (.wip file). If file exists, it will be overwritten"),
|
|
123
|
+
})
|
|
124
|
+
.describe("Generate WIP file tool input parameters");
|
|
125
|
+
export const VerifyWip_InputSchema = z
|
|
126
|
+
.object({
|
|
127
|
+
wipFilePath: z.string().describe("WIP file path to verify. Supports: 1) Local file path (e.g., '/path/to/file.wip', 'C:\\Users\\name\\doc.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip', 'http://site.com/file.wip'), 3) Data URL (e.g., 'data:application/json;base64,eyJ3aXAiOi...')"),
|
|
128
|
+
hash_equal: z.string().optional().describe("Optional expected hash value. If provided, the function will first verify if the file's hash matches this value. If not matched, returns hash mismatch error."),
|
|
129
|
+
requireSignature: z.boolean().optional().describe("Optional flag to require digital signature. If true, verification will fail if WIP file has no signature"),
|
|
130
|
+
})
|
|
131
|
+
.describe("Verify WIP file tool input parameters");
|
|
132
|
+
export const SignWip_InputSchema = z
|
|
133
|
+
.object({
|
|
134
|
+
wipFilePath: z.string().describe("WIP file path to sign. Supports: 1) Local file path (e.g., '/path/to/file.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip'). The file will be loaded, validated, and signed"),
|
|
135
|
+
account: z.string().optional().describe("Signing account (account name or address). If not specified, uses default account"),
|
|
136
|
+
outputPath: z.string().optional().describe("Output file path. If not specified, adds 'signed_' prefix to original file name (e.g., 'doc.wip' becomes 'signed_doc.wip')"),
|
|
137
|
+
})
|
|
138
|
+
.describe("Sign WIP file tool input parameters");
|
|
139
|
+
export const Wip2Html_InputSchema = z
|
|
140
|
+
.object({
|
|
141
|
+
wipPath: z.string().describe("WIP file path or directory path. Supports: 1) Single WIP file (e.g., '/path/to/file.wip'), 2) Directory containing .wip files (e.g., '/path/to/wips/'), 3) Network URL (e.g., 'https://example.com/doc.wip'). When directory is provided, all .wip files in the directory will be converted to HTML"),
|
|
142
|
+
options: WipToHtmlOptionsSchema.optional().describe("Conversion options"),
|
|
143
|
+
})
|
|
144
|
+
.describe("WIP to HTML tool input parameters");
|
|
145
|
+
export const GenerateWip_OutputSchema = z
|
|
146
|
+
.object({
|
|
147
|
+
filePath: z.string().describe("Generated WIP file path"),
|
|
148
|
+
})
|
|
149
|
+
.describe("Generate WIP file tool output result");
|
|
150
|
+
export const VerifyWip_OutputSchema = WipVerificationResultSchema.describe("Verify WIP file tool output result");
|
|
151
|
+
export const SignWip_OutputSchema = z
|
|
152
|
+
.object({
|
|
153
|
+
filePath: z.string().describe("Signed WIP file path"),
|
|
154
|
+
})
|
|
155
|
+
.describe("Sign WIP file tool output result");
|
|
156
|
+
export const Wip2Html_OutputSchema = z
|
|
157
|
+
.object({
|
|
158
|
+
html: z.string().optional().describe("HTML string content (when converting single file without outputPath)"),
|
|
159
|
+
filePath: z.string().optional().describe("Output file path (when outputPath is specified)"),
|
|
160
|
+
files: z.array(z.string()).optional().describe("Converted file path array (when processing directory)"),
|
|
161
|
+
})
|
|
162
|
+
.describe("WIP to HTML tool output result");
|
|
163
|
+
export const WipOperationOutputSchema = z.discriminatedUnion("type", [
|
|
164
|
+
z.object({
|
|
165
|
+
type: z.literal("generate"),
|
|
166
|
+
filePath: z.string(),
|
|
167
|
+
}),
|
|
168
|
+
z.object({
|
|
169
|
+
type: z.literal("verify"),
|
|
170
|
+
valid: z.boolean(),
|
|
171
|
+
error: z.string().optional(),
|
|
172
|
+
hashValid: z.boolean(),
|
|
173
|
+
signatureValid: z.boolean().optional(),
|
|
174
|
+
hasSignature: z.boolean(),
|
|
175
|
+
signatures: z.array(z.any()).optional(),
|
|
176
|
+
}),
|
|
177
|
+
z.object({
|
|
178
|
+
type: z.literal("sign"),
|
|
179
|
+
filePath: z.string(),
|
|
180
|
+
}),
|
|
181
|
+
z.object({
|
|
182
|
+
type: z.literal("wip2html"),
|
|
183
|
+
html: z.string().optional(),
|
|
184
|
+
filePath: z.string().optional(),
|
|
185
|
+
files: z.array(z.string()).optional(),
|
|
186
|
+
}),
|
|
187
|
+
]).describe("WIP operation output schema with discriminator");
|
|
@@ -1491,11 +1491,11 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1491
1491
|
}>>;
|
|
1492
1492
|
}, "strip", z.ZodTypeAny, {
|
|
1493
1493
|
content: string;
|
|
1494
|
+
operation: "send_message";
|
|
1494
1495
|
to: string | {
|
|
1495
1496
|
name_or_address?: string | undefined;
|
|
1496
1497
|
local_mark_first?: boolean | undefined;
|
|
1497
1498
|
};
|
|
1498
|
-
operation: "send_message";
|
|
1499
1499
|
options?: {
|
|
1500
1500
|
guardAddress?: string | undefined;
|
|
1501
1501
|
passportAddress?: string | undefined;
|
|
@@ -1505,11 +1505,11 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1505
1505
|
from?: string | undefined;
|
|
1506
1506
|
}, {
|
|
1507
1507
|
content: string;
|
|
1508
|
+
operation: "send_message";
|
|
1508
1509
|
to: string | {
|
|
1509
1510
|
name_or_address?: string | undefined;
|
|
1510
1511
|
local_mark_first?: boolean | undefined;
|
|
1511
1512
|
};
|
|
1512
|
-
operation: "send_message";
|
|
1513
1513
|
options?: {
|
|
1514
1514
|
guardAddress?: string | undefined;
|
|
1515
1515
|
passportAddress?: string | undefined;
|
|
@@ -1555,11 +1555,11 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1555
1555
|
}>>;
|
|
1556
1556
|
}, "strip", z.ZodTypeAny, {
|
|
1557
1557
|
filePath: string;
|
|
1558
|
+
operation: "send_file";
|
|
1558
1559
|
to: string | {
|
|
1559
1560
|
name_or_address?: string | undefined;
|
|
1560
1561
|
local_mark_first?: boolean | undefined;
|
|
1561
1562
|
};
|
|
1562
|
-
operation: "send_file";
|
|
1563
1563
|
options?: {
|
|
1564
1564
|
fileName?: string | undefined;
|
|
1565
1565
|
contentType?: "wip" | "zip" | "wts" | undefined;
|
|
@@ -1571,11 +1571,11 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1571
1571
|
from?: string | undefined;
|
|
1572
1572
|
}, {
|
|
1573
1573
|
filePath: string;
|
|
1574
|
+
operation: "send_file";
|
|
1574
1575
|
to: string | {
|
|
1575
1576
|
name_or_address?: string | undefined;
|
|
1576
1577
|
local_mark_first?: boolean | undefined;
|
|
1577
1578
|
};
|
|
1578
|
-
operation: "send_file";
|
|
1579
1579
|
options?: {
|
|
1580
1580
|
fileName?: string | undefined;
|
|
1581
1581
|
contentType?: "wip" | "zip" | "wts" | undefined;
|