@skrr-ai/cli 0.1.150 → 0.1.152

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 (429) hide show
  1. package/README.md +20 -20
  2. package/dist/base-command.d.ts +6 -6
  3. package/dist/base-command.js +26 -26
  4. package/dist/commands/agenda/trigger/list.d.ts +1 -1
  5. package/dist/commands/agenda/trigger/list.js +6 -6
  6. package/dist/commands/agents/always-on/disable.js +10 -3
  7. package/dist/commands/agents/always-on/enable.js +1 -1
  8. package/dist/commands/agents/always-on/reconcile.js +1 -1
  9. package/dist/commands/agents/always-on/status.js +31 -8
  10. package/dist/commands/agents/chat.d.ts +3 -0
  11. package/dist/commands/agents/chat.js +27 -0
  12. package/dist/commands/agents/create.d.ts +2 -2
  13. package/dist/commands/agents/create.js +12 -12
  14. package/dist/commands/agents/egress.js +1 -1
  15. package/dist/commands/agents/list.d.ts +1 -1
  16. package/dist/commands/agents/list.js +1 -1
  17. package/dist/commands/agents/plan-day.d.ts +3 -0
  18. package/dist/commands/agents/plan-day.js +31 -8
  19. package/dist/commands/agents/roles/capture.d.ts +1 -1
  20. package/dist/commands/agents/roles/capture.js +2 -2
  21. package/dist/commands/agents/roles/install.js +1 -1
  22. package/dist/commands/agents/show.d.ts +3 -0
  23. package/dist/commands/agents/show.js +59 -3
  24. package/dist/commands/agents/spawn.js +38 -38
  25. package/dist/commands/agents/triggers/list.js +2 -1
  26. package/dist/commands/agents/update.d.ts +1 -1
  27. package/dist/commands/agents/update.js +3 -3
  28. package/dist/commands/balance/usage/breakdown.d.ts +1 -1
  29. package/dist/commands/balance/usage/breakdown.js +22 -6
  30. package/dist/commands/balance/usage/events.d.ts +3 -2
  31. package/dist/commands/balance/usage/events.js +34 -7
  32. package/dist/commands/code/jobs/show.js +1 -1
  33. package/dist/commands/compass/archive.d.ts +1 -1
  34. package/dist/commands/compass/archive.js +1 -1
  35. package/dist/commands/compass/create.js +1 -1
  36. package/dist/commands/compass/{commitments.d.ts → duties.d.ts} +5 -5
  37. package/dist/commands/compass/{commitments.js → duties.js} +14 -14
  38. package/dist/commands/compass/trace.d.ts +1 -1
  39. package/dist/commands/compass/trace.js +2 -2
  40. package/dist/commands/convos/messages.js +2 -1
  41. package/dist/commands/doctor.d.ts +1 -1
  42. package/dist/commands/doctor.js +1 -1
  43. package/dist/commands/{commitments → duties}/accounting.d.ts +7 -7
  44. package/dist/commands/{commitments → duties}/accounting.js +13 -13
  45. package/dist/commands/{commitments → duties}/action-history.d.ts +3 -3
  46. package/dist/commands/{commitments → duties}/action-history.js +12 -12
  47. package/dist/commands/{commitments → duties}/action-proposal.d.ts +2 -2
  48. package/dist/commands/{commitments → duties}/action-proposal.js +6 -6
  49. package/dist/commands/{commitments → duties}/action-proposals/decide.d.ts +2 -2
  50. package/dist/commands/{commitments → duties}/action-proposals/decide.js +8 -8
  51. package/dist/commands/{commitments → duties}/action-proposals/execute.d.ts +2 -2
  52. package/dist/commands/{commitments → duties}/action-proposals/execute.js +7 -7
  53. package/dist/commands/{commitments → duties}/action-proposals/propose.d.ts +4 -4
  54. package/dist/commands/{commitments → duties}/action-proposals/propose.js +15 -15
  55. package/dist/commands/{commitments → duties}/action-proposals.d.ts +1 -1
  56. package/dist/commands/{commitments → duties}/action-proposals.js +6 -6
  57. package/dist/commands/{commitments → duties}/analytics/detail.d.ts +5 -5
  58. package/dist/commands/{commitments → duties}/analytics/detail.js +13 -13
  59. package/dist/commands/{commitments → duties}/analytics/index.d.ts +5 -5
  60. package/dist/commands/{commitments → duties}/analytics/index.js +30 -30
  61. package/dist/commands/{commitments → duties}/analytics/replay.d.ts +3 -3
  62. package/dist/commands/{commitments → duties}/analytics/replay.js +11 -11
  63. package/dist/commands/{commitments → duties}/attach.d.ts +3 -3
  64. package/dist/commands/{commitments → duties}/attach.js +21 -21
  65. package/dist/commands/{commitments → duties}/bundle.d.ts +1 -1
  66. package/dist/commands/{commitments → duties}/bundle.js +7 -7
  67. package/dist/commands/{commitments → duties}/cadence-decisions.d.ts +3 -3
  68. package/dist/commands/duties/cadence-decisions.js +41 -0
  69. package/dist/commands/{commitments → duties}/cadence-requests/decide.d.ts +4 -4
  70. package/dist/commands/{commitments → duties}/cadence-requests/decide.js +11 -11
  71. package/dist/commands/{commitments → duties}/case.d.ts +2 -2
  72. package/dist/commands/{commitments → duties}/case.js +8 -8
  73. package/dist/commands/{commitments → duties}/cases.d.ts +2 -2
  74. package/dist/commands/{commitments → duties}/cases.js +9 -9
  75. package/dist/commands/{commitments → duties}/check-now.d.ts +6 -6
  76. package/dist/commands/{commitments → duties}/check-now.js +29 -29
  77. package/dist/commands/{commitments → duties}/checks.d.ts +3 -3
  78. package/dist/commands/{commitments → duties}/checks.js +13 -13
  79. package/dist/commands/{commitments → duties}/complete.d.ts +2 -2
  80. package/dist/commands/duties/complete.js +40 -0
  81. package/dist/commands/{commitments → duties}/control/apply.d.ts +1 -1
  82. package/dist/commands/{commitments → duties}/control/apply.js +7 -7
  83. package/dist/commands/{commitments → duties}/control/preview.d.ts +1 -1
  84. package/dist/commands/{commitments → duties}/control/preview.js +8 -8
  85. package/dist/commands/{commitments → duties}/control/show.d.ts +1 -1
  86. package/dist/commands/{commitments → duties}/control/show.js +6 -6
  87. package/dist/commands/{commitments → duties}/cost.d.ts +6 -6
  88. package/dist/commands/{commitments → duties}/cost.js +14 -14
  89. package/dist/commands/{commitments → duties}/create.d.ts +8 -8
  90. package/dist/commands/{commitments → duties}/create.js +92 -92
  91. package/dist/commands/{commitments → duties}/cycles.d.ts +2 -2
  92. package/dist/commands/{commitments → duties}/cycles.js +11 -11
  93. package/dist/commands/{commitments → duties}/decide-remediation.d.ts +2 -2
  94. package/dist/commands/{commitments → duties}/decide-remediation.js +6 -6
  95. package/dist/commands/{commitments → duties}/delete.d.ts +4 -4
  96. package/dist/commands/{commitments → duties}/delete.js +24 -24
  97. package/dist/commands/{commitments → duties}/delivery.d.ts +1 -1
  98. package/dist/commands/{commitments → duties}/delivery.js +15 -15
  99. package/dist/commands/{commitments → duties}/detach.d.ts +3 -3
  100. package/dist/commands/{commitments → duties}/detach.js +20 -20
  101. package/dist/commands/{commitments → duties}/doctor.d.ts +4 -4
  102. package/dist/commands/{commitments → duties}/doctor.js +21 -21
  103. package/dist/commands/{commitments → duties}/effective-policy.d.ts +3 -3
  104. package/dist/commands/{commitments → duties}/effective-policy.js +24 -24
  105. package/dist/commands/{commitments → duties}/endpoints/connect.d.ts +2 -2
  106. package/dist/commands/{commitments → duties}/endpoints/connect.js +10 -10
  107. package/dist/commands/{commitments → duties}/endpoints/create.d.ts +3 -3
  108. package/dist/commands/{commitments → duties}/endpoints/create.js +16 -16
  109. package/dist/commands/{commitments → duties}/endpoints/delete.d.ts +3 -3
  110. package/dist/commands/{commitments → duties}/endpoints/delete.js +11 -11
  111. package/dist/commands/{commitments → duties}/endpoints/health.d.ts +2 -2
  112. package/dist/commands/{commitments → duties}/endpoints/health.js +10 -10
  113. package/dist/commands/{commitments → duties}/endpoints/list.d.ts +3 -3
  114. package/dist/commands/{commitments → duties}/endpoints/list.js +11 -11
  115. package/dist/commands/{commitments → duties}/endpoints/revoke.d.ts +4 -4
  116. package/dist/commands/{commitments → duties}/endpoints/revoke.js +13 -13
  117. package/dist/commands/{commitments → duties}/evaluations.d.ts +2 -2
  118. package/dist/commands/{commitments → duties}/evaluations.js +8 -8
  119. package/dist/commands/{commitments → duties}/execute-remediation.d.ts +2 -2
  120. package/dist/commands/{commitments → duties}/execute-remediation.js +7 -7
  121. package/dist/commands/{commitments → duties}/explain.d.ts +2 -2
  122. package/dist/commands/{commitments → duties}/explain.js +13 -13
  123. package/dist/commands/{commitments → duties}/export.d.ts +3 -3
  124. package/dist/commands/{commitments → duties}/export.js +15 -15
  125. package/dist/commands/{commitments → duties}/feedback.d.ts +4 -4
  126. package/dist/commands/{commitments → duties}/feedback.js +13 -13
  127. package/dist/commands/{commitments → duties}/fork.d.ts +3 -3
  128. package/dist/commands/{commitments → duties}/fork.js +11 -11
  129. package/dist/commands/{commitments → duties}/goals/link.d.ts +6 -6
  130. package/dist/commands/duties/goals/link.js +41 -0
  131. package/dist/commands/{commitments → duties}/goals/unlink.d.ts +4 -4
  132. package/dist/commands/duties/goals/unlink.js +37 -0
  133. package/dist/commands/{commitments → duties}/handover.d.ts +5 -5
  134. package/dist/commands/{commitments → duties}/handover.js +21 -21
  135. package/dist/commands/{commitments → duties}/hypotheses.d.ts +3 -3
  136. package/dist/commands/{commitments → duties}/hypotheses.js +13 -13
  137. package/dist/commands/{commitments → duties}/import.d.ts +2 -2
  138. package/dist/commands/{commitments → duties}/import.js +10 -10
  139. package/dist/commands/{commitments → duties}/ledger.d.ts +4 -4
  140. package/dist/commands/{commitments → duties}/ledger.js +12 -12
  141. package/dist/commands/{commitments → duties}/lineage.d.ts +5 -5
  142. package/dist/commands/duties/lineage.js +43 -0
  143. package/dist/commands/{commitments → duties}/links/create.d.ts +2 -2
  144. package/dist/commands/{commitments → duties}/links/create.js +9 -9
  145. package/dist/commands/{commitments → duties}/links/detach.d.ts +2 -2
  146. package/dist/commands/{commitments → duties}/links/detach.js +7 -7
  147. package/dist/commands/{commitments → duties}/links/list.d.ts +2 -2
  148. package/dist/commands/{commitments → duties}/links/list.js +9 -9
  149. package/dist/commands/{commitments → duties}/links/update.d.ts +2 -2
  150. package/dist/commands/{commitments → duties}/links/update.js +7 -7
  151. package/dist/commands/{commitments → duties}/list.d.ts +3 -3
  152. package/dist/commands/{commitments → duties}/list.js +17 -17
  153. package/dist/commands/{commitments → duties}/liveness.d.ts +6 -6
  154. package/dist/commands/{commitments → duties}/liveness.js +13 -13
  155. package/dist/commands/{commitments → duties}/metrics.d.ts +3 -3
  156. package/dist/commands/{commitments → duties}/metrics.js +12 -12
  157. package/dist/commands/{commitments → duties}/next-tick.d.ts +7 -7
  158. package/dist/commands/{commitments → duties}/next-tick.js +14 -14
  159. package/dist/commands/{commitments → duties}/observation/probe.d.ts +1 -1
  160. package/dist/commands/{commitments → duties}/observation/probe.js +12 -12
  161. package/dist/commands/{commitments → duties}/observation/summary.d.ts +1 -1
  162. package/dist/commands/duties/observation/summary.js +53 -0
  163. package/dist/commands/{commitments → duties}/observations.d.ts +4 -4
  164. package/dist/commands/{commitments → duties}/observations.js +18 -18
  165. package/dist/commands/{commitments → duties}/open.d.ts +1 -1
  166. package/dist/commands/{commitments → duties}/open.js +13 -13
  167. package/dist/commands/{commitments → duties}/operating-review.d.ts +5 -5
  168. package/dist/commands/{commitments → duties}/operating-review.js +21 -21
  169. package/dist/commands/{commitments → duties}/pack/activate.d.ts +1 -1
  170. package/dist/commands/{commitments → duties}/pack/activate.js +6 -6
  171. package/dist/commands/{commitments → duties}/pack/bind.d.ts +4 -4
  172. package/dist/commands/{commitments → duties}/pack/bind.js +19 -19
  173. package/dist/commands/{commitments → duties}/pack/list.d.ts +2 -2
  174. package/dist/commands/{commitments → duties}/pack/list.js +10 -10
  175. package/dist/commands/{commitments → duties}/pack/plan.d.ts +3 -3
  176. package/dist/commands/{commitments → duties}/pack/plan.js +12 -12
  177. package/dist/commands/{commitments → duties}/pack/preflight.d.ts +3 -3
  178. package/dist/commands/{commitments → duties}/pack/preflight.js +10 -10
  179. package/dist/commands/{commitments → duties}/patch.d.ts +1 -1
  180. package/dist/commands/{commitments → duties}/patch.js +7 -7
  181. package/dist/commands/{commitments → duties}/pause.d.ts +2 -2
  182. package/dist/commands/{commitments → duties}/pause.js +16 -16
  183. package/dist/commands/{commitments → duties}/plan.d.ts +4 -4
  184. package/dist/commands/{commitments → duties}/plan.js +20 -20
  185. package/dist/commands/{commitments → duties}/preflight.d.ts +8 -8
  186. package/dist/commands/{commitments → duties}/preflight.js +32 -32
  187. package/dist/commands/{commitments → duties}/propose-remediation.d.ts +2 -2
  188. package/dist/commands/{commitments → duties}/propose-remediation.js +6 -6
  189. package/dist/commands/{commitments → duties}/readiness/show.d.ts +1 -1
  190. package/dist/commands/{commitments → duties}/readiness/show.js +6 -6
  191. package/dist/commands/{commitments → duties}/readiness/verify.d.ts +1 -1
  192. package/dist/commands/{commitments → duties}/readiness/verify.js +7 -7
  193. package/dist/commands/{commitments → duties}/receipt-metrics.d.ts +4 -4
  194. package/dist/commands/{commitments → duties}/receipt-metrics.js +16 -16
  195. package/dist/commands/{commitments → duties}/receipt.d.ts +1 -1
  196. package/dist/commands/{commitments → duties}/receipt.js +10 -10
  197. package/dist/commands/{commitments → duties}/reflect.d.ts +4 -4
  198. package/dist/commands/{commitments → duties}/reflect.js +12 -12
  199. package/dist/commands/{commitments → duties}/reflection-decision.d.ts +2 -2
  200. package/dist/commands/{commitments → duties}/reflection-decision.js +7 -7
  201. package/dist/commands/{commitments → duties}/reflection.d.ts +2 -2
  202. package/dist/commands/{commitments → duties}/reflection.js +9 -9
  203. package/dist/commands/{commitments → duties}/remediate.d.ts +5 -5
  204. package/dist/commands/{commitments → duties}/remediate.js +14 -14
  205. package/dist/commands/{commitments → duties}/remediation-proposal.d.ts +2 -2
  206. package/dist/commands/{commitments → duties}/remediation-proposal.js +7 -7
  207. package/dist/commands/{commitments → duties}/remediation-proposals.d.ts +2 -2
  208. package/dist/commands/{commitments → duties}/remediation-proposals.js +8 -8
  209. package/dist/commands/{commitments → duties}/reports.d.ts +5 -5
  210. package/dist/commands/{commitments → duties}/reports.js +35 -35
  211. package/dist/commands/{commitments → duties}/restore.d.ts +2 -2
  212. package/dist/commands/duties/restore.js +46 -0
  213. package/dist/commands/{commitments → duties}/resume.d.ts +2 -2
  214. package/dist/commands/duties/resume.js +37 -0
  215. package/dist/commands/{commitments → duties}/roster.d.ts +2 -2
  216. package/dist/commands/duties/roster.js +39 -0
  217. package/dist/commands/{commitments → duties}/show.d.ts +7 -7
  218. package/dist/commands/{commitments → duties}/show.js +40 -40
  219. package/dist/commands/{commitments → duties}/status.d.ts +3 -3
  220. package/dist/commands/duties/status.js +41 -0
  221. package/dist/commands/{commitments → duties}/subject.d.ts +4 -4
  222. package/dist/commands/{commitments → duties}/subject.js +29 -29
  223. package/dist/commands/{commitments → duties}/trace.d.ts +3 -3
  224. package/dist/commands/{commitments → duties}/trace.js +12 -12
  225. package/dist/commands/{commitments → duties}/trigger-status.d.ts +6 -6
  226. package/dist/commands/{commitments → duties}/trigger-status.js +19 -19
  227. package/dist/commands/{commitments → duties}/update.d.ts +5 -5
  228. package/dist/commands/{commitments → duties}/update.js +64 -64
  229. package/dist/commands/{commitments → duties}/wake-capabilities.d.ts +6 -6
  230. package/dist/commands/{commitments → duties}/wake-capabilities.js +22 -22
  231. package/dist/commands/{commitments → duties}/work-plan.d.ts +1 -1
  232. package/dist/commands/{commitments → duties}/work-plan.js +6 -6
  233. package/dist/commands/goals/key-results/show.js +2 -1
  234. package/dist/commands/goals/plan-now.js +3 -2
  235. package/dist/commands/goals/planner-compare.d.ts +1 -1
  236. package/dist/commands/goals/planner-compare.js +13 -2
  237. package/dist/commands/grants/create.d.ts +1 -1
  238. package/dist/commands/grants/create.js +9 -9
  239. package/dist/commands/grants/list.d.ts +1 -1
  240. package/dist/commands/grants/list.js +2 -2
  241. package/dist/commands/harnesses/list.d.ts +2 -1
  242. package/dist/commands/harnesses/list.js +7 -5
  243. package/dist/commands/harnesses/models.js +1 -1
  244. package/dist/commands/harnesses/quota.d.ts +9 -11
  245. package/dist/commands/harnesses/quota.js +83 -18
  246. package/dist/commands/harnesses/show.js +1 -1
  247. package/dist/commands/harnesses/usage.d.ts +19 -0
  248. package/dist/commands/harnesses/usage.js +27 -7
  249. package/dist/commands/initiatives/list.d.ts +1 -1
  250. package/dist/commands/initiatives/list.js +1 -1
  251. package/dist/commands/measures/create.d.ts +2 -2
  252. package/dist/commands/measures/create.js +4 -4
  253. package/dist/commands/measures/list.d.ts +1 -1
  254. package/dist/commands/measures/list.js +2 -2
  255. package/dist/commands/memory/topics/create.js +4 -1
  256. package/dist/commands/northstars/create.js +4 -4
  257. package/dist/commands/northstars/delete.d.ts +3 -3
  258. package/dist/commands/northstars/delete.js +8 -8
  259. package/dist/commands/northstars/governance/configure.js +15 -15
  260. package/dist/commands/northstars/intents/decide.d.ts +1 -1
  261. package/dist/commands/northstars/intents/decide.js +1 -1
  262. package/dist/commands/northstars/link.d.ts +4 -4
  263. package/dist/commands/northstars/link.js +8 -8
  264. package/dist/commands/northstars/list.d.ts +2 -2
  265. package/dist/commands/northstars/list.js +3 -3
  266. package/dist/commands/northstars/recommendations/apply.d.ts +1 -1
  267. package/dist/commands/northstars/recommendations/apply.js +2 -2
  268. package/dist/commands/northstars/review-now.js +2 -2
  269. package/dist/commands/northstars/show.d.ts +3 -3
  270. package/dist/commands/northstars/show.js +5 -5
  271. package/dist/commands/northstars/unlink.d.ts +3 -3
  272. package/dist/commands/northstars/unlink.js +6 -6
  273. package/dist/commands/northstars/update.js +3 -3
  274. package/dist/commands/proposals/list.d.ts +3 -3
  275. package/dist/commands/proposals/list.js +7 -7
  276. package/dist/commands/spaces/auto-executor/compare.js +1 -1
  277. package/dist/commands/spaces/auto-executor/runs.js +1 -1
  278. package/dist/commands/spaces/heartbeats/list.js +2 -2
  279. package/dist/commands/spaces/index.js +2 -2
  280. package/dist/commands/spaces/list.d.ts +1 -1
  281. package/dist/commands/spaces/list.js +1 -1
  282. package/dist/commands/spaces/loops/migrate.d.ts +1 -1
  283. package/dist/commands/spaces/loops/migrate.js +1 -1
  284. package/dist/commands/spaces/loops/release.d.ts +1 -1
  285. package/dist/commands/spaces/loops/release.js +10 -10
  286. package/dist/commands/spaces/notebook.d.ts +2 -2
  287. package/dist/commands/spaces/notebook.js +2 -2
  288. package/dist/commands/spaces/proposals/discard.js +1 -1
  289. package/dist/commands/spaces/proposals/keep.js +1 -1
  290. package/dist/commands/spaces/triggers/show.js +3 -3
  291. package/dist/commands/spaces/write-policy/set.js +1 -1
  292. package/dist/commands/store/uninstall.js +2 -2
  293. package/dist/commands/subscriptions/health.d.ts +2 -2
  294. package/dist/commands/subscriptions/health.js +2 -2
  295. package/dist/commands/subscriptions/status.js +2 -2
  296. package/dist/commands/subscriptions/subscribe.js +4 -4
  297. package/dist/commands/tasks/create.d.ts +20 -1
  298. package/dist/commands/tasks/create.js +44 -3
  299. package/dist/commands/tasks/list.d.ts +7 -1
  300. package/dist/commands/tasks/list.js +2 -1
  301. package/dist/commands/tokens/create.d.ts +3 -4
  302. package/dist/commands/tokens/create.js +20 -7
  303. package/dist/commands/triggers/preflight.js +9 -2
  304. package/dist/generated/agent-guides.json +496 -496
  305. package/dist/generated/managed-instruction-guides.json +2 -2
  306. package/dist/hooks/command-not-found.d.ts +1 -1
  307. package/dist/hooks/command-not-found.js +1 -1
  308. package/dist/lib/agent-chat-start.js +2 -1
  309. package/dist/lib/agent-model-check.js +3 -1
  310. package/dist/lib/agent-trigger-listing.d.ts +4 -4
  311. package/dist/lib/agent-trigger-listing.js +7 -7
  312. package/dist/lib/agentic-stream.js +6 -7
  313. package/dist/lib/always-on-command-result.d.ts +8 -1
  314. package/dist/lib/always-on-command-result.js +11 -2
  315. package/dist/lib/auth-failure.js +1 -1
  316. package/dist/lib/balance.d.ts +5 -2
  317. package/dist/lib/balance.js +26 -0
  318. package/dist/lib/capability-matrix.d.ts +3 -3
  319. package/dist/lib/capability-matrix.js +9 -9
  320. package/dist/lib/command-hygiene.js +6 -6
  321. package/dist/lib/command-miss.js +1 -1
  322. package/dist/lib/compass-refusals.d.ts +1 -1
  323. package/dist/lib/compass-refusals.js +1 -1
  324. package/dist/lib/compasses.d.ts +5 -5
  325. package/dist/lib/compasses.js +15 -15
  326. package/dist/lib/config.d.ts +1 -1
  327. package/dist/lib/config.js +1 -0
  328. package/dist/lib/dedicated-machines.js +2 -1
  329. package/dist/lib/dedicated-power.js +2 -0
  330. package/dist/lib/{commitments.d.ts → duties.d.ts} +198 -198
  331. package/dist/lib/{commitments.js → duties.js} +282 -282
  332. package/dist/lib/{commitment-analytics.d.ts → duty-analytics.d.ts} +18 -18
  333. package/dist/lib/{commitment-analytics.js → duty-analytics.js} +12 -12
  334. package/dist/lib/{commitment-attention-copy.d.ts → duty-attention-copy.d.ts} +6 -6
  335. package/dist/lib/{commitment-attention-copy.js → duty-attention-copy.js} +8 -8
  336. package/dist/lib/{commitment-endpoints.d.ts → duty-endpoints.d.ts} +6 -6
  337. package/dist/lib/{commitment-endpoints.js → duty-endpoints.js} +10 -10
  338. package/dist/lib/{commitment-event-wakes.d.ts → duty-event-wakes.d.ts} +2 -2
  339. package/dist/lib/{commitment-event-wakes.js → duty-event-wakes.js} +2 -2
  340. package/dist/lib/{commitment-ledgers.js → duty-ledgers.js} +3 -3
  341. package/dist/lib/{commitment-loop-status.d.ts → duty-loop-status.d.ts} +11 -11
  342. package/dist/lib/{commitment-loop-status.js → duty-loop-status.js} +22 -22
  343. package/dist/lib/{commitment-product.d.ts → duty-product.d.ts} +6 -6
  344. package/dist/lib/{commitment-product.js → duty-product.js} +5 -5
  345. package/dist/lib/{commitment-terms.d.ts → duty-terms.d.ts} +9 -9
  346. package/dist/lib/{commitment-terms.js → duty-terms.js} +21 -21
  347. package/dist/lib/entity-open.d.ts +1 -1
  348. package/dist/lib/entity-open.js +1 -1
  349. package/dist/lib/format.d.ts +1 -1
  350. package/dist/lib/grants.d.ts +3 -3
  351. package/dist/lib/grants.js +2 -2
  352. package/dist/lib/harness-labels.d.ts +1 -0
  353. package/dist/lib/harness-labels.js +4 -0
  354. package/dist/lib/harnesses.d.ts +35 -0
  355. package/dist/lib/harnesses.js +8 -0
  356. package/dist/lib/initiatives.js +4 -4
  357. package/dist/lib/machines.d.ts +2 -1
  358. package/dist/lib/machines.js +2 -2
  359. package/dist/lib/node-adapter.js +1 -1
  360. package/dist/lib/northstars.d.ts +13 -13
  361. package/dist/lib/northstars.js +56 -56
  362. package/dist/lib/open-target.js +1 -1
  363. package/dist/lib/preflight-copy.js +5 -5
  364. package/dist/lib/proactiveApi.d.ts +4 -4
  365. package/dist/lib/proposals.js +16 -16
  366. package/dist/lib/publicEndpoints.generated.d.ts +4 -0
  367. package/dist/lib/publicEndpoints.generated.js +4 -0
  368. package/dist/lib/responsibility-controls.d.ts +1 -1
  369. package/dist/lib/responsibility-controls.js +6 -6
  370. package/dist/lib/roles.d.ts +1 -1
  371. package/dist/lib/schedule.d.ts +6 -5
  372. package/dist/lib/schedule.js +5 -5
  373. package/dist/lib/session-task-write.d.ts +1 -1
  374. package/dist/lib/session-task-write.js +2 -2
  375. package/dist/lib/space-loop-migration.js +6 -6
  376. package/dist/lib/space-notebook.js +2 -2
  377. package/dist/lib/space-write-policy.js +2 -2
  378. package/dist/lib/stewardship-output.js +2 -2
  379. package/dist/lib/task-spec-verification.js +1 -1
  380. package/dist/lib/tasks.d.ts +1 -1
  381. package/dist/lib/tasks.js +8 -8
  382. package/dist/lib/triggers.d.ts +5 -5
  383. package/dist/lib/triggers.js +25 -16
  384. package/dist/lib/update-check.d.ts +1 -1
  385. package/dist/lib/update-check.js +12 -8
  386. package/dist/lib/usage-discovery.js +2 -4
  387. package/dist/lib/web-url.d.ts +6 -6
  388. package/dist/lib/web-url.js +13 -13
  389. package/dist/lib/workspaces.d.ts +4 -4
  390. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/{commitmentExecutionContract.d.ts → dutyExecutionContract.d.ts} +7 -7
  391. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/{commitmentExecutionContract.js → dutyExecutionContract.js} +22 -22
  392. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceipt.js +1 -1
  393. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/executorStopReceiptV2.js +1 -1
  394. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.d.ts +9 -9
  395. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionPermissionAuthority.js +5 -5
  396. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +2 -2
  397. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +4 -4
  398. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +1 -1
  399. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +1 -1
  400. package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/workspaceIsolationProbeWire.d.ts +1 -1
  401. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/{commitmentExecutionContract.d.ts → dutyExecutionContract.d.ts} +7 -7
  402. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/{commitmentExecutionContract.js → dutyExecutionContract.js} +16 -16
  403. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceipt.js +1 -1
  404. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/executorStopReceiptV2.js +1 -1
  405. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/profilePorts.js +1 -1
  406. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.d.ts +9 -9
  407. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionPermissionAuthority.js +8 -8
  408. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +2 -2
  409. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +6 -6
  410. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +1 -1
  411. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +1 -1
  412. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.d.ts +1 -1
  413. package/dist/node_modules/@skrr-ai/auth-core/dist/esm/workspaceIsolationProbeWire.js +1 -1
  414. package/dist/node_modules/@skrr-ai/auth-core/package.json +6 -6
  415. package/dist/node_modules/@skrr-ai/data-provider/index.js +8295 -8283
  416. package/docs/v1/lookback-plans.md +1 -1
  417. package/oclif.manifest.json +5356 -5333
  418. package/package.json +16 -16
  419. package/dist/commands/commitments/cadence-decisions.js +0 -41
  420. package/dist/commands/commitments/complete.js +0 -40
  421. package/dist/commands/commitments/goals/link.js +0 -41
  422. package/dist/commands/commitments/goals/unlink.js +0 -37
  423. package/dist/commands/commitments/lineage.js +0 -43
  424. package/dist/commands/commitments/observation/summary.js +0 -31
  425. package/dist/commands/commitments/restore.js +0 -46
  426. package/dist/commands/commitments/resume.js +0 -37
  427. package/dist/commands/commitments/roster.js +0 -39
  428. package/dist/commands/commitments/status.js +0 -41
  429. /package/dist/lib/{commitment-ledgers.d.ts → duty-ledgers.d.ts} +0 -0
@@ -5,10 +5,10 @@ exports.wakePolicyLines = wakePolicyLines;
5
5
  exports.describeUnavailable = describeUnavailable;
6
6
  const core_1 = require("@oclif/core");
7
7
  const base_command_1 = require("../../base-command");
8
- const commitments_1 = require("../../lib/commitments");
8
+ const duties_1 = require("../../lib/duties");
9
9
  const format_1 = require("../../lib/format");
10
- const commitment_event_wakes_1 = require("../../lib/commitment-event-wakes");
11
- const commitment_attention_copy_1 = require("../../lib/commitment-attention-copy");
10
+ const duty_event_wakes_1 = require("../../lib/duty-event-wakes");
11
+ const duty_attention_copy_1 = require("../../lib/duty-attention-copy");
12
12
  /**
13
13
  * The headline used to stop at "configured sources may wake the Agent within lifecycle and execution
14
14
  * budgets", over a column marked ACTIVE, which read as bound while `trigger-status` said no event
@@ -29,18 +29,18 @@ function wakePolicyLines(result) {
29
29
  if (!wakes) {
30
30
  return [
31
31
  wakePolicyHeadline(),
32
- `${pickable} \`skrr commitments trigger-status <id>\` shows what is bound.`,
32
+ `${pickable} \`skrr duties trigger-status <id>\` shows what is bound.`,
33
33
  ];
34
34
  }
35
35
  const lines = [wakePolicyHeadline(), pickable];
36
- if (wakes.commitmentStatus !== 'active') {
37
- lines.push(`The Commitment's status is ${wakes.commitmentStatus}, so none of this wakes it.`);
36
+ if (wakes.dutyStatus !== 'active') {
37
+ lines.push(`The Duty's status is ${wakes.dutyStatus}, so none of this wakes it.`);
38
38
  }
39
39
  lines.push(`Cadence mode: ${wakes.cadenceMode ?? 'unknown'}`);
40
- lines.push(...(0, commitment_event_wakes_1.eventWakeLines)(wakes.eventCapabilities));
40
+ lines.push(...(0, duty_event_wakes_1.eventWakeLines)(wakes.eventCapabilities));
41
41
  lines.push('`materialized` means a trigger exists, not that it is enabled or can fire (Always-On, the upstream ' +
42
- 'installation): `skrr commitments trigger-status <id>` lists each binding with its state.');
43
- if (wakes.commitmentStatus === 'active' && wakes.agentChosenEventWaits > 0) {
42
+ 'installation): `skrr duties trigger-status <id>` lists each binding with its state.');
43
+ if (wakes.dutyStatus === 'active' && wakes.agentChosenEventWaits > 0) {
44
44
  lines.push(`The Agent has ${wakes.agentChosenEventWaits} event wait(s) of its own set (enabled trigger rows); the cadence does not gate those.`);
45
45
  }
46
46
  return lines;
@@ -57,25 +57,25 @@ function describeUnavailable(reason) {
57
57
  }
58
58
  }
59
59
  /**
60
- * `skrr commitments wake-capabilities <id>` — which wakes an Agent may pick.
60
+ * `skrr duties wake-capabilities <id>` — which wakes an Agent may pick.
61
61
  *
62
62
  * Two lists, and the difference between them is the whole point:
63
- * ELIGIBLE — what this commitment's sensors/grants make technically possible.
63
+ * ELIGIBLE — what this duty's sensors/grants make technically possible.
64
64
  * VISIBLE — what the wake permission policy actually offers the Agent.
65
65
  *
66
66
  * A capability that is eligible but not visible is a deliberate refusal, not a
67
67
  * misconfiguration. Showing only one list would make those indistinguishable.
68
68
  */
69
- class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
69
+ class DutiesWakeCapabilities extends base_command_1.BaseCommand {
70
70
  // A working command an operator cannot discover is an observability gap, not
71
71
  // a product simplification — surfaced by dogfood (OSK-10941).
72
- static description = 'Inspect configured wake-source diagnostics for a commitment';
72
+ static description = 'Inspect configured wake-source diagnostics for a duty';
73
73
  static examples = [
74
- '<%= config.bin %> commitments wake-capabilities obj_abc123',
75
- '<%= config.bin %> commitments wake-capabilities obj_abc123 --json',
74
+ '<%= config.bin %> duties wake-capabilities obj_abc123',
75
+ '<%= config.bin %> duties wake-capabilities obj_abc123 --json',
76
76
  ];
77
77
  static args = {
78
- commitmentId: core_1.Args.string({ ignoreStdin: true, description: 'Commitment ID', required: true }),
78
+ dutyId: core_1.Args.string({ ignoreStdin: true, description: 'Duty ID', required: true }),
79
79
  };
80
80
  static flags = {
81
81
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -83,10 +83,10 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
83
83
  };
84
84
  async run() {
85
85
  this.requireAuth();
86
- const { args, flags } = await this.parse(CommitmentsWakeCapabilities);
86
+ const { args, flags } = await this.parse(DutiesWakeCapabilities);
87
87
  let result;
88
88
  try {
89
- result = await commitments_1.commitmentApi.wakeCapabilities(args.commitmentId);
89
+ result = await duties_1.dutyApi.wakeCapabilities(args.dutyId);
90
90
  }
91
91
  catch (err) {
92
92
  this.handleApiError(err);
@@ -99,11 +99,11 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
99
99
  this.log(line);
100
100
  // The owner's allowlist of event sources (OSK-21113): the response does not carry it, and for
101
101
  // unset, [], a bogus name and a real source this output was byte-identical. Read from the
102
- // Commitment's own policy; unread, the line is left out rather than claim "all allowed".
102
+ // Duty's own policy; unread, the line is left out rather than claim "all allowed".
103
103
  try {
104
- const policy = (await commitments_1.commitmentApi.get(args.commitmentId))?.commitment?.policy;
104
+ const policy = (await duties_1.dutyApi.get(args.dutyId))?.duty?.policy;
105
105
  if (policy) {
106
- this.log(`Event sources: ${(0, commitment_attention_copy_1.describeEventSources)(policy.executionBudget?.allowedEventSources)}`);
106
+ this.log(`Event sources: ${(0, duty_attention_copy_1.describeEventSources)(policy.executionBudget?.allowedEventSources)}`);
107
107
  }
108
108
  }
109
109
  catch {
@@ -127,4 +127,4 @@ class CommitmentsWakeCapabilities extends base_command_1.BaseCommand {
127
127
  }
128
128
  }
129
129
  }
130
- exports.default = CommitmentsWakeCapabilities;
130
+ exports.default = DutiesWakeCapabilities;
@@ -1,5 +1,5 @@
1
1
  import { BaseCommand } from '../../base-command';
2
- export default class CommitmentsWorkPlan extends BaseCommand {
2
+ export default class DutiesWorkPlan extends BaseCommand {
3
3
  static description: string;
4
4
  static args: {
5
5
  id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const base_command_1 = require("../../base-command");
5
- const commitments_1 = require("../../lib/commitments");
6
- class CommitmentsWorkPlan extends base_command_1.BaseCommand {
5
+ const duties_1 = require("../../lib/duties");
6
+ class DutiesWorkPlan extends base_command_1.BaseCommand {
7
7
  static description = 'Read permission-filtered delegated assignments and workflow episodes for a responsibility';
8
- static args = { id: core_1.Args.string({ description: 'Commitment ID', required: true, ignoreStdin: true }) };
8
+ static args = { id: core_1.Args.string({ description: 'Duty ID', required: true, ignoreStdin: true }) };
9
9
  static flags = { json: core_1.Flags.boolean({ description: 'Output the complete public work-plan projection as JSON' }) };
10
10
  async run() {
11
11
  this.requireAuth();
12
- const { args, flags } = await this.parse(CommitmentsWorkPlan);
12
+ const { args, flags } = await this.parse(DutiesWorkPlan);
13
13
  try {
14
- const plan = await commitments_1.commitmentApi.workPlan(args.id);
14
+ const plan = await duties_1.dutyApi.workPlan(args.id);
15
15
  if (flags.json) {
16
16
  this.log(JSON.stringify(plan, null, 2));
17
17
  return;
@@ -33,4 +33,4 @@ class CommitmentsWorkPlan extends base_command_1.BaseCommand {
33
33
  }
34
34
  }
35
35
  }
36
- exports.default = CommitmentsWorkPlan;
36
+ exports.default = DutiesWorkPlan;
@@ -4,6 +4,7 @@ const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
5
  const base_command_1 = require("../../../base-command");
6
6
  const history_1 = require("./history");
7
+ const RUN_RE = /\s+/g;
7
8
  /**
8
9
  * `skrr goals key-results show <goal-id> <kr-id>` — full detail for one key
9
10
  * result. Wraps `GET /api/goals/:goalId/key-results/:krId` (data-provider
@@ -60,7 +61,7 @@ class GoalsKeyResultsShow extends base_command_1.BaseCommand {
60
61
  }
61
62
  this.log(`Activity: ${activity ? `${activity.done} of ${activity.total} linked task(s) done` : '-'}`);
62
63
  if (assessment) {
63
- const why = assessment.rationale?.replace(/\s+/g, ' ').trim();
64
+ const why = assessment.rationale?.replace(RUN_RE, ' ').trim();
64
65
  this.log(`Judged: ${String(assessment.at ?? '')
65
66
  .slice(0, 19)
66
67
  .replace('T', ' ')}`);
@@ -72,7 +72,7 @@ function describePlannerReason(reason) {
72
72
  case 'one_voice_busy':
73
73
  return 'another agent was already speaking for this owner, so the tick stayed quiet';
74
74
  case 'goal_loop_holds_turn':
75
- return "a goal_advance loop holds this goal's planning turn, so the planner stood down (ask the loop instead: `commitments check-now <id>`; cancelling it or detaching its advance link hands the goal back)";
75
+ return "a goal_advance loop holds this goal's planning turn, so the planner stood down (ask the loop instead: `duties check-now <id>`; cancelling it or detaching its advance link hands the goal back)";
76
76
  case 'goal_turn_unreadable':
77
77
  return 'whether a goal_advance loop holds this goal could not be read, so the planner did not run';
78
78
  default:
@@ -195,6 +195,7 @@ class GoalsPlanNow extends base_command_1.BaseCommand {
195
195
  this.log(` backfilled: ${r.backfilledCount} existing task(s) tagged to the space.`);
196
196
  }
197
197
  this.log(` Watch \`${this.config.bin} goals tasks ${args.id}\` for what it creates.`);
198
+ this.log(` Check \`${this.config.bin} goals planner-compare ${args.id}\` for the latest planner failure.`);
198
199
  return;
199
200
  }
200
201
  if (plannerTickDidNotRun(r)) {
@@ -208,7 +209,7 @@ class GoalsPlanNow extends base_command_1.BaseCommand {
208
209
  const retry = transient
209
210
  ? ` Re-run \`${this.config.bin} goals plan-now ${args.id}\` to try again.`
210
211
  : '';
211
- const loop = r?.commitmentId ? ` The loop is commitment ${r.commitmentId}.` : '';
212
+ const loop = r?.dutyId ? ` The loop is duty ${r.dutyId}.` : '';
212
213
  this.failWithCliError({
213
214
  message: `The planner did not run for goal ${args.id}` +
214
215
  (reasonText ? `: ${reasonText}.` : '.') +
@@ -12,7 +12,7 @@ export declare function comparisonLines(result: GoalPlanningComparison): string[
12
12
  * the key results (the planner never does), its open and failed work is no
13
13
  * worse than the planner's, the key results it held over moved no worse, and
14
14
  * concurrent turns are 0. Every stop of the loop is explained in its Cycles
15
- * (`commitments cycles <id>`).
15
+ * (`duties cycles <id>`).
16
16
  */
17
17
  export default class GoalsPlannerCompare extends BaseCommand {
18
18
  static description: string;
@@ -27,7 +27,7 @@ function holderNowLabel(current) {
27
27
  if (current.holder === 'goal_planner')
28
28
  return 'the Goal planner';
29
29
  if (current.holder === 'goal_loop') {
30
- return `the goal_advance loop ${current.commitmentId ?? ''}`.trim();
30
+ return `the goal_advance loop ${current.dutyId ?? ''}`.trim();
31
31
  }
32
32
  return 'unknown (could not be read)';
33
33
  }
@@ -50,6 +50,17 @@ function comparisonLines(result) {
50
50
  lines.push(`${pad('Planner ticks held')}${String(result.goalPlanner.ticks).padEnd(column)}${result.goalLoop.ticks}`);
51
51
  const plannerTurns = Object.values(result.goalPlanner.notes).reduce((a, b) => a + b, 0);
52
52
  lines.push(`${pad('Turns')}${countsLine(plannerTurns, result.goalPlanner.notes).padEnd(column)}${countsLine(result.goalLoop.turns.total, result.goalLoop.turns.byStatus)}`);
53
+ const failure = result.goalPlanner.latestFailure;
54
+ if (failure) {
55
+ const detail = failure.code === 'INFERENCE_TARGET_UNAVAILABLE'
56
+ ? 'The configured inference target was unavailable. Check the Agent harness and daemon connection, then retry.'
57
+ : failure.code === 'INFERENCE_AGENT_UNAVAILABLE'
58
+ ? 'The configured Agent is unavailable. Check the Goal owner Agent, then retry.'
59
+ : failure.code === 'INFERENCE_OUTCOME_UNKNOWN'
60
+ ? 'The inference outcome is unknown. Check for existing results before retrying.'
61
+ : 'The planner failed; the cause was not recorded. Check the planner logs.';
62
+ lines.push(`Latest planner failure (${failure.at}): ${detail}`);
63
+ }
53
64
  lines.push(`${pad('Tasks created')}${String(result.goalPlanner.created).padEnd(column)}${result.goalLoop.tasksCreated}`);
54
65
  lines.push(`${pad('Tasks refined')}${String(result.goalPlanner.refined).padEnd(column)}not counted`);
55
66
  lines.push(`${pad('Key results judged')}${'never'.padEnd(column)}${result.goalLoop.keyResultJudgments}`);
@@ -87,7 +98,7 @@ function comparisonLines(result) {
87
98
  * the key results (the planner never does), its open and failed work is no
88
99
  * worse than the planner's, the key results it held over moved no worse, and
89
100
  * concurrent turns are 0. Every stop of the loop is explained in its Cycles
90
- * (`commitments cycles <id>`).
101
+ * (`duties cycles <id>`).
91
102
  */
92
103
  class GoalsPlannerCompare extends base_command_1.BaseCommand {
93
104
  static description = "Compare the Goal planner with the Goal's goal_advance loop: who held the planning turn, the Goal each held it over, and whether their turns overlapped";
@@ -17,7 +17,7 @@ export default class GrantsCreate extends BaseCommand {
17
17
  static flags: {
18
18
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
19
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
- commitment: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ duty: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
21
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
22
22
  label: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
23
23
  access: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -16,17 +16,17 @@ const data_provider_1 = require("@skrr-ai/data-provider");
16
16
  * The value is stored encrypted and cannot be read back — keep your own copy.
17
17
  */
18
18
  class GrantsCreate extends base_command_1.BaseCommand {
19
- static description = 'Create a credential grant for an agent or commitment';
19
+ static description = 'Create a credential grant for an agent or duty';
20
20
  static examples = [
21
21
  '<%= config.bin %> grants create --agent <agent-id> --provider aws --label "AWS read-only" --env AWS_ACCESS_KEY_ID=AKIA... --env AWS_SECRET_ACCESS_KEY=...',
22
- '<%= config.bin %> grants create --commitment <commitment-id> --provider stripe --label Billing --env STRIPE_API_KEY=sk_live_... --daemon',
22
+ '<%= config.bin %> grants create --duty <duty-id> --provider stripe --label Billing --env STRIPE_API_KEY=sk_live_... --daemon',
23
23
  ];
24
24
  static args = {};
25
25
  static flags = {
26
26
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
27
27
  agent: core_1.Flags.string({ description: 'Agent ID this grant is issued to' }),
28
- commitment: core_1.Flags.string({
29
- description: 'Commitment ID this grant is issued to (tighter blast radius than an agent)',
28
+ duty: core_1.Flags.string({
29
+ description: 'Duty ID this grant is issued to (tighter blast radius than an agent)',
30
30
  }),
31
31
  provider: core_1.Flags.string({ description: 'Provider slug (e.g. aws, stripe)', required: true }),
32
32
  label: core_1.Flags.string({ description: 'Human label', required: true }),
@@ -53,11 +53,11 @@ class GrantsCreate extends base_command_1.BaseCommand {
53
53
  async run() {
54
54
  this.requireAuth();
55
55
  const { flags } = await this.parse(GrantsCreate);
56
- if (!flags.agent && !flags.commitment) {
57
- this.error('Specify --agent or --commitment: a grant must name the principal that holds it.');
56
+ if (!flags.agent && !flags.duty) {
57
+ this.error('Specify --agent or --duty: a grant must name the principal that holds it.');
58
58
  }
59
- if (flags.agent && flags.commitment) {
60
- this.error('Specify only one of --agent / --commitment.');
59
+ if (flags.agent && flags.duty) {
60
+ this.error('Specify only one of --agent / --duty.');
61
61
  }
62
62
  let env;
63
63
  try {
@@ -69,7 +69,7 @@ class GrantsCreate extends base_command_1.BaseCommand {
69
69
  const grant = await grants_1.grantApi.create({
70
70
  principal: flags.agent
71
71
  ? { kind: 'agent', agentId: flags.agent }
72
- : { kind: 'commitment', commitmentId: flags.commitment },
72
+ : { kind: 'duty', dutyId: flags.duty },
73
73
  provider: flags.provider,
74
74
  label: flags.label,
75
75
  ...(flags.access ? { access: flags.access } : {}),
@@ -11,7 +11,7 @@ export default class GrantsList extends BaseCommand {
11
11
  static flags: {
12
12
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
13
13
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
- commitment: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ duty: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
15
  provider: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
16
  };
17
17
  run(): Promise<void>;
@@ -21,7 +21,7 @@ class GrantsList extends base_command_1.BaseCommand {
21
21
  static flags = {
22
22
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
23
23
  agent: core_1.Flags.string({ description: 'Filter by agent ID' }),
24
- commitment: core_1.Flags.string({ description: 'Filter by commitment ID' }),
24
+ duty: core_1.Flags.string({ description: 'Filter by duty ID' }),
25
25
  provider: core_1.Flags.string({ description: 'Filter by provider (e.g. aws)' }),
26
26
  };
27
27
  async run() {
@@ -29,7 +29,7 @@ class GrantsList extends base_command_1.BaseCommand {
29
29
  const { flags } = await this.parse(GrantsList);
30
30
  const response = await grants_1.grantApi.list((0, triggers_1.withQuery)('/api/grants', {
31
31
  agentId: flags.agent,
32
- commitmentId: flags.commitment,
32
+ dutyId: flags.duty,
33
33
  provider: flags.provider,
34
34
  }));
35
35
  if (flags.json) {
@@ -13,6 +13,7 @@ export type HarnessRow = {
13
13
  name?: string;
14
14
  model?: string;
15
15
  status?: string;
16
+ presenceStatus?: 'connected' | 'unconfirmed' | 'unknown';
16
17
  harnessLocation?: string;
17
18
  lastSeenAt?: string;
18
19
  metadata?: {
@@ -125,7 +126,7 @@ export type HarnessSelection = {
125
126
  * machine replaced; the filter accepted only online|offline, so the one value
126
127
  * that says "never coming back" could be read and never selected.
127
128
  */
128
- export declare const HARNESS_STATUS_FILTERS: readonly ["online", "offline", "superseded"];
129
+ export declare const HARNESS_STATUS_FILTERS: readonly ["online", "offline", "unconfirmed", "unknown", "superseded"];
129
130
  /**
130
131
  * The status to ask the SERVER for. Only `online` narrows there.
131
132
  *
@@ -130,7 +130,7 @@ const MANAGED_REGISTRATION_SOURCES = new Set([
130
130
  * machine replaced; the filter accepted only online|offline, so the one value
131
131
  * that says "never coming back" could be read and never selected.
132
132
  */
133
- exports.HARNESS_STATUS_FILTERS = ['online', 'offline', 'superseded'];
133
+ exports.HARNESS_STATUS_FILTERS = ['online', 'offline', 'unconfirmed', 'unknown', 'superseded'];
134
134
  /**
135
135
  * The status to ask the SERVER for. Only `online` narrows there.
136
136
  *
@@ -225,7 +225,9 @@ function selectHarnessRows(rows, options) {
225
225
  });
226
226
  }
227
227
  const sorted = [...filtered].sort(compareHarnessRows);
228
- const shown = options.onlineOnly ? sorted.filter((r) => r.status === 'online') : sorted;
228
+ const shown = options.onlineOnly
229
+ ? sorted.filter((r) => r.status === 'online' && (!r.presenceStatus || r.presenceStatus === 'connected'))
230
+ : sorted;
229
231
  const limited = options.limit != null && options.limit > 0 ? shown.slice(0, options.limit) : shown;
230
232
  return {
231
233
  visible: limited,
@@ -268,7 +270,7 @@ function buildHarnessesJson(selection, filters, defaults = {}, readiness) {
268
270
  hiddenByLocal: selection.hiddenByLocal,
269
271
  hiddenByLimit: selection.hiddenByLimit,
270
272
  hiddenSuperseded: selection.hiddenSuperseded,
271
- online: selection.visible.filter((r) => r.status === 'online').length,
273
+ online: selection.visible.filter((r) => r.status === 'online' && (!r.presenceStatus || r.presenceStatus === 'connected')).length,
272
274
  },
273
275
  };
274
276
  }
@@ -347,8 +349,8 @@ function canonicalHarnessRows(rows) {
347
349
  }
348
350
  /** Online first, then most-recently-seen first — the row you want is row 1. */
349
351
  function compareHarnessRows(a, b) {
350
- const aOffline = a.status === 'online' ? 0 : 1;
351
- const bOffline = b.status === 'online' ? 0 : 1;
352
+ const aOffline = a.status === 'online' && (!a.presenceStatus || a.presenceStatus === 'connected') ? 0 : 1;
353
+ const bOffline = b.status === 'online' && (!b.presenceStatus || b.presenceStatus === 'connected') ? 0 : 1;
352
354
  if (aOffline !== bOffline)
353
355
  return aOffline - bOffline;
354
356
  return lastSeenMs(b) - lastSeenMs(a);
@@ -54,7 +54,7 @@ function curatedReasonClause(report) {
54
54
  case 'no_live_catalog_for_harness':
55
55
  return `${provider} has no way to list its own models, so this list is the catalog`;
56
56
  case 'daemon_offline':
57
- return `the machine running ${provider} is offline, so its live model list could not be read`;
57
+ return `this server has no live connection to the ${provider} daemon, so its model list could not be read`;
58
58
  case 'live_catalog_unsupported':
59
59
  return `the daemon on that machine does not offer a live model list — update it to get one`;
60
60
  case 'live_probe_failed':
@@ -1,4 +1,5 @@
1
1
  import { BaseCommand } from '../../base-command';
2
+ import { type CurrentQuotaReport } from '../../lib/harnesses';
2
3
  /**
3
4
  * Claude Code / Codex subscription quota, over time.
4
5
  *
@@ -24,17 +25,9 @@ import { BaseCommand } from '../../base-command';
24
25
  /**
25
26
  * WHY this window is empty — without asserting a cause we cannot know.
26
27
  *
27
- * OSK-7616 — this used to read "Runs started outside skrr still move the
28
- * provider meter above, but cannot be priced here", which names one
29
- * explanation as though it were the only one. In the reported case it was the
30
- * wrong one: three Codex turns were started THROUGH skrr, completed, and were
31
- * recorded at zero tokens because the harness reported an empty usage envelope.
32
- * The reader was told, by the one screen whose job is answering "what is my
33
- * agent costing me", that the cause was something they had not done.
34
- *
35
- * The second sentence is the one that was missing, and it is the actionable
36
- * half: a run skrr saw and could not price is a reportable defect, not a
37
- * property of the user's habits.
28
+ * The meter belongs to the provider account; our token ledger is per harness
29
+ * and may include several machines. An empty table does not identify the cause
30
+ * of missing usage, and recorded tokens do not imply a reported price.
38
31
  */
39
32
  export declare function unpricedWindowLines(): string[];
40
33
  export default class HarnessesQuota extends BaseCommand {
@@ -43,6 +36,7 @@ export default class HarnessesQuota extends BaseCommand {
43
36
  static flags: {
44
37
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
45
38
  account: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
39
+ current: import("@oclif/core/interfaces").BooleanFlag<boolean>;
46
40
  series: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
47
41
  windows: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
48
42
  days: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
@@ -61,3 +55,7 @@ export default class HarnessesQuota extends BaseCommand {
61
55
  private renderWindows;
62
56
  private renderDailySpend;
63
57
  }
58
+ /** Refuse an incompatible or malformed response rather than interpreting it as empty quota. */
59
+ export declare function isCurrentQuotaReport(value: unknown, provider: 'claude' | 'codex'): value is CurrentQuotaReport;
60
+ /** Describe only observed readings; none establishes current provider readiness. */
61
+ export declare function currentQuotaLines(report: CurrentQuotaReport): string[];
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.unpricedWindowLines = unpricedWindowLines;
4
+ exports.isCurrentQuotaReport = isCurrentQuotaReport;
5
+ exports.currentQuotaLines = currentQuotaLines;
4
6
  const core_1 = require("@oclif/core");
5
7
  const base_command_1 = require("../../base-command");
6
8
  const data_provider_1 = require("@skrr-ai/data-provider");
@@ -32,22 +34,15 @@ const quota_render_1 = require("../../lib/quota-render");
32
34
  /**
33
35
  * WHY this window is empty — without asserting a cause we cannot know.
34
36
  *
35
- * OSK-7616 — this used to read "Runs started outside skrr still move the
36
- * provider meter above, but cannot be priced here", which names one
37
- * explanation as though it were the only one. In the reported case it was the
38
- * wrong one: three Codex turns were started THROUGH skrr, completed, and were
39
- * recorded at zero tokens because the harness reported an empty usage envelope.
40
- * The reader was told, by the one screen whose job is answering "what is my
41
- * agent costing me", that the cause was something they had not done.
42
- *
43
- * The second sentence is the one that was missing, and it is the actionable
44
- * half: a run skrr saw and could not price is a reportable defect, not a
45
- * property of the user's habits.
37
+ * The meter belongs to the provider account; our token ledger is per harness
38
+ * and may include several machines. An empty table does not identify the cause
39
+ * of missing usage, and recorded tokens do not imply a reported price.
46
40
  */
47
41
  function unpricedWindowLines() {
48
42
  return [
49
- 'The provider meter above counts every run on this harness; this table counts only the runs skrr priced.',
50
- 'A run started outside skrr is never priced here. A run started THROUGH skrr should be — if one is missing, its harness reported no token usage, which is a bug worth reporting.',
43
+ 'The provider meter is for the account and may include activity outside skrr. Skrr usage is recorded per harness and is not tied to a provider account.',
44
+ 'A missing run may be outside the requested history or may not have reported token usage. Recorded tokens do not necessarily include a reported cost.',
45
+ 'Check --since-days for the history range, and inspect recorded runs below.',
51
46
  ' skrr harnesses usage # the runs skrr did see',
52
47
  ];
53
48
  }
@@ -58,7 +53,8 @@ class HarnessesQuota extends base_command_1.BaseCommand {
58
53
  '<%= config.bin %> harnesses quota --provider codex',
59
54
  '<%= config.bin %> harnesses quota --series weekly --windows 8',
60
55
  '<%= config.bin %> harnesses quota --days 30',
61
- '<%= config.bin %> harnesses quota --json',
56
+ '<%= config.bin %> harnesses quota --since-days 1 --json',
57
+ '<%= config.bin %> harnesses quota --current --json',
62
58
  ];
63
59
  static flags = {
64
60
  provider: core_1.Flags.string({
@@ -69,14 +65,18 @@ class HarnessesQuota extends base_command_1.BaseCommand {
69
65
  account: core_1.Flags.string({
70
66
  description: 'External account id, when several are reporting. Defaults to the newest.',
71
67
  }),
68
+ current: core_1.Flags.boolean({
69
+ description: 'Show recent observed quota only; no history or spend (requires a supporting server)',
70
+ exclusive: ['series', 'windows', 'days', 'since-days'],
71
+ }),
72
72
  series: core_1.Flags.string({
73
73
  description: 'Which limit window the detail sections describe',
74
74
  default: 'session',
75
75
  }),
76
- windows: core_1.Flags.integer({ description: 'How many recent windows to list', default: 8 }),
77
- days: core_1.Flags.integer({ description: 'How many days of spend to list', default: 14 }),
76
+ windows: core_1.Flags.integer({ description: 'How many recent windows to list in text output', default: 8 }),
77
+ days: core_1.Flags.integer({ description: 'How many days of spend to list in text output', default: 14 }),
78
78
  'since-days': core_1.Flags.integer({
79
- description: 'How much history to read. Clamped server-side to the 90-day retention.',
79
+ description: 'How much history to read (default 90 days). Controls JSON size; clamped to 90 days.',
80
80
  }),
81
81
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
82
82
  };
@@ -84,6 +84,27 @@ class HarnessesQuota extends base_command_1.BaseCommand {
84
84
  this.requireAuth();
85
85
  const { flags } = await this.parse(HarnessesQuota);
86
86
  const provider = flags.provider === 'codex' ? 'codex' : 'claude';
87
+ if (flags.current) {
88
+ let report;
89
+ try {
90
+ report = await (0, harnesses_1.getCurrentQuota)({ provider, externalAccountId: flags.account });
91
+ }
92
+ catch (err) {
93
+ if (typeof err === 'object' && err !== null && 'status' in err && err.status === 404) {
94
+ this.failWithCliError({ message: 'This server does not support --current. Use --since-days 1 for history.', code: 'QUOTA_CURRENT_UNSUPPORTED', status: 404, exit: 1, retryable: false });
95
+ }
96
+ this.handleApiError(err);
97
+ }
98
+ if (!isCurrentQuotaReport(report, provider)) {
99
+ this.failWithCliError({ message: 'This server returned an unsupported current quota response. Use --since-days 1 for history.', code: 'QUOTA_CURRENT_UNSUPPORTED', exit: 1, retryable: false });
100
+ }
101
+ if (flags.json)
102
+ this.log(JSON.stringify(report, null, 2));
103
+ else
104
+ for (const line of currentQuotaLines(report))
105
+ this.log(line);
106
+ return;
107
+ }
87
108
  let accounts;
88
109
  try {
89
110
  accounts = (await (0, harnesses_1.listQuotaAccounts)()).accounts ?? [];
@@ -202,7 +223,7 @@ class HarnessesQuota extends base_command_1.BaseCommand {
202
223
  // The meter can move with nothing in our ledger, so an empty table here
203
224
  // is a real and common state that must not read as "you spent nothing".
204
225
  this.log('');
205
- this.log('No skrr-recorded token spend in this window.');
226
+ this.log('No skrr-recorded token spend in the requested history.');
206
227
  for (const line of unpricedWindowLines()) {
207
228
  this.log(line);
208
229
  }
@@ -231,3 +252,47 @@ class HarnessesQuota extends base_command_1.BaseCommand {
231
252
  }
232
253
  }
233
254
  exports.default = HarnessesQuota;
255
+ /** Refuse an incompatible or malformed response rather than interpreting it as empty quota. */
256
+ function isCurrentQuotaReport(value, provider) {
257
+ if (!value || typeof value !== 'object')
258
+ return false;
259
+ const report = value;
260
+ if (report.version !== 1 || report.scope !== 'recent_quota_observations' || report.provider !== provider ||
261
+ !Number.isFinite(report.observedAt) || !Number.isFinite(report.sampleFrom) ||
262
+ report.sampleFrom > report.observedAt || !Number.isInteger(report.sampleLimit) || report.sampleLimit <= 0 || report.sampleLimit > 200 || typeof report.truncated !== 'boolean' ||
263
+ !Array.isArray(report.limitations) || !report.limitations.every((item) => typeof item === 'string') ||
264
+ !Array.isArray(report.readings) || report.readings.length > report.sampleLimit)
265
+ return false;
266
+ if (report.account === null && (report.readings.length > 0 || report.truncated))
267
+ return false;
268
+ if (report.account !== null && (!report.account || typeof report.account.externalAccountId !== 'string' ||
269
+ !Number.isFinite(report.account.lastSeenAt) ||
270
+ (report.account.accountLabel !== null && typeof report.account.accountLabel !== 'string')))
271
+ return false;
272
+ return report.readings.every((r) => r && typeof r.limitType === 'string' && typeof r.scopeKey === 'string' &&
273
+ Number.isFinite(r.capturedAt) && Number.isFinite(r.utilization) && r.utilization >= 0 && r.utilization <= 100 &&
274
+ (r.resetsAt === null || Number.isFinite(r.resetsAt)) && typeof r.stale === 'boolean' &&
275
+ typeof r.rateLimited === 'boolean' && ['unknown', 'elapsed', 'upcoming'].includes(r.resetState));
276
+ }
277
+ /** Describe only observed readings; none establishes current provider readiness. */
278
+ function currentQuotaLines(report) {
279
+ const text = (value) => value.replace(/[\u0000-\u001f\u007f-\u009f]/g, ' ').trim();
280
+ const lines = [
281
+ `Recent quota observations (${(0, format_1.localZone)()}); this is not a readiness check or a bill.`,
282
+ 'Only observations from the last 24 hours are shown; other limits may be missing.',
283
+ ];
284
+ if (!report.account)
285
+ return [...lines, 'No matching account was observed in the retained history.'];
286
+ lines.push(`Account: ${text(report.account.accountLabel ?? report.account.externalAccountId)} · ID ${text(report.account.externalAccountId)} · last seen ${(0, format_1.localStamp)(report.account.lastSeenAt)}`);
287
+ lines.push('The most recently reporting account may not be the one signed in on this machine; use --account to choose another.');
288
+ if (report.truncated)
289
+ lines.push(`Only the newest ${report.sampleLimit} samples were examined; other limits may be missing.`);
290
+ if (report.readings.length === 0)
291
+ return [...lines, 'No samples in the last 24 hours; current quota is unknown.'];
292
+ for (const reading of report.readings) {
293
+ const reset = reading.resetState === 'unknown' ? 'reset unknown' : reading.resetState === 'elapsed' ? `reset elapsed ${(0, format_1.localStamp)(reading.resetsAt)}` : `resets ${(0, format_1.localStamp)(reading.resetsAt)}`;
294
+ const notes = [reading.stale ? 'stale' : null, reading.rateLimited ? '429 observed near sample' : null].filter(Boolean);
295
+ lines.push(`${text(reading.limitType)}${reading.scopeKey ? ` (${text(reading.scopeKey)})` : ''}: ${reading.utilization}% observed ${(0, format_1.localStamp)(reading.capturedAt)} · ${reset}${notes.length ? ` · ${notes.join(', ')}` : ''}`);
296
+ }
297
+ return lines;
298
+ }
@@ -81,7 +81,7 @@ class HarnessesShow extends base_command_1.BaseCommand {
81
81
  // Asked of the daemon, so only for a live local row; best-effort.
82
82
  const readiness = harness.daemonId &&
83
83
  harness.harnessLocation === 'local' &&
84
- harness.status === 'online' &&
84
+ (0, harness_labels_1.harnessStatusLabel)(harness) === 'online' &&
85
85
  !harness.superseded
86
86
  ? await (0, cli_installers_1.readinessByProvider)(harness.daemonId, this.resolvedCredential)
87
87
  : null;