apiblaze 0.17.14 → 0.17.15

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/dist/index.js +6 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -699,7 +699,7 @@ var import_commander = require("commander");
699
699
  var import_chalk38 = __toESM(require("chalk"));
700
700
 
701
701
  // package.json
702
- var version = "0.17.14";
702
+ var version = "0.17.15";
703
703
 
704
704
  // src/index.ts
705
705
  init_types();
@@ -5226,13 +5226,15 @@ var CLIENT_ROUND_CAP = 12;
5226
5226
  function chatUrl(p) {
5227
5227
  return `https://${p.mcpHost}/${p.version}/${p.environment}/runtime-chat`;
5228
5228
  }
5229
- function renderToolEvents(events) {
5229
+ function renderToolEvents(events, dpKey) {
5230
5230
  for (const e of events ?? []) {
5231
5231
  const ok = typeof e.status === "number" ? e.status < 400 : String(e.status).toLowerCase() === "ok";
5232
5232
  const mark = ok ? import_chalk33.default.green("\u2713") : import_chalk33.default.red("\u2717");
5233
5233
  console.log(` ${mark} ${import_chalk33.default.cyan(e.name)} ${import_chalk33.default.dim(`(${e.status}, ${e.ms}ms)`)}`);
5234
5234
  if (isVerbose() && e.method && e.url) {
5235
- console.log(import_chalk33.default.dim(` \u21B3 ${e.method} ${e.url}`));
5235
+ const auth = dpKey ? ` \\
5236
+ -H 'X-API-Key: ${maskSecret(dpKey)}'` : "";
5237
+ console.log(import_chalk33.default.dim(` curl -sS -X ${e.method} '${e.url}'${auth}`));
5236
5238
  }
5237
5239
  }
5238
5240
  }
@@ -5262,15 +5264,6 @@ function printAssistant(delta) {
5262
5264
  }
5263
5265
  }
5264
5266
  }
5265
- function verboseTrace(p, hasByo) {
5266
- if (!isVerbose()) return;
5267
- console.log(import_chalk33.default.dim("\n" + "\u2500".repeat(64)));
5268
- console.log(import_chalk33.default.bold("--verbose: this turn POSTed to the data-plane MCP host"));
5269
- console.log(import_chalk33.default.green(` curl -sS -X POST ${chatUrl(p)} \\`));
5270
- console.log(import_chalk33.default.green(` -H "X-API-Key: ${maskSecret(p.dpKey)}" \\`));
5271
- console.log(import_chalk33.default.green(" -H 'Content-Type: application/json' \\"));
5272
- console.log(import_chalk33.default.green(` -d '{"turn_id":"\u2026","messages":[\u2026],"environment":"${p.environment}"${hasByo ? ',"llm_api_key":"***","llm_provider":"\u2026"' : ""}}'`));
5273
- }
5274
5267
  async function replTurn(p, messages, userText) {
5275
5268
  messages.push({ role: "user", content: userText });
5276
5269
  const llm2 = loadLlmConfig();
@@ -5319,7 +5312,7 @@ async function replTurn(p, messages, userText) {
5319
5312
  return;
5320
5313
  }
5321
5314
  if (Array.isArray(data.delta)) {
5322
- renderToolEvents(data.tool_events);
5315
+ renderToolEvents(data.tool_events, p.dpKey);
5323
5316
  for (const m of data.delta) messages.push(m);
5324
5317
  printAssistant(data.delta);
5325
5318
  }
@@ -5327,7 +5320,6 @@ async function replTurn(p, messages, userText) {
5327
5320
  if (bl) console.log(bl);
5328
5321
  const warn = freeBudgetWarning(data.billing, p.anon);
5329
5322
  if (warn) console.log(warn);
5330
- verboseTrace(p, !!llm2);
5331
5323
  if (!data.continue) return;
5332
5324
  }
5333
5325
  console.log(import_chalk33.default.dim(" (stopped after several tool rounds \u2014 ask again to continue)"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apiblaze",
3
- "version": "0.17.14",
3
+ "version": "0.17.15",
4
4
  "description": "APIblaze CLI — Chat with your APIs, Manage your API keys, users and groups with the APIblaze serverless proxy",
5
5
  "keywords": [
6
6
  "apiblaze",