@lousy-agents/agent-shell 5.12.2 → 5.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +27 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2274,7 +2274,7 @@ const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync($ZodRealError);
2274
2274
  const versions_version = {
2275
2275
  major: 4,
2276
2276
  minor: 4,
2277
- patch: 2,
2277
+ patch: 3,
2278
2278
  };
2279
2279
 
2280
2280
  ;// CONCATENATED MODULE: ../../node_modules/zod/v4/core/schemas.js
@@ -3997,6 +3997,7 @@ const $ZodFile = /*@__PURE__*/ (/* unused pure expression or super */ null && (c
3997
3997
  })));
3998
3998
  const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
3999
3999
  $ZodType.init(inst, def);
4000
+ inst._zod.optin = "optional";
4000
4001
  inst._zod.parse = (payload, ctx) => {
4001
4002
  if (ctx.direction === "backward") {
4002
4003
  throw new $ZodEncodeError(inst.constructor.name);
@@ -4006,6 +4007,7 @@ const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) =>
4006
4007
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
4007
4008
  return output.then((output) => {
4008
4009
  payload.value = output;
4010
+ payload.fallback = true;
4009
4011
  return payload;
4010
4012
  });
4011
4013
  }
@@ -4013,11 +4015,12 @@ const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) =>
4013
4015
  throw new $ZodAsyncError();
4014
4016
  }
4015
4017
  payload.value = _out;
4018
+ payload.fallback = true;
4016
4019
  return payload;
4017
4020
  };
4018
4021
  });
4019
4022
  function handleOptionalResult(result, input) {
4020
- if (result.issues.length && input === undefined) {
4023
+ if (input === undefined && (result.issues.length || result.fallback)) {
4021
4024
  return { issues: [], value: undefined };
4022
4025
  }
4023
4026
  return result;
@@ -4035,10 +4038,11 @@ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
4035
4038
  });
4036
4039
  inst._zod.parse = (payload, ctx) => {
4037
4040
  if (def.innerType._zod.optin === "optional") {
4041
+ const input = payload.value;
4038
4042
  const result = def.innerType._zod.run(payload, ctx);
4039
4043
  if (result instanceof Promise)
4040
- return result.then((r) => handleOptionalResult(r, payload.value));
4041
- return handleOptionalResult(result, payload.value);
4044
+ return result.then((r) => handleOptionalResult(r, input));
4045
+ return handleOptionalResult(result, input);
4042
4046
  }
4043
4047
  if (payload.value === undefined) {
4044
4048
  return payload;
@@ -4165,7 +4169,7 @@ const $ZodSuccess = /*@__PURE__*/ (/* unused pure expression or super */ null &&
4165
4169
  })));
4166
4170
  const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
4167
4171
  $ZodType.init(inst, def);
4168
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
4172
+ inst._zod.optin = "optional";
4169
4173
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
4170
4174
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
4171
4175
  inst._zod.parse = (payload, ctx) => {
@@ -4186,6 +4190,7 @@ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
4186
4190
  input: payload.value,
4187
4191
  });
4188
4192
  payload.issues = [];
4193
+ payload.fallback = true;
4189
4194
  }
4190
4195
  return payload;
4191
4196
  });
@@ -4200,6 +4205,7 @@ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
4200
4205
  input: payload.value,
4201
4206
  });
4202
4207
  payload.issues = [];
4208
+ payload.fallback = true;
4203
4209
  }
4204
4210
  return payload;
4205
4211
  };
@@ -4246,7 +4252,7 @@ function handlePipeResult(left, next, ctx) {
4246
4252
  left.aborted = true;
4247
4253
  return left;
4248
4254
  }
4249
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
4255
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
4250
4256
  }
4251
4257
  const $ZodCodec = /*@__PURE__*/ (/* unused pure expression or super */ null && (core.$constructor("$ZodCodec", (inst, def) => {
4252
4258
  $ZodType.init(inst, def);
@@ -4304,8 +4310,6 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
4304
4310
  }
4305
4311
  const $ZodPreprocess = /*@__PURE__*/ (/* unused pure expression or super */ null && (core.$constructor("$ZodPreprocess", (inst, def) => {
4306
4312
  $ZodPipe.init(inst, def);
4307
- util.defineLazy(inst._zod, "optin", () => def.out._zod.optin);
4308
- util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
4309
4313
  })));
4310
4314
  const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
4311
4315
  $ZodType.init(inst, def);
@@ -7892,10 +7896,12 @@ const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
7892
7896
  if (output instanceof Promise) {
7893
7897
  return output.then((output) => {
7894
7898
  payload.value = output;
7899
+ payload.fallback = true;
7895
7900
  return payload;
7896
7901
  });
7897
7902
  }
7898
7903
  payload.value = output;
7904
+ payload.fallback = true;
7899
7905
  return payload;
7900
7906
  };
7901
7907
  });
@@ -8445,6 +8451,13 @@ function isPathNotFoundError(err) {
8445
8451
  }
8446
8452
  return false;
8447
8453
  }
8454
+ function isNameTooLongError(err) {
8455
+ if (typeof err === "object" && err !== null && "code" in err) {
8456
+ const { code } = err;
8457
+ return code === "ENAMETOOLONG";
8458
+ }
8459
+ return false;
8460
+ }
8448
8461
 
8449
8462
  ;// CONCATENATED MODULE: ./src/gateways/telemetry.ts
8450
8463
  // biome-ignore-all lint/style/useNamingConvention: telemetry schema uses snake_case field names
@@ -9908,6 +9921,12 @@ async function resolveReadEventsDir(env, deps) {
9908
9921
  error: "AGENTSHELL_LOG_DIR does not exist or is not a directory"
9909
9922
  };
9910
9923
  }
9924
+ if (isNameTooLongError(err)) {
9925
+ return {
9926
+ dir: "",
9927
+ error: "AGENTSHELL_LOG_DIR path is too long"
9928
+ };
9929
+ }
9911
9930
  throw err;
9912
9931
  }
9913
9932
  if (!isWithinProjectRoot(resolved, projectRootReal)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lousy-agents/agent-shell",
3
- "version": "5.12.2",
3
+ "version": "5.13.1",
4
4
  "description": "A flight recorder for npm script execution",
5
5
  "type": "module",
6
6
  "repository": {
@@ -36,7 +36,7 @@
36
36
  "build": "rspack build --config rspack.config.ts && chmod +x dist/index.js"
37
37
  },
38
38
  "dependencies": {
39
- "zod": "4.4.2"
39
+ "zod": "4.4.3"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@github/copilot-sdk": "0.3.0"