beecork 1.7.1 → 2.0.0
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 +52 -111
- package/dist/index.js +1394 -581
- package/package.json +26 -54
- package/dist/capabilities/index.d.ts +0 -3
- package/dist/capabilities/index.js +0 -2
- package/dist/capabilities/manager.d.ts +0 -13
- package/dist/capabilities/manager.js +0 -115
- package/dist/capabilities/packs.d.ts +0 -2
- package/dist/capabilities/packs.js +0 -54
- package/dist/capabilities/types.d.ts +0 -21
- package/dist/capabilities/types.js +0 -1
- package/dist/channels/admin.d.ts +0 -10
- package/dist/channels/admin.js +0 -20
- package/dist/channels/command-handler.d.ts +0 -19
- package/dist/channels/command-handler.js +0 -235
- package/dist/channels/discord.d.ts +0 -17
- package/dist/channels/discord.js +0 -266
- package/dist/channels/index.d.ts +0 -7
- package/dist/channels/index.js +0 -6
- package/dist/channels/loader.d.ts +0 -7
- package/dist/channels/loader.js +0 -87
- package/dist/channels/pipeline.d.ts +0 -50
- package/dist/channels/pipeline.js +0 -92
- package/dist/channels/registry.d.ts +0 -36
- package/dist/channels/registry.js +0 -80
- package/dist/channels/send-helpers.d.ts +0 -19
- package/dist/channels/send-helpers.js +0 -21
- package/dist/channels/telegram.d.ts +0 -47
- package/dist/channels/telegram.js +0 -649
- package/dist/channels/types.d.ts +0 -41
- package/dist/channels/types.js +0 -1
- package/dist/channels/voice-state.d.ts +0 -29
- package/dist/channels/voice-state.js +0 -45
- package/dist/channels/webhook.d.ts +0 -16
- package/dist/channels/webhook.js +0 -222
- package/dist/channels/whatsapp.d.ts +0 -28
- package/dist/channels/whatsapp.js +0 -323
- package/dist/cli/capabilities.d.ts +0 -3
- package/dist/cli/capabilities.js +0 -72
- package/dist/cli/channel.d.ts +0 -3
- package/dist/cli/channel.js +0 -202
- package/dist/cli/commands.d.ts +0 -15
- package/dist/cli/commands.js +0 -279
- package/dist/cli/doctor.d.ts +0 -1
- package/dist/cli/doctor.js +0 -208
- package/dist/cli/handoff.d.ts +0 -8
- package/dist/cli/handoff.js +0 -33
- package/dist/cli/helpers.d.ts +0 -2
- package/dist/cli/helpers.js +0 -21
- package/dist/cli/mcp.d.ts +0 -3
- package/dist/cli/mcp.js +0 -47
- package/dist/cli/media.d.ts +0 -2
- package/dist/cli/media.js +0 -125
- package/dist/cli/setup.d.ts +0 -1
- package/dist/cli/setup.js +0 -239
- package/dist/cli/store.d.ts +0 -3
- package/dist/cli/store.js +0 -108
- package/dist/config.d.ts +0 -11
- package/dist/config.js +0 -115
- package/dist/cron/scheduler.d.ts +0 -22
- package/dist/cron/scheduler.js +0 -220
- package/dist/cron/store.d.ts +0 -12
- package/dist/cron/store.js +0 -83
- package/dist/daemon.d.ts +0 -1
- package/dist/daemon.js +0 -345
- package/dist/dashboard/html.d.ts +0 -1
- package/dist/dashboard/html.js +0 -849
- package/dist/dashboard/routes.d.ts +0 -17
- package/dist/dashboard/routes.js +0 -623
- package/dist/dashboard/server.d.ts +0 -1
- package/dist/dashboard/server.js +0 -104
- package/dist/db/connection.d.ts +0 -29
- package/dist/db/connection.js +0 -37
- package/dist/db/index.d.ts +0 -14
- package/dist/db/index.js +0 -127
- package/dist/db/migrations.d.ts +0 -2
- package/dist/db/migrations.js +0 -384
- package/dist/delegation/manager.d.ts +0 -18
- package/dist/delegation/manager.js +0 -89
- package/dist/index.d.ts +0 -2
- package/dist/knowledge/index.d.ts +0 -2
- package/dist/knowledge/index.js +0 -1
- package/dist/knowledge/manager.d.ts +0 -17
- package/dist/knowledge/manager.js +0 -160
- package/dist/knowledge/types.d.ts +0 -7
- package/dist/knowledge/types.js +0 -1
- package/dist/machines/forwarder.d.ts +0 -7
- package/dist/machines/forwarder.js +0 -35
- package/dist/machines/index.d.ts +0 -1
- package/dist/machines/index.js +0 -1
- package/dist/machines/registry.d.ts +0 -15
- package/dist/machines/registry.js +0 -46
- package/dist/mcp/handlers.d.ts +0 -37
- package/dist/mcp/handlers.js +0 -520
- package/dist/mcp/server.d.ts +0 -2
- package/dist/mcp/server.js +0 -86
- package/dist/mcp/tool-definitions.d.ts +0 -1225
- package/dist/mcp/tool-definitions.js +0 -412
- package/dist/mcp/validate.d.ts +0 -23
- package/dist/mcp/validate.js +0 -65
- package/dist/media/factory.d.ts +0 -6
- package/dist/media/factory.js +0 -36
- package/dist/media/generators/dall-e.d.ts +0 -10
- package/dist/media/generators/dall-e.js +0 -41
- package/dist/media/generators/elevenlabs-music.d.ts +0 -9
- package/dist/media/generators/elevenlabs-music.js +0 -34
- package/dist/media/generators/elevenlabs-sfx.d.ts +0 -9
- package/dist/media/generators/elevenlabs-sfx.js +0 -33
- package/dist/media/generators/kling.d.ts +0 -9
- package/dist/media/generators/kling.js +0 -47
- package/dist/media/generators/lyria.d.ts +0 -10
- package/dist/media/generators/lyria.js +0 -41
- package/dist/media/generators/nano-banana.d.ts +0 -10
- package/dist/media/generators/nano-banana.js +0 -45
- package/dist/media/generators/poll-util.d.ts +0 -12
- package/dist/media/generators/poll-util.js +0 -22
- package/dist/media/generators/recraft.d.ts +0 -9
- package/dist/media/generators/recraft.js +0 -52
- package/dist/media/generators/runway.d.ts +0 -9
- package/dist/media/generators/runway.js +0 -49
- package/dist/media/generators/stable-diffusion.d.ts +0 -9
- package/dist/media/generators/stable-diffusion.js +0 -35
- package/dist/media/generators/veo.d.ts +0 -9
- package/dist/media/generators/veo.js +0 -32
- package/dist/media/index.d.ts +0 -6
- package/dist/media/index.js +0 -8
- package/dist/media/loader.d.ts +0 -8
- package/dist/media/loader.js +0 -46
- package/dist/media/store.d.ts +0 -17
- package/dist/media/store.js +0 -69
- package/dist/media/types.d.ts +0 -43
- package/dist/media/types.js +0 -1
- package/dist/memory/extractor.d.ts +0 -5
- package/dist/memory/extractor.js +0 -157
- package/dist/notifications/index.d.ts +0 -4
- package/dist/notifications/index.js +0 -21
- package/dist/notifications/ntfy.d.ts +0 -9
- package/dist/notifications/ntfy.js +0 -25
- package/dist/notifications/pushover.d.ts +0 -9
- package/dist/notifications/pushover.js +0 -26
- package/dist/notifications/types.d.ts +0 -5
- package/dist/notifications/types.js +0 -1
- package/dist/notifications/webhook-provider.d.ts +0 -9
- package/dist/notifications/webhook-provider.js +0 -24
- package/dist/observability/analytics.d.ts +0 -30
- package/dist/observability/analytics.js +0 -118
- package/dist/pipe/anthropic-client.d.ts +0 -9
- package/dist/pipe/anthropic-client.js +0 -50
- package/dist/pipe/brain.d.ts +0 -16
- package/dist/pipe/brain.js +0 -89
- package/dist/pipe/memory-store.d.ts +0 -8
- package/dist/pipe/memory-store.js +0 -39
- package/dist/pipe/project-scanner.d.ts +0 -6
- package/dist/pipe/project-scanner.js +0 -26
- package/dist/pipe/types.d.ts +0 -34
- package/dist/pipe/types.js +0 -1
- package/dist/projects/index.d.ts +0 -4
- package/dist/projects/index.js +0 -2
- package/dist/projects/manager.d.ts +0 -13
- package/dist/projects/manager.js +0 -166
- package/dist/projects/router.d.ts +0 -17
- package/dist/projects/router.js +0 -246
- package/dist/projects/types.d.ts +0 -19
- package/dist/projects/types.js +0 -1
- package/dist/service/install.d.ts +0 -4
- package/dist/service/install.js +0 -146
- package/dist/service/templates.d.ts +0 -4
- package/dist/service/templates.js +0 -52
- package/dist/service/windows.d.ts +0 -8
- package/dist/service/windows.js +0 -59
- package/dist/session/budget-guard.d.ts +0 -20
- package/dist/session/budget-guard.js +0 -31
- package/dist/session/circuit-breaker.d.ts +0 -19
- package/dist/session/circuit-breaker.js +0 -91
- package/dist/session/context-compactor.d.ts +0 -32
- package/dist/session/context-compactor.js +0 -45
- package/dist/session/context-monitor.d.ts +0 -15
- package/dist/session/context-monitor.js +0 -44
- package/dist/session/handoff.d.ts +0 -21
- package/dist/session/handoff.js +0 -50
- package/dist/session/manager.d.ts +0 -60
- package/dist/session/manager.js +0 -416
- package/dist/session/memory-store.d.ts +0 -29
- package/dist/session/memory-store.js +0 -45
- package/dist/session/message-queue.d.ts +0 -28
- package/dist/session/message-queue.js +0 -52
- package/dist/session/pending-dispatcher.d.ts +0 -31
- package/dist/session/pending-dispatcher.js +0 -120
- package/dist/session/pending-store.d.ts +0 -60
- package/dist/session/pending-store.js +0 -118
- package/dist/session/stale-session.d.ts +0 -31
- package/dist/session/stale-session.js +0 -45
- package/dist/session/subprocess.d.ts +0 -32
- package/dist/session/subprocess.js +0 -230
- package/dist/session/tab-store.d.ts +0 -28
- package/dist/session/tab-store.js +0 -78
- package/dist/session/tool-classifier.d.ts +0 -4
- package/dist/session/tool-classifier.js +0 -56
- package/dist/tasks/scheduler.d.ts +0 -45
- package/dist/tasks/scheduler.js +0 -329
- package/dist/tasks/store.d.ts +0 -11
- package/dist/tasks/store.js +0 -103
- package/dist/timeline/index.d.ts +0 -3
- package/dist/timeline/index.js +0 -2
- package/dist/timeline/logger.d.ts +0 -8
- package/dist/timeline/logger.js +0 -11
- package/dist/timeline/query.d.ts +0 -11
- package/dist/timeline/query.js +0 -67
- package/dist/timeline/types.d.ts +0 -12
- package/dist/timeline/types.js +0 -1
- package/dist/types.d.ts +0 -225
- package/dist/types.js +0 -3
- package/dist/users/index.d.ts +0 -2
- package/dist/users/index.js +0 -1
- package/dist/users/service.d.ts +0 -17
- package/dist/users/service.js +0 -46
- package/dist/util/auto-heal.d.ts +0 -43
- package/dist/util/auto-heal.js +0 -107
- package/dist/util/install-info.d.ts +0 -37
- package/dist/util/install-info.js +0 -80
- package/dist/util/logger.d.ts +0 -18
- package/dist/util/logger.js +0 -118
- package/dist/util/paths.d.ts +0 -13
- package/dist/util/paths.js +0 -55
- package/dist/util/platform.d.ts +0 -2
- package/dist/util/platform.js +0 -11
- package/dist/util/progress.d.ts +0 -34
- package/dist/util/progress.js +0 -133
- package/dist/util/rate-limiter.d.ts +0 -14
- package/dist/util/rate-limiter.js +0 -50
- package/dist/util/retry.d.ts +0 -2
- package/dist/util/retry.js +0 -18
- package/dist/util/text.d.ts +0 -32
- package/dist/util/text.js +0 -101
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -4
- package/dist/voice/index.d.ts +0 -17
- package/dist/voice/index.js +0 -42
- package/dist/voice/stt.d.ts +0 -16
- package/dist/voice/stt.js +0 -57
- package/dist/voice/tts.d.ts +0 -23
- package/dist/voice/tts.js +0 -84
- package/dist/watchers/evaluator.d.ts +0 -5
- package/dist/watchers/evaluator.js +0 -45
- package/dist/watchers/index.d.ts +0 -4
- package/dist/watchers/index.js +0 -3
- package/dist/watchers/scheduler.d.ts +0 -20
- package/dist/watchers/scheduler.js +0 -183
- package/dist/watchers/store.d.ts +0 -10
- package/dist/watchers/store.js +0 -56
- package/dist/watchers/types.d.ts +0 -15
- package/dist/watchers/types.js +0 -1
- package/scripts/postinstall.mjs +0 -50
package/dist/cli/media.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import readline from 'node:readline';
|
|
2
|
-
function ask(rl, question, defaultValue) {
|
|
3
|
-
const prompt = defaultValue ? `${question} [${defaultValue}]: ` : `${question}: `;
|
|
4
|
-
return new Promise((r) => rl.question(prompt, (a) => r(a.trim() || defaultValue || '')));
|
|
5
|
-
}
|
|
6
|
-
const IMAGE_PROVIDERS = [
|
|
7
|
-
{
|
|
8
|
-
id: 'nano-banana',
|
|
9
|
-
name: 'Google Nano Banana',
|
|
10
|
-
keyHint: 'Google AI API key (from ai.google.dev)',
|
|
11
|
-
},
|
|
12
|
-
{ id: 'dall-e', name: 'DALL-E (OpenAI)', keyHint: 'OpenAI API key (sk-...)' },
|
|
13
|
-
{
|
|
14
|
-
id: 'stable-diffusion',
|
|
15
|
-
name: 'Stable Diffusion (Stability AI)',
|
|
16
|
-
keyHint: 'Stability AI API key',
|
|
17
|
-
},
|
|
18
|
-
{ id: 'recraft', name: 'Recraft (Images + SVG Vectors)', keyHint: 'Recraft API key' },
|
|
19
|
-
];
|
|
20
|
-
const VIDEO_PROVIDERS = [
|
|
21
|
-
{ id: 'runway', name: 'Runway Gen-3', keyHint: 'Runway API key' },
|
|
22
|
-
{ id: 'veo', name: 'Google Veo', keyHint: 'Google AI API key' },
|
|
23
|
-
{ id: 'kling', name: 'Kling AI', keyHint: 'Kling API key' },
|
|
24
|
-
];
|
|
25
|
-
const AUDIO_PROVIDERS = [
|
|
26
|
-
{ id: 'elevenlabs-music', name: 'ElevenLabs Music', keyHint: 'ElevenLabs API key (xi-...)' },
|
|
27
|
-
{ id: 'lyria', name: 'Google Lyria (Music)', keyHint: 'Google AI API key (from ai.google.dev)' },
|
|
28
|
-
{
|
|
29
|
-
id: 'elevenlabs-sfx',
|
|
30
|
-
name: 'ElevenLabs Sound Effects',
|
|
31
|
-
keyHint: 'ElevenLabs API key (xi-...)',
|
|
32
|
-
},
|
|
33
|
-
];
|
|
34
|
-
export async function mediaSetup() {
|
|
35
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
36
|
-
const { getConfig, saveConfig } = await import('../config.js');
|
|
37
|
-
const config = getConfig();
|
|
38
|
-
const generators = config.mediaGenerators || [];
|
|
39
|
-
console.log('\nMedia Generation Setup\n');
|
|
40
|
-
console.log('Configure AI providers for generating images, videos, and audio.');
|
|
41
|
-
console.log('You need API keys from each provider.\n');
|
|
42
|
-
console.log('Already configured: ' +
|
|
43
|
-
(generators.length > 0 ? generators.map((g) => g.provider).join(', ') : 'none'));
|
|
44
|
-
console.log('');
|
|
45
|
-
// Image providers
|
|
46
|
-
console.log('Image Generation:');
|
|
47
|
-
for (let i = 0; i < IMAGE_PROVIDERS.length; i++) {
|
|
48
|
-
console.log(` ${i + 1}) ${IMAGE_PROVIDERS[i].name}`);
|
|
49
|
-
}
|
|
50
|
-
const imgChoice = await ask(rl, 'Add image provider? (number or Enter to skip)');
|
|
51
|
-
if (imgChoice) {
|
|
52
|
-
const idx = parseInt(imgChoice) - 1;
|
|
53
|
-
if (idx >= 0 && idx < IMAGE_PROVIDERS.length) {
|
|
54
|
-
const provider = IMAGE_PROVIDERS[idx];
|
|
55
|
-
const apiKey = await ask(rl, ` ${provider.keyHint}`);
|
|
56
|
-
if (apiKey) {
|
|
57
|
-
// Remove existing same provider if any
|
|
58
|
-
const filtered = generators.filter((g) => g.provider !== provider.id);
|
|
59
|
-
filtered.push({ provider: provider.id, apiKey });
|
|
60
|
-
generators.length = 0;
|
|
61
|
-
generators.push(...filtered);
|
|
62
|
-
console.log(` ✓ ${provider.name} configured\n`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// Video providers
|
|
67
|
-
console.log('\nVideo Generation:');
|
|
68
|
-
for (let i = 0; i < VIDEO_PROVIDERS.length; i++) {
|
|
69
|
-
console.log(` ${i + 1}) ${VIDEO_PROVIDERS[i].name}`);
|
|
70
|
-
}
|
|
71
|
-
const vidChoice = await ask(rl, 'Add video provider? (number or Enter to skip)');
|
|
72
|
-
if (vidChoice) {
|
|
73
|
-
const idx = parseInt(vidChoice) - 1;
|
|
74
|
-
if (idx >= 0 && idx < VIDEO_PROVIDERS.length) {
|
|
75
|
-
const provider = VIDEO_PROVIDERS[idx];
|
|
76
|
-
const apiKey = await ask(rl, ` ${provider.keyHint}`);
|
|
77
|
-
if (apiKey) {
|
|
78
|
-
const filtered = generators.filter((g) => g.provider !== provider.id);
|
|
79
|
-
filtered.push({ provider: provider.id, apiKey });
|
|
80
|
-
generators.length = 0;
|
|
81
|
-
generators.push(...filtered);
|
|
82
|
-
console.log(` ✓ ${provider.name} configured\n`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
// Audio providers
|
|
87
|
-
console.log('\nAudio/Music Generation:');
|
|
88
|
-
for (let i = 0; i < AUDIO_PROVIDERS.length; i++) {
|
|
89
|
-
console.log(` ${i + 1}) ${AUDIO_PROVIDERS[i].name}`);
|
|
90
|
-
}
|
|
91
|
-
const audChoice = await ask(rl, 'Add audio provider? (number or Enter to skip)');
|
|
92
|
-
if (audChoice) {
|
|
93
|
-
const idx = parseInt(audChoice) - 1;
|
|
94
|
-
if (idx >= 0 && idx < AUDIO_PROVIDERS.length) {
|
|
95
|
-
const provider = AUDIO_PROVIDERS[idx];
|
|
96
|
-
const apiKey = await ask(rl, ` ${provider.keyHint}`);
|
|
97
|
-
if (apiKey) {
|
|
98
|
-
const filtered = generators.filter((g) => g.provider !== provider.id);
|
|
99
|
-
filtered.push({ provider: provider.id, apiKey });
|
|
100
|
-
generators.length = 0;
|
|
101
|
-
generators.push(...filtered);
|
|
102
|
-
console.log(` ✓ ${provider.name} configured\n`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
config.mediaGenerators = generators;
|
|
107
|
-
saveConfig(config);
|
|
108
|
-
console.log(`\n✓ ${generators.length} media provider(s) configured.`);
|
|
109
|
-
console.log('Restart daemon to activate: beecork stop && beecork start\n');
|
|
110
|
-
rl.close();
|
|
111
|
-
}
|
|
112
|
-
export async function mediaList() {
|
|
113
|
-
const { getConfig } = await import('../config.js');
|
|
114
|
-
const config = getConfig();
|
|
115
|
-
const generators = config.mediaGenerators || [];
|
|
116
|
-
if (generators.length === 0) {
|
|
117
|
-
console.log('No media generators configured. Run: beecork media');
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
console.log(`\n${generators.length} media provider(s):\n`);
|
|
121
|
-
for (const g of generators) {
|
|
122
|
-
console.log(` ${g.provider}${g.model ? ` (${g.model})` : ''} — API key: ${g.apiKey?.slice(0, 8) ?? '(none)'}...`);
|
|
123
|
-
}
|
|
124
|
-
console.log('');
|
|
125
|
-
}
|
package/dist/cli/setup.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function setupWizard(): Promise<void>;
|
package/dist/cli/setup.js
DELETED
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
import readline from 'node:readline';
|
|
2
|
-
import { execSync } from 'node:child_process';
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import os from 'node:os';
|
|
6
|
-
import { saveConfig, getConfig } from '../config.js';
|
|
7
|
-
import { ensureBeecorkDirs, getMcpConfigPath, getBeecorkHome } from '../util/paths.js';
|
|
8
|
-
import { installService } from '../service/install.js';
|
|
9
|
-
import { getDb, closeDb } from '../db/index.js';
|
|
10
|
-
function ask(rl, question, defaultValue) {
|
|
11
|
-
const prompt = defaultValue ? `${question} [${defaultValue}]: ` : `${question}: `;
|
|
12
|
-
return new Promise((resolve) => {
|
|
13
|
-
rl.question(prompt, (answer) => {
|
|
14
|
-
resolve(answer.trim() || defaultValue || '');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function findClaudeBin() {
|
|
19
|
-
try {
|
|
20
|
-
const cmd = process.platform === 'win32' ? 'where claude' : 'which claude';
|
|
21
|
-
return execSync(cmd, { encoding: 'utf-8' }).trim().split('\n')[0];
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return 'claude';
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
export async function setupWizard() {
|
|
28
|
-
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
29
|
-
console.log('\n🔧 Beecork Setup\n');
|
|
30
|
-
console.log('This wizard will configure Beecork to make Claude Code always-on.\n');
|
|
31
|
-
try {
|
|
32
|
-
// 0. Auto-detect Claude Code
|
|
33
|
-
let claudeCodeMissing = false;
|
|
34
|
-
console.log('Checking prerequisites...\n');
|
|
35
|
-
try {
|
|
36
|
-
const version = execSync('claude --version 2>&1', { encoding: 'utf-8' }).trim();
|
|
37
|
-
console.log(` ✓ Claude Code found: ${version}`);
|
|
38
|
-
}
|
|
39
|
-
catch {
|
|
40
|
-
claudeCodeMissing = true;
|
|
41
|
-
console.log(' ✗ Claude Code is not installed yet.');
|
|
42
|
-
console.log('');
|
|
43
|
-
console.log(' Claude Code is the AI brain that Beecork connects to.');
|
|
44
|
-
console.log(' You need a Claude Pro or Max subscription ($20/month) from anthropic.com');
|
|
45
|
-
console.log(' Then install it: npm install -g @anthropic-ai/claude-code');
|
|
46
|
-
console.log('');
|
|
47
|
-
console.log(' You can continue setup now and install Claude Code afterwards.');
|
|
48
|
-
console.log(' Beecork will remind you at the end.');
|
|
49
|
-
console.log('');
|
|
50
|
-
console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md#prerequisites');
|
|
51
|
-
}
|
|
52
|
-
console.log('');
|
|
53
|
-
// 1. Telegram token with step-by-step instructions
|
|
54
|
-
console.log('Step 1: Create a Telegram Bot');
|
|
55
|
-
console.log('');
|
|
56
|
-
console.log(' A Telegram bot is your personal AI phone number.');
|
|
57
|
-
console.log(' Only you can talk to it — nobody else can access your Claude.');
|
|
58
|
-
console.log('');
|
|
59
|
-
console.log(' How to create one:');
|
|
60
|
-
console.log(' 1. Open Telegram on your phone');
|
|
61
|
-
console.log(' 2. Search for @BotFather (it has a blue checkmark)');
|
|
62
|
-
console.log(' 3. Tap "Start" and then send: /newbot');
|
|
63
|
-
console.log(' 4. Choose a display name (e.g., "My Beecork")');
|
|
64
|
-
console.log(' 5. Choose a username ending in "bot" (e.g., "mybeecork_bot")');
|
|
65
|
-
console.log(' 6. BotFather will reply with a token — copy it');
|
|
66
|
-
console.log('');
|
|
67
|
-
console.log(' Detailed guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
|
|
68
|
-
let token = '';
|
|
69
|
-
while (!token) {
|
|
70
|
-
token = await ask(rl, 'Paste your Telegram Bot token');
|
|
71
|
-
if (!token) {
|
|
72
|
-
console.log('Telegram token is required. Get one from @BotFather on Telegram.');
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
// Validate token by calling getMe
|
|
76
|
-
try {
|
|
77
|
-
const resp = await fetch(`https://api.telegram.org/bot${token}/getMe`, {
|
|
78
|
-
signal: AbortSignal.timeout(10000),
|
|
79
|
-
});
|
|
80
|
-
if (resp.ok) {
|
|
81
|
-
const data = (await resp.json());
|
|
82
|
-
console.log(` ✓ Connected to bot: @${data.result.username}\n`);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
console.log(' ✗ Invalid token. Please check and try again.\n');
|
|
86
|
-
token = '';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
console.log(' \u26A0 Could not verify token (network error). Continuing anyway.\n');
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// 2. Telegram user ID
|
|
94
|
-
console.log('Step 2: Find your Telegram User ID');
|
|
95
|
-
console.log('');
|
|
96
|
-
console.log(' Your user ID tells Beecork who is allowed to use the bot.');
|
|
97
|
-
console.log(' Without it, anyone who finds your bot could use your Claude.');
|
|
98
|
-
console.log('');
|
|
99
|
-
console.log(' How to find it:');
|
|
100
|
-
console.log(' 1. Search for @userinfobot on Telegram');
|
|
101
|
-
console.log(' 2. Tap "Start" and send it any message');
|
|
102
|
-
console.log(' 3. It replies with your user ID (a number like 123456789)');
|
|
103
|
-
console.log('');
|
|
104
|
-
console.log(' Detailed guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md\n');
|
|
105
|
-
const userIdStr = await ask(rl, 'Your Telegram user ID');
|
|
106
|
-
const userId = parseInt(userIdStr, 10);
|
|
107
|
-
if (isNaN(userId)) {
|
|
108
|
-
console.log('Invalid user ID. Must be a number.');
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
const claudeBin = findClaudeBin();
|
|
112
|
-
const defaultDir = os.homedir();
|
|
113
|
-
const scanPaths = ['~/Coding', '~/Projects', '~/code', '~/dev'];
|
|
114
|
-
// Build config
|
|
115
|
-
const config = {
|
|
116
|
-
...getConfig(),
|
|
117
|
-
telegram: {
|
|
118
|
-
token,
|
|
119
|
-
allowedUserIds: [userId],
|
|
120
|
-
},
|
|
121
|
-
claudeCode: {
|
|
122
|
-
bin: claudeBin,
|
|
123
|
-
defaultFlags: ['--dangerously-skip-permissions'],
|
|
124
|
-
computerUse: false,
|
|
125
|
-
},
|
|
126
|
-
tabs: {
|
|
127
|
-
default: {
|
|
128
|
-
workingDir: defaultDir,
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
memory: {
|
|
132
|
-
dbPath: '~/.beecork/memory.db',
|
|
133
|
-
},
|
|
134
|
-
projectScanPaths: scanPaths,
|
|
135
|
-
deployment: 'local',
|
|
136
|
-
};
|
|
137
|
-
// Write everything
|
|
138
|
-
ensureBeecorkDirs();
|
|
139
|
-
saveConfig(config);
|
|
140
|
-
console.log(`\n✓ Config saved to ${getBeecorkHome()}/config.json`);
|
|
141
|
-
// Initialize database
|
|
142
|
-
getDb();
|
|
143
|
-
closeDb();
|
|
144
|
-
console.log('✓ Database initialized');
|
|
145
|
-
// Generate MCP config
|
|
146
|
-
generateMcpConfig();
|
|
147
|
-
console.log(`✓ MCP config generated at ${getMcpConfigPath()}`);
|
|
148
|
-
// Discover projects on disk
|
|
149
|
-
{
|
|
150
|
-
const { discoverProjects } = await import('../projects/index.js');
|
|
151
|
-
const projects = discoverProjects(config.projectScanPaths);
|
|
152
|
-
console.log(`✓ Discovered ${projects.length} projects`);
|
|
153
|
-
closeDb();
|
|
154
|
-
}
|
|
155
|
-
// Install service
|
|
156
|
-
{
|
|
157
|
-
try {
|
|
158
|
-
const servicePath = installService();
|
|
159
|
-
console.log(`✓ Service installed at ${servicePath}`);
|
|
160
|
-
}
|
|
161
|
-
catch (err) {
|
|
162
|
-
console.log(`⚠ Service install failed: ${err instanceof Error ? err.message : err}`);
|
|
163
|
-
console.log(' You can start beecork manually with: beecork start');
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
console.log('\n✅ Setup complete!\n');
|
|
167
|
-
if (claudeCodeMissing) {
|
|
168
|
-
console.log(' ⚠️ IMPORTANT: Install Claude Code before starting the daemon:');
|
|
169
|
-
console.log('');
|
|
170
|
-
console.log(' npm install -g @anthropic-ai/claude-code');
|
|
171
|
-
console.log('');
|
|
172
|
-
console.log(' You also need a Claude Pro or Max subscription ($20/month).');
|
|
173
|
-
console.log(' Sign up at: https://claude.ai');
|
|
174
|
-
console.log(' Guide: https://github.com/beecork/beecork/blob/main/docs/getting-started.md#prerequisites');
|
|
175
|
-
console.log('');
|
|
176
|
-
}
|
|
177
|
-
console.log(' Next steps:');
|
|
178
|
-
console.log(' 1. Start the daemon: beecork start');
|
|
179
|
-
console.log(' 2. Send a message to your Telegram bot');
|
|
180
|
-
console.log(' 3. Check status: beecork status');
|
|
181
|
-
console.log('');
|
|
182
|
-
console.log(' Useful commands:');
|
|
183
|
-
console.log(' beecork doctor — check if everything is working');
|
|
184
|
-
console.log(' beecork dashboard — open web control panel');
|
|
185
|
-
console.log(' beecork quickstart — full getting-started checklist');
|
|
186
|
-
console.log('');
|
|
187
|
-
console.log(' Add more channels:');
|
|
188
|
-
console.log(' beecork whatsapp — connect WhatsApp');
|
|
189
|
-
console.log(' beecork discord — connect Discord');
|
|
190
|
-
console.log(' beecork webhook — enable webhook API');
|
|
191
|
-
console.log('');
|
|
192
|
-
console.log(' Add more features:');
|
|
193
|
-
console.log(' beecork media setup — image, video, audio generation');
|
|
194
|
-
console.log(' beecork enable github — repos, PRs, issues');
|
|
195
|
-
console.log(' beecork enable notion — pages, databases, notes');
|
|
196
|
-
console.log(' beecork computer-use enable — mouse, keyboard, screen control');
|
|
197
|
-
console.log('');
|
|
198
|
-
console.log(' Need help? https://github.com/beecork/beecork/blob/main/docs/troubleshooting.md\n');
|
|
199
|
-
}
|
|
200
|
-
finally {
|
|
201
|
-
rl.close();
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
function generateMcpConfig() {
|
|
205
|
-
// Find the MCP server path
|
|
206
|
-
const distDir = path.dirname(new URL(import.meta.url).pathname);
|
|
207
|
-
// In dist: cli/setup.js -> ../mcp/server.js
|
|
208
|
-
const mcpServerPath = path.resolve(distDir, '..', 'mcp', 'server.js');
|
|
209
|
-
// For development (tsx), use the src path
|
|
210
|
-
const srcMcpPath = path.resolve(distDir, '..', 'mcp', 'server.ts');
|
|
211
|
-
let serverCommand;
|
|
212
|
-
let serverArgs;
|
|
213
|
-
if (fs.existsSync(mcpServerPath)) {
|
|
214
|
-
serverCommand = 'node';
|
|
215
|
-
serverArgs = [mcpServerPath];
|
|
216
|
-
}
|
|
217
|
-
else if (fs.existsSync(srcMcpPath)) {
|
|
218
|
-
// Development mode: use tsx
|
|
219
|
-
serverCommand = 'npx';
|
|
220
|
-
serverArgs = ['tsx', srcMcpPath];
|
|
221
|
-
}
|
|
222
|
-
else {
|
|
223
|
-
// Fallback: assume global install
|
|
224
|
-
serverCommand = 'node';
|
|
225
|
-
serverArgs = [mcpServerPath];
|
|
226
|
-
}
|
|
227
|
-
const mcpConfig = {
|
|
228
|
-
mcpServers: {
|
|
229
|
-
beecork: {
|
|
230
|
-
command: serverCommand,
|
|
231
|
-
args: serverArgs,
|
|
232
|
-
env: {
|
|
233
|
-
BEECORK_HOME: getBeecorkHome(),
|
|
234
|
-
},
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
};
|
|
238
|
-
fs.writeFileSync(getMcpConfigPath(), JSON.stringify(mcpConfig, null, 2) + '\n', { mode: 0o600 });
|
|
239
|
-
}
|
package/dist/cli/store.d.ts
DELETED
package/dist/cli/store.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { execFileSync } from 'node:child_process';
|
|
2
|
-
const BEECORK_PREFIXES = [
|
|
3
|
-
'beecork-capability-',
|
|
4
|
-
'beecork-media-',
|
|
5
|
-
'beecork-channel-',
|
|
6
|
-
'beecork-watcher-',
|
|
7
|
-
];
|
|
8
|
-
const SAFE_NPM_PACKAGE = /^[@a-zA-Z0-9_/.-]+$/;
|
|
9
|
-
export async function storeSearch(query) {
|
|
10
|
-
console.log(`\nSearching for "${query}"...\n`);
|
|
11
|
-
try {
|
|
12
|
-
// Search npm registry for beecork packages
|
|
13
|
-
const response = await fetch(`https://registry.npmjs.org/-/v1/search?text=beecork+${encodeURIComponent(query)}&size=20`, { signal: AbortSignal.timeout(10000) });
|
|
14
|
-
if (!response.ok) {
|
|
15
|
-
console.log('Failed to search npm registry. Try: npm search beecork');
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const data = (await response.json());
|
|
19
|
-
const packages = data.objects.filter((o) => BEECORK_PREFIXES.some((p) => o.package.name.startsWith(p)));
|
|
20
|
-
if (packages.length === 0) {
|
|
21
|
-
console.log(`No beecork packages found for "${query}".`);
|
|
22
|
-
console.log('Community packages use naming convention: beecork-capability-*, beecork-media-*, beecork-channel-*');
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
console.log(`${packages.length} package(s) found:\n`);
|
|
26
|
-
for (const pkg of packages) {
|
|
27
|
-
const p = pkg.package;
|
|
28
|
-
const type = BEECORK_PREFIXES.find((prefix) => p.name.startsWith(prefix))
|
|
29
|
-
?.replace('beecork-', '')
|
|
30
|
-
.replace('-', '') || '';
|
|
31
|
-
console.log(` ${p.name}@${p.version}`);
|
|
32
|
-
console.log(` ${p.description || 'No description'}`);
|
|
33
|
-
console.log(` Type: ${type}`);
|
|
34
|
-
console.log('');
|
|
35
|
-
}
|
|
36
|
-
console.log('Install: beecork store install <package-name>\n');
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
console.error('Search failed:', err);
|
|
40
|
-
console.log('Try manually: npm search beecork');
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export function storeInstall(packageName) {
|
|
44
|
-
// Normalize: if user types "shopify", try "beecork-capability-shopify" first
|
|
45
|
-
let fullName = packageName;
|
|
46
|
-
if (!BEECORK_PREFIXES.some((p) => packageName.startsWith(p)) &&
|
|
47
|
-
!packageName.startsWith('beecork-')) {
|
|
48
|
-
// Try capability first, then media, then channel
|
|
49
|
-
fullName = `beecork-capability-${packageName}`;
|
|
50
|
-
}
|
|
51
|
-
if (!SAFE_NPM_PACKAGE.test(fullName)) {
|
|
52
|
-
console.error(`Invalid package name: ${fullName}`);
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
console.log(`\nInstalling ${fullName}...\n`);
|
|
56
|
-
try {
|
|
57
|
-
execFileSync('npm', ['install', '-g', fullName], { stdio: 'inherit' });
|
|
58
|
-
console.log(`\n${fullName} installed.`);
|
|
59
|
-
console.log('Restart daemon to activate: beecork stop && beecork start\n');
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
// If beecork-capability- failed, try other prefixes
|
|
63
|
-
if (fullName.startsWith('beecork-capability-')) {
|
|
64
|
-
const baseName = packageName;
|
|
65
|
-
for (const prefix of ['beecork-media-', 'beecork-channel-', 'beecork-']) {
|
|
66
|
-
const altName = prefix + baseName;
|
|
67
|
-
if (!SAFE_NPM_PACKAGE.test(altName))
|
|
68
|
-
continue;
|
|
69
|
-
try {
|
|
70
|
-
execFileSync('npm', ['install', '-g', altName], { stdio: 'inherit' });
|
|
71
|
-
console.log(`\n${altName} installed.`);
|
|
72
|
-
console.log('Restart daemon to activate: beecork stop && beecork start\n');
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
catch {
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
console.error(`\nFailed to install ${fullName}. Check the package name.`);
|
|
81
|
-
console.log('Search available packages: beecork store search <query>\n');
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
export async function storeInfo(packageName) {
|
|
85
|
-
try {
|
|
86
|
-
const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(packageName)}`, {
|
|
87
|
-
signal: AbortSignal.timeout(10000),
|
|
88
|
-
});
|
|
89
|
-
if (!response.ok) {
|
|
90
|
-
console.log(`Package "${packageName}" not found on npm.`);
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
const data = (await response.json());
|
|
94
|
-
const latest = data['dist-tags']?.latest ?? '';
|
|
95
|
-
const info = latest ? data.versions?.[latest] : undefined;
|
|
96
|
-
console.log(`\n${data.name}@${latest}`);
|
|
97
|
-
console.log(` ${data.description || 'No description'}`);
|
|
98
|
-
if (info?.homepage)
|
|
99
|
-
console.log(` Homepage: ${info.homepage}`);
|
|
100
|
-
if (info?.repository?.url)
|
|
101
|
-
console.log(` Repository: ${info.repository.url}`);
|
|
102
|
-
console.log(` License: ${info?.license || 'Unknown'}`);
|
|
103
|
-
console.log(`\n Install: beecork store install ${data.name}\n`);
|
|
104
|
-
}
|
|
105
|
-
catch (err) {
|
|
106
|
-
console.error('Failed to fetch package info:', err);
|
|
107
|
-
}
|
|
108
|
-
}
|
package/dist/config.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BeecorkConfig, TabConfig } from './types.js';
|
|
2
|
-
export declare function getConfig(): BeecorkConfig;
|
|
3
|
-
export declare function saveConfig(config: BeecorkConfig): void;
|
|
4
|
-
export declare function getTabConfig(tabName: string): TabConfig;
|
|
5
|
-
export declare function resolveWorkingDir(tabName: string): string;
|
|
6
|
-
export declare function validateTabName(name: string): string | null;
|
|
7
|
-
/**
|
|
8
|
-
* Like validateTabName but allows the literal name "default" (used by send/update
|
|
9
|
-
* endpoints that reference an existing tab rather than creating one).
|
|
10
|
-
*/
|
|
11
|
-
export declare function validateTabNameOrDefault(name: string): string | null;
|
package/dist/config.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import os from 'node:os';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { getConfigPath, expandHome } from './util/paths.js';
|
|
5
|
-
const DEFAULT_TAB_CONFIG = {
|
|
6
|
-
workingDir: os.homedir(),
|
|
7
|
-
};
|
|
8
|
-
const DEFAULT_PROJECT_SCAN_PATHS = ['~/Coding', '~/Projects', '~/code', '~/dev'];
|
|
9
|
-
/**
|
|
10
|
-
* INTENTIONAL: --dangerously-skip-permissions is required for unattended operation.
|
|
11
|
-
* Without it, Claude Code would block on every tool call waiting for user input.
|
|
12
|
-
* Users can override defaultFlags in ~/.beecork/config.json.
|
|
13
|
-
*/
|
|
14
|
-
const DEFAULT_CONFIG = {
|
|
15
|
-
telegram: {
|
|
16
|
-
token: '',
|
|
17
|
-
allowedUserIds: [],
|
|
18
|
-
},
|
|
19
|
-
claudeCode: {
|
|
20
|
-
bin: 'claude',
|
|
21
|
-
defaultFlags: ['--dangerously-skip-permissions'],
|
|
22
|
-
},
|
|
23
|
-
tabs: {
|
|
24
|
-
default: { ...DEFAULT_TAB_CONFIG },
|
|
25
|
-
},
|
|
26
|
-
memory: {
|
|
27
|
-
dbPath: '~/.beecork/memory.db',
|
|
28
|
-
},
|
|
29
|
-
projectScanPaths: [...DEFAULT_PROJECT_SCAN_PATHS],
|
|
30
|
-
deployment: 'local',
|
|
31
|
-
};
|
|
32
|
-
let cachedConfig = null;
|
|
33
|
-
export function getConfig() {
|
|
34
|
-
if (cachedConfig)
|
|
35
|
-
return cachedConfig;
|
|
36
|
-
const configPath = getConfigPath();
|
|
37
|
-
if (!fs.existsSync(configPath)) {
|
|
38
|
-
return { ...DEFAULT_CONFIG };
|
|
39
|
-
}
|
|
40
|
-
try {
|
|
41
|
-
const raw = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
|
|
42
|
-
cachedConfig = mergeWithDefaults(raw);
|
|
43
|
-
return cachedConfig;
|
|
44
|
-
}
|
|
45
|
-
catch (err) {
|
|
46
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
47
|
-
// Log to stderr since logger may not be initialized yet
|
|
48
|
-
console.error(`Warning: Failed to parse config file ${configPath}: ${msg} — using defaults`);
|
|
49
|
-
return { ...DEFAULT_CONFIG };
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export function saveConfig(config) {
|
|
53
|
-
const configPath = getConfigPath();
|
|
54
|
-
fs.mkdirSync(path.dirname(configPath), { recursive: true });
|
|
55
|
-
// Owner-only mode set atomically with the write so there's no world-readable window.
|
|
56
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', { mode: 0o600 });
|
|
57
|
-
cachedConfig = config;
|
|
58
|
-
}
|
|
59
|
-
export function getTabConfig(tabName) {
|
|
60
|
-
const config = getConfig();
|
|
61
|
-
return config.tabs[tabName] ?? { ...DEFAULT_TAB_CONFIG };
|
|
62
|
-
}
|
|
63
|
-
export function resolveWorkingDir(tabName) {
|
|
64
|
-
const tabConfig = getTabConfig(tabName);
|
|
65
|
-
return expandHome(tabConfig.workingDir);
|
|
66
|
-
}
|
|
67
|
-
const TAB_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{0,31}$/;
|
|
68
|
-
export function validateTabName(name) {
|
|
69
|
-
if (name === 'default')
|
|
70
|
-
return 'Tab name "default" is reserved';
|
|
71
|
-
if (name.startsWith('cron:'))
|
|
72
|
-
return 'Tab names starting with "cron:" are reserved';
|
|
73
|
-
if (!TAB_NAME_REGEX.test(name))
|
|
74
|
-
return 'Tab name must be alphanumeric + hyphens, max 32 chars';
|
|
75
|
-
return null; // valid
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Like validateTabName but allows the literal name "default" (used by send/update
|
|
79
|
-
* endpoints that reference an existing tab rather than creating one).
|
|
80
|
-
*/
|
|
81
|
-
export function validateTabNameOrDefault(name) {
|
|
82
|
-
if (name === 'default')
|
|
83
|
-
return null;
|
|
84
|
-
return validateTabName(name);
|
|
85
|
-
}
|
|
86
|
-
function mergeWithDefaults(raw) {
|
|
87
|
-
// Spread raw first so any future optional fields round-trip through saveConfig
|
|
88
|
-
// without needing to be enumerated here. Specific sections that need defaults
|
|
89
|
-
// get merged below.
|
|
90
|
-
return {
|
|
91
|
-
...raw,
|
|
92
|
-
telegram: {
|
|
93
|
-
...DEFAULT_CONFIG.telegram,
|
|
94
|
-
...raw.telegram,
|
|
95
|
-
},
|
|
96
|
-
claudeCode: {
|
|
97
|
-
...DEFAULT_CONFIG.claudeCode,
|
|
98
|
-
...raw.claudeCode,
|
|
99
|
-
},
|
|
100
|
-
tabs: {
|
|
101
|
-
default: { ...DEFAULT_TAB_CONFIG },
|
|
102
|
-
...Object.fromEntries(Object.entries(raw.tabs ?? {}).map(([k, v]) => [k, { ...DEFAULT_TAB_CONFIG, ...v }])),
|
|
103
|
-
},
|
|
104
|
-
memory: {
|
|
105
|
-
...DEFAULT_CONFIG.memory,
|
|
106
|
-
...raw.memory,
|
|
107
|
-
},
|
|
108
|
-
// Fall back to legacy pipe.projectScanPaths so old configs keep working
|
|
109
|
-
projectScanPaths: raw.projectScanPaths ??
|
|
110
|
-
raw.pipe?.projectScanPaths ?? [
|
|
111
|
-
...DEFAULT_PROJECT_SCAN_PATHS,
|
|
112
|
-
],
|
|
113
|
-
deployment: raw.deployment ?? DEFAULT_CONFIG.deployment,
|
|
114
|
-
};
|
|
115
|
-
}
|
package/dist/cron/scheduler.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { TabManager, NotifyCallback } from '../session/manager.js';
|
|
2
|
-
export declare class CronScheduler {
|
|
3
|
-
private tabManager;
|
|
4
|
-
private onNotify;
|
|
5
|
-
private scheduledJobs;
|
|
6
|
-
private store;
|
|
7
|
-
constructor(tabManager: TabManager, onNotify: NotifyCallback | null);
|
|
8
|
-
/** Load all cron jobs from store and schedule them */
|
|
9
|
-
loadAndSchedule(): void;
|
|
10
|
-
/** Check for the reload signal file and reload if present */
|
|
11
|
-
checkForReload(): void;
|
|
12
|
-
/** Stop all scheduled jobs */
|
|
13
|
-
stopAll(): void;
|
|
14
|
-
private scheduleJob;
|
|
15
|
-
private fireJob;
|
|
16
|
-
private handleSystemEvent;
|
|
17
|
-
}
|
|
18
|
-
/** Convert human interval (30m, 2h, 1d, 1h30m, 2w) to milliseconds */
|
|
19
|
-
export declare function intervalToMs(interval: string): number | null;
|
|
20
|
-
/** Convert human interval (30m, 2h, 1d, 1h30m, 2w) to cron expression */
|
|
21
|
-
export declare function intervalToCron(interval: string): string | null;
|
|
22
|
-
//# sourceMappingURL=scheduler.d.ts.map
|