feat(core): reload config on filesystem changes
This commit is contained in:
parent
b04d8d53e6
commit
c9b24ef027
48 changed files with 596 additions and 510 deletions
|
|
@ -3,6 +3,7 @@ import type { AgentHooks } from "./agent.js"
|
|||
import type { AISDKHooks } from "./aisdk.js"
|
||||
import type { CatalogHooks } from "./catalog.js"
|
||||
import type { CommandHooks } from "./command.js"
|
||||
import type { EventHooks } from "./event.js"
|
||||
import type { IntegrationHooks } from "./integration.js"
|
||||
import type { PluginDomain } from "./plugin.js"
|
||||
import type { ReferenceHooks } from "./reference.js"
|
||||
|
|
@ -16,6 +17,7 @@ export interface PluginContext {
|
|||
readonly aisdk: AISDKHooks
|
||||
readonly catalog: CatalogHooks
|
||||
readonly command: CommandHooks
|
||||
readonly event: EventHooks
|
||||
readonly integration: IntegrationHooks
|
||||
readonly plugin: PluginDomain
|
||||
readonly reference: ReferenceHooks
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
import type { Event as SDKEvent } from "@opencode-ai/sdk/v2/types"
|
||||
import type { Stream } from "effect"
|
||||
import type { EventApi } from "@opencode-ai/client/effect/api"
|
||||
|
||||
export type EventMap = {
|
||||
[Item in SDKEvent as Item["type"]]: Item
|
||||
}
|
||||
|
||||
export interface Event {
|
||||
subscribe<Type extends keyof EventMap>(type: Type): Stream.Stream<EventMap[Type]>
|
||||
}
|
||||
export interface EventHooks extends Pick<EventApi<unknown>, "subscribe"> {}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ export type { AgentDraft, AgentHooks } from "./agent.js"
|
|||
export type { AISDKHooks } from "./aisdk.js"
|
||||
export type { CatalogDraft, CatalogHooks, CatalogProviderRecord } from "./catalog.js"
|
||||
export type { CommandDraft, CommandHooks } from "./command.js"
|
||||
export type { EventHooks } from "./event.js"
|
||||
export type { IntegrationDraft, IntegrationHooks, IntegrationMethodRegistration } from "./integration.js"
|
||||
export type { ReferenceDraft, ReferenceHooks } from "./reference.js"
|
||||
export type { SkillDraft, SkillHooks } from "./skill.js"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import type { AgentHooks } from "./agent.js"
|
|||
import type { AISDKHooks } from "./aisdk.js"
|
||||
import type { CatalogHooks } from "./catalog.js"
|
||||
import type { CommandHooks } from "./command.js"
|
||||
import type { EventHooks } from "./event.js"
|
||||
import type { IntegrationHooks } from "./integration.js"
|
||||
import type { PluginDomain } from "./plugin.js"
|
||||
import type { ReferenceHooks } from "./reference.js"
|
||||
|
|
@ -15,6 +16,7 @@ export interface PluginContext {
|
|||
readonly aisdk: AISDKHooks
|
||||
readonly catalog: CatalogHooks
|
||||
readonly command: CommandHooks
|
||||
readonly event: EventHooks
|
||||
readonly integration: IntegrationHooks
|
||||
readonly plugin: PluginDomain
|
||||
readonly reference: ReferenceHooks
|
||||
|
|
|
|||
3
packages/plugin/src/v2/promise/event.ts
Normal file
3
packages/plugin/src/v2/promise/event.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import type { EventApi } from "@opencode-ai/client/promise/api"
|
||||
|
||||
export interface EventHooks extends Pick<EventApi, "subscribe"> {}
|
||||
|
|
@ -6,6 +6,7 @@ export type { AgentDraft, AgentHooks } from "./agent.js"
|
|||
export type { AISDKHooks } from "./aisdk.js"
|
||||
export type { CatalogDraft, CatalogHooks, CatalogProviderRecord } from "./catalog.js"
|
||||
export type { CommandDraft, CommandHooks } from "./command.js"
|
||||
export type { EventHooks } from "./event.js"
|
||||
export type { IntegrationDraft, IntegrationHooks, IntegrationMethodRegistration } from "./integration.js"
|
||||
export type { ReferenceDraft, ReferenceHooks } from "./reference.js"
|
||||
export type { SessionHooks } from "./runtime.js"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue