feat(core): reload config on filesystem changes

This commit is contained in:
Dax Raad
2026-07-03 20:35:04 -04:00
parent b04d8d53e6
commit c9b24ef027
48 changed files with 612 additions and 526 deletions
+2
View File
@@ -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
+2 -9
View File
@@ -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"> {}
+1
View File
@@ -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
View File
@@ -0,0 +1,3 @@
import type { EventApi } from "@opencode-ai/client/promise/api"
export interface EventHooks extends Pick<EventApi, "subscribe"> {}
+1
View File
@@ -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"