@hasna/assistants 1.1.82 → 1.1.85

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/dist/index.js CHANGED
@@ -4,7 +4,6 @@ var __create = Object.create;
4
4
  var __getProtoOf = Object.getPrototypeOf;
5
5
  var __defProp = Object.defineProperty;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
8
  var __toESM = (mod, isNodeMode, target) => {
10
9
  target = mod != null ? __create(__getProtoOf(mod)) : {};
@@ -17,20 +16,6 @@ var __toESM = (mod, isNodeMode, target) => {
17
16
  });
18
17
  return to;
19
18
  };
20
- var __moduleCache = /* @__PURE__ */ new WeakMap;
21
- var __toCommonJS = (from) => {
22
- var entry = __moduleCache.get(from), desc;
23
- if (entry)
24
- return entry;
25
- entry = __defProp({}, "__esModule", { value: true });
26
- if (from && typeof from === "object" || typeof from === "function")
27
- __getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
28
- get: () => from[key],
29
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
30
- }));
31
- __moduleCache.set(from, entry);
32
- return entry;
33
- };
34
19
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
20
  var __export = (target, all) => {
36
21
  for (var name in all)
@@ -36047,156 +36032,118 @@ var require_browser = __commonJS((exports, module) => {
36047
36032
  };
36048
36033
  });
36049
36034
 
36050
- // node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js
36051
- var exports_supports_color = {};
36052
- __export(exports_supports_color, {
36053
- default: () => supports_color_default,
36054
- createSupportsColor: () => createSupportsColor
36035
+ // node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
36036
+ var require_has_flag = __commonJS((exports, module) => {
36037
+ module.exports = (flag, argv = process.argv) => {
36038
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
36039
+ const position2 = argv.indexOf(prefix + flag);
36040
+ const terminatorPosition = argv.indexOf("--");
36041
+ return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
36042
+ };
36055
36043
  });
36056
- import process2 from "process";
36057
- import os from "os";
36058
- import tty from "tty";
36059
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
36060
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
36061
- const position2 = argv.indexOf(prefix + flag);
36062
- const terminatorPosition = argv.indexOf("--");
36063
- return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
36064
- }
36065
- function envForceColor() {
36066
- if (!("FORCE_COLOR" in env2)) {
36067
- return;
36068
- }
36069
- if (env2.FORCE_COLOR === "true") {
36070
- return 1;
36071
- }
36072
- if (env2.FORCE_COLOR === "false") {
36073
- return 0;
36074
- }
36075
- if (env2.FORCE_COLOR.length === 0) {
36076
- return 1;
36077
- }
36078
- const level = Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
36079
- if (![0, 1, 2, 3].includes(level)) {
36080
- return;
36081
- }
36082
- return level;
36083
- }
36084
- function translateLevel(level) {
36085
- if (level === 0) {
36086
- return false;
36044
+
36045
+ // node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
36046
+ var require_supports_color = __commonJS((exports, module) => {
36047
+ var os = __require("os");
36048
+ var tty = __require("tty");
36049
+ var hasFlag = require_has_flag();
36050
+ var { env: env2 } = process;
36051
+ var forceColor;
36052
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
36053
+ forceColor = 0;
36054
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
36055
+ forceColor = 1;
36087
36056
  }
36088
- return {
36089
- level,
36090
- hasBasic: true,
36091
- has256: level >= 2,
36092
- has16m: level >= 3
36093
- };
36094
- }
36095
- function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
36096
- const noFlagForceColor = envForceColor();
36097
- if (noFlagForceColor !== undefined) {
36098
- flagForceColor = noFlagForceColor;
36057
+ if ("FORCE_COLOR" in env2) {
36058
+ if (env2.FORCE_COLOR === "true") {
36059
+ forceColor = 1;
36060
+ } else if (env2.FORCE_COLOR === "false") {
36061
+ forceColor = 0;
36062
+ } else {
36063
+ forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
36064
+ }
36099
36065
  }
36100
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
36101
- if (forceColor === 0) {
36102
- return 0;
36066
+ function translateLevel(level) {
36067
+ if (level === 0) {
36068
+ return false;
36069
+ }
36070
+ return {
36071
+ level,
36072
+ hasBasic: true,
36073
+ has256: level >= 2,
36074
+ has16m: level >= 3
36075
+ };
36103
36076
  }
36104
- if (sniffFlags) {
36077
+ function supportsColor(haveStream, streamIsTTY) {
36078
+ if (forceColor === 0) {
36079
+ return 0;
36080
+ }
36105
36081
  if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
36106
36082
  return 3;
36107
36083
  }
36108
36084
  if (hasFlag("color=256")) {
36109
36085
  return 2;
36110
36086
  }
36111
- }
36112
- if ("TF_BUILD" in env2 && "AGENT_NAME" in env2) {
36113
- return 1;
36114
- }
36115
- if (haveStream && !streamIsTTY && forceColor === undefined) {
36116
- return 0;
36117
- }
36118
- const min = forceColor || 0;
36119
- if (env2.TERM === "dumb") {
36120
- return min;
36121
- }
36122
- if (process2.platform === "win32") {
36123
- const osRelease = os.release().split(".");
36124
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
36125
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
36087
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
36088
+ return 0;
36126
36089
  }
36127
- return 1;
36128
- }
36129
- if ("CI" in env2) {
36130
- if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env2))) {
36131
- return 3;
36090
+ const min = forceColor || 0;
36091
+ if (env2.TERM === "dumb") {
36092
+ return min;
36132
36093
  }
36133
- if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env2)) || env2.CI_NAME === "codeship") {
36094
+ if (process.platform === "win32") {
36095
+ const osRelease = os.release().split(".");
36096
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
36097
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
36098
+ }
36134
36099
  return 1;
36135
36100
  }
36136
- return min;
36137
- }
36138
- if ("TEAMCITY_VERSION" in env2) {
36139
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
36140
- }
36141
- if (env2.COLORTERM === "truecolor") {
36142
- return 3;
36143
- }
36144
- if (env2.TERM === "xterm-kitty") {
36145
- return 3;
36146
- }
36147
- if (env2.TERM === "xterm-ghostty") {
36148
- return 3;
36149
- }
36150
- if (env2.TERM === "wezterm") {
36151
- return 3;
36152
- }
36153
- if ("TERM_PROGRAM" in env2) {
36154
- const version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
36155
- switch (env2.TERM_PROGRAM) {
36156
- case "iTerm.app": {
36157
- return version >= 3 ? 3 : 2;
36101
+ if ("CI" in env2) {
36102
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => (sign in env2)) || env2.CI_NAME === "codeship") {
36103
+ return 1;
36158
36104
  }
36159
- case "Apple_Terminal": {
36160
- return 2;
36105
+ return min;
36106
+ }
36107
+ if ("TEAMCITY_VERSION" in env2) {
36108
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
36109
+ }
36110
+ if (env2.COLORTERM === "truecolor") {
36111
+ return 3;
36112
+ }
36113
+ if ("TERM_PROGRAM" in env2) {
36114
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
36115
+ switch (env2.TERM_PROGRAM) {
36116
+ case "iTerm.app":
36117
+ return version >= 3 ? 3 : 2;
36118
+ case "Apple_Terminal":
36119
+ return 2;
36161
36120
  }
36162
36121
  }
36122
+ if (/-256(color)?$/i.test(env2.TERM)) {
36123
+ return 2;
36124
+ }
36125
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
36126
+ return 1;
36127
+ }
36128
+ if ("COLORTERM" in env2) {
36129
+ return 1;
36130
+ }
36131
+ return min;
36163
36132
  }
36164
- if (/-256(color)?$/i.test(env2.TERM)) {
36165
- return 2;
36166
- }
36167
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
36168
- return 1;
36169
- }
36170
- if ("COLORTERM" in env2) {
36171
- return 1;
36133
+ function getSupportLevel(stream) {
36134
+ const level = supportsColor(stream, stream && stream.isTTY);
36135
+ return translateLevel(level);
36172
36136
  }
36173
- return min;
36174
- }
36175
- function createSupportsColor(stream, options2 = {}) {
36176
- const level = _supportsColor(stream, {
36177
- streamIsTTY: stream && stream.isTTY,
36178
- ...options2
36179
- });
36180
- return translateLevel(level);
36181
- }
36182
- var env2, flagForceColor, supportsColor, supports_color_default;
36183
- var init_supports_color = __esm(() => {
36184
- ({ env: env2 } = process2);
36185
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
36186
- flagForceColor = 0;
36187
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
36188
- flagForceColor = 1;
36189
- }
36190
- supportsColor = {
36191
- stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
36192
- stderr: createSupportsColor({ isTTY: tty.isatty(2) })
36137
+ module.exports = {
36138
+ supportsColor: getSupportLevel,
36139
+ stdout: translateLevel(supportsColor(true, tty.isatty(1))),
36140
+ stderr: translateLevel(supportsColor(true, tty.isatty(2)))
36193
36141
  };
36194
- supports_color_default = supportsColor;
36195
36142
  });
36196
36143
 
36197
36144
  // node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
36198
36145
  var require_node = __commonJS((exports, module) => {
36199
- var tty2 = __require("tty");
36146
+ var tty = __require("tty");
36200
36147
  var util = __require("util");
36201
36148
  exports.init = init;
36202
36149
  exports.log = log2;
@@ -36207,8 +36154,8 @@ var require_node = __commonJS((exports, module) => {
36207
36154
  exports.destroy = util.deprecate(() => {}, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
36208
36155
  exports.colors = [6, 2, 3, 4, 5, 1];
36209
36156
  try {
36210
- const supportsColor2 = (init_supports_color(), __toCommonJS(exports_supports_color));
36211
- if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
36157
+ const supportsColor = require_supports_color();
36158
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
36212
36159
  exports.colors = [
36213
36160
  20,
36214
36161
  21,
@@ -36309,7 +36256,7 @@ var require_node = __commonJS((exports, module) => {
36309
36256
  return obj;
36310
36257
  }, {});
36311
36258
  function useColors() {
36312
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
36259
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
36313
36260
  }
36314
36261
  function formatArgs(args) {
36315
36262
  const { namespace: name, useColors: useColors2 } = this;
@@ -48610,9 +48557,9 @@ var require_fs = __commonJS((exports) => {
48610
48557
  var require_path = __commonJS((exports) => {
48611
48558
  Object.defineProperty(exports, "__esModule", { value: true });
48612
48559
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = undefined;
48613
- var os2 = __require("os");
48560
+ var os = __require("os");
48614
48561
  var path3 = __require("path");
48615
- var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
48562
+ var IS_WINDOWS_PLATFORM = os.platform() === "win32";
48616
48563
  var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
48617
48564
  var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
48618
48565
  var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
@@ -53665,8 +53612,8 @@ var require_settings4 = __commonJS((exports) => {
53665
53612
  Object.defineProperty(exports, "__esModule", { value: true });
53666
53613
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
53667
53614
  var fs = __require("fs");
53668
- var os2 = __require("os");
53669
- var CPU_COUNT = Math.max(os2.cpus().length, 1);
53615
+ var os = __require("os");
53616
+ var CPU_COUNT = Math.max(os.cpus().length, 1);
53670
53617
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
53671
53618
  lstat: fs.lstat,
53672
53619
  lstatSync: fs.lstatSync,
@@ -90898,10 +90845,10 @@ var require_html_to_text = __commonJS((exports) => {
90898
90845
  builder.addInline(options2.limits.ellipsis || "");
90899
90846
  });
90900
90847
  return function(html2, metadata = undefined) {
90901
- return process3(html2, metadata, options2, picker, findBaseElements, limitedWalk);
90848
+ return process2(html2, metadata, options2, picker, findBaseElements, limitedWalk);
90902
90849
  };
90903
90850
  }
90904
- function process3(html2, metadata, options2, picker, findBaseElements, walk) {
90851
+ function process2(html2, metadata, options2, picker, findBaseElements, walk) {
90905
90852
  const maxInputLength = options2.limits.maxInputLength;
90906
90853
  if (maxInputLength && html2 && html2.length > maxInputLength) {
90907
90854
  console.warn(`Input length ${html2.length} is above allowed limit of ${maxInputLength}. Truncating without ellipsis.`);
@@ -109980,7 +109927,7 @@ Not a git repository or git not available.
109980
109927
  context.setProjectContext(projectContext);
109981
109928
  }
109982
109929
  }
109983
- var VERSION2 = "1.1.82";
109930
+ var VERSION2 = "1.1.85";
109984
109931
  var init_builtin = __esm(async () => {
109985
109932
  init_src2();
109986
109933
  init_context3();
@@ -111101,8 +111048,8 @@ function supportsFormData2(fetchObject) {
111101
111048
  }
111102
111049
  var checkFileSupport2 = () => {
111103
111050
  if (typeof File === "undefined") {
111104
- const { process: process3 } = globalThis;
111105
- const isOldNode = typeof process3?.versions?.node === "string" && parseInt(process3.versions.node.split(".")) < 20;
111051
+ const { process: process2 } = globalThis;
111052
+ const isOldNode = typeof process2?.versions?.node === "string" && parseInt(process2.versions.node.split(".")) < 20;
111106
111053
  throw new Error("`File` is not defined as a global, which is required for file uploads." + (isOldNode ? " Update to Node 20 LTS or newer, or set `globalThis.File` to `import('node:buffer').File`." : ""));
111107
111054
  }
111108
111055
  }, isAsyncIterable2 = (value2) => value2 != null && typeof value2 === "object" && typeof value2[Symbol.asyncIterator] === "function", multipartFormRequestOptions2 = async (opts, fetch2, stripFilenames = true) => {
@@ -113746,12 +113693,12 @@ var init_resources2 = __esm(() => {
113746
113693
  });
113747
113694
 
113748
113695
  // node_modules/.pnpm/@anthropic-ai+sdk@0.74.0_zod@3.25.76/node_modules/@anthropic-ai/sdk/internal/utils/env.mjs
113749
- var readEnv2 = (env3) => {
113696
+ var readEnv2 = (env2) => {
113750
113697
  if (typeof globalThis.process !== "undefined") {
113751
- return globalThis.process.env?.[env3]?.trim() ?? undefined;
113698
+ return globalThis.process.env?.[env2]?.trim() ?? undefined;
113752
113699
  }
113753
113700
  if (typeof globalThis.Deno !== "undefined") {
113754
- return globalThis.Deno.env?.get?.(env3)?.trim();
113701
+ return globalThis.Deno.env?.get?.(env2)?.trim();
113755
113702
  }
113756
113703
  return;
113757
113704
  };
@@ -117157,7 +117104,7 @@ var init_NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = __esm(() => {
117157
117104
  init_constants3();
117158
117105
  init_stringUnionSelector();
117159
117106
  NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
117160
- environmentVariableSelector: (env3) => stringUnionSelector(env3, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),
117107
+ environmentVariableSelector: (env2) => stringUnionSelector(env2, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),
117161
117108
  configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),
117162
117109
  default: DEFAULT_REQUEST_CHECKSUM_CALCULATION
117163
117110
  };
@@ -117169,7 +117116,7 @@ var init_NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = __esm(() => {
117169
117116
  init_constants3();
117170
117117
  init_stringUnionSelector();
117171
117118
  NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
117172
- environmentVariableSelector: (env3) => stringUnionSelector(env3, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),
117119
+ environmentVariableSelector: (env2) => stringUnionSelector(env2, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),
117173
117120
  configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),
117174
117121
  default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION
117175
117122
  };
@@ -120281,7 +120228,7 @@ var require_tslib = __commonJS((exports, module) => {
120281
120228
  throw new TypeError("Cannot use 'in' operator on non-object");
120282
120229
  return typeof state === "function" ? receiver === state : state.has(receiver);
120283
120230
  };
120284
- __addDisposableResource = function(env3, value2, async) {
120231
+ __addDisposableResource = function(env2, value2, async) {
120285
120232
  if (value2 !== null && value2 !== undefined) {
120286
120233
  if (typeof value2 !== "object" && typeof value2 !== "function")
120287
120234
  throw new TypeError("Object expected.");
@@ -120308,9 +120255,9 @@ var require_tslib = __commonJS((exports, module) => {
120308
120255
  return Promise.reject(e);
120309
120256
  }
120310
120257
  };
120311
- env3.stack.push({ value: value2, dispose, async });
120258
+ env2.stack.push({ value: value2, dispose, async });
120312
120259
  } else if (async) {
120313
- env3.stack.push({ async: true });
120260
+ env2.stack.push({ async: true });
120314
120261
  }
120315
120262
  return value2;
120316
120263
  };
@@ -120318,17 +120265,17 @@ var require_tslib = __commonJS((exports, module) => {
120318
120265
  var e = new Error(message);
120319
120266
  return e.name = "SuppressedError", e.error = error3, e.suppressed = suppressed, e;
120320
120267
  };
120321
- __disposeResources = function(env3) {
120268
+ __disposeResources = function(env2) {
120322
120269
  function fail(e) {
120323
- env3.error = env3.hasError ? new _SuppressedError(e, env3.error, "An error was suppressed during disposal.") : e;
120324
- env3.hasError = true;
120270
+ env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e;
120271
+ env2.hasError = true;
120325
120272
  }
120326
120273
  var r, s = 0;
120327
120274
  function next() {
120328
- while (r = env3.stack.pop()) {
120275
+ while (r = env2.stack.pop()) {
120329
120276
  try {
120330
120277
  if (!r.async && s === 1)
120331
- return s = 0, env3.stack.push(r), Promise.resolve().then(next);
120278
+ return s = 0, env2.stack.push(r), Promise.resolve().then(next);
120332
120279
  if (r.dispose) {
120333
120280
  var result = r.dispose.call(r.value);
120334
120281
  if (r.async)
@@ -120343,9 +120290,9 @@ var require_tslib = __commonJS((exports, module) => {
120343
120290
  }
120344
120291
  }
120345
120292
  if (s === 1)
120346
- return env3.hasError ? Promise.reject(env3.error) : Promise.resolve();
120347
- if (env3.hasError)
120348
- throw env3.error;
120293
+ return env2.hasError ? Promise.reject(env2.error) : Promise.resolve();
120294
+ if (env2.hasError)
120295
+ throw env2.error;
120349
120296
  }
120350
120297
  return next();
120351
120298
  };
@@ -126372,15 +126319,15 @@ More information can be found at: https://a.co/c895JFp`);
126372
126319
  var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
126373
126320
  var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
126374
126321
  var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
126375
- environmentVariableSelector: (env3, options2) => {
126322
+ environmentVariableSelector: (env2, options2) => {
126376
126323
  if (options2?.signingName) {
126377
126324
  const bearerTokenKey = getBearerTokenEnvKey(options2.signingName);
126378
- if (bearerTokenKey in env3)
126325
+ if (bearerTokenKey in env2)
126379
126326
  return ["httpBearerAuth"];
126380
126327
  }
126381
- if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env3))
126328
+ if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env2))
126382
126329
  return;
126383
- return getArrayForCommaSeparatedString(env3[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
126330
+ return getArrayForCommaSeparatedString(env2[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
126384
126331
  },
126385
126332
  configFileSelector: (profile) => {
126386
126333
  if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile))
@@ -126394,9 +126341,9 @@ More information can be found at: https://a.co/c895JFp`);
126394
126341
  return config;
126395
126342
  };
126396
126343
  var NODE_SIGV4A_CONFIG_OPTIONS = {
126397
- environmentVariableSelector(env3) {
126398
- if (env3.AWS_SIGV4A_SIGNING_REGION_SET) {
126399
- return env3.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
126344
+ environmentVariableSelector(env2) {
126345
+ if (env2.AWS_SIGV4A_SIGNING_REGION_SET) {
126346
+ return env2.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_) => _.trim());
126400
126347
  }
126401
126348
  throw new propertyProvider.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
126402
126349
  tryNextLink: true
@@ -130235,7 +130182,7 @@ var init_constants4 = __esm(() => {
130235
130182
  import_util_config_provider = __toESM(require_dist_cjs27(), 1);
130236
130183
  SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
130237
130184
  NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
130238
- environmentVariableSelector: (env3) => import_util_config_provider.booleanSelector(env3, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV),
130185
+ environmentVariableSelector: (env2) => import_util_config_provider.booleanSelector(env2, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, import_util_config_provider.SelectorType.ENV),
130239
130186
  configFileSelector: (profile) => import_util_config_provider.booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, import_util_config_provider.SelectorType.CONFIG),
130240
130187
  default: false
130241
130188
  };
@@ -131628,7 +131575,7 @@ var require_dist_cjs33 = __commonJS((exports) => {
131628
131575
  var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
131629
131576
  var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
131630
131577
  var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
131631
- environmentVariableSelector: (env3) => utilConfigProvider.booleanSelector(env3, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
131578
+ environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
131632
131579
  configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
131633
131580
  default: false
131634
131581
  };
@@ -131636,7 +131583,7 @@ var require_dist_cjs33 = __commonJS((exports) => {
131636
131583
  var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
131637
131584
  var DEFAULT_USE_FIPS_ENDPOINT = false;
131638
131585
  var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
131639
- environmentVariableSelector: (env3) => utilConfigProvider.booleanSelector(env3, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
131586
+ environmentVariableSelector: (env2) => utilConfigProvider.booleanSelector(env2, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
131640
131587
  configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
131641
131588
  default: false
131642
131589
  };
@@ -131677,7 +131624,7 @@ var require_dist_cjs33 = __commonJS((exports) => {
131677
131624
  var REGION_ENV_NAME = "AWS_REGION";
131678
131625
  var REGION_INI_NAME = "region";
131679
131626
  var NODE_REGION_CONFIG_OPTIONS = {
131680
- environmentVariableSelector: (env3) => env3[REGION_ENV_NAME],
131627
+ environmentVariableSelector: (env2) => env2[REGION_ENV_NAME],
131681
131628
  configFileSelector: (profile) => profile[REGION_INI_NAME],
131682
131629
  default: () => {
131683
131630
  throw new Error("Region is missing");
@@ -132146,12 +132093,12 @@ var require_getEndpointUrlConfig = __commonJS((exports) => {
132146
132093
  var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
132147
132094
  var CONFIG_ENDPOINT_URL = "endpoint_url";
132148
132095
  var getEndpointUrlConfig = (serviceId) => ({
132149
- environmentVariableSelector: (env3) => {
132096
+ environmentVariableSelector: (env2) => {
132150
132097
  const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
132151
- const serviceEndpointUrl = env3[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
132098
+ const serviceEndpointUrl = env2[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
132152
132099
  if (serviceEndpointUrl)
132153
132100
  return serviceEndpointUrl;
132154
- const endpointUrl = env3[ENV_ENDPOINT_URL];
132101
+ const endpointUrl = env2[ENV_ENDPOINT_URL];
132155
132102
  if (endpointUrl)
132156
132103
  return endpointUrl;
132157
132104
  return;
@@ -132925,8 +132872,8 @@ var require_dist_cjs40 = __commonJS((exports) => {
132925
132872
  var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
132926
132873
  var CONFIG_MAX_ATTEMPTS = "max_attempts";
132927
132874
  var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
132928
- environmentVariableSelector: (env3) => {
132929
- const value2 = env3[ENV_MAX_ATTEMPTS];
132875
+ environmentVariableSelector: (env2) => {
132876
+ const value2 = env2[ENV_MAX_ATTEMPTS];
132930
132877
  if (!value2)
132931
132878
  return;
132932
132879
  const maxAttempt = parseInt(value2);
@@ -132967,7 +132914,7 @@ var require_dist_cjs40 = __commonJS((exports) => {
132967
132914
  var ENV_RETRY_MODE = "AWS_RETRY_MODE";
132968
132915
  var CONFIG_RETRY_MODE = "retry_mode";
132969
132916
  var NODE_RETRY_MODE_CONFIG_OPTIONS = {
132970
- environmentVariableSelector: (env3) => env3[ENV_RETRY_MODE],
132917
+ environmentVariableSelector: (env2) => env2[ENV_RETRY_MODE],
132971
132918
  configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
132972
132919
  default: utilRetry.DEFAULT_RETRY_MODE
132973
132920
  };
@@ -138258,7 +138205,7 @@ var init_Endpoint = __esm(() => {
138258
138205
  var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT", CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint", ENDPOINT_CONFIG_OPTIONS;
138259
138206
  var init_EndpointConfigOptions = __esm(() => {
138260
138207
  ENDPOINT_CONFIG_OPTIONS = {
138261
- environmentVariableSelector: (env3) => env3[ENV_ENDPOINT_NAME],
138208
+ environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_NAME],
138262
138209
  configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
138263
138210
  default: undefined
138264
138211
  };
@@ -138278,7 +138225,7 @@ var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE", CONFIG_EN
138278
138225
  var init_EndpointModeConfigOptions = __esm(() => {
138279
138226
  init_EndpointMode();
138280
138227
  ENDPOINT_MODE_CONFIG_OPTIONS = {
138281
- environmentVariableSelector: (env3) => env3[ENV_ENDPOINT_MODE_NAME],
138228
+ environmentVariableSelector: (env2) => env2[ENV_ENDPOINT_MODE_NAME],
138282
138229
  configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
138283
138230
  default: EndpointMode.IPv4
138284
138231
  };
@@ -138361,8 +138308,8 @@ var import_node_config_provider2, import_property_provider5, IMDS_PATH = "/lates
138361
138308
  let fallbackBlockedFromProfile = false;
138362
138309
  let fallbackBlockedFromProcessEnv = false;
138363
138310
  const configValue = await import_node_config_provider2.loadConfig({
138364
- environmentVariableSelector: (env3) => {
138365
- const envValue = env3[AWS_EC2_METADATA_V1_DISABLED];
138311
+ environmentVariableSelector: (env2) => {
138312
+ const envValue = env2[AWS_EC2_METADATA_V1_DISABLED];
138366
138313
  fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
138367
138314
  if (envValue === undefined) {
138368
138315
  throw new import_property_provider5.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
@@ -138937,8 +138884,8 @@ var require_package2 = __commonJS((exports, module) => {
138937
138884
 
138938
138885
  // node_modules/.pnpm/@aws-sdk+util-user-agent-node@3.972.8/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
138939
138886
  var require_dist_cjs41 = __commonJS((exports) => {
138940
- var os2 = __require("os");
138941
- var process3 = __require("process");
138887
+ var os = __require("os");
138888
+ var process2 = __require("process");
138942
138889
  var middlewareUserAgent = require_dist_cjs32();
138943
138890
  var crtAvailability = {
138944
138891
  isCrtAvailable: false
@@ -138954,9 +138901,9 @@ var require_dist_cjs41 = __commonJS((exports) => {
138954
138901
  const sections = [
138955
138902
  ["aws-sdk-js", clientVersion],
138956
138903
  ["ua", "2.1"],
138957
- [`os/${os2.platform()}`, os2.release()],
138904
+ [`os/${os.platform()}`, os.release()],
138958
138905
  ["lang/js"],
138959
- ["md/nodejs", `${process3.versions.node}`]
138906
+ ["md/nodejs", `${process2.versions.node}`]
138960
138907
  ];
138961
138908
  const crtAvailable = isCrtAvailable();
138962
138909
  if (crtAvailable) {
@@ -138965,8 +138912,8 @@ var require_dist_cjs41 = __commonJS((exports) => {
138965
138912
  if (serviceId) {
138966
138913
  sections.push([`api/${serviceId}`, clientVersion]);
138967
138914
  }
138968
- if (process3.env.AWS_EXECUTION_ENV) {
138969
- sections.push([`exec-env/${process3.env.AWS_EXECUTION_ENV}`]);
138915
+ if (process2.env.AWS_EXECUTION_ENV) {
138916
+ sections.push([`exec-env/${process2.env.AWS_EXECUTION_ENV}`]);
138970
138917
  }
138971
138918
  const appId = await config?.userAgentAppId?.();
138972
138919
  const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
@@ -138978,7 +138925,7 @@ var require_dist_cjs41 = __commonJS((exports) => {
138978
138925
  var UA_APP_ID_INI_NAME = "sdk_ua_app_id";
138979
138926
  var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
138980
138927
  var NODE_APP_ID_CONFIG_OPTIONS = {
138981
- environmentVariableSelector: (env3) => env3[UA_APP_ID_ENV_NAME],
138928
+ environmentVariableSelector: (env2) => env2[UA_APP_ID_ENV_NAME],
138982
138929
  configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
138983
138930
  default: middlewareUserAgent.DEFAULT_UA_APP_ID
138984
138931
  };
@@ -139072,8 +139019,8 @@ var require_dist_cjs44 = __commonJS((exports) => {
139072
139019
  var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
139073
139020
  var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
139074
139021
  var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
139075
- environmentVariableSelector: (env3) => {
139076
- return env3[AWS_DEFAULTS_MODE_ENV];
139022
+ environmentVariableSelector: (env2) => {
139023
+ return env2[AWS_DEFAULTS_MODE_ENV];
139077
139024
  },
139078
139025
  configFileSelector: (profile) => {
139079
139026
  return profile[AWS_DEFAULTS_MODE_CONFIG];
@@ -145157,7 +145104,7 @@ var import_util_config_provider2, NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN
145157
145104
  var init_NodeUseArnRegionConfigOptions = __esm(() => {
145158
145105
  import_util_config_provider2 = __toESM(require_dist_cjs27(), 1);
145159
145106
  NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
145160
- environmentVariableSelector: (env3) => import_util_config_provider2.booleanSelector(env3, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider2.SelectorType.ENV),
145107
+ environmentVariableSelector: (env2) => import_util_config_provider2.booleanSelector(env2, NODE_USE_ARN_REGION_ENV_NAME, import_util_config_provider2.SelectorType.ENV),
145161
145108
  configFileSelector: (profile) => import_util_config_provider2.booleanSelector(profile, NODE_USE_ARN_REGION_INI_NAME, import_util_config_provider2.SelectorType.CONFIG),
145162
145109
  default: undefined
145163
145110
  };
@@ -174376,16 +174323,16 @@ class ProcessTransport {
174376
174323
  return isRunningWithBun() ? "bun" : "node";
174377
174324
  }
174378
174325
  spawnLocalProcess(spawnOptions) {
174379
- const { command, args, cwd: cwd2, env: env3, signal } = spawnOptions;
174380
- const stderrMode = env3.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr ? "pipe" : "ignore";
174326
+ const { command, args, cwd: cwd2, env: env2, signal } = spawnOptions;
174327
+ const stderrMode = env2.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr ? "pipe" : "ignore";
174381
174328
  const childProcess = spawn4(command, args, {
174382
174329
  cwd: cwd2,
174383
174330
  stdio: ["pipe", "pipe", stderrMode],
174384
174331
  signal,
174385
- env: env3,
174332
+ env: env2,
174386
174333
  windowsHide: true
174387
174334
  });
174388
- if (env3.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr) {
174335
+ if (env2.DEBUG_CLAUDE_AGENT_SDK || this.options.stderr) {
174389
174336
  childProcess.stderr.on("data", (data) => {
174390
174337
  const message = data.toString();
174391
174338
  logForSdkDebugging(message);
@@ -174420,7 +174367,7 @@ class ProcessTransport {
174420
174367
  executableArgs = [],
174421
174368
  extraArgs = {},
174422
174369
  pathToClaudeCodeExecutable,
174423
- env: env3 = { ...process.env },
174370
+ env: env2 = { ...process.env },
174424
174371
  maxThinkingTokens,
174425
174372
  maxTurns,
174426
174373
  maxBudgetUsd,
@@ -174466,7 +174413,7 @@ class ProcessTransport {
174466
174413
  if (jsonSchema) {
174467
174414
  args.push("--json-schema", jsonStringify(jsonSchema));
174468
174415
  }
174469
- if (env3.DEBUG_CLAUDE_AGENT_SDK) {
174416
+ if (env2.DEBUG_CLAUDE_AGENT_SDK) {
174470
174417
  args.push("--debug-to-stderr");
174471
174418
  }
174472
174419
  if (canUseTool) {
@@ -174551,14 +174498,14 @@ class ProcessTransport {
174551
174498
  args.push(`--${flag}`, value2);
174552
174499
  }
174553
174500
  }
174554
- if (!env3.CLAUDE_CODE_ENTRYPOINT) {
174555
- env3.CLAUDE_CODE_ENTRYPOINT = "sdk-ts";
174501
+ if (!env2.CLAUDE_CODE_ENTRYPOINT) {
174502
+ env2.CLAUDE_CODE_ENTRYPOINT = "sdk-ts";
174556
174503
  }
174557
- delete env3.NODE_OPTIONS;
174558
- if (env3.DEBUG_CLAUDE_AGENT_SDK) {
174559
- env3.DEBUG = "1";
174504
+ delete env2.NODE_OPTIONS;
174505
+ if (env2.DEBUG_CLAUDE_AGENT_SDK) {
174506
+ env2.DEBUG = "1";
174560
174507
  } else {
174561
- delete env3.DEBUG;
174508
+ delete env2.DEBUG;
174562
174509
  }
174563
174510
  const isNative = isNativeBinary(pathToClaudeCodeExecutable);
174564
174511
  const spawnCommand = isNative ? pathToClaudeCodeExecutable : executable;
@@ -174567,7 +174514,7 @@ class ProcessTransport {
174567
174514
  command: spawnCommand,
174568
174515
  args: spawnArgs,
174569
174516
  cwd: cwd2,
174570
- env: env3,
174517
+ env: env2,
174571
174518
  signal: this.abortController.signal
174572
174519
  };
174573
174520
  if (this.options.spawnClaudeCodeProcess) {
@@ -180305,7 +180252,7 @@ function query({
180305
180252
  cwd: cwd2,
180306
180253
  disallowedTools = [],
180307
180254
  tools,
180308
- env: env3,
180255
+ env: env2,
180309
180256
  executable = isRunningWithBun() ? "bun" : "node",
180310
180257
  executableArgs = [],
180311
180258
  extraArgs = {},
@@ -180331,7 +180278,7 @@ function query({
180331
180278
  strictMcpConfig
180332
180279
  } = rest;
180333
180280
  const jsonSchema = outputFormat?.type === "json_schema" ? outputFormat.schema : undefined;
180334
- let processEnv = env3;
180281
+ let processEnv = env2;
180335
180282
  if (!processEnv) {
180336
180283
  processEnv = { ...process.env };
180337
180284
  }
@@ -183944,20 +183891,20 @@ var init_sdk2 = __esm(() => {
183944
183891
  var validate_1 = require_validate3();
183945
183892
 
183946
183893
  class SchemaEnv {
183947
- constructor(env3) {
183894
+ constructor(env2) {
183948
183895
  var _a4;
183949
183896
  this.refs = {};
183950
183897
  this.dynamicAnchors = {};
183951
183898
  let schema;
183952
- if (typeof env3.schema == "object")
183953
- schema = env3.schema;
183954
- this.schema = env3.schema;
183955
- this.schemaId = env3.schemaId;
183956
- this.root = env3.root || this;
183957
- this.baseId = (_a4 = env3.baseId) !== null && _a4 !== undefined ? _a4 : (0, resolve_1.normalizeId)(schema === null || schema === undefined ? undefined : schema[env3.schemaId || "$id"]);
183958
- this.schemaPath = env3.schemaPath;
183959
- this.localRefs = env3.localRefs;
183960
- this.meta = env3.meta;
183899
+ if (typeof env2.schema == "object")
183900
+ schema = env2.schema;
183901
+ this.schema = env2.schema;
183902
+ this.schemaId = env2.schemaId;
183903
+ this.root = env2.root || this;
183904
+ this.baseId = (_a4 = env2.baseId) !== null && _a4 !== undefined ? _a4 : (0, resolve_1.normalizeId)(schema === null || schema === undefined ? undefined : schema[env2.schemaId || "$id"]);
183905
+ this.schemaPath = env2.schemaPath;
183906
+ this.localRefs = env2.localRefs;
183907
+ this.meta = env2.meta;
183961
183908
  this.$async = schema === null || schema === undefined ? undefined : schema.$async;
183962
183909
  this.refs = {};
183963
183910
  }
@@ -184140,15 +184087,15 @@ var init_sdk2 = __esm(() => {
184140
184087
  baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
184141
184088
  }
184142
184089
  }
184143
- let env3;
184090
+ let env2;
184144
184091
  if (typeof schema != "boolean" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {
184145
184092
  const $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);
184146
- env3 = resolveSchema.call(this, root2, $ref);
184093
+ env2 = resolveSchema.call(this, root2, $ref);
184147
184094
  }
184148
184095
  const { schemaId } = this.opts;
184149
- env3 = env3 || new SchemaEnv({ schema, schemaId, root: root2, baseId });
184150
- if (env3.schema !== env3.root.schema)
184151
- return env3;
184096
+ env2 = env2 || new SchemaEnv({ schema, schemaId, root: root2, baseId });
184097
+ if (env2.schema !== env2.root.schema)
184098
+ return env2;
184152
184099
  return;
184153
184100
  }
184154
184101
  });
@@ -185443,8 +185390,8 @@ var init_sdk2 = __esm(() => {
185443
185390
  schemaType: "string",
185444
185391
  code(cxt) {
185445
185392
  const { gen, schema: $ref, it } = cxt;
185446
- const { baseId, schemaEnv: env3, validateName, opts, self: self2 } = it;
185447
- const { root: root2 } = env3;
185393
+ const { baseId, schemaEnv: env2, validateName, opts, self: self2 } = it;
185394
+ const { root: root2 } = env2;
185448
185395
  if (($ref === "#" || $ref === "#/") && baseId === root2.baseId)
185449
185396
  return callRootRef();
185450
185397
  const schOrEnv = compile_1.resolveRef.call(self2, root2, baseId, $ref);
@@ -185454,8 +185401,8 @@ var init_sdk2 = __esm(() => {
185454
185401
  return callValidate(schOrEnv);
185455
185402
  return inlineRefSchema(schOrEnv);
185456
185403
  function callRootRef() {
185457
- if (env3 === root2)
185458
- return callRef(cxt, validateName, env3, env3.$async);
185404
+ if (env2 === root2)
185405
+ return callRef(cxt, validateName, env2, env2.$async);
185459
185406
  const rootName = gen.scopeValue("root", { ref: root2 });
185460
185407
  return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root2, root2.$async);
185461
185408
  }
@@ -185485,14 +185432,14 @@ var init_sdk2 = __esm(() => {
185485
185432
  exports.getValidate = getValidate;
185486
185433
  function callRef(cxt, v5, sch, $async) {
185487
185434
  const { gen, it } = cxt;
185488
- const { allErrors, schemaEnv: env3, opts } = it;
185435
+ const { allErrors, schemaEnv: env2, opts } = it;
185489
185436
  const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
185490
185437
  if ($async)
185491
185438
  callAsyncRef();
185492
185439
  else
185493
185440
  callSyncRef();
185494
185441
  function callAsyncRef() {
185495
- if (!env3.$async)
185442
+ if (!env2.$async)
185496
185443
  throw new Error("async schema referenced by sync schema");
185497
185444
  const valid = gen.let("valid");
185498
185445
  gen.try(() => {
@@ -194985,7 +194932,7 @@ __export(exports_dist, {
194985
194932
  Codex: () => Codex
194986
194933
  });
194987
194934
  import { promises as fs4 } from "fs";
194988
- import os2 from "os";
194935
+ import os from "os";
194989
194936
  import path4 from "path";
194990
194937
  import { spawn as spawn5 } from "child_process";
194991
194938
  import path22 from "path";
@@ -194998,7 +194945,7 @@ async function createOutputSchemaFile(schema) {
194998
194945
  if (!isJsonObject(schema)) {
194999
194946
  throw new Error("outputSchema must be a plain JSON object");
195000
194947
  }
195001
- const schemaDir = await fs4.mkdtemp(path4.join(os2.tmpdir(), "codex-output-schema-"));
194948
+ const schemaDir = await fs4.mkdtemp(path4.join(os.tmpdir(), "codex-output-schema-"));
195002
194949
  const schemaPath = path4.join(schemaDir, "schema.json");
195003
194950
  const cleanup = async () => {
195004
194951
  try {
@@ -195246,9 +195193,9 @@ var Thread = class {
195246
195193
  executablePath;
195247
195194
  envOverride;
195248
195195
  configOverrides;
195249
- constructor(executablePath = null, env3, configOverrides) {
195196
+ constructor(executablePath = null, env2, configOverrides) {
195250
195197
  this.executablePath = executablePath || findCodexPath();
195251
- this.envOverride = env3;
195198
+ this.envOverride = env2;
195252
195199
  this.configOverrides = configOverrides;
195253
195200
  }
195254
195201
  async* run(args) {
@@ -195302,27 +195249,27 @@ var Thread = class {
195302
195249
  commandArgs.push("--image", image2);
195303
195250
  }
195304
195251
  }
195305
- const env3 = {};
195252
+ const env2 = {};
195306
195253
  if (this.envOverride) {
195307
- Object.assign(env3, this.envOverride);
195254
+ Object.assign(env2, this.envOverride);
195308
195255
  } else {
195309
195256
  for (const [key, value2] of Object.entries(process.env)) {
195310
195257
  if (value2 !== undefined) {
195311
- env3[key] = value2;
195258
+ env2[key] = value2;
195312
195259
  }
195313
195260
  }
195314
195261
  }
195315
- if (!env3[INTERNAL_ORIGINATOR_ENV]) {
195316
- env3[INTERNAL_ORIGINATOR_ENV] = TYPESCRIPT_SDK_ORIGINATOR;
195262
+ if (!env2[INTERNAL_ORIGINATOR_ENV]) {
195263
+ env2[INTERNAL_ORIGINATOR_ENV] = TYPESCRIPT_SDK_ORIGINATOR;
195317
195264
  }
195318
195265
  if (args.baseUrl) {
195319
- env3.OPENAI_BASE_URL = args.baseUrl;
195266
+ env2.OPENAI_BASE_URL = args.baseUrl;
195320
195267
  }
195321
195268
  if (args.apiKey) {
195322
- env3.CODEX_API_KEY = args.apiKey;
195269
+ env2.CODEX_API_KEY = args.apiKey;
195323
195270
  }
195324
195271
  const child = spawn5(this.executablePath, commandArgs, {
195325
- env: env3,
195272
+ env: env2,
195326
195273
  signal: args.signal
195327
195274
  });
195328
195275
  let spawnError = null;
@@ -195377,8 +195324,8 @@ var Thread = class {
195377
195324
  exec;
195378
195325
  options;
195379
195326
  constructor(options2 = {}) {
195380
- const { codexPathOverride, env: env3, config: config2 } = options2;
195381
- this.exec = new CodexExec(codexPathOverride, env3, config2);
195327
+ const { codexPathOverride, env: env2, config: config2 } = options2;
195328
+ this.exec = new CodexExec(codexPathOverride, env2, config2);
195382
195329
  this.options = options2;
195383
195330
  }
195384
195331
  startThread(options2 = {}) {
@@ -206003,61 +205950,748 @@ var init_types11 = __esm(() => {
206003
205950
  };
206004
205951
  });
206005
205952
 
206006
- // packages/core/src/memory/store.ts
205953
+ // node_modules/.pnpm/@hasna+mementos@0.3.9_@types+react@19.2.14/node_modules/@hasna/mementos/dist/index.js
205954
+ import { Database as Database3 } from "bun:sqlite";
205955
+ import { existsSync as existsSync27, mkdirSync as mkdirSync14 } from "fs";
205956
+ import { dirname as dirname15, join as join40, resolve as resolve10 } from "path";
205957
+ import { existsSync as existsSync28, mkdirSync as mkdirSync24, readFileSync as readFileSync13 } from "fs";
205958
+ import { homedir as homedir23 } from "os";
205959
+ import { dirname as dirname22, join as join212, resolve as resolve22 } from "path";
205960
+ function isInMemoryDb2(path5) {
205961
+ return path5 === ":memory:" || path5.startsWith("file::memory:");
205962
+ }
205963
+ function findNearestMementosDb(startDir) {
205964
+ let dir = resolve10(startDir);
205965
+ while (true) {
205966
+ const candidate = join40(dir, ".mementos", "mementos.db");
205967
+ if (existsSync27(candidate))
205968
+ return candidate;
205969
+ const parent = dirname15(dir);
205970
+ if (parent === dir)
205971
+ break;
205972
+ dir = parent;
205973
+ }
205974
+ return null;
205975
+ }
205976
+ function findGitRoot2(startDir) {
205977
+ let dir = resolve10(startDir);
205978
+ while (true) {
205979
+ if (existsSync27(join40(dir, ".git")))
205980
+ return dir;
205981
+ const parent = dirname15(dir);
205982
+ if (parent === dir)
205983
+ break;
205984
+ dir = parent;
205985
+ }
205986
+ return null;
205987
+ }
205988
+ function getDbPath2() {
205989
+ if (process.env["MEMENTOS_DB_PATH"]) {
205990
+ return process.env["MEMENTOS_DB_PATH"];
205991
+ }
205992
+ const cwd2 = process.cwd();
205993
+ const nearest = findNearestMementosDb(cwd2);
205994
+ if (nearest)
205995
+ return nearest;
205996
+ if (process.env["MEMENTOS_DB_SCOPE"] === "project") {
205997
+ const gitRoot = findGitRoot2(cwd2);
205998
+ if (gitRoot) {
205999
+ return join40(gitRoot, ".mementos", "mementos.db");
206000
+ }
206001
+ }
206002
+ const home = process.env["HOME"] || process.env["USERPROFILE"] || "~";
206003
+ return join40(home, ".mementos", "mementos.db");
206004
+ }
206005
+ function ensureDir2(filePath) {
206006
+ if (isInMemoryDb2(filePath))
206007
+ return;
206008
+ const dir = dirname15(resolve10(filePath));
206009
+ if (!existsSync27(dir)) {
206010
+ mkdirSync14(dir, { recursive: true });
206011
+ }
206012
+ }
206013
+ function getDatabase3(dbPath) {
206014
+ if (_db2)
206015
+ return _db2;
206016
+ const path5 = dbPath || getDbPath2();
206017
+ ensureDir2(path5);
206018
+ _db2 = new Database3(path5, { create: true });
206019
+ _db2.run("PRAGMA journal_mode = WAL");
206020
+ _db2.run("PRAGMA busy_timeout = 5000");
206021
+ _db2.run("PRAGMA foreign_keys = ON");
206022
+ runMigrations2(_db2);
206023
+ return _db2;
206024
+ }
206025
+ function runMigrations2(db) {
206026
+ try {
206027
+ const result = db.query("SELECT MAX(id) as max_id FROM _migrations").get();
206028
+ const currentLevel = result?.max_id ?? 0;
206029
+ for (let i6 = currentLevel;i6 < MIGRATIONS2.length; i6++) {
206030
+ try {
206031
+ db.exec(MIGRATIONS2[i6]);
206032
+ } catch {}
206033
+ }
206034
+ } catch {
206035
+ for (const migration of MIGRATIONS2) {
206036
+ try {
206037
+ db.exec(migration);
206038
+ } catch {}
206039
+ }
206040
+ }
206041
+ }
206042
+ function now3() {
206043
+ return new Date().toISOString();
206044
+ }
206045
+ function uuid5() {
206046
+ return crypto.randomUUID();
206047
+ }
206048
+ function redactSecrets(text5) {
206049
+ let result = text5;
206050
+ for (const { pattern } of SECRET_PATTERNS) {
206051
+ pattern.lastIndex = 0;
206052
+ result = result.replace(pattern, REDACTED);
206053
+ }
206054
+ return result;
206055
+ }
206056
+ function parseMemoryRow(row) {
206057
+ return {
206058
+ id: row["id"],
206059
+ key: row["key"],
206060
+ value: row["value"],
206061
+ category: row["category"],
206062
+ scope: row["scope"],
206063
+ summary: row["summary"] || null,
206064
+ tags: JSON.parse(row["tags"] || "[]"),
206065
+ importance: row["importance"],
206066
+ source: row["source"],
206067
+ status: row["status"],
206068
+ pinned: !!row["pinned"],
206069
+ agent_id: row["agent_id"] || null,
206070
+ project_id: row["project_id"] || null,
206071
+ session_id: row["session_id"] || null,
206072
+ metadata: JSON.parse(row["metadata"] || "{}"),
206073
+ access_count: row["access_count"],
206074
+ version: row["version"],
206075
+ expires_at: row["expires_at"] || null,
206076
+ created_at: row["created_at"],
206077
+ updated_at: row["updated_at"],
206078
+ accessed_at: row["accessed_at"] || null
206079
+ };
206080
+ }
206081
+ function createMemory(input, dedupeMode = "merge", db) {
206082
+ const d5 = db || getDatabase3();
206083
+ const timestamp = now3();
206084
+ let expiresAt = input.expires_at || null;
206085
+ if (input.ttl_ms && !expiresAt) {
206086
+ expiresAt = new Date(Date.now() + input.ttl_ms).toISOString();
206087
+ }
206088
+ const id = uuid5();
206089
+ const tags = input.tags || [];
206090
+ const tagsJson = JSON.stringify(tags);
206091
+ const metadataJson = JSON.stringify(input.metadata || {});
206092
+ const safeValue = redactSecrets(input.value);
206093
+ const safeSummary = input.summary ? redactSecrets(input.summary) : null;
206094
+ if (dedupeMode === "merge") {
206095
+ const existing = d5.query(`SELECT id, version FROM memories
206096
+ WHERE key = ? AND scope = ?
206097
+ AND COALESCE(agent_id, '') = ?
206098
+ AND COALESCE(project_id, '') = ?
206099
+ AND COALESCE(session_id, '') = ?`).get(input.key, input.scope || "private", input.agent_id || "", input.project_id || "", input.session_id || "");
206100
+ if (existing) {
206101
+ d5.run(`UPDATE memories SET
206102
+ value = ?, category = ?, summary = ?, tags = ?,
206103
+ importance = ?, metadata = ?, expires_at = ?,
206104
+ pinned = COALESCE(pinned, 0),
206105
+ version = version + 1, updated_at = ?
206106
+ WHERE id = ?`, [
206107
+ safeValue,
206108
+ input.category || "knowledge",
206109
+ safeSummary,
206110
+ tagsJson,
206111
+ input.importance ?? 5,
206112
+ metadataJson,
206113
+ expiresAt,
206114
+ timestamp,
206115
+ existing.id
206116
+ ]);
206117
+ d5.run("DELETE FROM memory_tags WHERE memory_id = ?", [existing.id]);
206118
+ const insertTag2 = d5.prepare("INSERT OR IGNORE INTO memory_tags (memory_id, tag) VALUES (?, ?)");
206119
+ for (const tag of tags) {
206120
+ insertTag2.run(existing.id, tag);
206121
+ }
206122
+ return getMemory(existing.id, d5);
206123
+ }
206124
+ }
206125
+ d5.run(`INSERT INTO memories (id, key, value, category, scope, summary, tags, importance, source, status, pinned, agent_id, project_id, session_id, metadata, access_count, version, expires_at, created_at, updated_at)
206126
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 'active', 0, ?, ?, ?, ?, 0, 1, ?, ?, ?)`, [
206127
+ id,
206128
+ input.key,
206129
+ input.value,
206130
+ input.category || "knowledge",
206131
+ input.scope || "private",
206132
+ input.summary || null,
206133
+ tagsJson,
206134
+ input.importance ?? 5,
206135
+ input.source || "agent",
206136
+ input.agent_id || null,
206137
+ input.project_id || null,
206138
+ input.session_id || null,
206139
+ metadataJson,
206140
+ expiresAt,
206141
+ timestamp,
206142
+ timestamp
206143
+ ]);
206144
+ const insertTag = d5.prepare("INSERT OR IGNORE INTO memory_tags (memory_id, tag) VALUES (?, ?)");
206145
+ for (const tag of tags) {
206146
+ insertTag.run(id, tag);
206147
+ }
206148
+ return getMemory(id, d5);
206149
+ }
206150
+ function getMemory(id, db) {
206151
+ const d5 = db || getDatabase3();
206152
+ const row = d5.query("SELECT * FROM memories WHERE id = ?").get(id);
206153
+ if (!row)
206154
+ return null;
206155
+ return parseMemoryRow(row);
206156
+ }
206157
+ function getMemoryByKey(key, scope, agentId, projectId, sessionId, db) {
206158
+ const d5 = db || getDatabase3();
206159
+ let sql = "SELECT * FROM memories WHERE key = ?";
206160
+ const params = [key];
206161
+ if (scope) {
206162
+ sql += " AND scope = ?";
206163
+ params.push(scope);
206164
+ }
206165
+ if (agentId) {
206166
+ sql += " AND agent_id = ?";
206167
+ params.push(agentId);
206168
+ }
206169
+ if (projectId) {
206170
+ sql += " AND project_id = ?";
206171
+ params.push(projectId);
206172
+ }
206173
+ if (sessionId) {
206174
+ sql += " AND session_id = ?";
206175
+ params.push(sessionId);
206176
+ }
206177
+ sql += " AND status = 'active' ORDER BY importance DESC LIMIT 1";
206178
+ const row = d5.query(sql).get(...params);
206179
+ if (!row)
206180
+ return null;
206181
+ return parseMemoryRow(row);
206182
+ }
206183
+ function listMemories(filter, db) {
206184
+ const d5 = db || getDatabase3();
206185
+ const conditions = [];
206186
+ const params = [];
206187
+ if (filter) {
206188
+ if (filter.scope) {
206189
+ if (Array.isArray(filter.scope)) {
206190
+ conditions.push(`scope IN (${filter.scope.map(() => "?").join(",")})`);
206191
+ params.push(...filter.scope);
206192
+ } else {
206193
+ conditions.push("scope = ?");
206194
+ params.push(filter.scope);
206195
+ }
206196
+ }
206197
+ if (filter.category) {
206198
+ if (Array.isArray(filter.category)) {
206199
+ conditions.push(`category IN (${filter.category.map(() => "?").join(",")})`);
206200
+ params.push(...filter.category);
206201
+ } else {
206202
+ conditions.push("category = ?");
206203
+ params.push(filter.category);
206204
+ }
206205
+ }
206206
+ if (filter.source) {
206207
+ if (Array.isArray(filter.source)) {
206208
+ conditions.push(`source IN (${filter.source.map(() => "?").join(",")})`);
206209
+ params.push(...filter.source);
206210
+ } else {
206211
+ conditions.push("source = ?");
206212
+ params.push(filter.source);
206213
+ }
206214
+ }
206215
+ if (filter.status) {
206216
+ if (Array.isArray(filter.status)) {
206217
+ conditions.push(`status IN (${filter.status.map(() => "?").join(",")})`);
206218
+ params.push(...filter.status);
206219
+ } else {
206220
+ conditions.push("status = ?");
206221
+ params.push(filter.status);
206222
+ }
206223
+ } else {
206224
+ conditions.push("status = 'active'");
206225
+ }
206226
+ if (filter.project_id) {
206227
+ conditions.push("project_id = ?");
206228
+ params.push(filter.project_id);
206229
+ }
206230
+ if (filter.agent_id) {
206231
+ conditions.push("agent_id = ?");
206232
+ params.push(filter.agent_id);
206233
+ }
206234
+ if (filter.session_id) {
206235
+ conditions.push("session_id = ?");
206236
+ params.push(filter.session_id);
206237
+ }
206238
+ if (filter.min_importance) {
206239
+ conditions.push("importance >= ?");
206240
+ params.push(filter.min_importance);
206241
+ }
206242
+ if (filter.pinned !== undefined) {
206243
+ conditions.push("pinned = ?");
206244
+ params.push(filter.pinned ? 1 : 0);
206245
+ }
206246
+ if (filter.tags && filter.tags.length > 0) {
206247
+ for (const tag of filter.tags) {
206248
+ conditions.push("id IN (SELECT memory_id FROM memory_tags WHERE tag = ?)");
206249
+ params.push(tag);
206250
+ }
206251
+ }
206252
+ if (filter.search) {
206253
+ conditions.push("(key LIKE ? OR value LIKE ? OR summary LIKE ?)");
206254
+ const term = `%${filter.search}%`;
206255
+ params.push(term, term, term);
206256
+ }
206257
+ } else {
206258
+ conditions.push("status = 'active'");
206259
+ }
206260
+ let sql = "SELECT * FROM memories";
206261
+ if (conditions.length > 0) {
206262
+ sql += ` WHERE ${conditions.join(" AND ")}`;
206263
+ }
206264
+ sql += " ORDER BY importance DESC, created_at DESC";
206265
+ if (filter?.limit) {
206266
+ sql += " LIMIT ?";
206267
+ params.push(filter.limit);
206268
+ }
206269
+ if (filter?.offset) {
206270
+ sql += " OFFSET ?";
206271
+ params.push(filter.offset);
206272
+ }
206273
+ const rows = d5.query(sql).all(...params);
206274
+ return rows.map(parseMemoryRow);
206275
+ }
206276
+ function deleteMemory(id, db) {
206277
+ const d5 = db || getDatabase3();
206278
+ const result = d5.run("DELETE FROM memories WHERE id = ?", [id]);
206279
+ return result.changes > 0;
206280
+ }
206281
+ function touchMemory(id, db) {
206282
+ const d5 = db || getDatabase3();
206283
+ d5.run("UPDATE memories SET access_count = access_count + 1, accessed_at = ? WHERE id = ?", [now3(), id]);
206284
+ }
206285
+ function cleanExpiredMemories(db) {
206286
+ const d5 = db || getDatabase3();
206287
+ const timestamp = now3();
206288
+ const result = d5.run("DELETE FROM memories WHERE expires_at IS NOT NULL AND expires_at < ?", [timestamp]);
206289
+ return result.changes;
206290
+ }
206291
+ function deepMerge2(target, source) {
206292
+ const result = { ...target };
206293
+ for (const key of Object.keys(source)) {
206294
+ const sourceVal = source[key];
206295
+ const targetVal = result[key];
206296
+ if (sourceVal !== null && typeof sourceVal === "object" && !Array.isArray(sourceVal) && targetVal !== null && typeof targetVal === "object" && !Array.isArray(targetVal)) {
206297
+ result[key] = deepMerge2(targetVal, sourceVal);
206298
+ } else {
206299
+ result[key] = sourceVal;
206300
+ }
206301
+ }
206302
+ return result;
206303
+ }
206304
+ function isValidScope(value2) {
206305
+ return VALID_SCOPES2.includes(value2);
206306
+ }
206307
+ function isValidCategory(value2) {
206308
+ return VALID_CATEGORIES2.includes(value2);
206309
+ }
206310
+ function loadConfig5() {
206311
+ const configPath = join212(homedir23(), ".mementos", "config.json");
206312
+ let fileConfig = {};
206313
+ if (existsSync28(configPath)) {
206314
+ try {
206315
+ const raw = readFileSync13(configPath, "utf-8");
206316
+ fileConfig = JSON.parse(raw);
206317
+ } catch {}
206318
+ }
206319
+ const merged = deepMerge2(DEFAULT_CONFIG2, fileConfig);
206320
+ const envScope = process.env["MEMENTOS_DEFAULT_SCOPE"];
206321
+ if (envScope && isValidScope(envScope)) {
206322
+ merged.default_scope = envScope;
206323
+ }
206324
+ const envCategory = process.env["MEMENTOS_DEFAULT_CATEGORY"];
206325
+ if (envCategory && isValidCategory(envCategory)) {
206326
+ merged.default_category = envCategory;
206327
+ }
206328
+ const envImportance = process.env["MEMENTOS_DEFAULT_IMPORTANCE"];
206329
+ if (envImportance) {
206330
+ const parsed = parseInt(envImportance, 10);
206331
+ if (!Number.isNaN(parsed) && parsed >= 1 && parsed <= 10) {
206332
+ merged.default_importance = parsed;
206333
+ }
206334
+ }
206335
+ return merged;
206336
+ }
206337
+
206338
+ class MemoryInjector {
206339
+ config;
206340
+ injectedIds = new Set;
206341
+ constructor(config2) {
206342
+ this.config = config2 || loadConfig5();
206343
+ }
206344
+ getInjectionContext(options2 = {}) {
206345
+ const maxTokens = options2.max_tokens || this.config.injection.max_tokens;
206346
+ const minImportance = options2.min_importance || this.config.injection.min_importance;
206347
+ const categories = options2.categories || this.config.injection.categories;
206348
+ const db = options2.db;
206349
+ const allMemories = [];
206350
+ const globalMems = listMemories({
206351
+ scope: "global",
206352
+ category: categories,
206353
+ min_importance: minImportance,
206354
+ status: "active",
206355
+ limit: 100
206356
+ }, db);
206357
+ allMemories.push(...globalMems);
206358
+ if (options2.project_id) {
206359
+ const sharedMems = listMemories({
206360
+ scope: "shared",
206361
+ category: categories,
206362
+ min_importance: minImportance,
206363
+ status: "active",
206364
+ project_id: options2.project_id,
206365
+ limit: 100
206366
+ }, db);
206367
+ allMemories.push(...sharedMems);
206368
+ }
206369
+ if (options2.agent_id) {
206370
+ const privateMems = listMemories({
206371
+ scope: "private",
206372
+ category: categories,
206373
+ min_importance: minImportance,
206374
+ status: "active",
206375
+ agent_id: options2.agent_id,
206376
+ limit: 100
206377
+ }, db);
206378
+ allMemories.push(...privateMems);
206379
+ }
206380
+ const seen = new Set;
206381
+ const unique = allMemories.filter((m5) => {
206382
+ if (seen.has(m5.id))
206383
+ return false;
206384
+ seen.add(m5.id);
206385
+ return true;
206386
+ });
206387
+ if (unique.length === 0) {
206388
+ return "";
206389
+ }
206390
+ const totalCharBudget = maxTokens * 4;
206391
+ const footer = "Tip: Use memory_search for deeper lookup on specific topics.";
206392
+ const footerChars = footer.length;
206393
+ const keyBudget = Math.floor((totalCharBudget - footerChars) * 0.67);
206394
+ const recentBudget = Math.floor((totalCharBudget - footerChars) * 0.33);
206395
+ const keyRanked = [...unique].sort((a5, b5) => {
206396
+ if (a5.pinned !== b5.pinned)
206397
+ return a5.pinned ? -1 : 1;
206398
+ if (b5.importance !== a5.importance)
206399
+ return b5.importance - a5.importance;
206400
+ return new Date(b5.updated_at).getTime() - new Date(a5.updated_at).getTime();
206401
+ });
206402
+ const keyLines = [];
206403
+ const keyIds = new Set;
206404
+ let keyChars = 0;
206405
+ for (const m5 of keyRanked) {
206406
+ if (this.injectedIds.has(m5.id))
206407
+ continue;
206408
+ const line = `- [${m5.scope}/${m5.category}] ${m5.key}: ${m5.value}`;
206409
+ if (keyChars + line.length > keyBudget)
206410
+ break;
206411
+ keyLines.push(line);
206412
+ keyIds.add(m5.id);
206413
+ keyChars += line.length;
206414
+ }
206415
+ const recentRanked = [...unique].sort((a5, b5) => {
206416
+ const aTime = a5.accessed_at ? new Date(a5.accessed_at).getTime() : 0;
206417
+ const bTime = b5.accessed_at ? new Date(b5.accessed_at).getTime() : 0;
206418
+ return bTime - aTime;
206419
+ });
206420
+ const recentLines = [];
206421
+ let recentChars = 0;
206422
+ const maxRecent = 5;
206423
+ for (const m5 of recentRanked) {
206424
+ if (recentLines.length >= maxRecent)
206425
+ break;
206426
+ if (keyIds.has(m5.id))
206427
+ continue;
206428
+ if (this.injectedIds.has(m5.id))
206429
+ continue;
206430
+ const line = `- [${m5.scope}/${m5.category}] ${m5.key}: ${m5.value}`;
206431
+ if (recentChars + line.length > recentBudget)
206432
+ break;
206433
+ recentLines.push(line);
206434
+ recentChars += line.length;
206435
+ }
206436
+ if (keyLines.length === 0 && recentLines.length === 0) {
206437
+ return "";
206438
+ }
206439
+ const allInjectedMemoryIds = [
206440
+ ...keyIds,
206441
+ ...recentLines.map((_, i6) => {
206442
+ let idx = 0;
206443
+ for (const m5 of recentRanked) {
206444
+ if (keyIds.has(m5.id) || this.injectedIds.has(m5.id))
206445
+ continue;
206446
+ if (idx === i6)
206447
+ return m5.id;
206448
+ idx++;
206449
+ }
206450
+ return "";
206451
+ })
206452
+ ].filter(Boolean);
206453
+ for (const id of allInjectedMemoryIds) {
206454
+ this.injectedIds.add(id);
206455
+ touchMemory(id, db);
206456
+ }
206457
+ const sections = [];
206458
+ if (keyLines.length > 0) {
206459
+ sections.push(`## Key Memories
206460
+ ${keyLines.join(`
206461
+ `)}`);
206462
+ }
206463
+ if (recentLines.length > 0) {
206464
+ sections.push(`## Recent Context
206465
+ ${recentLines.join(`
206466
+ `)}`);
206467
+ }
206468
+ sections.push(footer);
206469
+ return `<agent-memories>
206470
+ ${sections.join(`
206471
+
206472
+ `)}
206473
+ </agent-memories>`;
206474
+ }
206475
+ resetDedup() {
206476
+ this.injectedIds.clear();
206477
+ }
206478
+ getInjectedCount() {
206479
+ return this.injectedIds.size;
206480
+ }
206481
+ }
206482
+ var MIGRATIONS2, _db2 = null, REDACTED = "[REDACTED]", SECRET_PATTERNS, DEFAULT_CONFIG2, VALID_SCOPES2, VALID_CATEGORIES2;
206483
+ var init_dist5 = __esm(() => {
206484
+ MIGRATIONS2 = [
206485
+ `
206486
+ CREATE TABLE IF NOT EXISTS projects (
206487
+ id TEXT PRIMARY KEY,
206488
+ name TEXT NOT NULL,
206489
+ path TEXT UNIQUE NOT NULL,
206490
+ description TEXT,
206491
+ memory_prefix TEXT,
206492
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
206493
+ updated_at TEXT NOT NULL DEFAULT (datetime('now'))
206494
+ );
206495
+
206496
+ CREATE TABLE IF NOT EXISTS agents (
206497
+ id TEXT PRIMARY KEY,
206498
+ name TEXT NOT NULL UNIQUE,
206499
+ description TEXT,
206500
+ role TEXT DEFAULT 'agent',
206501
+ metadata TEXT DEFAULT '{}',
206502
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
206503
+ last_seen_at TEXT NOT NULL DEFAULT (datetime('now'))
206504
+ );
206505
+
206506
+ CREATE TABLE IF NOT EXISTS memories (
206507
+ id TEXT PRIMARY KEY,
206508
+ key TEXT NOT NULL,
206509
+ value TEXT NOT NULL,
206510
+ category TEXT NOT NULL DEFAULT 'knowledge' CHECK(category IN ('preference', 'fact', 'knowledge', 'history')),
206511
+ scope TEXT NOT NULL DEFAULT 'private' CHECK(scope IN ('global', 'shared', 'private')),
206512
+ summary TEXT,
206513
+ tags TEXT DEFAULT '[]',
206514
+ importance INTEGER NOT NULL DEFAULT 5 CHECK(importance >= 1 AND importance <= 10),
206515
+ source TEXT NOT NULL DEFAULT 'agent' CHECK(source IN ('user', 'agent', 'system', 'auto', 'imported')),
206516
+ status TEXT NOT NULL DEFAULT 'active' CHECK(status IN ('active', 'archived', 'expired')),
206517
+ pinned INTEGER NOT NULL DEFAULT 0,
206518
+ agent_id TEXT REFERENCES agents(id) ON DELETE SET NULL,
206519
+ project_id TEXT REFERENCES projects(id) ON DELETE SET NULL,
206520
+ session_id TEXT,
206521
+ metadata TEXT DEFAULT '{}',
206522
+ access_count INTEGER NOT NULL DEFAULT 0,
206523
+ version INTEGER NOT NULL DEFAULT 1,
206524
+ expires_at TEXT,
206525
+ created_at TEXT NOT NULL DEFAULT (datetime('now')),
206526
+ updated_at TEXT NOT NULL DEFAULT (datetime('now')),
206527
+ accessed_at TEXT
206528
+ );
206529
+
206530
+ CREATE TABLE IF NOT EXISTS memory_tags (
206531
+ memory_id TEXT NOT NULL REFERENCES memories(id) ON DELETE CASCADE,
206532
+ tag TEXT NOT NULL,
206533
+ PRIMARY KEY (memory_id, tag)
206534
+ );
206535
+
206536
+ CREATE TABLE IF NOT EXISTS sessions (
206537
+ id TEXT PRIMARY KEY,
206538
+ agent_id TEXT REFERENCES agents(id) ON DELETE SET NULL,
206539
+ project_id TEXT REFERENCES projects(id) ON DELETE SET NULL,
206540
+ started_at TEXT NOT NULL DEFAULT (datetime('now')),
206541
+ last_activity TEXT NOT NULL DEFAULT (datetime('now')),
206542
+ metadata TEXT DEFAULT '{}'
206543
+ );
206544
+
206545
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_memories_unique_key
206546
+ ON memories(key, scope, COALESCE(agent_id, ''), COALESCE(project_id, ''), COALESCE(session_id, ''));
206547
+
206548
+ CREATE INDEX IF NOT EXISTS idx_memories_key ON memories(key);
206549
+ CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope);
206550
+ CREATE INDEX IF NOT EXISTS idx_memories_category ON memories(category);
206551
+ CREATE INDEX IF NOT EXISTS idx_memories_status ON memories(status);
206552
+ CREATE INDEX IF NOT EXISTS idx_memories_importance ON memories(importance);
206553
+ CREATE INDEX IF NOT EXISTS idx_memories_agent ON memories(agent_id);
206554
+ CREATE INDEX IF NOT EXISTS idx_memories_project ON memories(project_id);
206555
+ CREATE INDEX IF NOT EXISTS idx_memories_session ON memories(session_id);
206556
+ CREATE INDEX IF NOT EXISTS idx_memories_pinned ON memories(pinned);
206557
+ CREATE INDEX IF NOT EXISTS idx_memories_expires ON memories(expires_at);
206558
+ CREATE INDEX IF NOT EXISTS idx_memories_created ON memories(created_at);
206559
+ CREATE INDEX IF NOT EXISTS idx_memory_tags_tag ON memory_tags(tag);
206560
+ CREATE INDEX IF NOT EXISTS idx_memory_tags_memory ON memory_tags(memory_id);
206561
+ CREATE INDEX IF NOT EXISTS idx_agents_name ON agents(name);
206562
+ CREATE INDEX IF NOT EXISTS idx_sessions_agent ON sessions(agent_id);
206563
+ CREATE INDEX IF NOT EXISTS idx_sessions_project ON sessions(project_id);
206564
+
206565
+ CREATE TABLE IF NOT EXISTS _migrations (
206566
+ id INTEGER PRIMARY KEY,
206567
+ applied_at TEXT NOT NULL DEFAULT (datetime('now'))
206568
+ );
206569
+
206570
+ INSERT OR IGNORE INTO _migrations (id) VALUES (1);
206571
+ `
206572
+ ];
206573
+ SECRET_PATTERNS = [
206574
+ { name: "openai_key", pattern: /sk-[a-zA-Z0-9_-]{20,}/g },
206575
+ { name: "anthropic_key", pattern: /sk-ant-[a-zA-Z0-9_-]{20,}/g },
206576
+ { name: "generic_key", pattern: /(?:pk|tok|key|token|api[_-]?key)[_-][a-zA-Z0-9_-]{16,}/gi },
206577
+ { name: "aws_key", pattern: /AKIA[A-Z0-9]{16}/g },
206578
+ { name: "aws_secret", pattern: /(?<=AWS_SECRET_ACCESS_KEY\s*=\s*)[A-Za-z0-9/+=]{40}/g },
206579
+ { name: "github_token", pattern: /gh[ps]_[a-zA-Z0-9]{36,}/g },
206580
+ { name: "github_oauth", pattern: /gho_[a-zA-Z0-9]{36,}/g },
206581
+ { name: "npm_token", pattern: /npm_[a-zA-Z0-9]{36,}/g },
206582
+ { name: "bearer", pattern: /Bearer\s+[a-zA-Z0-9_\-.]{20,}/g },
206583
+ { name: "conn_string", pattern: /(?:postgres|postgresql|mysql|mongodb|redis|amqp|mqtt):\/\/[^\s"'`]+@[^\s"'`]+/gi },
206584
+ { name: "env_secret", pattern: /(?:SECRET|TOKEN|PASSWORD|PASSPHRASE|API_KEY|PRIVATE_KEY|AUTH|CREDENTIAL)[_A-Z]*\s*=\s*["']?[^\s"'\n]{8,}["']?/gi },
206585
+ { name: "stripe_key", pattern: /(?:sk|pk|rk)_(?:test|live)_[a-zA-Z0-9]{20,}/g },
206586
+ { name: "slack_token", pattern: /xox[bpras]-[a-zA-Z0-9-]{20,}/g },
206587
+ { name: "jwt", pattern: /eyJ[a-zA-Z0-9_-]{10,}\.eyJ[a-zA-Z0-9_-]{10,}\.[a-zA-Z0-9_-]{10,}/g },
206588
+ { name: "hex_secret", pattern: /(?<=(?:key|token|secret|password|hash)\s*[:=]\s*["']?)[0-9a-f]{32,}(?=["']?)/gi }
206589
+ ];
206590
+ DEFAULT_CONFIG2 = {
206591
+ default_scope: "private",
206592
+ default_category: "knowledge",
206593
+ default_importance: 5,
206594
+ max_entries: 1000,
206595
+ max_entries_per_scope: {
206596
+ global: 500,
206597
+ shared: 300,
206598
+ private: 200
206599
+ },
206600
+ injection: {
206601
+ max_tokens: 500,
206602
+ min_importance: 5,
206603
+ categories: ["preference", "fact"],
206604
+ refresh_interval: 5
206605
+ },
206606
+ sync_agents: ["claude", "codex", "gemini"],
206607
+ auto_cleanup: {
206608
+ enabled: true,
206609
+ expired_check_interval: 3600,
206610
+ unused_archive_days: 7,
206611
+ stale_deprioritize_days: 14
206612
+ }
206613
+ };
206614
+ VALID_SCOPES2 = ["global", "shared", "private"];
206615
+ VALID_CATEGORIES2 = [
206616
+ "preference",
206617
+ "fact",
206618
+ "knowledge",
206619
+ "history"
206620
+ ];
206621
+ });
206622
+
206623
+ // packages/core/src/memory/mementos-adapter.ts
206007
206624
  class MemoryStore {
206008
- db;
206009
- assistantId;
206010
- constructor(db, assistantId) {
206011
- this.db = db || getDatabase();
206012
- this.assistantId = assistantId || null;
206625
+ agentId;
206626
+ projectId;
206627
+ scope;
206628
+ constructor(_db3, assistantId, options2) {
206629
+ this.agentId = assistantId || null;
206630
+ this.projectId = options2?.projectId || null;
206631
+ this.scope = options2?.scope || "shared";
206632
+ getDatabase3();
206013
206633
  }
206014
206634
  set(key, value2, ttlMs) {
206015
- const now3 = Date.now();
206016
- const ttl = typeof ttlMs === "number" && ttlMs > 0 ? ttlMs : undefined;
206017
- const expiresAt = ttl ? now3 + ttl : null;
206018
- const valueStr = JSON.stringify(value2) ?? "null";
206019
- this.db.transaction(() => {
206020
- this.db.prepare(`DELETE FROM memory WHERE key = ? AND (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).run(key, this.assistantId, this.assistantId);
206021
- this.db.prepare(`INSERT INTO memory (key, assistant_id, value, created_at, updated_at, expires_at)
206022
- VALUES (?, ?, ?, ?, ?, ?)`).run(key, this.assistantId, valueStr, now3, now3, expiresAt);
206023
- });
206635
+ const input = {
206636
+ key,
206637
+ value: typeof value2 === "string" ? value2 : JSON.stringify(value2),
206638
+ scope: this.scope,
206639
+ category: "knowledge",
206640
+ source: "agent",
206641
+ ...this.agentId ? { agent_id: this.agentId } : {},
206642
+ ...this.projectId ? { project_id: this.projectId } : {}
206643
+ };
206644
+ if (typeof ttlMs === "number" && ttlMs > 0) {
206645
+ input.ttl_ms = ttlMs;
206646
+ }
206647
+ createMemory(input, "merge");
206024
206648
  }
206025
206649
  get(key) {
206026
- const row = this.db.query(`SELECT value, expires_at FROM memory WHERE key = ? AND (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).get(key, this.assistantId, this.assistantId);
206027
- if (!row)
206650
+ const memory = getMemoryByKey(key, this.scope, this.agentId || undefined, this.projectId || undefined);
206651
+ if (!memory)
206028
206652
  return null;
206029
- if (row.expires_at && row.expires_at < Date.now()) {
206030
- this.delete(key);
206653
+ if (memory.expires_at && new Date(memory.expires_at) < new Date) {
206654
+ deleteMemory(memory.id);
206031
206655
  return null;
206032
206656
  }
206033
206657
  try {
206034
- return JSON.parse(row.value);
206658
+ return JSON.parse(memory.value);
206035
206659
  } catch {
206036
- return null;
206660
+ return memory.value;
206037
206661
  }
206038
206662
  }
206039
206663
  delete(key) {
206040
- this.db.prepare(`DELETE FROM memory WHERE key = ? AND (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).run(key, this.assistantId, this.assistantId);
206664
+ const memory = getMemoryByKey(key, this.scope, this.agentId || undefined, this.projectId || undefined);
206665
+ if (memory) {
206666
+ deleteMemory(memory.id);
206667
+ }
206041
206668
  }
206042
206669
  has(key) {
206043
206670
  return this.get(key) !== null;
206044
206671
  }
206045
206672
  keys(pattern) {
206673
+ const filter = {
206674
+ scope: this.scope,
206675
+ ...this.agentId ? { agent_id: this.agentId } : {},
206676
+ ...this.projectId ? { project_id: this.projectId } : {}
206677
+ };
206678
+ if (pattern) {
206679
+ filter.search = pattern.replace(/\*/g, "");
206680
+ }
206681
+ const memories = listMemories(filter);
206046
206682
  if (pattern) {
206047
- const rows2 = this.db.query(`SELECT key FROM memory WHERE key LIKE ? AND (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).all(pattern.replace(/\*/g, "%"), this.assistantId, this.assistantId);
206048
- return rows2.map((r5) => r5.key);
206683
+ const regex = new RegExp("^" + pattern.replace(/\*/g, ".*").replace(/\?/g, ".") + "$");
206684
+ return memories.filter((m5) => regex.test(m5.key)).map((m5) => m5.key);
206049
206685
  }
206050
- const rows = this.db.query(`SELECT key FROM memory WHERE (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).all(this.assistantId, this.assistantId);
206051
- return rows.map((r5) => r5.key);
206686
+ return memories.map((m5) => m5.key);
206052
206687
  }
206053
206688
  clearExpired() {
206054
- const result = this.db.prepare(`DELETE FROM memory WHERE expires_at IS NOT NULL AND expires_at < ? AND (assistant_id = ? OR (assistant_id IS NULL AND ? IS NULL))`).run(Date.now(), this.assistantId, this.assistantId);
206055
- return result.changes;
206689
+ return cleanExpiredMemories();
206056
206690
  }
206057
206691
  close() {}
206058
206692
  }
206059
- var init_store13 = __esm(async () => {
206060
- await init_database();
206693
+ var init_mementos_adapter = __esm(() => {
206694
+ init_dist5();
206061
206695
  });
206062
206696
 
206063
206697
  // packages/core/src/memory/global-memory.ts
@@ -206134,7 +206768,7 @@ class GlobalMemoryManager {
206134
206768
  if (options2.summary && options2.summary.length > MAX_SUMMARY_LENGTH2) {
206135
206769
  throw new Error(`Memory summary exceeds maximum length of ${MAX_SUMMARY_LENGTH2} characters`);
206136
206770
  }
206137
- const now3 = new Date().toISOString();
206771
+ const now4 = new Date().toISOString();
206138
206772
  const scope = options2.scope || this.defaultScope;
206139
206773
  if (!this.isScopeEnabled(scope)) {
206140
206774
  throw new Error(`Memory scope '${scope}' is disabled in configuration`);
@@ -206186,8 +206820,8 @@ class GlobalMemoryManager {
206186
206820
  importance: options2.importance ?? 5,
206187
206821
  tags: options2.tags || [],
206188
206822
  source: options2.source || "assistant",
206189
- createdAt: now3,
206190
- updatedAt: now3,
206823
+ createdAt: now4,
206824
+ updatedAt: now4,
206191
206825
  accessCount: 0,
206192
206826
  expiresAt
206193
206827
  };
@@ -206227,11 +206861,11 @@ class GlobalMemoryManager {
206227
206861
  if (!existing) {
206228
206862
  throw new Error(`Memory not found: ${id}`);
206229
206863
  }
206230
- const now3 = new Date().toISOString();
206864
+ const now4 = new Date().toISOString();
206231
206865
  const updated = {
206232
206866
  ...existing,
206233
206867
  ...updates,
206234
- updatedAt: now3
206868
+ updatedAt: now4
206235
206869
  };
206236
206870
  this.db.prepare(`
206237
206871
  UPDATE memories SET
@@ -206610,10 +207244,10 @@ class GlobalMemoryManager {
206610
207244
  }
206611
207245
  }
206612
207246
  recordAccess(id) {
206613
- const now3 = new Date().toISOString();
207247
+ const now4 = new Date().toISOString();
206614
207248
  this.db.prepare(`
206615
207249
  UPDATE memories SET accessed_at = ?, access_count = access_count + 1 WHERE id = ?
206616
- `).run(now3, id);
207250
+ `).run(now4, id);
206617
207251
  }
206618
207252
  logAccess(memoryId, action) {
206619
207253
  this.db.prepare(`
@@ -206633,7 +207267,7 @@ var init_global_memory = __esm(async () => {
206633
207267
  });
206634
207268
 
206635
207269
  // packages/core/src/memory/injector.ts
206636
- class MemoryInjector {
207270
+ class MemoryInjector2 {
206637
207271
  memoryManager;
206638
207272
  config;
206639
207273
  lastInjectedIds = new Set;
@@ -206826,11 +207460,9 @@ var init_injector = __esm(() => {
206826
207460
 
206827
207461
  // packages/core/src/memory/index.ts
206828
207462
  var init_memory3 = __esm(async () => {
207463
+ init_mementos_adapter();
206829
207464
  init_injector();
206830
- await __promiseAll([
206831
- init_store13(),
206832
- init_global_memory()
206833
- ]);
207465
+ await init_global_memory();
206834
207466
  init_types11();
206835
207467
  });
206836
207468
 
@@ -207086,11 +207718,11 @@ ${hookResult.additionalContext}` : hookResult.additionalContext
207086
207718
  return Array.from(this.asyncJobs.values());
207087
207719
  }
207088
207720
  cleanupJobs(maxAgeMs = 3600000) {
207089
- const now3 = Date.now();
207721
+ const now4 = Date.now();
207090
207722
  let cleaned = 0;
207091
207723
  for (const [id, job] of this.asyncJobs) {
207092
207724
  if (job.status !== "running" && job.completedAt) {
207093
- if (now3 - job.completedAt > maxAgeMs) {
207725
+ if (now4 - job.completedAt > maxAgeMs) {
207094
207726
  this.asyncJobs.delete(id);
207095
207727
  cleaned++;
207096
207728
  }
@@ -207159,12 +207791,12 @@ ${hookResult.additionalContext}` : hookResult.additionalContext
207159
207791
  return resultWithId;
207160
207792
  }
207161
207793
  createTimeout(ms, runner, subassistantId) {
207162
- return new Promise((resolve10) => {
207794
+ return new Promise((resolve11) => {
207163
207795
  const timerId = setTimeout(() => {
207164
207796
  this.activeTimeouts.delete(subassistantId);
207165
207797
  this.activeRunners.delete(subassistantId);
207166
207798
  runner.stop();
207167
- resolve10({
207799
+ resolve11({
207168
207800
  success: false,
207169
207801
  error: `Subassistant timed out after ${Math.round(ms / 1000)} seconds`,
207170
207802
  turns: 0,
@@ -207183,7 +207815,7 @@ ${hookResult.additionalContext}` : hookResult.additionalContext
207183
207815
  }
207184
207816
  }
207185
207817
  sleep(ms) {
207186
- return new Promise((resolve10) => setTimeout(resolve10, ms));
207818
+ return new Promise((resolve11) => setTimeout(resolve11, ms));
207187
207819
  }
207188
207820
  }
207189
207821
  var DEFAULT_MAX_DEPTH = 3, DEFAULT_MAX_CONCURRENT = 5, DEFAULT_MAX_TURNS = 10, MAX_ALLOWED_TURNS = 25, DEFAULT_TIMEOUT_MS3 = 120000, DEFAULT_SUBASSISTANT_TOOLS, FORBIDDEN_SUBASSISTANT_TOOLS;
@@ -208004,12 +208636,12 @@ __export(exports_dist2, {
208004
208636
  CATEGORIES: () => CATEGORIES,
208005
208637
  AGENT_TARGETS: () => AGENT_TARGETS
208006
208638
  });
208007
- import { existsSync as existsSync27, cpSync, mkdirSync as mkdirSync14, writeFileSync as writeFileSync10, rmSync as rmSync3, readdirSync as readdirSync12, statSync as statSync7, readFileSync as readFileSync13 } from "fs";
208008
- import { join as join40, dirname as dirname15 } from "path";
208009
- import { homedir as homedir23 } from "os";
208639
+ import { existsSync as existsSync29, cpSync, mkdirSync as mkdirSync15, writeFileSync as writeFileSync10, rmSync as rmSync3, readdirSync as readdirSync12, statSync as statSync7, readFileSync as readFileSync14 } from "fs";
208640
+ import { join as join41, dirname as dirname16 } from "path";
208641
+ import { homedir as homedir24 } from "os";
208010
208642
  import { fileURLToPath as fileURLToPath6 } from "url";
208011
- import { existsSync as existsSync28, readFileSync as readFileSync22, readdirSync as readdirSync22 } from "fs";
208012
- import { join as join212 } from "path";
208643
+ import { existsSync as existsSync210, readFileSync as readFileSync22, readdirSync as readdirSync22 } from "fs";
208644
+ import { join as join213 } from "path";
208013
208645
  function getSkillsByCategory(category) {
208014
208646
  return SKILLS.filter((s5) => s5.category === category);
208015
208647
  }
@@ -208114,35 +208746,35 @@ function normalizeSkillName(name) {
208114
208746
  function findSkillsDir() {
208115
208747
  let dir = __dirname2;
208116
208748
  for (let i6 = 0;i6 < 5; i6++) {
208117
- const candidate = join40(dir, "skills");
208118
- if (existsSync27(candidate)) {
208749
+ const candidate = join41(dir, "skills");
208750
+ if (existsSync29(candidate)) {
208119
208751
  return candidate;
208120
208752
  }
208121
- dir = dirname15(dir);
208753
+ dir = dirname16(dir);
208122
208754
  }
208123
- return join40(__dirname2, "..", "skills");
208755
+ return join41(__dirname2, "..", "skills");
208124
208756
  }
208125
208757
  function getSkillPath(name) {
208126
208758
  const skillName = normalizeSkillName(name);
208127
- return join40(SKILLS_DIR, skillName);
208759
+ return join41(SKILLS_DIR, skillName);
208128
208760
  }
208129
208761
  function skillExists(name) {
208130
- return existsSync27(getSkillPath(name));
208762
+ return existsSync29(getSkillPath(name));
208131
208763
  }
208132
208764
  function installSkill(name, options2 = {}) {
208133
208765
  const { targetDir = process.cwd(), overwrite = false } = options2;
208134
208766
  const skillName = normalizeSkillName(name);
208135
208767
  const sourcePath = getSkillPath(name);
208136
- const destDir = join40(targetDir, ".skills");
208137
- const destPath = join40(destDir, skillName);
208138
- if (!existsSync27(sourcePath)) {
208768
+ const destDir = join41(targetDir, ".skills");
208769
+ const destPath = join41(destDir, skillName);
208770
+ if (!existsSync29(sourcePath)) {
208139
208771
  return {
208140
208772
  skill: name,
208141
208773
  success: false,
208142
208774
  error: `Skill '${name}' not found`
208143
208775
  };
208144
208776
  }
208145
- if (existsSync27(destPath) && !overwrite) {
208777
+ if (existsSync29(destPath) && !overwrite) {
208146
208778
  return {
208147
208779
  skill: name,
208148
208780
  success: false,
@@ -208151,10 +208783,10 @@ function installSkill(name, options2 = {}) {
208151
208783
  };
208152
208784
  }
208153
208785
  try {
208154
- if (!existsSync27(destDir)) {
208155
- mkdirSync14(destDir, { recursive: true });
208786
+ if (!existsSync29(destDir)) {
208787
+ mkdirSync15(destDir, { recursive: true });
208156
208788
  }
208157
- if (existsSync27(destPath) && overwrite) {
208789
+ if (existsSync29(destPath) && overwrite) {
208158
208790
  rmSync3(destPath, { recursive: true, force: true });
208159
208791
  }
208160
208792
  cpSync(sourcePath, destPath, {
@@ -208192,7 +208824,7 @@ function installSkills(names, options2 = {}) {
208192
208824
  return names.map((name) => installSkill(name, options2));
208193
208825
  }
208194
208826
  function updateSkillsIndex(skillsDir) {
208195
- const indexPath = join40(skillsDir, "index.ts");
208827
+ const indexPath = join41(skillsDir, "index.ts");
208196
208828
  const skills = readdirSync12(skillsDir).filter((f5) => f5.startsWith("skill-") && !f5.includes("."));
208197
208829
  const exports = skills.map((s5) => {
208198
208830
  const name = s5.replace("skill-", "").replace(/-/g, "_");
@@ -208209,20 +208841,20 @@ ${exports}
208209
208841
  writeFileSync10(indexPath, content3);
208210
208842
  }
208211
208843
  function getInstalledSkills(targetDir = process.cwd()) {
208212
- const skillsDir = join40(targetDir, ".skills");
208213
- if (!existsSync27(skillsDir)) {
208844
+ const skillsDir = join41(targetDir, ".skills");
208845
+ if (!existsSync29(skillsDir)) {
208214
208846
  return [];
208215
208847
  }
208216
208848
  return readdirSync12(skillsDir).filter((f5) => {
208217
- const fullPath = join40(skillsDir, f5);
208849
+ const fullPath = join41(skillsDir, f5);
208218
208850
  return f5.startsWith("skill-") && statSync7(fullPath).isDirectory();
208219
208851
  }).map((f5) => f5.replace("skill-", ""));
208220
208852
  }
208221
208853
  function removeSkill(name, targetDir = process.cwd()) {
208222
208854
  const skillName = normalizeSkillName(name);
208223
- const skillsDir = join40(targetDir, ".skills");
208224
- const skillPath = join40(skillsDir, skillName);
208225
- if (!existsSync27(skillPath)) {
208855
+ const skillsDir = join41(targetDir, ".skills");
208856
+ const skillPath = join41(skillsDir, skillName);
208857
+ if (!existsSync29(skillPath)) {
208226
208858
  return false;
208227
208859
  }
208228
208860
  rmSync3(skillPath, { recursive: true, force: true });
@@ -208232,25 +208864,25 @@ function removeSkill(name, targetDir = process.cwd()) {
208232
208864
  function getAgentSkillsDir(agent, scope = "global", projectDir) {
208233
208865
  const agentDir = `.${agent}`;
208234
208866
  if (scope === "project") {
208235
- return join40(projectDir || process.cwd(), agentDir, "skills");
208867
+ return join41(projectDir || process.cwd(), agentDir, "skills");
208236
208868
  }
208237
- return join40(homedir23(), agentDir, "skills");
208869
+ return join41(homedir24(), agentDir, "skills");
208238
208870
  }
208239
208871
  function getAgentSkillPath(name, agent, scope = "global", projectDir) {
208240
208872
  const skillName = normalizeSkillName(name);
208241
- return join40(getAgentSkillsDir(agent, scope, projectDir), skillName);
208873
+ return join41(getAgentSkillsDir(agent, scope, projectDir), skillName);
208242
208874
  }
208243
208875
  function installSkillForAgent(name, options2, generateSkillMd) {
208244
208876
  const { agent, scope = "global", projectDir } = options2;
208245
208877
  const skillName = normalizeSkillName(name);
208246
208878
  const sourcePath = getSkillPath(name);
208247
- if (!existsSync27(sourcePath)) {
208879
+ if (!existsSync29(sourcePath)) {
208248
208880
  return { skill: name, success: false, error: `Skill '${name}' not found` };
208249
208881
  }
208250
208882
  let skillMdContent = null;
208251
- const skillMdPath = join40(sourcePath, "SKILL.md");
208252
- if (existsSync27(skillMdPath)) {
208253
- skillMdContent = readFileSync13(skillMdPath, "utf-8");
208883
+ const skillMdPath = join41(sourcePath, "SKILL.md");
208884
+ if (existsSync29(skillMdPath)) {
208885
+ skillMdContent = readFileSync14(skillMdPath, "utf-8");
208254
208886
  } else if (generateSkillMd) {
208255
208887
  skillMdContent = generateSkillMd(name);
208256
208888
  }
@@ -208259,8 +208891,8 @@ function installSkillForAgent(name, options2, generateSkillMd) {
208259
208891
  }
208260
208892
  const destDir = getAgentSkillPath(name, agent, scope, projectDir);
208261
208893
  try {
208262
- mkdirSync14(destDir, { recursive: true });
208263
- writeFileSync10(join40(destDir, "SKILL.md"), skillMdContent);
208894
+ mkdirSync15(destDir, { recursive: true });
208895
+ writeFileSync10(join41(destDir, "SKILL.md"), skillMdContent);
208264
208896
  return { skill: name, success: true, path: destDir };
208265
208897
  } catch (error4) {
208266
208898
  return {
@@ -208273,7 +208905,7 @@ function installSkillForAgent(name, options2, generateSkillMd) {
208273
208905
  function removeSkillForAgent(name, options2) {
208274
208906
  const { agent, scope = "global", projectDir } = options2;
208275
208907
  const destDir = getAgentSkillPath(name, agent, scope, projectDir);
208276
- if (!existsSync27(destDir)) {
208908
+ if (!existsSync29(destDir)) {
208277
208909
  return false;
208278
208910
  }
208279
208911
  rmSync3(destDir, { recursive: true, force: true });
@@ -208281,12 +208913,12 @@ function removeSkillForAgent(name, options2) {
208281
208913
  }
208282
208914
  function getSkillDocs(name) {
208283
208915
  const skillPath = getSkillPath(name);
208284
- if (!existsSync28(skillPath))
208916
+ if (!existsSync210(skillPath))
208285
208917
  return null;
208286
208918
  return {
208287
- skillMd: readIfExists(join212(skillPath, "SKILL.md")),
208288
- readme: readIfExists(join212(skillPath, "README.md")),
208289
- claudeMd: readIfExists(join212(skillPath, "CLAUDE.md"))
208919
+ skillMd: readIfExists(join213(skillPath, "SKILL.md")),
208920
+ readme: readIfExists(join213(skillPath, "README.md")),
208921
+ claudeMd: readIfExists(join213(skillPath, "CLAUDE.md"))
208290
208922
  };
208291
208923
  }
208292
208924
  function getSkillBestDoc(name) {
@@ -208297,11 +208929,11 @@ function getSkillBestDoc(name) {
208297
208929
  }
208298
208930
  function getSkillRequirements(name) {
208299
208931
  const skillPath = getSkillPath(name);
208300
- if (!existsSync28(skillPath))
208932
+ if (!existsSync210(skillPath))
208301
208933
  return null;
208302
208934
  const texts = [];
208303
208935
  for (const file of ["SKILL.md", "README.md", "CLAUDE.md", ".env.example", ".env.local.example"]) {
208304
- const content3 = readIfExists(join212(skillPath, file));
208936
+ const content3 = readIfExists(join213(skillPath, file));
208305
208937
  if (content3)
208306
208938
  texts.push(content3);
208307
208939
  }
@@ -208328,8 +208960,8 @@ function getSkillRequirements(name) {
208328
208960
  }
208329
208961
  let cliCommand = null;
208330
208962
  let dependencies = {};
208331
- const pkgPath = join212(skillPath, "package.json");
208332
- if (existsSync28(pkgPath)) {
208963
+ const pkgPath = join213(skillPath, "package.json");
208964
+ if (existsSync210(pkgPath)) {
208333
208965
  try {
208334
208966
  const pkg = JSON.parse(readFileSync22(pkgPath, "utf-8"));
208335
208967
  if (pkg.bin) {
@@ -208351,20 +208983,20 @@ async function runSkill(name, args, options2 = {}) {
208351
208983
  const skillName = normalizeSkillName(name);
208352
208984
  let skillPath;
208353
208985
  if (options2.installed) {
208354
- skillPath = join212(process.cwd(), ".skills", skillName);
208986
+ skillPath = join213(process.cwd(), ".skills", skillName);
208355
208987
  } else {
208356
- const installedPath = join212(process.cwd(), ".skills", skillName);
208357
- if (existsSync28(installedPath)) {
208988
+ const installedPath = join213(process.cwd(), ".skills", skillName);
208989
+ if (existsSync210(installedPath)) {
208358
208990
  skillPath = installedPath;
208359
208991
  } else {
208360
208992
  skillPath = getSkillPath(name);
208361
208993
  }
208362
208994
  }
208363
- if (!existsSync28(skillPath)) {
208995
+ if (!existsSync210(skillPath)) {
208364
208996
  return { exitCode: 1, error: `Skill '${name}' not found` };
208365
208997
  }
208366
- const pkgPath = join212(skillPath, "package.json");
208367
- if (!existsSync28(pkgPath)) {
208998
+ const pkgPath = join213(skillPath, "package.json");
208999
+ if (!existsSync210(pkgPath)) {
208368
209000
  return { exitCode: 1, error: `No package.json in skill '${name}'` };
208369
209001
  }
208370
209002
  let entryPoint;
@@ -208383,12 +209015,12 @@ async function runSkill(name, args, options2 = {}) {
208383
209015
  } catch {
208384
209016
  return { exitCode: 1, error: `Failed to parse package.json for skill '${name}'` };
208385
209017
  }
208386
- const entryPath = join212(skillPath, entryPoint);
208387
- if (!existsSync28(entryPath)) {
209018
+ const entryPath = join213(skillPath, entryPoint);
209019
+ if (!existsSync210(entryPath)) {
208388
209020
  return { exitCode: 1, error: `Entry point '${entryPoint}' not found in skill '${name}'` };
208389
209021
  }
208390
- const nodeModules = join212(skillPath, "node_modules");
208391
- if (!existsSync28(nodeModules)) {
209022
+ const nodeModules = join213(skillPath, "node_modules");
209023
+ if (!existsSync210(nodeModules)) {
208392
209024
  const install2 = Bun.spawn(["bun", "install", "--no-save"], {
208393
209025
  cwd: skillPath,
208394
209026
  stdout: "pipe",
@@ -208406,17 +209038,17 @@ async function runSkill(name, args, options2 = {}) {
208406
209038
  return { exitCode };
208407
209039
  }
208408
209040
  function generateEnvExample(targetDir = process.cwd()) {
208409
- const skillsDir = join212(targetDir, ".skills");
208410
- if (!existsSync28(skillsDir))
209041
+ const skillsDir = join213(targetDir, ".skills");
209042
+ if (!existsSync210(skillsDir))
208411
209043
  return "";
208412
- const dirs = readdirSync22(skillsDir).filter((f5) => f5.startsWith("skill-") && existsSync28(join212(skillsDir, f5, "package.json")));
209044
+ const dirs = readdirSync22(skillsDir).filter((f5) => f5.startsWith("skill-") && existsSync210(join213(skillsDir, f5, "package.json")));
208413
209045
  const envMap = new Map;
208414
209046
  for (const dir of dirs) {
208415
209047
  const skillName = dir.replace("skill-", "");
208416
- const skillPath = join212(skillsDir, dir);
209048
+ const skillPath = join213(skillsDir, dir);
208417
209049
  const texts = [];
208418
209050
  for (const file of ["SKILL.md", "README.md", "CLAUDE.md", ".env.example"]) {
208419
- const content3 = readIfExists(join212(skillPath, file));
209051
+ const content3 = readIfExists(join213(skillPath, file));
208420
209052
  if (content3)
208421
209053
  texts.push(content3);
208422
209054
  }
@@ -208461,7 +209093,7 @@ function generateSkillMd(name) {
208461
209093
  if (!meta)
208462
209094
  return null;
208463
209095
  const skillPath = getSkillPath(name);
208464
- if (!existsSync28(skillPath))
209096
+ if (!existsSync210(skillPath))
208465
209097
  return null;
208466
209098
  const frontmatter2 = [
208467
209099
  "---",
@@ -208470,11 +209102,11 @@ function generateSkillMd(name) {
208470
209102
  "---"
208471
209103
  ].join(`
208472
209104
  `);
208473
- const readme = readIfExists(join212(skillPath, "README.md"));
208474
- const claudeMd = readIfExists(join212(skillPath, "CLAUDE.md"));
209105
+ const readme = readIfExists(join213(skillPath, "README.md"));
209106
+ const claudeMd = readIfExists(join213(skillPath, "CLAUDE.md"));
208475
209107
  let cliCommand = null;
208476
- const pkgPath = join212(skillPath, "package.json");
208477
- if (existsSync28(pkgPath)) {
209108
+ const pkgPath = join213(skillPath, "package.json");
209109
+ if (existsSync210(pkgPath)) {
208478
209110
  try {
208479
209111
  const pkg = JSON.parse(readFileSync22(pkgPath, "utf-8"));
208480
209112
  if (pkg.bin) {
@@ -208549,14 +209181,14 @@ function extractEnvVars(text5) {
208549
209181
  }
208550
209182
  function readIfExists(path5) {
208551
209183
  try {
208552
- if (existsSync28(path5)) {
209184
+ if (existsSync210(path5)) {
208553
209185
  return readFileSync22(path5, "utf-8");
208554
209186
  }
208555
209187
  } catch {}
208556
209188
  return null;
208557
209189
  }
208558
209190
  var CATEGORIES, SKILLS, __dirname2, SKILLS_DIR, AGENT_TARGETS, ENV_VAR_PATTERN, GENERIC_ENV_PATTERN;
208559
- var init_dist5 = __esm(() => {
209191
+ var init_dist6 = __esm(() => {
208560
209192
  CATEGORIES = [
208561
209193
  "Development Tools",
208562
209194
  "Business & Marketing",
@@ -209993,7 +210625,7 @@ var init_dist5 = __esm(() => {
209993
210625
  tags: ["seating", "chart", "events", "venues"]
209994
210626
  }
209995
210627
  ];
209996
- __dirname2 = dirname15(fileURLToPath6(import.meta.url));
210628
+ __dirname2 = dirname16(fileURLToPath6(import.meta.url));
209997
210629
  SKILLS_DIR = findSkillsDir();
209998
210630
  AGENT_TARGETS = ["claude", "codex", "gemini"];
209999
210631
  ENV_VAR_PATTERN = /\b([A-Z][A-Z0-9_]{2,}(?:_API_KEY|_KEY|_TOKEN|_SECRET|_URL|_ID|_PASSWORD|_ENDPOINT|_REGION|_BUCKET))\b/g;
@@ -210003,7 +210635,7 @@ var init_dist5 = __esm(() => {
210003
210635
  // packages/core/src/skills/registry-adapter.ts
210004
210636
  async function getSkillsLib() {
210005
210637
  if (!_skillsLib) {
210006
- _skillsLib = await Promise.resolve().then(() => (init_dist5(), exports_dist2));
210638
+ _skillsLib = await Promise.resolve().then(() => (init_dist6(), exports_dist2));
210007
210639
  }
210008
210640
  return _skillsLib;
210009
210641
  }
@@ -210165,11 +210797,11 @@ __export(exports_dist3, {
210165
210797
  CONNECTORS: () => CONNECTORS,
210166
210798
  CATEGORIES: () => CATEGORIES2
210167
210799
  });
210168
- import { existsSync as existsSync29, readFileSync as readFileSync14 } from "fs";
210169
- import { join as join41, dirname as dirname16 } from "path";
210800
+ import { existsSync as existsSync31, readFileSync as readFileSync15 } from "fs";
210801
+ import { join as join43, dirname as dirname17 } from "path";
210170
210802
  import { fileURLToPath as fileURLToPath7 } from "url";
210171
- import { existsSync as existsSync210, cpSync as cpSync2, mkdirSync as mkdirSync15, readFileSync as readFileSync23, writeFileSync as writeFileSync11, readdirSync as readdirSync13, statSync as statSync8, rmSync as rmSync4 } from "fs";
210172
- import { join as join213, dirname as dirname22 } from "path";
210803
+ import { existsSync as existsSync211, cpSync as cpSync2, mkdirSync as mkdirSync16, readFileSync as readFileSync23, writeFileSync as writeFileSync11, readdirSync as readdirSync13, statSync as statSync8, rmSync as rmSync4 } from "fs";
210804
+ import { join as join214, dirname as dirname23 } from "path";
210173
210805
  import { fileURLToPath as fileURLToPath22 } from "url";
210174
210806
  function getConnectorsByCategory(category) {
210175
210807
  return CONNECTORS.filter((c5) => c5.category === category);
@@ -210185,39 +210817,39 @@ function loadConnectorVersions() {
210185
210817
  if (versionsLoaded)
210186
210818
  return;
210187
210819
  versionsLoaded = true;
210188
- const thisDir = dirname16(fileURLToPath7(import.meta.url));
210820
+ const thisDir = dirname17(fileURLToPath7(import.meta.url));
210189
210821
  const candidates = [
210190
- join41(thisDir, "..", "connectors"),
210191
- join41(thisDir, "..", "..", "connectors")
210822
+ join43(thisDir, "..", "connectors"),
210823
+ join43(thisDir, "..", "..", "connectors")
210192
210824
  ];
210193
- const connectorsDir = candidates.find((d5) => existsSync29(d5));
210825
+ const connectorsDir = candidates.find((d5) => existsSync31(d5));
210194
210826
  if (!connectorsDir)
210195
210827
  return;
210196
210828
  for (const connector of CONNECTORS) {
210197
210829
  try {
210198
- const pkgPath = join41(connectorsDir, `connect-${connector.name}`, "package.json");
210199
- if (existsSync29(pkgPath)) {
210200
- const pkg = JSON.parse(readFileSync14(pkgPath, "utf-8"));
210830
+ const pkgPath = join43(connectorsDir, `connect-${connector.name}`, "package.json");
210831
+ if (existsSync31(pkgPath)) {
210832
+ const pkg = JSON.parse(readFileSync15(pkgPath, "utf-8"));
210201
210833
  connector.version = pkg.version || "0.0.0";
210202
210834
  }
210203
210835
  } catch {}
210204
210836
  }
210205
210837
  }
210206
210838
  function resolveConnectorsDir() {
210207
- const fromBin = join213(__dirname22, "..", "connectors");
210208
- if (existsSync210(fromBin))
210839
+ const fromBin = join214(__dirname22, "..", "connectors");
210840
+ if (existsSync211(fromBin))
210209
210841
  return fromBin;
210210
- const fromSrc = join213(__dirname22, "..", "..", "connectors");
210211
- if (existsSync210(fromSrc))
210842
+ const fromSrc = join214(__dirname22, "..", "..", "connectors");
210843
+ if (existsSync211(fromSrc))
210212
210844
  return fromSrc;
210213
210845
  return fromBin;
210214
210846
  }
210215
210847
  function getConnectorPath(name) {
210216
210848
  const connectorName = name.startsWith("connect-") ? name : `connect-${name}`;
210217
- return join213(CONNECTORS_DIR, connectorName);
210849
+ return join214(CONNECTORS_DIR, connectorName);
210218
210850
  }
210219
210851
  function connectorExists(name) {
210220
- return existsSync210(getConnectorPath(name));
210852
+ return existsSync211(getConnectorPath(name));
210221
210853
  }
210222
210854
  function installConnector(name, options2 = {}) {
210223
210855
  const { targetDir = process.cwd(), overwrite = false } = options2;
@@ -210230,16 +210862,16 @@ function installConnector(name, options2 = {}) {
210230
210862
  }
210231
210863
  const connectorName = name.startsWith("connect-") ? name : `connect-${name}`;
210232
210864
  const sourcePath = getConnectorPath(name);
210233
- const destDir = join213(targetDir, ".connectors");
210234
- const destPath = join213(destDir, connectorName);
210235
- if (!existsSync210(sourcePath)) {
210865
+ const destDir = join214(targetDir, ".connectors");
210866
+ const destPath = join214(destDir, connectorName);
210867
+ if (!existsSync211(sourcePath)) {
210236
210868
  return {
210237
210869
  connector: name,
210238
210870
  success: false,
210239
210871
  error: `Connector '${name}' not found`
210240
210872
  };
210241
210873
  }
210242
- if (existsSync210(destPath) && !overwrite) {
210874
+ if (existsSync211(destPath) && !overwrite) {
210243
210875
  return {
210244
210876
  connector: name,
210245
210877
  success: false,
@@ -210248,8 +210880,8 @@ function installConnector(name, options2 = {}) {
210248
210880
  };
210249
210881
  }
210250
210882
  try {
210251
- if (!existsSync210(destDir)) {
210252
- mkdirSync15(destDir, { recursive: true });
210883
+ if (!existsSync211(destDir)) {
210884
+ mkdirSync16(destDir, { recursive: true });
210253
210885
  }
210254
210886
  cpSync2(sourcePath, destPath, { recursive: true });
210255
210887
  updateConnectorsIndex(destDir);
@@ -210270,7 +210902,7 @@ function installConnectors(names, options2 = {}) {
210270
210902
  return names.map((name) => installConnector(name, options2));
210271
210903
  }
210272
210904
  function updateConnectorsIndex(connectorsDir) {
210273
- const indexPath = join213(connectorsDir, "index.ts");
210905
+ const indexPath = join214(connectorsDir, "index.ts");
210274
210906
  const connectors = readdirSync13(connectorsDir).filter((f5) => f5.startsWith("connect-") && !f5.includes("."));
210275
210907
  const exports = connectors.map((c5) => {
210276
210908
  const name = c5.replace("connect-", "");
@@ -210287,19 +210919,19 @@ ${exports}
210287
210919
  writeFileSync11(indexPath, content3);
210288
210920
  }
210289
210921
  function getInstalledConnectors(targetDir = process.cwd()) {
210290
- const connectorsDir = join213(targetDir, ".connectors");
210291
- if (!existsSync210(connectorsDir)) {
210922
+ const connectorsDir = join214(targetDir, ".connectors");
210923
+ if (!existsSync211(connectorsDir)) {
210292
210924
  return [];
210293
210925
  }
210294
210926
  return readdirSync13(connectorsDir).filter((f5) => {
210295
- const fullPath = join213(connectorsDir, f5);
210927
+ const fullPath = join214(connectorsDir, f5);
210296
210928
  return f5.startsWith("connect-") && statSync8(fullPath).isDirectory();
210297
210929
  }).map((f5) => f5.replace("connect-", ""));
210298
210930
  }
210299
210931
  function getConnectorDocs(name) {
210300
210932
  const connectorPath = getConnectorPath(name);
210301
- const claudeMdPath = join213(connectorPath, "CLAUDE.md");
210302
- if (!existsSync210(claudeMdPath))
210933
+ const claudeMdPath = join214(connectorPath, "CLAUDE.md");
210934
+ if (!existsSync211(claudeMdPath))
210303
210935
  return null;
210304
210936
  const raw = readFileSync23(claudeMdPath, "utf-8");
210305
210937
  return {
@@ -210340,9 +210972,9 @@ function parseEnvVarsTable(section) {
210340
210972
  }
210341
210973
  function removeConnector(name, targetDir = process.cwd()) {
210342
210974
  const connectorName = name.startsWith("connect-") ? name : `connect-${name}`;
210343
- const connectorsDir = join213(targetDir, ".connectors");
210344
- const connectorPath = join213(connectorsDir, connectorName);
210345
- if (!existsSync210(connectorPath)) {
210975
+ const connectorsDir = join214(targetDir, ".connectors");
210976
+ const connectorPath = join214(connectorsDir, connectorName);
210977
+ if (!existsSync211(connectorPath)) {
210346
210978
  return false;
210347
210979
  }
210348
210980
  rmSync4(connectorPath, { recursive: true });
@@ -210350,7 +210982,7 @@ function removeConnector(name, targetDir = process.cwd()) {
210350
210982
  return true;
210351
210983
  }
210352
210984
  var CATEGORIES2, CONNECTORS, versionsLoaded = false, __dirname22, CONNECTORS_DIR;
210353
- var init_dist6 = __esm(() => {
210985
+ var init_dist7 = __esm(() => {
210354
210986
  CATEGORIES2 = [
210355
210987
  "AI & ML",
210356
210988
  "Developer Tools",
@@ -210800,14 +211432,14 @@ var init_dist6 = __esm(() => {
210800
211432
  tags: ["ads", "twitter"]
210801
211433
  }
210802
211434
  ];
210803
- __dirname22 = dirname22(fileURLToPath22(import.meta.url));
211435
+ __dirname22 = dirname23(fileURLToPath22(import.meta.url));
210804
211436
  CONNECTORS_DIR = resolveConnectorsDir();
210805
211437
  });
210806
211438
 
210807
211439
  // packages/core/src/connectors/registry-adapter.ts
210808
211440
  async function getConnectorsLib() {
210809
211441
  if (!_connectorsLib) {
210810
- _connectorsLib = await Promise.resolve().then(() => (init_dist6(), exports_dist3));
211442
+ _connectorsLib = await Promise.resolve().then(() => (init_dist7(), exports_dist3));
210811
211443
  }
210812
211444
  return _connectorsLib;
210813
211445
  }
@@ -211456,7 +212088,7 @@ var init_loop = __esm(async () => {
211456
212088
  }
211457
212089
  }
211458
212090
  });
211459
- this.memoryInjector = new MemoryInjector(this.memoryManager, {
212091
+ this.memoryInjector = new MemoryInjector2(this.memoryManager, {
211460
212092
  enabled: memoryConfig?.injection?.enabled ?? true,
211461
212093
  maxTokens: memoryConfig?.injection?.maxTokens ?? 500,
211462
212094
  minImportance: memoryConfig?.injection?.minImportance ?? 5,
@@ -211930,8 +212562,8 @@ You are running in **autonomous mode**. You manage your own wakeup schedule.
211930
212562
  this.emit({ type: "text", content: `
211931
212563
  [Agent paused - budget exceeded. Use /budgets resume to continue.]
211932
212564
  ` });
211933
- await new Promise((resolve10) => {
211934
- this.pauseResolve = resolve10;
212565
+ await new Promise((resolve11) => {
212566
+ this.pauseResolve = resolve11;
211935
212567
  });
211936
212568
  this.pauseResolve = null;
211937
212569
  if (this.shouldStop)
@@ -213485,8 +214117,8 @@ ${content3.trim()}`);
213485
214117
  if (this.config?.scheduler?.enabled === false)
213486
214118
  return;
213487
214119
  try {
213488
- const now3 = Date.now();
213489
- const due = await getDueSchedules(this.cwd, now3);
214120
+ const now4 = Date.now();
214121
+ const due = await getDueSchedules(this.cwd, now4);
213490
214122
  for (const schedule of due) {
213491
214123
  if (schedule.sessionId && schedule.sessionId !== this.sessionId) {
213492
214124
  continue;
@@ -213538,12 +214170,12 @@ ${content3.trim()}`);
213538
214170
  try {
213539
214171
  const contentToRun = current.actionType === "message" ? current.message || current.command : current.command;
213540
214172
  const result = await this.runMessage(contentToRun, "schedule");
213541
- const now3 = Date.now();
214173
+ const now4 = Date.now();
213542
214174
  await updateSchedule(this.cwd, schedule.id, (live) => {
213543
214175
  const updated = {
213544
214176
  ...live,
213545
- updatedAt: now3,
213546
- lastRunAt: now3,
214177
+ updatedAt: now4,
214178
+ lastRunAt: now4,
213547
214179
  lastResult: {
213548
214180
  ok: result.ok,
213549
214181
  summary: result.summary,
@@ -213555,7 +214187,7 @@ ${content3.trim()}`);
213555
214187
  updated.nextRunAt = undefined;
213556
214188
  } else {
213557
214189
  updated.status = live.status === "paused" ? "paused" : "active";
213558
- updated.nextRunAt = computeNextRun2(updated, now3);
214190
+ updated.nextRunAt = computeNextRun2(updated, now4);
213559
214191
  }
213560
214192
  return updated;
213561
214193
  }, { ownerId: this.sessionId });
@@ -214102,9 +214734,9 @@ class StatsTracker {
214102
214734
  }
214103
214735
 
214104
214736
  // packages/core/src/tools/connector-index.ts
214105
- import { join as join43, dirname as dirname17 } from "path";
214106
- import { homedir as homedir24 } from "os";
214107
- import { existsSync as existsSync31, mkdirSync as mkdirSync16, writeFileSync as writeFileSync12, readFileSync as readFileSync15 } from "fs";
214737
+ import { join as join45, dirname as dirname18 } from "path";
214738
+ import { homedir as homedir25 } from "os";
214739
+ import { existsSync as existsSync33, mkdirSync as mkdirSync17, writeFileSync as writeFileSync12, readFileSync as readFileSync16 } from "fs";
214108
214740
  var TAG_KEYWORDS, INDEX_VERSION = 1, INDEX_TTL_MS, ConnectorIndex;
214109
214741
  var init_connector_index = __esm(() => {
214110
214742
  TAG_KEYWORDS = {
@@ -214138,18 +214770,18 @@ var init_connector_index = __esm(() => {
214138
214770
  }
214139
214771
  getHomeDir() {
214140
214772
  const envHome = process.env.HOME || process.env.USERPROFILE;
214141
- return envHome && envHome.trim().length > 0 ? envHome : homedir24();
214773
+ return envHome && envHome.trim().length > 0 ? envHome : homedir25();
214142
214774
  }
214143
214775
  getCachePath() {
214144
- return join43(this.getHomeDir(), ".assistants", "cache", "connector-index.json");
214776
+ return join45(this.getHomeDir(), ".assistants", "cache", "connector-index.json");
214145
214777
  }
214146
214778
  loadDiskCache() {
214147
214779
  ConnectorIndex.indexLoaded = true;
214148
214780
  try {
214149
214781
  const cachePath = this.getCachePath();
214150
- if (!existsSync31(cachePath))
214782
+ if (!existsSync33(cachePath))
214151
214783
  return;
214152
- const data = JSON.parse(readFileSync15(cachePath, "utf-8"));
214784
+ const data = JSON.parse(readFileSync16(cachePath, "utf-8"));
214153
214785
  if (data.version !== INDEX_VERSION)
214154
214786
  return;
214155
214787
  if (Date.now() - data.timestamp > INDEX_TTL_MS)
@@ -214163,9 +214795,9 @@ var init_connector_index = __esm(() => {
214163
214795
  saveDiskCache() {
214164
214796
  try {
214165
214797
  const cachePath = this.getCachePath();
214166
- const cacheDir = dirname17(cachePath);
214167
- if (!existsSync31(cacheDir)) {
214168
- mkdirSync16(cacheDir, { recursive: true });
214798
+ const cacheDir = dirname18(cachePath);
214799
+ if (!existsSync33(cacheDir)) {
214800
+ mkdirSync17(cacheDir, { recursive: true });
214169
214801
  }
214170
214802
  const data = {
214171
214803
  version: INDEX_VERSION,
@@ -214666,7 +215298,7 @@ class InterviewStore {
214666
215298
  this.db = db || getDatabase();
214667
215299
  }
214668
215300
  create(record2) {
214669
- const now3 = Date.now();
215301
+ const now4 = Date.now();
214670
215302
  const entry = {
214671
215303
  id: record2.id,
214672
215304
  sessionId: record2.sessionId,
@@ -214675,7 +215307,7 @@ class InterviewStore {
214675
215307
  questions: record2.questions,
214676
215308
  answers: record2.answers || {},
214677
215309
  status: "pending",
214678
- createdAt: now3
215310
+ createdAt: now4
214679
215311
  };
214680
215312
  this.db.prepare(`INSERT INTO interviews (id, session_id, assistant_id, title, questions, answers, status, created_at)
214681
215313
  VALUES (?, ?, ?, ?, ?, ?, ?, ?)`).run(entry.id, entry.sessionId, entry.assistantId || null, entry.title || null, JSON.stringify(entry.questions), JSON.stringify(entry.answers), entry.status, entry.createdAt);
@@ -214685,12 +215317,12 @@ class InterviewStore {
214685
215317
  this.db.prepare(`UPDATE interviews SET answers = ? WHERE id = ?`).run(JSON.stringify(answers), id);
214686
215318
  }
214687
215319
  complete(id, answers) {
214688
- const now3 = Date.now();
214689
- this.db.prepare(`UPDATE interviews SET answers = ?, status = 'completed', completed_at = ? WHERE id = ?`).run(JSON.stringify(answers), now3, id);
215320
+ const now4 = Date.now();
215321
+ this.db.prepare(`UPDATE interviews SET answers = ?, status = 'completed', completed_at = ? WHERE id = ?`).run(JSON.stringify(answers), now4, id);
214690
215322
  }
214691
215323
  cancel(id) {
214692
- const now3 = Date.now();
214693
- this.db.prepare(`UPDATE interviews SET status = 'cancelled', completed_at = ? WHERE id = ?`).run(now3, id);
215324
+ const now4 = Date.now();
215325
+ this.db.prepare(`UPDATE interviews SET status = 'cancelled', completed_at = ? WHERE id = ?`).run(now4, id);
214694
215326
  }
214695
215327
  get(id) {
214696
215328
  const row = this.db.prepare(`SELECT * FROM interviews WHERE id = ?`).get(id);
@@ -214734,27 +215366,27 @@ class InterviewStore {
214734
215366
  };
214735
215367
  }
214736
215368
  }
214737
- var init_store14 = __esm(async () => {
215369
+ var init_store13 = __esm(async () => {
214738
215370
  await init_database();
214739
215371
  });
214740
215372
 
214741
215373
  // packages/core/src/interviews/index.ts
214742
215374
  var init_interviews = __esm(async () => {
214743
- await init_store14();
215375
+ await init_store13();
214744
215376
  });
214745
215377
 
214746
215378
  // packages/core/src/memory/sessions.ts
214747
- import { join as join45, dirname as dirname18 } from "path";
214748
- import { existsSync as existsSync33, mkdirSync as mkdirSync17 } from "fs";
215379
+ import { join as join46, dirname as dirname19 } from "path";
215380
+ import { existsSync as existsSync35, mkdirSync as mkdirSync18 } from "fs";
214749
215381
 
214750
215382
  class SessionManager {
214751
215383
  db;
214752
215384
  constructor(dbPath, assistantId) {
214753
215385
  const baseDir = getConfigDir();
214754
- const path5 = dbPath || (assistantId ? join45(baseDir, "assistants", assistantId, "memory.db") : join45(baseDir, "memory.db"));
214755
- const dir = dirname18(path5);
214756
- if (!existsSync33(dir)) {
214757
- mkdirSync17(dir, { recursive: true });
215386
+ const path5 = dbPath || (assistantId ? join46(baseDir, "assistants", assistantId, "memory.db") : join46(baseDir, "memory.db"));
215387
+ const dir = dirname19(path5);
215388
+ if (!existsSync35(dir)) {
215389
+ mkdirSync18(dir, { recursive: true });
214758
215390
  }
214759
215391
  const runtime = getRuntime();
214760
215392
  this.db = runtime.openDatabase(path5);
@@ -215061,9 +215693,9 @@ class PreferenceLearner {
215061
215693
  }
215062
215694
  }
215063
215695
  // packages/core/src/migration/validators.ts
215064
- import { existsSync as existsSync35 } from "fs";
215696
+ import { existsSync as existsSync36 } from "fs";
215065
215697
  function assertNoExistingTarget(targetPath) {
215066
- if (existsSync35(targetPath)) {
215698
+ if (existsSync36(targetPath)) {
215067
215699
  throw new Error(`Target already exists at ${targetPath}`);
215068
215700
  }
215069
215701
  }
@@ -215253,9 +215885,9 @@ async function saveHistory(history) {
215253
215885
  conn.transaction(() => {
215254
215886
  conn.exec("DELETE FROM command_history");
215255
215887
  const insert = conn.prepare("INSERT INTO command_history (command, created_at) VALUES (?, ?)");
215256
- const now3 = Date.now();
215888
+ const now4 = Date.now();
215257
215889
  for (let i6 = 0;i6 < trimmed.length; i6++) {
215258
- insert.run(trimmed[i6], now3 + i6);
215890
+ insert.run(trimmed[i6], now4 + i6);
215259
215891
  }
215260
215892
  });
215261
215893
  } catch {}
@@ -215983,7 +216615,7 @@ __export(exports_src3, {
215983
216615
  NativeHookRegistry: () => NativeHookRegistry,
215984
216616
  MessagesManager: () => MessagesManager,
215985
216617
  MemoryStore: () => MemoryStore,
215986
- MemoryInjector: () => MemoryInjector,
216618
+ MemoryInjector: () => MemoryInjector2,
215987
216619
  MODELS: () => MODELS,
215988
216620
  MIN_SLEEP_MS: () => MIN_SLEEP_MS,
215989
216621
  Logger: () => Logger,
@@ -216106,6 +216738,7 @@ var init_src3 = __esm(async () => {
216106
216738
  init_loader();
216107
216739
  init_native();
216108
216740
  init_scope_context();
216741
+ init_mementos_adapter();
216109
216742
  init_injector();
216110
216743
  init_project_memory();
216111
216744
  init_types11();
@@ -216153,7 +216786,6 @@ var init_src3 = __esm(async () => {
216153
216786
  init_logger3(),
216154
216787
  init_verification(),
216155
216788
  init_interviews(),
216156
- init_store13(),
216157
216789
  init_sessions4(),
216158
216790
  init_global_memory(),
216159
216791
  init_budget(),
@@ -216554,14 +217186,14 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
216554
217186
  prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
216555
217187
  actScopeDepth = prevActScopeDepth;
216556
217188
  }
216557
- function recursivelyFlushAsyncActWork(returnValue, resolve10, reject) {
217189
+ function recursivelyFlushAsyncActWork(returnValue, resolve11, reject) {
216558
217190
  var queue = ReactSharedInternals.actQueue;
216559
217191
  if (queue !== null)
216560
217192
  if (queue.length !== 0)
216561
217193
  try {
216562
217194
  flushActQueue(queue);
216563
217195
  enqueueTask(function() {
216564
- return recursivelyFlushAsyncActWork(returnValue, resolve10, reject);
217196
+ return recursivelyFlushAsyncActWork(returnValue, resolve11, reject);
216565
217197
  });
216566
217198
  return;
216567
217199
  } catch (error4) {
@@ -216569,7 +217201,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
216569
217201
  }
216570
217202
  else
216571
217203
  ReactSharedInternals.actQueue = null;
216572
- 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve10(returnValue);
217204
+ 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve11(returnValue);
216573
217205
  }
216574
217206
  function flushActQueue(queue) {
216575
217207
  if (!isFlushing) {
@@ -216745,14 +217377,14 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
216745
217377
  didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = true, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
216746
217378
  });
216747
217379
  return {
216748
- then: function(resolve10, reject) {
217380
+ then: function(resolve11, reject) {
216749
217381
  didAwaitActCall = true;
216750
217382
  thenable.then(function(returnValue) {
216751
217383
  popActScope(prevActQueue, prevActScopeDepth);
216752
217384
  if (prevActScopeDepth === 0) {
216753
217385
  try {
216754
217386
  flushActQueue(queue), enqueueTask(function() {
216755
- return recursivelyFlushAsyncActWork(returnValue, resolve10, reject);
217387
+ return recursivelyFlushAsyncActWork(returnValue, resolve11, reject);
216756
217388
  });
216757
217389
  } catch (error$0) {
216758
217390
  ReactSharedInternals.thrownErrors.push(error$0);
@@ -216763,7 +217395,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
216763
217395
  reject(_thrownError);
216764
217396
  }
216765
217397
  } else
216766
- resolve10(returnValue);
217398
+ resolve11(returnValue);
216767
217399
  }, function(error4) {
216768
217400
  popActScope(prevActQueue, prevActScopeDepth);
216769
217401
  0 < ReactSharedInternals.thrownErrors.length ? (error4 = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error4)) : reject(error4);
@@ -216779,11 +217411,11 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
216779
217411
  if (0 < ReactSharedInternals.thrownErrors.length)
216780
217412
  throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback;
216781
217413
  return {
216782
- then: function(resolve10, reject) {
217414
+ then: function(resolve11, reject) {
216783
217415
  didAwaitActCall = true;
216784
217416
  prevActScopeDepth === 0 ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() {
216785
- return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve10, reject);
216786
- })) : resolve10(returnValue$jscomp$0);
217417
+ return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve11, reject);
217418
+ })) : resolve11(returnValue$jscomp$0);
216787
217419
  }
216788
217420
  };
216789
217421
  };
@@ -217218,8 +217850,8 @@ __export(exports_base, {
217218
217850
  beep: () => beep,
217219
217851
  ConEmu: () => ConEmu
217220
217852
  });
217221
- import process3 from "process";
217222
- import os3 from "os";
217853
+ import process2 from "process";
217854
+ import os2 from "os";
217223
217855
  var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isTerminalApp, isWindows2, isTmux, cwdFunction, wrapOsc = (sequence) => {
217224
217856
  if (isTmux) {
217225
217857
  return "\x1BPtmux;" + sequence.replaceAll("\x1B", "\x1B\x1B") + "\x1B\\";
@@ -217262,7 +217894,7 @@ var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isTerminalApp, isWind
217262
217894
  if (isBrowser || !isWindows2) {
217263
217895
  return false;
217264
217896
  }
217265
- const parts = os3.release().split(".");
217897
+ const parts = os2.release().split(".");
217266
217898
  const major = Number(parts[0]);
217267
217899
  const build = Number(parts[2] ?? 0);
217268
217900
  if (major < 10) {
@@ -217292,12 +217924,12 @@ var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isTerminalApp, isWind
217292
217924
  }, iTerm, ConEmu, setCwd = (cwd2 = cwdFunction()) => iTerm.setCwd(cwd2) + ConEmu.setCwd(cwd2);
217293
217925
  var init_base = __esm(() => {
217294
217926
  init_environment();
217295
- isTerminalApp = !isBrowser && process3.env.TERM_PROGRAM === "Apple_Terminal";
217296
- isWindows2 = !isBrowser && process3.platform === "win32";
217297
- isTmux = !isBrowser && (process3.env.TERM?.startsWith("screen") || process3.env.TERM?.startsWith("tmux") || process3.env.TMUX !== undefined);
217927
+ isTerminalApp = !isBrowser && process2.env.TERM_PROGRAM === "Apple_Terminal";
217928
+ isWindows2 = !isBrowser && process2.platform === "win32";
217929
+ isTmux = !isBrowser && (process2.env.TERM?.startsWith("screen") || process2.env.TERM?.startsWith("tmux") || process2.env.TMUX !== undefined);
217298
217930
  cwdFunction = isBrowser ? () => {
217299
217931
  throw new Error("`process.cwd()` only works in Node.js, not the browser.");
217300
- } : process3.cwd;
217932
+ } : process2.cwd;
217301
217933
  cursorLeft = ESC + "G";
217302
217934
  cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
217303
217935
  cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
@@ -217352,8 +217984,8 @@ var init_ansi_escapes = __esm(() => {
217352
217984
  });
217353
217985
 
217354
217986
  // node_modules/.pnpm/is-in-ci@2.0.0/node_modules/is-in-ci/index.js
217355
- import { env as env3 } from "process";
217356
- var check2 = (key) => (key in env3) && env3[key] !== "0" && env3[key] !== "false", isInCi, is_in_ci_default;
217987
+ import { env as env2 } from "process";
217988
+ var check2 = (key) => (key in env2) && env2[key] !== "0" && env2[key] !== "false", isInCi, is_in_ci_default;
217357
217989
  var init_is_in_ci = __esm(() => {
217358
217990
  isInCi = check2("CI") || check2("CONTINUOUS_INTEGRATION");
217359
217991
  is_in_ci_default = isInCi;
@@ -217411,26 +218043,26 @@ var require_signals = __commonJS((exports, module) => {
217411
218043
 
217412
218044
  // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
217413
218045
  var require_signal_exit = __commonJS((exports, module) => {
217414
- var process4 = global.process;
217415
- var processOk = function(process5) {
217416
- return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function";
218046
+ var process3 = global.process;
218047
+ var processOk = function(process4) {
218048
+ return process4 && typeof process4 === "object" && typeof process4.removeListener === "function" && typeof process4.emit === "function" && typeof process4.reallyExit === "function" && typeof process4.listeners === "function" && typeof process4.kill === "function" && typeof process4.pid === "number" && typeof process4.on === "function";
217417
218049
  };
217418
- if (!processOk(process4)) {
218050
+ if (!processOk(process3)) {
217419
218051
  module.exports = function() {
217420
218052
  return function() {};
217421
218053
  };
217422
218054
  } else {
217423
218055
  assert3 = __require("assert");
217424
218056
  signals = require_signals();
217425
- isWin = /^win/i.test(process4.platform);
218057
+ isWin = /^win/i.test(process3.platform);
217426
218058
  EE = __require("events");
217427
218059
  if (typeof EE !== "function") {
217428
218060
  EE = EE.EventEmitter;
217429
218061
  }
217430
- if (process4.__signal_exit_emitter__) {
217431
- emitter = process4.__signal_exit_emitter__;
218062
+ if (process3.__signal_exit_emitter__) {
218063
+ emitter = process3.__signal_exit_emitter__;
217432
218064
  } else {
217433
- emitter = process4.__signal_exit_emitter__ = new EE;
218065
+ emitter = process3.__signal_exit_emitter__ = new EE;
217434
218066
  emitter.count = 0;
217435
218067
  emitter.emitted = {};
217436
218068
  }
@@ -217466,11 +218098,11 @@ var require_signal_exit = __commonJS((exports, module) => {
217466
218098
  loaded = false;
217467
218099
  signals.forEach(function(sig) {
217468
218100
  try {
217469
- process4.removeListener(sig, sigListeners[sig]);
218101
+ process3.removeListener(sig, sigListeners[sig]);
217470
218102
  } catch (er) {}
217471
218103
  });
217472
- process4.emit = originalProcessEmit;
217473
- process4.reallyExit = originalProcessReallyExit;
218104
+ process3.emit = originalProcessEmit;
218105
+ process3.reallyExit = originalProcessReallyExit;
217474
218106
  emitter.count -= 1;
217475
218107
  };
217476
218108
  module.exports.unload = unload;
@@ -217487,7 +218119,7 @@ var require_signal_exit = __commonJS((exports, module) => {
217487
218119
  if (!processOk(global.process)) {
217488
218120
  return;
217489
218121
  }
217490
- var listeners = process4.listeners(sig);
218122
+ var listeners = process3.listeners(sig);
217491
218123
  if (listeners.length === emitter.count) {
217492
218124
  unload();
217493
218125
  emit("exit", null, sig);
@@ -217495,7 +218127,7 @@ var require_signal_exit = __commonJS((exports, module) => {
217495
218127
  if (isWin && sig === "SIGHUP") {
217496
218128
  sig = "SIGINT";
217497
218129
  }
217498
- process4.kill(process4.pid, sig);
218130
+ process3.kill(process3.pid, sig);
217499
218131
  }
217500
218132
  };
217501
218133
  });
@@ -217511,35 +218143,35 @@ var require_signal_exit = __commonJS((exports, module) => {
217511
218143
  emitter.count += 1;
217512
218144
  signals = signals.filter(function(sig) {
217513
218145
  try {
217514
- process4.on(sig, sigListeners[sig]);
218146
+ process3.on(sig, sigListeners[sig]);
217515
218147
  return true;
217516
218148
  } catch (er) {
217517
218149
  return false;
217518
218150
  }
217519
218151
  });
217520
- process4.emit = processEmit;
217521
- process4.reallyExit = processReallyExit;
218152
+ process3.emit = processEmit;
218153
+ process3.reallyExit = processReallyExit;
217522
218154
  };
217523
218155
  module.exports.load = load;
217524
- originalProcessReallyExit = process4.reallyExit;
218156
+ originalProcessReallyExit = process3.reallyExit;
217525
218157
  processReallyExit = function processReallyExit(code3) {
217526
218158
  if (!processOk(global.process)) {
217527
218159
  return;
217528
218160
  }
217529
- process4.exitCode = code3 || 0;
217530
- emit("exit", process4.exitCode, null);
217531
- emit("afterexit", process4.exitCode, null);
217532
- originalProcessReallyExit.call(process4, process4.exitCode);
218161
+ process3.exitCode = code3 || 0;
218162
+ emit("exit", process3.exitCode, null);
218163
+ emit("afterexit", process3.exitCode, null);
218164
+ originalProcessReallyExit.call(process3, process3.exitCode);
217533
218165
  };
217534
- originalProcessEmit = process4.emit;
218166
+ originalProcessEmit = process3.emit;
217535
218167
  processEmit = function processEmit(ev, arg) {
217536
218168
  if (ev === "exit" && processOk(global.process)) {
217537
218169
  if (arg !== undefined) {
217538
- process4.exitCode = arg;
218170
+ process3.exitCode = arg;
217539
218171
  }
217540
218172
  var ret = originalProcessEmit.apply(this, arguments);
217541
- emit("exit", process4.exitCode, null);
217542
- emit("afterexit", process4.exitCode, null);
218173
+ emit("exit", process3.exitCode, null);
218174
+ emit("afterexit", process3.exitCode, null);
217543
218175
  return ret;
217544
218176
  } else {
217545
218177
  return originalProcessEmit.apply(this, arguments);
@@ -217585,7 +218217,7 @@ var consoleMethods, originalMethods, patchConsole = (callback) => {
217585
218217
  originalMethods = {};
217586
218218
  };
217587
218219
  }, dist_default;
217588
- var init_dist7 = __esm(() => {
218220
+ var init_dist8 = __esm(() => {
217589
218221
  consoleMethods = [
217590
218222
  "assert",
217591
218223
  "count",
@@ -219695,39 +220327,39 @@ var init_wrap_ansi = __esm(() => {
219695
220327
  });
219696
220328
 
219697
220329
  // node_modules/.pnpm/terminal-size@4.0.1/node_modules/terminal-size/index.js
219698
- import process4 from "process";
220330
+ import process3 from "process";
219699
220331
  import { execFileSync } from "child_process";
219700
220332
  import fs5 from "fs";
219701
- import tty2 from "tty";
220333
+ import tty from "tty";
219702
220334
  function terminalSize() {
219703
- const { env: env4, stdout, stderr } = process4;
220335
+ const { env: env3, stdout, stderr } = process3;
219704
220336
  if (stdout?.columns && stdout?.rows) {
219705
220337
  return create2(stdout.columns, stdout.rows);
219706
220338
  }
219707
220339
  if (stderr?.columns && stderr?.rows) {
219708
220340
  return create2(stderr.columns, stderr.rows);
219709
220341
  }
219710
- if (env4.COLUMNS && env4.LINES) {
219711
- return create2(env4.COLUMNS, env4.LINES);
220342
+ if (env3.COLUMNS && env3.LINES) {
220343
+ return create2(env3.COLUMNS, env3.LINES);
219712
220344
  }
219713
220345
  const fallback = {
219714
220346
  columns: defaultColumns,
219715
220347
  rows: defaultRows
219716
220348
  };
219717
- if (process4.platform === "win32") {
220349
+ if (process3.platform === "win32") {
219718
220350
  return tput() ?? fallback;
219719
220351
  }
219720
- if (process4.platform === "darwin") {
220352
+ if (process3.platform === "darwin") {
219721
220353
  return devTty() ?? tput() ?? fallback;
219722
220354
  }
219723
220355
  return devTty() ?? tput() ?? resize() ?? fallback;
219724
220356
  }
219725
- var defaultColumns = 80, defaultRows = 24, exec4 = (command, arguments_, { shell, env: env4 } = {}) => execFileSync(command, arguments_, {
220357
+ var defaultColumns = 80, defaultRows = 24, exec4 = (command, arguments_, { shell, env: env3 } = {}) => execFileSync(command, arguments_, {
219726
220358
  encoding: "utf8",
219727
220359
  stdio: ["ignore", "pipe", "ignore"],
219728
220360
  timeout: 500,
219729
220361
  shell,
219730
- env: env4
220362
+ env: env3
219731
220363
  }).trim(), create2 = (columns, rows) => ({
219732
220364
  columns: Number.parseInt(columns, 10),
219733
220365
  rows: Number.parseInt(rows, 10)
@@ -219741,7 +220373,7 @@ var defaultColumns = 80, defaultRows = 24, exec4 = (command, arguments_, { shell
219741
220373
  }
219742
220374
  return { columns, rows };
219743
220375
  }, isForegroundProcess = () => {
219744
- if (process4.platform !== "linux") {
220376
+ if (process3.platform !== "linux") {
219745
220377
  return true;
219746
220378
  }
219747
220379
  try {
@@ -219765,14 +220397,14 @@ var defaultColumns = 80, defaultRows = 24, exec4 = (command, arguments_, { shell
219765
220397
  }
219766
220398
  }, devTty = () => {
219767
220399
  try {
219768
- const flags = process4.platform === "darwin" ? fs5.constants.O_EVTONLY | fs5.constants.O_NONBLOCK : fs5.constants.O_NONBLOCK;
219769
- const { columns, rows } = tty2.WriteStream(fs5.openSync("/dev/tty", flags));
220400
+ const flags = process3.platform === "darwin" ? fs5.constants.O_EVTONLY | fs5.constants.O_NONBLOCK : fs5.constants.O_NONBLOCK;
220401
+ const { columns, rows } = tty.WriteStream(fs5.openSync("/dev/tty", flags));
219770
220402
  return { columns, rows };
219771
220403
  } catch {}
219772
220404
  }, tput = () => {
219773
220405
  try {
219774
- const columns = exec4("tput", ["cols"], { env: { TERM: "dumb", ...process4.env } });
219775
- const rows = exec4("tput", ["lines"], { env: { TERM: "dumb", ...process4.env } });
220406
+ const columns = exec4("tput", ["cols"], { env: { TERM: "dumb", ...process3.env } });
220407
+ const rows = exec4("tput", ["lines"], { env: { TERM: "dumb", ...process3.env } });
219776
220408
  if (columns && rows) {
219777
220409
  return createIfNotDefault(columns, rows);
219778
220410
  }
@@ -221187,7 +221819,7 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
221187
221819
  if (typeof entry.name === "string") {
221188
221820
  var JSCompiler_temp_const = info;
221189
221821
  a: {
221190
- var { name, env: env4, debugLocation: location } = entry;
221822
+ var { name, env: env3, debugLocation: location } = entry;
221191
221823
  if (location != null) {
221192
221824
  var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf(`
221193
221825
  `), lastLine = idx === -1 ? childStack : childStack.slice(idx + 1);
@@ -221197,7 +221829,7 @@ var require_react_reconciler_development = __commonJS((exports, module) => {
221197
221829
  break a;
221198
221830
  }
221199
221831
  }
221200
- JSCompiler_inline_result = describeBuiltInComponentFrame(name + (env4 ? " [" + env4 + "]" : ""));
221832
+ JSCompiler_inline_result = describeBuiltInComponentFrame(name + (env3 ? " [" + env3 + "]" : ""));
221201
221833
  }
221202
221834
  info = JSCompiler_temp_const + JSCompiler_inline_result;
221203
221835
  }
@@ -221940,8 +222572,8 @@ It can also happen if the client has a browser extension installed which messes
221940
222572
  }
221941
222573
  function startUpdateTimerByLane(lane, method, fiber) {
221942
222574
  if ((lane & 127) !== 0)
221943
- 0 > blockingUpdateTime && (blockingUpdateTime = now3(), blockingUpdateTask = createTask2(method), blockingUpdateMethodName = method, fiber != null && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), isAlreadyRendering() && (componentEffectSpawnedUpdate = true, blockingUpdateType = 1), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : method !== null && (blockingUpdateType = 1), blockingEventTime = lane, blockingEventType = method);
221944
- else if ((lane & 4194048) !== 0 && 0 > transitionUpdateTime && (transitionUpdateTime = now3(), transitionUpdateTask = createTask2(method), transitionUpdateMethodName = method, fiber != null && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
222575
+ 0 > blockingUpdateTime && (blockingUpdateTime = now4(), blockingUpdateTask = createTask2(method), blockingUpdateMethodName = method, fiber != null && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), isAlreadyRendering() && (componentEffectSpawnedUpdate = true, blockingUpdateType = 1), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : method !== null && (blockingUpdateType = 1), blockingEventTime = lane, blockingEventType = method);
222576
+ else if ((lane & 4194048) !== 0 && 0 > transitionUpdateTime && (transitionUpdateTime = now4(), transitionUpdateTask = createTask2(method), transitionUpdateMethodName = method, fiber != null && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
221945
222577
  lane = resolveEventTimeStamp();
221946
222578
  method = resolveEventType();
221947
222579
  if (lane !== transitionEventRepeatTime || method !== transitionEventType)
@@ -221952,7 +222584,7 @@ It can also happen if the client has a browser extension installed which messes
221952
222584
  }
221953
222585
  function startHostActionTimer(fiber) {
221954
222586
  if (0 > blockingUpdateTime) {
221955
- blockingUpdateTime = now3();
222587
+ blockingUpdateTime = now4();
221956
222588
  blockingUpdateTask = fiber._debugTask != null ? fiber._debugTask : null;
221957
222589
  isAlreadyRendering() && (blockingUpdateType = 1);
221958
222590
  var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
@@ -221960,7 +222592,7 @@ It can also happen if the client has a browser extension installed which messes
221960
222592
  blockingEventTime = newEventTime;
221961
222593
  blockingEventType = newEventType;
221962
222594
  }
221963
- if (0 > transitionUpdateTime && (transitionUpdateTime = now3(), transitionUpdateTask = fiber._debugTask != null ? fiber._debugTask : null, 0 > transitionStartTime)) {
222595
+ if (0 > transitionUpdateTime && (transitionUpdateTime = now4(), transitionUpdateTask = fiber._debugTask != null ? fiber._debugTask : null, 0 > transitionStartTime)) {
221964
222596
  fiber = resolveEventTimeStamp();
221965
222597
  newEventTime = resolveEventType();
221966
222598
  if (fiber !== transitionEventRepeatTime || newEventTime !== transitionEventType)
@@ -222014,12 +222646,12 @@ It can also happen if the client has a browser extension installed which messes
222014
222646
  return prev;
222015
222647
  }
222016
222648
  function startProfilerTimer(fiber) {
222017
- profilerStartTime = now3();
222649
+ profilerStartTime = now4();
222018
222650
  0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
222019
222651
  }
222020
222652
  function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
222021
222653
  if (0 <= profilerStartTime) {
222022
- var elapsedTime = now3() - profilerStartTime;
222654
+ var elapsedTime = now4() - profilerStartTime;
222023
222655
  fiber.actualDuration += elapsedTime;
222024
222656
  fiber.selfBaseDuration = elapsedTime;
222025
222657
  profilerStartTime = -1;
@@ -222027,14 +222659,14 @@ It can also happen if the client has a browser extension installed which messes
222027
222659
  }
222028
222660
  function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
222029
222661
  if (0 <= profilerStartTime) {
222030
- var elapsedTime = now3() - profilerStartTime;
222662
+ var elapsedTime = now4() - profilerStartTime;
222031
222663
  fiber.actualDuration += elapsedTime;
222032
222664
  profilerStartTime = -1;
222033
222665
  }
222034
222666
  }
222035
222667
  function recordEffectDuration() {
222036
222668
  if (0 <= profilerStartTime) {
222037
- var endTime = now3(), elapsedTime = endTime - profilerStartTime;
222669
+ var endTime = now4(), elapsedTime = endTime - profilerStartTime;
222038
222670
  profilerStartTime = -1;
222039
222671
  profilerEffectDuration += elapsedTime;
222040
222672
  componentEffectDuration += elapsedTime;
@@ -222048,7 +222680,7 @@ It can also happen if the client has a browser extension installed which messes
222048
222680
  commitErrors.push(errorInfo);
222049
222681
  }
222050
222682
  function startEffectTimer() {
222051
- profilerStartTime = now3();
222683
+ profilerStartTime = now4();
222052
222684
  0 > componentEffectStartTime && (componentEffectStartTime = profilerStartTime);
222053
222685
  }
222054
222686
  function transferActualDuration(fiber) {
@@ -222205,8 +222837,8 @@ It can also happen if the client has a browser extension installed which messes
222205
222837
  currentEntangledActionThenable = {
222206
222838
  status: "pending",
222207
222839
  value: undefined,
222208
- then: function(resolve10) {
222209
- entangledListeners.push(resolve10);
222840
+ then: function(resolve11) {
222841
+ entangledListeners.push(resolve11);
222210
222842
  }
222211
222843
  };
222212
222844
  }
@@ -222230,8 +222862,8 @@ It can also happen if the client has a browser extension installed which messes
222230
222862
  status: "pending",
222231
222863
  value: null,
222232
222864
  reason: null,
222233
- then: function(resolve10) {
222234
- listeners.push(resolve10);
222865
+ then: function(resolve11) {
222866
+ listeners.push(resolve11);
222235
222867
  }
222236
222868
  };
222237
222869
  thenable.then(function() {
@@ -227304,7 +227936,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227304
227936
  if (startTime === RootInProgress) {
227305
227937
  workInProgressRootIsPrerendering && !forceSync && markRootSuspended(root3, lanes, 0, false);
227306
227938
  lanes = workInProgressSuspendedReason;
227307
- yieldStartTime = now3();
227939
+ yieldStartTime = now4();
227308
227940
  yieldReason = lanes;
227309
227941
  break;
227310
227942
  } else {
@@ -227493,7 +228125,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227493
228125
  function prepareFreshStack(root3, lanes) {
227494
228126
  supportsUserTiming && (console.timeStamp("Blocking Track", 0.003, 0.003, "Blocking", "Scheduler \u269B", "primary-light"), console.timeStamp("Transition Track", 0.003, 0.003, "Transition", "Scheduler \u269B", "primary-light"), console.timeStamp("Suspense Track", 0.003, 0.003, "Suspense", "Scheduler \u269B", "primary-light"), console.timeStamp("Idle Track", 0.003, 0.003, "Idle", "Scheduler \u269B", "primary-light"));
227495
228127
  var previousRenderStartTime = renderStartTime;
227496
- renderStartTime = now3();
228128
+ renderStartTime = now4();
227497
228129
  if (workInProgressRootRenderLanes !== 0 && 0 < previousRenderStartTime) {
227498
228130
  setCurrentTrackFromLanes(workInProgressRootRenderLanes);
227499
228131
  if (workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootSuspendedWithDelay)
@@ -227548,7 +228180,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227548
228180
  blockingSuspendedTime = -1.1;
227549
228181
  blockingEventRepeatTime = blockingEventTime;
227550
228182
  blockingEventTime = -1.1;
227551
- blockingClampTime = now3();
228183
+ blockingClampTime = now4();
227552
228184
  }
227553
228185
  (lanes & 4194048) !== 0 && (workInProgressUpdateTask = transitionUpdateTask, debugTask = 0 <= transitionStartTime && transitionStartTime < transitionClampTime ? transitionClampTime : transitionStartTime, previousRenderStartTime = 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime ? transitionClampTime : transitionUpdateTime, endTime = 0 <= transitionEventTime && transitionEventTime < transitionClampTime ? transitionClampTime : transitionEventTime, color2 = 0 <= endTime ? endTime : 0 <= previousRenderStartTime ? previousRenderStartTime : renderStartTime, 0 <= transitionSuspendedTime && (setCurrentTrackFromLanes(256), logSuspendedWithDelayPhase(transitionSuspendedTime, color2, lanes, workInProgressUpdateTask)), isPingedUpdate = endTime, eventTime = transitionEventType, eventType = 0 < transitionEventRepeatTime, eventIsRepeat = transitionUpdateType === 2, color2 = renderStartTime, endTime = transitionUpdateTask, label = transitionUpdateMethodName, isSpawnedUpdate = transitionUpdateComponentName, supportsUserTiming && (currentTrack = "Transition", 0 < previousRenderStartTime ? previousRenderStartTime > color2 && (previousRenderStartTime = color2) : previousRenderStartTime = color2, 0 < debugTask ? debugTask > previousRenderStartTime && (debugTask = previousRenderStartTime) : debugTask = previousRenderStartTime, 0 < isPingedUpdate ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask) : isPingedUpdate = debugTask, debugTask > isPingedUpdate && eventTime !== null && (color$jscomp$0 = eventType ? "secondary-light" : "warning", endTime ? endTime.run(console.timeStamp.bind(console, eventType ? "Consecutive" : "Event: " + eventTime, isPingedUpdate, debugTask, currentTrack, "Scheduler \u269B", color$jscomp$0)) : console.timeStamp(eventType ? "Consecutive" : "Event: " + eventTime, isPingedUpdate, debugTask, currentTrack, "Scheduler \u269B", color$jscomp$0)), previousRenderStartTime > debugTask && (endTime ? endTime.run(console.timeStamp.bind(console, "Action", debugTask, previousRenderStartTime, currentTrack, "Scheduler \u269B", "primary-dark")) : console.timeStamp("Action", debugTask, previousRenderStartTime, currentTrack, "Scheduler \u269B", "primary-dark")), color2 > previousRenderStartTime && (debugTask = eventIsRepeat ? "Promise Resolved" : 5 < color2 - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], isSpawnedUpdate != null && isPingedUpdate.push(["Component name", isSpawnedUpdate]), label != null && isPingedUpdate.push(["Method name", label]), previousRenderStartTime = {
227554
228186
  start: previousRenderStartTime,
@@ -227561,7 +228193,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227561
228193
  color: "primary-light"
227562
228194
  }
227563
228195
  }
227564
- }, endTime ? endTime.run(performance.measure.bind(performance, debugTask, previousRenderStartTime)) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now3());
228196
+ }, endTime ? endTime.run(performance.measure.bind(performance, debugTask, previousRenderStartTime)) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now4());
227565
228197
  previousRenderStartTime = root3.timeoutHandle;
227566
228198
  previousRenderStartTime !== noTimeout && (root3.timeoutHandle = noTimeout, cancelTimeout(previousRenderStartTime));
227567
228199
  previousRenderStartTime = root3.cancelPendingCommit;
@@ -227946,7 +228578,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227946
228578
  return null;
227947
228579
  })) : (root3.callbackNode = null, root3.callbackPriority = 0);
227948
228580
  commitErrors = null;
227949
- commitStartTime = now3();
228581
+ commitStartTime = now4();
227950
228582
  suspendedCommitReason !== null && logSuspendedCommitPhase(completedRenderEndTime, commitStartTime, suspendedCommitReason, workInProgressUpdateTask);
227951
228583
  recoverableErrors = (finishedWork.flags & 13878) !== 0;
227952
228584
  if ((finishedWork.subtreeFlags & 13878) !== 0 || recoverableErrors) {
@@ -227994,7 +228626,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
227994
228626
  pendingEffectsStatus = NO_PENDING_EFFECTS;
227995
228627
  var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
227996
228628
  if (suspendedViewTransitionReason !== null) {
227997
- commitStartTime = now3();
228629
+ commitStartTime = now4();
227998
228630
  var startTime = commitEndTime, endTime = commitStartTime;
227999
228631
  !supportsUserTiming || endTime <= startTime || (animatingTask ? animatingTask.run(console.timeStamp.bind(console, suspendedViewTransitionReason, startTime, endTime, currentTrack, "Scheduler \u269B", "secondary-light")) : console.timeStamp(suspendedViewTransitionReason, startTime, endTime, currentTrack, "Scheduler \u269B", "secondary-light"));
228000
228632
  }
@@ -228017,7 +228649,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
228017
228649
  }
228018
228650
  suspendedViewTransitionReason = pendingEffectsRenderEndTime;
228019
228651
  startTime = pendingSuspendedCommitReason;
228020
- commitEndTime = now3();
228652
+ commitEndTime = now4();
228021
228653
  suspendedViewTransitionReason = startTime === null ? suspendedViewTransitionReason : commitStartTime;
228022
228654
  startTime = commitEndTime;
228023
228655
  endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
@@ -228030,7 +228662,7 @@ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fet
228030
228662
  if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
228031
228663
  if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
228032
228664
  var startViewTransitionStartTime = commitEndTime;
228033
- commitEndTime = now3();
228665
+ commitEndTime = now4();
228034
228666
  var endTime = commitEndTime, abortedViewTransition = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
228035
228667
  !supportsUserTiming || endTime <= startViewTransitionStartTime || (animatingTask ? animatingTask.run(console.timeStamp.bind(console, abortedViewTransition ? "Interrupted View Transition" : "Starting Animation", startViewTransitionStartTime, endTime, currentTrack, "Scheduler \u269B", abortedViewTransition ? "error" : "secondary-light")) : console.timeStamp(abortedViewTransition ? "Interrupted View Transition" : "Starting Animation", startViewTransitionStartTime, endTime, currentTrack, "Scheduler \u269B", abortedViewTransition ? " error" : "secondary-light"));
228036
228668
  pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT && (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
@@ -228235,7 +228867,7 @@ Error message:
228235
228867
  pingCache !== null && pingCache.delete(wakeable);
228236
228868
  root3.pingedLanes |= root3.suspendedLanes & pingedLanes;
228237
228869
  root3.warmLanes &= ~pingedLanes;
228238
- (pingedLanes & 127) !== 0 ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now3(), blockingUpdateTask = createTask2("Promise Resolved"), blockingUpdateType = 2) : (pingedLanes & 4194048) !== 0 && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now3(), transitionUpdateTask = createTask2("Promise Resolved"), transitionUpdateType = 2);
228870
+ (pingedLanes & 127) !== 0 ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now4(), blockingUpdateTask = createTask2("Promise Resolved"), blockingUpdateType = 2) : (pingedLanes & 4194048) !== 0 && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now4(), transitionUpdateTask = createTask2("Promise Resolved"), transitionUpdateType = 2);
228239
228871
  isConcurrentActEnvironment() && ReactSharedInternals.actQueue === null && console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
228240
228872
 
228241
228873
  When testing, code that resolves suspended data should be wrapped into act(...):
@@ -228788,14 +229420,14 @@ Check the render method of %s.`, getComponentNameFromFiber(current) || "Unknown"
228788
229420
  _threadCount: 0,
228789
229421
  _currentRenderer: null,
228790
229422
  _currentRenderer2: null
228791
- }, now3 = Scheduler.unstable_now, createTask2 = console.createTask ? console.createTask : function() {
229423
+ }, now4 = Scheduler.unstable_now, createTask2 = console.createTask ? console.createTask : function() {
228792
229424
  return null;
228793
229425
  }, renderStartTime = -0, commitStartTime = -0, commitEndTime = -0, commitErrors = null, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, componentEffectStartTime = -1.1, componentEffectEndTime = -1.1, componentEffectErrors = null, componentEffectSpawnedUpdate = false, blockingClampTime = -0, blockingUpdateTime = -1.1, blockingUpdateTask = null, blockingUpdateType = 0, blockingUpdateMethodName = null, blockingUpdateComponentName = null, blockingEventTime = -1.1, blockingEventType = null, blockingEventRepeatTime = -1.1, blockingSuspendedTime = -1.1, transitionClampTime = -0, transitionStartTime = -1.1, transitionUpdateTime = -1.1, transitionUpdateType = 0, transitionUpdateTask = null, transitionUpdateMethodName = null, transitionUpdateComponentName = null, transitionEventTime = -1.1, transitionEventType = null, transitionEventRepeatTime = -1.1, transitionSuspendedTime = -1.1, animatingTask = null, yieldReason = 0, yieldStartTime = -1.1, currentUpdateIsNested = false, nestedUpdateScheduled = false, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode$1 = {}, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
228794
229426
  ReactSharedInternals.S = function(transition, returnValue) {
228795
229427
  globalMostRecentTransitionTime = now$1();
228796
229428
  if (typeof returnValue === "object" && returnValue !== null && typeof returnValue.then === "function") {
228797
229429
  if (0 > transitionStartTime && 0 > transitionUpdateTime) {
228798
- transitionStartTime = now3();
229430
+ transitionStartTime = now4();
228799
229431
  var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
228800
229432
  if (newEventTime !== transitionEventRepeatTime || newEventType !== transitionEventType)
228801
229433
  transitionEventRepeatTime = -1.1;
@@ -231340,7 +231972,7 @@ var init_devtools = __esm(() => {
231340
231972
  });
231341
231973
 
231342
231974
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/reconciler.js
231343
- import process5 from "process";
231975
+ import process4 from "process";
231344
231976
  var import_react_reconciler, import_constants20, Scheduler, import_react, diff = (before, after) => {
231345
231977
  if (before === after) {
231346
231978
  return;
@@ -231380,7 +232012,7 @@ var init_reconciler = __esm(async () => {
231380
232012
  import_constants20 = __toESM(require_constants4(), 1);
231381
232013
  Scheduler = __toESM(require_scheduler(), 1);
231382
232014
  import_react = __toESM(require_react(), 1);
231383
- if (process5.env["DEV"] === "true") {
232015
+ if (process4.env["DEV"] === "true") {
231384
232016
  try {
231385
232017
  await Promise.resolve().then(() => (init_devtools(), exports_devtools));
231386
232018
  } catch (error4) {
@@ -231893,27 +232525,27 @@ var init_ansi_styles2 = __esm(() => {
231893
232525
  });
231894
232526
 
231895
232527
  // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
231896
- import process6 from "process";
231897
- import os4 from "os";
231898
- import tty3 from "tty";
231899
- function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process6.argv) {
232528
+ import process5 from "process";
232529
+ import os3 from "os";
232530
+ import tty2 from "tty";
232531
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
231900
232532
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
231901
232533
  const position2 = argv.indexOf(prefix + flag);
231902
232534
  const terminatorPosition = argv.indexOf("--");
231903
232535
  return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
231904
232536
  }
231905
- function envForceColor2() {
231906
- if ("FORCE_COLOR" in env4) {
231907
- if (env4.FORCE_COLOR === "true") {
232537
+ function envForceColor() {
232538
+ if ("FORCE_COLOR" in env3) {
232539
+ if (env3.FORCE_COLOR === "true") {
231908
232540
  return 1;
231909
232541
  }
231910
- if (env4.FORCE_COLOR === "false") {
232542
+ if (env3.FORCE_COLOR === "false") {
231911
232543
  return 0;
231912
232544
  }
231913
- return env4.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env4.FORCE_COLOR, 10), 3);
232545
+ return env3.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env3.FORCE_COLOR, 10), 3);
231914
232546
  }
231915
232547
  }
231916
- function translateLevel2(level) {
232548
+ function translateLevel(level) {
231917
232549
  if (level === 0) {
231918
232550
  return false;
231919
232551
  }
@@ -231924,67 +232556,67 @@ function translateLevel2(level) {
231924
232556
  has16m: level >= 3
231925
232557
  };
231926
232558
  }
231927
- function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
231928
- const noFlagForceColor = envForceColor2();
232559
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
232560
+ const noFlagForceColor = envForceColor();
231929
232561
  if (noFlagForceColor !== undefined) {
231930
- flagForceColor2 = noFlagForceColor;
232562
+ flagForceColor = noFlagForceColor;
231931
232563
  }
231932
- const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
232564
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
231933
232565
  if (forceColor === 0) {
231934
232566
  return 0;
231935
232567
  }
231936
232568
  if (sniffFlags) {
231937
- if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
232569
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
231938
232570
  return 3;
231939
232571
  }
231940
- if (hasFlag2("color=256")) {
232572
+ if (hasFlag("color=256")) {
231941
232573
  return 2;
231942
232574
  }
231943
232575
  }
231944
- if ("TF_BUILD" in env4 && "AGENT_NAME" in env4) {
232576
+ if ("TF_BUILD" in env3 && "AGENT_NAME" in env3) {
231945
232577
  return 1;
231946
232578
  }
231947
232579
  if (haveStream && !streamIsTTY && forceColor === undefined) {
231948
232580
  return 0;
231949
232581
  }
231950
232582
  const min = forceColor || 0;
231951
- if (env4.TERM === "dumb") {
232583
+ if (env3.TERM === "dumb") {
231952
232584
  return min;
231953
232585
  }
231954
- if (process6.platform === "win32") {
231955
- const osRelease = os4.release().split(".");
232586
+ if (process5.platform === "win32") {
232587
+ const osRelease = os3.release().split(".");
231956
232588
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
231957
232589
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
231958
232590
  }
231959
232591
  return 1;
231960
232592
  }
231961
- if ("CI" in env4) {
231962
- if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env4))) {
232593
+ if ("CI" in env3) {
232594
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env3))) {
231963
232595
  return 3;
231964
232596
  }
231965
- if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env4)) || env4.CI_NAME === "codeship") {
232597
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env3)) || env3.CI_NAME === "codeship") {
231966
232598
  return 1;
231967
232599
  }
231968
232600
  return min;
231969
232601
  }
231970
- if ("TEAMCITY_VERSION" in env4) {
231971
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env4.TEAMCITY_VERSION) ? 1 : 0;
232602
+ if ("TEAMCITY_VERSION" in env3) {
232603
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env3.TEAMCITY_VERSION) ? 1 : 0;
231972
232604
  }
231973
- if (env4.COLORTERM === "truecolor") {
232605
+ if (env3.COLORTERM === "truecolor") {
231974
232606
  return 3;
231975
232607
  }
231976
- if (env4.TERM === "xterm-kitty") {
232608
+ if (env3.TERM === "xterm-kitty") {
231977
232609
  return 3;
231978
232610
  }
231979
- if (env4.TERM === "xterm-ghostty") {
232611
+ if (env3.TERM === "xterm-ghostty") {
231980
232612
  return 3;
231981
232613
  }
231982
- if (env4.TERM === "wezterm") {
232614
+ if (env3.TERM === "wezterm") {
231983
232615
  return 3;
231984
232616
  }
231985
- if ("TERM_PROGRAM" in env4) {
231986
- const version3 = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
231987
- switch (env4.TERM_PROGRAM) {
232617
+ if ("TERM_PROGRAM" in env3) {
232618
+ const version3 = Number.parseInt((env3.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
232619
+ switch (env3.TERM_PROGRAM) {
231988
232620
  case "iTerm.app": {
231989
232621
  return version3 >= 3 ? 3 : 2;
231990
232622
  }
@@ -231993,37 +232625,37 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
231993
232625
  }
231994
232626
  }
231995
232627
  }
231996
- if (/-256(color)?$/i.test(env4.TERM)) {
232628
+ if (/-256(color)?$/i.test(env3.TERM)) {
231997
232629
  return 2;
231998
232630
  }
231999
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env4.TERM)) {
232631
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM)) {
232000
232632
  return 1;
232001
232633
  }
232002
- if ("COLORTERM" in env4) {
232634
+ if ("COLORTERM" in env3) {
232003
232635
  return 1;
232004
232636
  }
232005
232637
  return min;
232006
232638
  }
232007
- function createSupportsColor2(stream, options2 = {}) {
232008
- const level = _supportsColor2(stream, {
232639
+ function createSupportsColor(stream, options2 = {}) {
232640
+ const level = _supportsColor(stream, {
232009
232641
  streamIsTTY: stream && stream.isTTY,
232010
232642
  ...options2
232011
232643
  });
232012
- return translateLevel2(level);
232644
+ return translateLevel(level);
232013
232645
  }
232014
- var env4, flagForceColor2, supportsColor2, supports_color_default2;
232015
- var init_supports_color2 = __esm(() => {
232016
- ({ env: env4 } = process6);
232017
- if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
232018
- flagForceColor2 = 0;
232019
- } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
232020
- flagForceColor2 = 1;
232646
+ var env3, flagForceColor, supportsColor, supports_color_default;
232647
+ var init_supports_color = __esm(() => {
232648
+ ({ env: env3 } = process5);
232649
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
232650
+ flagForceColor = 0;
232651
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
232652
+ flagForceColor = 1;
232021
232653
  }
232022
- supportsColor2 = {
232023
- stdout: createSupportsColor2({ isTTY: tty3.isatty(1) }),
232024
- stderr: createSupportsColor2({ isTTY: tty3.isatty(2) })
232654
+ supportsColor = {
232655
+ stdout: createSupportsColor({ isTTY: tty2.isatty(1) }),
232656
+ stderr: createSupportsColor({ isTTY: tty2.isatty(2) })
232025
232657
  };
232026
- supports_color_default2 = supportsColor2;
232658
+ supports_color_default = supportsColor;
232027
232659
  });
232028
232660
 
232029
232661
  // node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
@@ -232136,8 +232768,8 @@ var stdoutColor, stderrColor, GENERATOR, STYLER, IS_EMPTY, levelMapping, styles4
232136
232768
  }, chalk, chalkStderr, source_default;
232137
232769
  var init_source = __esm(() => {
232138
232770
  init_ansi_styles2();
232139
- init_supports_color2();
232140
- ({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default2);
232771
+ init_supports_color();
232772
+ ({ stdout: stdoutColor, stderr: stderrColor } = supports_color_default);
232141
232773
  GENERATOR = Symbol("GENERATOR");
232142
232774
  STYLER = Symbol("STYLER");
232143
232775
  IS_EMPTY = Symbol("IS_EMPTY");
@@ -232994,33 +233626,33 @@ var require_onetime = __commonJS((exports, module) => {
232994
233626
  });
232995
233627
 
232996
233628
  // node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
232997
- import process7 from "process";
233629
+ import process6 from "process";
232998
233630
  var import_onetime, import_signal_exit, restoreCursor, restore_cursor_default;
232999
233631
  var init_restore_cursor = __esm(() => {
233000
233632
  import_onetime = __toESM(require_onetime(), 1);
233001
233633
  import_signal_exit = __toESM(require_signal_exit(), 1);
233002
233634
  restoreCursor = import_onetime.default(() => {
233003
233635
  import_signal_exit.default(() => {
233004
- process7.stderr.write("\x1B[?25h");
233636
+ process6.stderr.write("\x1B[?25h");
233005
233637
  }, { alwaysLast: true });
233006
233638
  });
233007
233639
  restore_cursor_default = restoreCursor;
233008
233640
  });
233009
233641
 
233010
233642
  // node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
233011
- import process8 from "process";
233643
+ import process7 from "process";
233012
233644
  var isHidden = false, cliCursor, cli_cursor_default;
233013
233645
  var init_cli_cursor = __esm(() => {
233014
233646
  init_restore_cursor();
233015
233647
  cliCursor = {};
233016
- cliCursor.show = (writableStream = process8.stderr) => {
233648
+ cliCursor.show = (writableStream = process7.stderr) => {
233017
233649
  if (!writableStream.isTTY) {
233018
233650
  return;
233019
233651
  }
233020
233652
  isHidden = false;
233021
233653
  writableStream.write("\x1B[?25h");
233022
233654
  };
233023
- cliCursor.hide = (writableStream = process8.stderr) => {
233655
+ cliCursor.hide = (writableStream = process7.stderr) => {
233024
233656
  if (!writableStream.isTTY) {
233025
233657
  return;
233026
233658
  }
@@ -233325,12 +233957,12 @@ var init_AppContext = __esm(() => {
233325
233957
 
233326
233958
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/components/StdinContext.js
233327
233959
  import { EventEmitter } from "events";
233328
- import process9 from "process";
233960
+ import process8 from "process";
233329
233961
  var import_react3, StdinContext, StdinContext_default;
233330
233962
  var init_StdinContext = __esm(() => {
233331
233963
  import_react3 = __toESM(require_react(), 1);
233332
233964
  StdinContext = import_react3.createContext({
233333
- stdin: process9.stdin,
233965
+ stdin: process8.stdin,
233334
233966
  internal_eventEmitter: new EventEmitter,
233335
233967
  setRawMode() {},
233336
233968
  isRawModeSupported: false,
@@ -233341,12 +233973,12 @@ var init_StdinContext = __esm(() => {
233341
233973
  });
233342
233974
 
233343
233975
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/components/StdoutContext.js
233344
- import process10 from "process";
233976
+ import process9 from "process";
233345
233977
  var import_react4, StdoutContext, StdoutContext_default;
233346
233978
  var init_StdoutContext = __esm(() => {
233347
233979
  import_react4 = __toESM(require_react(), 1);
233348
233980
  StdoutContext = import_react4.createContext({
233349
- stdout: process10.stdout,
233981
+ stdout: process9.stdout,
233350
233982
  write() {}
233351
233983
  });
233352
233984
  StdoutContext.displayName = "InternalStdoutContext";
@@ -233354,12 +233986,12 @@ var init_StdoutContext = __esm(() => {
233354
233986
  });
233355
233987
 
233356
233988
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/components/StderrContext.js
233357
- import process11 from "process";
233989
+ import process10 from "process";
233358
233990
  var import_react5, StderrContext, StderrContext_default;
233359
233991
  var init_StderrContext = __esm(() => {
233360
233992
  import_react5 = __toESM(require_react(), 1);
233361
233993
  StderrContext = import_react5.createContext({
233362
- stderr: process11.stderr,
233994
+ stderr: process10.stderr,
233363
233995
  write() {}
233364
233996
  });
233365
233997
  StderrContext.displayName = "InternalStderrContext";
@@ -233650,7 +234282,7 @@ var require_stack_utils = __commonJS((exports, module) => {
233650
234282
  var convertToSpaces = (input, spaces = 2) => {
233651
234283
  return input.replace(/^\t+/gm, ($1) => " ".repeat($1.length * spaces));
233652
234284
  }, dist_default2;
233653
- var init_dist8 = __esm(() => {
234285
+ var init_dist9 = __esm(() => {
233654
234286
  dist_default2 = convertToSpaces;
233655
234287
  });
233656
234288
 
@@ -233677,8 +234309,8 @@ var generateLineNumbers = (line, around) => {
233677
234309
  }
233678
234310
  return generateLineNumbers(line, (_a4 = options2.around) !== null && _a4 !== undefined ? _a4 : 3).filter((line2) => lines[line2 - 1] !== undefined).map((line2) => ({ line: line2, value: lines[line2 - 1] }));
233679
234311
  }, dist_default3;
233680
- var init_dist9 = __esm(() => {
233681
- init_dist8();
234312
+ var init_dist10 = __esm(() => {
234313
+ init_dist9();
233682
234314
  dist_default3 = codeExcerpt;
233683
234315
  });
233684
234316
 
@@ -233814,7 +234446,7 @@ var import_react12, import_stack_utils, cleanupPath = (path5) => {
233814
234446
  return path5?.replace(`file://${cwd2()}/`, "");
233815
234447
  }, stackUtils;
233816
234448
  var init_ErrorOverview = __esm(() => {
233817
- init_dist9();
234449
+ init_dist10();
233818
234450
  init_Box();
233819
234451
  init_Text();
233820
234452
  import_react12 = __toESM(require_react(), 1);
@@ -233852,7 +234484,7 @@ var init_ErrorBoundary = __esm(() => {
233852
234484
 
233853
234485
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/components/App.js
233854
234486
  import { EventEmitter as EventEmitter2 } from "events";
233855
- import process12 from "process";
234487
+ import process11 from "process";
233856
234488
  function App({ children: children2, stdin, stdout, stderr, writeToStdout, writeToStderr: writeToStderr2, exitOnCtrlC, onExit, setCursorPosition }) {
233857
234489
  const [isFocusEnabled, setIsFocusEnabled] = import_react14.useState(true);
233858
234490
  const [activeFocusId, setActiveFocusId] = import_react14.useState(undefined);
@@ -233898,7 +234530,7 @@ function App({ children: children2, stdin, stdout, stderr, writeToStdout, writeT
233898
234530
  }, [stdin, handleInput]);
233899
234531
  const handleSetRawMode = import_react14.useCallback((isEnabled) => {
233900
234532
  if (!isRawModeSupported) {
233901
- if (stdin === process12.stdin) {
234533
+ if (stdin === process11.stdin) {
233902
234534
  throw new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
233903
234535
  Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);
233904
234536
  } else {
@@ -234169,7 +234801,7 @@ var init_kitty_keyboard = __esm(() => {
234169
234801
  });
234170
234802
 
234171
234803
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/ink.js
234172
- import process13 from "process";
234804
+ import process12 from "process";
234173
234805
 
234174
234806
  class Ink {
234175
234807
  isConcurrent;
@@ -234198,7 +234830,7 @@ class Ink {
234198
234830
  this.options = options2;
234199
234831
  this.rootNode = createNode("ink-root");
234200
234832
  this.rootNode.onComputeLayout = this.calculateLayout;
234201
- this.isScreenReaderEnabled = options2.isScreenReaderEnabled ?? process13.env["INK_SCREEN_READER"] === "true";
234833
+ this.isScreenReaderEnabled = options2.isScreenReaderEnabled ?? process12.env["INK_SCREEN_READER"] === "true";
234202
234834
  const unthrottled = options2.debug || this.isScreenReaderEnabled;
234203
234835
  const maxFps = options2.maxFps ?? 30;
234204
234836
  const renderThrottleMs = maxFps > 0 ? Math.max(1, Math.ceil(1000 / maxFps)) : 0;
@@ -234242,7 +234874,7 @@ class Ink {
234242
234874
  const rootTag = options2.concurrent ? import_constants21.ConcurrentRoot : import_constants21.LegacyRoot;
234243
234875
  this.container = reconciler_default.createContainer(this.rootNode, rootTag, null, false, null, "id", () => {}, () => {}, () => {}, () => {});
234244
234876
  this.unsubscribeExit = import_signal_exit2.default(this.unmount, { alwaysLast: false });
234245
- if (process13.env["DEV"] === "true") {
234877
+ if (process12.env["DEV"] === "true") {
234246
234878
  reconciler_default.injectIntoDevTools({
234247
234879
  bundleType: 0,
234248
234880
  version: "16.13.1",
@@ -234457,7 +235089,7 @@ class Ink {
234457
235089
  return;
234458
235090
  }
234459
235091
  if (this.beforeExitHandler) {
234460
- process13.off("beforeExit", this.beforeExitHandler);
235092
+ process12.off("beforeExit", this.beforeExitHandler);
234461
235093
  this.beforeExitHandler = undefined;
234462
235094
  }
234463
235095
  if (this.throttledOnRender) {
@@ -234516,15 +235148,15 @@ class Ink {
234516
235148
  }
234517
235149
  }
234518
235150
  async waitUntilExit() {
234519
- this.exitPromise ||= new Promise((resolve10, reject) => {
234520
- this.resolveExitPromise = resolve10;
235151
+ this.exitPromise ||= new Promise((resolve11, reject) => {
235152
+ this.resolveExitPromise = resolve11;
234521
235153
  this.rejectExitPromise = reject;
234522
235154
  });
234523
235155
  if (!this.beforeExitHandler) {
234524
235156
  this.beforeExitHandler = () => {
234525
235157
  this.unmount();
234526
235158
  };
234527
- process13.once("beforeExit", this.beforeExitHandler);
235159
+ process12.once("beforeExit", this.beforeExitHandler);
234528
235160
  }
234529
235161
  return this.exitPromise;
234530
235162
  }
@@ -234565,9 +235197,9 @@ class Ink {
234565
235197
  this.enableKittyProtocol(flags);
234566
235198
  return;
234567
235199
  }
234568
- const term = process13.env["TERM"] ?? "";
234569
- const termProgram = process13.env["TERM_PROGRAM"] ?? "";
234570
- const isKnownSupportingTerminal = "KITTY_WINDOW_ID" in process13.env || term === "xterm-kitty" || termProgram === "WezTerm" || termProgram === "ghostty";
235200
+ const term = process12.env["TERM"] ?? "";
235201
+ const termProgram = process12.env["TERM_PROGRAM"] ?? "";
235202
+ const isKnownSupportingTerminal = "KITTY_WINDOW_ID" in process12.env || term === "xterm-kitty" || termProgram === "WezTerm" || termProgram === "ghostty";
234571
235203
  if (!is_in_ci_default && isKnownSupportingTerminal) {
234572
235204
  this.confirmKittySupport(flags);
234573
235205
  }
@@ -234609,7 +235241,7 @@ var init_ink = __esm(async () => {
234609
235241
  init_compat();
234610
235242
  init_ansi_escapes();
234611
235243
  init_is_in_ci();
234612
- init_dist7();
235244
+ init_dist8();
234613
235245
  init_wrap_ansi();
234614
235246
  init_terminal_size();
234615
235247
  init_log_update();
@@ -234631,12 +235263,12 @@ var init_ink = __esm(async () => {
234631
235263
 
234632
235264
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/render.js
234633
235265
  import { Stream as Stream4 } from "stream";
234634
- import process14 from "process";
235266
+ import process13 from "process";
234635
235267
  var render2 = (node2, options2) => {
234636
235268
  const inkOptions = {
234637
- stdout: process14.stdout,
234638
- stdin: process14.stdin,
234639
- stderr: process14.stderr,
235269
+ stdout: process13.stdout,
235270
+ stdin: process13.stdin,
235271
+ stderr: process13.stderr,
234640
235272
  debug: false,
234641
235273
  exitOnCtrlC: true,
234642
235274
  patchConsole: true,
@@ -234660,7 +235292,7 @@ var render2 = (node2, options2) => {
234660
235292
  if (stdout instanceof Stream4) {
234661
235293
  return {
234662
235294
  stdout,
234663
- stdin: process14.stdin
235295
+ stdin: process13.stdin
234664
235296
  };
234665
235297
  }
234666
235298
  return stdout;
@@ -234681,25 +235313,6 @@ var init_render = __esm(async () => {
234681
235313
  });
234682
235314
 
234683
235315
  // node_modules/.pnpm/ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4/node_modules/ink/build/components/Static.js
234684
- function Static(props) {
234685
- const { items, children: render3, style: customStyle } = props;
234686
- const [index2, setIndex] = import_react16.useState(0);
234687
- const itemsToRender = import_react16.useMemo(() => {
234688
- return items.slice(index2);
234689
- }, [items, index2]);
234690
- import_react16.useLayoutEffect(() => {
234691
- setIndex(items.length);
234692
- }, [items.length]);
234693
- const children2 = itemsToRender.map((item, itemIndex) => {
234694
- return render3(item, index2 + itemIndex);
234695
- });
234696
- const style = import_react16.useMemo(() => ({
234697
- position: "absolute",
234698
- flexDirection: "column",
234699
- ...customStyle
234700
- }), [customStyle]);
234701
- return import_react16.default.createElement("ink-box", { internal_static: true, style }, children2);
234702
- }
234703
235316
  var import_react16;
234704
235317
  var init_Static = __esm(() => {
234705
235318
  import_react16 = __toESM(require_react(), 1);
@@ -235628,21 +236241,21 @@ var require_filesystem = __commonJS((exports, module) => {
235628
236241
  var LDD_PATH = "/usr/bin/ldd";
235629
236242
  var SELF_PATH = "/proc/self/exe";
235630
236243
  var MAX_LENGTH = 2048;
235631
- var readFileSync17 = (path5) => {
236244
+ var readFileSync18 = (path5) => {
235632
236245
  const fd = fs7.openSync(path5, "r");
235633
236246
  const buffer = Buffer.alloc(MAX_LENGTH);
235634
236247
  const bytesRead = fs7.readSync(fd, buffer, 0, MAX_LENGTH, 0);
235635
236248
  fs7.close(fd, () => {});
235636
236249
  return buffer.subarray(0, bytesRead);
235637
236250
  };
235638
- var readFile10 = (path5) => new Promise((resolve10, reject) => {
236251
+ var readFile10 = (path5) => new Promise((resolve11, reject) => {
235639
236252
  fs7.open(path5, "r", (err, fd) => {
235640
236253
  if (err) {
235641
236254
  reject(err);
235642
236255
  } else {
235643
236256
  const buffer = Buffer.alloc(MAX_LENGTH);
235644
236257
  fs7.read(fd, buffer, 0, MAX_LENGTH, 0, (_, bytesRead) => {
235645
- resolve10(buffer.subarray(0, bytesRead));
236258
+ resolve11(buffer.subarray(0, bytesRead));
235646
236259
  fs7.close(fd, () => {});
235647
236260
  });
235648
236261
  }
@@ -235651,7 +236264,7 @@ var require_filesystem = __commonJS((exports, module) => {
235651
236264
  module.exports = {
235652
236265
  LDD_PATH,
235653
236266
  SELF_PATH,
235654
- readFileSync: readFileSync17,
236267
+ readFileSync: readFileSync18,
235655
236268
  readFile: readFile10
235656
236269
  };
235657
236270
  });
@@ -235694,7 +236307,7 @@ var require_elf = __commonJS((exports, module) => {
235694
236307
  var require_detect_libc = __commonJS((exports, module) => {
235695
236308
  var childProcess = __require("child_process");
235696
236309
  var { isLinux: isLinux2, getReport } = require_process();
235697
- var { LDD_PATH, SELF_PATH, readFile: readFile10, readFileSync: readFileSync17 } = require_filesystem();
236310
+ var { LDD_PATH, SELF_PATH, readFile: readFile10, readFileSync: readFileSync18 } = require_filesystem();
235698
236311
  var { interpreterPath } = require_elf();
235699
236312
  var cachedFamilyInterpreter;
235700
236313
  var cachedFamilyFilesystem;
@@ -235703,10 +236316,10 @@ var require_detect_libc = __commonJS((exports, module) => {
235703
236316
  var commandOut = "";
235704
236317
  var safeCommand = () => {
235705
236318
  if (!commandOut) {
235706
- return new Promise((resolve10) => {
236319
+ return new Promise((resolve11) => {
235707
236320
  childProcess.exec(command, (err, out) => {
235708
236321
  commandOut = err ? " " : out;
235709
- resolve10(commandOut);
236322
+ resolve11(commandOut);
235710
236323
  });
235711
236324
  });
235712
236325
  }
@@ -235785,7 +236398,7 @@ var require_detect_libc = __commonJS((exports, module) => {
235785
236398
  }
235786
236399
  cachedFamilyFilesystem = null;
235787
236400
  try {
235788
- const lddContent = readFileSync17(LDD_PATH);
236401
+ const lddContent = readFileSync18(LDD_PATH);
235789
236402
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
235790
236403
  } catch (e5) {}
235791
236404
  return cachedFamilyFilesystem;
@@ -235808,7 +236421,7 @@ var require_detect_libc = __commonJS((exports, module) => {
235808
236421
  }
235809
236422
  cachedFamilyInterpreter = null;
235810
236423
  try {
235811
- const selfContent = readFileSync17(SELF_PATH);
236424
+ const selfContent = readFileSync18(SELF_PATH);
235812
236425
  const path5 = interpreterPath(selfContent);
235813
236426
  cachedFamilyInterpreter = familyFromInterpreterPath(path5);
235814
236427
  } catch (e5) {}
@@ -235870,7 +236483,7 @@ var require_detect_libc = __commonJS((exports, module) => {
235870
236483
  }
235871
236484
  cachedVersionFilesystem = null;
235872
236485
  try {
235873
- const lddContent = readFileSync17(LDD_PATH);
236486
+ const lddContent = readFileSync18(LDD_PATH);
235874
236487
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
235875
236488
  if (versionMatch) {
235876
236489
  cachedVersionFilesystem = versionMatch[1];
@@ -237471,7 +238084,7 @@ var require_sharp = __commonJS((exports, module) => {
237471
238084
  if (sharp) {
237472
238085
  module.exports = sharp;
237473
238086
  } else {
237474
- const [isLinux2, isMacOs2, isWindows3] = ["linux", "darwin", "win32"].map((os5) => runtimePlatform.startsWith(os5));
238087
+ const [isLinux2, isMacOs2, isWindows3] = ["linux", "darwin", "win32"].map((os4) => runtimePlatform.startsWith(os4));
237475
238088
  const help = [`Could not load the "sharp" module using the ${runtimePlatform} runtime`];
237476
238089
  errors6.forEach((err) => {
237477
238090
  if (err.code !== "MODULE_NOT_FOUND") {
@@ -237484,9 +238097,9 @@ var require_sharp = __commonJS((exports, module) => {
237484
238097
  const { found, expected } = isUnsupportedNodeRuntime();
237485
238098
  help.push("- Please upgrade Node.js:", ` Found ${found}`, ` Requires ${expected}`);
237486
238099
  } else if (prebuiltPlatforms.includes(runtimePlatform)) {
237487
- const [os5, cpu] = runtimePlatform.split("-");
237488
- const libc = os5.endsWith("musl") ? " --libc=musl" : "";
237489
- help.push("- Ensure optional dependencies can be installed:", " npm install --include=optional sharp", "- Ensure your package manager supports multi-platform installation:", " See https://sharp.pixelplumbing.com/install#cross-platform", "- Add platform-specific dependencies:", ` npm install --os=${os5.replace("musl", "")}${libc} --cpu=${cpu} sharp`);
238100
+ const [os4, cpu] = runtimePlatform.split("-");
238101
+ const libc = os4.endsWith("musl") ? " --libc=musl" : "";
238102
+ help.push("- Ensure optional dependencies can be installed:", " npm install --include=optional sharp", "- Ensure your package manager supports multi-platform installation:", " See https://sharp.pixelplumbing.com/install#cross-platform", "- Add platform-specific dependencies:", ` npm install --os=${os4.replace("musl", "")}${libc} --cpu=${cpu} sharp`);
237490
238103
  } else {
237491
238104
  help.push(`- Manually install libvips >= ${minimumLibvipsVersion}`, "- Add experimental WebAssembly-based dependencies:", " npm install --cpu=wasm32 sharp", " npm install @img/sharp-wasm32");
237492
238105
  }
@@ -238263,14 +238876,14 @@ var require_input = __commonJS((exports, module) => {
238263
238876
  return this;
238264
238877
  } else {
238265
238878
  if (this._isStreamInput()) {
238266
- return new Promise((resolve10, reject) => {
238879
+ return new Promise((resolve11, reject) => {
238267
238880
  const finished = () => {
238268
238881
  this._flattenBufferIn();
238269
238882
  sharp.metadata(this.options, (err, metadata2) => {
238270
238883
  if (err) {
238271
238884
  reject(is2.nativeError(err, stack));
238272
238885
  } else {
238273
- resolve10(metadata2);
238886
+ resolve11(metadata2);
238274
238887
  }
238275
238888
  });
238276
238889
  };
@@ -238281,12 +238894,12 @@ var require_input = __commonJS((exports, module) => {
238281
238894
  }
238282
238895
  });
238283
238896
  } else {
238284
- return new Promise((resolve10, reject) => {
238897
+ return new Promise((resolve11, reject) => {
238285
238898
  sharp.metadata(this.options, (err, metadata2) => {
238286
238899
  if (err) {
238287
238900
  reject(is2.nativeError(err, stack));
238288
238901
  } else {
238289
- resolve10(metadata2);
238902
+ resolve11(metadata2);
238290
238903
  }
238291
238904
  });
238292
238905
  });
@@ -238319,25 +238932,25 @@ var require_input = __commonJS((exports, module) => {
238319
238932
  return this;
238320
238933
  } else {
238321
238934
  if (this._isStreamInput()) {
238322
- return new Promise((resolve10, reject) => {
238935
+ return new Promise((resolve11, reject) => {
238323
238936
  this.on("finish", function() {
238324
238937
  this._flattenBufferIn();
238325
238938
  sharp.stats(this.options, (err, stats2) => {
238326
238939
  if (err) {
238327
238940
  reject(is2.nativeError(err, stack));
238328
238941
  } else {
238329
- resolve10(stats2);
238942
+ resolve11(stats2);
238330
238943
  }
238331
238944
  });
238332
238945
  });
238333
238946
  });
238334
238947
  } else {
238335
- return new Promise((resolve10, reject) => {
238948
+ return new Promise((resolve11, reject) => {
238336
238949
  sharp.stats(this.options, (err, stats2) => {
238337
238950
  if (err) {
238338
238951
  reject(is2.nativeError(err, stack));
238339
238952
  } else {
238340
- resolve10(stats2);
238953
+ resolve11(stats2);
238341
238954
  }
238342
238955
  });
238343
238956
  });
@@ -239202,7 +239815,7 @@ var require_operation = __commonJS((exports, module) => {
239202
239815
  // node_modules/.pnpm/@img+colour@1.0.0/node_modules/@img/colour/color.cjs
239203
239816
  var require_color = __commonJS((exports, module) => {
239204
239817
  var __defProp3 = Object.defineProperty;
239205
- var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
239818
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
239206
239819
  var __getOwnPropNames3 = Object.getOwnPropertyNames;
239207
239820
  var __hasOwnProp3 = Object.prototype.hasOwnProperty;
239208
239821
  var __export3 = (target, all2) => {
@@ -239213,16 +239826,16 @@ var require_color = __commonJS((exports, module) => {
239213
239826
  if (from && typeof from === "object" || typeof from === "function") {
239214
239827
  for (let key of __getOwnPropNames3(from))
239215
239828
  if (!__hasOwnProp3.call(to, key) && key !== except)
239216
- __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
239829
+ __defProp3(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
239217
239830
  }
239218
239831
  return to;
239219
239832
  };
239220
- var __toCommonJS2 = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
239833
+ var __toCommonJS = (mod) => __copyProps(__defProp3({}, "__esModule", { value: true }), mod);
239221
239834
  var index_exports = {};
239222
239835
  __export3(index_exports, {
239223
239836
  default: () => index_default
239224
239837
  });
239225
- module.exports = __toCommonJS2(index_exports);
239838
+ module.exports = __toCommonJS(index_exports);
239226
239839
  var color_name_default = {
239227
239840
  aliceblue: [240, 248, 255],
239228
239841
  antiquewhite: [250, 235, 215],
@@ -241736,7 +242349,7 @@ var require_output = __commonJS((exports, module) => {
241736
242349
  return this;
241737
242350
  } else {
241738
242351
  if (this._isStreamInput()) {
241739
- return new Promise((resolve10, reject) => {
242352
+ return new Promise((resolve11, reject) => {
241740
242353
  this.once("finish", () => {
241741
242354
  this._flattenBufferIn();
241742
242355
  sharp.pipeline(this.options, (err, data, info) => {
@@ -241744,24 +242357,24 @@ var require_output = __commonJS((exports, module) => {
241744
242357
  reject(is2.nativeError(err, stack));
241745
242358
  } else {
241746
242359
  if (this.options.resolveWithObject) {
241747
- resolve10({ data, info });
242360
+ resolve11({ data, info });
241748
242361
  } else {
241749
- resolve10(data);
242362
+ resolve11(data);
241750
242363
  }
241751
242364
  }
241752
242365
  });
241753
242366
  });
241754
242367
  });
241755
242368
  } else {
241756
- return new Promise((resolve10, reject) => {
242369
+ return new Promise((resolve11, reject) => {
241757
242370
  sharp.pipeline(this.options, (err, data, info) => {
241758
242371
  if (err) {
241759
242372
  reject(is2.nativeError(err, stack));
241760
242373
  } else {
241761
242374
  if (this.options.resolveWithObject) {
241762
- resolve10({ data, info });
242375
+ resolve11({ data, info });
241763
242376
  } else {
241764
- resolve10(data);
242377
+ resolve11(data);
241765
242378
  }
241766
242379
  }
241767
242380
  });
@@ -241997,7 +242610,7 @@ var init_image3 = __esm(() => {
241997
242610
 
241998
242611
  // node_modules/.pnpm/ink-picture@1.3.3_ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4__react@19.2.4/node_modules/ink-picture/build/utils/queryEscapeSequence.js
241999
242612
  function queryEscapeSequence(message, stdin, stdout, setRawMode) {
242000
- return new Promise((resolve10) => {
242613
+ return new Promise((resolve11) => {
242001
242614
  const responseTimeout = 100;
242002
242615
  let responseTimeoutId = undefined;
242003
242616
  const timeoutBetweenReplies = 50;
@@ -242025,18 +242638,18 @@ function queryEscapeSequence(message, stdin, stdout, setRawMode) {
242025
242638
  runningReply += data;
242026
242639
  timeoutBetweenRepliesId = setTimeout(() => {
242027
242640
  restoreState();
242028
- resolve10(runningReply.length > 0 ? runningReply : undefined);
242641
+ resolve11(runningReply.length > 0 ? runningReply : undefined);
242029
242642
  }, timeoutBetweenReplies);
242030
242643
  };
242031
242644
  const onClose = () => {
242032
242645
  restoreState();
242033
- resolve10(runningReply.length > 0 ? runningReply : undefined);
242646
+ resolve11(runningReply.length > 0 ? runningReply : undefined);
242034
242647
  };
242035
242648
  stdin.on("data", onData);
242036
242649
  stdin.on("close", onClose);
242037
242650
  responseTimeoutId = setTimeout(() => {
242038
242651
  restoreState();
242039
- resolve10(undefined);
242652
+ resolve11(undefined);
242040
242653
  }, responseTimeout);
242041
242654
  stdout.write(message);
242042
242655
  });
@@ -242046,6 +242659,148 @@ var init_queryEscapeSequence = __esm(() => {
242046
242659
  queryEscapeSequence_default = queryEscapeSequence;
242047
242660
  });
242048
242661
 
242662
+ // node_modules/.pnpm/supports-color@10.2.2/node_modules/supports-color/index.js
242663
+ import process14 from "process";
242664
+ import os4 from "os";
242665
+ import tty3 from "tty";
242666
+ function hasFlag2(flag, argv = globalThis.Deno ? globalThis.Deno.args : process14.argv) {
242667
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
242668
+ const position2 = argv.indexOf(prefix + flag);
242669
+ const terminatorPosition = argv.indexOf("--");
242670
+ return position2 !== -1 && (terminatorPosition === -1 || position2 < terminatorPosition);
242671
+ }
242672
+ function envForceColor2() {
242673
+ if (!("FORCE_COLOR" in env4)) {
242674
+ return;
242675
+ }
242676
+ if (env4.FORCE_COLOR === "true") {
242677
+ return 1;
242678
+ }
242679
+ if (env4.FORCE_COLOR === "false") {
242680
+ return 0;
242681
+ }
242682
+ if (env4.FORCE_COLOR.length === 0) {
242683
+ return 1;
242684
+ }
242685
+ const level = Math.min(Number.parseInt(env4.FORCE_COLOR, 10), 3);
242686
+ if (![0, 1, 2, 3].includes(level)) {
242687
+ return;
242688
+ }
242689
+ return level;
242690
+ }
242691
+ function translateLevel2(level) {
242692
+ if (level === 0) {
242693
+ return false;
242694
+ }
242695
+ return {
242696
+ level,
242697
+ hasBasic: true,
242698
+ has256: level >= 2,
242699
+ has16m: level >= 3
242700
+ };
242701
+ }
242702
+ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
242703
+ const noFlagForceColor = envForceColor2();
242704
+ if (noFlagForceColor !== undefined) {
242705
+ flagForceColor2 = noFlagForceColor;
242706
+ }
242707
+ const forceColor = sniffFlags ? flagForceColor2 : noFlagForceColor;
242708
+ if (forceColor === 0) {
242709
+ return 0;
242710
+ }
242711
+ if (sniffFlags) {
242712
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
242713
+ return 3;
242714
+ }
242715
+ if (hasFlag2("color=256")) {
242716
+ return 2;
242717
+ }
242718
+ }
242719
+ if ("TF_BUILD" in env4 && "AGENT_NAME" in env4) {
242720
+ return 1;
242721
+ }
242722
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
242723
+ return 0;
242724
+ }
242725
+ const min = forceColor || 0;
242726
+ if (env4.TERM === "dumb") {
242727
+ return min;
242728
+ }
242729
+ if (process14.platform === "win32") {
242730
+ const osRelease = os4.release().split(".");
242731
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
242732
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
242733
+ }
242734
+ return 1;
242735
+ }
242736
+ if ("CI" in env4) {
242737
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env4))) {
242738
+ return 3;
242739
+ }
242740
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign2) => (sign2 in env4)) || env4.CI_NAME === "codeship") {
242741
+ return 1;
242742
+ }
242743
+ return min;
242744
+ }
242745
+ if ("TEAMCITY_VERSION" in env4) {
242746
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env4.TEAMCITY_VERSION) ? 1 : 0;
242747
+ }
242748
+ if (env4.COLORTERM === "truecolor") {
242749
+ return 3;
242750
+ }
242751
+ if (env4.TERM === "xterm-kitty") {
242752
+ return 3;
242753
+ }
242754
+ if (env4.TERM === "xterm-ghostty") {
242755
+ return 3;
242756
+ }
242757
+ if (env4.TERM === "wezterm") {
242758
+ return 3;
242759
+ }
242760
+ if ("TERM_PROGRAM" in env4) {
242761
+ const version3 = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
242762
+ switch (env4.TERM_PROGRAM) {
242763
+ case "iTerm.app": {
242764
+ return version3 >= 3 ? 3 : 2;
242765
+ }
242766
+ case "Apple_Terminal": {
242767
+ return 2;
242768
+ }
242769
+ }
242770
+ }
242771
+ if (/-256(color)?$/i.test(env4.TERM)) {
242772
+ return 2;
242773
+ }
242774
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env4.TERM)) {
242775
+ return 1;
242776
+ }
242777
+ if ("COLORTERM" in env4) {
242778
+ return 1;
242779
+ }
242780
+ return min;
242781
+ }
242782
+ function createSupportsColor2(stream, options2 = {}) {
242783
+ const level = _supportsColor2(stream, {
242784
+ streamIsTTY: stream && stream.isTTY,
242785
+ ...options2
242786
+ });
242787
+ return translateLevel2(level);
242788
+ }
242789
+ var env4, flagForceColor2, supportsColor2, supports_color_default2;
242790
+ var init_supports_color2 = __esm(() => {
242791
+ ({ env: env4 } = process14);
242792
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
242793
+ flagForceColor2 = 0;
242794
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
242795
+ flagForceColor2 = 1;
242796
+ }
242797
+ supportsColor2 = {
242798
+ stdout: createSupportsColor2({ isTTY: tty3.isatty(1) }),
242799
+ stderr: createSupportsColor2({ isTTY: tty3.isatty(2) })
242800
+ };
242801
+ supports_color_default2 = supportsColor2;
242802
+ });
242803
+
242049
242804
  // node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
242050
242805
  import process15 from "process";
242051
242806
  function isUnicodeSupported() {
@@ -242147,12 +242902,12 @@ var require_isexe = __commonJS((exports, module) => {
242147
242902
  if (typeof Promise !== "function") {
242148
242903
  throw new TypeError("callback not provided");
242149
242904
  }
242150
- return new Promise(function(resolve10, reject) {
242905
+ return new Promise(function(resolve11, reject) {
242151
242906
  isexe(path5, options2 || {}, function(er, is2) {
242152
242907
  if (er) {
242153
242908
  reject(er);
242154
242909
  } else {
242155
- resolve10(is2);
242910
+ resolve11(is2);
242156
242911
  }
242157
242912
  });
242158
242913
  });
@@ -242214,27 +242969,27 @@ var require_which = __commonJS((exports, module) => {
242214
242969
  opt = {};
242215
242970
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
242216
242971
  const found = [];
242217
- const step = (i6) => new Promise((resolve10, reject) => {
242972
+ const step = (i6) => new Promise((resolve11, reject) => {
242218
242973
  if (i6 === pathEnv.length)
242219
- return opt.all && found.length ? resolve10(found) : reject(getNotFoundError(cmd));
242974
+ return opt.all && found.length ? resolve11(found) : reject(getNotFoundError(cmd));
242220
242975
  const ppRaw = pathEnv[i6];
242221
242976
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
242222
242977
  const pCmd = path5.join(pathPart, cmd);
242223
242978
  const p5 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
242224
- resolve10(subStep(p5, i6, 0));
242979
+ resolve11(subStep(p5, i6, 0));
242225
242980
  });
242226
- const subStep = (p5, i6, ii) => new Promise((resolve10, reject) => {
242981
+ const subStep = (p5, i6, ii) => new Promise((resolve11, reject) => {
242227
242982
  if (ii === pathExt.length)
242228
- return resolve10(step(i6 + 1));
242983
+ return resolve11(step(i6 + 1));
242229
242984
  const ext = pathExt[ii];
242230
242985
  isexe(p5 + ext, { pathExt: pathExtExe }, (er, is2) => {
242231
242986
  if (!er && is2) {
242232
242987
  if (opt.all)
242233
242988
  found.push(p5 + ext);
242234
242989
  else
242235
- return resolve10(p5 + ext);
242990
+ return resolve11(p5 + ext);
242236
242991
  }
242237
- return resolve10(subStep(p5, i6, ii + 1));
242992
+ return resolve11(subStep(p5, i6, ii + 1));
242238
242993
  });
242239
242994
  });
242240
242995
  return cb2 ? step(0).then((res) => cb2(null, res), cb2) : step(0);
@@ -243121,7 +243876,7 @@ var require_kill = __commonJS((exports, module) => {
243121
243876
  return spawnedPromise;
243122
243877
  }
243123
243878
  let timeoutId;
243124
- const timeoutPromise = new Promise((resolve10, reject) => {
243879
+ const timeoutPromise = new Promise((resolve11, reject) => {
243125
243880
  timeoutId = setTimeout(() => {
243126
243881
  timeoutKill(spawned, killSignal, reject);
243127
243882
  }, timeout);
@@ -243232,7 +243987,7 @@ var require_get_stream = __commonJS((exports, module) => {
243232
243987
  };
243233
243988
  const { maxBuffer } = options2;
243234
243989
  const stream2 = bufferStream(options2);
243235
- await new Promise((resolve10, reject) => {
243990
+ await new Promise((resolve11, reject) => {
243236
243991
  const rejectPromise = (error4) => {
243237
243992
  if (error4 && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
243238
243993
  error4.bufferedData = stream2.getBufferedValue();
@@ -243242,7 +243997,7 @@ var require_get_stream = __commonJS((exports, module) => {
243242
243997
  (async () => {
243243
243998
  try {
243244
243999
  await streamPipelinePromisified(inputStream, stream2);
243245
- resolve10();
244000
+ resolve11();
243246
244001
  } catch (error4) {
243247
244002
  rejectPromise(error4);
243248
244003
  }
@@ -243389,9 +244144,9 @@ var require_promise = __commonJS((exports, module) => {
243389
244144
  return spawned;
243390
244145
  };
243391
244146
  var getSpawnedPromise = (spawned) => {
243392
- return new Promise((resolve10, reject) => {
244147
+ return new Promise((resolve11, reject) => {
243393
244148
  spawned.on("exit", (exitCode, signal) => {
243394
- resolve10({ exitCode, signal });
244149
+ resolve11({ exitCode, signal });
243395
244150
  });
243396
244151
  spawned.on("error", (error4) => {
243397
244152
  reject(error4);
@@ -243683,13 +244438,13 @@ async function appPath(appName) {
243683
244438
  throw new TypeError("Please supply an app name or bundle identifier");
243684
244439
  }
243685
244440
  try {
243686
- const { stdout } = await import_execa.default("./main", [appName], { cwd: dirname19 });
244441
+ const { stdout } = await import_execa.default("./main", [appName], { cwd: dirname20 });
243687
244442
  return stdout;
243688
244443
  } catch (error4) {
243689
244444
  throw improveError(error4);
243690
244445
  }
243691
244446
  }
243692
- var import_execa, dirname19, improveError = (error4) => {
244447
+ var import_execa, dirname20, improveError = (error4) => {
243693
244448
  if (error4.exitCode === 2) {
243694
244449
  error4.message = "Couldn't find the app";
243695
244450
  }
@@ -243697,7 +244452,7 @@ var import_execa, dirname19, improveError = (error4) => {
243697
244452
  };
243698
244453
  var init_app_path = __esm(() => {
243699
244454
  import_execa = __toESM(require_execa(), 1);
243700
- dirname19 = path5.dirname(fileURLToPath8(import.meta.url));
244455
+ dirname20 = path5.dirname(fileURLToPath8(import.meta.url));
243701
244456
  appPath.sync = (appName) => {
243702
244457
  if (process.platform !== "darwin") {
243703
244458
  throw new Error("macOS only");
@@ -243706,7 +244461,7 @@ var init_app_path = __esm(() => {
243706
244461
  throw new TypeError("Please supply an app name or bundle identifier");
243707
244462
  }
243708
244463
  try {
243709
- return import_execa.default.sync("./main", [appName], { cwd: dirname19 }).stdout;
244464
+ return import_execa.default.sync("./main", [appName], { cwd: dirname20 }).stdout;
243710
244465
  } catch (error4) {
243711
244466
  throw improveError(error4);
243712
244467
  }
@@ -251985,7 +252740,7 @@ var import_react31, TerminalInfoContext, TerminalInfoProvider = ({ children: chi
251985
252740
  };
251986
252741
  }
251987
252742
  const supportsUnicode = isUnicodeSupported();
251988
- const isColorSupported = !!supports_color_default.stdout;
252743
+ const isColorSupported = !!supports_color_default2.stdout;
251989
252744
  const kittyResponse = await queryEscapeSequence_default("\x1B_Gi=31,s=1,v=1,a=q,t=d,f=24;AAAA\x1B\\ \x1B[c", stdin, stdout, setRawMode);
251990
252745
  let supportsKittyGraphics = false;
251991
252746
  if (kittyResponse && kittyResponse.includes("OK")) {
@@ -252057,7 +252812,7 @@ var import_react31, TerminalInfoContext, TerminalInfoProvider = ({ children: chi
252057
252812
  };
252058
252813
  var init_TerminalInfo = __esm(async () => {
252059
252814
  init_queryEscapeSequence();
252060
- init_supports_color();
252815
+ init_supports_color2();
252061
252816
  init_is_unicode_supported();
252062
252817
  init_iterm2_version();
252063
252818
  await init_build2();
@@ -257025,8 +257780,8 @@ await __promiseAll([
257025
257780
  ]);
257026
257781
  var import_react86 = __toESM(require_react(), 1);
257027
257782
  import { spawn as spawn6 } from "child_process";
257028
- import { join as join47 } from "path";
257029
- import { homedir as homedir25 } from "os";
257783
+ import { join as join48 } from "path";
257784
+ import { homedir as homedir26 } from "os";
257030
257785
 
257031
257786
  // packages/terminal/src/components/Input.tsx
257032
257787
  await init_build2();
@@ -259656,7 +260411,7 @@ function Messages5({
259656
260411
  queuedMessageIds,
259657
260412
  verboseTools = false
259658
260413
  }) {
259659
- const [now3, setNow] = import_react41.useState(Date.now());
260414
+ const [now4, setNow] = import_react41.useState(Date.now());
259660
260415
  const messageGroups = import_react41.useMemo(() => groupConsecutiveToolMessages(messages2), [messages2]);
259661
260416
  const messageItems = import_react41.useMemo(() => {
259662
260417
  return messageGroups.map((group) => group.type === "single" ? { kind: "message", message: group.message } : { kind: "grouped", messages: group.messages });
@@ -259733,7 +260488,7 @@ function Messages5({
259733
260488
  }, entry.id, true, undefined, this)),
259734
260489
  visibleActivity.some((entry) => entry.type === "tool_call") && /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(ActiveToolsPanel, {
259735
260490
  activityLog: visibleActivity,
259736
- now: now3,
260491
+ now: now4,
259737
260492
  verboseTools
259738
260493
  }, undefined, false, undefined, this),
259739
260494
  visibleStreaming.map((message) => /* @__PURE__ */ jsx_dev_runtime4.jsxDEV(MessageBubble, {
@@ -259896,7 +260651,7 @@ function MessageBubble({ message, queuedMessageIds, verboseTools }) {
259896
260651
  ]
259897
260652
  }, undefined, true, undefined, this);
259898
260653
  }
259899
- function ActiveToolsPanel({ activityLog, now: now3, verboseTools }) {
260654
+ function ActiveToolsPanel({ activityLog, now: now4, verboseTools }) {
259900
260655
  const toolCalls = import_react41.useMemo(() => {
259901
260656
  const calls = [];
259902
260657
  const resultMap = new Map;
@@ -259908,7 +260663,7 @@ function ActiveToolsPanel({ activityLog, now: now3, verboseTools }) {
259908
260663
  });
259909
260664
  }
259910
260665
  }
259911
- const now4 = Date.now();
260666
+ const now5 = Date.now();
259912
260667
  for (const entry of activityLog) {
259913
260668
  if (entry.type === "tool_call" && entry.toolCall) {
259914
260669
  const resultInfo = resultMap.get(entry.toolCall.id);
@@ -259916,7 +260671,7 @@ function ActiveToolsPanel({ activityLog, now: now3, verboseTools }) {
259916
260671
  if (resultInfo) {
259917
260672
  status = resultInfo.result.isError ? "failed" : "succeeded";
259918
260673
  } else {
259919
- const elapsed = now4 - entry.timestamp;
260674
+ const elapsed = now5 - entry.timestamp;
259920
260675
  status = elapsed > 60000 ? "failed" : "running";
259921
260676
  }
259922
260677
  calls.push({
@@ -259970,7 +260725,7 @@ function ActiveToolsPanel({ activityLog, now: now3, verboseTools }) {
259970
260725
  children: toolCalls.map((call) => {
259971
260726
  const icon = call.status === "running" ? "\u25CB" : call.status === "failed" ? "\u2717" : "\u25CF";
259972
260727
  const iconColor = call.status === "running" ? "gray" : call.status === "failed" ? "red" : "green";
259973
- const elapsedMs = (call.endTime ?? now3) - call.startTime;
260728
+ const elapsedMs = (call.endTime ?? now4) - call.startTime;
259974
260729
  const elapsedText = formatDuration3(elapsedMs);
259975
260730
  const title = getToolCallTitle(call.toolCall);
259976
260731
  const prefix = call.status === "running" ? "Calling " : "";
@@ -260854,7 +261609,7 @@ function Status({
260854
261609
  if (recentTools.length === 0)
260855
261610
  return "";
260856
261611
  const counts = new Map;
260857
- const now3 = Date.now();
261612
+ const now4 = Date.now();
260858
261613
  for (const tool2 of recentTools) {
260859
261614
  const existing = counts.get(tool2.name) || { count: 0, failed: 0, running: 0, maxElapsed: 0 };
260860
261615
  existing.count++;
@@ -260863,7 +261618,7 @@ function Status({
260863
261618
  if (tool2.status === "running") {
260864
261619
  existing.running++;
260865
261620
  if (tool2.startedAt) {
260866
- const elapsedSec = Math.floor((now3 - tool2.startedAt) / 1000);
261621
+ const elapsedSec = Math.floor((now4 - tool2.startedAt) / 1000);
260867
261622
  existing.maxElapsed = Math.max(existing.maxElapsed, elapsedSec);
260868
261623
  }
260869
261624
  }
@@ -260928,7 +261683,7 @@ function Status({
260928
261683
  // packages/terminal/src/components/Spinner.tsx
260929
261684
  await init_build2();
260930
261685
 
260931
- // node_modules/.pnpm/ink-spinner@5.0.0_ink@6.7.0_@types+react@19.2.14_react@19.2.4__react@19.2.4/node_modules/ink-spinner/build/index.js
261686
+ // node_modules/.pnpm/ink-spinner@5.0.0_ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4__react@19.2.4/node_modules/ink-spinner/build/index.js
260932
261687
  await init_build2();
260933
261688
  var import_react43 = __toESM(require_react(), 1);
260934
261689
  var import_cli_spinners = __toESM(require_cli_spinners(), 1);
@@ -261132,8 +261887,8 @@ var import_react45 = __toESM(require_react(), 1);
261132
261887
  var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
261133
261888
  function formatSessionTime(timestamp) {
261134
261889
  const date3 = new Date(timestamp);
261135
- const now3 = new Date;
261136
- const isToday = date3.toDateString() === now3.toDateString();
261890
+ const now4 = new Date;
261891
+ const isToday = date3.toDateString() === now4.toDateString();
261137
261892
  if (isToday) {
261138
261893
  return date3.toLocaleTimeString("en-US", {
261139
261894
  hour: "numeric",
@@ -262258,7 +263013,7 @@ function RecoveryPanel({ sessions, onRecover, onStartFresh }) {
262258
263013
  await init_build2();
262259
263014
  var import_react49 = __toESM(require_react(), 1);
262260
263015
 
262261
- // node_modules/.pnpm/ink-text-input@6.0.0_ink@6.7.0_@types+react@19.2.14_react@19.2.4__react@19.2.4/node_modules/ink-text-input/build/index.js
263016
+ // node_modules/.pnpm/ink-text-input@6.0.0_ink@6.7.0_@types+react@19.2.14_react-devtools-core@7.0.1_react@19.2.4__react@19.2.4/node_modules/ink-text-input/build/index.js
262262
263017
  init_source();
262263
263018
  await init_build2();
262264
263019
  var import_react48 = __toESM(require_react(), 1);
@@ -263322,8 +264077,8 @@ var PRIORITY_COLORS = {
263322
264077
  };
263323
264078
  function formatTaskTime(timestamp) {
263324
264079
  const date3 = new Date(timestamp);
263325
- const now3 = new Date;
263326
- const isToday = date3.toDateString() === now3.toDateString();
264080
+ const now4 = new Date;
264081
+ const isToday = date3.toDateString() === now4.toDateString();
263327
264082
  if (isToday) {
263328
264083
  return date3.toLocaleTimeString("en-US", {
263329
264084
  hour: "numeric",
@@ -264172,8 +264927,8 @@ init_src2();
264172
264927
  var jsx_dev_runtime17 = __toESM(require_jsx_dev_runtime(), 1);
264173
264928
  function formatTime(timestamp) {
264174
264929
  const date3 = new Date(timestamp);
264175
- const now3 = new Date;
264176
- const isToday = date3.toDateString() === now3.toDateString();
264930
+ const now4 = new Date;
264931
+ const isToday = date3.toDateString() === now4.toDateString();
264177
264932
  if (isToday) {
264178
264933
  return date3.toLocaleTimeString("en-US", {
264179
264934
  hour: "numeric",
@@ -269302,8 +270057,8 @@ function getVisibleRange3(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_IT
269302
270057
  }
269303
270058
  function formatRelativeTime2(isoDate) {
269304
270059
  const date3 = new Date(isoDate);
269305
- const now3 = new Date;
269306
- const diffMs = now3.getTime() - date3.getTime();
270060
+ const now4 = new Date;
270061
+ const diffMs = now4.getTime() - date3.getTime();
269307
270062
  const diffMin = Math.floor(diffMs / 60000);
269308
270063
  const diffHours = Math.floor(diffMin / 60);
269309
270064
  const diffDays = Math.floor(diffHours / 24);
@@ -269938,8 +270693,8 @@ function getVisibleRange4(selectedIndex, totalItems, maxVisible = MAX_VISIBLE_IT
269938
270693
  }
269939
270694
  function formatRelativeTime3(isoDate) {
269940
270695
  const date3 = new Date(isoDate);
269941
- const now3 = new Date;
269942
- const diffMs = now3.getTime() - date3.getTime();
270696
+ const now4 = new Date;
270697
+ const diffMs = now4.getTime() - date3.getTime();
269943
270698
  const diffMin = Math.floor(diffMs / 60000);
269944
270699
  const diffHours = Math.floor(diffMin / 60);
269945
270700
  const diffDays = Math.floor(diffHours / 24);
@@ -271720,10 +272475,10 @@ function ChannelsPanel({ manager, onClose, activePersonId, activePersonName, act
271720
272475
  onChange: handleChatInputChange,
271721
272476
  onSubmit: () => {
271722
272477
  if (chatInput.trim()) {
271723
- const now3 = Date.now();
271724
- if (now3 - lastSubmitTimeRef.current < 500)
272478
+ const now4 = Date.now();
272479
+ if (now4 - lastSubmitTimeRef.current < 500)
271725
272480
  return;
271726
- lastSubmitTimeRef.current = now3;
272481
+ lastSubmitTimeRef.current = now4;
271727
272482
  const msg = chatInput.trim();
271728
272483
  const result = activePersonId && activePersonName ? manager.sendAs(selectedChannel.id, msg, activePersonId, activePersonName) : manager.send(selectedChannel.id, msg);
271729
272484
  if (result.success) {
@@ -279622,7 +280377,7 @@ function cloneConfig(config2) {
279622
280377
  return JSON.parse(JSON.stringify(config2 || {}));
279623
280378
  }
279624
280379
  function createEmptyUsage2() {
279625
- const now3 = new Date().toISOString();
280380
+ const now4 = new Date().toISOString();
279626
280381
  return {
279627
280382
  inputTokens: 0,
279628
280383
  outputTokens: 0,
@@ -279630,8 +280385,8 @@ function createEmptyUsage2() {
279630
280385
  llmCalls: 0,
279631
280386
  toolCalls: 0,
279632
280387
  durationMs: 0,
279633
- periodStartedAt: now3,
279634
- lastUpdatedAt: now3
280388
+ periodStartedAt: now4,
280389
+ lastUpdatedAt: now4
279635
280390
  };
279636
280391
  }
279637
280392
  function createDraftStatus(scope, limits2) {
@@ -280449,8 +281204,8 @@ function formatUptime(seconds) {
280449
281204
  }
280450
281205
  function formatTimestamp(iso) {
280451
281206
  const date3 = new Date(iso);
280452
- const now3 = new Date;
280453
- const diff2 = now3.getTime() - date3.getTime();
281207
+ const now4 = new Date;
281208
+ const diff2 = now4.getTime() - date3.getTime();
280454
281209
  if (diff2 < 60000)
280455
281210
  return "just now";
280456
281211
  if (diff2 < 3600000)
@@ -281310,8 +282065,8 @@ function getActionDisplay(schedule) {
281310
282065
  function formatRelativeTime9(timestamp) {
281311
282066
  if (!timestamp)
281312
282067
  return "n/a";
281313
- const now3 = Date.now();
281314
- const diff2 = timestamp - now3;
282068
+ const now4 = Date.now();
282069
+ const diff2 = timestamp - now4;
281315
282070
  const absDiff = Math.abs(diff2);
281316
282071
  const isPast = diff2 < 0;
281317
282072
  const seconds = Math.floor(absDiff / 1000);
@@ -283798,8 +284553,8 @@ var import_react77 = __toESM(require_react(), 1);
283798
284553
  var jsx_dev_runtime41 = __toESM(require_jsx_dev_runtime(), 1);
283799
284554
  function formatProjectTime(timestamp) {
283800
284555
  const date3 = new Date(timestamp);
283801
- const now3 = new Date;
283802
- const isToday = date3.toDateString() === now3.toDateString();
284556
+ const now4 = new Date;
284557
+ const isToday = date3.toDateString() === now4.toDateString();
283803
284558
  if (isToday) {
283804
284559
  return date3.toLocaleTimeString("en-US", {
283805
284560
  hour: "numeric",
@@ -284202,8 +284957,8 @@ function getNextStatus(current) {
284202
284957
  }
284203
284958
  function formatPlanTime(timestamp) {
284204
284959
  const date3 = new Date(timestamp);
284205
- const now3 = new Date;
284206
- const isToday = date3.toDateString() === now3.toDateString();
284960
+ const now4 = new Date;
284961
+ const isToday = date3.toDateString() === now4.toDateString();
284207
284962
  if (isToday) {
284208
284963
  return date3.toLocaleTimeString("en-US", {
284209
284964
  hour: "numeric",
@@ -287465,9 +288220,9 @@ var EVENT_TYPE_LABELS = {
287465
288220
  validation_failure: "Validation Failure"
287466
288221
  };
287467
288222
  function formatRelativeTime11(isoTimestamp) {
287468
- const now3 = Date.now();
288223
+ const now4 = Date.now();
287469
288224
  const ts = new Date(isoTimestamp).getTime();
287470
- const diff2 = now3 - ts;
288225
+ const diff2 = now4 - ts;
287471
288226
  const seconds = Math.floor(diff2 / 1000);
287472
288227
  const minutes = Math.floor(seconds / 60);
287473
288228
  const hours = Math.floor(minutes / 60);
@@ -287834,9 +288589,9 @@ var jsx_dev_runtime49 = __toESM(require_jsx_dev_runtime(), 1);
287834
288589
  function formatRelativeTime12(iso) {
287835
288590
  if (!iso)
287836
288591
  return "n/a";
287837
- const now3 = Date.now();
288592
+ const now4 = Date.now();
287838
288593
  const ts = new Date(iso).getTime();
287839
- const diff2 = now3 - ts;
288594
+ const diff2 = now4 - ts;
287840
288595
  const seconds = Math.floor(diff2 / 1000);
287841
288596
  const minutes = Math.floor(seconds / 60);
287842
288597
  const hours = Math.floor(minutes / 60);
@@ -288478,7 +289233,7 @@ await init_src3();
288478
289233
  // packages/terminal/src/lib/budgets.ts
288479
289234
  init_src2();
288480
289235
  await init_src3();
288481
- import { join as join46 } from "path";
289236
+ import { join as join47 } from "path";
288482
289237
  import { mkdir as mkdir9, readFile as readFile10, writeFile as writeFile9 } from "fs/promises";
288483
289238
  var PROFILES_FILE = "budgets.json";
288484
289239
  var SESSION_MAP_FILE = "budget-sessions.json";
@@ -288486,7 +289241,7 @@ var DEFAULT_PROFILE_ID = "default";
288486
289241
  function cloneConfig2(config2) {
288487
289242
  return JSON.parse(JSON.stringify(config2 || DEFAULT_BUDGET_CONFIG));
288488
289243
  }
288489
- async function ensureDir2(baseDir) {
289244
+ async function ensureDir3(baseDir) {
288490
289245
  await mkdir9(baseDir, { recursive: true });
288491
289246
  }
288492
289247
  async function readJsonFile2(path7) {
@@ -288501,19 +289256,19 @@ async function writeJsonFile(path7, data) {
288501
289256
  await writeFile9(path7, JSON.stringify(data, null, 2), "utf-8");
288502
289257
  }
288503
289258
  async function loadBudgetProfiles(baseDir, seedConfig) {
288504
- await ensureDir2(baseDir);
288505
- const path7 = join46(baseDir, PROFILES_FILE);
289259
+ await ensureDir3(baseDir);
289260
+ const path7 = join47(baseDir, PROFILES_FILE);
288506
289261
  const data = await readJsonFile2(path7);
288507
289262
  const profiles = Array.isArray(data?.profiles) ? data.profiles : [];
288508
289263
  if (profiles.length === 0) {
288509
- const now3 = Date.now();
289264
+ const now4 = Date.now();
288510
289265
  const defaultProfile = {
288511
289266
  id: DEFAULT_PROFILE_ID,
288512
289267
  name: "Default",
288513
289268
  description: "Default budget profile",
288514
289269
  config: cloneConfig2(seedConfig),
288515
- createdAt: now3,
288516
- updatedAt: now3
289270
+ createdAt: now4,
289271
+ updatedAt: now4
288517
289272
  };
288518
289273
  await writeJsonFile(path7, { profiles: [defaultProfile] });
288519
289274
  return [defaultProfile];
@@ -288521,20 +289276,20 @@ async function loadBudgetProfiles(baseDir, seedConfig) {
288521
289276
  return profiles;
288522
289277
  }
288523
289278
  async function saveBudgetProfiles(baseDir, profiles) {
288524
- await ensureDir2(baseDir);
288525
- const path7 = join46(baseDir, PROFILES_FILE);
289279
+ await ensureDir3(baseDir);
289280
+ const path7 = join47(baseDir, PROFILES_FILE);
288526
289281
  await writeJsonFile(path7, { profiles });
288527
289282
  }
288528
289283
  async function createBudgetProfile(baseDir, name, config2, description) {
288529
289284
  const profiles = await loadBudgetProfiles(baseDir, config2);
288530
- const now3 = Date.now();
289285
+ const now4 = Date.now();
288531
289286
  const profile = {
288532
289287
  id: `budget_${generateId().slice(0, 8)}`,
288533
289288
  name: name.trim(),
288534
289289
  description: description?.trim() || undefined,
288535
289290
  config: cloneConfig2(config2),
288536
- createdAt: now3,
288537
- updatedAt: now3
289291
+ createdAt: now4,
289292
+ updatedAt: now4
288538
289293
  };
288539
289294
  profiles.push(profile);
288540
289295
  await saveBudgetProfiles(baseDir, profiles);
@@ -288559,14 +289314,14 @@ async function deleteBudgetProfile(baseDir, id) {
288559
289314
  return true;
288560
289315
  }
288561
289316
  async function loadSessionBudgetMap(baseDir) {
288562
- await ensureDir2(baseDir);
288563
- const path7 = join46(baseDir, SESSION_MAP_FILE);
289317
+ await ensureDir3(baseDir);
289318
+ const path7 = join47(baseDir, SESSION_MAP_FILE);
288564
289319
  const data = await readJsonFile2(path7);
288565
289320
  return data || {};
288566
289321
  }
288567
289322
  async function saveSessionBudgetMap(baseDir, map3) {
288568
- await ensureDir2(baseDir);
288569
- const path7 = join46(baseDir, SESSION_MAP_FILE);
289323
+ await ensureDir3(baseDir);
289324
+ const path7 = join47(baseDir, SESSION_MAP_FILE);
288570
289325
  await writeJsonFile(path7, map3);
288571
289326
  }
288572
289327
 
@@ -288592,7 +289347,7 @@ var HOOK_TYPE_SET = new Set(["command", "prompt", "assistant"]);
288592
289347
  var HOOK_LOCATION_SET = new Set(["project", "user", "local"]);
288593
289348
  var HOOK_EVENT_MAP = new Map(Array.from(HOOK_EVENT_SET).map((ev) => [ev.toLowerCase(), ev]));
288594
289349
  async function runShellCommand(command, cwd3) {
288595
- return new Promise((resolve10, reject) => {
289350
+ return new Promise((resolve11, reject) => {
288596
289351
  const child = spawn6(command, { cwd: cwd3, shell: true, env: process.env });
288597
289352
  const stdoutChunks = [];
288598
289353
  const stderrChunks = [];
@@ -288621,7 +289376,7 @@ async function runShellCommand(command, cwd3) {
288621
289376
  }
288622
289377
  child.on("error", (error4) => reject(error4));
288623
289378
  child.on("close", (code3) => {
288624
- resolve10({
289379
+ resolve11({
288625
289380
  stdout: Buffer.concat(stdoutChunks).toString("utf8").trimEnd(),
288626
289381
  stderr: Buffer.concat(stderrChunks).toString("utf8").trimEnd(),
288627
289382
  exitCode: code3,
@@ -288690,13 +289445,13 @@ function formatElapsedDuration(ms) {
288690
289445
  const secs = totalSeconds % 60;
288691
289446
  return `${mins}m ${secs}s`;
288692
289447
  }
288693
- function deepMerge2(target, source) {
289448
+ function deepMerge3(target, source) {
288694
289449
  const output = { ...target };
288695
289450
  for (const key of Object.keys(source)) {
288696
289451
  const sourceValue = source[key];
288697
289452
  const targetValue = target[key];
288698
289453
  if (sourceValue && typeof sourceValue === "object" && !Array.isArray(sourceValue) && targetValue && typeof targetValue === "object" && !Array.isArray(targetValue)) {
288699
- output[key] = deepMerge2(targetValue, sourceValue);
289454
+ output[key] = deepMerge3(targetValue, sourceValue);
288700
289455
  } else if (sourceValue !== undefined) {
288701
289456
  output[key] = sourceValue;
288702
289457
  }
@@ -288868,8 +289623,8 @@ function App2({ cwd: cwd3, version: version4 }) {
288868
289623
  const fileListCacheRef = import_react86.useRef({ files: [], timestamp: 0 });
288869
289624
  const searchFiles = import_react86.useCallback((query2) => {
288870
289625
  const cache7 = fileListCacheRef.current;
288871
- const now3 = Date.now();
288872
- if (now3 - cache7.timestamp > 30000 || cache7.files.length === 0) {
289626
+ const now4 = Date.now();
289627
+ if (now4 - cache7.timestamp > 30000 || cache7.files.length === 0) {
288873
289628
  try {
288874
289629
  const { execSync } = __require("child_process");
288875
289630
  let output;
@@ -288890,7 +289645,7 @@ function App2({ cwd: cwd3, version: version4 }) {
288890
289645
  }
288891
289646
  cache7.files = output.trim().split(`
288892
289647
  `).filter(Boolean).slice(0, 2000);
288893
- cache7.timestamp = now3;
289648
+ cache7.timestamp = now4;
288894
289649
  } catch {
288895
289650
  return [];
288896
289651
  }
@@ -288938,7 +289693,7 @@ function App2({ cwd: cwd3, version: version4 }) {
288938
289693
  setInlinePending((prev) => prev.filter((msg) => msg.id !== id));
288939
289694
  }, []);
288940
289695
  const beginAskUser = import_react86.useCallback((sessionId, request2) => {
288941
- return new Promise((resolve10, reject) => {
289696
+ return new Promise((resolve11, reject) => {
288942
289697
  if (askUserStateRef.current.has(sessionId)) {
288943
289698
  reject(new Error("Another interview is already in progress for this session."));
288944
289699
  return;
@@ -288948,7 +289703,7 @@ function App2({ cwd: cwd3, version: version4 }) {
288948
289703
  request: request2,
288949
289704
  index: 0,
288950
289705
  answers: {},
288951
- resolve: resolve10,
289706
+ resolve: resolve11,
288952
289707
  reject
288953
289708
  };
288954
289709
  askUserStateRef.current.set(sessionId, state);
@@ -289019,7 +289774,7 @@ function App2({ cwd: cwd3, version: version4 }) {
289019
289774
  }
289020
289775
  }, [activeSessionId]);
289021
289776
  const beginInterview = import_react86.useCallback((sessionId, request2) => {
289022
- return new Promise((resolve10, reject) => {
289777
+ return new Promise((resolve11, reject) => {
289023
289778
  if (interviewStateRef.current.has(sessionId)) {
289024
289779
  reject(new Error("Another interview is already in progress for this session."));
289025
289780
  return;
@@ -289036,7 +289791,7 @@ function App2({ cwd: cwd3, version: version4 }) {
289036
289791
  sessionId,
289037
289792
  interviewId,
289038
289793
  request: request2,
289039
- resolve: resolve10,
289794
+ resolve: resolve11,
289040
289795
  reject
289041
289796
  };
289042
289797
  interviewStateRef.current.set(sessionId, state);
@@ -289086,9 +289841,9 @@ function App2({ cwd: cwd3, version: version4 }) {
289086
289841
  }, [processingStartTime]);
289087
289842
  import_react86.useEffect(() => {
289088
289843
  if (isProcessing && !processingStartTime) {
289089
- const now3 = Date.now();
289090
- setProcessingStartTime(now3);
289091
- processingStartTimeRef.current = now3;
289844
+ const now4 = Date.now();
289845
+ setProcessingStartTime(now4);
289846
+ processingStartTimeRef.current = now4;
289092
289847
  }
289093
289848
  }, [isProcessing, processingStartTime]);
289094
289849
  import_react86.useEffect(() => {
@@ -290373,13 +291128,13 @@ function App2({ cwd: cwd3, version: version4 }) {
290373
291128
  });
290374
291129
  }, [recoverableSessions, createSessionFromRecovery, workspaceBaseDir]);
290375
291130
  const handleOnboardingComplete = import_react86.useCallback(async (result) => {
290376
- const { existsSync: existsSync30, mkdirSync: mkdirSync18, readFileSync: readFileSync17, writeFileSync: writeFileSync13, appendFileSync: appendFileSync5 } = await import("fs");
290377
- const secretsPath = join47(homedir25(), ".secrets");
291131
+ const { existsSync: existsSync30, mkdirSync: mkdirSync19, readFileSync: readFileSync18, writeFileSync: writeFileSync13, appendFileSync: appendFileSync5 } = await import("fs");
291132
+ const secretsPath = join48(homedir26(), ".secrets");
290378
291133
  const providerInfo = getProviderInfo(result.provider);
290379
291134
  const envName = providerInfo?.apiKeyEnv || "ANTHROPIC_API_KEY";
290380
291135
  const keyExport = `export ${envName}="${result.apiKey}"`;
290381
291136
  if (existsSync30(secretsPath)) {
290382
- const content3 = readFileSync17(secretsPath, "utf-8");
291137
+ const content3 = readFileSync18(secretsPath, "utf-8");
290383
291138
  if (content3.includes(envName)) {
290384
291139
  const updated = content3.replace(new RegExp(`^export ${envName}=.*$`, "m"), keyExport);
290385
291140
  writeFileSync13(secretsPath, updated, "utf-8");
@@ -290395,7 +291150,7 @@ function App2({ cwd: cwd3, version: version4 }) {
290395
291150
  for (const [name, key] of Object.entries(result.connectorKeys)) {
290396
291151
  const envName2 = `${name.toUpperCase()}_API_KEY`;
290397
291152
  const connKeyExport = `export ${envName2}="${key}"`;
290398
- const content3 = readFileSync17(secretsPath, "utf-8");
291153
+ const content3 = readFileSync18(secretsPath, "utf-8");
290399
291154
  if (content3.includes(envName2)) {
290400
291155
  const updated = content3.replace(new RegExp(`^export ${envName2}=.*$`, "m"), connKeyExport);
290401
291156
  writeFileSync13(secretsPath, updated, "utf-8");
@@ -290406,13 +291161,13 @@ function App2({ cwd: cwd3, version: version4 }) {
290406
291161
  }
290407
291162
  const configDir = workspaceBaseDir || getConfigDir();
290408
291163
  if (!existsSync30(configDir)) {
290409
- mkdirSync18(configDir, { recursive: true });
291164
+ mkdirSync19(configDir, { recursive: true });
290410
291165
  }
290411
- const configPath = join47(configDir, "config.json");
291166
+ const configPath = join48(configDir, "config.json");
290412
291167
  let existingConfig = {};
290413
291168
  if (existsSync30(configPath)) {
290414
291169
  try {
290415
- existingConfig = JSON.parse(readFileSync17(configPath, "utf-8"));
291170
+ existingConfig = JSON.parse(readFileSync18(configPath, "utf-8"));
290416
291171
  } catch {}
290417
291172
  }
290418
291173
  const newConfig = {
@@ -290464,13 +291219,13 @@ function App2({ cwd: cwd3, version: version4 }) {
290464
291219
  if (isOnboardingCompleted()) {
290465
291220
  needsOnboarding = false;
290466
291221
  } else {
290467
- const configPath = join47(workspaceBaseDir || getConfigDir(), "config.json");
290468
- const { existsSync: existsSync30, readFileSync: readFileSync17 } = await import("fs");
291222
+ const configPath = join48(workspaceBaseDir || getConfigDir(), "config.json");
291223
+ const { existsSync: existsSync30, readFileSync: readFileSync18 } = await import("fs");
290469
291224
  if (!existsSync30(configPath)) {
290470
291225
  needsOnboarding = true;
290471
291226
  } else {
290472
291227
  try {
290473
- const raw = readFileSync17(configPath, "utf-8");
291228
+ const raw = readFileSync18(configPath, "utf-8");
290474
291229
  const parsed = JSON.parse(raw);
290475
291230
  if (!parsed.onboardingCompleted) {
290476
291231
  needsOnboarding = true;
@@ -290674,41 +291429,6 @@ function App2({ cwd: cwd3, version: version4 }) {
290674
291429
  }
290675
291430
  return result;
290676
291431
  }, [messages2, wrapChars, renderWidth]);
290677
- const [lastResponseMessages, setLastResponseMessages] = import_react86.useState([]);
290678
- import_react86.useEffect(() => {
290679
- if (displayMessages.length === 0)
290680
- return;
290681
- let lastUserIdx = -1;
290682
- for (let i6 = displayMessages.length - 1;i6 >= 0; i6--) {
290683
- if (displayMessages[i6].role === "user") {
290684
- lastUserIdx = i6;
290685
- break;
290686
- }
290687
- }
290688
- const dynamicIds = new Set;
290689
- const dynamicMsgs = [];
290690
- if (lastUserIdx >= 0) {
290691
- for (let i6 = lastUserIdx + 1;i6 < displayMessages.length; i6++) {
290692
- if (displayMessages[i6].role === "assistant") {
290693
- dynamicIds.add(displayMessages[i6].id);
290694
- dynamicMsgs.push(displayMessages[i6]);
290695
- }
290696
- }
290697
- }
290698
- const next = [];
290699
- for (const message of displayMessages) {
290700
- if (staticMessageIdsRef.current.has(message.id))
290701
- continue;
290702
- if (dynamicIds.has(message.id))
290703
- continue;
290704
- staticMessageIdsRef.current.add(message.id);
290705
- next.push(message);
290706
- }
290707
- if (next.length > 0) {
290708
- setStaticMessages((prev) => [...prev, ...next]);
290709
- }
290710
- setLastResponseMessages(dynamicMsgs);
290711
- }, [displayMessages]);
290712
291432
  const reservedLines = 12;
290713
291433
  const dynamicBudget = Math.max(6, rows - reservedLines);
290714
291434
  const streamingTrim = import_react86.useMemo(() => {
@@ -290731,13 +291451,6 @@ function App2({ cwd: cwd3, version: version4 }) {
290731
291451
  const activityBudget = Math.max(4, dynamicBudget - streamingLineCount);
290732
291452
  return trimActivityLogByLines(activityLog, wrapChars, renderWidth, activityBudget);
290733
291453
  }, [activityLog, wrapChars, renderWidth, dynamicBudget, streamingLineCount]);
290734
- const lastResponseTrim = import_react86.useMemo(() => {
290735
- if (lastResponseMessages.length === 0 || isProcessing)
290736
- return { messages: lastResponseMessages, trimmed: false };
290737
- return trimDisplayMessagesByLines(lastResponseMessages, dynamicBudget, renderWidth);
290738
- }, [lastResponseMessages, isProcessing, dynamicBudget, renderWidth]);
290739
- const combinedStreamingMessages = streamingMessages.length > 0 ? streamingMessages : lastResponseTrim.messages;
290740
- const showDynamicPanel = isProcessing || activityTrim.entries.length > 0 || lastResponseMessages.length > 0;
290741
291454
  import_react86.useEffect(() => {
290742
291455
  if (!isBusy && activeQueue.length > 0 && activeInline.length === 0) {
290743
291456
  processQueue();
@@ -290815,15 +291528,15 @@ function App2({ cwd: cwd3, version: version4 }) {
290815
291528
  if (hasAsk || hasInterview) {
290816
291529
  return;
290817
291530
  }
290818
- const now3 = Date.now();
290819
- const timeSinceLastCtrlC = now3 - lastCtrlCRef.current;
291531
+ const now4 = Date.now();
291532
+ const timeSinceLastCtrlC = now4 - lastCtrlCRef.current;
290820
291533
  if (timeSinceLastCtrlC < 1500 && lastCtrlCRef.current > 0) {
290821
291534
  gatherAndSetExitStats();
290822
291535
  registry3.closeAll();
290823
291536
  exit3();
290824
291537
  return;
290825
291538
  }
290826
- lastCtrlCRef.current = now3;
291539
+ lastCtrlCRef.current = now4;
290827
291540
  setShowExitHint(true);
290828
291541
  setTimeout(() => {
290829
291542
  setShowExitHint(false);
@@ -291809,18 +292522,18 @@ When done, report the result.`);
291809
292522
  };
291810
292523
  const handleScheduleCreate = async (schedule) => {
291811
292524
  try {
291812
- const now3 = Date.now();
292525
+ const now4 = Date.now();
291813
292526
  const fullSchedule = {
291814
292527
  ...schedule,
291815
292528
  id: generateId(),
291816
- createdAt: now3,
291817
- updatedAt: now3
292529
+ createdAt: now4,
292530
+ updatedAt: now4
291818
292531
  };
291819
- fullSchedule.nextRunAt = computeNextRun2(fullSchedule, now3);
292532
+ fullSchedule.nextRunAt = computeNextRun2(fullSchedule, now4);
291820
292533
  if (!fullSchedule.nextRunAt) {
291821
292534
  throw new Error("Unable to compute next run time. Check your schedule configuration.");
291822
292535
  }
291823
- if (fullSchedule.schedule.kind === "once" && fullSchedule.nextRunAt <= now3) {
292536
+ if (fullSchedule.schedule.kind === "once" && fullSchedule.nextRunAt <= now4) {
291824
292537
  throw new Error("Scheduled time must be in the future.");
291825
292538
  }
291826
292539
  await saveSchedule(cwd3, fullSchedule);
@@ -292465,58 +293178,58 @@ When done, report the result.`);
292465
293178
  }
292466
293179
  if (showPlansPanel && plansProject) {
292467
293180
  const handleCreatePlan = async (title) => {
292468
- const now3 = Date.now();
293181
+ const now4 = Date.now();
292469
293182
  const plan = {
292470
- id: `plan-${now3}`,
293183
+ id: `plan-${now4}`,
292471
293184
  title,
292472
- createdAt: now3,
292473
- updatedAt: now3,
293185
+ createdAt: now4,
293186
+ updatedAt: now4,
292474
293187
  steps: []
292475
293188
  };
292476
293189
  const updated = await updateProject(cwd3, plansProject.id, (current) => ({
292477
293190
  ...current,
292478
293191
  plans: [...current.plans, plan],
292479
- updatedAt: now3
293192
+ updatedAt: now4
292480
293193
  }));
292481
293194
  if (updated)
292482
293195
  setPlansProject(updated);
292483
293196
  };
292484
293197
  const handleDeletePlan = async (planId) => {
292485
- const now3 = Date.now();
293198
+ const now4 = Date.now();
292486
293199
  const updated = await updateProject(cwd3, plansProject.id, (current) => ({
292487
293200
  ...current,
292488
293201
  plans: current.plans.filter((p5) => p5.id !== planId),
292489
- updatedAt: now3
293202
+ updatedAt: now4
292490
293203
  }));
292491
293204
  if (updated)
292492
293205
  setPlansProject(updated);
292493
293206
  };
292494
293207
  const handleAddStep = async (planId, text5) => {
292495
- const now3 = Date.now();
293208
+ const now4 = Date.now();
292496
293209
  const updated = await updateProject(cwd3, plansProject.id, (current) => ({
292497
293210
  ...current,
292498
- plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: [...p5.steps, { id: `step-${now3}`, text: text5, status: "todo", createdAt: now3, updatedAt: now3 }], updatedAt: now3 } : p5),
292499
- updatedAt: now3
293211
+ plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: [...p5.steps, { id: `step-${now4}`, text: text5, status: "todo", createdAt: now4, updatedAt: now4 }], updatedAt: now4 } : p5),
293212
+ updatedAt: now4
292500
293213
  }));
292501
293214
  if (updated)
292502
293215
  setPlansProject(updated);
292503
293216
  };
292504
293217
  const handleUpdateStep = async (planId, stepId, status) => {
292505
- const now3 = Date.now();
293218
+ const now4 = Date.now();
292506
293219
  const updated = await updateProject(cwd3, plansProject.id, (current) => ({
292507
293220
  ...current,
292508
- plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: p5.steps.map((s5) => s5.id === stepId ? { ...s5, status, updatedAt: now3 } : s5), updatedAt: now3 } : p5),
292509
- updatedAt: now3
293221
+ plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: p5.steps.map((s5) => s5.id === stepId ? { ...s5, status, updatedAt: now4 } : s5), updatedAt: now4 } : p5),
293222
+ updatedAt: now4
292510
293223
  }));
292511
293224
  if (updated)
292512
293225
  setPlansProject(updated);
292513
293226
  };
292514
293227
  const handleRemoveStep = async (planId, stepId) => {
292515
- const now3 = Date.now();
293228
+ const now4 = Date.now();
292516
293229
  const updated = await updateProject(cwd3, plansProject.id, (current) => ({
292517
293230
  ...current,
292518
- plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: p5.steps.filter((s5) => s5.id !== stepId), updatedAt: now3 } : p5),
292519
- updatedAt: now3
293231
+ plans: current.plans.map((p5) => p5.id === planId ? { ...p5, steps: p5.steps.filter((s5) => s5.id !== stepId), updatedAt: now4 } : p5),
293232
+ updatedAt: now4
292520
293233
  }));
292521
293234
  if (updated)
292522
293235
  setPlansProject(updated);
@@ -292779,7 +293492,7 @@ When done, report the result.`);
292779
293492
  if (showConfigPanel && currentConfig) {
292780
293493
  const handleConfigSave = async (location, updates) => {
292781
293494
  const { writeFile: writeFile10, mkdir: mkdir10 } = await import("fs/promises");
292782
- const { dirname: dirname20 } = await import("path");
293495
+ const { dirname: dirname21 } = await import("path");
292783
293496
  let configPath;
292784
293497
  let existingConfig;
292785
293498
  switch (location) {
@@ -292796,8 +293509,8 @@ When done, report the result.`);
292796
293509
  existingConfig = localConfig;
292797
293510
  break;
292798
293511
  }
292799
- const newConfig = deepMerge2(existingConfig || {}, updates);
292800
- await mkdir10(dirname20(configPath), { recursive: true });
293512
+ const newConfig = deepMerge3(existingConfig || {}, updates);
293513
+ await mkdir10(dirname21(configPath), { recursive: true });
292801
293514
  await writeFile10(configPath, JSON.stringify(newConfig, null, 2));
292802
293515
  await loadConfigFiles();
292803
293516
  };
@@ -293157,50 +293870,17 @@ ${msg.body || msg.preview}`);
293157
293870
  /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Box_default, {
293158
293871
  flexDirection: "column",
293159
293872
  flexGrow: 1,
293160
- children: [
293161
- /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Static, {
293162
- items: staticMessages,
293163
- children: (message) => /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Messages5, {
293164
- messages: [message],
293165
- currentResponse: undefined,
293166
- streamingMessages: [],
293167
- currentToolCall: undefined,
293168
- lastToolResult: undefined,
293169
- activityLog: [],
293170
- queuedMessageIds,
293171
- verboseTools
293172
- }, message.id, false, undefined, this)
293173
- }, staticResetKey, false, undefined, this),
293174
- showDynamicPanel && /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(jsx_dev_runtime51.Fragment, {
293175
- children: [
293176
- isProcessing && streamingTrimmed && /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Box_default, {
293177
- marginBottom: 1,
293178
- children: /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Text, {
293179
- dimColor: true,
293180
- children: "\u22EF showing latest output"
293181
- }, undefined, false, undefined, this)
293182
- }, undefined, false, undefined, this),
293183
- isProcessing && activityTrim.trimmed && /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Box_default, {
293184
- marginBottom: 1,
293185
- children: /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Text, {
293186
- dimColor: true,
293187
- children: "\u22EF showing latest activity"
293188
- }, undefined, false, undefined, this)
293189
- }, undefined, false, undefined, this),
293190
- /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Messages5, {
293191
- messages: [],
293192
- currentResponse: undefined,
293193
- streamingMessages: combinedStreamingMessages,
293194
- currentToolCall: undefined,
293195
- lastToolResult: undefined,
293196
- activityLog: isProcessing ? activityTrim.entries : [],
293197
- queuedMessageIds,
293198
- verboseTools
293199
- }, "streaming", false, undefined, this)
293200
- ]
293201
- }, undefined, true, undefined, this)
293202
- ]
293203
- }, undefined, true, undefined, this),
293873
+ children: /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(Messages5, {
293874
+ messages: displayMessages,
293875
+ currentResponse: undefined,
293876
+ streamingMessages: isProcessing ? streamingMessages : [],
293877
+ currentToolCall: undefined,
293878
+ lastToolResult: undefined,
293879
+ activityLog: isProcessing ? activityTrim.entries : [],
293880
+ queuedMessageIds,
293881
+ verboseTools
293882
+ }, "all-messages", false, undefined, this)
293883
+ }, undefined, false, undefined, this),
293204
293884
  askUserState && activeAskQuestion && !interviewState && /* @__PURE__ */ jsx_dev_runtime51.jsxDEV(AskUserPanel, {
293205
293885
  sessionId: askUserState.sessionId,
293206
293886
  request: askUserState.request,
@@ -293771,7 +294451,7 @@ process.on("unhandledRejection", (reason) => {
293771
294451
  cleanup();
293772
294452
  process.exit(1);
293773
294453
  });
293774
- var VERSION4 = "1.1.82";
294454
+ var VERSION4 = "1.1.85";
293775
294455
  var SYNC_START = "\x1B[?2026h";
293776
294456
  var SYNC_END = "\x1B[?2026l";
293777
294457
  function enableSynchronizedOutput() {
@@ -293916,4 +294596,4 @@ export {
293916
294596
  main
293917
294597
  };
293918
294598
 
293919
- //# debugId=066FB013DBC71B6E64756E2164756E21
294599
+ //# debugId=B3102F77510944A864756E2164756E21