MCPcopy Create free account
hub / github.com/anomalyco/opencode / makeCtx

Function makeCtx

packages/opencode/test/tool/tool-define.test.ts:14–28  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12const params = Schema.Struct({ input: Schema.String })
13
14function makeCtx(): Tool.Context {
15 return {
16 sessionID: SessionID.descending(),
17 messageID: MessageID.ascending(),
18 agent: "build",
19 abort: new AbortController().signal,
20 messages: [],
21 metadata() {
22 return Effect.void
23 },
24 ask() {
25 return Effect.void
26 },
27 }
28}
29
30function makeTool(id: string, executeFn?: () => void) {
31 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected