@poolzin/pool-bot 2026.1.38 → 2026.1.39
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/CHANGELOG.md +9 -107
- package/dist/agents/tools/memory-tool.js +1 -2
- package/dist/agents/workspace.js +1 -5
- package/dist/build-info.json +3 -3
- package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -17
- package/dist/commands/doctor-state-integrity.js +2 -14
- package/dist/config/types.js +0 -1
- package/dist/config/zod-schema.js +0 -6
- package/dist/discord/monitor/message-handler.process.js +6 -4
- package/dist/gateway/client.js +0 -14
- package/dist/gateway/server.impl.js +0 -4
- package/dist/memory/index.js +0 -5
- package/dist/memory/manager.js +2 -25
- package/dist/slack/monitor/message-handler/prepare.js +10 -4
- package/dist/slack/monitor/slash.js +10 -4
- package/extensions/memory-core/package.json +0 -3
- package/package.json +5 -4
- package/skills/webgpu-threejs-tsl/REFERENCE.md +0 -283
- package/skills/webgpu-threejs-tsl/SKILL.md +0 -91
- package/skills/webgpu-threejs-tsl/docs/compute-shaders.md +0 -404
- package/skills/webgpu-threejs-tsl/docs/core-concepts.md +0 -453
- package/skills/webgpu-threejs-tsl/docs/materials.md +0 -353
- package/skills/webgpu-threejs-tsl/docs/post-processing.md +0 -434
- package/skills/webgpu-threejs-tsl/docs/wgsl-integration.md +0 -324
- package/skills/webgpu-threejs-tsl/examples/basic-setup.js +0 -87
- package/skills/webgpu-threejs-tsl/examples/custom-material.js +0 -170
- package/skills/webgpu-threejs-tsl/examples/earth-shader.js +0 -292
- package/skills/webgpu-threejs-tsl/examples/particle-system.js +0 -259
- package/skills/webgpu-threejs-tsl/examples/post-processing.js +0 -199
- package/skills/webgpu-threejs-tsl/templates/compute-shader.js +0 -305
- package/skills/webgpu-threejs-tsl/templates/webgpu-project.js +0 -276
package/CHANGELOG.md
CHANGED
|
@@ -1,112 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
## v2026.1.39 (2026-02-07)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Security
|
|
4
|
+
- Upgrade `tar` from 7.5.4 → 7.5.7 fixing 4 high-severity vulnerabilities
|
|
5
|
+
- Arbitrary File Overwrite via Symlink Poisoning (GHSA-8qq5-rm4j-mr97)
|
|
6
|
+
- Race Condition via Unicode Ligature Collisions on macOS APFS (GHSA-r6q2-hw4h-h46w)
|
|
7
|
+
- Arbitrary File Creation/Overwrite via Hardlink Path Traversal (GHSA-34x7-hfp2-rc4v)
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## [2026.1.38] - 2026-02-07
|
|
9
|
-
|
|
10
|
-
### 🔒 Security: Bump hono to fix 4 moderate CVEs
|
|
11
|
-
|
|
12
|
-
- **hono 4.11.4 → 4.11.8** — fixes GHSA-9r54-q6cx-xmh5 (XSS via ErrorBoundary), GHSA-6wqw-2p9w-4vw4 (cache middleware ignores Cache-Control: private), GHSA-r354-f388-2fhh (IPv4 validation bypass in IP restriction middleware), GHSA-w332-q679-j88p (arbitrary key read in serve-static Cloudflare adapter).
|
|
13
|
-
- npm audit: 10 → 6 vulnerabilities (4 moderate hono CVEs eliminated).
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## [2026.1.37] - 2026-02-07
|
|
18
|
-
|
|
19
|
-
### 🔒 Security: Remove node-llama-cpp, fix tar vulnerability
|
|
20
|
-
|
|
21
|
-
#### Vulnerabilities Fixed
|
|
22
|
-
- **tar ≤7.5.6 (5× HIGH):** Removed `node-llama-cpp` from `optionalDependencies`, eliminating the entire `tar → cmake-js → node-llama-cpp` vulnerability chain. Updated `tar` override from 7.5.4 → 7.5.7.
|
|
23
|
-
|
|
24
|
-
#### Changes
|
|
25
|
-
- Removed `node-llama-cpp` 3.15.0 from `optionalDependencies` (matching upstream openclaw approach). Local embeddings still work if users install `node-llama-cpp` manually — the dynamic `import()` fallback to OpenAI/Gemini remains unchanged.
|
|
26
|
-
- Fixed `extensions/memory-core/package.json` — added `poolbot` as `devDependency` to resolve `pnpm install` failure from `autoInstallPeers`.
|
|
27
|
-
- Lockfile: removed ~1,300 lines of native dependency entries (`node-llama-cpp`, `cmake-js`, `@node-llama-cpp/*` platform binaries).
|
|
28
|
-
|
|
29
|
-
#### Impact
|
|
30
|
-
- npm audit: 15 → 10 vulnerabilities (5 high eliminated)
|
|
31
|
-
- Install size reduced (no more cmake-js + native compilation toolchain)
|
|
32
|
-
- Zero code changes — all source files unchanged; only dependency configuration
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## [2026.1.35] - 2026-02-06
|
|
37
|
-
|
|
38
|
-
### 📦 Stability Snapshot
|
|
39
|
-
|
|
40
|
-
**Release Type:** Pre-enhancement checkpoint
|
|
41
|
-
|
|
42
|
-
#### Summary
|
|
43
|
-
This release is a stable checkpoint before implementing local memory search enhancements.
|
|
44
|
-
|
|
45
|
-
#### Changes
|
|
46
|
-
- **Version bump:** 2026.1.30 → 2026.1.35
|
|
47
|
-
- **Repository sync:** All repositories clean and synchronized
|
|
48
|
-
- **Backup verification:** Complete backup of configurations and state
|
|
49
|
-
|
|
50
|
-
#### Technical Details
|
|
51
|
-
- Package: @poolzin/pool-bot
|
|
52
|
-
- Node.js: v22.22.0 compatible
|
|
53
|
-
- Backup: /root/poolbot-backup-20260206-130344.tar.gz (35MB)
|
|
54
|
-
|
|
55
|
-
#### Next Steps (Post-Release)
|
|
56
|
-
- Implement Ollama integration for local memory_search
|
|
57
|
-
- Complete QMD embeddings (220 pending → 0)
|
|
58
|
-
- Remove auto-study skill (user-managed cron)
|
|
59
|
-
- Enhance memory architecture with local embeddings
|
|
60
|
-
|
|
61
|
-
#### Maintenance
|
|
62
|
-
- All repositories verified clean
|
|
63
|
-
- Git states documented
|
|
64
|
-
- Gateway status captured
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## v2026.1.30 (2026-02-05)
|
|
69
|
-
|
|
70
|
-
### 🔒 Security Release - CRITICAL VULNERABILITY FIXES
|
|
71
|
-
|
|
72
|
-
#### Critical Vulnerabilities Fixed 🔴
|
|
73
|
-
- **Gateway URL Override (CVE-level):** Prevent credential leakage via malicious gateway redirects
|
|
74
|
-
- Added `validateGatewayUrlSecurity()` requiring explicit token confirmation for custom URLs
|
|
75
|
-
- Custom URLs now require 32+ character tokens
|
|
76
|
-
- Validation applied in `src/gateway/client.ts` before connection
|
|
77
|
-
|
|
78
|
-
- **Discord Prompt Injection (HIGH):** Block arbitrary command injection via channel.topic
|
|
79
|
-
- Removed `channel.topic` from system prompts in `src/discord/monitor/message-handler.process.ts`
|
|
80
|
-
- Only admin-controlled metadata is now included
|
|
81
|
-
- Prevents users with edit permissions from manipulating agent behavior
|
|
82
|
-
|
|
83
|
-
- **Slack Prompt Injection (HIGH):** Block arbitrary command injection via topic/purpose
|
|
84
|
-
- Removed `channel.topic` and `channel.purpose` from system prompts
|
|
85
|
-
- Fixed in `src/slack/monitor/message-handler/prepare.ts` and `src/slack/monitor/slash.ts`
|
|
86
|
-
- Same attack vector as Discord, now mitigated
|
|
87
|
-
|
|
88
|
-
#### Security Features Added ✅
|
|
89
|
-
- **Tool Gating System:** Owner-only access to sensitive tools
|
|
90
|
-
- `validateToolAccess()` function in `src/agents/tool-security.ts`
|
|
91
|
-
- Protected tools: `whatsapp_login`, `gateway`, `cron`, `sessions_spawn`
|
|
92
|
-
- Configurable via `security.owners` in poolbot.json
|
|
93
|
-
|
|
94
|
-
- **Security Utilities:** Prevention and validation functions
|
|
95
|
-
- Path sanitization utilities in `src/media/path-sanitization.ts`
|
|
96
|
-
- URL validation in `src/gateway/url-validation.ts`
|
|
97
|
-
- Security config schema in `src/config/types.security.ts`
|
|
98
|
-
|
|
99
|
-
#### Documentation
|
|
100
|
-
- **New:** `SECURITY.md` - Complete security policy and vulnerability disclosure
|
|
101
|
-
- Breaking changes documented
|
|
102
|
-
- Security best practices for users and developers
|
|
103
|
-
- Reporting guidelines for security issues
|
|
104
|
-
|
|
105
|
-
#### Credits
|
|
106
|
-
- Security improvements inspired by [OpenClaw](https://github.com/openclaw/openclaw) security hardening
|
|
107
|
-
- Internal security audit based on OpenClaw v2026.2.4 analysis
|
|
108
|
-
|
|
109
|
-
**UPGRADE RECOMMENDED:** All users should upgrade to v2026.1.30 due to critical security fixes.
|
|
9
|
+
### Maintenance
|
|
10
|
+
- Reset repository to stable baseline (9ddc7fcec)
|
|
11
|
+
- Remove 52 experimental/unstable commits (PME, tool-usage, progressive-disclosure, security-phase2)
|
|
110
12
|
|
|
111
13
|
---
|
|
112
14
|
|
|
@@ -32,7 +32,6 @@ export function createMemorySearchTool(options) {
|
|
|
32
32
|
const query = readStringParam(params, "query", { required: true });
|
|
33
33
|
const maxResults = readNumberParam(params, "maxResults");
|
|
34
34
|
const minScore = readNumberParam(params, "minScore");
|
|
35
|
-
// Legacy memory search system (PME removed 2026-02-03)
|
|
36
35
|
const { manager, error } = await getMemorySearchManager({
|
|
37
36
|
cfg,
|
|
38
37
|
agentId,
|
|
@@ -56,7 +55,7 @@ export function createMemorySearchTool(options) {
|
|
|
56
55
|
}
|
|
57
56
|
catch (err) {
|
|
58
57
|
const message = err instanceof Error ? err.message : String(err);
|
|
59
|
-
return jsonResult({ results: [], error: message });
|
|
58
|
+
return jsonResult({ results: [], disabled: true, error: message });
|
|
60
59
|
}
|
|
61
60
|
},
|
|
62
61
|
};
|
package/dist/agents/workspace.js
CHANGED
|
@@ -208,11 +208,7 @@ export async function loadWorkspaceBootstrapFiles(dir) {
|
|
|
208
208
|
filePath: path.join(resolvedDir, DEFAULT_BOOTSTRAP_FILENAME),
|
|
209
209
|
},
|
|
210
210
|
];
|
|
211
|
-
|
|
212
|
-
// Per AGENTS.md guidance: "use memory_search() on demand when user asks about past"
|
|
213
|
-
// This prevents ~9.8K tokens (~52.7% of bootstrap) from being injected into every conversation.
|
|
214
|
-
// MEMORY.md remains accessible via the memory_search tool when needed.
|
|
215
|
-
// entries.push(...(await resolveMemoryBootstrapEntries(resolvedDir)));
|
|
211
|
+
entries.push(...(await resolveMemoryBootstrapEntries(resolvedDir)));
|
|
216
212
|
const result = [];
|
|
217
213
|
for (const entry of entries) {
|
|
218
214
|
try {
|
package/dist/build-info.json
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { Type } from "@sinclair/typebox";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Create WhatsApp Login tool
|
|
5
|
-
*
|
|
6
|
-
* SECURITY: This tool is restricted to owners only.
|
|
7
|
-
* Unauthorized access could allow hijacking the WhatsApp instance.
|
|
8
|
-
*
|
|
9
|
-
* @param config - Optional Pool Bot config for security validation
|
|
10
|
-
*/
|
|
11
|
-
export function createWhatsAppLoginTool(config) {
|
|
2
|
+
export function createWhatsAppLoginTool() {
|
|
12
3
|
return {
|
|
13
4
|
label: "WhatsApp Login",
|
|
14
5
|
name: "whatsapp_login",
|
|
@@ -24,13 +15,6 @@ export function createWhatsAppLoginTool(config) {
|
|
|
24
15
|
force: Type.Optional(Type.Boolean()),
|
|
25
16
|
}),
|
|
26
17
|
execute: async (_toolCallId, args) => {
|
|
27
|
-
// SECURITY: Validate owner access
|
|
28
|
-
// NOTE: sender context integration is pending. For now, sensitive tools
|
|
29
|
-
// are denied unless explicitly configured with owners list.
|
|
30
|
-
// TODO: Integrate sender context from session/channel
|
|
31
|
-
const denied = validateToolAccessResponse("whatsapp_login", config, undefined);
|
|
32
|
-
if (denied)
|
|
33
|
-
return denied;
|
|
34
18
|
const { startWebLoginWithQr, waitForWebLogin } = await import("../../../web/login-qr.js");
|
|
35
19
|
const action = args?.action ?? "start";
|
|
36
20
|
if (action === "wait") {
|
|
@@ -3,7 +3,7 @@ import os from "node:os";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
|
5
5
|
import { resolveOAuthDir, resolveStateDir } from "../config/paths.js";
|
|
6
|
-
import { loadSessionStore, resolveMainSessionKey, resolveSessionFilePath,
|
|
6
|
+
import { loadSessionStore, resolveMainSessionKey, resolveSessionFilePath, resolveSessionTranscriptsDirForAgent, resolveStorePath, } from "../config/sessions.js";
|
|
7
7
|
import { note } from "../terminal/note.js";
|
|
8
8
|
import { shortenHomePath } from "../utils.js";
|
|
9
9
|
function existsDir(dir) {
|
|
@@ -291,19 +291,7 @@ export async function noteStateIntegrity(cfg, prompter, configPath) {
|
|
|
291
291
|
const transcriptPath = resolveSessionFilePath(sessionId, entry, {
|
|
292
292
|
agentId,
|
|
293
293
|
});
|
|
294
|
-
|
|
295
|
-
// Se o arquivo não existe no path esperado, verificar também o path alternativo
|
|
296
|
-
if (!existsFile(transcriptPath)) {
|
|
297
|
-
// Tentar verificar se o arquivo existe com o path alternativo (sem sessionFile)
|
|
298
|
-
const altPath = resolveSessionTranscriptPath(sessionId, agentId);
|
|
299
|
-
if (existsFile(altPath)) {
|
|
300
|
-
// Arquivo existe em path alternativo - atualizar entry se necessário
|
|
301
|
-
return false;
|
|
302
|
-
}
|
|
303
|
-
// Arquivo realmente não existe em nenhum path
|
|
304
|
-
return true;
|
|
305
|
-
}
|
|
306
|
-
return false;
|
|
294
|
+
return !existsFile(transcriptPath);
|
|
307
295
|
});
|
|
308
296
|
if (missing.length > 0) {
|
|
309
297
|
warnings.push(`- ${missing.length}/${recent.length} recent sessions are missing transcripts. Check for deleted session files or split state dirs.`);
|
package/dist/config/types.js
CHANGED
|
@@ -20,7 +20,6 @@ export * from "./types.msteams.js";
|
|
|
20
20
|
export * from "./types.plugins.js";
|
|
21
21
|
export * from "./types.queue.js";
|
|
22
22
|
export * from "./types.sandbox.js";
|
|
23
|
-
export * from "./types.security.js";
|
|
24
23
|
export * from "./types.signal.js";
|
|
25
24
|
export * from "./types.skills.js";
|
|
26
25
|
export * from "./types.slack.js";
|
|
@@ -436,12 +436,6 @@ export const PoolBotSchema = z
|
|
|
436
436
|
})
|
|
437
437
|
.strict()
|
|
438
438
|
.optional(),
|
|
439
|
-
security: z
|
|
440
|
-
.object({
|
|
441
|
-
owners: z.array(z.string()).optional(),
|
|
442
|
-
})
|
|
443
|
-
.strict()
|
|
444
|
-
.optional(),
|
|
445
439
|
skills: z
|
|
446
440
|
.object({
|
|
447
441
|
allowBundled: z.array(z.string()).optional(),
|
|
@@ -73,10 +73,12 @@ export async function processDiscordMessage(ctx) {
|
|
|
73
73
|
const forumContextLine = isForumStarter ? `[Forum parent: #${forumParentSlug}]` : null;
|
|
74
74
|
const groupChannel = isGuildMessage && displayChannelSlug ? `#${displayChannelSlug}` : undefined;
|
|
75
75
|
const groupSubject = isDirectMessage ? undefined : groupChannel;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
const channelDescription = channelInfo?.topic?.trim();
|
|
77
|
+
const systemPromptParts = [
|
|
78
|
+
channelDescription ? `Channel topic: ${channelDescription}` : null,
|
|
79
|
+
channelConfig?.systemPrompt?.trim() || null,
|
|
80
|
+
].filter((entry) => Boolean(entry));
|
|
81
|
+
const groupSystemPrompt = systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : undefined;
|
|
80
82
|
const storePath = resolveStorePath(cfg.session?.store, {
|
|
81
83
|
agentId: route.agentId,
|
|
82
84
|
});
|
package/dist/gateway/client.js
CHANGED
|
@@ -3,7 +3,6 @@ import { WebSocket } from "ws";
|
|
|
3
3
|
import { normalizeFingerprint } from "../infra/tls/fingerprint.js";
|
|
4
4
|
import { rawDataToString } from "../infra/ws.js";
|
|
5
5
|
import { logDebug, logError } from "../logger.js";
|
|
6
|
-
import { validateGatewayUrlSecurity } from "./url-validation.js";
|
|
7
6
|
import { loadOrCreateDeviceIdentity, publicKeyRawBase64UrlFromPem, signDevicePayload, } from "../infra/device-identity.js";
|
|
8
7
|
import { clearDeviceAuthToken, loadDeviceAuthToken, storeDeviceAuthToken, } from "../infra/device-auth-store.js";
|
|
9
8
|
import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES, } from "../utils/message-channel.js";
|
|
@@ -42,19 +41,6 @@ export class GatewayClient {
|
|
|
42
41
|
if (this.closed)
|
|
43
42
|
return;
|
|
44
43
|
const url = this.opts.url ?? "ws://127.0.0.1:18789";
|
|
45
|
-
// SECURITY: Validate gateway URL override
|
|
46
|
-
// Prevents credential leakage via redirects to untrusted gateways
|
|
47
|
-
try {
|
|
48
|
-
validateGatewayUrlSecurity({
|
|
49
|
-
url,
|
|
50
|
-
token: this.opts.token,
|
|
51
|
-
requireExplicitToken: this.opts.requireExplicitToken,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
this.opts.onConnectError?.(err instanceof Error ? err : new Error(String(err)));
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
44
|
if (this.opts.tlsFingerprint && !url.startsWith("wss://")) {
|
|
59
45
|
this.opts.onConnectError?.(new Error("gateway tls fingerprint requires wss:// gateway url"));
|
|
60
46
|
return;
|
|
@@ -27,7 +27,6 @@ import { createExecApprovalHandlers } from "./server-methods/exec-approval.js";
|
|
|
27
27
|
import { createExecApprovalForwarder } from "../infra/exec-approval-forwarder.js";
|
|
28
28
|
import { createChannelManager } from "./server-channels.js";
|
|
29
29
|
import { createAgentEventHandler } from "./server-chat.js";
|
|
30
|
-
import { startLifecycleHooksIntegration } from "./hooks/lifecycle-hooks-integration.js";
|
|
31
30
|
import { createGatewayCloseHandler } from "./server-close.js";
|
|
32
31
|
import { buildGatewayCronService } from "./server-cron.js";
|
|
33
32
|
import { applyGatewayLaneConcurrency } from "./server-lanes.js";
|
|
@@ -264,9 +263,6 @@ export async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
264
263
|
resolveSessionKeyForRun,
|
|
265
264
|
clearAgentRunContext,
|
|
266
265
|
}));
|
|
267
|
-
// Lifecycle Hooks Integration (POC Day 1.5)
|
|
268
|
-
const lifecycleHooksUnsub = startLifecycleHooksIntegration();
|
|
269
|
-
logHooks.info("Lifecycle hooks integration started");
|
|
270
266
|
const heartbeatUnsub = onHeartbeatEvent((evt) => {
|
|
271
267
|
broadcast("heartbeat", evt, { dropIfSlow: true });
|
|
272
268
|
});
|
package/dist/memory/index.js
CHANGED
package/dist/memory/manager.js
CHANGED
|
@@ -157,7 +157,6 @@ export class MemoryIndexManager {
|
|
|
157
157
|
this.sessionWarm.add(key);
|
|
158
158
|
}
|
|
159
159
|
async search(query, opts) {
|
|
160
|
-
const searchStart = Date.now();
|
|
161
160
|
void this.warmSession(opts?.sessionKey);
|
|
162
161
|
if (this.settings.sync.onSearch && (this.dirty || this.sessionsDirty)) {
|
|
163
162
|
void this.sync({ reason: "search" }).catch((err) => {
|
|
@@ -180,17 +179,7 @@ export class MemoryIndexManager {
|
|
|
180
179
|
? await this.searchVector(queryVec, candidates).catch(() => [])
|
|
181
180
|
: [];
|
|
182
181
|
if (!hybrid.enabled) {
|
|
183
|
-
|
|
184
|
-
const searchDuration = Date.now() - searchStart;
|
|
185
|
-
log.debug("memory search performance", {
|
|
186
|
-
query: cleaned.substring(0, 50),
|
|
187
|
-
durationMs: searchDuration,
|
|
188
|
-
resultCount: results.length,
|
|
189
|
-
provider: this.provider.id,
|
|
190
|
-
model: this.provider.model,
|
|
191
|
-
hybrid: false,
|
|
192
|
-
});
|
|
193
|
-
return results;
|
|
182
|
+
return vectorResults.filter((entry) => entry.score >= minScore).slice(0, maxResults);
|
|
194
183
|
}
|
|
195
184
|
const merged = this.mergeHybridResults({
|
|
196
185
|
vector: vectorResults,
|
|
@@ -198,19 +187,7 @@ export class MemoryIndexManager {
|
|
|
198
187
|
vectorWeight: hybrid.vectorWeight,
|
|
199
188
|
textWeight: hybrid.textWeight,
|
|
200
189
|
});
|
|
201
|
-
|
|
202
|
-
const searchDuration = Date.now() - searchStart;
|
|
203
|
-
log.debug("memory search performance", {
|
|
204
|
-
query: cleaned.substring(0, 50),
|
|
205
|
-
durationMs: searchDuration,
|
|
206
|
-
resultCount: results.length,
|
|
207
|
-
provider: this.provider.id,
|
|
208
|
-
model: this.provider.model,
|
|
209
|
-
hybrid: true,
|
|
210
|
-
keywordResults: keywordResults.length,
|
|
211
|
-
vectorResults: vectorResults.length,
|
|
212
|
-
});
|
|
213
|
-
return results;
|
|
190
|
+
return merged.filter((entry) => entry.score >= minScore).slice(0, maxResults);
|
|
214
191
|
}
|
|
215
192
|
async searchVector(queryVec, limit) {
|
|
216
193
|
const results = await searchVector({
|
|
@@ -350,10 +350,16 @@ export async function prepareSlackMessage(params) {
|
|
|
350
350
|
});
|
|
351
351
|
}
|
|
352
352
|
const slackTo = isDirectMessage ? `user:${message.user}` : `channel:${message.channel}`;
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
353
|
+
const channelDescription = [channelInfo?.topic, channelInfo?.purpose]
|
|
354
|
+
.map((entry) => entry?.trim())
|
|
355
|
+
.filter((entry) => Boolean(entry))
|
|
356
|
+
.filter((entry, index, list) => list.indexOf(entry) === index)
|
|
357
|
+
.join("\n");
|
|
358
|
+
const systemPromptParts = [
|
|
359
|
+
channelDescription ? `Channel description: ${channelDescription}` : null,
|
|
360
|
+
channelConfig?.systemPrompt?.trim() || null,
|
|
361
|
+
].filter((entry) => Boolean(entry));
|
|
362
|
+
const groupSystemPrompt = systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : undefined;
|
|
357
363
|
let threadStarterBody;
|
|
358
364
|
let threadLabel;
|
|
359
365
|
let threadStarterMedia = null;
|
|
@@ -288,10 +288,16 @@ export function registerSlackMonitorSlashCommands(params) {
|
|
|
288
288
|
id: isDirectMessage ? command.user_id : command.channel_id,
|
|
289
289
|
},
|
|
290
290
|
});
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
const channelDescription = [channelInfo?.topic, channelInfo?.purpose]
|
|
292
|
+
.map((entry) => entry?.trim())
|
|
293
|
+
.filter((entry) => Boolean(entry))
|
|
294
|
+
.filter((entry, index, list) => list.indexOf(entry) === index)
|
|
295
|
+
.join("\n");
|
|
296
|
+
const systemPromptParts = [
|
|
297
|
+
channelDescription ? `Channel description: ${channelDescription}` : null,
|
|
298
|
+
channelConfig?.systemPrompt?.trim() || null,
|
|
299
|
+
].filter((entry) => Boolean(entry));
|
|
300
|
+
const groupSystemPrompt = systemPromptParts.length > 0 ? systemPromptParts.join("\n\n") : undefined;
|
|
295
301
|
const ctxPayload = finalizeInboundContext({
|
|
296
302
|
Body: prompt,
|
|
297
303
|
RawBody: prompt,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poolzin/pool-bot",
|
|
3
|
-
"version": "2026.1.
|
|
3
|
+
"version": "2026.1.39",
|
|
4
4
|
"description": "🎱 Pool Bot - AI assistant with PLCODE integrations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"express": "^5.2.1",
|
|
185
185
|
"file-type": "^21.3.0",
|
|
186
186
|
"grammy": "^1.39.3",
|
|
187
|
-
"hono": "4.11.
|
|
187
|
+
"hono": "4.11.4",
|
|
188
188
|
"jiti": "^2.6.1",
|
|
189
189
|
"json5": "^2.2.3",
|
|
190
190
|
"jszip": "^3.10.1",
|
|
@@ -207,7 +207,8 @@
|
|
|
207
207
|
"zod": "^4.3.6"
|
|
208
208
|
},
|
|
209
209
|
"optionalDependencies": {
|
|
210
|
-
"@napi-rs/canvas": "^0.1.88"
|
|
210
|
+
"@napi-rs/canvas": "^0.1.88",
|
|
211
|
+
"node-llama-cpp": "3.15.0"
|
|
211
212
|
},
|
|
212
213
|
"devDependencies": {
|
|
213
214
|
"@grammyjs/types": "^3.23.0",
|
|
@@ -245,7 +246,7 @@
|
|
|
245
246
|
"minimumReleaseAge": 2880,
|
|
246
247
|
"overrides": {
|
|
247
248
|
"@sinclair/typebox": "0.34.47",
|
|
248
|
-
"hono": "4.11.
|
|
249
|
+
"hono": "4.11.4",
|
|
249
250
|
"tar": "7.5.7"
|
|
250
251
|
}
|
|
251
252
|
},
|