Decides whether project-scoped hooks may run in a given directory.
Trust is a property of the workspace, not of the session, so it must be re-resolved every time the working directory moves. A session that starts in a trusted project and later moves into an untrusted one must not carry the original grant forward.
Callers hand this policy to HooksManager, which resolves it on load and on
every reload; nothing upstream needs to hold or reinterpret the decision.
Canonical workspace roots and hook fingerprints trusted for this session.
Whether persisted trust may satisfy the policy.
Headless runs set this to False: executing repository hooks there requires
an explicit opt-in, so a workspace remembered during an interactive session
must not silently qualify a later dcode -n invocation.
Alternate trust store path for tests.
Return a policy that trusts no workspace.
Build a policy from a launch-time trust decision.
Build a policy that ignores persisted trust entirely.
For contexts where running repository hooks must be an explicit opt-in rather than something a previous interactive session can enable — notably headless runs, where the operator may never have seen the interactive trust prompt.
Return a policy with a content-bound session grant for cwd.
Return a policy without any session grant for cwd.
Return whether project hooks may run for a working directory.