@ia-qa/cli 1.0.1 → 1.0.2

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 +7 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,6 +29,9 @@ const DEFAULT_SERVER = (process.env.IAQA_SERVER || 'https://www.ia-qa.com').repl
29
29
  const INLINE_MAX_CHARS = 4000;
30
30
  const INLINE_MAX_LINES = 100;
31
31
 
32
+ // Own version, for caller identification (so the server can label CLI traffic).
33
+ const VERSION = (() => { try { return require('./package.json').version; } catch { return '0'; } })();
34
+
32
35
  // ── argv parsing (no dependency) ─────────────────────────────────────────────
33
36
 
34
37
  function parseArgv(argv) {
@@ -115,8 +118,9 @@ async function callTool(server, name, parameters) {
115
118
  try {
116
119
  res = await fetch(`${server}/mcp/call`, {
117
120
  method: 'POST',
118
- headers: { 'Content-Type': 'application/json', 'X-Client': 'ia-qa-cli' },
119
- body: JSON.stringify({ name, parameters }),
121
+ headers: { 'Content-Type': 'application/json', 'User-Agent': `ia-qa-cli/${VERSION}` },
122
+ // `_meta.agent` is the MCP-standard field the server reads to identify the caller.
123
+ body: JSON.stringify({ name, parameters, _meta: { agent: 'ia-qa-cli', version: VERSION } }),
120
124
  });
121
125
  } catch (e) {
122
126
  throw new CliError(`Cannot reach ia-qa server at ${server} (${e.message}). Set --server or $IAQA_SERVER.`, 1);
@@ -189,7 +193,7 @@ function compactHelp(m) {
189
193
  ' ia-qa base64_encode "hello"',
190
194
  " echo '{\"a\":1}' | ia-qa format_json --stdin --json",
191
195
  '',
192
- `Runs on ${DEFAULT_SERVER} (override with --server or $IAQA_SERVER). No key, no signup.`,
196
+ `Runs on ${DEFAULT_SERVER} (override with --server or $IAQA_SERVER). No signup; most tools key-free, BYOK for LLM tools.`,
193
197
  ].join('\n');
194
198
  }
195
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ia-qa/cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Run ia-qa.com's 148 QA/LLM/dev tools 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",