@openagentpack/cli 0.3.2 → 0.4.0-beta-2472720-20260827

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.
@@ -3,7 +3,7 @@ import {
3
3
  configureLogger,
4
4
  log,
5
5
  program
6
- } from "../chunk-42S5N2XA.js";
6
+ } from "../chunk-V2QDO63Z.js";
7
7
 
8
8
  // bin/agents.ts
9
9
  import { UserError } from "@openagentpack/sdk";
@@ -286,7 +286,20 @@ async function applyCommand(options) {
286
286
  }
287
287
  const actionable = plan.actions.filter((a) => a.action !== "no-op");
288
288
  if (actionable.length === 0) {
289
- log.success("No changes. Infrastructure is up-to-date.");
289
+ if (options.refreshOnly) {
290
+ log.success("No changes. Infrastructure is up-to-date.");
291
+ return;
292
+ }
293
+ const s2 = p2.spinner({ output: process.stderr });
294
+ s2.start("Reconciling provider-managed defaults...");
295
+ const result2 = await executePlannedProject(planned, {
296
+ onFeedback: renderRuntimeFeedback,
297
+ policy: "force",
298
+ concurrency: options.concurrency
299
+ });
300
+ s2.stop("Provider-managed defaults reconciled.");
301
+ if (result2.partial) throw new UserError2("Apply failed.");
302
+ log.success("No resource changes. Infrastructure is up-to-date.");
290
303
  return;
291
304
  }
292
305
  const creates = actionable.filter((a) => a.action === "create");
@@ -512,7 +525,8 @@ async function destroyCommand(options) {
512
525
  const ctx = await buildCliRuntime(options.file);
513
526
  const planned = planDestroyProjectContext(ctx);
514
527
  const resources = planned.resources;
515
- if (resources.length === 0) {
528
+ const pendingDefaultMemoryStores = planned.defaultMemoryStores.filter((store) => store.memoryStoreId);
529
+ if (resources.length === 0 && pendingDefaultMemoryStores.length === 0) {
516
530
  log.info("No resources in state. Nothing to destroy.");
517
531
  return;
518
532
  }
@@ -522,6 +536,13 @@ Destroy ${resources.length} resource(s):
522
536
  for (const r of resources) {
523
537
  console.log(chalk6.red(` - ${formatResourceLabel(r.address)} [${r.remote_id}]`));
524
538
  }
539
+ for (const store of planned.defaultMemoryStores) {
540
+ const policy = store.deleteOnDestroy ? chalk6.red.bold("permanently delete") : chalk6.green("retain");
541
+ console.log(` - default_memory_store.${store.agentName} [${policy}]`);
542
+ }
543
+ if (planned.defaultMemoryStores.some((store) => store.deleteOnDestroy)) {
544
+ console.log(chalk6.red.bold("\nDefault Memory Store content and all version history will be permanently deleted."));
545
+ }
525
546
  if (!options.yes) {
526
547
  const shouldDestroy = await p3.confirm({
527
548
  message: "Are you sure you want to destroy ALL resources?",
@@ -562,9 +583,17 @@ Destroy ${resources.length} resource(s):
562
583
  activeSpinner = void 0;
563
584
  }
564
585
  });
565
- const summary = result.destroyed === result.resources.length ? chalk6.green(`Destroy complete. ${result.destroyed}/${result.resources.length} resources removed.`) : chalk6.yellow(`Destroy complete. ${result.destroyed}/${result.resources.length} resources removed.`);
586
+ for (const store of result.defaultMemoryStoreResults) renderDefaultMemoryStoreResult(store);
587
+ const summary = !result.partial ? chalk6.green(`Destroy complete. ${result.destroyed}/${result.resources.length} resources removed.`) : chalk6.yellow(`Destroy partial. ${result.destroyed}/${result.resources.length} resources removed.`);
566
588
  p3.outro(summary, { output: process.stderr });
567
589
  }
590
+ function renderDefaultMemoryStoreResult(result) {
591
+ const label = `default_memory_store.${result.agentName}`;
592
+ if (result.status === "retained") log.success(`${label} \u2014 retained`);
593
+ else if (result.status === "deleted") log.success(`${label} \u2014 permanently deleted`);
594
+ else if (result.status === "already_gone") log.warn(`${label} \u2014 already absent`);
595
+ else log.error(`${label} \u2014 delete failed: ${result.error ?? "unknown error"}`);
596
+ }
568
597
  function stopResourceSpinner(spinner4, result) {
569
598
  const label = formatResourceLabel(result.resource.address);
570
599
  if (!spinner4) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  program
3
- } from "../chunk-42S5N2XA.js";
3
+ } from "../chunk-V2QDO63Z.js";
4
4
  export {
5
5
  program
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagentpack/cli",
3
- "version": "0.3.2",
3
+ "version": "0.4.0-beta-2472720-20260827",
4
4
  "description": "Open Agent Pack — Declaratively manage AI agent infrastructure",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -49,12 +49,12 @@
49
49
  "typecheck": "tsc --noEmit"
50
50
  },
51
51
  "devDependencies": {
52
- "@openagentpack/playground": "0.3.2",
52
+ "@openagentpack/playground": "0.4.0-beta-2472720-20260827",
53
53
  "@types/bun": "^1.3.14",
54
54
  "typescript": "^6.0.3"
55
55
  },
56
56
  "dependencies": {
57
- "@openagentpack/sdk": "0.3.2",
57
+ "@openagentpack/sdk": "0.4.0-beta-2472720-20260827",
58
58
  "@clack/prompts": "^1.5.1",
59
59
  "chalk": "^5.6.2",
60
60
  "commander": "^14.0.3",