@foxden-app/foxclaw 0.12.0 → 0.13.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/CHANGELOG.md +20 -0
- package/dist/antigravity/account_ui.d.ts +34 -0
- package/dist/antigravity/account_ui.js +354 -0
- package/dist/antigravity/adapter.js +1 -1
- package/dist/antigravity/auth.d.ts +4 -1
- package/dist/antigravity/auth.js +17 -5
- package/dist/antigravity/controller.d.ts +3 -108
- package/dist/antigravity/controller.js +2 -2129
- package/dist/antigravity/conversation_ui.d.ts +56 -0
- package/dist/antigravity/conversation_ui.js +509 -0
- package/dist/antigravity/ui_callbacks.d.ts +6 -0
- package/dist/antigravity/ui_callbacks.js +6 -0
- package/dist/bridge/unified_bridge.d.ts +114 -0
- package/dist/bridge/unified_bridge.js +1343 -0
- package/dist/channels/bridge_messaging_router.d.ts +8 -4
- package/dist/channels/bridge_messaging_router.js +15 -4
- package/dist/channels/telegram/telegram_messaging_port.d.ts +16 -0
- package/dist/channels/telegram/telegram_messaging_port.js +22 -2
- package/dist/channels/text_actions.d.ts +14 -0
- package/dist/channels/text_actions.js +48 -0
- package/dist/channels/weixin/weixin_channel_adapter.d.ts +3 -4
- package/dist/channels/weixin/weixin_channel_adapter.js +2 -2
- package/dist/channels/weixin/weixin_messaging_port.d.ts +16 -1
- package/dist/channels/weixin/weixin_messaging_port.js +34 -7
- package/dist/codex_app/activity.d.ts +62 -0
- package/dist/codex_app/activity.js +418 -0
- package/dist/codex_app/adapter.d.ts +2 -2
- package/dist/codex_app/adapter.js +55 -25
- package/dist/codex_app/backend_ui.d.ts +4 -0
- package/dist/codex_app/backend_ui.js +48 -0
- package/dist/codex_app/client.js +0 -12
- package/dist/controller/access.d.ts +1 -11
- package/dist/controller/access.js +1 -33
- package/dist/controller/activity.d.ts +1 -62
- package/dist/controller/activity.js +2 -418
- package/dist/controller/auth_errors.d.ts +11 -0
- package/dist/controller/auth_errors.js +124 -0
- package/dist/controller/auth_files.d.ts +13 -0
- package/dist/controller/auth_files.js +156 -0
- package/dist/controller/auth_presentation.d.ts +77 -0
- package/dist/controller/auth_presentation.js +697 -0
- package/dist/controller/auth_quota_service.d.ts +27 -0
- package/dist/controller/auth_quota_service.js +151 -0
- package/dist/controller/controller.d.ts +30 -56
- package/dist/controller/controller.js +181 -3497
- package/dist/controller/interactions.d.ts +74 -0
- package/dist/controller/interactions.js +560 -0
- package/dist/controller/local_usage_service.d.ts +19 -0
- package/dist/controller/local_usage_service.js +62 -0
- package/dist/controller/native_panel_service.d.ts +55 -0
- package/dist/controller/native_panel_service.js +214 -0
- package/dist/controller/native_panels.d.ts +61 -0
- package/dist/controller/native_panels.js +784 -0
- package/dist/controller/shared_helpers.d.ts +53 -0
- package/dist/controller/shared_helpers.js +399 -0
- package/dist/controller/state_types.d.ts +390 -0
- package/dist/controller/state_types.js +82 -0
- package/dist/controller/turn_rendering.d.ts +22 -0
- package/dist/controller/turn_rendering.js +288 -0
- package/dist/core/access.d.ts +11 -0
- package/dist/core/access.js +33 -0
- package/dist/core/attachment_files.d.ts +13 -0
- package/dist/core/attachment_files.js +180 -0
- package/dist/core/attachment_types.d.ts +22 -0
- package/dist/core/attachment_types.js +1 -0
- package/dist/core/attachments.d.ts +5 -3
- package/dist/core/attachments.js +2 -2
- package/dist/core/backend_registry.d.ts +22 -0
- package/dist/core/backend_registry.js +50 -0
- package/dist/core/backend_ui.d.ts +28 -0
- package/dist/core/backend_ui.js +1 -0
- package/dist/core/channel_events.d.ts +48 -0
- package/dist/core/channel_events.js +1 -0
- package/dist/core/channel_port.d.ts +52 -8
- package/dist/core/engine_spi.d.ts +19 -4
- package/dist/core/listener_scope.d.ts +11 -0
- package/dist/core/listener_scope.js +10 -0
- package/dist/core/message_text.d.ts +2 -0
- package/dist/core/message_text.js +28 -0
- package/dist/core/network_errors.d.ts +1 -0
- package/dist/core/network_errors.js +23 -0
- package/dist/core/orchestrator.d.ts +53 -24
- package/dist/core/orchestrator.js +855 -507
- package/dist/core/queued_engine_input.d.ts +12 -0
- package/dist/core/queued_engine_input.js +16 -0
- package/dist/core/runtime_supervisor.d.ts +19 -0
- package/dist/core/runtime_supervisor.js +45 -0
- package/dist/core/scope_operations.d.ts +7 -0
- package/dist/core/scope_operations.js +19 -0
- package/dist/core/stream_preview.js +21 -9
- package/dist/dsh/adapter.js +18 -5
- package/dist/dsh/backend.d.ts +7 -0
- package/dist/dsh/backend.js +21 -0
- package/dist/dsh/runtime.d.ts +0 -1
- package/dist/dsh/runtime.js +4 -13
- package/dist/dsh/ui.d.ts +8 -8
- package/dist/dsh/ui.js +1 -1
- package/dist/main.js +55 -43
- package/dist/opencode/adapter.js +28 -9
- package/dist/opencode/controller.js +1 -1
- package/dist/store/channel_inbox.d.ts +14 -0
- package/dist/store/channel_inbox.js +21 -0
- package/dist/store/database.d.ts +7 -3
- package/dist/store/database.js +7 -2
- package/dist/store/task_journal.d.ts +32 -0
- package/dist/store/task_journal.js +70 -0
- package/dist/telegram/api.d.ts +2 -2
- package/dist/telegram/api.js +10 -28
- package/dist/telegram/gateway.d.ts +13 -27
- package/dist/telegram/gateway.js +86 -43
- package/dist/telegram/media.d.ts +2 -34
- package/dist/telegram/media.js +1 -180
- package/dist/telegram/task_preview.d.ts +13 -0
- package/dist/telegram/task_preview.js +92 -0
- package/dist/telegram/task_result.d.ts +2 -0
- package/dist/telegram/task_result.js +12 -0
- package/dist/telegram/text.d.ts +1 -1
- package/dist/telegram/text.js +2 -27
- package/dist/types.d.ts +1 -1
- package/docs/release.md +13 -11
- package/docs/zh/architecture-review.md +106 -0
- package/docs/zh/release.md +13 -11
- package/docs/zh/telegram-experience.md +40 -0
- package/package.json +5 -4
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { ChannelPort } from '../core/channel_port.js';
|
|
2
|
+
import type { AppConfig } from '../config.js';
|
|
3
|
+
import type { Logger } from '../logger.js';
|
|
4
|
+
import type { BridgeStore } from '../store/database.js';
|
|
5
|
+
import type { RuntimeStatus } from '../types.js';
|
|
6
|
+
import type { TelegramGateway, TelegramTextEvent } from '../telegram/gateway.js';
|
|
7
|
+
import { AntigravityAppClient } from '../antigravity/client.js';
|
|
8
|
+
import { AntigravityAuthManager } from '../antigravity/auth.js';
|
|
9
|
+
import { AntigravityEngineAdapter } from '../antigravity/adapter.js';
|
|
10
|
+
import { CodexEngineAdapter } from '../codex_app/adapter.js';
|
|
11
|
+
import type { CodexAppClient, CodexAppServerRuntimeStatus } from '../codex_app/client.js';
|
|
12
|
+
import { OpencodeEngineAdapter } from '../opencode/adapter.js';
|
|
13
|
+
import type { OpencodeAppClient } from '../opencode/client.js';
|
|
14
|
+
import type { BackendDescriptor } from '../core/engine_spi.js';
|
|
15
|
+
import { BridgeSessionCore } from '../controller/controller.js';
|
|
16
|
+
import type { SelfUpdateRuntime } from '../update.js';
|
|
17
|
+
export interface UnifiedBridgeRuntimeStatus {
|
|
18
|
+
running: boolean;
|
|
19
|
+
connected: boolean;
|
|
20
|
+
activeTurns: number;
|
|
21
|
+
pendingApprovals: number;
|
|
22
|
+
botUsername: string | null;
|
|
23
|
+
codexHome: string;
|
|
24
|
+
codexAppServer?: CodexAppServerRuntimeStatus | undefined;
|
|
25
|
+
userAgent: string | null;
|
|
26
|
+
authProactiveRefresh?: RuntimeStatus['authProactiveRefresh'];
|
|
27
|
+
lastError?: string | null | undefined;
|
|
28
|
+
}
|
|
29
|
+
export interface UnifiedBridgeCoreOptions {
|
|
30
|
+
codexApp?: CodexAppClient | undefined;
|
|
31
|
+
codexAdapter?: CodexEngineAdapter | undefined;
|
|
32
|
+
codexCore?: BridgeSessionCore | undefined;
|
|
33
|
+
antigravityApp?: AntigravityAppClient | undefined;
|
|
34
|
+
antigravityAuth?: AntigravityAuthManager | undefined;
|
|
35
|
+
antigravityAdapter?: AntigravityEngineAdapter | undefined;
|
|
36
|
+
opencodeApp?: OpencodeAppClient | undefined;
|
|
37
|
+
opencodeAdapter?: OpencodeEngineAdapter | undefined;
|
|
38
|
+
defaultBackendId?: 'antigravity' | 'codex' | 'opencode' | string | undefined;
|
|
39
|
+
selfUpdater?: SelfUpdateRuntime | undefined;
|
|
40
|
+
backends?: BackendDescriptor[] | undefined;
|
|
41
|
+
ownsScope?: (scopeId: string) => boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare class UnifiedBridgeCore {
|
|
44
|
+
private readonly conversationUi;
|
|
45
|
+
private readonly accountUi;
|
|
46
|
+
private readonly config;
|
|
47
|
+
private readonly store;
|
|
48
|
+
private readonly logger;
|
|
49
|
+
private readonly bot;
|
|
50
|
+
private readonly app;
|
|
51
|
+
private readonly auth;
|
|
52
|
+
private readonly conversations;
|
|
53
|
+
private readonly messaging;
|
|
54
|
+
private readonly adapter;
|
|
55
|
+
private readonly codexAdapter?;
|
|
56
|
+
private readonly codexApp?;
|
|
57
|
+
readonly codexCore?: BridgeSessionCore | undefined;
|
|
58
|
+
private readonly opencodeAdapter?;
|
|
59
|
+
private readonly defaultBackendId;
|
|
60
|
+
private readonly selfUpdater?;
|
|
61
|
+
private readonly orchestrator;
|
|
62
|
+
private readonly background;
|
|
63
|
+
private trackBackground;
|
|
64
|
+
private readonly pendingAgyRenames;
|
|
65
|
+
constructor(config: AppConfig, store: BridgeStore, logger: Logger, bot: TelegramGateway, app?: AntigravityAppClient | undefined, auth?: AntigravityAuthManager | undefined, messaging?: ChannelPort | undefined, options?: UnifiedBridgeCoreOptions);
|
|
66
|
+
private readonly backendDefinitions;
|
|
67
|
+
private getBackendDescriptors;
|
|
68
|
+
registerInboundHandlers(): void;
|
|
69
|
+
registerTelegramInboundHandlers(): void;
|
|
70
|
+
dispatchInboundLikeTelegramText(event: TelegramTextEvent): void;
|
|
71
|
+
startCodexApp(): Promise<void>;
|
|
72
|
+
startTelegramPolling(): Promise<void>;
|
|
73
|
+
start(): Promise<void>;
|
|
74
|
+
stop(): Promise<void>;
|
|
75
|
+
private selfUpdatePollTimer;
|
|
76
|
+
private scheduleSelfUpdateStatusPoll;
|
|
77
|
+
private clearSelfUpdateStatusPoll;
|
|
78
|
+
private ownsScope;
|
|
79
|
+
private pollSelfUpdateStatus;
|
|
80
|
+
getRuntimeStatus(): UnifiedBridgeRuntimeStatus;
|
|
81
|
+
isIdleForServiceUpdate(): boolean;
|
|
82
|
+
getCurrentAuthLabel(): Promise<string | null>;
|
|
83
|
+
handleExternalCodexAuthCandidateDeleted(candidateName: string, _reason?: string | null): Promise<void>;
|
|
84
|
+
validateExternalCodexAuthCandidate(_candidateName: string, _rawAuth: string, _expectedAccountId: string): Promise<{
|
|
85
|
+
ok: boolean;
|
|
86
|
+
reason?: string | null;
|
|
87
|
+
}>;
|
|
88
|
+
private sendMessage;
|
|
89
|
+
private editMessage;
|
|
90
|
+
scheduleStalePanelDeletion(scopeId: string, messageId: number): void;
|
|
91
|
+
private renderCustomStatus;
|
|
92
|
+
private renderCustomSetupRows;
|
|
93
|
+
private handleCustomInbound;
|
|
94
|
+
private handleServiceCommand;
|
|
95
|
+
private handleCustomCommand;
|
|
96
|
+
private handleCustomCallback;
|
|
97
|
+
private sendThreadsPanel;
|
|
98
|
+
private openThread;
|
|
99
|
+
private sendCodexAuthMenu;
|
|
100
|
+
private switchCodexAccount;
|
|
101
|
+
private sendCodexThreadsMenu;
|
|
102
|
+
private openCodexThread;
|
|
103
|
+
private watchConversation;
|
|
104
|
+
private unwatchConversation;
|
|
105
|
+
private scheduleWatcherPoll;
|
|
106
|
+
private getScopeLocale;
|
|
107
|
+
private renderWatcherProgressUpdate;
|
|
108
|
+
private pollWatcher;
|
|
109
|
+
private handleWatcherTranscriptEntry;
|
|
110
|
+
private sendAuthMenu;
|
|
111
|
+
private startLoginFlow;
|
|
112
|
+
private sendEffortMenu;
|
|
113
|
+
}
|
|
114
|
+
export { UnifiedBridgeCore as AntigravityBridgeCore };
|