MCPcopy Create free account
hub / github.com/MagicCube/agentara / _attachWriter

Method _attachWriter

src/kernel/sessioning/session-manager.ts:317–333  ·  view source on GitHub ↗
(session: Session, sessionId: string)

Source from the content-addressed store, hash-verified

315 }
316
317 private _attachWriter(session: Session, sessionId: string): void {
318 const fileWriter = new SessionJSONLWriter(sessionId);
319 const logWriter = new SessionLogWriter(sessionId);
320 session.on("message", (message) => {
321 if (
322 session.agentType === "codex" &&
323 message.role === "system" &&
324 message.subtype === "init"
325 ) {
326 this._updateRunnerSessionId(sessionId, message.id);
327 }
328 logWriter.write(message);
329 fileWriter.write(message);
330 this._diaryWriter.write(message);
331 this._updateLastMessageCreatedAt(sessionId);
332 });
333 }
334}
335
336/**

Callers 3

createSessionMethod · 0.95
createHandoffSessionMethod · 0.95
resumeSessionMethod · 0.95

Calls 5

writeMethod · 0.95
writeMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected