trakt-tools 1.11.0 → 1.11.1

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/index.js CHANGED
@@ -327,6 +327,12 @@ var index_default = definePluginEntry({
327
327
  }
328
328
  return toolResult(JSON.stringify(result, null, 2));
329
329
  } catch (error) {
330
+ if (tool.command === "auth") {
331
+ return toolResult(JSON.stringify({
332
+ success: false,
333
+ error: "Trakt authentication failed. Run trakt-cli auth separately and inspect its output locally."
334
+ }));
335
+ }
330
336
  const message = error instanceof Error ? error.message : String(error);
331
337
  const stderr = error && typeof error === "object" && "stderr" in error ? String(error.stderr).trim() : "";
332
338
  const errorOutput = stderr ? `${message}
@@ -2,7 +2,7 @@
2
2
  "id": "trakt-tools",
3
3
  "name": "Trakt",
4
4
  "description": "Track movies and TV shows using trakt.tv",
5
- "version": "1.11.0",
5
+ "version": "1.11.1",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trakt-tools",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "OpenClaw plugin for Trakt.tv - track movies and TV shows",
5
5
  "type": "module",
6
6
  "openclaw": {
@@ -71,7 +71,8 @@
71
71
  "plugin:check": "npx --yes @openclaw/plugin-inspector inspect --no-openclaw",
72
72
  "plugin:ci": "npx --yes @openclaw/plugin-inspector ci --no-openclaw --runtime --mock-sdk --allow-execute",
73
73
  "build": "tsup src/index.ts --format esm --out-dir dist --clean --target node20",
74
- "prepack": "npm run build"
74
+ "prepack": "npm run build",
75
+ "test": "npm run build && node --experimental-test-module-mocks --test tests/*.test.mjs"
75
76
  },
76
77
  "main": "./dist/index.js"
77
78
  }
package/src/index.ts CHANGED
@@ -393,6 +393,15 @@ export default definePluginEntry({
393
393
 
394
394
  return toolResult(JSON.stringify(result, null, 2));
395
395
  } catch (error: unknown) {
396
+ // execFile errors include the full command line, which can
397
+ // contain --client-secret. CLI stderr can echo credentials too.
398
+ // Never return raw authentication diagnostics to an agent.
399
+ if (tool.command === 'auth') {
400
+ return toolResult(JSON.stringify({
401
+ success: false,
402
+ error: 'Trakt authentication failed. Run trakt-cli auth separately and inspect its output locally.',
403
+ }));
404
+ }
396
405
  const message = error instanceof Error ? error.message : String(error);
397
406
  const stderr =
398
407
  error && typeof error === 'object' && 'stderr' in error