@robbeverhelst/do 1.420.0 → 1.422.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 +522 -177
  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.420.0";
14423
+ var VERSION = "1.422.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -17695,12 +17695,23 @@ var agents = pgTable("agents", {
17695
17695
  gatewayConnectedAt: timestamp("gateway_connected_at", { withTimezone: true }),
17696
17696
  gatewaySeenAt: timestamp("gateway_seen_at", { withTimezone: true }),
17697
17697
  gatewayDisconnectedAt: timestamp("gateway_disconnected_at", { withTimezone: true }),
17698
+ kind: text("kind"),
17699
+ about: text("about"),
17700
+ machine: text("machine"),
17701
+ account: text("account"),
17702
+ status: text("status"),
17703
+ statusText: text("status_text"),
17704
+ statusAt: timestamp("status_at", { withTimezone: true }),
17698
17705
  createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
17699
17706
  updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
17700
17707
  }, (t) => [
17701
17708
  index("agents_tenant_idx").on(t.tenantId),
17702
- uniqueIndex("agents_tenant_name_live_idx").on(t.tenantId, sql`lower(${t.name})`).where(sql`${t.revokedAt} IS NULL`)
17709
+ uniqueIndex("agents_tenant_name_live_idx").on(t.tenantId, sql`lower(${t.name})`).where(sql`${t.revokedAt} IS NULL`),
17710
+ check2("agents_kind_chk", sql`${t.kind} IS NULL OR ${t.kind} IN ('assistant', 'agent', 'lane', 'session')`),
17711
+ check2("agents_status_chk", sql`${t.status} IS NULL OR ${t.status} IN ('working', 'waiting', 'idle')`)
17703
17712
  ]);
17713
+ var AGENT_STATUSES = ["working", "waiting", "idle"];
17714
+ var AGENT_KINDS = ["assistant", "agent", "lane", "session"];
17704
17715
 
17705
17716
  // ../../packages/schema/src/contracts/agents.ts
17706
17717
  var agentSchema = createSelectSchema(agents, {
@@ -17709,6 +17720,13 @@ var agentSchema = createSelectSchema(agents, {
17709
17720
  gatewayConnectedAt: exports_coerce.date().nullable().default(null),
17710
17721
  gatewaySeenAt: exports_coerce.date().nullable().default(null),
17711
17722
  gatewayDisconnectedAt: exports_coerce.date().nullable().default(null),
17723
+ kind: string2().nullable().default(null),
17724
+ about: string2().nullable().default(null),
17725
+ machine: string2().nullable().default(null),
17726
+ account: string2().nullable().default(null),
17727
+ status: string2().nullable().default(null),
17728
+ statusText: string2().nullable().default(null),
17729
+ statusAt: exports_coerce.date().nullable().default(null),
17712
17730
  createdAt: exports_coerce.date(),
17713
17731
  updatedAt: exports_coerce.date()
17714
17732
  });
@@ -19877,6 +19895,7 @@ var echoAgentRunSchema = object({
19877
19895
  externalId: string2(),
19878
19896
  threadId: string2(),
19879
19897
  postId: string2().nullable(),
19898
+ agentId: string2(),
19880
19899
  kind: _enum2(["kanban", "job", "session"]).nullable(),
19881
19900
  title: string2(),
19882
19901
  agent: postCardWhoSchema,
@@ -20618,6 +20637,175 @@ var agentPostOperations = defineOperations({
20618
20637
  }
20619
20638
  });
20620
20639
 
20640
+ // ../../packages/schema/src/db/agent-chat-threads.ts
20641
+ var agentChatThreads = pgTable("agent_chat_threads", {
20642
+ id: text("id").primaryKey(),
20643
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
20644
+ userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
20645
+ title: text("title"),
20646
+ slug: text("slug"),
20647
+ standing: boolean4("standing").notNull().default(false),
20648
+ push: text("push").notNull().default("all"),
20649
+ areaIds: text("area_ids").array().notNull().default([]),
20650
+ peopleCapture: boolean4("people_capture").notNull().default(true),
20651
+ kind: text("kind"),
20652
+ anchorType: text("anchor_type"),
20653
+ anchorId: text("anchor_id"),
20654
+ parentId: text("parent_id"),
20655
+ notifyLevel: text("notify_level"),
20656
+ icon: text("icon"),
20657
+ description: text("description"),
20658
+ memoryScope: text("memory_scope"),
20659
+ lastMessageAt: timestamp("last_message_at", { withTimezone: true }),
20660
+ archivedAt: timestamp("archived_at", { withTimezone: true }),
20661
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
20662
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
20663
+ }, (t) => [
20664
+ 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`)
20666
+ ]);
20667
+ var agentChatTurns = pgTable("agent_chat_turns", {
20668
+ id: text("id").primaryKey(),
20669
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
20670
+ threadId: text("thread_id").notNull().references(() => agentChatThreads.id, { onDelete: "cascade" }),
20671
+ userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
20672
+ question: text("question").notNull(),
20673
+ context: jsonb("context").$type().notNull(),
20674
+ reply: text("reply").notNull().default(""),
20675
+ status: text("status").notNull().default("streaming"),
20676
+ error: text("error"),
20677
+ since: text("since"),
20678
+ changes: jsonb("changes").$type().notNull().default([]),
20679
+ confirmations: jsonb("confirmations").$type().notNull().default([]),
20680
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
20681
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
20682
+ }, (t) => [index("agent_chat_turns_thread_idx").on(t.threadId, t.createdAt)]);
20683
+ var agentChatPosts = pgTable("agent_chat_posts", {
20684
+ id: text("id").primaryKey(),
20685
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
20686
+ threadId: text("thread_id").notNull().references(() => agentChatThreads.id, { onDelete: "cascade" }),
20687
+ userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
20688
+ author: text("author").notNull(),
20689
+ agentId: text("agent_id").references(() => agents.id),
20690
+ externalId: text("external_id"),
20691
+ kind: text("kind").notNull().default("message"),
20692
+ level: text("level"),
20693
+ text: text("text").notNull().default(""),
20694
+ final: boolean4("final").notNull().default(true),
20695
+ replyToId: text("reply_to_id"),
20696
+ relayOfPostId: text("relay_of_post_id").references(() => agentChatPosts.id, {
20697
+ onDelete: "set null"
20698
+ }),
20699
+ runStatus: text("run_status"),
20700
+ brief: jsonb("brief").$type(),
20701
+ card: jsonb("card").$type(),
20702
+ digestKey: text("digest_key"),
20703
+ title: text("title"),
20704
+ runSteps: jsonb("run_steps").$type(),
20705
+ runEndedAt: timestamp("run_ended_at", { withTimezone: true }),
20706
+ prompt: jsonb("prompt").$type(),
20707
+ receipt: jsonb("receipt").$type(),
20708
+ attachments: jsonb("attachments").$type().notNull().default([]),
20709
+ context: jsonb("context").$type(),
20710
+ deliveredAt: timestamp("delivered_at", { withTimezone: true }),
20711
+ seenAt: timestamp("seen_at", { withTimezone: true }),
20712
+ readAt: timestamp("read_at", { withTimezone: true }),
20713
+ fallbackAt: timestamp("fallback_at", { withTimezone: true }),
20714
+ fallbackAckedAt: timestamp("fallback_acked_at", { withTimezone: true }),
20715
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
20716
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
20717
+ deletedAt: timestamp("deleted_at", { withTimezone: true })
20718
+ }, (t) => [
20719
+ index("agent_chat_posts_thread_idx").on(t.threadId, t.createdAt),
20720
+ uniqueIndex("agent_chat_posts_external_uniq").on(t.tenantId, t.agentId, t.externalId).where(sql`${t.externalId} is not null`),
20721
+ index("agent_chat_posts_undelivered_idx").on(t.tenantId, t.createdAt).where(sql`${t.author} = 'member' and ${t.deliveredAt} is null`),
20722
+ index("agent_chat_posts_needs_you_unseen_idx").on(t.tenantId, t.userId, t.createdAt).where(sql`${t.author} = 'agent' and ${t.level} = 'needs_you' and ${t.seenAt} is null and ${t.deletedAt} is null`)
20723
+ ]);
20724
+
20725
+ // ../../packages/schema/src/db/echo-handoffs.ts
20726
+ var ECHO_HANDOFF_STATES = ["sent", "seen", "picked", "done"];
20727
+ var echoHandoffs = pgTable("echo_handoffs", {
20728
+ id: text("id").primaryKey(),
20729
+ tenantId: text("tenant_id").notNull().references(() => tenants.id),
20730
+ userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
20731
+ key: text("key").notNull(),
20732
+ fromAgentId: text("from_agent_id").notNull().references(() => agents.id),
20733
+ toAgentId: text("to_agent_id").notNull().references(() => agents.id),
20734
+ what: text("what").notNull(),
20735
+ threadId: text("thread_id").references(() => agentChatThreads.id, { onDelete: "set null" }),
20736
+ state: text("state").notNull().default("sent"),
20737
+ sentAt: timestamp("sent_at", { withTimezone: true }).notNull(),
20738
+ seenAt: timestamp("seen_at", { withTimezone: true }),
20739
+ pickedAt: timestamp("picked_at", { withTimezone: true }),
20740
+ doneAt: timestamp("done_at", { withTimezone: true }),
20741
+ nudgedAt: timestamp("nudged_at", { withTimezone: true }),
20742
+ createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
20743
+ updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
20744
+ }, (t) => [
20745
+ index("echo_handoffs_member_idx").on(t.tenantId, t.userId),
20746
+ uniqueIndex("echo_handoffs_key_uniq").on(t.tenantId, t.userId, t.key),
20747
+ check2("echo_handoffs_state_chk", sql`${t.state} IN ('sent', 'seen', 'picked', 'done')`)
20748
+ ]);
20749
+
20750
+ // ../../packages/schema/src/contracts/echo-agents.ts
20751
+ var agentKindSchema = _enum2(AGENT_KINDS);
20752
+ var agentStatusSchema = _enum2(AGENT_STATUSES);
20753
+ var echoHandoffStateSchema = _enum2(ECHO_HANDOFF_STATES);
20754
+ var line4 = (max) => string2().trim().min(1).max(max);
20755
+ var agentProfileInputSchema = object({
20756
+ kind: agentKindSchema.nullish(),
20757
+ about: line4(160).nullish(),
20758
+ machine: line4(40).nullish(),
20759
+ account: line4(40).nullish(),
20760
+ status: agentStatusSchema.nullish(),
20761
+ statusText: line4(160).nullish()
20762
+ }).strict().refine((v) => Object.keys(v).length > 0, "send at least one field");
20763
+ var echoThreadRefSchema = object({
20764
+ id: string2(),
20765
+ title: string2().nullable(),
20766
+ slug: string2().nullable(),
20767
+ icon: string2().nullable()
20768
+ });
20769
+ var echoAgentSchema = object({
20770
+ id: ulidSchema,
20771
+ name: string2(),
20772
+ kind: agentKindSchema.nullable(),
20773
+ about: string2().nullable(),
20774
+ machine: string2().nullable(),
20775
+ account: string2().nullable(),
20776
+ status: agentStatusSchema.nullable(),
20777
+ statusText: string2().nullable(),
20778
+ statusAt: exports_coerce.date().nullable(),
20779
+ threads: array(echoThreadRefSchema),
20780
+ createdAt: exports_coerce.date()
20781
+ });
20782
+ var echoHandoffKeySchema = string2().regex(/^[a-z0-9][a-z0-9-]{0,59}$/, "lower-case letters, digits and dashes, at most 60");
20783
+ var echoHandoffSchema = object({
20784
+ id: ulidSchema,
20785
+ key: string2(),
20786
+ from: object({ id: string2(), name: string2() }),
20787
+ to: object({ id: string2(), name: string2() }),
20788
+ what: string2(),
20789
+ thread: echoThreadRefSchema.nullable(),
20790
+ state: echoHandoffStateSchema,
20791
+ sentAt: exports_coerce.date(),
20792
+ seenAt: exports_coerce.date().nullable(),
20793
+ pickedAt: exports_coerce.date().nullable(),
20794
+ doneAt: exports_coerce.date().nullable(),
20795
+ nudgedAt: exports_coerce.date().nullable(),
20796
+ updatedAt: exports_coerce.date()
20797
+ });
20798
+ var putEchoHandoffInputSchema = object({
20799
+ from: agentNameSchema,
20800
+ to: agentNameSchema,
20801
+ what: line4(300),
20802
+ thread: line4(40).nullish(),
20803
+ state: echoHandoffStateSchema.optional(),
20804
+ at: exports_coerce.date().optional()
20805
+ }).strict();
20806
+ var reassignEchoHandoffInputSchema = object({ to: ulidSchema }).strict();
20807
+ var echoHandoffKeyParamSchema = object({ key: echoHandoffKeySchema });
20808
+
20621
20809
  // ../../packages/schema/src/operations/agents.ts
20622
20810
  var agentOperations = defineOperations({
20623
20811
  list: {
@@ -20629,6 +20817,20 @@ var agentOperations = defineOperations({
20629
20817
  description: "The Space's live Agents (`id`, `name`), oldest first, to resolve an Agent by name.",
20630
20818
  status: 200,
20631
20819
  response: { description: "The Space's Agents.", list: true }
20820
+ },
20821
+ profile: {
20822
+ method: "patch",
20823
+ path: "/agents/{id}/profile",
20824
+ pathParams: { id: "The Agent's id (`GET /agents`)." },
20825
+ pathParamSchemas: { id: ulidSchema },
20826
+ scopes: ["agents:write"],
20827
+ tag: "Agents",
20828
+ summary: "Report an agent's profile and status",
20829
+ description: "What Echo \u203A Agents shows for the agent: its `kind` (`assistant`, `agent`, `lane` or `session`), `about` (a line on what it does), the `machine` and `account` it runs on, and its `status` (`working`, `waiting` or `idle`) with `statusText`, what it's on. An agent reports its own, or Echo for the agents it relays. A field sent replaces that one, null clears it; a new status stamps `statusAt`. An unknown or revoked id is a 404.",
20830
+ body: agentProfileInputSchema,
20831
+ status: 200,
20832
+ response: { description: "The Agent." },
20833
+ errors: { 400: true, 404: true }
20632
20834
  }
20633
20835
  });
20634
20836
 
@@ -28625,90 +28827,83 @@ var documentOperations = defineOperations({
28625
28827
  }
28626
28828
  });
28627
28829
 
28628
- // ../../packages/schema/src/db/agent-chat-threads.ts
28629
- var agentChatThreads = pgTable("agent_chat_threads", {
28630
- id: text("id").primaryKey(),
28631
- tenantId: text("tenant_id").notNull().references(() => tenants.id),
28632
- userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
28633
- title: text("title"),
28634
- slug: text("slug"),
28635
- standing: boolean4("standing").notNull().default(false),
28636
- push: text("push").notNull().default("all"),
28637
- areaIds: text("area_ids").array().notNull().default([]),
28638
- peopleCapture: boolean4("people_capture").notNull().default(true),
28639
- kind: text("kind"),
28640
- anchorType: text("anchor_type"),
28641
- anchorId: text("anchor_id"),
28642
- parentId: text("parent_id"),
28643
- notifyLevel: text("notify_level"),
28644
- icon: text("icon"),
28645
- description: text("description"),
28646
- memoryScope: text("memory_scope"),
28647
- lastMessageAt: timestamp("last_message_at", { withTimezone: true }),
28648
- archivedAt: timestamp("archived_at", { withTimezone: true }),
28649
- createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
28650
- updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
28651
- }, (t) => [
28652
- index("agent_chat_threads_member_idx").on(t.tenantId, t.userId, t.updatedAt),
28653
- uniqueIndex("agent_chat_threads_slug_uniq").on(t.tenantId, t.userId, t.slug).where(sql`${t.slug} is not null`)
28654
- ]);
28655
- var agentChatTurns = pgTable("agent_chat_turns", {
28656
- id: text("id").primaryKey(),
28657
- tenantId: text("tenant_id").notNull().references(() => tenants.id),
28658
- threadId: text("thread_id").notNull().references(() => agentChatThreads.id, { onDelete: "cascade" }),
28659
- userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
28660
- question: text("question").notNull(),
28661
- context: jsonb("context").$type().notNull(),
28662
- reply: text("reply").notNull().default(""),
28663
- status: text("status").notNull().default("streaming"),
28664
- error: text("error"),
28665
- since: text("since"),
28666
- changes: jsonb("changes").$type().notNull().default([]),
28667
- confirmations: jsonb("confirmations").$type().notNull().default([]),
28668
- createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
28669
- updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow()
28670
- }, (t) => [index("agent_chat_turns_thread_idx").on(t.threadId, t.createdAt)]);
28671
- var agentChatPosts = pgTable("agent_chat_posts", {
28672
- id: text("id").primaryKey(),
28673
- tenantId: text("tenant_id").notNull().references(() => tenants.id),
28674
- threadId: text("thread_id").notNull().references(() => agentChatThreads.id, { onDelete: "cascade" }),
28675
- userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
28676
- author: text("author").notNull(),
28677
- agentId: text("agent_id").references(() => agents.id),
28678
- externalId: text("external_id"),
28679
- kind: text("kind").notNull().default("message"),
28680
- level: text("level"),
28681
- text: text("text").notNull().default(""),
28682
- final: boolean4("final").notNull().default(true),
28683
- replyToId: text("reply_to_id"),
28684
- relayOfPostId: text("relay_of_post_id").references(() => agentChatPosts.id, {
28685
- onDelete: "set null"
28686
- }),
28687
- runStatus: text("run_status"),
28688
- brief: jsonb("brief").$type(),
28689
- card: jsonb("card").$type(),
28690
- digestKey: text("digest_key"),
28691
- title: text("title"),
28692
- runSteps: jsonb("run_steps").$type(),
28693
- runEndedAt: timestamp("run_ended_at", { withTimezone: true }),
28694
- prompt: jsonb("prompt").$type(),
28695
- receipt: jsonb("receipt").$type(),
28696
- attachments: jsonb("attachments").$type().notNull().default([]),
28697
- context: jsonb("context").$type(),
28698
- deliveredAt: timestamp("delivered_at", { withTimezone: true }),
28699
- seenAt: timestamp("seen_at", { withTimezone: true }),
28700
- readAt: timestamp("read_at", { withTimezone: true }),
28701
- fallbackAt: timestamp("fallback_at", { withTimezone: true }),
28702
- fallbackAckedAt: timestamp("fallback_acked_at", { withTimezone: true }),
28703
- createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
28704
- updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
28705
- deletedAt: timestamp("deleted_at", { withTimezone: true })
28706
- }, (t) => [
28707
- index("agent_chat_posts_thread_idx").on(t.threadId, t.createdAt),
28708
- uniqueIndex("agent_chat_posts_external_uniq").on(t.tenantId, t.agentId, t.externalId).where(sql`${t.externalId} is not null`),
28709
- index("agent_chat_posts_undelivered_idx").on(t.tenantId, t.createdAt).where(sql`${t.author} = 'member' and ${t.deliveredAt} is null`),
28710
- index("agent_chat_posts_needs_you_unseen_idx").on(t.tenantId, t.userId, t.createdAt).where(sql`${t.author} = 'agent' and ${t.level} = 'needs_you' and ${t.seenAt} is null and ${t.deletedAt} is null`)
28711
- ]);
28830
+ // ../../packages/schema/src/operations/echo-handoffs.ts
28831
+ var NO_USER = "The key has no user identity (handoffs are per member).";
28832
+ var KEY = {
28833
+ key: {
28834
+ description: "The handoff's handle, the agent's own (`renovate-fold`): lower-case letters, digits and dashes.",
28835
+ pattern: "^[a-z0-9][a-z0-9-]{0,59}$"
28836
+ }
28837
+ };
28838
+ var KEY_SCHEMA = { key: echoHandoffKeySchema };
28839
+ var VIEW = "`{ id, key, from: { id, name }, to: { id, name }, what, thread: { id, title, slug, icon } | null, state, sentAt, seenAt, pickedAt, doneAt, nudgedAt }`";
28840
+ var echoHandoffOperations = defineOperations({
28841
+ list: {
28842
+ method: "get",
28843
+ path: "/echo/handoffs",
28844
+ scopes: ["agents:read"],
28845
+ tag: "Agents",
28846
+ summary: "List the handoffs",
28847
+ 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
+ status: 200,
28849
+ response: { description: "The handoffs.", list: true },
28850
+ errors: { 403: NO_USER }
28851
+ },
28852
+ put: {
28853
+ method: "put",
28854
+ path: "/echo/handoffs/{key}",
28855
+ pathParams: KEY,
28856
+ pathParamSchemas: KEY_SCHEMA,
28857
+ scopes: ["agents:write"],
28858
+ tag: "Agents",
28859
+ summary: "Declare a handoff or move it along",
28860
+ description: "Who it's `from` and `to` (Agent names), `what`, the member's standing `thread` it belongs to (by slug) and its `state`: `sent`, `seen`, `picked` or `done`. A new key starts as `sent` unless given; a new state stamps its time (`at`, default now) and clears a nudge. An unknown agent or thread is a 404.",
28861
+ body: putEchoHandoffInputSchema,
28862
+ status: 200,
28863
+ response: { description: "The handoff." },
28864
+ errors: { 400: true, 403: NO_USER, 404: "No such agent or thread." }
28865
+ },
28866
+ nudge: {
28867
+ method: "post",
28868
+ path: "/echo/handoffs/{key}/nudge",
28869
+ pathParams: KEY,
28870
+ pathParamSchemas: KEY_SCHEMA,
28871
+ scopes: ["agents:write"],
28872
+ tag: "Agents",
28873
+ summary: "Nudge the agent a handoff went to",
28874
+ 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
+ status: 200,
28876
+ response: { description: "The handoff." },
28877
+ errors: { 403: NO_USER, 404: true, 409: "It was picked up already." }
28878
+ },
28879
+ reassign: {
28880
+ method: "patch",
28881
+ path: "/echo/handoffs/{key}",
28882
+ pathParams: KEY,
28883
+ pathParamSchemas: KEY_SCHEMA,
28884
+ scopes: ["agents:write"],
28885
+ tag: "Agents",
28886
+ summary: "Give a handoff to another agent",
28887
+ description: "The member gives it to another of the Space's agents (`to`, its id): it starts over as `sent` to that one. A handoff already done is a 409; an unknown key or agent is a 404.",
28888
+ body: reassignEchoHandoffInputSchema,
28889
+ status: 200,
28890
+ response: { description: "The handoff." },
28891
+ errors: { 400: true, 403: NO_USER, 404: true, 409: "It's done." }
28892
+ },
28893
+ remove: {
28894
+ method: "delete",
28895
+ path: "/echo/handoffs/{key}",
28896
+ pathParams: KEY,
28897
+ pathParamSchemas: KEY_SCHEMA,
28898
+ scopes: ["agents:write"],
28899
+ tag: "Agents",
28900
+ summary: "Remove a handoff",
28901
+ description: "The agent drops the handoff. An unknown key is a 404.",
28902
+ status: 204,
28903
+ response: { description: "Removed." },
28904
+ errors: { 403: NO_USER, 404: true }
28905
+ }
28906
+ });
28712
28907
 
28713
28908
  // ../../packages/schema/src/db/echo-schedules.ts
28714
28909
  var ECHO_SCHEDULE_LEVELS = ["now", "today", "digest", "silent"];
@@ -28796,15 +28991,15 @@ var reportEchoScheduleRunInputSchema = object({
28796
28991
  var echoScheduleKeyParamSchema = object({ key: echoScheduleKeySchema });
28797
28992
 
28798
28993
  // ../../packages/schema/src/operations/echo-schedules.ts
28799
- var NO_USER = "The key has no user identity (scheduled posts are per member).";
28800
- var KEY = {
28994
+ var NO_USER2 = "The key has no user identity (scheduled posts are per member).";
28995
+ var KEY2 = {
28801
28996
  key: {
28802
28997
  description: "The job's handle, the agent's own (`wake`, `pings`): lower-case letters, digits and dashes.",
28803
28998
  pattern: "^[a-z0-9][a-z0-9-]{0,39}$"
28804
28999
  }
28805
29000
  };
28806
- var KEY_SCHEMA = { key: echoScheduleKeySchema };
28807
- var VIEW = "`{ id, key, name, thread: { id, title, slug, icon }, agentId, desk, times, everyMinutes, weekdays, level, levelNote, paused, runRequested, lastRunAt, lastStatus, lastNote }`";
29001
+ var KEY_SCHEMA2 = { key: echoScheduleKeySchema };
29002
+ var VIEW2 = "`{ id, key, name, thread: { id, title, slug, icon }, agentId, desk, times, everyMinutes, weekdays, level, levelNote, paused, runRequested, lastRunAt, lastStatus, lastNote }`";
28808
29003
  var echoScheduleOperations = defineOperations({
28809
29004
  list: {
28810
29005
  method: "get",
@@ -28812,16 +29007,16 @@ var echoScheduleOperations = defineOperations({
28812
29007
  scopes: ["agents:read"],
28813
29008
  tag: "Agents",
28814
29009
  summary: "List the scheduled posts",
28815
- description: `Every job that posts into the member's threads on a clock, by name: ${VIEW}. \`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.`,
29010
+ 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.`,
28816
29011
  status: 200,
28817
29012
  response: { description: "The scheduled posts.", list: true },
28818
- errors: { 403: NO_USER }
29013
+ errors: { 403: NO_USER2 }
28819
29014
  },
28820
29015
  put: {
28821
29016
  method: "put",
28822
29017
  path: "/echo/schedules/{key}",
28823
- pathParams: KEY,
28824
- pathParamSchemas: KEY_SCHEMA,
29018
+ pathParams: KEY2,
29019
+ pathParamSchemas: KEY_SCHEMA2,
28825
29020
  scopes: ["agents:write"],
28826
29021
  tag: "Agents",
28827
29022
  summary: "Declare a scheduled post",
@@ -28829,13 +29024,13 @@ var echoScheduleOperations = defineOperations({
28829
29024
  body: putEchoScheduleInputSchema,
28830
29025
  status: 200,
28831
29026
  response: { description: "The scheduled post." },
28832
- errors: { 400: true, 403: NO_USER, 404: "No such thread." }
29027
+ errors: { 400: true, 403: NO_USER2, 404: "No such thread." }
28833
29028
  },
28834
29029
  update: {
28835
29030
  method: "patch",
28836
29031
  path: "/echo/schedules/{key}",
28837
- pathParams: KEY,
28838
- pathParamSchemas: KEY_SCHEMA,
29032
+ pathParams: KEY2,
29033
+ pathParamSchemas: KEY_SCHEMA2,
28839
29034
  scopes: ["agents:write"],
28840
29035
  tag: "Agents",
28841
29036
  summary: "Change a scheduled post's level or pause it",
@@ -28843,26 +29038,26 @@ var echoScheduleOperations = defineOperations({
28843
29038
  body: updateEchoScheduleInputSchema,
28844
29039
  status: 200,
28845
29040
  response: { description: "The scheduled post." },
28846
- errors: { 400: true, 403: NO_USER, 404: true }
29041
+ errors: { 400: true, 403: NO_USER2, 404: true }
28847
29042
  },
28848
29043
  runNow: {
28849
29044
  method: "post",
28850
29045
  path: "/echo/schedules/{key}/run",
28851
- pathParams: KEY,
28852
- pathParamSchemas: KEY_SCHEMA,
29046
+ pathParams: KEY2,
29047
+ pathParamSchemas: KEY_SCHEMA2,
28853
29048
  scopes: ["agents:write"],
28854
29049
  tag: "Agents",
28855
29050
  summary: "Ask for a scheduled post now",
28856
29051
  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.",
28857
29052
  status: 200,
28858
29053
  response: { description: "The scheduled post." },
28859
- errors: { 403: NO_USER, 404: true, 409: "The job is paused." }
29054
+ errors: { 403: NO_USER2, 404: true, 409: "The job is paused." }
28860
29055
  },
28861
29056
  report: {
28862
29057
  method: "post",
28863
29058
  path: "/echo/schedules/{key}/runs",
28864
- pathParams: KEY,
28865
- pathParamSchemas: KEY_SCHEMA,
29059
+ pathParams: KEY2,
29060
+ pathParamSchemas: KEY_SCHEMA2,
28866
29061
  scopes: ["agents:write"],
28867
29062
  tag: "Agents",
28868
29063
  summary: "Report a scheduled post's run",
@@ -28870,20 +29065,20 @@ var echoScheduleOperations = defineOperations({
28870
29065
  body: reportEchoScheduleRunInputSchema,
28871
29066
  status: 200,
28872
29067
  response: { description: "The scheduled post." },
28873
- errors: { 400: true, 403: NO_USER, 404: true }
29068
+ errors: { 400: true, 403: NO_USER2, 404: true }
28874
29069
  },
28875
29070
  remove: {
28876
29071
  method: "delete",
28877
29072
  path: "/echo/schedules/{key}",
28878
- pathParams: KEY,
28879
- pathParamSchemas: KEY_SCHEMA,
29073
+ pathParams: KEY2,
29074
+ pathParamSchemas: KEY_SCHEMA2,
28880
29075
  scopes: ["agents:write"],
28881
29076
  tag: "Agents",
28882
29077
  summary: "Remove a scheduled post",
28883
29078
  description: "The agent no longer runs the job. An unknown key is a 404.",
28884
29079
  status: 204,
28885
29080
  response: { description: "Removed." },
28886
- errors: { 403: NO_USER, 404: true }
29081
+ errors: { 403: NO_USER2, 404: true }
28887
29082
  }
28888
29083
  });
28889
29084
 
@@ -29087,7 +29282,7 @@ var createEchoThreadInputSchema = object({
29087
29282
  }).strict();
29088
29283
 
29089
29284
  // ../../packages/schema/src/operations/echo-threads.ts
29090
- var NO_USER2 = "The key has no user identity (threads are per member).";
29285
+ var NO_USER3 = "The key has no user identity (threads are per member).";
29091
29286
  var echoThreadOperations = defineOperations({
29092
29287
  list: {
29093
29288
  method: "get",
@@ -29108,7 +29303,7 @@ var echoThreadOperations = defineOperations({
29108
29303
  querySchema: echoThreadsQuerySchema,
29109
29304
  status: 200,
29110
29305
  response: { description: "The member's threads.", list: true },
29111
- errors: { 400: true, 403: NO_USER2 }
29306
+ errors: { 400: true, 403: NO_USER3 }
29112
29307
  },
29113
29308
  create: {
29114
29309
  method: "post",
@@ -29121,7 +29316,7 @@ var echoThreadOperations = defineOperations({
29121
29316
  bodyOptional: true,
29122
29317
  status: 201,
29123
29318
  response: { description: "The new current thread." },
29124
- errors: { 403: NO_USER2 }
29319
+ errors: { 403: NO_USER3 }
29125
29320
  },
29126
29321
  current: {
29127
29322
  method: "get",
@@ -29132,7 +29327,7 @@ var echoThreadOperations = defineOperations({
29132
29327
  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.",
29133
29328
  status: 200,
29134
29329
  response: { description: "`{ thread }`." },
29135
- errors: { 403: NO_USER2 }
29330
+ errors: { 403: NO_USER3 }
29136
29331
  },
29137
29332
  briefs: {
29138
29333
  method: "get",
@@ -29152,7 +29347,7 @@ var echoThreadOperations = defineOperations({
29152
29347
  querySchema: echoBriefsQuerySchema,
29153
29348
  status: 200,
29154
29349
  response: { description: "`{ briefs }`." },
29155
- errors: { 400: true, 403: NO_USER2 }
29350
+ errors: { 400: true, 403: NO_USER3 }
29156
29351
  },
29157
29352
  get: {
29158
29353
  method: "get",
@@ -29163,7 +29358,7 @@ var echoThreadOperations = defineOperations({
29163
29358
  description: "One of the member's threads with its turns, oldest first. Another member's thread is a 404.",
29164
29359
  status: 200,
29165
29360
  response: { description: "The thread." },
29166
- errors: { 403: NO_USER2, 404: true }
29361
+ errors: { 403: NO_USER3, 404: true }
29167
29362
  },
29168
29363
  update: {
29169
29364
  method: "patch",
@@ -29175,7 +29370,7 @@ var echoThreadOperations = defineOperations({
29175
29370
  body: updateEchoThreadInputSchema,
29176
29371
  status: 200,
29177
29372
  response: { description: "The thread as the list shows it, with its `push`." },
29178
- errors: { 400: true, 403: NO_USER2, 404: true }
29373
+ errors: { 400: true, 403: NO_USER3, 404: true }
29179
29374
  },
29180
29375
  addStanding: {
29181
29376
  method: "post",
@@ -29187,7 +29382,7 @@ var echoThreadOperations = defineOperations({
29187
29382
  body: createStandingThreadInputSchema,
29188
29383
  status: 201,
29189
29384
  response: { description: "The standing thread." },
29190
- errors: { 400: true, 403: NO_USER2, 409: true }
29385
+ errors: { 400: true, 403: NO_USER3, 409: true }
29191
29386
  }
29192
29387
  });
29193
29388
 
@@ -46546,6 +46741,41 @@ var commands = [
46546
46741
  },
46547
46742
  run: readOperation(agentOperations.list, renderList, {}, { paged: true })
46548
46743
  },
46744
+ {
46745
+ spec: {
46746
+ path: ["agents", "profile"],
46747
+ summary: "Report an agent's profile and status for Echo \u203A Agents (its own, or one Echo relays).",
46748
+ args: [{ name: "agent", required: true, description: "The Agent: its id or name." }],
46749
+ flags: [
46750
+ { name: "kind", type: "string", description: "assistant, agent, lane or session." },
46751
+ { name: "about", type: "string", description: "A line on what it does." },
46752
+ { name: "machine", type: "string", description: "The machine it runs on." },
46753
+ { name: "account", type: "string", description: "The account it runs on." },
46754
+ { name: "status", type: "string", description: "working, waiting or idle." },
46755
+ { name: "on", type: "string", description: "What it's on (Deploying v1.365)." }
46756
+ ],
46757
+ scopes: [...agentOperations.profile.scopes],
46758
+ returns: "Agent",
46759
+ notes: "Only the fields sent change; a status or what it's on stamps statusAt."
46760
+ },
46761
+ run: async ({ args, flags, requireClient }) => {
46762
+ const client = requireClient();
46763
+ const sent = Object.entries({
46764
+ kind: flagString(flags, "kind"),
46765
+ about: flagString(flags, "about"),
46766
+ machine: flagString(flags, "machine"),
46767
+ account: flagString(flags, "account"),
46768
+ status: flagString(flags, "status"),
46769
+ statusText: flagString(flags, "on")
46770
+ }).filter(([, v]) => v !== undefined);
46771
+ const body = parseInput(agentProfileInputSchema, Object.fromEntries(sent));
46772
+ const id = await resolveAgentId(client, requireArg(args, 0, "agent"));
46773
+ return {
46774
+ data: await client.patch(pathOf(agentOperations.profile, { id }), body),
46775
+ render: renderRecord
46776
+ };
46777
+ }
46778
+ },
46549
46779
  {
46550
46780
  spec: {
46551
46781
  path: ["agent", "connection", "get"],
@@ -50674,11 +50904,125 @@ var commands16 = [
50674
50904
  }
50675
50905
  ];
50676
50906
 
50907
+ // src/commands/echo-handoffs.ts
50908
+ var STATES = ["sent", "seen", "picked", "done"];
50909
+ var KEY_ARG = {
50910
+ name: "key",
50911
+ required: true,
50912
+ description: "The handoff's handle (`renovate-fold`): lower-case letters, digits and dashes."
50913
+ };
50914
+ var keyPath = (op, args) => pathOf(op, { key: requireArg(args, 0, "handoff key") });
50915
+ var commands17 = [
50916
+ {
50917
+ spec: {
50918
+ path: ["echo", "handoffs", "list"],
50919
+ summary: "List the handoffs between your agents: every one not done, and today's done.",
50920
+ args: [],
50921
+ flags: [],
50922
+ scopes: [...echoHandoffOperations.list.scopes],
50923
+ returns: "EchoHandoff[]",
50924
+ notes: "nudgedAt says you nudged the one it went to."
50925
+ },
50926
+ run: async ({ requireClient }) => ({
50927
+ data: await requireClient().getPage(pathOf(echoHandoffOperations.list)),
50928
+ render: renderList
50929
+ })
50930
+ },
50931
+ {
50932
+ spec: {
50933
+ path: ["echo", "handoffs", "set"],
50934
+ summary: "Declare a handoff, or move it along (the agent's): a new key starts it as sent.",
50935
+ args: [KEY_ARG],
50936
+ flags: [
50937
+ { name: "from", type: "string", description: "The agent handing it over, by name." },
50938
+ { name: "to", type: "string", description: "The agent it goes to, by name." },
50939
+ { name: "what", type: "string", description: "What's handed over." },
50940
+ { name: "thread", type: "string", description: "The standing thread it belongs to." },
50941
+ { name: "state", type: "string", description: "sent, seen, picked or done." },
50942
+ { name: "at", type: "string", description: "When it got there (ISO); default now." }
50943
+ ],
50944
+ scopes: [...echoHandoffOperations.put.scopes],
50945
+ returns: "EchoHandoff",
50946
+ notes: "A new state stamps its time and clears a nudge. An unknown agent or thread is a 404."
50947
+ },
50948
+ run: async ({ args, flags, requireClient }) => {
50949
+ const from = flagString(flags, "from");
50950
+ const to = flagString(flags, "to");
50951
+ const what = flagString(flags, "what");
50952
+ if (!from || !to || !what)
50953
+ throw usageError("--from, --to and --what are required");
50954
+ const thread = flagString(flags, "thread");
50955
+ const state = flagString(flags, "state");
50956
+ const at = flagString(flags, "at");
50957
+ if (state && !STATES.includes(state))
50958
+ throw usageError(`--state is one of ${STATES.join(", ")}`);
50959
+ return {
50960
+ data: await requireClient().put(keyPath(echoHandoffOperations.put, args), {
50961
+ from,
50962
+ to,
50963
+ what,
50964
+ ...thread ? { thread } : {},
50965
+ ...state ? { state } : {},
50966
+ ...at ? { at } : {}
50967
+ }),
50968
+ render: renderRecord
50969
+ };
50970
+ }
50971
+ },
50972
+ {
50973
+ spec: {
50974
+ path: ["echo", "handoffs", "nudge"],
50975
+ summary: "Nudge the agent a handoff went to.",
50976
+ args: [KEY_ARG],
50977
+ flags: [],
50978
+ scopes: [...echoHandoffOperations.nudge.scopes],
50979
+ returns: "EchoHandoff",
50980
+ notes: "One picked up or done already is a 409."
50981
+ },
50982
+ run: async ({ args, requireClient }) => ({
50983
+ data: await requireClient().post(keyPath(echoHandoffOperations.nudge, args), {}),
50984
+ render: renderRecord
50985
+ })
50986
+ },
50987
+ {
50988
+ spec: {
50989
+ path: ["echo", "handoffs", "give"],
50990
+ summary: "Give a handoff to another agent: it starts over as sent to them.",
50991
+ args: [KEY_ARG, { name: "to", required: true, description: "The agent's id." }],
50992
+ flags: [],
50993
+ scopes: [...echoHandoffOperations.reassign.scopes],
50994
+ returns: "EchoHandoff",
50995
+ notes: "One done already is a 409. See `do agents list` for the ids."
50996
+ },
50997
+ run: async ({ args, requireClient }) => ({
50998
+ data: await requireClient().patch(keyPath(echoHandoffOperations.reassign, args), {
50999
+ to: requireArg(args, 1, "agent id")
51000
+ }),
51001
+ render: renderRecord
51002
+ })
51003
+ },
51004
+ {
51005
+ spec: {
51006
+ path: ["echo", "handoffs", "rm"],
51007
+ summary: "Remove a handoff (the agent drops it).",
51008
+ args: [KEY_ARG],
51009
+ flags: [],
51010
+ scopes: [...echoHandoffOperations.remove.scopes],
51011
+ returns: "nothing",
51012
+ notes: "An unknown key is a 404."
51013
+ },
51014
+ run: async ({ args, requireClient }) => {
51015
+ await requireClient().delete(keyPath(echoHandoffOperations.remove, args));
51016
+ return { data: { removed: requireArg(args, 0, "handoff key") }, render: renderRecord };
51017
+ }
51018
+ }
51019
+ ];
51020
+
50677
51021
  // src/commands/echo-schedules.ts
50678
51022
  var LEVELS = ["now", "today", "digest", "silent"];
50679
51023
  var STATUSES = ["ok", "failed", "unanswered"];
50680
51024
  var DAYS = ["mon", "tue", "wed", "thu", "fri", "sat", "sun"];
50681
- var KEY_ARG = {
51025
+ var KEY_ARG2 = {
50682
51026
  name: "key",
50683
51027
  required: true,
50684
51028
  description: "The job's handle (`wake`, `pings`): lower-case letters, digits and dashes."
@@ -50696,8 +51040,8 @@ function weekdaysOf(days) {
50696
51040
  return i + 1;
50697
51041
  });
50698
51042
  }
50699
- var keyPath = (op, args) => pathOf(op, { key: requireArg(args, 0, "job key") });
50700
- var commands17 = [
51043
+ var keyPath2 = (op, args) => pathOf(op, { key: requireArg(args, 0, "job key") });
51044
+ var commands18 = [
50701
51045
  {
50702
51046
  spec: {
50703
51047
  path: ["echo", "schedules", "list"],
@@ -50717,7 +51061,7 @@ var commands17 = [
50717
51061
  spec: {
50718
51062
  path: ["echo", "schedules", "set"],
50719
51063
  summary: "Declare a scheduled post (the agent's): a new key makes it, a known key updates it.",
50720
- args: [KEY_ARG],
51064
+ args: [KEY_ARG2],
50721
51065
  flags: [
50722
51066
  { name: "name", type: "string", description: "What it's called (Wake message)." },
50723
51067
  {
@@ -50760,7 +51104,7 @@ var commands17 = [
50760
51104
  const level = flagString(flags, "level");
50761
51105
  const note = flagString(flags, "note");
50762
51106
  return {
50763
- data: await requireClient().put(keyPath(echoScheduleOperations.put, args), {
51107
+ data: await requireClient().put(keyPath2(echoScheduleOperations.put, args), {
50764
51108
  name,
50765
51109
  thread,
50766
51110
  times: at.split(",").map((t) => t.trim()),
@@ -50779,7 +51123,7 @@ var commands17 = [
50779
51123
  path: ["echo", "schedules", "level"],
50780
51124
  summary: "Set how a scheduled post lands: now, today, digest or silent.",
50781
51125
  args: [
50782
- KEY_ARG,
51126
+ KEY_ARG2,
50783
51127
  { name: "level", required: true, description: "now, today, digest or silent." }
50784
51128
  ],
50785
51129
  flags: [],
@@ -50788,7 +51132,7 @@ var commands17 = [
50788
51132
  notes: "now pushes; today is a card in its thread; digest folds into one line; silent stays in its history."
50789
51133
  },
50790
51134
  run: async ({ args, requireClient }) => ({
50791
- data: await requireClient().patch(keyPath(echoScheduleOperations.update, args), {
51135
+ data: await requireClient().patch(keyPath2(echoScheduleOperations.update, args), {
50792
51136
  level: oneOf(requireArg(args, 1, "level"), LEVELS, "level")
50793
51137
  }),
50794
51138
  render: renderRecord
@@ -50798,14 +51142,14 @@ var commands17 = [
50798
51142
  spec: {
50799
51143
  path: ["echo", "schedules", verb],
50800
51144
  summary: verb === "pause" ? "Pause a scheduled post: the agent skips it." : "Resume a paused scheduled post.",
50801
- args: [KEY_ARG],
51145
+ args: [KEY_ARG2],
50802
51146
  flags: [],
50803
51147
  scopes: [...echoScheduleOperations.update.scopes],
50804
51148
  returns: "EchoSchedule",
50805
51149
  notes: "An unknown key is a 404."
50806
51150
  },
50807
51151
  run: async ({ args, requireClient }) => ({
50808
- data: await requireClient().patch(keyPath(echoScheduleOperations.update, args), {
51152
+ data: await requireClient().patch(keyPath2(echoScheduleOperations.update, args), {
50809
51153
  paused: verb === "pause"
50810
51154
  }),
50811
51155
  render: renderRecord
@@ -50815,14 +51159,14 @@ var commands17 = [
50815
51159
  spec: {
50816
51160
  path: ["echo", "schedules", "run"],
50817
51161
  summary: "Ask the agent to run a scheduled post now.",
50818
- args: [KEY_ARG],
51162
+ args: [KEY_ARG2],
50819
51163
  flags: [],
50820
51164
  scopes: [...echoScheduleOperations.runNow.scopes],
50821
51165
  returns: "EchoSchedule",
50822
51166
  notes: "The job reads runRequested until the agent reports a run. A paused job is a 409."
50823
51167
  },
50824
51168
  run: async ({ args, requireClient }) => ({
50825
- data: await requireClient().post(keyPath(echoScheduleOperations.runNow, args), {}),
51169
+ data: await requireClient().post(keyPath2(echoScheduleOperations.runNow, args), {}),
50826
51170
  render: renderRecord
50827
51171
  })
50828
51172
  },
@@ -50830,7 +51174,7 @@ var commands17 = [
50830
51174
  spec: {
50831
51175
  path: ["echo", "schedules", "ran"],
50832
51176
  summary: "Report a scheduled post's run (the agent's): ok, failed or unanswered.",
50833
- args: [KEY_ARG, { name: "status", required: true, description: "ok, failed or unanswered." }],
51177
+ args: [KEY_ARG2, { name: "status", required: true, description: "ok, failed or unanswered." }],
50834
51178
  flags: [
50835
51179
  { name: "note", type: "string", description: "A word on the run (2 differences)." },
50836
51180
  { name: "at", type: "string", description: "When it ran (ISO); default now." }
@@ -50843,7 +51187,7 @@ var commands17 = [
50843
51187
  const note = flagString(flags, "note");
50844
51188
  const at = flagString(flags, "at");
50845
51189
  return {
50846
- data: await requireClient().post(keyPath(echoScheduleOperations.report, args), {
51190
+ data: await requireClient().post(keyPath2(echoScheduleOperations.report, args), {
50847
51191
  status: oneOf(requireArg(args, 1, "status"), STATUSES, "status"),
50848
51192
  ...note ? { note } : {},
50849
51193
  ...at ? { at } : {}
@@ -50856,14 +51200,14 @@ var commands17 = [
50856
51200
  spec: {
50857
51201
  path: ["echo", "schedules", "rm"],
50858
51202
  summary: "Remove a scheduled post (the agent no longer runs it).",
50859
- args: [KEY_ARG],
51203
+ args: [KEY_ARG2],
50860
51204
  flags: [],
50861
51205
  scopes: [...echoScheduleOperations.remove.scopes],
50862
51206
  returns: "nothing",
50863
51207
  notes: "An unknown key is a 404."
50864
51208
  },
50865
51209
  run: async ({ args, requireClient }) => {
50866
- await requireClient().delete(keyPath(echoScheduleOperations.remove, args));
51210
+ await requireClient().delete(keyPath2(echoScheduleOperations.remove, args));
50867
51211
  return { data: { removed: requireArg(args, 0, "job key") }, render: renderRecord };
50868
51212
  }
50869
51213
  }
@@ -50872,7 +51216,7 @@ var commands17 = [
50872
51216
  // src/commands/files.ts
50873
51217
  import { readFileSync as readFileSync5, writeFileSync as writeFileSync2 } from "fs";
50874
51218
  import { basename as basename2 } from "path";
50875
- var commands18 = [
51219
+ var commands19 = [
50876
51220
  {
50877
51221
  spec: {
50878
51222
  path: ["files", "list"],
@@ -51042,7 +51386,7 @@ var commands18 = [
51042
51386
  ];
51043
51387
 
51044
51388
  // src/commands/food.ts
51045
- var commands19 = [
51389
+ var commands20 = [
51046
51390
  {
51047
51391
  spec: {
51048
51392
  path: ["foods", "search"],
@@ -51597,7 +51941,7 @@ var commands19 = [
51597
51941
  // src/commands/guest-lists.ts
51598
51942
  import { writeFileSync as writeFileSync3 } from "fs";
51599
51943
  import { basename as basename3 } from "path";
51600
- var commands20 = [
51944
+ var commands21 = [
51601
51945
  {
51602
51946
  spec: {
51603
51947
  path: ["guest-lists", "overview"],
@@ -51687,7 +52031,7 @@ var commands20 = [
51687
52031
  ];
51688
52032
 
51689
52033
  // src/commands/guests.ts
51690
- var commands21 = [
52034
+ var commands22 = [
51691
52035
  {
51692
52036
  spec: {
51693
52037
  path: ["guests", "sent"],
@@ -51772,7 +52116,7 @@ function renderItems(data, mode) {
51772
52116
  var habitArg = { name: "id", required: true, description: "The checklist habit's ULID." };
51773
52117
  var itemArg = { name: "item-id", required: true, description: "The item's ULID." };
51774
52118
  var NOT_CHECKLIST = "A habit that isn't a checklist answers 409.";
51775
- var commands22 = [
52119
+ var commands23 = [
51776
52120
  {
51777
52121
  spec: {
51778
52122
  path: ["habit", "items"],
@@ -52126,7 +52470,7 @@ function seasonFromFlags(flags) {
52126
52470
  const season = flagString(flags, "season");
52127
52471
  return season === undefined ? {} : { activeMonths: seasonFromFlag(season) };
52128
52472
  }
52129
- var commands23 = [
52473
+ var commands24 = [
52130
52474
  {
52131
52475
  spec: {
52132
52476
  path: ["habits", "create"],
@@ -53375,7 +53719,7 @@ function healthRecordHandlers() {
53375
53719
  }
53376
53720
  return out;
53377
53721
  }
53378
- var commands24 = pairCommands(HEALTH_COMMAND_SPECS, {
53722
+ var commands25 = pairCommands(HEALTH_COMMAND_SPECS, {
53379
53723
  ...healthRecordHandlers(),
53380
53724
  "health record": async ({ flags, requireClient }) => {
53381
53725
  const body = parseInput(logHealthInputSchema, readDataFlag(flags));
@@ -53690,7 +54034,7 @@ var commands24 = pairCommands(HEALTH_COMMAND_SPECS, {
53690
54034
  });
53691
54035
 
53692
54036
  // src/commands/house.ts
53693
- var commands25 = [
54037
+ var commands26 = [
53694
54038
  {
53695
54039
  spec: {
53696
54040
  path: ["house"],
@@ -53972,7 +54316,7 @@ function renderSorting(data, _mode) {
53972
54316
  ].join(`
53973
54317
  `);
53974
54318
  }
53975
- var commands26 = [
54319
+ var commands27 = [
53976
54320
  defineCommand({
53977
54321
  operation: inboxOperations.list,
53978
54322
  path: ["inbox"],
@@ -54064,7 +54408,7 @@ var commands26 = [
54064
54408
  ];
54065
54409
 
54066
54410
  // src/commands/incidents.ts
54067
- var commands27 = [
54411
+ var commands28 = [
54068
54412
  {
54069
54413
  spec: {
54070
54414
  path: ["incidents", "open"],
@@ -54293,7 +54637,7 @@ function journalDateArg(args, verb) {
54293
54637
  }
54294
54638
  return date;
54295
54639
  }
54296
- var commands28 = [
54640
+ var commands29 = [
54297
54641
  defineCommand({
54298
54642
  operation: journalOperations.day,
54299
54643
  path: ["journal", "day"],
@@ -54856,7 +55200,7 @@ function renderCreatedKey(data, mode) {
54856
55200
  ].join(`
54857
55201
  `);
54858
55202
  }
54859
- var commands29 = [
55203
+ var commands30 = [
54860
55204
  {
54861
55205
  spec: {
54862
55206
  path: ["keys", "list"],
@@ -54992,7 +55336,7 @@ var KIND_FLAG2 = {
54992
55336
  type: "string",
54993
55337
  description: "The kind of an unknown word (pages, eggs, health, note, or a word taught before); remembered for the Space."
54994
55338
  };
54995
- var commands30 = [
55339
+ var commands31 = [
54996
55340
  {
54997
55341
  spec: {
54998
55342
  path: ["log"],
@@ -55067,7 +55411,7 @@ var commands30 = [
55067
55411
  ];
55068
55412
 
55069
55413
  // src/commands/mail-campaigns.ts
55070
- var commands31 = [
55414
+ var commands32 = [
55071
55415
  {
55072
55416
  spec: {
55073
55417
  path: ["mail-campaigns", "list"],
@@ -55382,7 +55726,7 @@ async function serveMcp(io, target) {
55382
55726
  }
55383
55727
 
55384
55728
  // src/commands/mcp.ts
55385
- var commands32 = [
55729
+ var commands33 = [
55386
55730
  {
55387
55731
  spec: {
55388
55732
  path: ["mcp"],
@@ -55427,7 +55771,7 @@ var commands32 = [
55427
55771
  ];
55428
55772
 
55429
55773
  // src/commands/members.ts
55430
- var commands33 = [
55774
+ var commands34 = [
55431
55775
  {
55432
55776
  spec: {
55433
55777
  path: ["invite", "create"],
@@ -55552,7 +55896,7 @@ var commands33 = [
55552
55896
  ];
55553
55897
 
55554
55898
  // src/commands/metrics.ts
55555
- var commands34 = [
55899
+ var commands35 = [
55556
55900
  {
55557
55901
  spec: {
55558
55902
  path: ["metrics", "list"],
@@ -55680,7 +56024,7 @@ async function setModuleVisibility(args, requireClient, on) {
55680
56024
  render: renderRecord
55681
56025
  };
55682
56026
  }
55683
- var commands35 = [
56027
+ var commands36 = [
55684
56028
  {
55685
56029
  spec: {
55686
56030
  path: ["modules", "list"],
@@ -55909,7 +56253,7 @@ function shareFlag(flags) {
55909
56253
  function localMonth(now) {
55910
56254
  return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}`;
55911
56255
  }
55912
- var commands36 = [
56256
+ var commands37 = [
55913
56257
  defineCommand({
55914
56258
  operation: moneyOperations.listAccounts,
55915
56259
  path: ["money", "accounts"],
@@ -57078,7 +57422,7 @@ var commands36 = [
57078
57422
  ];
57079
57423
 
57080
57424
  // src/commands/notes.ts
57081
- var commands37 = [
57425
+ var commands38 = [
57082
57426
  {
57083
57427
  spec: {
57084
57428
  path: ["notes", "backlinks"],
@@ -57200,7 +57544,7 @@ var commands37 = [
57200
57544
  ];
57201
57545
 
57202
57546
  // src/commands/orca.ts
57203
- var commands38 = [
57547
+ var commands39 = [
57204
57548
  {
57205
57549
  spec: {
57206
57550
  path: ["orca", "list"],
@@ -57566,7 +57910,7 @@ function linkBody(args) {
57566
57910
  return parseInput(familyTreeLinkInputSchema, { kind, a: ref, b: other });
57567
57911
  throw usageError("the kind is parent, child or partner");
57568
57912
  }
57569
- var commands39 = [
57913
+ var commands40 = [
57570
57914
  {
57571
57915
  spec: {
57572
57916
  path: ["people", "propose"],
@@ -58255,7 +58599,7 @@ var commands39 = [
58255
58599
 
58256
58600
  // src/commands/places.ts
58257
58601
  import { readFileSync as readFileSync10 } from "fs";
58258
- var commands40 = [
58602
+ var commands41 = [
58259
58603
  {
58260
58604
  spec: {
58261
58605
  path: ["places", "import"],
@@ -58312,7 +58656,7 @@ async function planDecision({ args, requireClient }, verb) {
58312
58656
  render: renderPlan
58313
58657
  };
58314
58658
  }
58315
- var commands41 = [
58659
+ var commands42 = [
58316
58660
  {
58317
58661
  spec: {
58318
58662
  path: ["plans", "list"],
@@ -58539,7 +58883,7 @@ var commands41 = [
58539
58883
  ];
58540
58884
 
58541
58885
  // src/commands/presets.ts
58542
- var commands42 = [
58886
+ var commands43 = [
58543
58887
  {
58544
58888
  spec: {
58545
58889
  path: ["presets", "list"],
@@ -58636,7 +58980,7 @@ function renderReviewSummary(data, mode) {
58636
58980
  return out.join(`
58637
58981
  `);
58638
58982
  }
58639
- var commands43 = [
58983
+ var commands44 = [
58640
58984
  {
58641
58985
  spec: {
58642
58986
  path: ["progress"],
@@ -58845,7 +59189,7 @@ function renderUpdates(data, mode) {
58845
59189
  return updates.map((u) => updateLine(u, mode)).join(`
58846
59190
  `);
58847
59191
  }
58848
- var commands44 = [
59192
+ var commands45 = [
58849
59193
  defineCommand({
58850
59194
  operation: projectOperations.update,
58851
59195
  path: ["projects", "set"],
@@ -59442,7 +59786,7 @@ var routineCommands = [
59442
59786
  }
59443
59787
  }
59444
59788
  ];
59445
- var commands45 = [
59789
+ var commands46 = [
59446
59790
  ...routineCommands,
59447
59791
  {
59448
59792
  spec: {
@@ -59565,7 +59909,7 @@ var commands45 = [
59565
59909
  ];
59566
59910
 
59567
59911
  // src/commands/rsvp-answers.ts
59568
- var commands46 = [
59912
+ var commands47 = [
59569
59913
  {
59570
59914
  spec: {
59571
59915
  path: ["rsvp-answers", "list"],
@@ -59619,7 +59963,7 @@ var commands46 = [
59619
59963
  ];
59620
59964
 
59621
59965
  // src/commands/rsvp-links.ts
59622
- var commands47 = [
59966
+ var commands48 = [
59623
59967
  {
59624
59968
  spec: {
59625
59969
  path: ["rsvp-links", "list"],
@@ -59715,7 +60059,7 @@ var commands47 = [
59715
60059
  ];
59716
60060
 
59717
60061
  // src/commands/rsvp-questions.ts
59718
- var commands48 = [
60062
+ var commands49 = [
59719
60063
  {
59720
60064
  spec: {
59721
60065
  path: ["rsvp-questions", "presets"],
@@ -60287,7 +60631,7 @@ function sessionFlags(flags) {
60287
60631
  body.occurredOn = on;
60288
60632
  return body;
60289
60633
  }
60290
- var commands49 = [
60634
+ var commands50 = [
60291
60635
  {
60292
60636
  spec: {
60293
60637
  path: ["runs", "change"],
@@ -60604,7 +60948,7 @@ var commands49 = [
60604
60948
  ];
60605
60949
 
60606
60950
  // src/commands/search.ts
60607
- var commands50 = [
60951
+ var commands51 = [
60608
60952
  {
60609
60953
  spec: {
60610
60954
  path: ["search"],
@@ -60637,7 +60981,7 @@ var commands50 = [
60637
60981
  ];
60638
60982
 
60639
60983
  // src/commands/seating-proposals.ts
60640
- var commands51 = [
60984
+ var commands52 = [
60641
60985
  {
60642
60986
  spec: {
60643
60987
  path: ["seating-proposals", "list"],
@@ -60724,7 +61068,7 @@ var commands51 = [
60724
61068
  ];
60725
61069
 
60726
61070
  // src/commands/sensors.ts
60727
- var commands52 = [
61071
+ var commands53 = [
60728
61072
  {
60729
61073
  spec: {
60730
61074
  path: ["sensors", "status"],
@@ -60884,7 +61228,7 @@ var commands52 = [
60884
61228
  ];
60885
61229
 
60886
61230
  // src/commands/settings.ts
60887
- var commands53 = [
61231
+ var commands54 = [
60888
61232
  {
60889
61233
  spec: {
60890
61234
  path: ["settings", "get"],
@@ -60918,7 +61262,7 @@ var commands53 = [
60918
61262
  ];
60919
61263
 
60920
61264
  // src/commands/sharing.ts
60921
- var commands54 = [
61265
+ var commands55 = [
60922
61266
  {
60923
61267
  spec: {
60924
61268
  path: ["share"],
@@ -61051,7 +61395,7 @@ var commands54 = [
61051
61395
  ];
61052
61396
 
61053
61397
  // src/commands/space.ts
61054
- var commands55 = [
61398
+ var commands56 = [
61055
61399
  {
61056
61400
  spec: {
61057
61401
  path: ["space", "address"],
@@ -61107,7 +61451,7 @@ var commands55 = [
61107
61451
  ];
61108
61452
 
61109
61453
  // src/commands/tap-tags.ts
61110
- var commands56 = [
61454
+ var commands57 = [
61111
61455
  {
61112
61456
  spec: {
61113
61457
  path: ["tap-tags", "tap"],
@@ -61135,7 +61479,7 @@ var BY = {
61135
61479
  type: "string",
61136
61480
  description: "The blocking task's ref (DO-147) or ULID."
61137
61481
  };
61138
- var commands57 = [
61482
+ var commands58 = [
61139
61483
  defineCommand({
61140
61484
  operation: taskBlockOperations.addBlocker,
61141
61485
  path: ["tasks", "block"],
@@ -61201,7 +61545,7 @@ function renderSeries(data, mode) {
61201
61545
  }).join(`
61202
61546
  `);
61203
61547
  }
61204
- var commands58 = [
61548
+ var commands59 = [
61205
61549
  defineCommand({
61206
61550
  operation: taskSeriesOperations.make,
61207
61551
  path: ["tasks", "make-series"],
@@ -61356,7 +61700,7 @@ function repeatFromFlags(flags) {
61356
61700
  out.anchor = "from_completion";
61357
61701
  return out;
61358
61702
  }
61359
- var commands59 = [
61703
+ var commands60 = [
61360
61704
  {
61361
61705
  spec: {
61362
61706
  path: ["capture"],
@@ -61814,7 +62158,7 @@ var commands59 = [
61814
62158
  ];
61815
62159
 
61816
62160
  // src/commands/time-blocks.ts
61817
- var commands60 = [
62161
+ var commands61 = [
61818
62162
  {
61819
62163
  spec: {
61820
62164
  path: ["time-blocks", "record"],
@@ -62006,7 +62350,7 @@ function renderLandedCounts(data, mode) {
62006
62350
  return out.join(`
62007
62351
  `);
62008
62352
  }
62009
- var commands61 = [
62353
+ var commands62 = [
62010
62354
  {
62011
62355
  spec: {
62012
62356
  path: ["today"],
@@ -62378,7 +62722,7 @@ function renderViews(data, mode) {
62378
62722
  function renderView(data, mode) {
62379
62723
  return renderViews([data], mode);
62380
62724
  }
62381
- var commands62 = [
62725
+ var commands63 = [
62382
62726
  defineCommand({
62383
62727
  operation: workViewOperations.list,
62384
62728
  path: ["views", "list"],
@@ -62497,7 +62841,7 @@ var commands62 = [
62497
62841
  ];
62498
62842
 
62499
62843
  // src/commands/worktree-links.ts
62500
- var commands63 = [
62844
+ var commands64 = [
62501
62845
  {
62502
62846
  spec: {
62503
62847
  path: ["worktree-links", "list"],
@@ -62666,7 +63010,8 @@ var FEATURE_COMMANDS = [
62666
63010
  ...commands60,
62667
63011
  ...commands61,
62668
63012
  ...commands62,
62669
- ...commands63
63013
+ ...commands63,
63014
+ ...commands64
62670
63015
  ];
62671
63016
 
62672
63017
  // src/registry.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.420.0",
3
+ "version": "1.422.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",