@robbeverhelst/do 1.352.0 → 1.354.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 +44 -4
  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.352.0";
14423
+ var VERSION = "1.354.0";
14424
14424
  var API_PREFIX = "/api/v1";
14425
14425
  var DEFAULT_API_URL = "http://localhost:3001";
14426
14426
 
@@ -20519,7 +20519,11 @@ var animalViewSchema = animalSchema.extend({
20519
20519
  updatedAt: exports_coerce.date()
20520
20520
  });
20521
20521
  var nodeRefSchema = object({ id: ulidSchema, title: string2() });
20522
- var animalHabitSchema = nodeRefSchema.extend({ doneToday: boolean2() });
20522
+ var animalHabitSchema = nodeRefSchema.extend({
20523
+ doneToday: boolean2(),
20524
+ timeOfDay: string2().nullable().optional(),
20525
+ routine: string2().nullable().optional()
20526
+ });
20523
20527
  var animalSupplySchema = nodeRefSchema.extend({
20524
20528
  quantity: number2(),
20525
20529
  unit: string2().nullable(),
@@ -22773,11 +22777,13 @@ var routineRunStepSchema = createSelectSchema(routineRunSteps, {
22773
22777
  });
22774
22778
  var routineRunStepViewSchema = routineRunStepSchema.extend({
22775
22779
  habit: habitSummarySchema.nullable().default(null),
22780
+ childKind: routineKindSchema.nullable().default(null),
22776
22781
  task: object({
22777
22782
  id: string2(),
22778
22783
  title: string2(),
22779
22784
  status: string2(),
22780
- dueAt: exports_coerce.date().nullable()
22785
+ dueAt: exports_coerce.date().nullable(),
22786
+ ref: string2().nullable().default(null)
22781
22787
  }).nullable().default(null)
22782
22788
  });
22783
22789
  var routineRunViewSchema = routineRunSchema.extend({
@@ -35962,6 +35968,8 @@ var agentSessionSteps = pgTable("agent_session_steps", {
35962
35968
  detail: text("detail"),
35963
35969
  file: text("file"),
35964
35970
  change: text("change"),
35971
+ linesAdded: integer2("lines_added"),
35972
+ linesRemoved: integer2("lines_removed"),
35965
35973
  outcome: text("outcome"),
35966
35974
  url: text("url"),
35967
35975
  at: timestamp("at", { withTimezone: true }).notNull().defaultNow(),
@@ -35970,6 +35978,7 @@ var agentSessionSteps = pgTable("agent_session_steps", {
35970
35978
  index("agent_session_steps_worktree_idx").on(t.tenantId, t.host, t.worktreeId, t.at),
35971
35979
  check2("agent_session_steps_kind_check", sql`${t.kind} in ('start', 'read', 'edit', 'run', 'commit', 'push', 'pr', 'check', 'ask', 'answer', 'note', 'done')`),
35972
35980
  check2("agent_session_steps_change_check", sql`${t.change} is null or ${t.change} in ('added', 'edited', 'removed')`),
35981
+ check2("agent_session_steps_lines_check", sql`coalesce(${t.linesAdded}, 0) >= 0 and coalesce(${t.linesRemoved}, 0) >= 0`),
35973
35982
  check2("agent_session_steps_outcome_check", sql`${t.outcome} is null or ${t.outcome} in ('pass', 'fail')`)
35974
35983
  ]);
35975
35984
 
@@ -36005,6 +36014,8 @@ var createAgentSessionStepInputSchema = object({
36005
36014
  detail: string2().trim().min(1).max(600).nullish(),
36006
36015
  file: string2().trim().min(1).max(500).nullish(),
36007
36016
  change: agentSessionFileChangeSchema.nullish(),
36017
+ linesAdded: number2().int().nonnegative().max(1e6).nullish(),
36018
+ linesRemoved: number2().int().nonnegative().max(1e6).nullish(),
36008
36019
  outcome: agentSessionOutcomeSchema.nullish(),
36009
36020
  url: string2().trim().url().max(500).refine((u) => u.startsWith("https://"), "an https link").nullish(),
36010
36021
  at: exports_coerce.date().optional()
@@ -36012,6 +36023,13 @@ var createAgentSessionStepInputSchema = object({
36012
36023
  if ((v.file || v.change) && v.kind !== "edit") {
36013
36024
  ctx.addIssue({ code: "custom", path: ["file"], message: "file and change go on an edit" });
36014
36025
  }
36026
+ if ((v.linesAdded != null || v.linesRemoved != null) && !v.file) {
36027
+ ctx.addIssue({
36028
+ code: "custom",
36029
+ path: ["linesAdded"],
36030
+ message: "line counts need their file"
36031
+ });
36032
+ }
36015
36033
  if (v.change && !v.file) {
36016
36034
  ctx.addIssue({ code: "custom", path: ["change"], message: "a change needs its file" });
36017
36035
  }
@@ -37670,6 +37688,11 @@ var reviewStreakSchema = object({
37670
37688
  graceBudget: countSchema2.optional(),
37671
37689
  kept30: reviewTallySchema.optional(),
37672
37690
  period: reviewTallySchema.optional(),
37691
+ today: object({
37692
+ state: reviewMarkStateSchema,
37693
+ value: number2().nonnegative().nullable(),
37694
+ target: number2().positive().nullable()
37695
+ }).optional(),
37673
37696
  paused: boolean2().optional()
37674
37697
  });
37675
37698
  var reviewProjectSchema = object({
@@ -42327,6 +42350,11 @@ function reachabilityWord(m, { timeZone } = {}) {
42327
42350
  const how = route === "same-machine" ? ", it lives here" : route === "local" ? ", local network" : route === "tailnet" ? ", over the tailnet" : "";
42328
42351
  return { text: `Orca reachable${how}`, kind: "done" };
42329
42352
  }
42353
+ function sessionsWhen(m) {
42354
+ if (!m.orca.reachable)
42355
+ return "idle";
42356
+ return m.running > 0 ? "now" : "today";
42357
+ }
42330
42358
  function lastSeen(m, now, timeZone) {
42331
42359
  if (m.orca.reachable)
42332
42360
  return "Now";
@@ -42339,7 +42367,7 @@ function machineFacts(m, { now = new Date, timeZone } = {}) {
42339
42367
  const disk = m.disk && m.disk.totalGb > 0 ? `${Math.round(m.disk.usedGb / m.disk.totalGb * 100)}% used` : "Unknown";
42340
42368
  const fourth = m.updatesWaiting && m.updatesWaiting > 0 ? { label: "Updates", value: `${m.updatesWaiting} waiting` } : m.battery ? { label: "Battery", value: m.battery === "charging" ? "Charging" : "On battery" } : m.uptimeDays !== null ? { label: "Uptime", value: plural(m.uptimeDays, "day", "days") } : { label: "Uptime", value: "Unknown" };
42341
42369
  return [
42342
- { label: "Sessions", value: String(m.sessions) },
42370
+ { label: "Sessions", value: `${m.sessions} ${sessionsWhen(m)}` },
42343
42371
  { label: "Last seen", value: lastSeen(m, now, timeZone) },
42344
42372
  { label: "Disk", value: disk },
42345
42373
  fourth
@@ -54014,6 +54042,12 @@ var commands36 = [
54014
54042
  type: "string",
54015
54043
  description: "An edit's change: added, edited or removed."
54016
54044
  },
54045
+ { name: "added", type: "string", description: "Lines an edit added to its file, e.g. 42." },
54046
+ {
54047
+ name: "removed",
54048
+ type: "string",
54049
+ description: "Lines an edit removed from its file, e.g. 17."
54050
+ },
54017
54051
  { name: "outcome", type: "string", description: "A run's outcome: pass or fail." },
54018
54052
  { name: "url", type: "string", description: "A pr step's pull request link (https)." }
54019
54053
  ],
@@ -54031,6 +54065,8 @@ var commands36 = [
54031
54065
  detail: flagString(flags, "detail"),
54032
54066
  file: flagString(flags, "file"),
54033
54067
  change: flagString(flags, "change"),
54068
+ linesAdded: flagCount(flags, "added"),
54069
+ linesRemoved: flagCount(flags, "removed"),
54034
54070
  outcome: flagString(flags, "outcome"),
54035
54071
  url: flagString(flags, "url")
54036
54072
  });
@@ -54041,6 +54077,10 @@ var commands36 = [
54041
54077
  }
54042
54078
  }
54043
54079
  ];
54080
+ function flagCount(flags, name) {
54081
+ const raw = flagString(flags, name);
54082
+ return raw === undefined ? undefined : Number(raw);
54083
+ }
54044
54084
 
54045
54085
  // src/commands/people.ts
54046
54086
  import { readFileSync as readFileSync9 } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robbeverhelst/do",
3
- "version": "1.352.0",
3
+ "version": "1.354.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",