MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / enabledHooks

Method enabledHooks

packages/agent-core/src/plugin/manager.ts:245–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

243 }
244
245 enabledHooks(): readonly HookDef[] {
246 const out: HookDef[] = [];
247 for (const record of this.records.values()) {
248 if (!record.enabled || record.state !== 'ok' || record.manifest === undefined) continue;
249 for (const hook of record.manifest.hooks ?? []) {
250 out.push({
251 ...hook,
252 cwd: record.root,
253 env: { KIMI_CODE_HOME: this.kimiHomeDir, KIMI_PLUGIN_ROOT: record.root },
254 });
255 }
256 }
257 return out;
258 }
259
260 async enabledCommands(): Promise<readonly PluginCommandDef[]> {
261 const out: PluginCommandDef[] = [];

Callers 3

manager.test.tsFile · 0.80

Calls 2

valuesMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected