wildcrane-runner 0.6.42 → 0.6.44

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.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // ai4kanban 0.11.36 — built by runner/scripts/build.mjs. Do not edit.
2
+ // ai4kanban 0.11.38 — built by runner/scripts/build.mjs. Do not edit.
3
3
  import { createRequire as __ai4kanbanRequire } from 'node:module'
4
4
  const require = __ai4kanbanRequire(import.meta.url)
5
5
  var __create = Object.create;
@@ -130,10 +130,10 @@ async function refresh() {
130
130
  const now = readSession();
131
131
  if (!now) return { ok: false, reason: "signed-out" };
132
132
  if (!expiringSoon(now)) return { ok: true, token: now.accessToken, session: now };
133
- const { supabaseUrl, anonKey } = cloudEndpoints();
133
+ const { api, anonKey } = cloudEndpoints();
134
134
  let response;
135
135
  try {
136
- response = await fetch(`${supabaseUrl}/auth/v1/token?grant_type=refresh_token`, {
136
+ response = await fetch(`${api}/auth/v1/token?grant_type=refresh_token`, {
137
137
  method: "POST",
138
138
  headers: { apikey: anonKey, "content-type": "application/json" },
139
139
  body: JSON.stringify({ refresh_token: now.refreshToken })
@@ -4207,8 +4207,8 @@ var init_package = __esm({
4207
4207
  "../cli/package.json"() {
4208
4208
  package_default = {
4209
4209
  name: "wildcrane",
4210
- version: "0.11.36",
4211
- akbContract: 8,
4210
+ version: "0.11.38",
4211
+ akbContract: 9,
4212
4212
  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.",
4213
4213
  keywords: [
4214
4214
  "kanban",
@@ -10904,9 +10904,9 @@ var init_goal_cloud = __esm({
10904
10904
  }
10905
10905
  });
10906
10906
 
10907
- // ../../../../cli/node_modules/commander/lib/error.js
10907
+ // ../cli/node_modules/commander/lib/error.js
10908
10908
  var require_error = __commonJS({
10909
- "../../../../cli/node_modules/commander/lib/error.js"(exports) {
10909
+ "../cli/node_modules/commander/lib/error.js"(exports) {
10910
10910
  var CommanderError2 = class extends Error {
10911
10911
  /**
10912
10912
  * Constructs the CommanderError class
@@ -10939,9 +10939,9 @@ var require_error = __commonJS({
10939
10939
  }
10940
10940
  });
10941
10941
 
10942
- // ../../../../cli/node_modules/commander/lib/argument.js
10942
+ // ../cli/node_modules/commander/lib/argument.js
10943
10943
  var require_argument = __commonJS({
10944
- "../../../../cli/node_modules/commander/lib/argument.js"(exports) {
10944
+ "../cli/node_modules/commander/lib/argument.js"(exports) {
10945
10945
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
10946
10946
  var Argument2 = class {
10947
10947
  /**
@@ -11066,9 +11066,9 @@ var require_argument = __commonJS({
11066
11066
  }
11067
11067
  });
11068
11068
 
11069
- // ../../../../cli/node_modules/commander/lib/help.js
11069
+ // ../cli/node_modules/commander/lib/help.js
11070
11070
  var require_help = __commonJS({
11071
- "../../../../cli/node_modules/commander/lib/help.js"(exports) {
11071
+ "../cli/node_modules/commander/lib/help.js"(exports) {
11072
11072
  var { humanReadableArgName } = require_argument();
11073
11073
  var Help2 = class {
11074
11074
  constructor() {
@@ -11635,9 +11635,9 @@ ${itemIndentStr}`);
11635
11635
  }
11636
11636
  });
11637
11637
 
11638
- // ../../../../cli/node_modules/commander/lib/option.js
11638
+ // ../cli/node_modules/commander/lib/option.js
11639
11639
  var require_option = __commonJS({
11640
- "../../../../cli/node_modules/commander/lib/option.js"(exports) {
11640
+ "../cli/node_modules/commander/lib/option.js"(exports) {
11641
11641
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
11642
11642
  var Option2 = class {
11643
11643
  /**
@@ -11936,9 +11936,9 @@ var require_option = __commonJS({
11936
11936
  }
11937
11937
  });
11938
11938
 
11939
- // ../../../../cli/node_modules/commander/lib/suggestSimilar.js
11939
+ // ../cli/node_modules/commander/lib/suggestSimilar.js
11940
11940
  var require_suggestSimilar = __commonJS({
11941
- "../../../../cli/node_modules/commander/lib/suggestSimilar.js"(exports) {
11941
+ "../cli/node_modules/commander/lib/suggestSimilar.js"(exports) {
11942
11942
  var maxDistance = 3;
11943
11943
  function editDistance2(a, b) {
11944
11944
  if (Math.abs(a.length - b.length) > maxDistance)
@@ -12016,9 +12016,9 @@ var require_suggestSimilar = __commonJS({
12016
12016
  }
12017
12017
  });
12018
12018
 
12019
- // ../../../../cli/node_modules/commander/lib/command.js
12019
+ // ../cli/node_modules/commander/lib/command.js
12020
12020
  var require_command = __commonJS({
12021
- "../../../../cli/node_modules/commander/lib/command.js"(exports) {
12021
+ "../cli/node_modules/commander/lib/command.js"(exports) {
12022
12022
  var EventEmitter = __require("node:events").EventEmitter;
12023
12023
  var childProcess = __require("node:child_process");
12024
12024
  var path85 = __require("node:path");
@@ -14175,9 +14175,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
14175
14175
  }
14176
14176
  });
14177
14177
 
14178
- // ../../../../cli/node_modules/commander/index.js
14178
+ // ../cli/node_modules/commander/index.js
14179
14179
  var require_commander = __commonJS({
14180
- "../../../../cli/node_modules/commander/index.js"(exports) {
14180
+ "../cli/node_modules/commander/index.js"(exports) {
14181
14181
  var { Argument: Argument2 } = require_argument();
14182
14182
  var { Command: Command2 } = require_command();
14183
14183
  var { CommanderError: CommanderError2, InvalidArgumentError: InvalidArgumentError2 } = require_error();
@@ -14197,10 +14197,10 @@ var require_commander = __commonJS({
14197
14197
  }
14198
14198
  });
14199
14199
 
14200
- // ../../../../cli/node_modules/commander/esm.mjs
14200
+ // ../cli/node_modules/commander/esm.mjs
14201
14201
  var import_index, program, createCommand, createArgument, createOption, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Command, Argument, Option, Help;
14202
14202
  var init_esm = __esm({
14203
- "../../../../cli/node_modules/commander/esm.mjs"() {
14203
+ "../cli/node_modules/commander/esm.mjs"() {
14204
14204
  import_index = __toESM(require_commander(), 1);
14205
14205
  ({
14206
14206
  program,
@@ -22944,7 +22944,7 @@ var init_card_chat = __esm({
22944
22944
  var update_workflow_default;
22945
22945
  var init_update_workflow = __esm({
22946
22946
  "../cli/src/guide/update-workflow.md"() {
22947
- 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";
22947
+ 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";
22948
22948
  }
22949
22949
  });
22950
22950
 
@@ -26545,6 +26545,9 @@ function declareAgent(program2, cli) {
26545
26545
  ])
26546
26546
  );
26547
26547
  });
26548
+ withShared(agent.command("picks", { hidden: true })).argument("<json>", "runtime picks by workflow agent").action(async function(json) {
26549
+ await onBoard2(this, cli, () => cmdAgent(["picks", json]));
26550
+ });
26548
26551
  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) {
26549
26552
  await onBoard2(this, cli, (p) => cmdRunScheduled(workflow, name, this.opts(), p));
26550
26553
  });
@@ -1 +1 @@
1
- {"name":"wildcrane","version":"0.11.36","akbContract":8,"type":"module","private":true}
1
+ {"name":"wildcrane","version":"0.11.38","akbContract":9,"type":"module","private":true}