export declare function resolveDefaultExport(mod: { default?: unknown; }): unknown; /** * Load a `.ts`/`.js` module through the tsx ESM loader (so `.ts` sources and * their imports of `@cargo-ai/*` / `zod` are transpiled on the fly) and return * its resolved default export. Shared by both `--file` loaders: the workflow * loader validates the result as a compiled workflow; the agent loader reads * the exported handle to learn which agent the file declares, then loads the * whole project for the nodes. `subject` labels the file in errors (e.g. * "Workflow", "Agent"). */ export declare function importModuleDefault(file: string, subject: string): Promise<{ absPath: string; defaultExport: unknown; }>; /** * The CDK project directory a `--file` module belongs to — the directory `cdk * plan` and `cdk deploy` run in, which is what a harness agent's inferred * `rootDirectory` is measured from. Walk up to the repo, then back down to the * project (`infra/` in a scaffolded repo); a file in no recognisable project * answers its own directory. * * Deliberately NOT the nearest cargo.state.json. That file's position is * incidental — a repo deployed before `cdk deploy` ran from the project has one * at the repo root — so measuring from it would report no `rootDirectory` and * clone the repo root, while the deployed agent clones `infra/`. */ export declare function cdkProjectDirFor(file: string): string; /** * Deep-resolve every `@cargo-ai/cdk` handle token in `value` to its real uuid * using the nearest cargo.state.json (searched from `file`'s directory upward, * then the cwd). `subject` names the thing under test in error messages (e.g. a * workflow or agent slug). A value with no tokens (literal-uuid refs, or a pure * body) is returned unchanged — no state needed. Fails with an actionable error * when state is missing or a referenced resource isn't deployed yet. */ export declare function resolveTokensFromState(value: unknown, file: string, subject: string): unknown; //# sourceMappingURL=cdkState.d.ts.map