argsbarg 7.0.9 → 7.0.10

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.
@@ -30,7 +30,7 @@ Echo a message (MCP-friendly leaf).
30
30
  #### Subcommands
31
31
 
32
32
  - `version` — Print the program version.
33
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
33
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
34
34
  - `docs` — Print bundled CLI documentation.
35
35
  - `mcp` — MCP server and bundle tools.
36
36
  - `http` — HTTP API server for tools.
@@ -41,7 +41,7 @@ Print the program version.
41
41
 
42
42
  #### `full-example-json echo configure`
43
43
 
44
- Set up agent skills and MCP config for this app (binary via Homebrew).
44
+ Set up MCP config for this app (binary via Homebrew).
45
45
 
46
46
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
47
47
  >
@@ -116,7 +116,6 @@ Print bundled CLI documentation.
116
116
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
117
117
  - `cli-schema` — Print the full CLI command tree as JSON.
118
118
  - `cli` — Print the full command reference as markdown.
119
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
120
119
 
121
120
  ##### `full-example-json echo docs readme`
122
121
 
@@ -178,16 +177,6 @@ Print the full command reference as markdown.
178
177
  | --- | --- | --- | --- | --- |
179
178
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
180
179
 
181
- ##### `full-example-json echo docs skill`
182
-
183
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
184
-
185
- #### Options
186
-
187
- | Option | Type | Required | Format / default | Description |
188
- | --- | --- | --- | --- | --- |
189
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
190
-
191
180
  #### `full-example-json echo mcp`
192
181
 
193
182
  MCP server and bundle tools.
@@ -258,7 +247,7 @@ Echo a JSON message (schema-first JSON leaf demo).
258
247
  #### Subcommands
259
248
 
260
249
  - `version` — Print the program version.
261
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
250
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
262
251
  - `docs` — Print bundled CLI documentation.
263
252
  - `mcp` — MCP server and bundle tools.
264
253
  - `http` — HTTP API server for tools.
@@ -269,7 +258,7 @@ Print the program version.
269
258
 
270
259
  #### `full-example-json render-json configure`
271
260
 
272
- Set up agent skills and MCP config for this app (binary via Homebrew).
261
+ Set up MCP config for this app (binary via Homebrew).
273
262
 
274
263
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
275
264
  >
@@ -344,7 +333,6 @@ Print bundled CLI documentation.
344
333
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
345
334
  - `cli-schema` — Print the full CLI command tree as JSON.
346
335
  - `cli` — Print the full command reference as markdown.
347
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
348
336
 
349
337
  ##### `full-example-json render-json docs readme`
350
338
 
@@ -406,16 +394,6 @@ Print the full command reference as markdown.
406
394
  | --- | --- | --- | --- | --- |
407
395
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
408
396
 
409
- ##### `full-example-json render-json docs skill`
410
-
411
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
412
-
413
- #### Options
414
-
415
- | Option | Type | Required | Format / default | Description |
416
- | --- | --- | --- | --- | --- |
417
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
418
-
419
397
  #### `full-example-json render-json mcp`
420
398
 
421
399
  MCP server and bundle tools.
@@ -514,7 +492,7 @@ JSON Schema for output when/if handler emits JSON
514
492
  #### Subcommands
515
493
 
516
494
  - `version` — Print the program version.
517
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
495
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
518
496
  - `docs` — Print bundled CLI documentation.
519
497
  - `mcp` — MCP server and bundle tools.
520
498
  - `http` — HTTP API server for tools.
@@ -525,7 +503,7 @@ Print the program version.
525
503
 
526
504
  #### `full-example-json status configure`
527
505
 
528
- Set up agent skills and MCP config for this app (binary via Homebrew).
506
+ Set up MCP config for this app (binary via Homebrew).
529
507
 
530
508
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
531
509
  >
@@ -600,7 +578,6 @@ Print bundled CLI documentation.
600
578
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
601
579
  - `cli-schema` — Print the full CLI command tree as JSON.
602
580
  - `cli` — Print the full command reference as markdown.
603
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
604
581
 
605
582
  ##### `full-example-json status docs readme`
606
583
 
@@ -662,16 +639,6 @@ Print the full command reference as markdown.
662
639
  | --- | --- | --- | --- | --- |
663
640
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
664
641
 
665
- ##### `full-example-json status docs skill`
666
-
667
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
668
-
669
- #### Options
670
-
671
- | Option | Type | Required | Format / default | Description |
672
- | --- | --- | --- | --- | --- |
673
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
674
-
675
642
  #### `full-example-json status mcp`
676
643
 
677
644
  MCP server and bundle tools.
@@ -752,7 +719,7 @@ List workspaces.
752
719
  #### Subcommands
753
720
 
754
721
  - `version` — Print the program version.
755
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
722
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
756
723
  - `docs` — Print bundled CLI documentation.
757
724
  - `mcp` — MCP server and bundle tools.
758
725
  - `http` — HTTP API server for tools.
@@ -763,7 +730,7 @@ Print the program version.
763
730
 
764
731
  ##### `full-example-json workspaces get configure`
765
732
 
766
- Set up agent skills and MCP config for this app (binary via Homebrew).
733
+ Set up MCP config for this app (binary via Homebrew).
767
734
 
768
735
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
769
736
  >
@@ -838,7 +805,6 @@ Print bundled CLI documentation.
838
805
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
839
806
  - `cli-schema` — Print the full CLI command tree as JSON.
840
807
  - `cli` — Print the full command reference as markdown.
841
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
842
808
 
843
809
  ###### `full-example-json workspaces get docs readme`
844
810
 
@@ -900,16 +866,6 @@ Print the full command reference as markdown.
900
866
  | --- | --- | --- | --- | --- |
901
867
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
902
868
 
903
- ###### `full-example-json workspaces get docs skill`
904
-
905
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
906
-
907
- #### Options
908
-
909
- | Option | Type | Required | Format / default | Description |
910
- | --- | --- | --- | --- | --- |
911
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
912
-
913
869
  ##### `full-example-json workspaces get mcp`
914
870
 
915
871
  MCP server and bundle tools.
@@ -980,7 +936,7 @@ Create a workspace.
980
936
  #### Subcommands
981
937
 
982
938
  - `version` — Print the program version.
983
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
939
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
984
940
  - `docs` — Print bundled CLI documentation.
985
941
  - `mcp` — MCP server and bundle tools.
986
942
  - `http` — HTTP API server for tools.
@@ -991,7 +947,7 @@ Print the program version.
991
947
 
992
948
  ##### `full-example-json workspaces post configure`
993
949
 
994
- Set up agent skills and MCP config for this app (binary via Homebrew).
950
+ Set up MCP config for this app (binary via Homebrew).
995
951
 
996
952
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
997
953
  >
@@ -1066,7 +1022,6 @@ Print bundled CLI documentation.
1066
1022
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
1067
1023
  - `cli-schema` — Print the full CLI command tree as JSON.
1068
1024
  - `cli` — Print the full command reference as markdown.
1069
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
1070
1025
 
1071
1026
  ###### `full-example-json workspaces post docs readme`
1072
1027
 
@@ -1128,16 +1083,6 @@ Print the full command reference as markdown.
1128
1083
  | --- | --- | --- | --- | --- |
1129
1084
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
1130
1085
 
1131
- ###### `full-example-json workspaces post docs skill`
1132
-
1133
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
1134
-
1135
- #### Options
1136
-
1137
- | Option | Type | Required | Format / default | Description |
1138
- | --- | --- | --- | --- | --- |
1139
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
1140
-
1141
1086
  ##### `full-example-json workspaces post mcp`
1142
1087
 
1143
1088
  MCP server and bundle tools.
@@ -1219,7 +1164,7 @@ Get one workspace.
1219
1164
  #### Subcommands
1220
1165
 
1221
1166
  - `version` — Print the program version.
1222
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
1167
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
1223
1168
  - `docs` — Print bundled CLI documentation.
1224
1169
  - `mcp` — MCP server and bundle tools.
1225
1170
  - `http` — HTTP API server for tools.
@@ -1230,7 +1175,7 @@ Print the program version.
1230
1175
 
1231
1176
  ###### `full-example-json workspaces :id get configure`
1232
1177
 
1233
- Set up agent skills and MCP config for this app (binary via Homebrew).
1178
+ Set up MCP config for this app (binary via Homebrew).
1234
1179
 
1235
1180
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
1236
1181
  >
@@ -1305,7 +1250,6 @@ Print bundled CLI documentation.
1305
1250
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
1306
1251
  - `cli-schema` — Print the full CLI command tree as JSON.
1307
1252
  - `cli` — Print the full command reference as markdown.
1308
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
1309
1253
 
1310
1254
  ###### `full-example-json workspaces :id get docs readme`
1311
1255
 
@@ -1367,16 +1311,6 @@ Print the full command reference as markdown.
1367
1311
  | --- | --- | --- | --- | --- |
1368
1312
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
1369
1313
 
1370
- ###### `full-example-json workspaces :id get docs skill`
1371
-
1372
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
1373
-
1374
- #### Options
1375
-
1376
- | Option | Type | Required | Format / default | Description |
1377
- | --- | --- | --- | --- | --- |
1378
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
1379
-
1380
1314
  ###### `full-example-json workspaces :id get mcp`
1381
1315
 
1382
1316
  MCP server and bundle tools.
@@ -1447,7 +1381,7 @@ Replace a workspace.
1447
1381
  #### Subcommands
1448
1382
 
1449
1383
  - `version` — Print the program version.
1450
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
1384
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
1451
1385
  - `docs` — Print bundled CLI documentation.
1452
1386
  - `mcp` — MCP server and bundle tools.
1453
1387
  - `http` — HTTP API server for tools.
@@ -1458,7 +1392,7 @@ Print the program version.
1458
1392
 
1459
1393
  ###### `full-example-json workspaces :id put configure`
1460
1394
 
1461
- Set up agent skills and MCP config for this app (binary via Homebrew).
1395
+ Set up MCP config for this app (binary via Homebrew).
1462
1396
 
1463
1397
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
1464
1398
  >
@@ -1533,7 +1467,6 @@ Print bundled CLI documentation.
1533
1467
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
1534
1468
  - `cli-schema` — Print the full CLI command tree as JSON.
1535
1469
  - `cli` — Print the full command reference as markdown.
1536
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
1537
1470
 
1538
1471
  ###### `full-example-json workspaces :id put docs readme`
1539
1472
 
@@ -1595,16 +1528,6 @@ Print the full command reference as markdown.
1595
1528
  | --- | --- | --- | --- | --- |
1596
1529
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
1597
1530
 
1598
- ###### `full-example-json workspaces :id put docs skill`
1599
-
1600
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
1601
-
1602
- #### Options
1603
-
1604
- | Option | Type | Required | Format / default | Description |
1605
- | --- | --- | --- | --- | --- |
1606
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
1607
-
1608
1531
  ###### `full-example-json workspaces :id put mcp`
1609
1532
 
1610
1533
  MCP server and bundle tools.
@@ -1675,7 +1598,7 @@ Patch a workspace name.
1675
1598
  #### Subcommands
1676
1599
 
1677
1600
  - `version` — Print the program version.
1678
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
1601
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
1679
1602
  - `docs` — Print bundled CLI documentation.
1680
1603
  - `mcp` — MCP server and bundle tools.
1681
1604
  - `http` — HTTP API server for tools.
@@ -1686,7 +1609,7 @@ Print the program version.
1686
1609
 
1687
1610
  ###### `full-example-json workspaces :id patch configure`
1688
1611
 
1689
- Set up agent skills and MCP config for this app (binary via Homebrew).
1612
+ Set up MCP config for this app (binary via Homebrew).
1690
1613
 
1691
1614
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
1692
1615
  >
@@ -1761,7 +1684,6 @@ Print bundled CLI documentation.
1761
1684
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
1762
1685
  - `cli-schema` — Print the full CLI command tree as JSON.
1763
1686
  - `cli` — Print the full command reference as markdown.
1764
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
1765
1687
 
1766
1688
  ###### `full-example-json workspaces :id patch docs readme`
1767
1689
 
@@ -1823,16 +1745,6 @@ Print the full command reference as markdown.
1823
1745
  | --- | --- | --- | --- | --- |
1824
1746
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
1825
1747
 
1826
- ###### `full-example-json workspaces :id patch docs skill`
1827
-
1828
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
1829
-
1830
- #### Options
1831
-
1832
- | Option | Type | Required | Format / default | Description |
1833
- | --- | --- | --- | --- | --- |
1834
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
1835
-
1836
1748
  ###### `full-example-json workspaces :id patch mcp`
1837
1749
 
1838
1750
  MCP server and bundle tools.
@@ -1903,7 +1815,7 @@ Delete a workspace.
1903
1815
  #### Subcommands
1904
1816
 
1905
1817
  - `version` — Print the program version.
1906
- - `configure` — Set up agent skills and MCP config for this app (binary via Homebrew).
1818
+ - `configure` — Set up MCP config for this app (binary via Homebrew).
1907
1819
  - `docs` — Print bundled CLI documentation.
1908
1820
  - `mcp` — MCP server and bundle tools.
1909
1821
  - `http` — HTTP API server for tools.
@@ -1914,7 +1826,7 @@ Print the program version.
1914
1826
 
1915
1827
  ###### `full-example-json workspaces :id delete configure`
1916
1828
 
1917
- Set up agent skills and MCP config for this app (binary via Homebrew).
1829
+ Set up MCP config for this app (binary via Homebrew).
1918
1830
 
1919
1831
  > Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
1920
1832
  >
@@ -1989,7 +1901,6 @@ Print bundled CLI documentation.
1989
1901
  - `openapi` — Print the HTTP OpenAPI 3.1 document as JSON.
1990
1902
  - `cli-schema` — Print the full CLI command tree as JSON.
1991
1903
  - `cli` — Print the full command reference as markdown.
1992
- - `skill` — Print a reference agent SKILL; run `configure install` to install an optimized copy.
1993
1904
 
1994
1905
  ###### `full-example-json workspaces :id delete docs readme`
1995
1906
 
@@ -2051,16 +1962,6 @@ Print the full command reference as markdown.
2051
1962
  | --- | --- | --- | --- | --- |
2052
1963
  | `--save` | flag | optional | — | Write documentation to ./docs/. |
2053
1964
 
2054
- ###### `full-example-json workspaces :id delete docs skill`
2055
-
2056
- Print a reference agent SKILL; run `configure install` to install an optimized copy.
2057
-
2058
- #### Options
2059
-
2060
- | Option | Type | Required | Format / default | Description |
2061
- | --- | --- | --- | --- | --- |
2062
- | `--save` | flag | optional | — | Write documentation to ./docs/. |
2063
-
2064
1965
  ###### `full-example-json workspaces :id delete mcp`
2065
1966
 
2066
1967
  MCP server and bundle tools.
@@ -352,6 +352,7 @@
352
352
  "description": "Text to print."
353
353
  }
354
354
  },
355
+ "additionalProperties": false,
355
356
  "required": [
356
357
  "message"
357
358
  ]
@@ -583,7 +584,8 @@
583
584
  "application/json; charset=utf-8": {
584
585
  "schema": {
585
586
  "type": "object",
586
- "properties": {}
587
+ "properties": {},
588
+ "additionalProperties": false
587
589
  }
588
590
  }
589
591
  }
package/index.d.ts CHANGED
@@ -864,6 +864,21 @@ export declare function readJsonOptionValue(ctx: CliContext, name: string): unkn
864
864
  * Call from {@link Cli.run} before constructing the handler context.
865
865
  */
866
866
  export declare function preloadPipableJson(program: CliProgram, commandPath: string[], opts: Record<string, string>, invocation: CliInvocation, args?: string[]): Promise<Record<string, unknown>>;
867
+ /**
868
+ * Filters leaf-local options to only those exposed over wire protocols (MCP, OpenAPI, CLI schema export).
869
+ * Omits hidden options and framework-handled presence flags (`--json`, `--yes`, `--verbose`).
870
+ */
871
+ export declare function leafWireOptions(
872
+ /** Leaf command node to extract wire options from. */
873
+ leaf: CliLeaf): CliOption[];
874
+ /**
875
+ * Builds the canonical input JSON Schema for a leaf command.
876
+ * Returns `leaf.inputSchema` when explicitly defined (e.g. on document leaves or schemagen leaves);
877
+ * otherwise synthesizes a flat object schema from leaf-local wire options and positionals.
878
+ */
879
+ export declare function buildLeafInputSchema(
880
+ /** Leaf command node to build the input schema for. */
881
+ leaf: CliLeaf): Record<string, unknown>;
867
882
  /** Minimal context for headless routing helpers. */
868
883
  export type HeadlessContext = Pick<CliContext, "invocation">;
869
884
  /** True when `--json` was passed or the handler was invoked headlessly over MCP/HTTP. */
@@ -933,6 +948,8 @@ export interface CliSchemaExport {
933
948
  key: string;
934
949
  description: string;
935
950
  notes?: string;
951
+ /** JSON Schema for input arguments (options, positionals, or document body) when on a leaf. */
952
+ inputSchema?: Record<string, unknown>;
936
953
  /** JSON Schema for structured stdout when set on the leaf. */
937
954
  outputSchema?: Record<string, unknown>;
938
955
  /** Default success Content-Type when `outputSchema` is omitted but `http.successContentType` is set. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argsbarg",
3
- "version": "7.0.9",
3
+ "version": "7.0.10",
4
4
  "main": "./src/index.ts",
5
5
  "module": "./src/index.ts",
6
6
  "dependencies": {
@@ -9,6 +9,8 @@ export interface CliSchemaExport {
9
9
  key: string;
10
10
  description: string;
11
11
  notes?: string;
12
+ /** JSON Schema for input arguments (options, positionals, or document body) when on a leaf. */
13
+ inputSchema?: Record<string, unknown>;
12
14
  /** JSON Schema for structured stdout when set on the leaf. */
13
15
  outputSchema?: Record<string, unknown>;
14
16
  /** Default success Content-Type when `outputSchema` is omitted but `http.successContentType` is set. */
@@ -6,6 +6,7 @@ import { type CliSchemaExport, exportPresentationBuiltins } from "../builtins/ex
6
6
  import { cliResolveNotes } from "../help.ts";
7
7
  import { isCliSchemaHidden, visibleOptions } from "../runtime/exposure.ts";
8
8
  import { type CliNode, type CliProgram, isCliLeaf, isCliRouter, leafOutputSchema } from "./types.ts";
9
+ import { buildLeafInputSchema } from "./wire-schema.ts";
9
10
 
10
11
  const RESERVED = new Set(["http", "completion", "configure", "docs", "mcp", "version"]);
11
12
 
@@ -32,6 +33,7 @@ function exportCommand(cmd: CliNode, root: CliProgram): CliSchemaExport | null {
32
33
  if ((cmd.positionals ?? []).length > 0) {
33
34
  out.positionals = cmd.positionals;
34
35
  }
36
+ out.inputSchema = buildLeafInputSchema(cmd);
35
37
  const outputSchema = leafOutputSchema(cmd);
36
38
  if (outputSchema !== undefined) {
37
39
  out.outputSchema = outputSchema;