jsdoc typing round, phases 1-2: tsc as a no-emit checker over plain mjs (checkJs, strict), the shared shapes in server/shapes.mjs (log events as a tagged union, wire messages, manifests, job state, the ctx), all 12 server modules annotated; requireOwner/requireSuperuser as JSDoc assertion functions so the router guarantee narrows without callsite churn; runtime stays zero-dependency (typescript + @types/node as pinned devDeps, node_modules gitignored, QUESTIONS #4 amended: dev tooling exempt); every non-annotation delta audited onto a small intended list (clerk status ?? 1, dead 401 guards, async wraps on enqueue callsites); smoke 105/105 + restart + repo checks green; the clerk and web/ are the next phases
This commit is contained in:
@@ -16,9 +16,16 @@ import { fileURLToPath } from 'node:url';
|
||||
import { requireRun } from './bundle.mjs';
|
||||
import { liveSession, loadSession } from './session.mjs';
|
||||
|
||||
/** @typedef {import('./shapes.mjs').LiveSession} LiveSession */
|
||||
|
||||
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const RUNS_DIR = path.join(ROOT, 'runs');
|
||||
|
||||
/**
|
||||
* @param {{ sessions: Map<string, LiveSession> }} ctx
|
||||
* @param {string} srcId @param {{ id: string }} user
|
||||
* @returns {{ run: string }}
|
||||
*/
|
||||
export function forkRun(ctx, srcId, user) {
|
||||
requireRun(srcId);
|
||||
let id;
|
||||
|
||||
Reference in New Issue
Block a user