@ia-qa/cli 1.0.11 → 1.0.12

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 (2) hide show
  1. package/index.js +11 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -95,14 +95,23 @@ function coerce(prop, raw) {
95
95
  return String(raw);
96
96
  }
97
97
 
98
+ // A published type may be a union (JSON-document params accept 'string' | 'object' | 'array'). Anything
99
+ // that can be a string is still positional-shorthand material: the CLI hands the raw text over and the
100
+ // server parses it. Comparing type === 'string' silently dropped the shorthand for json_schema_validate,
101
+ // mock_from_schema, json_diff and merge_json — the four family members with no `input` property.
102
+ function acceptsString(prop) {
103
+ const type = (prop && prop.type) || 'string';
104
+ return Array.isArray(type) ? type.includes('string') : type === 'string';
105
+ }
106
+
98
107
  function primaryParam(schema) {
99
108
  const props = (schema && schema.properties) || {};
100
109
  const required = (schema && schema.required) || [];
101
110
  if (props.input) return 'input';
102
111
  if (props.text) return 'text';
103
- const reqStr = required.find((k) => (props[k] && props[k].type || 'string') === 'string');
112
+ const reqStr = required.find((k) => props[k] && acceptsString(props[k]));
104
113
  if (reqStr) return reqStr;
105
- return Object.keys(props).find((k) => (props[k].type || 'string') === 'string') || null;
114
+ return Object.keys(props).find((k) => acceptsString(props[k])) || null;
106
115
  }
107
116
 
108
117
  // ── HTTP to the public MCP server ────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ia-qa/cli",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Run ia-qa.com's QA/LLM/dev toolbox from your shell — for AI agents (Claude Code, Copilot CLI) and humans. Zero dependencies, no signup; most tools key-free, BYOK for the LLM-powered ones.",
5
5
  "keywords": [
6
6
  "ia-qa",