@skrr-ai/cli 0.1.22 → 0.1.24

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 (281) hide show
  1. package/README.md +83 -73
  2. package/bin/dev-fallback.js +221 -0
  3. package/bin/run.js +96 -0
  4. package/dist/base-command.d.ts +15 -0
  5. package/dist/base-command.js +145 -11
  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/preflight.js +18 -4
  43. package/dist/commands/commitments/receipt-metrics.d.ts +39 -0
  44. package/dist/commands/commitments/receipt-metrics.js +78 -0
  45. package/dist/commands/convos/search.js +5 -5
  46. package/dist/commands/harnesses/leases/list.d.ts +3 -0
  47. package/dist/commands/harnesses/leases/list.js +59 -12
  48. package/dist/commands/harnesses/leases/show.js +36 -0
  49. package/dist/commands/harnesses/list.d.ts +18 -0
  50. package/dist/commands/harnesses/list.js +30 -0
  51. package/dist/commands/harnesses/products.js +49 -3
  52. package/dist/commands/harnesses/quota.d.ts +16 -0
  53. package/dist/commands/harnesses/quota.js +26 -1
  54. package/dist/commands/harnesses/usage.js +17 -0
  55. package/dist/commands/inbox/index.d.ts +2 -1
  56. package/dist/commands/inbox/index.js +27 -4
  57. package/dist/commands/login.js +4 -1
  58. package/dist/commands/machines/dedicated/create.d.ts +18 -0
  59. package/dist/commands/machines/dedicated/create.js +90 -0
  60. package/dist/commands/machines/dedicated/destroy.d.ts +14 -0
  61. package/dist/commands/machines/dedicated/destroy.js +56 -0
  62. package/dist/commands/machines/dedicated/grow.d.ts +13 -0
  63. package/dist/commands/machines/dedicated/grow.js +46 -0
  64. package/dist/commands/machines/dedicated/health-check.d.ts +12 -0
  65. package/dist/commands/machines/dedicated/health-check.js +42 -0
  66. package/dist/commands/machines/dedicated/incident-close.d.ts +12 -0
  67. package/dist/commands/machines/dedicated/incident-close.js +42 -0
  68. package/dist/commands/machines/dedicated/index.d.ts +6 -0
  69. package/dist/commands/machines/dedicated/index.js +39 -0
  70. package/dist/commands/machines/dedicated/list.d.ts +11 -0
  71. package/dist/commands/machines/dedicated/list.js +58 -0
  72. package/dist/commands/machines/dedicated/restart.d.ts +12 -0
  73. package/dist/commands/machines/dedicated/restart.js +42 -0
  74. package/dist/commands/machines/dedicated/show.d.ts +12 -0
  75. package/dist/commands/machines/dedicated/show.js +58 -0
  76. package/dist/commands/machines/dedicated/snapshot.d.ts +12 -0
  77. package/dist/commands/machines/dedicated/snapshot.js +42 -0
  78. package/dist/commands/machines/dedicated/start.d.ts +12 -0
  79. package/dist/commands/machines/dedicated/start.js +42 -0
  80. package/dist/commands/machines/dedicated/stop.d.ts +12 -0
  81. package/dist/commands/machines/dedicated/stop.js +42 -0
  82. package/dist/commands/machines/hosted/index.js +4 -1
  83. package/dist/commands/machines/list.d.ts +1 -0
  84. package/dist/commands/machines/list.js +33 -5
  85. package/dist/commands/memory/approvals/issue.d.ts +18 -0
  86. package/dist/commands/memory/approvals/issue.js +63 -0
  87. package/dist/commands/memory/commit.js +5 -2
  88. package/dist/commands/memory/context.d.ts +3 -2
  89. package/dist/commands/memory/context.js +9 -11
  90. package/dist/commands/memory/delete.d.ts +1 -1
  91. package/dist/commands/memory/list.d.ts +1 -1
  92. package/dist/commands/memory/list.js +1 -1
  93. package/dist/commands/memory/mounts/resolve.d.ts +10 -0
  94. package/dist/commands/memory/mounts/resolve.js +27 -0
  95. package/dist/commands/memory/proposals/commit.d.ts +18 -0
  96. package/dist/commands/memory/proposals/commit.js +32 -0
  97. package/dist/commands/memory/proposals/create.d.ts +18 -0
  98. package/dist/commands/memory/proposals/create.js +56 -0
  99. package/dist/commands/memory/proposals/list.d.ts +13 -0
  100. package/dist/commands/memory/proposals/list.js +31 -0
  101. package/dist/commands/memory/proposals/promote.d.ts +22 -0
  102. package/dist/commands/memory/proposals/promote.js +33 -0
  103. package/dist/commands/memory/proposals/reject.d.ts +16 -0
  104. package/dist/commands/memory/proposals/reject.js +28 -0
  105. package/dist/commands/memory/rebuild-index.d.ts +20 -0
  106. package/dist/commands/memory/rebuild-index.js +25 -0
  107. package/dist/commands/memory/save.d.ts +1 -1
  108. package/dist/commands/memory/save.js +1 -1
  109. package/dist/commands/memory/search.d.ts +6 -3
  110. package/dist/commands/memory/search.js +27 -3
  111. package/dist/commands/memory/show.d.ts +1 -1
  112. package/dist/commands/memory/stores/archive.d.ts +14 -0
  113. package/dist/commands/memory/stores/archive.js +31 -0
  114. package/dist/commands/memory/stores/create.d.ts +12 -0
  115. package/dist/commands/memory/stores/create.js +30 -0
  116. package/dist/commands/memory/stores/delete.d.ts +15 -0
  117. package/dist/commands/memory/stores/delete.js +38 -0
  118. package/dist/commands/memory/stores/list.d.ts +10 -0
  119. package/dist/commands/memory/stores/list.js +29 -0
  120. package/dist/commands/memory/stores/show.d.ts +12 -0
  121. package/dist/commands/memory/stores/show.js +14 -0
  122. package/dist/commands/memory/stores/update.d.ts +15 -0
  123. package/dist/commands/memory/stores/update.js +39 -0
  124. package/dist/commands/memory/sync/delete.d.ts +13 -0
  125. package/dist/commands/memory/sync/delete.js +35 -0
  126. package/dist/commands/memory/sync/pull.d.ts +19 -0
  127. package/dist/commands/memory/sync/pull.js +52 -0
  128. package/dist/commands/memory/sync/push.d.ts +18 -0
  129. package/dist/commands/memory/sync/push.js +115 -0
  130. package/dist/commands/memory/sync/resolve.d.ts +23 -0
  131. package/dist/commands/memory/sync/resolve.js +27 -0
  132. package/dist/commands/memory/sync/status.d.ts +9 -0
  133. package/dist/commands/memory/sync/status.js +22 -0
  134. package/dist/commands/memory/topics/archive.d.ts +20 -0
  135. package/dist/commands/memory/topics/archive.js +29 -0
  136. package/dist/commands/memory/topics/create.d.ts +23 -0
  137. package/dist/commands/memory/topics/create.js +46 -0
  138. package/dist/commands/memory/topics/delete.d.ts +22 -0
  139. package/dist/commands/memory/topics/delete.js +30 -0
  140. package/dist/commands/memory/topics/forget.d.ts +22 -0
  141. package/dist/commands/memory/topics/forget.js +29 -0
  142. package/dist/commands/memory/topics/list.d.ts +13 -0
  143. package/dist/commands/memory/topics/list.js +22 -0
  144. package/dist/commands/memory/topics/move.d.ts +22 -0
  145. package/dist/commands/memory/topics/move.js +26 -0
  146. package/dist/commands/memory/topics/show.d.ts +17 -0
  147. package/dist/commands/memory/topics/show.js +21 -0
  148. package/dist/commands/memory/topics/update.d.ts +23 -0
  149. package/dist/commands/memory/topics/update.js +27 -0
  150. package/dist/commands/memory/tree.d.ts +5 -2
  151. package/dist/commands/memory/tree.js +20 -2
  152. package/dist/commands/memory/update.d.ts +1 -1
  153. package/dist/commands/memory/versions/list.d.ts +16 -0
  154. package/dist/commands/memory/versions/list.js +22 -0
  155. package/dist/commands/memory/versions/redact.d.ts +21 -0
  156. package/dist/commands/memory/versions/redact.js +22 -0
  157. package/dist/commands/memory/versions/restore.d.ts +20 -0
  158. package/dist/commands/memory/versions/restore.js +16 -0
  159. package/dist/commands/memory/versions/show.d.ts +15 -0
  160. package/dist/commands/memory/versions/show.js +17 -0
  161. package/dist/commands/messages/list.js +25 -8
  162. package/dist/commands/messages/show.js +10 -0
  163. package/dist/commands/spaces/update.js +16 -12
  164. package/dist/commands/spaces/work-sync/reconcile.d.ts +38 -0
  165. package/dist/commands/spaces/work-sync/reconcile.js +90 -0
  166. package/dist/commands/spaces/work-sync/telemetry.d.ts +29 -0
  167. package/dist/commands/spaces/work-sync/telemetry.js +96 -0
  168. package/dist/commands/store/install.js +5 -1
  169. package/dist/commands/store/releases.js +1 -1
  170. package/dist/commands/store/update.js +5 -1
  171. package/dist/commands/subscriptions/cancel.js +5 -1
  172. package/dist/commands/subscriptions/health.js +5 -1
  173. package/dist/commands/subscriptions/status.js +5 -1
  174. package/dist/commands/subscriptions/subscribe.js +5 -1
  175. package/dist/commands/tasks/activity.d.ts +2 -3
  176. package/dist/commands/tasks/activity.js +20 -6
  177. package/dist/commands/tasks/complete.d.ts +22 -150
  178. package/dist/commands/tasks/complete.js +174 -599
  179. package/dist/commands/tasks/create.d.ts +6 -0
  180. package/dist/commands/tasks/create.js +114 -4
  181. package/dist/commands/tasks/deliverable/add.d.ts +8 -0
  182. package/dist/commands/tasks/deliverable/add.js +62 -11
  183. package/dist/commands/tasks/deliverable/confirm.d.ts +5 -5
  184. package/dist/commands/tasks/deliverable/confirm.js +9 -18
  185. package/dist/commands/tasks/deliverable/list.d.ts +12 -0
  186. package/dist/commands/tasks/deliverable/list.js +58 -0
  187. package/dist/commands/tasks/events/append.d.ts +2 -0
  188. package/dist/commands/tasks/events/append.js +41 -6
  189. package/dist/commands/tasks/events/list.d.ts +1 -0
  190. package/dist/commands/tasks/events/list.js +1 -0
  191. package/dist/commands/tasks/events/tail.d.ts +1 -0
  192. package/dist/commands/tasks/events/tail.js +1 -0
  193. package/dist/commands/tasks/expectations/assess.d.ts +21 -0
  194. package/dist/commands/tasks/expectations/assess.js +103 -0
  195. package/dist/commands/tasks/expectations.js +121 -25
  196. package/dist/commands/tasks/judge.d.ts +1 -0
  197. package/dist/commands/tasks/judge.js +2 -1
  198. package/dist/commands/tasks/output.d.ts +1 -11
  199. package/dist/commands/tasks/output.js +80 -141
  200. package/dist/commands/tasks/report.d.ts +3 -3
  201. package/dist/commands/tasks/report.js +66 -41
  202. package/dist/commands/tasks/resource/add.d.ts +23 -0
  203. package/dist/commands/tasks/resource/add.js +76 -0
  204. package/dist/commands/tasks/resource/list.d.ts +13 -0
  205. package/dist/commands/tasks/resource/list.js +41 -0
  206. package/dist/commands/tasks/result/show.d.ts +13 -0
  207. package/dist/commands/tasks/result/show.js +64 -0
  208. package/dist/commands/tasks/result/submit.d.ts +26 -0
  209. package/dist/commands/tasks/result/submit.js +134 -0
  210. package/dist/commands/tasks/resume/save.d.ts +16 -0
  211. package/dist/commands/tasks/resume/save.js +69 -0
  212. package/dist/commands/tasks/resume/show.d.ts +13 -0
  213. package/dist/commands/tasks/resume/show.js +35 -0
  214. package/dist/commands/tasks/review.d.ts +17 -0
  215. package/dist/commands/tasks/review.js +54 -0
  216. package/dist/commands/tasks/runs.js +5 -0
  217. package/dist/commands/tasks/self-schedule.js +7 -4
  218. package/dist/commands/tasks/show.js +19 -0
  219. package/dist/commands/tasks/timeline.d.ts +2 -2
  220. package/dist/commands/tasks/timeline.js +19 -24
  221. package/dist/commands/tasks/updates/add.d.ts +22 -0
  222. package/dist/commands/tasks/updates/add.js +122 -0
  223. package/dist/commands/tasks/updates/list.d.ts +15 -0
  224. package/dist/commands/tasks/updates/list.js +57 -0
  225. package/dist/commands/tasks/waive.d.ts +1 -0
  226. package/dist/commands/tasks/waive.js +2 -1
  227. package/dist/lib/agentic-stream.d.ts +257 -0
  228. package/dist/lib/agentic-stream.js +490 -33
  229. package/dist/lib/balance.d.ts +8 -0
  230. package/dist/lib/commitment-product.d.ts +10 -1
  231. package/dist/lib/commitment-product.js +66 -2
  232. package/dist/lib/commitments.d.ts +2 -1
  233. package/dist/lib/commitments.js +1 -0
  234. package/dist/lib/conversation-search.d.ts +3 -0
  235. package/dist/lib/conversation-search.js +75 -0
  236. package/dist/lib/dedicated-machines.d.ts +66 -0
  237. package/dist/lib/dedicated-machines.js +161 -0
  238. package/dist/lib/execution-target.d.ts +21 -0
  239. package/dist/lib/execution-target.js +22 -6
  240. package/dist/lib/harnesses.d.ts +87 -6
  241. package/dist/lib/harnesses.js +32 -1
  242. package/dist/lib/hosted-machines.js +9 -0
  243. package/dist/lib/inbox.d.ts +2 -1
  244. package/dist/lib/machines.d.ts +17 -0
  245. package/dist/lib/machines.js +29 -0
  246. package/dist/lib/managed-agent-keys.d.ts +104 -0
  247. package/dist/lib/managed-agent-keys.js +50 -0
  248. package/dist/lib/memory-scope.d.ts +4 -3
  249. package/dist/lib/memory-scope.js +9 -9
  250. package/dist/lib/memory-sync.d.ts +114 -0
  251. package/dist/lib/memory-sync.js +730 -0
  252. package/dist/lib/message-provenance.d.ts +42 -0
  253. package/dist/lib/message-provenance.js +89 -0
  254. package/dist/lib/scoped-memory-command.d.ts +68 -0
  255. package/dist/lib/scoped-memory-command.js +183 -0
  256. package/dist/lib/session-task-endpoints.d.ts +1 -1
  257. package/dist/lib/session-task-endpoints.js +7 -0
  258. package/dist/lib/sky-code-broker.d.ts +47 -0
  259. package/dist/lib/sky-code-broker.js +50 -0
  260. package/dist/lib/sky-code-doctor.js +10 -1
  261. package/dist/lib/task-artifact-flags.d.ts +2 -0
  262. package/dist/lib/task-artifact-flags.js +7 -0
  263. package/dist/lib/task-execution.d.ts +4 -5
  264. package/dist/lib/task-execution.js +4 -5
  265. package/dist/lib/task-extras.d.ts +1 -5
  266. package/dist/lib/task-extras.js +1 -5
  267. package/dist/lib/task-legacy.d.ts +24 -0
  268. package/dist/lib/task-legacy.js +48 -0
  269. package/dist/lib/task-transcript.d.ts +5 -7
  270. package/dist/lib/task-transcript.js +8 -16
  271. package/dist/lib/tasks.d.ts +39 -21
  272. package/dist/lib/tasks.js +64 -21
  273. package/dist/lib/triggers.d.ts +39 -1
  274. package/dist/lib/triggers.js +70 -2
  275. package/dist/lib/usage-discovery.d.ts +17 -1
  276. package/dist/lib/usage-discovery.js +17 -1
  277. package/dist/lib/work-sync.d.ts +70 -0
  278. package/dist/lib/work-sync.js +29 -0
  279. package/dist/node_modules/@skrr-ai/data-provider/index.js +3760 -3621
  280. package/oclif.manifest.json +14653 -7813
  281. package/package.json +26 -5
@@ -0,0 +1,33 @@
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 MemoryProposalsPromote extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Consume a one-time approval and promote an Agent topic into the current Space Store';
7
+ static flags = {
8
+ ...scoped_memory_command_1.mutationFlags,
9
+ 'source-store': core_1.Flags.string({ required: true, description: 'Mounted Agent Store ID' }),
10
+ 'source-memory': core_1.Flags.string({ required: true, description: 'Agent Memory topic ID' }),
11
+ 'source-version': core_1.Flags.string({
12
+ required: true,
13
+ description: 'Current Agent topic version ID',
14
+ }),
15
+ 'consent-approval': core_1.Flags.string({
16
+ required: true,
17
+ description: 'One-time space_promotion approval ID from memory approvals issue',
18
+ }),
19
+ path: core_1.Flags.string({ description: 'Optional destination path in the Space Store' }),
20
+ };
21
+ async run() {
22
+ this.requireAuth();
23
+ const { flags } = await this.parse(MemoryProposalsPromote);
24
+ const result = await this.mutation('promote', flags, {
25
+ sourceStoreId: flags['source-store'],
26
+ sourceMemoryId: flags['source-memory'],
27
+ sourceExpectedVersionId: flags['source-version'],
28
+ path: flags.path,
29
+ });
30
+ this.print(result, flags.json, `Promoted Agent topic ${flags['source-memory']} to Space Memory.`);
31
+ }
32
+ }
33
+ exports.default = MemoryProposalsPromote;
@@ -0,0 +1,16 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryProposalsReject extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ proposalId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ reason: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, 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,28 @@
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 MemoryProposalsReject extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Reject a Store-scoped Memory proposal';
7
+ static args = {
8
+ proposalId: core_1.Args.string({ description: 'Proposal ID', required: true, ignoreStdin: true }),
9
+ };
10
+ static flags = {
11
+ ...scoped_memory_command_1.scopedMemoryFlags,
12
+ reason: core_1.Flags.string({ description: 'Decision reason recorded on the proposal' }),
13
+ };
14
+ async run() {
15
+ this.requireAuth();
16
+ const { args, flags } = await this.parse(MemoryProposalsReject);
17
+ const store = await this.resolveStore(flags, { write: true });
18
+ const result = await this.memoryApi(flags.agent, `/stores/${store.id}/proposals/${encodeURIComponent(args.proposalId)}/reject`, {
19
+ method: 'POST',
20
+ body: {
21
+ ...(flags.space ? { spaceId: flags.space } : {}),
22
+ ...(flags.reason ? { reason: flags.reason } : {}),
23
+ },
24
+ });
25
+ this.print(result, flags.json, `Rejected Memory proposal ${args.proposalId}.`);
26
+ }
27
+ }
28
+ exports.default = MemoryProposalsReject;
@@ -0,0 +1,20 @@
1
+ import { ScopedMemoryCommand } from '../../lib/scoped-memory-command';
2
+ export default class MemoryRebuildIndex extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static args: {
5
+ ref: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ 'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ 'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string | 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,25 @@
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 MemoryRebuildIndex extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Rebuild generated Memory projections and MEMORY.md indexes';
7
+ static args = { ref: core_1.Args.string({ required: false, default: '/', ignoreStdin: true }) };
8
+ static flags = scoped_memory_command_1.mutationFlags;
9
+ async run() {
10
+ this.requireAuth();
11
+ const { args, flags } = await this.parse(MemoryRebuildIndex);
12
+ const store = await this.resolveStore(flags, { write: true });
13
+ const body = /^[0-9a-f-]{36}$/i.test(args.ref)
14
+ ? { memoryId: args.ref, spaceId: flags.space }
15
+ : { path: args.ref, spaceId: flags.space };
16
+ const result = flags['dry-run']
17
+ ? { dryRun: true, request: body }
18
+ : await this.memoryApi(flags.agent, `/stores/${store.id}/rebuild-index`, {
19
+ method: 'POST',
20
+ body,
21
+ });
22
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no index rebuilt.' : `Rebuilt Memory index for ${args.ref}.`);
23
+ }
24
+ }
25
+ exports.default = MemoryRebuildIndex;
@@ -5,7 +5,7 @@ export default class MemorySave extends BaseCommand {
5
5
  static flags: {
6
6
  agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
7
  tier: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
- workspace: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ 'pool-workspace': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
9
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
10
  'from-json': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
11
  key: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -12,7 +12,7 @@ class MemorySave extends base_command_1.BaseCommand {
12
12
  '<%= config.bin %> memory save --key "user-preference" --value "dark mode"',
13
13
  '<%= config.bin %> memory save --from-json memory.json',
14
14
  '<%= config.bin %> memory save --key "note" --value "remember this" --json',
15
- '<%= config.bin %> memory save --key "team-norm" --value "ship on fridays" --tier workspace --workspace ws_123',
15
+ '<%= config.bin %> memory save --key "team-norm" --value "ship on fridays" --tier workspace --pool-workspace ws_123',
16
16
  '<%= config.bin %> memory maintain remember \'{"path":"/notes","claim":"remember this"}\' --agent agent_abc123',
17
17
  ];
18
18
  static flags = {
@@ -1,14 +1,17 @@
1
- import { BaseCommand } from '../../base-command';
2
- export default class MemorySearch extends BaseCommand {
1
+ import { ScopedMemoryCommand } from '../../lib/scoped-memory-command';
2
+ export default class MemorySearch extends ScopedMemoryCommand {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static args: {
6
6
  query: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
7
7
  };
8
8
  static flags: {
9
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'space-context': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
12
  agent: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
13
  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>;
14
+ 'pool-workspace': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
12
15
  json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
16
  'max-results': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
14
17
  'min-score': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -2,15 +2,15 @@
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");
5
+ const scoped_memory_command_1 = require("../../lib/scoped-memory-command");
6
6
  const format_1 = require("../../lib/format");
7
7
  const memory_scope_1 = require("../../lib/memory-scope");
8
- class MemorySearch extends base_command_1.BaseCommand {
8
+ class MemorySearch extends scoped_memory_command_1.ScopedMemoryCommand {
9
9
  static description = 'Semantic (hybrid vector + text) search over a memory pool — the same ranking the agent sees';
10
10
  static examples = [
11
11
  '<%= config.bin %> memory search "dark mode preference"',
12
12
  '<%= config.bin %> memory search "billing" --agent agent_abc123',
13
- '<%= config.bin %> memory search "team norms" --tier workspace --workspace ws_123',
13
+ '<%= config.bin %> memory search "team norms" --tier workspace --pool-workspace ws_123',
14
14
  '<%= config.bin %> memory search "onboarding" --max-results 10 --json',
15
15
  ];
16
16
  static args = {
@@ -21,10 +21,34 @@ class MemorySearch extends base_command_1.BaseCommand {
21
21
  'max-results': core_1.Flags.integer({ description: 'Maximum results (1-50)', default: 6 }),
22
22
  'min-score': core_1.Flags.string({ description: 'Minimum score 0-1 (default: 0.35)' }),
23
23
  ...memory_scope_1.memoryScopeFlags,
24
+ store: core_1.Flags.string({ description: 'Canonical Memory Store ID' }),
25
+ scope: core_1.Flags.string({ description: 'Canonical owner scope: agent:<id> or space:<id>' }),
26
+ 'space-context': core_1.Flags.string({ description: 'Current Space context for canonical mounts' }),
24
27
  };
25
28
  async run() {
26
29
  this.requireAuth();
27
30
  const { args, flags } = await this.parse(MemorySearch);
31
+ if (flags.store || flags.scope) {
32
+ if (!flags.agent)
33
+ this.error('--agent is required with --store or --scope.', { exit: 2 });
34
+ const canonicalFlags = {
35
+ agent: flags.agent,
36
+ store: flags.store,
37
+ scope: flags.scope,
38
+ space: flags['space-context'],
39
+ json: flags.json,
40
+ };
41
+ const store = await this.resolveStore(canonicalFlags);
42
+ const response = await this.memoryApi(flags.agent, `/stores/${store.id}/search${this.query(canonicalFlags, { q: args.query, limit: flags['max-results'] })}`);
43
+ if (flags.json)
44
+ this.log(JSON.stringify(response, null, 2));
45
+ else if (!response.results?.length)
46
+ this.log(`No memories matched "${args.query}".`);
47
+ else
48
+ for (const result of response.results)
49
+ this.log(`${Number(result.score || 0).toFixed(2)} ${result.node.path} ${result.content}`);
50
+ return;
51
+ }
28
52
  const scope = (0, memory_scope_1.resolveMemoryScopeOrFail)(flags, (m) => this.error(m, { exit: 1 }));
29
53
  let minScore;
30
54
  if (flags['min-score'] !== undefined) {
@@ -8,7 +8,7 @@ export default class MemoryShow 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
  };
14
14
  run(): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresArchive extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ 'expected-revision': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,31 @@
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 MemoryStoresArchive extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Archive a Memory Store before deletion';
7
+ static flags = {
8
+ ...scoped_memory_command_1.scopedMemoryFlags,
9
+ 'expected-revision': core_1.Flags.integer({ required: true }),
10
+ 'dry-run': core_1.Flags.boolean({
11
+ description: 'Run server validation without archiving the Store',
12
+ }),
13
+ };
14
+ async run() {
15
+ this.requireAuth();
16
+ const { flags } = await this.parse(MemoryStoresArchive);
17
+ const store = await this.resolveStore(flags, { write: true });
18
+ const body = {
19
+ status: 'archived',
20
+ expectedRevision: flags['expected-revision'],
21
+ ...(flags.space ? { spaceId: flags.space } : {}),
22
+ ...(flags['dry-run'] ? { dryRun: true } : {}),
23
+ };
24
+ const result = await this.memoryApi(flags.agent, `/stores/${encodeURIComponent(store.id)}`, {
25
+ method: 'PATCH',
26
+ body,
27
+ });
28
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no Store changed.' : `Archived Memory Store ${store.id}.`);
29
+ }
30
+ }
31
+ exports.default = MemoryStoresArchive;
@@ -0,0 +1,12 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresCreate extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,30 @@
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 MemoryStoresCreate extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Ensure the authorized Agent or current Space Memory Store exists';
7
+ static flags = {
8
+ agent: core_1.Flags.string({ required: true }),
9
+ space: core_1.Flags.string(),
10
+ scope: core_1.Flags.string({ required: true, description: 'agent:<id> or space:<id>' }),
11
+ json: core_1.Flags.boolean(),
12
+ 'dry-run': core_1.Flags.boolean({
13
+ description: 'Run server validation without creating the Store',
14
+ }),
15
+ };
16
+ async run() {
17
+ this.requireAuth();
18
+ const { flags } = await this.parse(MemoryStoresCreate);
19
+ const body = {
20
+ scope: flags.scope,
21
+ ...(flags.space ? { spaceId: flags.space } : {}),
22
+ ...(flags['dry-run'] ? { dryRun: true } : {}),
23
+ };
24
+ const result = await this.memoryApi(flags.agent, '/stores', { method: 'POST', body });
25
+ this.print(result, flags.json, flags['dry-run']
26
+ ? 'Dry run: Store ensure request passed server validation.'
27
+ : `Memory Store ${result.id} is ready.`);
28
+ }
29
+ }
30
+ exports.default = MemoryStoresCreate;
@@ -0,0 +1,15 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresDelete extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ 'expected-revision': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
7
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
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,38 @@
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 MemoryStoresDelete extends scoped_memory_command_1.ScopedMemoryCommand {
7
+ static description = 'Permanently delete an already-archived Memory Store';
8
+ static flags = {
9
+ ...scoped_memory_command_1.scopedMemoryFlags,
10
+ 'expected-revision': core_1.Flags.integer({ required: true }),
11
+ yes: core_1.Flags.boolean({ char: 'y' }),
12
+ 'dry-run': core_1.Flags.boolean({
13
+ description: 'Run server validation without deleting the Store',
14
+ }),
15
+ };
16
+ async run() {
17
+ this.requireAuth();
18
+ const { flags } = await this.parse(MemoryStoresDelete);
19
+ const store = await this.resolveStore(flags, { write: true });
20
+ if (!flags['dry-run']) {
21
+ const ok = await (0, prompt_1.confirmDestructive)(`Permanently delete archived Memory Store ${store.id}?`, flags.yes).catch((error) => this.error(error.message, { exit: error.exit || 7 }));
22
+ if (!ok)
23
+ return this.log('Cancelled.');
24
+ }
25
+ const body = {
26
+ confirmStoreId: store.id,
27
+ expectedRevision: flags['expected-revision'],
28
+ ...(flags.space ? { spaceId: flags.space } : {}),
29
+ ...(flags['dry-run'] ? { dryRun: true } : {}),
30
+ };
31
+ const result = await this.memoryApi(flags.agent, `/stores/${encodeURIComponent(store.id)}`, {
32
+ method: 'DELETE',
33
+ body,
34
+ });
35
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no Store deleted.' : `Deleted Memory Store ${store.id}.`);
36
+ }
37
+ }
38
+ exports.default = MemoryStoresDelete;
@@ -0,0 +1,10 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresList extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ };
9
+ run(): Promise<void>;
10
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const data_schemas_1 = require("@skrr-ai/data-schemas");
5
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
6
+ class MemoryStoresList extends scoped_memory_command_1.ScopedMemoryCommand {
7
+ static description = 'List Memory Stores mounted for an Agent session';
8
+ static flags = {
9
+ agent: core_1.Flags.string({ required: true }),
10
+ space: core_1.Flags.string({ description: 'Current Space context' }),
11
+ json: core_1.Flags.boolean({ description: 'Output stable JSON' }),
12
+ };
13
+ async run() {
14
+ this.requireAuth();
15
+ const { flags } = await this.parse(MemoryStoresList);
16
+ const response = await this.memoryApi(flags.agent, `/stores${this.query(flags)}`);
17
+ const result = {
18
+ stores: response.stores.map((store) => data_schemas_1.MountedMemoryStoreSchema.parse(store)),
19
+ };
20
+ if (flags.json)
21
+ return this.log(JSON.stringify(result, null, 2));
22
+ for (const store of result.stores) {
23
+ this.log(`${store.id} ${store.owner.kind}:${store.owner.id} ${store.mount.access} r${store.revision}`);
24
+ }
25
+ if (!result.stores.length)
26
+ this.log('No mounted Memory Stores.');
27
+ }
28
+ }
29
+ exports.default = MemoryStoresList;
@@ -0,0 +1,12 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresShow extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const scoped_memory_command_1 = require("../../../lib/scoped-memory-command");
4
+ class MemoryStoresShow extends scoped_memory_command_1.ScopedMemoryCommand {
5
+ static description = 'Show one mounted Memory Store';
6
+ static flags = scoped_memory_command_1.scopedMemoryFlags;
7
+ async run() {
8
+ this.requireAuth();
9
+ const { flags } = await this.parse(MemoryStoresShow);
10
+ const store = await this.resolveStore(flags);
11
+ this.print(store, flags.json, `${store.id} ${store.owner.kind}:${store.owner.id} ${store.status} r${store.revision}`);
12
+ }
13
+ }
14
+ exports.default = MemoryStoresShow;
@@ -0,0 +1,15 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemoryStoresUpdate extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ attributes: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ 'expected-revision': import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
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,39 @@
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 MemoryStoresUpdate extends scoped_memory_command_1.ScopedMemoryCommand {
6
+ static description = 'Update Memory Store metadata with revision CAS';
7
+ static flags = {
8
+ ...scoped_memory_command_1.scopedMemoryFlags,
9
+ attributes: core_1.Flags.string({ description: 'Complete attributes JSON object', required: true }),
10
+ 'expected-revision': core_1.Flags.integer({ required: true }),
11
+ 'dry-run': core_1.Flags.boolean({
12
+ description: 'Run server validation without updating the Store',
13
+ }),
14
+ };
15
+ async run() {
16
+ this.requireAuth();
17
+ const { flags } = await this.parse(MemoryStoresUpdate);
18
+ const store = await this.resolveStore(flags, { write: true });
19
+ let attributes;
20
+ try {
21
+ attributes = JSON.parse(flags.attributes);
22
+ }
23
+ catch {
24
+ this.error('--attributes must be valid JSON.', { exit: 2 });
25
+ }
26
+ const body = {
27
+ attributes,
28
+ expectedRevision: flags['expected-revision'],
29
+ ...(flags.space ? { spaceId: flags.space } : {}),
30
+ ...(flags['dry-run'] ? { dryRun: true } : {}),
31
+ };
32
+ const result = await this.memoryApi(flags.agent, `/stores/${encodeURIComponent(store.id)}`, {
33
+ method: 'PATCH',
34
+ body,
35
+ });
36
+ this.print(result, flags.json, flags['dry-run'] ? 'Dry run: no Store changed.' : `Updated Memory Store ${store.id}.`);
37
+ }
38
+ }
39
+ exports.default = MemoryStoresUpdate;
@@ -0,0 +1,13 @@
1
+ import { BaseCommand } from '../../../base-command';
2
+ export default class MemorySyncDelete extends BaseCommand {
3
+ static description: string;
4
+ static args: {
5
+ memoryId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static flags: {
8
+ dir: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const base_command_1 = require("../../../base-command");
5
+ const memory_sync_1 = require("../../../lib/memory-sync");
6
+ const prompt_1 = require("../../../lib/prompt");
7
+ class MemorySyncDelete extends base_command_1.BaseCommand {
8
+ static description = 'Delete a local topic file and stage its version-bound tombstone for the next sync push';
9
+ static args = {
10
+ memoryId: core_1.Args.string({
11
+ description: 'Materialized Memory topic ID',
12
+ required: true,
13
+ ignoreStdin: true,
14
+ }),
15
+ };
16
+ static flags = {
17
+ dir: core_1.Flags.string({ description: 'Materialized Memory directory', required: true }),
18
+ yes: core_1.Flags.boolean({ char: 'y', description: 'Confirm local deletion without prompting' }),
19
+ json: core_1.Flags.boolean({ description: 'Output stable JSON' }),
20
+ };
21
+ async run() {
22
+ const { args, flags } = await this.parse(MemorySyncDelete);
23
+ const ok = await (0, prompt_1.confirmDestructive)(`Delete the local file for Memory topic ${args.memoryId} and stage its permanent deletion?`, flags.yes).catch((error) => this.error(error.message, { exit: error.exit || 7 }));
24
+ if (!ok)
25
+ return this.log('Cancelled.');
26
+ const result = await (0, memory_sync_1.stageLocalDelete)(flags.dir, args.memoryId);
27
+ if (flags.json)
28
+ this.log(JSON.stringify(result, null, 2));
29
+ else {
30
+ this.log(`Staged deletion of ${result.file}.`);
31
+ this.log('Run `skrr memory sync push` with the same Store context to commit it.');
32
+ }
33
+ }
34
+ }
35
+ exports.default = MemorySyncDelete;
@@ -0,0 +1,19 @@
1
+ import { ScopedMemoryCommand } from '../../../lib/scoped-memory-command';
2
+ export default class MemorySyncPull extends ScopedMemoryCommand {
3
+ static description: string;
4
+ static flags: {
5
+ dir: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
6
+ cursor: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
+ 'authorization-generation': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
+ 'expected-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
9
+ 'idempotency-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
+ 'privacy-approval': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
+ 'dry-run': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
+ agent: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
13
+ space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
+ store: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
15
+ scope: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
16
+ json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
17
+ };
18
+ run(): Promise<void>;
19
+ }