feat(plugin): add shell.create.before hook (#39547)
This commit is contained in:
parent
4f871906bc
commit
c8dca936b1
11 changed files with 142 additions and 49 deletions
|
|
@ -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
|
||||
|
|
|
|||
17
packages/plugin/src/effect/shell.ts
Normal file
17
packages/plugin/src/effect/shell.ts
Normal 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>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue