@lotics/cli 0.8.0 → 0.9.0

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/dist/src/cli.js CHANGED
@@ -554,8 +554,13 @@ async function main() {
554
554
  // Always request text format so model_output is available; --json only affects CLI output
555
555
  const result = await client.execute(toolName, args, { format: "text", timeoutMs });
556
556
  if (result.error) {
557
- console.error(result.error);
558
- console.error(`\nHint: run "lotics tools ${toolName}" to see the expected input schema.`);
557
+ if (flags.json) {
558
+ console.log(JSON.stringify({ error: result.error }, null, 2));
559
+ }
560
+ else {
561
+ console.error(result.error);
562
+ console.error(`\nHint: run "lotics tools ${toolName}" to see the expected input schema.`);
563
+ }
559
564
  process.exit(1);
560
565
  }
561
566
  if (flags.json) {
@@ -45,7 +45,7 @@ export class LoticsClient {
45
45
  }
46
46
  buildHeaders() {
47
47
  const headers = {
48
- "x-api-key": this.apiKey,
48
+ "Authorization": `Bearer ${this.apiKey}`,
49
49
  };
50
50
  if (this.workspaceId) {
51
51
  headers["x-workspace-id"] = this.workspaceId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {