wildcrane 0.11.36 → 0.11.38

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 (2) hide show
  1. package/dist/kanban.mjs +25 -22
  2. package/package.json +2 -2
package/dist/kanban.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ai4kanban 0.11.36 — built from the CLI's TypeScript sources by cli/scripts/build.mjs.
2
+ // ai4kanban 0.11.38 — built from the CLI's TypeScript sources by cli/scripts/build.mjs.
3
3
  // Do not edit: every change belongs in cli/src/, and a build overwrites this file.
4
4
  import { createRequire as __ai4kanbanRequire } from 'node:module'
5
5
  const require = __ai4kanbanRequire(import.meta.url)
@@ -131,10 +131,10 @@ async function refresh() {
131
131
  const now = readSession();
132
132
  if (!now) return { ok: false, reason: "signed-out" };
133
133
  if (!expiringSoon(now)) return { ok: true, token: now.accessToken, session: now };
134
- const { supabaseUrl, anonKey } = cloudEndpoints();
134
+ const { api, anonKey } = cloudEndpoints();
135
135
  let response;
136
136
  try {
137
- response = await fetch(`${supabaseUrl}/auth/v1/token?grant_type=refresh_token`, {
137
+ response = await fetch(`${api}/auth/v1/token?grant_type=refresh_token`, {
138
138
  method: "POST",
139
139
  headers: { apikey: anonKey, "content-type": "application/json" },
140
140
  body: JSON.stringify({ refresh_token: now.refreshToken })
@@ -4208,8 +4208,8 @@ var init_package = __esm({
4208
4208
  "package.json"() {
4209
4209
  package_default = {
4210
4210
  name: "wildcrane",
4211
- version: "0.11.36",
4212
- akbContract: 8,
4211
+ version: "0.11.38",
4212
+ akbContract: 9,
4213
4213
  description: "WildCrane's `akb` command \u2014 scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
4214
4214
  keywords: [
4215
4215
  "kanban",
@@ -10905,9 +10905,9 @@ var init_goal_cloud = __esm({
10905
10905
  }
10906
10906
  });
10907
10907
 
10908
- // ../../../../cli/node_modules/commander/lib/error.js
10908
+ // node_modules/commander/lib/error.js
10909
10909
  var require_error = __commonJS({
10910
- "../../../../cli/node_modules/commander/lib/error.js"(exports) {
10910
+ "node_modules/commander/lib/error.js"(exports) {
10911
10911
  var CommanderError2 = class extends Error {
10912
10912
  /**
10913
10913
  * Constructs the CommanderError class
@@ -10940,9 +10940,9 @@ var require_error = __commonJS({
10940
10940
  }
10941
10941
  });
10942
10942
 
10943
- // ../../../../cli/node_modules/commander/lib/argument.js
10943
+ // node_modules/commander/lib/argument.js
10944
10944
  var require_argument = __commonJS({
10945
- "../../../../cli/node_modules/commander/lib/argument.js"(exports) {
10945
+ "node_modules/commander/lib/argument.js"(exports) {
10946
10946
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
10947
10947
  var Argument2 = class {
10948
10948
  /**
@@ -11067,9 +11067,9 @@ var require_argument = __commonJS({
11067
11067
  }
11068
11068
  });
11069
11069
 
11070
- // ../../../../cli/node_modules/commander/lib/help.js
11070
+ // node_modules/commander/lib/help.js
11071
11071
  var require_help = __commonJS({
11072
- "../../../../cli/node_modules/commander/lib/help.js"(exports) {
11072
+ "node_modules/commander/lib/help.js"(exports) {
11073
11073
  var { humanReadableArgName } = require_argument();
11074
11074
  var Help2 = class {
11075
11075
  constructor() {
@@ -11636,9 +11636,9 @@ ${itemIndentStr}`);
11636
11636
  }
11637
11637
  });
11638
11638
 
11639
- // ../../../../cli/node_modules/commander/lib/option.js
11639
+ // node_modules/commander/lib/option.js
11640
11640
  var require_option = __commonJS({
11641
- "../../../../cli/node_modules/commander/lib/option.js"(exports) {
11641
+ "node_modules/commander/lib/option.js"(exports) {
11642
11642
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
11643
11643
  var Option2 = class {
11644
11644
  /**
@@ -11937,9 +11937,9 @@ var require_option = __commonJS({
11937
11937
  }
11938
11938
  });
11939
11939
 
11940
- // ../../../../cli/node_modules/commander/lib/suggestSimilar.js
11940
+ // node_modules/commander/lib/suggestSimilar.js
11941
11941
  var require_suggestSimilar = __commonJS({
11942
- "../../../../cli/node_modules/commander/lib/suggestSimilar.js"(exports) {
11942
+ "node_modules/commander/lib/suggestSimilar.js"(exports) {
11943
11943
  var maxDistance = 3;
11944
11944
  function editDistance2(a, b) {
11945
11945
  if (Math.abs(a.length - b.length) > maxDistance)
@@ -12017,9 +12017,9 @@ var require_suggestSimilar = __commonJS({
12017
12017
  }
12018
12018
  });
12019
12019
 
12020
- // ../../../../cli/node_modules/commander/lib/command.js
12020
+ // node_modules/commander/lib/command.js
12021
12021
  var require_command = __commonJS({
12022
- "../../../../cli/node_modules/commander/lib/command.js"(exports) {
12022
+ "node_modules/commander/lib/command.js"(exports) {
12023
12023
  var EventEmitter = __require("node:events").EventEmitter;
12024
12024
  var childProcess = __require("node:child_process");
12025
12025
  var path85 = __require("node:path");
@@ -14176,9 +14176,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
14176
14176
  }
14177
14177
  });
14178
14178
 
14179
- // ../../../../cli/node_modules/commander/index.js
14179
+ // node_modules/commander/index.js
14180
14180
  var require_commander = __commonJS({
14181
- "../../../../cli/node_modules/commander/index.js"(exports) {
14181
+ "node_modules/commander/index.js"(exports) {
14182
14182
  var { Argument: Argument2 } = require_argument();
14183
14183
  var { Command: Command2 } = require_command();
14184
14184
  var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
@@ -14198,10 +14198,10 @@ var require_commander = __commonJS({
14198
14198
  }
14199
14199
  });
14200
14200
 
14201
- // ../../../../cli/node_modules/commander/esm.mjs
14201
+ // node_modules/commander/esm.mjs
14202
14202
  var import_index, program, createCommand, createArgument, createOption, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Command, Argument, Option, Help;
14203
14203
  var init_esm = __esm({
14204
- "../../../../cli/node_modules/commander/esm.mjs"() {
14204
+ "node_modules/commander/esm.mjs"() {
14205
14205
  import_index = __toESM(require_commander(), 1);
14206
14206
  ({
14207
14207
  program,
@@ -22945,7 +22945,7 @@ var init_card_chat = __esm({
22945
22945
  var update_workflow_default;
22946
22946
  var init_update_workflow = __esm({
22947
22947
  "src/guide/update-workflow.md"() {
22948
- update_workflow_default = "# Update a workflow\n\nChange one of this workspace's workflows so new tasks run the new version.\n\n## How a workflow works\n\nA workflow is steerable: agents do the work, and a person reviews and fine-tunes only the parts where precision matters most, so the result stays reliable.\n\n- **Previews**: usually one preview agent shows the first draft; add another only when a part needs precision and a mistake there is costly, such as a developer tool's screens. Each shows only what the person decides on, without overlapping another. With none, the card the `WORKFLOW.md` body writes is the only review.\n- **Unreviewable previews**: when the user finds a preview unneeded or cannot judge it, remove it; a land agent checks that part instead, or nobody does.\n- **Stages**: one stage by default. Add `after` only when a draft is too costly to make before another is approved, such as a video's storyboard, which waits for its script.\n- **Minimal**: when the user outlines the workflow, keep it that simple or simpler; add no review point or constraint they did not ask for, and let the trial show what else needs review.\n- **Judgment**: leave to an agent what it can judge; never add a hard rule for one case, and keep a rule only once real runs show it holds widely.\n- **Memory**: give an agent memory only where it has wide latitude and tends to err or be corrected to taste, naming those error-prone points as what it records; give a narrow agent none.\n- **Land**: everything else runs unattended after the last approval and follows the approved drafts, such as building and merging a change; leave `land` empty when the last approved preview is the deliverable.\n- **Scheduled**: repeating work runs as a scheduled agent without previews; a workflow may hold only scheduled agents.\n- **`WORKFLOW.md`**: list its agents under `previews`, `land` and `scheduled`; `description` says in one sentence what it does; `when` tells an agent which requests it is for, exceptions included; the body is how a card of this kind is written.\n- **Agents**: write each as `akb guide write-agent` says.\n\n## Versions\n\n- **Pinned**: a workflow and the agents it holds live in Cloud as numbered versions; a task\n keeps the version it started with, and only tasks started after a push take the new one.\n- **Project agents**: agents under the board's `agents/` folder are the project's own; a\n workflow may name them, but they are not part of its versions and an edit there applies to\n every card at once.\n- **Own workflows only**: only the workspace's own workflows take a new version; ask the user to\n copy a built-in or marketplace one on the web first.\n\n## Change it\n\n- **Standing preference**: when the user only wants a lasting rule for a workflow or one of its\n agents and the flow itself stays, set it with `akb workflow rule <workflow>` or\n `akb workflow instructions <agent>` instead of pushing; it reaches every task's later runs and\n works on built-in workflows too. Either replaces all of them, so run it bare first to read the\n current ones, and keep each unless the user asks to change or drop it.\n- **Direct or task**: push directly a change the user spelled out; start a Workflow builder task\n instead when the change adds, removes or restages agents, or when the user wants to see it\n work before it applies.\n- **Steps**: `akb workflow pull <id> <folder>`, edit the files there and keep what the request\n leaves alone, fix every problem `akb raw workflow validate <folder>` reports, then\n `akb workflow push <folder>`.\n- **Moved on**: when push says Cloud has a newer version, pull again and redo the change.\n";
22948
+ update_workflow_default = "# Update a workflow\n\nChange one of this workspace's workflows so new tasks run the new version.\n\n## How a workflow works\n\nA workflow is steerable: agents do the work, and a person reviews and fine-tunes only the parts where precision matters most, so the result stays reliable.\n\n- **Previews**: usually one preview agent shows the first draft; add another only when a part needs precision and a mistake there is costly, such as a developer tool's screens. Each shows only what the person decides on, without overlapping another. With none, the card the `WORKFLOW.md` body writes is the only review.\n- **Unreviewable previews**: when the user finds a preview unneeded or cannot judge it, remove it; a land agent checks that part instead, or nobody does.\n- **Stages**: one stage by default. Add `after` only when a draft is too costly to make before another is approved, such as a video's storyboard, which waits for its script.\n- **Minimal**: when the user outlines the workflow, keep it that simple or simpler; add no review point or constraint they did not ask for, and let the trial show what else needs review.\n- **Judgment**: leave to an agent what it can judge; never add a hard rule for one case, and keep a rule only once real runs show it holds widely.\n- **Memory**: give an agent memory only where it has wide latitude and tends to err or be corrected to taste, naming those error-prone points as what it records; give a narrow agent none.\n- **Land**: everything else runs unattended after the last approval and follows the approved drafts, such as building and merging a change; leave `land` empty when the last approved preview is the deliverable.\n- **Scheduled**: repeating work runs as a scheduled agent without previews; a workflow may hold only scheduled agents.\n- **`WORKFLOW.md`**: list its agents under `previews`, `land` and `scheduled`; `description` says in one sentence what it does; `when` tells an agent which requests it is for, exceptions included; the body is how a card of this kind is written.\n- **Agents**: write each as `akb guide write-agent` says.\n\n## Versions\n\n- **Pinned**: a workflow and the agents it holds live in Cloud as numbered versions; a task\n keeps the version it started with, and only tasks started after a push take the new one.\n- **Project agents**: agents under the board's `agents/` folder are the project's own; a\n workflow may name them, but they are not part of its versions and an edit there applies to\n every card at once.\n- **Own workflows only**: only the workspace's own workflows take a new version; ask the user to\n copy a built-in or marketplace one on the web first.\n\n## Change it\n\n- **Standing preference**: when the user only wants a lasting rule for a workflow or one of its\n agents and the flow itself stays, set it with `akb workflow rule <workflow>` or\n `akb workflow instructions <agent>` instead of pushing; it reaches every task's later runs and\n works on built-in workflows too. Either replaces all of them, so run it bare first to read the\n current ones, and keep each unless the user asks to change or drop it.\n- **Direct or task**: push directly a change the user spelled out; start a Workflow builder task\n instead when the change adds, removes or restages agents, or when the user wants to review\n it before it applies.\n- **Steps**: `akb workflow pull <id> <folder>`, edit the files there and keep what the request\n leaves alone, fix every problem `akb raw workflow validate <folder>` reports, then\n `akb workflow push <folder>`.\n- **Moved on**: when push says Cloud has a newer version, pull again and redo the change.\n";
22949
22949
  }
22950
22950
  });
22951
22951
 
@@ -26546,6 +26546,9 @@ function declareAgent(program2, cli) {
26546
26546
  ])
26547
26547
  );
26548
26548
  });
26549
+ withShared(agent.command("picks", { hidden: true })).argument("<json>", "runtime picks by workflow agent").action(async function(json) {
26550
+ await onBoard2(this, cli, () => cmdAgent(["picks", json]));
26551
+ });
26549
26552
  word("run").argument("<workflow>", "a workflow id, e.g. coding").argument("<agent>", "one of the agents it schedules").summary("run a workflow's scheduled agent once, now").addOption(new Option("-p, --print", "say what to do and start nothing").conflicts("follow")).option("-f, --follow", "watch the log instead of returning").option("--events", "with --follow: print its structured events, one JSON object per line").action(async function(workflow, name) {
26550
26553
  await onBoard2(this, cli, (p) => cmdRunScheduled(workflow, name, this.opts(), p));
26551
26554
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wildcrane",
3
- "version": "0.11.36",
4
- "akbContract": 8,
3
+ "version": "0.11.38",
4
+ "akbContract": 9,
5
5
  "description": "WildCrane's `akb` command — scaffold the Markdown board under docs/kanban/, put an agent on a card, and carry the flows the agent works by.",
6
6
  "keywords": [
7
7
  "kanban",