@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
@@ -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 {};
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskResourceReferenceError = void 0;
4
+ exports.resolveTaskResourceReferences = resolveTaskResourceReferences;
5
+ const data_provider_1 = require("@skrr-ai/data-provider");
6
+ const failed_lookup_1 = require("./failed-lookup");
7
+ const projects_1 = require("./projects");
8
+ const UUID = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/i;
9
+ const STORAGE_ID = /^[\da-f]{24}$/i;
10
+ const str = (value) => typeof value === 'string' ? value.trim() : '';
11
+ class TaskResourceReferenceError extends Error {
12
+ code;
13
+ candidates;
14
+ constructor(code, message, candidates = []) {
15
+ super(message);
16
+ this.code = code;
17
+ this.candidates = candidates;
18
+ this.name = 'TaskResourceReferenceError';
19
+ }
20
+ }
21
+ exports.TaskResourceReferenceError = TaskResourceReferenceError;
22
+ function rows(body, kind) {
23
+ const value = body;
24
+ const data = value?.data ?? (kind === 'project' ? value?.projects : undefined);
25
+ if (!Array.isArray(data) || value?.has_more === true) {
26
+ throw new TaskResourceReferenceError('TASK_RESOURCE_LOOKUP_INCOMPLETE', `Cannot safely resolve a ${kind} name from an incomplete or unsupported list. Use its canonical id, or inspect ${kind}s list with --space.`);
27
+ }
28
+ return data.filter((row) => row !== null && typeof row === 'object');
29
+ }
30
+ /** Names are exact, case-insensitive matches. Never choose a fuzzy first hit. */
31
+ function select(kind, query, candidates) {
32
+ const normalize = (v) => str(v).toLowerCase();
33
+ const q = normalize(query);
34
+ const byId = candidates.filter(row => normalize(row.id) === q || normalize(row.identifier) === q || normalize(row.ref) === q);
35
+ // Native project external keys are exact and case-sensitive, and take
36
+ // precedence over a human title, as they do on the project endpoint.
37
+ const byExternalKey = kind === 'project' ? candidates.filter(row => row.externalKey === query) : [];
38
+ const matches = byId.length ? byId : byExternalKey.length ? byExternalKey : candidates.filter(row => normalize(row.title) === q);
39
+ if (matches.length !== 1 || !str(matches[0]?.id)) {
40
+ throw new TaskResourceReferenceError(matches.length > 1 ? 'TASK_RESOURCE_AMBIGUOUS' : 'TASK_RESOURCE_NOT_FOUND', matches.length > 1
41
+ ? `More than one ${kind} matches "${query}". Use a canonical id from ${kind}s list --space <space>.`
42
+ : `No visible ${kind} exactly matches "${query}" in this Space. Inspect ${kind}s list --space <space>, or use a canonical id.`, matches.map(row => ({ id: row.id, identifier: row.identifier, title: row.title })));
43
+ }
44
+ return str(matches[0].id);
45
+ }
46
+ /**
47
+ * Resolve structured-input names as well as flag names, before assignment
48
+ * defaults. UUIDs keep their existing native validation path. A Goal is a
49
+ * relationship, not containment: a qualified Goal never moves its Task.
50
+ */
51
+ async function resolveTaskResourceReferences(payload, options) {
52
+ const cache = options.cache ?? new Map();
53
+ const read = async (key, load) => {
54
+ if (!cache.has(key))
55
+ cache.set(key, load());
56
+ return await cache.get(key);
57
+ };
58
+ const space = (query) => read(`space:${query}`, () => options.resolveSpace(query));
59
+ if (str(payload.spaceId) && !UUID.test(str(payload.spaceId)))
60
+ payload.spaceId = await space(str(payload.spaceId));
61
+ let taskSpace = str(payload.spaceId) || str(options.existingTask?.spaceId);
62
+ const inheritedSpace = async () => {
63
+ if (taskSpace)
64
+ return taskSpace;
65
+ if (str(payload.parentId)) {
66
+ const parentId = str(payload.parentId);
67
+ const parent = await read(`task:${parentId}`, () => options.getTask
68
+ ? options.getTask(parentId) : data_provider_1.dataService.getTask(parentId, { enrich: false }));
69
+ taskSpace = str(parent.spaceId);
70
+ }
71
+ if (!taskSpace && UUID.test(str(payload.projectId))) {
72
+ const id = str(payload.projectId);
73
+ const project = await read(`project:${id}`, () => options.getProject ? options.getProject(id) : projects_1.projectApi.get(id));
74
+ taskSpace = str(project.spaceId);
75
+ if (taskSpace)
76
+ payload.spaceId = taskSpace;
77
+ }
78
+ return taskSpace;
79
+ };
80
+ for (const kind of ['project', 'goal']) {
81
+ const field = kind === 'project' ? 'projectId' : 'goalId';
82
+ const raw = str(payload[field]);
83
+ if (!raw || UUID.test(raw) || STORAGE_ID.test(raw))
84
+ continue;
85
+ if ((0, failed_lookup_1.isFailedLookupValue)(raw))
86
+ throw new TaskResourceReferenceError('TASK_RESOURCE_NOT_A_REFERENCE', `"${raw}" is not a ${kind} reference. Use the id or exact title from ${kind}s list.`);
87
+ const localScope = await inheritedSpace();
88
+ if (localScope) {
89
+ const body = await read(`${kind}s:${localScope}`, () => kind === 'project'
90
+ ? options.listProjects ? options.listProjects(localScope) : data_provider_1.dataService.listSpaceProjects(localScope)
91
+ : options.listGoals ? options.listGoals(localScope) : data_provider_1.dataService.listSpaceGoals(localScope));
92
+ const candidates = rows(body, kind);
93
+ const q = raw.toLowerCase();
94
+ if (candidates.some(row => (kind === 'project' && row.externalKey === raw) ||
95
+ [row.id, row.identifier, row.ref, row.title].some(value => str(value).toLowerCase() === q))) {
96
+ payload[field] = select(kind, raw, candidates);
97
+ continue;
98
+ }
99
+ }
100
+ const slash = raw.indexOf('/');
101
+ const qualified = slash > 0 && slash < raw.length - 1;
102
+ const query = qualified ? raw.slice(slash + 1).trim() : raw;
103
+ const qualifiedSpace = qualified ? await space(raw.slice(0, slash).trim()) : '';
104
+ const scope = qualifiedSpace || localScope;
105
+ if (!scope)
106
+ throw new TaskResourceReferenceError('TASK_RESOURCE_REQUIRES_SPACE', `Resolving a ${kind} name requires --space, a scoped parent, or <space-ref>/<${kind}-ref-or-exact-title>. A canonical id works without a name lookup.`);
107
+ if (kind === 'project' && taskSpace && qualifiedSpace && taskSpace !== qualifiedSpace) {
108
+ throw new TaskResourceReferenceError('PROJECT_SPACE_MISMATCH', 'The qualified project and Task name different Spaces. Correct --space or the project reference; no Task was written.');
109
+ }
110
+ const body = await read(`${kind}s:${scope}`, () => kind === 'project'
111
+ ? options.listProjects ? options.listProjects(scope) : data_provider_1.dataService.listSpaceProjects(scope)
112
+ : options.listGoals ? options.listGoals(scope) : data_provider_1.dataService.listSpaceGoals(scope));
113
+ payload[field] = select(kind, query, rows(body, kind));
114
+ if (kind === 'project' && !taskSpace) {
115
+ taskSpace = scope;
116
+ payload.spaceId = scope;
117
+ }
118
+ }
119
+ }
@@ -0,0 +1,42 @@
1
+ type Task = Record<string, unknown>;
2
+ export type TaskSpecInput = {
3
+ tempId: string;
4
+ id: string;
5
+ expected: Task;
6
+ };
7
+ export type TaskSpecObservation = {
8
+ tempId: string;
9
+ id: string;
10
+ state: 'matched' | 'mismatched' | 'unavailable';
11
+ checkedFields: string[];
12
+ uncheckedFields: Array<{
13
+ field: string;
14
+ reason: string;
15
+ }>;
16
+ mismatches: Array<{
17
+ field: string;
18
+ expected: unknown;
19
+ actual: unknown;
20
+ }>;
21
+ expectationCount?: number;
22
+ specVersion?: unknown;
23
+ error?: string;
24
+ };
25
+ /** Compare declarations, never assessments or whether a lesson/task worked. */
26
+ export declare function compareTaskSpecification(input: TaskSpecInput, actual: Task): TaskSpecObservation;
27
+ /** Bounded native rereads. Failure to read is not evidence of a failed write. */
28
+ export declare function verifyTaskSpecifications(inputs: TaskSpecInput[], read: (id: string) => Promise<Task>): Promise<{
29
+ object: string;
30
+ ok: boolean;
31
+ scope: string;
32
+ assessmentPerformed: boolean;
33
+ summary: {
34
+ total: number;
35
+ matched: number;
36
+ mismatched: number;
37
+ unavailable: number;
38
+ withUncheckedFields: number;
39
+ };
40
+ results: TaskSpecObservation[];
41
+ }>;
42
+ export {};
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.compareTaskSpecification = compareTaskSpecification;
4
+ exports.verifyTaskSpecifications = verifyTaskSpecifications;
5
+ const node_util_1 = require("node:util");
6
+ const data_provider_1 = require("@skrr-ai/data-provider");
7
+ const FIELDS = [
8
+ 'title', 'status', 'priority', 'estimate', 'commitmentId', 'spaceId', 'goalId', 'projectId', 'parentId',
9
+ 'externalKey', 'executionMode', 'reviewPolicy', 'assigneeAgentIds',
10
+ 'assigneeUserIds', 'labelIds', 'tags', 'workingDirectory', 'executionIsolation',
11
+ 'startDate', 'dueDate', 'expectations', 'blocksIds', 'blockedByIds',
12
+ ];
13
+ const SETS = new Set(['labelIds', 'tags', 'blocksIds', 'blockedByIds', 'assigneeAgentIds', 'assigneeUserIds']);
14
+ const DATES = new Set(['startDate', 'dueDate']);
15
+ function comparable(field, value) {
16
+ // Explicit clears may be persisted as an absent field; both mean unset.
17
+ if (value === undefined || value === null)
18
+ return null;
19
+ if (SETS.has(field) && Array.isArray(value))
20
+ return [...new Set(value)].sort();
21
+ if (DATES.has(field) && typeof value === 'string') {
22
+ const time = Date.parse(value);
23
+ return Number.isFinite(time) ? time : value;
24
+ }
25
+ return value;
26
+ }
27
+ function authoredExpectations(value, authored) {
28
+ if (!Array.isArray(value) || !Array.isArray(authored))
29
+ return value;
30
+ return value.map((item, index) => {
31
+ const original = (0, data_provider_1.normalizeTaskExpectationDeclaration)(authored[index]);
32
+ const parsed = (0, data_provider_1.normalizeTaskExpectationDeclaration)(item);
33
+ if (!parsed.ok)
34
+ return item;
35
+ const row = parsed.value;
36
+ return {
37
+ ...(original.ok && original.value.id ? { id: row.id } : {}),
38
+ text: row.text,
39
+ check: row.check ?? { method: 'manual' },
40
+ ...(original.ok && original.value.presetKey ? { presetKey: row.presetKey } : {}),
41
+ };
42
+ });
43
+ }
44
+ /** Compare declarations, never assessments or whether a lesson/task worked. */
45
+ function compareTaskSpecification(input, actual) {
46
+ const checkedFields = FIELDS.filter(field => Object.prototype.hasOwnProperty.call(input.expected, field));
47
+ const mismatches = [];
48
+ if (actual.id !== input.id)
49
+ mismatches.push({ field: 'id', expected: input.id, actual: actual.id ?? null });
50
+ for (const field of checkedFields) {
51
+ const expected = field === 'expectations' ? authoredExpectations(input.expected[field], input.expected[field]) : comparable(field, input.expected[field]);
52
+ const observed = field === 'expectations' ? authoredExpectations(actual[field], input.expected[field]) : comparable(field, actual[field]);
53
+ if (!(0, node_util_1.isDeepStrictEqual)(expected, observed)) {
54
+ mismatches.push({ field, expected: input.expected[field] ?? null, actual: actual[field] ?? null });
55
+ }
56
+ }
57
+ // Rich text is normalized by the native service. A client-side byte compare
58
+ // would assert a false mismatch; report the exact boundary, not a full-spec pass.
59
+ const uncheckedFields = Object.keys(input.expected).filter(field => !checkedFields.includes(field))
60
+ .map(field => ({ field, reason: field === 'description' || field === 'descriptionFormat'
61
+ ? 'Native rich-text normalization; content is not compared by this structured-field check.'
62
+ : 'This authored field is outside the supported structured-field comparator; no equality claim is made.' }));
63
+ return {
64
+ tempId: input.tempId, id: input.id,
65
+ state: mismatches.length ? 'mismatched' : 'matched',
66
+ checkedFields: [...checkedFields], uncheckedFields, mismatches,
67
+ ...(Array.isArray(actual.expectations) ? { expectationCount: actual.expectations.length } : {}),
68
+ ...(actual.specVersion !== undefined ? { specVersion: actual.specVersion } : {}),
69
+ };
70
+ }
71
+ /** Bounded native rereads. Failure to read is not evidence of a failed write. */
72
+ async function verifyTaskSpecifications(inputs, read) {
73
+ const results = [];
74
+ for (let start = 0; start < inputs.length; start += 4) {
75
+ const group = await Promise.all(inputs.slice(start, start + 4).map(async (input) => {
76
+ try {
77
+ return compareTaskSpecification(input, await read(input.id));
78
+ }
79
+ catch (error) {
80
+ return { tempId: input.tempId, id: input.id, state: 'unavailable',
81
+ checkedFields: [], uncheckedFields: [], mismatches: [],
82
+ error: error instanceof Error ? error.message : String(error) };
83
+ }
84
+ }));
85
+ results.push(...group);
86
+ }
87
+ return {
88
+ object: 'task_specification_verification',
89
+ ok: results.every(row => row.state === 'matched'),
90
+ scope: 'declared_structured_fields',
91
+ assessmentPerformed: false,
92
+ summary: {
93
+ total: inputs.length,
94
+ matched: results.filter(row => row.state === 'matched').length,
95
+ mismatched: results.filter(row => row.state === 'mismatched').length,
96
+ unavailable: results.filter(row => row.state === 'unavailable').length,
97
+ withUncheckedFields: results.filter(row => row.uncheckedFields.length > 0).length,
98
+ },
99
+ results,
100
+ };
101
+ }
@@ -0,0 +1,11 @@
1
+ import type { TaskExecutionSnapshot, TaskConversationInputBody, TaskConversationInputReceipt, TaskInputPurpose } from '@skrr-ai/data-provider';
2
+ /** Observation time is not evidence that a worker just sent a heartbeat. */
3
+ export declare function describeExecutionState(state: TaskExecutionSnapshot): string[];
4
+ export declare function buildTaskContinuationBody(input: {
5
+ text: string;
6
+ commandKey?: string;
7
+ purpose?: TaskInputPurpose;
8
+ workflowGeneration: number;
9
+ authorizationGeneration: number;
10
+ }): TaskConversationInputBody;
11
+ export declare function describeTaskContinuation(receipt: TaskConversationInputReceipt): string;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.describeExecutionState = describeExecutionState;
4
+ exports.buildTaskContinuationBody = buildTaskContinuationBody;
5
+ exports.describeTaskContinuation = describeTaskContinuation;
6
+ const node_crypto_1 = require("node:crypto");
7
+ /** Observation time is not evidence that a worker just sent a heartbeat. */
8
+ function describeExecutionState(state) {
9
+ return [
10
+ `Task: ${state.taskId}`,
11
+ `Workflow: ${state.workflowStatus} (generation ${state.workflowGeneration})`,
12
+ `Execution: ${state.execution.runStatus ?? 'not observed'}${state.execution.runId ? `; Run ${state.execution.runId}` : ''}`,
13
+ `Liveness: ${state.liveness.state}; last runtime signal ${state.liveness.lastRuntimeSignalAt ?? 'unavailable'}`,
14
+ `Health: ${state.health.condition}; ${state.health.reason}`,
15
+ ...(state.waiting ? [`Waiting: ${state.waiting.kind}; ${state.waiting.referenceId}`] : []),
16
+ `Work input: ${state.work.latestWorkInputRevision}; ${state.work.pendingCommandCount} pending command(s); ${state.work.queuedExchangeCount} queued exchange(s)`,
17
+ `Result: ${state.result.currentResultId ?? 'none'} (${state.result.applicability})${state.result.reason ? `; ${state.result.reason}` : ''}`,
18
+ `Observed: ${state.observedAt}; consistency ${state.consistency}`,
19
+ ...state.limitations.map((limitation) => `Limitation: ${limitation}`),
20
+ ];
21
+ }
22
+ function buildTaskContinuationBody(input) {
23
+ if (!input.text.trim() || input.text.length > 24000)
24
+ throw new Error('--text must contain 1–24000 characters.');
25
+ const commandKey = input.commandKey ?? `cli-input-${(0, node_crypto_1.randomUUID)()}`;
26
+ if (!commandKey.trim() || commandKey.length > 300)
27
+ throw new Error('--command-key must contain 1–300 characters.');
28
+ if (!Number.isInteger(input.workflowGeneration) || input.workflowGeneration < 1 ||
29
+ !Number.isInteger(input.authorizationGeneration) || input.authorizationGeneration < 1) {
30
+ throw new Error('Workflow and authorization generations must be positive integers.');
31
+ }
32
+ return { commandKey, text: input.text, purpose: input.purpose ?? 'continue_work',
33
+ expectedWorkflowGeneration: input.workflowGeneration,
34
+ expectedAuthorizationGeneration: input.authorizationGeneration };
35
+ }
36
+ function describeTaskContinuation(receipt) {
37
+ const detail = receipt.reason ? `: ${receipt.reason}` : '';
38
+ if (receipt.phase === 'refused')
39
+ return `Task input refused${detail}. Command ${receipt.commandId}.`;
40
+ return `Task input ${receipt.phase}${detail}. Command ${receipt.commandId}; ${receipt.purposeDecision ?? 'classification pending'}${receipt.exchangeId ? `; exchange ${receipt.exchangeId}` : ''}. Execution is reported separately by tasks execution-state.`;
41
+ }
@@ -0,0 +1,26 @@
1
+ import { readRuntimeContext } from './runtime-context';
2
+ export declare const AGENT_BINDING_GUIDANCE: string;
3
+ export declare const ACCOUNT_ATTRIBUTION_NOTICE: string;
4
+ type Principal = {
5
+ kind: string;
6
+ userId?: string;
7
+ agentId?: string;
8
+ service?: string;
9
+ };
10
+ /** Use the persisted server receipt, never the process's claimed Agent identity. */
11
+ export declare function taskWriteAttribution(receipt: unknown, field: 'assessedBy' | 'submittedBy'): {
12
+ bindingGuidance?: string | undefined;
13
+ notice: string | null;
14
+ method?: string | undefined;
15
+ source: "server_receipt";
16
+ principal: Principal | null;
17
+ };
18
+ export declare function attributionLines(attribution: ReturnType<typeof taskWriteAttribution>): string[];
19
+ /** Environment hints explain local execution only; the server verifies every write. */
20
+ export declare function runtimeWriteAttribution(runtime: ReturnType<typeof readRuntimeContext>): {
21
+ authority: "authenticated_server_principal";
22
+ runtimeBinding: string;
23
+ notice: string;
24
+ bindingGuidance: string;
25
+ };
26
+ export {};
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ACCOUNT_ATTRIBUTION_NOTICE = exports.AGENT_BINDING_GUIDANCE = void 0;
4
+ exports.taskWriteAttribution = taskWriteAttribution;
5
+ exports.attributionLines = attributionLines;
6
+ exports.runtimeWriteAttribution = runtimeWriteAttribution;
7
+ exports.AGENT_BINDING_GUIDANCE = 'Assign this runtime in skrr → Engines, then run in its authenticated Agent session. ' +
8
+ 'An --agent flag or an environment Agent id cannot establish authenticated authorship.';
9
+ exports.ACCOUNT_ATTRIBUTION_NOTICE = 'Without authenticated Agent provenance, Task writes are attributed to the signed-in account. ' +
10
+ 'An account-attributed assessment is not proof of an independent human check.';
11
+ /** Use the persisted server receipt, never the process's claimed Agent identity. */
12
+ function taskWriteAttribution(receipt, field) {
13
+ const record = receipt && typeof receipt === 'object' ? receipt : {};
14
+ const entity = record[field === 'assessedBy' ? 'assessment' : 'result'];
15
+ const row = entity && typeof entity === 'object' ? entity : {};
16
+ const value = row[field];
17
+ const principal = value && typeof value === 'object' && typeof value.kind === 'string'
18
+ ? value : null;
19
+ return {
20
+ source: 'server_receipt',
21
+ principal,
22
+ ...(typeof row.method === 'string' ? { method: row.method } : {}),
23
+ notice: principal?.kind === 'human' ? exports.ACCOUNT_ATTRIBUTION_NOTICE
24
+ : !principal ? 'The server receipt did not identify the author; no authorship is inferred from local runtime hints.' : null,
25
+ ...(!principal || principal.kind === 'human' ? { bindingGuidance: exports.AGENT_BINDING_GUIDANCE } : {}),
26
+ };
27
+ }
28
+ function attributionLines(attribution) {
29
+ const actor = attribution.principal;
30
+ return [
31
+ actor ? `Recorded author: ${actor.kind} (${actor.userId || actor.agentId || actor.service || 'id unavailable'}).`
32
+ : 'Recorded author: unavailable in server receipt.',
33
+ ...(attribution.notice ? [attribution.notice] : []),
34
+ ...(attribution.bindingGuidance ? [attribution.bindingGuidance] : []),
35
+ ];
36
+ }
37
+ /** Environment hints explain local execution only; the server verifies every write. */
38
+ function runtimeWriteAttribution(runtime) {
39
+ return {
40
+ authority: 'authenticated_server_principal',
41
+ runtimeBinding: runtime.agent?.boundToSession ? 'session_hint' : 'unbound',
42
+ notice: runtime.agent?.boundToSession
43
+ ? 'Local session binding is a hint. The server verifies Agent provenance and returns the recorded author.'
44
+ : exports.ACCOUNT_ATTRIBUTION_NOTICE,
45
+ bindingGuidance: exports.AGENT_BINDING_GUIDANCE,
46
+ };
47
+ }
@@ -76,6 +76,7 @@ export declare function releasePinRepairGuard(payload: TaskRecord): TaskMutation
76
76
  */
77
77
  export declare function taskUpdateMutationGuard(payload: TaskRecord): TaskMutationGuardFailure | null;
78
78
  export type TaskCreateFlagValues = {
79
+ unassigned?: boolean;
79
80
  template?: string;
80
81
  title?: string;
81
82
  description?: string;
@@ -211,6 +212,18 @@ export declare function applyDaemonSessionDefaults(payload: TaskRecord): void;
211
212
  export declare function validateTaskCreatePayload(payload: TaskRecord): string[];
212
213
  /** Stamp the unambiguous executor so CLI-authored tasks are explicit on day one. */
213
214
  export declare function applyInferredTaskExecutionMode(payload: TaskRecord): void;
215
+ /** A caller's explicit clearing instruction, never a new native field. Flag
216
+ * values override JSON just as named assignment flags do. */
217
+ export declare function applyExplicitTaskUnassignment(payload: TaskRecord, requested: boolean): void;
218
+ export declare function taskUnassignmentFlagError(flags: Record<string, unknown>): string | null;
219
+ /** A projection of a frozen payload or a native returned row, not admission. */
220
+ export declare function taskAssignmentPreview(task: TaskRecord): {
221
+ executor: import("@skrr-ai/data-provider").TaskExecutorResolution;
222
+ assigneeAgentIds: string[];
223
+ assigneeUserIds: string[];
224
+ assigned: boolean;
225
+ startRequested: false;
226
+ };
214
227
  /**
215
228
  * Stamp an executor only when the post-update assignee set is unambiguous.
216
229
  * Existing fields participate when an upsert omits one assignee kind; this
package/dist/lib/tasks.js CHANGED
@@ -17,6 +17,9 @@ exports.boundSessionAgentId = boundSessionAgentId;
17
17
  exports.applyDaemonSessionDefaults = applyDaemonSessionDefaults;
18
18
  exports.validateTaskCreatePayload = validateTaskCreatePayload;
19
19
  exports.applyInferredTaskExecutionMode = applyInferredTaskExecutionMode;
20
+ exports.applyExplicitTaskUnassignment = applyExplicitTaskUnassignment;
21
+ exports.taskUnassignmentFlagError = taskUnassignmentFlagError;
22
+ exports.taskAssignmentPreview = taskAssignmentPreview;
20
23
  exports.applyProspectiveTaskExecutionMode = applyProspectiveTaskExecutionMode;
21
24
  exports.validateTaskCreateReferences = validateTaskCreateReferences;
22
25
  exports.resolveTaskCreateScope = resolveTaskCreateScope;
@@ -384,6 +387,7 @@ function buildTaskCreatePayload(body, flags = {}) {
384
387
  executionIsolation: executionIsolationFromWorktreeFlag(flags.worktree),
385
388
  lifecycle: lifecycleBindingFromFlags(flags),
386
389
  });
390
+ applyExplicitTaskUnassignment(payload, flags.unassigned === true);
387
391
  applyDaemonSessionDefaults(payload);
388
392
  normalizeStringField(payload, 'externalKey', 300);
389
393
  return payload;
@@ -500,14 +504,14 @@ function validateTaskCreatePayload(payload) {
500
504
  !data_provider_1.TASK_EXECUTION_MODES.includes(payload.executionMode)) {
501
505
  errors.push(`executionMode must be one of: ${data_provider_1.TASK_EXECUTION_MODES.join(', ')}`);
502
506
  }
503
- else if (payload.executionMode === 'agent' && agentIds.length === 0) {
504
- errors.push('executionMode=agent requires at least one Agent assignee');
505
- }
506
- else if (payload.executionMode === 'human' && userIds.length === 0) {
507
- errors.push('executionMode=human requires at least one Human assignee');
508
- }
509
- else if (!payload.executionMode && agentIds.length > 0 && userIds.length > 0) {
510
- errors.push('mixed Human and Agent assignees require --execution-mode agent|human');
507
+ else {
508
+ const issue = (0, data_provider_1.taskExecutorAssignmentIssue)({
509
+ executionMode: payload.executionMode,
510
+ assigneeAgentIds: agentIds,
511
+ assigneeUserIds: userIds,
512
+ });
513
+ if (issue)
514
+ errors.push(issue.message);
511
515
  }
512
516
  if (Array.isArray(payload.tags) && payload.tags.length > 50) {
513
517
  errors.push('tags should contain at most 50 entries');
@@ -531,6 +535,49 @@ function validateTaskCreatePayload(payload) {
531
535
  function applyInferredTaskExecutionMode(payload) {
532
536
  applyProspectiveTaskExecutionMode(payload);
533
537
  }
538
+ /** A caller's explicit clearing instruction, never a new native field. Flag
539
+ * values override JSON just as named assignment flags do. */
540
+ function applyExplicitTaskUnassignment(payload, requested) {
541
+ if (!requested)
542
+ return;
543
+ payload.assigneeAgentIds = [];
544
+ payload.assigneeUserIds = [];
545
+ for (const field of [
546
+ 'addAssigneeAgentIds',
547
+ 'removeAssigneeAgentIds',
548
+ 'addAssigneeUserIds',
549
+ 'removeAssigneeUserIds',
550
+ ])
551
+ delete payload[field];
552
+ }
553
+ function taskUnassignmentFlagError(flags) {
554
+ if (!flags.unassigned)
555
+ return null;
556
+ const conflicts = [
557
+ 'default-agent',
558
+ 'assignee-agent',
559
+ 'assignee-user',
560
+ 'add-assignee-agent',
561
+ 'remove-assignee-agent',
562
+ 'add-assignee-user',
563
+ 'remove-assignee-user',
564
+ ].filter((key) => flags[key] !== undefined);
565
+ return conflicts.length
566
+ ? `--unassigned cannot be combined with ${conflicts.map((key) => `--${key}`).join(', ')}. Choose clearing all assignees or naming assignees.`
567
+ : null;
568
+ }
569
+ /** A projection of a frozen payload or a native returned row, not admission. */
570
+ function taskAssignmentPreview(task) {
571
+ const assigneeAgentIds = [...stringArray(task.assigneeAgentIds)];
572
+ const assigneeUserIds = [...stringArray(task.assigneeUserIds)];
573
+ return {
574
+ executor: (0, data_provider_1.resolveTaskExecutor)(task),
575
+ assigneeAgentIds,
576
+ assigneeUserIds,
577
+ assigned: assigneeAgentIds.length + assigneeUserIds.length > 0,
578
+ startRequested: false,
579
+ };
580
+ }
534
581
  /**
535
582
  * Stamp an executor only when the post-update assignee set is unambiguous.
536
583
  * Existing fields participate when an upsert omits one assignee kind; this
@@ -937,14 +984,20 @@ function createPatchFromCreatePayload(payload) {
937
984
  'description',
938
985
  'descriptionFormat',
939
986
  'priority',
987
+ 'estimate',
940
988
  'startDate',
941
989
  'dueDate',
942
990
  'goalId',
991
+ 'projectId',
992
+ 'cycleId',
943
993
  'spaceId',
944
994
  'parentId',
945
995
  'assigneeAgentIds',
946
996
  'assigneeUserIds',
947
997
  'executionMode',
998
+ 'expectations',
999
+ 'reviewPolicy',
1000
+ 'executionIsolation',
948
1001
  'tags',
949
1002
  'labelIds',
950
1003
  // Per-task working-directory override — part of the same execution shape
@@ -457,6 +457,13 @@ export declare function armedLabel(trigger: TriggerDefinition): string;
457
457
  * Marked here so the list says it, not only `triggers show`.
458
458
  */
459
459
  export declare function degradedMarker(trigger: TriggerDefinition): string;
460
+ /**
461
+ * Feed health lines for `triggers show`: whether the sensor stopped itself and
462
+ * why, whether it is backing off, and when the source was last read. A stop
463
+ * the engine made used to be a field nothing printed, so a sensor that had
464
+ * given up looked like one that was switched off.
465
+ */
466
+ export declare function sensorHealthLines(trigger: TriggerDefinition, now?: number): string[];
460
467
  export declare function renderTriggerList(triggers: TriggerDefinition[], log: (line: string) => void): void;
461
468
  /**
462
469
  * The `duplicate_subscription` warning a create response may carry, as the