feat(plugin): add shell.create.before hook (#39547)

This commit is contained in:
Aiden Cline 2026-07-29 14:11:52 -05:00 committed by GitHub
commit c8dca936b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 142 additions and 49 deletions

View file

@ -10,6 +10,7 @@ import type { EventDomain } from "./event.js"
import type { IntegrationDomain } from "./integration.js"
import type { ReferenceDomain } from "./reference.js"
import type { SessionDomain } from "./session.js"
import type { ShellDomain } from "./shell.js"
import type { SkillDomain } from "./skill.js"
import type { ToolDomain } from "./tool.js"
import type { WebSearchDomain } from "./websearch.js"
@ -26,6 +27,7 @@ export interface Context {
readonly plugin: PluginApi<unknown>
readonly reference: ReferenceDomain
readonly session: SessionDomain
readonly shell: ShellDomain
readonly skill: SkillDomain
readonly tool: ToolDomain
readonly websearch: WebSearchDomain

View file

@ -0,0 +1,17 @@
import type { Hooks } from "./registration.js"
export interface ShellCreateBefore {
command: string
cwd: string
timeout: number
shell: string
env: Record<string, string | undefined>
}
export interface ShellHooks {
readonly "create.before": ShellCreateBefore
}
export interface ShellDomain {
readonly hook: Hooks<ShellHooks>
}