argsbarg 7.1.2 → 7.1.4

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 (59) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.md +7 -7
  3. package/docs/README.md +1 -1
  4. package/docs/cli-program.md +1 -1
  5. package/docs/configure.md +2 -2
  6. package/docs/mcp.md +20 -0
  7. package/docs/output-schema.md +6 -0
  8. package/examples/full-example/AGENTS.md +1 -1
  9. package/examples/full-example/bun.lock +83 -1
  10. package/examples/full-example/justfile +5 -3
  11. package/examples/full-example-json/AGENTS.md +1 -1
  12. package/examples/full-example-json/README.md +1 -0
  13. package/examples/full-example-json/bun.lock +83 -1
  14. package/examples/full-example-json/docs/cli-schema.json +284 -9
  15. package/examples/full-example-json/docs/cli.md +236 -18
  16. package/examples/full-example-json/docs/http.md +1 -0
  17. package/examples/full-example-json/docs/mcp.md +18 -0
  18. package/examples/full-example-json/docs/openapi.json +155 -0
  19. package/examples/full-example-json/justfile +5 -3
  20. package/examples/full-example-json/src/commands/shape-area/__generated__/ShapeAreaInputSchema.json +59 -0
  21. package/examples/full-example-json/src/commands/shape-area/__generated__/index.ts +5 -0
  22. package/examples/full-example-json/src/commands/shape-area/command.test.ts +34 -0
  23. package/examples/full-example-json/src/commands/shape-area/command.ts +31 -0
  24. package/examples/full-example-json/src/commands/shape-area/types.ts +28 -0
  25. package/examples/full-example-json/src/program.ts +2 -1
  26. package/examples/mcp-plugin/.claude-plugin/plugin.json +7 -1
  27. package/examples/mcp-plugin/.cursor-plugin/plugin.json +7 -1
  28. package/examples/mcp-plugin/AGENTS.md +12 -1
  29. package/examples/mcp-plugin/README.md +18 -9
  30. package/examples/mcp-plugin/bun.lock +83 -1
  31. package/examples/mcp-plugin/dist/mcp-plugin.mjs +385 -0
  32. package/examples/mcp-plugin/justfile +17 -12
  33. package/examples/mcp-plugin/package.json +2 -5
  34. package/examples/mcp-plugin/scripts/release.ts +17 -30
  35. package/examples/mcp-plugin/src/index.ts +0 -1
  36. package/package.json +1 -1
  37. package/src/cli-tool/create.test.ts +14 -0
  38. package/src/cli-tool/create.ts +9 -0
  39. package/src/cli-tool/main.ts +1 -1
  40. package/src/cli-tool/schemagen/run.ts +41 -2
  41. package/src/cli-tool/schemagen/schemagen.test.ts +87 -2
  42. package/src/config/validate.ts +13 -31
  43. package/src/core/json-pointer.ts +46 -0
  44. package/src/core/validate.ts +64 -1
  45. package/src/headless/tool-call.test.ts +74 -2
  46. package/src/headless/tool-call.ts +44 -22
  47. package/src/http/schema-deref.ts +1 -23
  48. package/src/mcp/tools.test.ts +137 -3
  49. package/src/mcp/tools.ts +50 -5
  50. package/examples/mcp-plugin/.mcp.json +0 -6
  51. package/examples/mcp-plugin/bunfig.toml +0 -3
  52. package/examples/mcp-plugin/mcp.json +0 -8
  53. package/examples/mcp-plugin/scripts/mcp.mjs +0 -11106
  54. package/examples/mcp-plugin/src/commands/render-json/__generated__/RenderJsonInputSchema.json +0 -15
  55. package/examples/mcp-plugin/src/commands/render-json/__generated__/index.ts +0 -5
  56. package/examples/mcp-plugin/src/commands/status/__generated__/StatusJsonOutputSchema.json +0 -15
  57. package/examples/mcp-plugin/src/commands/status/__generated__/index.ts +0 -5
  58. package/examples/mcp-plugin/src/commands/workspaces/__generated__/WorkspaceNameInputSchema.json +0 -15
  59. package/examples/mcp-plugin/src/commands/workspaces/__generated__/index.ts +0 -5
@@ -180,7 +180,7 @@
180
180
  "commands": [
181
181
  {
182
182
  "key": "bundle",
183
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
183
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
184
184
  }
185
185
  ]
186
186
  },
@@ -411,7 +411,282 @@
411
411
  "commands": [
412
412
  {
413
413
  "key": "bundle",
414
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
414
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
415
+ }
416
+ ]
417
+ },
418
+ {
419
+ "key": "http",
420
+ "description": "HTTP API server for tools.",
421
+ "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example-json configure\n\nFull setup guide: full-example-json docs http",
422
+ "options": [
423
+ {
424
+ "name": "host",
425
+ "description": "Listen host.",
426
+ "kind": "string"
427
+ },
428
+ {
429
+ "name": "port",
430
+ "description": "Listen port.",
431
+ "kind": "number"
432
+ },
433
+ {
434
+ "name": "trust-proxy",
435
+ "description": "Honor X-Forwarded-For for client IP.",
436
+ "kind": "presence"
437
+ },
438
+ {
439
+ "name": "obscure-errors",
440
+ "description": "Hide unexpected errors from clients.",
441
+ "kind": "presence"
442
+ },
443
+ {
444
+ "name": "log-format",
445
+ "description": "Log format: json (ECS Logging) or text.",
446
+ "kind": "enum",
447
+ "choices": [
448
+ "json",
449
+ "text"
450
+ ]
451
+ },
452
+ {
453
+ "name": "log-file",
454
+ "description": "Append logs to this file (relative → app config dir).",
455
+ "kind": "string"
456
+ },
457
+ {
458
+ "name": "no-access-log",
459
+ "description": "Disable HTTP access logs.",
460
+ "kind": "presence"
461
+ },
462
+ {
463
+ "name": "dev",
464
+ "description": "Print full stacks to stderr on errors.",
465
+ "kind": "presence"
466
+ }
467
+ ],
468
+ "fallbackCommand": "serve",
469
+ "fallbackMode": "missingOnly"
470
+ }
471
+ ]
472
+ },
473
+ {
474
+ "key": "shape-area",
475
+ "description": "Compute the area of a circle or rectangle (union-input JSON leaf demo).",
476
+ "inputSchema": {
477
+ "$schema": "http://json-schema.org/draft-07/schema#",
478
+ "anyOf": [
479
+ {
480
+ "$ref": "#/definitions/Circle"
481
+ },
482
+ {
483
+ "$ref": "#/definitions/Rect"
484
+ }
485
+ ],
486
+ "description": "Shape to measure: a circle or a rectangle.",
487
+ "definitions": {
488
+ "Circle": {
489
+ "type": "object",
490
+ "properties": {
491
+ "kind": {
492
+ "type": "string",
493
+ "const": "circle",
494
+ "description": "Shape discriminator."
495
+ },
496
+ "radius": {
497
+ "type": "number",
498
+ "description": "Circle radius."
499
+ }
500
+ },
501
+ "required": [
502
+ "kind",
503
+ "radius"
504
+ ],
505
+ "additionalProperties": false,
506
+ "description": "A circle, measured by radius."
507
+ },
508
+ "Rect": {
509
+ "type": "object",
510
+ "properties": {
511
+ "kind": {
512
+ "type": "string",
513
+ "const": "rect",
514
+ "description": "Shape discriminator."
515
+ },
516
+ "width": {
517
+ "type": "number",
518
+ "description": "Rectangle width."
519
+ },
520
+ "height": {
521
+ "type": "number",
522
+ "description": "Rectangle height."
523
+ }
524
+ },
525
+ "required": [
526
+ "kind",
527
+ "width",
528
+ "height"
529
+ ],
530
+ "additionalProperties": false,
531
+ "description": "A rectangle, measured by width and height."
532
+ }
533
+ }
534
+ },
535
+ "commands": [
536
+ {
537
+ "key": "version",
538
+ "description": "Print the program version."
539
+ },
540
+ {
541
+ "key": "configure",
542
+ "description": "Set up MCP config for this app (binary via Homebrew).",
543
+ "notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew installs the binary and shell completions only. Agent artifacts live under ~/.agents and are not written during brew install.\n\nAfter install or upgrade:\n full-example-json configure install\n\nUpgrade:\n brew upgrade full-example-json\n full-example-json configure install\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure status\n\nUninstall:\n full-example-json configure uninstall\n brew uninstall <tap>/full-example-json\n\nUse `configure status --json` for machine-readable output.",
544
+ "commands": [
545
+ {
546
+ "key": "install",
547
+ "description": "Install agent artifacts and bootstrap app config."
548
+ },
549
+ {
550
+ "key": "uninstall",
551
+ "description": "Remove agent artifacts and app config.",
552
+ "options": [
553
+ {
554
+ "name": "yes",
555
+ "description": "Skip uninstall confirmation.",
556
+ "kind": "presence",
557
+ "shortName": "y"
558
+ }
559
+ ]
560
+ },
561
+ {
562
+ "key": "status",
563
+ "description": "Print what is currently installed (read-only).",
564
+ "options": [
565
+ {
566
+ "name": "json",
567
+ "description": "Print status JSON on stdout.",
568
+ "kind": "presence"
569
+ }
570
+ ]
571
+ }
572
+ ]
573
+ },
574
+ {
575
+ "key": "docs",
576
+ "description": "Print bundled CLI documentation.",
577
+ "notes": "Topics print to stdout. Add --save to write files under ./docs/.",
578
+ "options": [
579
+ {
580
+ "name": "save",
581
+ "description": "Write documentation to ./docs/.",
582
+ "kind": "presence"
583
+ }
584
+ ],
585
+ "commands": [
586
+ {
587
+ "key": "readme",
588
+ "description": "Print README (user guide).",
589
+ "options": [
590
+ {
591
+ "name": "save",
592
+ "description": "Write documentation to ./docs/.",
593
+ "kind": "presence"
594
+ }
595
+ ]
596
+ },
597
+ {
598
+ "key": "mcp",
599
+ "description": "Print MCP server setup and tool guidance.",
600
+ "options": [
601
+ {
602
+ "name": "save",
603
+ "description": "Write documentation to ./docs/.",
604
+ "kind": "presence"
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ "key": "http",
610
+ "description": "Print HTTP API setup and tool guidance.",
611
+ "options": [
612
+ {
613
+ "name": "save",
614
+ "description": "Write documentation to ./docs/.",
615
+ "kind": "presence"
616
+ }
617
+ ]
618
+ },
619
+ {
620
+ "key": "openapi",
621
+ "description": "Print the HTTP OpenAPI 3.1 document as JSON.",
622
+ "options": [
623
+ {
624
+ "name": "save",
625
+ "description": "Write documentation to ./docs/.",
626
+ "kind": "presence"
627
+ }
628
+ ]
629
+ },
630
+ {
631
+ "key": "cli-schema",
632
+ "description": "Print the full CLI command tree as JSON.",
633
+ "options": [
634
+ {
635
+ "name": "save",
636
+ "description": "Write documentation to ./docs/.",
637
+ "kind": "presence"
638
+ }
639
+ ]
640
+ },
641
+ {
642
+ "key": "cli",
643
+ "description": "Print the full command reference as markdown.",
644
+ "options": [
645
+ {
646
+ "name": "save",
647
+ "description": "Write documentation to ./docs/.",
648
+ "kind": "presence"
649
+ }
650
+ ]
651
+ }
652
+ ]
653
+ },
654
+ {
655
+ "key": "mcp",
656
+ "description": "MCP server and bundle tools.",
657
+ "notes": "Stdio MCP server. Add to Cursor, Claude Code, or Claude Desktop:\n\n command: full-example-json\n args: mcp\n\nOr:\n\n full-example-json configure\n\nFull setup guide: full-example-json docs mcp",
658
+ "options": [
659
+ {
660
+ "name": "obscure-errors",
661
+ "description": "Hide unexpected errors from clients.",
662
+ "kind": "presence"
663
+ },
664
+ {
665
+ "name": "log-format",
666
+ "description": "Log format: json (ECS Logging) or text.",
667
+ "kind": "enum",
668
+ "choices": [
669
+ "json",
670
+ "text"
671
+ ]
672
+ },
673
+ {
674
+ "name": "log-file",
675
+ "description": "Append logs to this file (relative → app config dir).",
676
+ "kind": "string"
677
+ },
678
+ {
679
+ "name": "dev",
680
+ "description": "Print full stacks to stderr on errors.",
681
+ "kind": "presence"
682
+ }
683
+ ],
684
+ "fallbackCommand": "serve",
685
+ "fallbackMode": "missingOnly",
686
+ "commands": [
687
+ {
688
+ "key": "bundle",
689
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
415
690
  }
416
691
  ]
417
692
  },
@@ -654,7 +929,7 @@
654
929
  "commands": [
655
930
  {
656
931
  "key": "bundle",
657
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
932
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
658
933
  }
659
934
  ]
660
935
  },
@@ -879,7 +1154,7 @@
879
1154
  "commands": [
880
1155
  {
881
1156
  "key": "bundle",
882
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
1157
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
883
1158
  }
884
1159
  ]
885
1160
  },
@@ -1110,7 +1385,7 @@
1110
1385
  "commands": [
1111
1386
  {
1112
1387
  "key": "bundle",
1113
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
1388
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
1114
1389
  }
1115
1390
  ]
1116
1391
  },
@@ -1335,7 +1610,7 @@
1335
1610
  "commands": [
1336
1611
  {
1337
1612
  "key": "bundle",
1338
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
1613
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
1339
1614
  }
1340
1615
  ]
1341
1616
  },
@@ -1566,7 +1841,7 @@
1566
1841
  "commands": [
1567
1842
  {
1568
1843
  "key": "bundle",
1569
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
1844
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
1570
1845
  }
1571
1846
  ]
1572
1847
  },
@@ -1797,7 +2072,7 @@
1797
2072
  "commands": [
1798
2073
  {
1799
2074
  "key": "bundle",
1800
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
2075
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
1801
2076
  }
1802
2077
  ]
1803
2078
  },
@@ -2018,7 +2293,7 @@
2018
2293
  "commands": [
2019
2294
  {
2020
2295
  "key": "bundle",
2021
- "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip) from dist/<key>."
2296
+ "description": "Pack dist MCP artifacts (`.mcpb`, Claude Code plugin zip, Cursor plugin zip) from dist/<key>."
2022
2297
  }
2023
2298
  ]
2024
2299
  },