affaan-m/ECC · error · Error
createPlanCanvasServer requires a session store
Error message
createPlanCanvasServer requires a session store
What it means
Constructor guard in createPlanCanvasServer: the options object omitted the required store that backs the canvas session state. Without it the server would crash on first request, so the error fires at startup instead.
Source
Thrown at scripts/lib/plan-canvas/server.js:126
"default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; frame-src 'self'";
}
res.writeHead(statusCode, headers);
res.end(html);
}
function createPlanCanvasServer({
store,
host = DEFAULT_HOST,
version = '0.0.0',
idleTimeoutMs = DEFAULT_IDLE_TIMEOUT_MS,
heartbeatMs = 15000,
thinkingStaleMs = DEFAULT_THINKING_STALE_MS,
typingExpiryMs = DEFAULT_TYPING_EXPIRY_MS,
presenceSweepMs = DEFAULT_PRESENCE_SWEEP_MS,
onIdleShutdown = null,
log = () => {}
} = {}) {
if (!store) throw new Error('createPlanCanvasServer requires a session store');
const allowedHostnames = buildAllowedHostnames(host);
const wake = new EventEmitter();
wake.setMaxListeners(0);
const sseClients = new Map(); // key -> Set<res>
const awaitCounts = new Map(); // key -> active long-poll count
const workingKeys = new Map(); // key -> ms timestamp the agent took feedback
const typingKeys = new Map(); // key -> ms timestamp the agent signalled composing
const watchers = new Map(); // key -> fs.FSWatcher
const lastPresence = new Map(); // key -> last broadcast state, for sweep diffing
let idleTimer = null;
let presenceSweep = null;
let closed = false;
// --- presence + SSE ---------------------------------------------------
/**
* Presence never claims more than the server actually knows:View on GitHub (pinned to 06c5e118c4)
Solutions
- Provide a value that satisfies the validation: createPlanCanvasServer requires a session store
- Check the calling command or configuration for the reported field and correct it, then retry.
- Run the command with --help to review the expected input shape and allowed values.
Example fix
Correct the invalid input so that the following holds: createPlanCanvasServer requires a session store
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at scripts/lib/plan-canvas/server.js:126 when the library encounters an invalid state.
Common situations: Raised when input validation fails because: createPlanCanvasServer requires a session store. Typically caused by a missing, malformed, or out-of-range argument or configuration value.
AI-assisted analysis of affaan-m/ECC@06c5e118c4 (2026-08-18).
Data as JSON: /api/errors/8f28a8f04a691379.
Report an issue: GitHub.