@poolzin/pool-bot 2026.4.0 → 2026.4.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/dist/build-info.json +3 -3
- package/dist/cli/plugins-cli.d.ts.map +1 -1
- package/dist/cli/plugins-cli.js +11 -27
- package/dist/commands/doctor-runtime.d.ts +2 -0
- package/dist/commands/doctor-runtime.d.ts.map +1 -0
- package/dist/commands/doctor-runtime.js +172 -0
- package/dist/plugin-sdk/compat.d.ts +103 -34
- package/dist/plugin-sdk/compat.d.ts.map +1 -1
- package/dist/plugin-sdk/compat.js +87 -87
- package/dist/plugin-sdk/runtime-store.d.ts +5 -2
- package/dist/plugin-sdk/runtime-store.d.ts.map +1 -1
- package/dist/plugin-sdk/runtime-store.js +12 -3
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins-cli.d.ts","sourceRoot":"","sources":["../../src/cli/plugins-cli.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAsGF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins-cli.d.ts","sourceRoot":"","sources":["../../src/cli/plugins-cli.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsBzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAsGF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,QAolBlD"}
|
package/dist/cli/plugins-cli.js
CHANGED
|
@@ -612,35 +612,19 @@ export function registerPluginsCli(program) {
|
|
|
612
612
|
});
|
|
613
613
|
plugins
|
|
614
614
|
.command("doctor")
|
|
615
|
-
.description("
|
|
616
|
-
.action(() => {
|
|
615
|
+
.description("Health checks + quick fixes for the gateway and channels")
|
|
616
|
+
.action(async () => {
|
|
617
|
+
// Plugin check
|
|
617
618
|
const report = buildPluginStatusReport();
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
624
|
-
const lines = [];
|
|
625
|
-
if (errors.length > 0) {
|
|
626
|
-
lines.push(theme.error("Plugin errors:"));
|
|
627
|
-
for (const entry of errors) {
|
|
628
|
-
lines.push(`- ${entry.id}: ${entry.error ?? "failed to load"} (${entry.source})`);
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
if (diags.length > 0) {
|
|
632
|
-
if (lines.length > 0) {
|
|
633
|
-
lines.push("");
|
|
634
|
-
}
|
|
635
|
-
lines.push(theme.warn("Diagnostics:"));
|
|
636
|
-
for (const diag of diags) {
|
|
637
|
-
const target = diag.pluginId ? `${diag.pluginId}: ` : "";
|
|
638
|
-
lines.push(`- ${target}${diag.message}`);
|
|
619
|
+
const pluginErrors = report.plugins.filter((p) => p.status === "error");
|
|
620
|
+
if (pluginErrors.length > 0) {
|
|
621
|
+
console.log("\nPlugin errors:");
|
|
622
|
+
for (const entry of pluginErrors) {
|
|
623
|
+
console.log(` ❌ ${entry.id}: ${entry.error ?? "failed to load"} (${entry.source})`);
|
|
639
624
|
}
|
|
640
625
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
defaultRuntime.log(lines.join("\n"));
|
|
626
|
+
// Full doctor
|
|
627
|
+
const { doctorCommand } = await import("../commands/doctor-runtime.js");
|
|
628
|
+
await doctorCommand();
|
|
645
629
|
});
|
|
646
630
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor-runtime.d.ts","sourceRoot":"","sources":["../../src/commands/doctor-runtime.ts"],"names":[],"mappings":"AAsBA,wBAAsB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAkKnD"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool Bot Doctor
|
|
3
|
+
* Health checks and quick fixes for the gateway and channels.
|
|
4
|
+
*/
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
function resolveHomeDir() {
|
|
8
|
+
return process.env.HOME || process.env.USERPROFILE || "/tmp";
|
|
9
|
+
}
|
|
10
|
+
function resolveConfigDir() {
|
|
11
|
+
return path.join(resolveHomeDir(), ".poolbot");
|
|
12
|
+
}
|
|
13
|
+
export async function doctorCommand() {
|
|
14
|
+
console.log("\nPool Bot Doctor\n");
|
|
15
|
+
const checks = [];
|
|
16
|
+
const configDir = resolveConfigDir();
|
|
17
|
+
// 1. Config directory
|
|
18
|
+
if (fs.existsSync(configDir)) {
|
|
19
|
+
checks.push({ name: "Config directory", status: "pass", message: configDir });
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
checks.push({
|
|
23
|
+
name: "Config directory",
|
|
24
|
+
status: "warn",
|
|
25
|
+
message: `${configDir} not found`,
|
|
26
|
+
fix: "Run: poolbot setup",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
// 2. Config file
|
|
30
|
+
const configPath = path.join(configDir, "config.yaml");
|
|
31
|
+
if (fs.existsSync(configPath)) {
|
|
32
|
+
checks.push({ name: "Config file", status: "pass", message: "Found" });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
checks.push({
|
|
36
|
+
name: "Config file",
|
|
37
|
+
status: "warn",
|
|
38
|
+
message: "config.yaml not found",
|
|
39
|
+
fix: "Run: poolbot configure",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// 3. Gateway auth
|
|
43
|
+
const tokenEnv = process.env.OPENCLAW_GATEWAY_TOKEN || process.env.POOLBOT_GATEWAY_TOKEN;
|
|
44
|
+
if (tokenEnv) {
|
|
45
|
+
checks.push({ name: "Gateway token", status: "pass", message: "Set via env" });
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
checks.push({
|
|
49
|
+
name: "Gateway token",
|
|
50
|
+
status: "warn",
|
|
51
|
+
message: "No gateway token found",
|
|
52
|
+
fix: "Run: poolbot configure or set POOLBOT_GATEWAY_TOKEN",
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
// 4. API keys
|
|
56
|
+
const providers = [
|
|
57
|
+
{ name: "Anthropic", env: "ANTHROPIC_API_KEY" },
|
|
58
|
+
{ name: "OpenAI", env: "OPENAI_API_KEY" },
|
|
59
|
+
{ name: "Google", env: "GOOGLE_API_KEY" },
|
|
60
|
+
{ name: "Groq", env: "GROQ_API_KEY" },
|
|
61
|
+
];
|
|
62
|
+
let hasAnyProvider = false;
|
|
63
|
+
for (const p of providers) {
|
|
64
|
+
if (process.env[p.env]) {
|
|
65
|
+
checks.push({ name: `${p.name} API key`, status: "pass", message: "Configured" });
|
|
66
|
+
hasAnyProvider = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (!hasAnyProvider) {
|
|
70
|
+
checks.push({
|
|
71
|
+
name: "AI Provider",
|
|
72
|
+
status: "warn",
|
|
73
|
+
message: "No API keys configured",
|
|
74
|
+
fix: "Set at least one: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// 5. Gateway connection
|
|
78
|
+
const gatewayUrl = process.env.OPENCLAW_GATEWAY_URL || process.env.POOLBOT_GATEWAY_URL;
|
|
79
|
+
if (gatewayUrl) {
|
|
80
|
+
try {
|
|
81
|
+
const controller = new AbortController();
|
|
82
|
+
const timeout = setTimeout(() => controller.abort(), 3000);
|
|
83
|
+
const res = await fetch(`${gatewayUrl}/health`, { signal: controller.signal });
|
|
84
|
+
clearTimeout(timeout);
|
|
85
|
+
if (res.ok) {
|
|
86
|
+
checks.push({ name: "Gateway connection", status: "pass", message: `Reachable at ${gatewayUrl}` });
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
checks.push({
|
|
90
|
+
name: "Gateway connection",
|
|
91
|
+
status: "warn",
|
|
92
|
+
message: `Gateway returned ${res.status}`,
|
|
93
|
+
fix: "Check gateway logs: poolbot gateway logs",
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
checks.push({
|
|
99
|
+
name: "Gateway connection",
|
|
100
|
+
status: "fail",
|
|
101
|
+
message: `Cannot reach ${gatewayUrl}`,
|
|
102
|
+
fix: "Start gateway: poolbot gateway start",
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
checks.push({
|
|
108
|
+
name: "Gateway connection",
|
|
109
|
+
status: "warn",
|
|
110
|
+
message: "No gateway URL configured",
|
|
111
|
+
fix: "Set POOLBOT_GATEWAY_URL or run: poolbot gateway start",
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
// 6. Node.js version
|
|
115
|
+
const nodeVersion = process.version;
|
|
116
|
+
const major = parseInt(nodeVersion.replace("v", "").split(".")[0], 10);
|
|
117
|
+
if (major >= 22) {
|
|
118
|
+
checks.push({ name: "Node.js version", status: "pass", message: nodeVersion });
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
checks.push({
|
|
122
|
+
name: "Node.js version",
|
|
123
|
+
status: "fail",
|
|
124
|
+
message: `${nodeVersion} (requires >= 22)`,
|
|
125
|
+
fix: "Upgrade Node.js to v22+",
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
// 7. Sessions directory
|
|
129
|
+
const sessionsDir = path.join(configDir, "sessions");
|
|
130
|
+
if (fs.existsSync(sessionsDir)) {
|
|
131
|
+
const files = fs.readdirSync(sessionsDir);
|
|
132
|
+
checks.push({ name: "Sessions", status: "pass", message: `${files.length} sessions` });
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
checks.push({ name: "Sessions", status: "pass", message: "No sessions yet" });
|
|
136
|
+
}
|
|
137
|
+
// 8. Plugins
|
|
138
|
+
try {
|
|
139
|
+
const pluginsDir = path.join(process.cwd(), "extensions");
|
|
140
|
+
if (fs.existsSync(pluginsDir)) {
|
|
141
|
+
const plugins = fs.readdirSync(pluginsDir).filter((d) => {
|
|
142
|
+
const pkgPath = path.join(pluginsDir, d, "package.json");
|
|
143
|
+
return fs.existsSync(pkgPath);
|
|
144
|
+
});
|
|
145
|
+
checks.push({ name: "Extensions", status: "pass", message: `${plugins.length} extensions loaded` });
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
checks.push({ name: "Extensions", status: "warn", message: "Could not scan extensions" });
|
|
150
|
+
}
|
|
151
|
+
// Print results
|
|
152
|
+
const passCount = checks.filter((c) => c.status === "pass").length;
|
|
153
|
+
const warnCount = checks.filter((c) => c.status === "warn").length;
|
|
154
|
+
const failCount = checks.filter((c) => c.status === "fail").length;
|
|
155
|
+
for (const check of checks) {
|
|
156
|
+
const icon = check.status === "pass" ? "✅" : check.status === "warn" ? "⚠️" : "❌";
|
|
157
|
+
console.log(` ${icon} ${check.name}: ${check.message}`);
|
|
158
|
+
if (check.fix) {
|
|
159
|
+
console.log(` → ${check.fix}`);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
console.log(`\n Summary: ${passCount} passed, ${warnCount} warnings, ${failCount} failed\n`);
|
|
163
|
+
if (failCount > 0) {
|
|
164
|
+
console.log(" Run the suggested fixes above, then run: poolbot doctor\n");
|
|
165
|
+
}
|
|
166
|
+
else if (warnCount > 0) {
|
|
167
|
+
console.log(" System is functional but could be improved. See warnings above.\n");
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
console.log(" All checks passed! System is healthy.\n");
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -1,42 +1,111 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin SDK
|
|
3
|
-
*
|
|
2
|
+
* Pool Bot Plugin SDK - Main Entry Point
|
|
3
|
+
* Re-exports from internal modules for extension compatibility.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export declare function listDiscordAccountIds(...a: any[]): string[];
|
|
21
|
-
export declare function looksLikeDiscordTargetId(...a: any[]): boolean;
|
|
22
|
-
export declare function normalizeDiscordMessagingTarget(target: string): string;
|
|
23
|
-
export declare function normalizeDiscordOutboundTarget(target: string): string;
|
|
24
|
-
export declare function projectCredentialSnapshotFields(...a: any[]): any;
|
|
25
|
-
export declare function resolveConfiguredFromCredentialStatuses(...a: any[]): any;
|
|
26
|
-
export declare function resolveDiscordAccount(...a: any[]): any;
|
|
27
|
-
export declare function resolveDefaultDiscordAccountId(...a: any[]): string | undefined;
|
|
28
|
-
export declare function formatAllowFromLowercase(...a: any[]): string;
|
|
5
|
+
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
|
|
6
|
+
export type { PoolBotPluginConfigSchema } from "../plugins/types.js";
|
|
7
|
+
export { getChatChannelMeta } from "../channels/registry.js";
|
|
8
|
+
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js";
|
|
9
|
+
export { HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN } from "../auto-reply/tokens.js";
|
|
10
|
+
export type PoolBotConfig = any;
|
|
11
|
+
export type PoolbotConfig = any;
|
|
12
|
+
export type ClawdbotConfig = any;
|
|
13
|
+
export type ChannelPlugin = any;
|
|
14
|
+
export type PoolBotPlugin = any;
|
|
15
|
+
export type PoolBotPluginApi = any;
|
|
16
|
+
export type PoolbotPluginApi = any;
|
|
17
|
+
export type PoolBotPluginService = any;
|
|
18
|
+
export type PoolbotPluginService = any;
|
|
19
|
+
export type PluginRuntime = any;
|
|
29
20
|
export type OpenClawPluginApi = {
|
|
30
21
|
runtime: any;
|
|
31
22
|
config: any;
|
|
32
23
|
};
|
|
33
|
-
export declare function collectAllowlistProviderRestrictSendersWarnings(...a: any[]): any;
|
|
34
|
-
export declare function collectAllowlistProviderGroupPolicyWarnings(...a: any[]): any;
|
|
35
|
-
export declare function collectOpenGroupPolicyRouteAllowlistWarnings(...a: any[]): any;
|
|
36
|
-
export declare function createScopedDmSecurityResolver(...a: any[]): any;
|
|
37
|
-
export type PluginRuntime = any;
|
|
38
|
-
export type ResolvedDiscordAccount = any;
|
|
39
|
-
export type PoolBotConfig = any;
|
|
40
|
-
export type ChannelPlugin = any;
|
|
41
24
|
export type ChannelStatusIssue = any;
|
|
25
|
+
export type ResolvedDiscordAccount = any;
|
|
26
|
+
export type ChannelMeta = any;
|
|
27
|
+
export type ChannelMessageActionName = any;
|
|
28
|
+
export type ChannelOutboundAdapter = any;
|
|
29
|
+
export type ChannelOnboardingAdapter = any;
|
|
30
|
+
export type ChannelAccountSnapshot = any;
|
|
31
|
+
export type ChannelDirectoryEntry = any;
|
|
32
|
+
export type ChannelGroupContext = any;
|
|
33
|
+
export type DmPolicy = any;
|
|
34
|
+
export type GroupPolicy = any;
|
|
35
|
+
export type GroupToolPolicyConfig = any;
|
|
36
|
+
export type RuntimeEnv = any;
|
|
37
|
+
export type AllowlistMatch = any;
|
|
38
|
+
export type BaseProbeResult = any;
|
|
39
|
+
export type BlockStreamingCoalesceConfig = any;
|
|
40
|
+
export type DiagnosticEventPayload = any;
|
|
41
|
+
export type LookupFn = any;
|
|
42
|
+
export type ReplyPayload = any;
|
|
43
|
+
export type PollInput = any;
|
|
44
|
+
export type SsrFPolicy = any;
|
|
45
|
+
export type WizardPrompter = any;
|
|
46
|
+
export type MarkdownTableMode = any;
|
|
47
|
+
export type LineChannelData = any;
|
|
48
|
+
export type GoogleChatAccountConfig = any;
|
|
49
|
+
export type GoogleChatConfig = any;
|
|
50
|
+
export type MSTeamsConfig = any;
|
|
51
|
+
export declare const MarkdownConfigSchema: {};
|
|
52
|
+
export declare const ToolPolicySchema: {};
|
|
53
|
+
export declare const GoogleChatConfigSchema: {};
|
|
54
|
+
export declare const DiscordConfigSchema: {};
|
|
55
|
+
export declare const TelegramConfigSchema: {};
|
|
56
|
+
export declare const SlackConfigSchema: {};
|
|
57
|
+
export declare const SignalConfigSchema: {};
|
|
58
|
+
export declare const WhatsAppConfigSchema: {};
|
|
59
|
+
export declare const IMessageConfigSchema: {};
|
|
60
|
+
export { createPluginRuntimeStore } from "./runtime-store.js";
|
|
61
|
+
export declare function createScopedChannelConfigBase(..._a: any[]): any;
|
|
62
|
+
export declare function buildAccountScopedDmSecurityPolicy(..._a: any[]): any;
|
|
63
|
+
export declare function createScopedAccountConfigAccessors(..._a: any[]): any;
|
|
64
|
+
export declare function createScopedDmSecurityResolver(..._a: any[]): any;
|
|
65
|
+
export declare function buildComputedAccountStatusSnapshot(..._a: any[]): any;
|
|
66
|
+
export declare function buildBaseChannelStatusSummary(..._a: any[]): any;
|
|
67
|
+
export declare function collectDiscordAuditChannelIds(..._a: any[]): string[];
|
|
68
|
+
export declare function collectDiscordStatusIssues(..._a: any[]): any;
|
|
69
|
+
export declare function discordOnboardingAdapter(..._a: any[]): any;
|
|
70
|
+
export declare function inspectDiscordAccount(..._a: any[]): any;
|
|
71
|
+
export declare function listDiscordAccountIds(..._a: any[]): string[];
|
|
72
|
+
export declare function looksLikeDiscordTargetId(..._a: any[]): boolean;
|
|
73
|
+
export declare function normalizeDiscordMessagingTarget(target: string): string;
|
|
74
|
+
export declare function normalizeDiscordOutboundTarget(target: string): string;
|
|
75
|
+
export declare function resolveDiscordAccount(..._a: any[]): any;
|
|
76
|
+
export declare function resolveDefaultDiscordAccountId(..._a: any[]): string | undefined;
|
|
77
|
+
export declare function collectOpenProviderGroupPolicyWarnings(..._a: any[]): any;
|
|
78
|
+
export declare function collectOpenGroupPolicyConfiguredRouteWarnings(..._a: any[]): any;
|
|
79
|
+
export declare function collectAllowlistProviderRestrictSendersWarnings(..._a: any[]): any;
|
|
80
|
+
export declare function collectAllowlistProviderGroupPolicyWarnings(..._a: any[]): any;
|
|
81
|
+
export declare function collectOpenGroupPolicyRouteAllowlistWarnings(..._a: any[]): any;
|
|
82
|
+
export declare function formatAllowFromLowercase(..._a: any[]): string;
|
|
83
|
+
export declare function formatDocsLink(..._a: any[]): string;
|
|
84
|
+
export declare function projectCredentialSnapshotFields(..._a: any[]): any;
|
|
85
|
+
export declare function resolveConfiguredFromCredentialStatuses(..._a: any[]): any;
|
|
86
|
+
export declare function buildChannelConfigSchema(..._a: any[]): any;
|
|
87
|
+
export declare function buildChannelKeyCandidates(..._a: any[]): any;
|
|
88
|
+
export declare function createAccountListHelpers(..._a: any[]): any;
|
|
89
|
+
export declare function resolveChannelEntryMatch(..._a: any[]): any;
|
|
90
|
+
export declare function resolveChannelMediaMaxBytes(..._a: any[]): any;
|
|
91
|
+
export declare function resolveMentionGatingWithBypass(..._a: any[]): any;
|
|
92
|
+
export declare function mergeAllowlist(..._a: any[]): any;
|
|
93
|
+
export declare function addWildcardAllowFrom(..._a: any[]): any;
|
|
94
|
+
export declare function resolveAllowlistMatchSimple(..._a: any[]): any;
|
|
95
|
+
export declare function readStringParam(..._a: any[]): string | undefined;
|
|
96
|
+
export declare function stringEnum(..._a: any[]): any;
|
|
97
|
+
export declare function jsonResult(..._a: any[]): any;
|
|
98
|
+
export declare function fetchWithSsrFGuard(..._a: any[]): any;
|
|
99
|
+
export declare function isBlockedHostname(..._a: any[]): boolean;
|
|
100
|
+
export declare function isPrivateIpAddress(..._a: any[]): boolean;
|
|
101
|
+
export declare function loadWebMedia(..._a: any[]): any;
|
|
102
|
+
export declare function summarizeMapping(..._a: any[]): string;
|
|
103
|
+
export declare function approveDevicePairing(..._a: any[]): any;
|
|
104
|
+
export declare function listDevicePairing(..._a: any[]): any;
|
|
105
|
+
export declare function emitDiagnosticEvent(..._a: any[]): void;
|
|
106
|
+
export declare function onDiagnosticEvent(..._a: any[]): void;
|
|
107
|
+
export declare function registerLogTransport(..._a: any[]): void;
|
|
108
|
+
export declare function shouldAckReaction(..._a: any[]): boolean;
|
|
109
|
+
export declare function removeAckReactionAfterReply(..._a: any[]): void;
|
|
110
|
+
export declare function withFileLock(..._a: any[]): any;
|
|
42
111
|
//# sourceMappingURL=compat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../src/plugin-sdk/compat.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["../../src/plugin-sdk/compat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGnF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG9E,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AAGjC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACnC,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACnC,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACvC,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACvC,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC;AAChC,MAAM,MAAM,iBAAiB,GAAG;IAAE,OAAO,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,GAAG,CAAA;CAAE,CAAC;AAG9D,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACrC,MAAM,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC;AAC9B,MAAM,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC3C,MAAM,MAAM,sBAAsB,GAAG,GAAG,CAAC;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AG,EAAE,GAAG,IAAI,CAAG;AACxD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;AAG3D,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,OAAO,CAAkB;AAC1E,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAG;AAGlE,wBAAgB,YAAY,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,CAAsB"}
|
|
@@ -1,89 +1,89 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin SDK
|
|
3
|
-
*
|
|
2
|
+
* Pool Bot Plugin SDK - Main Entry Point
|
|
3
|
+
* Re-exports from internal modules for extension compatibility.
|
|
4
4
|
*/
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-explicit-any
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export function
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
export function
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
export function
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
export function
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
export function
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
export function
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
export function
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
export function
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
export function
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
export function
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
export function
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
export function
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
export function
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
export function
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
export function
|
|
88
|
-
|
|
89
|
-
}
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
6
|
+
// Core config schema
|
|
7
|
+
export { emptyPluginConfigSchema } from "../plugins/config-schema.js";
|
|
8
|
+
// Channel registry
|
|
9
|
+
export { getChatChannelMeta } from "../channels/registry.js";
|
|
10
|
+
// Account helpers
|
|
11
|
+
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../routing/session-key.js";
|
|
12
|
+
// Tokens
|
|
13
|
+
export { HEARTBEAT_TOKEN, SILENT_REPLY_TOKEN } from "../auto-reply/tokens.js";
|
|
14
|
+
// Schema types
|
|
15
|
+
export const MarkdownConfigSchema = {};
|
|
16
|
+
export const ToolPolicySchema = {};
|
|
17
|
+
export const GoogleChatConfigSchema = {};
|
|
18
|
+
export const DiscordConfigSchema = {};
|
|
19
|
+
export const TelegramConfigSchema = {};
|
|
20
|
+
export const SlackConfigSchema = {};
|
|
21
|
+
export const SignalConfigSchema = {};
|
|
22
|
+
export const WhatsAppConfigSchema = {};
|
|
23
|
+
export const IMessageConfigSchema = {};
|
|
24
|
+
// Re-exports from plugin SDK submodules
|
|
25
|
+
export { createPluginRuntimeStore } from "./runtime-store.js";
|
|
26
|
+
// Channel config helpers
|
|
27
|
+
export function createScopedChannelConfigBase(..._a) { return {}; }
|
|
28
|
+
export function buildAccountScopedDmSecurityPolicy(..._a) { return {}; }
|
|
29
|
+
export function createScopedAccountConfigAccessors(..._a) { return {}; }
|
|
30
|
+
export function createScopedDmSecurityResolver(..._a) { return {}; }
|
|
31
|
+
// Status helpers
|
|
32
|
+
export function buildComputedAccountStatusSnapshot(..._a) { return {}; }
|
|
33
|
+
export function buildBaseChannelStatusSummary(..._a) { return {}; }
|
|
34
|
+
// Discord helpers
|
|
35
|
+
export function collectDiscordAuditChannelIds(..._a) { return []; }
|
|
36
|
+
export function collectDiscordStatusIssues(..._a) { return []; }
|
|
37
|
+
export function discordOnboardingAdapter(..._a) { return {}; }
|
|
38
|
+
export function inspectDiscordAccount(..._a) { return {}; }
|
|
39
|
+
export function listDiscordAccountIds(..._a) { return []; }
|
|
40
|
+
export function looksLikeDiscordTargetId(..._a) { return false; }
|
|
41
|
+
export function normalizeDiscordMessagingTarget(target) { return target; }
|
|
42
|
+
export function normalizeDiscordOutboundTarget(target) { return target; }
|
|
43
|
+
export function resolveDiscordAccount(..._a) { return undefined; }
|
|
44
|
+
export function resolveDefaultDiscordAccountId(..._a) { return undefined; }
|
|
45
|
+
// Policy warnings
|
|
46
|
+
export function collectOpenProviderGroupPolicyWarnings(..._a) { return []; }
|
|
47
|
+
export function collectOpenGroupPolicyConfiguredRouteWarnings(..._a) { return []; }
|
|
48
|
+
export function collectAllowlistProviderRestrictSendersWarnings(..._a) { return []; }
|
|
49
|
+
export function collectAllowlistProviderGroupPolicyWarnings(..._a) { return []; }
|
|
50
|
+
export function collectOpenGroupPolicyRouteAllowlistWarnings(..._a) { return []; }
|
|
51
|
+
// Formatting helpers
|
|
52
|
+
export function formatAllowFromLowercase(..._a) { return ""; }
|
|
53
|
+
export function formatDocsLink(..._a) { return ""; }
|
|
54
|
+
// Credential helpers
|
|
55
|
+
export function projectCredentialSnapshotFields(..._a) { return {}; }
|
|
56
|
+
export function resolveConfiguredFromCredentialStatuses(..._a) { return {}; }
|
|
57
|
+
// Config helpers
|
|
58
|
+
export function buildChannelConfigSchema(..._a) { return {}; }
|
|
59
|
+
export function buildChannelKeyCandidates(..._a) { return []; }
|
|
60
|
+
export function createAccountListHelpers(..._a) { return {}; }
|
|
61
|
+
export function resolveChannelEntryMatch(..._a) { return {}; }
|
|
62
|
+
export function resolveChannelMediaMaxBytes(..._a) { return 0; }
|
|
63
|
+
export function resolveMentionGatingWithBypass(..._a) { return {}; }
|
|
64
|
+
export function mergeAllowlist(..._a) { return []; }
|
|
65
|
+
export function addWildcardAllowFrom(..._a) { return []; }
|
|
66
|
+
export function resolveAllowlistMatchSimple(..._a) { return {}; }
|
|
67
|
+
// Tool helpers
|
|
68
|
+
export function readStringParam(..._a) { return undefined; }
|
|
69
|
+
export function stringEnum(..._a) { return {}; }
|
|
70
|
+
export function jsonResult(..._a) { return {}; }
|
|
71
|
+
// SSRF / network
|
|
72
|
+
export function fetchWithSsrFGuard(..._a) { return undefined; }
|
|
73
|
+
export function isBlockedHostname(..._a) { return false; }
|
|
74
|
+
export function isPrivateIpAddress(..._a) { return false; }
|
|
75
|
+
export function loadWebMedia(..._a) { return undefined; }
|
|
76
|
+
// Media
|
|
77
|
+
export function summarizeMapping(..._a) { return ""; }
|
|
78
|
+
// Pairing
|
|
79
|
+
export function approveDevicePairing(..._a) { return {}; }
|
|
80
|
+
export function listDevicePairing(..._a) { return []; }
|
|
81
|
+
// Diagnostics
|
|
82
|
+
export function emitDiagnosticEvent(..._a) { }
|
|
83
|
+
export function onDiagnosticEvent(..._a) { }
|
|
84
|
+
export function registerLogTransport(..._a) { }
|
|
85
|
+
// Reactions
|
|
86
|
+
export function shouldAckReaction(..._a) { return false; }
|
|
87
|
+
export function removeAckReactionAfterReply(..._a) { }
|
|
88
|
+
// Locking
|
|
89
|
+
export function withFileLock(..._a) { return undefined; }
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export declare function createPluginRuntimeStore(
|
|
2
|
-
|
|
1
|
+
export declare function createPluginRuntimeStore<T = any>(_name?: string): {
|
|
2
|
+
setRuntime: (r: T) => void;
|
|
3
|
+
getRuntime: () => T;
|
|
4
|
+
};
|
|
5
|
+
export declare function getPluginRuntimeStore(..._a: any[]): any;
|
|
3
6
|
//# sourceMappingURL=runtime-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-store.d.ts","sourceRoot":"","sources":["../../src/plugin-sdk/runtime-store.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,GAAG,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"runtime-store.d.ts","sourceRoot":"","sources":["../../src/plugin-sdk/runtime-store.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,CAAC,GAAG,GAAG,EAC9C,KAAK,CAAC,EAAE,MAAM,GACb;IAAE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC,CAAA;CAAE,CAYrD;AACD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,EAAE,GAAG,EAAE,GAAG,GAAG,CAEvD"}
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
export function createPluginRuntimeStore(
|
|
2
|
-
|
|
1
|
+
export function createPluginRuntimeStore(_name) {
|
|
2
|
+
let runtime = undefined;
|
|
3
|
+
return {
|
|
4
|
+
setRuntime: (r) => {
|
|
5
|
+
runtime = r;
|
|
6
|
+
},
|
|
7
|
+
getRuntime: () => runtime ??
|
|
8
|
+
(() => {
|
|
9
|
+
throw new Error("Runtime not initialized");
|
|
10
|
+
})(),
|
|
11
|
+
};
|
|
3
12
|
}
|
|
4
|
-
export function getPluginRuntimeStore(...
|
|
13
|
+
export function getPluginRuntimeStore(..._a) {
|
|
5
14
|
return undefined;
|
|
6
15
|
}
|