feat(hooks): gate orca.yaml execution on trust
Audited and rebased PR 1138. Squashed to remove the original untrusted commit stack; hook execution now requires explicit UI trust or CLI --run-hooks opt-in.
This commit is contained in:
@@ -232,7 +232,8 @@ export function getDefaultUIState(): PersistedUIState {
|
||||
statusBarItems: [...DEFAULT_STATUS_BAR_ITEMS],
|
||||
statusBarVisible: true,
|
||||
dismissedUpdateVersion: null,
|
||||
lastUpdateCheckAt: null
|
||||
lastUpdateCheckAt: null,
|
||||
trustedOrcaHooks: {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1117,8 +1117,22 @@ export type PersistedUIState = {
|
||||
/** Once the user has starred Orca (from any entry point) we permanently
|
||||
* suppress the nag — no further thresholds, no notifications. */
|
||||
starNagCompleted?: boolean
|
||||
trustedOrcaHooks?: PersistedTrustedOrcaHooks
|
||||
}
|
||||
|
||||
export type PersistedTrustedOrcaHookEntry = {
|
||||
contentHash: string
|
||||
approvedAt: number
|
||||
}
|
||||
|
||||
export type PersistedTrustedOrcaHookRepo = {
|
||||
setup?: PersistedTrustedOrcaHookEntry
|
||||
archive?: PersistedTrustedOrcaHookEntry
|
||||
issueCommand?: PersistedTrustedOrcaHookEntry
|
||||
}
|
||||
|
||||
export type PersistedTrustedOrcaHooks = Record<string, PersistedTrustedOrcaHookRepo>
|
||||
|
||||
// ─── Persistence shape ──────────────────────────────────────────────
|
||||
export type PersistedState = {
|
||||
schemaVersion: number
|
||||
|
||||
Reference in New Issue
Block a user