II.
HookSurface overview
Reference · livehook-surface:shell-env
ShellEnv (canonical) overview
Fires before the runtime materializes the environment for a shell tool invocation. Subscribers can inject, redact, or veto env vars. Used to enforce secret-handling policy + capability profiles. Native equivalents: claude-code / opencode `ShellEnv`.
Attributes
eventName
ShellEnv (canonical)
displayName
ShellEnv (canonical)
kind
canonical
direction
pre
blocking
true
family
shell-hook
payloadSchema
type
object
required
- session_id
- requested_env
properties
session_id
type
string
requested_env
type
object
description
Environment variable map the agent intends to expose to the next tool subprocess.
cwd
type
string
description
Fires before the runtime materializes the environment for a shell tool
invocation. Subscribers can inject, redact, or veto env vars. Used to
enforce secret-handling policy + capability profiles. Native
equivalents: claude-code / opencode `ShellEnv`.
Outgoing edges
None.
Incoming edges
exposes1
- agent-runtime-impl:claude-code.runtime@1.x·AgentRuntimeImplClaude Code Runtime (1.x)
maps_hook2
- hook-mapping:shell-env-opencode·HookMapping
- hook-mapping:shell-env-gemini·HookMapping