opencode-pollinations-plugin 5.1.15 → 5.1.16

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
@@ -7,14 +7,21 @@ import { handleChatCompletion } from './server/proxy.js';
7
7
  import { createToastHooks, setGlobalClient } from './server/toast.js';
8
8
  import { createStatusHooks } from './server/status.js';
9
9
  import { createCommandHooks } from './server/commands.js';
10
- const LOG_FILE = '/tmp/opencode_pollinations_v4.log';
10
+ const LIFE_LOG = '/tmp/POLLI_LIFECYCLE.log';
11
+ const LOC_LOG = '/tmp/POLLI_LOCATION.log';
11
12
  function log(msg) {
12
13
  try {
13
- fs.appendFileSync(LOG_FILE, `[${new Date().toISOString()}] ${msg}\n`);
14
+ fs.appendFileSync(LIFE_LOG, `[${new Date().toISOString()}] ${msg}\n`);
14
15
  }
15
16
  catch (e) { }
16
17
  }
17
18
  const TRACKING_PORT = 10001;
19
+ // IMMEDIATE PROBE
20
+ try {
21
+ fs.writeFileSync(LOC_LOG, `[${new Date().toISOString()}] ENTRY_POINT_RUNNING: ${__filename}\n`);
22
+ log(`[STARTUP] Initializing Plugin v5.1.16...`);
23
+ }
24
+ catch (e) { }
18
25
  // === ANTI-ZOMBIE ATOMIC CLEANUP ===
19
26
  try {
20
27
  log(`[Init] Checking port ${TRACKING_PORT} for zombies...`);
@@ -1,3 +1,5 @@
1
+ import * as fs from 'fs';
2
+ import * as path from 'path';
1
3
  import { loadConfig, saveConfig } from './config.js';
2
4
  import { getQuotaStatus } from './quota.js';
3
5
  import { emitStatusToast } from './toast.js';
@@ -93,6 +95,8 @@ export async function handleCommand(command) {
93
95
  return handleFallbackCommand(args);
94
96
  case 'config':
95
97
  return handleConfigCommand(args);
98
+ case 'debug':
99
+ return handleDebugCommand();
96
100
  case 'help':
97
101
  return handleHelpCommand();
98
102
  default:
@@ -267,6 +271,26 @@ function handleConfigCommand(args) {
267
271
  error: `Clé inconnue: ${key}. Clés: status_gui, logs_gui, threshold_tier, threshold_wallet, status_bar`
268
272
  };
269
273
  }
274
+ function handleDebugCommand() {
275
+ const info = {
276
+ pid: process.pid,
277
+ execPath: process.execPath,
278
+ cwd: process.cwd(),
279
+ home: process.env.HOME || 'undefined',
280
+ node: process.version,
281
+ uid: process.getuid ? process.getuid() : 'unknown',
282
+ gid: process.getgid ? process.getgid() : 'unknown',
283
+ tmp: '/tmp',
284
+ port_env: process.env.POLLINATIONS_PORT || 'default(10001)',
285
+ log_file_check: fs.existsSync(path.join(process.env.HOME || '', '.config/opencode/plugins/pollinations-v3.log')),
286
+ tmp_log_check: fs.existsSync('/tmp/POLLI_LIFECYCLE.log')
287
+ };
288
+ return {
289
+ handled: true,
290
+ response: `### 🐞 Debug Probe v5.1.16\n` +
291
+ `\`\`\`json\n${JSON.stringify(info, null, 2)}\n\`\`\``
292
+ };
293
+ }
270
294
  function handleHelpCommand() {
271
295
  const help = `
272
296
  ### 🌸 Pollinations Plugin - Commandes V5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencode-pollinations-plugin",
3
3
  "displayName": "Pollinations AI (V5.1)",
4
- "version": "5.1.15",
4
+ "version": "5.1.16",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {