@robbeverhelst/do 1.84.0 → 1.85.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 +34 -2
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -4478,7 +4478,8 @@ var notificationType = pgEnum("notification_type", [
4478
4478
  "occurrence_due",
4479
4479
  "contact_date_due",
4480
4480
  "automation",
4481
- "streak_at_risk"
4481
+ "streak_at_risk",
4482
+ "reflection_nudge"
4482
4483
  ]);
4483
4484
  var notifications = pgTable("notifications", {
4484
4485
  id: text("id").primaryKey(),
@@ -5114,6 +5115,23 @@ var insightsFindings = pgTable("insights_findings", {
5114
5115
  }, (t) => [
5115
5116
  index("insights_findings_tenant_idx").on(t.tenantId)
5116
5117
  ]);
5118
+ // ../../packages/schema/src/db/reflections.ts
5119
+ var reflectionKind = pgEnum("reflection_kind", ["daily", "weekly"]);
5120
+ var reflections = pgTable("reflections", {
5121
+ id: text("id").primaryKey(),
5122
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
5123
+ userId: text("user_id").notNull().references(() => users.id),
5124
+ kind: reflectionKind("kind").notNull(),
5125
+ periodKey: text("period_key").notNull(),
5126
+ wentWell: text("went_well"),
5127
+ blockers: text("blockers"),
5128
+ nextFocus: text("next_focus"),
5129
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
5130
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
5131
+ }, (t) => [
5132
+ unique("reflections_tenant_user_kind_period_uniq").on(t.tenantId, t.userId, t.kind, t.periodKey),
5133
+ index("reflections_tenant_user_created_idx").on(t.tenantId, t.userId, t.createdAt)
5134
+ ]);
5117
5135
  // ../../node_modules/zod/v4/classic/external.js
5118
5136
  var exports_external = {};
5119
5137
  __export(exports_external, {
@@ -19755,6 +19773,7 @@ var challengeSourceSchema = exports_external.enum(challengeSource.enumValues);
19755
19773
  var challengeSubjectTypeSchema = exports_external.enum(challengeSubjectType.enumValues);
19756
19774
  var automationRunStatusSchema = exports_external.enum(automationRunStatus.enumValues);
19757
19775
  var notificationTypeSchema = exports_external.enum(notificationType.enumValues);
19776
+ var reflectionKindSchema = exports_external.enum(reflectionKind.enumValues);
19758
19777
  // ../../packages/schema/src/contracts/barcode.ts
19759
19778
  var barcodeLookupQuerySchema = exports_external.object({
19760
19779
  barcode: exports_external.string().min(1).max(64)
@@ -21941,6 +21960,19 @@ var insightsOverviewSchema = exports_external.object({
21941
21960
  correlations: exports_external.array(insightsCorrelationSchema),
21942
21961
  streaks: exports_external.array(insightsStreakSchema)
21943
21962
  });
21963
+ // ../../packages/schema/src/contracts/reflections.ts
21964
+ var periodKeySchema = exports_external.string().min(1).max(10);
21965
+ var reflectionSchema = createSelectSchema(reflections, {
21966
+ createdAt: exports_external.coerce.date(),
21967
+ updatedAt: exports_external.coerce.date()
21968
+ });
21969
+ var saveReflectionInputSchema = createInsertSchema(reflections, {
21970
+ kind: reflectionKindSchema,
21971
+ periodKey: periodKeySchema,
21972
+ wentWell: exports_external.string().max(4000).nullish(),
21973
+ blockers: exports_external.string().max(4000).nullish(),
21974
+ nextFocus: exports_external.string().max(4000).nullish()
21975
+ }).omit({ id: true, tenantId: true, userId: true, createdAt: true, updatedAt: true }).strict();
21944
21976
  // ../../packages/schema/src/when.ts
21945
21977
  var WEEKDAYS = [
21946
21978
  { name: "sunday", dow: 0, code: "SU" },
@@ -24436,7 +24468,7 @@ function parseCapture2(input, now) {
24436
24468
 
24437
24469
  // src/meta.ts
24438
24470
  var CLI_NAME = "do";
24439
- var VERSION = "1.84.0";
24471
+ var VERSION = "1.85.0";
24440
24472
  var API_PREFIX = "/api/v1";
24441
24473
  var DEFAULT_API_URL = "http://localhost:3001";
24442
24474
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.84.0",
3
+ "version": "1.85.0",
4
4
  "private": false,
5
5
  "description": "do — the agent-drivable CLI over the public /api/v1 surface",
6
6
  "type": "module",