Phase 1: add state factories — predictable session bootstrap.
createInitialState and createRuntimeFlags return SPEC §6.1 defaults before load, detect, and settings merge on session_start. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,3 +30,20 @@ export interface RuntimeFlags {
|
||||
autoCompactDetected: boolean;
|
||||
autoCompactIntegration: AutoCompactIntegration;
|
||||
}
|
||||
|
||||
export function createInitialState(): ExtensionState {
|
||||
return {
|
||||
version: 1,
|
||||
sessionOverride: null,
|
||||
skills: [],
|
||||
lastCompactionSource: null,
|
||||
pendingReinject: [],
|
||||
};
|
||||
}
|
||||
|
||||
export function createRuntimeFlags(): RuntimeFlags {
|
||||
return {
|
||||
autoCompactDetected: false,
|
||||
autoCompactIntegration: "auto",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user