@omni-graph/omni-model 0.6.0 → 0.6.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.
@@ -1,3 +1,4 @@
1
1
  export * from './account-settings';
2
2
  export * from './recommendations';
3
+ export * from './omni-chat';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
package/dist/zod/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './account-settings';
2
2
  export * from './recommendations';
3
+ export * from './omni-chat';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,200 @@
1
+ import { z } from 'zod';
2
+ export declare const FrameType: z.ZodEnum<["chunk", "final", "error", "ping", "ack", "progress"]>;
3
+ export type FrameType = z.infer<typeof FrameType>;
4
+ export declare const ChunkFrame: z.ZodObject<{
5
+ v: z.ZodLiteral<1>;
6
+ msg_id: z.ZodOptional<z.ZodString>;
7
+ } & {
8
+ type: z.ZodLiteral<"chunk">;
9
+ seq: z.ZodNumber;
10
+ txt: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
12
+ type: "chunk";
13
+ v: 1;
14
+ seq: number;
15
+ txt: string;
16
+ msg_id?: string | undefined;
17
+ }, {
18
+ type: "chunk";
19
+ v: 1;
20
+ seq: number;
21
+ txt: string;
22
+ msg_id?: string | undefined;
23
+ }>;
24
+ export type ChunkFrame = z.infer<typeof ChunkFrame>;
25
+ export declare const FinalFrame: z.ZodObject<{
26
+ v: z.ZodLiteral<1>;
27
+ msg_id: z.ZodOptional<z.ZodString>;
28
+ } & {
29
+ type: z.ZodLiteral<"final">;
30
+ full: z.ZodString;
31
+ }, "strip", z.ZodTypeAny, {
32
+ type: "final";
33
+ v: 1;
34
+ full: string;
35
+ msg_id?: string | undefined;
36
+ }, {
37
+ type: "final";
38
+ v: 1;
39
+ full: string;
40
+ msg_id?: string | undefined;
41
+ }>;
42
+ export type FinalFrame = z.infer<typeof FinalFrame>;
43
+ export declare const ErrorFrame: z.ZodObject<{
44
+ v: z.ZodLiteral<1>;
45
+ msg_id: z.ZodOptional<z.ZodString>;
46
+ } & {
47
+ type: z.ZodLiteral<"error">;
48
+ code: z.ZodString;
49
+ detail: z.ZodString;
50
+ }, "strip", z.ZodTypeAny, {
51
+ code: string;
52
+ type: "error";
53
+ v: 1;
54
+ detail: string;
55
+ msg_id?: string | undefined;
56
+ }, {
57
+ code: string;
58
+ type: "error";
59
+ v: 1;
60
+ detail: string;
61
+ msg_id?: string | undefined;
62
+ }>;
63
+ export type ErrorFrame = z.infer<typeof ErrorFrame>;
64
+ export declare const PingFrame: z.ZodObject<{
65
+ v: z.ZodLiteral<1>;
66
+ msg_id: z.ZodOptional<z.ZodString>;
67
+ } & {
68
+ type: z.ZodLiteral<"ping">;
69
+ ts: z.ZodNumber;
70
+ }, "strip", z.ZodTypeAny, {
71
+ type: "ping";
72
+ v: 1;
73
+ ts: number;
74
+ msg_id?: string | undefined;
75
+ }, {
76
+ type: "ping";
77
+ v: 1;
78
+ ts: number;
79
+ msg_id?: string | undefined;
80
+ }>;
81
+ export type PingFrame = z.infer<typeof PingFrame>;
82
+ export declare const ProgressFrame: z.ZodObject<{
83
+ v: z.ZodLiteral<1>;
84
+ msg_id: z.ZodOptional<z.ZodString>;
85
+ } & {
86
+ type: z.ZodLiteral<"progress">;
87
+ pct: z.ZodNumber;
88
+ stage: z.ZodOptional<z.ZodString>;
89
+ eta_ms: z.ZodOptional<z.ZodNumber>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ type: "progress";
92
+ v: 1;
93
+ pct: number;
94
+ msg_id?: string | undefined;
95
+ stage?: string | undefined;
96
+ eta_ms?: number | undefined;
97
+ }, {
98
+ type: "progress";
99
+ v: 1;
100
+ pct: number;
101
+ msg_id?: string | undefined;
102
+ stage?: string | undefined;
103
+ eta_ms?: number | undefined;
104
+ }>;
105
+ export type ProgressFrame = z.infer<typeof ProgressFrame>;
106
+ export declare const Frame: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
107
+ v: z.ZodLiteral<1>;
108
+ msg_id: z.ZodOptional<z.ZodString>;
109
+ } & {
110
+ type: z.ZodLiteral<"chunk">;
111
+ seq: z.ZodNumber;
112
+ txt: z.ZodString;
113
+ }, "strip", z.ZodTypeAny, {
114
+ type: "chunk";
115
+ v: 1;
116
+ seq: number;
117
+ txt: string;
118
+ msg_id?: string | undefined;
119
+ }, {
120
+ type: "chunk";
121
+ v: 1;
122
+ seq: number;
123
+ txt: string;
124
+ msg_id?: string | undefined;
125
+ }>, z.ZodObject<{
126
+ v: z.ZodLiteral<1>;
127
+ msg_id: z.ZodOptional<z.ZodString>;
128
+ } & {
129
+ type: z.ZodLiteral<"final">;
130
+ full: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ type: "final";
133
+ v: 1;
134
+ full: string;
135
+ msg_id?: string | undefined;
136
+ }, {
137
+ type: "final";
138
+ v: 1;
139
+ full: string;
140
+ msg_id?: string | undefined;
141
+ }>, z.ZodObject<{
142
+ v: z.ZodLiteral<1>;
143
+ msg_id: z.ZodOptional<z.ZodString>;
144
+ } & {
145
+ type: z.ZodLiteral<"error">;
146
+ code: z.ZodString;
147
+ detail: z.ZodString;
148
+ }, "strip", z.ZodTypeAny, {
149
+ code: string;
150
+ type: "error";
151
+ v: 1;
152
+ detail: string;
153
+ msg_id?: string | undefined;
154
+ }, {
155
+ code: string;
156
+ type: "error";
157
+ v: 1;
158
+ detail: string;
159
+ msg_id?: string | undefined;
160
+ }>, z.ZodObject<{
161
+ v: z.ZodLiteral<1>;
162
+ msg_id: z.ZodOptional<z.ZodString>;
163
+ } & {
164
+ type: z.ZodLiteral<"ping">;
165
+ ts: z.ZodNumber;
166
+ }, "strip", z.ZodTypeAny, {
167
+ type: "ping";
168
+ v: 1;
169
+ ts: number;
170
+ msg_id?: string | undefined;
171
+ }, {
172
+ type: "ping";
173
+ v: 1;
174
+ ts: number;
175
+ msg_id?: string | undefined;
176
+ }>, z.ZodObject<{
177
+ v: z.ZodLiteral<1>;
178
+ msg_id: z.ZodOptional<z.ZodString>;
179
+ } & {
180
+ type: z.ZodLiteral<"progress">;
181
+ pct: z.ZodNumber;
182
+ stage: z.ZodOptional<z.ZodString>;
183
+ eta_ms: z.ZodOptional<z.ZodNumber>;
184
+ }, "strip", z.ZodTypeAny, {
185
+ type: "progress";
186
+ v: 1;
187
+ pct: number;
188
+ msg_id?: string | undefined;
189
+ stage?: string | undefined;
190
+ eta_ms?: number | undefined;
191
+ }, {
192
+ type: "progress";
193
+ v: 1;
194
+ pct: number;
195
+ msg_id?: string | undefined;
196
+ stage?: string | undefined;
197
+ eta_ms?: number | undefined;
198
+ }>]>;
199
+ export type Frame = z.infer<typeof Frame>;
200
+ //# sourceMappingURL=frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.d.ts","sourceRoot":"","sources":["../../../src/zod/omni-chat/frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,eAAO,MAAM,SAAS,mEAOpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAQlD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;EAIrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;EAGrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;EAIrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;EAGpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAElD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;EAKxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAA+F,CAAC;AAClH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod';
2
+ export const FrameType = z.enum([
3
+ 'chunk', // incremental token(s)
4
+ 'final', // complete assistant reply
5
+ 'error', // failure info
6
+ 'ping', // keep-alive
7
+ 'ack', // optional: confirm receipt
8
+ 'progress', // optional: % for long jobs
9
+ ]);
10
+ const BaseFrame = z.object({
11
+ v: z.literal(1),
12
+ type: FrameType,
13
+ msg_id: z.string().optional(),
14
+ });
15
+ export const ChunkFrame = BaseFrame.extend({
16
+ type: z.literal('chunk'),
17
+ seq: z.number(),
18
+ txt: z.string(),
19
+ });
20
+ export const FinalFrame = BaseFrame.extend({
21
+ type: z.literal('final'),
22
+ full: z.string(),
23
+ });
24
+ export const ErrorFrame = BaseFrame.extend({
25
+ type: z.literal('error'),
26
+ code: z.string(),
27
+ detail: z.string(),
28
+ });
29
+ export const PingFrame = BaseFrame.extend({
30
+ type: z.literal('ping'),
31
+ ts: z.number(), // seconds since epoch
32
+ });
33
+ export const ProgressFrame = BaseFrame.extend({
34
+ type: z.literal('progress'),
35
+ pct: z.number(), // 0.0 – 100.0
36
+ stage: z.string().optional(),
37
+ eta_ms: z.number().optional(),
38
+ });
39
+ export const Frame = z.discriminatedUnion('type', [ChunkFrame, FinalFrame, ErrorFrame, PingFrame, ProgressFrame]);
40
+ //# sourceMappingURL=frame.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frame.js","sourceRoot":"","sources":["../../../src/zod/omni-chat/frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9B,OAAO,EAAE,uBAAuB;IAChC,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,eAAe;IACxB,MAAM,EAAE,aAAa;IACrB,KAAK,EAAE,4BAA4B;IACnC,UAAU,EAAE,4BAA4B;CACzC,CAAC,CAAC;AAGH,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC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0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zod/omni-chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './frame';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/zod/omni-chat/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omni-graph/omni-model",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "Models for the OmniGraph Services & Frontend",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",