@octavus/core 0.0.4 → 0.0.5

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.d.ts CHANGED
@@ -186,11 +186,11 @@ interface ToolResult {
186
186
  }
187
187
  type StreamEvent = StartEvent | FinishEvent | ErrorEvent | TextStartEvent | TextDeltaEvent | TextEndEvent | ReasoningStartEvent | ReasoningDeltaEvent | ReasoningEndEvent | ToolInputStartEvent | ToolInputDeltaEvent | ToolInputEndEvent | ToolInputAvailableEvent | ToolOutputAvailableEvent | ToolOutputErrorEvent | BlockStartEvent | BlockEndEvent | ResourceUpdateEvent | ToolRequestEvent;
188
188
  /**
189
- * Type of content in a message part
189
+ * Type of content in a message part (internal)
190
190
  */
191
191
  type MessagePartType = 'text' | 'reasoning' | 'tool-call';
192
192
  /**
193
- * A single part of a message, stored in order for proper display
193
+ * A single part of a message, stored in order for proper display (internal)
194
194
  */
195
195
  interface MessagePart {
196
196
  type: MessagePartType;
@@ -203,6 +203,9 @@ interface MessagePart {
203
203
  /** Thread name for non-main-thread content (e.g., "summary") */
204
204
  thread?: string;
205
205
  }
206
+ /**
207
+ * Internal chat message - stored in session state, used by LLM
208
+ */
206
209
  interface ChatMessage {
207
210
  id: string;
208
211
  role: MessageRole;
@@ -221,10 +224,89 @@ interface ChatMessage {
221
224
  /** Required by Anthropic to verify reasoning blocks */
222
225
  reasoningSignature?: string;
223
226
  }
224
-
225
227
  /**
226
- * Schema for tool result (consumer's response to tool-request)
228
+ * Status of a UI message
229
+ */
230
+ type UIMessageStatus = 'streaming' | 'done';
231
+ /**
232
+ * Status of a UI message part
233
+ */
234
+ type UIPartStatus = 'streaming' | 'done';
235
+ /**
236
+ * Text content in a UI message
237
+ */
238
+ interface UITextPart {
239
+ type: 'text';
240
+ text: string;
241
+ status: UIPartStatus;
242
+ /** Thread name (undefined or 'main' for main thread) */
243
+ thread?: string;
244
+ }
245
+ /**
246
+ * Reasoning/thinking content in a UI message
247
+ */
248
+ interface UIReasoningPart {
249
+ type: 'reasoning';
250
+ text: string;
251
+ status: UIPartStatus;
252
+ /** Thread name (undefined or 'main' for main thread) */
253
+ thread?: string;
254
+ }
255
+ /**
256
+ * Tool call status for UI
257
+ */
258
+ type UIToolCallStatus = 'pending' | 'running' | 'done' | 'error';
259
+ /**
260
+ * Tool call in a UI message
261
+ */
262
+ interface UIToolCallPart {
263
+ type: 'tool-call';
264
+ toolCallId: string;
265
+ toolName: string;
266
+ /** Human-readable display name (from protocol description) */
267
+ displayName?: string;
268
+ args: Record<string, unknown>;
269
+ result?: unknown;
270
+ error?: string;
271
+ status: UIToolCallStatus;
272
+ /** Thread name (undefined or 'main' for main thread) */
273
+ thread?: string;
274
+ }
275
+ /**
276
+ * Operation status for UI
227
277
  */
278
+ type UIOperationStatus = 'running' | 'done';
279
+ /**
280
+ * Internal operation in a UI message (e.g., set-resource, serialize-thread)
281
+ * These are Octavus-specific operations, not LLM tool calls
282
+ */
283
+ interface UIOperationPart {
284
+ type: 'operation';
285
+ operationId: string;
286
+ /** Human-readable name (from block name/description) */
287
+ name: string;
288
+ /** Type of operation (e.g., 'set-resource', 'serialize-thread') */
289
+ operationType: string;
290
+ status: UIOperationStatus;
291
+ /** Thread name (undefined or 'main' for main thread) */
292
+ thread?: string;
293
+ }
294
+ /**
295
+ * Union of all UI message part types
296
+ */
297
+ type UIMessagePart = UITextPart | UIReasoningPart | UIToolCallPart | UIOperationPart;
298
+ /**
299
+ * UI Message - the client-facing message format
300
+ * All complexity is handled by the SDK, this is what consumers render
301
+ */
302
+ interface UIMessage {
303
+ id: string;
304
+ role: 'user' | 'assistant';
305
+ parts: UIMessagePart[];
306
+ status: UIMessageStatus;
307
+ createdAt: Date;
308
+ }
309
+
228
310
  declare const toolResultSchema: z.ZodObject<{
229
311
  toolCallId: z.ZodString;
230
312
  toolName: z.ZodOptional<z.ZodString>;
@@ -284,6 +366,102 @@ declare const chatMessageSchema: z.ZodObject<{
284
366
  reasoning: z.ZodOptional<z.ZodString>;
285
367
  reasoningSignature: z.ZodOptional<z.ZodString>;
286
368
  }, z.core.$strip>;
369
+ declare const uiMessagePartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
370
+ type: z.ZodLiteral<"text">;
371
+ text: z.ZodString;
372
+ status: z.ZodEnum<{
373
+ streaming: "streaming";
374
+ done: "done";
375
+ }>;
376
+ thread: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ type: z.ZodLiteral<"reasoning">;
379
+ text: z.ZodString;
380
+ status: z.ZodEnum<{
381
+ streaming: "streaming";
382
+ done: "done";
383
+ }>;
384
+ thread: z.ZodOptional<z.ZodString>;
385
+ }, z.core.$strip>, z.ZodObject<{
386
+ type: z.ZodLiteral<"tool-call">;
387
+ toolCallId: z.ZodString;
388
+ toolName: z.ZodString;
389
+ displayName: z.ZodOptional<z.ZodString>;
390
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
391
+ result: z.ZodOptional<z.ZodUnknown>;
392
+ error: z.ZodOptional<z.ZodString>;
393
+ status: z.ZodEnum<{
394
+ pending: "pending";
395
+ error: "error";
396
+ done: "done";
397
+ running: "running";
398
+ }>;
399
+ thread: z.ZodOptional<z.ZodString>;
400
+ }, z.core.$strip>, z.ZodObject<{
401
+ type: z.ZodLiteral<"operation">;
402
+ operationId: z.ZodString;
403
+ name: z.ZodString;
404
+ operationType: z.ZodString;
405
+ status: z.ZodEnum<{
406
+ done: "done";
407
+ running: "running";
408
+ }>;
409
+ thread: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strip>], "type">;
411
+ declare const uiMessageSchema: z.ZodObject<{
412
+ id: z.ZodString;
413
+ role: z.ZodEnum<{
414
+ user: "user";
415
+ assistant: "assistant";
416
+ }>;
417
+ parts: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
418
+ type: z.ZodLiteral<"text">;
419
+ text: z.ZodString;
420
+ status: z.ZodEnum<{
421
+ streaming: "streaming";
422
+ done: "done";
423
+ }>;
424
+ thread: z.ZodOptional<z.ZodString>;
425
+ }, z.core.$strip>, z.ZodObject<{
426
+ type: z.ZodLiteral<"reasoning">;
427
+ text: z.ZodString;
428
+ status: z.ZodEnum<{
429
+ streaming: "streaming";
430
+ done: "done";
431
+ }>;
432
+ thread: z.ZodOptional<z.ZodString>;
433
+ }, z.core.$strip>, z.ZodObject<{
434
+ type: z.ZodLiteral<"tool-call">;
435
+ toolCallId: z.ZodString;
436
+ toolName: z.ZodString;
437
+ displayName: z.ZodOptional<z.ZodString>;
438
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
439
+ result: z.ZodOptional<z.ZodUnknown>;
440
+ error: z.ZodOptional<z.ZodString>;
441
+ status: z.ZodEnum<{
442
+ pending: "pending";
443
+ error: "error";
444
+ done: "done";
445
+ running: "running";
446
+ }>;
447
+ thread: z.ZodOptional<z.ZodString>;
448
+ }, z.core.$strip>, z.ZodObject<{
449
+ type: z.ZodLiteral<"operation">;
450
+ operationId: z.ZodString;
451
+ name: z.ZodString;
452
+ operationType: z.ZodString;
453
+ status: z.ZodEnum<{
454
+ done: "done";
455
+ running: "running";
456
+ }>;
457
+ thread: z.ZodOptional<z.ZodString>;
458
+ }, z.core.$strip>], "type">>;
459
+ status: z.ZodEnum<{
460
+ streaming: "streaming";
461
+ done: "done";
462
+ }>;
463
+ createdAt: z.ZodCoercedDate<unknown>;
464
+ }, z.core.$strip>;
287
465
  declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
288
466
  type: "start";
289
467
  messageId?: string | undefined;
@@ -366,5 +544,73 @@ declare function safeParseStreamEvent(data: unknown): z.ZodSafeParseResult<{
366
544
  blockIndex?: number | undefined;
367
545
  }[];
368
546
  }>;
547
+ declare function safeParseUIMessage(data: unknown): z.ZodSafeParseResult<{
548
+ id: string;
549
+ role: "user" | "assistant";
550
+ parts: ({
551
+ type: "text";
552
+ text: string;
553
+ status: "streaming" | "done";
554
+ thread?: string | undefined;
555
+ } | {
556
+ type: "reasoning";
557
+ text: string;
558
+ status: "streaming" | "done";
559
+ thread?: string | undefined;
560
+ } | {
561
+ type: "tool-call";
562
+ toolCallId: string;
563
+ toolName: string;
564
+ args: Record<string, unknown>;
565
+ status: "pending" | "error" | "done" | "running";
566
+ displayName?: string | undefined;
567
+ result?: unknown;
568
+ error?: string | undefined;
569
+ thread?: string | undefined;
570
+ } | {
571
+ type: "operation";
572
+ operationId: string;
573
+ name: string;
574
+ operationType: string;
575
+ status: "done" | "running";
576
+ thread?: string | undefined;
577
+ })[];
578
+ status: "streaming" | "done";
579
+ createdAt: Date;
580
+ }>;
581
+ declare function safeParseUIMessages(data: unknown): z.ZodSafeParseResult<{
582
+ id: string;
583
+ role: "user" | "assistant";
584
+ parts: ({
585
+ type: "text";
586
+ text: string;
587
+ status: "streaming" | "done";
588
+ thread?: string | undefined;
589
+ } | {
590
+ type: "reasoning";
591
+ text: string;
592
+ status: "streaming" | "done";
593
+ thread?: string | undefined;
594
+ } | {
595
+ type: "tool-call";
596
+ toolCallId: string;
597
+ toolName: string;
598
+ args: Record<string, unknown>;
599
+ status: "pending" | "error" | "done" | "running";
600
+ displayName?: string | undefined;
601
+ result?: unknown;
602
+ error?: string | undefined;
603
+ thread?: string | undefined;
604
+ } | {
605
+ type: "operation";
606
+ operationId: string;
607
+ name: string;
608
+ operationType: string;
609
+ status: "done" | "running";
610
+ thread?: string | undefined;
611
+ })[];
612
+ status: "streaming" | "done";
613
+ createdAt: Date;
614
+ }[]>;
369
615
 
370
- export { AppError, type BlockEndEvent, type BlockStartEvent, type ChatMessage, ConflictError, type DisplayMode, type ErrorEvent, type FinishEvent, type FinishReason, type MessagePart, type MessagePartType, type MessageRole, NotFoundError, type PendingToolCall, type ReasoningDeltaEvent, type ReasoningEndEvent, type ReasoningStartEvent, type ResourceUpdateEvent, type ResourceUpdateHandler, type StartEvent, type StreamEvent, type TextDeltaEvent, type TextEndEvent, type TextStartEvent, type ToolCallInfo, type ToolCallStatus, type ToolHandler, type ToolHandlers, type ToolInputAvailableEvent, type ToolInputDeltaEvent, type ToolInputEndEvent, type ToolInputStartEvent, type ToolOutputAvailableEvent, type ToolOutputErrorEvent, type ToolRequestEvent, type ToolResult, ValidationError, chatMessageSchema, generateId, safeParseStreamEvent, toolResultSchema };
616
+ export { AppError, type BlockEndEvent, type BlockStartEvent, type ChatMessage, ConflictError, type DisplayMode, type ErrorEvent, type FinishEvent, type FinishReason, type MessagePart, type MessagePartType, type MessageRole, NotFoundError, type PendingToolCall, type ReasoningDeltaEvent, type ReasoningEndEvent, type ReasoningStartEvent, type ResourceUpdateEvent, type ResourceUpdateHandler, type StartEvent, type StreamEvent, type TextDeltaEvent, type TextEndEvent, type TextStartEvent, type ToolCallInfo, type ToolCallStatus, type ToolHandler, type ToolHandlers, type ToolInputAvailableEvent, type ToolInputDeltaEvent, type ToolInputEndEvent, type ToolInputStartEvent, type ToolOutputAvailableEvent, type ToolOutputErrorEvent, type ToolRequestEvent, type ToolResult, type UIMessage, type UIMessagePart, type UIMessageStatus, type UIOperationPart, type UIOperationStatus, type UIPartStatus, type UIReasoningPart, type UITextPart, type UIToolCallPart, type UIToolCallStatus, ValidationError, chatMessageSchema, generateId, safeParseStreamEvent, safeParseUIMessage, safeParseUIMessages, toolResultSchema, uiMessagePartSchema, uiMessageSchema };
package/dist/index.js CHANGED
@@ -208,9 +208,63 @@ var chatMessageSchema = z.object({
208
208
  reasoning: z.string().optional(),
209
209
  reasoningSignature: z.string().optional()
210
210
  });
211
+ var uiMessageStatusSchema = z.enum(["streaming", "done"]);
212
+ var uiPartStatusSchema = z.enum(["streaming", "done"]);
213
+ var uiToolCallStatusSchema = z.enum(["pending", "running", "done", "error"]);
214
+ var uiTextPartSchema = z.object({
215
+ type: z.literal("text"),
216
+ text: z.string(),
217
+ status: uiPartStatusSchema,
218
+ thread: z.string().optional()
219
+ });
220
+ var uiReasoningPartSchema = z.object({
221
+ type: z.literal("reasoning"),
222
+ text: z.string(),
223
+ status: uiPartStatusSchema,
224
+ thread: z.string().optional()
225
+ });
226
+ var uiToolCallPartSchema = z.object({
227
+ type: z.literal("tool-call"),
228
+ toolCallId: z.string(),
229
+ toolName: z.string(),
230
+ displayName: z.string().optional(),
231
+ args: z.record(z.string(), z.unknown()),
232
+ result: z.unknown().optional(),
233
+ error: z.string().optional(),
234
+ status: uiToolCallStatusSchema,
235
+ thread: z.string().optional()
236
+ });
237
+ var uiOperationStatusSchema = z.enum(["running", "done"]);
238
+ var uiOperationPartSchema = z.object({
239
+ type: z.literal("operation"),
240
+ operationId: z.string(),
241
+ name: z.string(),
242
+ operationType: z.string(),
243
+ status: uiOperationStatusSchema,
244
+ thread: z.string().optional()
245
+ });
246
+ var uiMessagePartSchema = z.discriminatedUnion("type", [
247
+ uiTextPartSchema,
248
+ uiReasoningPartSchema,
249
+ uiToolCallPartSchema,
250
+ uiOperationPartSchema
251
+ ]);
252
+ var uiMessageSchema = z.object({
253
+ id: z.string(),
254
+ role: z.enum(["user", "assistant"]),
255
+ parts: z.array(uiMessagePartSchema),
256
+ status: uiMessageStatusSchema,
257
+ createdAt: z.coerce.date()
258
+ });
211
259
  function safeParseStreamEvent(data) {
212
260
  return streamEventSchema.safeParse(data);
213
261
  }
262
+ function safeParseUIMessage(data) {
263
+ return uiMessageSchema.safeParse(data);
264
+ }
265
+ function safeParseUIMessages(data) {
266
+ return z.array(uiMessageSchema).safeParse(data);
267
+ }
214
268
  export {
215
269
  AppError,
216
270
  ConflictError,
@@ -219,6 +273,10 @@ export {
219
273
  chatMessageSchema,
220
274
  generateId,
221
275
  safeParseStreamEvent,
222
- toolResultSchema
276
+ safeParseUIMessage,
277
+ safeParseUIMessages,
278
+ toolResultSchema,
279
+ uiMessagePartSchema,
280
+ uiMessageSchema
223
281
  };
224
282
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/errors.ts","../src/utils.ts","../src/stream/schemas.ts"],"sourcesContent":["export class AppError extends Error {\n constructor(\n message: string,\n public code: string,\n public statusCode = 500,\n ) {\n super(message);\n this.name = 'AppError';\n }\n}\n\nexport class NotFoundError extends AppError {\n constructor(resource: string, id: string) {\n super(`${resource} not found: ${id}`, 'NOT_FOUND', 404);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ValidationError extends AppError {\n constructor(\n message: string,\n public issues?: unknown[],\n ) {\n super(message, 'VALIDATION_ERROR', 400);\n this.name = 'ValidationError';\n }\n}\n\nexport class ConflictError extends AppError {\n constructor(resource: string, identifier: string) {\n super(`${resource} already exists: ${identifier}`, 'CONFLICT', 409);\n this.name = 'ConflictError';\n }\n}\n","/**\n * Generate a unique ID for messages, tool calls, etc.\n * Format: timestamp-random (e.g., \"1702345678901-abc123def\")\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;\n}\n","import { z } from 'zod';\n\nexport const displayModeSchema = z.enum(['hidden', 'name', 'description', 'stream']);\nexport const messageRoleSchema = z.enum(['user', 'assistant', 'system']);\nexport const toolCallStatusSchema = z.enum(['pending', 'streaming', 'available', 'error']);\nexport const finishReasonSchema = z.enum([\n 'stop',\n 'tool-calls',\n 'length',\n 'content-filter',\n 'error',\n 'other',\n]);\n\nexport const toolCallInfoSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().optional(),\n arguments: z.record(z.string(), z.unknown()),\n status: toolCallStatusSchema,\n result: z.unknown().optional(),\n error: z.string().optional(),\n});\n\n// =============================================================================\n// Lifecycle Events\n// =============================================================================\n\nexport const startEventSchema = z.object({\n type: z.literal('start'),\n messageId: z.string().optional(),\n});\n\nexport const finishEventSchema = z.object({\n type: z.literal('finish'),\n finishReason: finishReasonSchema,\n});\n\nexport const errorEventSchema = z.object({\n type: z.literal('error'),\n errorText: z.string(),\n});\n\n// =============================================================================\n// Text Events\n// =============================================================================\n\nexport const textStartEventSchema = z.object({\n type: z.literal('text-start'),\n id: z.string(),\n});\n\nexport const textDeltaEventSchema = z.object({\n type: z.literal('text-delta'),\n id: z.string(),\n delta: z.string(),\n});\n\nexport const textEndEventSchema = z.object({\n type: z.literal('text-end'),\n id: z.string(),\n});\n\n// =============================================================================\n// Reasoning Events\n// =============================================================================\n\nexport const reasoningStartEventSchema = z.object({\n type: z.literal('reasoning-start'),\n id: z.string(),\n});\n\nexport const reasoningDeltaEventSchema = z.object({\n type: z.literal('reasoning-delta'),\n id: z.string(),\n delta: z.string(),\n});\n\nexport const reasoningEndEventSchema = z.object({\n type: z.literal('reasoning-end'),\n id: z.string(),\n});\n\n// =============================================================================\n// Tool Events\n// =============================================================================\n\nexport const toolInputStartEventSchema = z.object({\n type: z.literal('tool-input-start'),\n toolCallId: z.string(),\n toolName: z.string(),\n title: z.string().optional(),\n});\n\nexport const toolInputDeltaEventSchema = z.object({\n type: z.literal('tool-input-delta'),\n toolCallId: z.string(),\n inputTextDelta: z.string(),\n});\n\nexport const toolInputEndEventSchema = z.object({\n type: z.literal('tool-input-end'),\n toolCallId: z.string(),\n});\n\nexport const toolInputAvailableEventSchema = z.object({\n type: z.literal('tool-input-available'),\n toolCallId: z.string(),\n toolName: z.string(),\n input: z.unknown(),\n});\n\nexport const toolOutputAvailableEventSchema = z.object({\n type: z.literal('tool-output-available'),\n toolCallId: z.string(),\n output: z.unknown(),\n});\n\nexport const toolOutputErrorEventSchema = z.object({\n type: z.literal('tool-output-error'),\n toolCallId: z.string(),\n errorText: z.string(),\n});\n\n// =============================================================================\n// Block Events\n// =============================================================================\n\nexport const blockStartEventSchema = z.object({\n type: z.literal('block-start'),\n blockId: z.string(),\n blockName: z.string(),\n blockType: z.string(),\n display: displayModeSchema,\n description: z.string().optional(),\n outputToChat: z.boolean().optional(),\n thread: z.string().optional(),\n});\n\nexport const blockEndEventSchema = z.object({\n type: z.literal('block-end'),\n blockId: z.string(),\n summary: z.string().optional(),\n});\n\nexport const resourceUpdateEventSchema = z.object({\n type: z.literal('resource-update'),\n name: z.string(),\n value: z.unknown(),\n});\n\nexport const pendingToolCallSchema = z.object({\n toolCallId: z.string(),\n toolName: z.string(),\n args: z.record(z.string(), z.unknown()),\n source: z.enum(['llm', 'block']).optional(),\n outputVariable: z.string().optional(),\n blockIndex: z.number().optional(),\n});\n\nexport const toolRequestEventSchema = z.object({\n type: z.literal('tool-request'),\n toolCalls: z.array(pendingToolCallSchema),\n});\n\n/**\n * Schema for tool result (consumer's response to tool-request)\n */\nexport const toolResultSchema = z.object({\n toolCallId: z.string(),\n toolName: z.string().optional(),\n result: z.unknown().optional(),\n error: z.string().optional(),\n outputVariable: z.string().optional(),\n blockIndex: z.number().optional(),\n});\n\n// =============================================================================\n// Union of all stream events\n// =============================================================================\n\nexport const streamEventSchema = z.discriminatedUnion('type', [\n // Lifecycle\n startEventSchema,\n finishEventSchema,\n errorEventSchema,\n // Text\n textStartEventSchema,\n textDeltaEventSchema,\n textEndEventSchema,\n // Reasoning\n reasoningStartEventSchema,\n reasoningDeltaEventSchema,\n reasoningEndEventSchema,\n // Tool Input/Output\n toolInputStartEventSchema,\n toolInputDeltaEventSchema,\n toolInputEndEventSchema,\n toolInputAvailableEventSchema,\n toolOutputAvailableEventSchema,\n toolOutputErrorEventSchema,\n // Block Events\n blockStartEventSchema,\n blockEndEventSchema,\n resourceUpdateEventSchema,\n toolRequestEventSchema,\n]);\n\n// =============================================================================\n// Message Types\n// =============================================================================\n\nexport const messagePartTypeSchema = z.enum(['text', 'reasoning', 'tool-call']);\n\nexport const messagePartSchema = z.object({\n type: messagePartTypeSchema,\n visible: z.boolean(),\n content: z.string().optional(),\n toolCall: toolCallInfoSchema.optional(),\n thread: z.string().optional(),\n});\n\nexport const chatMessageSchema = z.object({\n id: z.string(),\n role: messageRoleSchema,\n parts: z.array(messagePartSchema),\n createdAt: z.string(),\n visible: z.boolean().optional(),\n content: z.string(),\n toolCalls: z.array(toolCallInfoSchema).optional(),\n reasoning: z.string().optional(),\n reasoningSignature: z.string().optional(),\n});\n\nexport function safeParseStreamEvent(data: unknown) {\n return streamEventSchema.saf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AAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAMM,IAAM,wBAAwB,EAAE,KAAK,CAAC,QAAQ,aAAa,WAAW,CAAC;AAEvE,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,MAAM;AAAA,EACN,SAAS,EAAE,QAAQ;AAAA,EACnB,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,UAAU,mBAAmB,SAAS;AAAA,EACtC,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC;AAEM,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,iBAAiB;AAAA,EAChC,WAAW,EAAE,OAAO;AAAA,EACpB,SAAS,EAAE,QAAQ,EAAE,SAAS;AAAA,EAC9B,SAAS,EAAE,OAAO;AAAA,EAClB,WAAW,EAAE,MAAM,kBAAkB,EAAE,SAAS;AAAA,EAChD,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAC1C,CAAC;AAEM,SAAS,qBAAqB,MAAe;AAClD,SAAO,kBAAkB,UAAU,IAAI;AACzC;","names":[]}
1
+ {"version":3,"sources":["../src/errors.ts","../src/utils.ts","../src/stream/schemas.ts"],"sourcesContent":["export class AppError extends Error {\n constructor(\n message: string,\n public code: string,\n public statusCode = 500,\n ) {\n super(message);\n this.name = 'AppError';\n }\n}\n\nexport class NotFoundError extends AppError {\n constructor(resource: string, id: string) {\n super(`${resource} not found: ${id}`, 'NOT_FOUND', 404);\n this.name = 'NotFoundError';\n }\n}\n\nexport class ValidationError extends AppError {\n constructor(\n message: string,\n public issues?: unknown[],\n ) {\n super(message, 'VALIDATION_ERROR', 400);\n this.name = 'ValidationError';\n }\n}\n\nexport class ConflictError extends AppError {\n constructor(resource: string, identifier: string) {\n super(`${resource} already exists: ${identifier}`, 'CONFLICT', 409);\n this.name = 'ConflictError';\n }\n}\n","/**\n * Generate a unique ID for messages, tool calls, etc.\n * Format: timestamp-random (e.g., \"1702345678901-abc123def\")\n */\nexport function generateId(): string {\n return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;\n}\n","import { z } from 'zod';\n\nexport const displayModeSchema = z.enum(['hidden', 'name', 'description', 'stream']);\nexport const messageRoleSchema = z.enum(['user', 'assistant', 'system']);\nexport const toolCallStatusSchema = z.enum(['pending', 'streaming', 'available', 'error']);\nexport const finishReasonSchema = z.enum([\n 'stop',\n 'tool-calls',\n 'length',\n 'content-filter',\n 'error',\n 'other',\n]);\n\nexport const toolCallInfoSchema = z.object({\n id: z.string(),\n name: z.string(),\n description: z.string().optional(),\n arguments: z.record(z.string(), z.unknown()),\n status: toolCallStatusSchema,\n result: z.unknown().optional(),\n error: z.string().optional(),\n});\n\n// =============================================================================\n// Lifecycle Events\n// =============================================================================\n\nexport const startEventSchema = z.object({\n type: z.literal('start'),\n messageId: z.string().optional(),\n});\n\nexport const finishEventSchema = z.object({\n type: z.literal('finish'),\n finishReason: finishReasonSchema,\n});\n\nexport const errorEventSchema = z.object({\n type: z.literal('error'),\n errorText: z.string(),\n});\n\n// =============================================================================\n// Text Events\n// =============================================================================\n\nexport const textStartEventSchema = z.object({\n type: z.literal('text-start'),\n id: z.string(),\n});\n\nexport const textDeltaEventSchema = z.object({\n type: z.literal('text-delta'),\n id: z.string(),\n delta: z.string(),\n});\n\nexport const textEndEventSchema = z.object({\n type: z.literal('text-end'),\n id: z.string(),\n});\n\n// =============================================================================\n// Reasoning Events\n// =============================================================================\n\nexport const reasoningStartEventSchema = z.object({\n type: z.literal('reasoning-start'),\n id: z.string(),\n});\n\nexport const reasoningDeltaEventSchema = z.object({\n type: z.literal('reasoning-delta'),\n id: z.string(),\n delta: z.string(),\n});\n\nexport const reasoningEndEventSchema = z.object({\n type: z.literal('reasoning-end'),\n id: z.string(),\n});\n\n// =============================================================================\n// Tool Events\n// =============================================================================\n\nexport const toolInputStartEventSchema = z.object({\n type: z.literal('tool-input-start'),\n toolCallId: z.string(),\n toolName: z.string(),\n title: z.string().optional(),\n});\n\nexport const toolInputDeltaEventSchema = z.object({\n type: z.literal('tool-input-delta'),\n toolCallId: z.string(),\n inputTextDelta: z.string(),\n});\n\nexport const toolInputEndEventSchema = z.object({\n type: z.literal('tool-input-end'),\n toolCallId: z.string(),\n});\n\nexport const toolInputAvailableEventSchema = z.object({\n type: z.literal('tool-input-available'),\n toolCallId: z.string(),\n toolName: z.string(),\n input: z.unknown(),\n});\n\nexport const toolOutputAvailableEventSchema = z.object({\n type: z.literal('tool-output-available'),\n toolCallId: z.string(),\n output: z.unknown(),\n});\n\nexport const toolOutputErrorEventSchema = z.object({\n type: z.literal('tool-output-error'),\n toolCallId: z.string(),\n errorText: z.string(),\n});\n\n// =============================================================================\n// Block Events\n// =============================================================================\n\nexport const blockStartEventSchema = z.object({\n type: z.literal('block-start'),\n blockId: z.string(),\n blockName: z.string(),\n blockType: z.string(),\n display: displayModeSchema,\n description: z.string().optional(),\n outputToChat: z.boolean().optional(),\n thread: z.string().optional(),\n});\n\nexport const blockEndEventSchema = z.object({\n type: z.literal('block-end'),\n blockId: z.string(),\n summary: z.string().optional(),\n});\n\nexport const resourceUpdateEventSchema = z.object({\n type: z.literal('resource-update'),\n name: z.string(),\n value: z.unknown(),\n});\n\nexport const pendingToolCallSchema = z.object({\n toolCallId: z.string(),\n toolName: z.string(),\n args: z.record(z.string(), z.unknown()),\n source: z.enum(['llm', 'block']).optional(),\n outputVariable: z.string().optional(),\n blockIndex: z.number().optional(),\n});\n\nexport const toolRequestEventSchema = z.object({\n type: z.literal('tool-request'),\n toolCalls: z.array(pendingToolCallSchema),\n});\n\nexport const toolResultSchema = z.object({\n toolCallId: z.string(),\n toolName: z.string().optional(),\n result: z.unknown().optional(),\n error: z.string().optional(),\n outputVariable: z.string().optional(),\n blockIndex: z.number().optional(),\n});\n\n// =============================================================================\n// Union of all stream events\n// =============================================================================\n\nexport const streamEventSchema = z.discriminatedUnion('type', [\n // Lifecycle\n startEventSchema,\n finishEventSchema,\n errorEventSchema,\n // Text\n textStartEventSchema,\n textDeltaEventSchema,\n textEndEventSchema,\n // Reasoning\n reasoningStartEventSchema,\n reasoningDeltaEventSchema,\n reasoningEndEventSchema,\n // Tool Input/Output\n toolInputStartEventSchema,\n toolInputDeltaEventSchema,\n toolInputEndEventSchema,\n toolInputAvailableEventSchema,\n toolOutputAvailableEventSchema,\n toolOutputErrorEventSchema,\n // Block Events\n blockStartEventSchema,\n blockEndEventSchema,\n resourceUpdateEventSchema,\n toolRequestEventSchema,\n]);\n\n// =============================================================================\n// Internal Message Types (used by platform/runtime)\n// =============================================================================\n\nexport const messagePartTypeSchema = z.enum(['text', 'reasoning', 'tool-call']);\n\nexport const messagePartSchema = z.object({\n type: messagePartTypeSchema,\n visible: z.boolean(),\n content: z.string().optional(),\n toolCall: toolCallInfoSchema.optional(),\n thread: z.string().optional(),\n});\n\nexport const chatMessageSchema = z.object({\n id: z.string(),\n role: messageRoleSchema,\n parts: z.array(messagePartSchema),\n createdAt: z.string(),\n visible: z.boolean().optional(),\n content: z.string(),\n toolCalls: z.array(toolCallInfoSchema).optional(),\n reasoning: z.string().optional(),\n reasoningSignature: z.string().optional(),\n});\n\n// =============================================================================\n// UI Message Types (used by SDKs and consumer apps)\n// =============================================================================\n\nexport const uiMessageStatusSchema = z.enum(['streaming', 'done']);\nexport const uiPartStatusSchema = z.enum(['streaming', 'done']);\nexport const uiToolCallStatusSchema = z.enum(['pending', 'running', 'done', 'error']);\n\nexport const uiTextPartSchema = z.object({\n type: z.literal('text'),\n text: z.string(),\n status: uiPartStatusSchema,\n thread: z.string().optional(),\n});\n\nexport const uiReasoningPartSchema = z.object({\n type: z.literal('reasoning'),\n text: z.string(),\n status: uiPartStatusSchema,\n thread: z.string().optional(),\n});\n\nexport const uiToolCallPartSchema = z.object({\n type: z.literal('tool-call'),\n toolCallId: z.string(),\n toolName: z.string(),\n displayName: z.string().optional(),\n args: z.record(z.string(), z.unknown()),\n result: z.unknown().optional(),\n error: z.string().optional(),\n status: uiToolCallStatusSchema,\n thread: z.string().optional(),\n});\n\nexport const uiOperationStatusSchema = z.enum(['running', 'done']);\n\nexport const uiOperationPartSchema = z.object({\n type: z.literal('operation'),\n operationId: z.string(),\n name: z.string(),\n operationType: z.string(),\n status: uiOperationStatusSchema,\n thread: z.string().optional(),\n});\n\nexport const uiMessagePartSchema = z.discriminatedUnion('type', [\n uiTextPartSchema,\n uiReasoningPartSchema,\n uiToolCallPartSchema,\n uiOperationPartSchema,\n]);\n\nexport const uiMessageSchema = z.object({\n id: z.string(),\n role: z.enum(['user', 'assistant']),\n parts: z.array(uiMessagePartSchema),\n status: uiMessageStatusSchema,\n createdAt: z.coerce.date(),\n});\n\nexport function safeParseStreamEvent(data: unknown) {\n return streamEventSchema.safeParse(data);\n}\n\nexport function safeParseUIMessage(data: unknown) {\n return uiMessageSchema.safeParse(data);\n}\n\nexport function safeParseUIMessages(data: unknown) {\n return z.array(uiMessageSchema).safeParse(data);\n}\n"],"mappings":";AAAO,IAAM,WAAN,cAAuB,MAAM;AAAA,EAClC,YACE,SACO,MACA,aAAa,KACpB;AACA,UAAM,OAAO;AAHN;AACA;AAGP,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,gBAAN,cAA4B,SAAS;AAAA,EAC1C,YAAY,UAAkB,IAAY;AACxC,UAAM,GAAG,QAAQ,eAAe,EAAE,IAAI,aAAa,GAAG;AACtD,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,kBAAN,cAA8B,SAAS;AAAA,EAC5C,YACE,SACO,QACP;AACA,UAAM,SAAS,oBAAoB,GAAG;AAF/B;AAGP,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,gBAAN,cAA4B,SAAS;AAAA,EAC1C,YAAY,UAAkB,YAAoB;AAChD,UAAM,GA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M,CAAC;AAE1D,IAAM,wBAAwB,EAAE,OAAO;AAAA,EAC5C,MAAM,EAAE,QAAQ,WAAW;AAAA,EAC3B,aAAa,EAAE,OAAO;AAAA,EACtB,MAAM,EAAE,OAAO;AAAA,EACf,eAAe,EAAE,OAAO;AAAA,EACxB,QAAQ;AAAA,EACR,QAAQ,EAAE,OAAO,EAAE,SAAS;AAC9B,CAAC;AAEM,IAAM,sBAAsB,EAAE,mBAAmB,QAAQ;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,IAAM,kBAAkB,EAAE,OAAO;AAAA,EACtC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,KAAK,CAAC,QAAQ,WAAW,CAAC;AAAA,EAClC,OAAO,EAAE,MAAM,mBAAmB;AAAA,EAClC,QAAQ;AAAA,EACR,WAAW,EAAE,OAAO,KAAK;AAC3B,CAAC;AAEM,SAAS,qBAAqB,MAAe;AAClD,SAAO,kBAAkB,UAAU,IAAI;AACzC;AAEO,SAAS,mBAAmB,MAAe;AAChD,SAAO,gBAAgB,UAAU,IAAI;AACvC;AAEO,SAAS,oBAAoB,MAAe;AACjD,SAAO,EAAE,MAAM,eAAe,EAAE,UAAU,IAAI;AAChD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octavus/core",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Public types and utilities for Octavus client/server SDK communication",
5
5
  "license": "MIT",
6
6
  "author": "Octavus AI <hello@octavus.ai>",