@skrr-ai/cli 0.1.109 → 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 (434) hide show
  1. package/bin/run.js +15 -1
  2. package/dist/base-command.d.ts +44 -1
  3. package/dist/base-command.js +194 -33
  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/create.js +1 -1
  26. package/dist/commands/agents/triggers/list.js +2 -1
  27. package/dist/commands/agents/triggers/update.js +1 -1
  28. package/dist/commands/agents/update.d.ts +11 -0
  29. package/dist/commands/agents/update.js +58 -2
  30. package/dist/commands/api-keys/list.js +2 -1
  31. package/dist/commands/apps/channel.d.ts +20 -0
  32. package/dist/commands/apps/channel.js +64 -0
  33. package/dist/commands/apps/check-draft.d.ts +12 -0
  34. package/dist/commands/apps/check-draft.js +41 -0
  35. package/dist/commands/apps/check.d.ts +42 -0
  36. package/dist/commands/apps/check.js +91 -0
  37. package/dist/commands/apps/create.d.ts +15 -0
  38. package/dist/commands/apps/create.js +59 -0
  39. package/dist/commands/apps/data/put.d.ts +18 -0
  40. package/dist/commands/apps/data/put.js +72 -0
  41. package/dist/commands/apps/data/query.d.ts +20 -0
  42. package/dist/commands/apps/data/query.js +88 -0
  43. package/dist/commands/apps/disclosure.d.ts +16 -0
  44. package/dist/commands/apps/disclosure.js +71 -0
  45. package/dist/commands/apps/file/cat.d.ts +15 -0
  46. package/dist/commands/apps/file/cat.js +50 -0
  47. package/dist/commands/apps/file/ls.d.ts +13 -0
  48. package/dist/commands/apps/file/ls.js +47 -0
  49. package/dist/commands/apps/file/mv.d.ts +15 -0
  50. package/dist/commands/apps/file/mv.js +49 -0
  51. package/dist/commands/apps/file/rm.d.ts +15 -0
  52. package/dist/commands/apps/file/rm.js +53 -0
  53. package/dist/commands/apps/file/write.d.ts +17 -0
  54. package/dist/commands/apps/file/write.js +81 -0
  55. package/dist/commands/apps/install.d.ts +19 -0
  56. package/dist/commands/apps/install.js +136 -0
  57. package/dist/commands/apps/installations/list.d.ts +11 -0
  58. package/dist/commands/apps/installations/list.js +49 -0
  59. package/dist/commands/apps/installations/show.d.ts +12 -0
  60. package/dist/commands/apps/installations/show.js +61 -0
  61. package/dist/commands/apps/layout/set.d.ts +11 -0
  62. package/dist/commands/apps/layout/set.js +125 -0
  63. package/dist/commands/apps/layout/show.d.ts +9 -0
  64. package/dist/commands/apps/layout/show.js +33 -0
  65. package/dist/commands/apps/list.d.ts +10 -0
  66. package/dist/commands/apps/list.js +45 -0
  67. package/dist/commands/apps/logs.d.ts +13 -0
  68. package/dist/commands/apps/logs.js +55 -0
  69. package/dist/commands/apps/preview.d.ts +12 -0
  70. package/dist/commands/apps/preview.js +39 -0
  71. package/dist/commands/apps/publish/propose.d.ts +14 -0
  72. package/dist/commands/apps/publish/propose.js +45 -0
  73. package/dist/commands/apps/pull.d.ts +14 -0
  74. package/dist/commands/apps/pull.js +56 -0
  75. package/dist/commands/apps/push.d.ts +15 -0
  76. package/dist/commands/apps/push.js +75 -0
  77. package/dist/commands/apps/reconsent.d.ts +13 -0
  78. package/dist/commands/apps/reconsent.js +67 -0
  79. package/dist/commands/apps/report.d.ts +20 -0
  80. package/dist/commands/apps/report.js +63 -0
  81. package/dist/commands/apps/resume.d.ts +12 -0
  82. package/dist/commands/apps/resume.js +36 -0
  83. package/dist/commands/apps/settings/set.d.ts +13 -0
  84. package/dist/commands/apps/settings/set.js +54 -0
  85. package/dist/commands/apps/settings/show.d.ts +11 -0
  86. package/dist/commands/apps/settings/show.js +31 -0
  87. package/dist/commands/apps/show.d.ts +12 -0
  88. package/dist/commands/apps/show.js +49 -0
  89. package/dist/commands/apps/suspend.d.ts +12 -0
  90. package/dist/commands/apps/suspend.js +35 -0
  91. package/dist/commands/apps/uninstall.d.ts +13 -0
  92. package/dist/commands/apps/uninstall.js +43 -0
  93. package/dist/commands/apps/upgrade.d.ts +14 -0
  94. package/dist/commands/apps/upgrade.js +49 -0
  95. package/dist/commands/apps/version/create.d.ts +14 -0
  96. package/dist/commands/apps/version/create.js +53 -0
  97. package/dist/commands/apps/version/show.d.ts +12 -0
  98. package/dist/commands/apps/version/show.js +39 -0
  99. package/dist/commands/apps/versions.d.ts +12 -0
  100. package/dist/commands/apps/versions.js +40 -0
  101. package/dist/commands/apps/webhooks/list.d.ts +12 -0
  102. package/dist/commands/apps/webhooks/list.js +47 -0
  103. package/dist/commands/characters/list.js +2 -1
  104. package/dist/commands/chats/files/list.js +2 -1
  105. package/dist/commands/chats/folders/list.js +2 -1
  106. package/dist/commands/chats/list.js +2 -1
  107. package/dist/commands/chats/spaces/list.js +2 -1
  108. package/dist/commands/chats/widgets/list.js +2 -1
  109. package/dist/commands/code/jobs/list.js +4 -1
  110. package/dist/commands/commerce/incidents/list.js +2 -1
  111. package/dist/commands/commitments/accounting.js +3 -0
  112. package/dist/commands/commitments/action-proposals.d.ts +8 -0
  113. package/dist/commands/commitments/action-proposals.js +17 -2
  114. package/dist/commands/commitments/cost.d.ts +11 -0
  115. package/dist/commands/commitments/cost.js +25 -0
  116. package/dist/commands/commitments/create.js +6 -1
  117. package/dist/commands/commitments/endpoints/list.js +2 -1
  118. package/dist/commands/commitments/links/list.js +2 -1
  119. package/dist/commands/commitments/list.js +2 -1
  120. package/dist/commands/commitments/liveness.d.ts +30 -0
  121. package/dist/commands/commitments/liveness.js +22 -5
  122. package/dist/commands/commitments/pack/list.js +2 -1
  123. package/dist/commands/commitments/preflight.js +6 -2
  124. package/dist/commands/commitments/update.js +10 -1
  125. package/dist/commands/compass/list.js +2 -1
  126. package/dist/commands/context.js +7 -1
  127. package/dist/commands/convos/list.js +3 -2
  128. package/dist/commands/daemon/install.js +17 -1
  129. package/dist/commands/daemon/login.js +14 -0
  130. package/dist/commands/dm/list.js +2 -1
  131. package/dist/commands/dm/work.d.ts +19 -0
  132. package/dist/commands/dm/work.js +54 -0
  133. package/dist/commands/feeds/list.js +2 -1
  134. package/dist/commands/followups/list.js +2 -1
  135. package/dist/commands/followups/plans/cancel.d.ts +13 -0
  136. package/dist/commands/followups/plans/cancel.js +26 -0
  137. package/dist/commands/followups/plans/create.d.ts +11 -0
  138. package/dist/commands/followups/plans/create.js +35 -0
  139. package/dist/commands/followups/plans/list.d.ts +13 -0
  140. package/dist/commands/followups/plans/list.js +50 -0
  141. package/dist/commands/followups/plans/observability.d.ts +11 -0
  142. package/dist/commands/followups/plans/observability.js +46 -0
  143. package/dist/commands/followups/plans/revise.d.ts +13 -0
  144. package/dist/commands/followups/plans/revise.js +35 -0
  145. package/dist/commands/followups/plans/show.d.ts +11 -0
  146. package/dist/commands/followups/plans/show.js +32 -0
  147. package/dist/commands/goals/key-results/list.js +2 -1
  148. package/dist/commands/goals/labels/list.js +3 -2
  149. package/dist/commands/goals/list.js +3 -2
  150. package/dist/commands/grants/list.js +2 -1
  151. package/dist/commands/harnesses/grants/list.js +2 -1
  152. package/dist/commands/harnesses/leases/list.js +2 -1
  153. package/dist/commands/harnesses/list.js +10 -1
  154. package/dist/commands/harnesses/prune.d.ts +26 -0
  155. package/dist/commands/harnesses/prune.js +172 -0
  156. package/dist/commands/ingress/list.js +2 -1
  157. package/dist/commands/initiatives/list.js +2 -1
  158. package/dist/commands/instruction-blocks/list.js +2 -1
  159. package/dist/commands/instructions/list.js +2 -1
  160. package/dist/commands/integrations/connections/list.js +2 -1
  161. package/dist/commands/integrations/tools/list.js +2 -1
  162. package/dist/commands/labels/list.js +3 -2
  163. package/dist/commands/learning/adapters.d.ts +16 -0
  164. package/dist/commands/learning/adapters.js +44 -0
  165. package/dist/commands/login.js +11 -0
  166. package/dist/commands/machines/dedicated/list.js +2 -1
  167. package/dist/commands/machines/hosted/list.js +2 -1
  168. package/dist/commands/machines/list.js +2 -1
  169. package/dist/commands/machines/show.js +5 -2
  170. package/dist/commands/measures/list.js +2 -1
  171. package/dist/commands/memory/list.js +2 -1
  172. package/dist/commands/memory/proposals/list.js +2 -1
  173. package/dist/commands/memory/stores/list.js +2 -1
  174. package/dist/commands/memory/topics/list.js +2 -1
  175. package/dist/commands/memory/versions/list.js +2 -1
  176. package/dist/commands/messages/list.js +2 -1
  177. package/dist/commands/northstars/intents/list.js +2 -1
  178. package/dist/commands/northstars/list.js +2 -1
  179. package/dist/commands/northstars/recommendations/list.js +2 -1
  180. package/dist/commands/outbox/list.js +2 -1
  181. package/dist/commands/profiles/list.js +2 -1
  182. package/dist/commands/projects/docs/list.js +8 -1
  183. package/dist/commands/projects/updates/list.js +2 -1
  184. package/dist/commands/proposals/list.js +2 -1
  185. package/dist/commands/requests/comments/list.js +2 -1
  186. package/dist/commands/requests/list.js +2 -1
  187. package/dist/commands/shares/list.js +2 -1
  188. package/dist/commands/shortcuts/list.js +2 -1
  189. package/dist/commands/signals/monitors/list.js +2 -1
  190. package/dist/commands/signals/schemas/list.js +2 -1
  191. package/dist/commands/signals/sources/list.js +2 -1
  192. package/dist/commands/space-directory-views/list.js +2 -1
  193. package/dist/commands/spaces/actions/list.js +4 -3
  194. package/dist/commands/spaces/briefs/list.js +2 -1
  195. package/dist/commands/spaces/cycles/list.js +2 -1
  196. package/dist/commands/spaces/files/folders/list.js +2 -1
  197. package/dist/commands/spaces/files/list.js +3 -2
  198. package/dist/commands/spaces/heartbeats/list.js +3 -2
  199. package/dist/commands/spaces/labels/list.js +3 -2
  200. package/dist/commands/spaces/list.d.ts +3 -18
  201. package/dist/commands/spaces/list.js +28 -35
  202. package/dist/commands/spaces/live/cards/list.js +2 -1
  203. package/dist/commands/spaces/members/list.d.ts +1 -0
  204. package/dist/commands/spaces/members/list.js +4 -1
  205. package/dist/commands/spaces/show.js +2 -2
  206. package/dist/commands/spaces/skills/list.js +6 -2
  207. package/dist/commands/spaces/states/list.js +2 -1
  208. package/dist/commands/spaces/views/list.js +2 -1
  209. package/dist/commands/spaces/widgets/list.js +3 -2
  210. package/dist/commands/spaces/workflow-templates/list.js +2 -1
  211. package/dist/commands/spaces/workflows/fixtures/list.js +2 -1
  212. package/dist/commands/spaces/workflows/list.js +3 -2
  213. package/dist/commands/spaces/workflows/proposals/list.js +2 -1
  214. package/dist/commands/spaces/workflows/start.js +3 -1
  215. package/dist/commands/spaces/workflows/triggers/list.js +2 -1
  216. package/dist/commands/spaces/workflows/validate.js +12 -2
  217. package/dist/commands/store/acquisitions/list.js +2 -1
  218. package/dist/commands/store/admissions/list.js +17 -1
  219. package/dist/commands/store/advisories/list.js +2 -1
  220. package/dist/commands/store/follows/list.js +2 -1
  221. package/dist/commands/store/publishers/domains/list.js +2 -1
  222. package/dist/commands/store/reports/list.js +2 -1
  223. package/dist/commands/subscriptions/list.js +2 -1
  224. package/dist/commands/tasks/actionability.js +7 -30
  225. package/dist/commands/tasks/activity.js +14 -8
  226. package/dist/commands/tasks/approvals/list.js +2 -1
  227. package/dist/commands/tasks/assign.d.ts +1 -0
  228. package/dist/commands/tasks/assign.js +43 -7
  229. package/dist/commands/tasks/attachments/list.js +2 -1
  230. package/dist/commands/tasks/chat/send.js +34 -0
  231. package/dist/commands/tasks/comments/add.js +6 -1
  232. package/dist/commands/tasks/comments/list.js +2 -1
  233. package/dist/commands/tasks/complete.js +26 -2
  234. package/dist/commands/tasks/continue.d.ts +18 -0
  235. package/dist/commands/tasks/continue.js +54 -0
  236. package/dist/commands/tasks/create-tree.d.ts +5 -0
  237. package/dist/commands/tasks/create-tree.js +399 -219
  238. package/dist/commands/tasks/create.d.ts +1 -0
  239. package/dist/commands/tasks/create.js +63 -11
  240. package/dist/commands/tasks/deliverable/add.js +10 -3
  241. package/dist/commands/tasks/deliverable/list.js +2 -1
  242. package/dist/commands/tasks/events/list.js +2 -1
  243. package/dist/commands/tasks/execution-state.d.ts +12 -0
  244. package/dist/commands/tasks/execution-state.js +28 -0
  245. package/dist/commands/tasks/expectations/assess.js +40 -5
  246. package/dist/commands/tasks/guide.d.ts +10 -0
  247. package/dist/commands/tasks/guide.js +20 -0
  248. package/dist/commands/tasks/labels/list.js +2 -1
  249. package/dist/commands/tasks/list.d.ts +19 -0
  250. package/dist/commands/tasks/list.js +103 -6
  251. package/dist/commands/tasks/move.js +10 -2
  252. package/dist/commands/tasks/preflight.d.ts +14 -0
  253. package/dist/commands/tasks/preflight.js +77 -0
  254. package/dist/commands/tasks/rearm-recurrence.js +22 -3
  255. package/dist/commands/tasks/resource/list.js +2 -1
  256. package/dist/commands/tasks/result/submit.js +10 -1
  257. package/dist/commands/tasks/review.js +6 -1
  258. package/dist/commands/tasks/revisions.d.ts +2 -0
  259. package/dist/commands/tasks/revisions.js +8 -1
  260. package/dist/commands/tasks/show.d.ts +8 -0
  261. package/dist/commands/tasks/show.js +81 -43
  262. package/dist/commands/tasks/start.d.ts +1 -0
  263. package/dist/commands/tasks/start.js +35 -0
  264. package/dist/commands/tasks/templates/list.js +2 -1
  265. package/dist/commands/tasks/timeline.d.ts +5 -0
  266. package/dist/commands/tasks/timeline.js +9 -1
  267. package/dist/commands/tasks/unschedule.js +5 -1
  268. package/dist/commands/tasks/update.d.ts +1 -0
  269. package/dist/commands/tasks/update.js +36 -3
  270. package/dist/commands/tasks/updates/add.js +6 -1
  271. package/dist/commands/tasks/updates/list.js +2 -1
  272. package/dist/commands/tasks/upsert.d.ts +1 -0
  273. package/dist/commands/tasks/upsert.js +8 -1
  274. package/dist/commands/token/list.js +2 -1
  275. package/dist/commands/tokens/list.js +2 -1
  276. package/dist/commands/tones/list.js +4 -2
  277. package/dist/commands/triggers/audit.js +12 -3
  278. package/dist/commands/triggers/create.js +1 -1
  279. package/dist/commands/triggers/fire-detail.d.ts +7 -0
  280. package/dist/commands/triggers/fire-detail.js +30 -12
  281. package/dist/commands/triggers/fire.js +13 -3
  282. package/dist/commands/triggers/list.js +2 -1
  283. package/dist/commands/triggers/parse-intent.js +1 -1
  284. package/dist/commands/triggers/update.js +1 -1
  285. package/dist/commands/views/list.js +2 -1
  286. package/dist/commands/webhooks/list.js +2 -1
  287. package/dist/commands/whoami.js +1 -1
  288. package/dist/commands/widgets/list.js +2 -1
  289. package/dist/commands/widgets/save-as-app.d.ts +13 -0
  290. package/dist/commands/widgets/save-as-app.js +65 -0
  291. package/dist/commands/work-views/list.js +2 -1
  292. package/dist/commands/worklog/list.js +2 -1
  293. package/dist/commands/workspaces/grants.js +1 -4
  294. package/dist/commands/workspaces/list.js +3 -2
  295. package/dist/commands/workspaces/members.d.ts +1 -0
  296. package/dist/commands/workspaces/members.js +10 -7
  297. package/dist/generated/managed-instruction-guides.json +2 -2
  298. package/dist/help.js +7 -0
  299. package/dist/lib/agent-proactive-baseline.d.ts +9 -0
  300. package/dist/lib/agent-proactive-baseline.js +44 -0
  301. package/dist/lib/agentic-stream.d.ts +4 -1
  302. package/dist/lib/agentic-stream.js +29 -4
  303. package/dist/lib/appData.d.ts +75 -0
  304. package/dist/lib/appData.js +274 -0
  305. package/dist/lib/appInstallations.d.ts +117 -0
  306. package/dist/lib/appInstallations.js +960 -0
  307. package/dist/lib/appSettings.d.ts +3 -0
  308. package/dist/lib/appSettings.js +71 -0
  309. package/dist/lib/appWebhooks.d.ts +7 -0
  310. package/dist/lib/appWebhooks.js +59 -0
  311. package/dist/lib/apps-command.d.ts +44 -0
  312. package/dist/lib/apps-command.js +164 -0
  313. package/dist/lib/apps.d.ts +45 -0
  314. package/dist/lib/apps.js +148 -0
  315. package/dist/lib/appsCheck.d.ts +12 -0
  316. package/dist/lib/appsCheck.js +173 -0
  317. package/dist/lib/appsFs.d.ts +58 -0
  318. package/dist/lib/appsFs.js +384 -0
  319. package/dist/lib/auth-failure.d.ts +20 -0
  320. package/dist/lib/auth-failure.js +40 -3
  321. package/dist/lib/cli-installers.d.ts +9 -2
  322. package/dist/lib/command-miss.js +107 -0
  323. package/dist/lib/commitment-loop-status.js +25 -3
  324. package/dist/lib/commitment-product.js +5 -2
  325. package/dist/lib/commitments.d.ts +45 -3
  326. package/dist/lib/commitments.js +139 -41
  327. package/dist/lib/compasses.d.ts +4 -0
  328. package/dist/lib/compasses.js +11 -0
  329. package/dist/lib/daemon-machine-identity-copy.d.ts +14 -0
  330. package/dist/lib/daemon-machine-identity-copy.js +27 -0
  331. package/dist/lib/daemon-machine-identity.d.ts +27 -0
  332. package/dist/lib/daemon-machine-identity.js +61 -0
  333. package/dist/lib/daemon-setup.js +7 -7
  334. package/dist/lib/daemonHandoff.d.ts +19 -1
  335. package/dist/lib/daemonHandoff.js +62 -2
  336. package/dist/lib/dedicated-ssh.d.ts +2 -0
  337. package/dist/lib/dedicated-ssh.js +98 -28
  338. package/dist/lib/harnesses.d.ts +71 -0
  339. package/dist/lib/harnesses.js +70 -0
  340. package/dist/lib/json-output.d.ts +33 -0
  341. package/dist/lib/json-output.js +37 -0
  342. package/dist/lib/list-output.d.ts +9 -4
  343. package/dist/lib/list-output.js +38 -9
  344. package/dist/lib/lookbackPlans.d.ts +13 -0
  345. package/dist/lib/lookbackPlans.js +68 -0
  346. package/dist/lib/machines.d.ts +27 -6
  347. package/dist/lib/machines.js +25 -14
  348. package/dist/lib/member-output.d.ts +20 -0
  349. package/dist/lib/member-output.js +57 -0
  350. package/dist/lib/preflight-copy.d.ts +7 -0
  351. package/dist/lib/preflight-copy.js +31 -0
  352. package/dist/lib/profile-machine-identity-guard.js +11 -1
  353. package/dist/lib/roles.d.ts +2 -2
  354. package/dist/lib/task-admission.d.ts +9 -0
  355. package/dist/lib/task-admission.js +35 -0
  356. package/dist/lib/task-batch.d.ts +4 -0
  357. package/dist/lib/task-batch.js +2 -0
  358. package/dist/lib/task-economics.d.ts +10 -0
  359. package/dist/lib/task-economics.js +24 -2
  360. package/dist/lib/task-operations.d.ts +25 -0
  361. package/dist/lib/task-operations.js +123 -0
  362. package/dist/lib/task-preflight.d.ts +35 -0
  363. package/dist/lib/task-preflight.js +121 -0
  364. package/dist/lib/task-resource-references.d.ts +23 -0
  365. package/dist/lib/task-resource-references.js +119 -0
  366. package/dist/lib/task-spec-verification.d.ts +42 -0
  367. package/dist/lib/task-spec-verification.js +101 -0
  368. package/dist/lib/task-work.d.ts +11 -0
  369. package/dist/lib/task-work.js +41 -0
  370. package/dist/lib/task-write-attribution.d.ts +26 -0
  371. package/dist/lib/task-write-attribution.js +47 -0
  372. package/dist/lib/tasks.d.ts +13 -0
  373. package/dist/lib/tasks.js +61 -8
  374. package/dist/lib/triggers.d.ts +18 -0
  375. package/dist/lib/triggers.js +97 -5
  376. package/dist/lib/usage-discovery.d.ts +4 -0
  377. package/dist/lib/usage-discovery.js +14 -4
  378. package/dist/lib/widgetApps.d.ts +10 -0
  379. package/dist/lib/widgetApps.js +47 -0
  380. package/dist/lib/widgetStaticScan.js +25 -1
  381. package/dist/lib/workflow-run-view.d.ts +4 -0
  382. package/dist/lib/workflow-run-view.js +5 -0
  383. package/dist/lib/workspaces.d.ts +33 -9
  384. package/dist/lib/workspaces.js +19 -3
  385. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +14 -1
  386. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -2
  387. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.d.ts +49 -1
  388. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +26 -0
  389. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.d.ts +118 -0
  390. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +614 -0
  391. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
  392. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +5 -3
  393. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.d.ts +60 -0
  394. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +130 -6
  395. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +2 -0
  396. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +15 -2
  397. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.d.ts +5 -0
  398. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.js +3 -1
  399. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +177 -0
  400. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +484 -0
  401. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +11 -0
  402. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +46 -7
  403. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +232 -0
  404. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +372 -0
  405. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +17 -1
  406. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +12 -1
  407. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +14 -1
  408. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +45 -2
  409. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.d.ts +49 -1
  410. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +24 -0
  411. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.d.ts +118 -0
  412. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +608 -0
  413. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
  414. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
  415. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.d.ts +60 -0
  416. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +128 -6
  417. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +2 -0
  418. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +15 -2
  419. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.d.ts +5 -0
  420. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.js +3 -1
  421. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +177 -0
  422. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +472 -0
  423. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +11 -0
  424. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +44 -6
  425. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +232 -0
  426. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +360 -0
  427. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +17 -1
  428. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +12 -1
  429. package/dist/node_modules/@skrr-ai/auth-core/package.json +31 -1
  430. package/dist/node_modules/@skrr-ai/data-provider/index.js +25255 -18711
  431. package/docs/v1/operations.md +52 -0
  432. package/docs/v1/space-search.md +19 -0
  433. package/oclif.manifest.json +4843 -513
  434. package/package.json +32 -2
@@ -10,6 +10,7 @@
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.sourceRefusalWords = sourceRefusalWords;
12
12
  exports.gateExplanationLines = gateExplanationLines;
13
+ exports.placementTargetLines = placementTargetLines;
13
14
  exports.capabilityStatusLabel = capabilityStatusLabel;
14
15
  /** What a refused event-source code means, in words. An unknown code is printed as it is. */
15
16
  const SOURCE_REFUSAL_WORDS = {
@@ -74,6 +75,36 @@ function gateExplanationLines(gate) {
74
75
  }
75
76
  return [];
76
77
  }
78
+ function placementTargetWords(target) {
79
+ if (target.reachable === false)
80
+ return 'the chain never reaches it';
81
+ if (target.consent?.granted === false) {
82
+ return `consent refused${target.consent.reason ? ` (${target.consent.reason})` : ''}`;
83
+ }
84
+ if (target.contract?.verdict === 'unknown')
85
+ return 'contract support could not be read';
86
+ if (target.contract?.verdict && target.contract.verdict !== 'pass') {
87
+ return `cannot enforce the contract${target.contract.reason ? ` (${target.contract.reason})` : ''}`;
88
+ }
89
+ return target.usable ? 'could take the run' : 'unknown';
90
+ }
91
+ /**
92
+ * One line per execution target under "Is there somewhere else it can run?" (OSK-17003): the
93
+ * product, consent, contract and reachability the resolver would apply. The gate used to report a
94
+ * bare `fallbackCandidates` count, which read the same for a fallback that could take the run and
95
+ * one that never could. Nothing is printed for a single primary — the gate's note says that.
96
+ */
97
+ function placementTargetLines(gate) {
98
+ if (gate.id !== 'placement')
99
+ return [];
100
+ const targets = Array.isArray(gate.detail?.targets)
101
+ ? gate.detail.targets
102
+ : [];
103
+ if (targets.length < 2)
104
+ return [];
105
+ return targets.map((target) => `#${target.index ?? '?'} ${target.role ?? 'target'} ${target.product ?? 'unknown'}` +
106
+ `${target.selector ? ` (${target.selector})` : ''}: ${placementTargetWords(target)}`);
107
+ }
77
108
  /**
78
109
  * The status word for a capability. A credential whose expiry has passed is `expired`, not the
79
110
  * storage word `stale`, which gave no sign that time had run out.
@@ -32,9 +32,19 @@ function legacyProfileSharesDefaultMachine() {
32
32
  */
33
33
  function describeLegacySharedProfile(profile) {
34
34
  const next = `${profile}-2`;
35
+ // WHY this profile is on the shared row, from the record that decided it: which
36
+ // file made it "already hold credentials", and when. Absent rather than guessed
37
+ // when the record cannot be read.
38
+ let why = '';
39
+ try {
40
+ why = `${(0, machine_uuid_1.describeMachineIdentity)().sentence} `;
41
+ }
42
+ catch {
43
+ why = '';
44
+ }
35
45
  return [
36
46
  `Profile '${profile}' was set up by an older ${data_provider_1.BRAND.displayName} version that gave every profile on this ` +
37
- 'computer the same machine identity, and it still has it. Signing in here would replace the default ' +
47
+ `computer the same machine identity, and it still has it. ${why}Signing in here would replace the default ` +
38
48
  "profile's device-key pin and sign the default daemon out. Nothing was changed.",
39
49
  `Use a new profile name instead: skrr login --profile ${next}`,
40
50
  `(For the background service alone: skrrd --profile ${next} login)`,
@@ -105,7 +105,7 @@ export declare const roleApi: {
105
105
  } | undefined;
106
106
  escalation?: {
107
107
  minimumSeverity?: "low" | "medium" | "high" | undefined;
108
- channel?: "push" | "none" | "email" | "cli" | "app" | "slack" | undefined;
108
+ channel?: "push" | "none" | "cli" | "app" | "email" | "slack" | undefined;
109
109
  } | undefined;
110
110
  noReply?: {
111
111
  enabled?: boolean | undefined;
@@ -182,7 +182,7 @@ export declare const roleApi: {
182
182
  } | undefined;
183
183
  escalation?: {
184
184
  minimumSeverity?: "low" | "medium" | "high" | undefined;
185
- channel?: "push" | "none" | "email" | "cli" | "app" | "slack" | undefined;
185
+ channel?: "push" | "none" | "cli" | "app" | "email" | "slack" | undefined;
186
186
  } | undefined;
187
187
  noReply?: {
188
188
  enabled?: boolean | undefined;
@@ -0,0 +1,9 @@
1
+ /** The server owns admission; this is a display projection, never a permission grant. */
2
+ import type { TaskExecutionAdmission } from '@skrr-ai/data-provider';
3
+ export type { TaskExecutionAdmission } from '@skrr-ai/data-provider';
4
+ export declare function admissionLines(value: TaskExecutionAdmission | null | undefined): string[];
5
+ export declare function isAdmissionPreview(value: unknown): value is {
6
+ dryRun: true;
7
+ taskId: string;
8
+ executionAdmission: TaskExecutionAdmission;
9
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.admissionLines = admissionLines;
4
+ exports.isAdmissionPreview = isAdmissionPreview;
5
+ function admissionLines(value) {
6
+ if (!value)
7
+ return ['Execution admission: not reported by this server.'];
8
+ const lines = [`Approval prerequisites: ${value.state}.`];
9
+ if (value.permission) {
10
+ lines.push(`Permission policy: ${value.permission.mode || 'inherited/unknown'} (${value.permission.source || 'source unavailable'}).`);
11
+ }
12
+ if (value.workingDirectory) {
13
+ lines.push(`Working directory: ${value.workingDirectory.path || 'daemon configured default'} (${value.workingDirectory.source}; existence and access are checked on the machine at start).`);
14
+ }
15
+ if (value.unattended && !value.approverAvailable) {
16
+ lines.push('This run is unattended. Tools that need approval cannot obtain it during the run.');
17
+ }
18
+ for (const constraint of value.constraints || []) {
19
+ if (constraint.message)
20
+ lines.push(constraint.message);
21
+ if (constraint.requiredAction)
22
+ lines.push(`Action: ${constraint.requiredAction}`);
23
+ }
24
+ lines.push('This checks execution prerequisites; task authorization and tool permissions still apply.');
25
+ return lines;
26
+ }
27
+ function isAdmissionPreview(value) {
28
+ if (!value || typeof value !== 'object')
29
+ return false;
30
+ const row = value;
31
+ const admission = row.executionAdmission;
32
+ return row.dryRun === true && typeof row.taskId === 'string' && Boolean(admission &&
33
+ ['ready', 'blocked', 'unknown'].includes(String(admission.state)) &&
34
+ admission.scope === 'approval_prerequisites');
35
+ }
@@ -72,6 +72,8 @@ export type BatchProgress = {
72
72
  total: number;
73
73
  round: number;
74
74
  elapsedMs: number;
75
+ /** Submitted writes whose outcomes are still unknown after reconciliation. */
76
+ unknownKeys?: string[];
75
77
  /** Set while waiting before the next attempt, with why. */
76
78
  waiting?: {
77
79
  ms: number;
@@ -79,6 +81,8 @@ export type BatchProgress = {
79
81
  };
80
82
  };
81
83
  export type BatchCreateOptions = {
84
+ /** Called immediately before submitting a request; submitted writes may outlive the client. */
85
+ onSubmit?: (nodes: BatchCreateNode[]) => void;
82
86
  onProgress?: (progress: BatchProgress) => void;
83
87
  };
84
88
  /**
@@ -206,6 +206,7 @@ async function createNodesViaBatch(nodes, mapping, options = {}) {
206
206
  total: nodes.length,
207
207
  round,
208
208
  elapsedMs: Date.now() - startedAt,
209
+ unknownKeys: [...unknown],
209
210
  ...(waiting ? { waiting } : {}),
210
211
  });
211
212
  /** Everything still owed becomes a failure that says whether it may exist. */
@@ -314,6 +315,7 @@ async function createNodesViaBatch(nodes, mapping, options = {}) {
314
315
  let waitReason = 'the server confirmed nothing';
315
316
  let response;
316
317
  try {
318
+ options.onSubmit?.(sent);
317
319
  response = await data_provider_1.dataService.createTasksBatch(items, {
318
320
  idempotencyKey: batchIdempotencyKey('create', items),
319
321
  });
@@ -29,6 +29,16 @@ export declare function describeEstimate(economics: unknown): string;
29
29
  * scored and sorts after every row that is.
30
30
  */
31
31
  export declare function economicsScoreText(economics: unknown): string;
32
+ /** A rank's score as the table prints it: rounded, or `—` when the row is not scored. */
33
+ export declare function scoreText(score: number | null | undefined): string;
34
+ /**
35
+ * What `tasks update` should say about the estimate, read from the server's `economicsChange`
36
+ * (OSK-16476): `null` means the write changed nothing (an identical re-send, or a retraction of
37
+ * an estimate that is not there). `undefined` (an older server, or no estimate in the request) says
38
+ * nothing, so the CLI never guesses. When the estimate was the whole request the caller prints this
39
+ * line INSTEAD of "Updated task"; otherwise it follows it.
40
+ */
41
+ export declare function estimateUnchangedLine(sent: unknown, updated: Record<string, unknown> | undefined): string | null;
32
42
  /**
33
43
  * One line for a `task.economics.*` Activity event (OSK-15365): the revision, the claim after the
34
44
  * change and the claim it replaced, so `tasks activity` shows from-what-to-what without `--json`.
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.economicsFromFlags = economicsFromFlags;
4
4
  exports.describeEstimate = describeEstimate;
5
5
  exports.economicsScoreText = economicsScoreText;
6
+ exports.scoreText = scoreText;
7
+ exports.estimateUnchangedLine = estimateUnchangedLine;
6
8
  exports.describeEconomicsChange = describeEconomicsChange;
7
9
  const data_provider_1 = require("@skrr-ai/data-provider");
8
10
  /**
@@ -83,8 +85,28 @@ function describeEstimate(economics) {
83
85
  * scored and sorts after every row that is.
84
86
  */
85
87
  function economicsScoreText(economics) {
86
- const score = (0, data_provider_1.proposalEconomicsRank)(economics).score;
87
- return score === null || !Number.isFinite(score) ? '—' : String(Math.round(score));
88
+ return scoreText((0, data_provider_1.proposalEconomicsRank)(economics).score);
89
+ }
90
+ /** A rank's score as the table prints it: rounded, or `—` when the row is not scored. */
91
+ function scoreText(score) {
92
+ return score === null || score === undefined || !Number.isFinite(score)
93
+ ? '—'
94
+ : String(Math.round(score));
95
+ }
96
+ /**
97
+ * What `tasks update` should say about the estimate, read from the server's `economicsChange`
98
+ * (OSK-16476): `null` means the write changed nothing (an identical re-send, or a retraction of
99
+ * an estimate that is not there). `undefined` (an older server, or no estimate in the request) says
100
+ * nothing, so the CLI never guesses. When the estimate was the whole request the caller prints this
101
+ * line INSTEAD of "Updated task"; otherwise it follows it.
102
+ */
103
+ function estimateUnchangedLine(sent, updated) {
104
+ if (sent === undefined || !updated || updated.economicsChange !== null)
105
+ return null;
106
+ if (sent === null)
107
+ return 'No estimate to retract; nothing changed.';
108
+ const revision = updated.economics?.revision;
109
+ return `Estimate unchanged${revision ? ` (revision ${revision})` : ''}: it already reads ${describeEstimate(updated.economics)}.`;
88
110
  }
89
111
  /**
90
112
  * One line for a `task.economics.*` Activity event (OSK-15365): the revision, the claim after the
@@ -0,0 +1,25 @@
1
+ /** Documentation and display paths only. The server still owns allowedActions. */
2
+ export declare function taskActionCommand(action: string, taskId: string, targetId: string | undefined, bin?: string, context?: {
3
+ allowedActions?: ReadonlyArray<{
4
+ action: string;
5
+ }>;
6
+ }): string | undefined;
7
+ export declare function taskOperationsGuide(bin?: string): {
8
+ title: string;
9
+ sections: ({
10
+ title: string;
11
+ commands: {
12
+ command: string;
13
+ purpose: string;
14
+ }[];
15
+ note?: undefined;
16
+ } | {
17
+ title: string;
18
+ note: string;
19
+ commands: {
20
+ command: string;
21
+ purpose: string;
22
+ }[];
23
+ })[];
24
+ };
25
+ export declare function taskOperationsGuideLines(bin?: string): string[];
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.taskActionCommand = taskActionCommand;
4
+ exports.taskOperationsGuide = taskOperationsGuide;
5
+ exports.taskOperationsGuideLines = taskOperationsGuideLines;
6
+ const shell_quote_1 = require("./shell-quote");
7
+ /** Documentation and display paths only. The server still owns allowedActions. */
8
+ function taskActionCommand(action, taskId, targetId, bin = 'skrr', context = {}) {
9
+ const task = (0, shell_quote_1.shellQuoteArg)(taskId);
10
+ const target = targetId ? (0, shell_quote_1.shellQuoteArg)(targetId) : '<id>';
11
+ const commands = {
12
+ answer_human_input: `tasks input answer ${task} --request ${target} --text <answer>`,
13
+ assign_task: `tasks assign ${task} --help`,
14
+ // Managed work already has a current Result. Its server-declared
15
+ // continuation surface distinguishes closing from submitting a new Result.
16
+ complete_task: context.allowedActions?.some(item => item.action === 'continue_task')
17
+ ? `tasks move ${task} --status done`
18
+ : `tasks complete ${task}`,
19
+ continue_task: `tasks continue ${task} --text "<instruction>" --command-key <key>`,
20
+ dismiss_human_input: `tasks input dismiss ${task} --request ${target}`,
21
+ inspect_dependency: `tasks show ${target} --json`,
22
+ interrupt_task: `tasks interrupt ${task}`,
23
+ request_approval: `tasks approvals create ${task} --type <review|sign_off|deployment>`,
24
+ resolve_approval: `tasks approvals resolve ${task} ${target} --status <approved|rejected>`,
25
+ resolve_task_hold: `tasks move ${task} --status <status>`,
26
+ retry_task: `tasks retry ${task}`,
27
+ set_execution_mode: `tasks update ${task} --execution-mode <agent|human>`,
28
+ start_task: `tasks start ${task}`,
29
+ triage_task: `tasks triage ${task}`,
30
+ unschedule_task: `tasks unschedule ${task}`,
31
+ };
32
+ return commands[action] ? `${bin} ${commands[action]}` : undefined;
33
+ }
34
+ function taskOperationsGuide(bin = 'skrr') {
35
+ const command = (usage, purpose) => ({ command: `${bin} ${usage}`, purpose });
36
+ return {
37
+ title: 'Task operations',
38
+ sections: [
39
+ {
40
+ title: 'Inspect and plan',
41
+ commands: [
42
+ command('tasks show <task> --json', 'Read the Task, assignment, and dependency IDs.'),
43
+ command('tasks actionability <task>', 'Read the canonical next actor, blocker, and allowed actions.'),
44
+ command('tasks preflight <task>', 'Read workflow actionability and execution prerequisites together; creates no Run.'),
45
+ command('tasks ready --for agent --agent <agent-id>', 'Find workflow-actionable work for an Agent; this does not verify its runtime.'),
46
+ command('tasks create-tree --help', 'Create a related Task tree; blockedByTempIds declares dependencies within that tree.'),
47
+ ],
48
+ },
49
+ {
50
+ title: 'Choose assignment',
51
+ note: 'Executor intent, assignment, and starting a Run are separate choices. --unassigned clears both assignee kinds and suppresses automatic defaults; it does not start work.',
52
+ commands: [
53
+ command('tasks create --title "Task title" --execution-mode agent --unassigned --dry-run --json', 'Preview Agent-intended work without selecting an Agent or writing a Task.'),
54
+ command('tasks assign <task> --unassigned', 'Clear current assignees while retaining executor intent; creates no Run.'),
55
+ command('tasks assign <task> --help', 'Choose an eligible Human or Agent explicitly using the native assignment options.'),
56
+ ],
57
+ },
58
+ {
59
+ title: 'Apply and recover a batch',
60
+ note: 'Keep the same JSON, scope, and external-key options after an incomplete result. Explicit node externalKey values are preserved; otherwise keys derive from the file and defaults. Changing that input can name new Tasks.',
61
+ commands: [
62
+ command('tasks create-tree --from-json tasks.json --unassigned --readback --json', 'Apply the batch and reread its declared structured fields. This does not start Tasks.'),
63
+ command('tasks create-tree --from-json tasks.json --unassigned --resume --readback --json', 'Continue the unchanged file: confirm existing IDs without patching them, create only missing nodes, then read back.'),
64
+ command('tasks create-tree --from-json tasks.json --unassigned --verify-spec --json', 'Read-only structured-field comparison. Rich text and unsupported fields are explicitly unchecked; no Expectation assessment or drift repair is performed.'),
65
+ command('tasks create-tree --from-json tasks.json --verify --json', 'Read-only existence check by external key. This makes no specification-equality claim.'),
66
+ ],
67
+ },
68
+ {
69
+ title: 'Name a Project or Goal',
70
+ note: 'Use exact scoped Project/Goal titles, native refs, or canonical IDs. Duplicate names refuse instead of choosing one. A qualified Project supplies containment; a qualified Goal changes the Goal relationship without moving the Task. Project external keys remain exact and case-sensitive, including keys containing slashes.',
71
+ commands: [
72
+ command('tasks create --title "Task title" --space <space-id> --project "Exact project title" --goal "Exact Goal title" --unassigned --dry-run --json', 'Preview exact names inside the selected Space.'),
73
+ command('tasks create --title "Task title" --project "<space-ref>/<project-ref-or-exact-title>" --goal "<space-ref>/<Goal-exact-title>" --unassigned --dry-run --json', 'Preview qualified references; native relationship permissions still apply.'),
74
+ command('tasks create --title "Task title" --space <space-id> --project "<project-external-key>" --unassigned --dry-run --json', 'Reuse an existing Project’s native external key without rewriting it.'),
75
+ ],
76
+ },
77
+ {
78
+ title: 'Edit dependencies',
79
+ note: 'A waits for B: update A with --add-blocked-by B. These commands change dependencies; inspecting a blocker does not remove it.',
80
+ commands: [
81
+ command('tasks update <task-A> --add-blocked-by <task-B>', 'Make A wait for B.'),
82
+ command('tasks update <task-A> --remove-blocked-by <task-B>', 'Remove that dependency when the relationship is no longer intended.'),
83
+ command('tasks update <task-B> --add-blocks <task-A>', 'The same relationship, edited from B.'),
84
+ ],
85
+ },
86
+ {
87
+ title: 'Check execution before starting',
88
+ note: 'Preflight reads server projections at separate times. It runs no shell command and cannot prove machine directory access, tool availability, or future approval. Starting rechecks current authority.',
89
+ commands: [
90
+ command('tasks start <task> --dry-run --json', 'Read only the server-owned execution preview through the dedicated preview endpoint.'),
91
+ command('agents show <agent-id>', 'Inspect the assigned Agent and its configured runtime.'),
92
+ command('harnesses show <harness-id> --json', 'Inspect the actual Harness record and reported provider credential readiness, where available.'),
93
+ command('harnesses installers --daemon <daemon-id>', 'Ask that daemon about installed coding CLIs and sign-in where it can tell; this is not a shell execution test.'),
94
+ command('harnesses ping <harness-id>', 'Explicitly probe a local daemon for reachability; an answer does not prove a provider can run a task.'),
95
+ command('tasks start <task>', 'Start a new Run after reviewing the checks. This command executes work.'),
96
+ ],
97
+ },
98
+ {
99
+ title: 'Follow and finish',
100
+ commands: [
101
+ command('tasks show <task>', 'Inspect current execution and follow the Task link.'),
102
+ command('tasks expectations <task>', 'Read what is owed and how it will be checked.'),
103
+ command('tasks result submit <task> --help', 'Submit the concrete result and evidence.'),
104
+ command('tasks review <task> --help', 'Review another actor’s exact Result.'),
105
+ command('tasks complete <task> --help', 'Submit a Result and close out when appropriate.'),
106
+ command('instructions guide task-management', 'Read the detailed canonical workflow guide; --offline uses the bundled release copy.'),
107
+ ],
108
+ },
109
+ ],
110
+ };
111
+ }
112
+ function taskOperationsGuideLines(bin = 'skrr') {
113
+ const guide = taskOperationsGuide(bin);
114
+ const lines = [guide.title];
115
+ for (const section of guide.sections) {
116
+ lines.push('', section.title);
117
+ if (section.note)
118
+ lines.push(section.note);
119
+ for (const entry of section.commands)
120
+ lines.push(` ${entry.command}\n ${entry.purpose}`);
121
+ }
122
+ return lines;
123
+ }
@@ -0,0 +1,35 @@
1
+ import type { TaskActionabilityResponse } from '@skrr-ai/data-provider';
2
+ type AdmissionPreview = {
3
+ dryRun: true;
4
+ taskId: string;
5
+ taskSpecVersion?: number | null;
6
+ taskRevision?: number | null;
7
+ executionAdmission: import('./task-admission').TaskExecutionAdmission;
8
+ };
9
+ type Observation<T> = {
10
+ status: 'observed';
11
+ certainty: 'server_projection';
12
+ value: T;
13
+ } | {
14
+ status: 'unavailable';
15
+ certainty: 'unknown';
16
+ code: string;
17
+ httpStatus?: number;
18
+ message: string;
19
+ remedy: string;
20
+ };
21
+ export type TaskPreflight = {
22
+ taskId: string;
23
+ summary: 'eligible_to_attempt' | 'blocked' | 'unknown';
24
+ workflow: Observation<TaskActionabilityResponse>;
25
+ execution: Observation<AdmissionPreview>;
26
+ consistency: 'independent_observations';
27
+ limits: string[];
28
+ };
29
+ /** Compose native reads. This module cannot dispatch execution or infer grants. */
30
+ export declare function readTaskPreflight(taskId: string, reads: {
31
+ workflow: () => Promise<unknown>;
32
+ execution: () => Promise<unknown>;
33
+ }): Promise<TaskPreflight>;
34
+ export declare function taskPreflightLines(report: TaskPreflight, bin?: string): string[];
35
+ export {};
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readTaskPreflight = readTaskPreflight;
4
+ exports.taskPreflightLines = taskPreflightLines;
5
+ const task_admission_1 = require("./task-admission");
6
+ const task_operations_1 = require("./task-operations");
7
+ const LIMITS = [
8
+ 'Workflow and execution checks are separate server observations, not an atomic reservation.',
9
+ 'No Run, shell command, machine probe, or branch checkout was performed.',
10
+ 'Tool availability, working-directory access, and successful provider execution remain unverified.',
11
+ 'Starting rechecks current Task authorization, runtime admission, and tool permissions.',
12
+ ];
13
+ function unavailable(error, label) {
14
+ const row = error && typeof error === 'object' ? error : {};
15
+ const status = typeof row.status === 'number' ? row.status : undefined;
16
+ let code = typeof row.code === 'string' && /^[A-Z][A-Z0-9_]{0,100}$/.test(row.code) ? row.code : undefined;
17
+ // Keep the native typed refusal without echoing an arbitrary response body,
18
+ // HTML proxy page, request URL, or credential into diagnostics.
19
+ if (!code && typeof row.body === 'string') {
20
+ try {
21
+ const body = JSON.parse(row.body);
22
+ if (typeof body?.code === 'string' && /^[A-Z][A-Z0-9_]{0,100}$/.test(body.code))
23
+ code = body.code;
24
+ }
25
+ catch { /* non-JSON server refusal */ }
26
+ }
27
+ const remedy = status === 401
28
+ ? 'Restore the current CLI sign-in or delegated runtime credential, then repeat this read-only check.'
29
+ : status === 403
30
+ ? 'Ask the Task owner or an authorized administrator to check your access; preflight does not bypass permissions.'
31
+ : status === 404
32
+ ? 'Check the Task reference and server support for this diagnostic. No start fallback was attempted.'
33
+ : 'Read tasks actionability and tasks start --dry-run separately for the native refusal, then repeat preflight after resolving it.';
34
+ return {
35
+ status: 'unavailable', certainty: 'unknown', code: code || 'TASK_PREFLIGHT_UNAVAILABLE',
36
+ ...(status ? { httpStatus: status } : {}),
37
+ message: `${label} could not be confirmed${status ? ` (HTTP ${status})` : ''}.`, remedy,
38
+ };
39
+ }
40
+ function isWorkflow(value, taskId) {
41
+ if (!value || typeof value !== 'object')
42
+ return false;
43
+ const row = value;
44
+ const a = row.actionability;
45
+ return row.taskId === taskId && Boolean(a &&
46
+ ['ready', 'running', 'waiting', 'terminal'].includes(a.state) &&
47
+ ['agent', 'human', 'system', 'external', 'none'].includes(a.nextActor) &&
48
+ typeof a.reasonCode === 'string' && typeof a.reason === 'string' &&
49
+ (a.actorRefs === undefined || Array.isArray(a.actorRefs) && a.actorRefs.every(ref => ref && ['user', 'agent'].includes(ref.kind) && typeof ref.id === 'string')) &&
50
+ Array.isArray(a.allowedActions) && a.allowedActions.every(action => action &&
51
+ typeof action.action === 'string' && (action.targetId === undefined || typeof action.targetId === 'string')));
52
+ }
53
+ function isPreview(value, taskId) {
54
+ if (!(0, task_admission_1.isAdmissionPreview)(value) || value.taskId !== taskId)
55
+ return false;
56
+ const a = value.executionAdmission;
57
+ return Boolean(typeof a.unattended === 'boolean' && typeof a.approverAvailable === 'boolean' &&
58
+ (a.constraints === undefined || Array.isArray(a.constraints) && a.constraints.every(c => c &&
59
+ (c.message === undefined || typeof c.message === 'string') &&
60
+ (c.requiredAction === undefined || typeof c.requiredAction === 'string'))) &&
61
+ (a.permission === undefined || a.permission && typeof a.permission === 'object' &&
62
+ (a.permission.mode == null || typeof a.permission.mode === 'string') &&
63
+ (a.permission.source === undefined || typeof a.permission.source === 'string')) &&
64
+ (a.shell === undefined || a.shell && typeof a.shell === 'object' &&
65
+ (a.shell.state === undefined || typeof a.shell.state === 'string')) &&
66
+ (a.workingDirectory === undefined || a.workingDirectory &&
67
+ (a.workingDirectory.path === null || typeof a.workingDirectory.path === 'string') &&
68
+ typeof a.workingDirectory.source === 'string'));
69
+ }
70
+ /** Compose native reads. This module cannot dispatch execution or infer grants. */
71
+ async function readTaskPreflight(taskId, reads) {
72
+ const [workflowResult, executionResult] = await Promise.allSettled([
73
+ Promise.resolve().then(reads.workflow), Promise.resolve().then(reads.execution),
74
+ ]);
75
+ const workflow = workflowResult.status === 'fulfilled' && isWorkflow(workflowResult.value, taskId)
76
+ ? { status: 'observed', certainty: 'server_projection', value: workflowResult.value }
77
+ : unavailable(workflowResult.status === 'rejected' ? workflowResult.reason : { code: 'TASK_ACTIONABILITY_UNSUPPORTED' }, 'Workflow actionability');
78
+ const execution = executionResult.status === 'fulfilled' && isPreview(executionResult.value, taskId)
79
+ ? { status: 'observed', certainty: 'server_projection', value: executionResult.value }
80
+ : unavailable(executionResult.status === 'rejected' ? executionResult.reason : { code: 'TASK_START_PREVIEW_UNSUPPORTED' }, 'Execution preview');
81
+ // actionability.revision is the attention revision, not Task.version from
82
+ // start-preview. Equal numbers would not prove the reads shared a snapshot.
83
+ const workflowBlocked = workflow.status === 'observed' &&
84
+ !workflow.value.actionability.allowedActions.some(action => action.action === 'start_task');
85
+ const executionBlocked = execution.status === 'observed' && execution.value.executionAdmission.state === 'blocked';
86
+ const summary = workflowBlocked || executionBlocked ? 'blocked'
87
+ : workflow.status === 'unavailable' || execution.status === 'unavailable' ||
88
+ execution.value.executionAdmission.state !== 'ready' ? 'unknown'
89
+ : 'eligible_to_attempt';
90
+ return { taskId, summary, workflow, execution, consistency: 'independent_observations', limits: [...LIMITS] };
91
+ }
92
+ function taskPreflightLines(report, bin = 'skrr') {
93
+ const lines = [`Task preflight: ${report.taskId}`, `Start eligibility: ${report.summary.replaceAll('_', ' ')} (current server projections)`];
94
+ if (report.workflow.status === 'observed') {
95
+ const a = report.workflow.value.actionability;
96
+ lines.push('', `Workflow: ${a.state} (server projection)`, `Next actor: ${a.nextActor}`, `Why: ${a.reason} [${a.reasonCode}]`);
97
+ if (a.actorRefs?.length)
98
+ lines.push(`Eligible actors: ${a.actorRefs.map(ref => `${ref.kind}:${ref.id}`).join(', ')}`);
99
+ for (const action of a.allowedActions) {
100
+ const command = (0, task_operations_1.taskActionCommand)(action.action, report.taskId, action.targetId, bin, {
101
+ allowedActions: a.allowedActions,
102
+ });
103
+ lines.push(` ${action.action}${command ? ` → ${command}` : ' (no single CLI remedy is mapped)'}`);
104
+ }
105
+ lines.push('Allowed actions describe the workflow; the caller must still have permission to perform them.');
106
+ }
107
+ else
108
+ lines.push('', `Workflow: unknown. ${report.workflow.message} [${report.workflow.code}]`, `Next step: ${report.workflow.remedy}`);
109
+ if (report.execution.status === 'observed') {
110
+ lines.push('', 'Execution prerequisites (server configuration; no execution test):', ...(0, task_admission_1.admissionLines)(report.execution.value.executionAdmission));
111
+ if (report.execution.value.executionAdmission.shell?.state) {
112
+ lines.push(`Shell approval prerequisites: ${report.execution.value.executionAdmission.shell.state} (policy only; shell execution unverified).`);
113
+ }
114
+ if (report.execution.value.executionAdmission.constraints?.length)
115
+ lines.push('Execution remedy owner: not reported by this server; ask the authorized Agent or Harness administrator.');
116
+ }
117
+ else
118
+ lines.push('', `Execution: unknown. ${report.execution.message} [${report.execution.code}]`, `Next step: ${report.execution.remedy}`);
119
+ lines.push('', ...report.limits, `More operations: ${bin} tasks guide`);
120
+ return lines;
121
+ }
@@ -0,0 +1,23 @@
1
+ type RecordValue = Record<string, unknown>;
2
+ export type TaskResourceReferenceCache = Map<string, Promise<unknown>>;
3
+ export type TaskResourceReferenceOptions = {
4
+ existingTask?: RecordValue;
5
+ cache?: TaskResourceReferenceCache;
6
+ resolveSpace: (value: string) => Promise<string>;
7
+ getTask?: (id: string) => Promise<RecordValue>;
8
+ getProject?: (id: string) => Promise<RecordValue>;
9
+ listProjects?: (spaceId: string) => Promise<unknown>;
10
+ listGoals?: (spaceId: string) => Promise<unknown>;
11
+ };
12
+ export declare class TaskResourceReferenceError extends Error {
13
+ readonly code: string;
14
+ readonly candidates: RecordValue[];
15
+ constructor(code: string, message: string, candidates?: RecordValue[]);
16
+ }
17
+ /**
18
+ * Resolve structured-input names as well as flag names, before assignment
19
+ * defaults. UUIDs keep their existing native validation path. A Goal is a
20
+ * relationship, not containment: a qualified Goal never moves its Task.
21
+ */
22
+ export declare function resolveTaskResourceReferences(payload: RecordValue, options: TaskResourceReferenceOptions): Promise<void>;
23
+ export {};