argsbarg 6.1.5 → 6.1.7

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 (137) hide show
  1. package/CHANGELOG.md +15 -3
  2. package/docs/http-server.md +3 -3
  3. package/examples/full-example/docs/cli-schema.json +9 -9
  4. package/examples/full-example/docs/cli.md +9 -9
  5. package/examples/full-example/docs/http.md +3 -3
  6. package/examples/full-example/docs/openapi.json +6 -35
  7. package/package.json +1 -1
  8. package/src/builtins/builtins.test.ts +4 -4
  9. package/src/builtins/completion-bash.ts +1 -1
  10. package/src/builtins/completion-fish.ts +1 -1
  11. package/src/builtins/completion-group.ts +3 -3
  12. package/src/builtins/completion-zsh.ts +1 -1
  13. package/src/builtins/config.test.ts +3 -3
  14. package/src/builtins/config.ts +9 -9
  15. package/src/builtins/configure-copy.ts +2 -2
  16. package/src/builtins/configure.ts +3 -3
  17. package/src/builtins/dispatch.ts +10 -10
  18. package/src/builtins/export.ts +4 -4
  19. package/src/builtins/http.ts +6 -6
  20. package/src/builtins/mcp.ts +3 -3
  21. package/src/builtins/presentation.ts +5 -5
  22. package/src/builtins/registry.ts +3 -3
  23. package/src/builtins/scopes.ts +2 -2
  24. package/src/builtins/version.ts +1 -1
  25. package/src/cli-tool/full-example-capabilities.test.ts +2 -2
  26. package/src/cli-tool/main.ts +1 -1
  27. package/src/cli-tool/program.ts +1 -1
  28. package/src/cli-tool/prompt.ts +1 -1
  29. package/src/config/bindings.test.ts +1 -1
  30. package/src/config/bindings.ts +1 -1
  31. package/src/config/bootstrap.test.ts +1 -1
  32. package/src/config/bootstrap.ts +3 -3
  33. package/src/config/context.test.ts +1 -1
  34. package/src/config/context.ts +1 -1
  35. package/src/config/entry.ts +1 -1
  36. package/src/config/file.test.ts +1 -1
  37. package/src/config/file.ts +3 -3
  38. package/src/config/manifest.ts +1 -1
  39. package/src/config/resolve.test.ts +1 -1
  40. package/src/config/resolve.ts +1 -1
  41. package/src/config/schema.ts +1 -1
  42. package/src/config/validate.ts +1 -1
  43. package/src/configure/artifacts/binary-placement.test.ts +1 -1
  44. package/src/configure/artifacts/binary-placement.ts +1 -1
  45. package/src/configure/artifacts/gh-release-update.ts +1 -1
  46. package/src/configure/artifacts/install-validate.test.ts +3 -3
  47. package/src/configure/artifacts/mcp-config.ts +1 -1
  48. package/src/configure/artifacts/mcp-opencode.test.ts +1 -1
  49. package/src/configure/artifacts/mcp-opencode.ts +1 -1
  50. package/src/configure/artifacts/paths.ts +5 -5
  51. package/src/configure/artifacts/plan.ts +1 -1
  52. package/src/configure/artifacts/status.test.ts +1 -1
  53. package/src/configure/artifacts/status.ts +2 -2
  54. package/src/configure/artifacts/target-base.ts +1 -1
  55. package/src/configure/artifacts/target-detect.ts +1 -1
  56. package/src/configure/artifacts/target-effective.ts +3 -3
  57. package/src/configure/artifacts/target-mcp-cli.ts +1 -1
  58. package/src/configure/artifacts/target-mcp-json.ts +1 -1
  59. package/src/configure/artifacts/target-plan-build.ts +2 -2
  60. package/src/configure/artifacts/target-scope.ts +3 -3
  61. package/src/configure/artifacts/target-skill.ts +1 -1
  62. package/src/configure/artifacts/target-types.ts +2 -2
  63. package/src/configure/artifacts/targets/app.ts +5 -5
  64. package/src/configure/artifacts/targets/chatgpt-mcp.ts +2 -2
  65. package/src/configure/artifacts/targets/claude-code-mcp.ts +2 -2
  66. package/src/configure/artifacts/targets/claude-desktop-mcp.ts +2 -2
  67. package/src/configure/artifacts/targets/claude-skill.ts +2 -2
  68. package/src/configure/artifacts/targets/codex-mcp.ts +2 -2
  69. package/src/configure/artifacts/targets/codex-skill.ts +2 -2
  70. package/src/configure/artifacts/targets/configure.ts +5 -5
  71. package/src/configure/artifacts/targets/cursor-mcp.ts +2 -2
  72. package/src/configure/artifacts/targets/cursor-skill.ts +2 -2
  73. package/src/configure/artifacts/targets/index.ts +1 -1
  74. package/src/configure/artifacts/targets/openclaw-mcp.ts +2 -2
  75. package/src/configure/artifacts/targets/openclaw-skill.ts +3 -3
  76. package/src/configure/artifacts/targets/opencode-mcp.ts +5 -5
  77. package/src/configure/artifacts/targets/opencode-skill.ts +3 -3
  78. package/src/configure/artifacts/targets.test.ts +1 -1
  79. package/src/configure/artifacts/uninstall.ts +1 -1
  80. package/src/configure/configure.test.ts +9 -9
  81. package/src/configure/index.ts +5 -5
  82. package/src/configure/prompt.ts +1 -1
  83. package/src/core/context.ts +3 -3
  84. package/src/core/json-leaf.test.ts +1 -1
  85. package/src/core/leaf-inputs.test.ts +1 -1
  86. package/src/core/leaf-inputs.ts +2 -2
  87. package/src/core/parse.test.ts +9 -9
  88. package/src/core/parse.ts +2 -2
  89. package/src/core/schema.ts +3 -3
  90. package/src/core/types.ts +1 -1
  91. package/src/core/validate.ts +6 -6
  92. package/src/docs/builtin.ts +3 -3
  93. package/src/docs/cli-guide.test.ts +3 -3
  94. package/src/docs/cli-guide.ts +5 -5
  95. package/src/docs/docs.test.ts +8 -8
  96. package/src/docs/http-guide.ts +10 -10
  97. package/src/docs/mcp-guide.ts +7 -7
  98. package/src/docs/mcp-resources.test.ts +1 -1
  99. package/src/docs/mcp-resources.ts +1 -1
  100. package/src/docs/resolve.ts +4 -4
  101. package/src/docs/save.ts +2 -2
  102. package/src/exports/cli.ts +9 -9
  103. package/src/exports/headless.ts +2 -2
  104. package/src/exports/http.ts +2 -2
  105. package/src/exports/mcp.ts +2 -2
  106. package/src/headless/routing.ts +2 -2
  107. package/src/headless/tool-call.ts +11 -11
  108. package/src/hooks/run.ts +6 -6
  109. package/src/http/openapi.ts +23 -15
  110. package/src/http/paths.ts +1 -1
  111. package/src/http/readiness.ts +3 -3
  112. package/src/http/result.ts +1 -1
  113. package/src/http/routes.ts +4 -4
  114. package/src/http/server.ts +7 -7
  115. package/src/log/emitter.ts +1 -1
  116. package/src/mcp/bundle.ts +2 -2
  117. package/src/mcp/claude.test.ts +1 -1
  118. package/src/mcp/claude.ts +4 -4
  119. package/src/mcp/hidden-mcpb.test.ts +5 -5
  120. package/src/mcp/result.ts +2 -2
  121. package/src/mcp/server.ts +3 -3
  122. package/src/mcp/tools.ts +7 -7
  123. package/src/runtime/capabilities.ts +2 -2
  124. package/src/runtime/cli-errors.ts +3 -3
  125. package/src/runtime/cli.ts +22 -22
  126. package/src/runtime/exposure.ts +2 -2
  127. package/src/runtime/invoke.test.ts +6 -6
  128. package/src/server/context.ts +3 -3
  129. package/src/server/overrides.ts +3 -3
  130. package/src/skill/generate.ts +5 -5
  131. package/src/skill/hint.ts +1 -1
  132. package/src/skill/install.ts +2 -2
  133. package/src/skill/naming.ts +1 -1
  134. package/src/test/fixtures.ts +2 -2
  135. package/src/test/integration/config.test.ts +3 -3
  136. package/src/test/integration/http.test.ts +18 -14
  137. package/src/test/integration/mcp.test.ts +6 -6
package/CHANGELOG.md CHANGED
@@ -7,20 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.1.7] - 2026-07-24
11
+
12
+ ### Changed
13
+
14
+ - **Internal imports** — argsbarg `src/` uses relative paths instead of the `~/` tsconfig alias, so the published package resolves correctly from `node_modules` without a consumer-side tsconfig workaround.
15
+
16
+ ## [6.1.6] - 2026-07-24
17
+
18
+
10
19
  ## [6.1.5] - 2026-07-24
11
20
 
12
21
  ### Changed
13
22
 
14
23
  - **`httpServer.pathPrefix`** — configurable URL prefix for user routes (default `""`; routes at server root, e.g. `/workspaces`). Set `"/api"` for prefixed paths.
24
+ - **Health probes** — removed `GET /health` liveness alias; use `GET /health/liveness`. OpenAPI descriptions clarify liveness (online) vs readiness (online + checks passed).
15
25
 
16
26
  ## [6.1.4] - 2026-07-24
17
27
 
18
28
  ### Changed
19
29
 
20
30
  - **`GET /swagger`** — Swagger UI API reference (replaces `GET /openapi-browser` and Scalar).
21
- - **`GET /openapi.json`** — documents `/health`, `/health/liveness`, and `/health/readiness` probe endpoints under a **Health** tag.
31
+ - **`GET /openapi.json`** — documents `/health/liveness` and `/health/readiness` probe endpoints under a **Health** tag.
22
32
  - **OpenAPI tags** — user `/api/*` routes are grouped by top-level command key (router `description` becomes the tag description).
23
- - **Health probe paths** — `GET /health/liveness` and `GET /health/readiness` replace `/health/live` and `/health/ready` (`GET /health` remains a liveness alias).
33
+ - **Health probe paths** — `GET /health/liveness` and `GET /health/readiness` replace `/health/live` and `/health/ready`.
24
34
  - **`httpServer.pathPrefix`** — configurable URL prefix for user routes (default `""`; routes at server root, e.g. `/workspaces`). Set `"/api"` for prefixed paths.
25
35
 
26
36
  ## [6.1.3] - 2026-07-24
@@ -849,7 +859,9 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
849
859
  - Migrate schemas: rename every `children` property to **`commands`**; move positional definitions to **`CliPositional`** objects on `positionals` and strip `positional` / `argMin` / `argMax` from flag definitions under `options` (flags only carry `name`, `description`, `kind`, and optional `shortName`).
850
860
  - Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
851
861
 
852
- [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.1.5...HEAD
862
+ [Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.1.7...HEAD
863
+ [6.1.7]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.7
864
+ [6.1.6]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.6
853
865
  [6.1.5]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.5
854
866
  [6.1.4]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.4
855
867
  [6.1.3]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.3
@@ -76,8 +76,8 @@ Per-surface exposure: `http.enabled: false` removes a leaf from the route table;
76
76
 
77
77
  | Method | Path | Purpose |
78
78
  | --- | --- | --- |
79
- | `GET` | `/health` or `/health/liveness` | Liveness — 200 when server is listening |
80
- | `GET` | `/health/readiness` | Readiness — config + optional `program.readiness` |
79
+ | `GET` | `/health/liveness` | Liveness — server is online and accepting requests |
80
+ | `GET` | `/health/readiness` | Readiness — online plus config and optional `program.readiness` checks passed |
81
81
  | `GET` | `/openapi.json` | OpenAPI 3.1 REST paths (includes `/health/*` and user routes) |
82
82
  | `GET` | `/swagger` | Interactive Swagger UI API reference (CDN) |
83
83
  | `*` | `/{command}/...` | Invoke user commands (method per route; optional `pathPrefix`) |
@@ -88,7 +88,7 @@ Per-surface exposure: `http.enabled: false` removes a leaf from the route table;
88
88
  ## Examples
89
89
 
90
90
  ```bash
91
- curl -s http://127.0.0.1:3000/health
91
+ curl -s http://127.0.0.1:3000/health/liveness
92
92
  curl -s http://127.0.0.1:3000/health/readiness
93
93
  curl -s http://127.0.0.1:3000/openapi.json
94
94
  open http://127.0.0.1:3000/swagger
@@ -191,7 +191,7 @@
191
191
  {
192
192
  "key": "http",
193
193
  "description": "HTTP API server for tools.",
194
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
194
+ "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 configure\n\nFull setup guide: full-example docs http",
195
195
  "options": [
196
196
  {
197
197
  "name": "host",
@@ -424,7 +424,7 @@
424
424
  {
425
425
  "key": "http",
426
426
  "description": "HTTP API server for tools.",
427
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
427
+ "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 configure\n\nFull setup guide: full-example docs http",
428
428
  "options": [
429
429
  {
430
430
  "name": "host",
@@ -679,7 +679,7 @@
679
679
  {
680
680
  "key": "http",
681
681
  "description": "HTTP API server for tools.",
682
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
682
+ "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 configure\n\nFull setup guide: full-example docs http",
683
683
  "options": [
684
684
  {
685
685
  "name": "host",
@@ -916,7 +916,7 @@
916
916
  {
917
917
  "key": "http",
918
918
  "description": "HTTP API server for tools.",
919
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
919
+ "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 configure\n\nFull setup guide: full-example docs http",
920
920
  "options": [
921
921
  {
922
922
  "name": "host",
@@ -1149,7 +1149,7 @@
1149
1149
  {
1150
1150
  "key": "http",
1151
1151
  "description": "HTTP API server for tools.",
1152
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
1152
+ "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 configure\n\nFull setup guide: full-example docs http",
1153
1153
  "options": [
1154
1154
  {
1155
1155
  "name": "host",
@@ -1386,7 +1386,7 @@
1386
1386
  {
1387
1387
  "key": "http",
1388
1388
  "description": "HTTP API server for tools.",
1389
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
1389
+ "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 configure\n\nFull setup guide: full-example docs http",
1390
1390
  "options": [
1391
1391
  {
1392
1392
  "name": "host",
@@ -1619,7 +1619,7 @@
1619
1619
  {
1620
1620
  "key": "http",
1621
1621
  "description": "HTTP API server for tools.",
1622
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
1622
+ "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 configure\n\nFull setup guide: full-example docs http",
1623
1623
  "options": [
1624
1624
  {
1625
1625
  "name": "host",
@@ -1852,7 +1852,7 @@
1852
1852
  {
1853
1853
  "key": "http",
1854
1854
  "description": "HTTP API server for tools.",
1855
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
1855
+ "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 configure\n\nFull setup guide: full-example docs http",
1856
1856
  "options": [
1857
1857
  {
1858
1858
  "name": "host",
@@ -2085,7 +2085,7 @@
2085
2085
  {
2086
2086
  "key": "http",
2087
2087
  "description": "HTTP API server for tools.",
2088
- "notes": "HTTP tool server on http://127.0.0.1:3000.\n\nEndpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*\n\nConfigure app settings:\n\n full-example configure\n\nFull setup guide: full-example docs http",
2088
+ "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 configure\n\nFull setup guide: full-example docs http",
2089
2089
  "options": [
2090
2090
  {
2091
2091
  "name": "host",
@@ -213,7 +213,7 @@ HTTP API server for tools.
213
213
 
214
214
  > HTTP tool server on http://127.0.0.1:3000.
215
215
  >
216
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
216
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
217
217
  >
218
218
  > Configure app settings:
219
219
  >
@@ -426,7 +426,7 @@ HTTP API server for tools.
426
426
 
427
427
  > HTTP tool server on http://127.0.0.1:3000.
428
428
  >
429
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
429
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
430
430
  >
431
431
  > Configure app settings:
432
432
  >
@@ -667,7 +667,7 @@ HTTP API server for tools.
667
667
 
668
668
  > HTTP tool server on http://127.0.0.1:3000.
669
669
  >
670
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
670
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
671
671
  >
672
672
  > Configure app settings:
673
673
  >
@@ -890,7 +890,7 @@ HTTP API server for tools.
890
890
 
891
891
  > HTTP tool server on http://127.0.0.1:3000.
892
892
  >
893
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
893
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
894
894
  >
895
895
  > Configure app settings:
896
896
  >
@@ -1103,7 +1103,7 @@ HTTP API server for tools.
1103
1103
 
1104
1104
  > HTTP tool server on http://127.0.0.1:3000.
1105
1105
  >
1106
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1106
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1107
1107
  >
1108
1108
  > Configure app settings:
1109
1109
  >
@@ -1327,7 +1327,7 @@ HTTP API server for tools.
1327
1327
 
1328
1328
  > HTTP tool server on http://127.0.0.1:3000.
1329
1329
  >
1330
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1330
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1331
1331
  >
1332
1332
  > Configure app settings:
1333
1333
  >
@@ -1540,7 +1540,7 @@ HTTP API server for tools.
1540
1540
 
1541
1541
  > HTTP tool server on http://127.0.0.1:3000.
1542
1542
  >
1543
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1543
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1544
1544
  >
1545
1545
  > Configure app settings:
1546
1546
  >
@@ -1753,7 +1753,7 @@ HTTP API server for tools.
1753
1753
 
1754
1754
  > HTTP tool server on http://127.0.0.1:3000.
1755
1755
  >
1756
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1756
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1757
1757
  >
1758
1758
  > Configure app settings:
1759
1759
  >
@@ -1966,7 +1966,7 @@ HTTP API server for tools.
1966
1966
 
1967
1967
  > HTTP tool server on http://127.0.0.1:3000.
1968
1968
  >
1969
- > Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1969
+ > Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, /*
1970
1970
  >
1971
1971
  > Configure app settings:
1972
1972
  >
@@ -16,8 +16,8 @@ Bind is localhost-only in v0 — use a reverse proxy for remote access.
16
16
 
17
17
  | Method | Path | Purpose |
18
18
  | --- | --- | --- |
19
- | `GET` | `/health` or `/health/liveness` | Liveness check |
20
- | `GET` | `/health/readiness` | Readiness (config + `program.readiness`) |
19
+ | `GET` | `/health/liveness` | Liveness — server is online and accepting requests |
20
+ | `GET` | `/health/readiness` | Readiness — online plus config and `program.readiness` checks passed |
21
21
  | `GET` | `/openapi.json` | OpenAPI 3.1 REST paths |
22
22
  | `GET` | `/swagger` | Interactive Swagger UI API reference |
23
23
  | * | `/*` | Invoke user commands (method per route) |
@@ -28,7 +28,7 @@ Discover paths from `openapi.json` (`/*`). Query binds options; POST/PUT/PATCH b
28
28
  ## Examples
29
29
 
30
30
  ```bash
31
- curl -s http://127.0.0.1:3000/health
31
+ curl -s http://127.0.0.1:3000/health/liveness
32
32
  curl -s http://127.0.0.1:3000/health/readiness
33
33
  curl -s http://127.0.0.1:3000/openapi.json
34
34
  curl -s http://127.0.0.1:3000/workspaces
@@ -8,7 +8,7 @@
8
8
  "tags": [
9
9
  {
10
10
  "name": "health",
11
- "description": "Server health probes"
11
+ "description": "Orchestrator health probes — liveness (online) vs readiness (online + checks passed)."
12
12
  },
13
13
  {
14
14
  "name": "echo",
@@ -28,36 +28,6 @@
28
28
  }
29
29
  ],
30
30
  "paths": {
31
- "/health": {
32
- "get": {
33
- "tags": [
34
- "health"
35
- ],
36
- "operationId": "health",
37
- "summary": "Liveness probe (alias of /health/liveness)",
38
- "responses": {
39
- "200": {
40
- "description": "Server is listening",
41
- "content": {
42
- "application/json; charset=utf-8": {
43
- "schema": {
44
- "type": "object",
45
- "properties": {
46
- "ok": {
47
- "type": "boolean",
48
- "const": true
49
- }
50
- },
51
- "required": [
52
- "ok"
53
- ]
54
- }
55
- }
56
- }
57
- }
58
- }
59
- }
60
- },
61
31
  "/health/liveness": {
62
32
  "get": {
63
33
  "tags": [
@@ -65,9 +35,10 @@
65
35
  ],
66
36
  "operationId": "health_liveness",
67
37
  "summary": "Liveness probe",
38
+ "description": "Returns 200 when the HTTP server is online and accepting requests. Does not run config or readiness checks — use for orchestrator liveness probes only.",
68
39
  "responses": {
69
40
  "200": {
70
- "description": "Server is listening",
41
+ "description": "Server is online",
71
42
  "content": {
72
43
  "application/json; charset=utf-8": {
73
44
  "schema": {
@@ -95,10 +66,10 @@
95
66
  ],
96
67
  "operationId": "health_readiness",
97
68
  "summary": "Readiness probe",
98
- "description": "Config file, required app config, and optional program.readiness checks.",
69
+ "description": "Returns 200 when the server is online and all readiness checks pass (config file, required app config, and optional program.readiness). Returns 503 when any check fails — use for orchestrator readiness probes before routing traffic.",
99
70
  "responses": {
100
71
  "200": {
101
- "description": "Ready to serve traffic",
72
+ "description": "Online and ready to serve traffic",
102
73
  "content": {
103
74
  "application/json; charset=utf-8": {
104
75
  "schema": {
@@ -187,7 +158,7 @@
187
158
  }
188
159
  },
189
160
  "503": {
190
- "description": "Not ready",
161
+ "description": "Online but not ready (one or more checks failed)",
191
162
  "content": {
192
163
  "application/json; charset=utf-8": {
193
164
  "schema": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "argsbarg",
3
- "version": "6.1.5",
3
+ "version": "6.1.7",
4
4
  "main": "./src/index.ts",
5
5
  "module": "./src/index.ts",
6
6
  "dependencies": {
@@ -3,10 +3,10 @@ Tests for builtins/builtins module behavior.
3
3
  */
4
4
 
5
5
  import { describe, expect, test } from "bun:test";
6
- import { ParseKind, parse, postParseValidate } from "~/core/parse.ts";
7
- import type { CliProgram } from "~/core/types.ts";
8
- import { cliBuiltinDocsGroup } from "~/docs/builtin.ts";
9
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
6
+ import { ParseKind, parse, postParseValidate } from "../core/parse.ts";
7
+ import type { CliProgram } from "../core/types.ts";
8
+ import { cliBuiltinDocsGroup } from "../docs/builtin.ts";
9
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
10
10
  import { completionBashScript, completionFishScript, completionZshScript } from ".";
11
11
  import { cliBuiltinConfigureCommand, configureBuiltinOptions } from "./configure.ts";
12
12
  import { configureCommandDescription, configureSyncOptionDescription } from "./configure-copy.ts";
@@ -1,4 +1,4 @@
1
- import { CliOptionKind, type CliRouter } from "~/core/types.ts";
1
+ import { CliOptionKind, type CliRouter } from "../core/types.ts";
2
2
  import { emitConsumeLong, emitConsumeShort, emitMatchChild } from "./completion-simulate-shared.ts";
3
3
  import { collectScopes, type ScopeRec } from "./scopes.ts";
4
4
  import { escShellSingleQuoted, identToken, kHelpLong, kHelpShort, mainName } from "./shell-helpers.ts";
@@ -1,4 +1,4 @@
1
- import { CliOptionKind, type CliRouter } from "~/core/types.ts";
1
+ import { CliOptionKind, type CliRouter } from "../core/types.ts";
2
2
  import { collectScopes } from "./scopes.ts";
3
3
  import { escFishSingleQuoted, identToken } from "./shell-helpers.ts";
4
4
 
@@ -1,11 +1,11 @@
1
- import type { CliProgram } from "~/core/types.ts";
1
+ import type { CliProgram } from "../core/types.ts";
2
2
 
3
3
  /**
4
4
  * Builds the static `completion` / `bash` / `zsh` / `fish` command subtree (merged into the program root at runtime).
5
5
  */
6
- export function cliBuiltinCompletionGroup(program: CliProgram): import("~/core/types.ts").CliRouter {
6
+ export function cliBuiltinCompletionGroup(program: CliProgram): import("../core/types.ts").CliRouter {
7
7
  const appName = program.key;
8
- const router: import("~/core/types.ts").CliRouter = {
8
+ const router: import("../core/types.ts").CliRouter = {
9
9
  key: "completion",
10
10
  cli: { hidden: true },
11
11
  description: "Generate the autocompletion script for shells.",
@@ -1,4 +1,4 @@
1
- import { CliOptionKind, type CliRouter } from "~/core/types.ts";
1
+ import { CliOptionKind, type CliRouter } from "../core/types.ts";
2
2
  import { emitConsumeLong, emitConsumeShort, emitMatchChild } from "./completion-simulate-shared.ts";
3
3
  import { collectScopes, type ScopeRec } from "./scopes.ts";
4
4
  import { escShellSingleQuoted, identToken, kHelpLong, kHelpShort, mainName } from "./shell-helpers.ts";
@@ -6,9 +6,9 @@ import { describe, expect, test } from "bun:test";
6
6
  import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
7
7
  import { tmpdir } from "node:os";
8
8
  import { dirname, join } from "node:path";
9
- import { readBindings } from "~/config/bindings.ts";
10
- import { resolveAppConfigPath, writeAppConfigFile } from "~/config/file.ts";
11
- import { Cli, type CliProgram } from "~/index";
9
+ import { readBindings } from "../config/bindings.ts";
10
+ import { resolveAppConfigPath, writeAppConfigFile } from "../config/file.ts";
11
+ import { Cli, type CliProgram } from "../index.ts";
12
12
 
13
13
  function configFixture(): CliProgram {
14
14
  return {
@@ -2,20 +2,20 @@
2
2
  Built-in `configure get` / `configure set` subcommands.
3
3
  */
4
4
 
5
- import { clearFileValue, setBinding } from "~/config/bindings.ts";
6
- import { bootstrapAppConfig } from "~/config/bootstrap.ts";
5
+ import { clearFileValue, setBinding } from "../config/bindings.ts";
6
+ import { bootstrapAppConfig } from "../config/bootstrap.ts";
7
7
  import {
8
8
  configCommandsEnabled,
9
9
  configEntrySensitive,
10
10
  configMcpSetEnabled,
11
11
  defaultConfigEntryTitle,
12
- } from "~/config/entry.ts";
13
- import { writeAppConfigFile } from "~/config/file.ts";
14
- import { captureMappedHostEnv, exportConfigToEnv, resolveAppConfig } from "~/config/resolve.ts";
15
- import { configPropertySchema, effectiveJsonSchema } from "~/config/schema.ts";
16
- import { parseConfigSetValue } from "~/config/validate.ts";
17
- import type { CliLeaf, CliOption, CliProgram } from "~/core/types.ts";
18
- import { CliOptionKind } from "~/core/types.ts";
12
+ } from "../config/entry.ts";
13
+ import { writeAppConfigFile } from "../config/file.ts";
14
+ import { captureMappedHostEnv, exportConfigToEnv, resolveAppConfig } from "../config/resolve.ts";
15
+ import { configPropertySchema, effectiveJsonSchema } from "../config/schema.ts";
16
+ import { parseConfigSetValue } from "../config/validate.ts";
17
+ import type { CliLeaf, CliOption, CliProgram } from "../core/types.ts";
18
+ import { CliOptionKind } from "../core/types.ts";
19
19
 
20
20
  const JSON_OPTION: CliOption = {
21
21
  name: "json",
@@ -1,7 +1,7 @@
1
1
  /** Capability-aware labels for configure builtin and docs copy. */
2
2
 
3
- import type { CliProgram } from "~/core/types.ts";
4
- import type { CliCapabilities } from "~/runtime/capabilities.ts";
3
+ import type { CliProgram } from "../core/types.ts";
4
+ import type { CliCapabilities } from "../runtime/capabilities.ts";
5
5
 
6
6
  type Kind = "skills" | "mcp" | "config";
7
7
 
@@ -1,4 +1,4 @@
1
- import { configCommandsEnabled, configMcpSetEnabled } from "~/config/entry.ts";
1
+ import { configCommandsEnabled, configMcpSetEnabled } from "../config/entry.ts";
2
2
  import {
3
3
  CliFallbackMode,
4
4
  type CliLeaf,
@@ -6,8 +6,8 @@ import {
6
6
  CliOptionKind,
7
7
  type CliProgram,
8
8
  type CliRouter,
9
- } from "~/core/types.ts";
10
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
9
+ } from "../core/types.ts";
10
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
11
11
  import { configureConfigSubcommands } from "./config.ts";
12
12
  import {
13
13
  configureCommandDescription,
@@ -1,13 +1,13 @@
1
- import { cliConfigure } from "~/configure";
2
- import type { ParseResult } from "~/core/parse.ts";
3
- import { ParseKind } from "~/core/parse.ts";
4
- import type { CliNode, CliProgram, CliRouter } from "~/core/types.ts";
5
- import { isCliLeaf } from "~/core/types.ts";
6
- import { cliBuiltinDocsGroupIfEnabled } from "~/docs/builtin.ts";
7
- import { runMcpBundle } from "~/mcp/bundle.ts";
8
- import { capabilityDeniedMessage, resolveCapabilities } from "~/runtime/capabilities.ts";
9
- import { Cli } from "~/runtime/cli.ts";
10
- import { serveOverridesFromOpts } from "~/server/overrides.ts";
1
+ import { cliConfigure } from "../configure/index.ts";
2
+ import type { ParseResult } from "../core/parse.ts";
3
+ import { ParseKind } from "../core/parse.ts";
4
+ import type { CliNode, CliProgram, CliRouter } from "../core/types.ts";
5
+ import { isCliLeaf } from "../core/types.ts";
6
+ import { cliBuiltinDocsGroupIfEnabled } from "../docs/builtin.ts";
7
+ import { runMcpBundle } from "../mcp/bundle.ts";
8
+ import { capabilityDeniedMessage, resolveCapabilities } from "../runtime/capabilities.ts";
9
+ import { Cli } from "../runtime/cli.ts";
10
+ import { serveOverridesFromOpts } from "../server/overrides.ts";
11
11
  import { completionBashScript } from "./completion-bash.ts";
12
12
  import { completionFishScript } from "./completion-fish.ts";
13
13
  import { cliBuiltinCompletionGroup as completionGroup } from "./completion-group.ts";
@@ -1,7 +1,7 @@
1
- import type { CliFallbackMode, CliNode, CliOption, CliPositional, CliProgram } from "~/core/types.ts";
2
- import { isCliRouter } from "~/core/types.ts";
3
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
4
- import { isCliSchemaHidden, visibleOptions } from "~/runtime/exposure.ts";
1
+ import type { CliFallbackMode, CliNode, CliOption, CliPositional, CliProgram } from "../core/types.ts";
2
+ import { isCliRouter } from "../core/types.ts";
3
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
4
+ import { isCliSchemaHidden, visibleOptions } from "../runtime/exposure.ts";
5
5
  import { resolveBuiltins } from "./registry.ts";
6
6
 
7
7
  /** JSON-safe command node (no handlers). */
@@ -5,11 +5,11 @@ import {
5
5
  CliOptionKind,
6
6
  type CliProgram,
7
7
  type CliRouter,
8
- } from "~/core/types.ts";
9
- import { docsEnabled } from "~/docs/resolve.ts";
10
- import { httpUserPathGlob, resolveHttpPathPrefix } from "~/http/paths.ts";
11
- import { resolveHttpListenAddress } from "~/http/server.ts";
12
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
8
+ } from "../core/types.ts";
9
+ import { docsEnabled } from "../docs/resolve.ts";
10
+ import { httpUserPathGlob, resolveHttpPathPrefix } from "../http/paths.ts";
11
+ import { resolveHttpListenAddress } from "../http/server.ts";
12
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
13
13
 
14
14
  const HTTP_SERVE_OPTIONS: CliOption[] = [
15
15
  { name: "host", description: "Listen host.", kind: CliOptionKind.String },
@@ -39,7 +39,7 @@ export function cliBuiltinHttpCommand(program: CliProgram): CliRouter {
39
39
  const lines = [
40
40
  `HTTP tool server on http://${hostname}:${port}.`,
41
41
  "",
42
- `Endpoints: GET /health, GET /health/readiness, GET /openapi.json, GET /swagger, ${userGlob}`,
42
+ `Endpoints: GET /health/liveness, GET /health/readiness, GET /openapi.json, GET /swagger, ${userGlob}`,
43
43
  "",
44
44
  ];
45
45
  if (caps.configure) {
@@ -5,9 +5,9 @@ import {
5
5
  CliOptionKind,
6
6
  type CliProgram,
7
7
  type CliRouter,
8
- } from "~/core/types.ts";
9
- import { docsEnabled } from "~/docs/resolve.ts";
10
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
8
+ } from "../core/types.ts";
9
+ import { docsEnabled } from "../docs/resolve.ts";
10
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
11
11
 
12
12
  const MCP_SERVE_OPTIONS: CliOption[] = [
13
13
  { name: "obscure-errors", description: "Hide unexpected errors from clients.", kind: CliOptionKind.Presence },
@@ -1,8 +1,8 @@
1
- import type { CliLeaf, CliNode, CliProgram, CliRouter } from "~/core/types.ts";
2
- import { isCliLeaf } from "~/core/types.ts";
3
- import type { CliCapabilities } from "~/runtime/capabilities.ts";
4
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
5
- import { isCliHidden, presentationNode, visibleOptions } from "~/runtime/exposure.ts";
1
+ import type { CliLeaf, CliNode, CliProgram, CliRouter } from "../core/types.ts";
2
+ import { isCliLeaf } from "../core/types.ts";
3
+ import type { CliCapabilities } from "../runtime/capabilities.ts";
4
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
5
+ import { isCliHidden, presentationNode, visibleOptions } from "../runtime/exposure.ts";
6
6
  import { resolveBuiltins } from "./registry.ts";
7
7
 
8
8
  /** All built-in command nodes for argv parsing (includes hidden builtins). */
@@ -1,6 +1,6 @@
1
- import type { CliNode, CliProgram } from "~/core/types.ts";
2
- import { cliBuiltinDocsGroupIfEnabled } from "~/docs/builtin.ts";
3
- import type { CliCapabilities } from "~/runtime/capabilities.ts";
1
+ import type { CliNode, CliProgram } from "../core/types.ts";
2
+ import { cliBuiltinDocsGroupIfEnabled } from "../docs/builtin.ts";
3
+ import type { CliCapabilities } from "../runtime/capabilities.ts";
4
4
  import { cliBuiltinCompletionGroup } from "./completion-group.ts";
5
5
  import { cliBuiltinConfigureCommand } from "./configure.ts";
6
6
  import { cliBuiltinHttpCommand } from "./http.ts";
@@ -2,12 +2,12 @@
2
2
  Shared completion scope walk used by bash, zsh, and fish emitters.
3
3
  */
4
4
 
5
- import { type CliNode, type CliRouter, isCliLeaf, isCliRouter } from "~/core/types.ts";
5
+ import { type CliNode, type CliRouter, isCliLeaf, isCliRouter } from "../core/types.ts";
6
6
 
7
7
  /** One tab-completion scope: child commands, options, and path key for the schema walk. */
8
8
  export interface ScopeRec {
9
9
  kids: CliNode[];
10
- opts: import("~/core/types.ts").CliOption[];
10
+ opts: import("../core/types.ts").CliOption[];
11
11
  path: string;
12
12
  wantsFiles: boolean;
13
13
  }
@@ -1,4 +1,4 @@
1
- import type { CliLeaf } from "~/core/types.ts";
1
+ import type { CliLeaf } from "../core/types.ts";
2
2
 
3
3
  /** Top-level `version` built-in (leaf). */
4
4
  export function cliBuiltinVersionCommand(): CliLeaf {
@@ -5,8 +5,8 @@ Tests for cli-tool/full-example-capabilities module behavior.
5
5
  import { describe, expect, test } from "bun:test";
6
6
  import { readFileSync } from "node:fs";
7
7
  import { join } from "node:path";
8
- import { CliOptionKind, type CliProgram } from "~/core/types.ts";
9
- import { resolveCapabilities } from "~/runtime/capabilities.ts";
8
+ import { CliOptionKind, type CliProgram } from "../core/types.ts";
9
+ import { resolveCapabilities } from "../runtime/capabilities.ts";
10
10
 
11
11
  const exampleRoot = join(import.meta.dir, "../../examples/full-example");
12
12
  const programSource = readFileSync(join(exampleRoot, "src/program.ts"), "utf8");
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
2
  /** Argsbarg package CLI (`bunx argsbarg`) — bootstrap and tooling; library API is `import from "argsbarg"`. */
3
3
 
4
- import { Cli } from "~/index";
4
+ import { Cli } from "../index.ts";
5
5
  import { program } from "./program.ts";
6
6
 
7
7
  const cli = new Cli(program);
@@ -2,8 +2,8 @@
2
2
  Argsbarg developer tools — bootstrap consumer CLIs via `create`.
3
3
  */
4
4
 
5
- import { CliOptionKind, type CliProgram } from "~/index";
6
5
  import pkg from "../../package.json" with { type: "json" };
6
+ import { CliOptionKind, type CliProgram } from "../index.ts";
7
7
  import { runCreate } from "./run-create.ts";
8
8
  import { runSchemagenCli } from "./run-schemagen.ts";
9
9