@koda-sl/baker-cli 0.34.3 → 0.35.0

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
@@ -2069,6 +2069,7 @@ baker actions list # default: bucketed (claimable, myCla
2069
2069
  baker actions list --bucketed=false --status pending --tag copy
2070
2070
 
2071
2071
  baker actions get <action-id>
2072
+ baker actions status temp_hero jx123 # batch resolve real IDs and temp_* refs
2072
2073
 
2073
2074
  baker actions claim <action-id> # live — returns action details + skill-loading hints
2074
2075
  baker actions release <action-id>
@@ -2090,6 +2091,27 @@ baker actions tag add <action-id-or-tempId> --slug copy
2090
2091
  baker actions tag remove <action-id> --slug copy
2091
2092
  ```
2092
2093
 
2094
+ `baker actions status <ref...>` reads live Work Action status without requiring `BAKER_CHAT_ID`. It sends all refs in one request to `/api/actions/status` and preserves the backend JSON envelope:
2095
+
2096
+ ```json
2097
+ {
2098
+ "ok": true,
2099
+ "data": [
2100
+ {
2101
+ "ref": "temp_hero",
2102
+ "actionId": "jx123",
2103
+ "status": "completed",
2104
+ "name": "Build hero section"
2105
+ },
2106
+ {
2107
+ "ref": "temp_old",
2108
+ "status": "not_found",
2109
+ "hint": "Temp ref was not published, was discarded before publish, or belongs to another company."
2110
+ }
2111
+ ]
2112
+ }
2113
+ ```
2114
+
2093
2115
  Permissions enforced server-side:
2094
2116
 
2095
2117
  - Only `claim`/`release` mutate live state.
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ import { videosCommand } from "./commands/videos/index.js";
13
13
  const main = defineCommand({
14
14
  meta: {
15
15
  name: "baker",
16
- version: "0.34.3",
16
+ version: "0.35.0",
17
17
  description: `AI-agent CLI for finding and managing images, videos, testimonials, action items, scheduled actions, and ad platform data in Baker.
18
18
 
19
19
  Auth: Set BAKER_API_KEY (starts with bk_) and BAKER_API_URL environment variables.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/actions/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,cAAc,qDA6BzB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/actions/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,cAAc,qDA+BzB,CAAC"}
@@ -7,18 +7,20 @@ import { getCommand } from "./get.js";
7
7
  import { linkCommand } from "./link.js";
8
8
  import { listCommand } from "./list.js";
9
9
  import { releaseCommand } from "./release.js";
10
+ import { statusCommand } from "./status.js";
10
11
  import { tagCommand } from "./tag/index.js";
11
12
  import { unlinkCommand } from "./unlink.js";
12
13
  import { updateCommand } from "./update.js";
13
14
  export const actionsCommand = defineCommand({
14
15
  meta: {
15
16
  name: "actions",
16
- description: `Manage action items for the current chat. Subcommands: list, get, claim, release, create, update, complete, discard, link, unlink, tag.
17
+ description: `Manage action items for the current chat. Subcommands: list, get, status, claim, release, create, update, complete, discard, link, unlink, tag.
17
18
 
18
19
  Lifecycle: claim an action before working on it. Stage create/complete/discard via this CLI; they apply when the chat is published. Release if you decide not to work on it after all.
19
20
 
20
21
  Examples:
21
22
  baker actions list # bucketed view: claimable, myClaims, blocked, claimedByOthers
23
+ baker actions status temp_hero jx123 # batch resolve real IDs and temp_* refs
22
24
  baker actions claim <id>
23
25
  baker actions create --name "Build hero" --description "..." --tag copy
24
26
  baker actions complete <id>
@@ -29,6 +31,7 @@ Examples:
29
31
  subCommands: {
30
32
  list: listCommand,
31
33
  get: getCommand,
34
+ status: statusCommand,
32
35
  claim: claimCommand,
33
36
  release: releaseCommand,
34
37
  create: createCommand,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/actions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAA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AAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,WAAW,EAAE;;;;;;;;;;;;oDAYmC;KACjD;IACD,WAAW,EAAE;QACX,IAAI,EAAE,WAAW;QACjB,GAAG,EAAE,UAAU;QACf,MAAM,EAAE,aAAa;QACrB,KAAK,EAAE,YAAY;QACnB,OAAO,EAAE,cAAc;QACvB,MAAM,EAAE,aAAa;QACrB,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,eAAe;QACzB,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,aAAa;QACrB,GAAG,EAAE,UAAU;KAChB;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const statusCommand: import("citty").CommandDef<{
2
+ readonly ref: {
3
+ readonly type: "positional";
4
+ readonly description: "Action ID or temp_* ref; accepts multiple refs";
5
+ readonly required: false;
6
+ };
7
+ }>;
8
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/commands/actions/status.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,aAAa;;;;;;EAwBxB,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { defineCommand } from "citty";
2
+ import { apiPost } from "../../client.js";
3
+ import { writeJson } from "../../output.js";
4
+ import { registerSchema } from "../../schemas.js";
5
+ import { failApi, failValidation } from "./shared.js";
6
+ registerSchema({
7
+ command: "actions.status",
8
+ description: "Resolve one or more Work Action refs by real action ID or temp_* ref in a single batch call.",
9
+ args: {
10
+ refs: { type: "string", description: "One or more action refs: real action IDs or temp_* refs", required: true },
11
+ },
12
+ });
13
+ export const statusCommand = defineCommand({
14
+ meta: {
15
+ name: "status",
16
+ description: "Resolve Work Action refs by real ID or temp_* ref. Example: baker actions status temp_hero jx123",
17
+ },
18
+ args: {
19
+ ref: { type: "positional", description: "Action ID or temp_* ref; accepts multiple refs", required: false },
20
+ },
21
+ run: async ({ args }) => {
22
+ try {
23
+ const refs = [args.ref, ...(Array.isArray(args._) ? args._ : [])]
24
+ .filter((ref) => typeof ref === "string")
25
+ .map((ref) => ref.trim())
26
+ .filter(Boolean);
27
+ if (refs.length === 0) {
28
+ failValidation("At least one action ref is required.");
29
+ }
30
+ const response = await apiPost("/api/actions/status", { refs });
31
+ writeJson(response);
32
+ }
33
+ catch (err) {
34
+ failApi(err);
35
+ }
36
+ },
37
+ });
38
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/commands/actions/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtD,cAAc,CAAC;IACb,OAAO,EAAE,gBAAgB;IACzB,WAAW,EAAE,8FAA8F;IAC3G,IAAI,EAAE;QACJ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yDAAyD,EAAE,QAAQ,EAAE,IAAI,EAAE;KACjH;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC;IACzC,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kGAAkG;KAChH;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,gDAAgD,EAAE,QAAQ,EAAE,KAAK,EAAE;KAC5G;IACD,GAAG,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACtB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;iBAC9D,MAAM,CAAC,CAAC,GAAG,EAAiB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC;iBACvD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;iBACxB,MAAM,CAAC,OAAO,CAAC,CAAC;YACnB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACtB,cAAc,CAAC,sCAAsC,CAAC,CAAC;YACzD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAA8B,qBAAqB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7F,SAAS,CAAC,QAAQ,CAAC,CAAC;QACtB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,GAAG,CAAC,CAAC;QACf,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@koda-sl/baker-cli",
3
- "version": "0.34.3",
3
+ "version": "0.35.0",
4
4
  "description": "AI-agent-first CLI for interacting with Baker",
5
5
  "type": "module",
6
6
  "bin": {