@maudecode/cowtail-cli 0.10.0 → 0.12.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/cowtail.js +23 -12
- package/package.json +1 -1
package/dist/cowtail.js
CHANGED
|
@@ -16390,6 +16390,16 @@ var openclawActionStateSchema = exports_external.enum(["pending", "submitted", "
|
|
|
16390
16390
|
var openclawToolCallStatusSchema = exports_external.enum(["pending", "running", "complete", "error"]);
|
|
16391
16391
|
var openclawEventTypeSchema = exports_external.enum(openclawEventTypes);
|
|
16392
16392
|
var openclawSequenceSchema = exports_external.number().int().nonnegative();
|
|
16393
|
+
var openclawMessageTextSchema = exports_external.string();
|
|
16394
|
+
function hasOpenClawRenderableContent(value) {
|
|
16395
|
+
return value.text.trim().length > 0 || (value.links?.length ?? 0) > 0 || (value.toolCalls?.length ?? 0) > 0 || (value.actions?.length ?? 0) > 0;
|
|
16396
|
+
}
|
|
16397
|
+
function requireOpenClawRenderableContent(schema) {
|
|
16398
|
+
return schema.refine((value) => hasOpenClawRenderableContent(value), {
|
|
16399
|
+
message: "OpenClaw messages require text or renderable content",
|
|
16400
|
+
path: ["text"]
|
|
16401
|
+
});
|
|
16402
|
+
}
|
|
16393
16403
|
var openclawLinkSchema = exports_external.object({
|
|
16394
16404
|
label: nonEmptyStringSchema,
|
|
16395
16405
|
url: nonEmptyStringSchema
|
|
@@ -16432,18 +16442,19 @@ var openclawThreadRecordSchema = exports_external.object({
|
|
|
16432
16442
|
updatedAt: timestampSchema,
|
|
16433
16443
|
lastMessageAt: timestampSchema.optional()
|
|
16434
16444
|
});
|
|
16435
|
-
var
|
|
16445
|
+
var openclawMessageRecordBaseSchema = exports_external.object({
|
|
16436
16446
|
id: nonEmptyStringSchema,
|
|
16437
16447
|
threadId: nonEmptyStringSchema,
|
|
16438
16448
|
direction: openclawMessageDirectionSchema,
|
|
16439
16449
|
authorLabel: nonEmptyStringSchema.optional(),
|
|
16440
|
-
text:
|
|
16450
|
+
text: openclawMessageTextSchema,
|
|
16441
16451
|
links: exports_external.array(openclawLinkSchema).default([]),
|
|
16442
16452
|
toolCalls: exports_external.array(openclawToolCallRecordSchema).default([]),
|
|
16443
16453
|
deliveryState: openclawDeliveryStateSchema,
|
|
16444
16454
|
createdAt: timestampSchema,
|
|
16445
16455
|
updatedAt: timestampSchema
|
|
16446
16456
|
});
|
|
16457
|
+
var openclawMessageRecordSchema = requireOpenClawRenderableContent(openclawMessageRecordBaseSchema);
|
|
16447
16458
|
var openclawActionRecordSchema = exports_external.object({
|
|
16448
16459
|
id: nonEmptyStringSchema,
|
|
16449
16460
|
threadId: nonEmptyStringSchema,
|
|
@@ -16482,28 +16493,28 @@ var openclawActionDraftSchema = exports_external.object({
|
|
|
16482
16493
|
kind: nonEmptyStringSchema,
|
|
16483
16494
|
payload: jsonObjectSchema
|
|
16484
16495
|
});
|
|
16485
|
-
var openclawPluginMessageCommandSchema = exports_external.object({
|
|
16496
|
+
var openclawPluginMessageCommandSchema = requireOpenClawRenderableContent(exports_external.object({
|
|
16486
16497
|
type: exports_external.literal("openclaw_message"),
|
|
16487
16498
|
requestId: openclawRequestIdSchema,
|
|
16488
16499
|
sessionKey: nonEmptyStringSchema,
|
|
16489
16500
|
title: nonEmptyStringSchema.optional(),
|
|
16490
|
-
text:
|
|
16501
|
+
text: openclawMessageTextSchema,
|
|
16491
16502
|
authorLabel: nonEmptyStringSchema.optional(),
|
|
16492
16503
|
links: exports_external.array(openclawLinkSchema).default([]),
|
|
16493
16504
|
toolCalls: exports_external.array(openclawToolCallRecordSchema).default([]),
|
|
16494
16505
|
actions: exports_external.array(openclawActionDraftSchema).default([]),
|
|
16495
16506
|
deliveryState: openclawDeliveryStateSchema.optional()
|
|
16496
|
-
});
|
|
16497
|
-
var openclawPluginMessageUpdateCommandSchema = exports_external.object({
|
|
16507
|
+
}));
|
|
16508
|
+
var openclawPluginMessageUpdateCommandSchema = requireOpenClawRenderableContent(exports_external.object({
|
|
16498
16509
|
type: exports_external.literal("openclaw_message_update"),
|
|
16499
16510
|
requestId: openclawRequestIdSchema,
|
|
16500
16511
|
messageId: nonEmptyStringSchema,
|
|
16501
|
-
text:
|
|
16512
|
+
text: openclawMessageTextSchema,
|
|
16502
16513
|
links: exports_external.array(openclawLinkSchema).optional(),
|
|
16503
16514
|
toolCalls: exports_external.array(openclawToolCallRecordSchema).optional(),
|
|
16504
16515
|
actions: exports_external.array(openclawActionDraftSchema).optional(),
|
|
16505
16516
|
deliveryState: openclawDeliveryStateSchema.optional()
|
|
16506
|
-
});
|
|
16517
|
+
}));
|
|
16507
16518
|
var openclawIosNewThreadCommandSchema = exports_external.object({
|
|
16508
16519
|
type: exports_external.literal("ios_new_thread"),
|
|
16509
16520
|
requestId: openclawRequestIdSchema,
|
|
@@ -16551,7 +16562,7 @@ var openclawActionResultCommandSchema = exports_external.object({
|
|
|
16551
16562
|
state: exports_external.enum(["submitted", "failed", "expired"]),
|
|
16552
16563
|
resultMetadata: jsonObjectSchema.optional()
|
|
16553
16564
|
});
|
|
16554
|
-
var openclawRealtimeClientMessageSchema = exports_external.
|
|
16565
|
+
var openclawRealtimeClientMessageSchema = exports_external.union([
|
|
16555
16566
|
openclawPluginMessageCommandSchema,
|
|
16556
16567
|
openclawPluginMessageUpdateCommandSchema,
|
|
16557
16568
|
openclawIosNewThreadCommandSchema,
|
|
@@ -16593,9 +16604,9 @@ var openclawMessageListResponseSchema = exports_external.object({
|
|
|
16593
16604
|
count: exports_external.number().int().nonnegative(),
|
|
16594
16605
|
messages: exports_external.array(openclawMessageRecordSchema)
|
|
16595
16606
|
});
|
|
16596
|
-
var openclawMessageWithActionsRecordSchema =
|
|
16607
|
+
var openclawMessageWithActionsRecordSchema = requireOpenClawRenderableContent(openclawMessageRecordBaseSchema.extend({
|
|
16597
16608
|
actions: exports_external.array(openclawActionRecordSchema).default([])
|
|
16598
|
-
});
|
|
16609
|
+
}));
|
|
16599
16610
|
var openclawMessageWithActionsListResponseSchema = exports_external.object({
|
|
16600
16611
|
ok: exports_external.literal(true),
|
|
16601
16612
|
count: exports_external.number().int().nonnegative(),
|
|
@@ -18037,7 +18048,7 @@ import { tmpdir } from "node:os";
|
|
|
18037
18048
|
import { basename, dirname, join as join2 } from "node:path";
|
|
18038
18049
|
|
|
18039
18050
|
// src/lib/version.ts
|
|
18040
|
-
var rawVersion = "v0.
|
|
18051
|
+
var rawVersion = "v0.12.0"?.trim() || "dev";
|
|
18041
18052
|
var cowtailVersionLabel = rawVersion === "dev" || rawVersion.startsWith("v") ? rawVersion : `v${rawVersion}`;
|
|
18042
18053
|
|
|
18043
18054
|
// src/lib/update.ts
|