MCPcopy
hub / github.com/nowork-studio/NotFair / materializeSession

Function materializeSession

notfair-cmo/src/server/sessions/view.ts:146–161  ·  view source on GitHub ↗
(input: {
  project_slug: string;
  agent_id: string;
  label: string;
  task_id?: string | null;
})

Source from the content-addressed store, hash-verified

144 * to the project's chosen harness adapter when one isn't passed.
145 */
146export function materializeSession(input: {
147 project_slug: string;
148 agent_id: string;
149 label: string;
150 task_id?: string | null;
151}): Session {
152 const project = getProject(input.project_slug);
153 const harness = project?.harness_adapter ?? DEFAULT_HARNESS_ADAPTER;
154 return getOrCreateSession({
155 project_slug: input.project_slug,
156 agent_id: input.agent_id,
157 label: input.label,
158 harness_adapter: harness,
159 task_id: input.task_id ?? null,
160 });
161}
162
163// ── Thread origins ──────────────────────────────────────────────────
164

Callers

nothing calls this directly

Calls 2

getProjectFunction · 0.90
getOrCreateSessionFunction · 0.90

Tested by

no test coverage detected