@skrr-ai/cli 0.1.92 → 0.1.93

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 (267) hide show
  1. package/dist/base-command.d.ts +44 -0
  2. package/dist/base-command.js +96 -0
  3. package/dist/commands/agents/badge.d.ts +41 -0
  4. package/dist/commands/agents/badge.js +158 -0
  5. package/dist/commands/agents/create.d.ts +24 -0
  6. package/dist/commands/agents/create.js +212 -0
  7. package/dist/commands/agents/embed.d.ts +20 -0
  8. package/dist/commands/agents/embed.js +61 -0
  9. package/dist/commands/agents/share.d.ts +27 -0
  10. package/dist/commands/agents/share.js +100 -0
  11. package/dist/commands/agents/vanity.d.ts +21 -0
  12. package/dist/commands/agents/vanity.js +77 -0
  13. package/dist/commands/agents/visibility.d.ts +21 -1
  14. package/dist/commands/agents/visibility.js +112 -0
  15. package/dist/commands/commands.d.ts +1 -0
  16. package/dist/commands/commands.js +22 -9
  17. package/dist/commands/earnings/attributions.d.ts +17 -0
  18. package/dist/commands/earnings/attributions.js +82 -0
  19. package/dist/commands/earnings/index.js +2 -1
  20. package/dist/commands/generate-recovery-code.js +4 -3
  21. package/dist/commands/github/allow-tools.d.ts +1 -0
  22. package/dist/commands/github/app/install.d.ts +1 -0
  23. package/dist/commands/github/app/status.d.ts +1 -0
  24. package/dist/commands/github/connect.d.ts +1 -0
  25. package/dist/commands/github/connections.d.ts +1 -0
  26. package/dist/commands/github/disconnect.d.ts +1 -0
  27. package/dist/commands/github/finalize.d.ts +1 -0
  28. package/dist/commands/github/reconnect.d.ts +1 -0
  29. package/dist/commands/github/run.d.ts +1 -0
  30. package/dist/commands/github/tools.d.ts +1 -0
  31. package/dist/commands/integrations/connections/connect.d.ts +1 -0
  32. package/dist/commands/integrations/connections/disconnect.d.ts +1 -0
  33. package/dist/commands/integrations/connections/finalize.d.ts +1 -0
  34. package/dist/commands/integrations/connections/list.d.ts +1 -0
  35. package/dist/commands/integrations/connections/reconnect.d.ts +1 -0
  36. package/dist/commands/integrations/execute.d.ts +1 -0
  37. package/dist/commands/integrations/search.d.ts +1 -0
  38. package/dist/commands/integrations/toolkits.d.ts +1 -0
  39. package/dist/commands/integrations/tools/allow.d.ts +1 -0
  40. package/dist/commands/integrations/tools/list.d.ts +1 -0
  41. package/dist/commands/login.js +12 -0
  42. package/dist/commands/machines/dedicated/logs.d.ts +19 -0
  43. package/dist/commands/machines/dedicated/logs.js +103 -0
  44. package/dist/commands/machines/dedicated/power/set.js +1 -1
  45. package/dist/commands/open.d.ts +24 -0
  46. package/dist/commands/open.js +74 -0
  47. package/dist/commands/projects/archive.d.ts +1 -0
  48. package/dist/commands/projects/archive.js +23 -0
  49. package/dist/commands/projects/delete.d.ts +1 -0
  50. package/dist/commands/projects/delete.js +23 -0
  51. package/dist/commands/projects/list.d.ts +3 -0
  52. package/dist/commands/projects/list.js +12 -2
  53. package/dist/commands/spaces/actions/add.js +4 -3
  54. package/dist/commands/spaces/actions/available.js +3 -2
  55. package/dist/commands/spaces/actions/list.js +5 -4
  56. package/dist/commands/spaces/actions/replace.js +6 -5
  57. package/dist/commands/spaces/archive.js +3 -2
  58. package/dist/commands/spaces/auto-executor/preview.js +4 -3
  59. package/dist/commands/spaces/auto-executor/run.js +4 -3
  60. package/dist/commands/spaces/auto-executor/runs.js +3 -2
  61. package/dist/commands/spaces/auto-executor/update.js +4 -3
  62. package/dist/commands/spaces/bootstrap.js +3 -2
  63. package/dist/commands/spaces/briefs/delete.js +3 -2
  64. package/dist/commands/spaces/briefs/get.js +3 -2
  65. package/dist/commands/spaces/briefs/list.js +3 -2
  66. package/dist/commands/spaces/briefs/set.js +5 -4
  67. package/dist/commands/spaces/capacity.js +5 -4
  68. package/dist/commands/spaces/conversations.js +3 -2
  69. package/dist/commands/spaces/cycles/create.js +3 -2
  70. package/dist/commands/spaces/cycles/graph.js +2 -1
  71. package/dist/commands/spaces/cycles/list.js +3 -2
  72. package/dist/commands/spaces/cycles/settings.js +4 -3
  73. package/dist/commands/spaces/cycles/show.js +3 -2
  74. package/dist/commands/spaces/cycles/update.js +3 -2
  75. package/dist/commands/spaces/delete.js +4 -3
  76. package/dist/commands/spaces/expertise-suggestions.js +4 -3
  77. package/dist/commands/spaces/files/delete.js +3 -2
  78. package/dist/commands/spaces/files/folders/create.js +3 -2
  79. package/dist/commands/spaces/files/folders/delete.js +3 -2
  80. package/dist/commands/spaces/files/folders/list.js +3 -2
  81. package/dist/commands/spaces/files/folders/update.js +3 -2
  82. package/dist/commands/spaces/files/list.js +3 -2
  83. package/dist/commands/spaces/files/move.js +3 -2
  84. package/dist/commands/spaces/files/rename.js +3 -2
  85. package/dist/commands/spaces/files/upload.js +6 -5
  86. package/dist/commands/spaces/github-automations/set.js +3 -2
  87. package/dist/commands/spaces/github-automations/show.js +3 -2
  88. package/dist/commands/spaces/goals.js +2 -1
  89. package/dist/commands/spaces/heartbeats/create.js +4 -3
  90. package/dist/commands/spaces/heartbeats/delete.js +4 -3
  91. package/dist/commands/spaces/heartbeats/list.js +4 -3
  92. package/dist/commands/spaces/heartbeats/status.js +3 -2
  93. package/dist/commands/spaces/heartbeats/update.js +4 -3
  94. package/dist/commands/spaces/insights.js +5 -4
  95. package/dist/commands/spaces/labels/add.js +4 -3
  96. package/dist/commands/spaces/labels/list.js +2 -1
  97. package/dist/commands/spaces/labels/remove.js +4 -3
  98. package/dist/commands/spaces/list.d.ts +3 -0
  99. package/dist/commands/spaces/list.js +11 -2
  100. package/dist/commands/spaces/live/cards/create.js +3 -2
  101. package/dist/commands/spaces/live/cards/list.js +3 -2
  102. package/dist/commands/spaces/live/cards/reorder.js +7 -2
  103. package/dist/commands/spaces/live/scene.js +4 -3
  104. package/dist/commands/spaces/members/add.js +7 -6
  105. package/dist/commands/spaces/members/list.js +4 -3
  106. package/dist/commands/spaces/members/remove.js +7 -6
  107. package/dist/commands/spaces/move.js +3 -2
  108. package/dist/commands/spaces/pin.js +5 -4
  109. package/dist/commands/spaces/preferences/show.js +4 -3
  110. package/dist/commands/spaces/preferences/tabs.js +4 -3
  111. package/dist/commands/spaces/revisions.js +3 -2
  112. package/dist/commands/spaces/room/ensure.js +5 -4
  113. package/dist/commands/spaces/room/messages.js +3 -2
  114. package/dist/commands/spaces/room/show.js +5 -4
  115. package/dist/commands/spaces/skills/add.js +4 -3
  116. package/dist/commands/spaces/skills/list.js +3 -2
  117. package/dist/commands/spaces/skills/pin.js +4 -3
  118. package/dist/commands/spaces/skills/remove.js +4 -3
  119. package/dist/commands/spaces/snapshot.js +3 -2
  120. package/dist/commands/spaces/states/archive.js +3 -2
  121. package/dist/commands/spaces/states/create.js +3 -2
  122. package/dist/commands/spaces/states/list.js +3 -2
  123. package/dist/commands/spaces/states/reorder.js +2 -1
  124. package/dist/commands/spaces/states/update.js +3 -2
  125. package/dist/commands/spaces/summary.js +4 -3
  126. package/dist/commands/spaces/tasks.d.ts +3 -0
  127. package/dist/commands/spaces/tasks.js +14 -3
  128. package/dist/commands/spaces/triggers/delete.js +5 -4
  129. package/dist/commands/spaces/triggers/set.js +4 -3
  130. package/dist/commands/spaces/triggers/show.js +4 -3
  131. package/dist/commands/spaces/unarchive.js +3 -2
  132. package/dist/commands/spaces/update.js +5 -4
  133. package/dist/commands/spaces/views/create.js +3 -2
  134. package/dist/commands/spaces/views/list.js +3 -2
  135. package/dist/commands/spaces/views/reorder.js +6 -3
  136. package/dist/commands/spaces/views/subscribe.js +2 -1
  137. package/dist/commands/spaces/views/subscriptions.js +1 -0
  138. package/dist/commands/spaces/views/unsubscribe.js +2 -1
  139. package/dist/commands/spaces/widgets/add.js +4 -3
  140. package/dist/commands/spaces/widgets/list.js +3 -2
  141. package/dist/commands/spaces/widgets/remove.js +5 -4
  142. package/dist/commands/spaces/work-graph.js +2 -1
  143. package/dist/commands/store/install.d.ts +1 -1
  144. package/dist/commands/store/install.js +24 -8
  145. package/dist/commands/store/show.d.ts +25 -0
  146. package/dist/commands/store/show.js +203 -0
  147. package/dist/commands/store/stats.d.ts +33 -0
  148. package/dist/commands/store/stats.js +258 -0
  149. package/dist/commands/tasks/actions/attach.js +1 -1
  150. package/dist/commands/tasks/actions/detach.js +4 -3
  151. package/dist/commands/tasks/activity.js +3 -2
  152. package/dist/commands/tasks/ancestors.js +2 -1
  153. package/dist/commands/tasks/approvals/create.js +2 -1
  154. package/dist/commands/tasks/approvals/delete.js +3 -2
  155. package/dist/commands/tasks/approvals/list.js +5 -4
  156. package/dist/commands/tasks/approvals/resolve.js +2 -1
  157. package/dist/commands/tasks/archive.js +3 -2
  158. package/dist/commands/tasks/assign.js +4 -3
  159. package/dist/commands/tasks/attachments/delete.js +3 -2
  160. package/dist/commands/tasks/attachments/download.d.ts +1 -0
  161. package/dist/commands/tasks/attachments/download.js +20 -1
  162. package/dist/commands/tasks/attachments/list.js +2 -1
  163. package/dist/commands/tasks/attachments/set-role.js +2 -1
  164. package/dist/commands/tasks/attachments/upload.js +2 -1
  165. package/dist/commands/tasks/bulk-update.d.ts +1 -0
  166. package/dist/commands/tasks/bulk-update.js +106 -15
  167. package/dist/commands/tasks/cancel-cascade.d.ts +1 -0
  168. package/dist/commands/tasks/cancel-cascade.js +13 -3
  169. package/dist/commands/tasks/cascade-status.js +2 -1
  170. package/dist/commands/tasks/checkout.js +3 -2
  171. package/dist/commands/tasks/children.js +2 -1
  172. package/dist/commands/tasks/comments/add.js +7 -6
  173. package/dist/commands/tasks/comments/anchor.js +8 -7
  174. package/dist/commands/tasks/comments/delete.js +3 -2
  175. package/dist/commands/tasks/comments/list.js +2 -1
  176. package/dist/commands/tasks/comments/reopen.js +3 -2
  177. package/dist/commands/tasks/comments/resolve.js +3 -2
  178. package/dist/commands/tasks/create-tree.d.ts +63 -0
  179. package/dist/commands/tasks/create-tree.js +197 -4
  180. package/dist/commands/tasks/delete.js +5 -4
  181. package/dist/commands/tasks/descendants.js +2 -1
  182. package/dist/commands/tasks/dri-plan.js +3 -2
  183. package/dist/commands/tasks/dri-run.js +3 -2
  184. package/dist/commands/tasks/dri-status.js +2 -1
  185. package/dist/commands/tasks/duplicate-pipeline.js +2 -1
  186. package/dist/commands/tasks/execution-summary.js +2 -1
  187. package/dist/commands/tasks/execution-timeline.js +2 -1
  188. package/dist/commands/tasks/fork.js +1 -0
  189. package/dist/commands/tasks/forward.js +4 -3
  190. package/dist/commands/tasks/handover.js +1 -0
  191. package/dist/commands/tasks/interrupt.js +3 -2
  192. package/dist/commands/tasks/labels/attach.js +4 -3
  193. package/dist/commands/tasks/labels/detach.js +4 -3
  194. package/dist/commands/tasks/labels/suggest.js +5 -4
  195. package/dist/commands/tasks/list.d.ts +27 -1
  196. package/dist/commands/tasks/list.js +101 -3
  197. package/dist/commands/tasks/move.js +4 -3
  198. package/dist/commands/tasks/output.js +6 -5
  199. package/dist/commands/tasks/pause-schedule.js +3 -2
  200. package/dist/commands/tasks/promote.js +1 -0
  201. package/dist/commands/tasks/prompt-log.js +2 -1
  202. package/dist/commands/tasks/release.js +5 -4
  203. package/dist/commands/tasks/remind.js +2 -1
  204. package/dist/commands/tasks/replay.js +3 -2
  205. package/dist/commands/tasks/report.js +1 -0
  206. package/dist/commands/tasks/resume-schedule.js +3 -2
  207. package/dist/commands/tasks/retry-schedule.js +3 -2
  208. package/dist/commands/tasks/retry.js +10 -9
  209. package/dist/commands/tasks/revisions.js +2 -1
  210. package/dist/commands/tasks/runs.js +6 -5
  211. package/dist/commands/tasks/schedule.js +3 -2
  212. package/dist/commands/tasks/self-schedule.js +6 -5
  213. package/dist/commands/tasks/skills/pin.js +3 -2
  214. package/dist/commands/tasks/skills/unpin.js +3 -2
  215. package/dist/commands/tasks/snooze.js +6 -5
  216. package/dist/commands/tasks/start-all.js +5 -4
  217. package/dist/commands/tasks/subscribe.js +1 -0
  218. package/dist/commands/tasks/tags/add.js +4 -3
  219. package/dist/commands/tasks/tags/remove.js +4 -3
  220. package/dist/commands/tasks/timeline.js +3 -2
  221. package/dist/commands/tasks/today.d.ts +4 -1
  222. package/dist/commands/tasks/today.js +12 -2
  223. package/dist/commands/tasks/transcript.js +6 -5
  224. package/dist/commands/tasks/unschedule.js +3 -2
  225. package/dist/commands/tasks/unsnooze.js +3 -2
  226. package/dist/commands/tasks/unsubscribe.js +2 -1
  227. package/dist/commands/tasks/update.js +5 -4
  228. package/dist/commands/tasks/wait.js +5 -4
  229. package/dist/lib/agent-distribution.d.ts +37 -0
  230. package/dist/lib/agent-distribution.js +63 -0
  231. package/dist/lib/agent-ref.d.ts +69 -0
  232. package/dist/lib/agent-ref.js +168 -0
  233. package/dist/lib/api-fetch.d.ts +2 -0
  234. package/dist/lib/api-fetch.js +14 -3
  235. package/dist/lib/command-hygiene.d.ts +13 -0
  236. package/dist/lib/command-hygiene.js +62 -2
  237. package/dist/lib/dedicated-power.d.ts +5 -0
  238. package/dist/lib/dedicated-power.js +30 -2
  239. package/dist/lib/dry-run-plans.d.ts +50 -0
  240. package/dist/lib/dry-run-plans.js +85 -0
  241. package/dist/lib/json-output.d.ts +31 -0
  242. package/dist/lib/json-output.js +78 -0
  243. package/dist/lib/list-output.d.ts +75 -0
  244. package/dist/lib/list-output.js +266 -0
  245. package/dist/lib/machine-daemon-log.d.ts +36 -0
  246. package/dist/lib/machine-daemon-log.js +78 -0
  247. package/dist/lib/node-adapter.js +10 -1
  248. package/dist/lib/open-target.d.ts +12 -0
  249. package/dist/lib/open-target.js +108 -0
  250. package/dist/lib/rate-limit-retry.d.ts +45 -0
  251. package/dist/lib/rate-limit-retry.js +88 -0
  252. package/dist/lib/store-listing.d.ts +45 -0
  253. package/dist/lib/store-listing.js +186 -0
  254. package/dist/lib/task-batch.d.ts +67 -0
  255. package/dist/lib/task-batch.js +227 -0
  256. package/dist/lib/terminal-qr.d.ts +55 -0
  257. package/dist/lib/terminal-qr.js +119 -0
  258. package/dist/lib/web-url.d.ts +11 -0
  259. package/dist/lib/web-url.js +24 -0
  260. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +68 -0
  261. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -1
  262. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +68 -0
  263. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +46 -0
  264. package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
  265. package/dist/node_modules/@skrr-ai/data-provider/index.js +6612 -6113
  266. package/oclif.manifest.json +46778 -38019
  267. package/package.json +2 -1
@@ -1,14 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.agentSessionOpenDefault = agentSessionOpenDefault;
3
4
  exports.emptyTasksMessage = emptyTasksMessage;
4
5
  exports.nextActionText = nextActionText;
5
6
  exports.taskRef = taskRef;
6
7
  exports.buildListParams = buildListParams;
8
+ exports.statusFilterWarnings = statusFilterWarnings;
7
9
  const core_1 = require("@oclif/core");
8
10
  const data_provider_1 = require("@skrr-ai/data-provider");
9
11
  const base_command_1 = require("../../base-command");
10
12
  const web_url_1 = require("../../lib/web-url");
11
13
  const format_1 = require("../../lib/format");
14
+ const list_output_1 = require("../../lib/list-output");
12
15
  const tasks_1 = require("../../lib/tasks");
13
16
  /**
14
17
  * Names of `tasks list` flags that narrow the result set. Used to distinguish
@@ -53,6 +56,33 @@ const FILTER_FLAGS = new Set([
53
56
  'q',
54
57
  'view',
55
58
  ]);
59
+ /**
60
+ * E12: inside an agent session an unfiltered `tasks list --json` returned the
61
+ * first page of EVERYTHING, which in practice was cancelled test tasks. When the
62
+ * caller is an agent (a session agent id in the environment) asking for machine
63
+ * output and has named no state filter of its own, default to open work and SAY
64
+ * so, as data (`filter_applied`) and not only in prose. `--all` is the opt-out;
65
+ * any filter the caller wrote leaves the default off, since they have decided.
66
+ * A person at a terminal is untouched.
67
+ */
68
+ function agentSessionOpenDefault(flags, env = process.env) {
69
+ const inAgentSession = Boolean(env.OVERSKY_SESSION_AGENT_ID?.trim() || env.OVERSKY_AGENT_ID?.trim());
70
+ if (!inAgentSession || flags.all || flags.calendar)
71
+ return undefined;
72
+ if (!flags.json && !flags.ndjson)
73
+ return undefined;
74
+ for (const name of FILTER_FLAGS) {
75
+ const value = flags[name];
76
+ if (Array.isArray(value) ? value.length > 0 : value !== undefined && value !== false) {
77
+ return undefined;
78
+ }
79
+ }
80
+ return {
81
+ open: true,
82
+ reason: 'agent_session_default',
83
+ hint: 'Closed tasks are hidden for agent sessions by default. Pass --all to include them, or --status / --status-type to choose.',
84
+ };
85
+ }
56
86
  /**
57
87
  * What the zero-row case is allowed to say. The bare `No tasks.` was step 3
58
88
  * of `GETTING_STARTED.md` and named no next step; a new user reading it hit
@@ -239,11 +269,36 @@ function buildListParams(flags, assigneeUserId) {
239
269
  ? { labelIds: flag('label-id') }
240
270
  : {}),
241
271
  q: flag('q'),
272
+ // `--compact` asks the server for its own card projection (no activityLog,
273
+ // narrative or ledgers) so the bytes are never sent, then the CLI trims the
274
+ // rest to the navigation set. Only the JSON path reads it.
275
+ ...(flag('compact') && !flag('fields') ? { view: 'summary' } : {}),
242
276
  ...(flag('view') ? { taskViewId: flag('view') } : {}),
243
277
  limit: flag('limit'),
244
278
  cursor: flag('cursor'),
245
279
  };
246
280
  }
281
+ /**
282
+ * P4: `--status bogus` exits 0 with an empty list, and text mode explains why
283
+ * while `--json` said nothing, so an agent could not tell "no matches" from
284
+ * "invalid filter". Same facts, as data.
285
+ */
286
+ function statusFilterWarnings(flags, rowCount) {
287
+ if (rowCount > 0 || flags['execution-state'])
288
+ return [];
289
+ const builtin = data_provider_1.TASK_STATUSES;
290
+ return statusList(flags).map((value) => builtin.includes(value)
291
+ ? {
292
+ code: 'STATUS_FILTER_EMPTY',
293
+ value,
294
+ hint: `Nothing matched --status ${value}. A status is a workflow-state id the Space owns, so a board need not use this one; try --status-type or drop --status to see what the scope holds.`,
295
+ }
296
+ : {
297
+ code: 'STATUS_NOT_BUILTIN',
298
+ value,
299
+ hint: `"${value}" is not a built-in status id (${data_provider_1.TASK_STATUSES.join(', ')}). It only matches a Space that defines a state with exactly this id; otherwise use --status-type (${[...data_provider_1.TASK_WORKFLOW_TYPE_BANDS.open].join(', ')} ...) or --open.`,
300
+ });
301
+ }
247
302
  class TasksList extends base_command_1.BaseCommand {
248
303
  static description = 'List tasks';
249
304
  static examples = [
@@ -267,6 +322,9 @@ class TasksList extends base_command_1.BaseCommand {
267
322
  '<%= config.bin %> tasks list --dri me',
268
323
  '<%= config.bin %> tasks list --view <task-view-id>',
269
324
  '<%= config.bin %> tasks list --calendar 2026-08-01..2026-08-31 --json',
325
+ '<%= config.bin %> tasks list --open --compact --json',
326
+ '<%= config.bin %> tasks list --space <space-id> --fields id,ref,title,status --json',
327
+ '<%= config.bin %> tasks list --open --ndjson | jq -r .ref',
270
328
  ];
271
329
  static flags = {
272
330
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -393,6 +451,13 @@ class TasksList extends base_command_1.BaseCommand {
393
451
  }),
394
452
  limit: core_1.Flags.integer({ description: 'Max results', default: 50 }),
395
453
  cursor: core_1.Flags.string({ description: 'Pagination cursor from a previous page' }),
454
+ all: core_1.Flags.boolean({
455
+ description: 'Include closed tasks even inside an agent session (where --json defaults to open work and reports filter_applied)',
456
+ }),
457
+ ...list_output_1.listOutputFlags,
458
+ strict: core_1.Flags.boolean({
459
+ description: 'Exit 2 when --status names a value that is not a built-in state id and matches nothing (instead of an empty success).',
460
+ }),
396
461
  calendar: core_1.Flags.string({
397
462
  description: 'Expand the human task calendar for an inclusive range (YYYY-MM-DD..YYYY-MM-DD or ISO instants). Includes due dates and agent schedule occurrences.',
398
463
  }),
@@ -443,6 +508,9 @@ class TasksList extends base_command_1.BaseCommand {
443
508
  }
444
509
  flags.dri = driId;
445
510
  flags['dri-kind'] = driKind;
511
+ const filterApplied = agentSessionOpenDefault(flags);
512
+ if (filterApplied)
513
+ flags.open = true;
446
514
  let response;
447
515
  try {
448
516
  response = calendarRange
@@ -459,12 +527,27 @@ class TasksList extends base_command_1.BaseCommand {
459
527
  catch (err) {
460
528
  this.handleApiError(err);
461
529
  }
462
- if (flags.json) {
530
+ const list = response;
531
+ const statusWarnings = calendarRange
532
+ ? []
533
+ : statusFilterWarnings(flags, Array.isArray(list?.data) ? list.data.length : 0);
534
+ if (flags.strict && statusWarnings.some((w) => w.code === 'STATUS_NOT_BUILTIN')) {
535
+ const bad = statusWarnings.find((w) => w.code === 'STATUS_NOT_BUILTIN');
536
+ this.failWithCliError({
537
+ message: bad.hint,
538
+ code: 'TASK_STATUS_FILTER_NO_MATCH',
539
+ exit: 2,
540
+ retryable: false,
541
+ details: {
542
+ suggestion: 'Use --status-type or --open, or a state id from `spaces states list`.',
543
+ },
544
+ });
545
+ }
546
+ if (flags.json || flags.ndjson) {
463
547
  // The table renders REF and NEXT, but the raw payload names them
464
548
  // `identifier` and `actionability` — under `--json` an agent scanning 43
465
549
  // keys could not find either (OSK-10692). Alias them to the names the
466
550
  // table prints so the machine view answers the same questions.
467
- const list = response;
468
551
  const enriched = list && Array.isArray(list.data)
469
552
  ? {
470
553
  ...list,
@@ -475,7 +558,19 @@ class TasksList extends base_command_1.BaseCommand {
475
558
  })),
476
559
  }
477
560
  : response;
478
- this.log(JSON.stringify((0, web_url_1.withDataUrls)(this.cliConfig.baseURL, enriched, web_url_1.taskUrlFrom), null, 2));
561
+ const withUrls = (0, web_url_1.withDataUrls)(this.cliConfig.baseURL, enriched, web_url_1.taskUrlFrom);
562
+ // The calendar response is occurrences, not tasks: leave its shape alone.
563
+ const out = calendarRange
564
+ ? withUrls
565
+ : (0, list_output_1.shapeListResponse)(withUrls, {
566
+ resource: 'task',
567
+ fields: flags.fields,
568
+ compact: flags.compact,
569
+ requestedLimit: flags.limit,
570
+ warnings: statusWarnings,
571
+ ...(filterApplied ? { filterApplied } : {}),
572
+ });
573
+ this.printList(out, Boolean(flags.ndjson));
479
574
  return;
480
575
  }
481
576
  if (calendarRange) {
@@ -543,6 +638,9 @@ class TasksList extends base_command_1.BaseCommand {
543
638
  this.log('');
544
639
  this.log(`Next page: --cursor ${r.next_cursor}`);
545
640
  }
641
+ const note = (0, list_output_1.limitNote)(flags.limit, items.length, Boolean(r?.has_more));
642
+ for (const line of (0, list_output_1.warningLines)(note.warning ? [note.warning] : []))
643
+ this.log(line);
546
644
  }
547
645
  }
548
646
  exports.default = TasksList;
@@ -76,6 +76,7 @@ class TasksMove extends base_command_1.BaseCommand {
76
76
  details: { suggestion: failure.suggestion, context: failure.details },
77
77
  });
78
78
  }
79
+ const taskRef = await this.resolveEntityRef('task', taskIdentity.id);
79
80
  const projectId = (0, projects_1.resolveTaskProjectFlag)(flags.project);
80
81
  if (!flags.status && projectId === undefined) {
81
82
  this.failWithCliError({
@@ -113,7 +114,7 @@ class TasksMove extends base_command_1.BaseCommand {
113
114
  }
114
115
  else {
115
116
  updated = await data_provider_1.dataService.moveTask({
116
- taskId: taskIdentity.id,
117
+ taskId: taskRef,
117
118
  status: flags.status,
118
119
  reason: flags.reason,
119
120
  resolutionActor: flags['resolution-actor'],
@@ -125,7 +126,7 @@ class TasksMove extends base_command_1.BaseCommand {
125
126
  // Project membership is an ordinary task field — PATCH /tasks/:id.
126
127
  // `--project none` sends `projectId: null`, which detaches.
127
128
  updated = await data_provider_1.dataService.updateTask({
128
- taskId: taskIdentity.id,
129
+ taskId: taskRef,
129
130
  data: { projectId },
130
131
  });
131
132
  }
@@ -154,7 +155,7 @@ class TasksMove extends base_command_1.BaseCommand {
154
155
  if (projectId !== undefined) {
155
156
  destinations.push(await this.describeProjectDestination(projectId, t));
156
157
  }
157
- this.log(`Moved task ${t.id ?? t._id ?? taskIdentity.id}${ref ? ` (${ref})` : ''} → ${destinations.join(', ')}`);
158
+ this.log(`Moved task ${t.id ?? t._id ?? taskRef}${ref ? ` (${ref})` : ''} → ${destinations.join(', ')}`);
158
159
  /*
159
160
  * Closing is the actor's call — the server does not refuse outstanding
160
161
  * work, it records it on `resolution.closure`. If the close just written
@@ -52,27 +52,28 @@ class TasksOutput extends base_command_1.BaseCommand {
52
52
  details: { suggestion: failure.suggestion },
53
53
  });
54
54
  }
55
+ const taskRef = await this.resolveEntityRef('task', identity.id);
55
56
  let task;
56
57
  try {
57
- task = (await data_provider_1.dataService.getTask(identity.id, { enrich: false }));
58
+ task = (await data_provider_1.dataService.getTask(taskRef, { enrich: false }));
58
59
  }
59
60
  catch (error) {
60
61
  this.handleApiError(error);
61
62
  }
62
63
  const conversationId = task.conversationId ? String(task.conversationId) : null;
63
64
  const [resultBundle, resources, updates, latestRun, messages] = await Promise.all([
64
- data_provider_1.dataService.listTaskResults(identity.id).catch(() => ({
65
+ data_provider_1.dataService.listTaskResults(taskRef).catch(() => ({
65
66
  currentResultId: null,
66
67
  currentSpecVersion: 1,
67
68
  results: [],
68
69
  reviews: [],
69
70
  })),
70
- data_provider_1.dataService.listTaskResources(identity.id).catch(() => ({ data: [] })),
71
- data_provider_1.dataService.listTaskUpdates(identity.id, { limit: 10 }).catch(() => ({
71
+ data_provider_1.dataService.listTaskResources(taskRef).catch(() => ({ data: [] })),
72
+ data_provider_1.dataService.listTaskUpdates(taskRef, { limit: 10 }).catch(() => ({
72
73
  data: [],
73
74
  nextCursor: null,
74
75
  })),
75
- (0, task_transcript_1.fetchLatestRun)(identity.id).catch(() => null),
76
+ (0, task_transcript_1.fetchLatestRun)(taskRef).catch(() => null),
76
77
  conversationId
77
78
  ? (0, task_transcript_1.fetchTranscript)(conversationId).catch(() => [])
78
79
  : Promise.resolve([]),
@@ -19,9 +19,10 @@ class TasksPauseSchedule extends base_command_1.BaseCommand {
19
19
  async run() {
20
20
  this.requireAuth();
21
21
  const { args, flags } = await this.parse(TasksPauseSchedule);
22
+ const taskRef = await this.resolveEntityRef('task', args.id);
22
23
  let result;
23
24
  try {
24
- result = await data_provider_1.dataService.pauseSchedule(args.id);
25
+ result = await data_provider_1.dataService.pauseSchedule(taskRef);
25
26
  }
26
27
  catch (err) {
27
28
  this.handleApiError(err);
@@ -32,7 +33,7 @@ class TasksPauseSchedule extends base_command_1.BaseCommand {
32
33
  }
33
34
  const t = result;
34
35
  const ref = t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '');
35
- this.log(`Paused schedule on task ${t.id ?? t._id ?? args.id}${ref ? ` (${ref})` : ''}`);
36
+ this.log(`Paused schedule on task ${t.id ?? t._id ?? taskRef}${ref ? ` (${ref})` : ''}`);
36
37
  }
37
38
  }
38
39
  exports.default = TasksPauseSchedule;
@@ -54,6 +54,7 @@ class TasksPromote extends base_command_1.BaseCommand {
54
54
  details: { suggestion: failure.suggestion, context: failure.details },
55
55
  });
56
56
  }
57
+ const taskRef = await this.resolveEntityRef('task', taskIdentity.id);
57
58
  const taskId = taskIdentity.id;
58
59
  // The route resolves the GROUP from the addressed run, then requires the
59
60
  // canonical run to be a member of it. Addressing by the canonical run
@@ -18,9 +18,10 @@ class TasksPromptLog extends base_command_1.BaseCommand {
18
18
  async run() {
19
19
  this.requireAuth();
20
20
  const { args, flags } = await this.parse(TasksPromptLog);
21
+ const taskRef = await this.resolveEntityRef('task', args.id);
21
22
  let result;
22
23
  try {
23
- result = await data_provider_1.dataService.getTaskPromptLog(args.id);
24
+ result = await data_provider_1.dataService.getTaskPromptLog(taskRef);
24
25
  }
25
26
  catch (err) {
26
27
  this.handleApiError(err);
@@ -18,9 +18,10 @@ class TasksRelease extends base_command_1.BaseCommand {
18
18
  async run() {
19
19
  this.requireAuth();
20
20
  const { args, flags } = await this.parse(TasksRelease);
21
+ const taskRef = await this.resolveEntityRef('task', args.id);
21
22
  let result;
22
23
  try {
23
- result = await data_provider_1.dataService.releaseTask(args.id);
24
+ result = await data_provider_1.dataService.releaseTask(taskRef);
24
25
  }
25
26
  catch (err) {
26
27
  this.handleApiError(err);
@@ -29,7 +30,7 @@ class TasksRelease extends base_command_1.BaseCommand {
29
30
  this.log(JSON.stringify(result, null, 2));
30
31
  return;
31
32
  }
32
- this.log(`Released task ${args.id}`);
33
+ this.log(`Released task ${taskRef}`);
33
34
  // OSK-3816 — releasing frees the CHECKOUT; it does not change the STATUS.
34
35
  // A task left at `in_progress` is still unstartable ("This Task is marked in
35
36
  // progress and cannot start another Agent execution"), so an operator who
@@ -39,8 +40,8 @@ class TasksRelease extends base_command_1.BaseCommand {
39
40
  const status = result?.status;
40
41
  if (status === 'in_progress') {
41
42
  this.log(`Still marked in_progress — the checkout is free but the status blocks a new run.\n` +
42
- ` Return it to the working set with: skrr tasks move ${args.id} --status todo\n` +
43
- ` Or do both at once with: skrr tasks retry ${args.id}`);
43
+ ` Return it to the working set with: skrr tasks move ${taskRef} --status todo\n` +
44
+ ` Or do both at once with: skrr tasks retry ${taskRef}`);
44
45
  }
45
46
  }
46
47
  }
@@ -24,6 +24,7 @@ class TasksRemind extends base_command_1.BaseCommand {
24
24
  async run() {
25
25
  this.requireAuth();
26
26
  const { args, flags } = await this.parse(TasksRemind);
27
+ const taskRef = await this.resolveEntityRef('task', args.taskId);
27
28
  const at = new Date(flags.at);
28
29
  if (Number.isNaN(at.getTime()) || !/^\d{4}-\d{2}-\d{2}T/.test(flags.at)) {
29
30
  this.error('--at must be an ISO-8601 instant, for example 2026-08-25T16:00:00Z.', {
@@ -33,7 +34,7 @@ class TasksRemind extends base_command_1.BaseCommand {
33
34
  let task;
34
35
  let reminder;
35
36
  try {
36
- task = (await data_provider_1.dataService.getTask(args.taskId, { enrich: false }));
37
+ task = (await data_provider_1.dataService.getTask(taskRef, { enrich: false }));
37
38
  reminder = await data_provider_1.request.post('/api/triggers', {
38
39
  scope: {
39
40
  kind: 'entity_reminder',
@@ -20,9 +20,10 @@ class TasksReplay extends base_command_1.BaseCommand {
20
20
  async run() {
21
21
  this.requireAuth();
22
22
  const { args, flags } = await this.parse(TasksReplay);
23
+ const taskRef = await this.resolveEntityRef('task', args.id);
23
24
  let result;
24
25
  try {
25
- result = await data_provider_1.dataService.getTaskReplay(args.id, flags.run);
26
+ result = await data_provider_1.dataService.getTaskReplay(taskRef, flags.run);
26
27
  }
27
28
  catch (err) {
28
29
  const e = err;
@@ -30,7 +31,7 @@ class TasksReplay extends base_command_1.BaseCommand {
30
31
  // Distinguish "task has no runs yet" from "task ID doesn't exist" —
31
32
  // the server's generic 404 doesn't, but this surface lets a user
32
33
  // running `skrr tasks replay <fresh-task>` know what to do next.
33
- this.error(`No execution runs found for task ${args.id}. Start the task first with \`${this.config.bin} tasks start ${args.id}\`.`, { exit: 4 });
34
+ this.error(`No execution runs found for task ${taskRef}. Start the task first with \`${this.config.bin} tasks start ${taskRef}\`.`, { exit: 4 });
34
35
  }
35
36
  this.handleApiError(err);
36
37
  }
@@ -75,6 +75,7 @@ class TasksReport extends base_command_1.BaseCommand {
75
75
  details: { suggestion: failure.suggestion, context: failure.details },
76
76
  });
77
77
  }
78
+ const taskRef = await this.resolveEntityRef('task', task.id);
78
79
  let report;
79
80
  try {
80
81
  report = (0, task_report_1.buildTaskReport)({
@@ -19,9 +19,10 @@ class TasksResumeSchedule extends base_command_1.BaseCommand {
19
19
  async run() {
20
20
  this.requireAuth();
21
21
  const { args, flags } = await this.parse(TasksResumeSchedule);
22
+ const taskRef = await this.resolveEntityRef('task', args.id);
22
23
  let result;
23
24
  try {
24
- result = await data_provider_1.dataService.resumeSchedule(args.id);
25
+ result = await data_provider_1.dataService.resumeSchedule(taskRef);
25
26
  }
26
27
  catch (err) {
27
28
  this.handleApiError(err);
@@ -32,7 +33,7 @@ class TasksResumeSchedule extends base_command_1.BaseCommand {
32
33
  }
33
34
  const t = result;
34
35
  const ref = t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '');
35
- this.log(`Resumed schedule on task ${t.id ?? t._id ?? args.id}${ref ? ` (${ref})` : ''}`);
36
+ this.log(`Resumed schedule on task ${t.id ?? t._id ?? taskRef}${ref ? ` (${ref})` : ''}`);
36
37
  }
37
38
  }
38
39
  exports.default = TasksResumeSchedule;
@@ -22,10 +22,11 @@ class TasksRetrySchedule extends base_command_1.BaseCommand {
22
22
  async run() {
23
23
  this.requireAuth();
24
24
  const { args, flags } = await this.parse(TasksRetrySchedule);
25
+ const taskRef = await this.resolveEntityRef('task', args.id);
25
26
  let result;
26
27
  try {
27
28
  result = await data_provider_1.dataService.retryScheduledTask({
28
- taskId: args.id,
29
+ taskId: taskRef,
29
30
  scheduledFor: flags.at,
30
31
  });
31
32
  }
@@ -39,7 +40,7 @@ class TasksRetrySchedule extends base_command_1.BaseCommand {
39
40
  const t = result;
40
41
  const ref = t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '');
41
42
  const when = flags.at ?? t.scheduledFor ?? '(server default)';
42
- this.log(`Re-armed schedule for task ${t.id ?? t._id ?? args.id}${ref ? ` (${ref})` : ''} → ${when}`);
43
+ this.log(`Re-armed schedule for task ${t.id ?? t._id ?? taskRef}${ref ? ` (${ref})` : ''} → ${when}`);
43
44
  }
44
45
  }
45
46
  exports.default = TasksRetrySchedule;
@@ -68,41 +68,42 @@ class TasksRetry extends base_command_1.BaseCommand {
68
68
  details: { suggestion: failure.suggestion, context: failure.details },
69
69
  });
70
70
  }
71
+ const taskRef = await this.resolveEntityRef('task', taskIdentity.id);
71
72
  // Step 1 — clear the terminal state. `todo` rather than `backlog`: the task
72
73
  // was already triaged into the working set once, and a retry is not a
73
74
  // decision to deprioritise it.
74
75
  try {
75
76
  await data_provider_1.dataService.moveTask({
76
- taskId: taskIdentity.id,
77
+ taskId: taskRef,
77
78
  status: 'todo',
78
79
  });
79
80
  }
80
81
  catch (err) {
81
- this.handleApiError(err, { subject: `Task ${taskIdentity.id}` });
82
+ this.handleApiError(err, { subject: `Task ${taskRef}` });
82
83
  }
83
84
  if (flags['no-start']) {
84
85
  if (flags.json) {
85
- this.log(JSON.stringify({ taskId: taskIdentity.id, status: 'todo', started: false }));
86
+ this.log(JSON.stringify({ taskId: taskRef, status: 'todo', started: false }));
86
87
  return;
87
88
  }
88
- this.log(`Cleared failed state on ${taskIdentity.id} — now todo, not started.`);
89
- this.log(`Start it with: skrr tasks start ${taskIdentity.id}`);
89
+ this.log(`Cleared failed state on ${taskRef} — now todo, not started.`);
90
+ this.log(`Start it with: skrr tasks start ${taskRef}`);
90
91
  return;
91
92
  }
92
93
  let result;
93
94
  try {
94
- result = await data_provider_1.dataService.startTask(taskIdentity.id, flags.skill ? { skillId: flags.skill } : undefined);
95
+ result = await data_provider_1.dataService.startTask(taskRef, flags.skill ? { skillId: flags.skill } : undefined);
95
96
  }
96
97
  catch (err) {
97
98
  this.handleApiError(err, {
98
- subject: `Task ${taskIdentity.id} (failed state was cleared — it is now 'todo')`,
99
+ subject: `Task ${taskRef} (failed state was cleared — it is now 'todo')`,
99
100
  });
100
101
  }
101
102
  if (flags.json) {
102
- this.log(JSON.stringify({ ...result, taskId: taskIdentity.id, status: 'todo', started: true }, null, 2));
103
+ this.log(JSON.stringify({ ...result, taskId: taskRef, status: 'todo', started: true }, null, 2));
103
104
  return;
104
105
  }
105
- this.log(`Retried task ${taskIdentity.id}`);
106
+ this.log(`Retried task ${taskRef}`);
106
107
  this.log(`Conversation: ${result.conversationId}`);
107
108
  this.log(`Session: ${result.sessionId}`);
108
109
  }
@@ -19,9 +19,10 @@ class TasksRevisions extends base_command_1.BaseCommand {
19
19
  async run() {
20
20
  this.requireAuth();
21
21
  const { args, flags } = await this.parse(TasksRevisions);
22
+ const taskRef = await this.resolveEntityRef('task', args.id);
22
23
  let result;
23
24
  try {
24
- result = await data_provider_1.dataService.getTaskRevisions(args.id);
25
+ result = await data_provider_1.dataService.getTaskRevisions(taskRef);
25
26
  }
26
27
  catch (err) {
27
28
  this.handleApiError(err);
@@ -157,9 +157,10 @@ class TasksRuns extends base_command_1.BaseCommand {
157
157
  async run() {
158
158
  this.requireAuth();
159
159
  const { args, flags } = await this.parse(TasksRuns);
160
+ const taskRef = await this.resolveEntityRef('task', args.id);
160
161
  let response;
161
162
  try {
162
- response = await data_provider_1.dataService.getTaskRuns(args.id);
163
+ response = await data_provider_1.dataService.getTaskRuns(taskRef);
163
164
  }
164
165
  catch (err) {
165
166
  this.handleApiError(err);
@@ -178,8 +179,8 @@ class TasksRuns extends base_command_1.BaseCommand {
178
179
  // scripted caller still learns where the message actually lives.
179
180
  if (unexplained) {
180
181
  this.warn('A failed run here carries `errors` but no `failureReason` — this server predates that ' +
181
- `field. Read it from \`${this.config.bin} tasks show ${args.id} --json\` (executionError) or ` +
182
- `\`${this.config.bin} tasks activity ${args.id} --json\` (details.error, keyed by runId).`);
182
+ `field. Read it from \`${this.config.bin} tasks show ${taskRef} --json\` (executionError) or ` +
183
+ `\`${this.config.bin} tasks activity ${taskRef} --json\` (details.error, keyed by runId).`);
183
184
  }
184
185
  this.log(JSON.stringify(response, null, 2));
185
186
  return;
@@ -217,7 +218,7 @@ class TasksRuns extends base_command_1.BaseCommand {
217
218
  return;
218
219
  let failures = new Map();
219
220
  try {
220
- const activity = (await data_provider_1.dataService.getTaskActivity(args.id, 200));
221
+ const activity = (await data_provider_1.dataService.getTaskActivity(taskRef, 200));
221
222
  failures = (0, activity_1.runFailuresFromActivity)(activity?.data);
222
223
  }
223
224
  catch {
@@ -226,7 +227,7 @@ class TasksRuns extends base_command_1.BaseCommand {
226
227
  // block below then says "no reason recorded", which is true of what we
227
228
  // can see.
228
229
  }
229
- for (const line of renderRunFailures(items, failures, this.config.bin, args.id)) {
230
+ for (const line of renderRunFailures(items, failures, this.config.bin, taskRef)) {
230
231
  this.log(line);
231
232
  }
232
233
  }
@@ -42,6 +42,7 @@ class TasksSchedule extends base_command_1.BaseCommand {
42
42
  async run() {
43
43
  this.requireAuth();
44
44
  const { args, flags } = await this.parse(TasksSchedule);
45
+ const taskRef = await this.resolveEntityRef('task', args.id);
45
46
  let body = {};
46
47
  try {
47
48
  body = await (0, prompt_1.readJsonBody)(flags['from-json']);
@@ -67,7 +68,7 @@ class TasksSchedule extends base_command_1.BaseCommand {
67
68
  let result;
68
69
  try {
69
70
  result = await data_provider_1.dataService.scheduleTask({
70
- taskId: args.id,
71
+ taskId: taskRef,
71
72
  data: payload,
72
73
  });
73
74
  }
@@ -80,7 +81,7 @@ class TasksSchedule extends base_command_1.BaseCommand {
80
81
  }
81
82
  const t = result;
82
83
  const ref = t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '');
83
- this.log(`Scheduled task ${t.id ?? t._id ?? args.id}${ref ? ` (${ref})` : ''} for ${payload.scheduledFor}`);
84
+ this.log(`Scheduled task ${t.id ?? t._id ?? taskRef}${ref ? ` (${ref})` : ''} for ${payload.scheduledFor}`);
84
85
  if (t.recurrence?.pattern) {
85
86
  const tz = t.recurrence.timezone ? ` (${t.recurrence.timezone})` : '';
86
87
  this.log(`Recurrence: ${t.recurrence.pattern}${tz}`);
@@ -48,16 +48,17 @@ class TasksSelfSchedule extends base_command_1.BaseCommand {
48
48
  async run() {
49
49
  this.requireAuth();
50
50
  const { args, flags } = await this.parse(TasksSelfSchedule);
51
+ const taskRef = await this.resolveEntityRef('task', args.id);
51
52
  if (flags.show && flags.clear) {
52
53
  this.error('Pass at most one of --show or --clear.', { exit: 1 });
53
54
  }
54
55
  let result;
55
56
  try {
56
57
  if (flags.show) {
57
- result = await task_extras_1.taskSelfScheduleApi.get(args.id);
58
+ result = await task_extras_1.taskSelfScheduleApi.get(taskRef);
58
59
  }
59
60
  else if (flags.clear) {
60
- result = await task_extras_1.taskSelfScheduleApi.clear(args.id);
61
+ result = await task_extras_1.taskSelfScheduleApi.clear(taskRef);
61
62
  }
62
63
  else {
63
64
  const runAt = resolveRunAt(flags.at, flags.in);
@@ -66,7 +67,7 @@ class TasksSelfSchedule extends base_command_1.BaseCommand {
66
67
  exit: 1,
67
68
  });
68
69
  }
69
- result = await task_extras_1.taskSelfScheduleApi.park(args.id, {
70
+ result = await task_extras_1.taskSelfScheduleApi.park(taskRef, {
70
71
  runAt,
71
72
  ...(flags.note ? { note: flags.note } : {}),
72
73
  ...(flags['max-per-day'] ? { maxFiresPerDay: flags['max-per-day'] } : {}),
@@ -82,14 +83,14 @@ class TasksSelfSchedule extends base_command_1.BaseCommand {
82
83
  }
83
84
  const runAt = result?.runAt;
84
85
  if (!runAt) {
85
- this.log(`Task ${args.id} has no pending return.`);
86
+ this.log(`Task ${taskRef} has no pending return.`);
86
87
  return;
87
88
  }
88
89
  // `pending` is derived server-side: a return that has already fired keeps
89
90
  // its instant on the row, and printing that verbatim would report a return
90
91
  // as upcoming an hour after it happened.
91
92
  const spent = result?.pending === false;
92
- this.log(`Task ${args.id} ${spent ? 'last returned at' : 'returns at'} ${runAt}`);
93
+ this.log(`Task ${taskRef} ${spent ? 'last returned at' : 'returns at'} ${runAt}`);
93
94
  if (result?.note)
94
95
  this.log(`Note: ${result.note}`);
95
96
  if (!spent && result?.maxFiresPerDay) {
@@ -50,17 +50,18 @@ class TasksSkillsPin extends base_command_1.BaseCommand {
50
50
  return this.runBulk(flags['all-in-space'], positionals, flags.status, flags.json);
51
51
  }
52
52
  // First positional is the task id; the rest are skill ids.
53
- const taskId = positionals[0];
53
+ const rawTaskId = positionals[0];
54
54
  const incoming = positionals
55
55
  .slice(1)
56
56
  .map((s) => s.trim())
57
57
  .filter(Boolean);
58
- if (!taskId) {
58
+ if (!rawTaskId) {
59
59
  this.error('Task ID is required.', { exit: 1 });
60
60
  }
61
61
  if (incoming.length === 0) {
62
62
  this.error('At least one skill ID positional is required.', { exit: 1 });
63
63
  }
64
+ const taskId = await this.resolveEntityRef('task', rawTaskId);
64
65
  let current;
65
66
  try {
66
67
  current = await data_provider_1.dataService.getTask(taskId, { enrich: false });
@@ -74,17 +74,18 @@ class TasksSkillsUnpin extends base_command_1.BaseCommand {
74
74
  this.exit(1);
75
75
  return;
76
76
  }
77
- const taskId = positionals[0];
77
+ const rawTaskId = positionals[0];
78
78
  const targets = new Set(positionals
79
79
  .slice(1)
80
80
  .map((s) => s.trim())
81
81
  .filter(Boolean));
82
- if (!taskId) {
82
+ if (!rawTaskId) {
83
83
  this.error('Task ID is required.', { exit: 1 });
84
84
  }
85
85
  if (targets.size === 0) {
86
86
  this.error('At least one skill ID positional is required.', { exit: 1 });
87
87
  }
88
+ const taskId = await this.resolveEntityRef('task', rawTaskId);
88
89
  let current;
89
90
  try {
90
91
  current = await data_provider_1.dataService.getTask(taskId, { enrich: false });