@robbeverhelst/do 1.290.0 → 1.291.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 +163 -118
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -4925,6 +4925,7 @@ var contactMoments = pgTable("contact_moments", {
4925
4925
  kind: contactMomentKind("kind").notNull().default("other"),
4926
4926
  at: timestamp("at", { withTimezone: true }).notNull(),
4927
4927
  summary: text("summary"),
4928
+ note: text("note"),
4928
4929
  source: text("source").notNull().default("manual"),
4929
4930
  sourceNodeId: text("source_node_id").references(() => nodes.id),
4930
4931
  withContactIds: text("with_contact_ids").array().notNull().default([]),
@@ -4946,6 +4947,7 @@ var giftIdeas = pgTable("gift_ideas", {
4946
4947
  title: text("title").notNull(),
4947
4948
  url: text("url"),
4948
4949
  priceCents: integer("price_cents"),
4950
+ note: text("note"),
4949
4951
  heardAt: timestamp("heard_at", { withTimezone: true }).notNull().defaultNow(),
4950
4952
  source: text("source").notNull().default("manual"),
4951
4953
  occasionKeyDateId: text("occasion_key_date_id").references(() => keyDates.id, {
@@ -20159,6 +20161,7 @@ var collectionEntryKindValues = [
20159
20161
  "service",
20160
20162
  "repair",
20161
20163
  "fault",
20164
+ "part",
20162
20165
  "lent",
20163
20166
  "returned",
20164
20167
  "valued",
@@ -21352,15 +21355,21 @@ var houseUpkeepRoutineSchema = object({
21352
21355
  itemId: string2(),
21353
21356
  itemTitle: string2(),
21354
21357
  category: string2().nullable(),
21355
- months: array(upkeepMonthMarkSchema).length(12)
21358
+ months: array(upkeepMonthMarkSchema).length(12),
21359
+ bookedOn: day.nullable().default(null),
21360
+ itemState: string2().nullable().default(null),
21361
+ certified: boolean3().default(false)
21356
21362
  });
21357
21363
  var houseUpkeepNeedSchema = object({
21358
21364
  id: string2(),
21365
+ kind: _enum2(["supply", "loan"]).default("supply"),
21359
21366
  title: string2(),
21360
21367
  quantity: number2(),
21361
21368
  unit: string2().nullable(),
21362
21369
  low: boolean3(),
21363
- itemTitle: string2()
21370
+ itemTitle: string2(),
21371
+ who: string2().nullable().default(null),
21372
+ dueBack: day.nullable().default(null)
21364
21373
  });
21365
21374
  var houseUpkeepYearSchema = object({
21366
21375
  year: number2().int(),
@@ -21371,7 +21380,8 @@ var houseUpkeepYearSchema = object({
21371
21380
  spent: object({
21372
21381
  total: number2(),
21373
21382
  repairs: number2(),
21374
- services: number2()
21383
+ services: number2(),
21384
+ parts: number2().default(0)
21375
21385
  })
21376
21386
  });
21377
21387
  var houseUpkeepYearQuerySchema = object({ year: exports_coerce.number().int().min(2000).max(2100).optional() }).strict();
@@ -23241,6 +23251,120 @@ var updateUserSettingsInputSchema = createUpdateSchema(userSettings, {
23241
23251
  focusUntil: true
23242
23252
  }).strict();
23243
23253
 
23254
+ // ../../packages/schema/src/contracts/day-record.ts
23255
+ var dayDateSchema = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a day must be YYYY-MM-DD").refine((d) => {
23256
+ const [y, m, day] = d.split("-").map(Number);
23257
+ const at = new Date(Date.UTC(y, m - 1, day));
23258
+ return at.getUTCFullYear() === y && at.getUTCMonth() === m - 1 && at.getUTCDate() === day;
23259
+ }, "not a calendar day");
23260
+ var RECORD_ROUND_MINUTES = 15;
23261
+ var timeBlockStatusSchema = _enum2(TIME_BLOCK_STATUSES);
23262
+ var recordStateSchema = _enum2(RECORD_STATES);
23263
+ var recordConfidenceSchema = _enum2(RECORD_CONFIDENCES);
23264
+ var evidenceSourceSchema = _enum2(EVIDENCE_SOURCES);
23265
+ var blockEvidenceInputSchema = object({
23266
+ source: evidenceSourceSchema,
23267
+ refKind: string2().trim().min(1).max(40).optional(),
23268
+ refId: string2().trim().min(1).max(100).optional(),
23269
+ at: exports_coerce.date().optional(),
23270
+ note: string2().trim().min(1).max(500).optional()
23271
+ }).strict().refine((v) => Boolean(v.refKind) === Boolean(v.refId), {
23272
+ message: "refKind and refId come together",
23273
+ path: ["refId"]
23274
+ });
23275
+ var dayRecordChangeSchema = object({
23276
+ blockId: ulidSchema.optional(),
23277
+ id: ulidSchema.optional(),
23278
+ lifeKind: lifeBlockKindSchema.optional(),
23279
+ title: string2().trim().min(1).max(500).optional(),
23280
+ startAt: exports_coerce.date().optional(),
23281
+ endAt: exports_coerce.date().optional(),
23282
+ skipped: literal(true).optional(),
23283
+ replacedBy: ulidSchema.optional(),
23284
+ evidence: array(blockEvidenceInputSchema).max(20).default([])
23285
+ }).strict().refine((v) => Boolean(v.blockId) !== Boolean(v.id), {
23286
+ message: "name an existing block (blockId) or mint a new one (id), not both",
23287
+ path: ["blockId"]
23288
+ }).refine((v) => !v.id || v.lifeKind && v.startAt && v.endAt, {
23289
+ message: "a new block needs lifeKind, startAt and endAt",
23290
+ path: ["id"]
23291
+ }).refine((v) => !v.blockId || !v.lifeKind, {
23292
+ message: "a block's kind doesn't change in its record",
23293
+ path: ["lifeKind"]
23294
+ }).refine((v) => !(v.skipped && v.replacedBy), {
23295
+ message: "a block is skipped or replaced, not both",
23296
+ path: ["replacedBy"]
23297
+ }).refine((v) => !v.startAt || !v.endAt || v.endAt > v.startAt, {
23298
+ message: "endAt must be after startAt",
23299
+ path: ["endAt"]
23300
+ });
23301
+ var dayRecordWriteInputSchema = object({
23302
+ changes: array(dayRecordChangeSchema).min(1).max(50)
23303
+ }).strict();
23304
+ var dayRecordAskInputSchema = object({
23305
+ question: string2().trim().min(1).max(300),
23306
+ blockId: ulidSchema.optional(),
23307
+ id: ulidSchema.optional(),
23308
+ startAt: exports_coerce.date().optional(),
23309
+ endAt: exports_coerce.date().optional()
23310
+ }).strict().refine((v) => Boolean(v.blockId) !== Boolean(v.id && v.startAt && v.endAt), {
23311
+ message: "ask about a block (blockId) or a gap (id, startAt, endAt)",
23312
+ path: ["blockId"]
23313
+ }).refine((v) => !v.startAt || !v.endAt || v.endAt > v.startAt, {
23314
+ message: "endAt must be after startAt",
23315
+ path: ["endAt"]
23316
+ });
23317
+ var dayRecordUndoInputSchema = object({ receipt: string2().regex(/^\d+$/, "a receipt is a write's id") }).strict();
23318
+ var blockEvidenceSchema = object({
23319
+ id: string2(),
23320
+ source: evidenceSourceSchema,
23321
+ refKind: string2().nullable(),
23322
+ refId: string2().nullable(),
23323
+ at: exports_coerce.date().nullable(),
23324
+ weight: number2().int(),
23325
+ note: string2().nullable()
23326
+ });
23327
+ var dayRecordBlockSchema = timeBlockViewSchema.extend({
23328
+ status: timeBlockStatusSchema,
23329
+ recordState: recordStateSchema,
23330
+ confidence: recordConfidenceSchema.nullable(),
23331
+ replacedById: string2().nullable(),
23332
+ question: string2().nullable(),
23333
+ askedAt: exports_coerce.date().nullable(),
23334
+ evidence: array(blockEvidenceSchema)
23335
+ });
23336
+ var dayRecordSchema = object({
23337
+ date: dayDateSchema,
23338
+ timezone: string2(),
23339
+ from: exports_coerce.date(),
23340
+ to: exports_coerce.date(),
23341
+ blocks: array(dayRecordBlockSchema),
23342
+ questions: array(object({ blockId: string2(), question: string2(), askedAt: exports_coerce.date() })),
23343
+ filledIn: array(string2()),
23344
+ gaps: array(object({ startAt: exports_coerce.date(), endAt: exports_coerce.date() })),
23345
+ closed: boolean3(),
23346
+ autoClosesAt: exports_coerce.date()
23347
+ });
23348
+ var dayRecordReceiptLineSchema = object({
23349
+ blockId: string2(),
23350
+ title: string2(),
23351
+ lifeKind: lifeBlockKindSchema.nullable(),
23352
+ status: timeBlockStatusSchema,
23353
+ text: string2()
23354
+ });
23355
+ var dayRecordReceiptSchema = object({
23356
+ receipt: string2(),
23357
+ date: dayDateSchema,
23358
+ lines: array(dayRecordReceiptLineSchema),
23359
+ googleUpdated: boolean3(),
23360
+ day: dayRecordSchema
23361
+ });
23362
+ var dayRecordUndoResultSchema = object({
23363
+ undone: array(string2()),
23364
+ day: dayRecordSchema
23365
+ });
23366
+ var STATUS_QUARTER_MS = RECORD_ROUND_MINUTES * 60000;
23367
+
23244
23368
  // ../../packages/schema/src/contracts/insights.ts
23245
23369
  var insightsActivityPointSchema = object({
23246
23370
  day: string2(),
@@ -23966,11 +24090,19 @@ var contactMomentSchema = createSelectSchema(contactMoments, {
23966
24090
  at: exports_coerce.date(),
23967
24091
  expiresAt: exports_coerce.date().nullable(),
23968
24092
  thankedAt: exports_coerce.date().nullable().default(null),
24093
+ note: string2().nullable().default(null),
23969
24094
  createdAt: exports_coerce.date(),
23970
24095
  updatedAt: exports_coerce.date()
23971
24096
  });
24097
+ var momentSourceNodeSchema = object({
24098
+ id: ulidSchema,
24099
+ type: string2(),
24100
+ title: string2()
24101
+ });
23972
24102
  var contactMomentViewSchema = contactMomentSchema.extend({
23973
- contactTitle: string2()
24103
+ contactTitle: string2(),
24104
+ sourceNode: momentSourceNodeSchema.nullable().default(null),
24105
+ photoCount: number2().int().min(0).default(0)
23974
24106
  });
23975
24107
  var createContactMomentInputSchema = object({
23976
24108
  id: ulidSchema,
@@ -23978,6 +24110,7 @@ var createContactMomentInputSchema = object({
23978
24110
  kind: contactMomentKindSchema.optional(),
23979
24111
  at: exports_coerce.date().optional(),
23980
24112
  summary: string2().trim().min(1).max(500).nullish(),
24113
+ note: string2().trim().min(1).max(200).nullish(),
23981
24114
  source: sourceSchema2.optional(),
23982
24115
  sourceNodeId: ulidSchema.nullish(),
23983
24116
  withContactIds: array(ulidSchema).max(50).optional(),
@@ -23994,6 +24127,7 @@ var contactMomentsQuerySchema = object({
23994
24127
  });
23995
24128
  var giftIdeaSchema = createSelectSchema(giftIdeas, {
23996
24129
  heardAt: exports_coerce.date(),
24130
+ note: string2().nullable().default(null),
23997
24131
  createdAt: exports_coerce.date(),
23998
24132
  updatedAt: exports_coerce.date()
23999
24133
  });
@@ -24007,6 +24141,7 @@ var createGiftIdeaInputSchema = object({
24007
24141
  title: string2().trim().min(1).max(200),
24008
24142
  url: string2().url().max(2000).nullish(),
24009
24143
  priceCents: number2().int().min(0).max(1e8).nullish(),
24144
+ note: string2().trim().min(1).max(200).nullish(),
24010
24145
  heardAt: exports_coerce.date().optional(),
24011
24146
  source: sourceSchema2.optional(),
24012
24147
  occasionKeyDateId: ulidSchema.nullish(),
@@ -24162,7 +24297,13 @@ var personBriefSchema = object({
24162
24297
  circleIds: array(ulidSchema)
24163
24298
  }),
24164
24299
  lifeUpdates: array(contactMomentSchema),
24165
- followUps: array(object({ id: ulidSchema, label: string2().nullable(), date: keyDateDaySchema })),
24300
+ followUps: array(object({
24301
+ id: ulidSchema,
24302
+ label: string2().nullable(),
24303
+ date: keyDateDaySchema,
24304
+ taskId: ulidSchema.nullable().default(null),
24305
+ about: string2().nullable().default(null)
24306
+ })),
24166
24307
  giftIdeas: array(giftIdeaSchema),
24167
24308
  upcoming: array(object({
24168
24309
  id: ulidSchema,
@@ -24178,6 +24319,22 @@ var personBriefSchema = object({
24178
24319
  since: keyDateDaySchema,
24179
24320
  dueBack: keyDateDaySchema.nullable(),
24180
24321
  note: string2().nullable()
24322
+ })).default([]),
24323
+ knownSince: number2().int().nullable().default(null),
24324
+ lastSeen: object({ at: exports_coerce.date(), summary: string2().nullable(), source: string2() }).nullable().default(null),
24325
+ kids: array(object({
24326
+ contactId: ulidSchema,
24327
+ title: string2(),
24328
+ birthday: keyDateDaySchema.nullable(),
24329
+ yearKnown: boolean3()
24330
+ })).default([]),
24331
+ dates: array(object({
24332
+ id: ulidSchema,
24333
+ kind: string2(),
24334
+ label: string2().nullable(),
24335
+ nextOn: keyDateDaySchema,
24336
+ taskOn: keyDateDaySchema,
24337
+ taskId: ulidSchema.nullable()
24181
24338
  })).default([])
24182
24339
  });
24183
24340
  var peopleOverviewQuerySchema = object({
@@ -27086,118 +27243,6 @@ var updateCalendarConnectionCalendarInputSchema = object({
27086
27243
  countsAsBusy: boolean3().optional()
27087
27244
  });
27088
27245
 
27089
- // ../../packages/schema/src/contracts/day-record.ts
27090
- var dayDateSchema = string2().regex(/^\d{4}-\d{2}-\d{2}$/, "a day must be YYYY-MM-DD").refine((d) => {
27091
- const [y, m, day] = d.split("-").map(Number);
27092
- const at = new Date(Date.UTC(y, m - 1, day));
27093
- return at.getUTCFullYear() === y && at.getUTCMonth() === m - 1 && at.getUTCDate() === day;
27094
- }, "not a calendar day");
27095
- var timeBlockStatusSchema = _enum2(TIME_BLOCK_STATUSES);
27096
- var recordStateSchema = _enum2(RECORD_STATES);
27097
- var recordConfidenceSchema = _enum2(RECORD_CONFIDENCES);
27098
- var evidenceSourceSchema = _enum2(EVIDENCE_SOURCES);
27099
- var blockEvidenceInputSchema = object({
27100
- source: evidenceSourceSchema,
27101
- refKind: string2().trim().min(1).max(40).optional(),
27102
- refId: string2().trim().min(1).max(100).optional(),
27103
- at: exports_coerce.date().optional(),
27104
- note: string2().trim().min(1).max(500).optional()
27105
- }).strict().refine((v) => Boolean(v.refKind) === Boolean(v.refId), {
27106
- message: "refKind and refId come together",
27107
- path: ["refId"]
27108
- });
27109
- var dayRecordChangeSchema = object({
27110
- blockId: ulidSchema.optional(),
27111
- id: ulidSchema.optional(),
27112
- lifeKind: lifeBlockKindSchema.optional(),
27113
- title: string2().trim().min(1).max(500).optional(),
27114
- startAt: exports_coerce.date().optional(),
27115
- endAt: exports_coerce.date().optional(),
27116
- skipped: literal(true).optional(),
27117
- replacedBy: ulidSchema.optional(),
27118
- evidence: array(blockEvidenceInputSchema).max(20).default([])
27119
- }).strict().refine((v) => Boolean(v.blockId) !== Boolean(v.id), {
27120
- message: "name an existing block (blockId) or mint a new one (id), not both",
27121
- path: ["blockId"]
27122
- }).refine((v) => !v.id || v.lifeKind && v.startAt && v.endAt, {
27123
- message: "a new block needs lifeKind, startAt and endAt",
27124
- path: ["id"]
27125
- }).refine((v) => !v.blockId || !v.lifeKind, {
27126
- message: "a block's kind doesn't change in its record",
27127
- path: ["lifeKind"]
27128
- }).refine((v) => !(v.skipped && v.replacedBy), {
27129
- message: "a block is skipped or replaced, not both",
27130
- path: ["replacedBy"]
27131
- }).refine((v) => !v.startAt || !v.endAt || v.endAt > v.startAt, {
27132
- message: "endAt must be after startAt",
27133
- path: ["endAt"]
27134
- });
27135
- var dayRecordWriteInputSchema = object({
27136
- changes: array(dayRecordChangeSchema).min(1).max(50)
27137
- }).strict();
27138
- var dayRecordAskInputSchema = object({
27139
- question: string2().trim().min(1).max(300),
27140
- blockId: ulidSchema.optional(),
27141
- id: ulidSchema.optional(),
27142
- startAt: exports_coerce.date().optional(),
27143
- endAt: exports_coerce.date().optional()
27144
- }).strict().refine((v) => Boolean(v.blockId) !== Boolean(v.id && v.startAt && v.endAt), {
27145
- message: "ask about a block (blockId) or a gap (id, startAt, endAt)",
27146
- path: ["blockId"]
27147
- }).refine((v) => !v.startAt || !v.endAt || v.endAt > v.startAt, {
27148
- message: "endAt must be after startAt",
27149
- path: ["endAt"]
27150
- });
27151
- var dayRecordUndoInputSchema = object({ receipt: string2().regex(/^\d+$/, "a receipt is a write's id") }).strict();
27152
- var blockEvidenceSchema = object({
27153
- id: string2(),
27154
- source: evidenceSourceSchema,
27155
- refKind: string2().nullable(),
27156
- refId: string2().nullable(),
27157
- at: exports_coerce.date().nullable(),
27158
- weight: number2().int(),
27159
- note: string2().nullable()
27160
- });
27161
- var dayRecordBlockSchema = timeBlockViewSchema.extend({
27162
- status: timeBlockStatusSchema,
27163
- recordState: recordStateSchema,
27164
- confidence: recordConfidenceSchema.nullable(),
27165
- replacedById: string2().nullable(),
27166
- question: string2().nullable(),
27167
- askedAt: exports_coerce.date().nullable(),
27168
- evidence: array(blockEvidenceSchema)
27169
- });
27170
- var dayRecordSchema = object({
27171
- date: dayDateSchema,
27172
- timezone: string2(),
27173
- from: exports_coerce.date(),
27174
- to: exports_coerce.date(),
27175
- blocks: array(dayRecordBlockSchema),
27176
- questions: array(object({ blockId: string2(), question: string2(), askedAt: exports_coerce.date() })),
27177
- filledIn: array(string2()),
27178
- gaps: array(object({ startAt: exports_coerce.date(), endAt: exports_coerce.date() })),
27179
- closed: boolean3(),
27180
- autoClosesAt: exports_coerce.date()
27181
- });
27182
- var dayRecordReceiptLineSchema = object({
27183
- blockId: string2(),
27184
- title: string2(),
27185
- lifeKind: lifeBlockKindSchema.nullable(),
27186
- status: timeBlockStatusSchema,
27187
- text: string2()
27188
- });
27189
- var dayRecordReceiptSchema = object({
27190
- receipt: string2(),
27191
- date: dayDateSchema,
27192
- lines: array(dayRecordReceiptLineSchema),
27193
- googleUpdated: boolean3(),
27194
- day: dayRecordSchema
27195
- });
27196
- var dayRecordUndoResultSchema = object({
27197
- undone: array(string2()),
27198
- day: dayRecordSchema
27199
- });
27200
-
27201
27246
  // ../../packages/schema/src/contracts/plans.ts
27202
27247
  var PLAN_KINDS = ["week", "day"];
27203
27248
  var PLAN_ITEM_ACTIONS = ["plan", "someday", "let_go"];
@@ -28718,7 +28763,7 @@ function parseCapture2(input, now) {
28718
28763
 
28719
28764
  // src/meta.ts
28720
28765
  var CLI_NAME = "do";
28721
- var VERSION = "1.290.0";
28766
+ var VERSION = "1.291.0";
28722
28767
  var API_PREFIX = "/api/v1";
28723
28768
  var DEFAULT_API_URL = "http://localhost:3001";
28724
28769
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.290.0",
3
+ "version": "1.291.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",