@ebowwa/stack 0.3.0 → 0.3.1
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/index.js +62133 -62224
- package/package.json +1 -1
- package/src/index.ts +28 -27
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -38,14 +38,10 @@ import type { ChannelConnector, ChannelMessage, ChannelResponse, ChannelId } fro
|
|
|
38
38
|
import { GLMClient } from "@ebowwa/ai";
|
|
39
39
|
import { ToolExecutor, BUILTIN_TOOLS } from "@ebowwa/ai/tools";
|
|
40
40
|
|
|
41
|
-
// Node Agent
|
|
42
|
-
import
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
ConsoleLoggerService,
|
|
46
|
-
initializeStateService,
|
|
47
|
-
getState,
|
|
48
|
-
} from "@ebowwa/node-agent/lib";
|
|
41
|
+
// Node Agent types (lazy import to avoid bundling issues)
|
|
42
|
+
type RalphServiceType = InstanceType<typeof import("@ebowwa/node-agent/lib").RalphService>;
|
|
43
|
+
type GitServiceType = InstanceType<typeof import("@ebowwa/node-agent/lib").GitService>;
|
|
44
|
+
type ConsoleLoggerServiceType = InstanceType<typeof import("@ebowwa/node-agent/lib").ConsoleLoggerService>;
|
|
49
45
|
|
|
50
46
|
// ============================================================
|
|
51
47
|
// Types
|
|
@@ -111,10 +107,10 @@ export class Stack {
|
|
|
111
107
|
private channels: Map<string, ChannelConnector> = new Map();
|
|
112
108
|
private abortController: AbortController | null = null;
|
|
113
109
|
|
|
114
|
-
// Node Agent services (
|
|
115
|
-
private ralphService:
|
|
116
|
-
private gitService:
|
|
117
|
-
private consoleLogger:
|
|
110
|
+
// Node Agent services (lazy loaded to avoid bundling issues)
|
|
111
|
+
private ralphService: RalphServiceType | null = null;
|
|
112
|
+
private gitService: GitServiceType | null = null;
|
|
113
|
+
private consoleLogger: ConsoleLoggerServiceType | null = null;
|
|
118
114
|
|
|
119
115
|
constructor(config: StackConfig) {
|
|
120
116
|
this.config = {
|
|
@@ -166,10 +162,7 @@ export class Stack {
|
|
|
166
162
|
this.client = new GLMClient();
|
|
167
163
|
this.executor = new ToolExecutor(this.client, [...BUILTIN_TOOLS]);
|
|
168
164
|
|
|
169
|
-
//
|
|
170
|
-
this.ralphService = new RalphService();
|
|
171
|
-
this.gitService = new GitService();
|
|
172
|
-
this.consoleLogger = new ConsoleLoggerService();
|
|
165
|
+
// Node Agent services initialized lazily in initializeNodeAgent()
|
|
173
166
|
}
|
|
174
167
|
|
|
175
168
|
// ============================================================
|
|
@@ -216,21 +209,29 @@ export class Stack {
|
|
|
216
209
|
private async initializeNodeAgent(): Promise<void> {
|
|
217
210
|
console.log("[Stack] Initializing Node Agent services...");
|
|
218
211
|
|
|
219
|
-
//
|
|
212
|
+
// Lazy import to avoid bundling issues with node-agent
|
|
220
213
|
try {
|
|
221
|
-
await
|
|
214
|
+
const nodeAgent = await import("@ebowwa/node-agent/lib");
|
|
215
|
+
|
|
216
|
+
// Initialize services (features disabled for now)
|
|
217
|
+
this.ralphService = new nodeAgent.RalphService();
|
|
218
|
+
this.gitService = new nodeAgent.GitService();
|
|
219
|
+
this.consoleLogger = new nodeAgent.ConsoleLoggerService();
|
|
220
|
+
|
|
221
|
+
// Initialize state service
|
|
222
|
+
await nodeAgent.initializeStateService();
|
|
222
223
|
console.log("[Stack] State service initialized");
|
|
223
|
-
} catch (error) {
|
|
224
|
-
console.warn("[Stack] State service initialization failed (non-critical):", error);
|
|
225
|
-
}
|
|
226
224
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
// this.gitService?.initialize();
|
|
225
|
+
// TODO: Enable Ralph/Git when ready
|
|
226
|
+
// this.ralphService?.startMonitoring();
|
|
227
|
+
// this.gitService?.initialize();
|
|
231
228
|
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
this.state.nodeAgent.enabled = true;
|
|
230
|
+
console.log("[Stack] Node Agent services ready (Ralph/Git DISABLED)");
|
|
231
|
+
} catch (error) {
|
|
232
|
+
console.warn("[Stack] Node Agent initialization failed (non-critical):", error);
|
|
233
|
+
console.warn("[Stack] Continuing without Node Agent services");
|
|
234
|
+
}
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
// ============================================================
|