@robbeverhelst/do 1.175.0 → 1.177.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.
Files changed (2) hide show
  1. package/dist/do.js +20 -4
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -3740,6 +3740,7 @@ var userSettings = pgTable("user_settings", {
3740
3740
  pinnedAreaIds: text("pinned_area_ids").array().notNull().default([]),
3741
3741
  focusAreaId: text("focus_area_id"),
3742
3742
  focusUntil: timestamp("focus_until", { withTimezone: true }),
3743
+ quietHours: jsonb("quiet_hours").$type(),
3743
3744
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
3744
3745
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
3745
3746
  }, (t) => [unique("user_settings_tenant_user_uniq").on(t.tenantId, t.userId)]);
@@ -3944,6 +3945,9 @@ var pushSubscriptions = pgTable("push_subscriptions", {
3944
3945
  endpoint: text("endpoint").notNull(),
3945
3946
  p256dh: text("p256dh").notNull(),
3946
3947
  auth: text("auth").notNull(),
3948
+ userAgent: text("user_agent"),
3949
+ lastDeliveredAt: timestamp("last_delivered_at", { withTimezone: true }),
3950
+ lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
3947
3951
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
3948
3952
  }, (t) => [unique("push_subscriptions_endpoint_uniq").on(t.endpoint)]);
3949
3953
 
@@ -19638,11 +19642,18 @@ function setModuleEnabled(enabled, key, on) {
19638
19642
  }
19639
19643
 
19640
19644
  // ../../packages/schema/src/contracts/settings.ts
19645
+ var clockTimeSchema = string2().regex(/^([01]\d|2[0-3]):[0-5]\d$/, "a time like 22:00");
19646
+ var quietHoursSchema = object({
19647
+ from: clockTimeSchema,
19648
+ until: clockTimeSchema,
19649
+ days: array(number2().int().min(0).max(6)).max(7)
19650
+ });
19641
19651
  var PINNED_AREAS_MAX = 5;
19642
19652
  var userSettingsSchema = createSelectSchema(userSettings, {
19643
19653
  pinnedAreaIds: array(string2()).default([]),
19644
19654
  focusAreaId: string2().nullable().default(null),
19645
19655
  focusUntil: exports_coerce.date().nullable().default(null),
19656
+ quietHours: quietHoursSchema.nullable().default(null),
19646
19657
  createdAt: exports_coerce.date(),
19647
19658
  updatedAt: exports_coerce.date()
19648
19659
  }).omit({ autoRollOverdue: true });
@@ -19658,7 +19669,8 @@ var updateUserSettingsInputSchema = createUpdateSchema(userSettings, {
19658
19669
  backdrop: backdropIdSchema.nullish(),
19659
19670
  enabledModules: array(string2().trim().min(1)).transform(normalizeEnabledModules).optional(),
19660
19671
  pinnedAreaIds: array(ulidSchema).transform((ids) => [...new Set(ids)]).pipe(array(ulidSchema).max(PINNED_AREAS_MAX)).optional(),
19661
- focusAreaId: ulidSchema.nullish()
19672
+ focusAreaId: ulidSchema.nullish(),
19673
+ quietHours: quietHoursSchema.nullish()
19662
19674
  }).omit({
19663
19675
  id: true,
19664
19676
  tenantId: true,
@@ -20122,8 +20134,11 @@ var agentPageContextSchema = object({
20122
20134
  var agentChatInputSchema = object({
20123
20135
  message: string2().trim().min(1).max(8000),
20124
20136
  context: agentPageContextSchema,
20125
- threadId: string2().trim().min(1).max(64).optional()
20137
+ threadId: string2().trim().min(1).max(64).optional(),
20138
+ steer: boolean3().optional()
20126
20139
  }).strict();
20140
+ var agentChatStopInputSchema = object({ threadId: string2().trim().min(1).max(64) }).strict();
20141
+ var agentChatStopResultSchema = object({ stop: _enum2(["sent", "offline"]) });
20127
20142
  var agentChatEventSchema = discriminatedUnion("type", [
20128
20143
  object({
20129
20144
  type: literal("turn"),
@@ -20264,7 +20279,8 @@ var inboundMessageSchema = object({
20264
20279
  attachments: array(gatewayAttachmentSchema).default([]),
20265
20280
  replyToPostId: ulidSchema.optional(),
20266
20281
  context: agentPageContextSchema.optional(),
20267
- history: array(object({ role: _enum2(["member", "agent"]), text: string2() })).optional()
20282
+ history: array(object({ role: _enum2(["member", "agent"]), text: string2() })).optional(),
20283
+ steer: boolean3().optional()
20268
20284
  });
20269
20285
  var threadTargetSchema = union([
20270
20286
  object({ id: ulidSchema }).strict(),
@@ -21592,7 +21608,7 @@ function parseCapture2(input, now) {
21592
21608
 
21593
21609
  // src/meta.ts
21594
21610
  var CLI_NAME = "do";
21595
- var VERSION = "1.175.0";
21611
+ var VERSION = "1.177.0";
21596
21612
  var API_PREFIX = "/api/v1";
21597
21613
  var DEFAULT_API_URL = "http://localhost:3001";
21598
21614
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.175.0",
3
+ "version": "1.177.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "homepage": "https://github.com/robbeverhelst/do/tree/main/apps/cli",