@myagentroam/protocol 0.9.7 → 0.9.9

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 CHANGED
@@ -141,6 +141,29 @@ export const agentRunStatusSchema = z.enum([
141
141
  'CANCELLED',
142
142
  'INTERRUPTED'
143
143
  ]);
144
+ export const recentRunSchema = z.object({
145
+ runId: z.string().min(1).max(128),
146
+ nodeId: z.string().min(1).max(128),
147
+ workspaceId: z.string().min(1).max(128),
148
+ workspaceName: z.string().max(128).optional(),
149
+ sessionId: z.string().min(1).max(128),
150
+ sessionTitle: z.string().min(1).max(160),
151
+ runner: runnerNameSchema,
152
+ status: agentRunStatusSchema,
153
+ createdAt: z.number().int().nonnegative(),
154
+ startedAt: z.number().int().nonnegative().nullable(),
155
+ completedAt: z.number().int().nonnegative().nullable(),
156
+ sortAt: z.number().int().nonnegative(),
157
+ updatedAt: z.number().int().nonnegative(),
158
+ version: z.number().int().nonnegative()
159
+ });
160
+ export const recentRunProjectionSchema = recentRunSchema
161
+ .omit({ workspaceName: true })
162
+ .extend({ userId: z.number().int().positive() });
163
+ export const recentRunProjectionMessageSchema = z.discriminatedUnion('kind', [
164
+ z.object({ kind: z.literal('UPDATE'), run: recentRunProjectionSchema }),
165
+ z.object({ kind: z.literal('SNAPSHOT'), runs: z.array(recentRunProjectionSchema) })
166
+ ]);
144
167
  /** Process-local Workspace FIFO projection; queue contents never enter SQLite. */
145
168
  export const workspaceQueueItemSchema = z.object({
146
169
  run: z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myagentroam/protocol",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "Shared runtime protocol schemas for MyAgentRoam.",
5
5
  "type": "module",
6
6
  "files": [