MCPcopy Index your code
hub / github.com/anomalyco/opencode / authState

Function authState

packages/opencode/src/cli/cmd/mcp.ts:82–93  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80}
81
82function authState() {
83 return Effect.gen(function* () {
84 const cfg = yield* Config.Service
85 const mcp = yield* MCP.Service
86 const config = yield* cfg.get()
87 const auth = yield* Effect.all(
88 Object.fromEntries(oauthServers(config).map(([name]) => [name, mcp.getAuthStatus(name)])),
89 { concurrency: "unbounded" },
90 )
91 return { config, auth }
92 })
93}
94
95export const McpCommand = cmd({
96 command: "mcp",

Callers 1

mcp.tsFile · 0.85

Calls 3

oauthServersFunction · 0.85
getMethod · 0.65
allMethod · 0.45

Tested by

no test coverage detected