@kodama-run/sdk 0.2.1 → 0.3.0

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/bin/cli.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  // @bun
3
4
  import { createRequire } from "node:module";
4
5
  var __create = Object.create;
@@ -33,6 +34,7 @@ var __toESM = (mod, isNodeMode, target) => {
33
34
  };
34
35
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
36
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
37
+
36
38
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/error.js
37
39
  var require_error = __commonJS((exports) => {
38
40
  class CommanderError extends Error {
@@ -45,6 +47,7 @@ var require_error = __commonJS((exports) => {
45
47
  this.nestedError = undefined;
46
48
  }
47
49
  }
50
+
48
51
  class InvalidArgumentError extends CommanderError {
49
52
  constructor(message) {
50
53
  super(1, "commander.invalidArgument", message);
@@ -55,9 +58,11 @@ var require_error = __commonJS((exports) => {
55
58
  exports.CommanderError = CommanderError;
56
59
  exports.InvalidArgumentError = InvalidArgumentError;
57
60
  });
61
+
58
62
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/argument.js
59
63
  var require_argument = __commonJS((exports) => {
60
64
  var { InvalidArgumentError } = require_error();
65
+
61
66
  class Argument {
62
67
  constructor(name, description) {
63
68
  this.description = description || "";
@@ -132,9 +137,11 @@ var require_argument = __commonJS((exports) => {
132
137
  exports.Argument = Argument;
133
138
  exports.humanReadableArgName = humanReadableArgName;
134
139
  });
140
+
135
141
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/help.js
136
142
  var require_help = __commonJS((exports) => {
137
143
  var { humanReadableArgName } = require_argument();
144
+
138
145
  class Help {
139
146
  constructor() {
140
147
  this.helpWidth = undefined;
@@ -480,9 +487,11 @@ ${itemIndentStr}`);
480
487
  exports.Help = Help;
481
488
  exports.stripColor = stripColor;
482
489
  });
490
+
483
491
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/option.js
484
492
  var require_option = __commonJS((exports) => {
485
493
  var { InvalidArgumentError } = require_error();
494
+
486
495
  class Option {
487
496
  constructor(flags, description) {
488
497
  this.flags = flags;
@@ -583,6 +592,7 @@ var require_option = __commonJS((exports) => {
583
592
  return !this.required && !this.optional && !this.negate;
584
593
  }
585
594
  }
595
+
586
596
  class DualOptions {
587
597
  constructor(options) {
588
598
  this.positiveOptions = new Map;
@@ -655,6 +665,7 @@ var require_option = __commonJS((exports) => {
655
665
  exports.Option = Option;
656
666
  exports.DualOptions = DualOptions;
657
667
  });
668
+
658
669
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/suggestSimilar.js
659
670
  var require_suggestSimilar = __commonJS((exports) => {
660
671
  var maxDistance = 3;
@@ -727,6 +738,7 @@ var require_suggestSimilar = __commonJS((exports) => {
727
738
  }
728
739
  exports.suggestSimilar = suggestSimilar;
729
740
  });
741
+
730
742
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/lib/command.js
731
743
  var require_command = __commonJS((exports) => {
732
744
  var EventEmitter = __require("node:events").EventEmitter;
@@ -739,6 +751,7 @@ var require_command = __commonJS((exports) => {
739
751
  var { Help, stripColor } = require_help();
740
752
  var { Option, DualOptions } = require_option();
741
753
  var { suggestSimilar } = require_suggestSimilar();
754
+
742
755
  class Command extends EventEmitter {
743
756
  constructor(name) {
744
757
  super();
@@ -2035,6 +2048,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2035
2048
  exports.Command = Command;
2036
2049
  exports.useColor = useColor;
2037
2050
  });
2051
+
2038
2052
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/index.js
2039
2053
  var require_commander = __commonJS((exports) => {
2040
2054
  var { Argument } = require_argument();
@@ -2054,6 +2068,7 @@ var require_commander = __commonJS((exports) => {
2054
2068
  exports.InvalidArgumentError = InvalidArgumentError;
2055
2069
  exports.InvalidOptionArgumentError = InvalidArgumentError;
2056
2070
  });
2071
+
2057
2072
  // ../../node_modules/.pnpm/commander@13.1.0/node_modules/commander/esm.mjs
2058
2073
  var import__ = __toESM(require_commander(), 1);
2059
2074
  var {
@@ -2069,6 +2084,7 @@ var {
2069
2084
  Option,
2070
2085
  Help
2071
2086
  } = import__.default;
2087
+
2072
2088
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/tslib.mjs
2073
2089
  function __classPrivateFieldSet(receiver, state, value, kind, f) {
2074
2090
  if (kind === "m")
@@ -2086,6 +2102,7 @@ function __classPrivateFieldGet(receiver, state, kind, f) {
2086
2102
  throw new TypeError("Cannot read private member from an object whose class did not declare it");
2087
2103
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2088
2104
  }
2105
+
2089
2106
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs
2090
2107
  var uuid4 = function() {
2091
2108
  const { crypto: crypto2 } = globalThis;
@@ -2097,6 +2114,7 @@ var uuid4 = function() {
2097
2114
  const randomByte = crypto2 ? () => crypto2.getRandomValues(u8)[0] : () => Math.random() * 255 & 255;
2098
2115
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
2099
2116
  };
2117
+
2100
2118
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/errors.mjs
2101
2119
  function isAbortError(err) {
2102
2120
  return typeof err === "object" && err !== null && (("name" in err) && err.name === "AbortError" || ("message" in err) && String(err.message).includes("FetchRequestCanceledException"));
@@ -2123,9 +2141,11 @@ var castToError = (err) => {
2123
2141
  }
2124
2142
  return new Error(err);
2125
2143
  };
2144
+
2126
2145
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/core/error.mjs
2127
2146
  class AnthropicError extends Error {
2128
2147
  }
2148
+
2129
2149
  class APIError extends AnthropicError {
2130
2150
  constructor(status, error, message, headers, type) {
2131
2151
  super(`${APIError.makeMessage(status, error, message)}`);
@@ -2181,11 +2201,13 @@ class APIError extends AnthropicError {
2181
2201
  return new APIError(status, error, message, headers, type);
2182
2202
  }
2183
2203
  }
2204
+
2184
2205
  class APIUserAbortError extends APIError {
2185
2206
  constructor({ message } = {}) {
2186
2207
  super(undefined, undefined, message || "Request was aborted.", undefined);
2187
2208
  }
2188
2209
  }
2210
+
2189
2211
  class APIConnectionError extends APIError {
2190
2212
  constructor({ message, cause }) {
2191
2213
  super(undefined, undefined, message || "Connection error.", undefined);
@@ -2193,27 +2215,37 @@ class APIConnectionError extends APIError {
2193
2215
  this.cause = cause;
2194
2216
  }
2195
2217
  }
2218
+
2196
2219
  class APIConnectionTimeoutError extends APIConnectionError {
2197
2220
  constructor({ message } = {}) {
2198
2221
  super({ message: message ?? "Request timed out." });
2199
2222
  }
2200
2223
  }
2224
+
2201
2225
  class BadRequestError extends APIError {
2202
2226
  }
2227
+
2203
2228
  class AuthenticationError extends APIError {
2204
2229
  }
2230
+
2205
2231
  class PermissionDeniedError extends APIError {
2206
2232
  }
2233
+
2207
2234
  class NotFoundError extends APIError {
2208
2235
  }
2236
+
2209
2237
  class ConflictError extends APIError {
2210
2238
  }
2239
+
2211
2240
  class UnprocessableEntityError extends APIError {
2212
2241
  }
2242
+
2213
2243
  class RateLimitError extends APIError {
2214
2244
  }
2245
+
2215
2246
  class InternalServerError extends APIError {
2216
2247
  }
2248
+
2217
2249
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/values.mjs
2218
2250
  var startsWithSchemeRegexp = /^[a-z][a-z0-9+.-]*:/i;
2219
2251
  var isAbsoluteURL = (url) => {
@@ -2253,10 +2285,13 @@ var safeJSON = (text) => {
2253
2285
  return;
2254
2286
  }
2255
2287
  };
2288
+
2256
2289
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/sleep.mjs
2257
2290
  var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
2291
+
2258
2292
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/version.mjs
2259
2293
  var VERSION = "0.82.0";
2294
+
2260
2295
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/detect-platform.mjs
2261
2296
  var isRunningInBrowser = () => {
2262
2297
  return typeof window !== "undefined" && typeof window.document !== "undefined" && typeof navigator !== "undefined";
@@ -2385,6 +2420,7 @@ var _platformHeaders;
2385
2420
  var getPlatformHeaders = () => {
2386
2421
  return _platformHeaders ?? (_platformHeaders = getPlatformProperties());
2387
2422
  };
2423
+
2388
2424
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/shims.mjs
2389
2425
  function getDefaultFetch() {
2390
2426
  if (typeof fetch !== "undefined") {
@@ -2455,6 +2491,7 @@ async function CancelReadableStream(stream) {
2455
2491
  reader.releaseLock();
2456
2492
  await cancelPromise;
2457
2493
  }
2494
+
2458
2495
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/request-options.mjs
2459
2496
  var FallbackEncoder = ({ headers, body }) => {
2460
2497
  return {
@@ -2464,6 +2501,7 @@ var FallbackEncoder = ({ headers, body }) => {
2464
2501
  body: JSON.stringify(body)
2465
2502
  };
2466
2503
  };
2504
+
2467
2505
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/query.mjs
2468
2506
  function stringifyQuery(query) {
2469
2507
  return Object.entries(query).filter(([_, value]) => typeof value !== "undefined").map(([key, value]) => {
@@ -2476,6 +2514,7 @@ function stringifyQuery(query) {
2476
2514
  throw new AnthropicError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`);
2477
2515
  }).join("&");
2478
2516
  }
2517
+
2479
2518
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/bytes.mjs
2480
2519
  function concatBytes(buffers) {
2481
2520
  let length = 0;
@@ -2500,9 +2539,11 @@ function decodeUTF8(bytes) {
2500
2539
  let decoder;
2501
2540
  return (decodeUTF8_ ?? (decoder = new globalThis.TextDecoder, decodeUTF8_ = decoder.decode.bind(decoder)))(bytes);
2502
2541
  }
2542
+
2503
2543
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/decoders/line.mjs
2504
2544
  var _LineDecoder_buffer;
2505
2545
  var _LineDecoder_carriageReturnIndex;
2546
+
2506
2547
  class LineDecoder {
2507
2548
  constructor() {
2508
2549
  _LineDecoder_buffer.set(this, undefined);
@@ -2578,6 +2619,7 @@ function findDoubleNewlineIndex(buffer) {
2578
2619
  }
2579
2620
  return -1;
2580
2621
  }
2622
+
2581
2623
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/log.mjs
2582
2624
  var levelNumbers = {
2583
2625
  off: 0,
@@ -2649,8 +2691,10 @@ var formatRequestDetails = (details) => {
2649
2691
  }
2650
2692
  return details;
2651
2693
  };
2694
+
2652
2695
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/core/streaming.mjs
2653
2696
  var _Stream_client;
2697
+
2654
2698
  class Stream {
2655
2699
  constructor(iterator, controller, client) {
2656
2700
  this.iterator = iterator;
@@ -2841,6 +2885,7 @@ async function* iterSSEChunks(iterator) {
2841
2885
  yield data;
2842
2886
  }
2843
2887
  }
2888
+
2844
2889
  class SSEDecoder {
2845
2890
  constructor() {
2846
2891
  this.event = null;
@@ -2888,6 +2933,7 @@ function partition(str, delimiter) {
2888
2933
  }
2889
2934
  return [str, "", ""];
2890
2935
  }
2936
+
2891
2937
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/parse.mjs
2892
2938
  async function defaultParseResponse(client, props) {
2893
2939
  const { response, requestLogID, retryOfRequestLogID, startTime } = props;
@@ -2937,8 +2983,10 @@ function addRequestID(value, response) {
2937
2983
  enumerable: false
2938
2984
  });
2939
2985
  }
2986
+
2940
2987
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/core/api-promise.mjs
2941
2988
  var _APIPromise_client;
2989
+
2942
2990
  class APIPromise extends Promise {
2943
2991
  constructor(client, responsePromise, parseResponse = defaultParseResponse) {
2944
2992
  super((resolve) => {
@@ -2976,8 +3024,10 @@ class APIPromise extends Promise {
2976
3024
  }
2977
3025
  }
2978
3026
  _APIPromise_client = new WeakMap;
3027
+
2979
3028
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/core/pagination.mjs
2980
3029
  var _AbstractPage_client;
3030
+
2981
3031
  class AbstractPage {
2982
3032
  constructor(client, response, body, options) {
2983
3033
  _AbstractPage_client.set(this, undefined);
@@ -3015,6 +3065,7 @@ class AbstractPage {
3015
3065
  }
3016
3066
  }
3017
3067
  }
3068
+
3018
3069
  class PagePromise extends APIPromise {
3019
3070
  constructor(client, request, Page) {
3020
3071
  super(client, request, async (client2, props) => new Page(client2, props.response, await defaultParseResponse(client2, props), props.options));
@@ -3026,6 +3077,7 @@ class PagePromise extends APIPromise {
3026
3077
  }
3027
3078
  }
3028
3079
  }
3080
+
3029
3081
  class Page extends AbstractPage {
3030
3082
  constructor(client, response, body, options) {
3031
3083
  super(client, response, body, options);
@@ -3100,6 +3152,7 @@ class PageCursor extends AbstractPage {
3100
3152
  };
3101
3153
  }
3102
3154
  }
3155
+
3103
3156
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/uploads.mjs
3104
3157
  var checkFileSupport = () => {
3105
3158
  if (typeof File === "undefined") {
@@ -3177,6 +3230,7 @@ var addFormValue = async (form, key, value, stripFilenames) => {
3177
3230
  throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`);
3178
3231
  }
3179
3232
  };
3233
+
3180
3234
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/to-file.mjs
3181
3235
  var isBlobLike = (value) => value != null && typeof value === "object" && typeof value.size === "number" && typeof value.type === "string" && typeof value.text === "function" && typeof value.slice === "function" && typeof value.arrayBuffer === "function";
3182
3236
  var isFileLike = (value) => value != null && typeof value === "object" && typeof value.name === "string" && typeof value.lastModified === "number" && isBlobLike(value);
@@ -3237,6 +3291,7 @@ class APIResource {
3237
3291
  this._client = client;
3238
3292
  }
3239
3293
  }
3294
+
3240
3295
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/headers.mjs
3241
3296
  var brand_privateNullableHeaders = Symbol.for("brand.privateNullableHeaders");
3242
3297
  function* iterateHeaders(headers) {
@@ -3299,6 +3354,7 @@ var buildHeaders = (newHeaders) => {
3299
3354
  }
3300
3355
  return { [brand_privateNullableHeaders]: true, values: targetHeaders, nulls: nullHeaders };
3301
3356
  };
3357
+
3302
3358
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/stainless-helper-header.mjs
3303
3359
  var SDK_HELPER_SYMBOL = Symbol("anthropic.sdk.stainlessHelper");
3304
3360
  function wasCreatedByStainlessHelper(value) {
@@ -3341,6 +3397,7 @@ function stainlessHelperHeaderFromFile(file) {
3341
3397
  }
3342
3398
  return {};
3343
3399
  }
3400
+
3344
3401
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/utils/path.mjs
3345
3402
  function encodeURIPath(str) {
3346
3403
  return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
@@ -3395,6 +3452,7 @@ ${underline}`);
3395
3452
  return path2;
3396
3453
  };
3397
3454
  var path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
3455
+
3398
3456
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/files.mjs
3399
3457
  class Files extends APIResource {
3400
3458
  list(params = {}, options) {
@@ -3455,6 +3513,7 @@ class Files extends APIResource {
3455
3513
  }, this._client));
3456
3514
  }
3457
3515
  }
3516
+
3458
3517
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/models.mjs
3459
3518
  class Models extends APIResource {
3460
3519
  retrieve(modelID, params = {}, options) {
@@ -3490,6 +3549,7 @@ var MODEL_NONSTREAMING_TOKENS = {
3490
3549
  "anthropic.claude-opus-4-1-20250805-v1:0": 8192,
3491
3550
  "claude-opus-4-1@20250805": 8192
3492
3551
  };
3552
+
3493
3553
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/beta-parser.mjs
3494
3554
  function getOutputFormat(params) {
3495
3555
  return params?.output_format ?? params?.output_config?.format;
@@ -3562,6 +3622,7 @@ function parseBetaOutputFormat(params, content) {
3562
3622
  throw new AnthropicError(`Failed to parse structured output: ${error2}`);
3563
3623
  }
3564
3624
  }
3625
+
3565
3626
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/_vendor/partial-json-parser/parser.mjs
3566
3627
  var tokenize = (input) => {
3567
3628
  let current = 0;
@@ -3810,6 +3871,7 @@ var JSON_BUF_PROPERTY = "__json_buf";
3810
3871
  function tracksToolInput(content) {
3811
3872
  return content.type === "tool_use" || content.type === "server_tool_use" || content.type === "mcp_tool_use";
3812
3873
  }
3874
+
3813
3875
  class BetaMessageStream {
3814
3876
  constructor(params, opts) {
3815
3877
  _BetaMessageStream_instances.add(this);
@@ -4331,6 +4393,7 @@ class BetaMessageStream {
4331
4393
  }
4332
4394
  }
4333
4395
  function checkNever(x) {}
4396
+
4334
4397
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.mjs
4335
4398
  class ToolError extends Error {
4336
4399
  constructor(content) {
@@ -4344,6 +4407,7 @@ class ToolError extends Error {
4344
4407
  this.content = content;
4345
4408
  }
4346
4409
  }
4410
+
4347
4411
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/tools/CompactionControl.mjs
4348
4412
  var DEFAULT_TOKEN_THRESHOLD = 1e5;
4349
4413
  var DEFAULT_SUMMARY_PROMPT = `You have been working on the task described above but have not yet completed it. Write a continuation summary that will allow you (or another instance of yourself) to resume work efficiently in a future context window where the conversation history will be replaced with this summary. Your summary should be structured, concise, and actionable. Include:
@@ -4369,6 +4433,7 @@ Domain-specific details that aren't obvious
4369
4433
  Any promises made to the user
4370
4434
  Be concise but complete—err on the side of including information that would prevent duplicate work or repeated mistakes. Write in a way that enables immediate resumption of the task.
4371
4435
  Wrap your summary in <summary></summary> tags.`;
4436
+
4372
4437
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/tools/BetaToolRunner.mjs
4373
4438
  var _BetaToolRunner_instances;
4374
4439
  var _BetaToolRunner_consumed;
@@ -4390,6 +4455,7 @@ function promiseWithResolvers() {
4390
4455
  });
4391
4456
  return { promise, resolve, reject };
4392
4457
  }
4458
+
4393
4459
  class BetaToolRunner {
4394
4460
  constructor(client, params, options) {
4395
4461
  _BetaToolRunner_instances.add(this);
@@ -4625,6 +4691,7 @@ async function generateToolResponse(params, lastMessage = params.messages.at(-1)
4625
4691
  content: toolResults
4626
4692
  };
4627
4693
  }
4694
+
4628
4695
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/internal/decoders/jsonl.mjs
4629
4696
  class JSONLDecoder {
4630
4697
  constructor(iterator, controller) {
@@ -4656,6 +4723,7 @@ class JSONLDecoder {
4656
4723
  return new JSONLDecoder(ReadableStreamToAsyncIterable(response.body), controller);
4657
4724
  }
4658
4725
  }
4726
+
4659
4727
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/messages/batches.mjs
4660
4728
  class Batches extends APIResource {
4661
4729
  create(params, options) {
@@ -4730,6 +4798,7 @@ class Batches extends APIResource {
4730
4798
  })._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller));
4731
4799
  }
4732
4800
  }
4801
+
4733
4802
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/messages/messages.mjs
4734
4803
  var DEPRECATED_MODELS = {
4735
4804
  "claude-1.3": "November 6th, 2024",
@@ -4745,6 +4814,7 @@ var DEPRECATED_MODELS = {
4745
4814
  "claude-3-7-sonnet-20250219": "February 19th, 2026"
4746
4815
  };
4747
4816
  var MODELS_TO_WARN_WITH_THINKING_ENABLED = ["claude-opus-4-6"];
4817
+
4748
4818
  class Messages extends APIResource {
4749
4819
  constructor() {
4750
4820
  super(...arguments);
@@ -4826,6 +4896,7 @@ function transformOutputFormat(params) {
4826
4896
  Messages.Batches = Batches;
4827
4897
  Messages.BetaToolRunner = BetaToolRunner;
4828
4898
  Messages.ToolError = ToolError;
4899
+
4829
4900
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/skills/versions.mjs
4830
4901
  class Versions extends APIResource {
4831
4902
  create(skillID, params = {}, options) {
@@ -4871,6 +4942,7 @@ class Versions extends APIResource {
4871
4942
  });
4872
4943
  }
4873
4944
  }
4945
+
4874
4946
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/skills/skills.mjs
4875
4947
  class Skills extends APIResource {
4876
4948
  constructor() {
@@ -4921,6 +4993,7 @@ class Skills extends APIResource {
4921
4993
  }
4922
4994
  }
4923
4995
  Skills.Versions = Versions;
4996
+
4924
4997
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/beta/beta.mjs
4925
4998
  class Beta extends APIResource {
4926
4999
  constructor() {
@@ -5011,6 +5084,7 @@ function parseOutputFormat(params, content) {
5011
5084
  throw new AnthropicError(`Failed to parse structured output: ${error2}`);
5012
5085
  }
5013
5086
  }
5087
+
5014
5088
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/lib/MessageStream.mjs
5015
5089
  var _MessageStream_instances;
5016
5090
  var _MessageStream_currentMessageSnapshot;
@@ -5040,6 +5114,7 @@ var JSON_BUF_PROPERTY2 = "__json_buf";
5040
5114
  function tracksToolInput2(content) {
5041
5115
  return content.type === "tool_use" || content.type === "server_tool_use";
5042
5116
  }
5117
+
5043
5118
  class MessageStream {
5044
5119
  constructor(params, opts) {
5045
5120
  _MessageStream_instances.add(this);
@@ -5536,6 +5611,7 @@ class MessageStream {
5536
5611
  }
5537
5612
  }
5538
5613
  function checkNever2(x) {}
5614
+
5539
5615
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs
5540
5616
  class Batches2 extends APIResource {
5541
5617
  create(body, options) {
@@ -5566,6 +5642,7 @@ class Batches2 extends APIResource {
5566
5642
  })._thenUnwrap((_, props) => JSONLDecoder.fromResponse(props.response, props.controller));
5567
5643
  }
5568
5644
  }
5645
+
5569
5646
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/resources/messages/messages.mjs
5570
5647
  class Messages2 extends APIResource {
5571
5648
  constructor() {
@@ -5655,6 +5732,7 @@ var readEnv = (env) => {
5655
5732
  }
5656
5733
  return;
5657
5734
  };
5735
+
5658
5736
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.82.0_zod@4.3.6/node_modules/@anthropic-ai/sdk/client.mjs
5659
5737
  var _BaseAnthropic_instances;
5660
5738
  var _a;
@@ -5662,6 +5740,7 @@ var _BaseAnthropic_encoder;
5662
5740
  var _BaseAnthropic_baseURLOverridden;
5663
5741
  var HUMAN_PROMPT = "\\n\\nHuman:";
5664
5742
  var AI_PROMPT = "\\n\\nAssistant:";
5743
+
5665
5744
  class BaseAnthropic {
5666
5745
  constructor({ baseURL = readEnv("ANTHROPIC_BASE_URL"), apiKey = readEnv("ANTHROPIC_API_KEY") ?? null, authToken = readEnv("ANTHROPIC_AUTH_TOKEN") ?? null, ...opts } = {}) {
5667
5746
  _BaseAnthropic_instances.add(this);
@@ -5674,9 +5753,11 @@ class BaseAnthropic {
5674
5753
  };
5675
5754
  if (!options.dangerouslyAllowBrowser && isRunningInBrowser()) {
5676
5755
  throw new AnthropicError(`It looks like you're running in a browser-like environment.
5756
+
5677
5757
  This is disabled by default, as it risks exposing your secret API credentials to attackers.
5678
5758
  If you understand the risks and have appropriate mitigations in place,
5679
5759
  you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
5760
+
5680
5761
  new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
5681
5762
  `);
5682
5763
  }
@@ -6078,6 +6159,7 @@ BaseAnthropic.InternalServerError = InternalServerError;
6078
6159
  BaseAnthropic.PermissionDeniedError = PermissionDeniedError;
6079
6160
  BaseAnthropic.UnprocessableEntityError = UnprocessableEntityError;
6080
6161
  BaseAnthropic.toFile = toFile;
6162
+
6081
6163
  class Anthropic extends BaseAnthropic {
6082
6164
  constructor() {
6083
6165
  super(...arguments);
@@ -6111,6 +6193,7 @@ function fromBase64(b64) {
6111
6193
  }
6112
6194
  return bytes;
6113
6195
  }
6196
+
6114
6197
  class KodamaCrypto {
6115
6198
  static async generateKey() {
6116
6199
  const key = await crypto.subtle.generateKey({ name: ALGO, length: KEY_LENGTH }, true, ["encrypt", "decrypt"]);
@@ -6139,6 +6222,7 @@ class KodamaCrypto {
6139
6222
  return crypto.subtle.importKey("raw", raw, { name: ALGO, length: KEY_LENGTH }, false, ["encrypt", "decrypt"]);
6140
6223
  }
6141
6224
  }
6225
+
6142
6226
  // src/permissions.ts
6143
6227
  import { readFile } from "node:fs/promises";
6144
6228
  // ../shared/src/constants.ts
@@ -6155,6 +6239,7 @@ var AUTO_DENY_PATTERNS = [
6155
6239
  ];
6156
6240
  // ../shared/src/index.ts
6157
6241
  var VALID_CODE_RE = new RegExp(`^${ROOM_CODE_PREFIX}-[${ROOM_CODE_CHARS}]{${ROOM_CODE_LENGTH}}$`);
6242
+
6158
6243
  // src/permissions.ts
6159
6244
  function globToRegex(pattern) {
6160
6245
  let re = "";
@@ -6185,6 +6270,7 @@ function globToRegex(pattern) {
6185
6270
  function matchesAny(filePath, patterns) {
6186
6271
  return patterns.some((pattern) => globToRegex(pattern).test(filePath));
6187
6272
  }
6273
+
6188
6274
  class PermissionChecker {
6189
6275
  allowPatterns;
6190
6276
  denyPatterns;
@@ -6251,10 +6337,12 @@ class PermissionChecker {
6251
6337
  }
6252
6338
  }
6253
6339
  }
6340
+
6254
6341
  // src/room.ts
6255
6342
  var INITIAL_BACKOFF_MS = 1000;
6256
6343
  var MAX_BACKOFF_MS = 30000;
6257
6344
  var MAX_RECONNECT_ATTEMPTS = 10;
6345
+
6258
6346
  class Kodama {
6259
6347
  roomCode;
6260
6348
  relayUrl;
@@ -6477,6 +6565,7 @@ class Kodama {
6477
6565
  }, delay);
6478
6566
  }
6479
6567
  }
6568
+
6480
6569
  // src/adapters/cli.ts
6481
6570
  import * as readline from "readline";
6482
6571
  function readLine(prompt) {