stitchkit 0.103.2 → 0.103.3

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/CHANGELOG.md CHANGED
@@ -15,6 +15,14 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
15
15
 
16
16
  ## [Unreleased]
17
17
 
18
+ ## [0.103.3] — 2026-10-01
19
+
20
+ ### Fixed
21
+
22
+ - CLI help displays schema numeric bounds, string lengths and array item counts for
23
+ contract, runtime and native commands, and application options. Alternative schemas
24
+ keep their bounds in separate branches; argument validation is unchanged.
25
+
18
26
  ## [0.103.2] — 2026-10-01
19
27
 
20
28
  ### Fixed
@@ -18,7 +18,7 @@ import {
18
18
  renderCliView2,
19
19
  pollUntilDone2,
20
20
  createCli2
21
- } from "../index-1br6gwhf.js";
21
+ } from "../index-ahtnte39.js";
22
22
  import {
23
23
  AppError2
24
24
  } from "../index-n53mswt3.js";
@@ -77,7 +77,7 @@ import {
77
77
  WaitTimeoutError,
78
78
  runWaitOperation,
79
79
  createCli2
80
- } from "../index-1br6gwhf.js";
80
+ } from "../index-ahtnte39.js";
81
81
  import {
82
82
  ManagedFilePathSchema2,
83
83
  ManagedFileRefSchema2
@@ -1811,6 +1811,46 @@ function typeLabel(schema) {
1811
1811
  return schema.type;
1812
1812
  return "value";
1813
1813
  }
1814
+ function constraintLabel(schema) {
1815
+ const limits = [];
1816
+ const bounds = [
1817
+ ["minimum", ">="],
1818
+ ["exclusiveMinimum", ">"],
1819
+ ["maximum", "<="],
1820
+ ["exclusiveMaximum", "<"],
1821
+ ["minLength", "length >="],
1822
+ ["maxLength", "length <="],
1823
+ ["minItems", "items >="],
1824
+ ["maxItems", "items <="]
1825
+ ];
1826
+ for (const [keyword, label] of bounds) {
1827
+ const bound = schema[keyword];
1828
+ if (typeof bound === "number")
1829
+ limits.push(`${label}${bound}`);
1830
+ }
1831
+ const compositions = [
1832
+ ["anyOf", "any of", " | "],
1833
+ ["oneOf", "one of", " | "],
1834
+ ["allOf", "all of", " & "]
1835
+ ];
1836
+ for (const [keyword, label, separator] of compositions) {
1837
+ const members = schema[keyword];
1838
+ if (!Array.isArray(members))
1839
+ continue;
1840
+ const branches = members.map((member) => {
1841
+ const constraints = isRecord(member) ? constraintLabel(member) : "";
1842
+ const type = isRecord(member) ? typeLabel(member) : member === false ? "no value" : "any value";
1843
+ return { constraints, text: `${type}${constraints}` };
1844
+ });
1845
+ if (branches.every((branch) => branch.constraints === ""))
1846
+ continue;
1847
+ limits.push(`${label}: ${branches.map((branch) => branch.text).join(separator)}`);
1848
+ }
1849
+ return limits.length === 0 ? "" : ` [${limits.join(", ")}]`;
1850
+ }
1851
+ function fieldTypeLabel(schema) {
1852
+ return `<${typeLabel(schema)}>${constraintLabel(schema)}`;
1853
+ }
1814
1854
  function padRight(text, width) {
1815
1855
  return text.length >= width ? text : text + " ".repeat(width - text.length);
1816
1856
  }
@@ -1824,7 +1864,7 @@ function summarize(desc) {
1824
1864
  function applicationOptionLines(fields) {
1825
1865
  if (fields.length === 0)
1826
1866
  return [];
1827
- const labels = new Map(fields.map((field) => [field.name, `--${field.name} <${typeLabel(field.schema)}>`]));
1867
+ const labels = new Map(fields.map((field) => [field.name, `--${field.name} ${fieldTypeLabel(field.schema)}`]));
1828
1868
  const width = Math.max(...fields.map((field) => labels.get(field.name)?.length ?? 0));
1829
1869
  return [
1830
1870
  "",
@@ -1904,7 +1944,7 @@ function renderCommandHelp(name, command, descriptor, applicationOptions = []) {
1904
1944
  const req = f.required ? " (required)" : "";
1905
1945
  const desc = f.description ? ` — ${f.description}` : "";
1906
1946
  const label = labels.get(f.name) ?? `--${f.name}`;
1907
- lines.push(` ${padRight(label, width)} <${typeLabel(f.schema)}>${req}${desc}`);
1947
+ lines.push(` ${padRight(label, width)} ${fieldTypeLabel(f.schema)}${req}${desc}`);
1908
1948
  }
1909
1949
  const flag = [...kinds].find(([, info]) => info.kind === "boolean")?.[0];
1910
1950
  if (flag !== undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/help.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,+BAA+B,CAAC;AAEvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA6DvD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAC7C,MAAM,EAAE,MAAM,GACb,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CASrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAqCT;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,sBAAsB,EAClC,kBAAkB,GAAE,SAAS,eAAe,EAAO,GAClD,MAAM,CA6DR"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/tools/cli/help.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,+BAA+B,CAAC;AAEvF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA2GvD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,EAC7C,MAAM,EAAE,MAAM,GACb,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CASrC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,SAAS,eAAe,EAAE,CAAC;IAC/C,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAqCT;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,sBAAsB,EAClC,kBAAkB,GAAE,SAAS,eAAe,EAAO,GAClD,MAAM,CA6DR"}
package/llms/cli.txt CHANGED
@@ -428,6 +428,19 @@ the argv parser. For example, a required `action` and optional `profile` render
428
428
  Declared aliases render beside their canonical options, for example
429
429
  `-n, --lines`.
430
430
 
431
+ The argument table and `Application options:` show bounds from their JSON Schema,
432
+ for example `<integer> [>=1, <=50]`, `<string> [length >=1, length <=12]`, and
433
+ `<value…> [items >=2, items <=4]`. Numeric `>` and `<` are exclusive, while `>=`
434
+ and `<=` include the endpoint; a zero limit is displayed too. Unbounded fields
435
+ keep just their type and description. Bounds on an array's items are not bounds
436
+ on the array itself.
437
+
438
+ Composed schemas retain their meaning: `any of:` and `one of:` separate
439
+ alternative branches with `|`, while `all of:` joins constraints with `&`.
440
+ For example, a nullable bounded string renders
441
+ `<value> [any of: string [length >=1] | null]`. These labels describe the input;
442
+ the same contract schema still validates the call.
443
+
431
444
  ## `--wait` — background-friendly generation
432
445
 
433
446
  `--wait` polls an async result until it is done. It is generic — the core knows
package/llms-full.txt CHANGED
@@ -8791,6 +8791,19 @@ the argv parser. For example, a required `action` and optional `profile` render
8791
8791
  Declared aliases render beside their canonical options, for example
8792
8792
  `-n, --lines`.
8793
8793
 
8794
+ The argument table and `Application options:` show bounds from their JSON Schema,
8795
+ for example `<integer> [>=1, <=50]`, `<string> [length >=1, length <=12]`, and
8796
+ `<value…> [items >=2, items <=4]`. Numeric `>` and `<` are exclusive, while `>=`
8797
+ and `<=` include the endpoint; a zero limit is displayed too. Unbounded fields
8798
+ keep just their type and description. Bounds on an array's items are not bounds
8799
+ on the array itself.
8800
+
8801
+ Composed schemas retain their meaning: `any of:` and `one of:` separate
8802
+ alternative branches with `|`, while `all of:` joins constraints with `&`.
8803
+ For example, a nullable bounded string renders
8804
+ `<value> [any of: string [length >=1] | null]`. These labels describe the input;
8805
+ the same contract schema still validates the call.
8806
+
8794
8807
  ## `--wait` — background-friendly generation
8795
8808
 
8796
8809
  `--wait` polls an async result until it is done. It is generic — the core knows
package/llms.txt CHANGED
@@ -17,7 +17,7 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
17
17
  - **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
18
18
  - **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
19
19
  - **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.1 KB
20
- - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 42.8 KB → [llms/cli.2.txt](llms/cli.2.txt) 8.1 KB
20
+ - **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 43.6 KB → [llms/cli.2.txt](llms/cli.2.txt) 8.1 KB
21
21
  - **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
22
22
  - **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
23
23
  - **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 9.3 KB
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stitchkit",
3
- "version": "0.103.2",
3
+ "version": "0.103.3",
4
4
  "description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
5
5
  "keywords": [
6
6
  "bun",