MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / start

Method start

src/runtime/adapters/ipc.ts:87–106  ·  view source on GitHub ↗
(ctx: AdapterContext)

Source from the content-addressed store, hash-verified

85 private started = false;
86
87 async start(ctx: AdapterContext): Promise<void> {
88 // IPC channel only exists when spawned via child_process.fork/spawn with stdio "ipc".
89 if (typeof process.send !== "function") {
90 return;
91 }
92
93 this.agent = ctx.agent;
94 this.rootDir = ctx.rootDir;
95 this.adapterMap = ctx.adapterMap ?? null;
96 this.conversationService = new ConversationService(ctx.rootDir);
97
98 this.messageListener = (message: unknown) => {
99 if (!this.isIpcRequest(message)) return;
100 void this.handleRequest(message);
101 };
102 process.on("message", this.messageListener);
103
104 this.started = true;
105 console.log("[IpcAdapter] Started");
106 }
107
108 async stop(): Promise<void> {
109 if (this.messageListener) {

Callers 1

startServerFunction · 0.95

Calls 3

isIpcRequestMethod · 0.95
handleRequestMethod · 0.95
onMethod · 0.65

Tested by

no test coverage detected