opencode-pollinations-plugin 5.4.7 → 5.4.8-debug.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.
package/README.md CHANGED
@@ -52,6 +52,7 @@ Pollinations.ai is an open-source platform built by and for the community. We pr
52
52
  - **🛡️ Safety Net V5**: never get blocked.
53
53
  - **Transparent Fallback**: If your Pro quota runs out mid-chat, the plugin automatically switches to a free model instantly. No errors, just a seamless experience.
54
54
  - **📊 Real-time Dashboard**: Track your **Pollen** usage, Tier Status, and Wallet Balance inside OpenCode.
55
+ - **🔇 Stealth Mode (v5.4.7)**: Status notifications are now strictly limited to Pollinations Enter (Paid) sessions. No more cluttered notifications when using other providers like Nvidia or Google AI.
55
56
 
56
57
  ## 🐝 Understanding Pollen & Tiers
57
58
 
@@ -33,6 +33,37 @@ function saveSignatureMap() {
33
33
  log(`ERROR: Error mapping signature: ${String(e)}`);
34
34
  }
35
35
  }
36
+ /**
37
+ * DEEP INSPECTION LOGGING (Temporary for v5.5.0 Analysis)
38
+ * Dumps the full payload to a local log file to identify OpenCode agent signatures.
39
+ */
40
+ function dumpPayload(body) {
41
+ try {
42
+ const logPath = '/home/fkomp/Bureau/oracle/opencode-pollinations-plugin/logs/payload_dump.log';
43
+ if (!fs.existsSync(path.dirname(logPath)))
44
+ fs.mkdirSync(path.dirname(logPath), { recursive: true });
45
+ // Extract interesting bits for quick reading
46
+ const systemPrompt = body.messages?.find((m) => m.role === 'system')?.content || "NONE";
47
+ const inspection = {
48
+ timestamp: new Date().toISOString(),
49
+ captured_fields: {
50
+ model: body.model,
51
+ user: body.user,
52
+ metadata: body.metadata,
53
+ agent: body.agent,
54
+ hasTools: !!(body.tools && body.tools.length > 0),
55
+ toolsCount: body.tools?.length || 0,
56
+ messageCount: body.messages?.length || 0,
57
+ systemPromptSnippet: systemPrompt.substring(0, 300) + "..."
58
+ },
59
+ full_body: body
60
+ };
61
+ fs.appendFileSync(logPath, JSON.stringify(inspection, null, 2) + "\n\n--- END OF REQUEST ---\n\n");
62
+ }
63
+ catch (e) {
64
+ console.error("[DebugLog] Failed to dump payload:", e);
65
+ }
66
+ }
36
67
  // RECURSIVE NORMALIZER for Stable Hashing
37
68
  function normalizeContent(c) {
38
69
  if (!c)
@@ -150,6 +181,7 @@ export async function handleChatCompletion(req, res, bodyRaw) {
150
181
  let authHeader = undefined;
151
182
  try {
152
183
  const body = JSON.parse(bodyRaw);
184
+ dumpPayload(body); // <--- DEEP INSPECTION
153
185
  const config = loadConfig();
154
186
  // DEBUG: Trace Config State for Hot Reload verification
155
187
  log(`[Proxy Request] Config Loaded. Mode: ${config.mode}, HasKey: ${!!config.apiKey}, KeyLength: ${config.apiKey ? config.apiKey.length : 0}`);
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.4.7",
4
+ "version": "5.4.8-debug.2",
5
5
  "description": "Native Pollinations.ai Provider Plugin for OpenCode",
6
6
  "publisher": "pollinations",
7
7
  "repository": {