gdharness 1.2.14 → 1.2.15

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/build/cli.js CHANGED
@@ -12889,6 +12889,18 @@ function prefixIssues(path, issues) {
12889
12889
  function unwrapMessage(message) {
12890
12890
  return typeof message === "string" ? message : message?.message;
12891
12891
  }
12892
+ function sizeCaps(defChecks) {
12893
+ const caps = [];
12894
+ for (const ch of defChecks ?? []) {
12895
+ const d = ch._zod.def;
12896
+ if (!/_(length|size)$|_equals$/.test(d.check))
12897
+ break;
12898
+ const max = d.maximum ?? d.length ?? d.size;
12899
+ if (max >= 0)
12900
+ caps.push([max, ch]);
12901
+ }
12902
+ return caps;
12903
+ }
12892
12904
  function attachSchema(issues, start, inst) {
12893
12905
  var _a;
12894
12906
  for (let i = start;i < issues.length; i++) {
@@ -13926,7 +13938,7 @@ var init_versions = __esm(() => {
13926
13938
  version = {
13927
13939
  major: 4,
13928
13940
  minor: 6,
13929
- patch: 5
13941
+ patch: 7
13930
13942
  };
13931
13943
  });
13932
13944
 
@@ -14052,6 +14064,28 @@ function isValidJWT(token, algorithm = null) {
14052
14064
  return false;
14053
14065
  }
14054
14066
  }
14067
+ function capSize(inst, size) {
14068
+ const caps = sizeCaps(inst._zod.def.checks);
14069
+ if (!caps.length)
14070
+ return;
14071
+ const cap = Math.min(...caps.map((c) => c[0]));
14072
+ const parse = inst._zod.parse;
14073
+ inst._zod.parse = (payload, ctx) => {
14074
+ const n = size(payload.value);
14075
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
14076
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
14077
+ if (n > max && ch._zod.def.when(payload)) {
14078
+ const start = payload.issues.length;
14079
+ ch._zod.check(payload);
14080
+ payload.issues[start].continue = false;
14081
+ attachSchema(payload.issues, start, inst);
14082
+ return payload;
14083
+ }
14084
+ }
14085
+ }
14086
+ return parse(payload, ctx);
14087
+ };
14088
+ }
14055
14089
  function handleArrayResult(result, final, index) {
14056
14090
  if (result.issues.length) {
14057
14091
  final.issues.push(...prefixIssues(index, result.issues));
@@ -14357,7 +14391,7 @@ function handleRefineResult(result, payload, input, inst) {
14357
14391
  payload.issues.push(issue(_iss));
14358
14392
  }
14359
14393
  }
14360
- var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
14394
+ var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, arraySize = (input) => Array.isArray(input) ? input.length : -1, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
14361
14395
  var init_schemas = __esm(() => {
14362
14396
  init_checks();
14363
14397
  init_core();
@@ -14847,6 +14881,7 @@ var init_schemas = __esm(() => {
14847
14881
  }
14848
14882
  return payload;
14849
14883
  };
14884
+ capSize(inst, arraySize);
14850
14885
  });
14851
14886
  NO_SYMBOL_KEYS = [];
14852
14887
  $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
@@ -40799,7 +40834,11 @@ var init_prompts = __esm(() => {
40799
40834
  }
40800
40835
  ],
40801
40836
  steps: [
40802
- { tool: "editor_status", passes: [], why: "see whether an editor is connected and its addon matches" },
40837
+ {
40838
+ tool: "editor_status",
40839
+ passes: [],
40840
+ why: "see whether an editor is connected and its addon matches; without one the run is a game of its own, not a fault"
40841
+ },
40803
40842
  { tool: "editor_run", op: "start", passes: ["projectPath", "scene"], why: "start the run" },
40804
40843
  {
40805
40844
  tool: "editor_run",
@@ -40817,7 +40856,11 @@ var init_prompts = __esm(() => {
40817
40856
  description: "Check the editor connection, the project health report, export validation and the import state.",
40818
40857
  arguments: [PROJECT_PATH2],
40819
40858
  steps: [
40820
- { tool: "editor_status", passes: [], why: "see whether an editor is connected and its addon matches" },
40859
+ {
40860
+ tool: "editor_status",
40861
+ passes: [],
40862
+ why: "see whether an editor is connected and, if one is, whether its addon matches; no editor is no fault in the project, so leave it out of what is wrong"
40863
+ },
40821
40864
  {
40822
40865
  tool: "project_info",
40823
40866
  passes: ["projectPath"],
package/build/index.js CHANGED
@@ -3807,6 +3807,18 @@ function prefixIssues(path, issues) {
3807
3807
  function unwrapMessage(message) {
3808
3808
  return typeof message === "string" ? message : message?.message;
3809
3809
  }
3810
+ function sizeCaps(defChecks) {
3811
+ const caps = [];
3812
+ for (const ch of defChecks ?? []) {
3813
+ const d = ch._zod.def;
3814
+ if (!/_(length|size)$|_equals$/.test(d.check))
3815
+ break;
3816
+ const max = d.maximum ?? d.length ?? d.size;
3817
+ if (max >= 0)
3818
+ caps.push([max, ch]);
3819
+ }
3820
+ return caps;
3821
+ }
3810
3822
  function attachSchema(issues, start, inst) {
3811
3823
  var _a;
3812
3824
  for (let i = start;i < issues.length; i++) {
@@ -4808,7 +4820,7 @@ ${content.join(`
4808
4820
  var version = {
4809
4821
  major: 4,
4810
4822
  minor: 6,
4811
- patch: 5
4823
+ patch: 7
4812
4824
  };
4813
4825
 
4814
4826
  // node_modules/zod/v4/core/schemas.js
@@ -5381,6 +5393,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
5381
5393
  return payload;
5382
5394
  };
5383
5395
  });
5396
+ function capSize(inst, size) {
5397
+ const caps = sizeCaps(inst._zod.def.checks);
5398
+ if (!caps.length)
5399
+ return;
5400
+ const cap = Math.min(...caps.map((c) => c[0]));
5401
+ const parse = inst._zod.parse;
5402
+ inst._zod.parse = (payload, ctx) => {
5403
+ const n = size(payload.value);
5404
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
5405
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
5406
+ if (n > max && ch._zod.def.when(payload)) {
5407
+ const start = payload.issues.length;
5408
+ ch._zod.check(payload);
5409
+ payload.issues[start].continue = false;
5410
+ attachSchema(payload.issues, start, inst);
5411
+ return payload;
5412
+ }
5413
+ }
5414
+ }
5415
+ return parse(payload, ctx);
5416
+ };
5417
+ }
5418
+ var arraySize = (input) => Array.isArray(input) ? input.length : -1;
5384
5419
  function handleArrayResult(result, final, index) {
5385
5420
  if (result.issues.length) {
5386
5421
  final.issues.push(...prefixIssues(index, result.issues));
@@ -5424,6 +5459,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
5424
5459
  }
5425
5460
  return payload;
5426
5461
  };
5462
+ capSize(inst, arraySize);
5427
5463
  });
5428
5464
  function handlePropertyResult(result, final, key, input, optin, optout) {
5429
5465
  const isPresent = key in input;
@@ -31348,7 +31384,11 @@ var PROMPT_SPECS = [
31348
31384
  }
31349
31385
  ],
31350
31386
  steps: [
31351
- { tool: "editor_status", passes: [], why: "see whether an editor is connected and its addon matches" },
31387
+ {
31388
+ tool: "editor_status",
31389
+ passes: [],
31390
+ why: "see whether an editor is connected and its addon matches; without one the run is a game of its own, not a fault"
31391
+ },
31352
31392
  { tool: "editor_run", op: "start", passes: ["projectPath", "scene"], why: "start the run" },
31353
31393
  {
31354
31394
  tool: "editor_run",
@@ -31366,7 +31406,11 @@ var PROMPT_SPECS = [
31366
31406
  description: "Check the editor connection, the project health report, export validation and the import state.",
31367
31407
  arguments: [PROJECT_PATH],
31368
31408
  steps: [
31369
- { tool: "editor_status", passes: [], why: "see whether an editor is connected and its addon matches" },
31409
+ {
31410
+ tool: "editor_status",
31411
+ passes: [],
31412
+ why: "see whether an editor is connected and, if one is, whether its addon matches; no editor is no fault in the project, so leave it out of what is wrong"
31413
+ },
31370
31414
  {
31371
31415
  tool: "project_info",
31372
31416
  passes: ["projectPath"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "mcpName": "io.github.Aureliolo/gdharness",
5
5
  "description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
6
6
  "type": "module",