@koda-sl/baker-cli 0.366.0-dev.efa067f23 → 0.366.0-dev.fa751dbf1
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 +1 -2
- package/dist/cli.js +5 -72
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3456,8 +3456,7 @@ baker actions list # default: bucketed (claimable, myCla
|
|
|
3456
3456
|
# then most recent. The `blocked` bucket is ordered closest-to-ready first.
|
|
3457
3457
|
baker actions list --bucketed=false --status pending
|
|
3458
3458
|
baker actions list --bucketed=false --sort priority # flat list, do-first order (default); use --sort recent for newest-first
|
|
3459
|
-
baker actions list --output md # id-first Markdown
|
|
3460
|
-
baker actions list --full # whole descriptions instead of the one-line summary (large on a real backlog)
|
|
3459
|
+
baker actions list --output md # id-first Markdown; works for both the bucketed and flat shapes
|
|
3461
3460
|
baker actions list --search "conversion goal" --output md # find Tasks by words in name/description/tags (flat, best match first)
|
|
3462
3461
|
# With BAKER_CHAT_ID, the bucketed list folds in THIS chat's draft: staged creates appear in
|
|
3463
3462
|
# `draftCreates`; published actions being completed/discarded/updated carry a `draftStatus` marker.
|
package/dist/cli.js
CHANGED
|
@@ -9224,7 +9224,7 @@ var linkCommand = defineCommand7({
|
|
|
9224
9224
|
import { defineCommand as defineCommand8 } from "citty";
|
|
9225
9225
|
registerSchema({
|
|
9226
9226
|
command: "actions.list",
|
|
9227
|
-
description: 'List actions for the current company.
|
|
9227
|
+
description: 'List actions for the current company. Default: pre-bucketed (claimable/myClaims/blocked/claimedByOthers/completed/discarded), each bucket ordered do-first (blockers before blocked, then highest-leverage). The bucketed view reads the whole open backlog, so nothing pending is ever hidden from it. Set --bucketed=false for a flat list filterable by --status, orderable by --sort, and windowed by --limit. Looking for one Task by name? --search "conversion goal" --output md returns only the matching Tasks instead of the whole backlog.',
|
|
9228
9228
|
args: {
|
|
9229
9229
|
search: {
|
|
9230
9230
|
type: "string",
|
|
@@ -9252,19 +9252,13 @@ registerSchema({
|
|
|
9252
9252
|
description: `How many Tasks a flat list reads, newest first (only with --bucketed=false). Default: ${ACTIONS_LIST_DEFAULT_LIMIT}. When the read comes back full, hints[] says so \u2014 raise --limit to reach older Tasks.`,
|
|
9253
9253
|
required: false
|
|
9254
9254
|
},
|
|
9255
|
-
full: {
|
|
9256
|
-
type: "boolean",
|
|
9257
|
-
description: "Print every Task's whole description (and the flat list's full record) instead of a one-line summary. Large on a real backlog \u2014 prefer --search, or `baker actions get <id>` for one Task.",
|
|
9258
|
-
required: false,
|
|
9259
|
-
default: false
|
|
9260
|
-
},
|
|
9261
9255
|
output: { type: "string", description: "Output format: json|md. Default: json", required: false }
|
|
9262
9256
|
}
|
|
9263
9257
|
});
|
|
9264
9258
|
var listCommand2 = defineCommand8({
|
|
9265
9259
|
meta: {
|
|
9266
9260
|
name: "list",
|
|
9267
|
-
description: "List actions
|
|
9261
|
+
description: "List actions. Default: bucketed view (claimable, myClaims, blocked, claimedByOthers). Use --bucketed=false for raw filter by --status, or --search <text> to find Tasks by name."
|
|
9268
9262
|
},
|
|
9269
9263
|
args: {
|
|
9270
9264
|
search: { type: "string", description: "Find Tasks by words in name/description/tags", required: false },
|
|
@@ -9272,12 +9266,6 @@ var listCommand2 = defineCommand8({
|
|
|
9272
9266
|
status: { type: "string", description: "Status filter (raw mode)", required: false },
|
|
9273
9267
|
sort: { type: "string", description: "Order (raw mode): priority|recent", required: false },
|
|
9274
9268
|
limit: { type: "string", description: "How many Tasks to read (raw mode)", required: false },
|
|
9275
|
-
full: {
|
|
9276
|
-
type: "boolean",
|
|
9277
|
-
description: "Whole descriptions instead of a summary line",
|
|
9278
|
-
required: false,
|
|
9279
|
-
default: false
|
|
9280
|
-
},
|
|
9281
9269
|
output: { type: "string", description: "Output format: json|md", required: false }
|
|
9282
9270
|
},
|
|
9283
9271
|
run: async ({ args: args5 }) => {
|
|
@@ -9285,8 +9273,7 @@ var listCommand2 = defineCommand8({
|
|
|
9285
9273
|
const body = buildListRequest(args5, getEnv().BAKER_CHAT_ID);
|
|
9286
9274
|
const response = await apiPost("/api/actions/list", body);
|
|
9287
9275
|
const hints2 = body.bucketed === false && body.limit !== void 0 && response.ok && Array.isArray(response.data) ? buildListHints({ returned: response.data.length, limit: body.limit }) : [];
|
|
9288
|
-
const
|
|
9289
|
-
const envelope = hints2.length > 0 ? { ...shaped, hints: hints2 } : shaped;
|
|
9276
|
+
const envelope = hints2.length > 0 ? { ...response, hints: hints2 } : response;
|
|
9290
9277
|
if (args5.output === "md" && envelope.ok) {
|
|
9291
9278
|
process.stdout.write(renderMarkdown(envelope.data, hints2));
|
|
9292
9279
|
return;
|
|
@@ -9318,52 +9305,6 @@ function buildListRequest(args5, chatId) {
|
|
|
9318
9305
|
}
|
|
9319
9306
|
return body;
|
|
9320
9307
|
}
|
|
9321
|
-
var SUMMARY_MAX_CHARS = 100;
|
|
9322
|
-
function summarizeDescription(description) {
|
|
9323
|
-
const line = description.split("\n").filter((raw) => !/^\s*#{1,6}\s/.test(raw)).map(
|
|
9324
|
-
(raw) => raw.replace(/^\s*(?:[-*+>]|\d+[.)])\s+/, "").replace(/[*_`]/g, "").replace(/\s+/g, " ").trim()
|
|
9325
|
-
).find((text2) => text2.length > 0) ?? "";
|
|
9326
|
-
if (line.length <= SUMMARY_MAX_CHARS) {
|
|
9327
|
-
return line;
|
|
9328
|
-
}
|
|
9329
|
-
const cut = line.slice(0, SUMMARY_MAX_CHARS - 1);
|
|
9330
|
-
const lastSpace = cut.lastIndexOf(" ");
|
|
9331
|
-
return `${(lastSpace > SUMMARY_MAX_CHARS / 2 ? cut.slice(0, lastSpace) : cut).trimEnd()}\u2026`;
|
|
9332
|
-
}
|
|
9333
|
-
function compactBucketEntry(entry) {
|
|
9334
|
-
const { description, ...rest } = entry;
|
|
9335
|
-
return { ...rest, summary: summarizeDescription(typeof description === "string" ? description : "") };
|
|
9336
|
-
}
|
|
9337
|
-
function compactFlatRow(entry) {
|
|
9338
|
-
const nested = entry.action;
|
|
9339
|
-
const doc = nested && typeof nested === "object" ? nested : entry;
|
|
9340
|
-
const { id, name, status, hint } = toRow(entry);
|
|
9341
|
-
const assignee = entry.assignee && typeof entry.assignee === "object" ? entry.assignee : null;
|
|
9342
|
-
return {
|
|
9343
|
-
id,
|
|
9344
|
-
name,
|
|
9345
|
-
status,
|
|
9346
|
-
...typeof doc.priority === "string" ? { priority: doc.priority } : {},
|
|
9347
|
-
...Array.isArray(doc.tags) && doc.tags.length > 0 ? { tags: doc.tags } : {},
|
|
9348
|
-
summary: summarizeDescription(typeof doc.description === "string" ? doc.description : ""),
|
|
9349
|
-
...hint ? { hint } : {},
|
|
9350
|
-
...typeof assignee?.name === "string" ? { assignee: assignee.name } : {}
|
|
9351
|
-
};
|
|
9352
|
-
}
|
|
9353
|
-
function compactListData(data) {
|
|
9354
|
-
if (Array.isArray(data)) {
|
|
9355
|
-
return data.map((entry) => compactFlatRow(entry));
|
|
9356
|
-
}
|
|
9357
|
-
if (!data || typeof data !== "object") {
|
|
9358
|
-
return data;
|
|
9359
|
-
}
|
|
9360
|
-
return Object.fromEntries(
|
|
9361
|
-
Object.entries(data).map(([bucket, entries]) => [
|
|
9362
|
-
bucket,
|
|
9363
|
-
Array.isArray(entries) ? entries.map((entry) => compactBucketEntry(entry)) : entries
|
|
9364
|
-
])
|
|
9365
|
-
);
|
|
9366
|
-
}
|
|
9367
9308
|
function toRow(entry) {
|
|
9368
9309
|
const nested = entry.action;
|
|
9369
9310
|
const doc = nested && typeof nested === "object" ? nested : entry;
|
|
@@ -9385,14 +9326,6 @@ function renderEntry(entry) {
|
|
|
9385
9326
|
const row = toRow(entry);
|
|
9386
9327
|
const suffix = row.status ? ` [${row.status}]` : "";
|
|
9387
9328
|
const lines = [`- \`${row.id}\` ${row.name}${suffix}`];
|
|
9388
|
-
const nested = entry.action;
|
|
9389
|
-
const doc = nested && typeof nested === "object" ? nested : entry;
|
|
9390
|
-
const text2 = typeof entry.summary === "string" ? entry.summary : doc.description;
|
|
9391
|
-
if (typeof text2 === "string" && text2.trim()) {
|
|
9392
|
-
lines.push(
|
|
9393
|
-
...text2.trim().split("\n").map((line) => line ? ` ${line}` : "")
|
|
9394
|
-
);
|
|
9395
|
-
}
|
|
9396
9329
|
if (row.hint) {
|
|
9397
9330
|
lines.push(` ${row.hint}`);
|
|
9398
9331
|
}
|
|
@@ -14808,8 +14741,8 @@ var SEND_PLATFORM_SPECS = {
|
|
|
14808
14741
|
title: "Meta",
|
|
14809
14742
|
eventMeans: "A Meta event name \u2014 Lead, Purchase, Schedule, or one of your own",
|
|
14810
14743
|
eventKind: "name",
|
|
14811
|
-
credentialFields: ["accessToken"
|
|
14812
|
-
setupHint: "Add the Conversions API access token
|
|
14744
|
+
credentialFields: ["accessToken"],
|
|
14745
|
+
setupHint: "Add the Conversions API access token to the Meta pixel in Tracking"
|
|
14813
14746
|
},
|
|
14814
14747
|
googleAds: {
|
|
14815
14748
|
title: "Google Ads",
|