MCPcopy Create free account
hub / github.com/EvoMap/evolver / start

Method start

src/proxy/index.js:213–422  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211 }
212
213 async start() {
214 if (this._started) throw new Error('Proxy already started');
215
216 this.store = new MailboxStore(this.dataDir);
217
218 this.lifecycle = new LifecycleManager({
219 hubUrl: this.hubUrl,
220 store: this.store,
221 logger: this.logger,
222 getTaskMeta: () => this.taskMonitor ? this.taskMonitor.getHeartbeatMeta() : {},
223 });
224
225 this.taskMonitor = new TaskMonitor({
226 store: this.store,
227 logger: this.logger,
228 });
229
230 this.skillUpdater = new SkillUpdater({
231 store: this.store,
232 skillPath: this._skillPath,
233 logger: this.logger,
234 });
235
236 this.dmHandler = new DmHandler({
237 store: this.store,
238 logger: this.logger,
239 });
240
241 this.sessionHandler = new SessionHandler({
242 store: this.store,
243 logger: this.logger,
244 });
245
246 this.traceControl = new TraceControl({
247 store: this.store,
248 logger: this.logger,
249 });
250 try { this.traceControl.pollAndApply(); } catch (e) {
251 this.logger?.warn?.('[proxy] traceControl initial poll failed:', e.message);
252 }
253
254 const getHeaders = () => this.lifecycle._buildHeaders();
255 const taskMonitor = this.taskMonitor;
256
257 this.sync = new SyncEngine({
258 store: this.store,
259 hubUrl: this.hubUrl,
260 getHeaders,
261 logger: this.logger,
262 onAuthError: () => this.lifecycle.reAuthenticate(),
263 onOutboundFlushed: () => this._drainProxyTraceBackfill({
264 maxMs: TRACE_BACKFILL_RUNTIME_DRAIN_MAX_MS,
265 }),
266 onInboundReceived: () => {
267 try { this.skillUpdater?.pollAndApply(); } catch (e) {
268 this.logger?.warn?.('[proxy] skillUpdater.pollAndApply failed:', e.message);
269 }
270 try { this.traceControl?.pollAndApply(); } catch (e) {

Callers 13

startProxyFunction · 0.95
mainFunction · 0.45
v1Messages.test.jsFile · 0.45

Calls 15

_proxyHttpMethod · 0.95
_wrapA2aMethod · 0.95
_assetSearchMethod · 0.95
_assetPublishMethod · 0.95
_reportReuseMethod · 0.95
_proxyBedrockMethod · 0.95
_proxyAnthropicMethod · 0.95
_proxyOpenAIResponsesMethod · 0.95
_proxyGeminiMethod · 0.95
_proxyVertexMethod · 0.95
_getHubMailboxStatusMethod · 0.95

Tested by

no test coverage detected