toolcraft 0.0.96 → 0.0.98

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/README.md CHANGED
@@ -354,7 +354,16 @@ Toolcraft exports a fixed HTTP error hierarchy for transports and generated API
354
354
  Each error carries `status`, optional `code`, optional `requestId`, and serializable `request` and
355
355
  `response` context.
356
356
 
357
- CLI picks `rich` by default, `--json` switches to `json`. SDK calls return the raw handler value. MCP calls with `result:` return the handler value as `structuredContent` using the configured MCP casing; MCP calls without `result:` keep content-block behavior.
357
+ CLI picks `rich` by default. Enable the generated output selector when starting the CLI:
358
+
359
+ ```ts
360
+ await runCLI(root, { controls: { output: true } });
361
+ ```
362
+
363
+ Then choose structured output with `mytool command --output json`. The selector also accepts `rich`,
364
+ `md`, and `markdown`. SDK calls return the raw handler value. MCP calls with `result:` return the
365
+ handler value as `structuredContent` using the configured MCP casing; MCP calls without `result:`
366
+ keep content-block behavior.
358
367
 
359
368
  ## MCP proxy: adopt an existing MCP server
360
369
 
@@ -578,6 +587,7 @@ additional long CLI flags. For example, `rawResponse` normally maps to `--raw-re
578
587
  - `services?: TServices` — merged into every handler context.
579
588
  - `version?: string` — surfaced via `--version`.
580
589
  - `presets?: boolean` — enables `--preset <path>` for loading parameter defaults from JSON files.
590
+ - `controls?: { debug?, logLevel?, output?, verbose?, yes? }` — enables generated global CLI controls. Set `output: true` to expose `--output <rich|md|markdown|json>`.
581
591
  - `apiVersion?: string` — for `requires.apiVersion`.
582
592
  - `humanInLoop?: HumanInLoopRuntimeOptions`
583
593
  - `errorReports?: boolean | { dir?: string }`
package/composition.json CHANGED
@@ -48,7 +48,7 @@
48
48
  },
49
49
  {
50
50
  "name": "toolcraft",
51
- "version": "0.0.96",
51
+ "version": "0.0.98",
52
52
  "license": "MIT"
53
53
  },
54
54
  {
package/dist/cli.js CHANGED
@@ -830,6 +830,12 @@ function appendHelpMetadata(description, metadata) {
830
830
  function formatHelpFieldDescription(field) {
831
831
  const description = field.description ?? field.displayPath;
832
832
  const metadata = [];
833
+ if (field.schema.kind === "enum" && field.schema.values.length <= 8) {
834
+ const values = field.schema.values.map((value) => String(value)).join(", ");
835
+ if (values.length <= 120) {
836
+ metadata.push(`values: ${values}`);
837
+ }
838
+ }
833
839
  if (!field.optional && !field.hasDefault) {
834
840
  metadata.push("required");
835
841
  }
@@ -48,7 +48,7 @@
48
48
  },
49
49
  {
50
50
  "name": "toolcraft",
51
- "version": "0.0.96",
51
+ "version": "0.0.98",
52
52
  "license": "MIT"
53
53
  },
54
54
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toolcraft",
3
- "version": "0.0.96",
3
+ "version": "0.0.98",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -100,7 +100,7 @@
100
100
  "postpack": "node ../../scripts/manage-bundled-workspace-deps.mjs cleanup . toolcraft-design @poe-code/frontmatter @poe-code/agent-mcp-config @poe-code/agent-human-in-loop @poe-code/task-list @poe-code/agent-defs @poe-code/config-mutations @poe-code/process-runner tiny-mcp-client auth-store"
101
101
  },
102
102
  "dependencies": {
103
- "toolcraft-schema": "0.0.96",
103
+ "toolcraft-schema": "0.0.98",
104
104
  "commander": "^13.1.0",
105
105
  "fast-string-width": "^3.0.2",
106
106
  "fast-wrap-ansi": "^0.2.0",