wildcrane-runner 0.6.114 → 0.6.116

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,4 +1,4 @@
1
- // wildcrane-runner 0.6.114 — built by runner/scripts/build.mjs. Do not edit.
1
+ // wildcrane-runner 0.6.116 — built by runner/scripts/build.mjs. Do not edit.
2
2
  import { createRequire as __ai4kanbanRequire } from 'node:module'
3
3
  const require = __ai4kanbanRequire(import.meta.url)
4
4
  var __create = Object.create;
@@ -27386,7 +27386,7 @@ var require_Scalar = __commonJS({
27386
27386
  var Node = require_Node();
27387
27387
  var toJS = require_toJS();
27388
27388
  var isScalarValue = (value) => !value || typeof value !== "function" && typeof value !== "object";
27389
- var Scalar = class extends Node.NodeBase {
27389
+ var Scalar2 = class extends Node.NodeBase {
27390
27390
  constructor(value) {
27391
27391
  super(identity.SCALAR);
27392
27392
  this.value = value;
@@ -27398,12 +27398,12 @@ var require_Scalar = __commonJS({
27398
27398
  return String(this.value);
27399
27399
  }
27400
27400
  };
27401
- Scalar.BLOCK_FOLDED = "BLOCK_FOLDED";
27402
- Scalar.BLOCK_LITERAL = "BLOCK_LITERAL";
27403
- Scalar.PLAIN = "PLAIN";
27404
- Scalar.QUOTE_DOUBLE = "QUOTE_DOUBLE";
27405
- Scalar.QUOTE_SINGLE = "QUOTE_SINGLE";
27406
- exports.Scalar = Scalar;
27401
+ Scalar2.BLOCK_FOLDED = "BLOCK_FOLDED";
27402
+ Scalar2.BLOCK_LITERAL = "BLOCK_LITERAL";
27403
+ Scalar2.PLAIN = "PLAIN";
27404
+ Scalar2.QUOTE_DOUBLE = "QUOTE_DOUBLE";
27405
+ Scalar2.QUOTE_SINGLE = "QUOTE_SINGLE";
27406
+ exports.Scalar = Scalar2;
27407
27407
  exports.isScalarValue = isScalarValue;
27408
27408
  }
27409
27409
  });
@@ -27414,7 +27414,7 @@ var require_createNode = __commonJS({
27414
27414
  "use strict";
27415
27415
  var Alias = require_Alias();
27416
27416
  var identity = require_identity();
27417
- var Scalar = require_Scalar();
27417
+ var Scalar2 = require_Scalar();
27418
27418
  var defaultTagPrefix = "tag:yaml.org,2002:";
27419
27419
  function findTagObject(value, tagName, tags) {
27420
27420
  if (tagName) {
@@ -27459,7 +27459,7 @@ var require_createNode = __commonJS({
27459
27459
  value = value.toJSON();
27460
27460
  }
27461
27461
  if (!value || typeof value !== "object") {
27462
- const node3 = new Scalar.Scalar(value);
27462
+ const node3 = new Scalar2.Scalar(value);
27463
27463
  if (ref)
27464
27464
  ref.node = node3;
27465
27465
  return node3;
@@ -27470,7 +27470,7 @@ var require_createNode = __commonJS({
27470
27470
  onTagObj(tagObj);
27471
27471
  delete ctx.onTagObj;
27472
27472
  }
27473
- const node2 = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar.Scalar(value);
27473
+ const node2 = tagObj?.createNode ? tagObj.createNode(ctx.schema, value, ctx) : typeof tagObj?.nodeClass?.from === "function" ? tagObj.nodeClass.from(ctx.schema, value, ctx) : new Scalar2.Scalar(value);
27474
27474
  if (tagName)
27475
27475
  node2.tag = tagName;
27476
27476
  else if (!tagObj.default)
@@ -27783,7 +27783,7 @@ ${indent}${text4.slice(fold + 1, end3)}`;
27783
27783
  var require_stringifyString = __commonJS({
27784
27784
  "../cli/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
27785
27785
  "use strict";
27786
- var Scalar = require_Scalar();
27786
+ var Scalar2 = require_Scalar();
27787
27787
  var foldFlowLines = require_foldFlowLines();
27788
27788
  var getFoldOptions = (ctx, isBlock) => ({
27789
27789
  indentAtStart: isBlock ? ctx.indent.length : ctx.indentAtStart,
@@ -27926,7 +27926,7 @@ ${indent}`) + "'";
27926
27926
  return quotedString(value, ctx);
27927
27927
  }
27928
27928
  const indent = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value) ? " " : "");
27929
- const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar.Scalar.BLOCK_FOLDED ? false : type === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
27929
+ const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type === Scalar2.Scalar.BLOCK_FOLDED ? false : type === Scalar2.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value, lineWidth, indent.length);
27930
27930
  if (!value)
27931
27931
  return literal2 ? "|\n" : ">\n";
27932
27932
  let chomp;
@@ -27981,7 +27981,7 @@ ${indent}`) + "'";
27981
27981
  const foldedValue = value.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent}`);
27982
27982
  let literalFallback = false;
27983
27983
  const foldOptions = getFoldOptions(ctx, true);
27984
- if (blockQuote !== "folded" && type !== Scalar.Scalar.BLOCK_FOLDED) {
27984
+ if (blockQuote !== "folded" && type !== Scalar2.Scalar.BLOCK_FOLDED) {
27985
27985
  foldOptions.onOverflow = () => {
27986
27986
  literalFallback = true;
27987
27987
  };
@@ -28004,7 +28004,7 @@ ${indent}${start}${value}${end2}`;
28004
28004
  if (/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(value)) {
28005
28005
  return implicitKey || inFlow || !value.includes("\n") ? quotedString(value, ctx) : blockString(item, ctx, onComment, onChompKeep);
28006
28006
  }
28007
- if (!implicitKey && !inFlow && type !== Scalar.Scalar.PLAIN && value.includes("\n")) {
28007
+ if (!implicitKey && !inFlow && type !== Scalar2.Scalar.PLAIN && value.includes("\n")) {
28008
28008
  return blockString(item, ctx, onComment, onChompKeep);
28009
28009
  }
28010
28010
  if (containsDocumentMarker(value)) {
@@ -28029,20 +28029,20 @@ ${indent}`);
28029
28029
  const { implicitKey, inFlow } = ctx;
28030
28030
  const ss = typeof item.value === "string" ? item : Object.assign({}, item, { value: String(item.value) });
28031
28031
  let { type } = item;
28032
- if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
28032
+ if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
28033
28033
  if (/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(ss.value))
28034
- type = Scalar.Scalar.QUOTE_DOUBLE;
28034
+ type = Scalar2.Scalar.QUOTE_DOUBLE;
28035
28035
  }
28036
28036
  const _stringify = (_type) => {
28037
28037
  switch (_type) {
28038
- case Scalar.Scalar.BLOCK_FOLDED:
28039
- case Scalar.Scalar.BLOCK_LITERAL:
28038
+ case Scalar2.Scalar.BLOCK_FOLDED:
28039
+ case Scalar2.Scalar.BLOCK_LITERAL:
28040
28040
  return implicitKey || inFlow ? quotedString(ss.value, ctx) : blockString(ss, ctx, onComment, onChompKeep);
28041
- case Scalar.Scalar.QUOTE_DOUBLE:
28041
+ case Scalar2.Scalar.QUOTE_DOUBLE:
28042
28042
  return doubleQuotedString(ss.value, ctx);
28043
- case Scalar.Scalar.QUOTE_SINGLE:
28043
+ case Scalar2.Scalar.QUOTE_SINGLE:
28044
28044
  return singleQuotedString(ss.value, ctx);
28045
- case Scalar.Scalar.PLAIN:
28045
+ case Scalar2.Scalar.PLAIN:
28046
28046
  return plainString(ss, ctx, onComment, onChompKeep);
28047
28047
  default:
28048
28048
  return null;
@@ -28191,7 +28191,7 @@ var require_stringifyPair = __commonJS({
28191
28191
  "../cli/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
28192
28192
  "use strict";
28193
28193
  var identity = require_identity();
28194
- var Scalar = require_Scalar();
28194
+ var Scalar2 = require_Scalar();
28195
28195
  var stringify = require_stringify();
28196
28196
  var stringifyComment = require_stringifyComment();
28197
28197
  function stringifyPair({ key, value }, ctx, onComment, onChompKeep) {
@@ -28206,7 +28206,7 @@ var require_stringifyPair = __commonJS({
28206
28206
  throw new Error(msg);
28207
28207
  }
28208
28208
  }
28209
- let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar.Scalar.BLOCK_FOLDED || key.type === Scalar.Scalar.BLOCK_LITERAL : typeof key === "object"));
28209
+ let explicitKey = !simpleKeys && (!key || keyComment && value == null && !ctx.inFlow || identity.isCollection(key) || (identity.isScalar(key) ? key.type === Scalar2.Scalar.BLOCK_FOLDED || key.type === Scalar2.Scalar.BLOCK_LITERAL : typeof key === "object"));
28210
28210
  ctx = Object.assign({}, ctx, {
28211
28211
  allNullValues: false,
28212
28212
  implicitKey: !explicitKey && (simpleKeys || !allNullValues),
@@ -28346,19 +28346,19 @@ var require_merge = __commonJS({
28346
28346
  "../cli/node_modules/yaml/dist/schema/yaml-1.1/merge.js"(exports) {
28347
28347
  "use strict";
28348
28348
  var identity = require_identity();
28349
- var Scalar = require_Scalar();
28349
+ var Scalar2 = require_Scalar();
28350
28350
  var MERGE_KEY = "<<";
28351
28351
  var merge2 = {
28352
28352
  identify: (value) => value === MERGE_KEY || typeof value === "symbol" && value.description === MERGE_KEY,
28353
28353
  default: "key",
28354
28354
  tag: "tag:yaml.org,2002:merge",
28355
28355
  test: /^<<$/,
28356
- resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), {
28356
+ resolve: () => Object.assign(new Scalar2.Scalar(Symbol(MERGE_KEY)), {
28357
28357
  addToJSMap: addMergeToJSMap
28358
28358
  }),
28359
28359
  stringify: () => MERGE_KEY
28360
28360
  };
28361
- var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
28361
+ var isMergeKey = (ctx, key) => (merge2.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar2.Scalar.PLAIN) && merge2.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge2.tag && tag.default);
28362
28362
  function addMergeToJSMap(ctx, map3, value) {
28363
28363
  const source2 = resolveAliasValue(ctx, value);
28364
28364
  if (identity.isSeq(source2))
@@ -28665,7 +28665,7 @@ var require_YAMLMap = __commonJS({
28665
28665
  var Collection = require_Collection();
28666
28666
  var identity = require_identity();
28667
28667
  var Pair = require_Pair();
28668
- var Scalar = require_Scalar();
28668
+ var Scalar2 = require_Scalar();
28669
28669
  function findPair(items, key) {
28670
28670
  const k2 = identity.isScalar(key) ? key.value : key;
28671
28671
  for (const it2 of items) {
@@ -28732,7 +28732,7 @@ var require_YAMLMap = __commonJS({
28732
28732
  if (prev) {
28733
28733
  if (!overwrite)
28734
28734
  throw new Error(`Key ${_pair.key} already set`);
28735
- if (identity.isScalar(prev.value) && Scalar.isScalarValue(_pair.value))
28735
+ if (identity.isScalar(prev.value) && Scalar2.isScalarValue(_pair.value))
28736
28736
  prev.value.value = _pair.value;
28737
28737
  else
28738
28738
  prev.value = _pair.value;
@@ -28830,7 +28830,7 @@ var require_YAMLSeq = __commonJS({
28830
28830
  var stringifyCollection = require_stringifyCollection();
28831
28831
  var Collection = require_Collection();
28832
28832
  var identity = require_identity();
28833
- var Scalar = require_Scalar();
28833
+ var Scalar2 = require_Scalar();
28834
28834
  var toJS = require_toJS();
28835
28835
  var YAMLSeq = class extends Collection.Collection {
28836
28836
  static get tagName() {
@@ -28887,7 +28887,7 @@ var require_YAMLSeq = __commonJS({
28887
28887
  if (typeof idx !== "number")
28888
28888
  throw new Error(`Expected a valid index, not ${key}.`);
28889
28889
  const prev = this.items[idx];
28890
- if (identity.isScalar(prev) && Scalar.isScalarValue(value))
28890
+ if (identity.isScalar(prev) && Scalar2.isScalarValue(value))
28891
28891
  prev.value = value;
28892
28892
  else
28893
28893
  this.items[idx] = value;
@@ -28983,14 +28983,14 @@ var require_string = __commonJS({
28983
28983
  var require_null = __commonJS({
28984
28984
  "../cli/node_modules/yaml/dist/schema/common/null.js"(exports) {
28985
28985
  "use strict";
28986
- var Scalar = require_Scalar();
28986
+ var Scalar2 = require_Scalar();
28987
28987
  var nullTag = {
28988
28988
  identify: (value) => value == null,
28989
- createNode: () => new Scalar.Scalar(null),
28989
+ createNode: () => new Scalar2.Scalar(null),
28990
28990
  default: true,
28991
28991
  tag: "tag:yaml.org,2002:null",
28992
28992
  test: /^(?:~|[Nn]ull|NULL)?$/,
28993
- resolve: () => new Scalar.Scalar(null),
28993
+ resolve: () => new Scalar2.Scalar(null),
28994
28994
  stringify: ({ source: source2 }, ctx) => typeof source2 === "string" && nullTag.test.test(source2) ? source2 : ctx.options.nullStr
28995
28995
  };
28996
28996
  exports.nullTag = nullTag;
@@ -29001,13 +29001,13 @@ var require_null = __commonJS({
29001
29001
  var require_bool = __commonJS({
29002
29002
  "../cli/node_modules/yaml/dist/schema/core/bool.js"(exports) {
29003
29003
  "use strict";
29004
- var Scalar = require_Scalar();
29004
+ var Scalar2 = require_Scalar();
29005
29005
  var boolTag = {
29006
29006
  identify: (value) => typeof value === "boolean",
29007
29007
  default: true,
29008
29008
  tag: "tag:yaml.org,2002:bool",
29009
29009
  test: /^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,
29010
- resolve: (str5) => new Scalar.Scalar(str5[0] === "t" || str5[0] === "T"),
29010
+ resolve: (str5) => new Scalar2.Scalar(str5[0] === "t" || str5[0] === "T"),
29011
29011
  stringify({ source: source2, value }, ctx) {
29012
29012
  if (source2 && boolTag.test.test(source2)) {
29013
29013
  const sv = source2[0] === "t" || source2[0] === "T";
@@ -29052,7 +29052,7 @@ var require_stringifyNumber = __commonJS({
29052
29052
  var require_float = __commonJS({
29053
29053
  "../cli/node_modules/yaml/dist/schema/core/float.js"(exports) {
29054
29054
  "use strict";
29055
- var Scalar = require_Scalar();
29055
+ var Scalar2 = require_Scalar();
29056
29056
  var stringifyNumber = require_stringifyNumber();
29057
29057
  var floatNaN = {
29058
29058
  identify: (value) => typeof value === "number",
@@ -29080,7 +29080,7 @@ var require_float = __commonJS({
29080
29080
  tag: "tag:yaml.org,2002:float",
29081
29081
  test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
29082
29082
  resolve(str5) {
29083
- const node2 = new Scalar.Scalar(parseFloat(str5));
29083
+ const node2 = new Scalar2.Scalar(parseFloat(str5));
29084
29084
  const dot = str5.indexOf(".");
29085
29085
  if (dot !== -1 && str5[str5.length - 1] === "0")
29086
29086
  node2.minFractionDigits = str5.length - dot - 1;
@@ -29171,7 +29171,7 @@ var require_schema = __commonJS({
29171
29171
  var require_schema2 = __commonJS({
29172
29172
  "../cli/node_modules/yaml/dist/schema/json/schema.js"(exports) {
29173
29173
  "use strict";
29174
- var Scalar = require_Scalar();
29174
+ var Scalar2 = require_Scalar();
29175
29175
  var map3 = require_map();
29176
29176
  var seq = require_seq();
29177
29177
  function intIdentify(value) {
@@ -29188,7 +29188,7 @@ var require_schema2 = __commonJS({
29188
29188
  },
29189
29189
  {
29190
29190
  identify: (value) => value == null,
29191
- createNode: () => new Scalar.Scalar(null),
29191
+ createNode: () => new Scalar2.Scalar(null),
29192
29192
  default: true,
29193
29193
  tag: "tag:yaml.org,2002:null",
29194
29194
  test: /^null$/,
@@ -29239,7 +29239,7 @@ var require_binary = __commonJS({
29239
29239
  "../cli/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
29240
29240
  "use strict";
29241
29241
  var node_buffer = __require("buffer");
29242
- var Scalar = require_Scalar();
29242
+ var Scalar2 = require_Scalar();
29243
29243
  var stringifyString = require_stringifyString();
29244
29244
  var binary = {
29245
29245
  identify: (value) => value instanceof Uint8Array,
@@ -29283,15 +29283,15 @@ var require_binary = __commonJS({
29283
29283
  } else {
29284
29284
  throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");
29285
29285
  }
29286
- type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
29287
- if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
29286
+ type ?? (type = Scalar2.Scalar.BLOCK_LITERAL);
29287
+ if (type !== Scalar2.Scalar.QUOTE_DOUBLE) {
29288
29288
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
29289
29289
  const n = Math.ceil(str5.length / lineWidth);
29290
29290
  const lines = new Array(n);
29291
29291
  for (let i = 0, o3 = 0; i < n; ++i, o3 += lineWidth) {
29292
29292
  lines[i] = str5.substr(o3, lineWidth);
29293
29293
  }
29294
- str5 = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? "\n" : " ");
29294
+ str5 = lines.join(type === Scalar2.Scalar.BLOCK_LITERAL ? "\n" : " ");
29295
29295
  }
29296
29296
  return stringifyString.stringifyString({ comment, type, value: str5 }, ctx, onComment, onChompKeep);
29297
29297
  }
@@ -29306,7 +29306,7 @@ var require_pairs = __commonJS({
29306
29306
  "use strict";
29307
29307
  var identity = require_identity();
29308
29308
  var Pair = require_Pair();
29309
- var Scalar = require_Scalar();
29309
+ var Scalar2 = require_Scalar();
29310
29310
  var YAMLSeq = require_YAMLSeq();
29311
29311
  function resolvePairs(seq, onError) {
29312
29312
  if (identity.isSeq(seq)) {
@@ -29317,7 +29317,7 @@ var require_pairs = __commonJS({
29317
29317
  else if (identity.isMap(item)) {
29318
29318
  if (item.items.length > 1)
29319
29319
  onError("Each pair must have its own sequence indicator");
29320
- const pair = item.items[0] || new Pair.Pair(new Scalar.Scalar(null));
29320
+ const pair = item.items[0] || new Pair.Pair(new Scalar2.Scalar(null));
29321
29321
  if (item.commentBefore)
29322
29322
  pair.key.commentBefore = pair.key.commentBefore ? `${item.commentBefore}
29323
29323
  ${pair.key.commentBefore}` : item.commentBefore;
@@ -29460,7 +29460,7 @@ var require_omap = __commonJS({
29460
29460
  var require_bool2 = __commonJS({
29461
29461
  "../cli/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
29462
29462
  "use strict";
29463
- var Scalar = require_Scalar();
29463
+ var Scalar2 = require_Scalar();
29464
29464
  function boolStringify({ value, source: source2 }, ctx) {
29465
29465
  const boolObj = value ? trueTag : falseTag;
29466
29466
  if (source2 && boolObj.test.test(source2))
@@ -29472,7 +29472,7 @@ var require_bool2 = __commonJS({
29472
29472
  default: true,
29473
29473
  tag: "tag:yaml.org,2002:bool",
29474
29474
  test: /^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,
29475
- resolve: () => new Scalar.Scalar(true),
29475
+ resolve: () => new Scalar2.Scalar(true),
29476
29476
  stringify: boolStringify
29477
29477
  };
29478
29478
  var falseTag = {
@@ -29480,7 +29480,7 @@ var require_bool2 = __commonJS({
29480
29480
  default: true,
29481
29481
  tag: "tag:yaml.org,2002:bool",
29482
29482
  test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
29483
- resolve: () => new Scalar.Scalar(false),
29483
+ resolve: () => new Scalar2.Scalar(false),
29484
29484
  stringify: boolStringify
29485
29485
  };
29486
29486
  exports.falseTag = falseTag;
@@ -29492,7 +29492,7 @@ var require_bool2 = __commonJS({
29492
29492
  var require_float2 = __commonJS({
29493
29493
  "../cli/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
29494
29494
  "use strict";
29495
- var Scalar = require_Scalar();
29495
+ var Scalar2 = require_Scalar();
29496
29496
  var stringifyNumber = require_stringifyNumber();
29497
29497
  var floatNaN = {
29498
29498
  identify: (value) => typeof value === "number",
@@ -29520,7 +29520,7 @@ var require_float2 = __commonJS({
29520
29520
  tag: "tag:yaml.org,2002:float",
29521
29521
  test: /^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,
29522
29522
  resolve(str5) {
29523
- const node2 = new Scalar.Scalar(parseFloat(str5.replace(/_/g, "")));
29523
+ const node2 = new Scalar2.Scalar(parseFloat(str5.replace(/_/g, "")));
29524
29524
  const dot = str5.indexOf(".");
29525
29525
  if (dot !== -1) {
29526
29526
  const f2 = str5.substring(dot + 1).replace(/_/g, "");
@@ -31028,7 +31028,7 @@ var require_compose_collection = __commonJS({
31028
31028
  "../cli/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
31029
31029
  "use strict";
31030
31030
  var identity = require_identity();
31031
- var Scalar = require_Scalar();
31031
+ var Scalar2 = require_Scalar();
31032
31032
  var YAMLMap = require_YAMLMap();
31033
31033
  var YAMLSeq = require_YAMLSeq();
31034
31034
  var resolveBlockMap = require_resolve_block_map();
@@ -31077,7 +31077,7 @@ var require_compose_collection = __commonJS({
31077
31077
  }
31078
31078
  const coll = resolveCollection(CN, ctx, token, onError, tagName, tag);
31079
31079
  const res = tag.resolve?.(coll, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg), ctx.options) ?? coll;
31080
- const node2 = identity.isNode(res) ? res : new Scalar.Scalar(res);
31080
+ const node2 = identity.isNode(res) ? res : new Scalar2.Scalar(res);
31081
31081
  node2.range = coll.range;
31082
31082
  node2.tag = tagName;
31083
31083
  if (tag?.format)
@@ -31092,13 +31092,13 @@ var require_compose_collection = __commonJS({
31092
31092
  var require_resolve_block_scalar = __commonJS({
31093
31093
  "../cli/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
31094
31094
  "use strict";
31095
- var Scalar = require_Scalar();
31095
+ var Scalar2 = require_Scalar();
31096
31096
  function resolveBlockScalar(ctx, scalar, onError) {
31097
31097
  const start = scalar.offset;
31098
31098
  const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError);
31099
31099
  if (!header)
31100
31100
  return { value: "", type: null, comment: "", range: [start, start, start] };
31101
- const type = header.mode === ">" ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL;
31101
+ const type = header.mode === ">" ? Scalar2.Scalar.BLOCK_FOLDED : Scalar2.Scalar.BLOCK_LITERAL;
31102
31102
  const lines = scalar.source ? splitLines(scalar.source) : [];
31103
31103
  let chompStart = lines.length;
31104
31104
  for (let i = lines.length - 1; i >= 0; --i) {
@@ -31160,7 +31160,7 @@ var require_resolve_block_scalar = __commonJS({
31160
31160
  onError(offset - content.length - (crlf ? 2 : 1), "BAD_INDENT", message);
31161
31161
  indent = "";
31162
31162
  }
31163
- if (type === Scalar.Scalar.BLOCK_LITERAL) {
31163
+ if (type === Scalar2.Scalar.BLOCK_LITERAL) {
31164
31164
  value += sep + indent.slice(trimIndent) + content;
31165
31165
  sep = "\n";
31166
31166
  } else if (indent.length > trimIndent || content[0] === " ") {
@@ -31275,7 +31275,7 @@ var require_resolve_block_scalar = __commonJS({
31275
31275
  var require_resolve_flow_scalar = __commonJS({
31276
31276
  "../cli/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
31277
31277
  "use strict";
31278
- var Scalar = require_Scalar();
31278
+ var Scalar2 = require_Scalar();
31279
31279
  var resolveEnd = require_resolve_end();
31280
31280
  function resolveFlowScalar(scalar, strict, onError) {
31281
31281
  const { offset, type, source: source2, end: end2 } = scalar;
@@ -31284,15 +31284,15 @@ var require_resolve_flow_scalar = __commonJS({
31284
31284
  const _onError = (rel3, code, msg) => onError(offset + rel3, code, msg);
31285
31285
  switch (type) {
31286
31286
  case "scalar":
31287
- _type = Scalar.Scalar.PLAIN;
31287
+ _type = Scalar2.Scalar.PLAIN;
31288
31288
  value = plainValue(source2, _onError);
31289
31289
  break;
31290
31290
  case "single-quoted-scalar":
31291
- _type = Scalar.Scalar.QUOTE_SINGLE;
31291
+ _type = Scalar2.Scalar.QUOTE_SINGLE;
31292
31292
  value = singleQuotedValue(source2, _onError);
31293
31293
  break;
31294
31294
  case "double-quoted-scalar":
31295
- _type = Scalar.Scalar.QUOTE_DOUBLE;
31295
+ _type = Scalar2.Scalar.QUOTE_DOUBLE;
31296
31296
  value = doubleQuotedValue(source2, _onError);
31297
31297
  break;
31298
31298
  /* istanbul ignore next should not happen */
@@ -31497,7 +31497,7 @@ var require_compose_scalar = __commonJS({
31497
31497
  "../cli/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
31498
31498
  "use strict";
31499
31499
  var identity = require_identity();
31500
- var Scalar = require_Scalar();
31500
+ var Scalar2 = require_Scalar();
31501
31501
  var resolveBlockScalar = require_resolve_block_scalar();
31502
31502
  var resolveFlowScalar = require_resolve_flow_scalar();
31503
31503
  function composeScalar(ctx, token, tagToken, onError) {
@@ -31515,11 +31515,11 @@ var require_compose_scalar = __commonJS({
31515
31515
  let scalar;
31516
31516
  try {
31517
31517
  const res = tag.resolve(value, (msg) => onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg), ctx.options);
31518
- scalar = identity.isScalar(res) ? res : new Scalar.Scalar(res);
31518
+ scalar = identity.isScalar(res) ? res : new Scalar2.Scalar(res);
31519
31519
  } catch (error62) {
31520
31520
  const msg = error62 instanceof Error ? error62.message : String(error62);
31521
31521
  onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
31522
- scalar = new Scalar.Scalar(value);
31522
+ scalar = new Scalar2.Scalar(value);
31523
31523
  }
31524
31524
  scalar.range = range;
31525
31525
  scalar.source = value;
@@ -33894,7 +33894,7 @@ var require_public_api = __commonJS({
33894
33894
  return docs;
33895
33895
  return Object.assign([], { empty: true }, composer$1.streamInfo());
33896
33896
  }
33897
- function parseDocument3(source2, options = {}) {
33897
+ function parseDocument4(source2, options = {}) {
33898
33898
  const { lineCounter: lineCounter2, prettyErrors } = parseOptions(options);
33899
33899
  const parser$1 = new parser.Parser(lineCounter2?.addNewLine);
33900
33900
  const composer$1 = new composer.Composer(options);
@@ -33920,7 +33920,7 @@ var require_public_api = __commonJS({
33920
33920
  } else if (options === void 0 && reviver && typeof reviver === "object") {
33921
33921
  options = reviver;
33922
33922
  }
33923
- const doc = parseDocument3(src, options);
33923
+ const doc = parseDocument4(src, options);
33924
33924
  if (!doc)
33925
33925
  return null;
33926
33926
  doc.warnings.forEach((warning) => log.warn(doc.options.logLevel, warning));
@@ -33956,7 +33956,7 @@ var require_public_api = __commonJS({
33956
33956
  }
33957
33957
  exports.parse = parse4;
33958
33958
  exports.parseAllDocuments = parseAllDocuments;
33959
- exports.parseDocument = parseDocument3;
33959
+ exports.parseDocument = parseDocument4;
33960
33960
  exports.stringify = stringify;
33961
33961
  }
33962
33962
  });
@@ -33972,7 +33972,7 @@ var require_dist = __commonJS({
33972
33972
  var Alias = require_Alias();
33973
33973
  var identity = require_identity();
33974
33974
  var Pair = require_Pair();
33975
- var Scalar = require_Scalar();
33975
+ var Scalar2 = require_Scalar();
33976
33976
  var YAMLMap = require_YAMLMap();
33977
33977
  var YAMLSeq = require_YAMLSeq();
33978
33978
  var cst = require_cst();
@@ -33997,7 +33997,7 @@ var require_dist = __commonJS({
33997
33997
  exports.isScalar = identity.isScalar;
33998
33998
  exports.isSeq = identity.isSeq;
33999
33999
  exports.Pair = Pair.Pair;
34000
- exports.Scalar = Scalar.Scalar;
34000
+ exports.Scalar = Scalar2.Scalar;
34001
34001
  exports.YAMLMap = YAMLMap.YAMLMap;
34002
34002
  exports.YAMLSeq = YAMLSeq.YAMLSeq;
34003
34003
  exports.CST = cst;
@@ -152560,6 +152560,7 @@ __export(api_exports, {
152560
152560
  readJob: () => readJob,
152561
152561
  readProject: () => readProject,
152562
152562
  readRejections: () => readRejections,
152563
+ readReplyHistory: () => readReplyHistory,
152563
152564
  readRunner: () => readRunner,
152564
152565
  readTask: () => readTask,
152565
152566
  readTaskStudio: () => readTaskStudio,
@@ -152606,8 +152607,8 @@ function cloudProblem(response, body) {
152606
152607
  }
152607
152608
 
152608
152609
  // src/protocol.ts
152609
- var AKB_VERSION = true ? "0.11.96" : "0.0.0";
152610
- var AKB_CONTRACT = true ? 31 : 0;
152610
+ var AKB_VERSION = true ? "0.11.98" : "0.0.0";
152611
+ var AKB_CONTRACT = true ? 32 : 0;
152611
152612
 
152612
152613
  // src/secrets.ts
152613
152614
  import fs20 from "node:fs";
@@ -153819,8 +153820,8 @@ function createTail(log) {
153819
153820
  // ../cli/package.json
153820
153821
  var package_default = {
153821
153822
  name: "wildcrane",
153822
- version: "0.11.96",
153823
- akbContract: 31,
153823
+ version: "0.11.98",
153824
+ akbContract: 32,
153824
153825
  canonicalCommands: true,
153825
153826
  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.",
153826
153827
  keywords: [
@@ -158455,6 +158456,7 @@ var claimJob = (machineId, job, reply = false) => move(
158455
158456
  "claim",
158456
158457
  { machineId, ...reply ? { reply: true } : {} }
158457
158458
  );
158459
+ var readReplyHistory = (machineId, job) => request("GET", `/v1/runner/jobs/${q(job)}/history?machine=${q(machineId)}`);
158458
158460
  var renewJob = (machineId, job, progress) => move(job, "renew", { machineId, ...progress ? { progress } : {} });
158459
158461
  async function openLog(machineId, job) {
158460
158462
  const token = await accessToken();
@@ -158544,7 +158546,7 @@ var dropGoal = (id2, goal) => request("DELETE", goalRoute(id2, goal));
158544
158546
  var startGoal = (id2, goal, expectedVersion, project) => request("POST", `${goalRoute(id2, goal)}/start`, { expectedVersion, ...project ? { project } : {} });
158545
158547
 
158546
158548
  // ../cli/src/lib/shared/board-conflicts.ts
158547
- var import_yaml7 = __toESM(require_dist(), 1);
158549
+ var import_yaml8 = __toESM(require_dist(), 1);
158548
158550
 
158549
158551
  // ../cli/src/lib/agents/shared-memory.ts
158550
158552
  import fs25 from "node:fs";
@@ -159171,6 +159173,9 @@ function parseStudioFile(id2, source2, from, { requirePreviewCopy = false, requi
159171
159173
  import fs21 from "node:fs";
159172
159174
  import path22 from "node:path";
159173
159175
 
159176
+ // ../cli/src/lib/shared/studio-files.ts
159177
+ var import_yaml5 = __toESM(require_dist(), 1);
159178
+
159174
159179
  // ../cli/src/lib/shared/guide-topics.ts
159175
159180
  var GUIDE_TOPICS = ["board", "writing", "add-task", "follow-up", "discuss-goal", "troubleshoot", "card-chat", "task-ui-en", "task-ui-zh", "update-studio", "implement", "settle-background", "archive", "update-questions", "refine", "revise", "resolve", "prune-memory", "review-memory", "describe-project", "review-rejections", "reflect", "write-agent", "write-prompt", "module-map"];
159176
159181
 
@@ -159355,7 +159360,7 @@ function workspaceTask() {
159355
159360
  const id2 = process.env[TASK_ENV];
159356
159361
  return id2 && id2.trim() ? id2.trim() : null;
159357
159362
  }
159358
- async function call(method, route, body, key) {
159363
+ async function call(method, route, body, key, { allowResultError = false } = {}) {
159359
159364
  if (!cloudConfigured()) return { ok: false, error: NOT_CONFIGURED, code: "bad_request" };
159360
159365
  const token = await accessToken();
159361
159366
  if (!token.ok) {
@@ -159367,17 +159372,17 @@ async function call(method, route, body, key) {
159367
159372
  method,
159368
159373
  headers: {
159369
159374
  authorization: `Bearer ${token.token}`,
159370
- ...body ? { "content-type": "application/json" } : {},
159375
+ ...body ? { "content-type": body instanceof Blob ? body.type : "application/json" } : {},
159371
159376
  ...key ? { "idempotency-key": key } : {}
159372
159377
  },
159373
- ...body ? { body: JSON.stringify(body) } : {},
159378
+ ...body ? { body: body instanceof Blob ? body : JSON.stringify(body) } : {},
159374
159379
  signal: AbortSignal.timeout(2e4)
159375
159380
  });
159376
159381
  } catch (e2) {
159377
159382
  return { ok: false, error: `Cloud could not be reached: ${e2 instanceof Error ? e2.message : String(e2)}`, code: "unreachable", retryable: true };
159378
159383
  }
159379
159384
  const parsed = await readCloudJson(response);
159380
- const problem2 = cloudProblem(response, parsed) ?? (isRecord(parsed) ? null : invalidResponse("a valid JSON response"));
159385
+ const problem2 = (response.ok && allowResultError ? null : cloudProblem(response, parsed)) ?? (isRecord(parsed) ? null : invalidResponse("a valid JSON response"));
159381
159386
  if (problem2) return { ok: false, ...problem2, error: problem2.message };
159382
159387
  return { ok: true, value: parsed, replayed: response.headers.get("idempotent-replayed") === "true" };
159383
159388
  }
@@ -162930,8 +162935,8 @@ function validateSpec(file2, text4, id2, context) {
162930
162935
  if (/^\s*<Storyboard\b/.test(line) && (storyboardTag(line) === null || lines[i - 1]?.trim() || lines[i + 1]?.trim())) {
162931
162936
  add2(i + 1, "storyboard-block", 'Put one self-closing <Storyboard src=".assets/<card id>/storyboard.json" /> tag on its own line, with blank lines around it.');
162932
162937
  }
162933
- if (/^\s*<Studio\b/.test(line) && (studioTag(line) === null || !/\blabel="[^"]+"/.test(line) || lines[i - 1]?.trim() || lines[i + 1]?.trim())) {
162934
- add2(i + 1, "studio-block", 'Put one self-closing <Studio src=".assets/<card id>/studio.json" label="..." /> tag on its own line, with blank lines around it.');
162938
+ if (/^\s*<Studio\b/.test(line) && (!studioTag(line) || lines[i - 1]?.trim() || lines[i + 1]?.trim())) {
162939
+ add2(i + 1, "studio-block", 'Put one self-closing <Studio src=".assets/<card id>/studio-review/review.json" /> tag on its own line, with blank lines around it.');
162935
162940
  }
162936
162941
  if (/^\s*<Compare\b/.test(line)) {
162937
162942
  const attrs = compareAttrs(line);
@@ -163071,7 +163076,7 @@ function validateStoryboards(file2, id2, text4) {
163071
163076
  ["Studio", studioTag, "studio-src", "Fix the path or freeze the draft with `akb studio preview <card> --folder <draft> --base <baseline>` and use the returned Studio tag."]
163072
163077
  ]) {
163073
163078
  for (const marker of storyboardMarkers(text4, tagOf)) {
163074
- const named = assetName(marker.src, id2, ["json"]);
163079
+ const named = assetName(marker.src, id2, ["json"], tag === "Studio");
163075
163080
  const add2 = (message) => errors.push({ file: rel(file2), line: marker.line, rule, message });
163076
163081
  if (!("name" in named)) add2(`${tag} src is ${named.actual}; expected ${named.expected}.`);
163077
163082
  else if (!inside(dir, named.name)) add2(`${tag} src ${marker.src} names no file in this card's asset folder. ${fix}`);
@@ -188654,7 +188659,7 @@ function replyPrompt(input2, turn2) {
188654
188659
  if (initialize) {
188655
188660
  parts.push(task ? CARD_CHAT_GUIDE : "Follow `akb guide discuss-goal` for this Goal discussion.");
188656
188661
  if (task) parts.push(`Task card: ${task.card}`);
188657
- if (turn2.fresh && input2.history) parts.push(replyHistory(turn2.historyDir, input2.history, !!task));
188662
+ if (turn2.historyFile) parts.push(`Consult the ${task ? "chat" : "discussion"} history at \`${turn2.historyFile}\` as needed.`);
188658
188663
  if (turn2.goals) parts.push(replyGoals(turn2.goals));
188659
188664
  }
188660
188665
  let context;
@@ -188680,11 +188685,16 @@ function replyPrompt(input2, turn2) {
188680
188685
  reviewRevision: task?.review?.revision
188681
188686
  };
188682
188687
  }
188683
- function replyHistory(dir, history, cardChat) {
188688
+ function writeReplyHistory(dir, messages) {
188689
+ const history = typeof messages === "string" ? messages : messages.map(({ role, body, image_names }) => {
188690
+ const pictures2 = image_names?.length ? `[Pictures: ${image_names.join(", ")}]` : "";
188691
+ return `${role === "user" ? "User" : "Agent"}: ${[body, pictures2].filter(Boolean).join("\n\n")}`;
188692
+ }).join("\n\n");
188693
+ if (!history) return;
188684
188694
  fs66.mkdirSync(dir, { recursive: true, mode: 448 });
188685
188695
  const file2 = path68.join(fs66.mkdtempSync(path68.join(dir, "context-")), "history.md");
188686
188696
  fs66.writeFileSync(file2, history + "\n", { mode: 256, flag: "wx" });
188687
- return `Consult the ${cardChat ? "chat" : "discussion"} history at \`${file2}\` as needed.`;
188697
+ return file2;
188688
188698
  }
188689
188699
  function replyReview(review) {
188690
188700
  const starts = new Map(review.approvals?.map((action) => [action.stage, action.starts]));
@@ -190312,7 +190322,7 @@ The original session is unavailable. Saved work was preserved.`);
190312
190322
  const conflicts = ws && (!checkpoint.boardContinuation || checkpoint.boardContinuation.validation) ? conflictPrompt(ws.board) : "";
190313
190323
  const recoveringTurn = recovering && !checkpoint.boardContinuation && !replay && (!forkSource || checkpoint.submitted === true) && (checkpoint.started || job.recoveryOf);
190314
190324
  const recovery2 = pendingRetry ? retryContinuePrompt(pendingRetry.failure, checkpoint.retry?.attempt, pendingRetry.of) : recoveryPrompt;
190315
- const planned = (resume, fork) => {
190325
+ const planned = async (resume, fork) => {
190316
190326
  let prompt;
190317
190327
  let images;
190318
190328
  let discussionImages;
@@ -190326,13 +190336,22 @@ The original session is unavailable. Saved work was preserved.`);
190326
190336
  delete checkpoint.replyReviewRevision;
190327
190337
  delete checkpoint.replyContext;
190328
190338
  }
190339
+ let historyFile;
190340
+ if (initialize && fresh) {
190341
+ let history = replyInput.history ?? "";
190342
+ if (replyInput.historyOnDemand) {
190343
+ const read5 = await sync("reply-history", () => deps.api.readReplyHistory(deps.machineId, id2));
190344
+ if (!read5.ok) throw new Error(syncRefusal(job, read5));
190345
+ history = read5.value.messages;
190346
+ }
190347
+ historyFile = writeReplyHistory(attachmentsOf(job), history);
190348
+ }
190329
190349
  const discussion = job.discussion;
190330
190350
  const assembled = replyPrompt(replyInput, {
190331
190351
  initialize,
190332
- fresh,
190333
- historyDir: attachmentsOf(job),
190352
+ historyFile,
190334
190353
  ...ws && job.chat ? { task: { card: cardFile3(ws), review: job.taskReview, setup: continuing ? null : taskSetupContext(ws) } } : {},
190335
- goals: discussion && (discussion.goals.length || replyInput.history || replay || job.sessionFallback || job.resume) ? discussion.goals : void 0,
190354
+ goals: discussion && (discussion.goals.length || historyFile || replay || job.sessionFallback || job.resume) ? discussion.goals : void 0,
190336
190355
  diagnostics: [syncDiagnostic, conflicts],
190337
190356
  attachments: attachments.text.trimStart(),
190338
190357
  continuation: continuing ? recovery2 : void 0
@@ -190377,13 +190396,13 @@ ${body}` : body;
190377
190396
  let carried = !!job.resume && (!job.fork || forks(job.runtime));
190378
190397
  if (!carried && checkpoint.boardContinuation?.report.deliveryCompleted) throw Error("The original delivery session is unavailable. Saved work was preserved.");
190379
190398
  try {
190380
- run3 = carried ? planned(job.resume, !!job.fork) : planned(null, false);
190399
+ run3 = carried ? await planned(job.resume, !!job.fork) : await planned(null, false);
190381
190400
  } catch (error62) {
190382
190401
  if (!replyInput || !carried || !replayable(checkpoint) || !(error62 instanceof ExecutionError) || !isSessionMissingFailure(error62.failure)) throw error62;
190383
190402
  carried = false;
190384
190403
  delete checkpoint.session;
190385
190404
  delete checkpoint.forkSource;
190386
- const replayed = await recover(error62.failure, async () => ({ ok: true, value: planned(null, false) }));
190405
+ const replayed = await recover(error62.failure, async () => ({ ok: true, value: await planned(null, false) }));
190387
190406
  if (!replayed.ok) throw new Error(replayed.error);
190388
190407
  run3 = replayed.value;
190389
190408
  }