@robbeverhelst/do 1.422.0 → 1.424.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 +599 -86
  2. package/package.json +1 -1
package/dist/do.js CHANGED
@@ -14420,7 +14420,7 @@ var configError = (message) => new CliError("config", message, EXIT.CONFIG);
14420
14420
 
14421
14421
  // src/meta.ts
14422
14422
  var CLI_NAME = "do";
14423
- var VERSION = "1.422.0";
14423
+ var VERSION = "1.424.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -18304,6 +18304,7 @@ var userSettings = pgTable("user_settings", {
18304
18304
  ui: settingsUi("ui").notNull().default("v1"),
18305
18305
  skin: text("skin").$type().notNull().default("do"),
18306
18306
  skinVariant: text("skin_variant"),
18307
+ skinColors: text("skin_colors"),
18307
18308
  healthTodayHints: text("health_today_hints").array().notNull().default(sql`'{supplements,sleep}'::text[]`),
18308
18309
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
18309
18310
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
@@ -20656,13 +20657,15 @@ var agentChatThreads = pgTable("agent_chat_threads", {
20656
20657
  icon: text("icon"),
20657
20658
  description: text("description"),
20658
20659
  memoryScope: text("memory_scope"),
20660
+ mirror: text("mirror").notNull().default("off"),
20659
20661
  lastMessageAt: timestamp("last_message_at", { withTimezone: true }),
20660
20662
  archivedAt: timestamp("archived_at", { withTimezone: true }),
20661
20663
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
20662
20664
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
20663
20665
  }, (t) => [
20664
20666
  index("agent_chat_threads_member_idx").on(t.tenantId, t.userId, t.updatedAt),
20665
- uniqueIndex("agent_chat_threads_slug_uniq").on(t.tenantId, t.userId, t.slug).where(sql`${t.slug} is not null`)
20667
+ uniqueIndex("agent_chat_threads_slug_uniq").on(t.tenantId, t.userId, t.slug).where(sql`${t.slug} is not null`),
20668
+ check2("agent_chat_threads_mirror_chk", sql`${t.mirror} in ('off', 'now', 'all')`)
20666
20669
  ]);
20667
20670
  var agentChatTurns = pgTable("agent_chat_turns", {
20668
20671
  id: text("id").primaryKey(),
@@ -28827,15 +28830,129 @@ var documentOperations = defineOperations({
28827
28830
  }
28828
28831
  });
28829
28832
 
28833
+ // ../../packages/schema/src/contracts/echo-trust.ts
28834
+ var line5 = (max) => string2().trim().min(1).max(max);
28835
+ var echoTrustKeySchema = string2().regex(/^[a-z0-9][a-z0-9-]{0,59}$/, "lower-case letters, digits and dashes, at most 60");
28836
+ var echoActionSchema = object({
28837
+ id: ulidSchema,
28838
+ key: string2(),
28839
+ by: object({ id: string2(), name: string2() }),
28840
+ thread: echoThreadRefSchema.nullable(),
28841
+ kind: string2(),
28842
+ what: string2(),
28843
+ why: string2(),
28844
+ undo: string2().nullable(),
28845
+ undoNote: string2().nullable(),
28846
+ undoUntil: exports_coerce.date().nullable(),
28847
+ at: exports_coerce.date(),
28848
+ undoRequestedAt: exports_coerce.date().nullable(),
28849
+ undoneAt: exports_coerce.date().nullable(),
28850
+ updatedAt: exports_coerce.date()
28851
+ });
28852
+ var putEchoActionInputSchema = object({
28853
+ by: agentNameSchema,
28854
+ thread: line5(40).nullish(),
28855
+ kind: line5(40),
28856
+ what: line5(300),
28857
+ why: line5(160),
28858
+ undo: line5(80).nullish(),
28859
+ undoNote: line5(80).nullish(),
28860
+ undoUntil: exports_coerce.date().nullish(),
28861
+ at: exports_coerce.date().optional(),
28862
+ undone: boolean2().optional()
28863
+ }).strict();
28864
+ var echoActionsQuerySchema = object({ since: exports_coerce.date().optional() });
28865
+ var echoMemorySchema = object({
28866
+ id: ulidSchema,
28867
+ key: string2(),
28868
+ thread: echoThreadRefSchema,
28869
+ text: string2(),
28870
+ source: string2().nullable(),
28871
+ lastUsedAt: exports_coerce.date().nullable(),
28872
+ editedAt: exports_coerce.date().nullable(),
28873
+ forgottenAt: exports_coerce.date().nullable(),
28874
+ updatedAt: exports_coerce.date()
28875
+ });
28876
+ var putEchoMemoryInputSchema = object({
28877
+ thread: line5(40),
28878
+ text: line5(400),
28879
+ source: line5(80).nullish(),
28880
+ lastUsedAt: exports_coerce.date().nullish()
28881
+ }).strict();
28882
+ var editEchoMemoryInputSchema = object({ text: line5(400) }).strict();
28883
+ var echoMemoriesQuerySchema = object({
28884
+ thread: line5(40).optional(),
28885
+ forgotten: _enum2(["true", "false"]).transform((v) => v === "true").optional()
28886
+ });
28887
+
28888
+ // ../../packages/schema/src/operations/echo-actions.ts
28889
+ var NO_USER = "The key has no user identity (actions and memories are per member).";
28890
+ var KEY_SCHEMA = { key: echoTrustKeySchema };
28891
+ var keyParam = (what) => ({
28892
+ key: {
28893
+ description: `The ${what}'s handle, the agent's own: lower-case letters, digits and dashes.`,
28894
+ pattern: "^[a-z0-9][a-z0-9-]{0,59}$"
28895
+ }
28896
+ });
28897
+ var ACTION = "`{ id, key, by: { id, name }, thread: { id, title, slug, icon } | null, kind, what, why, undo, undoNote, undoUntil, at, undoRequestedAt, undoneAt }`";
28898
+ var echoActionOperations = defineOperations({
28899
+ list: {
28900
+ method: "get",
28901
+ path: "/echo/actions",
28902
+ scopes: ["agents:read"],
28903
+ tag: "Agents",
28904
+ summary: "List the actions taken outside do",
28905
+ description: `What the member's agents did outside do since \`since\` (default the last day), the newest first: ${ACTION}. \`undoRequestedAt\` says the member asked for Undo; report it done with \`undone: true\`.`,
28906
+ query: [
28907
+ {
28908
+ name: "since",
28909
+ description: "From when, an ISO date-time (default a day ago).",
28910
+ type: "string"
28911
+ }
28912
+ ],
28913
+ querySchema: echoActionsQuerySchema,
28914
+ status: 200,
28915
+ response: { description: "The actions.", list: true },
28916
+ errors: { 400: true, 403: NO_USER }
28917
+ },
28918
+ put: {
28919
+ method: "put",
28920
+ path: "/echo/actions/{key}",
28921
+ pathParams: keyParam("action"),
28922
+ pathParamSchemas: KEY_SCHEMA,
28923
+ scopes: ["agents:write"],
28924
+ tag: "Agents",
28925
+ summary: "Report an action taken outside do",
28926
+ description: "Who did it (`by`, an Agent's name), the member's standing `thread` it was done in (by slug), its `kind` (`Deploy`, `Mail sent`), `what` it did, `why` it was allowed (`You approved at 13:41`, `Rule: drafts are free`), and how to `undo` it (until `undoUntil`) or why it can't be (`undoNote`). `at` is when it was done (default now). `undone: true` reports the member's Undo done. An unknown agent or thread is a 404.",
28927
+ body: putEchoActionInputSchema,
28928
+ status: 200,
28929
+ response: { description: "The action." },
28930
+ errors: { 400: true, 403: NO_USER, 404: "No such agent or thread." }
28931
+ },
28932
+ undo: {
28933
+ method: "post",
28934
+ path: "/echo/actions/{key}/undo",
28935
+ pathParams: keyParam("action"),
28936
+ pathParamSchemas: KEY_SCHEMA,
28937
+ scopes: ["agents:write"],
28938
+ tag: "Agents",
28939
+ summary: "Ask for an action to be undone",
28940
+ description: "Stamps `undoRequestedAt`, which the agent reads until it reports the action undone. One that can't be undone, is undone already or is past its `undoUntil` is a 409. An unknown key is a 404.",
28941
+ status: 200,
28942
+ response: { description: "The action." },
28943
+ errors: { 403: NO_USER, 404: true, 409: "It can't be undone." }
28944
+ }
28945
+ });
28946
+
28830
28947
  // ../../packages/schema/src/operations/echo-handoffs.ts
28831
- var NO_USER = "The key has no user identity (handoffs are per member).";
28948
+ var NO_USER2 = "The key has no user identity (handoffs are per member).";
28832
28949
  var KEY = {
28833
28950
  key: {
28834
28951
  description: "The handoff's handle, the agent's own (`renovate-fold`): lower-case letters, digits and dashes.",
28835
28952
  pattern: "^[a-z0-9][a-z0-9-]{0,59}$"
28836
28953
  }
28837
28954
  };
28838
- var KEY_SCHEMA = { key: echoHandoffKeySchema };
28955
+ var KEY_SCHEMA2 = { key: echoHandoffKeySchema };
28839
28956
  var VIEW = "`{ id, key, from: { id, name }, to: { id, name }, what, thread: { id, title, slug, icon } | null, state, sentAt, seenAt, pickedAt, doneAt, nudgedAt }`";
28840
28957
  var echoHandoffOperations = defineOperations({
28841
28958
  list: {
@@ -28847,13 +28964,13 @@ var echoHandoffOperations = defineOperations({
28847
28964
  description: `The handoffs between the member's agents, the newest first: every one not done, and those done in the last day: ${VIEW}. \`nudgedAt\` says the member nudged the one it went to; a \`to\` the agent didn't set means the member gave it to someone else.`,
28848
28965
  status: 200,
28849
28966
  response: { description: "The handoffs.", list: true },
28850
- errors: { 403: NO_USER }
28967
+ errors: { 403: NO_USER2 }
28851
28968
  },
28852
28969
  put: {
28853
28970
  method: "put",
28854
28971
  path: "/echo/handoffs/{key}",
28855
28972
  pathParams: KEY,
28856
- pathParamSchemas: KEY_SCHEMA,
28973
+ pathParamSchemas: KEY_SCHEMA2,
28857
28974
  scopes: ["agents:write"],
28858
28975
  tag: "Agents",
28859
28976
  summary: "Declare a handoff or move it along",
@@ -28861,26 +28978,26 @@ var echoHandoffOperations = defineOperations({
28861
28978
  body: putEchoHandoffInputSchema,
28862
28979
  status: 200,
28863
28980
  response: { description: "The handoff." },
28864
- errors: { 400: true, 403: NO_USER, 404: "No such agent or thread." }
28981
+ errors: { 400: true, 403: NO_USER2, 404: "No such agent or thread." }
28865
28982
  },
28866
28983
  nudge: {
28867
28984
  method: "post",
28868
28985
  path: "/echo/handoffs/{key}/nudge",
28869
28986
  pathParams: KEY,
28870
- pathParamSchemas: KEY_SCHEMA,
28987
+ pathParamSchemas: KEY_SCHEMA2,
28871
28988
  scopes: ["agents:write"],
28872
28989
  tag: "Agents",
28873
28990
  summary: "Nudge the agent a handoff went to",
28874
28991
  description: "Stamps `nudgedAt`, which the agent reads until the handoff moves on. A handoff already picked up or done is a 409. An unknown key is a 404.",
28875
28992
  status: 200,
28876
28993
  response: { description: "The handoff." },
28877
- errors: { 403: NO_USER, 404: true, 409: "It was picked up already." }
28994
+ errors: { 403: NO_USER2, 404: true, 409: "It was picked up already." }
28878
28995
  },
28879
28996
  reassign: {
28880
28997
  method: "patch",
28881
28998
  path: "/echo/handoffs/{key}",
28882
28999
  pathParams: KEY,
28883
- pathParamSchemas: KEY_SCHEMA,
29000
+ pathParamSchemas: KEY_SCHEMA2,
28884
29001
  scopes: ["agents:write"],
28885
29002
  tag: "Agents",
28886
29003
  summary: "Give a handoff to another agent",
@@ -28888,20 +29005,108 @@ var echoHandoffOperations = defineOperations({
28888
29005
  body: reassignEchoHandoffInputSchema,
28889
29006
  status: 200,
28890
29007
  response: { description: "The handoff." },
28891
- errors: { 400: true, 403: NO_USER, 404: true, 409: "It's done." }
29008
+ errors: { 400: true, 403: NO_USER2, 404: true, 409: "It's done." }
28892
29009
  },
28893
29010
  remove: {
28894
29011
  method: "delete",
28895
29012
  path: "/echo/handoffs/{key}",
28896
29013
  pathParams: KEY,
28897
- pathParamSchemas: KEY_SCHEMA,
29014
+ pathParamSchemas: KEY_SCHEMA2,
28898
29015
  scopes: ["agents:write"],
28899
29016
  tag: "Agents",
28900
29017
  summary: "Remove a handoff",
28901
29018
  description: "The agent drops the handoff. An unknown key is a 404.",
28902
29019
  status: 204,
28903
29020
  response: { description: "Removed." },
28904
- errors: { 403: NO_USER, 404: true }
29021
+ errors: { 403: NO_USER2, 404: true }
29022
+ }
29023
+ });
29024
+
29025
+ // ../../packages/schema/src/operations/echo-memories.ts
29026
+ var NO_USER3 = "The key has no user identity (actions and memories are per member).";
29027
+ var KEY_SCHEMA3 = { key: echoTrustKeySchema };
29028
+ var keyParam2 = (what) => ({
29029
+ key: {
29030
+ description: `The ${what}'s handle, the agent's own: lower-case letters, digits and dashes.`,
29031
+ pattern: "^[a-z0-9][a-z0-9-]{0,59}$"
29032
+ }
29033
+ });
29034
+ var MEMORY = "`{ id, key, thread: { id, title, slug, icon }, text, source, lastUsedAt, editedAt, forgottenAt }`";
29035
+ var echoMemoryOperations = defineOperations({
29036
+ list: {
29037
+ method: "get",
29038
+ path: "/echo/memories",
29039
+ scopes: ["agents:read"],
29040
+ tag: "Agents",
29041
+ summary: "List what the agent remembers",
29042
+ description: `What the agent remembers in the member's threads, by thread and the most recently used first: ${MEMORY}. \`editedAt\` says the member changed the words; with \`forgotten=true\` the list also has the ones the member had forgotten (\`forgottenAt\`), to drop.`,
29043
+ query: [
29044
+ { name: "thread", description: "Only this thread's (its slug).", type: "string" },
29045
+ {
29046
+ name: "forgotten",
29047
+ description: "Include the forgotten ones (`true`).",
29048
+ type: "string",
29049
+ enum: ["true", "false"]
29050
+ }
29051
+ ],
29052
+ querySchema: echoMemoriesQuerySchema,
29053
+ status: 200,
29054
+ response: { description: "The memories.", list: true },
29055
+ errors: { 400: true, 403: NO_USER3, 404: "No such thread." }
29056
+ },
29057
+ put: {
29058
+ method: "put",
29059
+ path: "/echo/memories/{key}",
29060
+ pathParams: keyParam2("memory"),
29061
+ pathParamSchemas: KEY_SCHEMA3,
29062
+ scopes: ["agents:write"],
29063
+ tag: "Agents",
29064
+ summary: "Declare a memory",
29065
+ description: "The member's `thread` it belongs to (by slug), the words (`text`), where it learned it (`source`) and when it last used it (`lastUsedAt`). Declaring it again takes the words as given and clears `editedAt`. One the member had forgotten stays forgotten (a 409); an unknown thread is a 404.",
29066
+ body: putEchoMemoryInputSchema,
29067
+ status: 200,
29068
+ response: { description: "The memory." },
29069
+ errors: { 400: true, 403: NO_USER3, 404: "No such thread.", 409: "It was forgotten." }
29070
+ },
29071
+ edit: {
29072
+ method: "patch",
29073
+ path: "/echo/memories/{key}",
29074
+ pathParams: keyParam2("memory"),
29075
+ pathParamSchemas: KEY_SCHEMA3,
29076
+ scopes: ["agents:write"],
29077
+ tag: "Agents",
29078
+ summary: "Change a memory's words",
29079
+ description: "The member's own words for it (`text`); stamps `editedAt`, which the agent reads. A forgotten one is a 409; an unknown key is a 404.",
29080
+ body: editEchoMemoryInputSchema,
29081
+ status: 200,
29082
+ response: { description: "The memory." },
29083
+ errors: { 400: true, 403: NO_USER3, 404: true, 409: "It was forgotten." }
29084
+ },
29085
+ forget: {
29086
+ method: "post",
29087
+ path: "/echo/memories/{key}/forget",
29088
+ pathParams: keyParam2("memory"),
29089
+ pathParamSchemas: KEY_SCHEMA3,
29090
+ scopes: ["agents:write"],
29091
+ tag: "Agents",
29092
+ summary: "Have a memory forgotten",
29093
+ description: "Stamps `forgottenAt`: it leaves Memory and actions, and the agent reads it (`forgotten=true`), drops it and never uses it again. An unknown key is a 404.",
29094
+ status: 200,
29095
+ response: { description: "The memory." },
29096
+ errors: { 403: NO_USER3, 404: true }
29097
+ },
29098
+ remove: {
29099
+ method: "delete",
29100
+ path: "/echo/memories/{key}",
29101
+ pathParams: keyParam2("memory"),
29102
+ pathParamSchemas: KEY_SCHEMA3,
29103
+ scopes: ["agents:write"],
29104
+ tag: "Agents",
29105
+ summary: "Remove a memory",
29106
+ description: "The agent drops the memory. An unknown key is a 404.",
29107
+ status: 204,
29108
+ response: { description: "Removed." },
29109
+ errors: { 403: NO_USER3, 404: true }
28905
29110
  }
28906
29111
  });
28907
29112
 
@@ -28991,14 +29196,14 @@ var reportEchoScheduleRunInputSchema = object({
28991
29196
  var echoScheduleKeyParamSchema = object({ key: echoScheduleKeySchema });
28992
29197
 
28993
29198
  // ../../packages/schema/src/operations/echo-schedules.ts
28994
- var NO_USER2 = "The key has no user identity (scheduled posts are per member).";
29199
+ var NO_USER4 = "The key has no user identity (scheduled posts are per member).";
28995
29200
  var KEY2 = {
28996
29201
  key: {
28997
29202
  description: "The job's handle, the agent's own (`wake`, `pings`): lower-case letters, digits and dashes.",
28998
29203
  pattern: "^[a-z0-9][a-z0-9-]{0,39}$"
28999
29204
  }
29000
29205
  };
29001
- var KEY_SCHEMA2 = { key: echoScheduleKeySchema };
29206
+ var KEY_SCHEMA4 = { key: echoScheduleKeySchema };
29002
29207
  var VIEW2 = "`{ id, key, name, thread: { id, title, slug, icon }, agentId, desk, times, everyMinutes, weekdays, level, levelNote, paused, runRequested, lastRunAt, lastStatus, lastNote }`";
29003
29208
  var echoScheduleOperations = defineOperations({
29004
29209
  list: {
@@ -29010,13 +29215,13 @@ var echoScheduleOperations = defineOperations({
29010
29215
  description: `Every job that posts into the member's threads on a clock, by name: ${VIEW2}. \`times\` are \`HH:MM\` on the member's wall clock; with \`everyMinutes\` the job repeats from the first until midnight; \`weekdays\` are ISO (1 = Monday), empty for every day. \`level\` says how its posts land (\`now\` pushes, \`today\` a card in its thread, \`digest\` folded into one line, \`silent\` only in its history). A \`paused\` job doesn't run; \`runRequested\` asks for a run now.`,
29011
29216
  status: 200,
29012
29217
  response: { description: "The scheduled posts.", list: true },
29013
- errors: { 403: NO_USER2 }
29218
+ errors: { 403: NO_USER4 }
29014
29219
  },
29015
29220
  put: {
29016
29221
  method: "put",
29017
29222
  path: "/echo/schedules/{key}",
29018
29223
  pathParams: KEY2,
29019
- pathParamSchemas: KEY_SCHEMA2,
29224
+ pathParamSchemas: KEY_SCHEMA4,
29020
29225
  scopes: ["agents:write"],
29021
29226
  tag: "Agents",
29022
29227
  summary: "Declare a scheduled post",
@@ -29024,13 +29229,13 @@ var echoScheduleOperations = defineOperations({
29024
29229
  body: putEchoScheduleInputSchema,
29025
29230
  status: 200,
29026
29231
  response: { description: "The scheduled post." },
29027
- errors: { 400: true, 403: NO_USER2, 404: "No such thread." }
29232
+ errors: { 400: true, 403: NO_USER4, 404: "No such thread." }
29028
29233
  },
29029
29234
  update: {
29030
29235
  method: "patch",
29031
29236
  path: "/echo/schedules/{key}",
29032
29237
  pathParams: KEY2,
29033
- pathParamSchemas: KEY_SCHEMA2,
29238
+ pathParamSchemas: KEY_SCHEMA4,
29034
29239
  scopes: ["agents:write"],
29035
29240
  tag: "Agents",
29036
29241
  summary: "Change a scheduled post's level or pause it",
@@ -29038,26 +29243,26 @@ var echoScheduleOperations = defineOperations({
29038
29243
  body: updateEchoScheduleInputSchema,
29039
29244
  status: 200,
29040
29245
  response: { description: "The scheduled post." },
29041
- errors: { 400: true, 403: NO_USER2, 404: true }
29246
+ errors: { 400: true, 403: NO_USER4, 404: true }
29042
29247
  },
29043
29248
  runNow: {
29044
29249
  method: "post",
29045
29250
  path: "/echo/schedules/{key}/run",
29046
29251
  pathParams: KEY2,
29047
- pathParamSchemas: KEY_SCHEMA2,
29252
+ pathParamSchemas: KEY_SCHEMA4,
29048
29253
  scopes: ["agents:write"],
29049
29254
  tag: "Agents",
29050
29255
  summary: "Ask for a scheduled post now",
29051
29256
  description: "Asks the agent to run the job now: it reads `runRequested` on the job until it reports the run. A paused job is a 409. An unknown key is a 404.",
29052
29257
  status: 200,
29053
29258
  response: { description: "The scheduled post." },
29054
- errors: { 403: NO_USER2, 404: true, 409: "The job is paused." }
29259
+ errors: { 403: NO_USER4, 404: true, 409: "The job is paused." }
29055
29260
  },
29056
29261
  report: {
29057
29262
  method: "post",
29058
29263
  path: "/echo/schedules/{key}/runs",
29059
29264
  pathParams: KEY2,
29060
- pathParamSchemas: KEY_SCHEMA2,
29265
+ pathParamSchemas: KEY_SCHEMA4,
29061
29266
  scopes: ["agents:write"],
29062
29267
  tag: "Agents",
29063
29268
  summary: "Report a scheduled post's run",
@@ -29065,20 +29270,81 @@ var echoScheduleOperations = defineOperations({
29065
29270
  body: reportEchoScheduleRunInputSchema,
29066
29271
  status: 200,
29067
29272
  response: { description: "The scheduled post." },
29068
- errors: { 400: true, 403: NO_USER2, 404: true }
29273
+ errors: { 400: true, 403: NO_USER4, 404: true }
29069
29274
  },
29070
29275
  remove: {
29071
29276
  method: "delete",
29072
29277
  path: "/echo/schedules/{key}",
29073
29278
  pathParams: KEY2,
29074
- pathParamSchemas: KEY_SCHEMA2,
29279
+ pathParamSchemas: KEY_SCHEMA4,
29075
29280
  scopes: ["agents:write"],
29076
29281
  tag: "Agents",
29077
29282
  summary: "Remove a scheduled post",
29078
29283
  description: "The agent no longer runs the job. An unknown key is a 404.",
29079
29284
  status: 204,
29080
29285
  response: { description: "Removed." },
29081
- errors: { 403: NO_USER2, 404: true }
29286
+ errors: { 403: NO_USER4, 404: true }
29287
+ }
29288
+ });
29289
+
29290
+ // ../../packages/schema/src/contracts/echo-search.ts
29291
+ var ECHO_SEARCH_TABS = ["all", "decisions", "messages", "cards", "files"];
29292
+ var ECHO_SEARCH_KINDS = ["decision", "message", "card", "file", "memory"];
29293
+ var echoSearchQuerySchema = object({
29294
+ q: string2().trim().min(1).max(200),
29295
+ tab: _enum2(ECHO_SEARCH_TABS).default("all"),
29296
+ thread: string2().trim().min(1).max(40).optional(),
29297
+ since: exports_coerce.date().optional()
29298
+ });
29299
+ var echoSearchResultSchema = object({
29300
+ id: string2(),
29301
+ kind: _enum2(ECHO_SEARCH_KINDS),
29302
+ thread: echoThreadRefSchema,
29303
+ at: exports_coerce.date(),
29304
+ by: string2().nullable(),
29305
+ text: string2(),
29306
+ cardType: string2().nullable(),
29307
+ card: object({ type: string2(), data: unknown() }).nullable(),
29308
+ updatedAt: exports_coerce.date()
29309
+ });
29310
+ var echoSearchSchema = object({
29311
+ results: array(echoSearchResultSchema),
29312
+ saved: array(echoSearchResultSchema),
29313
+ counts: object({
29314
+ all: number2().int(),
29315
+ decisions: number2().int(),
29316
+ messages: number2().int(),
29317
+ cards: number2().int(),
29318
+ files: number2().int()
29319
+ })
29320
+ });
29321
+
29322
+ // ../../packages/schema/src/operations/echo-search.ts
29323
+ var NO_USER5 = "The key has no user identity (the threads are per member).";
29324
+ var RESULT = "`{ id, kind: decision | message | card | file | memory, thread: { id, title, slug, icon }, at, by, text, cardType }`";
29325
+ var echoSearchOperations = defineOperations({
29326
+ search: {
29327
+ method: "get",
29328
+ path: "/echo/search",
29329
+ scopes: ["agents:read"],
29330
+ tag: "Agents",
29331
+ summary: "Search the member's threads",
29332
+ description: `Every post (its words and its card) and every memory in the member's threads that has \`q\`, the newest first, at most 50: \`{ results: [${RESULT}], counts: { all, decisions, messages, cards, files } }\`. \`tab\` narrows the results (the counts stay the whole search's); \`thread\` (a slug) and \`since\` narrow both. Archived threads and forgotten memories are left out.`,
29333
+ query: [
29334
+ { name: "q", description: "The words to find.", type: "string", required: true },
29335
+ {
29336
+ name: "tab",
29337
+ description: "Only decisions, messages, cards (a decision and a file are cards too) or files.",
29338
+ type: "string",
29339
+ enum: [...ECHO_SEARCH_TABS]
29340
+ },
29341
+ { name: "thread", description: "Only this thread's (its slug).", type: "string" },
29342
+ { name: "since", description: "Only since then, an ISO date-time.", type: "string" }
29343
+ ],
29344
+ querySchema: echoSearchQuerySchema,
29345
+ status: 200,
29346
+ response: { description: "The results and the counts per tab." },
29347
+ errors: { 400: true, 403: NO_USER5, 404: "No such thread." }
29082
29348
  }
29083
29349
  });
29084
29350
 
@@ -29174,6 +29440,7 @@ var threadTopicKindSchema = threadKindSchema.extract([
29174
29440
  var threadAnchorTypeSchema = _enum2(["task", "project", "habit", "note"]);
29175
29441
  var threadAnchorSchema = object({ type: threadAnchorTypeSchema, id: string2() });
29176
29442
  var threadNotifyLevelSchema = _enum2(["now", "today", "digest", "off"]);
29443
+ var threadMirrorSchema = _enum2(["off", "now", "all"]);
29177
29444
  var threadMemoryScopeSchema = _enum2(["personal", "work", "none", "isolated", "inherit"]);
29178
29445
  var threadIconSchema = string2().regex(/^[a-z][a-z0-9-]{0,23}$/, "an icon is a lowercase icon name");
29179
29446
  var ECHO_THREAD_DESCRIPTION_MAX = 200;
@@ -29210,6 +29477,7 @@ var echoThreadSummarySchema = object({
29210
29477
  description: string2().nullable().default(null),
29211
29478
  memoryScope: threadMemoryScopeSchema.default("personal"),
29212
29479
  notifyLevel: threadNotifyLevelSchema.default("now"),
29480
+ mirror: threadMirrorSchema.default("off"),
29213
29481
  lastMessageAt: exports_coerce.date().nullable().default(null),
29214
29482
  lastLine: string2().nullable().default(null),
29215
29483
  lastByMember: boolean2().default(false),
@@ -29267,9 +29535,10 @@ var updateEchoThreadInputSchema = object({
29267
29535
  kind: threadTopicKindSchema.optional(),
29268
29536
  icon: threadIconSchema.optional(),
29269
29537
  description: threadDescriptionSchema.optional(),
29270
- memoryScope: threadMemoryScopeSchema.optional()
29538
+ memoryScope: threadMemoryScopeSchema.optional(),
29539
+ mirror: threadMirrorSchema.optional()
29271
29540
  }).strict().refine((e) => Object.values(e).some((v) => v !== undefined), {
29272
- message: "send push, notifyLevel, title, areaIds, archived, peopleCapture, kind, icon, description or memoryScope"
29541
+ message: "send push, notifyLevel, title, areaIds, archived, peopleCapture, kind, icon, description, memoryScope or mirror"
29273
29542
  });
29274
29543
  var echoPostReadSchema = object({
29275
29544
  postId: string2(),
@@ -29282,7 +29551,7 @@ var createEchoThreadInputSchema = object({
29282
29551
  }).strict();
29283
29552
 
29284
29553
  // ../../packages/schema/src/operations/echo-threads.ts
29285
- var NO_USER3 = "The key has no user identity (threads are per member).";
29554
+ var NO_USER6 = "The key has no user identity (threads are per member).";
29286
29555
  var echoThreadOperations = defineOperations({
29287
29556
  list: {
29288
29557
  method: "get",
@@ -29290,7 +29559,7 @@ var echoThreadOperations = defineOperations({
29290
29559
  scopes: ["agents:read"],
29291
29560
  tag: "Agents",
29292
29561
  summary: "List agent threads",
29293
- description: "The member's most recent agent threads, newest first: `id`, `title` (the first question), `turnCount`, `createdAt`, `updatedAt`. Each also says what it is for (`kind`: `personal`, `work`, `system`, `client`, `object` or `shared`), the do object it hangs on (`anchor`: `{ type, id }`, null for a topic) and the thread it started from (`parentId`), its `icon`, `description` and `memoryScope` (`personal`, `work`, `none`, `isolated`, `inherit`), the most its posts may push in do v2 (`notifyLevel`: `now`, `today`, `digest` or `off`), when its last message was written (`lastMessageAt`) with that message as one plain line (`lastLine`), and how many of the agent's posts there are unseen (`needsYou` for Needs you, `unseen` for any that isn't silent).",
29562
+ description: "The member's most recent agent threads, newest first: `id`, `title` (the first question), `turnCount`, `createdAt`, `updatedAt`. Each also says what it is for (`kind`: `personal`, `work`, `system`, `client`, `object` or `shared`), the do object it hangs on (`anchor`: `{ type, id }`, null for a topic) and the thread it started from (`parentId`), its `icon`, `description` and `memoryScope` (`personal`, `work`, `none`, `isolated`, `inherit`), the most its posts may push in do v2 (`notifyLevel`: `now`, `today`, `digest` or `off`), which of its posts the member's Telegram mirrors (`mirror`: `off`, `now` for Now only, or `all`), when its last message was written (`lastMessageAt`) with that message as one plain line (`lastLine`), and how many of the agent's posts there are unseen (`needsYou` for Needs you, `unseen` for any that isn't silent).",
29294
29563
  query: [
29295
29564
  {
29296
29565
  name: "limit",
@@ -29303,7 +29572,7 @@ var echoThreadOperations = defineOperations({
29303
29572
  querySchema: echoThreadsQuerySchema,
29304
29573
  status: 200,
29305
29574
  response: { description: "The member's threads.", list: true },
29306
- errors: { 400: true, 403: NO_USER3 }
29575
+ errors: { 400: true, 403: NO_USER6 }
29307
29576
  },
29308
29577
  create: {
29309
29578
  method: "post",
@@ -29316,7 +29585,7 @@ var echoThreadOperations = defineOperations({
29316
29585
  bodyOptional: true,
29317
29586
  status: 201,
29318
29587
  response: { description: "The new current thread." },
29319
- errors: { 403: NO_USER3 }
29588
+ errors: { 403: NO_USER6 }
29320
29589
  },
29321
29590
  current: {
29322
29591
  method: "get",
@@ -29327,7 +29596,7 @@ var echoThreadOperations = defineOperations({
29327
29596
  description: "The thread the agent panel opens on (the most recently used), with its turns oldest first: question, reply, `status` (`streaming` | `done` | `error` | `cancelled`), the change-feed cursor `since`, the changes and the confirmations. `{ thread: null }` before the first.",
29328
29597
  status: 200,
29329
29598
  response: { description: "`{ thread }`." },
29330
- errors: { 403: NO_USER3 }
29599
+ errors: { 403: NO_USER6 }
29331
29600
  },
29332
29601
  briefs: {
29333
29602
  method: "get",
@@ -29347,7 +29616,7 @@ var echoThreadOperations = defineOperations({
29347
29616
  querySchema: echoBriefsQuerySchema,
29348
29617
  status: 200,
29349
29618
  response: { description: "`{ briefs }`." },
29350
- errors: { 400: true, 403: NO_USER3 }
29619
+ errors: { 400: true, 403: NO_USER6 }
29351
29620
  },
29352
29621
  get: {
29353
29622
  method: "get",
@@ -29358,7 +29627,7 @@ var echoThreadOperations = defineOperations({
29358
29627
  description: "One of the member's threads with its turns, oldest first. Another member's thread is a 404.",
29359
29628
  status: 200,
29360
29629
  response: { description: "The thread." },
29361
- errors: { 403: NO_USER3, 404: true }
29630
+ errors: { 403: NO_USER6, 404: true }
29362
29631
  },
29363
29632
  update: {
29364
29633
  method: "patch",
@@ -29366,11 +29635,11 @@ var echoThreadOperations = defineOperations({
29366
29635
  scopes: ["agents:write"],
29367
29636
  tag: "Agents",
29368
29637
  summary: "Change an agent thread",
29369
- description: "What the agent's posts in this thread may push to the member's devices (do-4): `all` (Needs you, and Told quietly), `needs_you` (only what waits on the member) or `off`. For later and Silent posts never push. Returns the thread as the list shows it. Another member's thread is a 404. Rename a thread (`title`), change the Areas a standing thread links (`areaIds`), or archive it (`archived: true`; `false` brings it back). An archived thread leaves the list and its slug no longer reaches it. The home thread (named after the Space's agent) can't be archived. Say what a topic is for (`kind`: `personal`, `work`, `system` or `client`); a thread on a thing keeps `object`, a 400. Set its `icon`, its one-line `description` (`\"\"` clears it) and which memory the agent answers with (`memoryScope`: `personal`, `work`, `none`, `isolated` or `inherit`).",
29638
+ description: "What the agent's posts in this thread may push to the member's devices (do-4): `all` (Needs you, and Told quietly), `needs_you` (only what waits on the member) or `off`. For later and Silent posts never push. Returns the thread as the list shows it. Another member's thread is a 404. Rename a thread (`title`), change the Areas a standing thread links (`areaIds`), or archive it (`archived: true`; `false` brings it back). An archived thread leaves the list and its slug no longer reaches it. The home thread (named after the Space's agent) can't be archived. Say what a topic is for (`kind`: `personal`, `work`, `system` or `client`); a thread on a thing keeps `object`, a 400. Set its `icon`, its one-line `description` (`\"\"` clears it) and which memory the agent answers with (`memoryScope`: `personal`, `work`, `none`, `isolated` or `inherit`). Set what Telegram mirrors of it (`mirror`: `off`, `now` or `all`; Echo \u203A Notifications).",
29370
29639
  body: updateEchoThreadInputSchema,
29371
29640
  status: 200,
29372
29641
  response: { description: "The thread as the list shows it, with its `push`." },
29373
- errors: { 400: true, 403: NO_USER3, 404: true }
29642
+ errors: { 400: true, 403: NO_USER6, 404: true }
29374
29643
  },
29375
29644
  addStanding: {
29376
29645
  method: "post",
@@ -29382,7 +29651,7 @@ var echoThreadOperations = defineOperations({
29382
29651
  body: createStandingThreadInputSchema,
29383
29652
  status: 201,
29384
29653
  response: { description: "The standing thread." },
29385
- errors: { 400: true, 403: NO_USER3, 409: true }
29654
+ errors: { 400: true, 403: NO_USER6, 409: true }
29386
29655
  }
29387
29656
  });
29388
29657
 
@@ -30585,6 +30854,10 @@ var themePackScopeSchema = _enum2(settingsThemePackScope.enumValues);
30585
30854
  var settingsUiSchema = _enum2(settingsUi.enumValues);
30586
30855
  var settingsSkinSchema = _enum2(SETTINGS_SKINS);
30587
30856
  var settingsSkinVariantSchema = string2().regex(/^[a-z0-9][a-z0-9-]{0,47}$/);
30857
+ var COLORS_TOML_LINE = /^\s*[a-z_]+\s*=\s*["']?(#[0-9a-f]{3,8}|rgba?\([^)]*\))["']?\s*(#.*)?$/gim;
30858
+ var settingsSkinColorsSchema = string2().max(8192).refine((text) => (text.match(COLORS_TOML_LINE) ?? []).length >= 2, {
30859
+ message: 'expected a colors.toml: lines like background = "#1a1b26"'
30860
+ });
30588
30861
  var HEALTH_TODAY_HINTS = ["supplements", "sleep", "appointment", "episode"];
30589
30862
  var healthTodayHintSchema = _enum2(HEALTH_TODAY_HINTS);
30590
30863
  var HEALTH_TODAY_HINTS_DEFAULT = ["supplements", "sleep"];
@@ -30609,6 +30882,7 @@ var userSettingsSchema = createSelectSchema(userSettings, {
30609
30882
  ui: settingsUiSchema.default("v1"),
30610
30883
  skin: string2().default("do").transform((s) => settingsSkinSchema.safeParse(s).success ? s : "do"),
30611
30884
  skinVariant: string2().nullable().default(null),
30885
+ skinColors: string2().nullable().default(null),
30612
30886
  healthTodayHints: array(string2()).default([...HEALTH_TODAY_HINTS_DEFAULT]).transform((ids) => ids.filter((id) => healthTodayHintSchema.safeParse(id).success)),
30613
30887
  createdAt: exports_coerce.date(),
30614
30888
  updatedAt: exports_coerce.date()
@@ -30641,6 +30915,7 @@ var updateUserSettingsInputSchema = createUpdateSchema(userSettings, {
30641
30915
  ui: settingsUiSchema.optional(),
30642
30916
  skin: settingsSkinSchema.optional(),
30643
30917
  skinVariant: settingsSkinVariantSchema.nullable().optional(),
30918
+ skinColors: settingsSkinColorsSchema.nullable().optional(),
30644
30919
  healthTodayHints: array(healthTodayHintSchema).transform((ids) => HEALTH_TODAY_HINTS.filter((id) => ids.includes(id))).optional()
30645
30920
  }).omit({
30646
30921
  id: true,
@@ -51213,10 +51488,246 @@ var commands18 = [
51213
51488
  }
51214
51489
  ];
51215
51490
 
51491
+ // src/commands/echo-search.ts
51492
+ function renderEchoSearch(data, mode) {
51493
+ const { results = [], counts } = data;
51494
+ const lines = results.length ? results.map((r) => ` ${r.kind.padEnd(8)} ${paint(mode, "dim", `#${r.thread.slug ?? r.thread.title}`)} ${r.text}${r.by ? paint(mode, "dim", ` \u2014 ${r.by}`) : ""}`) : [paint(mode, "dim", "(nothing found)")];
51495
+ const tally = counts ? Object.entries(counts).map(([tab, n]) => `${tab} ${n}`).join(" \xB7 ") : "";
51496
+ return [...lines, ...tally ? [paint(mode, "dim", tally)] : []].join(`
51497
+ `);
51498
+ }
51499
+ var commands19 = [
51500
+ {
51501
+ spec: {
51502
+ path: ["echo", "search"],
51503
+ summary: "Search your threads: messages, cards, decisions, files and memories.",
51504
+ args: [{ name: "words", required: true, description: "What to find." }],
51505
+ flags: [
51506
+ {
51507
+ name: "tab",
51508
+ type: "string",
51509
+ description: "Only decisions, messages, cards or files (default all)."
51510
+ },
51511
+ { name: "thread", type: "string", description: "Only this thread's (its slug)." },
51512
+ { name: "since", type: "string", description: "Only since then (ISO)." }
51513
+ ],
51514
+ scopes: [...echoSearchOperations.search.scopes],
51515
+ returns: "EchoSearch",
51516
+ notes: "At most 50 results, newest first; the counts are the whole search's. Archived threads and forgotten memories are left out."
51517
+ },
51518
+ run: async ({ args, flags, requireClient }) => ({
51519
+ data: await requireClient().get(pathOf(echoSearchOperations.search), {
51520
+ query: {
51521
+ q: [requireArg(args, 0, "words"), ...args.slice(1)].join(" "),
51522
+ tab: flagString(flags, "tab"),
51523
+ thread: flagString(flags, "thread"),
51524
+ since: flagString(flags, "since")
51525
+ }
51526
+ }),
51527
+ render: renderEchoSearch
51528
+ })
51529
+ }
51530
+ ];
51531
+
51532
+ // src/commands/echo-trust.ts
51533
+ var keyArg = (what) => ({
51534
+ name: "key",
51535
+ required: true,
51536
+ description: `The ${what}'s handle: lower-case letters, digits and dashes.`
51537
+ });
51538
+ var keyPath3 = (op, args, what) => pathOf(op, { key: requireArg(args, 0, `${what} key`) });
51539
+ var commands20 = [
51540
+ {
51541
+ spec: {
51542
+ path: ["echo", "actions", "list"],
51543
+ summary: "List what your agents did outside do (the last day, or since --since).",
51544
+ args: [],
51545
+ flags: [
51546
+ { name: "since", type: "string", description: "From when (ISO); default a day ago." }
51547
+ ],
51548
+ scopes: [...echoActionOperations.list.scopes],
51549
+ returns: "EchoAction[]",
51550
+ notes: "undoRequestedAt says you asked for Undo; the agent reports it done with --undone."
51551
+ },
51552
+ run: async ({ flags, requireClient }) => ({
51553
+ data: await requireClient().getPage(pathOf(echoActionOperations.list), {
51554
+ query: { since: flagString(flags, "since") }
51555
+ }),
51556
+ render: renderList
51557
+ })
51558
+ },
51559
+ {
51560
+ spec: {
51561
+ path: ["echo", "actions", "set"],
51562
+ summary: "Report an action taken outside do, or update it (the agent's).",
51563
+ args: [keyArg("action")],
51564
+ flags: [
51565
+ { name: "by", type: "string", description: "The agent that did it, by name." },
51566
+ { name: "thread", type: "string", description: "The standing thread it was done in." },
51567
+ { name: "kind", type: "string", description: "What kind (Deploy, Mail sent)." },
51568
+ { name: "what", type: "string", description: "What it did, one line." },
51569
+ { name: "why", type: "string", description: "Why it was allowed." },
51570
+ { name: "undo", type: "string", description: "How to undo it (Roll back to v1.363.0)." },
51571
+ { name: "undo-note", type: "string", description: "Why it can't be undone." },
51572
+ { name: "undo-until", type: "string", description: "Until when Undo is possible (ISO)." },
51573
+ { name: "at", type: "string", description: "When it was done (ISO); default now." },
51574
+ { name: "undone", type: "boolean", description: "Report the member's Undo done." }
51575
+ ],
51576
+ scopes: [...echoActionOperations.put.scopes],
51577
+ returns: "EchoAction",
51578
+ notes: "An unknown agent or thread is a 404."
51579
+ },
51580
+ run: async ({ args, flags, requireClient }) => {
51581
+ const by = flagString(flags, "by");
51582
+ const kind = flagString(flags, "kind");
51583
+ const what = flagString(flags, "what");
51584
+ const why = flagString(flags, "why");
51585
+ if (!by || !kind || !what || !why)
51586
+ throw usageError("--by, --kind, --what and --why are required");
51587
+ const optional = {
51588
+ thread: flagString(flags, "thread"),
51589
+ undo: flagString(flags, "undo"),
51590
+ undoNote: flagString(flags, "undo-note"),
51591
+ undoUntil: flagString(flags, "undo-until"),
51592
+ at: flagString(flags, "at")
51593
+ };
51594
+ return {
51595
+ data: await requireClient().put(keyPath3(echoActionOperations.put, args, "action"), {
51596
+ by,
51597
+ kind,
51598
+ what,
51599
+ why,
51600
+ ...Object.fromEntries(Object.entries(optional).filter(([, v]) => v !== undefined)),
51601
+ ...flagBool(flags, "undone") ? { undone: true } : {}
51602
+ }),
51603
+ render: renderRecord
51604
+ };
51605
+ }
51606
+ },
51607
+ {
51608
+ spec: {
51609
+ path: ["echo", "actions", "undo"],
51610
+ summary: "Ask for an action to be undone.",
51611
+ args: [keyArg("action")],
51612
+ flags: [],
51613
+ scopes: [...echoActionOperations.undo.scopes],
51614
+ returns: "EchoAction",
51615
+ notes: "One that can't be undone, is undone already or is past its time is a 409."
51616
+ },
51617
+ run: async ({ args, requireClient }) => ({
51618
+ data: await requireClient().post(keyPath3(echoActionOperations.undo, args, "action"), {}),
51619
+ render: renderRecord
51620
+ })
51621
+ },
51622
+ {
51623
+ spec: {
51624
+ path: ["echo", "memory", "list"],
51625
+ summary: "List what the agent remembers in your threads.",
51626
+ args: [],
51627
+ flags: [
51628
+ { name: "thread", type: "string", description: "Only this thread's (its slug)." },
51629
+ { name: "forgotten", type: "boolean", description: "Include the forgotten ones." }
51630
+ ],
51631
+ scopes: [...echoMemoryOperations.list.scopes],
51632
+ returns: "EchoMemory[]",
51633
+ notes: "editedAt says you changed the words; forgottenAt says drop it."
51634
+ },
51635
+ run: async ({ flags, requireClient }) => ({
51636
+ data: await requireClient().getPage(pathOf(echoMemoryOperations.list), {
51637
+ query: {
51638
+ thread: flagString(flags, "thread"),
51639
+ forgotten: flagBool(flags, "forgotten") ? "true" : undefined
51640
+ }
51641
+ }),
51642
+ render: renderList
51643
+ })
51644
+ },
51645
+ {
51646
+ spec: {
51647
+ path: ["echo", "memory", "set"],
51648
+ summary: "Declare a memory in one of your threads, or update it (the agent's).",
51649
+ args: [keyArg("memory")],
51650
+ flags: [
51651
+ { name: "thread", type: "string", description: "The thread it belongs to (its slug)." },
51652
+ { name: "text", type: "string", description: "What it remembers." },
51653
+ { name: "source", type: "string", description: "Where it learned it." },
51654
+ { name: "last-used", type: "string", description: "When it last used it (ISO)." }
51655
+ ],
51656
+ scopes: [...echoMemoryOperations.put.scopes],
51657
+ returns: "EchoMemory",
51658
+ notes: "Takes the words as given and clears editedAt. A forgotten one stays forgotten (409)."
51659
+ },
51660
+ run: async ({ args, flags, requireClient }) => {
51661
+ const thread = flagString(flags, "thread");
51662
+ const text = flagString(flags, "text");
51663
+ if (!thread || !text)
51664
+ throw usageError("--thread and --text are required");
51665
+ const source = flagString(flags, "source");
51666
+ const lastUsedAt = flagString(flags, "last-used");
51667
+ return {
51668
+ data: await requireClient().put(keyPath3(echoMemoryOperations.put, args, "memory"), {
51669
+ thread,
51670
+ text,
51671
+ ...source ? { source } : {},
51672
+ ...lastUsedAt ? { lastUsedAt } : {}
51673
+ }),
51674
+ render: renderRecord
51675
+ };
51676
+ }
51677
+ },
51678
+ {
51679
+ spec: {
51680
+ path: ["echo", "memory", "edit"],
51681
+ summary: "Change a memory's words.",
51682
+ args: [keyArg("memory"), { name: "text", required: true, description: "The new words." }],
51683
+ flags: [],
51684
+ scopes: [...echoMemoryOperations.edit.scopes],
51685
+ returns: "EchoMemory",
51686
+ notes: "A forgotten one is a 409."
51687
+ },
51688
+ run: async ({ args, requireClient }) => ({
51689
+ data: await requireClient().patch(keyPath3(echoMemoryOperations.edit, args, "memory"), {
51690
+ text: requireArg(args, 1, "text")
51691
+ }),
51692
+ render: renderRecord
51693
+ })
51694
+ },
51695
+ {
51696
+ spec: {
51697
+ path: ["echo", "memory", "forget"],
51698
+ summary: "Have a memory forgotten: the agent drops it and never uses it again.",
51699
+ args: [keyArg("memory")],
51700
+ flags: [],
51701
+ scopes: [...echoMemoryOperations.forget.scopes],
51702
+ returns: "EchoMemory",
51703
+ notes: "An unknown key is a 404."
51704
+ },
51705
+ run: async ({ args, requireClient }) => ({
51706
+ data: await requireClient().post(keyPath3(echoMemoryOperations.forget, args, "memory"), {}),
51707
+ render: renderRecord
51708
+ })
51709
+ },
51710
+ {
51711
+ spec: {
51712
+ path: ["echo", "memory", "rm"],
51713
+ summary: "Remove a memory (the agent drops it).",
51714
+ args: [keyArg("memory")],
51715
+ flags: [],
51716
+ scopes: [...echoMemoryOperations.remove.scopes],
51717
+ returns: "nothing",
51718
+ notes: "An unknown key is a 404."
51719
+ },
51720
+ run: async ({ args, requireClient }) => {
51721
+ await requireClient().delete(keyPath3(echoMemoryOperations.remove, args, "memory"));
51722
+ return { data: { removed: requireArg(args, 0, "memory key") }, render: renderRecord };
51723
+ }
51724
+ }
51725
+ ];
51726
+
51216
51727
  // src/commands/files.ts
51217
51728
  import { readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
51218
51729
  import { basename as basename2 } from "path";
51219
- var commands19 = [
51730
+ var commands21 = [
51220
51731
  {
51221
51732
  spec: {
51222
51733
  path: ["files", "list"],
@@ -51386,7 +51897,7 @@ var commands19 = [
51386
51897
  ];
51387
51898
 
51388
51899
  // src/commands/food.ts
51389
- var commands20 = [
51900
+ var commands22 = [
51390
51901
  {
51391
51902
  spec: {
51392
51903
  path: ["foods", "search"],
@@ -51941,7 +52452,7 @@ var commands20 = [
51941
52452
  // src/commands/guest-lists.ts
51942
52453
  import { writeFileSync as writeFileSync3 } from "fs";
51943
52454
  import { basename as basename3 } from "path";
51944
- var commands21 = [
52455
+ var commands23 = [
51945
52456
  {
51946
52457
  spec: {
51947
52458
  path: ["guest-lists", "overview"],
@@ -52031,7 +52542,7 @@ var commands21 = [
52031
52542
  ];
52032
52543
 
52033
52544
  // src/commands/guests.ts
52034
- var commands22 = [
52545
+ var commands24 = [
52035
52546
  {
52036
52547
  spec: {
52037
52548
  path: ["guests", "sent"],
@@ -52116,7 +52627,7 @@ function renderItems(data, mode) {
52116
52627
  var habitArg = { name: "id", required: true, description: "The checklist habit's ULID." };
52117
52628
  var itemArg = { name: "item-id", required: true, description: "The item's ULID." };
52118
52629
  var NOT_CHECKLIST = "A habit that isn't a checklist answers 409.";
52119
- var commands23 = [
52630
+ var commands25 = [
52120
52631
  {
52121
52632
  spec: {
52122
52633
  path: ["habit", "items"],
@@ -52470,7 +52981,7 @@ function seasonFromFlags(flags) {
52470
52981
  const season = flagString(flags, "season");
52471
52982
  return season === undefined ? {} : { activeMonths: seasonFromFlag(season) };
52472
52983
  }
52473
- var commands24 = [
52984
+ var commands26 = [
52474
52985
  {
52475
52986
  spec: {
52476
52987
  path: ["habits", "create"],
@@ -53719,7 +54230,7 @@ function healthRecordHandlers() {
53719
54230
  }
53720
54231
  return out;
53721
54232
  }
53722
- var commands25 = pairCommands(HEALTH_COMMAND_SPECS, {
54233
+ var commands27 = pairCommands(HEALTH_COMMAND_SPECS, {
53723
54234
  ...healthRecordHandlers(),
53724
54235
  "health record": async ({ flags, requireClient }) => {
53725
54236
  const body = parseInput(logHealthInputSchema, readDataFlag(flags));
@@ -54034,7 +54545,7 @@ var commands25 = pairCommands(HEALTH_COMMAND_SPECS, {
54034
54545
  });
54035
54546
 
54036
54547
  // src/commands/house.ts
54037
- var commands26 = [
54548
+ var commands28 = [
54038
54549
  {
54039
54550
  spec: {
54040
54551
  path: ["house"],
@@ -54316,7 +54827,7 @@ function renderSorting(data, _mode) {
54316
54827
  ].join(`
54317
54828
  `);
54318
54829
  }
54319
- var commands27 = [
54830
+ var commands29 = [
54320
54831
  defineCommand({
54321
54832
  operation: inboxOperations.list,
54322
54833
  path: ["inbox"],
@@ -54408,7 +54919,7 @@ var commands27 = [
54408
54919
  ];
54409
54920
 
54410
54921
  // src/commands/incidents.ts
54411
- var commands28 = [
54922
+ var commands30 = [
54412
54923
  {
54413
54924
  spec: {
54414
54925
  path: ["incidents", "open"],
@@ -54637,7 +55148,7 @@ function journalDateArg(args, verb) {
54637
55148
  }
54638
55149
  return date;
54639
55150
  }
54640
- var commands29 = [
55151
+ var commands31 = [
54641
55152
  defineCommand({
54642
55153
  operation: journalOperations.day,
54643
55154
  path: ["journal", "day"],
@@ -55200,7 +55711,7 @@ function renderCreatedKey(data, mode) {
55200
55711
  ].join(`
55201
55712
  `);
55202
55713
  }
55203
- var commands30 = [
55714
+ var commands32 = [
55204
55715
  {
55205
55716
  spec: {
55206
55717
  path: ["keys", "list"],
@@ -55336,7 +55847,7 @@ var KIND_FLAG2 = {
55336
55847
  type: "string",
55337
55848
  description: "The kind of an unknown word (pages, eggs, health, note, or a word taught before); remembered for the Space."
55338
55849
  };
55339
- var commands31 = [
55850
+ var commands33 = [
55340
55851
  {
55341
55852
  spec: {
55342
55853
  path: ["log"],
@@ -55411,7 +55922,7 @@ var commands31 = [
55411
55922
  ];
55412
55923
 
55413
55924
  // src/commands/mail-campaigns.ts
55414
- var commands32 = [
55925
+ var commands34 = [
55415
55926
  {
55416
55927
  spec: {
55417
55928
  path: ["mail-campaigns", "list"],
@@ -55726,7 +56237,7 @@ async function serveMcp(io, target) {
55726
56237
  }
55727
56238
 
55728
56239
  // src/commands/mcp.ts
55729
- var commands33 = [
56240
+ var commands35 = [
55730
56241
  {
55731
56242
  spec: {
55732
56243
  path: ["mcp"],
@@ -55771,7 +56282,7 @@ var commands33 = [
55771
56282
  ];
55772
56283
 
55773
56284
  // src/commands/members.ts
55774
- var commands34 = [
56285
+ var commands36 = [
55775
56286
  {
55776
56287
  spec: {
55777
56288
  path: ["invite", "create"],
@@ -55896,7 +56407,7 @@ var commands34 = [
55896
56407
  ];
55897
56408
 
55898
56409
  // src/commands/metrics.ts
55899
- var commands35 = [
56410
+ var commands37 = [
55900
56411
  {
55901
56412
  spec: {
55902
56413
  path: ["metrics", "list"],
@@ -56024,7 +56535,7 @@ async function setModuleVisibility(args, requireClient, on) {
56024
56535
  render: renderRecord
56025
56536
  };
56026
56537
  }
56027
- var commands36 = [
56538
+ var commands38 = [
56028
56539
  {
56029
56540
  spec: {
56030
56541
  path: ["modules", "list"],
@@ -56253,7 +56764,7 @@ function shareFlag(flags) {
56253
56764
  function localMonth(now) {
56254
56765
  return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`;
56255
56766
  }
56256
- var commands37 = [
56767
+ var commands39 = [
56257
56768
  defineCommand({
56258
56769
  operation: moneyOperations.listAccounts,
56259
56770
  path: ["money", "accounts"],
@@ -57422,7 +57933,7 @@ var commands37 = [
57422
57933
  ];
57423
57934
 
57424
57935
  // src/commands/notes.ts
57425
- var commands38 = [
57936
+ var commands40 = [
57426
57937
  {
57427
57938
  spec: {
57428
57939
  path: ["notes", "backlinks"],
@@ -57544,7 +58055,7 @@ var commands38 = [
57544
58055
  ];
57545
58056
 
57546
58057
  // src/commands/orca.ts
57547
- var commands39 = [
58058
+ var commands41 = [
57548
58059
  {
57549
58060
  spec: {
57550
58061
  path: ["orca", "list"],
@@ -57910,7 +58421,7 @@ function linkBody(args) {
57910
58421
  return parseInput(familyTreeLinkInputSchema, { kind, a: ref, b: other });
57911
58422
  throw usageError("the kind is parent, child or partner");
57912
58423
  }
57913
- var commands40 = [
58424
+ var commands42 = [
57914
58425
  {
57915
58426
  spec: {
57916
58427
  path: ["people", "propose"],
@@ -58599,7 +59110,7 @@ var commands40 = [
58599
59110
 
58600
59111
  // src/commands/places.ts
58601
59112
  import { readFileSync as readFileSync10 } from "fs";
58602
- var commands41 = [
59113
+ var commands43 = [
58603
59114
  {
58604
59115
  spec: {
58605
59116
  path: ["places", "import"],
@@ -58656,7 +59167,7 @@ async function planDecision({ args, requireClient }, verb) {
58656
59167
  render: renderPlan
58657
59168
  };
58658
59169
  }
58659
- var commands42 = [
59170
+ var commands44 = [
58660
59171
  {
58661
59172
  spec: {
58662
59173
  path: ["plans", "list"],
@@ -58883,7 +59394,7 @@ var commands42 = [
58883
59394
  ];
58884
59395
 
58885
59396
  // src/commands/presets.ts
58886
- var commands43 = [
59397
+ var commands45 = [
58887
59398
  {
58888
59399
  spec: {
58889
59400
  path: ["presets", "list"],
@@ -58980,7 +59491,7 @@ function renderReviewSummary(data, mode) {
58980
59491
  return out.join(`
58981
59492
  `);
58982
59493
  }
58983
- var commands44 = [
59494
+ var commands46 = [
58984
59495
  {
58985
59496
  spec: {
58986
59497
  path: ["progress"],
@@ -59189,7 +59700,7 @@ function renderUpdates(data, mode) {
59189
59700
  return updates.map((u) => updateLine(u, mode)).join(`
59190
59701
  `);
59191
59702
  }
59192
- var commands45 = [
59703
+ var commands47 = [
59193
59704
  defineCommand({
59194
59705
  operation: projectOperations.update,
59195
59706
  path: ["projects", "set"],
@@ -59786,7 +60297,7 @@ var routineCommands = [
59786
60297
  }
59787
60298
  }
59788
60299
  ];
59789
- var commands46 = [
60300
+ var commands48 = [
59790
60301
  ...routineCommands,
59791
60302
  {
59792
60303
  spec: {
@@ -59909,7 +60420,7 @@ var commands46 = [
59909
60420
  ];
59910
60421
 
59911
60422
  // src/commands/rsvp-answers.ts
59912
- var commands47 = [
60423
+ var commands49 = [
59913
60424
  {
59914
60425
  spec: {
59915
60426
  path: ["rsvp-answers", "list"],
@@ -59963,7 +60474,7 @@ var commands47 = [
59963
60474
  ];
59964
60475
 
59965
60476
  // src/commands/rsvp-links.ts
59966
- var commands48 = [
60477
+ var commands50 = [
59967
60478
  {
59968
60479
  spec: {
59969
60480
  path: ["rsvp-links", "list"],
@@ -60059,7 +60570,7 @@ var commands48 = [
60059
60570
  ];
60060
60571
 
60061
60572
  // src/commands/rsvp-questions.ts
60062
- var commands49 = [
60573
+ var commands51 = [
60063
60574
  {
60064
60575
  spec: {
60065
60576
  path: ["rsvp-questions", "presets"],
@@ -60631,7 +61142,7 @@ function sessionFlags(flags) {
60631
61142
  body.occurredOn = on;
60632
61143
  return body;
60633
61144
  }
60634
- var commands50 = [
61145
+ var commands52 = [
60635
61146
  {
60636
61147
  spec: {
60637
61148
  path: ["runs", "change"],
@@ -60948,7 +61459,7 @@ var commands50 = [
60948
61459
  ];
60949
61460
 
60950
61461
  // src/commands/search.ts
60951
- var commands51 = [
61462
+ var commands53 = [
60952
61463
  {
60953
61464
  spec: {
60954
61465
  path: ["search"],
@@ -60981,7 +61492,7 @@ var commands51 = [
60981
61492
  ];
60982
61493
 
60983
61494
  // src/commands/seating-proposals.ts
60984
- var commands52 = [
61495
+ var commands54 = [
60985
61496
  {
60986
61497
  spec: {
60987
61498
  path: ["seating-proposals", "list"],
@@ -61068,7 +61579,7 @@ var commands52 = [
61068
61579
  ];
61069
61580
 
61070
61581
  // src/commands/sensors.ts
61071
- var commands53 = [
61582
+ var commands55 = [
61072
61583
  {
61073
61584
  spec: {
61074
61585
  path: ["sensors", "status"],
@@ -61228,7 +61739,7 @@ var commands53 = [
61228
61739
  ];
61229
61740
 
61230
61741
  // src/commands/settings.ts
61231
- var commands54 = [
61742
+ var commands56 = [
61232
61743
  {
61233
61744
  spec: {
61234
61745
  path: ["settings", "get"],
@@ -61249,7 +61760,7 @@ var commands54 = [
61249
61760
  flags: [{ name: "data", type: "string", description: "JSON of fields to change." }],
61250
61761
  scopes: [...settingsOperations.update.scopes],
61251
61762
  returns: "UserSettings",
61252
- notes: `Appearance keys: glass (liquid|frosted|solid), followSky, nightUntilWake, largerText, reduceMotion, showStreakNumbers, themePack (do|skyrim|pokemon), themePackScope (section|everywhere). App: ui (v1|v2), skin (do|te|omarchy: the do v2 theme), skinVariant (a palette id such as catppuccin-latte, or null: the theme's palette). E.g. --data '{"showStreakNumbers":false}'.`
61763
+ notes: `Appearance keys: glass (liquid|frosted|solid), followSky, nightUntilWake, largerText, reduceMotion, showStreakNumbers, themePack (do|skyrim|pokemon), themePackScope (section|everywhere). App: ui (v1|v2), skin (do|te|omarchy: the do v2 theme), skinVariant (a palette id such as catppuccin-latte, custom for your own, or null: the theme's palette), skinColors (your own palette: a colors.toml as text, or null). E.g. --data '{"showStreakNumbers":false}'.`
61253
61764
  },
61254
61765
  run: async ({ flags, requireClient }) => {
61255
61766
  const body = parseInput(updateUserSettingsInputSchema, readDataFlag(flags));
@@ -61262,7 +61773,7 @@ var commands54 = [
61262
61773
  ];
61263
61774
 
61264
61775
  // src/commands/sharing.ts
61265
- var commands55 = [
61776
+ var commands57 = [
61266
61777
  {
61267
61778
  spec: {
61268
61779
  path: ["share"],
@@ -61395,7 +61906,7 @@ var commands55 = [
61395
61906
  ];
61396
61907
 
61397
61908
  // src/commands/space.ts
61398
- var commands56 = [
61909
+ var commands58 = [
61399
61910
  {
61400
61911
  spec: {
61401
61912
  path: ["space", "address"],
@@ -61451,7 +61962,7 @@ var commands56 = [
61451
61962
  ];
61452
61963
 
61453
61964
  // src/commands/tap-tags.ts
61454
- var commands57 = [
61965
+ var commands59 = [
61455
61966
  {
61456
61967
  spec: {
61457
61968
  path: ["tap-tags", "tap"],
@@ -61479,7 +61990,7 @@ var BY = {
61479
61990
  type: "string",
61480
61991
  description: "The blocking task's ref (DO-147) or ULID."
61481
61992
  };
61482
- var commands58 = [
61993
+ var commands60 = [
61483
61994
  defineCommand({
61484
61995
  operation: taskBlockOperations.addBlocker,
61485
61996
  path: ["tasks", "block"],
@@ -61545,7 +62056,7 @@ function renderSeries(data, mode) {
61545
62056
  }).join(`
61546
62057
  `);
61547
62058
  }
61548
- var commands59 = [
62059
+ var commands61 = [
61549
62060
  defineCommand({
61550
62061
  operation: taskSeriesOperations.make,
61551
62062
  path: ["tasks", "make-series"],
@@ -61700,7 +62211,7 @@ function repeatFromFlags(flags) {
61700
62211
  out.anchor = "from_completion";
61701
62212
  return out;
61702
62213
  }
61703
- var commands60 = [
62214
+ var commands62 = [
61704
62215
  {
61705
62216
  spec: {
61706
62217
  path: ["capture"],
@@ -62158,7 +62669,7 @@ var commands60 = [
62158
62669
  ];
62159
62670
 
62160
62671
  // src/commands/time-blocks.ts
62161
- var commands61 = [
62672
+ var commands63 = [
62162
62673
  {
62163
62674
  spec: {
62164
62675
  path: ["time-blocks", "record"],
@@ -62350,7 +62861,7 @@ function renderLandedCounts(data, mode) {
62350
62861
  return out.join(`
62351
62862
  `);
62352
62863
  }
62353
- var commands62 = [
62864
+ var commands64 = [
62354
62865
  {
62355
62866
  spec: {
62356
62867
  path: ["today"],
@@ -62722,7 +63233,7 @@ function renderViews(data, mode) {
62722
63233
  function renderView(data, mode) {
62723
63234
  return renderViews([data], mode);
62724
63235
  }
62725
- var commands63 = [
63236
+ var commands65 = [
62726
63237
  defineCommand({
62727
63238
  operation: workViewOperations.list,
62728
63239
  path: ["views", "list"],
@@ -62841,7 +63352,7 @@ var commands63 = [
62841
63352
  ];
62842
63353
 
62843
63354
  // src/commands/worktree-links.ts
62844
- var commands64 = [
63355
+ var commands66 = [
62845
63356
  {
62846
63357
  spec: {
62847
63358
  path: ["worktree-links", "list"],
@@ -63011,7 +63522,9 @@ var FEATURE_COMMANDS = [
63011
63522
  ...commands61,
63012
63523
  ...commands62,
63013
63524
  ...commands63,
63014
- ...commands64
63525
+ ...commands64,
63526
+ ...commands65,
63527
+ ...commands66
63015
63528
  ];
63016
63529
 
63017
63530
  // src/registry.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.422.0",
3
+ "version": "1.424.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",