@robbeverhelst/do 1.177.0 → 1.179.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 +87 -2
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -3948,6 +3948,8 @@ var pushSubscriptions = pgTable("push_subscriptions", {
3948
3948
  userAgent: text("user_agent"),
3949
3949
  lastDeliveredAt: timestamp("last_delivered_at", { withTimezone: true }),
3950
3950
  lastSeenAt: timestamp("last_seen_at", { withTimezone: true }),
3951
+ lastAnsweredAt: timestamp("last_answered_at", { withTimezone: true }),
3952
+ lastCheckedAt: timestamp("last_checked_at", { withTimezone: true }),
3951
3953
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow()
3952
3954
  }, (t) => [unique("push_subscriptions_endpoint_uniq").on(t.endpoint)]);
3953
3955
 
@@ -19325,6 +19327,22 @@ var restAreaInputSchema = object({
19325
19327
  until: exports_iso.date(),
19326
19328
  habits: _enum2(["keep", "pause"]).default("keep")
19327
19329
  }).strict();
19330
+ var areaToProjectInputSchema = object({ projectId: ulidSchema, intoAreaId: ulidSchema.nullable() }).strict();
19331
+ var areaMovedSchema = object({
19332
+ tasks: array(string2()),
19333
+ projects: array(string2()),
19334
+ habits: array(string2()),
19335
+ routines: array(string2()),
19336
+ notes: array(string2()),
19337
+ collectionItems: array(string2())
19338
+ });
19339
+ var areaToProjectResultSchema = object({
19340
+ areaId: string2(),
19341
+ projectId: string2(),
19342
+ intoAreaId: string2().nullable(),
19343
+ moved: areaMovedSchema
19344
+ });
19345
+ var undoAreaToProjectInputSchema = object({ projectId: ulidSchema, moved: areaMovedSchema }).strict();
19328
19346
 
19329
19347
  // ../../packages/schema/src/presets/facets.ts
19330
19348
  var PANTRY_DISPLAY_KIND = "pantry";
@@ -20381,6 +20399,17 @@ var ackFrameSchema = frame("ack", {
20381
20399
  created: boolean3().optional(),
20382
20400
  error: agentGatewayErrorSchema.optional()
20383
20401
  });
20402
+ var unseenPostSchema = object({
20403
+ postId: ulidSchema,
20404
+ threadId: ulidSchema,
20405
+ memberId: string2().min(1),
20406
+ title: string2(),
20407
+ threadTitle: string2().nullable(),
20408
+ path: string2().startsWith("/"),
20409
+ url: string2().url().nullable(),
20410
+ pushedAt: string2().datetime()
20411
+ });
20412
+ var postUnseenFrameSchema = frame("post.unseen", { post: unseenPostSchema });
20384
20413
  var agentGatewayServerFrameSchema = discriminatedUnion("type", [
20385
20414
  readyFrameSchema,
20386
20415
  membersFrameSchema,
@@ -20388,7 +20417,8 @@ var agentGatewayServerFrameSchema = discriminatedUnion("type", [
20388
20417
  messageFrameSchema,
20389
20418
  promptAnswerFrameSchema,
20390
20419
  interruptFrameSchema,
20391
- ackFrameSchema
20420
+ ackFrameSchema,
20421
+ postUnseenFrameSchema
20392
20422
  ]);
20393
20423
  var messageAckFrameSchema = frame("message.ack", { messageId: ulidSchema });
20394
20424
  var postFrameSchema = frame("post", { post: agentPostInputSchema });
@@ -20404,8 +20434,10 @@ var promptCloseFrameSchema = frame("prompt.close", {
20404
20434
  optionId: string2().optional(),
20405
20435
  expired: boolean3()
20406
20436
  });
20437
+ var postUnseenAckFrameSchema = frame("post.unseen.ack", { postId: ulidSchema });
20407
20438
  var agentGatewayClientFrameSchema = discriminatedUnion("type", [
20408
20439
  messageAckFrameSchema,
20440
+ postUnseenAckFrameSchema,
20409
20441
  postFrameSchema,
20410
20442
  postEditFrameSchema,
20411
20443
  postDeleteFrameSchema,
@@ -21608,7 +21640,7 @@ function parseCapture2(input, now) {
21608
21640
 
21609
21641
  // src/meta.ts
21610
21642
  var CLI_NAME = "do";
21611
- var VERSION = "1.177.0";
21643
+ var VERSION = "1.179.0";
21612
21644
  var API_PREFIX = "/api/v1";
21613
21645
  var DEFAULT_API_URL = "http://localhost:3001";
21614
21646
 
@@ -23532,6 +23564,36 @@ var COMMAND_SPECS = [
23532
23564
  returns: "UserSettings",
23533
23565
  notes: "Reads then patches settings.pinnedAreaIds."
23534
23566
  },
23567
+ {
23568
+ path: ["areas", "make-project"],
23569
+ summary: "Make an Area that finishes a Project (prints the receipt for undo).",
23570
+ args: [{ name: "id", required: true, description: "Area ULID." }],
23571
+ flags: [
23572
+ {
23573
+ name: "into",
23574
+ type: "string",
23575
+ description: "The Area to file the new Project under (none when left out)."
23576
+ }
23577
+ ],
23578
+ scopes: ["areas:write", "projects:write"],
23579
+ returns: "AreaToProjectResult",
23580
+ notes: "POST /api/v1/areas/{id}/to-project (Areas 8). The Project takes the Area's title; its loose tasks go inside, its Projects, habits, routines and notes move beside it, and the Area is archived. An agent proposes this; only the member runs it."
23581
+ },
23582
+ {
23583
+ path: ["areas", "undo-make-project"],
23584
+ summary: "Undo `areas make-project` from its receipt.",
23585
+ args: [{ name: "id", required: true, description: "Area ULID." }],
23586
+ flags: [
23587
+ {
23588
+ name: "data",
23589
+ type: "string",
23590
+ description: "The receipt as JSON: { projectId, moved } from `areas make-project`."
23591
+ }
23592
+ ],
23593
+ scopes: ["areas:write", "projects:write"],
23594
+ returns: "AreaView",
23595
+ notes: "POST /api/v1/areas/{id}/to-project/undo (Areas 8). Everything comes back; the Project goes."
23596
+ },
23535
23597
  {
23536
23598
  path: ["places", "import"],
23537
23599
  summary: "Import the rooms of the house once from Gaard's house.json.",
@@ -25949,6 +26011,29 @@ var HANDLERS = {
25949
26011
  },
25950
26012
  "areas pin": async ({ args, requireClient }) => setAreaPinned(args, requireClient, true),
25951
26013
  "areas unpin": async ({ args, requireClient }) => setAreaPinned(args, requireClient, false),
26014
+ "areas make-project": async ({ args, flags, requireClient }) => {
26015
+ const id = requireArg(args, 0, "area id");
26016
+ const input = parseInput(areaToProjectInputSchema, {
26017
+ projectId: ulid3(),
26018
+ intoAreaId: flagString(flags, "into") ?? null
26019
+ });
26020
+ return {
26021
+ data: await requireClient().post(`/areas/${id}/to-project`, input),
26022
+ render: renderRecord
26023
+ };
26024
+ },
26025
+ "areas undo-make-project": async ({ args, flags, requireClient }) => {
26026
+ const id = requireArg(args, 0, "area id");
26027
+ const receipt = readDataFlag(flags);
26028
+ const input = parseInput(undoAreaToProjectInputSchema, {
26029
+ projectId: receipt.projectId,
26030
+ moved: receipt.moved
26031
+ });
26032
+ return {
26033
+ data: await requireClient().post(`/areas/${id}/to-project/undo`, input),
26034
+ render: renderRecord
26035
+ };
26036
+ },
25952
26037
  "places import": async ({ args, flags, requireClient }) => {
25953
26038
  const path = requireArg(args, 0, "house.json path");
25954
26039
  let file;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.177.0",
3
+ "version": "1.179.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",