@aion0/forge 0.9.15 → 0.9.18
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/RELEASE_NOTES.md +16 -5
- package/app/api/connectors/[id]/settings/route.ts +68 -10
- package/app/api/connectors/[id]/test/route.ts +28 -5
- package/components/ConnectorsPanel.tsx +141 -1
- package/install.sh +18 -4
- package/lib/chat/protocols/http.ts +198 -24
- package/lib/chat/tool-dispatcher.ts +84 -7
- package/lib/connectors/registry.ts +76 -18
- package/lib/connectors/types.ts +87 -1
- package/lib/craft-sdk/server.ts +2 -2
- package/lib/crafts/runtime.ts +1 -1
- package/lib/flows.ts +1 -1
- package/lib/help-docs/21-build-connector.md +139 -0
- package/lib/issue-scanner-gitlab.ts +2 -2
- package/lib/issue-scanner.ts +2 -2
- package/lib/jobs/scheduler.ts +4 -4
- package/lib/jobs/store.ts +3 -3
- package/lib/notifications.ts +2 -2
- package/lib/notify.ts +1 -1
- package/lib/pipeline-scheduler.ts +2 -2
- package/lib/pipeline.ts +1 -1
- package/lib/prompts/store.ts +1 -1
- package/lib/schedules/action-runner.ts +4 -4
- package/lib/schedules/scheduler.ts +7 -7
- package/lib/schedules/store.ts +4 -4
- package/lib/session-manager.ts +5 -5
- package/lib/session-watcher.ts +1 -1
- package/lib/skills.ts +2 -2
- package/lib/task-manager.ts +3 -3
- package/lib/telegram-bot.ts +1 -1
- package/lib/usage-scanner.ts +2 -2
- package/package.json +1 -1
- package/src/config/index.ts +2 -2
- package/src/core/memory/strategy.ts +1 -1
- package/src/core/providers/chat.ts +2 -2
- package/src/core/providers/registry.ts +2 -2
- package/src/core/session/manager.ts +5 -5
package/lib/prompts/store.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { existsSync, readFileSync, readdirSync, writeFileSync, unlinkSync, mkdirSync } from 'node:fs';
|
|
9
9
|
import { join } from 'node:path';
|
|
10
10
|
import YAML from 'yaml';
|
|
11
|
-
import { getDataDir } from '
|
|
11
|
+
import { getDataDir } from '../dirs';
|
|
12
12
|
import type { Prompt, CreatePromptInput, UpdatePromptInput } from './types';
|
|
13
13
|
|
|
14
14
|
function dir(): string {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* null and set to 'done'/'failed'/'skipped' atomically).
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { getDb } from '
|
|
19
|
-
import { getDbPath } from '
|
|
18
|
+
import { getDb } from '../../src/core/db/database';
|
|
19
|
+
import { getDbPath } from '../../src/config';
|
|
20
20
|
import { getScheduleRun, getSchedule, setScheduleRunAction } from './store';
|
|
21
|
-
import { appendMessage, getSession } from '
|
|
22
|
-
import { loadSettings } from '
|
|
21
|
+
import { appendMessage, getSession } from '../chat/session-store';
|
|
22
|
+
import { loadSettings } from '../settings';
|
|
23
23
|
import type { Schedule, ScheduleRun, ScheduleActionStatus } from './types';
|
|
24
24
|
|
|
25
25
|
function db() { return getDb(getDbPath()); }
|
|
@@ -13,18 +13,18 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { CronExpressionParser } from 'cron-parser';
|
|
16
|
-
import { startPipeline, getWorkflow } from '
|
|
16
|
+
import { startPipeline, getWorkflow } from '../pipeline';
|
|
17
17
|
import {
|
|
18
18
|
createTask,
|
|
19
19
|
getTask,
|
|
20
20
|
onTaskEvent,
|
|
21
21
|
taskAppendSystemPromptOverrides,
|
|
22
|
-
} from '
|
|
23
|
-
import { getProjectInfo, SCRATCH_PROJECT_NAME } from '
|
|
24
|
-
import { ensureInstalledInProject } from '
|
|
25
|
-
import { getPrompt } from '
|
|
26
|
-
import { getDb } from '
|
|
27
|
-
import { getDbPath } from '
|
|
22
|
+
} from '../task-manager';
|
|
23
|
+
import { getProjectInfo, SCRATCH_PROJECT_NAME } from '../projects';
|
|
24
|
+
import { ensureInstalledInProject } from '../skills';
|
|
25
|
+
import { getPrompt } from '../prompts/store';
|
|
26
|
+
import { getDb } from '../../src/core/db/database';
|
|
27
|
+
import { getDbPath } from '../../src/config';
|
|
28
28
|
import {
|
|
29
29
|
ensureSchema,
|
|
30
30
|
listDueSchedules,
|
package/lib/schedules/store.ts
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
import { existsSync, readFileSync } from 'node:fs';
|
|
17
17
|
import { join as joinPath } from 'node:path';
|
|
18
18
|
import { randomUUID } from 'node:crypto';
|
|
19
|
-
import { getDb } from '
|
|
20
|
-
import { getDbPath } from '
|
|
21
|
-
import { getDataDir } from '
|
|
22
|
-
import { toIsoUTC } from '
|
|
19
|
+
import { getDb } from '../../src/core/db/database';
|
|
20
|
+
import { getDbPath } from '../../src/config';
|
|
21
|
+
import { getDataDir } from '../dirs';
|
|
22
|
+
import { toIsoUTC } from '../iso-time';
|
|
23
23
|
import type {
|
|
24
24
|
Schedule,
|
|
25
25
|
ScheduleRun,
|
package/lib/session-manager.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { getDb } from '
|
|
3
|
-
import { getDbPath, loadTemplate } from '
|
|
4
|
-
import { chatStream, type ChatResult } from '
|
|
5
|
-
import { getMemoryMessages } from '
|
|
6
|
-
import type { Session, SessionStatus, Message, ProviderName, MemoryConfig } from '
|
|
2
|
+
import { getDb } from '../src/core/db/database';
|
|
3
|
+
import { getDbPath, loadTemplate } from '../src/config';
|
|
4
|
+
import { chatStream, type ChatResult } from '../src/core/providers/chat';
|
|
5
|
+
import { getMemoryMessages } from '../src/core/memory/strategy';
|
|
6
|
+
import type { Session, SessionStatus, Message, ProviderName, MemoryConfig } from '../src/types';
|
|
7
7
|
|
|
8
8
|
// Re-export the SessionManager but as a singleton for server-side use
|
|
9
9
|
class SessionManager {
|
package/lib/session-watcher.ts
CHANGED
package/lib/skills.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { existsSync, readdirSync, statSync, readFileSync, writeFileSync, mkdirSync, rmSync, cpSync } from 'node:fs';
|
|
6
6
|
import { join, dirname, basename, relative, sep } from 'node:path';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
|
-
import { getDb } from '
|
|
9
|
-
import { getDbPath } from '
|
|
8
|
+
import { getDb } from '../src/core/db/database';
|
|
9
|
+
import { getDbPath } from '../src/config';
|
|
10
10
|
import { loadSettings } from './settings';
|
|
11
11
|
|
|
12
12
|
type ItemType = 'skill' | 'command';
|
package/lib/task-manager.ts
CHANGED
|
@@ -7,14 +7,14 @@ import { randomUUID } from 'node:crypto';
|
|
|
7
7
|
import { spawn, execSync } from 'node:child_process';
|
|
8
8
|
import { realpathSync } from 'node:fs';
|
|
9
9
|
import * as pty from 'node-pty';
|
|
10
|
-
import { getDb } from '
|
|
11
|
-
import { getDbPath } from '
|
|
10
|
+
import { getDb } from '../src/core/db/database';
|
|
11
|
+
import { getDbPath } from '../src/config';
|
|
12
12
|
import { loadSettings } from './settings';
|
|
13
13
|
import { notifyTaskComplete, notifyTaskFailed } from './notify';
|
|
14
14
|
import { getInstalledConnector } from './connectors/registry';
|
|
15
15
|
import { getAgent } from './agents';
|
|
16
16
|
import { recordUsage } from './usage-scanner';
|
|
17
|
-
import type { Task, TaskLogEntry, TaskStatus, TaskMode, WatchConfig } from '
|
|
17
|
+
import type { Task, TaskLogEntry, TaskStatus, TaskMode, WatchConfig } from '../src/types';
|
|
18
18
|
|
|
19
19
|
import { toIsoUTC } from './iso-time';
|
|
20
20
|
|
package/lib/telegram-bot.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { listClaudeSessions, getSessionFilePath, readSessionEntries } from './cl
|
|
|
14
14
|
import { listWatchers, createWatcher, deleteWatcher, toggleWatcher } from './session-watcher';
|
|
15
15
|
import { startTunnel, stopTunnel, getTunnelStatus } from './cloudflared';
|
|
16
16
|
// Password verification is done via require() in handler functions
|
|
17
|
-
import type { Task, TaskLogEntry } from '
|
|
17
|
+
import type { Task, TaskLogEntry } from '../src/types';
|
|
18
18
|
|
|
19
19
|
// Persist state across hot-reloads
|
|
20
20
|
const globalKey = Symbol.for('mw-telegram-state');
|
package/lib/usage-scanner.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
import { readdirSync, readFileSync, statSync } from 'node:fs';
|
|
7
7
|
import { join, basename } from 'node:path';
|
|
8
|
-
import { getDb } from '
|
|
9
|
-
import { getDbPath } from '
|
|
8
|
+
import { getDb } from '../src/core/db/database';
|
|
9
|
+
import { getDbPath } from '../src/config';
|
|
10
10
|
import { getClaudeDir } from './dirs';
|
|
11
11
|
|
|
12
12
|
function db() { return getDb(getDbPath()); }
|
package/package.json
CHANGED
package/src/config/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import YAML from 'yaml';
|
|
4
|
-
import type { AppConfig, ProviderName, SessionTemplate } from '
|
|
5
|
-
import { getConfigDir as _getConfigDir, getDataDir as _getDataDir } from '
|
|
4
|
+
import type { AppConfig, ProviderName, SessionTemplate } from '../types';
|
|
5
|
+
import { getConfigDir as _getConfigDir, getDataDir as _getDataDir } from '../../lib/dirs';
|
|
6
6
|
|
|
7
7
|
const CONFIG_DIR = _getConfigDir();
|
|
8
8
|
const CONFIG_FILE = join(CONFIG_DIR, 'config.yaml');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { streamText, generateText, type ModelMessage } from 'ai';
|
|
2
|
-
import { getModel } from '
|
|
3
|
-
import type { ProviderName } from '
|
|
2
|
+
import { getModel } from './registry';
|
|
3
|
+
import type { ProviderName } from '../../types';
|
|
4
4
|
|
|
5
5
|
export interface ChatOptions {
|
|
6
6
|
provider: ProviderName;
|
|
@@ -2,8 +2,8 @@ import { createAnthropic } from '@ai-sdk/anthropic';
|
|
|
2
2
|
import { createGoogleGenerativeAI } from '@ai-sdk/google';
|
|
3
3
|
import { createOpenAI } from '@ai-sdk/openai';
|
|
4
4
|
import type { LanguageModel } from 'ai';
|
|
5
|
-
import { loadConfig, getProviderApiKey } from '
|
|
6
|
-
import type { ProviderName } from '
|
|
5
|
+
import { loadConfig, getProviderApiKey } from '../../config';
|
|
6
|
+
import type { ProviderName } from '../../types';
|
|
7
7
|
|
|
8
8
|
const providerInstances = new Map<string, LanguageModel>();
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
2
|
import type { ModelMessage } from 'ai';
|
|
3
|
-
import { getDb } from '
|
|
4
|
-
import { getDbPath, loadTemplate } from '
|
|
5
|
-
import { chatStream, type ChatResult } from '
|
|
6
|
-
import { getMemoryMessages } from '
|
|
7
|
-
import type { Session, SessionStatus, Message, ProviderName, MemoryConfig } from '
|
|
3
|
+
import { getDb } from '../db/database';
|
|
4
|
+
import { getDbPath, loadTemplate } from '../../config';
|
|
5
|
+
import { chatStream, type ChatResult } from '../providers/chat';
|
|
6
|
+
import { getMemoryMessages } from '../memory/strategy';
|
|
7
|
+
import type { Session, SessionStatus, Message, ProviderName, MemoryConfig } from '../../types';
|
|
8
8
|
|
|
9
9
|
export class SessionManager {
|
|
10
10
|
private db;
|