@keystrokehq/cli 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { G as packAssetDirs, H as computeCallSiteIds, J as entryIdFromFile, U as diagnoseWorkflowSource, V as classifyCall, W as locateWorkflow, X as shouldSkipKeystrokeModuleFile, Y as readKeystrokeIgnoreDirective, a as buildStoredRouteManifestForProject } from "./dist-C0_71CpG.mjs";
2
+ import { G as packAssetDirs, H as computeCallSiteIds, J as entryIdFromFile, U as diagnoseWorkflowSource, V as classifyCall, W as locateWorkflow, X as shouldSkipKeystrokeModuleFile, Y as readKeystrokeIgnoreDirective, a as buildStoredRouteManifestForProject } from "./dist-C_L-HHc0.mjs";
3
3
  import { isBuiltin } from "node:module";
4
4
  import { dirname, join, relative, resolve, sep } from "node:path";
5
5
  import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -766,7 +766,7 @@ async function buildApp(options = {}) {
766
766
  ignoredFiles: walked.ignoredFiles
767
767
  }));
768
768
  if (emitManifest) {
769
- const { emitStoredRouteManifestForProject } = await import("./dist-ClUopraJ.mjs");
769
+ const { emitStoredRouteManifestForProject } = await import("./dist-CEtuajgc.mjs");
770
770
  await emitStoredRouteManifestForProject(root);
771
771
  }
772
772
  } finally {
@@ -791,4 +791,4 @@ async function watchApp(options = {}) {
791
791
  //#endregion
792
792
  export { buildApp, buildFilteredApp, resolveRuntimeBuildArtifact, watchApp };
793
793
 
794
- //# sourceMappingURL=dist-BGJ-Gw_w.mjs.map
794
+ //# sourceMappingURL=dist-CoFdTDow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dist-BGJ-Gw_w.mjs","names":["toPosix$1","toPosix"],"sources":["../../../packages/build/dist/walk-project-eIHZ7A1f.mjs","../../../packages/tsdown-config/deps.js","../../../packages/tsdown-config/index.js","../../../packages/build/dist/index.mjs"],"sourcesContent":["import { readFileSync, readdirSync, realpathSync, statSync } from \"node:fs\";\nimport { join, relative, resolve, sep } from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport { entryIdFromFile, readKeystrokeIgnoreDirective, shouldSkipKeystrokeModuleFile } from \"@keystrokehq/manifest/discovery\";\nimport { fileURLToPath } from \"node:url\";\n//#region src/ignore-guard-plugin.ts\nfunction toPosix$1(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction projectRelativePath(root, filePath) {\n\treturn toPosix$1(relative(root, normalizeBuildFilePath(filePath)));\n}\n/** Normalize paths so /var and /private/var compare equal on macOS. */\nfunction normalizeBuildFilePath(filePath) {\n\tconst absolute = resolve(filePath);\n\ttry {\n\t\treturn realpathSync.native(absolute);\n\t} catch {\n\t\treturn absolute;\n\t}\n}\nfunction normalizeModuleId(id, root) {\n\tif (id.startsWith(\"\\0\")) return null;\n\tconst normalized = normalizeBuildFilePath(id.startsWith(\"file://\") ? fileURLToPath(id) : id);\n\tif (!normalized.startsWith(normalizeBuildFilePath(root))) return null;\n\treturn normalized;\n}\nfunction formatImportGuardError(root, ignoredPath, importer) {\n\tconst ignored = projectRelativePath(root, ignoredPath);\n\tif (importer) return `Cannot import \"${ignored}\" (@keystroke ignore) from \"${projectRelativePath(root, importer)}\". Remove the directive or stop importing it from a shipped module.`;\n\treturn `Cannot import \"${ignored}\" (@keystroke ignore). Remove the directive or stop importing it from a shipped module.`;\n}\n/** Throw when a built module imports a `@keystroke ignore` source file. */\nfunction keystrokeIgnoreGuardPlugin(options) {\n\tconst root = normalizeBuildFilePath(options.root);\n\tconst ignoredFiles = new Set(options.ignoredFiles.map((filePath) => normalizeBuildFilePath(filePath)));\n\tfunction assertNotIgnored(filePath, importer) {\n\t\tconst normalized = normalizeBuildFilePath(filePath);\n\t\tif (!ignoredFiles.has(normalized)) return;\n\t\tthrow new Error(formatImportGuardError(root, normalized, importer));\n\t}\n\treturn {\n\t\tname: \"keystroke-ignore-guard\",\n\t\tasync resolveId(source, importer, resolveOptions) {\n\t\t\tif (resolveOptions?.isEntry || !importer) return null;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\t...resolveOptions,\n\t\t\t\tskipSelf: true\n\t\t\t});\n\t\t\tif (!resolved) return null;\n\t\t\tassertNotIgnored(typeof resolved === \"string\" ? resolved : resolved.id, importer);\n\t\t\treturn null;\n\t\t},\n\t\tload(id) {\n\t\t\tconst normalized = normalizeModuleId(id, root);\n\t\t\tif (!normalized) return null;\n\t\t\tassertNotIgnored(normalized);\n\t\t\treturn null;\n\t\t}\n\t};\n}\n//#endregion\n//#region src/walk-project.ts\nconst IGNORED_DIRS = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".git\",\n\t\".turbo\",\n\t\"build\",\n\t\"coverage\",\n\t\".keystroke\",\n\t\".cache\",\n\t\"tmp\"\n]);\nconst IGNORED_ENV_FILE = /\\.env/;\nconst IGNORED_LOG_FILE = /\\.log$/;\nfunction isIgnoredFile(name) {\n\treturn IGNORED_ENV_FILE.test(name) || IGNORED_LOG_FILE.test(name);\n}\nfunction toPosix(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction isProbablyBinary(buffer) {\n\tconst sampleLength = Math.min(buffer.length, 8e3);\n\tfor (let index = 0; index < sampleLength; index += 1) if (buffer[index] === 0) return true;\n\treturn false;\n}\nfunction classifyBuildEntry(root, srcRoot, filePath) {\n\tconst relativePath = toPosix(relative(root, filePath));\n\tconst agentsPrefix = `${toPosix(relative(root, join(srcRoot, \"agents\")))}/`;\n\tconst workflowsPrefix = `${toPosix(relative(root, join(srcRoot, \"workflows\")))}/`;\n\tconst triggersPrefix = `${toPosix(relative(root, join(srcRoot, \"triggers\")))}/`;\n\tconst actionsPrefix = `${toPosix(relative(root, join(srcRoot, \"actions\")))}/`;\n\tif (relativePath.startsWith(agentsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"agents\"), filePath, { nestedEntry: \"agent\" });\n\t\treturn id ? {\n\t\t\tentryKey: `agents/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(actionsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"actions\"), filePath, { nestedEntry: \"action\" });\n\t\treturn id ? {\n\t\t\tentryKey: `actions/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(workflowsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"workflows\"), filePath, { nestedEntry: \"workflow\" });\n\t\treturn id ? {\n\t\t\tentryKey: `workflows/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(triggersPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"triggers\"), filePath, { nestedEntry: \"trigger\" });\n\t\treturn id ? {\n\t\t\tentryKey: `triggers/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\treturn null;\n}\nfunction shouldSkipIgnoredModule(filePath, phase) {\n\treturn shouldSkipKeystrokeModuleFile(readKeystrokeIgnoreDirective(filePath), phase);\n}\nfunction isSrcTypeScriptFile(srcRoot, filePath) {\n\tconst relativePath = toPosix(relative(srcRoot, filePath));\n\tif (relativePath.startsWith(\"..\")) return false;\n\treturn /\\.(ts|mts)$/.test(relativePath);\n}\nfunction walkTree(root, dir, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals) {\n\tfor (const name of readdirSync(dir).sort()) {\n\t\tif (collectSources && (sourceFiles.length >= 2e3 || totals.bytes >= 8388608)) return;\n\t\tconst absolute = join(dir, name);\n\t\tconst stats = statSync(absolute);\n\t\tif (stats.isDirectory()) {\n\t\t\tif (IGNORED_DIRS.has(name)) continue;\n\t\t\twalkTree(root, absolute, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!stats.isFile()) continue;\n\t\tconst isUnderSrc = isSrcTypeScriptFile(srcRoot, absolute);\n\t\tconst skipIgnored = isUnderSrc ? shouldSkipIgnoredModule(absolute, phase) : false;\n\t\tif (isUnderSrc && skipIgnored) ignoredFiles.push(normalizeBuildFilePath(absolute));\n\t\tconst buildEntry = classifyBuildEntry(root, srcRoot, absolute);\n\t\tif (buildEntry && !skipIgnored) buildEntries[buildEntry.entryKey] = buildEntry.entryPath;\n\t\tif (!collectSources) continue;\n\t\tif (stats.size > 262144 || isIgnoredFile(name)) continue;\n\t\tconst buffer = readFileSync(absolute);\n\t\tif (isProbablyBinary(buffer)) continue;\n\t\ttotals.bytes += buffer.byteLength;\n\t\tsourceFiles.push({\n\t\t\tpath: toPosix(relative(root, absolute)),\n\t\t\tcontents: buffer.toString(\"utf8\"),\n\t\t\thash: createHash(\"sha256\").update(buffer).digest(\"hex\")\n\t\t});\n\t}\n}\n/**\n* One full-tree walk of the project: classifies tsdown entries and optionally\n* collects deploy source files (path + contents + hash) under snapshot limits.\n*/\nfunction walkProject(root, srcDirOrOptions = \"src\", maybeOptions) {\n\tconst srcDir = typeof srcDirOrOptions === \"string\" ? srcDirOrOptions : srcDirOrOptions.srcDir ?? \"src\";\n\tconst options = typeof srcDirOrOptions === \"string\" ? maybeOptions ?? {} : srcDirOrOptions;\n\tconst collectSources = options.collectSources ?? false;\n\tconst phase = options.phase ?? \"build\";\n\tconst sourceFiles = [];\n\tconst buildEntries = {};\n\tconst ignoredFiles = [];\n\twalkTree(root, root, join(root, srcDir), phase, collectSources, sourceFiles, buildEntries, ignoredFiles, { bytes: 0 });\n\treturn {\n\t\tsourceFiles,\n\t\tbuildEntries,\n\t\tignoredFiles\n\t};\n}\n//#endregion\nexport { keystrokeIgnoreGuardPlugin as n, walkProject as t };\n\n//# sourceMappingURL=walk-project-eIHZ7A1f.mjs.map","import { isBuiltin } from \"node:module\";\n\n/** Native addons kept external — resolved from the CLI runtime at app start. */\nexport const NATIVE_RUNTIME_DEPS = [\"pg\", \"better-sqlite3\", \"@parcel/watcher\"];\n\n/**\n * Framework/runtime `@keystrokehq/*` shipped in the project-server image, so user-app builds\n * keep them external and resolve them from the runtime at boot. Everything else under the scope\n * (Composio catalog integrations like `@keystrokehq/posthog`, …) is bundled into the artifact.\n *\n * This set MUST equal the `@keystrokehq/*` dependency closure of `@keystrokehq/project-runtime`\n * (the deploy image) — `deps.test.ts` enforces it. To change what stays external, change what the\n * runtime image depends on; do not edit this list by hand. `exa` is the only integration\n * package the framework imports directly (web search); `gateway` ships Slack and other channel\n * adapters in the runtime image.\n */\nexport const RUNTIME_KEYSTROKE_PACKAGES = new Set([\n \"access-control\",\n \"action\",\n \"agent\",\n \"app\",\n \"auth\",\n \"build\",\n \"config\",\n \"credentials\",\n \"database\",\n \"exa\",\n \"gateway\",\n \"hosting\",\n \"http\",\n \"keystroke\",\n \"manifest\",\n \"mcp\",\n \"memory\",\n \"oauth\",\n \"platform-database\",\n \"project-runtime\",\n \"projects\",\n \"runtime\",\n \"sandbox\",\n \"scheduler\",\n \"sdk\",\n \"secrets\",\n \"shared\",\n \"storage\",\n \"tracing\",\n \"trigger\",\n \"tsdown-config\",\n \"web-search\",\n \"worker\",\n \"workflow\",\n \"workflow-canvas\",\n]);\n\n/** Matches framework/runtime `@keystrokehq/*` kept external during user-app builds. */\nexport const FRAMEWORK_KEYSTROKE_EXTERNAL = new RegExp(\n `^@keystrokehq\\\\/(?:${[...RUNTIME_KEYSTROKE_PACKAGES].sort().join(\"|\")})(?:\\\\/|$)`,\n);\n\nfunction keystrokePackageName(name) {\n if (!name.startsWith(\"@keystrokehq/\")) {\n return null;\n }\n\n return name.slice(\"@keystrokehq/\".length).split(\"/\")[0] ?? null;\n}\n\nfunction isRuntimeKeystrokePackage(name) {\n const pkg = keystrokePackageName(name);\n return pkg !== null && RUNTIME_KEYSTROKE_PACKAGES.has(pkg);\n}\n\n/**\n * Kept external so .d.ts emission does not inline internal/inferred types.\n *\n * `typescript` is external because the TS compiler cannot be cleanly bundled into\n * ESM — it mixes `require()`/`__filename` with top-level await, which Node rejects\n * with `ERR_AMBIGUOUS_MODULE_SYNTAX` on load. Packages that use the compiler\n * (`workflow-canvas`, `manifest`, `build`) declare it as a dependency, so it\n * resolves from `node_modules` at runtime instead of being inlined.\n */\nexport const LIBRARY_EXTERNAL_DEPS = [\n \"better-auth\",\n /^@better-auth\\//,\n /^better-auth\\//,\n \"typescript\",\n];\n\n/** Non-auth runtime deps kept external for published entry bundles (platform, etc.). */\nexport const BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS = [\n ...NATIVE_RUNTIME_DEPS,\n \"dockerode\",\n \"ssh2\",\n \"cpu-features\",\n \"microsandbox\",\n /^@aws-sdk\\//,\n /^@napi-rs\\//,\n \"hono\",\n /^@hono\\//,\n \"undici\",\n];\n\n/** Kept external when bundling published entry points (cli, keystroke, platform). */\nexport const BUNDLED_ENTRY_EXTERNAL_DEPS = [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...LIBRARY_EXTERNAL_DEPS,\n];\n\n/** Bundle into CLI — device login uses Better Auth client only. */\nexport const BETTER_AUTH_CLIENT_BUNDLE_PATTERNS = [\n /^better-auth\\/client$/,\n /^better-auth\\/client\\//,\n];\n\n/** Server adapters and root entry — must not ship in the CLI bundle. */\nexport const BETTER_AUTH_SERVER_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^@better-auth\\//,\n /^better-auth\\/(?!client(\\/|$)).+/,\n];\n\nexport function isNativeRuntimeDep(id) {\n return NATIVE_RUNTIME_DEPS.some((dep) => id === dep || id.startsWith(`${dep}/`));\n}\n\nfunction packageName(id) {\n if (id.startsWith(\"@\")) {\n const [scope, name] = id.split(\"/\");\n return name ? `${scope}/${name}` : id;\n }\n\n return id.split(\"/\")[0] ?? id;\n}\n\nfunction isRuntimeExternal(id) {\n const name = packageName(id);\n if (isNativeRuntimeDep(name)) {\n return true;\n }\n\n if (name.startsWith(\"@keystrokehq/\")) {\n return isRuntimeKeystrokePackage(name);\n }\n\n if (name === \"better-auth\" || name.startsWith(\"@better-auth/\")) {\n return true;\n }\n\n return false;\n}\n\n/** Library packages resolve npm deps from node_modules at runtime. */\nexport function libraryBuildDepsConfig() {\n return {\n alwaysBundle: (_id) => null,\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Bundle npm deps into dist; resolve @keystrokehq/* and natives from the runtime. */\nexport function userAppBuildDepsConfig() {\n return {\n alwaysBundle: (id, _importer) => {\n if (id.startsWith(\".\") || id.startsWith(\"/\") || isBuiltin(id)) {\n return null;\n }\n\n return isRuntimeExternal(id) ? null : true;\n },\n neverBundle: [...NATIVE_RUNTIME_DEPS, FRAMEWORK_KEYSTROKE_EXTERNAL, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/**\n * Published entry packages (cli, keystroke, platform): declare bundled @keystrokehq/*\n * in dependencies (changesets release graph ignores devDependencies). Inlining is\n * driven by alwaysBundle below, not by dep kind. Runtime npm deps stay external.\n */\nexport function bundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//],\n neverBundle: [...BUNDLED_ENTRY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Published CLI: inline better-auth client + @better-auth/*; keep server adapters external. */\nexport const BETTER_AUTH_CLI_BUNDLE_PATTERNS = [\n ...BETTER_AUTH_CLIENT_BUNDLE_PATTERNS,\n /^@better-auth\\//,\n];\n\nexport const BETTER_AUTH_CLI_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^better-auth\\/(?!client(\\/|$)).+/,\n /^@better-auth\\/drizzle-adapter/,\n \"drizzle-orm\",\n];\n\n/** Rolldown/tsdown — native bindings; stay in CLI node_modules at runtime. */\nexport const CLI_BUILD_TOOL_EXTERNAL_PATTERNS = [\"tsdown\", \"rolldown\", /^@rolldown\\//, \"tsx\"];\n\n/** CLI: inline better-auth/client; keep server + drizzle adapters external. */\nexport function cliBundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//, ...BETTER_AUTH_CLI_BUNDLE_PATTERNS],\n neverBundle: [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...BETTER_AUTH_CLI_EXTERNAL_PATTERNS,\n ...CLI_BUILD_TOOL_EXTERNAL_PATTERNS,\n // The TS compiler cannot be inlined into ESM (`require`/`__filename` + top-level\n // await → `__filename is not defined` / `ERR_AMBIGUOUS_MODULE_SYNTAX` on load).\n // The CLI inlines the @keystrokehq/* packages that use it (build, manifest,\n // workflow-canvas), so `typescript` must resolve from the CLI's own node_modules —\n // hence it is also a runtime dependency of @keystrokehq/cli.\n \"typescript\",\n ],\n onlyBundle: false,\n };\n}\n","import { bundledEntryDepsConfig, libraryBuildDepsConfig } from \"./deps.js\";\n\nexport {\n isNativeRuntimeDep,\n NATIVE_RUNTIME_DEPS,\n bundledEntryDepsConfig,\n cliBundledEntryDepsConfig,\n libraryBuildDepsConfig,\n userAppBuildDepsConfig,\n} from \"./deps.js\";\n\nexport const baseTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: libraryBuildDepsConfig(),\n};\n\n/** tsdown config for published bundles (cli, keystroke, platform). */\nexport const bundledEntryTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: bundledEntryDepsConfig(),\n};\n","import { n as keystrokeIgnoreGuardPlugin, t as walkProject } from \"./walk-project-eIHZ7A1f.mjs\";\nimport { t as resolveModuleDirs } from \"./resolve-module-dirs-BPHQhRGy.mjs\";\nimport { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative, sep } from \"node:path\";\nimport { packAssetDirs } from \"@keystrokehq/sandbox/files\";\nimport { baseTsdownConfig, userAppBuildDepsConfig } from \"@keystrokehq/tsdown-config\";\nimport { build, mergeConfig } from \"tsdown\";\nimport { classifyCall, computeCallSiteIds, diagnoseWorkflowSource, locateWorkflow } from \"@keystrokehq/workflow-canvas\";\nimport ts from \"typescript\";\nimport { buildStoredRouteManifestForProject } from \"@keystrokehq/manifest\";\n//#region src/inject-call-site-ids.ts\n/**\n* Build-time injection of the deterministic structural `callSiteId` into every\n* durable step call in a workflow source file, so the runtime emits\n* `step:<callSiteId>#<occurrence>` correlation ids (and `step:<callSiteId>`\n* credential consumer ids) that line up 1:1 with the canvas graph nodes the\n* deploy-time producer mints from the same source. There is no user-authored\n* step id — identity is entirely internal and injected here.\n*\n* Injection shape by kind (the `callSiteId` is the same id `computeCallSiteIds`\n* returns, which equals the producer's step-node id):\n* - action/sub-workflow `x.run(i)` → `x.run(i).__site(\"<id>\")` (builder method)\n* - agent `a.prompt(i, opts?)` → `__site` merged into the prompt options\n* - llm `promptLlm(i, opts?)` → `__site` merged into the options\n* - hook `ctx.hook(opts?)` → `__site` merged into the options\n* - sleep `ctx.sleep(d, opts?)` → `__site` merged into a second options arg\n*/\nfunction injectCallSiteIds(code, fileName) {\n\tconst sourceFile = ts.createSourceFile(fileName, code, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n\tconst located = locateWorkflow(sourceFile);\n\tif (!located) return code;\n\tconst ids = computeCallSiteIds(sourceFile);\n\tif (ids.size === 0) return code;\n\tconst edits = [];\n\tfor (const [node, id] of ids) {\n\t\tconst info = classifyCall(node, located.ctxParamName);\n\t\tif (!info) continue;\n\t\tif (info.callKind === \"workflow-step\") {\n\t\t\tedits.push({\n\t\t\t\tpos: node.getEnd(),\n\t\t\t\ttext: `.__site(${JSON.stringify(id)})`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"agent\" || info.callKind === \"llm\") {\n\t\t\tpushOptionsEdit(edits, node, id);\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"hook\") {\n\t\t\tpushHookOptionsEdit(edits, node, id);\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"wait\") pushSleepOptionsEdit(edits, node, id);\n\t}\n\tif (edits.length === 0) return code;\n\tedits.sort((a, b) => b.pos - a.pos);\n\tlet out = code;\n\tfor (const edit of edits) out = out.slice(0, edit.pos) + edit.text + out.slice(edit.pos);\n\treturn out;\n}\n/**\n* Merge `__site: \"<id>\"` into a call's options argument (agents / promptLlm).\n* - no 2nd arg → append `, { __site: \"id\" }`\n* - 2nd arg object literal → insert `__site: \"id\", ` after its `{`\n* - 2nd arg anything else → wrap as `{ ...orig, __site: \"id\" }`\n*/\nfunction pushOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst optionsArg = call.arguments[1];\n\tif (!optionsArg) {\n\t\tconst firstArg = call.arguments[0];\n\t\tconst insertAt = firstArg ? firstArg.getEnd() : call.getEnd() - 1;\n\t\tedits.push({\n\t\t\tpos: insertAt,\n\t\t\ttext: `, { __site: ${literal} }`\n\t\t});\n\t\treturn;\n\t}\n\tif (ts.isObjectLiteralExpression(optionsArg)) {\n\t\tedits.push({\n\t\t\tpos: optionsArg.getStart() + 1,\n\t\t\ttext: ` __site: ${literal},`\n\t\t});\n\t\treturn;\n\t}\n\tedits.push({\n\t\tpos: optionsArg.getStart(),\n\t\ttext: \"{ ...\"\n\t});\n\tedits.push({\n\t\tpos: optionsArg.getEnd(),\n\t\ttext: `, __site: ${literal} }`\n\t});\n}\n/** Merge `__site` into `ctx.hook(opts?)` — options are the first (only) argument. */\nfunction pushHookOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst optionsArg = call.arguments[0];\n\tif (!optionsArg) {\n\t\tedits.push({\n\t\t\tpos: call.getEnd() - 1,\n\t\t\ttext: `{ __site: ${literal} }`\n\t\t});\n\t\treturn;\n\t}\n\tif (ts.isObjectLiteralExpression(optionsArg)) {\n\t\tedits.push({\n\t\t\tpos: optionsArg.getStart() + 1,\n\t\t\ttext: ` __site: ${literal},`\n\t\t});\n\t\treturn;\n\t}\n\tedits.push({\n\t\tpos: optionsArg.getStart(),\n\t\ttext: \"{ ...\"\n\t});\n\tedits.push({\n\t\tpos: optionsArg.getEnd(),\n\t\ttext: `, __site: ${literal} }`\n\t});\n}\n/** Append `{ __site }` as the second arg to `ctx.sleep(duration)`. */\nfunction pushSleepOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst durationArg = call.arguments[0];\n\tconst insertAt = durationArg ? durationArg.getEnd() : call.getEnd() - 1;\n\tedits.push({\n\t\tpos: insertAt,\n\t\ttext: `, { __site: ${literal} }`\n\t});\n}\nfunction toPosix$2(path) {\n\treturn path.split(sep).join(\"/\");\n}\n/**\n* Rolldown plugin that runs {@link injectCallSiteIds} over workflow source files\n* (and their same-file helpers) before transpile. Scoped to `src/workflows/` so\n* non-workflow modules are untouched; cross-file helpers stay unkeyed by design.\n*/\nfunction callSiteIdInjectionPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst workflowsPrefix = toPosix$2(`${options.root}/${srcDir}/workflows/`);\n\treturn {\n\t\tname: \"keystroke-call-site-ids\",\n\t\ttransform(code, id) {\n\t\t\tconst normalized = toPosix$2(id);\n\t\t\tif (!normalized.startsWith(workflowsPrefix) || !normalized.endsWith(\".ts\")) return null;\n\t\t\tconst transformed = injectCallSiteIds(code, normalized);\n\t\t\treturn transformed === code ? null : {\n\t\t\t\tcode: transformed,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t}\n\t};\n}\n//#endregion\n//#region src/workflow-diagnostics.ts\nconst TEST_FILE = /\\.(test|int\\.test|spec)\\.ts$/;\nfunction toPosix$1(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction collectTsFiles(dir, out) {\n\tlet entries;\n\ttry {\n\t\tentries = readdirSync(dir);\n\t} catch {\n\t\treturn;\n\t}\n\tfor (const entry of entries) {\n\t\tif (entry === \"node_modules\" || entry.startsWith(\".\")) continue;\n\t\tconst full = join(dir, entry);\n\t\tif (statSync(full).isDirectory()) {\n\t\t\tcollectTsFiles(full, out);\n\t\t\tcontinue;\n\t\t}\n\t\tif (entry.endsWith(\".ts\") && !TEST_FILE.test(entry)) out.push(full);\n\t}\n}\n/**\n* Run the workflow-canvas reliability checks over every `src/**` module. Errors\n* (steps outside a workflow, steps nested as call arguments) block the build;\n* warnings (opaque code-blocks, dropped spread inputs) explain each degraded\n* construct. Best-effort per-file: an unparseable file is skipped, never fatal.\n*/\nfunction collectWorkflowDiagnostics(root, srcDir = \"src\") {\n\tconst srcRoot = join(root, srcDir);\n\tif (!existsSync(srcRoot)) return [];\n\tconst files = [];\n\tcollectTsFiles(srcRoot, files);\n\tconst diagnostics = [];\n\tfor (const file of files) {\n\t\tconst rel = toPosix$1(relative(root, file));\n\t\ttry {\n\t\t\tconst source = readFileSync(file, \"utf8\");\n\t\t\tdiagnostics.push(...diagnoseWorkflowSource(source, rel));\n\t\t} catch {}\n\t}\n\treturn diagnostics;\n}\nfunction formatDiagnostic(diagnostic) {\n\treturn ` ${diagnostic.line !== void 0 ? `${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column ?? 1}` : diagnostic.fileName}\\n ${diagnostic.message}`;\n}\n/**\n* Collect diagnostics, print warnings, and throw a formatted error when any\n* blocking (error-severity) diagnostic is found. Call before building/emitting.\n*/\nfunction assertWorkflowDiagnostics(root, srcDir = \"src\") {\n\tconst diagnostics = collectWorkflowDiagnostics(root, srcDir);\n\tconst errors = diagnostics.filter((d) => d.severity === \"error\");\n\tconst warnings = diagnostics.filter((d) => d.severity === \"warning\");\n\tif (warnings.length > 0) console.warn(`\\n⚠ Workflow canvas: ${warnings.length} construct(s) will render as a degraded (opaque) canvas:\\n${warnings.map(formatDiagnostic).join(\"\\n\")}\\n`);\n\tif (errors.length > 0) throw new Error(`Workflow canvas: ${errors.length} unsupported construct(s) must be fixed before deploy:\\n${errors.map(formatDiagnostic).join(\"\\n\")}\\n`);\n}\n//#endregion\n//#region src/resolve-runtime-artifact.ts\nfunction packageRoot(nodeModules, scope, name) {\n\tconst direct = scope ? join(nodeModules, scope, name) : join(nodeModules, name);\n\tif (existsSync(join(direct, \"package.json\"))) return direct;\n\tconst pnpmDir = join(nodeModules, \".pnpm\");\n\tif (!existsSync(pnpmDir)) return null;\n\tfor (const entry of readdirSync(pnpmDir)) {\n\t\tconst candidate = scope ? join(pnpmDir, entry, \"node_modules\", scope, name) : join(pnpmDir, entry, \"node_modules\", name);\n\t\tif (existsSync(join(candidate, \"package.json\"))) return candidate;\n\t}\n\treturn null;\n}\n/** Resolve a file shipped with `@keystrokehq/build` inside the CLI runtime. */\nfunction resolveRuntimeBuildArtifact(runtimeNodeModules, relativePath) {\n\tconst pkgRoot = packageRoot(runtimeNodeModules, \"@keystrokehq\", \"build\");\n\tif (!pkgRoot) throw new Error(\"Keystroke runtime is missing @keystrokehq/build\");\n\tconst artifact = join(pkgRoot, relativePath);\n\tif (!existsSync(artifact)) throw new Error(`Keystroke runtime artifact not found: ${relativePath}`);\n\treturn artifact;\n}\n//#endregion\n//#region src/vitest-plugin.ts\nconst ASSETS_MODULE$1 = \"@keystrokehq/assets\";\nconst virtualPrefix = `\\0${ASSETS_MODULE$1}:`;\n/** Vitest plugin resolving `@keystrokehq/assets` from disk. */\nfunction agentAssetsVitestPlugin(appRoot = process.cwd()) {\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE$1) return null;\n\t\t\treturn `${virtualPrefix}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${virtualPrefix}manifest`) return null;\n\t\t\tmanifest ??= packAssetDirs(appRoot);\n\t\t\treturn `export default ${JSON.stringify(manifest)};`;\n\t\t}\n\t};\n}\nfunction findAppRootFromConfig(configFile) {\n\tif (!configFile) return process.cwd();\n\treturn dirname(configFile);\n}\nfunction agentAssetsVitestPluginFromConfig(configFile) {\n\treturn agentAssetsVitestPlugin(findAppRootFromConfig(configFile));\n}\n//#endregion\n//#region src/resolve-build-filter.ts\n/** Resolve exact build-entry keys for a filtered deploy build. */\nfunction resolveBuildFilter(filter, buildEntries) {\n\tif (filter.length === 0) throw new Error(\"At least one --filter entry is required\");\n\tconst matched = {};\n\tfor (const key of [...new Set(filter)]) {\n\t\tconst entryPath = buildEntries[key];\n\t\tif (!entryPath) throw new Error(`Unknown build entry \"${key}\". Use keys like agents/foo or workflows/bar from walkProject.`);\n\t\tmatched[key] = entryPath;\n\t}\n\treturn matched;\n}\n//#endregion\n//#region src/build-filtered.ts\nfunction toPosix(path) {\n\treturn path.replace(/\\\\/g, \"/\");\n}\nfunction distRelativePath(entryKey) {\n\treturn `${entryKey}.mjs`;\n}\nasync function buildSingleEntry(root, entryKey, entryPath, ignoredFiles) {\n\tmkdirSync(join(root, \".keystroke\"), { recursive: true });\n\tconst scratchRoot = mkdtempSync(join(root, \".keystroke\", \"filter-build-\"));\n\tconst outDir = join(scratchRoot, \"dist\");\n\tconst relativePath = distRelativePath(entryKey);\n\tawait build(mergeConfig(baseTsdownConfig, {\n\t\tentry: { [entryKey]: entryPath },\n\t\tformat: [\"esm\"],\n\t\toutDir,\n\t\tclean: true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [keystrokeIgnoreGuardPlugin({\n\t\t\troot,\n\t\t\tignoredFiles\n\t\t})]\n\t}));\n\treturn {\n\t\tscratchRoot,\n\t\trelativePath\n\t};\n}\nasync function manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap) {\n\tconst moduleFile = toPosix(relative(root, entryPath));\n\tconst distPath = join(root, \"dist\", relativePath);\n\tconst distMapPath = `${distPath}.map`;\n\tconst previousDist = existsSync(distPath) ? readFileSync(distPath) : void 0;\n\tconst hadMap = existsSync(distMapPath);\n\tconst previousMap = hadMap ? readFileSync(distMapPath) : void 0;\n\tmkdirSync(dirname(distPath), { recursive: true });\n\twriteFileSync(distPath, contents);\n\tif (sourceMap) writeFileSync(distMapPath, sourceMap);\n\ttry {\n\t\treturn (await buildStoredRouteManifestForProject(root, { reloadModules: true })).entries.filter((entry) => \"moduleFile\" in entry && entry.moduleFile === moduleFile);\n\t} finally {\n\t\tif (previousDist) writeFileSync(distPath, previousDist);\n\t\telse rmSync(distPath, { force: true });\n\t\tif (previousMap) writeFileSync(distMapPath, previousMap);\n\t\telse if (sourceMap || hadMap) rmSync(distMapPath, { force: true });\n\t}\n}\n/** Build selected modules in isolation for a filtered deploy merge. */\nasync function buildFilteredApp(options) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst phase = options.phase ?? \"deploy\";\n\tconst collectSources = options.collectSources ?? false;\n\tconst previous = process.cwd();\n\tassertWorkflowDiagnostics(root, srcDir);\n\tconst walked = walkProject(root, {\n\t\tsrcDir,\n\t\tcollectSources,\n\t\tphase\n\t});\n\tconst matched = resolveBuildFilter(options.filter, walked.buildEntries);\n\tconst files = [];\n\tconst manifestEntries = [];\n\ttry {\n\t\tprocess.chdir(root);\n\t\tfor (const [entryKey, entryPath] of Object.entries(matched)) {\n\t\t\tconst { scratchRoot, relativePath } = await buildSingleEntry(root, entryKey, entryPath, walked.ignoredFiles);\n\t\t\ttry {\n\t\t\t\tconst builtPath = join(scratchRoot, \"dist\", relativePath);\n\t\t\t\tconst mapPath = `${builtPath}.map`;\n\t\t\t\tconst contents = readFileSync(builtPath);\n\t\t\t\tconst sourceMap = existsSync(mapPath) ? readFileSync(mapPath) : void 0;\n\t\t\t\tfiles.push({\n\t\t\t\t\tentryKey,\n\t\t\t\t\trelativePath,\n\t\t\t\t\tcontents,\n\t\t\t\t\tsourceMap\n\t\t\t\t});\n\t\t\t\tmanifestEntries.push(...await manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap));\n\t\t\t} finally {\n\t\t\t\trmSync(scratchRoot, {\n\t\t\t\t\trecursive: true,\n\t\t\t\t\tforce: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n\treturn {\n\t\tfiles,\n\t\tmanifestEntries,\n\t\tsourceFiles: walked.sourceFiles\n\t};\n}\n//#endregion\n//#region src/index.ts\nconst ASSETS_MODULE = \"@keystrokehq/assets\";\nconst VIRTUAL_PREFIX = `\\0${ASSETS_MODULE}:`;\nfunction renderAssetModule(manifest) {\n\treturn `export default ${JSON.stringify(manifest)};\\n`;\n}\n/** Rolldown plugin: pack src/skills + src/files and expose `@keystrokehq/assets`. */\nfunction agentAssetsPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tbuildStart() {\n\t\t\tmanifest = packAssetDirs(options.root, srcDir);\n\t\t},\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE) return null;\n\t\t\treturn `${VIRTUAL_PREFIX}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${VIRTUAL_PREFIX}manifest` || !manifest) return null;\n\t\t\treturn renderAssetModule(manifest);\n\t\t},\n\t\tbuildEnd() {\n\t\t\tif (!manifest) return;\n\t\t\tconst outDir = join(options.root, options.outDir ?? \"dist\", \".keystroke\");\n\t\t\tmkdirSync(outDir, { recursive: true });\n\t\t\twriteFileSync(join(outDir, \"assets.mjs\"), renderAssetModule(manifest));\n\t\t}\n\t};\n}\n/** Full tsdown config for user keystroke apps (config + discovered modules only). */\nfunction createAppBuildConfig(options = {}, walked) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst outDir = options.outDir ?? \"dist\";\n\tconst configEntry = existsSync(join(root, \"keystroke.config.ts\")) ? join(root, \"keystroke.config.ts\") : void 0;\n\tconst walkedResult = walked ?? walkProject(root, {\n\t\tsrcDir,\n\t\tphase: options.phase\n\t});\n\tconst discovered = walkedResult.buildEntries;\n\tconst ignoredFiles = walkedResult.ignoredFiles;\n\tconst entries = {\n\t\t...configEntry ? { config: configEntry } : {},\n\t\t...discovered\n\t};\n\tif (Object.keys(entries).length === 0) throw new Error(\"Nothing to build — add keystroke.config.ts or modules under src/\");\n\treturn mergeConfig(baseTsdownConfig, {\n\t\tentry: entries,\n\t\tformat: [\"esm\"],\n\t\toutDir: join(root, outDir),\n\t\tclean: options.clean ?? true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [\n\t\t\tkeystrokeIgnoreGuardPlugin({\n\t\t\t\troot,\n\t\t\t\tignoredFiles\n\t\t\t}),\n\t\t\tcallSiteIdInjectionPlugin({\n\t\t\t\troot,\n\t\t\t\tsrcDir\n\t\t\t}),\n\t\t\tagentAssetsPlugin({\n\t\t\t\troot,\n\t\t\t\tsrcDir,\n\t\t\t\toutDir\n\t\t\t})\n\t\t]\n\t});\n}\n/** Build user agents, workflows, triggers, and config to `dist/`. */\nasync function buildApp(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst emitManifest = options.emitManifest ?? true;\n\tconst collectSources = options.collectSources ?? false;\n\tconst phase = options.phase ?? \"build\";\n\tconst previous = process.cwd();\n\tconst walked = walkProject(root, {\n\t\tsrcDir,\n\t\tcollectSources,\n\t\tphase\n\t});\n\ttry {\n\t\tprocess.chdir(root);\n\t\tassertWorkflowDiagnostics(root, srcDir);\n\t\tawait build(createAppBuildConfig({\n\t\t\t...options,\n\t\t\troot\n\t\t}, {\n\t\t\tbuildEntries: walked.buildEntries,\n\t\t\tignoredFiles: walked.ignoredFiles\n\t\t}));\n\t\tif (emitManifest) {\n\t\t\tconst { emitStoredRouteManifestForProject } = await import(\"@keystrokehq/manifest\");\n\t\t\tawait emitStoredRouteManifestForProject(root);\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n\treturn { sourceFiles: walked.sourceFiles };\n}\n/**\n* Watch `src/` and rebuild `dist/` on change.\n*\n* NOT true hot reload — each change runs a full tsdown rebuild. Callers should\n* restart the API server in `onRebuild` so discovery picks up new/changed modules.\n*/\nasync function watchApp(options = {}) {\n\tconst { runWatchApp } = await import(\"./watch-app-DTIeKrbl.mjs\");\n\tawait runWatchApp((watchOptions) => buildApp({\n\t\t...watchOptions,\n\t\temitManifest: false,\n\t\tcollectSources: false\n\t}), options);\n}\n//#endregion\nexport { agentAssetsVitestPlugin, agentAssetsVitestPluginFromConfig, assertWorkflowDiagnostics, buildApp, buildFilteredApp, callSiteIdInjectionPlugin, collectWorkflowDiagnostics, createAppBuildConfig, injectCallSiteIds, resolveBuildFilter, resolveModuleDirs, resolveRuntimeBuildArtifact, watchApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;AAMA,SAASA,YAAU,MAAM;CACxB,OAAO,KAAK,MAAM,GAAG,EAAE,KAAK,GAAG;AAChC;AACA,SAAS,oBAAoB,MAAM,UAAU;CAC5C,OAAOA,YAAU,SAAS,MAAM,uBAAuB,QAAQ,CAAC,CAAC;AAClE;;AAEA,SAAS,uBAAuB,UAAU;CACzC,MAAM,WAAW,QAAQ,QAAQ;CACjC,IAAI;EACH,OAAO,aAAa,OAAO,QAAQ;CACpC,QAAQ;EACP,OAAO;CACR;AACD;AACA,SAAS,kBAAkB,IAAI,MAAM;CACpC,IAAI,GAAG,WAAW,IAAI,GAAG,OAAO;CAChC,MAAM,aAAa,uBAAuB,GAAG,WAAW,SAAS,IAAI,cAAc,EAAE,IAAI,EAAE;CAC3F,IAAI,CAA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U,CAAC,GAAG;CACrC,MAAM,OAAO,QAAQ,QAAQ,QAAQ,IAAI;CACzC,MAAM,SAAS,QAAQ,UAAU;CACjC,MAAM,eAAe,QAAQ,gBAAgB;CAC7C,MAAM,iBAAiB,QAAQ,kBAAkB;CACjD,MAAM,QAAQ,QAAQ,SAAS;CAC/B,MAAM,WAAW,QAAQ,IAAI;CAC7B,MAAM,SAAS,YAAY,MAAM;EAChC;EACA;EACA;CACD,CAAC;CACD,IAAI;EACH,QAAQ,MAAM,IAAI;EAClB,0BAA0B,MAAM,MAAM;EACtC,MAAM,MAAM,qBAAqB;GAChC,GAAG;GACH;EACD,GAAG;GACF,cAAc,OAAO;GACrB,cAAc,OAAO;EACtB,CAAC,CAAC;EACF,IAAI,cAAc;GACjB,MAAM,EAAE,sCAAsC,MAAM,OAAO;GAC3D,MAAM,kCAAkC,IAAI;EAC7C;CACD,UAAU;EACT,QAAQ,MAAM,QAAQ;CACvB;CACA,OAAO,EAAE,aAAa,OAAO,YAAY;AAC1C;;;;;;;AAOA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,EAAE,gBAAgB,MAAM,OAAO;CACrC,MAAM,aAAa,iBAAiB,SAAS;EAC5C,GAAG;EACH,cAAc;EACd,gBAAgB;CACjB,CAAC,GAAG,OAAO;AACZ"}
1
+ {"version":3,"file":"dist-CoFdTDow.mjs","names":["toPosix$1","toPosix"],"sources":["../../../packages/build/dist/walk-project-eIHZ7A1f.mjs","../../../packages/tsdown-config/deps.js","../../../packages/tsdown-config/index.js","../../../packages/build/dist/index.mjs"],"sourcesContent":["import { readFileSync, readdirSync, realpathSync, statSync } from \"node:fs\";\nimport { join, relative, resolve, sep } from \"node:path\";\nimport { createHash } from \"node:crypto\";\nimport { entryIdFromFile, readKeystrokeIgnoreDirective, shouldSkipKeystrokeModuleFile } from \"@keystrokehq/manifest/discovery\";\nimport { fileURLToPath } from \"node:url\";\n//#region src/ignore-guard-plugin.ts\nfunction toPosix$1(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction projectRelativePath(root, filePath) {\n\treturn toPosix$1(relative(root, normalizeBuildFilePath(filePath)));\n}\n/** Normalize paths so /var and /private/var compare equal on macOS. */\nfunction normalizeBuildFilePath(filePath) {\n\tconst absolute = resolve(filePath);\n\ttry {\n\t\treturn realpathSync.native(absolute);\n\t} catch {\n\t\treturn absolute;\n\t}\n}\nfunction normalizeModuleId(id, root) {\n\tif (id.startsWith(\"\\0\")) return null;\n\tconst normalized = normalizeBuildFilePath(id.startsWith(\"file://\") ? fileURLToPath(id) : id);\n\tif (!normalized.startsWith(normalizeBuildFilePath(root))) return null;\n\treturn normalized;\n}\nfunction formatImportGuardError(root, ignoredPath, importer) {\n\tconst ignored = projectRelativePath(root, ignoredPath);\n\tif (importer) return `Cannot import \"${ignored}\" (@keystroke ignore) from \"${projectRelativePath(root, importer)}\". Remove the directive or stop importing it from a shipped module.`;\n\treturn `Cannot import \"${ignored}\" (@keystroke ignore). Remove the directive or stop importing it from a shipped module.`;\n}\n/** Throw when a built module imports a `@keystroke ignore` source file. */\nfunction keystrokeIgnoreGuardPlugin(options) {\n\tconst root = normalizeBuildFilePath(options.root);\n\tconst ignoredFiles = new Set(options.ignoredFiles.map((filePath) => normalizeBuildFilePath(filePath)));\n\tfunction assertNotIgnored(filePath, importer) {\n\t\tconst normalized = normalizeBuildFilePath(filePath);\n\t\tif (!ignoredFiles.has(normalized)) return;\n\t\tthrow new Error(formatImportGuardError(root, normalized, importer));\n\t}\n\treturn {\n\t\tname: \"keystroke-ignore-guard\",\n\t\tasync resolveId(source, importer, resolveOptions) {\n\t\t\tif (resolveOptions?.isEntry || !importer) return null;\n\t\t\tconst resolved = await this.resolve(source, importer, {\n\t\t\t\t...resolveOptions,\n\t\t\t\tskipSelf: true\n\t\t\t});\n\t\t\tif (!resolved) return null;\n\t\t\tassertNotIgnored(typeof resolved === \"string\" ? resolved : resolved.id, importer);\n\t\t\treturn null;\n\t\t},\n\t\tload(id) {\n\t\t\tconst normalized = normalizeModuleId(id, root);\n\t\t\tif (!normalized) return null;\n\t\t\tassertNotIgnored(normalized);\n\t\t\treturn null;\n\t\t}\n\t};\n}\n//#endregion\n//#region src/walk-project.ts\nconst IGNORED_DIRS = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".git\",\n\t\".turbo\",\n\t\"build\",\n\t\"coverage\",\n\t\".keystroke\",\n\t\".cache\",\n\t\"tmp\"\n]);\nconst IGNORED_ENV_FILE = /\\.env/;\nconst IGNORED_LOG_FILE = /\\.log$/;\nfunction isIgnoredFile(name) {\n\treturn IGNORED_ENV_FILE.test(name) || IGNORED_LOG_FILE.test(name);\n}\nfunction toPosix(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction isProbablyBinary(buffer) {\n\tconst sampleLength = Math.min(buffer.length, 8e3);\n\tfor (let index = 0; index < sampleLength; index += 1) if (buffer[index] === 0) return true;\n\treturn false;\n}\nfunction classifyBuildEntry(root, srcRoot, filePath) {\n\tconst relativePath = toPosix(relative(root, filePath));\n\tconst agentsPrefix = `${toPosix(relative(root, join(srcRoot, \"agents\")))}/`;\n\tconst workflowsPrefix = `${toPosix(relative(root, join(srcRoot, \"workflows\")))}/`;\n\tconst triggersPrefix = `${toPosix(relative(root, join(srcRoot, \"triggers\")))}/`;\n\tconst actionsPrefix = `${toPosix(relative(root, join(srcRoot, \"actions\")))}/`;\n\tif (relativePath.startsWith(agentsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"agents\"), filePath, { nestedEntry: \"agent\" });\n\t\treturn id ? {\n\t\t\tentryKey: `agents/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(actionsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"actions\"), filePath, { nestedEntry: \"action\" });\n\t\treturn id ? {\n\t\t\tentryKey: `actions/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(workflowsPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"workflows\"), filePath, { nestedEntry: \"workflow\" });\n\t\treturn id ? {\n\t\t\tentryKey: `workflows/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\tif (relativePath.startsWith(triggersPrefix) && /\\.(ts|mts)$/.test(relativePath) && !/\\.(int\\.)?test\\.(ts|mts)$/.test(relativePath)) {\n\t\tconst id = entryIdFromFile(join(srcRoot, \"triggers\"), filePath, { nestedEntry: \"trigger\" });\n\t\treturn id ? {\n\t\t\tentryKey: `triggers/${id}`,\n\t\t\tentryPath: filePath\n\t\t} : null;\n\t}\n\treturn null;\n}\nfunction shouldSkipIgnoredModule(filePath, phase) {\n\treturn shouldSkipKeystrokeModuleFile(readKeystrokeIgnoreDirective(filePath), phase);\n}\nfunction isSrcTypeScriptFile(srcRoot, filePath) {\n\tconst relativePath = toPosix(relative(srcRoot, filePath));\n\tif (relativePath.startsWith(\"..\")) return false;\n\treturn /\\.(ts|mts)$/.test(relativePath);\n}\nfunction walkTree(root, dir, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals) {\n\tfor (const name of readdirSync(dir).sort()) {\n\t\tif (collectSources && (sourceFiles.length >= 2e3 || totals.bytes >= 8388608)) return;\n\t\tconst absolute = join(dir, name);\n\t\tconst stats = statSync(absolute);\n\t\tif (stats.isDirectory()) {\n\t\t\tif (IGNORED_DIRS.has(name)) continue;\n\t\t\twalkTree(root, absolute, srcRoot, phase, collectSources, sourceFiles, buildEntries, ignoredFiles, totals);\n\t\t\tcontinue;\n\t\t}\n\t\tif (!stats.isFile()) continue;\n\t\tconst isUnderSrc = isSrcTypeScriptFile(srcRoot, absolute);\n\t\tconst skipIgnored = isUnderSrc ? shouldSkipIgnoredModule(absolute, phase) : false;\n\t\tif (isUnderSrc && skipIgnored) ignoredFiles.push(normalizeBuildFilePath(absolute));\n\t\tconst buildEntry = classifyBuildEntry(root, srcRoot, absolute);\n\t\tif (buildEntry && !skipIgnored) buildEntries[buildEntry.entryKey] = buildEntry.entryPath;\n\t\tif (!collectSources) continue;\n\t\tif (stats.size > 262144 || isIgnoredFile(name)) continue;\n\t\tconst buffer = readFileSync(absolute);\n\t\tif (isProbablyBinary(buffer)) continue;\n\t\ttotals.bytes += buffer.byteLength;\n\t\tsourceFiles.push({\n\t\t\tpath: toPosix(relative(root, absolute)),\n\t\t\tcontents: buffer.toString(\"utf8\"),\n\t\t\thash: createHash(\"sha256\").update(buffer).digest(\"hex\")\n\t\t});\n\t}\n}\n/**\n* One full-tree walk of the project: classifies tsdown entries and optionally\n* collects deploy source files (path + contents + hash) under snapshot limits.\n*/\nfunction walkProject(root, srcDirOrOptions = \"src\", maybeOptions) {\n\tconst srcDir = typeof srcDirOrOptions === \"string\" ? srcDirOrOptions : srcDirOrOptions.srcDir ?? \"src\";\n\tconst options = typeof srcDirOrOptions === \"string\" ? maybeOptions ?? {} : srcDirOrOptions;\n\tconst collectSources = options.collectSources ?? false;\n\tconst phase = options.phase ?? \"build\";\n\tconst sourceFiles = [];\n\tconst buildEntries = {};\n\tconst ignoredFiles = [];\n\twalkTree(root, root, join(root, srcDir), phase, collectSources, sourceFiles, buildEntries, ignoredFiles, { bytes: 0 });\n\treturn {\n\t\tsourceFiles,\n\t\tbuildEntries,\n\t\tignoredFiles\n\t};\n}\n//#endregion\nexport { keystrokeIgnoreGuardPlugin as n, walkProject as t };\n\n//# sourceMappingURL=walk-project-eIHZ7A1f.mjs.map","import { isBuiltin } from \"node:module\";\n\n/** Native addons kept external — resolved from the CLI runtime at app start. */\nexport const NATIVE_RUNTIME_DEPS = [\"pg\", \"better-sqlite3\", \"@parcel/watcher\"];\n\n/**\n * Framework/runtime `@keystrokehq/*` shipped in the project-server image, so user-app builds\n * keep them external and resolve them from the runtime at boot. Everything else under the scope\n * (Composio catalog integrations like `@keystrokehq/posthog`, …) is bundled into the artifact.\n *\n * This set MUST equal the `@keystrokehq/*` dependency closure of `@keystrokehq/project-runtime`\n * (the deploy image) — `deps.test.ts` enforces it. To change what stays external, change what the\n * runtime image depends on; do not edit this list by hand. `exa` is the only integration\n * package the framework imports directly (web search); `gateway` ships Slack and other channel\n * adapters in the runtime image.\n */\nexport const RUNTIME_KEYSTROKE_PACKAGES = new Set([\n \"access-control\",\n \"action\",\n \"agent\",\n \"app\",\n \"auth\",\n \"build\",\n \"config\",\n \"credentials\",\n \"database\",\n \"exa\",\n \"gateway\",\n \"hosting\",\n \"http\",\n \"keystroke\",\n \"manifest\",\n \"mcp\",\n \"memory\",\n \"oauth\",\n \"platform-database\",\n \"project-runtime\",\n \"projects\",\n \"runtime\",\n \"sandbox\",\n \"scheduler\",\n \"sdk\",\n \"secrets\",\n \"shared\",\n \"storage\",\n \"tracing\",\n \"trigger\",\n \"tsdown-config\",\n \"web-search\",\n \"worker\",\n \"workflow\",\n \"workflow-canvas\",\n]);\n\n/** Matches framework/runtime `@keystrokehq/*` kept external during user-app builds. */\nexport const FRAMEWORK_KEYSTROKE_EXTERNAL = new RegExp(\n `^@keystrokehq\\\\/(?:${[...RUNTIME_KEYSTROKE_PACKAGES].sort().join(\"|\")})(?:\\\\/|$)`,\n);\n\nfunction keystrokePackageName(name) {\n if (!name.startsWith(\"@keystrokehq/\")) {\n return null;\n }\n\n return name.slice(\"@keystrokehq/\".length).split(\"/\")[0] ?? null;\n}\n\nfunction isRuntimeKeystrokePackage(name) {\n const pkg = keystrokePackageName(name);\n return pkg !== null && RUNTIME_KEYSTROKE_PACKAGES.has(pkg);\n}\n\n/**\n * Kept external so .d.ts emission does not inline internal/inferred types.\n *\n * `typescript` is external because the TS compiler cannot be cleanly bundled into\n * ESM — it mixes `require()`/`__filename` with top-level await, which Node rejects\n * with `ERR_AMBIGUOUS_MODULE_SYNTAX` on load. Packages that use the compiler\n * (`workflow-canvas`, `manifest`, `build`) declare it as a dependency, so it\n * resolves from `node_modules` at runtime instead of being inlined.\n */\nexport const LIBRARY_EXTERNAL_DEPS = [\n \"better-auth\",\n /^@better-auth\\//,\n /^better-auth\\//,\n \"typescript\",\n];\n\n/** Non-auth runtime deps kept external for published entry bundles (platform, etc.). */\nexport const BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS = [\n ...NATIVE_RUNTIME_DEPS,\n \"dockerode\",\n \"ssh2\",\n \"cpu-features\",\n \"microsandbox\",\n /^@aws-sdk\\//,\n /^@napi-rs\\//,\n \"hono\",\n /^@hono\\//,\n \"undici\",\n];\n\n/** Kept external when bundling published entry points (cli, keystroke, platform). */\nexport const BUNDLED_ENTRY_EXTERNAL_DEPS = [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...LIBRARY_EXTERNAL_DEPS,\n];\n\n/** Bundle into CLI — device login uses Better Auth client only. */\nexport const BETTER_AUTH_CLIENT_BUNDLE_PATTERNS = [\n /^better-auth\\/client$/,\n /^better-auth\\/client\\//,\n];\n\n/** Server adapters and root entry — must not ship in the CLI bundle. */\nexport const BETTER_AUTH_SERVER_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^@better-auth\\//,\n /^better-auth\\/(?!client(\\/|$)).+/,\n];\n\nexport function isNativeRuntimeDep(id) {\n return NATIVE_RUNTIME_DEPS.some((dep) => id === dep || id.startsWith(`${dep}/`));\n}\n\nfunction packageName(id) {\n if (id.startsWith(\"@\")) {\n const [scope, name] = id.split(\"/\");\n return name ? `${scope}/${name}` : id;\n }\n\n return id.split(\"/\")[0] ?? id;\n}\n\nfunction isRuntimeExternal(id) {\n const name = packageName(id);\n if (isNativeRuntimeDep(name)) {\n return true;\n }\n\n if (name.startsWith(\"@keystrokehq/\")) {\n return isRuntimeKeystrokePackage(name);\n }\n\n if (name === \"better-auth\" || name.startsWith(\"@better-auth/\")) {\n return true;\n }\n\n return false;\n}\n\n/** Library packages resolve npm deps from node_modules at runtime. */\nexport function libraryBuildDepsConfig() {\n return {\n alwaysBundle: (_id) => null,\n neverBundle: [...NATIVE_RUNTIME_DEPS, /^@keystrokehq\\//, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Bundle npm deps into dist; resolve @keystrokehq/* and natives from the runtime. */\nexport function userAppBuildDepsConfig() {\n return {\n alwaysBundle: (id, _importer) => {\n if (id.startsWith(\".\") || id.startsWith(\"/\") || isBuiltin(id)) {\n return null;\n }\n\n return isRuntimeExternal(id) ? null : true;\n },\n neverBundle: [...NATIVE_RUNTIME_DEPS, FRAMEWORK_KEYSTROKE_EXTERNAL, ...LIBRARY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/**\n * Published entry packages (cli, keystroke, platform): declare bundled @keystrokehq/*\n * in dependencies (changesets release graph ignores devDependencies). Inlining is\n * driven by alwaysBundle below, not by dep kind. Runtime npm deps stay external.\n */\nexport function bundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//],\n neverBundle: [...BUNDLED_ENTRY_EXTERNAL_DEPS],\n onlyBundle: false,\n };\n}\n\n/** Published CLI: inline better-auth client + @better-auth/*; keep server adapters external. */\nexport const BETTER_AUTH_CLI_BUNDLE_PATTERNS = [\n ...BETTER_AUTH_CLIENT_BUNDLE_PATTERNS,\n /^@better-auth\\//,\n];\n\nexport const BETTER_AUTH_CLI_EXTERNAL_PATTERNS = [\n /^better-auth$/,\n /^better-auth\\/(?!client(\\/|$)).+/,\n /^@better-auth\\/drizzle-adapter/,\n \"drizzle-orm\",\n];\n\n/** Rolldown/tsdown — native bindings; stay in CLI node_modules at runtime. */\nexport const CLI_BUILD_TOOL_EXTERNAL_PATTERNS = [\"tsdown\", \"rolldown\", /^@rolldown\\//, \"tsx\"];\n\n/** CLI: inline better-auth/client; keep server + drizzle adapters external. */\nexport function cliBundledEntryDepsConfig() {\n return {\n alwaysBundle: [/^@keystrokehq\\//, ...BETTER_AUTH_CLI_BUNDLE_PATTERNS],\n neverBundle: [\n ...BUNDLED_ENTRY_RUNTIME_EXTERNAL_DEPS,\n ...BETTER_AUTH_CLI_EXTERNAL_PATTERNS,\n ...CLI_BUILD_TOOL_EXTERNAL_PATTERNS,\n // The TS compiler cannot be inlined into ESM (`require`/`__filename` + top-level\n // await → `__filename is not defined` / `ERR_AMBIGUOUS_MODULE_SYNTAX` on load).\n // The CLI inlines the @keystrokehq/* packages that use it (build, manifest,\n // workflow-canvas), so `typescript` must resolve from the CLI's own node_modules —\n // hence it is also a runtime dependency of @keystrokehq/cli.\n \"typescript\",\n ],\n onlyBundle: false,\n };\n}\n","import { bundledEntryDepsConfig, libraryBuildDepsConfig } from \"./deps.js\";\n\nexport {\n isNativeRuntimeDep,\n NATIVE_RUNTIME_DEPS,\n bundledEntryDepsConfig,\n cliBundledEntryDepsConfig,\n libraryBuildDepsConfig,\n userAppBuildDepsConfig,\n} from \"./deps.js\";\n\nexport const baseTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: libraryBuildDepsConfig(),\n};\n\n/** tsdown config for published bundles (cli, keystroke, platform). */\nexport const bundledEntryTsdownConfig = {\n format: [\"esm\", \"cjs\"],\n dts: true,\n clean: true,\n sourcemap: true,\n target: \"node20\",\n deps: bundledEntryDepsConfig(),\n};\n","import { n as keystrokeIgnoreGuardPlugin, t as walkProject } from \"./walk-project-eIHZ7A1f.mjs\";\nimport { t as resolveModuleDirs } from \"./resolve-module-dirs-BPHQhRGy.mjs\";\nimport { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from \"node:fs\";\nimport { dirname, join, relative, sep } from \"node:path\";\nimport { packAssetDirs } from \"@keystrokehq/sandbox/files\";\nimport { baseTsdownConfig, userAppBuildDepsConfig } from \"@keystrokehq/tsdown-config\";\nimport { build, mergeConfig } from \"tsdown\";\nimport { classifyCall, computeCallSiteIds, diagnoseWorkflowSource, locateWorkflow } from \"@keystrokehq/workflow-canvas\";\nimport ts from \"typescript\";\nimport { buildStoredRouteManifestForProject } from \"@keystrokehq/manifest\";\n//#region src/inject-call-site-ids.ts\n/**\n* Build-time injection of the deterministic structural `callSiteId` into every\n* durable step call in a workflow source file, so the runtime emits\n* `step:<callSiteId>#<occurrence>` correlation ids (and `step:<callSiteId>`\n* credential consumer ids) that line up 1:1 with the canvas graph nodes the\n* deploy-time producer mints from the same source. There is no user-authored\n* step id — identity is entirely internal and injected here.\n*\n* Injection shape by kind (the `callSiteId` is the same id `computeCallSiteIds`\n* returns, which equals the producer's step-node id):\n* - action/sub-workflow `x.run(i)` → `x.run(i).__site(\"<id>\")` (builder method)\n* - agent `a.prompt(i, opts?)` → `__site` merged into the prompt options\n* - llm `promptLlm(i, opts?)` → `__site` merged into the options\n* - hook `ctx.hook(opts?)` → `__site` merged into the options\n* - sleep `ctx.sleep(d, opts?)` → `__site` merged into a second options arg\n*/\nfunction injectCallSiteIds(code, fileName) {\n\tconst sourceFile = ts.createSourceFile(fileName, code, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);\n\tconst located = locateWorkflow(sourceFile);\n\tif (!located) return code;\n\tconst ids = computeCallSiteIds(sourceFile);\n\tif (ids.size === 0) return code;\n\tconst edits = [];\n\tfor (const [node, id] of ids) {\n\t\tconst info = classifyCall(node, located.ctxParamName);\n\t\tif (!info) continue;\n\t\tif (info.callKind === \"workflow-step\") {\n\t\t\tedits.push({\n\t\t\t\tpos: node.getEnd(),\n\t\t\t\ttext: `.__site(${JSON.stringify(id)})`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"agent\" || info.callKind === \"llm\") {\n\t\t\tpushOptionsEdit(edits, node, id);\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"hook\") {\n\t\t\tpushHookOptionsEdit(edits, node, id);\n\t\t\tcontinue;\n\t\t}\n\t\tif (info.callKind === \"wait\") pushSleepOptionsEdit(edits, node, id);\n\t}\n\tif (edits.length === 0) return code;\n\tedits.sort((a, b) => b.pos - a.pos);\n\tlet out = code;\n\tfor (const edit of edits) out = out.slice(0, edit.pos) + edit.text + out.slice(edit.pos);\n\treturn out;\n}\n/**\n* Merge `__site: \"<id>\"` into a call's options argument (agents / promptLlm).\n* - no 2nd arg → append `, { __site: \"id\" }`\n* - 2nd arg object literal → insert `__site: \"id\", ` after its `{`\n* - 2nd arg anything else → wrap as `{ ...orig, __site: \"id\" }`\n*/\nfunction pushOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst optionsArg = call.arguments[1];\n\tif (!optionsArg) {\n\t\tconst firstArg = call.arguments[0];\n\t\tconst insertAt = firstArg ? firstArg.getEnd() : call.getEnd() - 1;\n\t\tedits.push({\n\t\t\tpos: insertAt,\n\t\t\ttext: `, { __site: ${literal} }`\n\t\t});\n\t\treturn;\n\t}\n\tif (ts.isObjectLiteralExpression(optionsArg)) {\n\t\tedits.push({\n\t\t\tpos: optionsArg.getStart() + 1,\n\t\t\ttext: ` __site: ${literal},`\n\t\t});\n\t\treturn;\n\t}\n\tedits.push({\n\t\tpos: optionsArg.getStart(),\n\t\ttext: \"{ ...\"\n\t});\n\tedits.push({\n\t\tpos: optionsArg.getEnd(),\n\t\ttext: `, __site: ${literal} }`\n\t});\n}\n/** Merge `__site` into `ctx.hook(opts?)` — options are the first (only) argument. */\nfunction pushHookOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst optionsArg = call.arguments[0];\n\tif (!optionsArg) {\n\t\tedits.push({\n\t\t\tpos: call.getEnd() - 1,\n\t\t\ttext: `{ __site: ${literal} }`\n\t\t});\n\t\treturn;\n\t}\n\tif (ts.isObjectLiteralExpression(optionsArg)) {\n\t\tedits.push({\n\t\t\tpos: optionsArg.getStart() + 1,\n\t\t\ttext: ` __site: ${literal},`\n\t\t});\n\t\treturn;\n\t}\n\tedits.push({\n\t\tpos: optionsArg.getStart(),\n\t\ttext: \"{ ...\"\n\t});\n\tedits.push({\n\t\tpos: optionsArg.getEnd(),\n\t\ttext: `, __site: ${literal} }`\n\t});\n}\n/** Append `{ __site }` as the second arg to `ctx.sleep(duration)`. */\nfunction pushSleepOptionsEdit(edits, call, id) {\n\tconst literal = JSON.stringify(id);\n\tconst durationArg = call.arguments[0];\n\tconst insertAt = durationArg ? durationArg.getEnd() : call.getEnd() - 1;\n\tedits.push({\n\t\tpos: insertAt,\n\t\ttext: `, { __site: ${literal} }`\n\t});\n}\nfunction toPosix$2(path) {\n\treturn path.split(sep).join(\"/\");\n}\n/**\n* Rolldown plugin that runs {@link injectCallSiteIds} over workflow source files\n* (and their same-file helpers) before transpile. Scoped to `src/workflows/` so\n* non-workflow modules are untouched; cross-file helpers stay unkeyed by design.\n*/\nfunction callSiteIdInjectionPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst workflowsPrefix = toPosix$2(`${options.root}/${srcDir}/workflows/`);\n\treturn {\n\t\tname: \"keystroke-call-site-ids\",\n\t\ttransform(code, id) {\n\t\t\tconst normalized = toPosix$2(id);\n\t\t\tif (!normalized.startsWith(workflowsPrefix) || !normalized.endsWith(\".ts\")) return null;\n\t\t\tconst transformed = injectCallSiteIds(code, normalized);\n\t\t\treturn transformed === code ? null : {\n\t\t\t\tcode: transformed,\n\t\t\t\tmap: null\n\t\t\t};\n\t\t}\n\t};\n}\n//#endregion\n//#region src/workflow-diagnostics.ts\nconst TEST_FILE = /\\.(test|int\\.test|spec)\\.ts$/;\nfunction toPosix$1(path) {\n\treturn path.split(sep).join(\"/\");\n}\nfunction collectTsFiles(dir, out) {\n\tlet entries;\n\ttry {\n\t\tentries = readdirSync(dir);\n\t} catch {\n\t\treturn;\n\t}\n\tfor (const entry of entries) {\n\t\tif (entry === \"node_modules\" || entry.startsWith(\".\")) continue;\n\t\tconst full = join(dir, entry);\n\t\tif (statSync(full).isDirectory()) {\n\t\t\tcollectTsFiles(full, out);\n\t\t\tcontinue;\n\t\t}\n\t\tif (entry.endsWith(\".ts\") && !TEST_FILE.test(entry)) out.push(full);\n\t}\n}\n/**\n* Run the workflow-canvas reliability checks over every `src/**` module. Errors\n* (steps outside a workflow, steps nested as call arguments) block the build;\n* warnings (opaque code-blocks, dropped spread inputs) explain each degraded\n* construct. Best-effort per-file: an unparseable file is skipped, never fatal.\n*/\nfunction collectWorkflowDiagnostics(root, srcDir = \"src\") {\n\tconst srcRoot = join(root, srcDir);\n\tif (!existsSync(srcRoot)) return [];\n\tconst files = [];\n\tcollectTsFiles(srcRoot, files);\n\tconst diagnostics = [];\n\tfor (const file of files) {\n\t\tconst rel = toPosix$1(relative(root, file));\n\t\ttry {\n\t\t\tconst source = readFileSync(file, \"utf8\");\n\t\t\tdiagnostics.push(...diagnoseWorkflowSource(source, rel));\n\t\t} catch {}\n\t}\n\treturn diagnostics;\n}\nfunction formatDiagnostic(diagnostic) {\n\treturn ` ${diagnostic.line !== void 0 ? `${diagnostic.fileName}:${diagnostic.line}:${diagnostic.column ?? 1}` : diagnostic.fileName}\\n ${diagnostic.message}`;\n}\n/**\n* Collect diagnostics, print warnings, and throw a formatted error when any\n* blocking (error-severity) diagnostic is found. Call before building/emitting.\n*/\nfunction assertWorkflowDiagnostics(root, srcDir = \"src\") {\n\tconst diagnostics = collectWorkflowDiagnostics(root, srcDir);\n\tconst errors = diagnostics.filter((d) => d.severity === \"error\");\n\tconst warnings = diagnostics.filter((d) => d.severity === \"warning\");\n\tif (warnings.length > 0) console.warn(`\\n⚠ Workflow canvas: ${warnings.length} construct(s) will render as a degraded (opaque) canvas:\\n${warnings.map(formatDiagnostic).join(\"\\n\")}\\n`);\n\tif (errors.length > 0) throw new Error(`Workflow canvas: ${errors.length} unsupported construct(s) must be fixed before deploy:\\n${errors.map(formatDiagnostic).join(\"\\n\")}\\n`);\n}\n//#endregion\n//#region src/resolve-runtime-artifact.ts\nfunction packageRoot(nodeModules, scope, name) {\n\tconst direct = scope ? join(nodeModules, scope, name) : join(nodeModules, name);\n\tif (existsSync(join(direct, \"package.json\"))) return direct;\n\tconst pnpmDir = join(nodeModules, \".pnpm\");\n\tif (!existsSync(pnpmDir)) return null;\n\tfor (const entry of readdirSync(pnpmDir)) {\n\t\tconst candidate = scope ? join(pnpmDir, entry, \"node_modules\", scope, name) : join(pnpmDir, entry, \"node_modules\", name);\n\t\tif (existsSync(join(candidate, \"package.json\"))) return candidate;\n\t}\n\treturn null;\n}\n/** Resolve a file shipped with `@keystrokehq/build` inside the CLI runtime. */\nfunction resolveRuntimeBuildArtifact(runtimeNodeModules, relativePath) {\n\tconst pkgRoot = packageRoot(runtimeNodeModules, \"@keystrokehq\", \"build\");\n\tif (!pkgRoot) throw new Error(\"Keystroke runtime is missing @keystrokehq/build\");\n\tconst artifact = join(pkgRoot, relativePath);\n\tif (!existsSync(artifact)) throw new Error(`Keystroke runtime artifact not found: ${relativePath}`);\n\treturn artifact;\n}\n//#endregion\n//#region src/vitest-plugin.ts\nconst ASSETS_MODULE$1 = \"@keystrokehq/assets\";\nconst virtualPrefix = `\\0${ASSETS_MODULE$1}:`;\n/** Vitest plugin resolving `@keystrokehq/assets` from disk. */\nfunction agentAssetsVitestPlugin(appRoot = process.cwd()) {\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE$1) return null;\n\t\t\treturn `${virtualPrefix}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${virtualPrefix}manifest`) return null;\n\t\t\tmanifest ??= packAssetDirs(appRoot);\n\t\t\treturn `export default ${JSON.stringify(manifest)};`;\n\t\t}\n\t};\n}\nfunction findAppRootFromConfig(configFile) {\n\tif (!configFile) return process.cwd();\n\treturn dirname(configFile);\n}\nfunction agentAssetsVitestPluginFromConfig(configFile) {\n\treturn agentAssetsVitestPlugin(findAppRootFromConfig(configFile));\n}\n//#endregion\n//#region src/resolve-build-filter.ts\n/** Resolve exact build-entry keys for a filtered deploy build. */\nfunction resolveBuildFilter(filter, buildEntries) {\n\tif (filter.length === 0) throw new Error(\"At least one --filter entry is required\");\n\tconst matched = {};\n\tfor (const key of [...new Set(filter)]) {\n\t\tconst entryPath = buildEntries[key];\n\t\tif (!entryPath) throw new Error(`Unknown build entry \"${key}\". Use keys like agents/foo or workflows/bar from walkProject.`);\n\t\tmatched[key] = entryPath;\n\t}\n\treturn matched;\n}\n//#endregion\n//#region src/build-filtered.ts\nfunction toPosix(path) {\n\treturn path.replace(/\\\\/g, \"/\");\n}\nfunction distRelativePath(entryKey) {\n\treturn `${entryKey}.mjs`;\n}\nasync function buildSingleEntry(root, entryKey, entryPath, ignoredFiles) {\n\tmkdirSync(join(root, \".keystroke\"), { recursive: true });\n\tconst scratchRoot = mkdtempSync(join(root, \".keystroke\", \"filter-build-\"));\n\tconst outDir = join(scratchRoot, \"dist\");\n\tconst relativePath = distRelativePath(entryKey);\n\tawait build(mergeConfig(baseTsdownConfig, {\n\t\tentry: { [entryKey]: entryPath },\n\t\tformat: [\"esm\"],\n\t\toutDir,\n\t\tclean: true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [keystrokeIgnoreGuardPlugin({\n\t\t\troot,\n\t\t\tignoredFiles\n\t\t})]\n\t}));\n\treturn {\n\t\tscratchRoot,\n\t\trelativePath\n\t};\n}\nasync function manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap) {\n\tconst moduleFile = toPosix(relative(root, entryPath));\n\tconst distPath = join(root, \"dist\", relativePath);\n\tconst distMapPath = `${distPath}.map`;\n\tconst previousDist = existsSync(distPath) ? readFileSync(distPath) : void 0;\n\tconst hadMap = existsSync(distMapPath);\n\tconst previousMap = hadMap ? readFileSync(distMapPath) : void 0;\n\tmkdirSync(dirname(distPath), { recursive: true });\n\twriteFileSync(distPath, contents);\n\tif (sourceMap) writeFileSync(distMapPath, sourceMap);\n\ttry {\n\t\treturn (await buildStoredRouteManifestForProject(root, { reloadModules: true })).entries.filter((entry) => \"moduleFile\" in entry && entry.moduleFile === moduleFile);\n\t} finally {\n\t\tif (previousDist) writeFileSync(distPath, previousDist);\n\t\telse rmSync(distPath, { force: true });\n\t\tif (previousMap) writeFileSync(distMapPath, previousMap);\n\t\telse if (sourceMap || hadMap) rmSync(distMapPath, { force: true });\n\t}\n}\n/** Build selected modules in isolation for a filtered deploy merge. */\nasync function buildFilteredApp(options) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst phase = options.phase ?? \"deploy\";\n\tconst collectSources = options.collectSources ?? false;\n\tconst previous = process.cwd();\n\tassertWorkflowDiagnostics(root, srcDir);\n\tconst walked = walkProject(root, {\n\t\tsrcDir,\n\t\tcollectSources,\n\t\tphase\n\t});\n\tconst matched = resolveBuildFilter(options.filter, walked.buildEntries);\n\tconst files = [];\n\tconst manifestEntries = [];\n\ttry {\n\t\tprocess.chdir(root);\n\t\tfor (const [entryKey, entryPath] of Object.entries(matched)) {\n\t\t\tconst { scratchRoot, relativePath } = await buildSingleEntry(root, entryKey, entryPath, walked.ignoredFiles);\n\t\t\ttry {\n\t\t\t\tconst builtPath = join(scratchRoot, \"dist\", relativePath);\n\t\t\t\tconst mapPath = `${builtPath}.map`;\n\t\t\t\tconst contents = readFileSync(builtPath);\n\t\t\t\tconst sourceMap = existsSync(mapPath) ? readFileSync(mapPath) : void 0;\n\t\t\t\tfiles.push({\n\t\t\t\t\tentryKey,\n\t\t\t\t\trelativePath,\n\t\t\t\t\tcontents,\n\t\t\t\t\tsourceMap\n\t\t\t\t});\n\t\t\t\tmanifestEntries.push(...await manifestEntriesForBuiltModule(root, entryPath, relativePath, contents, sourceMap));\n\t\t\t} finally {\n\t\t\t\trmSync(scratchRoot, {\n\t\t\t\t\trecursive: true,\n\t\t\t\t\tforce: true\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n\treturn {\n\t\tfiles,\n\t\tmanifestEntries,\n\t\tsourceFiles: walked.sourceFiles\n\t};\n}\n//#endregion\n//#region src/index.ts\nconst ASSETS_MODULE = \"@keystrokehq/assets\";\nconst VIRTUAL_PREFIX = `\\0${ASSETS_MODULE}:`;\nfunction renderAssetModule(manifest) {\n\treturn `export default ${JSON.stringify(manifest)};\\n`;\n}\n/** Rolldown plugin: pack src/skills + src/files and expose `@keystrokehq/assets`. */\nfunction agentAssetsPlugin(options) {\n\tconst srcDir = options.srcDir ?? \"src\";\n\tlet manifest = null;\n\treturn {\n\t\tname: \"keystroke-assets\",\n\t\tbuildStart() {\n\t\t\tmanifest = packAssetDirs(options.root, srcDir);\n\t\t},\n\t\tresolveId(source) {\n\t\t\tif (source !== ASSETS_MODULE) return null;\n\t\t\treturn `${VIRTUAL_PREFIX}manifest`;\n\t\t},\n\t\tload(id) {\n\t\t\tif (id !== `${VIRTUAL_PREFIX}manifest` || !manifest) return null;\n\t\t\treturn renderAssetModule(manifest);\n\t\t},\n\t\tbuildEnd() {\n\t\t\tif (!manifest) return;\n\t\t\tconst outDir = join(options.root, options.outDir ?? \"dist\", \".keystroke\");\n\t\t\tmkdirSync(outDir, { recursive: true });\n\t\t\twriteFileSync(join(outDir, \"assets.mjs\"), renderAssetModule(manifest));\n\t\t}\n\t};\n}\n/** Full tsdown config for user keystroke apps (config + discovered modules only). */\nfunction createAppBuildConfig(options = {}, walked) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst outDir = options.outDir ?? \"dist\";\n\tconst configEntry = existsSync(join(root, \"keystroke.config.ts\")) ? join(root, \"keystroke.config.ts\") : void 0;\n\tconst walkedResult = walked ?? walkProject(root, {\n\t\tsrcDir,\n\t\tphase: options.phase\n\t});\n\tconst discovered = walkedResult.buildEntries;\n\tconst ignoredFiles = walkedResult.ignoredFiles;\n\tconst entries = {\n\t\t...configEntry ? { config: configEntry } : {},\n\t\t...discovered\n\t};\n\tif (Object.keys(entries).length === 0) throw new Error(\"Nothing to build — add keystroke.config.ts or modules under src/\");\n\treturn mergeConfig(baseTsdownConfig, {\n\t\tentry: entries,\n\t\tformat: [\"esm\"],\n\t\toutDir: join(root, outDir),\n\t\tclean: options.clean ?? true,\n\t\tdts: false,\n\t\tloader: { \".md\": \"text\" },\n\t\tdeps: userAppBuildDepsConfig(),\n\t\tplugins: [\n\t\t\tkeystrokeIgnoreGuardPlugin({\n\t\t\t\troot,\n\t\t\t\tignoredFiles\n\t\t\t}),\n\t\t\tcallSiteIdInjectionPlugin({\n\t\t\t\troot,\n\t\t\t\tsrcDir\n\t\t\t}),\n\t\t\tagentAssetsPlugin({\n\t\t\t\troot,\n\t\t\t\tsrcDir,\n\t\t\t\toutDir\n\t\t\t})\n\t\t]\n\t});\n}\n/** Build user agents, workflows, triggers, and config to `dist/`. */\nasync function buildApp(options = {}) {\n\tconst root = options.root ?? process.cwd();\n\tconst srcDir = options.srcDir ?? \"src\";\n\tconst emitManifest = options.emitManifest ?? true;\n\tconst collectSources = options.collectSources ?? false;\n\tconst phase = options.phase ?? \"build\";\n\tconst previous = process.cwd();\n\tconst walked = walkProject(root, {\n\t\tsrcDir,\n\t\tcollectSources,\n\t\tphase\n\t});\n\ttry {\n\t\tprocess.chdir(root);\n\t\tassertWorkflowDiagnostics(root, srcDir);\n\t\tawait build(createAppBuildConfig({\n\t\t\t...options,\n\t\t\troot\n\t\t}, {\n\t\t\tbuildEntries: walked.buildEntries,\n\t\t\tignoredFiles: walked.ignoredFiles\n\t\t}));\n\t\tif (emitManifest) {\n\t\t\tconst { emitStoredRouteManifestForProject } = await import(\"@keystrokehq/manifest\");\n\t\t\tawait emitStoredRouteManifestForProject(root);\n\t\t}\n\t} finally {\n\t\tprocess.chdir(previous);\n\t}\n\treturn { sourceFiles: walked.sourceFiles };\n}\n/**\n* Watch `src/` and rebuild `dist/` on change.\n*\n* NOT true hot reload — each change runs a full tsdown rebuild. Callers should\n* restart the API server in `onRebuild` so discovery picks up new/changed modules.\n*/\nasync function watchApp(options = {}) {\n\tconst { runWatchApp } = await import(\"./watch-app-DTIeKrbl.mjs\");\n\tawait runWatchApp((watchOptions) => buildApp({\n\t\t...watchOptions,\n\t\temitManifest: false,\n\t\tcollectSources: false\n\t}), options);\n}\n//#endregion\nexport { agentAssetsVitestPlugin, agentAssetsVitestPluginFromConfig, assertWorkflowDiagnostics, buildApp, buildFilteredApp, callSiteIdInjectionPlugin, collectWorkflowDiagnostics, createAppBuildConfig, injectCallSiteIds, resolveBuildFilter, resolveModuleDirs, resolveRuntimeBuildArtifact, watchApp };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;AAMA,SAASA,YAAU,MAAM;CACxB,OAAO,KAAK,MAAM,GAAG,EAAE,KAAK,GAAG;AAChC;AACA,SAAS,oBAAoB,MAAM,UAAU;CAC5C,OAAOA,YAAU,SAAS,MAAM,uBAAuB,QAAQ,CAAC,CAAC;AAClE;;AAEA,SAAS,uBAAuB,UAAU;CACzC,MAAM,WAAW,QAAQ,QAAQ;CACjC,IAAI;EACH,OAAO,aAAa,OAAO,QAAQ;CACpC,QAAQ;EACP,OAAO;CACR;AACD;AACA,SAAS,kBAAkB,IAAI,MAAM;CACpC,IAAI,GAAG,WAAW,IAAI,GAAG,OAAO;CAChC,MAAM,aAAa,uBAAuB,GAAG,WAAW,SAAS,IAAI,cAAc,EAAE,IAAI,EAAE;CAC3F,IAAI,CAAC,WAAW,WAAW,uBAAuB,IAAI,CAAC,GAAG,OAAO;CACjE,OAAO;AACR;AACA,SAAS,uBAAuB,MAAM,aAAa,UAAU;CAC5D,MAAM,UAAU,oBAAoB,MAAM,WAAW;CACrD,IAAI,UAAU,OAAO,kBAAkB,QAAQ,8BAA8B,oBAAoB,MAAM,QAAQ,EAAE;CACjH,OAAO,kBAAkB,QAAQ;AAClC;;AAEA,SAAS,2BAA2B,SAAS;CAC5C,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CACD,IAAI;EACH,QAAQ,MAAM,IAAI;EAClB,0BAA0B,MAAM,MAAM;EACtC,MAAM,MAAM,qBAAqB;GAChC,GAAG;GACH;EACD,GAAG;GACF,cAAc,OAAO;GACrB,cAAc,OAAO;EACtB,CAAC,CAAC;EACF,IAAI,cAAc;GACjB,MAAM,EAAE,sCAAsC,MAAM,OAAO;GAC3D,MAAM,kCAAkC,IAAI;EAC7C;CACD,UAAU;EACT,QAAQ,MAAM,QAAQ;CACvB;CACA,OAAO,EAAE,aAAa,OAAO,YAAY;AAC1C;;;;;;;AAOA,eAAe,SAAS,UAAU,CAAC,GAAG;CACrC,MAAM,EAAE,gBAAgB,MAAM,OAAO;CACrC,MAAM,aAAa,iBAAiB,SAAS;EAC5C,GAAG;EACH,cAAc;EACd,gBAAgB;CACjB,CAAC,GAAG,OAAO;AACZ"}
@@ -6413,6 +6413,8 @@ const nullableOptionalTimestamp = string().nullable().optional();
6413
6413
  const AppCredentialSummarySchema = object({
6414
6414
  id: string().min(1),
6415
6415
  appId: string().min(1),
6416
+ /** Stable per-scope identifier; pass to `--credential` to pin a specific instance. */
6417
+ slug: string().min(1),
6416
6418
  label: string().min(1),
6417
6419
  scope: AppCredentialScopeSchema,
6418
6420
  lastRefreshedAt: string().nullable(),
@@ -6570,7 +6572,7 @@ const McpCredentialAssignmentTargetSchema = object({
6570
6572
  type: CredentialAssignmentTargetTypeSchema,
6571
6573
  key: string().trim().min(1)
6572
6574
  });
6573
- object({
6575
+ const ExecuteKeystrokeToolRequestSchema = object({
6574
6576
  app: string().trim().min(1),
6575
6577
  tool: string().trim().min(1),
6576
6578
  arguments: record(string(), unknown()).default({}),
@@ -6579,7 +6581,11 @@ object({
6579
6581
  /** When set, platform MCP resolve checks credential assignments before scope defaults. */
6580
6582
  assignmentTarget: McpCredentialAssignmentTargetSchema.optional(),
6581
6583
  /** Tool/step consumer id for assignment lookup (action slug or workflow step correlation id). */
6582
- consumerId: string().trim().min(1).optional()
6584
+ consumerId: string().trim().min(1).optional(),
6585
+ /** Explicit credential instance slug; overrides default resolution to pick that instance. */
6586
+ credentialSlug: string().trim().min(1).optional(),
6587
+ /** Project slug (CLI --project); the platform resolves it to a project and binds that scope. */
6588
+ projectSlug: string().trim().min(1).optional()
6583
6589
  });
6584
6590
  object({
6585
6591
  error: _enum([
@@ -8144,6 +8150,6 @@ const WorkflowCanvasCredentialBindingSchema = union([
8144
8150
  const WorkflowCanvasCredentialBindingsSchema = record(string(), array(WorkflowCanvasCredentialBindingSchema));
8145
8151
  const WorkflowRunInputsPutBodySchema = record(string(), unknown());
8146
8152
  //#endregion
8147
- export { GetCustomAppResponseSchema as $, originFromPublicUrl as $n, SlugAvailabilityResponseSchema as $t, CreateCustomAppRequestSchema as A, WorkflowCanvasRunSchema as An, datetime as Ar, PollRunResponseSchema as At, CredentialConsumerListQuerySchema as B, WorkspaceTriggerDetailSchema as Bn, ProjectReachabilityResponseSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, UploadProjectSourceResponseSchema as Cn, optional as Cr, ListProjectsResponseSchema as Ct, CreateCredentialInstanceBodySchema as D, UserPreferencesPatchSchema as Dn, union as Dr, OrganizationSidebarBrandingSchema as Dt, CreateApiKeyResponseSchema as E, UserAvatarSchema as En, string as Er, OrganizationSidebarBrandingPatchSchema as Et, CreateProjectRequestSchema as F, WorkflowRunInputsSchema as Fn, PresignProjectSourceRequestSchema as Ft, DOCS_QUERY_TOOL as G, WorkspaceWorkflowOverviewSchema as Gn, PromptResponseSchema as Gt, CredentialInstanceListResponseSchema as H, WorkspaceTriggerListResponseSchema as Hn, ProjectSettingsResponseSchema as Ht, CreateProjectResponseSchema as I, WorkflowRunListResponseSchema as In, PresignProjectSourceResponseSchema as It, DownloadActiveProjectArtifactResponseSchema as J, deriveCustomAppDisplay as Jn, QueuedRunResponseSchema as Jt, DOCS_SEARCH_TOOL as K, buildConnectDeeplink as Kn, PublicModelsResponseSchema as Kt, CredentialAssignmentListQuerySchema as L, WorkflowRunResponseSchema as Ln, PresignUserAvatarRequestSchema as Lt, CreateOrganizationRequestSchema as M, WorkflowRunDetailResponseSchema as Mn, safeParse$1 as Mr, PresignChatAttachmentResponseSchema as Mt, CreateOrganizationResponseSchema as N, WorkflowRunHooksResponseSchema as Nn, NEVER as Nr, PresignOrgLogoRequestSchema as Nt, CreateCredentialsRequestSchema as O, UserPreferencesSchema as On, unknown as Or, PROJECT_PULL_STATE_RELATIVE_PATH as Ot, CreateProjectArtifactResponseSchema as P, WorkflowRunInputsPutBodySchema as Pn, PresignOrgLogoResponseSchema as Pt, GetCredentialResponseSchema as Q, normalizeCredentialList as Qn, SkillSummaryListResponseSchema as Qt, CredentialAssignmentListResponseSchema as R, WorkflowSummaryDetailResponseSchema as Rn, PresignUserAvatarResponseSchema as Rt, CompleteProjectArtifactResponseSchema as S, UploadProjectSourceManifestRequestSchema as Sn, object as Sr, ListProjectMetricsResponseSchema as St, CreateApiKeyRequestSchema as T, UserAvatarPatchSchema as Tn, record as Tr, OpenApiDiscoverResponseSchema as Tt, CredentialInstanceRecordSchema as U, WorkspaceTriggerOverviewSchema as Un, ProjectSlugAvailabilityResponseSchema as Ut, CredentialConsumerListResponseSchema as V, WorkspaceTriggerFileSchema as Vn, ProjectResponseSchema as Vt, DEFAULT_CLOUD_PLATFORM_ORIGIN as W, WorkspaceTriggerRunListResponseSchema as Wn, PromptInputSchema as Wt, ErrorResponseSchema as X, isAcceptableInstallExit as Xn, RecentResourceListResponseSchema as Xt, DownloadActiveProjectSourceResponseSchema as Y, detectProjectPackageManagerFromSnapshot as Yn, ROUTE_MANIFEST_REL_PATH as Yt, GatewayAttachmentRecordSchema as Z, listenPortFromPublicUrl as Zn, SkillSummaryDetailResponseSchema as Zt, ChannelAccountListResponseSchema as _, UpdateOrganizationRequestSchema as _n, discriminatedUnion as _r, ListOrganizationMembersResponseSchema as _t, AgentSessionDetailResponseSchema as a, StartOAuthConnectionResultSchema as an, resolveDocsMcpUrl as ar, HistoryRunListResponseSchema as at, ChannelDirectoryListResponseSchema as b, UpdateProjectRequestSchema as bn, looseObject as br, ListProjectFilesResponseSchema as bt, AgentSummaryListResponseSchema as c, TriggerDetailResponseSchema as cn, number as cr, InviteProjectMembersRequestSchema as ct, AssignCredentialBodySchema as d, TriggerRunListResponseSchema as dn, _function as dr, ListAgentMemoryFilesResponseSchema as dt, StartKeystrokeConnectionInputSchema as en, parseAppSlug as er, GraphqlDiscoverResponseSchema as et, BindChannelBodySchema as f, UpdateChannelBindingBodySchema as fn, _null as fr, ListAgentWorkspaceFilesResponseSchema as ft, CatalogAppsPageResponseSchema as g, UpdateOrganizationMemberResponseSchema as gn, custom as gr, ListOrganizationInvitationsResponseSchema as gt, CatalogAppDetailResponseSchema as h, UpdateOrganizationMemberRequestSchema as hn, boolean as hr, ListCredentialsResponseSchema as ht, AgentSessionChatStateResponseSchema as i, StartOAuthConnectionInputSchema as in, resolveConnectAppSlug as ir, HistoryRunListQuerySchema as it, CreateCustomAppResponseSchema as j, WorkflowCanvasSchema as jn, toJSONSchema as jr, PresignChatAttachmentRequestSchema as jt, CreateCredentialsResponseSchema as k, WorkflowCanvasCredentialBindingsSchema as kn, url as kr, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as kt, AgentTriggerSummaryListResponseSchema as l, TriggerListResponseSchema as ln, ZodType as lr, InviteProjectMembersResponseSchema as lt, CatalogActionsPageResponseSchema as m, UpdateCredentialRequestSchema as mn, array as mr, ListAppsResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, StartMcpOAuthConnectionInputSchema as nn, parseStoredRouteManifest as nr, HistoryRunCancelResponseSchema as nt, AgentSessionListResponseSchema as o, SubmitMarketingContactRequestSchema as on, resolvePublicPlatformOrigin as or, InviteOrganizationMembersRequestSchema as ot, CatalogActionDetailResponseSchema as p, UpdateCredentialInstanceBodySchema as pn, any as pr, ListApiKeysResponseSchema as pt, DeclineOrganizationInvitationResponseSchema as q, credentialInputSchema as qn, QueuedAgentPromptResponseSchema as qt, ActiveOrganizationResponseSchema as r, StartMcpOAuthConnectionResultSchema as rn, requiredDisplayTextSchema as rr, HistoryRunDetailResponseSchema as rt, AgentSummaryDetailResponseSchema as s, SubmitTeamRequestRequestSchema as sn, slugifyAppName as sr, InviteOrganizationMembersResponseSchema as st, ACTIVE_ORG_HEADER as t, StartKeystrokeConnectionResultSchema as tn, parseErrorResponse as tr, HealthResponseSchema as tt, AppSlugAvailabilityResponseSchema as u, TriggerRunDetailResponseSchema as un, _enum as ur, LOCAL_PLATFORM_ORIGIN as ut, ChannelConnectionListResponseSchema as v, UpdateProjectMemberRequestSchema as vn, intersection as vr, ListOrganizationsResponseSchema as vt, ConnectProvidersResponseSchema as w, UpsertGatewayAttachmentBodySchema as wn, preprocess as wr, McpDiscoverResponseSchema as wt, ChannelPlatformSchema as x, UpdateProjectSettingsRequestSchema as xn, number$1 as xr, ListProjectMembersResponseSchema as xt, ChannelConnectionSchema as y, UpdateProjectMemberResponseSchema as yn, literal as yr, ListProjectDeploymentsResponseSchema as yt, CredentialAssignmentRecordSchema as z, WorkflowSummaryListResponseSchema as zn, ProjectPullStateSchema as zt };
8153
+ export { GetCredentialResponseSchema as $, normalizeCredentialList as $n, SkillSummaryListResponseSchema as $t, CreateCustomAppRequestSchema as A, WorkflowCanvasCredentialBindingsSchema as An, url as Ar, PROJECT_REACHABILITY_REQUEST_TIMEOUT_MS as At, CredentialConsumerListQuerySchema as B, WorkflowSummaryListResponseSchema as Bn, ProjectPullStateSchema as Bt, ConnectAuthorizeUrlResponseSchema as C, UploadProjectSourceManifestRequestSchema as Cn, object as Cr, ListProjectMetricsResponseSchema as Ct, CreateCredentialInstanceBodySchema as D, UserAvatarSchema as Dn, string as Dr, OrganizationSidebarBrandingPatchSchema as Dt, CreateApiKeyResponseSchema as E, UserAvatarPatchSchema as En, record as Er, OpenApiDiscoverResponseSchema as Et, CreateProjectRequestSchema as F, WorkflowRunInputsPutBodySchema as Fn, PresignOrgLogoResponseSchema as Ft, DOCS_QUERY_TOOL as G, WorkspaceTriggerRunListResponseSchema as Gn, PromptInputSchema as Gt, CredentialInstanceListResponseSchema as H, WorkspaceTriggerFileSchema as Hn, ProjectResponseSchema as Ht, CreateProjectResponseSchema as I, WorkflowRunInputsSchema as In, PresignProjectSourceRequestSchema as It, DownloadActiveProjectArtifactResponseSchema as J, credentialInputSchema as Jn, QueuedAgentPromptResponseSchema as Jt, DOCS_SEARCH_TOOL as K, WorkspaceWorkflowOverviewSchema as Kn, PromptResponseSchema as Kt, CredentialAssignmentListQuerySchema as L, WorkflowRunListResponseSchema as Ln, PresignProjectSourceResponseSchema as Lt, CreateOrganizationRequestSchema as M, WorkflowCanvasSchema as Mn, toJSONSchema as Mr, PresignChatAttachmentRequestSchema as Mt, CreateOrganizationResponseSchema as N, WorkflowRunDetailResponseSchema as Nn, safeParse$1 as Nr, PresignChatAttachmentResponseSchema as Nt, CreateCredentialsRequestSchema as O, UserPreferencesPatchSchema as On, union as Or, OrganizationSidebarBrandingSchema as Ot, CreateProjectArtifactResponseSchema as P, WorkflowRunHooksResponseSchema as Pn, NEVER as Pr, PresignOrgLogoRequestSchema as Pt, GatewayAttachmentRecordSchema as Q, listenPortFromPublicUrl as Qn, SkillSummaryDetailResponseSchema as Qt, CredentialAssignmentListResponseSchema as R, WorkflowRunResponseSchema as Rn, PresignUserAvatarRequestSchema as Rt, CompleteProjectArtifactResponseSchema as S, UpdateProjectSettingsRequestSchema as Sn, number$1 as Sr, ListProjectMembersResponseSchema as St, CreateApiKeyRequestSchema as T, UpsertGatewayAttachmentBodySchema as Tn, preprocess as Tr, McpDiscoverResponseSchema as Tt, CredentialInstanceRecordSchema as U, WorkspaceTriggerListResponseSchema as Un, ProjectSettingsResponseSchema as Ut, CredentialConsumerListResponseSchema as V, WorkspaceTriggerDetailSchema as Vn, ProjectReachabilityResponseSchema as Vt, DEFAULT_CLOUD_PLATFORM_ORIGIN as W, WorkspaceTriggerOverviewSchema as Wn, ProjectSlugAvailabilityResponseSchema as Wt, ErrorResponseSchema as X, detectProjectPackageManagerFromSnapshot as Xn, ROUTE_MANIFEST_REL_PATH as Xt, DownloadActiveProjectSourceResponseSchema as Y, deriveCustomAppDisplay as Yn, QueuedRunResponseSchema as Yt, ExecuteKeystrokeToolRequestSchema as Z, isAcceptableInstallExit as Zn, RecentResourceListResponseSchema as Zt, ChannelAccountListResponseSchema as _, UpdateOrganizationMemberResponseSchema as _n, custom as _r, ListOrganizationInvitationsResponseSchema as _t, AgentSessionDetailResponseSchema as a, StartOAuthConnectionInputSchema as an, resolveConnectAppSlug as ar, HistoryRunListQuerySchema as at, ChannelDirectoryListResponseSchema as b, UpdateProjectMemberResponseSchema as bn, literal as br, ListProjectDeploymentsResponseSchema as bt, AgentSummaryListResponseSchema as c, SubmitTeamRequestRequestSchema as cn, slugifyAppName as cr, InviteOrganizationMembersResponseSchema as ct, AssignCredentialBodySchema as d, TriggerRunDetailResponseSchema as dn, _enum as dr, LOCAL_PLATFORM_ORIGIN as dt, SlugAvailabilityResponseSchema as en, originFromPublicUrl as er, GetCustomAppResponseSchema as et, BindChannelBodySchema as f, TriggerRunListResponseSchema as fn, _function as fr, ListAgentMemoryFilesResponseSchema as ft, CatalogAppsPageResponseSchema as g, UpdateOrganizationMemberRequestSchema as gn, boolean as gr, ListCredentialsResponseSchema as gt, CatalogAppDetailResponseSchema as h, UpdateCredentialRequestSchema as hn, array as hr, ListAppsResponseSchema as ht, AgentSessionChatStateResponseSchema as i, StartMcpOAuthConnectionResultSchema as in, requiredDisplayTextSchema as ir, HistoryRunDetailResponseSchema as it, CreateCustomAppResponseSchema as j, WorkflowCanvasRunSchema as jn, datetime as jr, PollRunResponseSchema as jt, CreateCredentialsResponseSchema as k, UserPreferencesSchema as kn, unknown as kr, PROJECT_PULL_STATE_RELATIVE_PATH as kt, AgentTriggerSummaryListResponseSchema as l, TriggerDetailResponseSchema as ln, number as lr, InviteProjectMembersRequestSchema as lt, CatalogActionsPageResponseSchema as m, UpdateCredentialInstanceBodySchema as mn, any as mr, ListApiKeysResponseSchema as mt, AcceptOrganizationInvitationResponseSchema as n, StartKeystrokeConnectionResultSchema as nn, parseErrorResponse as nr, HealthResponseSchema as nt, AgentSessionListResponseSchema as o, StartOAuthConnectionResultSchema as on, resolveDocsMcpUrl as or, HistoryRunListResponseSchema as ot, CatalogActionDetailResponseSchema as p, UpdateChannelBindingBodySchema as pn, _null as pr, ListAgentWorkspaceFilesResponseSchema as pt, DeclineOrganizationInvitationResponseSchema as q, buildConnectDeeplink as qn, PublicModelsResponseSchema as qt, ActiveOrganizationResponseSchema as r, StartMcpOAuthConnectionInputSchema as rn, parseStoredRouteManifest as rr, HistoryRunCancelResponseSchema as rt, AgentSummaryDetailResponseSchema as s, SubmitMarketingContactRequestSchema as sn, resolvePublicPlatformOrigin as sr, InviteOrganizationMembersRequestSchema as st, ACTIVE_ORG_HEADER as t, StartKeystrokeConnectionInputSchema as tn, parseAppSlug as tr, GraphqlDiscoverResponseSchema as tt, AppSlugAvailabilityResponseSchema as u, TriggerListResponseSchema as un, ZodType as ur, InviteProjectMembersResponseSchema as ut, ChannelConnectionListResponseSchema as v, UpdateOrganizationRequestSchema as vn, discriminatedUnion as vr, ListOrganizationMembersResponseSchema as vt, ConnectProvidersResponseSchema as w, UploadProjectSourceResponseSchema as wn, optional as wr, ListProjectsResponseSchema as wt, ChannelPlatformSchema as x, UpdateProjectRequestSchema as xn, looseObject as xr, ListProjectFilesResponseSchema as xt, ChannelConnectionSchema as y, UpdateProjectMemberRequestSchema as yn, intersection as yr, ListOrganizationsResponseSchema as yt, CredentialAssignmentRecordSchema as z, WorkflowSummaryDetailResponseSchema as zn, PresignUserAvatarResponseSchema as zt };
8148
8154
 
8149
- //# sourceMappingURL=dist-COhdZicI.mjs.map
8155
+ //# sourceMappingURL=dist-DkLbeW8l.mjs.map