@skrr-ai/cli 0.1.110 → 0.1.111

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 (391) hide show
  1. package/bin/run.js +15 -1
  2. package/dist/base-command.d.ts +31 -3
  3. package/dist/base-command.js +136 -22
  4. package/dist/commands/actions/list.js +2 -1
  5. package/dist/commands/agenda/trigger/create.js +1 -1
  6. package/dist/commands/agenda/trigger/list.js +2 -1
  7. package/dist/commands/agent-groups/list.js +2 -1
  8. package/dist/commands/agents/actions/list.js +2 -1
  9. package/dist/commands/agents/always-on/status.js +5 -0
  10. package/dist/commands/agents/chat.js +4 -1
  11. package/dist/commands/agents/duplicate.js +4 -0
  12. package/dist/commands/agents/eval/list.js +2 -1
  13. package/dist/commands/agents/files/list.js +2 -1
  14. package/dist/commands/agents/folders/list.js +2 -1
  15. package/dist/commands/agents/goals/list.js +2 -1
  16. package/dist/commands/agents/intuitions/list.js +8 -5
  17. package/dist/commands/agents/list.d.ts +12 -0
  18. package/dist/commands/agents/list.js +45 -8
  19. package/dist/commands/agents/releases/known-issues/list.js +2 -1
  20. package/dist/commands/agents/releases/list.js +5 -1
  21. package/dist/commands/agents/releases/trusted-publishers/list.js +2 -1
  22. package/dist/commands/agents/roles/list.js +2 -1
  23. package/dist/commands/agents/skills/list.js +2 -1
  24. package/dist/commands/agents/todos/list.js +2 -1
  25. package/dist/commands/agents/triggers/list.js +2 -1
  26. package/dist/commands/api-keys/list.js +2 -1
  27. package/dist/commands/apps/channel.d.ts +20 -0
  28. package/dist/commands/apps/channel.js +64 -0
  29. package/dist/commands/apps/check-draft.d.ts +12 -0
  30. package/dist/commands/apps/check-draft.js +41 -0
  31. package/dist/commands/apps/check.d.ts +42 -0
  32. package/dist/commands/apps/check.js +91 -0
  33. package/dist/commands/apps/create.d.ts +15 -0
  34. package/dist/commands/apps/create.js +59 -0
  35. package/dist/commands/apps/data/put.d.ts +18 -0
  36. package/dist/commands/apps/data/put.js +72 -0
  37. package/dist/commands/apps/data/query.d.ts +20 -0
  38. package/dist/commands/apps/data/query.js +88 -0
  39. package/dist/commands/apps/disclosure.d.ts +16 -0
  40. package/dist/commands/apps/disclosure.js +71 -0
  41. package/dist/commands/apps/file/cat.d.ts +15 -0
  42. package/dist/commands/apps/file/cat.js +50 -0
  43. package/dist/commands/apps/file/ls.d.ts +13 -0
  44. package/dist/commands/apps/file/ls.js +47 -0
  45. package/dist/commands/apps/file/mv.d.ts +15 -0
  46. package/dist/commands/apps/file/mv.js +49 -0
  47. package/dist/commands/apps/file/rm.d.ts +15 -0
  48. package/dist/commands/apps/file/rm.js +53 -0
  49. package/dist/commands/apps/file/write.d.ts +17 -0
  50. package/dist/commands/apps/file/write.js +81 -0
  51. package/dist/commands/apps/install.d.ts +19 -0
  52. package/dist/commands/apps/install.js +136 -0
  53. package/dist/commands/apps/installations/list.d.ts +11 -0
  54. package/dist/commands/apps/installations/list.js +49 -0
  55. package/dist/commands/apps/installations/show.d.ts +12 -0
  56. package/dist/commands/apps/installations/show.js +61 -0
  57. package/dist/commands/apps/layout/set.d.ts +11 -0
  58. package/dist/commands/apps/layout/set.js +125 -0
  59. package/dist/commands/apps/layout/show.d.ts +9 -0
  60. package/dist/commands/apps/layout/show.js +33 -0
  61. package/dist/commands/apps/list.d.ts +10 -0
  62. package/dist/commands/apps/list.js +45 -0
  63. package/dist/commands/apps/logs.d.ts +13 -0
  64. package/dist/commands/apps/logs.js +55 -0
  65. package/dist/commands/apps/preview.d.ts +12 -0
  66. package/dist/commands/apps/preview.js +39 -0
  67. package/dist/commands/apps/publish/propose.d.ts +14 -0
  68. package/dist/commands/apps/publish/propose.js +45 -0
  69. package/dist/commands/apps/pull.d.ts +14 -0
  70. package/dist/commands/apps/pull.js +56 -0
  71. package/dist/commands/apps/push.d.ts +15 -0
  72. package/dist/commands/apps/push.js +75 -0
  73. package/dist/commands/apps/reconsent.d.ts +13 -0
  74. package/dist/commands/apps/reconsent.js +67 -0
  75. package/dist/commands/apps/report.d.ts +20 -0
  76. package/dist/commands/apps/report.js +63 -0
  77. package/dist/commands/apps/resume.d.ts +12 -0
  78. package/dist/commands/apps/resume.js +36 -0
  79. package/dist/commands/apps/settings/set.d.ts +13 -0
  80. package/dist/commands/apps/settings/set.js +54 -0
  81. package/dist/commands/apps/settings/show.d.ts +11 -0
  82. package/dist/commands/apps/settings/show.js +31 -0
  83. package/dist/commands/apps/show.d.ts +12 -0
  84. package/dist/commands/apps/show.js +49 -0
  85. package/dist/commands/apps/suspend.d.ts +12 -0
  86. package/dist/commands/apps/suspend.js +35 -0
  87. package/dist/commands/apps/uninstall.d.ts +13 -0
  88. package/dist/commands/apps/uninstall.js +43 -0
  89. package/dist/commands/apps/upgrade.d.ts +14 -0
  90. package/dist/commands/apps/upgrade.js +49 -0
  91. package/dist/commands/apps/version/create.d.ts +14 -0
  92. package/dist/commands/apps/version/create.js +53 -0
  93. package/dist/commands/apps/version/show.d.ts +12 -0
  94. package/dist/commands/apps/version/show.js +39 -0
  95. package/dist/commands/apps/versions.d.ts +12 -0
  96. package/dist/commands/apps/versions.js +40 -0
  97. package/dist/commands/apps/webhooks/list.d.ts +12 -0
  98. package/dist/commands/apps/webhooks/list.js +47 -0
  99. package/dist/commands/characters/list.js +2 -1
  100. package/dist/commands/chats/files/list.js +2 -1
  101. package/dist/commands/chats/folders/list.js +2 -1
  102. package/dist/commands/chats/list.js +2 -1
  103. package/dist/commands/chats/spaces/list.js +2 -1
  104. package/dist/commands/chats/widgets/list.js +2 -1
  105. package/dist/commands/code/jobs/list.js +4 -1
  106. package/dist/commands/commerce/incidents/list.js +2 -1
  107. package/dist/commands/commitments/accounting.js +3 -0
  108. package/dist/commands/commitments/action-proposals.d.ts +8 -0
  109. package/dist/commands/commitments/action-proposals.js +17 -2
  110. package/dist/commands/commitments/cost.d.ts +11 -0
  111. package/dist/commands/commitments/cost.js +25 -0
  112. package/dist/commands/commitments/create.js +6 -1
  113. package/dist/commands/commitments/endpoints/list.js +2 -1
  114. package/dist/commands/commitments/links/list.js +2 -1
  115. package/dist/commands/commitments/list.js +2 -1
  116. package/dist/commands/commitments/liveness.d.ts +30 -0
  117. package/dist/commands/commitments/liveness.js +22 -5
  118. package/dist/commands/commitments/pack/list.js +2 -1
  119. package/dist/commands/commitments/preflight.js +6 -2
  120. package/dist/commands/commitments/update.js +10 -1
  121. package/dist/commands/compass/list.js +2 -1
  122. package/dist/commands/context.js +7 -1
  123. package/dist/commands/convos/list.js +3 -2
  124. package/dist/commands/dm/list.js +2 -1
  125. package/dist/commands/dm/work.d.ts +19 -0
  126. package/dist/commands/dm/work.js +54 -0
  127. package/dist/commands/feeds/list.js +2 -1
  128. package/dist/commands/followups/list.js +2 -1
  129. package/dist/commands/followups/plans/cancel.d.ts +13 -0
  130. package/dist/commands/followups/plans/cancel.js +26 -0
  131. package/dist/commands/followups/plans/create.d.ts +11 -0
  132. package/dist/commands/followups/plans/create.js +35 -0
  133. package/dist/commands/followups/plans/list.d.ts +13 -0
  134. package/dist/commands/followups/plans/list.js +50 -0
  135. package/dist/commands/followups/plans/observability.d.ts +11 -0
  136. package/dist/commands/followups/plans/observability.js +46 -0
  137. package/dist/commands/followups/plans/revise.d.ts +13 -0
  138. package/dist/commands/followups/plans/revise.js +35 -0
  139. package/dist/commands/followups/plans/show.d.ts +11 -0
  140. package/dist/commands/followups/plans/show.js +32 -0
  141. package/dist/commands/goals/key-results/list.js +2 -1
  142. package/dist/commands/goals/labels/list.js +3 -2
  143. package/dist/commands/goals/list.js +3 -2
  144. package/dist/commands/grants/list.js +2 -1
  145. package/dist/commands/harnesses/grants/list.js +2 -1
  146. package/dist/commands/harnesses/leases/list.js +2 -1
  147. package/dist/commands/harnesses/list.js +10 -1
  148. package/dist/commands/ingress/list.js +2 -1
  149. package/dist/commands/initiatives/list.js +2 -1
  150. package/dist/commands/instruction-blocks/list.js +2 -1
  151. package/dist/commands/instructions/list.js +2 -1
  152. package/dist/commands/integrations/connections/list.js +2 -1
  153. package/dist/commands/integrations/tools/list.js +2 -1
  154. package/dist/commands/labels/list.js +3 -2
  155. package/dist/commands/learning/adapters.d.ts +16 -0
  156. package/dist/commands/learning/adapters.js +44 -0
  157. package/dist/commands/machines/dedicated/list.js +2 -1
  158. package/dist/commands/machines/hosted/list.js +2 -1
  159. package/dist/commands/machines/list.js +2 -1
  160. package/dist/commands/machines/show.js +5 -2
  161. package/dist/commands/measures/list.js +2 -1
  162. package/dist/commands/memory/list.js +2 -1
  163. package/dist/commands/memory/proposals/list.js +2 -1
  164. package/dist/commands/memory/stores/list.js +2 -1
  165. package/dist/commands/memory/topics/list.js +2 -1
  166. package/dist/commands/memory/versions/list.js +2 -1
  167. package/dist/commands/messages/list.js +2 -1
  168. package/dist/commands/northstars/intents/list.js +2 -1
  169. package/dist/commands/northstars/list.js +2 -1
  170. package/dist/commands/northstars/recommendations/list.js +2 -1
  171. package/dist/commands/outbox/list.js +2 -1
  172. package/dist/commands/profiles/list.js +2 -1
  173. package/dist/commands/projects/docs/list.js +8 -1
  174. package/dist/commands/projects/updates/list.js +2 -1
  175. package/dist/commands/proposals/list.js +2 -1
  176. package/dist/commands/requests/comments/list.js +2 -1
  177. package/dist/commands/requests/list.js +2 -1
  178. package/dist/commands/shares/list.js +2 -1
  179. package/dist/commands/shortcuts/list.js +2 -1
  180. package/dist/commands/signals/monitors/list.js +2 -1
  181. package/dist/commands/signals/schemas/list.js +2 -1
  182. package/dist/commands/signals/sources/list.js +2 -1
  183. package/dist/commands/space-directory-views/list.js +2 -1
  184. package/dist/commands/spaces/actions/list.js +4 -3
  185. package/dist/commands/spaces/briefs/list.js +2 -1
  186. package/dist/commands/spaces/cycles/list.js +2 -1
  187. package/dist/commands/spaces/files/folders/list.js +2 -1
  188. package/dist/commands/spaces/files/list.js +3 -2
  189. package/dist/commands/spaces/heartbeats/list.js +3 -2
  190. package/dist/commands/spaces/labels/list.js +3 -2
  191. package/dist/commands/spaces/list.d.ts +3 -18
  192. package/dist/commands/spaces/list.js +28 -35
  193. package/dist/commands/spaces/live/cards/list.js +2 -1
  194. package/dist/commands/spaces/members/list.d.ts +1 -0
  195. package/dist/commands/spaces/members/list.js +4 -1
  196. package/dist/commands/spaces/show.js +2 -2
  197. package/dist/commands/spaces/skills/list.js +6 -2
  198. package/dist/commands/spaces/states/list.js +2 -1
  199. package/dist/commands/spaces/views/list.js +2 -1
  200. package/dist/commands/spaces/widgets/list.js +3 -2
  201. package/dist/commands/spaces/workflow-templates/list.js +2 -1
  202. package/dist/commands/spaces/workflows/fixtures/list.js +2 -1
  203. package/dist/commands/spaces/workflows/list.js +3 -2
  204. package/dist/commands/spaces/workflows/proposals/list.js +2 -1
  205. package/dist/commands/spaces/workflows/triggers/list.js +2 -1
  206. package/dist/commands/store/acquisitions/list.js +2 -1
  207. package/dist/commands/store/admissions/list.js +17 -1
  208. package/dist/commands/store/advisories/list.js +2 -1
  209. package/dist/commands/store/follows/list.js +2 -1
  210. package/dist/commands/store/publishers/domains/list.js +2 -1
  211. package/dist/commands/store/reports/list.js +2 -1
  212. package/dist/commands/subscriptions/list.js +2 -1
  213. package/dist/commands/tasks/actionability.js +7 -30
  214. package/dist/commands/tasks/activity.js +3 -7
  215. package/dist/commands/tasks/approvals/list.js +2 -1
  216. package/dist/commands/tasks/assign.d.ts +1 -0
  217. package/dist/commands/tasks/assign.js +43 -7
  218. package/dist/commands/tasks/attachments/list.js +2 -1
  219. package/dist/commands/tasks/chat/send.js +34 -0
  220. package/dist/commands/tasks/comments/add.js +6 -1
  221. package/dist/commands/tasks/comments/list.js +2 -1
  222. package/dist/commands/tasks/complete.js +26 -2
  223. package/dist/commands/tasks/continue.d.ts +18 -0
  224. package/dist/commands/tasks/continue.js +54 -0
  225. package/dist/commands/tasks/create-tree.d.ts +5 -0
  226. package/dist/commands/tasks/create-tree.js +399 -219
  227. package/dist/commands/tasks/create.d.ts +1 -0
  228. package/dist/commands/tasks/create.js +63 -11
  229. package/dist/commands/tasks/deliverable/add.js +10 -3
  230. package/dist/commands/tasks/deliverable/list.js +2 -1
  231. package/dist/commands/tasks/events/list.js +2 -1
  232. package/dist/commands/tasks/execution-state.d.ts +12 -0
  233. package/dist/commands/tasks/execution-state.js +28 -0
  234. package/dist/commands/tasks/expectations/assess.js +40 -5
  235. package/dist/commands/tasks/guide.d.ts +10 -0
  236. package/dist/commands/tasks/guide.js +20 -0
  237. package/dist/commands/tasks/labels/list.js +2 -1
  238. package/dist/commands/tasks/list.d.ts +19 -0
  239. package/dist/commands/tasks/list.js +97 -4
  240. package/dist/commands/tasks/move.js +10 -2
  241. package/dist/commands/tasks/preflight.d.ts +14 -0
  242. package/dist/commands/tasks/preflight.js +77 -0
  243. package/dist/commands/tasks/resource/list.js +2 -1
  244. package/dist/commands/tasks/result/submit.js +10 -1
  245. package/dist/commands/tasks/review.js +6 -1
  246. package/dist/commands/tasks/revisions.d.ts +2 -0
  247. package/dist/commands/tasks/revisions.js +8 -1
  248. package/dist/commands/tasks/show.js +17 -11
  249. package/dist/commands/tasks/start.d.ts +1 -0
  250. package/dist/commands/tasks/start.js +35 -0
  251. package/dist/commands/tasks/templates/list.js +2 -1
  252. package/dist/commands/tasks/timeline.d.ts +5 -0
  253. package/dist/commands/tasks/timeline.js +9 -1
  254. package/dist/commands/tasks/update.d.ts +1 -0
  255. package/dist/commands/tasks/update.js +25 -2
  256. package/dist/commands/tasks/updates/add.js +6 -1
  257. package/dist/commands/tasks/updates/list.js +2 -1
  258. package/dist/commands/tasks/upsert.d.ts +1 -0
  259. package/dist/commands/tasks/upsert.js +8 -1
  260. package/dist/commands/token/list.js +2 -1
  261. package/dist/commands/tokens/list.js +2 -1
  262. package/dist/commands/tones/list.js +4 -2
  263. package/dist/commands/triggers/list.js +2 -1
  264. package/dist/commands/views/list.js +2 -1
  265. package/dist/commands/webhooks/list.js +2 -1
  266. package/dist/commands/whoami.js +1 -1
  267. package/dist/commands/widgets/list.js +2 -1
  268. package/dist/commands/widgets/save-as-app.d.ts +13 -0
  269. package/dist/commands/widgets/save-as-app.js +65 -0
  270. package/dist/commands/work-views/list.js +2 -1
  271. package/dist/commands/worklog/list.js +2 -1
  272. package/dist/commands/workspaces/list.js +3 -2
  273. package/dist/commands/workspaces/members.d.ts +1 -0
  274. package/dist/commands/workspaces/members.js +5 -2
  275. package/dist/generated/managed-instruction-guides.json +2 -2
  276. package/dist/help.js +7 -0
  277. package/dist/lib/agent-proactive-baseline.d.ts +9 -0
  278. package/dist/lib/agent-proactive-baseline.js +44 -0
  279. package/dist/lib/agentic-stream.d.ts +4 -1
  280. package/dist/lib/agentic-stream.js +29 -4
  281. package/dist/lib/appData.d.ts +75 -0
  282. package/dist/lib/appData.js +274 -0
  283. package/dist/lib/appInstallations.d.ts +117 -0
  284. package/dist/lib/appInstallations.js +960 -0
  285. package/dist/lib/appSettings.d.ts +3 -0
  286. package/dist/lib/appSettings.js +71 -0
  287. package/dist/lib/appWebhooks.d.ts +7 -0
  288. package/dist/lib/appWebhooks.js +59 -0
  289. package/dist/lib/apps-command.d.ts +44 -0
  290. package/dist/lib/apps-command.js +164 -0
  291. package/dist/lib/apps.d.ts +45 -0
  292. package/dist/lib/apps.js +148 -0
  293. package/dist/lib/appsCheck.d.ts +12 -0
  294. package/dist/lib/appsCheck.js +173 -0
  295. package/dist/lib/appsFs.d.ts +58 -0
  296. package/dist/lib/appsFs.js +384 -0
  297. package/dist/lib/auth-failure.d.ts +20 -0
  298. package/dist/lib/auth-failure.js +40 -3
  299. package/dist/lib/cli-installers.d.ts +9 -2
  300. package/dist/lib/command-miss.js +107 -0
  301. package/dist/lib/commitment-loop-status.js +25 -3
  302. package/dist/lib/commitments.d.ts +44 -3
  303. package/dist/lib/commitments.js +107 -9
  304. package/dist/lib/compasses.d.ts +4 -0
  305. package/dist/lib/compasses.js +11 -0
  306. package/dist/lib/daemon-setup.js +7 -7
  307. package/dist/lib/daemonHandoff.js +3 -2
  308. package/dist/lib/dedicated-ssh.d.ts +2 -0
  309. package/dist/lib/dedicated-ssh.js +98 -28
  310. package/dist/lib/json-output.d.ts +33 -0
  311. package/dist/lib/json-output.js +37 -0
  312. package/dist/lib/list-output.d.ts +9 -4
  313. package/dist/lib/list-output.js +36 -9
  314. package/dist/lib/lookbackPlans.d.ts +13 -0
  315. package/dist/lib/lookbackPlans.js +68 -0
  316. package/dist/lib/machines.d.ts +27 -6
  317. package/dist/lib/machines.js +25 -14
  318. package/dist/lib/member-output.d.ts +20 -0
  319. package/dist/lib/member-output.js +57 -0
  320. package/dist/lib/preflight-copy.d.ts +7 -0
  321. package/dist/lib/preflight-copy.js +31 -0
  322. package/dist/lib/roles.d.ts +2 -2
  323. package/dist/lib/task-admission.d.ts +9 -0
  324. package/dist/lib/task-admission.js +35 -0
  325. package/dist/lib/task-batch.d.ts +4 -0
  326. package/dist/lib/task-batch.js +2 -0
  327. package/dist/lib/task-operations.d.ts +25 -0
  328. package/dist/lib/task-operations.js +123 -0
  329. package/dist/lib/task-preflight.d.ts +35 -0
  330. package/dist/lib/task-preflight.js +121 -0
  331. package/dist/lib/task-resource-references.d.ts +23 -0
  332. package/dist/lib/task-resource-references.js +119 -0
  333. package/dist/lib/task-spec-verification.d.ts +42 -0
  334. package/dist/lib/task-spec-verification.js +101 -0
  335. package/dist/lib/task-work.d.ts +11 -0
  336. package/dist/lib/task-work.js +41 -0
  337. package/dist/lib/task-write-attribution.d.ts +26 -0
  338. package/dist/lib/task-write-attribution.js +47 -0
  339. package/dist/lib/tasks.d.ts +13 -0
  340. package/dist/lib/tasks.js +61 -8
  341. package/dist/lib/triggers.d.ts +7 -0
  342. package/dist/lib/triggers.js +54 -4
  343. package/dist/lib/usage-discovery.d.ts +4 -0
  344. package/dist/lib/usage-discovery.js +14 -4
  345. package/dist/lib/widgetApps.d.ts +10 -0
  346. package/dist/lib/widgetApps.js +47 -0
  347. package/dist/lib/widgetStaticScan.js +25 -1
  348. package/dist/lib/workspaces.d.ts +11 -4
  349. package/dist/lib/workspaces.js +7 -3
  350. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +14 -1
  351. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -2
  352. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.d.ts +49 -1
  353. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +26 -0
  354. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.d.ts +118 -0
  355. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +614 -0
  356. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +2 -0
  357. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +15 -2
  358. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.d.ts +5 -0
  359. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.js +3 -1
  360. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +177 -0
  361. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +484 -0
  362. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +11 -0
  363. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +46 -7
  364. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +232 -0
  365. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +372 -0
  366. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +17 -1
  367. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +12 -1
  368. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +14 -1
  369. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +45 -2
  370. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.d.ts +49 -1
  371. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +24 -0
  372. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.d.ts +118 -0
  373. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +608 -0
  374. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +2 -0
  375. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +15 -2
  376. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.d.ts +5 -0
  377. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.js +3 -1
  378. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +177 -0
  379. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +472 -0
  380. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +11 -0
  381. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +44 -6
  382. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +232 -0
  383. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +360 -0
  384. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +17 -1
  385. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +12 -1
  386. package/dist/node_modules/@skrr-ai/auth-core/package.json +30 -0
  387. package/dist/node_modules/@skrr-ai/data-provider/index.js +25239 -18730
  388. package/docs/v1/operations.md +52 -0
  389. package/docs/v1/space-search.md +19 -0
  390. package/oclif.manifest.json +4719 -479
  391. package/package.json +23 -2
@@ -2,9 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.agentSessionOpenDefault = agentSessionOpenDefault;
4
4
  exports.emptyTasksMessage = emptyTasksMessage;
5
+ exports.externalKeyPrefixWarnings = externalKeyPrefixWarnings;
5
6
  exports.nextActionText = nextActionText;
6
7
  exports.nextColumnWidth = nextColumnWidth;
7
8
  exports.taskRef = taskRef;
9
+ exports.taskExecution = taskExecution;
10
+ exports.taskPageSummary = taskPageSummary;
11
+ exports.taskExecutionText = taskExecutionText;
8
12
  exports.buildListParams = buildListParams;
9
13
  exports.statusFilterWarnings = statusFilterWarnings;
10
14
  const core_1 = require("@oclif/core");
@@ -151,6 +155,19 @@ function emptyTasksMessage(flags, bin = 'skrr') {
151
155
  }
152
156
  return lines.join('\n');
153
157
  }
158
+ /** An empty filtered page is evidence about this query, not an empty Space. */
159
+ function externalKeyPrefixWarnings(flags, rowCount) {
160
+ const prefix = flags['external-key-prefix'];
161
+ if (typeof prefix !== 'string' || rowCount !== 0)
162
+ return [];
163
+ return [
164
+ {
165
+ code: 'EXTERNAL_KEY_PREFIX_MATCHED_NOTHING',
166
+ value: { prefix, space: flags.space ?? null },
167
+ hint: `No tasks matched --external-key-prefix ${JSON.stringify(prefix)}${flags.space ? ` in space ${String(flags.space)}` : ''}. Check the prefix or run the same command without --external-key-prefix.`,
168
+ },
169
+ ];
170
+ }
154
171
  /**
155
172
  * `--status` is repeatable, so the flag value is a list; callers that predate
156
173
  * that and tests that pass a bare string both normalize through here.
@@ -217,6 +234,56 @@ function nextColumnWidth(rows) {
217
234
  function taskRef(t) {
218
235
  return String(t.identifier ?? (t.taskNumber ? `#${t.taskNumber}` : '-'));
219
236
  }
237
+ /** Evidence about managed execution only; unmanaged work is outside this projection. */
238
+ function taskExecution(t) {
239
+ const actionability = t.actionability;
240
+ if (actionability?.state === 'terminal')
241
+ return { state: 'terminal' };
242
+ if (actionability?.execution)
243
+ return { ...actionability.execution };
244
+ // Older servers cannot distinguish an active Run from a retained checkout. Do not infer
245
+ // liveness from their `running` actionability, assigned agents, or workflow status.
246
+ if (!actionability || actionability.state === 'running')
247
+ return { state: 'unknown' };
248
+ return { state: 'not_observed' };
249
+ }
250
+ function taskPageSummary(items, hasMore) {
251
+ const countBy = (values) => values.reduce((out, value) => {
252
+ out[value] = (out[value] ?? 0) + 1;
253
+ return out;
254
+ }, {});
255
+ const assignment = (t) => {
256
+ if ((Array.isArray(t.assigneeAgentIds) && t.assigneeAgentIds.length > 0) ||
257
+ (Array.isArray(t.assigneeUserIds) && t.assigneeUserIds.length > 0))
258
+ return 'assigned';
259
+ return Array.isArray(t.assigneeAgentIds) && Array.isArray(t.assigneeUserIds)
260
+ ? 'unassigned' : 'unknown';
261
+ };
262
+ return {
263
+ scope: 'fetched_page',
264
+ taskCount: items.length,
265
+ has_more: hasMore,
266
+ workflow: countBy(items.map((t) => String(t.statusType ?? 'unknown'))),
267
+ assignment: {
268
+ assigned: items.filter((t) => assignment(t) === 'assigned').length,
269
+ unassigned: items.filter((t) => assignment(t) === 'unassigned').length,
270
+ unknown: items.filter((t) => assignment(t) === 'unknown').length,
271
+ },
272
+ readiness: countBy(items.map((t) => String(t.actionability?.reasonCode ?? 'unknown'))),
273
+ execution: countBy(items.map((t) => String(taskExecution(t).state))),
274
+ measurement: 'Managed execution evidence at read time; unmanaged work is not measured.',
275
+ };
276
+ }
277
+ function taskExecutionText(t) {
278
+ const execution = taskExecution(t);
279
+ switch (execution.state) {
280
+ case 'run_active': return `Run ${String(execution.runStatus ?? 'active')}${execution.agentId ? ` (${String(execution.agentId)})` : ''}`;
281
+ case 'checkout_held': return 'Checkout held; Run unverified';
282
+ case 'terminal': return 'Terminal';
283
+ case 'not_observed': return 'No active Run observed';
284
+ default: return 'Unknown';
285
+ }
286
+ }
220
287
  /**
221
288
  * The task-list request bag is shared with import/export so every CLI list
222
289
  * surface serializes the same server-side filters. Keep user-id resolution in
@@ -501,10 +568,13 @@ class TasksList extends base_command_1.BaseCommand {
501
568
  view: core_1.Flags.string({
502
569
  description: 'Only tasks a saved Task View selects (task_view_…; see `views list`). Combines with other filters',
503
570
  }),
504
- limit: core_1.Flags.integer({ description: 'Max results', default: 50 }),
571
+ limit: core_1.Flags.integer({
572
+ description: 'Results per page (default 50). Follow next_cursor with --cursor for remaining pages.',
573
+ default: 50,
574
+ }),
505
575
  cursor: core_1.Flags.string({ description: 'Pagination cursor from a previous page' }),
506
576
  all: core_1.Flags.boolean({
507
- description: 'Include closed tasks even inside an agent session (where --json defaults to open work and reports filter_applied)',
577
+ description: 'Include closed tasks inside an agent session. This changes status filtering only; it does not fetch all pages. Use --cursor to continue.',
508
578
  }),
509
579
  ...list_output_1.listOutputFlags,
510
580
  strict: core_1.Flags.boolean({
@@ -595,9 +665,11 @@ class TasksList extends base_command_1.BaseCommand {
595
665
  };
596
666
  }
597
667
  const list = response;
668
+ const rowCount = Array.isArray(list?.data) ? list.data.length : 0;
669
+ const prefixWarnings = calendarRange ? [] : externalKeyPrefixWarnings(flags, rowCount);
598
670
  const statusWarnings = calendarRange
599
671
  ? []
600
- : statusFilterWarnings(flags, Array.isArray(list?.data) ? list.data.length : 0);
672
+ : [...statusFilterWarnings(flags, rowCount), ...prefixWarnings];
601
673
  if (flags.strict && statusWarnings.some((w) => w.code === 'STATUS_NOT_BUILTIN')) {
602
674
  const bad = statusWarnings.find((w) => w.code === 'STATUS_NOT_BUILTIN');
603
675
  this.failWithCliError({
@@ -618,10 +690,12 @@ class TasksList extends base_command_1.BaseCommand {
618
690
  const enriched = list && Array.isArray(list.data)
619
691
  ? {
620
692
  ...list,
693
+ ...(!calendarRange ? { summary: taskPageSummary(list.data, Boolean(list.has_more ?? list.next_cursor)) } : {}),
621
694
  data: list.data.map((t) => ({
622
695
  ...t,
623
696
  ref: taskRef(t),
624
697
  nextAction: nextActionText(t),
698
+ ...(!calendarRange ? { execution: taskExecution(t) } : {}),
625
699
  })),
626
700
  }
627
701
  : response;
@@ -635,7 +709,19 @@ class TasksList extends base_command_1.BaseCommand {
635
709
  compact: flags.compact,
636
710
  requestedLimit: flags.limit,
637
711
  warnings: statusWarnings,
638
- ...(filterApplied ? { filterApplied } : {}),
712
+ ...(filterApplied || flags['external-key-prefix']
713
+ ? {
714
+ filterApplied: {
715
+ ...filterApplied,
716
+ ...(flags['external-key-prefix']
717
+ ? {
718
+ externalKeyPrefix: flags['external-key-prefix'],
719
+ spaceId: flags.space ?? null,
720
+ }
721
+ : {}),
722
+ },
723
+ }
724
+ : {}),
639
725
  });
640
726
  this.printList(out, Boolean(flags.ndjson));
641
727
  return;
@@ -668,6 +754,8 @@ class TasksList extends base_command_1.BaseCommand {
668
754
  const items = r?.data ?? [];
669
755
  if (items.length === 0) {
670
756
  this.log(emptyTasksMessage(flags, this.config.bin));
757
+ for (const line of (0, list_output_1.warningLines)(prefixWarnings))
758
+ this.log(line);
671
759
  return;
672
760
  }
673
761
  const rows = items.map((t) => {
@@ -688,6 +776,7 @@ class TasksList extends base_command_1.BaseCommand {
688
776
  priority: String(t.priority ?? '-'),
689
777
  estimate: t.estimate === null || t.estimate === undefined ? '-' : String(t.estimate),
690
778
  assignees,
779
+ execution: taskExecutionText(t),
691
780
  next: nextActionText(t),
692
781
  match: String(t._matchField ?? '-'),
693
782
  savings: economics?.savings
@@ -719,6 +808,7 @@ class TasksList extends base_command_1.BaseCommand {
719
808
  : []),
720
809
  { key: 'estimate', header: 'ESTIMATE' },
721
810
  { key: 'assignees', header: 'ASSIGNEES' },
811
+ { key: 'execution', header: 'EXECUTION', maxWidth: 58 },
722
812
  // Bounded: the reason is a sentence, and an unbounded column wraps the
723
813
  // table into unreadability on a narrow terminal.
724
814
  { key: 'next', header: 'NEXT', maxWidth: nextColumnWidth(rows) },
@@ -727,6 +817,9 @@ class TasksList extends base_command_1.BaseCommand {
727
817
  ...(flags.q ? [{ key: 'match', header: 'MATCH' }] : []),
728
818
  { key: 'id', header: 'ID' },
729
819
  ], (line) => this.log(line));
820
+ const summary = taskPageSummary(items, Boolean(r?.has_more ?? r?.next_cursor));
821
+ this.log(`\nFetched page: ${items.length} tasks; ${summary.assignment.unassigned} unassigned; ${summary.execution.run_active ?? 0} active managed Runs; ${summary.execution.checkout_held ?? 0} retained checkouts; ${summary.execution.unknown ?? 0} execution unknown. ${summary.has_more ? 'More pages available.' : 'Last page.'}`);
822
+ this.log(summary.measurement);
730
823
  if (flags.rank)
731
824
  this.log('\nRanked only within this fetched page; estimates are claims, not measured savings.\n' +
732
825
  'SCORE = annualized USD savings / max(effort hours, 0.5) x risk factor (low 1, medium 0.6, high 0.25); ' +
@@ -63,6 +63,7 @@ class TasksMove extends base_command_1.BaseCommand {
63
63
  async run() {
64
64
  this.requireAuth();
65
65
  const { args, flags } = await this.parse(TasksMove);
66
+ this.setJsonOperation({ command: 'tasks:move', mode: 'execute' });
66
67
  let taskIdentity;
67
68
  try {
68
69
  taskIdentity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
@@ -78,7 +79,7 @@ class TasksMove extends base_command_1.BaseCommand {
78
79
  });
79
80
  }
80
81
  const taskRef = await this.resolveEntityRef('task', taskIdentity.id);
81
- const projectId = (0, projects_1.resolveTaskProjectFlag)(flags.project);
82
+ let projectId = (0, projects_1.resolveTaskProjectFlag)(flags.project);
82
83
  if (projectId !== undefined) {
83
84
  try {
84
85
  (0, unsupported_managed_task_write_1.refuseUnsupportedManagedTaskWrite)('Project changes', 'mcp__tasks__task_update');
@@ -96,6 +97,11 @@ class TasksMove extends base_command_1.BaseCommand {
96
97
  retryable: false,
97
98
  });
98
99
  }
100
+ if (typeof projectId === 'string') {
101
+ const placement = { projectId };
102
+ await this.resolveTaskResourceReferences(placement, { taskId: taskRef });
103
+ projectId = placement.projectId;
104
+ }
99
105
  // Whether a target is blocked is a Space-specific TYPE decision. The
100
106
  // server validates and applies these optional hold details after resolving
101
107
  // the state; a client must not guess from a display name.
@@ -148,7 +154,9 @@ class TasksMove extends base_command_1.BaseCommand {
148
154
  this.handleApiError(err);
149
155
  }
150
156
  if (flags.json) {
151
- this.log(JSON.stringify((0, web_url_1.withTaskUrl)(this.cliConfig.baseURL, updated), null, 2));
157
+ this.printJsonOperation((0, web_url_1.withTaskUrl)(this.cliConfig.baseURL, updated), {
158
+ resource: { kind: 'task', id: updated?.id }, task: { id: updated?.id },
159
+ });
152
160
  return;
153
161
  }
154
162
  const t = (updated ?? {});
@@ -0,0 +1,14 @@
1
+ import { BaseCommand } from '../../base-command';
2
+ export default class TasksPreflight extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ id: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ task: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ skill: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ };
12
+ static examples: string[];
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_provider_1 = require("@skrr-ai/data-provider");
5
+ const base_command_1 = require("../../base-command");
6
+ const task_resolver_1 = require("../../lib/task-resolver");
7
+ const task_preflight_1 = require("../../lib/task-preflight");
8
+ class TasksPreflight extends base_command_1.BaseCommand {
9
+ static description = 'Inspect workflow blockers and execution prerequisites without starting work or probing a machine';
10
+ static args = {
11
+ id: core_1.Args.string({ description: 'Task ID/ref; defaults to the current Task runtime', ignoreStdin: true }),
12
+ };
13
+ static flags = {
14
+ json: core_1.Flags.boolean({ description: 'Output native observations, uncertainty, and CLI verification metadata as JSON' }),
15
+ task: core_1.Flags.string({ description: 'Task ID/ref; overrides current Task runtime context' }),
16
+ skill: core_1.Flags.string({ description: 'Skill ID for the existing server execution preview' }),
17
+ };
18
+ static examples = [
19
+ '<%= config.bin %> tasks preflight OSK-123',
20
+ '<%= config.bin %> tasks preflight --json',
21
+ ];
22
+ async run() {
23
+ this.setJsonOperation({ command: 'tasks:preflight', mode: 'verify', writeState: 'not_attempted' });
24
+ this.requireAuth();
25
+ const { args, flags } = await this.parse(TasksPreflight);
26
+ let identity;
27
+ try {
28
+ identity = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.id, flagTask: flags.task });
29
+ }
30
+ catch (error) {
31
+ const failure = (0, task_resolver_1.taskResolutionFailure)(error);
32
+ this.failWithCliError({ message: failure.message, code: failure.code, exit: 2, retryable: false,
33
+ details: { suggestion: failure.suggestion } });
34
+ }
35
+ let taskId = await this.resolveTaskReference(identity.id);
36
+ // Native endpoints accept identifiers, so BaseCommand intentionally keeps
37
+ // OSK-123 unchanged. Correlating two diagnostic records needs the returned
38
+ // canonical identity; UUID/title-resolved callers keep their request count.
39
+ if (/^[A-Z]+-\d+$/i.test(taskId)) {
40
+ let task;
41
+ try {
42
+ task = await data_provider_1.dataService.getTask(taskId, { enrich: false });
43
+ }
44
+ catch (error) {
45
+ this.handleApiError(error);
46
+ }
47
+ if (typeof task?.id !== 'string' || !/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i.test(task.id) ||
48
+ (task.identifier !== undefined && (typeof task.identifier !== 'string' || task.identifier.toUpperCase() !== taskId.toUpperCase()))) {
49
+ this.failWithCliError({
50
+ code: 'TASK_PREFLIGHT_IDENTITY_UNCONFIRMED',
51
+ message: 'The server did not confirm a canonical Task identity for this reference. Inspect tasks show <task> --json before repeating preflight.',
52
+ exit: 2, retryable: false,
53
+ });
54
+ }
55
+ taskId = task.id;
56
+ }
57
+ const report = await (0, task_preflight_1.readTaskPreflight)(taskId, {
58
+ workflow: () => data_provider_1.dataService.getTaskActionability(taskId),
59
+ execution: () => data_provider_1.dataService.previewTaskStart(taskId, flags.skill ? { skillId: flags.skill } : undefined),
60
+ });
61
+ // Only native diagnostic responses establish an identity for _cli; a
62
+ // requested ref is not itself a confirmed Task record.
63
+ const nativeId = report.workflow.status === 'observed' ? report.workflow.value.taskId
64
+ : report.execution.status === 'observed' ? report.execution.value.taskId : null;
65
+ if (flags.json)
66
+ this.printJsonOperation({ ok: report.summary === 'eligible_to_attempt', ...report }, {
67
+ resource: nativeId ? { kind: 'task', id: nativeId } : null,
68
+ task: nativeId ? { id: nativeId } : null,
69
+ });
70
+ else
71
+ for (const line of (0, task_preflight_1.taskPreflightLines)(report, this.config.bin))
72
+ this.log(line);
73
+ if (report.summary !== 'eligible_to_attempt')
74
+ this.exit(report.summary === 'blocked' ? 1 : 2);
75
+ }
76
+ }
77
+ exports.default = TasksPreflight;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const list_output_1 = require("../../../lib/list-output");
3
4
  const core_1 = require("@oclif/core");
4
5
  const data_provider_1 = require("@skrr-ai/data-provider");
5
6
  const base_command_1 = require("../../../base-command");
@@ -29,7 +30,7 @@ class TasksResourceList extends base_command_1.BaseCommand {
29
30
  this.handleApiError(error);
30
31
  }
31
32
  if (flags.json)
32
- return this.log(JSON.stringify(result, null, 2));
33
+ return this.printJsonResult((0, list_output_1.listResult)(result));
33
34
  if (!result.data.length)
34
35
  return this.log('No Resources linked.');
35
36
  for (const item of result.data) {
@@ -42,6 +42,7 @@ const web_url_1 = require("../../../lib/web-url");
42
42
  const api_fetch_1 = require("../../../lib/api-fetch");
43
43
  const task_closure_1 = require("../../../lib/task-closure");
44
44
  const session_task_write_1 = require("../../../lib/session-task-write");
45
+ const task_write_attribution_1 = require("../../../lib/task-write-attribution");
45
46
  function parseJson(value, label) {
46
47
  if (!value)
47
48
  return undefined;
@@ -92,6 +93,7 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
92
93
  json: core_1.Flags.boolean({ description: 'Output JSON' }),
93
94
  };
94
95
  async run() {
96
+ this.setJsonOperation({ command: 'tasks:result:submit', mode: 'execute' });
95
97
  this.requireAuth();
96
98
  const { args, flags } = await this.parse(TasksResultSubmit);
97
99
  const task = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.task, flagTask: flags.task });
@@ -202,8 +204,13 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
202
204
  this.handleApiError(error);
203
205
  }
204
206
  const url = (0, web_url_1.taskUrlFrom)(this.cliConfig.baseURL, { id: task.id });
207
+ const attribution = (0, task_write_attribution_1.taskWriteAttribution)(result, 'submittedBy');
205
208
  if (flags.json)
206
- return this.log(JSON.stringify({ ...result, url }, null, 2));
209
+ return this.printJsonOperation({ ...result, url, attribution }, {
210
+ resource: { kind: 'task_result', id: result?.result?.id },
211
+ task: { id: result?.result?.taskId },
212
+ ...(typeof result?.idempotent === 'boolean' ? { replayed: result.idempotent } : {}),
213
+ });
207
214
  // Say what came back, never what we hope came back.
208
215
  //
209
216
  // This line used to read "...; it is ready for review." unconditionally,
@@ -212,6 +219,8 @@ class TasksResultSubmit extends base_command_1.BaseCommand {
212
219
  // which the call did not carry. Submitting a Result is not closing a Task;
213
220
  // the response now reports where it stands and this prints exactly that.
214
221
  this.log(`Submitted Result v${result.result.version} (${result.result.id}) for ${task.id}.`);
222
+ for (const line of (0, task_write_attribution_1.attributionLines)(attribution))
223
+ this.log(line);
215
224
  for (const line of (0, task_closure_1.closureReport)(result.closure, { closing: false }))
216
225
  this.log(line);
217
226
  if (url)
@@ -22,6 +22,7 @@ class TasksReview extends base_command_1.BaseCommand {
22
22
  json: core_1.Flags.boolean({ description: 'Output JSON' }),
23
23
  };
24
24
  async run() {
25
+ this.setJsonOperation({ command: 'tasks:review', mode: 'execute' });
25
26
  this.requireAuth();
26
27
  const { args, flags } = await this.parse(TasksReview);
27
28
  const task = (0, task_resolver_1.resolveTaskIdentity)({ positionalId: args.task, flagTask: flags.task });
@@ -47,7 +48,11 @@ class TasksReview extends base_command_1.BaseCommand {
47
48
  this.handleApiError(error);
48
49
  }
49
50
  if (flags.json)
50
- return this.log(JSON.stringify(result, null, 2));
51
+ return this.printJsonOperation(result, {
52
+ resource: { kind: 'task_review', id: result?.review?.id },
53
+ task: { id: result?.review?.taskId },
54
+ ...(typeof result?.idempotent === 'boolean' ? { replayed: result.idempotent } : {}),
55
+ });
51
56
  this.log(`Recorded Review: ${flags.decision} for Result ${flags['result-id']}.`);
52
57
  }
53
58
  }
@@ -1,4 +1,6 @@
1
1
  import { BaseCommand } from '../../base-command';
2
+ /** " (via CLI credential)" when the revision recorded its credential channel. */
3
+ export declare function revisionChannelSuffix(rev: Record<string, unknown>): string;
2
4
  export default class TasksRevisions extends BaseCommand {
3
5
  static description: string;
4
6
  static examples: string[];
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.revisionChannelSuffix = revisionChannelSuffix;
3
4
  const core_1 = require("@oclif/core");
4
5
  const data_provider_1 = require("@skrr-ai/data-provider");
5
6
  const base_command_1 = require("../../base-command");
6
7
  const format_1 = require("../../lib/format");
8
+ /** " (via CLI credential)" when the revision recorded its credential channel. */
9
+ function revisionChannelSuffix(rev) {
10
+ const via = rev.metadata?.via;
11
+ return (0, data_provider_1.principalChannelSuffix)({ kind: 'human', via });
12
+ }
7
13
  class TasksRevisions extends base_command_1.BaseCommand {
8
14
  static description = 'List revisions for a task';
9
15
  static examples = [
@@ -39,7 +45,8 @@ class TasksRevisions extends base_command_1.BaseCommand {
39
45
  const rows = items.map((rev) => ({
40
46
  version: String(rev.revisionNumber ?? '-'),
41
47
  changeType: String(rev.changeType ?? '-'),
42
- user: String(rev.userId ?? '-'),
48
+ // The channel the person's credential came through, when recorded (OSK-16621).
49
+ user: `${String(rev.userId ?? '-')}${revisionChannelSuffix(rev)}`,
43
50
  changes: String(Array.isArray(rev.changes) ? rev.changes.length : 0),
44
51
  when: rev.createdAt ? String(rev.createdAt).slice(0, 19).replace('T', ' ') : '-',
45
52
  }));
@@ -245,25 +245,31 @@ function taskFailureLines(t, bin = 'skrr') {
245
245
  if (!error && !failedAt && !isFailed)
246
246
  return [];
247
247
  const lines = [];
248
- const attempts = typeof t.executionAttempts === 'number' ? t.executionAttempts : null;
249
- const runId = typeof t.lastFinalizedRunId === 'string' ? t.lastFinalizedRunId : null;
250
- const facts = [
251
- failedAt,
252
- attempts != null ? `attempt ${attempts}` : null,
253
- runId ? `run ${runId}` : null,
254
- ].filter(Boolean);
255
- if (facts.length > 0)
256
- lines.push(`Failed: ${facts.join(' · ')}`);
248
+ // Task failure stamps survive later successful Runs. Neither the lifetime
249
+ // attempt counter nor lastFinalizedRunId identifies the Run that failed.
250
+ if (failedAt)
251
+ lines.push(`Failure recorded: ${failedAt}`);
257
252
  if (error) {
258
253
  // Labelled with the JSON key, because a reader who needs this in a script
259
254
  // needs the key more than they need the prose.
260
- lines.push(`Error: ${error}`);
255
+ lines.push(`Recorded error: ${error}`);
261
256
  lines.push(' (`executionError` in --json)');
262
257
  }
263
258
  else if (isFailed) {
264
- lines.push('Error: none recorded on the task.');
259
+ lines.push('Recorded error: none recorded on the task.');
260
+ }
261
+ const failure = t.executionFailure;
262
+ if (failure?.recovery && typeof failure.recovery === 'string' && !error.includes(failure.recovery)) {
263
+ lines.push(`Recovery: ${failure.recovery}`);
264
+ }
265
+ if (failure?.headline && typeof failure.headline === 'string' && !error.includes(failure.headline)) {
266
+ lines.push(`Cause: ${failure.headline}`);
267
+ }
268
+ if (failure?.runId) {
269
+ lines.push(`Diagnostic: executionFailure in --json (run ${failure.runId})`);
265
270
  }
266
271
  const ref = String(t.identifier ?? t.id ?? t._id ?? '<task-id>');
272
+ lines.push(`Latest runs: ${bin} tasks runs ${ref}`);
267
273
  lines.push(`Per-run why: ${bin} tasks activity ${ref} --json (details.error, keyed by runId)`);
268
274
  return lines;
269
275
  }
@@ -8,6 +8,7 @@ export default class TasksStart extends BaseCommand {
8
8
  };
9
9
  static flags: {
10
10
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
12
  task: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
13
  skill: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
14
  branch: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
@@ -7,6 +7,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
7
7
  const base_command_1 = require("../../base-command");
8
8
  const task_resolver_1 = require("../../lib/task-resolver");
9
9
  const git_task_1 = require("../../lib/git-task");
10
+ const task_admission_1 = require("../../lib/task-admission");
10
11
  class TasksStart extends base_command_1.BaseCommand {
11
12
  static description = 'Start execution of a task: its assignee agent runs it in a new conversation + session. ' +
12
13
  'Alias: tasks execute';
@@ -20,6 +21,7 @@ class TasksStart extends base_command_1.BaseCommand {
20
21
  '<%= config.bin %> tasks start <task-id> --skill <skill-id>',
21
22
  '<%= config.bin %> tasks start OSK-123 --branch',
22
23
  '<%= config.bin %> tasks start <task-id> --json',
24
+ '<%= config.bin %> tasks start <task-id> --dry-run --json',
23
25
  ];
24
26
  static args = {
25
27
  id: core_1.Args.string({
@@ -30,6 +32,7 @@ class TasksStart extends base_command_1.BaseCommand {
30
32
  };
31
33
  static flags = {
32
34
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
35
+ 'dry-run': core_1.Flags.boolean({ description: 'Preview effective unattended execution prerequisites without creating a Run or checking out a branch', exclusive: ['branch'] }),
33
36
  task: core_1.Flags.string({
34
37
  description: 'Task ID; overrides daemon runtime context',
35
38
  }),
@@ -57,6 +60,36 @@ class TasksStart extends base_command_1.BaseCommand {
57
60
  details: { suggestion: failure.suggestion, context: failure.details },
58
61
  });
59
62
  }
63
+ if (flags['dry-run']) {
64
+ if (flags.branch)
65
+ this.error('--dry-run cannot check out a branch; omit --branch.', { exit: 2 });
66
+ let preview;
67
+ try {
68
+ // A separate route is intentional: an older /start silently ignores
69
+ // unknown request fields. A dryRun flag there could start real work.
70
+ preview = await data_provider_1.dataService.previewTaskStart(taskIdentity.id, flags.skill ? { skillId: flags.skill } : undefined);
71
+ }
72
+ catch (err) {
73
+ this.handleApiError(err, { subject: `Task ${taskIdentity.id} execution preview` });
74
+ }
75
+ if (!(0, task_admission_1.isAdmissionPreview)(preview)) {
76
+ this.failWithCliError({
77
+ message: 'The server did not return a confirmed execution preview. Update the server before using --dry-run.',
78
+ code: 'TASK_START_PREVIEW_UNSUPPORTED', exit: 2, retryable: false,
79
+ });
80
+ }
81
+ if (flags.json)
82
+ this.printJsonResult(preview, { ok: preview.executionAdmission.state !== 'blocked' });
83
+ else {
84
+ this.log(`Execution preview for ${preview.taskId}:`);
85
+ for (const line of (0, task_admission_1.admissionLines)(preview.executionAdmission))
86
+ this.log(line);
87
+ this.log('No Run was created. Starting later rechecks current prerequisites.');
88
+ }
89
+ if (preview.executionAdmission.state === 'blocked')
90
+ this.exit(1);
91
+ return;
92
+ }
60
93
  // Resolve once before asking the server to start. It makes a title or
61
94
  // human-readable ref usable for branch naming, while UUID callers retain
62
95
  // their existing one-request behavior when --branch is omitted.
@@ -137,6 +170,8 @@ class TasksStart extends base_command_1.BaseCommand {
137
170
  this.log(`Started task ${taskId}${flags.skill ? ` with skill ${flags.skill}` : ''}`);
138
171
  if (branch)
139
172
  this.log(`${branch.created ? 'Created' : 'Checked out'} branch: ${branch.branch}`);
173
+ for (const line of (0, task_admission_1.admissionLines)(result.executionAdmission))
174
+ this.log(line);
140
175
  this.log(`Conversation: ${result.conversationId}`);
141
176
  this.log(`Session: ${result.sessionId}`);
142
177
  for (const line of startFollowUpLines(this.config.bin, taskIdentity.id))
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ const list_output_1 = require("../../../lib/list-output");
3
4
  const core_1 = require("@oclif/core");
4
5
  const data_provider_1 = require("@skrr-ai/data-provider");
5
6
  const base_command_1 = require("../../../base-command");
@@ -25,7 +26,7 @@ class TasksTemplatesList extends base_command_1.BaseCommand {
25
26
  this.handleApiError(err);
26
27
  }
27
28
  if (flags.json) {
28
- this.log(JSON.stringify(response, null, 2));
29
+ this.printJsonResult((0, list_output_1.listResult)(response));
29
30
  return;
30
31
  }
31
32
  const items = response?.data ?? [];
@@ -6,6 +6,11 @@ import { BaseCommand } from '../../base-command';
6
6
  * renders `details` with, so the two surfaces describe one entry the same way.
7
7
  */
8
8
  export declare function withDetails(item: Record<string, unknown>): string;
9
+ /**
10
+ * Who, not just which kind: `human:<id> (via CLI credential)` (OSK-16621). A
11
+ * row written before channels existed renders as it always did.
12
+ */
13
+ export declare function timelineActor(item: Record<string, unknown>): string;
9
14
  export default class TasksTimeline extends BaseCommand {
10
15
  static description: string;
11
16
  static args: {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withDetails = withDetails;
4
+ exports.timelineActor = timelineActor;
4
5
  const core_1 = require("@oclif/core");
5
6
  const data_provider_1 = require("@skrr-ai/data-provider");
6
7
  const base_command_1 = require("../../base-command");
@@ -21,6 +22,13 @@ function withDetails(item) {
21
22
  const details = (0, format_1.formatCell)(item.data ?? item.details, '');
22
23
  return details ? `${preview} (${details})` : preview;
23
24
  }
25
+ /**
26
+ * Who, not just which kind: `human:<id> (via CLI credential)` (OSK-16621). A
27
+ * row written before channels existed renders as it always did.
28
+ */
29
+ function timelineActor(item) {
30
+ return item.actor ? (0, data_provider_1.formatTaskPrincipal)(item.actor) : '-';
31
+ }
24
32
  class TasksTimeline extends base_command_1.BaseCommand {
25
33
  static description = 'Show the immutable multi-actor Task Activity timeline';
26
34
  static args = {
@@ -67,7 +75,7 @@ class TasksTimeline extends base_command_1.BaseCommand {
67
75
  .replace('T', ' ')
68
76
  .slice(0, 19),
69
77
  source: String(item.type ?? '-'),
70
- actor: String(item.actor?.kind ?? '-'),
78
+ actor: timelineActor(item),
71
79
  // A lifecycle row's preview is the bare action, so `status_changed`
72
80
  // appeared three times in a row without ever naming a status. The
73
81
  // answer is in `details` (`status=blocked`), which `tasks activity`
@@ -50,6 +50,7 @@ export default class TasksUpdate extends BaseCommand {
50
50
  goal: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
51
51
  cycle: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
52
52
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
53
+ unassigned: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
53
54
  'assignee-agent': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
54
55
  'assignee-user': import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
55
56
  'dri-agent': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;