MCPcopy
hub / github.com/deepnote/deepnote / resolveRunnableWithInit

Function resolveRunnableWithInit

packages/mcp/src/tools/execution.ts:132–148  ·  view source on GitHub ↗

Load and (when applicable) compose a sibling init notebook for a runnable file.

(filePath: string)

Source from the content-addressed store, hash-verified

130
131/** Load and (when applicable) compose a sibling init notebook for a runnable file. */
132async function resolveRunnableWithInit(filePath: string): Promise<{
133 file: DeepnoteFile
134 originalPath: string
135 format: LoadedRunnableFile['format']
136 wasConverted: boolean
137 warnings: string[]
138}> {
139 const loaded = await loadRunnableFile(filePath)
140 const resolved = await resolveAndComposeInitIfNeeded(loaded)
141 return {
142 file: resolved.file,
143 originalPath: loaded.originalPath,
144 format: loaded.format,
145 wasConverted: loaded.wasConverted,
146 warnings: resolved.warnings,
147 }
148}
149
150async function handleRun(args: Record<string, unknown>) {
151 const parsedArgs = runArgsSchema.safeParse(args)

Callers 1

handleRunFunction · 0.85

Calls 2

loadRunnableFileFunction · 0.90

Tested by

no test coverage detected