@skrr-ai/cli 0.1.21 → 0.1.23

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 (245) hide show
  1. package/README.md +83 -73
  2. package/bin/dev-fallback.js +221 -0
  3. package/bin/run.js +43 -0
  4. package/dist/base-command.d.ts +15 -0
  5. package/dist/base-command.js +71 -10
  6. package/dist/commands/agents/attach-harness.d.ts +37 -0
  7. package/dist/commands/agents/attach-harness.js +102 -3
  8. package/dist/commands/agents/chat.d.ts +69 -1
  9. package/dist/commands/agents/chat.js +202 -22
  10. package/dist/commands/agents/create.d.ts +38 -0
  11. package/dist/commands/agents/create.js +95 -2
  12. package/dist/commands/agents/schedule-trace.js +11 -0
  13. package/dist/commands/agents/show.js +29 -1
  14. package/dist/commands/api-keys/create.d.ts +24 -0
  15. package/dist/commands/api-keys/create.js +80 -0
  16. package/dist/commands/api-keys/list.d.ts +11 -0
  17. package/dist/commands/api-keys/list.js +42 -0
  18. package/dist/commands/api-keys/revoke.d.ts +14 -0
  19. package/dist/commands/api-keys/revoke.js +33 -0
  20. package/dist/commands/api-keys/rotate.d.ts +19 -0
  21. package/dist/commands/api-keys/rotate.js +42 -0
  22. package/dist/commands/balance/index.d.ts +18 -0
  23. package/dist/commands/balance/index.js +29 -0
  24. package/dist/commands/balance/show.d.ts +25 -0
  25. package/dist/commands/balance/show.js +60 -0
  26. package/dist/commands/balance/statement.d.ts +19 -0
  27. package/dist/commands/balance/statement.js +52 -0
  28. package/dist/commands/browser/doctor.d.ts +11 -0
  29. package/dist/commands/browser/doctor.js +11 -0
  30. package/dist/commands/code/jobs/approve.d.ts +25 -0
  31. package/dist/commands/code/jobs/approve.js +52 -0
  32. package/dist/commands/code/jobs/cancel.d.ts +12 -0
  33. package/dist/commands/code/jobs/cancel.js +39 -0
  34. package/dist/commands/code/jobs/index.d.ts +19 -0
  35. package/dist/commands/code/jobs/index.js +38 -0
  36. package/dist/commands/code/jobs/list.d.ts +12 -0
  37. package/dist/commands/code/jobs/list.js +87 -0
  38. package/dist/commands/code/jobs/run.d.ts +32 -0
  39. package/dist/commands/code/jobs/run.js +151 -0
  40. package/dist/commands/code/jobs/show.d.ts +12 -0
  41. package/dist/commands/code/jobs/show.js +86 -0
  42. package/dist/commands/commitments/create.d.ts +1 -0
  43. package/dist/commands/commitments/create.js +19 -5
  44. package/dist/commands/commitments/preflight.js +18 -4
  45. package/dist/commands/commitments/receipt-metrics.d.ts +39 -0
  46. package/dist/commands/commitments/receipt-metrics.js +78 -0
  47. package/dist/commands/convos/search.js +5 -5
  48. package/dist/commands/harnesses/leases/list.d.ts +3 -0
  49. package/dist/commands/harnesses/leases/list.js +59 -12
  50. package/dist/commands/harnesses/leases/show.js +36 -0
  51. package/dist/commands/harnesses/list.d.ts +18 -0
  52. package/dist/commands/harnesses/list.js +30 -0
  53. package/dist/commands/harnesses/products.js +48 -3
  54. package/dist/commands/harnesses/quota.d.ts +16 -0
  55. package/dist/commands/harnesses/quota.js +26 -1
  56. package/dist/commands/harnesses/usage.js +17 -0
  57. package/dist/commands/inbox/index.d.ts +2 -1
  58. package/dist/commands/inbox/index.js +27 -4
  59. package/dist/commands/login.js +4 -1
  60. package/dist/commands/machines/list.d.ts +1 -0
  61. package/dist/commands/machines/list.js +33 -5
  62. package/dist/commands/memory/approvals/issue.d.ts +18 -0
  63. package/dist/commands/memory/approvals/issue.js +63 -0
  64. package/dist/commands/memory/commit.js +5 -2
  65. package/dist/commands/memory/context.d.ts +3 -2
  66. package/dist/commands/memory/context.js +9 -11
  67. package/dist/commands/memory/delete.d.ts +1 -1
  68. package/dist/commands/memory/list.d.ts +1 -1
  69. package/dist/commands/memory/list.js +1 -1
  70. package/dist/commands/memory/mounts/resolve.d.ts +10 -0
  71. package/dist/commands/memory/mounts/resolve.js +27 -0
  72. package/dist/commands/memory/proposals/commit.d.ts +18 -0
  73. package/dist/commands/memory/proposals/commit.js +32 -0
  74. package/dist/commands/memory/proposals/create.d.ts +18 -0
  75. package/dist/commands/memory/proposals/create.js +56 -0
  76. package/dist/commands/memory/proposals/list.d.ts +13 -0
  77. package/dist/commands/memory/proposals/list.js +31 -0
  78. package/dist/commands/memory/proposals/promote.d.ts +22 -0
  79. package/dist/commands/memory/proposals/promote.js +33 -0
  80. package/dist/commands/memory/proposals/reject.d.ts +16 -0
  81. package/dist/commands/memory/proposals/reject.js +28 -0
  82. package/dist/commands/memory/rebuild-index.d.ts +20 -0
  83. package/dist/commands/memory/rebuild-index.js +25 -0
  84. package/dist/commands/memory/save.d.ts +1 -1
  85. package/dist/commands/memory/save.js +1 -1
  86. package/dist/commands/memory/search.d.ts +6 -3
  87. package/dist/commands/memory/search.js +27 -3
  88. package/dist/commands/memory/show.d.ts +1 -1
  89. package/dist/commands/memory/stores/archive.d.ts +14 -0
  90. package/dist/commands/memory/stores/archive.js +31 -0
  91. package/dist/commands/memory/stores/create.d.ts +12 -0
  92. package/dist/commands/memory/stores/create.js +30 -0
  93. package/dist/commands/memory/stores/delete.d.ts +15 -0
  94. package/dist/commands/memory/stores/delete.js +38 -0
  95. package/dist/commands/memory/stores/list.d.ts +10 -0
  96. package/dist/commands/memory/stores/list.js +29 -0
  97. package/dist/commands/memory/stores/show.d.ts +12 -0
  98. package/dist/commands/memory/stores/show.js +14 -0
  99. package/dist/commands/memory/stores/update.d.ts +15 -0
  100. package/dist/commands/memory/stores/update.js +39 -0
  101. package/dist/commands/memory/sync/delete.d.ts +13 -0
  102. package/dist/commands/memory/sync/delete.js +35 -0
  103. package/dist/commands/memory/sync/pull.d.ts +19 -0
  104. package/dist/commands/memory/sync/pull.js +52 -0
  105. package/dist/commands/memory/sync/push.d.ts +18 -0
  106. package/dist/commands/memory/sync/push.js +115 -0
  107. package/dist/commands/memory/sync/resolve.d.ts +23 -0
  108. package/dist/commands/memory/sync/resolve.js +27 -0
  109. package/dist/commands/memory/sync/status.d.ts +9 -0
  110. package/dist/commands/memory/sync/status.js +22 -0
  111. package/dist/commands/memory/topics/archive.d.ts +20 -0
  112. package/dist/commands/memory/topics/archive.js +29 -0
  113. package/dist/commands/memory/topics/create.d.ts +23 -0
  114. package/dist/commands/memory/topics/create.js +46 -0
  115. package/dist/commands/memory/topics/delete.d.ts +22 -0
  116. package/dist/commands/memory/topics/delete.js +30 -0
  117. package/dist/commands/memory/topics/forget.d.ts +22 -0
  118. package/dist/commands/memory/topics/forget.js +29 -0
  119. package/dist/commands/memory/topics/list.d.ts +13 -0
  120. package/dist/commands/memory/topics/list.js +22 -0
  121. package/dist/commands/memory/topics/move.d.ts +22 -0
  122. package/dist/commands/memory/topics/move.js +26 -0
  123. package/dist/commands/memory/topics/show.d.ts +17 -0
  124. package/dist/commands/memory/topics/show.js +21 -0
  125. package/dist/commands/memory/topics/update.d.ts +23 -0
  126. package/dist/commands/memory/topics/update.js +27 -0
  127. package/dist/commands/memory/tree.d.ts +5 -2
  128. package/dist/commands/memory/tree.js +20 -2
  129. package/dist/commands/memory/update.d.ts +1 -1
  130. package/dist/commands/memory/versions/list.d.ts +16 -0
  131. package/dist/commands/memory/versions/list.js +22 -0
  132. package/dist/commands/memory/versions/redact.d.ts +21 -0
  133. package/dist/commands/memory/versions/redact.js +22 -0
  134. package/dist/commands/memory/versions/restore.d.ts +20 -0
  135. package/dist/commands/memory/versions/restore.js +16 -0
  136. package/dist/commands/memory/versions/show.d.ts +15 -0
  137. package/dist/commands/memory/versions/show.js +17 -0
  138. package/dist/commands/messages/list.js +25 -8
  139. package/dist/commands/messages/show.js +10 -0
  140. package/dist/commands/store/install.js +5 -1
  141. package/dist/commands/store/releases.js +1 -1
  142. package/dist/commands/store/update.js +5 -1
  143. package/dist/commands/subscriptions/cancel.js +5 -1
  144. package/dist/commands/subscriptions/health.js +5 -1
  145. package/dist/commands/subscriptions/status.js +5 -1
  146. package/dist/commands/subscriptions/subscribe.js +5 -1
  147. package/dist/commands/tasks/activity.d.ts +2 -3
  148. package/dist/commands/tasks/activity.js +15 -5
  149. package/dist/commands/tasks/complete.d.ts +18 -150
  150. package/dist/commands/tasks/complete.js +161 -600
  151. package/dist/commands/tasks/create.d.ts +5 -0
  152. package/dist/commands/tasks/create.js +107 -4
  153. package/dist/commands/tasks/deliverable/add.d.ts +8 -0
  154. package/dist/commands/tasks/deliverable/add.js +41 -8
  155. package/dist/commands/tasks/deliverable/confirm.d.ts +5 -5
  156. package/dist/commands/tasks/deliverable/confirm.js +9 -18
  157. package/dist/commands/tasks/deliverable/list.d.ts +12 -0
  158. package/dist/commands/tasks/deliverable/list.js +37 -0
  159. package/dist/commands/tasks/events/append.d.ts +2 -0
  160. package/dist/commands/tasks/events/append.js +11 -4
  161. package/dist/commands/tasks/events/list.d.ts +1 -0
  162. package/dist/commands/tasks/events/list.js +1 -0
  163. package/dist/commands/tasks/events/tail.d.ts +1 -0
  164. package/dist/commands/tasks/events/tail.js +1 -0
  165. package/dist/commands/tasks/expectations/assess.d.ts +21 -0
  166. package/dist/commands/tasks/expectations/assess.js +77 -0
  167. package/dist/commands/tasks/expectations.js +14 -18
  168. package/dist/commands/tasks/judge.d.ts +1 -0
  169. package/dist/commands/tasks/judge.js +2 -1
  170. package/dist/commands/tasks/output.d.ts +2 -11
  171. package/dist/commands/tasks/output.js +64 -145
  172. package/dist/commands/tasks/report.d.ts +3 -3
  173. package/dist/commands/tasks/report.js +64 -41
  174. package/dist/commands/tasks/resource/add.d.ts +23 -0
  175. package/dist/commands/tasks/resource/add.js +76 -0
  176. package/dist/commands/tasks/resource/list.d.ts +13 -0
  177. package/dist/commands/tasks/resource/list.js +41 -0
  178. package/dist/commands/tasks/result/show.d.ts +13 -0
  179. package/dist/commands/tasks/result/show.js +46 -0
  180. package/dist/commands/tasks/result/submit.d.ts +26 -0
  181. package/dist/commands/tasks/result/submit.js +134 -0
  182. package/dist/commands/tasks/resume/save.d.ts +16 -0
  183. package/dist/commands/tasks/resume/save.js +59 -0
  184. package/dist/commands/tasks/resume/show.d.ts +13 -0
  185. package/dist/commands/tasks/resume/show.js +35 -0
  186. package/dist/commands/tasks/review.d.ts +17 -0
  187. package/dist/commands/tasks/review.js +54 -0
  188. package/dist/commands/tasks/runs.js +5 -0
  189. package/dist/commands/tasks/timeline.d.ts +2 -2
  190. package/dist/commands/tasks/timeline.js +10 -23
  191. package/dist/commands/tasks/updates/add.d.ts +22 -0
  192. package/dist/commands/tasks/updates/add.js +101 -0
  193. package/dist/commands/tasks/updates/list.d.ts +15 -0
  194. package/dist/commands/tasks/updates/list.js +57 -0
  195. package/dist/commands/tasks/waive.d.ts +1 -0
  196. package/dist/commands/tasks/waive.js +2 -1
  197. package/dist/lib/agentic-stream.d.ts +257 -0
  198. package/dist/lib/agentic-stream.js +490 -33
  199. package/dist/lib/balance.d.ts +8 -0
  200. package/dist/lib/commitment-product.d.ts +10 -1
  201. package/dist/lib/commitment-product.js +66 -2
  202. package/dist/lib/commitments.d.ts +4 -1
  203. package/dist/lib/commitments.js +32 -1
  204. package/dist/lib/conversation-search.d.ts +3 -0
  205. package/dist/lib/conversation-search.js +75 -0
  206. package/dist/lib/execution-target.d.ts +21 -0
  207. package/dist/lib/execution-target.js +22 -6
  208. package/dist/lib/harnesses.d.ts +82 -6
  209. package/dist/lib/harnesses.js +30 -2
  210. package/dist/lib/hosted-machines.js +9 -0
  211. package/dist/lib/inbox.d.ts +2 -1
  212. package/dist/lib/machines.d.ts +17 -0
  213. package/dist/lib/machines.js +29 -0
  214. package/dist/lib/managed-agent-keys.d.ts +104 -0
  215. package/dist/lib/managed-agent-keys.js +50 -0
  216. package/dist/lib/memory-scope.d.ts +4 -3
  217. package/dist/lib/memory-scope.js +9 -9
  218. package/dist/lib/memory-sync.d.ts +114 -0
  219. package/dist/lib/memory-sync.js +730 -0
  220. package/dist/lib/message-provenance.d.ts +42 -0
  221. package/dist/lib/message-provenance.js +89 -0
  222. package/dist/lib/scoped-memory-command.d.ts +68 -0
  223. package/dist/lib/scoped-memory-command.js +183 -0
  224. package/dist/lib/session-task-endpoints.d.ts +1 -1
  225. package/dist/lib/session-task-endpoints.js +7 -0
  226. package/dist/lib/sky-code-broker.d.ts +47 -0
  227. package/dist/lib/sky-code-broker.js +50 -0
  228. package/dist/lib/sky-code-doctor.js +10 -1
  229. package/dist/lib/task-artifact-flags.d.ts +2 -0
  230. package/dist/lib/task-artifact-flags.js +7 -0
  231. package/dist/lib/task-execution.d.ts +4 -5
  232. package/dist/lib/task-execution.js +4 -5
  233. package/dist/lib/task-extras.d.ts +1 -5
  234. package/dist/lib/task-extras.js +1 -5
  235. package/dist/lib/task-transcript.d.ts +5 -7
  236. package/dist/lib/task-transcript.js +8 -16
  237. package/dist/lib/tasks.d.ts +7 -21
  238. package/dist/lib/tasks.js +17 -20
  239. package/dist/lib/triggers.d.ts +39 -1
  240. package/dist/lib/triggers.js +70 -2
  241. package/dist/lib/usage-discovery.d.ts +17 -1
  242. package/dist/lib/usage-discovery.js +17 -1
  243. package/dist/node_modules/@skrr-ai/data-provider/index.js +3733 -3618
  244. package/oclif.manifest.json +25726 -19886
  245. package/package.json +26 -5
@@ -1,10 +1,13 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class MemoryTree extends BaseCommand {
1
+ import { ScopedMemoryCommand } from '../../lib/scoped-memory-command';
2
+ export default class MemoryTree extends ScopedMemoryCommand {
3
3
  static description: string;
4
4
  static flags: {
5
5
  agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
6
  archived: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
7
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
11
  };
9
12
  run(): Promise<void>;
10
13
  }
@@ -2,17 +2,33 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
4
  const data_provider_1 = require("@skrr-ai/data-provider");
5
- const base_command_1 = require("../../base-command");
6
- class MemoryTree extends base_command_1.BaseCommand {
5
+ const scoped_memory_command_1 = require("../../lib/scoped-memory-command");
6
+ class MemoryTree extends scoped_memory_command_1.ScopedMemoryCommand {
7
7
  static description = 'Browse an agent-maintained semantic memory tree and its L0 summaries';
8
8
  static flags = {
9
9
  agent: core_1.Flags.string({ description: 'Agent ID', required: true }),
10
10
  archived: core_1.Flags.boolean({ description: 'Include archived nodes', default: false }),
11
11
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
12
+ store: core_1.Flags.string({ description: 'Canonical Memory Store ID' }),
13
+ scope: core_1.Flags.string({ description: 'Canonical owner scope: agent:<id> or space:<id>' }),
14
+ space: core_1.Flags.string({ description: 'Current Space context' }),
12
15
  };
13
16
  async run() {
14
17
  this.requireAuth();
15
18
  const { flags } = await this.parse(MemoryTree);
19
+ if (flags.store || flags.scope) {
20
+ const store = await this.resolveStore(flags);
21
+ const result = await this.memoryApi(flags.agent, `/stores/${store.id}/tree${this.query(flags, { includeArchived: flags.archived })}`);
22
+ if (flags.json)
23
+ return this.log(JSON.stringify({ storeId: store.id, ...result }, null, 2));
24
+ for (const node of result.nodes) {
25
+ const depth = node.path === '/' ? 0 : node.path.split('/').filter(Boolean).length;
26
+ this.log(`${' '.repeat(depth)}${node.nodeKind === 'folder' ? '▸' : '•'} ${node.title} ${node.path}`);
27
+ }
28
+ if (!result.nodes.length)
29
+ this.log('No Memory nodes.');
30
+ return;
31
+ }
16
32
  let response;
17
33
  try {
18
34
  response = await data_provider_1.dataService.getAgentMemoryWorkspaceTree(flags.agent, {
@@ -34,6 +50,8 @@ class MemoryTree extends base_command_1.BaseCommand {
34
50
  if (abstract)
35
51
  this.log(`${' '.repeat(depth + 1)}${abstract}`);
36
52
  }
53
+ if (!response.nodes.length)
54
+ this.log('No Memory nodes.');
37
55
  this.printAgentUrl(flags.agent);
38
56
  }
39
57
  }
@@ -8,7 +8,7 @@ export default class MemoryUpdate extends BaseCommand {
8
8
  static flags: {
9
9
  agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
10
  tier: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'pool-workspace': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
12
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
13
  value: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
14
14
  rename: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -0,0 +1,16 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryVersionsList extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ memory: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
5
+ class MemoryVersionsList extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'List immutable versions for one Memory topic';
7
+ static args = { memory: core_1.Args.string({ required: true, ignoreStdin: true }) };
8
+ static flags = { ...scoped_memory_command_1.scopedMemoryFlags, limit: core_1.Flags.integer({ default: 100 }) };
9
+ async run() {
10
+ this.requireAuth();
11
+ const { args, flags } = await this.parse(MemoryVersionsList);
12
+ const store = await this.resolveStore(flags);
13
+ const result = await this.memoryApi(flags.agent, `/stores/${store.id}/versions${this.query(flags, { memoryId: args.memory, limit: flags.limit })}`);
14
+ if (flags.json)
15
+ return this.log(JSON.stringify(result, null, 2));
16
+ for (const version of result.versions)
17
+ this.log(`${version.id} ${version.operation} ${version.createdAt} ${version.contentHash || '[redacted]'}`);
18
+ if (!result.versions.length)
19
+ this.log('No Memory versions.');
20
+ }
21
+ }
22
+ exports.default = MemoryVersionsList;
@@ -0,0 +1,21 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryVersionsRedact extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ 'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ 'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ 'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
14
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
18
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
19
+ };
20
+ run(): Promise<void>;
21
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const prompt_1 = require("../../../lib/prompt");
5
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
6
+ class MemoryVersionsRedact extends scoped_memory_command_1.ScopedMemoryCommand {
7
+ static description = 'Irreversibly redact the content of an exact historical MemoryVersion';
8
+ static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
9
+ static flags = { ...scoped_memory_command_1.mutationFlags, yes: core_1.Flags.boolean({ char: 'y' }) };
10
+ async run() {
11
+ this.requireAuth();
12
+ const { args, flags } = await this.parse(MemoryVersionsRedact);
13
+ if (!flags['dry-run']) {
14
+ const ok = await (0, prompt_1.confirmDestructive)(`Irreversibly redact MemoryVersion ${args.id}?`, flags.yes).catch((error) => this.error(error.message, { exit: error.exit || 7 }));
15
+ if (!ok)
16
+ return this.log('Cancelled.');
17
+ }
18
+ const result = await this.mutation('redact', flags, { versionId: args.id });
19
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no version redacted.' : `Redacted MemoryVersion ${args.id}.`);
20
+ }
21
+ }
22
+ exports.default = MemoryVersionsRedact;
@@ -0,0 +1,20 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryVersionsRestore extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ 'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ 'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ 'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
17
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
18
+ };
19
+ run(): Promise<void>;
20
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
5
+ class MemoryVersionsRestore extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Restore an old version by appending a new current version';
7
+ static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
8
+ static flags = scoped_memory_command_1.versionedMutationFlags;
9
+ async run() {
10
+ this.requireAuth();
11
+ const { args, flags } = await this.parse(MemoryVersionsRestore);
12
+ const result = await this.mutation('restore', flags, { versionId: args.id });
13
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no version restored.' : `Restored MemoryVersion ${args.id}.`);
14
+ }
15
+ }
16
+ exports.default = MemoryVersionsRestore;
@@ -0,0 +1,15 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryVersionsShow extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
5
+ class MemoryVersionsShow extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Show one immutable MemoryVersion';
7
+ static args = { id: core_1.Args.string({ required: true, ignoreStdin: true }) };
8
+ static flags = scoped_memory_command_1.scopedMemoryFlags;
9
+ async run() {
10
+ this.requireAuth();
11
+ const { args, flags } = await this.parse(MemoryVersionsShow);
12
+ const store = await this.resolveStore(flags);
13
+ const result = await this.memoryApi(flags.agent, `/stores/${store.id}/versions/${encodeURIComponent(args.id)}${this.query(flags)}`);
14
+ this.print(result, flags.json, `${result.id} ${result.operation}\n${JSON.stringify(result.payloadSnapshot, null, 2)}`);
15
+ }
16
+ }
17
+ exports.default = MemoryVersionsShow;
@@ -6,6 +6,7 @@ const data_provider_1 = require("@skrr-ai/data-provider");
6
6
  const base_command_1 = require("../../base-command");
7
7
  const format_1 = require("../../lib/format");
8
8
  const task_transcript_1 = require("../../lib/task-transcript");
9
+ const message_provenance_1 = require("../../lib/message-provenance");
9
10
  /**
10
11
  * OSK-2058 — resolve the conversation id from either calling convention.
11
12
  *
@@ -114,20 +115,36 @@ class MessagesList extends base_command_1.BaseCommand {
114
115
  }
115
116
  // TMessage has historically varied its shape across versions — accept
116
117
  // multiple field names and coerce to strings.
117
- const rows = selected.map((m) => ({
118
- when: m.createdAt ? new Date(String(m.createdAt)).toISOString().slice(11, 19) : '-',
119
- role: String(m.sender ?? m.role ?? (m.isCreatedByUser ? 'user' : 'assistant')),
120
- text: String(m.text ?? m.content ?? '')
121
- .replace(/\s+/g, ' ')
122
- .trim(),
123
- id: String(m.messageId ?? m._id ?? m.id ?? '-'),
124
- }));
118
+ // OSK-7708 an unattended run's answer arrives with no question above it,
119
+ // so the row itself has to say what caused it. Without this a scheduled
120
+ // thread reads as an agent volunteering five answers to nothing.
121
+ let unattended = 0;
122
+ const rows = selected.map((m) => {
123
+ const provenance = (0, message_provenance_1.messageProvenance)(m);
124
+ if (provenance)
125
+ unattended += 1;
126
+ return {
127
+ when: m.createdAt ? new Date(String(m.createdAt)).toISOString().slice(11, 19) : '-',
128
+ role: String(m.sender ?? m.role ?? (m.isCreatedByUser ? 'user' : 'assistant')),
129
+ via: provenance ? (0, message_provenance_1.provenanceLabel)(provenance) : '-',
130
+ text: String(m.text ?? m.content ?? '')
131
+ .replace(/\s+/g, ' ')
132
+ .trim(),
133
+ id: String(m.messageId ?? m._id ?? m.id ?? '-'),
134
+ };
135
+ });
125
136
  (0, format_1.renderTable)(rows, [
126
137
  { key: 'when', header: 'TIME' },
127
138
  { key: 'role', header: 'ROLE', maxWidth: 12 },
139
+ { key: 'via', header: 'VIA', maxWidth: 10 },
128
140
  { key: 'text', header: 'TEXT', maxWidth: 80 },
129
141
  { key: 'id', header: 'ID' },
130
142
  ], (line) => this.log(line));
143
+ if (unattended > 0) {
144
+ this.log('');
145
+ this.log(`${unattended} message${unattended === 1 ? '' : 's'} came from an unattended run, so no prompt precedes ${unattended === 1 ? 'it' : 'them'} here.`);
146
+ this.log(` skrr messages show ${convoId} <message-id> # what the run was asked`);
147
+ }
131
148
  // Never let a cap read as "this is the whole transcript".
132
149
  if (truncated) {
133
150
  this.log('');
@@ -4,6 +4,7 @@ exports.firstMessageFromDetailResponse = firstMessageFromDetailResponse;
4
4
  const core_1 = require("@oclif/core");
5
5
  const data_provider_1 = require("@skrr-ai/data-provider");
6
6
  const base_command_1 = require("../../base-command");
7
+ const message_provenance_1 = require("../../lib/message-provenance");
7
8
  /** The detail endpoint preserves the legacy raw-array response while the list
8
9
  * endpoint returns an envelope. Accept both so an ID emitted by messages list
9
10
  * is always usable by messages show. */
@@ -63,6 +64,15 @@ class MessagesShow extends base_command_1.BaseCommand {
63
64
  this.log(`Updated: ${formatTime(msg.updatedAt)}`);
64
65
  if (msg.tokenCount !== undefined)
65
66
  this.log(`Tokens: ${msg.tokenCount}`);
67
+ // OSK-7682 — an unattended run persists no user message, so this row is the
68
+ // only place its instruction can be read. Print the question before the
69
+ // answer, which is the order a reader needs them in.
70
+ const provenance = (0, message_provenance_1.messageProvenance)(msg);
71
+ if (provenance) {
72
+ for (const line of (0, message_provenance_1.provenanceLines)(provenance)) {
73
+ this.log(line);
74
+ }
75
+ }
66
76
  this.log('');
67
77
  this.log('Text:');
68
78
  this.log(String(msg.text ?? msg.content ?? ''));
@@ -11,7 +11,11 @@ class StoreInstall extends base_command_1.BaseCommand {
11
11
  '<%= config.bin %> store install agent_abc123 --json',
12
12
  ];
13
13
  static args = {
14
- agentId: core_1.Args.string({ description: 'The store agent to install', required: true }),
14
+ agentId: core_1.Args.string({
15
+ description: 'The store agent to install',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
15
19
  };
16
20
  static flags = {
17
21
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -18,7 +18,7 @@ class StoreReleases extends base_command_1.BaseCommand {
18
18
  '<%= config.bin %> store releases agent_abc123 --json',
19
19
  ];
20
20
  static args = {
21
- agentId: core_1.Args.string({ description: 'The store agent', required: true }),
21
+ agentId: core_1.Args.string({ description: 'The store agent', required: true, ignoreStdin: true }),
22
22
  };
23
23
  static flags = {
24
24
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -11,7 +11,11 @@ class StoreUpdate extends base_command_1.BaseCommand {
11
11
  '<%= config.bin %> store update agent_abc123 --strategy replace',
12
12
  ];
13
13
  static args = {
14
- agentId: core_1.Args.string({ description: 'The store agent you installed', required: true }),
14
+ agentId: core_1.Args.string({
15
+ description: 'The store agent you installed',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
15
19
  };
16
20
  static flags = {
17
21
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -11,7 +11,11 @@ class SubscriptionsCancel extends base_command_1.BaseCommand {
11
11
  '<%= config.bin %> subscriptions cancel agent_abc123 --expected-version 3',
12
12
  ];
13
13
  static args = {
14
- agentId: core_1.Args.string({ description: 'The service to unsubscribe from', required: true }),
14
+ agentId: core_1.Args.string({
15
+ description: 'The service to unsubscribe from',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
15
19
  };
16
20
  static flags = {
17
21
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -22,7 +22,11 @@ class SubscriptionsHealth extends base_command_1.BaseCommand {
22
22
  '<%= config.bin %> subscriptions health agent_abc123 --json',
23
23
  ];
24
24
  static args = {
25
- agentId: core_1.Args.string({ description: 'The service to check', required: true }),
25
+ agentId: core_1.Args.string({
26
+ description: 'The service to check',
27
+ required: true,
28
+ ignoreStdin: true,
29
+ }),
26
30
  };
27
31
  static flags = {
28
32
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -10,7 +10,11 @@ class SubscriptionsStatus extends base_command_1.BaseCommand {
10
10
  '<%= config.bin %> subscriptions status agent_abc123 --json',
11
11
  ];
12
12
  static args = {
13
- agentId: core_1.Args.string({ description: 'The service to check', required: true }),
13
+ agentId: core_1.Args.string({
14
+ description: 'The service to check',
15
+ required: true,
16
+ ignoreStdin: true,
17
+ }),
14
18
  };
15
19
  static flags = {
16
20
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -11,7 +11,11 @@ class SubscriptionsSubscribe extends base_command_1.BaseCommand {
11
11
  '<%= config.bin %> subscriptions subscribe agent_abc123 --space space_xyz --json',
12
12
  ];
13
13
  static args = {
14
- agentId: core_1.Args.string({ description: 'The published service to subscribe to', required: true }),
14
+ agentId: core_1.Args.string({
15
+ description: 'The published service to subscribe to',
16
+ required: true,
17
+ ignoreStdin: true,
18
+ }),
15
19
  };
16
20
  static flags = {
17
21
  json: core_1.Flags.boolean({ description: 'Output as JSON' }),
@@ -1,8 +1,7 @@
1
1
  import { BaseCommand } from '../../base-command';
2
2
  /**
3
- * One row of `GET /api/tasks/:taskId/activity`, which returns the task's raw
4
- * persisted `ITaskActivityLog` entries `{ action, timestamp, userId, details }`
5
- * (packages/data-schemas/src/types/task.ts:162, api/models/Task.js:2239).
3
+ * One row of the canonical Activity endpoint. Field fallbacks remain so this
4
+ * CLI can still read an older deployment's embedded Task activity entries.
6
5
  *
7
6
  * OSK-2044: this renderer read `event` / `actorId` / `createdAt`, none of which
8
7
  * that document has, so EVENT and ACTOR were `-` on every row while `details`
@@ -7,11 +7,21 @@ const data_provider_1 = require("@skrr-ai/data-provider");
7
7
  const base_command_1 = require("../../base-command");
8
8
  const format_1 = require("../../lib/format");
9
9
  function activityRow(entry) {
10
+ const actor = entry.actor;
11
+ const actorText = actor
12
+ ? actor.kind === 'agent'
13
+ ? `agent:${actor.agentId}`
14
+ : actor.kind === 'human'
15
+ ? `human:${actor.userId}`
16
+ : actor.kind === 'integration'
17
+ ? `integration:${actor.provider}`
18
+ : `system:${actor.service}`
19
+ : (entry.userId ?? entry.actorId);
10
20
  return {
11
- time: formatTime(entry.timestamp ?? entry.createdAt),
21
+ time: formatTime(entry.occurredAt ?? entry.timestamp ?? entry.createdAt),
12
22
  event: (0, format_1.formatCell)(entry.action ?? entry.event ?? entry.type),
13
- actor: (0, format_1.formatCell)(entry.userId ?? entry.actorId ?? entry.actor),
14
- details: (0, format_1.formatCell)(entry.details ?? entry.metadata),
23
+ actor: (0, format_1.formatCell)(actorText),
24
+ details: (0, format_1.formatCell)(entry.data ?? entry.details ?? entry.metadata),
15
25
  };
16
26
  }
17
27
  /**
@@ -70,7 +80,7 @@ function formatTime(value) {
70
80
  return date.toISOString().slice(0, 19).replace('T', ' ');
71
81
  }
72
82
  class TasksActivity extends base_command_1.BaseCommand {
73
- static description = 'Show activity log for a task';
83
+ static description = 'Show the immutable, multi-actor Activity ledger for a Task';
74
84
  static examples = [
75
85
  '<%= config.bin %> tasks activity <task-id>',
76
86
  '<%= config.bin %> tasks activity <task-id> --limit 50',
@@ -88,7 +98,7 @@ class TasksActivity extends base_command_1.BaseCommand {
88
98
  const { args, flags } = await this.parse(TasksActivity);
89
99
  let response;
90
100
  try {
91
- response = await data_provider_1.dataService.getTaskActivity(args.id, flags.limit);
101
+ response = await data_provider_1.dataService.listTaskActivityEvents(args.id, { limit: flags.limit });
92
102
  }
93
103
  catch (err) {
94
104
  this.handleApiError(err);