@koda-sl/baker-cli 0.136.0 → 0.137.0-dev.529af4675

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.
package/README.md CHANGED
@@ -2574,6 +2574,29 @@ baker history list --category ads --full # ad writes with raw metadata
2574
2574
 
2575
2575
  ---
2576
2576
 
2577
+ ### `baker chats list | view | transcript | diff`
2578
+
2579
+ Read-only inspection of **other Sessions (chats) on the same account** — so an agent can reuse prior work ("like we did in that other chat, but for X"). Same-account only; never crosses a company boundary and has no write surface.
2580
+
2581
+ ```bash
2582
+ baker chats list # other Sessions, newest first (all statuses)
2583
+ baker chats list --status active # only running Sessions
2584
+ baker chats view <id> # kickoff, outputs (changes), threads, commits
2585
+ baker chats transcript <id> --full # read the conversation, verbatim
2586
+ baker chats diff <id> --surface landings # real file-level changes, landings only
2587
+ baker chats diff <id> --full # include the unified-diff patch text
2588
+ baker chats diff <id> --live # in-progress Session: read from its live workspace
2589
+ ```
2590
+
2591
+ **`list` flags:** `--status active|archived|all` (default `all`), `--limit` (1-100, default 20), `--full` (include each Session's full change list).
2592
+ **`view`:** returns the unified `effects` — git content (`content`, `creatives`) AND DB-only effects that never touch the repo (`actions`, `scheduledActions`, `tags`, `ads.{google,meta,linkedin}`), each resolved to real detail and flagged `staged` (in-progress draft) vs applied. Plus `kickoff`, `outputs` counts, `threads`, `commits`, `diffAvailable`.
2593
+ **`transcript` flags:** `--limit` (1-1000, default 100, most recent), `--full` (untruncated text). Returns `entries` (`role` + `text`) and `truncated`.
2594
+ **`diff` flags:** `--surface knowledge|company|brand|landings|flows|creatives`, `--full` (patch text per file), `--live` (read an in-progress Session's changes from its live workspace). Returns `available`, `source` (`published`|`live`), `files` (`path`, `surface`, `status`, `additions`, `deletions`, `patch`), and `truncated` when a large live diff was capped.
2595
+
2596
+ A Session's effects live in two places: **git content** (files — landings, creatives, flows, brand, knowledge) and **DB-only effects** (Actions, Tags, ad-platform writes — never in the repo). `view` unifies BOTH. `diff` covers the git content (the actual file patches): a **published** Session reads from the commit merged to `main` (durable); an **in-progress** Session has no commit yet, so pass **`--live`** to read its changes straight from the running workspace (it wakes the Session's Runtime; only works while it still exists — a discarded Session's workspace is gone). Use `view` for the complete picture, `diff` (or `diff --live`) to read the real file content.
2597
+
2598
+ ---
2599
+
2577
2600
  ### `baker schema [command]`
2578
2601
 
2579
2602
  Inspect command argument schemas for AI agent introspection.
@@ -7,9 +7,9 @@ import {
7
7
  __toESM
8
8
  } from "./chunk-RK67WL4O.js";
9
9
 
10
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
10
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
11
11
  var require_safe_stable_stringify = __commonJS({
12
- "../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports, module) {
12
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
13
13
  "use strict";
14
14
  var { hasOwnProperty } = Object.prototype;
15
15
  var stringify = configure2();
@@ -983,6 +983,42 @@ var LayerExecutionError = class extends CanvasError {
983
983
  function describeFailureReason(reason) {
984
984
  return reason instanceof Error ? reason.message : String(reason);
985
985
  }
986
+ function failureDetail(reason) {
987
+ if (reason instanceof NodeExecutionError) {
988
+ const c = reason.cause;
989
+ switch (c.kind) {
990
+ case "remote":
991
+ return {
992
+ message: c.message,
993
+ code: c.code,
994
+ provider: c.provider,
995
+ retryable: c.retryable ?? (c.status >= 500 || c.status === 429)
996
+ };
997
+ case "timeout":
998
+ return {
999
+ message: `timed out${c.provider ? ` (${c.provider})` : ""}`,
1000
+ code: "timeout",
1001
+ provider: c.provider,
1002
+ retryable: true
1003
+ };
1004
+ case "content_policy":
1005
+ return { message: c.message, code: "content_policy", provider: c.provider, retryable: false };
1006
+ case "network":
1007
+ return {
1008
+ message: c.cause instanceof Error ? c.cause.message : "network error",
1009
+ code: "network",
1010
+ retryable: true
1011
+ };
1012
+ case "local":
1013
+ return { message: c.cause instanceof Error ? c.cause.message : String(c.cause), code: "local" };
1014
+ default: {
1015
+ const _exhaustive = c;
1016
+ return { message: String(_exhaustive) };
1017
+ }
1018
+ }
1019
+ }
1020
+ return { message: describeFailureReason(reason) };
1021
+ }
986
1022
  function describeCause(c) {
987
1023
  switch (c.kind) {
988
1024
  case "local":
@@ -1034,7 +1070,7 @@ function resolveAdaptFormats(params) {
1034
1070
  return params.formats ?? [];
1035
1071
  }
1036
1072
 
1037
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
1073
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
1038
1074
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1039
1075
  var configure = import__.default.configure;
1040
1076
  var wrapper_default = import__.default;
@@ -3936,7 +3972,7 @@ var Engine = class {
3936
3972
  if (result.status === "rejected" && nodeId) {
3937
3973
  if (result.reason instanceof RunAbortedError) return;
3938
3974
  failures.push({ nodeId, reason: result.reason });
3939
- this.emitProgress(opts, { kind: "node_failed", node_id: nodeId });
3975
+ this.emitProgress(opts, { kind: "node_failed", node_id: nodeId, error: failureDetail(result.reason) });
3940
3976
  }
3941
3977
  });
3942
3978
  if (opts.signal?.aborted) throw new RunAbortedError("signal", "run aborted by signal");
@@ -4512,7 +4548,10 @@ function mapClientError(ctx, e) {
4512
4548
  status: d.status,
4513
4549
  code: d.code,
4514
4550
  message: d.message,
4515
- provider: d.provider
4551
+ provider: d.provider,
4552
+ // The backend's real classification — providerErr pins the status to 502,
4553
+ // so this flag (not the status) is the source of truth for retryability.
4554
+ retryable: d.retryable
4516
4555
  });
4517
4556
  }
4518
4557
  if (d.kind === "content_policy") {
@@ -7798,4 +7837,4 @@ export {
7798
7837
  defaultRegistry,
7799
7838
  createEngineFromEnv
7800
7839
  };
7801
- //# sourceMappingURL=chunk-CIF62V7L.js.map
7840
+ //# sourceMappingURL=chunk-TXNOPO6P.js.map