feat(ext/messages): add create_vault, attach_vault, get_vault_status (Plan C Phase 3 prep)
Adds the request shapes + response interfaces. POPUP_ONLY_TYPES set grows by three. SW handlers in service-worker/vault.ts land in the next tasks. The new union members would make popup-only.ts's exhaustive handle() switch non-total (TS2366), so a default case is added returning an explicit "unhandled popup message" error. create_vault/attach_vault get real cases in Tasks 3.2-3.3; get_vault_status in Dev-C's Phase 6. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -627,6 +627,12 @@ export async function handle(
|
||||
return { ok: false, error: (e as Error).message };
|
||||
}
|
||||
}
|
||||
|
||||
// create_vault / attach_vault land in Phase 3 Tasks 3.2-3.3; get_vault_status
|
||||
// in Phase 6 (Dev-C). Until each case lands, an unhandled popup message
|
||||
// returns an explicit error rather than falling through with no return.
|
||||
default:
|
||||
return { ok: false, error: `unhandled popup message: ${(msg as { type: string }).type}` };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user