MCPcopy Create free account
hub / github.com/arctic-cli/interface / init

Function init

packages/arctic/src/plugin/index.ts:87–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 }
86
87 export async function init() {
88 const hooks = await state().then((x) => x.hooks)
89 const config = await Config.get()
90 for (const hook of hooks) {
91 await hook.config?.(config)
92 }
93 Bus.subscribeAll(async (input) => {
94 const hooks = await state().then((x) => x.hooks)
95 for (const hook of hooks) {
96 hook["event"]?.({
97 event: input,
98 })
99 }
100 })
101 }
102}

Callers

nothing calls this directly

Calls 2

stateFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected