eve 0.67.0 → 0.67.2

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.
Files changed (673) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/src/channel/channel-address.d.ts +2 -2
  3. package/dist/src/channel/compiled-channel.d.ts +3 -2
  4. package/dist/src/channel/cross-channel-receive.d.ts +1 -18
  5. package/dist/src/channel/cross-channel-receive.js +1 -1
  6. package/dist/src/channel/forwarded-principal.d.ts +3 -2
  7. package/dist/src/channel/resolve-text.d.ts +2 -1
  8. package/dist/src/channel/schedule-auth.d.ts +0 -2
  9. package/dist/src/channel/schedule-auth.js +1 -1
  10. package/dist/src/channel/schedule.d.ts +2 -2
  11. package/dist/src/channel/session-callback.d.ts +2 -1
  12. package/dist/src/channel/types.d.ts +0 -7
  13. package/dist/src/chunks/{use-eve-agent-OCHP4s0z.js → use-eve-agent-D4HVZBjn.js} +1 -1
  14. package/dist/src/chunks/{use-eve-agent-DzdyI97Z.js → use-eve-agent-DXcE_8Ja.js} +1 -1
  15. package/dist/src/cli/acp/command.d.ts +2 -1
  16. package/dist/src/cli/agent-command.d.ts +2 -1
  17. package/dist/src/cli/agent-detection.d.ts +0 -1
  18. package/dist/src/cli/agent-detection.js +1 -1
  19. package/dist/src/cli/application-command.d.ts +2 -1
  20. package/dist/src/cli/application-root.d.ts +3 -8
  21. package/dist/src/cli/application-root.js +1 -1
  22. package/dist/src/cli/commands/agent-instructions.d.ts +0 -4
  23. package/dist/src/cli/commands/agent-instructions.js +3 -3
  24. package/dist/src/cli/commands/extension-init.js +1 -1
  25. package/dist/src/cli/commands/init-agent-workspace.js +1 -1
  26. package/dist/src/cli/commands/init-project.d.ts +0 -1
  27. package/dist/src/cli/commands/init-project.js +1 -1
  28. package/dist/src/cli/commands/init-target.d.ts +1 -1
  29. package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
  30. package/dist/src/cli/commands/init.js +1 -1
  31. package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
  32. package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
  33. package/dist/src/cli/commands/registry-install-transaction.js +1 -1
  34. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
  35. package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
  36. package/dist/src/cli/commands/registry-presentation.js +1 -1
  37. package/dist/src/cli/commands/registry-project.d.ts +2 -1
  38. package/dist/src/cli/commands/registry.d.ts +0 -4
  39. package/dist/src/cli/commands/registry.js +1 -1
  40. package/dist/src/cli/commands/setup-headless.d.ts +2 -1
  41. package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
  42. package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
  43. package/dist/src/cli/dev/diagnostic-dump.js +1 -1
  44. package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
  45. package/dist/src/cli/dev/environment.js +1 -1
  46. package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
  47. package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
  48. package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
  49. package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
  50. package/dist/src/cli/dev/tui/errors.d.ts +2 -7
  51. package/dist/src/cli/dev/tui/errors.js +1 -1
  52. package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
  53. package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
  54. package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
  55. package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
  56. package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
  57. package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
  58. package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
  59. package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
  60. package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
  61. package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
  62. package/dist/src/cli/dev/tui/runner.d.ts +0 -1
  63. package/dist/src/cli/dev/tui/runner.js +1 -1
  64. package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
  65. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
  66. package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
  67. package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
  68. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
  69. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  70. package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
  71. package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
  72. package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
  73. package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
  74. package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
  75. package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
  76. package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
  77. package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
  78. package/dist/src/cli/dev/ui-options.d.ts +3 -2
  79. package/dist/src/cli/dev/url-target.d.ts +2 -1
  80. package/dist/src/cli/invoke/command.d.ts +0 -11
  81. package/dist/src/cli/invoke/command.js +1 -1
  82. package/dist/src/cli/invoke/result.d.ts +1 -1
  83. package/dist/src/cli/telemetry/index.d.ts +0 -6
  84. package/dist/src/cli/telemetry/preference.d.ts +2 -1
  85. package/dist/src/cli/ui/alt-screen.d.ts +3 -2
  86. package/dist/src/cli/ui/live-region.d.ts +3 -2
  87. package/dist/src/cli/ui/output.d.ts +1 -16
  88. package/dist/src/cli/ui/output.js +2 -5
  89. package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
  90. package/dist/src/client/eve-agent-store-helpers.js +1 -1
  91. package/dist/src/client/eve-agent-store.js +1 -1
  92. package/dist/src/client/message-action-parts.d.ts +2 -1
  93. package/dist/src/client/session-utils.d.ts +3 -2
  94. package/dist/src/compiled/.vendor-stamp.json +6 -6
  95. package/dist/src/compiled/@workflow/core/index.js +2 -2
  96. package/dist/src/compiled/@workflow/core/private.js +1 -1
  97. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
  98. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
  99. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  100. package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
  101. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
  102. package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
  103. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
  104. package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
  105. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
  106. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  107. package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
  108. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  109. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
  110. package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
  111. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  112. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  113. package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
  114. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  115. package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
  116. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  117. package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
  118. package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
  119. package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
  120. package/dist/src/compiled/@workflow/world-local/index.js +5 -5
  121. package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
  122. package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
  123. package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
  124. package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
  125. package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
  126. package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
  127. package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
  128. package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
  129. package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
  130. package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
  131. package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
  132. package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
  133. package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
  134. package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
  135. package/dist/src/compiler/artifacts.d.ts +4 -27
  136. package/dist/src/compiler/artifacts.js +1 -1
  137. package/dist/src/compiler/compile-agent.d.ts +2 -1
  138. package/dist/src/compiler/compile-agent.js +1 -1
  139. package/dist/src/compiler/diagnostics.d.ts +0 -11
  140. package/dist/src/compiler/diagnostics.js +1 -1
  141. package/dist/src/compiler/manifest.d.ts +0 -4
  142. package/dist/src/compiler/module-map.d.ts +1 -5
  143. package/dist/src/compiler/module-map.js +1 -1
  144. package/dist/src/compiler/normalize-agent-config.js +1 -1
  145. package/dist/src/compiler/normalize-connection.d.ts +2 -1
  146. package/dist/src/compiler/normalize-instructions.d.ts +2 -6
  147. package/dist/src/compiler/normalize-instructions.js +1 -1
  148. package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
  149. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  150. package/dist/src/compiler/normalize-manifest.js +1 -1
  151. package/dist/src/compiler/normalize-skill.d.ts +2 -1
  152. package/dist/src/compiler/project-sources.d.ts +0 -14
  153. package/dist/src/compiler/project-sources.js +1 -1
  154. package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
  155. package/dist/src/compiler/source-graph.d.ts +1 -2
  156. package/dist/src/compiler/source-graph.js +1 -1
  157. package/dist/src/context/build-base-tool-context.d.ts +2 -1
  158. package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
  159. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  160. package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
  161. package/dist/src/context/dynamic-tool-metadata.js +1 -1
  162. package/dist/src/context/memory-lifecycle.d.ts +0 -8
  163. package/dist/src/context/memory-lifecycle.js +1 -1
  164. package/dist/src/discover/connections.d.ts +0 -15
  165. package/dist/src/discover/connections.js +1 -1
  166. package/dist/src/discover/diagnostics.d.ts +0 -12
  167. package/dist/src/discover/diagnostics.js +1 -1
  168. package/dist/src/discover/discover-agent.js +1 -1
  169. package/dist/src/discover/discover-subagent.d.ts +0 -1
  170. package/dist/src/discover/discover-subagent.js +1 -1
  171. package/dist/src/discover/extensions.d.ts +3 -10
  172. package/dist/src/discover/extensions.js +1 -1
  173. package/dist/src/discover/filesystem.d.ts +5 -9
  174. package/dist/src/discover/filesystem.js +1 -1
  175. package/dist/src/discover/grammar.d.ts +0 -46
  176. package/dist/src/discover/grammar.js +1 -1
  177. package/dist/src/discover/manifest.d.ts +5 -4
  178. package/dist/src/discover/memory.d.ts +0 -1
  179. package/dist/src/discover/memory.js +1 -1
  180. package/dist/src/discover/named-source-directory.js +1 -1
  181. package/dist/src/discover/project-source.d.ts +2 -1
  182. package/dist/src/discover/project.js +1 -1
  183. package/dist/src/discover/sandbox.js +1 -1
  184. package/dist/src/discover/skills.d.ts +0 -4
  185. package/dist/src/discover/skills.js +1 -1
  186. package/dist/src/evals/cli/eval-client.d.ts +2 -1
  187. package/dist/src/evals/judge.d.ts +2 -1
  188. package/dist/src/evals/runner/execute-task.d.ts +1 -1
  189. package/dist/src/evals/types.d.ts +1 -1
  190. package/dist/src/eve-channel/support.d.ts +1 -3
  191. package/dist/src/eve-channel/support.js +1 -1
  192. package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
  193. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  194. package/dist/src/execution/effective-agent-config.d.ts +2 -1
  195. package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
  196. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  197. package/dist/src/execution/history-view.d.ts +2 -1
  198. package/dist/src/execution/node-step.d.ts +3 -2
  199. package/dist/src/execution/runtime-context.js +1 -1
  200. package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
  201. package/dist/src/execution/sandbox/active-handles.js +1 -1
  202. package/dist/src/execution/sandbox/bash.d.ts +2 -1
  203. package/dist/src/execution/sandbox/bindings/docker-templates.js +1 -1
  204. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  205. package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
  206. package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
  207. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  208. package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
  209. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
  210. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  211. package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
  212. package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
  213. package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
  214. package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
  215. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  216. package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
  217. package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
  218. package/dist/src/execution/sandbox/dockerfile.js +1 -1
  219. package/dist/src/execution/sandbox/ensure.d.ts +2 -1
  220. package/dist/src/execution/sandbox/ensure.js +1 -1
  221. package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
  222. package/dist/src/execution/sandbox/prewarm.js +1 -1
  223. package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
  224. package/dist/src/execution/sandbox/require-sandbox.js +1 -1
  225. package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
  226. package/dist/src/execution/sandbox/truncate-output.js +2 -2
  227. package/dist/src/execution/session/admission.d.ts +3 -2
  228. package/dist/src/execution/session/event-sink.d.ts +2 -1
  229. package/dist/src/execution/session/finalization.d.ts +2 -1
  230. package/dist/src/execution/session/handoff.d.ts +3 -2
  231. package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
  232. package/dist/src/execution/session/timeout-control.d.ts +2 -1
  233. package/dist/src/execution/session-activity.d.ts +0 -3
  234. package/dist/src/execution/session-activity.js +1 -1
  235. package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
  236. package/dist/src/execution/session.d.ts +3 -2
  237. package/dist/src/execution/stable-workflow-names.d.ts +0 -6
  238. package/dist/src/execution/stable-workflow-names.js +1 -1
  239. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  240. package/dist/src/execution/tools/ask-question-workflow.js +1 -1
  241. package/dist/src/execution/tools/connection-search.js +1 -1
  242. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  243. package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
  244. package/dist/src/execution/tools/subagent/start.js +1 -1
  245. package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
  246. package/dist/src/execution/tools/workflow/background.d.ts +2 -6
  247. package/dist/src/execution/tools/workflow/background.js +1 -1
  248. package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
  249. package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
  250. package/dist/src/execution/web-fetch/execute.d.ts +2 -2
  251. package/dist/src/execution/web-fetch/request.d.ts +2 -1
  252. package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
  253. package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
  254. package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
  255. package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
  256. package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
  257. package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
  258. package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
  259. package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
  260. package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
  261. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  262. package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
  263. package/dist/src/framework/host-inventory.d.ts +3 -2
  264. package/dist/src/harness/approval-candidates.d.ts +4 -3
  265. package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
  266. package/dist/src/harness/authorization.d.ts +0 -9
  267. package/dist/src/harness/authorization.js +1 -1
  268. package/dist/src/harness/compaction-prompt.d.ts +2 -1
  269. package/dist/src/harness/coordination.d.ts +0 -4
  270. package/dist/src/harness/coordination.js +1 -1
  271. package/dist/src/harness/input-requests.d.ts +1 -10
  272. package/dist/src/harness/input-requests.js +1 -1
  273. package/dist/src/harness/pending-input-batches.d.ts +0 -5
  274. package/dist/src/harness/pending-input-batches.js +1 -1
  275. package/dist/src/harness/provider-safety.d.ts +9 -0
  276. package/dist/src/harness/provider-safety.js +1 -1
  277. package/dist/src/harness/provider-tools.d.ts +2 -1
  278. package/dist/src/harness/session-limit-continuation.d.ts +0 -4
  279. package/dist/src/harness/session-limit-continuation.js +1 -1
  280. package/dist/src/harness/session-usage-limits.d.ts +2 -1
  281. package/dist/src/harness/step-hooks.js +1 -1
  282. package/dist/src/harness/tool-loop.js +2 -2
  283. package/dist/src/harness/tool-model-output.d.ts +2 -1
  284. package/dist/src/harness/turn-cancellation.d.ts +2 -7
  285. package/dist/src/harness/turn-cancellation.js +1 -1
  286. package/dist/src/harness/turn-client-context.d.ts +2 -1
  287. package/dist/src/harness/workflow-stream-error.d.ts +0 -7
  288. package/dist/src/harness/workflow-stream-error.js +1 -1
  289. package/dist/src/instrumentation/runtime.js +1 -1
  290. package/dist/src/instrumentation/state.d.ts +2 -2
  291. package/dist/src/internal/agent-name.d.ts +0 -2
  292. package/dist/src/internal/agent-name.js +1 -1
  293. package/dist/src/internal/application/build-profile.d.ts +2 -2
  294. package/dist/src/internal/application/cache-metadata.js +1 -1
  295. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  296. package/dist/src/internal/application/dev-environment.d.ts +2 -8
  297. package/dist/src/internal/application/dev-environment.js +1 -1
  298. package/dist/src/internal/application/optional-package-import.js +1 -1
  299. package/dist/src/internal/application/optional-package-install.js +1 -1
  300. package/dist/src/internal/application/output-publication-lock.js +1 -1
  301. package/dist/src/internal/application/output-publication.d.ts +1 -1
  302. package/dist/src/internal/application/package.js +1 -1
  303. package/dist/src/internal/application/paths.d.ts +0 -5
  304. package/dist/src/internal/application/paths.js +1 -1
  305. package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
  306. package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
  307. package/dist/src/internal/authored-asset-import-plugin.js +1 -1
  308. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  309. package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
  310. package/dist/src/internal/authored-module-evaluation-error.js +1 -1
  311. package/dist/src/internal/authored-module-loader.js +1 -1
  312. package/dist/src/internal/authored-module-map-loader.js +1 -1
  313. package/dist/src/internal/authored-package-boundary.js +1 -1
  314. package/dist/src/internal/authored-relative-extension-resolver.js +1 -1
  315. package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
  316. package/dist/src/internal/bundler/extension-scope-plugin.js +1 -1
  317. package/dist/src/internal/bundler/nitro-rolldown.d.ts +3 -12
  318. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  319. package/dist/src/internal/bundler/vendored-dependency-log.d.ts +7 -0
  320. package/dist/src/internal/bundler/vendored-dependency-log.js +1 -0
  321. package/dist/src/internal/eve-project-root.d.ts +0 -3
  322. package/dist/src/internal/eve-project-root.js +1 -1
  323. package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
  324. package/dist/src/internal/external-resources.d.ts +0 -1
  325. package/dist/src/internal/external-resources.js +1 -1
  326. package/dist/src/internal/gateway.d.ts +2 -0
  327. package/dist/src/internal/gateway.js +1 -1
  328. package/dist/src/internal/helpers/markdown.js +1 -1
  329. package/dist/src/internal/instrumentation-layout.js +1 -1
  330. package/dist/src/internal/invocation/metadata.d.ts +1 -1
  331. package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
  332. package/dist/src/internal/materialized-authored-modules.js +1 -1
  333. package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
  334. package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
  335. package/dist/src/internal/mcp/streamable-http-server.js +1 -1
  336. package/dist/src/internal/model-catalog.d.ts +2 -1
  337. package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -1
  338. package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
  339. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  340. package/dist/src/internal/nitro/dev-runtime-source-snapshot-copy.js +1 -1
  341. package/dist/src/internal/nitro/dev-runtime-source-snapshot-local-roots.js +1 -1
  342. package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
  343. package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
  344. package/dist/src/internal/nitro/development-generation.d.ts +0 -1
  345. package/dist/src/internal/nitro/development-generation.js +1 -1
  346. package/dist/src/internal/nitro/host/build-application.js +1 -1
  347. package/dist/src/internal/nitro/host/build-extension.js +1 -1
  348. package/dist/src/internal/nitro/host/build-vercel-agent-summary.js +1 -1
  349. package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
  350. package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
  351. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  352. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
  353. package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
  354. package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
  355. package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
  356. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  357. package/dist/src/internal/nitro/host/extension-external-dependency-plugin.js +1 -1
  358. package/dist/src/internal/nitro/host/local-tracing-runtime-plugin.js +1 -1
  359. package/dist/src/internal/nitro/host/nitro-bundler-config.js +1 -1
  360. package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -26
  361. package/dist/src/internal/nitro/host/schedule-task-routes.js +2 -2
  362. package/dist/src/internal/nitro/host/start-production-server.js +1 -1
  363. package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
  364. package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
  365. package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
  366. package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
  367. package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
  368. package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
  369. package/dist/src/internal/vercel/build-agent-workspace.js +1 -1
  370. package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
  371. package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
  372. package/dist/src/internal/vercel/project-link.d.ts +2 -1
  373. package/dist/src/internal/vercel/project-link.js +1 -1
  374. package/dist/src/internal/workflow/development-world-client.js +1 -1
  375. package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
  376. package/dist/src/internal/workflow/development-world-server.js +1 -1
  377. package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
  378. package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
  379. package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
  380. package/dist/src/internal/workflow-bundle/builder.js +2 -2
  381. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
  382. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
  383. package/dist/src/internal/workflow-bundle/workflow-builders.js +1 -1
  384. package/dist/src/protocol/activity.d.ts +3 -3
  385. package/dist/src/protocol/activity.js +1 -1
  386. package/dist/src/protocol/baggage.d.ts +2 -2
  387. package/dist/src/protocol/cancel-turn.d.ts +0 -2
  388. package/dist/src/protocol/event-dedupe.d.ts +2 -1
  389. package/dist/src/protocol/event-id.d.ts +0 -6
  390. package/dist/src/protocol/event-id.js +1 -1
  391. package/dist/src/protocol/traceparent.d.ts +2 -1
  392. package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
  393. package/dist/src/public/channels/chat-sdk/audience.js +1 -1
  394. package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
  395. package/dist/src/public/channels/github/api.d.ts +2 -22
  396. package/dist/src/public/channels/github/api.js +1 -1
  397. package/dist/src/public/channels/github/auth.d.ts +0 -9
  398. package/dist/src/public/channels/github/auth.js +1 -1
  399. package/dist/src/public/channels/github/binding.d.ts +3 -2
  400. package/dist/src/public/channels/github/checkout.d.ts +3 -3
  401. package/dist/src/public/channels/github/defaults.d.ts +3 -2
  402. package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
  403. package/dist/src/public/channels/github/limits.d.ts +0 -2
  404. package/dist/src/public/channels/github/limits.js +2 -2
  405. package/dist/src/public/channels/github/pr-context.d.ts +2 -3
  406. package/dist/src/public/channels/github/pr-context.js +1 -1
  407. package/dist/src/public/channels/github/state.d.ts +2 -1
  408. package/dist/src/public/channels/github/verify.d.ts +2 -1
  409. package/dist/src/public/channels/linear/defaults.d.ts +2 -1
  410. package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
  411. package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
  412. package/dist/src/public/channels/slack/app-manifest.js +1 -1
  413. package/dist/src/public/channels/slack/hitl.d.ts +0 -4
  414. package/dist/src/public/channels/slack/hitl.js +2 -2
  415. package/dist/src/public/channels/slack/inbound.d.ts +2 -1
  416. package/dist/src/public/channels/slack/model-context.d.ts +0 -18
  417. package/dist/src/public/channels/slack/model-context.js +1 -1
  418. package/dist/src/public/channels/slack/mrkdwn.d.ts +0 -2
  419. package/dist/src/public/channels/slack/mrkdwn.js +1 -1
  420. package/dist/src/public/channels/slack/privacy.d.ts +2 -1
  421. package/dist/src/public/channels/slack/verify.d.ts +1 -1
  422. package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
  423. package/dist/src/public/channels/telegram/audience.d.ts +2 -3
  424. package/dist/src/public/channels/telegram/audience.js +1 -1
  425. package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
  426. package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
  427. package/dist/src/public/channels/twilio/defaults.js +1 -1
  428. package/dist/src/public/channels/twilio/routing.d.ts +2 -1
  429. package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
  430. package/dist/src/public/channels/upload-policy.d.ts +0 -11
  431. package/dist/src/public/channels/upload-policy.js +1 -1
  432. package/dist/src/public/definitions/channel.d.ts +1 -1
  433. package/dist/src/public/index.js +1 -1
  434. package/dist/src/public/memory/file/provider.js +1 -1
  435. package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
  436. package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
  437. package/dist/src/public/next/server.js +1 -1
  438. package/dist/src/public/nuxt/dev-server.d.ts +3 -2
  439. package/dist/src/public/nuxt/dev-server.js +1 -1
  440. package/dist/src/public/skills/index.js +1 -1
  441. package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
  442. package/dist/src/public/sveltekit/dev-server.js +1 -1
  443. package/dist/src/public/tools/index.js +1 -1
  444. package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
  445. package/dist/src/runtime/compiled-artifacts-source.js +1 -1
  446. package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
  447. package/dist/src/runtime/connections/instance-identity.js +1 -1
  448. package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
  449. package/dist/src/runtime/connections/mcp-tracing.js +1 -1
  450. package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
  451. package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
  452. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  453. package/dist/src/runtime/hooks/registry.d.ts +0 -7
  454. package/dist/src/runtime/hooks/registry.js +1 -1
  455. package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
  456. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
  457. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  458. package/dist/src/runtime/resolve-agent.d.ts +2 -2
  459. package/dist/src/runtime/resolve-agent.js +1 -1
  460. package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
  461. package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
  462. package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
  463. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
  464. package/dist/src/runtime/schedules/register.d.ts +0 -4
  465. package/dist/src/runtime/schedules/register.js +1 -1
  466. package/dist/src/self-modification/credentials.d.ts +1 -4
  467. package/dist/src/self-modification/credentials.js +1 -1
  468. package/dist/src/self-modification/extension/subagents/agent/tools/search_traces.js +1 -1
  469. package/dist/src/self-modification/filesystem.d.ts +0 -1
  470. package/dist/src/self-modification/filesystem.js +1 -1
  471. package/dist/src/self-modification/git-workspace.d.ts +0 -3
  472. package/dist/src/self-modification/git-workspace.js +1 -1
  473. package/dist/src/self-modification/github-publisher.d.ts +2 -1
  474. package/dist/src/self-modification/migration.d.ts +0 -1
  475. package/dist/src/self-modification/migration.js +1 -1
  476. package/dist/src/self-modification/mode.d.ts +2 -1
  477. package/dist/src/self-modification/proposal.d.ts +0 -2
  478. package/dist/src/self-modification/proposal.js +2 -2
  479. package/dist/src/self-modification/setup.js +1 -1
  480. package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
  481. package/dist/src/services/dev-client/request-headers.d.ts +1 -1
  482. package/dist/src/services/dev-client/vercel-auth-error.d.ts +0 -8
  483. package/dist/src/services/dev-client/vercel-auth-error.js +2 -3
  484. package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
  485. package/dist/src/setup/append-env.d.ts +3 -2
  486. package/dist/src/setup/ask.d.ts +3 -3
  487. package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
  488. package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
  489. package/dist/src/setup/boxes/link-project.d.ts +2 -1
  490. package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
  491. package/dist/src/setup/boxes/select-model.d.ts +2 -37
  492. package/dist/src/setup/boxes/select-model.js +1 -1
  493. package/dist/src/setup/cli/option-row.d.ts +1 -1
  494. package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
  495. package/dist/src/setup/cli/prompt-ui.js +1 -1
  496. package/dist/src/setup/cli/rail-log.d.ts +0 -2
  497. package/dist/src/setup/cli/rail-log.js +2 -2
  498. package/dist/src/setup/connect-provisioning.d.ts +2 -1
  499. package/dist/src/setup/connection-connector.d.ts +2 -1
  500. package/dist/src/setup/flows/link.d.ts +2 -1
  501. package/dist/src/setup/flows/model-login.d.ts +1 -1
  502. package/dist/src/setup/flows/model-source-change.js +1 -1
  503. package/dist/src/setup/flows/provider.d.ts +2 -45
  504. package/dist/src/setup/flows/provider.js +1 -4
  505. package/dist/src/setup/flows/registry-session.d.ts +3 -2
  506. package/dist/src/setup/integrations/discord/api.d.ts +2 -1
  507. package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
  508. package/dist/src/setup/integrations/discord/connect.js +1 -1
  509. package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
  510. package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
  511. package/dist/src/setup/integrations/github/connect.d.ts +3 -3
  512. package/dist/src/setup/integrations/github/connect.js +1 -1
  513. package/dist/src/setup/integrations/github/setup.d.ts +1 -1
  514. package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
  515. package/dist/src/setup/integrations/linear/connect.js +1 -1
  516. package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
  517. package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
  518. package/dist/src/setup/integrations/linq/connect.js +1 -1
  519. package/dist/src/setup/integrations/linq/management.d.ts +2 -1
  520. package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
  521. package/dist/src/setup/integrations/linq/setup.js +1 -1
  522. package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
  523. package/dist/src/setup/integrations/photon/connect.js +1 -1
  524. package/dist/src/setup/integrations/photon/management.d.ts +5 -4
  525. package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
  526. package/dist/src/setup/integrations/registry.d.ts +0 -2
  527. package/dist/src/setup/integrations/registry.js +1 -1
  528. package/dist/src/setup/integrations/runner.d.ts +3 -2
  529. package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
  530. package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
  531. package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
  532. package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
  533. package/dist/src/setup/integrations/teams/connect.js +1 -1
  534. package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
  535. package/dist/src/setup/integrations/web/setup.d.ts +2 -1
  536. package/dist/src/setup/primitives/pm/pnpm.js +1 -1
  537. package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
  538. package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
  539. package/dist/src/setup/primitives/process-output.d.ts +2 -1
  540. package/dist/src/setup/primitives/run-vercel.js +1 -1
  541. package/dist/src/setup/project-resolution.d.ts +0 -2
  542. package/dist/src/setup/project-resolution.js +1 -1
  543. package/dist/src/setup/provider-settings.js +1 -1
  544. package/dist/src/setup/quit-guard.d.ts +3 -2
  545. package/dist/src/setup/scaffold/connections/catalog.d.ts +0 -13
  546. package/dist/src/setup/scaffold/connections/catalog.js +1 -1
  547. package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
  548. package/dist/src/setup/scaffold/create/project.js +1 -1
  549. package/dist/src/setup/scaffold/files.d.ts +2 -1
  550. package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
  551. package/dist/src/setup/scaffold/version-tokens.js +1 -1
  552. package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
  553. package/dist/src/setup/scaffold/workspace-glob.js +1 -1
  554. package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
  555. package/dist/src/setup/scaffold/workspace-root.js +1 -1
  556. package/dist/src/setup/slack-connect-create.d.ts +1 -1
  557. package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
  558. package/dist/src/setup/slack-connect.d.ts +0 -4
  559. package/dist/src/setup/slack-connect.js +1 -1
  560. package/dist/src/setup/slackbot.d.ts +3 -3
  561. package/dist/src/setup/slackbot.js +1 -1
  562. package/dist/src/setup/vercel-api-failure.d.ts +0 -2
  563. package/dist/src/setup/vercel-api-failure.js +1 -1
  564. package/dist/src/setup/vercel-project-api.d.ts +1 -1
  565. package/dist/src/setup/vercel-project.d.ts +4 -38
  566. package/dist/src/setup/vercel-project.js +0 -0
  567. package/dist/src/shared/action-types.d.ts +1 -58
  568. package/dist/src/shared/action-types.js +1 -1
  569. package/dist/src/shared/agent-definition.d.ts +0 -3
  570. package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
  571. package/dist/src/shared/agent-turn-outcome.js +1 -1
  572. package/dist/src/shared/chatgpt-model.d.ts +0 -1
  573. package/dist/src/shared/chatgpt-model.js +1 -1
  574. package/dist/src/shared/conversation-context.d.ts +2 -1
  575. package/dist/src/shared/conversation-identity.d.ts +2 -0
  576. package/dist/src/shared/conversation-identity.js +1 -0
  577. package/dist/src/shared/extension-package-contract.d.ts +2 -1
  578. package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
  579. package/dist/src/shared/gateway-service-tier.d.ts +2 -1
  580. package/dist/src/shared/memory-state.d.ts +0 -8
  581. package/dist/src/shared/memory-state.js +1 -1
  582. package/dist/src/shared/sandbox-environment.d.ts +0 -1
  583. package/dist/src/shared/sandbox-environment.js +1 -1
  584. package/dist/src/shared/skill-package.d.ts +0 -5
  585. package/dist/src/shared/skill-package.js +1 -1
  586. package/dist/src/shared/skill-paths.d.ts +0 -13
  587. package/dist/src/shared/skill-paths.js +2 -2
  588. package/dist/src/shared/token-usage.d.ts +0 -7
  589. package/dist/src/shared/token-usage.js +1 -1
  590. package/dist/src/shared/ulid.d.ts +2 -8
  591. package/dist/src/shared/ulid.js +1 -1
  592. package/dist/src/shared/vercel-project.d.ts +2 -1
  593. package/dist/src/shared/vercel-services.d.ts +2 -2
  594. package/dist/src/shared/workflow-sandbox.d.ts +0 -7
  595. package/dist/src/source-change/agent-config-ast.d.ts +2 -1
  596. package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
  597. package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
  598. package/dist/src/source-change/apply-model-selection.d.ts +2 -1
  599. package/dist/src/source-change/static-source-change.d.ts +4 -3
  600. package/dist/src/subagents/invocation.d.ts +1 -1
  601. package/dist/src/subagents/tool.d.ts +2 -1
  602. package/dist/src/svelte/index.js +1 -1
  603. package/dist/src/svelte/use-eve-agent.js +1 -1
  604. package/dist/src/tools/definition.d.ts +0 -3
  605. package/dist/src/tools/durable-callbacks.d.ts +1 -2
  606. package/dist/src/tools/durable-callbacks.js +1 -1
  607. package/dist/src/tools/framework/agent.js +1 -1
  608. package/dist/src/tools/framework/task-cancel.d.ts +1 -1
  609. package/dist/src/tools/native-definition.d.ts +2 -1
  610. package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
  611. package/dist/src/tracing/agent-invocation-coordinator.js +1 -1
  612. package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
  613. package/dist/src/tracing/agent-otel-attributes.js +1 -1
  614. package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
  615. package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
  616. package/dist/src/tracing/agent-span-id-generator.js +1 -1
  617. package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
  618. package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
  619. package/dist/src/tracing/agent-trace-context-store.d.ts +0 -2
  620. package/dist/src/tracing/agent-trace-context-store.js +1 -1
  621. package/dist/src/tracing/agent-trace-state.d.ts +0 -24
  622. package/dist/src/tracing/agent-trace-state.js +1 -1
  623. package/dist/src/tracing/batch-span-processor.d.ts +2 -1
  624. package/dist/src/tracing/conversation-context.d.ts +0 -2
  625. package/dist/src/tracing/conversation-context.js +1 -1
  626. package/dist/src/tracing/install-instrumentation-runtime.js +1 -1
  627. package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
  628. package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
  629. package/dist/src/tracing/local-trace-discovery-index.js +1 -1
  630. package/dist/src/tracing/local-trace-query.d.ts +2 -1
  631. package/dist/src/tracing/local-trace-retention.d.ts +4 -4
  632. package/dist/src/tracing/telemetry-budget.d.ts +0 -1
  633. package/dist/src/tracing/telemetry-budget.js +1 -1
  634. package/dist/src/vue/index.js +1 -1
  635. package/dist/src/vue/use-eve-agent.js +1 -1
  636. package/docs/agent-config.md +7 -0
  637. package/package.json +8 -8
  638. package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
  639. package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
  640. package/dist/src/cli/commands/init-confirm.d.ts +0 -12
  641. package/dist/src/cli/commands/init-confirm.js +0 -1
  642. package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
  643. package/dist/src/cli/commands/registry-search-presentation.js +0 -6
  644. package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
  645. package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
  646. package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
  647. package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
  648. package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
  649. package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
  650. package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
  651. package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
  652. package/dist/src/compiler/compile-from-memory.d.ts +0 -44
  653. package/dist/src/compiler/compile-from-memory.js +0 -1
  654. package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
  655. package/dist/src/execution/connection-auth-tool-result.js +0 -1
  656. package/dist/src/internal/process/pnpm.d.ts +0 -28
  657. package/dist/src/internal/process/pnpm.js +0 -1
  658. package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
  659. package/dist/src/public/channels/slack/api-encoding.js +0 -1
  660. package/dist/src/public/definitions/instrumentation.d.ts +0 -1
  661. package/dist/src/public/definitions/instrumentation.js +0 -1
  662. package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
  663. package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
  664. package/dist/src/sandbox/backends/probes.d.ts +0 -7
  665. package/dist/src/sandbox/backends/probes.js +0 -1
  666. package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
  667. package/dist/src/setup/channel-add-conflicts.js +0 -1
  668. package/dist/src/setup/gateway-models.d.ts +0 -10
  669. package/dist/src/setup/gateway-models.js +0 -1
  670. package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
  671. package/dist/src/setup/primitives/run-pnpm.js +0 -1
  672. package/dist/src/shared/dispatch-action.d.ts +0 -30
  673. package/dist/src/shared/dispatch-action.js +0 -1
@@ -1,10 +1,6 @@
1
1
  import { type DiscoverDiagnostic } from "#discover/diagnostics.js";
2
2
  import type { ExtensionSourceRef } from "#discover/manifest.js";
3
3
  import type { ProjectSource } from "#discover/project-source.js";
4
- /**
5
- * Emitted when a mount file cannot be resolved to an extension package.
6
- */
7
- export declare const DISCOVER_EXTENSION_MOUNT_UNRESOLVED = "discover/extension-mount-unresolved";
8
4
  /**
9
5
  * Emitted when one namespace is claimed by both a file mount
10
6
  * (`extensions/<ns>.ts`) and a directory mount (`extensions/<ns>/`).
@@ -21,10 +17,6 @@ export declare const DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION = "discover/ex
21
17
  * later is additive rather than a surprise.
22
18
  */
23
19
  export declare const DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED = "discover/extension-nested-mount-unsupported";
24
- /**
25
- * Emitted when a resolved package is not a valid eve extension.
26
- */
27
- export declare const DISCOVER_EXTENSION_PACKAGE_INVALID = "discover/extension-package-invalid";
28
20
  /**
29
21
  * Emitted when an extension distribution's compatibility manifest is missing
30
22
  * or malformed.
@@ -54,7 +46,7 @@ export declare const DISCOVER_EXTENSION_INSTRUMENTATION_UNSUPPORTED = "discover/
54
46
  /**
55
47
  * Resolved on-disk location of one mounted extension package.
56
48
  */
57
- export interface ExtensionMountLocation {
49
+ interface ExtensionMountLocation {
58
50
  /** Mount namespace derived from the mount filename (e.g. `crm`). */
59
51
  readonly namespace: string;
60
52
  /** Package specifier the mount imports (e.g. `@acme/crm`). */
@@ -73,7 +65,7 @@ export interface ExtensionMountLocation {
73
65
  * inspected. Development uses this to build a mounted workspace extension
74
66
  * before the consumer requires its dist tree to exist.
75
67
  */
76
- export interface ExtensionMountPackageLocation {
68
+ interface ExtensionMountPackageLocation {
77
69
  /** Mount namespace derived from the mount filename. */
78
70
  readonly namespace: string;
79
71
  /** Package specifier read from the mount declaration. */
@@ -140,3 +132,4 @@ export declare function locateExtensionMountPackage(input: {
140
132
  location?: ExtensionMountPackageLocation;
141
133
  diagnostics: DiscoverDiagnostic[];
142
134
  }>;
135
+ export {};
@@ -1 +1 @@
1
- import{dirname,isAbsolute,join,resolve}from"node:path";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest}from"#compiler/extension-compatibility.js";import{parseExtensionMountSpecifier}from"#discover/extension-specifier.js";import{parseBuiltInExtensionPackageRoots,parseExtensionPackageRoots}from"#shared/extension-package-contract.js";const DISCOVER_EXTENSION_MOUNT_UNRESOLVED=`discover/extension-mount-unresolved`,DISCOVER_EXTENSION_MOUNT_AMBIGUOUS=`discover/extension-mount-ambiguous`,DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION=`discover/extension-mount-missing-declaration`,DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED=`discover/extension-nested-mount-unsupported`,DISCOVER_EXTENSION_PACKAGE_INVALID=`discover/extension-package-invalid`,DISCOVER_EXTENSION_COMPATIBILITY_INVALID=`discover/extension-compatibility-invalid`,DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE=`discover/extension-capability-incompatible`,DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED=`discover/extension-agent-config-unsupported`,DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED=`discover/extension-sandbox-unsupported`,DISCOVER_EXTENSION_MEMORY_UNSUPPORTED=`discover/extension-memory-unsupported`,DISCOVER_EXTENSION_INSTRUMENTATION_UNSUPPORTED=`discover/extension-instrumentation-unsupported`;function mountNamespace(e){let t=e.slice(e.lastIndexOf(`/`)+1);for(let e of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(t.toLowerCase().endsWith(e))return t.slice(0,t.length-e.length);return t}function mountRefNamespace(e){let t=e.replace(/^extensions\//,``),n=t.indexOf(`/`);return n===-1?mountNamespace(e):t.slice(0,n)}function packageStateNamespace(e){return e.replace(/^@/,``).replace(/[^a-zA-Z0-9._-]+/g,`-`).replace(/^-+|-+$/g,``)||`extension`}async function locateExtensionMount(e){let t=await locateExtensionMountPackage(e);if(t.location===void 0)return{diagnostics:t.diagnostics};let{location:n}=t;if(n.builtIn)return{location:{namespace:n.namespace,specifier:n.specifier,packageName:n.packageName,packageRoot:n.packageRoot,sourceRoot:n.distRoot,externalDependencies:[]},diagnostics:[]};let r=join(n.distRoot,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),i;try{i=parseExtensionCompatibilityManifest(await e.source.readTextFile(r),r)}catch(e){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_COMPATIBILITY_INVALID,message:`Extension "${n.packageName}" has no valid compatibility manifest at "${r}". Rebuild or reinstall the extension. ${e instanceof Error?e.message:String(e)}`,sourcePath:r})]}}let a=findUnsupportedExtensionCapabilities(i);return a.length>0?{diagnostics:a.map(e=>createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE,message:`Extension "${n.packageName}" requires ${e.capability} contract v${e.requiredVersion}, but this eve supports ${e.capability} contract ${formatSupportedVersions(e.supportedVersions)}. Upgrade eve or install an extension release that requires a supported ${e.capability} contract.`,sourcePath:r}))}:{location:{namespace:n.namespace,specifier:n.specifier,packageName:n.packageName,packageRoot:n.packageRoot,sourceRoot:n.distRoot,externalDependencies:i.build?.externalDependencies??[]},diagnostics:[]}}async function locateExtensionMountPackage(e){let t=join(e.agentRoot,e.mount.logicalPath),{namespace:n}=e,r;try{r=await e.source.readTextFile(t)}catch{return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Could not read extension mount "${e.mount.logicalPath}".`,sourcePath:t})]}}let i=parseExtensionMountSpecifier(r);if(i===null)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Extension mount "${e.mount.logicalPath}" must default-export a mounted extension, e.g. \`export default crm({ ... })\` or \`export { default } from "@acme/crm"\`.`,sourcePath:t})]};let a=await resolvePackageRoot({source:e.source,appRoot:e.appRoot,mountDirectory:dirname(t),specifier:i});if(a===null)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Could not resolve extension package "${i}" mounted by "${e.mount.logicalPath}".`,sourcePath:t})]};let o=join(a,`package.json`),s;try{s=JSON.parse(await e.source.readTextFile(o))}catch{return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_PACKAGE_INVALID,message:`Extension package "${i}" has no readable package.json at "${o}".`,sourcePath:o})]}}let c=parseBuiltInExtensionPackageRoots(s.eve?.builtInExtensions,packageSpecifierSubpath(i)),l=c??parseExtensionPackageRoots(s.eve?.extension);return l===null?{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_PACKAGE_INVALID,message:`Package "${i}" is not an eve extension: its package.json must declare \`eve.extension.dist\`.`,sourcePath:o})]}:{location:{namespace:n,specifier:i,packageName:typeof s.name==`string`&&s.name.length>0?s.name:i,packageRoot:a,...l.source===void 0?{}:{authoredSourceRoot:resolve(a,l.source)},builtIn:c!==null,distRoot:resolve(a,l.dist)},diagnostics:[]}}function formatSupportedVersions(e){return e.length===0?`versions: none`:`versions: ${e.map(e=>`v${e}`).join(`, `)}`}async function resolvePackageRoot(e){if(e.specifier.startsWith(`.`)){let t=resolve(e.mountDirectory,e.specifier);return await hasPackageJson(e.source,t)?t:null}if(isAbsolute(e.specifier))return await hasPackageJson(e.source,e.specifier)?e.specifier:null;let t=bareSpecifierPackagePath(e.specifier),n=resolve(e.appRoot);for(;;){let r=join(n,`node_modules`,t);if(await hasPackageJson(e.source,r))return r;let i=dirname(n);if(i===n)return null;n=i}}function packageSpecifierSubpath(e){let t=e.slice(bareSpecifierPackagePath(e).length);return t.length===0?`.`:`.${t}`}function bareSpecifierPackagePath(e){let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]??e}async function hasPackageJson(e,t){return await e.stat(join(t,`package.json`))===`file`}export{DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED,DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE,DISCOVER_EXTENSION_COMPATIBILITY_INVALID,DISCOVER_EXTENSION_INSTRUMENTATION_UNSUPPORTED,DISCOVER_EXTENSION_MEMORY_UNSUPPORTED,DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,DISCOVER_EXTENSION_MOUNT_UNRESOLVED,DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,DISCOVER_EXTENSION_PACKAGE_INVALID,DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED,locateExtensionMount,locateExtensionMountPackage,mountNamespace,mountRefNamespace,packageStateNamespace};
1
+ import{dirname,isAbsolute,join,resolve}from"node:path";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{EXTENSION_COMPATIBILITY_MANIFEST_FILENAME,findUnsupportedExtensionCapabilities,parseExtensionCompatibilityManifest}from"#compiler/extension-compatibility.js";import{parseExtensionMountSpecifier}from"#discover/extension-specifier.js";import{parseBuiltInExtensionPackageRoots,parseExtensionPackageRoots}from"#shared/extension-package-contract.js";const DISCOVER_EXTENSION_MOUNT_UNRESOLVED=`discover/extension-mount-unresolved`,DISCOVER_EXTENSION_MOUNT_AMBIGUOUS=`discover/extension-mount-ambiguous`,DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION=`discover/extension-mount-missing-declaration`,DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED=`discover/extension-nested-mount-unsupported`,DISCOVER_EXTENSION_PACKAGE_INVALID=`discover/extension-package-invalid`,DISCOVER_EXTENSION_COMPATIBILITY_INVALID=`discover/extension-compatibility-invalid`,DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE=`discover/extension-capability-incompatible`,DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED=`discover/extension-agent-config-unsupported`,DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED=`discover/extension-sandbox-unsupported`,DISCOVER_EXTENSION_MEMORY_UNSUPPORTED=`discover/extension-memory-unsupported`,DISCOVER_EXTENSION_INSTRUMENTATION_UNSUPPORTED=`discover/extension-instrumentation-unsupported`;function mountNamespace(e){let t=e.slice(e.lastIndexOf(`/`)+1);for(let e of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(t.toLowerCase().endsWith(e))return t.slice(0,t.length-e.length);return t}function mountRefNamespace(e){let t=e.replace(/^extensions\//,``),n=t.indexOf(`/`);return n===-1?mountNamespace(e):t.slice(0,n)}function packageStateNamespace(e){return e.replace(/^@/,``).replace(/[^a-zA-Z0-9._-]+/g,`-`).replace(/^-+|-+$/g,``)||`extension`}async function locateExtensionMount(e){let t=await locateExtensionMountPackage(e);if(t.location===void 0)return{diagnostics:t.diagnostics};let{location:n}=t;if(n.builtIn)return{location:{namespace:n.namespace,specifier:n.specifier,packageName:n.packageName,packageRoot:n.packageRoot,sourceRoot:n.distRoot,externalDependencies:[]},diagnostics:[]};let r=join(n.distRoot,EXTENSION_COMPATIBILITY_MANIFEST_FILENAME),i;try{i=parseExtensionCompatibilityManifest(await e.source.readTextFile(r),r)}catch(e){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_COMPATIBILITY_INVALID,message:`Extension "${n.packageName}" has no valid compatibility manifest at "${r}". Rebuild or reinstall the extension. ${e instanceof Error?e.message:String(e)}`,sourcePath:r})]}}let a=findUnsupportedExtensionCapabilities(i);return a.length>0?{diagnostics:a.map(e=>createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE,message:`Extension "${n.packageName}" requires ${e.capability} contract v${e.requiredVersion}, but this eve supports ${e.capability} contract ${formatSupportedVersions(e.supportedVersions)}. Upgrade eve or install an extension release that requires a supported ${e.capability} contract.`,sourcePath:r}))}:{location:{namespace:n.namespace,specifier:n.specifier,packageName:n.packageName,packageRoot:n.packageRoot,sourceRoot:n.distRoot,externalDependencies:i.build?.externalDependencies??[]},diagnostics:[]}}async function locateExtensionMountPackage(e){let t=join(e.agentRoot,e.mount.logicalPath),{namespace:n}=e,r;try{r=await e.source.readTextFile(t)}catch{return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Could not read extension mount "${e.mount.logicalPath}".`,sourcePath:t})]}}let i=parseExtensionMountSpecifier(r);if(i===null)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Extension mount "${e.mount.logicalPath}" must default-export a mounted extension, e.g. \`export default crm({ ... })\` or \`export { default } from "@acme/crm"\`.`,sourcePath:t})]};let a=await resolvePackageRoot({source:e.source,appRoot:e.appRoot,mountDirectory:dirname(t),specifier:i});if(a===null)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_MOUNT_UNRESOLVED,message:`Could not resolve extension package "${i}" mounted by "${e.mount.logicalPath}".`,sourcePath:t})]};let o=join(a,`package.json`),s;try{s=JSON.parse(await e.source.readTextFile(o))}catch{return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_PACKAGE_INVALID,message:`Extension package "${i}" has no readable package.json at "${o}".`,sourcePath:o})]}}let c=parseBuiltInExtensionPackageRoots(s.eve?.builtInExtensions,packageSpecifierSubpath(i)),l=c??parseExtensionPackageRoots(s.eve?.extension);return l===null?{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_PACKAGE_INVALID,message:`Package "${i}" is not an eve extension: its package.json must declare \`eve.extension.dist\`.`,sourcePath:o})]}:{location:{namespace:n,specifier:i,packageName:typeof s.name==`string`&&s.name.length>0?s.name:i,packageRoot:a,...l.source===void 0?{}:{authoredSourceRoot:resolve(a,l.source)},builtIn:c!==null,distRoot:resolve(a,l.dist)},diagnostics:[]}}function formatSupportedVersions(e){return e.length===0?`versions: none`:`versions: ${e.map(e=>`v${e}`).join(`, `)}`}async function resolvePackageRoot(e){if(e.specifier.startsWith(`.`)){let t=resolve(e.mountDirectory,e.specifier);return await hasPackageJson(e.source,t)?t:null}if(isAbsolute(e.specifier))return await hasPackageJson(e.source,e.specifier)?e.specifier:null;let t=bareSpecifierPackagePath(e.specifier),n=resolve(e.appRoot);for(;;){let r=join(n,`node_modules`,t);if(await hasPackageJson(e.source,r))return r;let i=dirname(n);if(i===n)return null;n=i}}function packageSpecifierSubpath(e){let t=e.slice(bareSpecifierPackagePath(e).length);return t.length===0?`.`:`.${t}`}function bareSpecifierPackagePath(e){let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]??e}async function hasPackageJson(e,t){return await e.stat(join(t,`package.json`))===`file`}export{DISCOVER_EXTENSION_AGENT_CONFIG_UNSUPPORTED,DISCOVER_EXTENSION_CAPABILITY_INCOMPATIBLE,DISCOVER_EXTENSION_COMPATIBILITY_INVALID,DISCOVER_EXTENSION_INSTRUMENTATION_UNSUPPORTED,DISCOVER_EXTENSION_MEMORY_UNSUPPORTED,DISCOVER_EXTENSION_MOUNT_AMBIGUOUS,DISCOVER_EXTENSION_MOUNT_MISSING_DECLARATION,DISCOVER_EXTENSION_NESTED_MOUNT_UNSUPPORTED,DISCOVER_EXTENSION_SANDBOX_UNSUPPORTED,locateExtensionMount,locateExtensionMountPackage,mountNamespace,mountRefNamespace,packageStateNamespace};
@@ -3,11 +3,6 @@ import type { Dirent } from "node:fs";
3
3
  * Supported authored JavaScript and TypeScript module file extensions.
4
4
  */
5
5
  export declare const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS: readonly [".cts", ".mts", ".cjs", ".mjs", ".ts", ".js"];
6
- /**
7
- * Files that mark a surrounding directory as an application root when paired
8
- * with a top-level `agent/` directory.
9
- */
10
- export declare const PROJECT_MARKER_FILE_NAMES: readonly ["package.json", "vercel.json"];
11
6
  /**
12
7
  * Filesystem entry type used by discovery classifiers.
13
8
  */
@@ -15,19 +10,19 @@ export type DirectoryEntryType = "directory" | "file" | "other";
15
10
  /**
16
11
  * Classified root-level agent entry.
17
12
  */
18
- export type AgentRootEntryKind = "agent-config-module" | "channels-directory" | "connections-directory" | "extensions-directory" | "hooks-directory" | "ignored-directory" | "instrumentation-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "lib-directory" | "memory-directory" | "memory-module" | "sandbox-directory" | "schedules-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
13
+ type AgentRootEntryKind = "agent-config-module" | "channels-directory" | "connections-directory" | "extensions-directory" | "hooks-directory" | "ignored-directory" | "instrumentation-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "lib-directory" | "memory-directory" | "memory-module" | "sandbox-directory" | "schedules-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
19
14
  /**
20
15
  * Classified local-subagent root entry.
21
16
  */
22
- export type LocalSubagentEntryKind = "agent-config-module" | "connections-directory" | "extensions-directory" | "hooks-directory" | "ignored-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "invalid-schedules-directory" | "lib-directory" | "memory-directory" | "memory-module" | "sandbox-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
17
+ type LocalSubagentEntryKind = "agent-config-module" | "connections-directory" | "extensions-directory" | "hooks-directory" | "ignored-directory" | "instructions-directory" | "instructions-markdown" | "instructions-module" | "invalid-schedules-directory" | "lib-directory" | "memory-directory" | "memory-module" | "sandbox-directory" | "skills-directory" | "system-markdown" | "system-module" | "tools-directory" | "unknown" | "subagents-directory";
23
18
  /**
24
19
  * Classified Agent Skills package entry.
25
20
  */
26
- export type SkillPackageEntryKind = "skill-assets-directory" | "skill-markdown" | "skill-references-directory" | "skill-resource" | "skill-scripts-directory";
21
+ type SkillPackageEntryKind = "skill-assets-directory" | "skill-markdown" | "skill-references-directory" | "skill-resource" | "skill-scripts-directory";
27
22
  /**
28
23
  * Classified top-level entry inside `skills/`.
29
24
  */
30
- export type SkillsDirectoryEntryKind = "flat-skill-markdown" | "flat-skill-module" | "ignored-declaration" | "ignored-source-map" | "skill-package-directory" | "unknown";
25
+ type SkillsDirectoryEntryKind = "flat-skill-markdown" | "flat-skill-module" | "ignored-declaration" | "ignored-source-map" | "skill-package-directory" | "unknown";
31
26
  /**
32
27
  * Returns the normalized entry type for a Node filesystem dirent.
33
28
  */
@@ -76,3 +71,4 @@ export declare function matchesSupportedModuleBaseName(name: string, baseName: s
76
71
  * Removes a final file extension from a logical path when present.
77
72
  */
78
73
  export declare function stripLogicalPathExtension(input: string): string;
74
+ export {};
@@ -1 +1 @@
1
- import{sep}from"node:path";const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS=[`.cts`,`.mts`,`.cjs`,`.mjs`,`.ts`,`.js`],PROJECT_MARKER_FILE_NAMES=[`package.json`,`vercel.json`],PROJECT_MARKER_FILE_NAME_SET=new Set(PROJECT_MARKER_FILE_NAMES),GENERATED_AGENT_DIRECTORY_NAMES=new Set([`.devtools`,`.eve`,`.next`,`.output`,`.vercel`,`node_modules`]);function getDirectoryEntryType(e){return e.isDirectory()?`directory`:e.isFile()?`file`:`other`}function isProjectMarkerEntry(e,t){return t===`file`&&PROJECT_MARKER_FILE_NAME_SET.has(e)}function isDiscoverableAgentRootEntry(e,t){let n=classifyAgentRootEntry(e,t);return n!==`unknown`&&n!==`ignored-directory`&&n!==`lib-directory`&&n!==`memory-directory`}function classifyAgentRootEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e.toLowerCase()===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:matchesSupportedModuleBaseName(e,`memory`)?`memory-module`:e.toLowerCase()===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(GENERATED_AGENT_DIRECTORY_NAMES.has(e))return`ignored-directory`;if(e===`channels`)return`channels-directory`;if(e===`connections`)return`connections-directory`;if(e===`extensions`)return`extensions-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`instrumentation`)return`instrumentation-directory`;if(e===`lib`)return`lib-directory`;if(e===`memory`)return`memory-directory`;if(e===`skills`)return`skills-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`tools`)return`tools-directory`;if(e===`schedules`)return`schedules-directory`;if(e===`subagents`)return`subagents-directory`}return`unknown`}function classifyLocalSubagentEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e.toLowerCase()===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:matchesSupportedModuleBaseName(e,`memory`)?`memory-module`:e.toLowerCase()===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(GENERATED_AGENT_DIRECTORY_NAMES.has(e))return`ignored-directory`;if(e===`connections`)return`connections-directory`;if(e===`extensions`)return`extensions-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`lib`)return`lib-directory`;if(e===`memory`)return`memory-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`skills`)return`skills-directory`;if(e===`tools`)return`tools-directory`;if(e===`subagents`)return`subagents-directory`;if(e===`schedules`)return`invalid-schedules-directory`}return`unknown`}function classifySkillPackageEntry(e,t){if(t===`file`)return e.toLowerCase()===`skill.md`?`skill-markdown`:`skill-resource`;if(t===`directory`){if(e===`scripts`)return`skill-scripts-directory`;if(e===`references`)return`skill-references-directory`;if(e===`assets`)return`skill-assets-directory`}return`skill-resource`}function classifySkillsDirectoryEntry(e,t){if(t===`directory`)return`skill-package-directory`;if(t===`file`){if(isTypeScriptDeclarationFileName(e))return`ignored-declaration`;if(isGeneratedSourceMapFileName(e))return`ignored-source-map`;if(e.toLowerCase().endsWith(`.md`))return`flat-skill-markdown`;if(getSupportedModuleBaseName(e)!==null)return`flat-skill-module`}return`unknown`}function normalizeLogicalPath(e){return e.replaceAll(sep,`/`).replace(/^\.\//,``).replace(/^\/+/,``)}function getSupportedModuleBaseName(e){if(isTypeScriptDeclarationFileName(e))return null;for(let t of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(e.endsWith(t)&&e.length>t.length)return e.slice(0,-t.length);return null}function isTypeScriptDeclarationFileName(e){return/\.d\.(?:cts|mts|ts)$/.test(e)}function isAuthoredTestPath(e){return/(?:^|[/\\])__tests__(?:[/\\]|$)/.test(e)||/\.(?:test|spec)\.[cm]?[jt]s$/.test(e)}function isGeneratedSourceMapFileName(e){if(!e.endsWith(`.map`))return!1;let t=e.slice(0,-4);return isTypeScriptDeclarationFileName(t)||getSupportedModuleBaseName(t)!==null}function matchesSupportedModuleBaseName(e,t){return getSupportedModuleBaseName(e)===t}function stripLogicalPathExtension(e){let t=normalizeLogicalPath(e),n=t.lastIndexOf(`/`),r=t.lastIndexOf(`.`);return r===-1||r<n?t:t.slice(0,r)}export{PROJECT_MARKER_FILE_NAMES,SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS,classifyAgentRootEntry,classifyLocalSubagentEntry,classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,isAuthoredTestPath,isDiscoverableAgentRootEntry,isGeneratedSourceMapFileName,isProjectMarkerEntry,isTypeScriptDeclarationFileName,matchesSupportedModuleBaseName,normalizeLogicalPath,stripLogicalPathExtension};
1
+ import{sep}from"node:path";const SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS=[`.cts`,`.mts`,`.cjs`,`.mjs`,`.ts`,`.js`],PROJECT_MARKER_FILE_NAME_SET=new Set([`package.json`,`vercel.json`]),GENERATED_AGENT_DIRECTORY_NAMES=new Set([`.devtools`,`.eve`,`.next`,`.output`,`.vercel`,`node_modules`]);function getDirectoryEntryType(e){return e.isDirectory()?`directory`:e.isFile()?`file`:`other`}function isProjectMarkerEntry(e,t){return t===`file`&&PROJECT_MARKER_FILE_NAME_SET.has(e)}function isDiscoverableAgentRootEntry(e,t){let n=classifyAgentRootEntry(e,t);return n!==`unknown`&&n!==`ignored-directory`&&n!==`lib-directory`&&n!==`memory-directory`}function classifyAgentRootEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e.toLowerCase()===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:matchesSupportedModuleBaseName(e,`memory`)?`memory-module`:e.toLowerCase()===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(GENERATED_AGENT_DIRECTORY_NAMES.has(e))return`ignored-directory`;if(e===`channels`)return`channels-directory`;if(e===`connections`)return`connections-directory`;if(e===`extensions`)return`extensions-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`instrumentation`)return`instrumentation-directory`;if(e===`lib`)return`lib-directory`;if(e===`memory`)return`memory-directory`;if(e===`skills`)return`skills-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`tools`)return`tools-directory`;if(e===`schedules`)return`schedules-directory`;if(e===`subagents`)return`subagents-directory`}return`unknown`}function classifyLocalSubagentEntry(e,t){if(t===`file`)return matchesSupportedModuleBaseName(e,`agent`)?`agent-config-module`:e.toLowerCase()===`instructions.md`?`instructions-markdown`:matchesSupportedModuleBaseName(e,`instructions`)?`instructions-module`:matchesSupportedModuleBaseName(e,`memory`)?`memory-module`:e.toLowerCase()===`system.md`?`system-markdown`:matchesSupportedModuleBaseName(e,`system`)?`system-module`:`unknown`;if(t===`directory`){if(GENERATED_AGENT_DIRECTORY_NAMES.has(e))return`ignored-directory`;if(e===`connections`)return`connections-directory`;if(e===`extensions`)return`extensions-directory`;if(e===`hooks`)return`hooks-directory`;if(e===`instructions`)return`instructions-directory`;if(e===`lib`)return`lib-directory`;if(e===`memory`)return`memory-directory`;if(e===`sandbox`)return`sandbox-directory`;if(e===`skills`)return`skills-directory`;if(e===`tools`)return`tools-directory`;if(e===`subagents`)return`subagents-directory`;if(e===`schedules`)return`invalid-schedules-directory`}return`unknown`}function classifySkillPackageEntry(e,t){if(t===`file`)return e.toLowerCase()===`skill.md`?`skill-markdown`:`skill-resource`;if(t===`directory`){if(e===`scripts`)return`skill-scripts-directory`;if(e===`references`)return`skill-references-directory`;if(e===`assets`)return`skill-assets-directory`}return`skill-resource`}function classifySkillsDirectoryEntry(e,t){if(t===`directory`)return`skill-package-directory`;if(t===`file`){if(isTypeScriptDeclarationFileName(e))return`ignored-declaration`;if(isGeneratedSourceMapFileName(e))return`ignored-source-map`;if(e.toLowerCase().endsWith(`.md`))return`flat-skill-markdown`;if(getSupportedModuleBaseName(e)!==null)return`flat-skill-module`}return`unknown`}function normalizeLogicalPath(e){return e.replaceAll(sep,`/`).replace(/^\.\//,``).replace(/^\/+/,``)}function getSupportedModuleBaseName(e){if(isTypeScriptDeclarationFileName(e))return null;for(let t of SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS)if(e.endsWith(t)&&e.length>t.length)return e.slice(0,-t.length);return null}function isTypeScriptDeclarationFileName(e){return/\.d\.(?:cts|mts|ts)$/.test(e)}function isAuthoredTestPath(e){return/(?:^|[/\\])__tests__(?:[/\\]|$)/.test(e)||/\.(?:test|spec)\.[cm]?[jt]s$/.test(e)}function isGeneratedSourceMapFileName(e){if(!e.endsWith(`.map`))return!1;let t=e.slice(0,-4);return isTypeScriptDeclarationFileName(t)||getSupportedModuleBaseName(t)!==null}function matchesSupportedModuleBaseName(e,t){return getSupportedModuleBaseName(e)===t}function stripLogicalPathExtension(e){let t=normalizeLogicalPath(e),n=t.lastIndexOf(`/`),r=t.lastIndexOf(`.`);return r===-1||r<n?t:t.slice(0,r)}export{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS,classifyAgentRootEntry,classifyLocalSubagentEntry,classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,isAuthoredTestPath,isDiscoverableAgentRootEntry,isGeneratedSourceMapFileName,isProjectMarkerEntry,isTypeScriptDeclarationFileName,matchesSupportedModuleBaseName,normalizeLogicalPath,stripLogicalPathExtension};
@@ -1,4 +1,3 @@
1
- import type { Dirent } from "node:fs";
2
1
  import type { ModuleSourceRef } from "#shared/source-ref.js";
3
2
  import { type DiscoverDiagnostic } from "#discover/diagnostics.js";
4
3
  import { type DirectoryEntryType } from "#discover/filesystem.js";
@@ -49,27 +48,12 @@ export declare const DISCOVER_EXTENSIONS_DIRECTORY_INVALID = "discover/extension
49
48
  * not satisfy the model tool-name charset rule.
50
49
  */
51
50
  export declare const DISCOVER_TOOL_NAME_INVALID = "discover/tool-name-invalid";
52
- /**
53
- * Shared diagnostic emitted when an authored `connections/*.{ts,…}` filename
54
- * does not satisfy the connection slug charset rule.
55
- */
56
- export declare const DISCOVER_CONNECTION_NAME_INVALID = "discover/connection-name-invalid";
57
51
  /**
58
52
  * Shared diagnostic emitted when the authored `sandbox/` root is not a
59
53
  * directory. The diagnostic code string retains its plural suffix for
60
54
  * stability across manifest versions.
61
55
  */
62
56
  export declare const DISCOVER_SANDBOX_DIRECTORY_INVALID = "discover/sandbox-directory-invalid";
63
- /**
64
- * Shared diagnostic emitted when the authored `instructions/` root is not a
65
- * directory.
66
- */
67
- export declare const DISCOVER_INSTRUCTIONS_DIRECTORY_INVALID = "discover/instructions-directory-invalid";
68
- /**
69
- * Shared diagnostic emitted when an authored `channels/**` filename or
70
- * directory segment does not satisfy the channel slug charset rule.
71
- */
72
- export declare const DISCOVER_CHANNEL_NAME_INVALID = "discover/channel-name-invalid";
73
57
  /**
74
58
  * Shared diagnostic emitted when an authored `hooks/**` filename or
75
59
  * directory segment does not satisfy the hook slug charset rule.
@@ -96,40 +80,10 @@ export declare const TOOL_SLUG_PATTERN: RegExp;
96
80
  * model APIs as identifiers.
97
81
  */
98
82
  export declare const CONNECTION_SLUG_PATTERN: RegExp;
99
- /**
100
- * Channel filename / directory segment charset.
101
- */
102
- export declare const CHANNEL_SLUG_PATTERN: RegExp;
103
- /**
104
- * Hook filename / directory segment charset. Each segment of the
105
- * path-relative slug uses the same restrictive charset as tool slugs:
106
- * ASCII letters, digits, underscores, and dashes, starting with a
107
- * letter, up to 64 characters per segment. Bracketed parameter forms
108
- * are not allowed — hooks have no URL semantics.
109
- */
110
- export declare const HOOK_SLUG_PATTERN: RegExp;
111
- /**
112
- * Extension mount filename charset. The basename becomes the namespace the
113
- * consumer's build prefixes onto every contribution (`crm` → `crm__search`),
114
- * so it uses the same restrictive charset as tool slugs: ASCII letters,
115
- * digits, underscores, and dashes, starting with a letter, up to 64
116
- * characters.
117
- */
118
- export declare const EXTENSION_SLUG_PATTERN: RegExp;
119
83
  /**
120
84
  * Shared diagnostic emitted when discovery ignores one unsupported directory.
121
85
  */
122
86
  export declare const DISCOVER_UNSUPPORTED_DIRECTORY = "discover/unsupported-directory";
123
- /**
124
- * Structural `Dirent`-like entry used throughout discovery.
125
- *
126
- * Legacy alias preserved for backwards compatibility inside `src/discover/`.
127
- * Every discover function now consumes {@link ProjectSourceEntry}, which
128
- * has the same three properties (`name`, `isDirectory()`, `isFile()`). Real
129
- * `Dirent<string>` values from `node:fs` satisfy this shape, so
130
- * {@link createDiskProjectSource} returns them directly.
131
- */
132
- export type StringDirent = Dirent<string>;
133
87
  /**
134
88
  * Reads sorted agent source entries, excluding colocated tests unless reading resources.
135
89
  */
@@ -1 +1 @@
1
- import{join}from"node:path";import{getDirectoryEntryType,isAuthoredTestPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic,createDiscoverWarningDiagnostic}from"#discover/diagnostics.js";import{createModuleSourceRef}from"#discover/manifest.js";import{collectFlatSlotCandidates}from"#discover/slots.js";import{lowerInstructionsMarkdown}from"#internal/helpers/markdown.js";import{discoverMarkdownSource}from"#discover/markdown.js";import{discoverNamedSourceDirectory,discoverNamedSourceDirectory as discoverNamedSourceDirectory$1}from"#discover/named-source-directory.js";const DISCOVER_MODULE_SLOT_COLLISION=`discover/module-slot-collision`,DISCOVER_REQUIRED_INSTRUCTIONS_MISSING=`discover/required-instructions-missing`,DISCOVER_DEPRECATED_SYSTEM_SLOT=`discover/deprecated-system-slot`,DISCOVER_SLOT_COLLISION=`discover/slot-collision`,DISCOVER_TOOLS_DIRECTORY_INVALID=`discover/tools-directory-invalid`,DISCOVER_HOOKS_DIRECTORY_INVALID=`discover/hooks-directory-invalid`,DISCOVER_CHANNELS_DIRECTORY_INVALID=`discover/channels-directory-invalid`,DISCOVER_EXTENSIONS_DIRECTORY_INVALID=`discover/extensions-directory-invalid`,DISCOVER_TOOL_NAME_INVALID=`discover/tool-name-invalid`,DISCOVER_CONNECTION_NAME_INVALID=`discover/connection-name-invalid`,DISCOVER_SANDBOX_DIRECTORY_INVALID=`discover/sandbox-directory-invalid`,DISCOVER_INSTRUCTIONS_DIRECTORY_INVALID=`discover/instructions-directory-invalid`,DISCOVER_CHANNEL_NAME_INVALID=`discover/channel-name-invalid`,DISCOVER_HOOK_NAME_INVALID=`discover/hook-name-invalid`,DISCOVER_EXTENSION_NAME_INVALID=`discover/extension-name-invalid`,TOOL_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,CONNECTION_SLUG_PATTERN=/^[a-z][a-z0-9-]{0,63}$/,CHANNEL_SLUG_PATTERN=/^(\.?[a-z][a-z0-9-]{0,63}|\[[a-zA-Z][a-zA-Z0-9_]{0,63}\])$/,HOOK_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,EXTENSION_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,DISCOVER_UNSUPPORTED_DIRECTORY=`discover/unsupported-directory`;async function readSortedDirectoryEntries(e,t,n={}){let r=(await e.readDirectory(t)).filter(e=>n.includeTests||!isAuthoredTestPath(e.name));return r.sort((e,t)=>e.name.localeCompare(t.name)),r}async function discoverInstructionsSource(e){let t=e.rootEntries.some(e=>e.name===`instructions`&&e.isDirectory()),n=await discoverSlotSource({markdownFileName:`instructions.md`,moduleBaseName:`instructions`,rootEntries:e.rootEntries,rootPath:e.rootPath,slotLabel:`instructions`,source:e.source});if(t){let t=await discoverNamedSourceDirectory$1({allowMarkdown:!0,directoryName:`instructions`,invalidDirectoryCode:DISCOVER_INSTRUCTIONS_DIRECTORY_INVALID,invalidDirectoryMessage:`Expected "${join(e.rootPath,`instructions`)}" to be a directory of authored instructions.`,markdownLowerer:e=>lowerInstructionsMarkdown(e),recursive:!1,rootEntries:e.rootEntries,rootPath:e.rootPath,source:e.source}),r=[...t.sources];return n.source!==void 0&&r.unshift(n.source),{diagnostics:[...n.diagnostics,...t.diagnostics],instructions:r}}if(n.diagnostics.length>0||n.source!==void 0)return{diagnostics:n.diagnostics,instructions:n.source===void 0?[]:[n.source]};let r=await discoverSlotSource({markdownFileName:`system.md`,moduleBaseName:`system`,rootEntries:e.rootEntries,rootPath:e.rootPath,slotLabel:`system`,source:e.source});if(r.source!==void 0){let t=r.source.sourceKind===`markdown`?`system.md`:r.source.logicalPath;return{diagnostics:[createDiscoverWarningDiagnostic({code:DISCOVER_DEPRECATED_SYSTEM_SLOT,message:`The "${t}" slot is deprecated. Rename it to "${t.replace(/^system/,`instructions`)}" — the runtime still loads the legacy slot for now, but support will be removed in a future release.`,sourcePath:join(e.rootPath,t)}),...r.diagnostics],instructions:[r.source]}}return r.diagnostics.length>0?{diagnostics:r.diagnostics,instructions:[]}:e.required===!1?{diagnostics:[],instructions:[]}:{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_REQUIRED_INSTRUCTIONS_MISSING,message:`Expected authored instructions at "instructions.md", "instructions.ts", "instructions.cts", "instructions.mts", "instructions.js", "instructions.cjs", "instructions.mjs", or "instructions/" directory.`,sourcePath:e.rootPath})],instructions:[]}}async function discoverSlotSource(e){let t=collectFlatSlotCandidates(e.rootEntries,{markdownFileName:e.markdownFileName,moduleBaseName:e.moduleBaseName});if(t.markdownFileName!==void 0&&t.moduleFileNames.length>0)return{diagnostics:[createSlotCollisionDiagnostic(e.rootPath,e.slotLabel,[t.markdownFileName,...t.moduleFileNames])]};if(t.moduleFileNames.length>1)return{diagnostics:[createModuleSlotCollisionDiagnostic(e.rootPath,e.slotLabel,t.moduleFileNames)]};if(t.markdownFileName!==void 0)return{diagnostics:[],source:await discoverMarkdownSource({logicalPath:e.markdownFileName,lower:lowerInstructionsMarkdown,source:e.source,sourcePath:join(e.rootPath,t.markdownFileName)})};let[n]=t.moduleFileNames;return n===void 0?{diagnostics:[]}:{diagnostics:[],source:createModuleSourceRef({logicalPath:n})}}function discoverFlatModuleSource(e){let t=collectFlatSlotCandidates(e.rootEntries,{moduleBaseName:e.slotName});if(t.moduleFileNames.length>1)return{diagnostics:[createModuleSlotCollisionDiagnostic(e.rootPath,e.slotName,t.moduleFileNames)]};let[n]=t.moduleFileNames;return n===void 0?e.missingDiagnostic===void 0?{diagnostics:[]}:{diagnostics:[createDiscoverErrorDiagnostic({code:e.missingDiagnostic.code,message:e.missingDiagnostic.message,sourcePath:e.rootPath})]}:{diagnostics:[],module:createModuleSourceRef({logicalPath:n})}}function createToolNameDiagnostic(e,t){return TOOL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_TOOL_NAME_INVALID,message:`Tool filename "${e}" is not a legal tool name. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createConnectionNameDiagnostic(e,t){return CONNECTION_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_CONNECTION_NAME_INVALID,message:`Connection filename "${e}" is not a legal connection name. Expected lowercase ASCII letters, digits, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createChannelNameDiagnostic(e,t){return CHANNEL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_CHANNEL_NAME_INVALID,message:`Channel path segment "${e}" is not a legal channel name. Expected lowercase kebab-case (\`my-channel\`), optionally with a leading dot (\`.well-known\`), or a path parameter form (\`[sessionId]\`).`,sourcePath:t})}function createHookNameDiagnostic(e,t){return HOOK_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_HOOK_NAME_INVALID,message:`Hook path segment "${e}" is not a legal hook name. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createExtensionNameDiagnostic(e,t){return EXTENSION_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_NAME_INVALID,message:`Extension mount filename "${e}" is not a legal extension namespace. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createUnsupportedRootDirectoryDiagnostics(e){return e.rootEntries.flatMap(t=>!t.isDirectory()||e.classifyEntry(t.name,getDirectoryEntryType(t))!==`unknown`?[]:[createDiscoverWarningDiagnostic({code:DISCOVER_UNSUPPORTED_DIRECTORY,message:e.createUnsupportedDirectoryMessage(t.name),sourcePath:join(e.rootPath,t.name)})])}function createSlotCollisionDiagnostic(e,t,n){return createDiscoverErrorDiagnostic({code:DISCOVER_SLOT_COLLISION,message:`Found conflicting authored sources for "${t}": ${formatQuotedFileList(n)}.`,sourcePath:e})}function createModuleSlotCollisionDiagnostic(e,t,n){return createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple authored module sources for "${t}": ${formatQuotedFileList(n)}.`,sourcePath:e})}function formatQuotedFileList(e){return e.map(e=>`"${e}"`).join(`, `)}export{CHANNEL_SLUG_PATTERN,CONNECTION_SLUG_PATTERN,DISCOVER_CHANNELS_DIRECTORY_INVALID,DISCOVER_CHANNEL_NAME_INVALID,DISCOVER_CONNECTION_NAME_INVALID,DISCOVER_DEPRECATED_SYSTEM_SLOT,DISCOVER_EXTENSIONS_DIRECTORY_INVALID,DISCOVER_EXTENSION_NAME_INVALID,DISCOVER_HOOKS_DIRECTORY_INVALID,DISCOVER_HOOK_NAME_INVALID,DISCOVER_INSTRUCTIONS_DIRECTORY_INVALID,DISCOVER_MODULE_SLOT_COLLISION,DISCOVER_REQUIRED_INSTRUCTIONS_MISSING,DISCOVER_SANDBOX_DIRECTORY_INVALID,DISCOVER_SLOT_COLLISION,DISCOVER_TOOLS_DIRECTORY_INVALID,DISCOVER_TOOL_NAME_INVALID,DISCOVER_UNSUPPORTED_DIRECTORY,EXTENSION_SLUG_PATTERN,HOOK_SLUG_PATTERN,TOOL_SLUG_PATTERN,createChannelNameDiagnostic,createConnectionNameDiagnostic,createExtensionNameDiagnostic,createHookNameDiagnostic,createModuleSlotCollisionDiagnostic,createSlotCollisionDiagnostic,createToolNameDiagnostic,createUnsupportedRootDirectoryDiagnostics,discoverFlatModuleSource,discoverInstructionsSource,discoverNamedSourceDirectory,readSortedDirectoryEntries};
1
+ import{join}from"node:path";import{getDirectoryEntryType,isAuthoredTestPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic,createDiscoverWarningDiagnostic}from"#discover/diagnostics.js";import{createModuleSourceRef}from"#discover/manifest.js";import{collectFlatSlotCandidates}from"#discover/slots.js";import{lowerInstructionsMarkdown}from"#internal/helpers/markdown.js";import{discoverMarkdownSource}from"#discover/markdown.js";import{discoverNamedSourceDirectory,discoverNamedSourceDirectory as discoverNamedSourceDirectory$1}from"#discover/named-source-directory.js";const DISCOVER_MODULE_SLOT_COLLISION=`discover/module-slot-collision`,DISCOVER_REQUIRED_INSTRUCTIONS_MISSING=`discover/required-instructions-missing`,DISCOVER_DEPRECATED_SYSTEM_SLOT=`discover/deprecated-system-slot`,DISCOVER_SLOT_COLLISION=`discover/slot-collision`,DISCOVER_TOOLS_DIRECTORY_INVALID=`discover/tools-directory-invalid`,DISCOVER_HOOKS_DIRECTORY_INVALID=`discover/hooks-directory-invalid`,DISCOVER_CHANNELS_DIRECTORY_INVALID=`discover/channels-directory-invalid`,DISCOVER_EXTENSIONS_DIRECTORY_INVALID=`discover/extensions-directory-invalid`,DISCOVER_TOOL_NAME_INVALID=`discover/tool-name-invalid`,DISCOVER_SANDBOX_DIRECTORY_INVALID=`discover/sandbox-directory-invalid`,DISCOVER_HOOK_NAME_INVALID=`discover/hook-name-invalid`,DISCOVER_EXTENSION_NAME_INVALID=`discover/extension-name-invalid`,TOOL_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,CONNECTION_SLUG_PATTERN=/^[a-z][a-z0-9-]{0,63}$/,CHANNEL_SLUG_PATTERN=/^(\.?[a-z][a-z0-9-]{0,63}|\[[a-zA-Z][a-zA-Z0-9_]{0,63}\])$/,HOOK_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,EXTENSION_SLUG_PATTERN=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,DISCOVER_UNSUPPORTED_DIRECTORY=`discover/unsupported-directory`;async function readSortedDirectoryEntries(e,t,n={}){let r=(await e.readDirectory(t)).filter(e=>n.includeTests||!isAuthoredTestPath(e.name));return r.sort((e,t)=>e.name.localeCompare(t.name)),r}async function discoverInstructionsSource(e){let t=e.rootEntries.some(e=>e.name===`instructions`&&e.isDirectory()),n=await discoverSlotSource({markdownFileName:`instructions.md`,moduleBaseName:`instructions`,rootEntries:e.rootEntries,rootPath:e.rootPath,slotLabel:`instructions`,source:e.source});if(t){let t=await discoverNamedSourceDirectory$1({allowMarkdown:!0,directoryName:`instructions`,invalidDirectoryCode:`discover/instructions-directory-invalid`,invalidDirectoryMessage:`Expected "${join(e.rootPath,`instructions`)}" to be a directory of authored instructions.`,markdownLowerer:e=>lowerInstructionsMarkdown(e),recursive:!1,rootEntries:e.rootEntries,rootPath:e.rootPath,source:e.source}),r=[...t.sources];return n.source!==void 0&&r.unshift(n.source),{diagnostics:[...n.diagnostics,...t.diagnostics],instructions:r}}if(n.diagnostics.length>0||n.source!==void 0)return{diagnostics:n.diagnostics,instructions:n.source===void 0?[]:[n.source]};let r=await discoverSlotSource({markdownFileName:`system.md`,moduleBaseName:`system`,rootEntries:e.rootEntries,rootPath:e.rootPath,slotLabel:`system`,source:e.source});if(r.source!==void 0){let t=r.source.sourceKind===`markdown`?`system.md`:r.source.logicalPath;return{diagnostics:[createDiscoverWarningDiagnostic({code:DISCOVER_DEPRECATED_SYSTEM_SLOT,message:`The "${t}" slot is deprecated. Rename it to "${t.replace(/^system/,`instructions`)}" — the runtime still loads the legacy slot for now, but support will be removed in a future release.`,sourcePath:join(e.rootPath,t)}),...r.diagnostics],instructions:[r.source]}}return r.diagnostics.length>0?{diagnostics:r.diagnostics,instructions:[]}:e.required===!1?{diagnostics:[],instructions:[]}:{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_REQUIRED_INSTRUCTIONS_MISSING,message:`Expected authored instructions at "instructions.md", "instructions.ts", "instructions.cts", "instructions.mts", "instructions.js", "instructions.cjs", "instructions.mjs", or "instructions/" directory.`,sourcePath:e.rootPath})],instructions:[]}}async function discoverSlotSource(e){let t=collectFlatSlotCandidates(e.rootEntries,{markdownFileName:e.markdownFileName,moduleBaseName:e.moduleBaseName});if(t.markdownFileName!==void 0&&t.moduleFileNames.length>0)return{diagnostics:[createSlotCollisionDiagnostic(e.rootPath,e.slotLabel,[t.markdownFileName,...t.moduleFileNames])]};if(t.moduleFileNames.length>1)return{diagnostics:[createModuleSlotCollisionDiagnostic(e.rootPath,e.slotLabel,t.moduleFileNames)]};if(t.markdownFileName!==void 0)return{diagnostics:[],source:await discoverMarkdownSource({logicalPath:e.markdownFileName,lower:lowerInstructionsMarkdown,source:e.source,sourcePath:join(e.rootPath,t.markdownFileName)})};let[n]=t.moduleFileNames;return n===void 0?{diagnostics:[]}:{diagnostics:[],source:createModuleSourceRef({logicalPath:n})}}function discoverFlatModuleSource(e){let t=collectFlatSlotCandidates(e.rootEntries,{moduleBaseName:e.slotName});if(t.moduleFileNames.length>1)return{diagnostics:[createModuleSlotCollisionDiagnostic(e.rootPath,e.slotName,t.moduleFileNames)]};let[n]=t.moduleFileNames;return n===void 0?e.missingDiagnostic===void 0?{diagnostics:[]}:{diagnostics:[createDiscoverErrorDiagnostic({code:e.missingDiagnostic.code,message:e.missingDiagnostic.message,sourcePath:e.rootPath})]}:{diagnostics:[],module:createModuleSourceRef({logicalPath:n})}}function createToolNameDiagnostic(e,t){return TOOL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_TOOL_NAME_INVALID,message:`Tool filename "${e}" is not a legal tool name. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createConnectionNameDiagnostic(e,t){return CONNECTION_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:`discover/connection-name-invalid`,message:`Connection filename "${e}" is not a legal connection name. Expected lowercase ASCII letters, digits, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createChannelNameDiagnostic(e,t){return CHANNEL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:`discover/channel-name-invalid`,message:`Channel path segment "${e}" is not a legal channel name. Expected lowercase kebab-case (\`my-channel\`), optionally with a leading dot (\`.well-known\`), or a path parameter form (\`[sessionId]\`).`,sourcePath:t})}function createHookNameDiagnostic(e,t){return HOOK_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_HOOK_NAME_INVALID,message:`Hook path segment "${e}" is not a legal hook name. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createExtensionNameDiagnostic(e,t){return EXTENSION_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_EXTENSION_NAME_INVALID,message:`Extension mount filename "${e}" is not a legal extension namespace. Expected ASCII letters, digits, underscores, and dashes only, starting with a letter, up to 64 characters.`,sourcePath:t})}function createUnsupportedRootDirectoryDiagnostics(e){return e.rootEntries.flatMap(t=>!t.isDirectory()||e.classifyEntry(t.name,getDirectoryEntryType(t))!==`unknown`?[]:[createDiscoverWarningDiagnostic({code:DISCOVER_UNSUPPORTED_DIRECTORY,message:e.createUnsupportedDirectoryMessage(t.name),sourcePath:join(e.rootPath,t.name)})])}function createSlotCollisionDiagnostic(e,t,n){return createDiscoverErrorDiagnostic({code:DISCOVER_SLOT_COLLISION,message:`Found conflicting authored sources for "${t}": ${formatQuotedFileList(n)}.`,sourcePath:e})}function createModuleSlotCollisionDiagnostic(e,t,n){return createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple authored module sources for "${t}": ${formatQuotedFileList(n)}.`,sourcePath:e})}function formatQuotedFileList(e){return e.map(e=>`"${e}"`).join(`, `)}export{CONNECTION_SLUG_PATTERN,DISCOVER_CHANNELS_DIRECTORY_INVALID,DISCOVER_DEPRECATED_SYSTEM_SLOT,DISCOVER_EXTENSIONS_DIRECTORY_INVALID,DISCOVER_EXTENSION_NAME_INVALID,DISCOVER_HOOKS_DIRECTORY_INVALID,DISCOVER_HOOK_NAME_INVALID,DISCOVER_MODULE_SLOT_COLLISION,DISCOVER_REQUIRED_INSTRUCTIONS_MISSING,DISCOVER_SANDBOX_DIRECTORY_INVALID,DISCOVER_SLOT_COLLISION,DISCOVER_TOOLS_DIRECTORY_INVALID,DISCOVER_TOOL_NAME_INVALID,DISCOVER_UNSUPPORTED_DIRECTORY,TOOL_SLUG_PATTERN,createChannelNameDiagnostic,createConnectionNameDiagnostic,createExtensionNameDiagnostic,createHookNameDiagnostic,createModuleSlotCollisionDiagnostic,createSlotCollisionDiagnostic,createToolNameDiagnostic,createUnsupportedRootDirectoryDiagnostics,discoverFlatModuleSource,discoverInstructionsSource,discoverNamedSourceDirectory,readSortedDirectoryEntries};
@@ -155,7 +155,7 @@ export type SubagentSourceRef = LocalSubagentSourceRef;
155
155
  /**
156
156
  * Input used to build a manifest-ready connection source ref.
157
157
  */
158
- export interface CreateConnectionSourceRefInput extends CreateModuleSourceRefInput {
158
+ interface CreateConnectionSourceRefInput extends CreateModuleSourceRefInput {
159
159
  connectionName: string;
160
160
  }
161
161
  /**
@@ -248,7 +248,7 @@ export interface CreateAgentSourceManifestInput {
248
248
  /**
249
249
  * Input used to build a manifest-ready skill package source ref.
250
250
  */
251
- export interface CreateSkillPackageSourceRefInput {
251
+ interface CreateSkillPackageSourceRefInput {
252
252
  assetsPath?: string;
253
253
  description: string;
254
254
  license?: string;
@@ -266,7 +266,7 @@ export interface CreateSkillPackageSourceRefInput {
266
266
  /**
267
267
  * Input used to build a manifest-ready module source ref.
268
268
  */
269
- export interface CreateModuleSourceRefInput {
269
+ interface CreateModuleSourceRefInput {
270
270
  exportName?: string;
271
271
  logicalPath: string;
272
272
  sourceId?: string;
@@ -274,7 +274,7 @@ export interface CreateModuleSourceRefInput {
274
274
  /**
275
275
  * Input used to build a manifest-ready local subagent source ref.
276
276
  */
277
- export interface CreateLocalSubagentSourceRefInput {
277
+ interface CreateLocalSubagentSourceRefInput {
278
278
  entryPath: string;
279
279
  logicalPath: string;
280
280
  manifest: AgentSourceManifest;
@@ -314,3 +314,4 @@ export declare function createLocalSubagentSourceRef(input: CreateLocalSubagentS
314
314
  * Creates a skill package source ref while omitting optional undefined fields.
315
315
  */
316
316
  export declare function createSkillPackageSourceRef(input: CreateSkillPackageSourceRefInput): NamedSkillDefinition & SkillPackageSourceRef;
317
+ export {};
@@ -1,7 +1,6 @@
1
1
  import { type DiscoverDiagnostic } from "#discover/diagnostics.js";
2
2
  import type { MemorySourceRef } from "#discover/manifest.js";
3
3
  import type { ProjectSource, ProjectSourceEntry } from "#discover/project-source.js";
4
- export declare const DISCOVER_MEMORY_DIRECTORY_INVALID = "discover/memory-directory-invalid";
5
4
  export declare const DISCOVER_MEMORY_SLOT_AMBIGUOUS = "discover/memory-slot-ambiguous";
6
5
  export declare const DISCOVER_MEMORY_NAME_INVALID = "discover/memory-name-invalid";
7
6
  export declare function discoverMemorySources(input: {
@@ -1 +1 @@
1
- import{join}from"node:path";import{matchesSupportedModuleBaseName,stripLogicalPathExtension}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{TOOL_SLUG_PATTERN,discoverFlatModuleSource}from"#discover/grammar.js";import{discoverNamedSourceDirectory as discoverNamedSourceDirectory$1}from"#discover/named-source-directory.js";const DISCOVER_MEMORY_DIRECTORY_INVALID=`discover/memory-directory-invalid`,DISCOVER_MEMORY_SLOT_AMBIGUOUS=`discover/memory-slot-ambiguous`,DISCOVER_MEMORY_NAME_INVALID=`discover/memory-name-invalid`;async function discoverMemorySources(e){let t=discoverFlatModuleSource({rootEntries:e.rootEntries,rootPath:e.rootPath,slotName:`memory`}),n=e.rootEntries.some(e=>e.isFile()&&matchesSupportedModuleBaseName(e.name,`memory`)),r=e.rootEntries.some(e=>e.name===`memory`&&e.isDirectory()),i=await discoverNamedSourceDirectory$1({directoryName:`memory`,invalidDirectoryCode:DISCOVER_MEMORY_DIRECTORY_INVALID,invalidDirectoryMessage:`Expected "${join(e.rootPath,`memory`)}" to be a directory of authored memory slots.`,recursive:!1,rootEntries:e.rootEntries,rootPath:e.rootPath,source:e.source,validateSegment:createMemoryNameDiagnostic});return n&&r?{diagnostics:[...t.diagnostics,...i.diagnostics,createDiscoverErrorDiagnostic({code:DISCOVER_MEMORY_SLOT_AMBIGUOUS,message:`Memory must use either the flat "memory.ts" form or the named "memory/" directory form, not both.`,sourcePath:e.rootPath})],memories:[]}:t.module===void 0?{diagnostics:[...t.diagnostics,...i.diagnostics],memories:i.sources.map(e=>({...e,slot:stripLogicalPathExtension(e.logicalPath).slice(7)}))}:{diagnostics:[...t.diagnostics,...i.diagnostics],memories:[{...t.module,slot:`memory`}]}}function createMemoryNameDiagnostic(e,t){return TOOL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_MEMORY_NAME_INVALID,message:`Memory slot "${e}" must start with an ASCII letter and contain only letters, digits, underscores, or dashes (64 characters maximum).`,sourcePath:t})}export{DISCOVER_MEMORY_DIRECTORY_INVALID,DISCOVER_MEMORY_NAME_INVALID,DISCOVER_MEMORY_SLOT_AMBIGUOUS,discoverMemorySources};
1
+ import{join}from"node:path";import{matchesSupportedModuleBaseName,stripLogicalPathExtension}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{TOOL_SLUG_PATTERN,discoverFlatModuleSource}from"#discover/grammar.js";import{discoverNamedSourceDirectory as discoverNamedSourceDirectory$1}from"#discover/named-source-directory.js";const DISCOVER_MEMORY_SLOT_AMBIGUOUS=`discover/memory-slot-ambiguous`,DISCOVER_MEMORY_NAME_INVALID=`discover/memory-name-invalid`;async function discoverMemorySources(e){let t=discoverFlatModuleSource({rootEntries:e.rootEntries,rootPath:e.rootPath,slotName:`memory`}),n=e.rootEntries.some(e=>e.isFile()&&matchesSupportedModuleBaseName(e.name,`memory`)),r=e.rootEntries.some(e=>e.name===`memory`&&e.isDirectory()),i=await discoverNamedSourceDirectory$1({directoryName:`memory`,invalidDirectoryCode:`discover/memory-directory-invalid`,invalidDirectoryMessage:`Expected "${join(e.rootPath,`memory`)}" to be a directory of authored memory slots.`,recursive:!1,rootEntries:e.rootEntries,rootPath:e.rootPath,source:e.source,validateSegment:createMemoryNameDiagnostic});return n&&r?{diagnostics:[...t.diagnostics,...i.diagnostics,createDiscoverErrorDiagnostic({code:DISCOVER_MEMORY_SLOT_AMBIGUOUS,message:`Memory must use either the flat "memory.ts" form or the named "memory/" directory form, not both.`,sourcePath:e.rootPath})],memories:[]}:t.module===void 0?{diagnostics:[...t.diagnostics,...i.diagnostics],memories:i.sources.map(e=>({...e,slot:stripLogicalPathExtension(e.logicalPath).slice(7)}))}:{diagnostics:[...t.diagnostics,...i.diagnostics],memories:[{...t.module,slot:`memory`}]}}function createMemoryNameDiagnostic(e,t){return TOOL_SLUG_PATTERN.test(e)?null:createDiscoverErrorDiagnostic({code:DISCOVER_MEMORY_NAME_INVALID,message:`Memory slot "${e}" must start with an ASCII letter and contain only letters, digits, underscores, or dashes (64 characters maximum).`,sourcePath:t})}export{DISCOVER_MEMORY_NAME_INVALID,DISCOVER_MEMORY_SLOT_AMBIGUOUS,discoverMemorySources};
@@ -1 +1 @@
1
- import{join}from"node:path";import{getDirectoryEntryType,getSupportedModuleBaseName,isTypeScriptDeclarationFileName,normalizeLogicalPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{createModuleSourceRef}from"#discover/manifest.js";import{createModuleSlotCollisionDiagnostic,createSlotCollisionDiagnostic,readSortedDirectoryEntries}from"#discover/grammar.js";import{collectNamedSlotCandidates}from"#discover/slots.js";import{discoverMarkdownSource}from"#discover/markdown.js";async function discoverNamedSourceDirectory(e){let t=join(e.rootPath,e.directoryName),n=e.rootEntries.find(t=>t.name===e.directoryName);if(n===void 0)return{diagnostics:[],sources:[]};if(!n.isDirectory())return{diagnostics:[createDiscoverErrorDiagnostic({code:e.invalidDirectoryCode,message:e.invalidDirectoryMessage,sourcePath:t})],sources:[]};let r=[],i=[];return await walkNamedSourceDirectory({allowMarkdown:e.allowMarkdown===!0,diagnostics:r,markdownLowerer:e.allowMarkdown===!0?e.markdownLowerer:void 0,projectSource:e.source,recursive:e.recursive,relativeDirectory:e.directoryName,rootDirectoryPath:t,sources:i,subdirectoryRelative:``,unsupportedEntryCode:e.unsupportedEntryCode,unsupportedEntryMessage:e.unsupportedEntryMessage,unsupportedFileCode:e.unsupportedFileCode,unsupportedFileMessage:e.unsupportedFileMessage,validateSegment:e.validateSegment}),{diagnostics:r,sources:i}}async function walkNamedSourceDirectory(e){let t=e.subdirectoryRelative===``?e.rootDirectoryPath:join(e.rootDirectoryPath,e.subdirectoryRelative),n=await readSortedDirectoryEntries(e.projectSource,t);e.recursive&&await walkSubdirectories(e,n,t),(e.unsupportedFileCode!==void 0||e.unsupportedEntryCode!==void 0)&&emitUnsupportedLeafDiagnostics(e,n,t),await collectLeafSources(e,n,t)}async function walkSubdirectories(e,t,n){for(let r of t){if(!r.isDirectory())continue;let t=join(n,r.name);if(e.validateSegment!==void 0){let n=e.validateSegment(r.name,t);if(n!==null){e.diagnostics.push(n);continue}}await walkNamedSourceDirectory({allowMarkdown:e.allowMarkdown,diagnostics:e.diagnostics,markdownLowerer:e.markdownLowerer,projectSource:e.projectSource,recursive:e.recursive,relativeDirectory:e.relativeDirectory,rootDirectoryPath:e.rootDirectoryPath,sources:e.sources,subdirectoryRelative:e.subdirectoryRelative===``?r.name:join(e.subdirectoryRelative,r.name),unsupportedEntryCode:e.unsupportedEntryCode,unsupportedEntryMessage:e.unsupportedEntryMessage,unsupportedFileCode:e.unsupportedFileCode,unsupportedFileMessage:e.unsupportedFileMessage,validateSegment:e.validateSegment})}}function emitUnsupportedLeafDiagnostics(e,t,n){for(let r of t){let t=getDirectoryEntryType(r),i=join(n,r.name);if(t===`directory`)continue;if(t===`other`){e.unsupportedEntryCode!==void 0&&e.diagnostics.push(createDiscoverErrorDiagnostic({code:e.unsupportedEntryCode,message:e.unsupportedEntryMessage?.(i,e.relativeDirectory)??`Expected "${i}" to be a regular file or directory within "${e.relativeDirectory}/".`,sourcePath:i}));continue}if(e.unsupportedFileCode===void 0||isTypeScriptDeclarationFileName(r.name))continue;let a=getSupportedModuleBaseName(r.name)!==null,o=e.allowMarkdown&&r.name.endsWith(`.md`);a||o||e.diagnostics.push(createDiscoverErrorDiagnostic({code:e.unsupportedFileCode,message:e.unsupportedFileMessage?.(i,e.relativeDirectory)??`Expected "${i}" to be a supported authored source within "${e.relativeDirectory}/".`,sourcePath:i}))}}async function collectLeafSources(e,t,n){for(let r of collectNamedSlotCandidates(t,{allowMarkdown:e.allowMarkdown,allowModules:!0})){let t=e.subdirectoryRelative===``?r.slotName:join(e.subdirectoryRelative,r.slotName),i=normalizeLogicalPath(join(e.relativeDirectory,t));if(e.validateSegment!==void 0){let t=r.markdownFileName??r.moduleFileNames[0]??r.slotName,i=e.validateSegment(r.slotName,join(n,t));if(i!==null){e.diagnostics.push(i);continue}}if(r.markdownFileName!==void 0&&r.moduleFileNames.length>0){e.diagnostics.push(createSlotCollisionDiagnostic(n,i,[r.markdownFileName,...r.moduleFileNames]));continue}if(r.moduleFileNames.length>1){e.diagnostics.push(createModuleSlotCollisionDiagnostic(n,i,r.moduleFileNames));continue}if(r.markdownFileName!==void 0){let t=e.subdirectoryRelative===``?r.markdownFileName:join(e.subdirectoryRelative,r.markdownFileName),n=normalizeLogicalPath(join(e.relativeDirectory,t));if(e.markdownLowerer===void 0)continue;let i=await discoverMarkdownSource({logicalPath:n,lower:e.markdownLowerer,source:e.projectSource,sourcePath:join(e.rootDirectoryPath,t)});e.sources.push(i);continue}let[a]=r.moduleFileNames;if(a===void 0)continue;let o=e.subdirectoryRelative===``?a:join(e.subdirectoryRelative,a);e.sources.push(createModuleSourceRef({logicalPath:normalizeLogicalPath(join(e.relativeDirectory,o))}))}}export{discoverNamedSourceDirectory};
1
+ import{join}from"node:path";import{getDirectoryEntryType,getSupportedModuleBaseName,isTypeScriptDeclarationFileName,normalizeLogicalPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{createModuleSlotCollisionDiagnostic,createSlotCollisionDiagnostic,readSortedDirectoryEntries}from"#discover/grammar.js";import{createModuleSourceRef}from"#discover/manifest.js";import{collectNamedSlotCandidates}from"#discover/slots.js";import{discoverMarkdownSource}from"#discover/markdown.js";async function discoverNamedSourceDirectory(e){let t=join(e.rootPath,e.directoryName),n=e.rootEntries.find(t=>t.name===e.directoryName);if(n===void 0)return{diagnostics:[],sources:[]};if(!n.isDirectory())return{diagnostics:[createDiscoverErrorDiagnostic({code:e.invalidDirectoryCode,message:e.invalidDirectoryMessage,sourcePath:t})],sources:[]};let r=[],i=[];return await walkNamedSourceDirectory({allowMarkdown:e.allowMarkdown===!0,diagnostics:r,markdownLowerer:e.allowMarkdown===!0?e.markdownLowerer:void 0,projectSource:e.source,recursive:e.recursive,relativeDirectory:e.directoryName,rootDirectoryPath:t,sources:i,subdirectoryRelative:``,unsupportedEntryCode:e.unsupportedEntryCode,unsupportedEntryMessage:e.unsupportedEntryMessage,unsupportedFileCode:e.unsupportedFileCode,unsupportedFileMessage:e.unsupportedFileMessage,validateSegment:e.validateSegment}),{diagnostics:r,sources:i}}async function walkNamedSourceDirectory(e){let t=e.subdirectoryRelative===``?e.rootDirectoryPath:join(e.rootDirectoryPath,e.subdirectoryRelative),n=await readSortedDirectoryEntries(e.projectSource,t);e.recursive&&await walkSubdirectories(e,n,t),(e.unsupportedFileCode!==void 0||e.unsupportedEntryCode!==void 0)&&emitUnsupportedLeafDiagnostics(e,n,t),await collectLeafSources(e,n,t)}async function walkSubdirectories(e,t,n){for(let r of t){if(!r.isDirectory())continue;let t=join(n,r.name);if(e.validateSegment!==void 0){let n=e.validateSegment(r.name,t);if(n!==null){e.diagnostics.push(n);continue}}await walkNamedSourceDirectory({allowMarkdown:e.allowMarkdown,diagnostics:e.diagnostics,markdownLowerer:e.markdownLowerer,projectSource:e.projectSource,recursive:e.recursive,relativeDirectory:e.relativeDirectory,rootDirectoryPath:e.rootDirectoryPath,sources:e.sources,subdirectoryRelative:e.subdirectoryRelative===``?r.name:join(e.subdirectoryRelative,r.name),unsupportedEntryCode:e.unsupportedEntryCode,unsupportedEntryMessage:e.unsupportedEntryMessage,unsupportedFileCode:e.unsupportedFileCode,unsupportedFileMessage:e.unsupportedFileMessage,validateSegment:e.validateSegment})}}function emitUnsupportedLeafDiagnostics(e,t,n){for(let r of t){let t=getDirectoryEntryType(r),i=join(n,r.name);if(t===`directory`)continue;if(t===`other`){e.unsupportedEntryCode!==void 0&&e.diagnostics.push(createDiscoverErrorDiagnostic({code:e.unsupportedEntryCode,message:e.unsupportedEntryMessage?.(i,e.relativeDirectory)??`Expected "${i}" to be a regular file or directory within "${e.relativeDirectory}/".`,sourcePath:i}));continue}if(e.unsupportedFileCode===void 0||isTypeScriptDeclarationFileName(r.name))continue;let a=getSupportedModuleBaseName(r.name)!==null,o=e.allowMarkdown&&r.name.endsWith(`.md`);a||o||e.diagnostics.push(createDiscoverErrorDiagnostic({code:e.unsupportedFileCode,message:e.unsupportedFileMessage?.(i,e.relativeDirectory)??`Expected "${i}" to be a supported authored source within "${e.relativeDirectory}/".`,sourcePath:i}))}}async function collectLeafSources(e,t,n){for(let r of collectNamedSlotCandidates(t,{allowMarkdown:e.allowMarkdown,allowModules:!0})){let t=e.subdirectoryRelative===``?r.slotName:join(e.subdirectoryRelative,r.slotName),i=normalizeLogicalPath(join(e.relativeDirectory,t));if(e.validateSegment!==void 0){let t=r.markdownFileName??r.moduleFileNames[0]??r.slotName,i=e.validateSegment(r.slotName,join(n,t));if(i!==null){e.diagnostics.push(i);continue}}if(r.markdownFileName!==void 0&&r.moduleFileNames.length>0){e.diagnostics.push(createSlotCollisionDiagnostic(n,i,[r.markdownFileName,...r.moduleFileNames]));continue}if(r.moduleFileNames.length>1){e.diagnostics.push(createModuleSlotCollisionDiagnostic(n,i,r.moduleFileNames));continue}if(r.markdownFileName!==void 0){let t=e.subdirectoryRelative===``?r.markdownFileName:join(e.subdirectoryRelative,r.markdownFileName),n=normalizeLogicalPath(join(e.relativeDirectory,t));if(e.markdownLowerer===void 0)continue;let i=await discoverMarkdownSource({logicalPath:n,lower:e.markdownLowerer,source:e.projectSource,sourcePath:join(e.rootDirectoryPath,t)});e.sources.push(i);continue}let[a]=r.moduleFileNames;if(a===void 0)continue;let o=e.subdirectoryRelative===``?a:join(e.subdirectoryRelative,a);e.sources.push(createModuleSourceRef({logicalPath:normalizeLogicalPath(join(e.relativeDirectory,o))}))}}export{discoverNamedSourceDirectory};
@@ -70,7 +70,7 @@ export declare function createDiskProjectSource(): ProjectSource;
70
70
  *
71
71
  * Keys are paths; values are UTF-8 text or `{ content }` records.
72
72
  */
73
- export interface MemoryProjectSourceInput {
73
+ interface MemoryProjectSourceInput {
74
74
  /**
75
75
  * Optional root hint used only for diagnostics. The source itself accepts
76
76
  * reads against any path — unrelated absolute paths simply resolve as
@@ -105,3 +105,4 @@ export interface MemoryProjectSourceInput {
105
105
  * enough for all discovery code paths.
106
106
  */
107
107
  export declare function createMemoryProjectSource(input: MemoryProjectSourceInput): ProjectSource;
108
+ export {};
@@ -1 +1 @@
1
- import{basename,dirname,join,resolve}from"node:path";import{findEveProjectContext}from"#internal/project-context.js";import{getDirectoryEntryType,isDiscoverableAgentRootEntry,isProjectMarkerEntry}from"#discover/filesystem.js";import{DISCOVER_PROJECT_NOT_FOUND,createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{createDiskProjectSource}from"#discover/project-source.js";var DiscoveryProjectResolutionError=class extends Error{diagnostic;constructor(e){super(e.message),this.name=`DiscoveryProjectResolutionError`,this.diagnostic=e}};async function resolveDiscoveryProject(e=process.cwd(),t={}){let n=t.source??createDiskProjectSource(),r=await resolveSearchDirectory(n,e),i=r;for(;;){let e=await tryResolveNestedProjectFromAgentDirectory(n,i);if(e!==null)return e;let t=await tryResolveNestedProjectFromAppRoot(n,i);if(t!==null)return t;if(await isFlatAgentRoot(n,i))return{agentRoot:i,appRoot:i,layout:`flat`};let r=dirname(i);if(r===i)break;i=r}throw new DiscoveryProjectResolutionError(createDiscoverErrorDiagnostic({code:DISCOVER_PROJECT_NOT_FOUND,message:`Could not resolve an eve agent root from "${r}".`,sourcePath:r}))}async function resolveSearchDirectory(e,t){let n=resolve(t);return await e.stat(n)===`directory`?n:dirname(n)}async function tryResolveNestedProjectFromAgentDirectory(e,t){if(basename(t)!==`agent`||await hasProjectMarkers(e,t))return null;let n=dirname(t);return await isNestedProjectRoot(e,n)?{agentRoot:t,appRoot:n,layout:`nested`}:null}async function tryResolveNestedProjectFromAppRoot(e,t){if(!await isNestedProjectRoot(e,t))return null;let n=join(t,`agent`);return await directoryExists(e,n)?{agentRoot:n,appRoot:t,layout:`nested`}:null}async function isNestedProjectRoot(e,t){if(await hasProjectMarkers(e,t))return!0;let n=await findEveProjectContext(t,{source:e});return n?.kind===`workspace-member`&&n.member.appRoot===t}async function isFlatAgentRoot(e,t){let n=await readDirectoryEntryTypes(e,t);return Array.from(n.entries()).some(([e,t])=>isDiscoverableAgentRootEntry(e,t))}async function hasProjectMarkers(e,t){let n=await readDirectoryEntryTypes(e,t);return Array.from(n.entries()).some(([e,t])=>isProjectMarkerEntry(e,t))}async function readDirectoryEntryTypes(e,t){if(await e.stat(t)!==`directory`)return new Map;let n=await e.readDirectory(t);return new Map(n.map(e=>[e.name,getDirectoryEntryType(e)]))}async function directoryExists(e,t){return await e.stat(t)===`directory`}export{DiscoveryProjectResolutionError,resolveDiscoveryProject};
1
+ import{basename,dirname,join,resolve}from"node:path";import{findEveProjectContext}from"#internal/project-context.js";import{getDirectoryEntryType,isDiscoverableAgentRootEntry,isProjectMarkerEntry}from"#discover/filesystem.js";import{createDiskProjectSource}from"#discover/project-source.js";import{DISCOVER_PROJECT_NOT_FOUND,createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";var DiscoveryProjectResolutionError=class extends Error{diagnostic;constructor(e){super(e.message),this.name=`DiscoveryProjectResolutionError`,this.diagnostic=e}};async function resolveDiscoveryProject(e=process.cwd(),t={}){let n=t.source??createDiskProjectSource(),r=await resolveSearchDirectory(n,e),i=r;for(;;){let e=await tryResolveNestedProjectFromAgentDirectory(n,i);if(e!==null)return e;let t=await tryResolveNestedProjectFromAppRoot(n,i);if(t!==null)return t;if(await isFlatAgentRoot(n,i))return{agentRoot:i,appRoot:i,layout:`flat`};let r=dirname(i);if(r===i)break;i=r}throw new DiscoveryProjectResolutionError(createDiscoverErrorDiagnostic({code:DISCOVER_PROJECT_NOT_FOUND,message:`Could not resolve an eve agent root from "${r}".`,sourcePath:r}))}async function resolveSearchDirectory(e,t){let n=resolve(t);return await e.stat(n)===`directory`?n:dirname(n)}async function tryResolveNestedProjectFromAgentDirectory(e,t){if(basename(t)!==`agent`||await hasProjectMarkers(e,t))return null;let n=dirname(t);return await isNestedProjectRoot(e,n)?{agentRoot:t,appRoot:n,layout:`nested`}:null}async function tryResolveNestedProjectFromAppRoot(e,t){if(!await isNestedProjectRoot(e,t))return null;let n=join(t,`agent`);return await directoryExists(e,n)?{agentRoot:n,appRoot:t,layout:`nested`}:null}async function isNestedProjectRoot(e,t){if(await hasProjectMarkers(e,t))return!0;let n=await findEveProjectContext(t,{source:e});return n?.kind===`workspace-member`&&n.member.appRoot===t}async function isFlatAgentRoot(e,t){let n=await readDirectoryEntryTypes(e,t);return Array.from(n.entries()).some(([e,t])=>isDiscoverableAgentRootEntry(e,t))}async function hasProjectMarkers(e,t){let n=await readDirectoryEntryTypes(e,t);return Array.from(n.entries()).some(([e,t])=>isProjectMarkerEntry(e,t))}async function readDirectoryEntryTypes(e,t){if(await e.stat(t)!==`directory`)return new Map;let n=await e.readDirectory(t);return new Map(n.map(e=>[e.name,getDirectoryEntryType(e)]))}async function directoryExists(e,t){return await e.stat(t)===`directory`}export{DiscoveryProjectResolutionError,resolveDiscoveryProject};
@@ -1 +1 @@
1
- import{join}from"node:path";import{normalizeLogicalPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{createModuleSourceRef,createPathDerivedSourceId}from"#discover/manifest.js";import{DISCOVER_MODULE_SLOT_COLLISION,DISCOVER_SANDBOX_DIRECTORY_INVALID,readSortedDirectoryEntries}from"#discover/grammar.js";import{collectFlatSlotCandidates,collectNamedSlotCandidates}from"#discover/slots.js";const SANDBOX_DIRECTORY_NAME=`sandbox`,SANDBOX_WORKSPACE_DIRECTORY_NAME=`workspace`,SANDBOX_DEFINITION_BASE_NAME=`sandbox`,DISCOVER_SANDBOX_FOLDER_EMPTY=`discover/sandbox-folder-empty`;async function discoverSandboxSource(e){let t=[],n=e.rootEntries.find(e=>e.name===SANDBOX_DIRECTORY_NAME);if(n===void 0)return discoverRootSandboxModule({diagnostics:t,rootEntries:e.rootEntries,rootPath:e.rootPath});let r=join(e.rootPath,SANDBOX_DIRECTORY_NAME);if(!n.isDirectory())return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_SANDBOX_DIRECTORY_INVALID,message:`Expected "${r}" to be the sandbox folder.`,sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let i=await readSortedDirectoryEntries(e.source,r),a=collectFolderSandboxModuleCandidates(i),o=i.find(e=>e.name===SANDBOX_WORKSPACE_DIRECTORY_NAME&&e.isDirectory()),s=i.some(e=>e.name===`Dockerfile`&&e.isFile());if(a.length>1)return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple sandbox definition modules inside "${normalizeLogicalPath(SANDBOX_DIRECTORY_NAME)}": `+a.map(e=>`"${e}"`).join(`, `),sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let[c]=a,l=c!==void 0,u=o!==void 0;if(!l&&!u&&!s)return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_SANDBOX_FOLDER_EMPTY,message:`Sandbox folder "sandbox/" contains no "Dockerfile", "sandbox.<ext>" definition, or "workspace/" subdirectory. Add one or remove the folder.`,sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let d=null;l&&(d=createModuleSourceRef({logicalPath:join(SANDBOX_DIRECTORY_NAME,c)}));let f=null;if(u){let t=join(r,SANDBOX_WORKSPACE_DIRECTORY_NAME),n=normalizeLogicalPath(join(SANDBOX_DIRECTORY_NAME,SANDBOX_WORKSPACE_DIRECTORY_NAME));f={logicalPath:n,rootEntries:await collectWorkspaceRootEntries(e.source,t),sourceId:createPathDerivedSourceId(n),sourcePath:t}}return{diagnostics:t,sandbox:d,sandboxWorkspace:f}}function discoverRootSandboxModule(e){let t=collectFlatSlotCandidates(e.rootEntries,{moduleBaseName:SANDBOX_DEFINITION_BASE_NAME});if(t.moduleFileNames.length>1)return e.diagnostics.push(createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple top-level sandbox definition modules: `+t.moduleFileNames.map(e=>`"${e}"`).join(`, `),sourcePath:e.rootPath})),{diagnostics:e.diagnostics,sandbox:null,sandboxWorkspace:null};let[n]=t.moduleFileNames;return n===void 0?{diagnostics:e.diagnostics,sandbox:null,sandboxWorkspace:null}:{diagnostics:e.diagnostics,sandbox:createModuleSourceRef({logicalPath:n}),sandboxWorkspace:null}}function collectFolderSandboxModuleCandidates(e){let t=e.filter(e=>e.isFile()),n=[];for(let e of collectNamedSlotCandidates(t,{allowMarkdown:!1,allowModules:!0}))e.slotName===SANDBOX_DEFINITION_BASE_NAME&&n.push(...e.moduleFileNames);return n}async function collectWorkspaceRootEntries(e,t){let n=await readSortedDirectoryEntries(e,t,{includeTests:!0}),r=[];for(let e of n){if(e.isDirectory()){r.push(`${e.name}/`);continue}e.isFile()&&r.push(e.name)}return r}export{DISCOVER_SANDBOX_FOLDER_EMPTY,discoverSandboxSource};
1
+ import{join}from"node:path";import{normalizeLogicalPath}from"#discover/filesystem.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{DISCOVER_MODULE_SLOT_COLLISION,DISCOVER_SANDBOX_DIRECTORY_INVALID,readSortedDirectoryEntries}from"#discover/grammar.js";import{createModuleSourceRef,createPathDerivedSourceId}from"#discover/manifest.js";import{collectFlatSlotCandidates,collectNamedSlotCandidates}from"#discover/slots.js";const SANDBOX_DIRECTORY_NAME=`sandbox`,SANDBOX_WORKSPACE_DIRECTORY_NAME=`workspace`,SANDBOX_DEFINITION_BASE_NAME=`sandbox`,DISCOVER_SANDBOX_FOLDER_EMPTY=`discover/sandbox-folder-empty`;async function discoverSandboxSource(e){let t=[],n=e.rootEntries.find(e=>e.name===SANDBOX_DIRECTORY_NAME);if(n===void 0)return discoverRootSandboxModule({diagnostics:t,rootEntries:e.rootEntries,rootPath:e.rootPath});let r=join(e.rootPath,SANDBOX_DIRECTORY_NAME);if(!n.isDirectory())return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_SANDBOX_DIRECTORY_INVALID,message:`Expected "${r}" to be the sandbox folder.`,sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let i=await readSortedDirectoryEntries(e.source,r),a=collectFolderSandboxModuleCandidates(i),o=i.find(e=>e.name===SANDBOX_WORKSPACE_DIRECTORY_NAME&&e.isDirectory()),s=i.some(e=>e.name===`Dockerfile`&&e.isFile());if(a.length>1)return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple sandbox definition modules inside "${normalizeLogicalPath(SANDBOX_DIRECTORY_NAME)}": `+a.map(e=>`"${e}"`).join(`, `),sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let[c]=a,l=c!==void 0,u=o!==void 0;if(!l&&!u&&!s)return t.push(createDiscoverErrorDiagnostic({code:DISCOVER_SANDBOX_FOLDER_EMPTY,message:`Sandbox folder "sandbox/" contains no "Dockerfile", "sandbox.<ext>" definition, or "workspace/" subdirectory. Add one or remove the folder.`,sourcePath:r})),{diagnostics:t,sandbox:null,sandboxWorkspace:null};let d=null;l&&(d=createModuleSourceRef({logicalPath:join(SANDBOX_DIRECTORY_NAME,c)}));let f=null;if(u){let t=join(r,SANDBOX_WORKSPACE_DIRECTORY_NAME),n=normalizeLogicalPath(join(SANDBOX_DIRECTORY_NAME,SANDBOX_WORKSPACE_DIRECTORY_NAME));f={logicalPath:n,rootEntries:await collectWorkspaceRootEntries(e.source,t),sourceId:createPathDerivedSourceId(n),sourcePath:t}}return{diagnostics:t,sandbox:d,sandboxWorkspace:f}}function discoverRootSandboxModule(e){let t=collectFlatSlotCandidates(e.rootEntries,{moduleBaseName:SANDBOX_DEFINITION_BASE_NAME});if(t.moduleFileNames.length>1)return e.diagnostics.push(createDiscoverErrorDiagnostic({code:DISCOVER_MODULE_SLOT_COLLISION,message:`Found multiple top-level sandbox definition modules: `+t.moduleFileNames.map(e=>`"${e}"`).join(`, `),sourcePath:e.rootPath})),{diagnostics:e.diagnostics,sandbox:null,sandboxWorkspace:null};let[n]=t.moduleFileNames;return n===void 0?{diagnostics:e.diagnostics,sandbox:null,sandboxWorkspace:null}:{diagnostics:e.diagnostics,sandbox:createModuleSourceRef({logicalPath:n}),sandboxWorkspace:null}}function collectFolderSandboxModuleCandidates(e){let t=e.filter(e=>e.isFile()),n=[];for(let e of collectNamedSlotCandidates(t,{allowMarkdown:!1,allowModules:!0}))e.slotName===SANDBOX_DEFINITION_BASE_NAME&&n.push(...e.moduleFileNames);return n}async function collectWorkspaceRootEntries(e,t){let n=await readSortedDirectoryEntries(e,t,{includeTests:!0}),r=[];for(let e of n){if(e.isDirectory()){r.push(`${e.name}/`);continue}e.isFile()&&r.push(e.name)}return r}export{DISCOVER_SANDBOX_FOLDER_EMPTY,discoverSandboxSource};
@@ -1,10 +1,6 @@
1
1
  import { type DiscoverDiagnostic } from "#discover/diagnostics.js";
2
2
  import { type SkillSourceRef } from "#discover/manifest.js";
3
3
  import { type ProjectSource } from "#discover/project-source.js";
4
- /**
5
- * Diagnostics emitted by skill discovery.
6
- */
7
- export declare const DISCOVER_SKILLS_DIRECTORY_INVALID = "discover/skills-directory-invalid";
8
4
  export declare const DISCOVER_SKILL_COLLISION = "discover/skill-collision";
9
5
  export declare const DISCOVER_SKILL_ENTRY_NOT_DIRECTORY = "discover/skill-entry-not-directory";
10
6
  export declare const DISCOVER_SKILL_FRONTMATTER_INVALID = "discover/skill-frontmatter-invalid";
@@ -1 +1 @@
1
- import{join,relative,resolve}from"node:path";import{classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{createDiskProjectSource}from"#discover/project-source.js";import{createModuleSourceRef,createPathDerivedSourceId,createSkillPackageSourceRef}from"#discover/manifest.js";import{readSortedDirectoryEntries}from"#discover/grammar.js";import{lowerSkillMarkdown}from"#internal/helpers/markdown.js";const DISCOVER_SKILLS_DIRECTORY_INVALID=`discover/skills-directory-invalid`,DISCOVER_SKILL_COLLISION=`discover/skill-collision`,DISCOVER_SKILL_ENTRY_NOT_DIRECTORY=`discover/skill-entry-not-directory`,DISCOVER_SKILL_FRONTMATTER_INVALID=`discover/skill-frontmatter-invalid`,DISCOVER_SKILL_MARKDOWN_MISSING=`discover/skill-markdown-missing`;async function discoverSkills(e){let t=e.source??createDiskProjectSource(),n=resolve(e.agentRoot),r=resolve(e.skillsDirectoryPath??join(n,`skills`)),i=normalizeLogicalPath(e.skillsLogicalPath??relative(n,r)),a=await t.stat(r);if(a===`missing`)return{diagnostics:[],skills:[]};if(a!==`directory`)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILLS_DIRECTORY_INVALID,message:`Expected "${r}" to be a directory of authored skills.`,sourcePath:r})],skills:[]};let o=[],s=new Set,c=new Map,l=await readSortedDirectoryEntries(t,r);for(let e of l){let n=await discoverOneSkill({entryName:e.name,entryType:getDirectoryEntryType(e),skillsDirectoryPath:r,skillsLogicalPath:i,source:t});if(o.push(...n.diagnostics),n.skill===null||n.skillId===null||s.has(n.skillId))continue;let a=c.get(n.skillId);if(a!==void 0){o.push(createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_COLLISION,message:`Found conflicting authored skill sources for "${n.skillId}": "${a.logicalPath}" and "${n.logicalPath}".`,sourcePath:join(r,n.skillId)})),s.add(n.skillId),c.delete(n.skillId);continue}c.set(n.skillId,{logicalPath:n.logicalPath,skill:n.skill})}return{diagnostics:o,skills:[...c.values()].map(e=>e.skill)}}async function discoverOneSkill(e){let t=join(e.skillsDirectoryPath,e.entryName);switch(classifySkillsDirectoryEntry(e.entryName,e.entryType)){case`skill-package-directory`:return discoverPackagedSkill({logicalSkillsPath:e.skillsLogicalPath,skillId:e.entryName,skillRootPath:t,source:e.source});case`flat-skill-markdown`:return discoverFlatMarkdownSkill({logicalSkillsPath:e.skillsLogicalPath,skillFileName:e.entryName,skillFilePath:t,source:e.source});case`flat-skill-module`:return discoverFlatModuleSkill({logicalSkillsPath:e.skillsLogicalPath,skillFileName:e.entryName});case`ignored-declaration`:case`ignored-source-map`:return{diagnostics:[],logicalPath:normalizeLogicalPath(join(e.skillsLogicalPath,e.entryName)),skill:null,skillId:null};default:return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_ENTRY_NOT_DIRECTORY,message:`Expected "${t}" to be a skill directory containing SKILL.md or a flat ".md", ".ts", ".cts", ".mts", ".js", ".cjs", or ".mjs" skill file.`,sourcePath:t})],logicalPath:normalizeLogicalPath(join(e.skillsLogicalPath,e.entryName)),skill:null,skillId:null}}}async function discoverPackagedSkill(e){let t=(await readSortedDirectoryEntries(e.source,e.skillRootPath)).find(e=>e.isFile()&&e.name.toLowerCase()===`skill.md`)?.name,n=join(e.skillRootPath,t??`SKILL.md`),r=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillId,t??`SKILL.md`));if(t===void 0)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_MARKDOWN_MISSING,message:`Expected "${n}" to exist for the "${e.skillId}" skill.`,sourcePath:e.skillRootPath})],logicalPath:r,skill:null,skillId:null};let i;try{i=lowerSkillMarkdown(await e.source.readTextFile(n))}catch(e){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_FRONTMATTER_INVALID,message:formatSkillDiscoveryError(n,e),sourcePath:n})],logicalPath:r,skill:null,skillId:null}}let a=await discoverSkillPackagePaths(e.source,e.skillRootPath),o={description:i.description,logicalPath:r,markdown:i.markdown,name:e.skillId,rootPath:e.skillRootPath,skillFilePath:n,skillId:e.skillId,sourceId:createPathDerivedSourceId(r)};return a.assetsPath!==void 0&&(o.assetsPath=a.assetsPath),i.license!==void 0&&(o.license=i.license),i.metadata!==void 0&&(o.metadata=i.metadata),a.referencesPath!==void 0&&(o.referencesPath=a.referencesPath),a.scriptsPath!==void 0&&(o.scriptsPath=a.scriptsPath),{diagnostics:[],logicalPath:r,skill:createSkillPackageSourceRef(o),skillId:e.skillId}}async function discoverFlatMarkdownSkill(e){let t=stripMarkdownExtension(e.skillFileName),n=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillFileName)),r;try{r=lowerSkillMarkdown(await e.source.readTextFile(e.skillFilePath),{slug:t})}catch(t){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_FRONTMATTER_INVALID,message:formatSkillDiscoveryError(e.skillFilePath,t),sourcePath:e.skillFilePath})],logicalPath:n,skill:null,skillId:null}}return{diagnostics:[],logicalPath:n,skill:{definition:r,sourceKind:`markdown`,logicalPath:n,sourceId:createPathDerivedSourceId(n)},skillId:t}}async function discoverFlatModuleSkill(e){let t=getSupportedModuleBaseName(e.skillFileName),n=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillFileName));return t===null?{diagnostics:[],logicalPath:n,skill:null,skillId:null}:{diagnostics:[],logicalPath:n,skill:createModuleSourceRef({logicalPath:n}),skillId:t}}async function discoverSkillPackagePaths(e,t){let n=await e.readDirectory(t),r={};for(let e of n)if(e.isDirectory())switch(classifySkillPackageEntry(e.name,getDirectoryEntryType(e))){case`skill-assets-directory`:r.assetsPath=join(t,e.name);break;case`skill-references-directory`:r.referencesPath=join(t,e.name);break;case`skill-scripts-directory`:r.scriptsPath=join(t,e.name)}return r}function formatSkillDiscoveryError(e,t){return`Invalid authored skill frontmatter in "${e}": ${toErrorMessage(t)}`}function stripMarkdownExtension(e){return e.toLowerCase().endsWith(`.md`)?e.slice(0,-3):e}export{DISCOVER_SKILLS_DIRECTORY_INVALID,DISCOVER_SKILL_COLLISION,DISCOVER_SKILL_ENTRY_NOT_DIRECTORY,DISCOVER_SKILL_FRONTMATTER_INVALID,DISCOVER_SKILL_MARKDOWN_MISSING,discoverSkills};
1
+ import{join,relative,resolve}from"node:path";import{classifySkillPackageEntry,classifySkillsDirectoryEntry,getDirectoryEntryType,getSupportedModuleBaseName,normalizeLogicalPath}from"#discover/filesystem.js";import{toErrorMessage}from"#shared/errors.js";import{createDiskProjectSource}from"#discover/project-source.js";import{createDiscoverErrorDiagnostic}from"#discover/diagnostics.js";import{readSortedDirectoryEntries}from"#discover/grammar.js";import{createModuleSourceRef,createPathDerivedSourceId,createSkillPackageSourceRef}from"#discover/manifest.js";import{lowerSkillMarkdown}from"#internal/helpers/markdown.js";const DISCOVER_SKILL_COLLISION=`discover/skill-collision`,DISCOVER_SKILL_ENTRY_NOT_DIRECTORY=`discover/skill-entry-not-directory`,DISCOVER_SKILL_FRONTMATTER_INVALID=`discover/skill-frontmatter-invalid`,DISCOVER_SKILL_MARKDOWN_MISSING=`discover/skill-markdown-missing`;async function discoverSkills(e){let t=e.source??createDiskProjectSource(),n=resolve(e.agentRoot),r=resolve(e.skillsDirectoryPath??join(n,`skills`)),i=normalizeLogicalPath(e.skillsLogicalPath??relative(n,r)),a=await t.stat(r);if(a===`missing`)return{diagnostics:[],skills:[]};if(a!==`directory`)return{diagnostics:[createDiscoverErrorDiagnostic({code:`discover/skills-directory-invalid`,message:`Expected "${r}" to be a directory of authored skills.`,sourcePath:r})],skills:[]};let o=[],s=new Set,c=new Map,l=await readSortedDirectoryEntries(t,r);for(let e of l){let n=await discoverOneSkill({entryName:e.name,entryType:getDirectoryEntryType(e),skillsDirectoryPath:r,skillsLogicalPath:i,source:t});if(o.push(...n.diagnostics),n.skill===null||n.skillId===null||s.has(n.skillId))continue;let a=c.get(n.skillId);if(a!==void 0){o.push(createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_COLLISION,message:`Found conflicting authored skill sources for "${n.skillId}": "${a.logicalPath}" and "${n.logicalPath}".`,sourcePath:join(r,n.skillId)})),s.add(n.skillId),c.delete(n.skillId);continue}c.set(n.skillId,{logicalPath:n.logicalPath,skill:n.skill})}return{diagnostics:o,skills:[...c.values()].map(e=>e.skill)}}async function discoverOneSkill(e){let t=join(e.skillsDirectoryPath,e.entryName);switch(classifySkillsDirectoryEntry(e.entryName,e.entryType)){case`skill-package-directory`:return discoverPackagedSkill({logicalSkillsPath:e.skillsLogicalPath,skillId:e.entryName,skillRootPath:t,source:e.source});case`flat-skill-markdown`:return discoverFlatMarkdownSkill({logicalSkillsPath:e.skillsLogicalPath,skillFileName:e.entryName,skillFilePath:t,source:e.source});case`flat-skill-module`:return discoverFlatModuleSkill({logicalSkillsPath:e.skillsLogicalPath,skillFileName:e.entryName});case`ignored-declaration`:case`ignored-source-map`:return{diagnostics:[],logicalPath:normalizeLogicalPath(join(e.skillsLogicalPath,e.entryName)),skill:null,skillId:null};default:return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_ENTRY_NOT_DIRECTORY,message:`Expected "${t}" to be a skill directory containing SKILL.md or a flat ".md", ".ts", ".cts", ".mts", ".js", ".cjs", or ".mjs" skill file.`,sourcePath:t})],logicalPath:normalizeLogicalPath(join(e.skillsLogicalPath,e.entryName)),skill:null,skillId:null}}}async function discoverPackagedSkill(e){let t=(await readSortedDirectoryEntries(e.source,e.skillRootPath)).find(e=>e.isFile()&&e.name.toLowerCase()===`skill.md`)?.name,n=join(e.skillRootPath,t??`SKILL.md`),r=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillId,t??`SKILL.md`));if(t===void 0)return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_MARKDOWN_MISSING,message:`Expected "${n}" to exist for the "${e.skillId}" skill.`,sourcePath:e.skillRootPath})],logicalPath:r,skill:null,skillId:null};let i;try{i=lowerSkillMarkdown(await e.source.readTextFile(n))}catch(e){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_FRONTMATTER_INVALID,message:formatSkillDiscoveryError(n,e),sourcePath:n})],logicalPath:r,skill:null,skillId:null}}let a=await discoverSkillPackagePaths(e.source,e.skillRootPath),o={description:i.description,logicalPath:r,markdown:i.markdown,name:e.skillId,rootPath:e.skillRootPath,skillFilePath:n,skillId:e.skillId,sourceId:createPathDerivedSourceId(r)};return a.assetsPath!==void 0&&(o.assetsPath=a.assetsPath),i.license!==void 0&&(o.license=i.license),i.metadata!==void 0&&(o.metadata=i.metadata),a.referencesPath!==void 0&&(o.referencesPath=a.referencesPath),a.scriptsPath!==void 0&&(o.scriptsPath=a.scriptsPath),{diagnostics:[],logicalPath:r,skill:createSkillPackageSourceRef(o),skillId:e.skillId}}async function discoverFlatMarkdownSkill(e){let t=stripMarkdownExtension(e.skillFileName),n=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillFileName)),r;try{r=lowerSkillMarkdown(await e.source.readTextFile(e.skillFilePath),{slug:t})}catch(t){return{diagnostics:[createDiscoverErrorDiagnostic({code:DISCOVER_SKILL_FRONTMATTER_INVALID,message:formatSkillDiscoveryError(e.skillFilePath,t),sourcePath:e.skillFilePath})],logicalPath:n,skill:null,skillId:null}}return{diagnostics:[],logicalPath:n,skill:{definition:r,sourceKind:`markdown`,logicalPath:n,sourceId:createPathDerivedSourceId(n)},skillId:t}}async function discoverFlatModuleSkill(e){let t=getSupportedModuleBaseName(e.skillFileName),n=normalizeLogicalPath(join(e.logicalSkillsPath,e.skillFileName));return t===null?{diagnostics:[],logicalPath:n,skill:null,skillId:null}:{diagnostics:[],logicalPath:n,skill:createModuleSourceRef({logicalPath:n}),skillId:t}}async function discoverSkillPackagePaths(e,t){let n=await e.readDirectory(t),r={};for(let e of n)if(e.isDirectory())switch(classifySkillPackageEntry(e.name,getDirectoryEntryType(e))){case`skill-assets-directory`:r.assetsPath=join(t,e.name);break;case`skill-references-directory`:r.referencesPath=join(t,e.name);break;case`skill-scripts-directory`:r.scriptsPath=join(t,e.name)}return r}function formatSkillDiscoveryError(e,t){return`Invalid authored skill frontmatter in "${e}": ${toErrorMessage(t)}`}function stripMarkdownExtension(e){return e.toLowerCase().endsWith(`.md`)?e.slice(0,-3):e}export{DISCOVER_SKILL_COLLISION,DISCOVER_SKILL_ENTRY_NOT_DIRECTORY,DISCOVER_SKILL_FRONTMATTER_INVALID,DISCOVER_SKILL_MARKDOWN_MISSING,discoverSkills};
@@ -8,7 +8,7 @@ import type { EveEvalTargetHandle } from "#evals/types.js";
8
8
  * Ambient Vercel credentials need the async {@link createEvalClient}.
9
9
  */
10
10
  export declare function resolveEvalClientOptions(target: Pick<EveEvalTargetHandle, "kind" | "url">): ClientOptions;
11
- export interface CreateEvalClientOptions {
11
+ interface CreateEvalClientOptions {
12
12
  /** Working directory for Vercel lookup and the fallback on-disk project link. */
13
13
  readonly workspaceRoot?: string;
14
14
  /** Test seams for the two authority-resolution boundaries. */
@@ -16,3 +16,4 @@ export interface CreateEvalClientOptions {
16
16
  }
17
17
  /** Creates one eval client, authorizing ambient Vercel credentials only after origin proof. */
18
18
  export declare function createEvalClient(target: Pick<EveEvalTargetHandle, "kind" | "url">, options?: CreateEvalClientOptions): Promise<Client>;
19
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { AssertionCollector } from "#evals/assertions/collector.js";
2
2
  import type { EveEvalJudgeConfig, JudgeContext } from "#evals/types.js";
3
- export interface JudgeDeps {
3
+ interface JudgeDeps {
4
4
  readonly collector: AssertionCollector;
5
5
  readonly getReply: () => string | null;
6
6
  readonly getInput: () => string;
@@ -9,3 +9,4 @@ export interface JudgeDeps {
9
9
  }
10
10
  /** Bind evaluation-backed judgments to the existing assertion lifecycle. */
11
11
  export declare function buildJudgeContext(deps: JudgeDeps): JudgeContext;
12
+ export {};
@@ -21,7 +21,7 @@ interface ExecuteTaskOptions {
21
21
  * set when the `test` body threw (e.g. a failed `expectOk()` or a bespoke
22
22
  * `throw`); the partial run is still captured so recorded assertions report.
23
23
  */
24
- export interface ExecuteTaskResult {
24
+ interface ExecuteTaskResult {
25
25
  readonly result: EveEvalTaskResult;
26
26
  readonly assertions: readonly AssertionResult[];
27
27
  readonly error?: string;
@@ -244,7 +244,7 @@ export interface EveEvalLiveTurn {
244
244
  waitForEvent<TType extends MessageStreamEvent["type"]>(type: TType, options?: EveEvalWaitForEventOptions<TType>): Promise<EveEvalStreamEvent<TType>>;
245
245
  }
246
246
  /** Operations and state belonging to one accepted session. */
247
- export interface EveEvalSessionDriver {
247
+ interface EveEvalSessionDriver {
248
248
  /** All events observed on this session so far. */
249
249
  readonly events: readonly MessageStreamEvent[];
250
250
  /**
@@ -2,7 +2,7 @@ import type { UserContent } from "ai";
2
2
  import type { SessionAuthContext } from "#channel/types.js";
3
3
  import type { MessageStreamEvent, SubagentCalledStreamEvent } from "#protocol/message.js";
4
4
  import type { ChannelCors } from "#public/definitions/channel.js";
5
- import { type EveChannelCors, type EveChannelCorsOptions, type EveChannelInput, type EveMessageContext, type EveMessageResult } from "#eve-channel/types.js";
5
+ import { type EveChannelCors, type EveChannelInput } from "#eve-channel/types.js";
6
6
  export declare function healthResponse(): Response;
7
7
  export declare function findRemoteSubagentBinding(input: {
8
8
  readonly callId: string;
@@ -17,7 +17,6 @@ export declare function findRemoteSubagentBinding(input: {
17
17
  };
18
18
  }): Promise<SubagentCalledStreamEvent | undefined>;
19
19
  export declare function normalizeEveCors(cors: EveChannelCors | undefined): ChannelCors;
20
- export declare function normalizeEveCorsOrigin(origin: NonNullable<EveChannelCorsOptions["origin"]>): "*" | "null" | readonly string[];
21
20
  interface OnMessageOutcome {
22
21
  readonly auth: SessionAuthContext | null;
23
22
  readonly context?: readonly string[];
@@ -30,5 +29,4 @@ export declare function resolveOnMessage(input: {
30
29
  readonly request: Request;
31
30
  readonly sessionId?: string;
32
31
  }): Promise<OnMessageOutcome | Response>;
33
- export declare function defaultOnMessage(ctx: EveMessageContext): EveMessageResult;
34
32
  export {};
@@ -1 +1 @@
1
- import{createLogger,logError}from"#internal/logging.js";import{defaultEveAuth}from"#eve-channel/types.js";import{workflowEntryReference}from"#execution/workflow-runtime.js";const log=createLogger(`eve.channel`);function healthResponse(){return Response.json({ok:!0,status:`ready`,workflowId:workflowEntryReference.workflowId})}async function findRemoteSubagentBinding(e){let t=await e.parent.getStreamTailIndex();if(t<0)return;let n=(await e.parent.getEventStream({startIndex:0})).getReader(),r;try{for(let i=0;i<=t;i+=1){let t=await n.read();if(t.done)break;let i=t.value;i.type===`subagent.called`&&i.data.sessionId===e.parentSessionId&&i.data.callId===e.callId&&i.data.childSessionId===e.childSessionId&&i.data.childStreamPath===e.childStreamPath&&i.data.remote!==void 0&&(r=i)}}finally{await n.cancel().catch(()=>{})}return r}function normalizeEveCors(e){if(e===void 0||e===!1)return!1;if(e===!0)return!0;let t={};return e.origin!==void 0&&(t.origin=normalizeEveCorsOrigin(e.origin)),e.methods!==void 0&&(t.methods=e.methods),e.allowedHeaders!==void 0&&(t.allowHeaders=e.allowedHeaders),e.exposedHeaders!==void 0&&(t.exposeHeaders=e.exposedHeaders),e.credentials!==void 0&&(t.credentials=e.credentials),e.maxAge!==void 0&&(t.maxAge=e.maxAge),e.preflightStatus!==void 0&&(t.preflight={statusCode:e.preflightStatus}),t}function normalizeEveCorsOrigin(e){return e===`*`||e===`null`?e:typeof e==`string`?[e]:e}async function resolveOnMessage(e){let t=e.config.onMessage??defaultOnMessage,n;try{if(n=await t({eve:e.sessionId===void 0?{caller:e.auth,request:e.request}:{caller:e.auth,request:e.request,sessionId:e.sessionId}},e.message),n==null)throw TypeError(`eveChannel onMessage must return an auth result.`)}catch(t){let n=logError(log,`onMessage handler failed`,t,{sessionId:e.sessionId});return Response.json({error:`onMessage handler failed.`,errorId:n,ok:!1},{status:500})}return{auth:n.auth,context:n.context,title:n.title}}function defaultOnMessage(e){return{auth:defaultEveAuth(e)}}export{defaultOnMessage,findRemoteSubagentBinding,healthResponse,normalizeEveCors,normalizeEveCorsOrigin,resolveOnMessage};
1
+ import{createLogger,logError}from"#internal/logging.js";import{defaultEveAuth}from"#eve-channel/types.js";import{workflowEntryReference}from"#execution/workflow-runtime.js";const log=createLogger(`eve.channel`);function healthResponse(){return Response.json({ok:!0,status:`ready`,workflowId:workflowEntryReference.workflowId})}async function findRemoteSubagentBinding(e){let t=await e.parent.getStreamTailIndex();if(t<0)return;let n=(await e.parent.getEventStream({startIndex:0})).getReader(),r;try{for(let i=0;i<=t;i+=1){let t=await n.read();if(t.done)break;let i=t.value;i.type===`subagent.called`&&i.data.sessionId===e.parentSessionId&&i.data.callId===e.callId&&i.data.childSessionId===e.childSessionId&&i.data.childStreamPath===e.childStreamPath&&i.data.remote!==void 0&&(r=i)}}finally{await n.cancel().catch(()=>{})}return r}function normalizeEveCors(e){if(e===void 0||e===!1)return!1;if(e===!0)return!0;let t={};return e.origin!==void 0&&(t.origin=normalizeEveCorsOrigin(e.origin)),e.methods!==void 0&&(t.methods=e.methods),e.allowedHeaders!==void 0&&(t.allowHeaders=e.allowedHeaders),e.exposedHeaders!==void 0&&(t.exposeHeaders=e.exposedHeaders),e.credentials!==void 0&&(t.credentials=e.credentials),e.maxAge!==void 0&&(t.maxAge=e.maxAge),e.preflightStatus!==void 0&&(t.preflight={statusCode:e.preflightStatus}),t}function normalizeEveCorsOrigin(e){return e===`*`||e===`null`?e:typeof e==`string`?[e]:e}async function resolveOnMessage(e){let t=e.config.onMessage??defaultOnMessage,n;try{if(n=await t({eve:e.sessionId===void 0?{caller:e.auth,request:e.request}:{caller:e.auth,request:e.request,sessionId:e.sessionId}},e.message),n==null)throw TypeError(`eveChannel onMessage must return an auth result.`)}catch(t){let n=logError(log,`onMessage handler failed`,t,{sessionId:e.sessionId});return Response.json({error:`onMessage handler failed.`,errorId:n,ok:!1},{status:500})}return{auth:n.auth,context:n.context,title:n.title}}function defaultOnMessage(e){return{auth:defaultEveAuth(e)}}export{findRemoteSubagentBinding,healthResponse,normalizeEveCors,resolveOnMessage};
@@ -20,7 +20,7 @@ export interface WorkflowProgramInput {
20
20
  readonly maxSubagents: number;
21
21
  }
22
22
  export type WorkflowProgramOptions = Pick<WorkflowProgramInput, "maxSubagents">;
23
- export interface WorkflowProgramAgentCall {
23
+ interface WorkflowProgramAgentCall {
24
24
  readonly input: {
25
25
  readonly agentId?: string;
26
26
  readonly message: string;
@@ -34,3 +34,4 @@ export declare function readWorkflowProgramCallInterrupt(input: {
34
34
  }): WorkflowProgramCallInterrupt;
35
35
  export declare function readWorkflowProgramAgentCall(value: unknown): WorkflowProgramAgentCall;
36
36
  export declare function parseWorkflowProgramOutput(value: unknown): JsonValue;
37
+ export {};
@@ -1 +1 @@
1
- import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function executeWorkflowProgram(e,t){"use workflow";return runJsProgram(e.js,t,{maxSubagents:e.maxSubagents??0})}executeWorkflowProgram.workflowId=`workflow//eve@0.67.0//executeWorkflowProgram`;export{executeWorkflowProgram};
1
+ import{runJsProgram}from"#execution/dynamic-workflow/workflow.js";async function executeWorkflowProgram(e,t){"use workflow";return runJsProgram(e.js,t,{maxSubagents:e.maxSubagents??0})}executeWorkflowProgram.workflowId=`workflow//eve@0.67.2//executeWorkflowProgram`;export{executeWorkflowProgram};
@@ -3,10 +3,11 @@ import type { RuntimeTurnAgent } from "#runtime/agent/bootstrap.js";
3
3
  import type { CompiledBundle } from "#runtime/sessions/runtime-context-keys.js";
4
4
  import type { AgentLimitsDefinition } from "#shared/agent-definition.js";
5
5
  import type { DynamicSubagentAgentConfig } from "#runtime/subagents/dynamic-agent-config.js";
6
- export interface EffectiveAgentRuntime {
6
+ interface EffectiveAgentRuntime {
7
7
  readonly limits?: AgentLimitsDefinition;
8
8
  readonly thresholdPercent?: number;
9
9
  readonly turnAgent: RuntimeTurnAgent;
10
10
  }
11
11
  export declare function resolveEffectiveAgentRuntime(bundle: Pick<CompiledBundle, "resolvedAgent" | "turnAgent">, context: ContextReader): EffectiveAgentRuntime;
12
12
  export declare function resolveEffectiveAgentRuntimeFromConfig(bundle: Pick<CompiledBundle, "resolvedAgent" | "turnAgent">, config: DynamicSubagentAgentConfig | undefined): EffectiveAgentRuntime;
13
+ export {};
@@ -41,13 +41,13 @@ import type { EveAttributeValue } from "#runtime/attributes/normalize.js";
41
41
  * delegated child runs. Tag emitters use this to populate
42
42
  * `$eve.subagent`.
43
43
  */
44
- export interface SessionIdentitySummary {
44
+ interface SessionIdentitySummary {
45
45
  readonly nodeId: string;
46
46
  }
47
47
  /**
48
48
  * Parent session lineage decoded from the serialized run context.
49
49
  */
50
- export interface SessionParentLineage {
50
+ interface SessionParentLineage {
51
51
  readonly callId?: string;
52
52
  readonly rootSessionId?: string;
53
53
  readonly sessionId?: string;
@@ -60,7 +60,6 @@ export interface SessionParentLineage {
60
60
  */
61
61
  export declare function readChannelKind(serializedContext: Record<string, unknown>): string | undefined;
62
62
  export declare function isWorkflowTraceContentVisible(serializedContext: Record<string, unknown>): boolean;
63
- export declare function isWorkflowOtelTraceEnabled(serializedContext: Record<string, unknown>): boolean;
64
63
  export declare function readSessionTraceId(serializedContext: Record<string, unknown>): string | undefined;
65
64
  /**
66
65
  * Reads parent session lineage from a deserialized context map. Returns
@@ -90,8 +89,6 @@ export declare function readRootSessionId(serializedContext: Record<string, unkn
90
89
  export declare function readChannelRequestId(serializedContext: Record<string, unknown>): string | undefined;
91
90
  /** Reads the schedule name inherited from a schedule dispatch scope. */
92
91
  export declare function readScheduleId(serializedContext: Record<string, unknown>): string | undefined;
93
- /** Reads the bounded title stored for a top-level session. */
94
- export declare function readSessionTitle(serializedContext: Record<string, unknown>): string | undefined;
95
92
  /**
96
93
  * Maximum visible length (in code points) of a derived `$eve.title`.
97
94
  *
@@ -142,3 +139,4 @@ export declare function buildSubagentRootAttributes(input: {
142
139
  readonly rootSessionId: string;
143
140
  readonly serializedContext: Record<string, unknown>;
144
141
  }): Record<string, EveAttributeValue>;
142
+ export {};