argsbarg 6.1.6 → 6.1.8
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 +15 -1
- package/docs/README.md +1 -1
- package/docs/cli-program.md +3 -3
- package/docs/config-schema.md +12 -9
- package/docs/decisions.md +1 -1
- package/docs/json-schema-subset.md +38 -12
- package/docs/output-schema.md +1 -1
- package/package.json +3 -2
- package/src/builtins/builtins.test.ts +4 -4
- package/src/builtins/completion-bash.ts +1 -1
- package/src/builtins/completion-fish.ts +1 -1
- package/src/builtins/completion-group.ts +3 -3
- package/src/builtins/completion-zsh.ts +1 -1
- package/src/builtins/config.test.ts +3 -3
- package/src/builtins/config.ts +9 -9
- package/src/builtins/configure-copy.ts +2 -2
- package/src/builtins/configure.ts +3 -3
- package/src/builtins/dispatch.ts +10 -10
- package/src/builtins/export.ts +4 -4
- package/src/builtins/http.ts +5 -5
- package/src/builtins/mcp.ts +3 -3
- package/src/builtins/presentation.ts +5 -5
- package/src/builtins/registry.ts +3 -3
- package/src/builtins/scopes.ts +2 -2
- package/src/builtins/version.ts +1 -1
- package/src/cli-tool/full-example-capabilities.test.ts +2 -2
- package/src/cli-tool/main.ts +1 -1
- package/src/cli-tool/program.ts +1 -1
- package/src/cli-tool/prompt.ts +1 -1
- package/src/config/bindings.test.ts +1 -1
- package/src/config/bindings.ts +1 -1
- package/src/config/bootstrap.test.ts +1 -1
- package/src/config/bootstrap.ts +3 -3
- package/src/config/context.test.ts +1 -1
- package/src/config/context.ts +1 -1
- package/src/config/entry.ts +1 -1
- package/src/config/file.test.ts +1 -1
- package/src/config/file.ts +3 -3
- package/src/config/manifest.ts +1 -1
- package/src/config/resolve.test.ts +1 -1
- package/src/config/resolve.ts +1 -1
- package/src/config/schema.ts +1 -1
- package/src/config/validate.test.ts +45 -1
- package/src/config/validate.ts +138 -203
- package/src/configure/artifacts/binary-placement.test.ts +1 -1
- package/src/configure/artifacts/binary-placement.ts +1 -1
- package/src/configure/artifacts/gh-release-update.ts +1 -1
- package/src/configure/artifacts/install-validate.test.ts +3 -3
- package/src/configure/artifacts/mcp-config.ts +1 -1
- package/src/configure/artifacts/mcp-opencode.test.ts +1 -1
- package/src/configure/artifacts/mcp-opencode.ts +1 -1
- package/src/configure/artifacts/paths.ts +5 -5
- package/src/configure/artifacts/plan.ts +1 -1
- package/src/configure/artifacts/status.test.ts +1 -1
- package/src/configure/artifacts/status.ts +2 -2
- package/src/configure/artifacts/target-base.ts +1 -1
- package/src/configure/artifacts/target-detect.ts +1 -1
- package/src/configure/artifacts/target-effective.ts +3 -3
- package/src/configure/artifacts/target-mcp-cli.ts +1 -1
- package/src/configure/artifacts/target-mcp-json.ts +1 -1
- package/src/configure/artifacts/target-plan-build.ts +2 -2
- package/src/configure/artifacts/target-scope.ts +3 -3
- package/src/configure/artifacts/target-skill.ts +1 -1
- package/src/configure/artifacts/target-types.ts +2 -2
- package/src/configure/artifacts/targets/app.ts +5 -5
- package/src/configure/artifacts/targets/chatgpt-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-code-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-desktop-mcp.ts +2 -2
- package/src/configure/artifacts/targets/claude-skill.ts +2 -2
- package/src/configure/artifacts/targets/codex-mcp.ts +2 -2
- package/src/configure/artifacts/targets/codex-skill.ts +2 -2
- package/src/configure/artifacts/targets/configure.ts +5 -5
- package/src/configure/artifacts/targets/cursor-mcp.ts +2 -2
- package/src/configure/artifacts/targets/cursor-skill.ts +2 -2
- package/src/configure/artifacts/targets/index.ts +1 -1
- package/src/configure/artifacts/targets/openclaw-mcp.ts +2 -2
- package/src/configure/artifacts/targets/openclaw-skill.ts +3 -3
- package/src/configure/artifacts/targets/opencode-mcp.ts +5 -5
- package/src/configure/artifacts/targets/opencode-skill.ts +3 -3
- package/src/configure/artifacts/targets.test.ts +1 -1
- package/src/configure/artifacts/uninstall.ts +1 -1
- package/src/configure/configure.test.ts +9 -9
- package/src/configure/index.ts +5 -5
- package/src/configure/prompt.ts +1 -1
- package/src/core/context.ts +3 -3
- package/src/core/json-leaf.test.ts +1 -1
- package/src/core/leaf-inputs.test.ts +1 -1
- package/src/core/leaf-inputs.ts +2 -2
- package/src/core/parse.test.ts +9 -9
- package/src/core/parse.ts +2 -2
- package/src/core/schema.ts +3 -3
- package/src/core/types.ts +1 -1
- package/src/core/validate.ts +6 -6
- package/src/docs/builtin.ts +3 -3
- package/src/docs/cli-guide.test.ts +3 -3
- package/src/docs/cli-guide.ts +5 -5
- package/src/docs/docs.test.ts +8 -8
- package/src/docs/http-guide.ts +7 -7
- package/src/docs/mcp-guide.ts +7 -7
- package/src/docs/mcp-resources.test.ts +1 -1
- package/src/docs/mcp-resources.ts +1 -1
- package/src/docs/resolve.ts +4 -4
- package/src/docs/save.ts +2 -2
- package/src/exports/cli.ts +9 -9
- package/src/exports/headless.ts +2 -2
- package/src/exports/http.ts +2 -2
- package/src/exports/mcp.ts +2 -2
- package/src/headless/routing.ts +2 -2
- package/src/headless/tool-call.ts +11 -11
- package/src/hooks/run.ts +6 -6
- package/src/http/openapi.ts +3 -3
- package/src/http/paths.ts +1 -1
- package/src/http/readiness.ts +3 -3
- package/src/http/result.ts +1 -1
- package/src/http/routes.ts +4 -4
- package/src/http/server.ts +6 -6
- package/src/log/emitter.ts +1 -1
- package/src/mcp/bundle.ts +2 -2
- package/src/mcp/claude.test.ts +1 -1
- package/src/mcp/claude.ts +4 -4
- package/src/mcp/hidden-mcpb.test.ts +5 -5
- package/src/mcp/result.ts +2 -2
- package/src/mcp/server.ts +3 -3
- package/src/mcp/tools.ts +7 -7
- package/src/runtime/capabilities.ts +2 -2
- package/src/runtime/cli-errors.ts +3 -3
- package/src/runtime/cli.ts +22 -22
- package/src/runtime/exposure.ts +2 -2
- package/src/runtime/invoke.test.ts +6 -6
- package/src/server/context.ts +3 -3
- package/src/server/overrides.ts +3 -3
- package/src/skill/generate.ts +5 -5
- package/src/skill/hint.ts +1 -1
- package/src/skill/install.ts +2 -2
- package/src/skill/naming.ts +1 -1
- package/src/test/fixtures.ts +2 -2
- package/src/test/integration/config.test.ts +3 -3
- package/src/test/integration/http.test.ts +10 -10
- package/src/test/integration/mcp.test.ts +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.1.8] - 2026-07-27
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **JSON Schema validation** — `inputSchema` and `program.appConfig` validation uses `@cfworker/json-schema`; draft is resolved from each schema’s `$schema` (default Draft-07). Hand-written schemas may opt into 2019-09 or 2020-12 (`$defs` supported). Docs updated for multi-draft and Zod interop.
|
|
15
|
+
|
|
16
|
+
## [6.1.7] - 2026-07-24
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **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.
|
|
21
|
+
|
|
10
22
|
## [6.1.6] - 2026-07-24
|
|
11
23
|
|
|
12
24
|
|
|
@@ -853,7 +865,9 @@ const cli = { ... } satisfies CliProgram; // or : CliProgram
|
|
|
853
865
|
- 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`).
|
|
854
866
|
- Imports: use `CliPositional` where needed; replace `CliOptionDef` with `CliOption` or `CliPositional` as appropriate.
|
|
855
867
|
|
|
856
|
-
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.1.
|
|
868
|
+
[Unreleased]: https://github.com/bdombro/bun-argsbarg/compare/v6.1.8...HEAD
|
|
869
|
+
[6.1.8]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.8
|
|
870
|
+
[6.1.7]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.7
|
|
857
871
|
[6.1.6]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.6
|
|
858
872
|
[6.1.5]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.5
|
|
859
873
|
[6.1.4]: https://github.com/bdombro/bun-argsbarg/releases/tag/v6.1.4
|
package/docs/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Start here to pick the right guide.
|
|
|
8
8
|
| **Authoring a `CliProgram`** (humans or agents) | [cli-program.md](cli-program.md) — schema, formats, headless, `read*Flags` |
|
|
9
9
|
| **JSON stdout / `outputSchema`** | [output-schema.md](output-schema.md) — codegen pipeline, JSDoc, narrowing |
|
|
10
10
|
| **App config / `program.appConfig`** | [config-schema.md](config-schema.md) — flat JSON file, `ctx.appConfig`, codegen |
|
|
11
|
-
| **JSON Schema
|
|
11
|
+
| **JSON Schema validation** | [json-schema-subset.md](json-schema-subset.md) — Draft-07 / 2019-09 / 2020-12 (`$schema` on each schema; default Draft-07) |
|
|
12
12
|
| **Exposing MCP tools** | [mcp.md](mcp.md) — stdio server, `inputSchema`, varargs, `configure --sync` |
|
|
13
13
|
| **HTTP tool server** | [http-server.md](http-server.md) — `myapp http`, endpoints, curl examples |
|
|
14
14
|
| **Shipping configure / agent artifacts** | [configure.md](configure.md) — Homebrew + `myapp configure --sync` |
|
package/docs/cli-program.md
CHANGED
|
@@ -111,7 +111,7 @@ Descriptions and schemas are copied into MCP tools, HTTP OpenAPI, and generated
|
|
|
111
111
|
- For shape discovery: HTTP agents load **`docs openapi`** or `GET /openapi.json`; MCP agents use **`docs cli-schema`**; load full **`docs cli`** only when prose is needed.
|
|
112
112
|
- Skill **`reference.md`** uses a compact CLI guide (no inline `outputSchema` JSON) — see [bundled-docs.md](bundled-docs.md#agent-artifact-contract).
|
|
113
113
|
|
|
114
|
-
Validation
|
|
114
|
+
Validation: [json-schema-subset.md](json-schema-subset.md) (Draft-07 default; 2019-09 / 2020-12 when `$schema` is set — including Zod-generated schemas).
|
|
115
115
|
|
|
116
116
|
## Well-known option names
|
|
117
117
|
|
|
@@ -293,7 +293,7 @@ For nested tool bodies (e.g. invoice template data), declare a matching property
|
|
|
293
293
|
|
|
294
294
|
**Precedence:** if `--invoice` is set, the flag value wins and stdin is not read.
|
|
295
295
|
|
|
296
|
-
Use **`ctx.jsonOpt("invoice")`**, **`ctx.inputs`**, or **`ctx.inputsAs<MyInput>()`** — all synchronous. Argsbarg reads piped stdin before calling the handler when a `pipable` Json flag is omitted. When `leaf.inputSchema` is set, argsbarg validates merged inputs **before the handler runs** (same
|
|
296
|
+
Use **`ctx.jsonOpt("invoice")`**, **`ctx.inputs`**, or **`ctx.inputsAs<MyInput>()`** — all synchronous. Argsbarg reads piped stdin before calling the handler when a `pipable` Json flag is omitted. When `leaf.inputSchema` is set, argsbarg validates merged inputs **before the handler runs** (same engine as `program.appConfig`; draft from `$schema` on the schema object); `ctx.inputs` returns the cached result.
|
|
297
297
|
|
|
298
298
|
At most one `pipable` Json option per leaf. Json option names must appear in `inputSchema.properties` when a custom `inputSchema` is set.
|
|
299
299
|
|
|
@@ -321,7 +321,7 @@ When the entire tool body is JSON (no CLI flags), set **`kind: "json"`** on the
|
|
|
321
321
|
|
|
322
322
|
Example CLI: `jq '{format:"pdf", invoice:.}' data.json | myapp render-invoice`
|
|
323
323
|
|
|
324
|
-
See [output-schema.md](output-schema.md) for schemagen `inputType`, [http-server.md](http-server.md) for HTTP tool bodies, and [json-schema-subset.md](json-schema-subset.md) for
|
|
324
|
+
See [output-schema.md](output-schema.md) for schemagen `inputType`, [http-server.md](http-server.md) for HTTP tool bodies, and [json-schema-subset.md](json-schema-subset.md) for validation drafts, Zod interop, and keyword notes.
|
|
325
325
|
|
|
326
326
|
`CliLeafInputs` is intentionally untyped at the framework level. Narrow in your app (`read*Flags(ctx)` returning a typed struct) rather than expecting inference from `satisfies CliLeaf`.
|
|
327
327
|
|
package/docs/config-schema.md
CHANGED
|
@@ -48,7 +48,7 @@ await cli.run();
|
|
|
48
48
|
|
|
49
49
|
**`_bindings`** — reserved top-level metadata: `{ "_bindings": { "apiToken": "env" } }`. Set via wizard (Enter to use env), `configure set --from-env`, or `ctx.appConfig.set` (marks `file`). Optional keys can be bound to `skip`.
|
|
50
50
|
|
|
51
|
-
**Validation at runtime** — argsbarg validates the config file and `configure set` / `ctx.appConfig.set` against the effective JSON Schema ([
|
|
51
|
+
**Validation at runtime** — argsbarg validates the config file and `configure set` / `ctx.appConfig.set` against the effective JSON Schema ([validation](json-schema-subset.md)). Draft is chosen from `jsonSchema.$schema` (default Draft-07). Partial writes (bindings only, single-key updates) skip required-property checks.
|
|
52
52
|
|
|
53
53
|
See [cli-program.md — Configuration](cli-program.md#configuration-programappconfig) for resolution order, bootstrap timing, and `configure get`/`set`.
|
|
54
54
|
|
|
@@ -67,7 +67,7 @@ export interface CliAppConfigEntry {
|
|
|
67
67
|
|
|
68
68
|
export interface CliAppConfig {
|
|
69
69
|
commands?: boolean | { enabled?: boolean; mcpSet?: boolean };
|
|
70
|
-
jsonSchema?: Record<string, unknown>; //
|
|
70
|
+
jsonSchema?: Record<string, unknown>; // JSON Schema block; include $schema to opt into 2019-09 / 2020-12
|
|
71
71
|
entries: Record<string, CliAppConfigEntry>;
|
|
72
72
|
}
|
|
73
73
|
```
|
|
@@ -155,7 +155,7 @@ flowchart LR
|
|
|
155
155
|
end
|
|
156
156
|
subgraph runtime [Runtime]
|
|
157
157
|
Program["program.appConfig.jsonSchema"]
|
|
158
|
-
Validate["
|
|
158
|
+
Validate["@cfworker/json-schema (draft from $schema)"]
|
|
159
159
|
end
|
|
160
160
|
src --> Script --> Gen --> Json
|
|
161
161
|
Gen --> Index --> Program --> Validate
|
|
@@ -180,16 +180,19 @@ export interface AppConfig {
|
|
|
180
180
|
|
|
181
181
|
Wire on the program root: `import { AppConfigSchema } from "./config/__generated__"`.
|
|
182
182
|
|
|
183
|
-
### Supported AppConfig shapes (
|
|
183
|
+
### Supported AppConfig shapes (runtime validation)
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
Validation is [@cfworker/json-schema](https://www.npmjs.com/package/@cfworker/json-schema) with draft from `$schema` (default Draft-07). See [json-schema-subset.md](json-schema-subset.md) for drafts, Zod interop, and limits.
|
|
186
|
+
|
|
187
|
+
| Commonly used | Notes |
|
|
186
188
|
| --- | --- |
|
|
187
|
-
| `type`, `properties`, `required`, `additionalProperties` |
|
|
188
|
-
| `enum`, `const
|
|
189
|
-
| local `#/definitions` + `$ref`
|
|
190
|
-
| `anyOf` / `oneOf`
|
|
189
|
+
| `type`, `properties`, `required`, `additionalProperties` | |
|
|
190
|
+
| `enum`, `const` | `default` is not applied at validation time |
|
|
191
|
+
| local `#/definitions` + `$ref` (Draft-07) or `#/$defs` + `$ref` (2020-12) | remote `$ref` not supported |
|
|
192
|
+
| `anyOf` / `oneOf` / `allOf` | |
|
|
191
193
|
| `items`, `minItems`, `maxItems` | |
|
|
192
194
|
| `minimum`, `maximum`, `minLength`, `maxLength`, `pattern` | |
|
|
195
|
+
| `format` | includes argsbarg `comma-list` |
|
|
193
196
|
|
|
194
197
|
## Minimal example (no schemagen)
|
|
195
198
|
|
package/docs/decisions.md
CHANGED
|
@@ -33,7 +33,7 @@ Zod may actually cause more complexity and little/no gain for consumers.
|
|
|
33
33
|
Yes Zod implements some features we do custom for JSON-SCHEMA, but is opinionated, less flexible, and would actually explode complexity in some situations. Zod could be a win for consumers if they require substantial, complex validation -- but then that may not convert well to json-schema anyways and json-schema generation is a big win.
|
|
34
34
|
|
|
35
35
|
1. Argsbarg does a lot of schema patching/manipulation to create different schemas per target (cli-schema.json, MCP contract, openapi.json). This would be harder with Zod
|
|
36
|
-
2. Consumers can
|
|
36
|
+
2. Consumers can use Zod by converting to JSON Schema (`zod-to-json-schema`, `z.toJSONSchema()`) and passing the result to `inputSchema` / `appConfig.jsonSchema`. Argsbarg resolves the validator draft from each schema’s `$schema` (Draft-07 default; 2019-09 / 2020-12 when set).
|
|
37
37
|
3. For uses like API pass-through, proxy, dynamic schemas, Zod may actually explode complexity for consumers.
|
|
38
38
|
4. Our TS->json-schema approach is actually easier and better in many cases
|
|
39
39
|
- Just write plain typescript, done.
|
|
@@ -1,39 +1,65 @@
|
|
|
1
|
-
# JSON Schema
|
|
1
|
+
# JSON Schema validation
|
|
2
2
|
|
|
3
|
-
Argsbarg validates `program.appConfig`, leaf `inputSchema`, and related documents with
|
|
3
|
+
Argsbarg validates `program.appConfig`, leaf `inputSchema`, and related documents with [**@cfworker/json-schema**](https://www.npmjs.com/package/@cfworker/json-schema). The validator draft is chosen from each schema’s `$schema` URI (default **Draft-07** when omitted). Use this page when authoring schemas for config files, `inputSchema` on leaves, or `@sg` schemagen output.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Schema draft
|
|
6
|
+
|
|
7
|
+
| `$schema` (examples) | Validator draft |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| *(omitted)* | Draft-07 (schemagen default) |
|
|
10
|
+
| `http://json-schema.org/draft-07/schema#` | Draft-07 |
|
|
11
|
+
| `https://json-schema.org/draft/2019-09/schema` | 2019-09 |
|
|
12
|
+
| `https://json-schema.org/draft/2020-12/schema` | 2020-12 |
|
|
13
|
+
|
|
14
|
+
Hand-written schemas may use **2020-12** with `$defs` and `#/$defs/...` `$ref`s. Schemagen (`ts-json-schema-generator`) still emits Draft-07 with `definitions`.
|
|
15
|
+
|
|
16
|
+
## From Zod (or other generators)
|
|
17
|
+
|
|
18
|
+
You can pass JSON Schema from **`zod-to-json-schema`**, Zod v4 **`z.toJSONSchema()`**, or any tool that emits a root schema with `$schema`:
|
|
19
|
+
|
|
20
|
+
| Source | Typical `$schema` | Works with argsbarg |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| `zod-to-json-schema` (default) | Draft-07 | Yes — matches default when `$schema` omitted |
|
|
23
|
+
| `z.toJSONSchema()` (default) | 2020-12 | Yes — draft resolved from `$schema` |
|
|
24
|
+
| argsbarg schemagen | Draft-07 | Yes |
|
|
25
|
+
|
|
26
|
+
Set the result on `leaf.inputSchema` or `program.appConfig.jsonSchema`. Validation uses the schema object and its `$schema` URI; not every Zod feature survives JSON Schema conversion (refinements, transforms, etc.).
|
|
6
27
|
|
|
7
28
|
## Supported constructs
|
|
8
29
|
|
|
30
|
+
Validation uses [@cfworker/json-schema](https://www.npmjs.com/package/@cfworker/json-schema) for the draft declared by `$schema`. Schemas from schemagen and typical Zod exports commonly use:
|
|
31
|
+
|
|
9
32
|
| Feature | Notes |
|
|
10
33
|
| --- | --- |
|
|
11
34
|
| `type` | `object`, `array`, `string`, `integer`, `number`, `boolean`, `null` |
|
|
12
35
|
| `properties` / `required` | Object keys; `additionalProperties: false` enforced when set |
|
|
13
36
|
| `items` | Homogeneous arrays; comma-separated CLI strings coerced when `items` is a primitive |
|
|
14
37
|
| `enum` / `const` | Exact value checks |
|
|
15
|
-
| `anyOf` / `oneOf`
|
|
16
|
-
| `$ref` | **Local only** — `#/definitions/Name`
|
|
17
|
-
| `definitions` | Companion to local `$ref` |
|
|
18
|
-
| `format` | `date`, `date-time`, `duration
|
|
38
|
+
| `anyOf` / `oneOf` / `allOf` | Combinators (validator-native) |
|
|
39
|
+
| `$ref` | **Local only** — `#/definitions/Name` (Draft-07) or `#/$defs/Name` (2019-09 / 2020-12) |
|
|
40
|
+
| `definitions` / `$defs` | Companion to local `$ref` (draft-dependent) |
|
|
41
|
+
| `format` | Built-ins include `date`, `date-time`, `duration`; argsbarg registers `comma-list` |
|
|
19
42
|
| `minimum` / `maximum` | Numbers and integers |
|
|
20
43
|
| `minLength` / `maxLength` | Strings |
|
|
21
44
|
| `pattern` | String regex (ECMAScript) |
|
|
22
45
|
|
|
23
46
|
## Partial validation
|
|
24
47
|
|
|
25
|
-
`validateConfigDocumentPartial` validates **present keys only** —
|
|
48
|
+
`validateConfigDocumentPartial` validates **present keys only** — all `required` arrays are stripped before validation. Used for `configure set` partial writes and bootstrap flows.
|
|
26
49
|
|
|
27
50
|
Leaf `inputSchema` validation uses full validation (including `required`) before the handler runs.
|
|
28
51
|
|
|
29
|
-
##
|
|
52
|
+
## Argsbarg-specific behavior
|
|
53
|
+
|
|
54
|
+
- Framework keys (`_bindings`, etc.) are omitted before config validation when `additionalProperties: false`.
|
|
55
|
+
- CLI `configure set` still coerces comma-separated primitives, booleans, and numbers before validation (`parseConfigSetValue`).
|
|
56
|
+
|
|
57
|
+
## Not guaranteed
|
|
30
58
|
|
|
31
59
|
- Remote `$ref` (`http://…`, other files)
|
|
32
|
-
- `allOf`, conditional (`if`/`then`/`else`), `not`
|
|
33
|
-
- Unevaluated / dynamic references
|
|
34
60
|
- `default` application at validation time (defaults come from CLI option `default` or config bindings)
|
|
35
61
|
|
|
36
|
-
If schemagen emits
|
|
62
|
+
If schemagen emits keywords the validator rejects, simplify the TypeScript type or post-process the generated JSON Schema.
|
|
37
63
|
|
|
38
64
|
## Where validation runs
|
|
39
65
|
|
package/docs/output-schema.md
CHANGED
|
@@ -29,7 +29,7 @@ export const status = {
|
|
|
29
29
|
|
|
30
30
|
**Set on the leaf only** — not under `mcpTool`.
|
|
31
31
|
|
|
32
|
-
**Draft version** — argsbarg
|
|
32
|
+
**Draft version** — for **`inputSchema`** and **`appConfig.jsonSchema`**, argsbarg validates using the draft declared in `$schema` (default Draft-07 when omitted). Schemas from schemagen, `zod-to-json-schema`, or `z.toJSONSchema()` may use Draft-07 or 2020-12. **`outputSchema`** is embedded in docs/MCP/OpenAPI as-is and is not runtime-validated.
|
|
33
33
|
|
|
34
34
|
See [cli-program.md — Structured stdout](cli-program.md#structured-stdout) for when to use `outputSchema` vs `notes`, and [mcp.md](mcp.md) for how MCP returns parsed JSON as `structuredContent`.
|
|
35
35
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "argsbarg",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.8",
|
|
4
4
|
"main": "./src/index.ts",
|
|
5
5
|
"module": "./src/index.ts",
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@cfworker/json-schema": "^4",
|
|
7
8
|
"ts-json-schema-generator": "^2.3.0"
|
|
8
9
|
},
|
|
9
10
|
"devDependencies": {
|
|
10
|
-
"@biomejs/biome": "^2.5.
|
|
11
|
+
"@biomejs/biome": "^2.5.5",
|
|
11
12
|
"@types/bun": "^1.3.12",
|
|
12
13
|
"dts-bundle-generator": "^9.5.1",
|
|
13
14
|
"typescript": "^5.9.3"
|
|
@@ -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 "
|
|
7
|
-
import type { CliProgram } from "
|
|
8
|
-
import { cliBuiltinDocsGroup } from "
|
|
9
|
-
import { resolveCapabilities } from "
|
|
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 "
|
|
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,11 +1,11 @@
|
|
|
1
|
-
import type { CliProgram } from "
|
|
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("
|
|
6
|
+
export function cliBuiltinCompletionGroup(program: CliProgram): import("../core/types.ts").CliRouter {
|
|
7
7
|
const appName = program.key;
|
|
8
|
-
const router: import("
|
|
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 "
|
|
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 "
|
|
10
|
-
import { resolveAppConfigPath, writeAppConfigFile } from "
|
|
11
|
-
import { Cli, type CliProgram } from "
|
|
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 {
|
package/src/builtins/config.ts
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Built-in `configure get` / `configure set` subcommands.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { clearFileValue, setBinding } from "
|
|
6
|
-
import { bootstrapAppConfig } from "
|
|
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 "
|
|
13
|
-
import { writeAppConfigFile } from "
|
|
14
|
-
import { captureMappedHostEnv, exportConfigToEnv, resolveAppConfig } from "
|
|
15
|
-
import { configPropertySchema, effectiveJsonSchema } from "
|
|
16
|
-
import { parseConfigSetValue } from "
|
|
17
|
-
import type { CliLeaf, CliOption, CliProgram } from "
|
|
18
|
-
import { CliOptionKind } from "
|
|
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 "
|
|
4
|
-
import type { CliCapabilities } from "
|
|
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 "
|
|
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 "
|
|
10
|
-
import { resolveCapabilities } from "
|
|
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,
|
package/src/builtins/dispatch.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { cliConfigure } from "
|
|
2
|
-
import type { ParseResult } from "
|
|
3
|
-
import { ParseKind } from "
|
|
4
|
-
import type { CliNode, CliProgram, CliRouter } from "
|
|
5
|
-
import { isCliLeaf } from "
|
|
6
|
-
import { cliBuiltinDocsGroupIfEnabled } from "
|
|
7
|
-
import { runMcpBundle } from "
|
|
8
|
-
import { capabilityDeniedMessage, resolveCapabilities } from "
|
|
9
|
-
import { Cli } from "
|
|
10
|
-
import { serveOverridesFromOpts } from "
|
|
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";
|
package/src/builtins/export.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CliFallbackMode, CliNode, CliOption, CliPositional, CliProgram } from "
|
|
2
|
-
import { isCliRouter } from "
|
|
3
|
-
import { resolveCapabilities } from "
|
|
4
|
-
import { isCliSchemaHidden, visibleOptions } from "
|
|
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). */
|
package/src/builtins/http.ts
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
CliOptionKind,
|
|
6
6
|
type CliProgram,
|
|
7
7
|
type CliRouter,
|
|
8
|
-
} from "
|
|
9
|
-
import { docsEnabled } from "
|
|
10
|
-
import { httpUserPathGlob, resolveHttpPathPrefix } from "
|
|
11
|
-
import { resolveHttpListenAddress } from "
|
|
12
|
-
import { resolveCapabilities } from "
|
|
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 },
|
package/src/builtins/mcp.ts
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
CliOptionKind,
|
|
6
6
|
type CliProgram,
|
|
7
7
|
type CliRouter,
|
|
8
|
-
} from "
|
|
9
|
-
import { docsEnabled } from "
|
|
10
|
-
import { resolveCapabilities } from "
|
|
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 "
|
|
2
|
-
import { isCliLeaf } from "
|
|
3
|
-
import type { CliCapabilities } from "
|
|
4
|
-
import { resolveCapabilities } from "
|
|
5
|
-
import { isCliHidden, presentationNode, visibleOptions } from "
|
|
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). */
|
package/src/builtins/registry.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CliNode, CliProgram } from "
|
|
2
|
-
import { cliBuiltinDocsGroupIfEnabled } from "
|
|
3
|
-
import type { CliCapabilities } from "
|
|
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";
|
package/src/builtins/scopes.ts
CHANGED
|
@@ -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 "
|
|
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("
|
|
10
|
+
opts: import("../core/types.ts").CliOption[];
|
|
11
11
|
path: string;
|
|
12
12
|
wantsFiles: boolean;
|
|
13
13
|
}
|
package/src/builtins/version.ts
CHANGED
|
@@ -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 "
|
|
9
|
-
import { resolveCapabilities } from "
|
|
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");
|
package/src/cli-tool/main.ts
CHANGED
|
@@ -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 "
|
|
4
|
+
import { Cli } from "../index.ts";
|
|
5
5
|
import { program } from "./program.ts";
|
|
6
6
|
|
|
7
7
|
const cli = new Cli(program);
|
package/src/cli-tool/program.ts
CHANGED
|
@@ -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
|
|
package/src/cli-tool/prompt.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Interactive prompts for `argsbarg create`. */
|
|
2
2
|
|
|
3
|
-
import { readPromptLine as readStdinLine } from "
|
|
3
|
+
import { readPromptLine as readStdinLine } from "../prompt.ts";
|
|
4
4
|
|
|
5
5
|
export function readPromptLine(prompt: string): string {
|
|
6
6
|
process.stderr.write(prompt);
|
package/src/config/bindings.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Per-key config binding metadata (`_bindings`) — records how each schema key is satisfied.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { CliAppConfigEntry } from "
|
|
5
|
+
import type { CliAppConfigEntry } from "../core/types.ts";
|
|
6
6
|
|
|
7
7
|
/** Reserved top-level config file key for per-entry binding metadata. */
|
|
8
8
|
export const CONFIG_BINDINGS_KEY = "_bindings";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { describe, expect, test } from "bun:test";
|
|
2
|
-
import type { CliAppConfigEntry } from "
|
|
2
|
+
import type { CliAppConfigEntry } from "../core/types.ts";
|
|
3
3
|
import { shouldWizardPromptConfigKey } from "./bootstrap.ts";
|
|
4
4
|
|
|
5
5
|
const requiredEntry: CliAppConfigEntry = {
|
package/src/config/bootstrap.ts
CHANGED
|
@@ -4,9 +4,9 @@ settings are present before the CLI or MCP server handles a request.
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { readSync } from "node:fs";
|
|
7
|
-
import type { CliAppConfigEntry, CliProgram, ServerRuntime } from "
|
|
8
|
-
import type { LogEmitter } from "
|
|
9
|
-
import { readPromptLine as readStdinLine } from "
|
|
7
|
+
import type { CliAppConfigEntry, CliProgram, ServerRuntime } from "../core/types.ts";
|
|
8
|
+
import type { LogEmitter } from "../log/emitter.ts";
|
|
9
|
+
import { readPromptLine as readStdinLine } from "../prompt.ts";
|
|
10
10
|
import { bindingForKey, clearFileValue, isKeyAddressed, readBindings, setBinding } from "./bindings.ts";
|
|
11
11
|
import { configEntryRequired, configEntrySensitive, defaultConfigEntryTitle, jsonSchemaRequiredKeys } from "./entry.ts";
|
|
12
12
|
import {
|
|
@@ -6,7 +6,7 @@ import { describe, expect, test } from "bun:test";
|
|
|
6
6
|
import { mkdtempSync, rmSync } from "node:fs";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
8
|
import { dirname, join } from "node:path";
|
|
9
|
-
import type { CliProgram } from "
|
|
9
|
+
import type { CliProgram } from "../core/types.ts";
|
|
10
10
|
import { createAppConfigSnapshot } from "./context.ts";
|
|
11
11
|
import { resolveAppConfigDir, resolveAppConfigPath } from "./file.ts";
|
|
12
12
|
import { resolveAppConfig } from "./resolve.ts";
|
package/src/config/context.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Handler-facing resolved app config snapshot (ctx.appConfig).
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { CliProgram } from "
|
|
5
|
+
import type { CliProgram } from "../core/types.ts";
|
|
6
6
|
import { isFrameworkConfigKey, setBinding } from "./bindings.ts";
|
|
7
7
|
import {
|
|
8
8
|
readAppConfigFileRaw,
|
package/src/config/entry.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Shared helpers for program.appConfig schema entries.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { CliAppConfigEntry, CliProgram } from "
|
|
5
|
+
import type { CliAppConfigEntry, CliProgram } from "../core/types.ts";
|
|
6
6
|
|
|
7
7
|
/** Default title when `CliAppConfigEntry.title` is omitted. */
|
|
8
8
|
export function defaultConfigEntryTitle(key: string): string {
|