@vezham/tamizhi-contracts 0.0.0-stage → 26.3.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.
@@ -0,0 +1,179 @@
1
+ import { z } from "zod";
2
+ //#region src/lib/protocol.ts
3
+ var permissionModeSchema = z.enum([
4
+ "ask",
5
+ "safe",
6
+ "full"
7
+ ]);
8
+ var attachmentSchema = z.object({
9
+ id: z.string(),
10
+ name: z.string(),
11
+ mimeType: z.string(),
12
+ size: z.number(),
13
+ text: z.string().optional()
14
+ });
15
+ var wireMessageSchema = z.object({
16
+ id: z.string().max(128).optional(),
17
+ attachments: z.array(attachmentSchema).max(8).optional(),
18
+ role: z.enum(["user", "assistant"]),
19
+ content: z.string().max(1e5),
20
+ outfitLocked: z.boolean().optional(),
21
+ profileId: z.string().min(1).max(128).optional(),
22
+ persona: z.enum([
23
+ "helper",
24
+ "coder",
25
+ "writer",
26
+ "planner",
27
+ "tutor",
28
+ "explorer"
29
+ ]).optional(),
30
+ outfit: z.enum([
31
+ "rest",
32
+ "cook",
33
+ "investigate",
34
+ "write",
35
+ "builder",
36
+ "music",
37
+ "tutor",
38
+ "garden",
39
+ "designer",
40
+ "director",
41
+ "coach",
42
+ "traveller",
43
+ "money",
44
+ "planner",
45
+ "captain",
46
+ "tester",
47
+ "guard",
48
+ "bug"
49
+ ]).optional()
50
+ });
51
+ var runRequestSchema = z.object({
52
+ activityProfiles: z.record(z.string().min(1).max(256), z.object({
53
+ persona: wireMessageSchema.shape.persona,
54
+ outfit: wireMessageSchema.shape.outfit
55
+ })).refine((value) => Object.keys(value).length <= 64).optional(),
56
+ conversationId: z.string().min(1).max(128),
57
+ messages: z.array(wireMessageSchema).min(1).max(200),
58
+ title: z.string().max(128).optional(),
59
+ expectedVersion: z.number().int().optional(),
60
+ model: z.string().min(1).max(256).optional(),
61
+ fast: z.boolean().default(false),
62
+ permission: permissionModeSchema.default("ask")
63
+ });
64
+ var approvalDecisionSchema = z.object({
65
+ runId: z.string().min(1).max(128),
66
+ callId: z.string().min(1).max(128),
67
+ approved: z.boolean()
68
+ });
69
+ var modelInfoSchema = z.object({
70
+ id: z.string(),
71
+ name: z.string(),
72
+ provider: z.string(),
73
+ modalities: z.array(z.string()).optional(),
74
+ contextWindow: z.number().optional(),
75
+ fast: z.boolean().optional()
76
+ });
77
+ var pluginInfoSchema = z.object({
78
+ required: z.boolean().optional(),
79
+ error: z.string().optional(),
80
+ name: z.string(),
81
+ services: z.array(z.string()).optional(),
82
+ kind: z.string().optional(),
83
+ enabled: z.boolean().optional(),
84
+ status: z.string().optional(),
85
+ dependencies: z.array(z.string()).optional()
86
+ });
87
+ var eventIdentity = {
88
+ runId: z.string(),
89
+ conversationId: z.string(),
90
+ sequence: z.number().int().optional(),
91
+ parentRunId: z.string().optional()
92
+ };
93
+ var streamEventSchema = z.discriminatedUnion("type", [
94
+ z.object({
95
+ ...eventIdentity,
96
+ type: z.literal("start")
97
+ }),
98
+ z.object({
99
+ ...eventIdentity,
100
+ type: z.literal("text"),
101
+ delta: z.string()
102
+ }),
103
+ z.object({
104
+ ...eventIdentity,
105
+ type: z.literal("tool"),
106
+ callId: z.string(),
107
+ name: z.string(),
108
+ input: z.unknown()
109
+ }),
110
+ z.object({
111
+ ...eventIdentity,
112
+ type: z.literal("approval"),
113
+ callId: z.string(),
114
+ name: z.string(),
115
+ input: z.unknown()
116
+ }),
117
+ z.object({
118
+ ...eventIdentity,
119
+ type: z.literal("tool-result"),
120
+ callId: z.string(),
121
+ name: z.string(),
122
+ output: z.unknown()
123
+ }),
124
+ z.object({
125
+ ...eventIdentity,
126
+ type: z.literal("finish"),
127
+ reason: z.enum(["complete", "canceled"])
128
+ }),
129
+ z.object({
130
+ ...eventIdentity,
131
+ type: z.literal("error"),
132
+ message: z.string()
133
+ }),
134
+ z.object({
135
+ ...eventIdentity,
136
+ type: z.literal("status"),
137
+ name: z.string()
138
+ }),
139
+ z.object({
140
+ ...eventIdentity,
141
+ type: z.literal("subagent"),
142
+ output: z.unknown()
143
+ }),
144
+ z.object({
145
+ ...eventIdentity,
146
+ type: z.literal("subagent-event"),
147
+ output: z.unknown()
148
+ }),
149
+ z.object({
150
+ ...eventIdentity,
151
+ type: z.literal("client-action"),
152
+ output: z.object({
153
+ name: z.literal("navigate"),
154
+ path: z.string()
155
+ })
156
+ })
157
+ ]);
158
+ var storedConversationSchema = z.object({
159
+ id: z.string().min(1).max(128),
160
+ title: z.string().optional(),
161
+ version: z.number().optional(),
162
+ parentId: z.string().optional(),
163
+ summary: z.string().optional(),
164
+ messages: z.array(wireMessageSchema.extend({
165
+ role: z.enum([
166
+ "user",
167
+ "assistant",
168
+ "tool"
169
+ ]),
170
+ rating: z.string().optional(),
171
+ tasks: z.array(z.object({
172
+ label: z.string(),
173
+ done: z.boolean()
174
+ })).optional()
175
+ })).max(1e3),
176
+ updatedAt: z.number()
177
+ });
178
+ //#endregion
179
+ export { approvalDecisionSchema, attachmentSchema, modelInfoSchema, permissionModeSchema, pluginInfoSchema, runRequestSchema, storedConversationSchema, streamEventSchema, wireMessageSchema };
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ export declare const webSourceSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ url: z.ZodString;
5
+ title: z.ZodString;
6
+ domain: z.ZodString;
7
+ retrievedAt: z.ZodString;
8
+ snippet: z.ZodOptional<z.ZodString>;
9
+ }, z.core.$strict>;
10
+ export declare const webDocumentSchema: z.ZodObject<{
11
+ pageId: z.ZodOptional<z.ZodString>;
12
+ url: z.ZodOptional<z.ZodString>;
13
+ title: z.ZodOptional<z.ZodString>;
14
+ content: z.ZodOptional<z.ZodString>;
15
+ headings: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ sources: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ url: z.ZodString;
19
+ title: z.ZodString;
20
+ domain: z.ZodString;
21
+ retrievedAt: z.ZodString;
22
+ snippet: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strict>>>;
24
+ retrievedAt: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strict>;
26
+ export type WebSource = z.infer<typeof webSourceSchema>;
27
+ export type WebDocument = z.infer<typeof webDocumentSchema>;
28
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../../src/lib/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,eAAe;;;;;;;kBASjB,CAAA;AACX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;kBAUnB,CAAA;AAEX,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AACvD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ //#region src/lib/web.ts
3
+ var webSourceSchema = z.object({
4
+ id: z.string().max(128),
5
+ url: z.string().url().max(2048),
6
+ title: z.string().max(500),
7
+ domain: z.string().max(253),
8
+ retrievedAt: z.string().max(64),
9
+ snippet: z.string().max(1e3).optional()
10
+ }).strict();
11
+ var webDocumentSchema = z.object({
12
+ pageId: z.string().max(128).optional(),
13
+ url: z.string().url().max(2048).optional(),
14
+ title: z.string().max(500).optional(),
15
+ content: z.string().max(16e3).optional(),
16
+ headings: z.array(z.string().max(500)).max(30).optional(),
17
+ sources: z.array(webSourceSchema).max(6).optional(),
18
+ retrievedAt: z.string().max(64).optional()
19
+ }).strict();
20
+ //#endregion
21
+ export { webDocumentSchema, webSourceSchema };
package/package.json CHANGED
@@ -1,6 +1,30 @@
1
1
  {
2
2
  "name": "@vezham/tamizhi-contracts",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "26.3.2",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/vezham/vx-fe-pkgs.git",
7
+ "directory": "packages/tamizhi/contracts"
8
+ },
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "@vx/fe-kit": "./src/index.ts",
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "default": "./dist/index.js"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "main": "./dist/index.js",
20
+ "module": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
22
+ "files": [
23
+ "!**/*.tsbuildinfo",
24
+ "dist",
25
+ "LICENSE"
26
+ ],
27
+ "dependencies": {
28
+ "zod": "^4.6.7"
29
+ }
6
30
  }