eve 0.67.1 → 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 (562) hide show
  1. package/CHANGELOG.md +10 -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.d.ts +2 -2
  9. package/dist/src/channel/session-callback.d.ts +2 -1
  10. package/dist/src/channel/types.d.ts +0 -7
  11. package/dist/src/cli/acp/command.d.ts +2 -1
  12. package/dist/src/cli/agent-command.d.ts +2 -1
  13. package/dist/src/cli/agent-detection.d.ts +0 -1
  14. package/dist/src/cli/agent-detection.js +1 -1
  15. package/dist/src/cli/application-command.d.ts +2 -1
  16. package/dist/src/cli/application-root.d.ts +3 -6
  17. package/dist/src/cli/application-root.js +1 -1
  18. package/dist/src/cli/commands/init-target.d.ts +1 -1
  19. package/dist/src/cli/commands/init-telemetry.d.ts +2 -1
  20. package/dist/src/cli/commands/registry-declared-setups.d.ts +2 -1
  21. package/dist/src/cli/commands/registry-install-transaction.d.ts +0 -13
  22. package/dist/src/cli/commands/registry-install-transaction.js +1 -1
  23. package/dist/src/cli/commands/registry-pnpm-build-policy-flow.d.ts +1 -1
  24. package/dist/src/cli/commands/registry-presentation.d.ts +0 -1
  25. package/dist/src/cli/commands/registry-presentation.js +1 -1
  26. package/dist/src/cli/commands/registry-project.d.ts +2 -1
  27. package/dist/src/cli/commands/registry.d.ts +0 -4
  28. package/dist/src/cli/commands/registry.js +1 -1
  29. package/dist/src/cli/commands/setup-headless.d.ts +2 -1
  30. package/dist/src/cli/commands/vercel-non-interactive.d.ts +2 -1
  31. package/dist/src/cli/dev/diagnostic-dump.d.ts +0 -2
  32. package/dist/src/cli/dev/diagnostic-dump.js +1 -1
  33. package/dist/src/cli/dev/diagnostic-sink.d.ts +3 -2
  34. package/dist/src/cli/dev/tui/agent-header.d.ts +2 -1
  35. package/dist/src/cli/dev/tui/argument-typeahead.d.ts +2 -1
  36. package/dist/src/cli/dev/tui/dev-rebuild-status.d.ts +2 -1
  37. package/dist/src/cli/dev/tui/diagnostic-presentation.d.ts +2 -1
  38. package/dist/src/cli/dev/tui/errors.d.ts +2 -7
  39. package/dist/src/cli/dev/tui/errors.js +1 -1
  40. package/dist/src/cli/dev/tui/flow-drawer.d.ts +2 -1
  41. package/dist/src/cli/dev/tui/line-editor.d.ts +1 -1
  42. package/dist/src/cli/dev/tui/mcp-connection-status.d.ts +2 -1
  43. package/dist/src/cli/dev/tui/message-queue.d.ts +4 -3
  44. package/dist/src/cli/dev/tui/prompt-command-handler.d.ts +2 -1
  45. package/dist/src/cli/dev/tui/provider-picker.d.ts +3 -2
  46. package/dist/src/cli/dev/tui/question-panel.d.ts +2 -1
  47. package/dist/src/cli/dev/tui/registry-result-message.d.ts +3 -4
  48. package/dist/src/cli/dev/tui/registry-result-message.js +1 -1
  49. package/dist/src/cli/dev/tui/remote-connection-probe.d.ts +3 -2
  50. package/dist/src/cli/dev/tui/setup-panel.d.ts +2 -2
  51. package/dist/src/cli/dev/tui/setup-selection-input.d.ts +2 -2
  52. package/dist/src/cli/dev/tui/status-line.d.ts +2 -1
  53. package/dist/src/cli/dev/tui/stream-format.d.ts +3 -2
  54. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +3 -2
  55. package/dist/src/cli/dev/tui/theme.d.ts +1 -1
  56. package/dist/src/cli/dev/tui/tool-block-groups.d.ts +3 -2
  57. package/dist/src/cli/dev/tui/tool-presentation.d.ts +2 -1
  58. package/dist/src/cli/dev/tui/traces/trace-content.d.ts +0 -9
  59. package/dist/src/cli/dev/tui/traces/trace-content.js +1 -1
  60. package/dist/src/cli/dev/tui/traces/trace-view.d.ts +3 -2
  61. package/dist/src/cli/dev/tui/traces/trace-viewer-session.d.ts +2 -1
  62. package/dist/src/cli/dev/tui/traces/trace-viewer-state.d.ts +2 -3
  63. package/dist/src/cli/dev/tui/traces/trace-viewer-state.js +1 -1
  64. package/dist/src/cli/dev/ui-options.d.ts +3 -2
  65. package/dist/src/cli/dev/url-target.d.ts +2 -1
  66. package/dist/src/cli/invoke/command.d.ts +0 -11
  67. package/dist/src/cli/invoke/command.js +1 -1
  68. package/dist/src/cli/invoke/result.d.ts +1 -1
  69. package/dist/src/cli/telemetry/index.d.ts +0 -6
  70. package/dist/src/cli/telemetry/preference.d.ts +2 -1
  71. package/dist/src/cli/ui/alt-screen.d.ts +3 -2
  72. package/dist/src/cli/ui/live-region.d.ts +3 -2
  73. package/dist/src/cli/ui/output.d.ts +1 -1
  74. package/dist/src/client/eve-agent-store-helpers.d.ts +0 -1
  75. package/dist/src/client/eve-agent-store-helpers.js +1 -1
  76. package/dist/src/client/message-action-parts.d.ts +2 -1
  77. package/dist/src/client/session-utils.d.ts +3 -2
  78. package/dist/src/compiled/.vendor-stamp.json +6 -6
  79. package/dist/src/compiled/@workflow/core/index.js +2 -2
  80. package/dist/src/compiled/@workflow/core/private.js +1 -1
  81. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +4 -3
  82. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +23 -0
  83. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  84. package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +69 -36
  85. package/dist/src/compiled/@workflow/core/runtime/lifecycle-hooks.d.ts +25 -22
  86. package/dist/src/compiled/@workflow/core/runtime/run-spec-version.d.ts +16 -0
  87. package/dist/src/compiled/@workflow/core/runtime/start.d.ts +59 -1
  88. package/dist/src/compiled/@workflow/core/runtime/step-latency.d.ts +3 -2
  89. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +34 -12
  90. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  91. package/dist/src/compiled/@workflow/core/serialization.d.ts +7 -2
  92. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  93. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +29 -0
  94. package/dist/src/compiled/@workflow/core/types.d.ts +1 -0
  95. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  96. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  97. package/dist/src/compiled/@workflow/errors/index.d.ts +13 -0
  98. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  99. package/dist/src/compiled/@workflow/world/events.d.ts +14 -4
  100. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  101. package/dist/src/compiled/@workflow/world/interfaces.d.ts +2 -1
  102. package/dist/src/compiled/@workflow/world/shared.d.ts +24 -0
  103. package/dist/src/compiled/@workflow/world/spec-version.d.ts +23 -0
  104. package/dist/src/compiled/@workflow/world-local/index.js +5 -5
  105. package/dist/src/compiled/@workflow/world-vercel/index.js +16 -16
  106. package/dist/src/compiled/_chunks/workflow/{attribute-changes-DzJovO_f.js → attribute-changes-D721NpZv.js} +3 -3
  107. package/dist/src/compiled/_chunks/workflow/{dist-BQSf8Hax.js → dist-BUFGAKRb.js} +1 -1
  108. package/dist/src/compiled/_chunks/workflow/dist-CaNNONeg.js +3 -0
  109. package/dist/src/compiled/_chunks/workflow/{frames-qKc30rjg.js → frames-Dr9fHWdo.js} +2 -2
  110. package/dist/src/compiled/_chunks/workflow/{global-BQnKzRXo.js → global-DKbOgrts.js} +1 -1
  111. package/dist/src/compiled/_chunks/workflow/helpers-DkKxg_yn.js +1 -0
  112. package/dist/src/compiled/_chunks/workflow/logger-D4GJNTk4.js +14 -0
  113. package/dist/src/compiled/_chunks/workflow/resume-hook-uTW-jBYz.js +1 -0
  114. package/dist/src/compiled/_chunks/workflow/run-5DmiMN9b.js +1 -0
  115. package/dist/src/compiled/_chunks/workflow/serialization-CNIYl1D3.js +3 -0
  116. package/dist/src/compiled/_chunks/workflow/sleep-DFKgN7UG.js +1 -0
  117. package/dist/src/compiled/_chunks/workflow/wait-until-3_1djUuL.js +1 -0
  118. package/dist/src/compiled/_chunks/workflow/{ws-transport-BrsMYqJg.js → ws-transport--rYOVIaf.js} +1 -1
  119. package/dist/src/compiler/artifacts.d.ts +4 -27
  120. package/dist/src/compiler/artifacts.js +1 -1
  121. package/dist/src/compiler/compile-agent.d.ts +2 -1
  122. package/dist/src/compiler/compile-agent.js +1 -1
  123. package/dist/src/compiler/diagnostics.d.ts +0 -11
  124. package/dist/src/compiler/diagnostics.js +1 -1
  125. package/dist/src/compiler/manifest.d.ts +0 -4
  126. package/dist/src/compiler/module-map.d.ts +1 -5
  127. package/dist/src/compiler/module-map.js +1 -1
  128. package/dist/src/compiler/normalize-agent-config.js +1 -1
  129. package/dist/src/compiler/normalize-connection.d.ts +2 -1
  130. package/dist/src/compiler/normalize-instructions.d.ts +2 -6
  131. package/dist/src/compiler/normalize-instructions.js +1 -1
  132. package/dist/src/compiler/normalize-manifest-helpers.d.ts +0 -1
  133. package/dist/src/compiler/normalize-manifest-helpers.js +1 -1
  134. package/dist/src/compiler/normalize-manifest.js +1 -1
  135. package/dist/src/compiler/normalize-skill.d.ts +2 -1
  136. package/dist/src/compiler/project-sources.d.ts +0 -14
  137. package/dist/src/compiler/project-sources.js +1 -1
  138. package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
  139. package/dist/src/compiler/source-graph.d.ts +1 -2
  140. package/dist/src/compiler/source-graph.js +1 -1
  141. package/dist/src/context/build-base-tool-context.d.ts +2 -1
  142. package/dist/src/context/dynamic-tool-lifecycle.d.ts +0 -4
  143. package/dist/src/context/dynamic-tool-lifecycle.js +1 -1
  144. package/dist/src/context/dynamic-tool-metadata.d.ts +0 -1
  145. package/dist/src/context/dynamic-tool-metadata.js +1 -1
  146. package/dist/src/context/memory-lifecycle.d.ts +0 -8
  147. package/dist/src/context/memory-lifecycle.js +1 -1
  148. package/dist/src/discover/connections.d.ts +0 -15
  149. package/dist/src/discover/connections.js +1 -1
  150. package/dist/src/discover/diagnostics.d.ts +0 -8
  151. package/dist/src/discover/diagnostics.js +1 -1
  152. package/dist/src/discover/discover-agent.js +1 -1
  153. package/dist/src/discover/discover-subagent.d.ts +0 -1
  154. package/dist/src/discover/discover-subagent.js +1 -1
  155. package/dist/src/discover/extensions.d.ts +3 -10
  156. package/dist/src/discover/extensions.js +1 -1
  157. package/dist/src/discover/filesystem.d.ts +5 -9
  158. package/dist/src/discover/filesystem.js +1 -1
  159. package/dist/src/discover/grammar.d.ts +0 -46
  160. package/dist/src/discover/grammar.js +1 -1
  161. package/dist/src/discover/manifest.d.ts +5 -4
  162. package/dist/src/discover/memory.d.ts +0 -1
  163. package/dist/src/discover/memory.js +1 -1
  164. package/dist/src/discover/named-source-directory.js +1 -1
  165. package/dist/src/discover/project-source.d.ts +2 -1
  166. package/dist/src/discover/project.js +1 -1
  167. package/dist/src/discover/sandbox.js +1 -1
  168. package/dist/src/discover/skills.d.ts +0 -4
  169. package/dist/src/discover/skills.js +1 -1
  170. package/dist/src/evals/cli/eval-client.d.ts +2 -1
  171. package/dist/src/evals/judge.d.ts +2 -1
  172. package/dist/src/evals/runner/execute-task.d.ts +1 -1
  173. package/dist/src/evals/types.d.ts +1 -1
  174. package/dist/src/eve-channel/support.d.ts +1 -3
  175. package/dist/src/eve-channel/support.js +1 -1
  176. package/dist/src/execution/dynamic-workflow/schema.d.ts +2 -1
  177. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  178. package/dist/src/execution/effective-agent-config.d.ts +2 -1
  179. package/dist/src/execution/eve-workflow-attributes.d.ts +3 -5
  180. package/dist/src/execution/eve-workflow-attributes.js +1 -1
  181. package/dist/src/execution/history-view.d.ts +2 -1
  182. package/dist/src/execution/node-step.d.ts +3 -2
  183. package/dist/src/execution/sandbox/active-handles.d.ts +2 -4
  184. package/dist/src/execution/sandbox/active-handles.js +1 -1
  185. package/dist/src/execution/sandbox/bash.d.ts +2 -1
  186. package/dist/src/execution/sandbox/bindings/docker.js +1 -1
  187. package/dist/src/execution/sandbox/bindings/immutable-resources.d.ts +0 -6
  188. package/dist/src/execution/sandbox/bindings/immutable-resources.js +1 -1
  189. package/dist/src/execution/sandbox/bindings/local-provider-utils.d.ts +3 -2
  190. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.d.ts +0 -1
  191. package/dist/src/execution/sandbox/bindings/microsandbox-lifecycle.js +1 -1
  192. package/dist/src/execution/sandbox/bindings/microsandbox-network.d.ts +1 -1
  193. package/dist/src/execution/sandbox/bindings/microsandbox-options.d.ts +0 -3
  194. package/dist/src/execution/sandbox/bindings/microsandbox-options.js +1 -1
  195. package/dist/src/execution/sandbox/bindings/microsandbox-templates.d.ts +0 -1
  196. package/dist/src/execution/sandbox/bindings/microsandbox-templates.js +1 -1
  197. package/dist/src/execution/sandbox/bindings/vercel.d.ts +1 -1
  198. package/dist/src/execution/sandbox/dockerfile.d.ts +0 -1
  199. package/dist/src/execution/sandbox/dockerfile.js +1 -1
  200. package/dist/src/execution/sandbox/ensure.d.ts +2 -1
  201. package/dist/src/execution/sandbox/ensure.js +1 -1
  202. package/dist/src/execution/sandbox/prewarm.d.ts +1 -18
  203. package/dist/src/execution/sandbox/prewarm.js +1 -1
  204. package/dist/src/execution/sandbox/require-sandbox.d.ts +0 -11
  205. package/dist/src/execution/sandbox/require-sandbox.js +1 -1
  206. package/dist/src/execution/sandbox/truncate-output.d.ts +2 -5
  207. package/dist/src/execution/sandbox/truncate-output.js +2 -2
  208. package/dist/src/execution/session/admission.d.ts +3 -2
  209. package/dist/src/execution/session/event-sink.d.ts +2 -1
  210. package/dist/src/execution/session/finalization.d.ts +2 -1
  211. package/dist/src/execution/session/handoff.d.ts +3 -2
  212. package/dist/src/execution/session/route-selected-delivery.d.ts +2 -1
  213. package/dist/src/execution/session/timeout-control.d.ts +2 -1
  214. package/dist/src/execution/session-activity.d.ts +0 -3
  215. package/dist/src/execution/session-activity.js +1 -1
  216. package/dist/src/execution/session-inbox/protocol.d.ts +2 -1
  217. package/dist/src/execution/session.d.ts +3 -2
  218. package/dist/src/execution/stable-workflow-names.d.ts +0 -6
  219. package/dist/src/execution/stable-workflow-names.js +1 -1
  220. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  221. package/dist/src/execution/tools/ask-question-workflow.js +1 -1
  222. package/dist/src/execution/tools/connection-search.js +1 -1
  223. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  224. package/dist/src/execution/tools/subagent/invoke-preparation.d.ts +2 -1
  225. package/dist/src/execution/tools/subagent/task-agent-requests.d.ts +4 -3
  226. package/dist/src/execution/tools/workflow/background.d.ts +2 -6
  227. package/dist/src/execution/tools/workflow/background.js +1 -1
  228. package/dist/src/execution/tools/workflow/owner-channels.d.ts +1 -1
  229. package/dist/src/execution/tools/workflow/workflow-owner-background.d.ts +2 -1
  230. package/dist/src/execution/web-fetch/execute.d.ts +2 -2
  231. package/dist/src/execution/web-fetch/request.d.ts +2 -1
  232. package/dist/src/extensions/code/extension/lib/computer-use-driver-source.d.ts +0 -2
  233. package/dist/src/extensions/code/extension/lib/computer-use-driver-source.js +57 -57
  234. package/dist/src/extensions/code/extension/lib/computer-use.d.ts +1 -1
  235. package/dist/src/extensions/code/extension/lib/generated-paths.d.ts +2 -1
  236. package/dist/src/extensions/code/extension/lib/grep-search.d.ts +5 -5
  237. package/dist/src/extensions/code/extension/lib/grep-search.js +2 -2
  238. package/dist/src/extensions/code/extension/lib/guidelines.d.ts +2 -1
  239. package/dist/src/extensions/code/extension/lib/patch.d.ts +3 -2
  240. package/dist/src/extensions/code/extension/lib/prwatch-github.d.ts +1 -2
  241. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  242. package/dist/src/extensions/code/extension/lib/prwatch-registry.d.ts +2 -1
  243. package/dist/src/framework/host-inventory.d.ts +3 -2
  244. package/dist/src/harness/approval-candidates.d.ts +4 -3
  245. package/dist/src/harness/approval-delivery-coordinator.d.ts +2 -1
  246. package/dist/src/harness/compaction-prompt.d.ts +2 -1
  247. package/dist/src/harness/coordination.d.ts +0 -4
  248. package/dist/src/harness/coordination.js +1 -1
  249. package/dist/src/harness/input-requests.d.ts +1 -10
  250. package/dist/src/harness/input-requests.js +1 -1
  251. package/dist/src/harness/pending-input-batches.d.ts +0 -5
  252. package/dist/src/harness/pending-input-batches.js +1 -1
  253. package/dist/src/harness/provider-tools.d.ts +2 -1
  254. package/dist/src/harness/session-limit-continuation.d.ts +0 -4
  255. package/dist/src/harness/session-limit-continuation.js +1 -1
  256. package/dist/src/harness/session-usage-limits.d.ts +2 -1
  257. package/dist/src/harness/tool-loop.js +1 -1
  258. package/dist/src/harness/tool-model-output.d.ts +2 -1
  259. package/dist/src/harness/turn-client-context.d.ts +2 -1
  260. package/dist/src/instrumentation/state.d.ts +2 -2
  261. package/dist/src/internal/agent-name.d.ts +0 -2
  262. package/dist/src/internal/agent-name.js +1 -1
  263. package/dist/src/internal/application/build-profile.d.ts +2 -2
  264. package/dist/src/internal/application/dev-environment.d.ts +2 -8
  265. package/dist/src/internal/application/dev-environment.js +1 -1
  266. package/dist/src/internal/application/output-publication.d.ts +1 -1
  267. package/dist/src/internal/application/package.js +1 -1
  268. package/dist/src/internal/application/paths.d.ts +0 -5
  269. package/dist/src/internal/application/paths.js +1 -1
  270. package/dist/src/internal/application/tsconfig-dependencies.d.ts +0 -16
  271. package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
  272. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  273. package/dist/src/internal/authored-definition/source-identity.d.ts +1 -1
  274. package/dist/src/internal/authored-module-map-loader.js +1 -1
  275. package/dist/src/internal/bundler/extension-scope-plugin.d.ts +2 -1
  276. package/dist/src/internal/bundler/nitro-rolldown.d.ts +0 -11
  277. package/dist/src/internal/bundler/nitro-rolldown.js +1 -1
  278. package/dist/src/internal/eve-project-root.d.ts +0 -3
  279. package/dist/src/internal/eve-project-root.js +1 -1
  280. package/dist/src/internal/external-resources-snapshot.d.ts +1 -1
  281. package/dist/src/internal/external-resources.d.ts +0 -1
  282. package/dist/src/internal/external-resources.js +1 -1
  283. package/dist/src/internal/helpers/markdown.js +1 -1
  284. package/dist/src/internal/invocation/metadata.d.ts +1 -1
  285. package/dist/src/internal/materialized-authored-modules.d.ts +2 -1
  286. package/dist/src/internal/mcp/protected-resource.d.ts +2 -1
  287. package/dist/src/internal/mcp/streamable-http-server.d.ts +4 -5
  288. package/dist/src/internal/mcp/streamable-http-server.js +1 -1
  289. package/dist/src/internal/model-catalog.d.ts +2 -1
  290. package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +0 -4
  291. package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
  292. package/dist/src/internal/nitro/dev-runtime-source-snapshot.d.ts +0 -1
  293. package/dist/src/internal/nitro/dev-runtime-source-snapshot.js +1 -1
  294. package/dist/src/internal/nitro/development-generation.d.ts +0 -1
  295. package/dist/src/internal/nitro/development-generation.js +1 -1
  296. package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -1
  297. package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +2 -1
  298. package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +2 -1
  299. package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +1 -1
  300. package/dist/src/internal/nitro/host/extension-capability-requirements.js +1 -1
  301. package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +1 -1
  302. package/dist/src/internal/nitro/host/workspace-extensions.js +1 -1
  303. package/dist/src/internal/nitro/routes/channel-request-instrumentation.d.ts +2 -1
  304. package/dist/src/internal/nitro/routes/channel-route-context.d.ts +1 -1
  305. package/dist/src/internal/nitro/routes/runtime-stack.d.ts +2 -1
  306. package/dist/src/internal/resolve-model-endpoint-status.d.ts +2 -1
  307. package/dist/src/internal/vercel/assemble-eve-services.d.ts +3 -2
  308. package/dist/src/internal/vercel/eve-service-contribution.d.ts +2 -3
  309. package/dist/src/internal/vercel/eve-service-contribution.js +1 -1
  310. package/dist/src/internal/vercel/project-link.d.ts +2 -1
  311. package/dist/src/internal/vercel/project-link.js +1 -1
  312. package/dist/src/internal/workflow/development-world-codec.d.ts +2 -1
  313. package/dist/src/internal/workflow/world-compatibility.d.ts +2 -1
  314. package/dist/src/internal/workflow-bundle/builder-support.d.ts +0 -9
  315. package/dist/src/internal/workflow-bundle/builder-support.js +2 -3
  316. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.d.ts +0 -1
  317. package/dist/src/internal/workflow-bundle/dynamic-tool-transform.js +1 -1
  318. package/dist/src/protocol/activity.d.ts +3 -3
  319. package/dist/src/protocol/activity.js +1 -1
  320. package/dist/src/protocol/baggage.d.ts +2 -2
  321. package/dist/src/protocol/cancel-turn.d.ts +0 -2
  322. package/dist/src/protocol/event-dedupe.d.ts +2 -1
  323. package/dist/src/protocol/event-id.d.ts +0 -6
  324. package/dist/src/protocol/event-id.js +1 -1
  325. package/dist/src/protocol/traceparent.d.ts +2 -1
  326. package/dist/src/public/channels/chat-sdk/audience.d.ts +2 -4
  327. package/dist/src/public/channels/chat-sdk/audience.js +1 -1
  328. package/dist/src/public/channels/discord/discordChannel.d.ts +1 -1
  329. package/dist/src/public/channels/github/api.d.ts +2 -12
  330. package/dist/src/public/channels/github/api.js +1 -1
  331. package/dist/src/public/channels/github/auth.d.ts +0 -9
  332. package/dist/src/public/channels/github/auth.js +1 -1
  333. package/dist/src/public/channels/github/binding.d.ts +3 -2
  334. package/dist/src/public/channels/github/checkout.d.ts +3 -3
  335. package/dist/src/public/channels/github/defaults.d.ts +3 -2
  336. package/dist/src/public/channels/github/githubChannel.d.ts +1 -1
  337. package/dist/src/public/channels/github/limits.d.ts +0 -2
  338. package/dist/src/public/channels/github/limits.js +2 -2
  339. package/dist/src/public/channels/github/pr-context.d.ts +2 -3
  340. package/dist/src/public/channels/github/pr-context.js +1 -1
  341. package/dist/src/public/channels/github/state.d.ts +2 -1
  342. package/dist/src/public/channels/github/verify.d.ts +2 -1
  343. package/dist/src/public/channels/linear/defaults.d.ts +2 -1
  344. package/dist/src/public/channels/linear/inbound-images.d.ts +2 -1
  345. package/dist/src/public/channels/slack/app-manifest.d.ts +3 -4
  346. package/dist/src/public/channels/slack/app-manifest.js +1 -1
  347. package/dist/src/public/channels/slack/inbound.d.ts +2 -1
  348. package/dist/src/public/channels/slack/model-context.d.ts +0 -18
  349. package/dist/src/public/channels/slack/model-context.js +1 -1
  350. package/dist/src/public/channels/slack/privacy.d.ts +2 -1
  351. package/dist/src/public/channels/slack/verify.d.ts +1 -1
  352. package/dist/src/public/channels/teams/teamsChannel.d.ts +1 -1
  353. package/dist/src/public/channels/telegram/audience.d.ts +2 -3
  354. package/dist/src/public/channels/telegram/audience.js +1 -1
  355. package/dist/src/public/channels/telegram/telegramChannel.d.ts +1 -1
  356. package/dist/src/public/channels/twilio/defaults.d.ts +0 -7
  357. package/dist/src/public/channels/twilio/defaults.js +1 -1
  358. package/dist/src/public/channels/twilio/routing.d.ts +2 -1
  359. package/dist/src/public/channels/twilio/twilioChannel.d.ts +1 -1
  360. package/dist/src/public/definitions/channel.d.ts +1 -1
  361. package/dist/src/public/index.js +1 -1
  362. package/dist/src/public/memory/file/provider.js +1 -1
  363. package/dist/src/public/models/openai/chatgpt/model.d.ts +2 -1
  364. package/dist/src/public/models/openai/chatgpt/token-broker.d.ts +1 -1
  365. package/dist/src/public/nuxt/dev-server.d.ts +3 -2
  366. package/dist/src/public/skills/index.js +1 -1
  367. package/dist/src/public/sveltekit/dev-server.d.ts +3 -2
  368. package/dist/src/public/tools/index.js +1 -1
  369. package/dist/src/runtime/compiled-artifacts-source.d.ts +0 -4
  370. package/dist/src/runtime/compiled-artifacts-source.js +1 -1
  371. package/dist/src/runtime/connections/instance-identity.d.ts +0 -3
  372. package/dist/src/runtime/connections/instance-identity.js +1 -1
  373. package/dist/src/runtime/connections/mcp-tracing.d.ts +1 -6
  374. package/dist/src/runtime/connections/mcp-tracing.js +1 -1
  375. package/dist/src/runtime/connections/openapi-client.d.ts +1 -1
  376. package/dist/src/runtime/connections/scoped-authorization.d.ts +0 -9
  377. package/dist/src/runtime/connections/scoped-authorization.js +1 -1
  378. package/dist/src/runtime/hooks/registry.d.ts +0 -7
  379. package/dist/src/runtime/hooks/registry.js +1 -1
  380. package/dist/src/runtime/loaders/artifact-paths.d.ts +2 -1
  381. package/dist/src/runtime/loaders/bundled-artifacts.d.ts +0 -1
  382. package/dist/src/runtime/loaders/bundled-artifacts.js +1 -1
  383. package/dist/src/runtime/resolve-agent.d.ts +2 -2
  384. package/dist/src/runtime/resolve-agent.js +1 -1
  385. package/dist/src/runtime/resolve-dynamic-tool.d.ts +0 -16
  386. package/dist/src/runtime/resolve-dynamic-tool.js +1 -1
  387. package/dist/src/runtime/sandbox/prepared-artifacts.d.ts +1 -2
  388. package/dist/src/runtime/sandbox/prepared-artifacts.js +1 -1
  389. package/dist/src/runtime/schedules/register.d.ts +0 -4
  390. package/dist/src/runtime/schedules/register.js +1 -1
  391. package/dist/src/self-modification/credentials.d.ts +1 -4
  392. package/dist/src/self-modification/credentials.js +1 -1
  393. package/dist/src/self-modification/filesystem.d.ts +0 -1
  394. package/dist/src/self-modification/filesystem.js +1 -1
  395. package/dist/src/self-modification/git-workspace.d.ts +0 -3
  396. package/dist/src/self-modification/git-workspace.js +1 -1
  397. package/dist/src/self-modification/github-publisher.d.ts +2 -1
  398. package/dist/src/self-modification/migration.d.ts +0 -1
  399. package/dist/src/self-modification/migration.js +1 -1
  400. package/dist/src/self-modification/mode.d.ts +2 -1
  401. package/dist/src/self-modification/proposal.d.ts +0 -2
  402. package/dist/src/self-modification/proposal.js +2 -2
  403. package/dist/src/self-modification/setup.js +1 -1
  404. package/dist/src/services/dev-client/agent-info-probe.d.ts +2 -1
  405. package/dist/src/services/dev-client/request-headers.d.ts +1 -1
  406. package/dist/src/setup/ai-gateway-api-key.d.ts +2 -1
  407. package/dist/src/setup/append-env.d.ts +3 -2
  408. package/dist/src/setup/ask.d.ts +3 -3
  409. package/dist/src/setup/boxes/apply-ai-gateway-credential.d.ts +2 -1
  410. package/dist/src/setup/boxes/deploy-project.d.ts +4 -3
  411. package/dist/src/setup/boxes/link-project.d.ts +2 -1
  412. package/dist/src/setup/boxes/resolve-provisioning.d.ts +2 -1
  413. package/dist/src/setup/boxes/select-model.d.ts +0 -1
  414. package/dist/src/setup/boxes/select-model.js +1 -1
  415. package/dist/src/setup/cli/option-row.d.ts +1 -1
  416. package/dist/src/setup/cli/prompt-ui.d.ts +0 -10
  417. package/dist/src/setup/cli/prompt-ui.js +1 -1
  418. package/dist/src/setup/cli/rail-log.d.ts +0 -2
  419. package/dist/src/setup/cli/rail-log.js +2 -2
  420. package/dist/src/setup/connect-provisioning.d.ts +2 -1
  421. package/dist/src/setup/connection-connector.d.ts +2 -1
  422. package/dist/src/setup/flows/link.d.ts +2 -1
  423. package/dist/src/setup/flows/model-login.d.ts +1 -1
  424. package/dist/src/setup/flows/model-source-change.js +1 -1
  425. package/dist/src/setup/flows/registry-session.d.ts +3 -2
  426. package/dist/src/setup/integrations/discord/api.d.ts +2 -1
  427. package/dist/src/setup/integrations/discord/connect.d.ts +3 -3
  428. package/dist/src/setup/integrations/discord/connect.js +1 -1
  429. package/dist/src/setup/integrations/discord/setup.d.ts +2 -1
  430. package/dist/src/setup/integrations/file-memory/vercel.d.ts +1 -1
  431. package/dist/src/setup/integrations/github/connect.d.ts +3 -3
  432. package/dist/src/setup/integrations/github/connect.js +1 -1
  433. package/dist/src/setup/integrations/github/setup.d.ts +1 -1
  434. package/dist/src/setup/integrations/linear/connect.d.ts +2 -2
  435. package/dist/src/setup/integrations/linear/connect.js +1 -1
  436. package/dist/src/setup/integrations/linear/setup.d.ts +1 -1
  437. package/dist/src/setup/integrations/linq/connect.d.ts +3 -4
  438. package/dist/src/setup/integrations/linq/connect.js +1 -1
  439. package/dist/src/setup/integrations/linq/management.d.ts +2 -1
  440. package/dist/src/setup/integrations/linq/setup.d.ts +1 -9
  441. package/dist/src/setup/integrations/linq/setup.js +1 -1
  442. package/dist/src/setup/integrations/photon/connect.d.ts +5 -7
  443. package/dist/src/setup/integrations/photon/connect.js +1 -1
  444. package/dist/src/setup/integrations/photon/management.d.ts +5 -4
  445. package/dist/src/setup/integrations/photon/setup-flow.d.ts +2 -1
  446. package/dist/src/setup/integrations/registry.d.ts +0 -2
  447. package/dist/src/setup/integrations/registry.js +1 -1
  448. package/dist/src/setup/integrations/runner.d.ts +3 -2
  449. package/dist/src/setup/integrations/shared/scaffold.d.ts +2 -1
  450. package/dist/src/setup/integrations/shared/vercel-project.d.ts +2 -1
  451. package/dist/src/setup/integrations/shopify/setup.d.ts +2 -1
  452. package/dist/src/setup/integrations/teams/connect.d.ts +3 -3
  453. package/dist/src/setup/integrations/teams/connect.js +1 -1
  454. package/dist/src/setup/integrations/teams/setup.d.ts +2 -1
  455. package/dist/src/setup/integrations/web/setup.d.ts +2 -1
  456. package/dist/src/setup/primitives/pm/process-result.d.ts +2 -1
  457. package/dist/src/setup/primitives/pm/shared.d.ts +2 -1
  458. package/dist/src/setup/primitives/process-output.d.ts +2 -1
  459. package/dist/src/setup/quit-guard.d.ts +3 -2
  460. package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -1
  461. package/dist/src/setup/scaffold/create/project.js +1 -1
  462. package/dist/src/setup/scaffold/files.d.ts +2 -1
  463. package/dist/src/setup/scaffold/update/channels.d.ts +0 -1
  464. package/dist/src/setup/scaffold/workspace-glob.d.ts +0 -1
  465. package/dist/src/setup/scaffold/workspace-glob.js +1 -1
  466. package/dist/src/setup/scaffold/workspace-root.d.ts +2 -1
  467. package/dist/src/setup/slack-connect-create.d.ts +1 -1
  468. package/dist/src/setup/slack-connect-lifecycle.d.ts +5 -5
  469. package/dist/src/setup/slack-connect.d.ts +0 -4
  470. package/dist/src/setup/slack-connect.js +1 -1
  471. package/dist/src/setup/slackbot.d.ts +3 -3
  472. package/dist/src/setup/slackbot.js +1 -1
  473. package/dist/src/setup/vercel-project-api.d.ts +1 -1
  474. package/dist/src/setup/vercel-project.d.ts +3 -18
  475. package/dist/src/setup/vercel-project.js +0 -0
  476. package/dist/src/shared/action-types.d.ts +1 -58
  477. package/dist/src/shared/action-types.js +1 -1
  478. package/dist/src/shared/agent-definition.d.ts +0 -3
  479. package/dist/src/shared/agent-turn-outcome.d.ts +1 -3
  480. package/dist/src/shared/agent-turn-outcome.js +1 -1
  481. package/dist/src/shared/chatgpt-model.d.ts +0 -1
  482. package/dist/src/shared/chatgpt-model.js +1 -1
  483. package/dist/src/shared/conversation-context.d.ts +2 -1
  484. package/dist/src/shared/extension-package-contract.d.ts +2 -1
  485. package/dist/src/shared/forwarded-trace-policy.d.ts +3 -2
  486. package/dist/src/shared/gateway-service-tier.d.ts +2 -1
  487. package/dist/src/shared/memory-state.d.ts +0 -8
  488. package/dist/src/shared/memory-state.js +1 -1
  489. package/dist/src/shared/sandbox-environment.d.ts +0 -1
  490. package/dist/src/shared/sandbox-environment.js +1 -1
  491. package/dist/src/shared/skill-package.d.ts +0 -5
  492. package/dist/src/shared/skill-package.js +1 -1
  493. package/dist/src/shared/token-usage.d.ts +0 -7
  494. package/dist/src/shared/token-usage.js +1 -1
  495. package/dist/src/shared/ulid.d.ts +2 -8
  496. package/dist/src/shared/ulid.js +1 -1
  497. package/dist/src/shared/vercel-project.d.ts +2 -1
  498. package/dist/src/shared/vercel-services.d.ts +2 -2
  499. package/dist/src/shared/workflow-sandbox.d.ts +0 -7
  500. package/dist/src/source-change/agent-config-ast.d.ts +2 -1
  501. package/dist/src/source-change/agent-config-string-path.d.ts +2 -2
  502. package/dist/src/source-change/apply-agent-model-settings.d.ts +2 -1
  503. package/dist/src/source-change/apply-model-selection.d.ts +2 -1
  504. package/dist/src/source-change/static-source-change.d.ts +4 -3
  505. package/dist/src/subagents/invocation.d.ts +1 -1
  506. package/dist/src/subagents/tool.d.ts +2 -1
  507. package/dist/src/tools/definition.d.ts +0 -3
  508. package/dist/src/tools/durable-callbacks.d.ts +1 -2
  509. package/dist/src/tools/durable-callbacks.js +1 -1
  510. package/dist/src/tools/framework/agent.js +1 -1
  511. package/dist/src/tools/framework/task-cancel.d.ts +1 -1
  512. package/dist/src/tools/native-definition.d.ts +2 -1
  513. package/dist/src/tracing/agent-action-instrumentation.d.ts +2 -1
  514. package/dist/src/tracing/agent-memory-instrumentation.d.ts +2 -1
  515. package/dist/src/tracing/agent-otel-provider.d.ts +2 -1
  516. package/dist/src/tracing/agent-span-id-generator.d.ts +0 -1
  517. package/dist/src/tracing/agent-span-id-generator.js +1 -1
  518. package/dist/src/tracing/agent-tool-instrumentation.d.ts +2 -1
  519. package/dist/src/tracing/agent-tool-span-context.d.ts +3 -2
  520. package/dist/src/tracing/agent-trace-state.d.ts +0 -24
  521. package/dist/src/tracing/agent-trace-state.js +1 -1
  522. package/dist/src/tracing/batch-span-processor.d.ts +2 -1
  523. package/dist/src/tracing/local-trace-analysis.d.ts +4 -3
  524. package/dist/src/tracing/local-trace-discovery-index.d.ts +0 -2
  525. package/dist/src/tracing/local-trace-discovery-index.js +1 -1
  526. package/dist/src/tracing/local-trace-query.d.ts +2 -1
  527. package/dist/src/tracing/local-trace-retention.d.ts +4 -4
  528. package/dist/src/tracing/telemetry-budget.d.ts +0 -1
  529. package/dist/src/tracing/telemetry-budget.js +1 -1
  530. package/package.json +8 -8
  531. package/dist/src/cli/commands/channel-add-conflicts.d.ts +0 -21
  532. package/dist/src/cli/commands/channel-add-conflicts.js +0 -1
  533. package/dist/src/cli/commands/registry-search-presentation.d.ts +0 -16
  534. package/dist/src/cli/commands/registry-search-presentation.js +0 -6
  535. package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +0 -3
  536. package/dist/src/compiled/_chunks/workflow/helpers-CNMO7zB1.js +0 -1
  537. package/dist/src/compiled/_chunks/workflow/logger-BCEj9caG.js +0 -14
  538. package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +0 -1
  539. package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +0 -1
  540. package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +0 -3
  541. package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +0 -1
  542. package/dist/src/compiled/_chunks/workflow/wait-until-Bo2U6ON9.js +0 -1
  543. package/dist/src/compiler/compile-from-memory.d.ts +0 -44
  544. package/dist/src/compiler/compile-from-memory.js +0 -1
  545. package/dist/src/execution/connection-auth-tool-result.d.ts +0 -2
  546. package/dist/src/execution/connection-auth-tool-result.js +0 -1
  547. package/dist/src/internal/process/pnpm.d.ts +0 -28
  548. package/dist/src/internal/process/pnpm.js +0 -1
  549. package/dist/src/public/channels/slack/api-encoding.d.ts +0 -5
  550. package/dist/src/public/channels/slack/api-encoding.js +0 -1
  551. package/dist/src/public/definitions/instrumentation.d.ts +0 -1
  552. package/dist/src/public/definitions/instrumentation.js +0 -1
  553. package/dist/src/public/models/openai/chatgpt/unsigned-jwt.d.ts +0 -5
  554. package/dist/src/public/models/openai/chatgpt/unsigned-jwt.js +0 -1
  555. package/dist/src/sandbox/backends/probes.d.ts +0 -7
  556. package/dist/src/sandbox/backends/probes.js +0 -1
  557. package/dist/src/setup/channel-add-conflicts.d.ts +0 -28
  558. package/dist/src/setup/channel-add-conflicts.js +0 -1
  559. package/dist/src/setup/primitives/run-pnpm.d.ts +0 -1
  560. package/dist/src/setup/primitives/run-pnpm.js +0 -1
  561. package/dist/src/shared/dispatch-action.d.ts +0 -30
  562. package/dist/src/shared/dispatch-action.js +0 -1
@@ -1 +1 @@
1
- import{isObject}from"#shared/guards.js";import{parseJsonObject}from"#shared/json.js";import{resolveGitHubInstallationToken}from"#public/channels/github/auth.js";var GitHubApiError=class extends Error{body;method;path;status;constructor(e){super(`GitHub ${e.method} ${e.path} failed with HTTP ${e.status}.`),this.name=`GitHubApiError`,this.body=e.body,this.method=e.method,this.path=e.path,this.status=e.status}};async function callGitHubApi(e){let t=e.api?.fetch??fetch,n=e.options?.auth!==!1,r={accept:`application/vnd.github+json`,"x-github-api-version":`2022-11-28`,...e.options?.headers};e.body!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),n&&(r.authorization=`Bearer ${await resolveGitHubInstallationToken({api:e.api,credentials:e.credentials,installationId:e.options?.installationId??e.installationId})}`);let i=await t(`${e.api?.apiBaseUrl??`https://api.github.com`}${e.path}`,{body:e.body===void 0?void 0:JSON.stringify(parseJsonObject(e.body)),headers:r,method:e.method}),a=await parseResponseBody(i);if(!i.ok)throw new GitHubApiError({body:a,method:e.method,path:e.path,status:i.status});return{body:a,ok:i.ok,status:i.status}}async function createGitHubIssueComment(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/issues/${e.issueNumber}/comments`})).body)}async function updateGitHubIssueComment(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`PATCH`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/issues/comments/${e.commentId}`})).body)}async function createGitHubReviewCommentReply(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/comments/${e.commentId}/replies`})).body)}function createGitHubPullRequestReview(e){return callGitHubApi({api:e.api,body:e.body,credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/reviews`})}async function getGitHubPullRequest(e){return toPullRequestDetails((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}`})).body)}async function listGitHubPullRequestFiles(e){let t=e.perPage===void 0?``:`?per_page=${Math.min(e.perPage,100)}`;return(await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/files${t}`})).body.map(toPullRequestFile)}async function listGitHubCompareFiles(e){return((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/compare/${e.baseSha}...${e.headSha}`})).body.files??[]).map(toPullRequestFile)}function createGitHubReaction(e){let t=e.subject===`issue_comment`?`issues/comments`:`pulls/comments`;return callGitHubApi({api:e.api,body:{content:e.content},credentials:e.credentials,installationId:e.installationId,method:`POST`,options:{headers:{accept:`application/vnd.github+json`}},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/${t}/${e.commentId}/reactions`})}async function getGitHubRepository(e){let t=await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,options:{auth:e.auth??e.installationId!==void 0},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}`}),n=isObject(t.body)?t.body:{},r=typeof n.id==`number`?n.id:0;return{defaultBranch:typeof n.default_branch==`string`?n.default_branch:void 0,id:r}}function normalizeCommentBody(e){return{body:typeof e==`string`?e:e.body}}function toPostedComment(e){let t=isObject(e)?e:{};return{htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,id:typeof t.id==`number`?t.id:0,raw:e,url:typeof t.url==`string`?t.url:void 0}}function toPullRequestFile(e){let t=isObject(e)?e:{};return{additions:typeof t.additions==`number`?t.additions:void 0,changes:typeof t.changes==`number`?t.changes:void 0,deletions:typeof t.deletions==`number`?t.deletions:void 0,filename:typeof t.filename==`string`?t.filename:``,patch:typeof t.patch==`string`?t.patch:void 0,status:typeof t.status==`string`?t.status:void 0}}function toPullRequestDetails(e){let t=isObject(e)?e:{},n=toPullRequestRefDetails(t.base);return{additions:typeof t.additions==`number`?t.additions:void 0,author:toPullRequestUser(t.user),base:n,body:typeof t.body==`string`&&t.body.length>0?t.body:void 0,changedFiles:typeof t.changed_files==`number`?t.changed_files:void 0,defaultBranch:readDefaultBranch(t.base),deletions:typeof t.deletions==`number`?t.deletions:void 0,draft:t.draft===!0,head:toPullRequestRefDetails(t.head),htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,mergeable:typeof t.mergeable==`boolean`||t.mergeable===null?t.mergeable:void 0,number:typeof t.number==`number`?t.number:0,raw:e,state:typeof t.state==`string`?t.state:void 0,title:typeof t.title==`string`?t.title:``}}function toPullRequestRefDetails(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return{ref:typeof t.ref==`string`?t.ref:void 0,repoFullName:typeof n.full_name==`string`?n.full_name:void 0,sha:typeof t.sha==`string`?t.sha:void 0}}function toPullRequestUser(e){if(isObject(e)&&typeof e.login==`string`)return{id:typeof e.id==`number`?e.id:0,login:e.login,type:typeof e.type==`string`?e.type:`User`}}function readDefaultBranch(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return typeof n.default_branch==`string`?n.default_branch:void 0}async function parseResponseBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function encodePath(e){return encodeURIComponent(e)}export{GitHubApiError,callGitHubApi,createGitHubIssueComment,createGitHubPullRequestReview,createGitHubReaction,createGitHubReviewCommentReply,getGitHubPullRequest,getGitHubRepository,listGitHubCompareFiles,listGitHubPullRequestFiles,updateGitHubIssueComment};
1
+ import{isObject}from"#shared/guards.js";import{parseJsonObject}from"#shared/json.js";import{resolveGitHubInstallationToken}from"#public/channels/github/auth.js";var GitHubApiError=class extends Error{body;method;path;status;constructor(e){super(`GitHub ${e.method} ${e.path} failed with HTTP ${e.status}.`),this.name=`GitHubApiError`,this.body=e.body,this.method=e.method,this.path=e.path,this.status=e.status}};async function callGitHubApi(e){let t=e.api?.fetch??fetch,n=e.options?.auth!==!1,r={accept:`application/vnd.github+json`,"x-github-api-version":`2022-11-28`,...e.options?.headers};e.body!==void 0&&(r[`content-type`]=`application/json; charset=utf-8`),n&&(r.authorization=`Bearer ${await resolveGitHubInstallationToken({api:e.api,credentials:e.credentials,installationId:e.options?.installationId??e.installationId})}`);let i=await t(`${e.api?.apiBaseUrl??`https://api.github.com`}${e.path}`,{body:e.body===void 0?void 0:JSON.stringify(parseJsonObject(e.body)),headers:r,method:e.method}),a=await parseResponseBody(i);if(!i.ok)throw new GitHubApiError({body:a,method:e.method,path:e.path,status:i.status});return{body:a,ok:i.ok,status:i.status}}async function createGitHubIssueComment(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/issues/${e.issueNumber}/comments`})).body)}async function createGitHubReviewCommentReply(e){return toPostedComment((await callGitHubApi({api:e.api,body:normalizeCommentBody(e.body),credentials:e.credentials,installationId:e.installationId,method:`POST`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/comments/${e.commentId}/replies`})).body)}async function getGitHubPullRequest(e){return toPullRequestDetails((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}`})).body)}async function listGitHubPullRequestFiles(e){let t=e.perPage===void 0?``:`?per_page=${Math.min(e.perPage,100)}`;return(await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/pulls/${e.pullRequestNumber}/files${t}`})).body.map(toPullRequestFile)}async function listGitHubCompareFiles(e){return((await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/compare/${e.baseSha}...${e.headSha}`})).body.files??[]).map(toPullRequestFile)}function createGitHubReaction(e){let t=e.subject===`issue_comment`?`issues/comments`:`pulls/comments`;return callGitHubApi({api:e.api,body:{content:e.content},credentials:e.credentials,installationId:e.installationId,method:`POST`,options:{headers:{accept:`application/vnd.github+json`}},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}/${t}/${e.commentId}/reactions`})}async function getGitHubRepository(e){let t=await callGitHubApi({api:e.api,credentials:e.credentials,installationId:e.installationId,method:`GET`,options:{auth:e.auth??e.installationId!==void 0},path:`/repos/${encodePath(e.owner)}/${encodePath(e.repo)}`}),n=isObject(t.body)?t.body:{},r=typeof n.id==`number`?n.id:0;return{defaultBranch:typeof n.default_branch==`string`?n.default_branch:void 0,id:r}}function normalizeCommentBody(e){return{body:typeof e==`string`?e:e.body}}function toPostedComment(e){let t=isObject(e)?e:{};return{htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,id:typeof t.id==`number`?t.id:0,raw:e,url:typeof t.url==`string`?t.url:void 0}}function toPullRequestFile(e){let t=isObject(e)?e:{};return{additions:typeof t.additions==`number`?t.additions:void 0,changes:typeof t.changes==`number`?t.changes:void 0,deletions:typeof t.deletions==`number`?t.deletions:void 0,filename:typeof t.filename==`string`?t.filename:``,patch:typeof t.patch==`string`?t.patch:void 0,status:typeof t.status==`string`?t.status:void 0}}function toPullRequestDetails(e){let t=isObject(e)?e:{},n=toPullRequestRefDetails(t.base);return{additions:typeof t.additions==`number`?t.additions:void 0,author:toPullRequestUser(t.user),base:n,body:typeof t.body==`string`&&t.body.length>0?t.body:void 0,changedFiles:typeof t.changed_files==`number`?t.changed_files:void 0,defaultBranch:readDefaultBranch(t.base),deletions:typeof t.deletions==`number`?t.deletions:void 0,draft:t.draft===!0,head:toPullRequestRefDetails(t.head),htmlUrl:typeof t.html_url==`string`?t.html_url:void 0,mergeable:typeof t.mergeable==`boolean`||t.mergeable===null?t.mergeable:void 0,number:typeof t.number==`number`?t.number:0,raw:e,state:typeof t.state==`string`?t.state:void 0,title:typeof t.title==`string`?t.title:``}}function toPullRequestRefDetails(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return{ref:typeof t.ref==`string`?t.ref:void 0,repoFullName:typeof n.full_name==`string`?n.full_name:void 0,sha:typeof t.sha==`string`?t.sha:void 0}}function toPullRequestUser(e){if(isObject(e)&&typeof e.login==`string`)return{id:typeof e.id==`number`?e.id:0,login:e.login,type:typeof e.type==`string`?e.type:`User`}}function readDefaultBranch(e){let t=isObject(e)?e:{},n=isObject(t.repo)?t.repo:{};return typeof n.default_branch==`string`?n.default_branch:void 0}async function parseResponseBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function encodePath(e){return encodeURIComponent(e)}export{GitHubApiError,callGitHubApi,createGitHubIssueComment,createGitHubReaction,createGitHubReviewCommentReply,getGitHubPullRequest,getGitHubRepository,listGitHubCompareFiles,listGitHubPullRequestFiles};
@@ -101,12 +101,3 @@ export declare function createGitHubInstallationToken(input: {
101
101
  readonly installationId: number;
102
102
  readonly privateKey?: GitHubPrivateKey;
103
103
  }): Promise<string>;
104
- /** Clears the in-memory GitHub installation token cache. Intended for tests. */
105
- export declare function clearGitHubInstallationTokenCache(): void;
106
- /** Seeds the in-memory installation token cache. Intended for tests. */
107
- export declare function seedGitHubInstallationTokenForTests(input: {
108
- readonly apiBaseUrl?: string;
109
- readonly appId?: string;
110
- readonly installationId: number;
111
- readonly token: string;
112
- }): void;
@@ -1,2 +1,2 @@
1
1
  import{createSign}from"node:crypto";import{createLogger}from"#internal/logging.js";import{isObject}from"#shared/guards.js";const log=createLogger(`github.auth`),installationTokenCache=new Map;async function resolveGitHubAppId(e){let t=e??process.env.GITHUB_APP_ID;if(t===void 0||t===``)throw Error(`githubChannel: GITHUB_APP_ID is required.`);let n=typeof t==`function`?await t():t;return String(n)}async function resolveGitHubPrivateKey(e){let t=e??process.env.GITHUB_APP_PRIVATE_KEY;if(!t)throw Error(`githubChannel: GITHUB_APP_PRIVATE_KEY is required.`);return normalizeGitHubPrivateKey(typeof t==`function`?await t():t)}async function resolveGitHubWebhookSecret(e){let t=e??process.env.GITHUB_WEBHOOK_SECRET;if(!t)throw Error(`githubChannel: GITHUB_WEBHOOK_SECRET is required.`);return typeof t==`function`?await t():t}function createGitHubBotNameResolver(e){let t;return async()=>{if(t!==void 0)return t;let n=e.botName??e.credentials?.appSlug??process.env.GITHUB_APP_SLUG;if(n!==void 0){if(typeof n==`string`)return t=normalizeBotName(n),t;try{return t=normalizeBotName(await n()),t}catch(e){log.warn(`githubChannel: botName resolver failed; retrying on the next event`,{error:e});return}}}}function normalizeBotName(e){let t=e.trim();return t.length>0?t:void 0}function normalizeGitHubPrivateKey(e){return e.replace(/\\n/gu,`
2
- `)}async function createGitHubAppJwt(e){let t=await resolveGitHubAppId(e.appId),n=await resolveGitHubPrivateKey(e.privateKey),r=Math.floor((e.now?.getTime()??Date.now())/1e3),i={alg:`RS256`,typ:`JWT`},a={exp:r+600,iat:r-60,iss:t},o=`${base64UrlJson(i)}.${base64UrlJson(a)}`;return`${o}.${createSign(`RSA-SHA256`).update(o).sign(n,`base64url`)}`}async function resolveGitHubInstallationToken(e){let t=e.credentials?.installationToken;if(t!==void 0)return typeof t==`function`?await t():t;if(e.installationId===void 0)throw Error(`githubChannel: installationId is required for authenticated GitHub API calls.`);return createGitHubInstallationToken({api:e.api,appId:e.credentials?.appId,installationId:e.installationId,privateKey:e.credentials?.privateKey})}async function createGitHubInstallationToken(e){let t=await resolveGitHubAppId(e.appId),n=e.api?.apiBaseUrl??`https://api.github.com`,r=`${n}:${t}:${e.installationId}`,i=installationTokenCache.get(r);if(i!==void 0&&Date.now()<i.expiresAtMs-6e4)return i.token;let a=await createGitHubAppJwt({appId:t,privateKey:e.privateKey}),o=await(e.api?.fetch??fetch)(`${n}/app/installations/${e.installationId}/access_tokens`,{headers:{accept:`application/vnd.github+json`,authorization:`Bearer ${a}`,"x-github-api-version":`2022-11-28`},method:`POST`}),s=await parseJsonBody(o);if(!o.ok)throw Error(`githubChannel: create installation token failed with HTTP ${o.status}.`);if(!isObject(s)||typeof s.token!=`string`)throw Error(`githubChannel: installation token response did not include a token.`);let c=parseExpiryMs(s.expires_at);return installationTokenCache.set(r,{expiresAtMs:c,token:s.token}),s.token}function clearGitHubInstallationTokenCache(){installationTokenCache.clear()}function seedGitHubInstallationTokenForTests(e){let t=e.apiBaseUrl??`https://api.github.com`,n=e.appId??`test-app`;installationTokenCache.set(`${t}:${n}:${e.installationId}`,{expiresAtMs:Date.now()+36e5,token:e.token})}function base64UrlJson(e){return Buffer.from(JSON.stringify(e)).toString(`base64url`)}async function parseJsonBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function parseExpiryMs(e){if(typeof e==`string`){let t=Date.parse(e);if(Number.isFinite(t))return t}return Date.now()+36e5}export{clearGitHubInstallationTokenCache,createGitHubAppJwt,createGitHubBotNameResolver,createGitHubInstallationToken,normalizeGitHubPrivateKey,resolveGitHubAppId,resolveGitHubInstallationToken,resolveGitHubPrivateKey,resolveGitHubWebhookSecret,seedGitHubInstallationTokenForTests};
2
+ `)}async function createGitHubAppJwt(e){let t=await resolveGitHubAppId(e.appId),n=await resolveGitHubPrivateKey(e.privateKey),r=Math.floor((e.now?.getTime()??Date.now())/1e3),i={alg:`RS256`,typ:`JWT`},a={exp:r+600,iat:r-60,iss:t},o=`${base64UrlJson(i)}.${base64UrlJson(a)}`;return`${o}.${createSign(`RSA-SHA256`).update(o).sign(n,`base64url`)}`}async function resolveGitHubInstallationToken(e){let t=e.credentials?.installationToken;if(t!==void 0)return typeof t==`function`?await t():t;if(e.installationId===void 0)throw Error(`githubChannel: installationId is required for authenticated GitHub API calls.`);return createGitHubInstallationToken({api:e.api,appId:e.credentials?.appId,installationId:e.installationId,privateKey:e.credentials?.privateKey})}async function createGitHubInstallationToken(e){let t=await resolveGitHubAppId(e.appId),n=e.api?.apiBaseUrl??`https://api.github.com`,r=`${n}:${t}:${e.installationId}`,i=installationTokenCache.get(r);if(i!==void 0&&Date.now()<i.expiresAtMs-6e4)return i.token;let a=await createGitHubAppJwt({appId:t,privateKey:e.privateKey}),o=await(e.api?.fetch??fetch)(`${n}/app/installations/${e.installationId}/access_tokens`,{headers:{accept:`application/vnd.github+json`,authorization:`Bearer ${a}`,"x-github-api-version":`2022-11-28`},method:`POST`}),s=await parseJsonBody(o);if(!o.ok)throw Error(`githubChannel: create installation token failed with HTTP ${o.status}.`);if(!isObject(s)||typeof s.token!=`string`)throw Error(`githubChannel: installation token response did not include a token.`);let c=parseExpiryMs(s.expires_at);return installationTokenCache.set(r,{expiresAtMs:c,token:s.token}),s.token}function base64UrlJson(e){return Buffer.from(JSON.stringify(e)).toString(`base64url`)}async function parseJsonBody(e){let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch{return t}}function parseExpiryMs(e){if(typeof e==`string`){let t=Date.parse(e);if(Number.isFinite(t))return t}return Date.now()+36e5}export{createGitHubAppJwt,createGitHubBotNameResolver,createGitHubInstallationToken,normalizeGitHubPrivateKey,resolveGitHubAppId,resolveGitHubInstallationToken,resolveGitHubPrivateKey,resolveGitHubWebhookSecret};
@@ -2,12 +2,12 @@ import { type GitHubApiMethod, type GitHubApiOptions, type GitHubApiResponse, ty
2
2
  import type { GitHubChannelCredentials } from "#public/channels/github/auth.js";
3
3
  import type { GitHubConversationKind, GitHubRepositoryRef } from "#public/channels/github/inbound.js";
4
4
  /** Minimal config needed to rebuild GitHub API handles. */
5
- export interface GitHubBindingConfig {
5
+ interface GitHubBindingConfig {
6
6
  readonly api?: GitHubApiOptions;
7
7
  readonly credentials?: GitHubChannelCredentials;
8
8
  }
9
9
  /** Serializable state fields needed to rebuild GitHub API handles. */
10
- export interface GitHubBindingState {
10
+ interface GitHubBindingState {
11
11
  readonly conversationKind: GitHubConversationKind;
12
12
  readonly installationId: number | null;
13
13
  readonly issueNumber: number | null;
@@ -57,3 +57,4 @@ export declare function buildGitHubBinding(input: {
57
57
  readonly github: GitHubHandle;
58
58
  readonly thread: GitHubThread;
59
59
  };
60
+ export {};
@@ -6,7 +6,7 @@ type NetworkPolicySandboxSession = SandboxSession & {
6
6
  import { type GitHubApiOptions } from "#public/channels/github/api.js";
7
7
  import { type GitHubChannelCredentials } from "#public/channels/github/auth.js";
8
8
  /** Options for cloning a GitHub repository ref into the active sandbox. */
9
- export interface GitHubCheckoutOptions {
9
+ interface GitHubCheckoutOptions {
10
10
  readonly depth?: number;
11
11
  readonly includeBase?: boolean;
12
12
  readonly mode?: "full" | "shallow";
@@ -14,14 +14,14 @@ export interface GitHubCheckoutOptions {
14
14
  readonly ref?: string;
15
15
  }
16
16
  /** Result returned after a GitHub checkout completes. */
17
- export interface GitHubCheckout {
17
+ interface GitHubCheckout {
18
18
  readonly baseRef: string | null;
19
19
  readonly path: string;
20
20
  readonly ref: string;
21
21
  readonly sha: string;
22
22
  }
23
23
  /** Internal descriptor used by channel-owned checkout paths. */
24
- export interface GitHubCheckoutInput extends GitHubCheckoutOptions {
24
+ interface GitHubCheckoutInput extends GitHubCheckoutOptions {
25
25
  readonly api?: GitHubApiOptions;
26
26
  readonly baseRef?: string | null;
27
27
  readonly baseSha?: string | null;
@@ -11,13 +11,13 @@ import type { GitHubChannelEvents, GitHubInboundContext, GitHubInboundResult, Gi
11
11
  */
12
12
  export declare function defaultGitHubAuth(ctx: GitHubInboundContext): SessionAuthContext;
13
13
  /** Options used by the built-in GitHub comment dispatch hook. */
14
- export interface GitHubDefaultDispatchOptions {
14
+ interface GitHubDefaultDispatchOptions {
15
15
  readonly botName?: GitHubBotNameResolver;
16
16
  }
17
17
  /** Default comment hook: dispatch only when the comment `@mention`s the bot. */
18
18
  export declare function defaultOnComment(ctx: GitHubInboundContext, comment: GitHubComment, options: GitHubDefaultDispatchOptions): Promise<GitHubInboundResult>;
19
19
  /** Options used by built-in GitHub event handlers. */
20
- export interface GitHubDefaultEventOptions {
20
+ interface GitHubDefaultEventOptions {
21
21
  readonly api?: GitHubApiOptions;
22
22
  readonly botName?: GitHubBotNameResolver;
23
23
  readonly credentials?: GitHubChannelCredentials;
@@ -25,3 +25,4 @@ export interface GitHubDefaultEventOptions {
25
25
  }
26
26
  /** Builds GitHub's built-in event handlers for acknowledgement and terminal output. */
27
27
  export declare function createDefaultEvents(options?: GitHubDefaultEventOptions): GitHubChannelEvents;
28
+ export {};
@@ -43,7 +43,7 @@ export interface GitHubInboundContext {
43
43
  readonly thread: GitHubThread;
44
44
  }
45
45
  /** Channel-owned GitHub context rebuilt from persisted channel state. */
46
- export interface GitHubChannelContext {
46
+ interface GitHubChannelContext {
47
47
  readonly conversation: GitHubConversationRef;
48
48
  readonly github: GitHubHandle;
49
49
  readonly repository: GitHubRepositoryRef;
@@ -1,4 +1,2 @@
1
- /** Maximum body length accepted by GitHub issue and pull-request comments. */
2
- export declare const GITHUB_COMMENT_BODY_MAX_LENGTH = 65536;
3
1
  /** Splits a long comment body into GitHub-sized comment bodies. */
4
2
  export declare function splitGitHubCommentBody(body: string, maxLength?: number): readonly string[];
@@ -1,2 +1,2 @@
1
- const GITHUB_COMMENT_BODY_MAX_LENGTH=65536;function splitGitHubCommentBody(e,t=GITHUB_COMMENT_BODY_MAX_LENGTH){if(e.length<=t)return[e];let n=[],r=e;for(;r.length>t;){let e=findCommentSplitIndex(r,t);n.push(r.slice(0,e).trimEnd()),r=r.slice(e).trimStart()}return r.length>0&&n.push(r),n}function findCommentSplitIndex(e,t){let n=e.lastIndexOf(`
2
- `,t);if(n>t*.5)return n;let r=e.lastIndexOf(` `,t);return r>t*.5?r:t}export{GITHUB_COMMENT_BODY_MAX_LENGTH,splitGitHubCommentBody};
1
+ function splitGitHubCommentBody(e,t=65536){if(e.length<=t)return[e];let n=[],r=e;for(;r.length>t;){let e=findCommentSplitIndex(r,t);n.push(r.slice(0,e).trimEnd()),r=r.slice(e).trimStart()}return r.length>0&&n.push(r),n}function findCommentSplitIndex(e,t){let n=e.lastIndexOf(`
2
+ `,t);if(n>t*.5)return n;let r=e.lastIndexOf(` `,t);return r>t*.5?r:t}export{splitGitHubCommentBody};
@@ -20,7 +20,7 @@ export interface GitHubPullRequestContextConfig {
20
20
  readonly excludedFiles?: readonly string[];
21
21
  }
22
22
  /** Input for building one-shot model context for a pull request. */
23
- export interface GitHubPullRequestContextInput {
23
+ interface GitHubPullRequestContextInput {
24
24
  readonly api?: GitHubApiOptions;
25
25
  /**
26
26
  * When set with {@link headSha}, file patches load via the compare API for
@@ -52,5 +52,4 @@ export declare function mergeGitHubContext(input: {
52
52
  readonly github?: readonly string[];
53
53
  readonly hook?: readonly string[];
54
54
  }): readonly string[] | undefined;
55
- /** Returns true when a file path matches any of the provided glob patterns. */
56
- export declare function fileMatchesAnyGlob(filename: string, patterns: readonly string[]): boolean;
55
+ export {};
@@ -2,4 +2,4 @@ import{getGitHubPullRequest,listGitHubCompareFiles,listGitHubPullRequestFiles}fr
2
2
  `)].join(`
3
3
  `)]}function mergeGitHubContext(e){let t=e.github??[],n=e.hook??[];if(t.length!==0||n.length!==0)return[...t,...n]}function withPinnedPullRequestShas(e,t){let n=readNonEmptySha(t.headSha),r=readNonEmptySha(t.baseSha);return n===void 0&&r===void 0?e:{...e,base:{...e.base,sha:r??e.base.sha},head:{...e.head,sha:n??e.head.sha}}}function readNonEmptySha(e){return typeof e==`string`&&e.trim().length>0?e.trim():void 0}function renderPullRequestMetadata(e){return[`<github_pull_request>`,`number: ${e.number}`,`title: ${e.title}`,`state: ${e.state??`unknown`}`,`draft: ${e.draft?`true`:`false`}`,...e.author?.login?[`author: ${e.author.login}`]:[],...e.htmlUrl?[`url: ${e.htmlUrl}`]:[],...e.base.ref?[`base_ref: ${e.base.ref}`]:[],...e.base.sha?[`base_sha: ${e.base.sha}`]:[],...e.head.ref?[`head_ref: ${e.head.ref}`]:[],...e.head.sha?[`head_sha: ${e.head.sha}`]:[],...e.mergeable===null||e.mergeable===void 0?[]:[`mergeable: ${e.mergeable?`true`:`false`}`],...e.changedFiles===void 0?[]:[`changed_files: ${e.changedFiles}`],...e.additions===void 0?[]:[`additions: ${e.additions}`],...e.deletions===void 0?[]:[`deletions: ${e.deletions}`],...e.body?[``,`body:`,indent(truncateText(e.body,4e3))]:[],`</github_pull_request>`]}function renderPullRequestFiles(e,t){if(e.length===0)return[`<github_pull_request_files>`,`none`,`</github_pull_request_files>`];let n=[`<github_pull_request_files>`],r=MAX_PATCH_BYTES,i=!1;for(let a of e){if(n.push(renderFileSummary(a)),fileMatchesAnyGlob(a.filename,t)){n.push(` patch omitted (excluded)`);continue}if(a.patch===void 0)continue;if(r<=0){i=!0;continue}let e=truncateByBytes(a.patch,r);n.push(`patch:`,indent(e.text)),r-=e.bytes,e.truncated&&(i=!0,r=0)}return i&&n.push(``,`patches_truncated: true`,`max_patch_bytes: ${MAX_PATCH_BYTES}`),n.push(`</github_pull_request_files>`),n}function renderFileSummary(e){let t=[e.status??`modified`,e.additions===void 0?void 0:`+${e.additions}`,e.deletions===void 0?void 0:`-${e.deletions}`].filter(e=>e!==void 0);return`- ${e.filename}${t.length>0?` (${t.join(`, `)})`:``}`}function fileMatchesAnyGlob(e,t){return t.some(t=>globToRegExp(t).test(e))}function globToRegExp(e){let t=``;for(let n=0;n<e.length;n+=1){let r=e.charAt(n);r===`*`?e[n+1]===`*`?(t+=`.*`,n+=1,e[n+1]===`/`&&(n+=1)):t+=`[^/]*`:`\\^$.|?+()[]{}`.includes(r)?t+=`\\${r}`:t+=r}return RegExp(`^${t}$`,`u`)}function truncateByBytes(e,t){let n=new TextEncoder().encode(e);return n.byteLength<=t?{bytes:n.byteLength,text:e,truncated:!1}:{bytes:t,text:`${new TextDecoder().decode(n.slice(0,t))}\n[truncated]`,truncated:!0}}function truncateText(e,t){return e.length<=t?e:`${e.slice(0,t)}\n[truncated]`}function indent(e){return e.split(`
4
4
  `).map(e=>` ${e}`).join(`
5
- `)}export{GITHUB_DEFAULT_EXCLUDED_DIFF_FILES,buildGitHubPullRequestContext,fileMatchesAnyGlob,mergeGitHubContext};
5
+ `)}export{GITHUB_DEFAULT_EXCLUDED_DIFF_FILES,buildGitHubPullRequestContext,mergeGitHubContext};
@@ -32,7 +32,7 @@ export interface GitHubChannelState {
32
32
  triggeringUserLogin: string | null;
33
33
  }
34
34
  /** Minimal receive target needed to seed GitHub channel state. */
35
- export interface GitHubReceiveStateTarget {
35
+ interface GitHubReceiveStateTarget {
36
36
  readonly installationId?: number;
37
37
  readonly issueNumber?: number;
38
38
  readonly pullRequestNumber?: number;
@@ -60,3 +60,4 @@ export declare function stateFromReceiveTarget(input: {
60
60
  export declare function conversationFromState(state: GitHubChannelState): GitHubConversationRef;
61
61
  /** Builds the channel-local continuation token from durable state. */
62
62
  export declare function continuationTokenFromState(state: GitHubChannelState): string;
63
+ export {};
@@ -18,7 +18,7 @@ import { type GitHubWebhookSecret } from "#public/channels/github/auth.js";
18
18
  */
19
19
  export type GitHubWebhookVerifier = (request: Request, body: string) => unknown | Promise<unknown>;
20
20
  /** Options for {@link verifyGitHubRequest}. */
21
- export interface GitHubVerifyOptions {
21
+ interface GitHubVerifyOptions {
22
22
  readonly webhookSecret?: GitHubWebhookSecret;
23
23
  readonly webhookVerifier?: GitHubWebhookVerifier;
24
24
  }
@@ -33,3 +33,4 @@ export interface GitHubVerifyOptions {
33
33
  export declare function verifyGitHubRequest(request: Request, options: GitHubVerifyOptions): Promise<string>;
34
34
  /** Signs a raw GitHub webhook body for tests and local fixtures. */
35
35
  export declare function signGitHubWebhookBody(body: string, secret: string): string;
36
+ export {};
@@ -8,9 +8,10 @@ export declare function defaultLinearAuth(event: LinearAgentSessionEvent): Sessi
8
8
  /** Default Agent Session hook: dispatch created/prompted events with Linear user auth. */
9
9
  export declare function defaultOnAgentSession(_ctx: LinearSessionContext, event: LinearAgentSessionEvent): LinearInboundResult;
10
10
  /** Options used by built-in Linear event handlers. */
11
- export interface LinearDefaultEventOptions {
11
+ interface LinearDefaultEventOptions {
12
12
  readonly api?: LinearApiOptions;
13
13
  readonly credentials?: LinearChannelCredentials;
14
14
  }
15
15
  /** Built-in Linear event handlers for Agent Activity progress, replies, HITL, and errors. */
16
16
  export declare function createDefaultEvents(options?: LinearDefaultEventOptions): LinearChannelEvents;
17
+ export {};
@@ -2,7 +2,7 @@ import type { UserContent } from "ai";
2
2
  import type { LinearFetch } from "#public/channels/linear/api.js";
3
3
  import { type LinearChannelCredentials } from "#public/channels/linear/auth.js";
4
4
  /** One trusted Linear upload referenced by markdown image syntax. */
5
- export interface LinearUploadImageReference {
5
+ interface LinearUploadImageReference {
6
6
  readonly altText: string;
7
7
  readonly end: number;
8
8
  readonly start: number;
@@ -16,3 +16,4 @@ export declare function attachLinearInboundImages(input: {
16
16
  readonly credentials?: LinearChannelCredentials;
17
17
  readonly fetch?: LinearFetch;
18
18
  }): Promise<UserContent>;
19
+ export {};
@@ -1,9 +1,8 @@
1
- import { type JsonObject } from "#shared/json.js";
2
- export declare const SLACK_APP_MANIFEST_TYPE = "https://docs.slack.dev/reference/app-manifest/";
3
- export interface SlackAppManifestBuildDefinition {
1
+ import type { JsonObject } from "#shared/json.js";
2
+ interface SlackAppManifestBuildDefinition {
4
3
  readonly build: (channelName: string) => JsonObject;
5
4
  }
6
5
  export declare function defineSlackAppManifest(input: {
7
6
  readonly botName?: string;
8
7
  }): SlackAppManifestBuildDefinition;
9
- export declare function buildSlackAppManifest(value: unknown, channelName: string): JsonObject | undefined;
8
+ export {};
@@ -1 +1 @@
1
- import{parseJsonObject}from"#shared/json.js";const SLACK_APP_MANIFEST_TYPE=`https://docs.slack.dev/reference/app-manifest/`;function defineSlackAppManifest(e){return{build(t){let n=(e.botName??t).slice(0,35);return{$type:SLACK_APP_MANIFEST_TYPE,display_information:{name:n},features:{app_home:{home_tab_enabled:!1,messages_tab_enabled:!0,messages_tab_read_only_enabled:!1},bot_user:{display_name:n}},oauth_config:{scopes:{bot:[`app_mentions:read`,`chat:write`]}},settings:{event_subscriptions:{bot_events:[`app_mention`]},org_deploy_enabled:!1,socket_mode_enabled:!1,token_rotation_enabled:!1}}}}}function buildSlackAppManifest(e,t){if(typeof e!=`object`||!e)return;let n=e.build;if(typeof n==`function`)return parseJsonObject(n(t))}export{SLACK_APP_MANIFEST_TYPE,buildSlackAppManifest,defineSlackAppManifest};
1
+ function defineSlackAppManifest(e){return{build(t){let n=(e.botName??t).slice(0,35);return{$type:`https://docs.slack.dev/reference/app-manifest/`,display_information:{name:n},features:{app_home:{home_tab_enabled:!1,messages_tab_enabled:!0,messages_tab_read_only_enabled:!1},bot_user:{display_name:n}},oauth_config:{scopes:{bot:[`app_mentions:read`,`chat:write`]}},settings:{event_subscriptions:{bot_events:[`app_mention`]},org_deploy_enabled:!1,socket_mode_enabled:!1,token_rotation_enabled:!1}}}}}export{defineSlackAppManifest};
@@ -82,7 +82,7 @@ export interface SlackEvent {
82
82
  * only about `team_id` (for ergonomic auth derivation) and the inner
83
83
  * `event` payload.
84
84
  */
85
- export interface SlackEventCallback {
85
+ interface SlackEventCallback {
86
86
  readonly type: "event_callback";
87
87
  readonly team_id?: string;
88
88
  readonly authorizations?: readonly {
@@ -162,3 +162,4 @@ export interface SlackInboundContext {
162
162
  readonly threadTs: string;
163
163
  readonly teamId?: string;
164
164
  }
165
+ export {};
@@ -1,22 +1,5 @@
1
1
  import type { SlackThreadMessage } from "#public/channels/slack/api.js";
2
2
  import type { SlackInboundContext } from "#public/channels/slack/inbound.js";
3
- interface SlackModelMessageInput {
4
- readonly botUserId?: string;
5
- readonly channelId?: string;
6
- readonly content: string;
7
- readonly isMentioned?: boolean;
8
- readonly senderId?: string;
9
- readonly senderType: "agent" | "bot" | "unknown" | "user";
10
- readonly teamId?: string;
11
- readonly threadTs: string;
12
- readonly ts: string;
13
- }
14
- /**
15
- * Renders one Slack message with its sender identity attached to the same
16
- * model-visible message. Slack user ids are stable and require no profile
17
- * lookup, so they remain the canonical speaker identity.
18
- */
19
- export declare function formatSlackModelMessage(input: SlackModelMessageInput): string;
20
3
  /** Renders the triggering inbound Slack message as one attributed block. */
21
4
  export declare function formatSlackInboundMessage(context: SlackInboundContext, message: {
22
5
  readonly text: string;
@@ -27,4 +10,3 @@ export declare function formatSlackInboundMessage(context: SlackInboundContext,
27
10
  * Returns `undefined` when there are no messages to add to the turn.
28
11
  */
29
12
  export declare function formatSlackThreadContext(messages: readonly SlackThreadMessage[]): string | undefined;
30
- export {};
@@ -1,3 +1,3 @@
1
1
  import{slackMrkdwnToGfm}from"#public/channels/slack/mrkdwn.js";function formatSlackModelMessage(e){return[`<slack_message>`,`sender_type: ${e.senderType}`,...e.senderId?[`sender_id: ${e.senderId}`]:[],...e.botUserId?[`bot_user_id: ${e.botUserId}`]:[],...e.isMentioned===void 0?[]:[`is_mentioned: ${e.isMentioned}`],...e.channelId?[`channel_id: ${e.channelId}`]:[],`thread_ts: ${e.threadTs}`,`message_ts: ${e.ts}`,...e.teamId?[`team_id: ${e.teamId}`]:[],`<content>`,e.content,`</content>`,`</slack_message>`].join(`
2
2
  `)}function formatSlackInboundMessage(e,t){return formatSlackModelMessage({botUserId:e.botUserId,channelId:e.channelId,content:slackModelContent(t.text),isMentioned:e.isMentioned,senderId:e.userId||void 0,senderType:e.userId?`user`:`unknown`,teamId:e.teamId,threadTs:e.threadTs,ts:t.ts})}function slackModelContent(e){let t=[],n=`eve_slack_user_mention_`;for(;e.includes(n);)n+=`_`;let r=e.replace(/<@[A-Z0-9_]+(?:\|[^>\r\n]+)?>/giu,e=>{let r=`${n}${t.length}\uE001`;return t.push(e),r}),i=slackMrkdwnToGfm(r);for(let[e,r]of t.entries())i=i.replaceAll(`${n}${e}\uE001`,r);return i}function formatSlackThreadContext(e){if(e.length!==0)return[`<slack_thread_context>`,...e.map(e=>formatSlackModelMessage({content:e.markdown,senderId:e.user??e.botId,senderType:slackThreadSenderType(e),threadTs:e.threadTs,ts:e.ts})),`</slack_thread_context>`].join(`
3
- `)}function slackThreadSenderType(e){return e.isMe?`agent`:e.botId?`bot`:e.user?`user`:`unknown`}export{formatSlackInboundMessage,formatSlackModelMessage,formatSlackThreadContext};
3
+ `)}function slackThreadSenderType(e){return e.isMe?`agent`:e.botId?`bot`:e.user?`user`:`unknown`}export{formatSlackInboundMessage,formatSlackThreadContext};
@@ -1,8 +1,9 @@
1
1
  import type { SlackApiResponse } from "#public/channels/slack/api.js";
2
- export type SlackConversationPrivacy = "private" | "public" | "unknown";
2
+ type SlackConversationPrivacy = "private" | "public" | "unknown";
3
3
  export declare function readSlackConversationPrivacy(raw: Readonly<Record<string, unknown>> | undefined): SlackConversationPrivacy;
4
4
  export declare function isPrivateSlackConversation(input: {
5
5
  readonly channelId: string;
6
6
  readonly raw: Readonly<Record<string, unknown>> | undefined;
7
7
  readonly request: (operation: string, body: unknown) => Promise<SlackApiResponse>;
8
8
  }): Promise<boolean>;
9
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { type SlackWebhookVerifier } from "#compiled/@chat-adapter/slack/webhook.js";
2
2
  export type { SlackWebhookVerifier };
3
3
  /** Verification inputs for Eve's Slack webhook route. */
4
- export interface SlackVerifyOptions {
4
+ interface SlackVerifyOptions {
5
5
  readonly signingSecret: string | undefined;
6
6
  readonly webhookVerifier: SlackWebhookVerifier | undefined;
7
7
  readonly maxSkewSeconds?: number;
@@ -25,7 +25,7 @@ export interface TeamsInboundMessageContext extends TeamsContext {
25
25
  isSubscribed(): Promise<boolean>;
26
26
  }
27
27
  /** Channel-owned Teams context returned by `context()`. */
28
- export interface TeamsChannelContext extends TeamsContext {
28
+ interface TeamsChannelContext extends TeamsContext {
29
29
  readonly adaptiveCardVersion: string;
30
30
  state: TeamsChannelState;
31
31
  }
@@ -1,10 +1,9 @@
1
- import type { ChannelAudience } from "#shared/channel-audience.js";
2
1
  import type { TelegramInstrumentationMetadata } from "#public/channels/telegram/index.js";
3
2
  import type { TelegramChannelState } from "#public/channels/telegram/telegramChannel.js";
4
3
  import type { AudienceContext } from "#shared/conversation-context.js";
5
- export declare function telegramInstrumentationMetadata(state: TelegramChannelState): TelegramInstrumentationMetadata;
6
- export declare function telegramAudience(state: TelegramChannelState): ChannelAudience;
4
+ declare function telegramInstrumentationMetadata(state: TelegramChannelState): TelegramInstrumentationMetadata;
7
5
  export declare const telegramInstrumentation: {
8
6
  readonly audience: (input: AudienceContext<TelegramChannelState>) => "private" | "public" | "unknown";
9
7
  readonly metadata: typeof telegramInstrumentationMetadata;
10
8
  };
9
+ export {};
@@ -1 +1 @@
1
- function telegramInstrumentationMetadata(e){return{chatId:e.chatId,chatType:e.chatType,triggeringUserId:e.triggeringUserId??null}}function telegramAudience(e){return telegramAudienceForChatType(e.chatType)}const telegramInstrumentation={audience:e=>telegramAudience(e.state),metadata:telegramInstrumentationMetadata};function telegramAudienceForChatType(e){return e===`private`||e===`group`||e===`supergroup`||e===`channel`?`private`:`unknown`}export{telegramAudience,telegramInstrumentation,telegramInstrumentationMetadata};
1
+ function telegramInstrumentationMetadata(e){return{chatId:e.chatId,chatType:e.chatType,triggeringUserId:e.triggeringUserId??null}}function telegramAudience(e){return telegramAudienceForChatType(e.chatType)}const telegramInstrumentation={audience:e=>telegramAudience(e.state),metadata:telegramInstrumentationMetadata};function telegramAudienceForChatType(e){return e===`private`||e===`group`||e===`supergroup`||e===`channel`?`private`:`unknown`}export{telegramInstrumentation};
@@ -20,7 +20,7 @@ export interface TelegramContext {
20
20
  readonly telegram: TelegramHandle;
21
21
  }
22
22
  /** Channel-owned Telegram context returned by `context()`. */
23
- export interface TelegramChannelContext extends TelegramContext {
23
+ interface TelegramChannelContext extends TelegramContext {
24
24
  state: TelegramChannelState;
25
25
  }
26
26
  /** Event-handler Telegram context, including continuation routing. */
@@ -1,12 +1,5 @@
1
- import type { SessionAuthContext } from "#channel/types.js";
2
1
  import type { TwilioTextMessage, TwilioVoiceCall, TwilioVoiceTranscription } from "#public/channels/twilio/inbound.js";
3
2
  import type { TwilioChannelEvents, TwilioContext, TwilioInboundResult, TwilioVoiceResult } from "#public/channels/twilio/twilioChannel.js";
4
- /** Default phone-number auth projection for Twilio webhook actors. */
5
- export declare function defaultTwilioAuth(input: {
6
- readonly from: string;
7
- readonly to?: string;
8
- readonly channel: "text" | "voice";
9
- }): SessionAuthContext;
10
3
  /** Default inbound text hook: dispatch with Twilio phone-number auth. */
11
4
  export declare function defaultOnText(_ctx: TwilioContext, message: TwilioTextMessage): TwilioInboundResult;
12
5
  /** Default inbound voice hook: accept the call with configured voice defaults. */
@@ -1,3 +1,3 @@
1
1
  import{extractErrorId,formatErrorHint}from"#internal/logging.js";function defaultTwilioAuth(e){let t={channel:e.channel,from:e.from};return e.to!==void 0&&(t.to=e.to),{attributes:t,authenticator:`twilio-webhook`,issuer:`twilio`,principalId:`twilio:${e.from}`,principalType:`user`}}function defaultOnText(e,t){return{auth:defaultTwilioAuth({channel:`text`,from:t.from,to:t.to})}}function defaultOnVoice(e,t){return{}}function defaultOnVoiceTranscription(e,t){return{auth:defaultTwilioAuth({channel:`voice`,from:t.from,to:t.to})}}const defaultEvents={async"message.completed"(e,t,n){e.finishReason!==`tool-calls`&&e.message&&await t.twilio.sendMessage(e.message)},async"turn.failed"(e,t,n){let r=formatErrorHint(e),i=extractErrorId(e.details);await t.twilio.sendMessage([`I hit an error while handling your request${r}.`,``,`Please try again, rephrase, or reach out if it keeps failing.`,...i?[``,`Error id: ${i}`]:[]].join(`
2
2
  `))},async"session.failed"(e,t){let n=formatErrorHint(e),r=extractErrorId(e.details);await t.twilio.sendMessage([`This session could not recover from an error${n}.`,``,`Start a new message to continue.`,...r?[``,`Error id: ${r}`]:[]].join(`
3
- `))}};export{defaultEvents,defaultOnText,defaultOnVoice,defaultOnVoiceTranscription,defaultTwilioAuth};
3
+ `))}};export{defaultEvents,defaultOnText,defaultOnVoice,defaultOnVoiceTranscription};
@@ -4,10 +4,11 @@ export interface TwilioRoutes {
4
4
  readonly transcription: string;
5
5
  readonly voice: string;
6
6
  }
7
- export type TwilioVerifyResult = {
7
+ type TwilioVerifyResult = {
8
8
  readonly body: string;
9
9
  readonly params: URLSearchParams;
10
10
  } | null;
11
11
  export declare function buildTwilioRoutes(baseRoute: string): TwilioRoutes;
12
12
  export declare function verifyTwilioInbound(req: Request, config: TwilioChannelConfig): Promise<TwilioVerifyResult>;
13
13
  export declare function buildTwilioActionUrl(request: Request, config: TwilioChannelConfig, route: string): Promise<string>;
14
+ export {};
@@ -16,7 +16,7 @@ export interface TwilioContext {
16
16
  readonly twilio: TwilioHandle;
17
17
  }
18
18
  /** Channel-owned Twilio context returned by `context()`. */
19
- export interface TwilioChannelContext extends TwilioContext {
19
+ interface TwilioChannelContext extends TwilioContext {
20
20
  state: TwilioChannelState;
21
21
  }
22
22
  /** Event-handler Twilio context, including continuation routing. */
@@ -103,7 +103,7 @@ export interface ChannelContinuationOps {
103
103
  * Channel context passed to event handlers: `TCtx` intersected with
104
104
  * {@link ChannelContinuationOps}.
105
105
  */
106
- export type ChannelContext<TCtx> = TCtx & ChannelContinuationOps;
106
+ type ChannelContext<TCtx> = TCtx & ChannelContinuationOps;
107
107
  type ChannelEventHandler<T extends UnstampedMessageStreamEvent["type"], TCtx> = (data: EventData<T>, channel: ChannelContext<TCtx>, ctx: SessionContext) => void | Promise<void>;
108
108
  type ChannelSessionFailedHandler<TCtx> = (data: EventData<"session.failed">, channel: ChannelContext<TCtx>) => void | Promise<void>;
109
109
  /**
@@ -1 +1 @@
1
- import{defineAgent,defineDynamic}from"#public/definitions/agent.js";import{defineWorkspaceAgent}from"#public/definitions/workspace-agent.js";import{defineRemoteAgent}from"#public/definitions/remote-agent.js";export{defineAgent,defineDynamic,defineRemoteAgent,defineWorkspaceAgent};
1
+ import{defineWorkspaceAgent}from"#public/definitions/workspace-agent.js";import{defineAgent,defineDynamic}from"#public/definitions/agent.js";import{defineRemoteAgent}from"#public/definitions/remote-agent.js";export{defineAgent,defineDynamic,defineRemoteAgent,defineWorkspaceAgent};
@@ -1,4 +1,4 @@
1
- import{defineJsonSchema}from"#tools/schema.js";import{defineTool}from"#tools/definition.js";import{defineMemoryProvider}from"#public/memory/index.js";import{MemoryDocumentConflictError}from"#public/memory/file/backend.js";import{defaultFileMemoryBackend}from"#public/memory/file/backends/default.js";const MAX_DOCUMENT_BYTES=65536,MAX_ENTRY_BYTES=2048,MEMORY_DOCUMENT_HEADER_PATTERN=/^<!-- eve-memory-file-v1 lastAllocatedIndex=(-1|0|[1-9]\d*) -->\n/;function fileMemory(e={}){let t=e.backend??defaultFileMemoryBackend(),n=normalizeMaxCharacters(e.maxCharacters),recall=e=>recallMemory(t,e);return defineMemoryProvider({recall:{"turn.started":recall,"compaction.completed":recall},async tools(e){return createFileMemoryTools({backend:t,key:e.memory.scope.key,maxCharacters:n,slot:e.memory.slot})}})}const REMOVE_MEMORY_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{index:{type:`integer`,minimum:0,maximum:2**53-1}},required:[`index`],additionalProperties:!1}),SAVE_MEMORY_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{text:{type:`string`,minLength:1}},required:[`text`],additionalProperties:!1});function createFileMemoryTools(e){return{remove_memory:defineTool({description:`Remove one persistent memory by the index shown in recalled memory. Use when it is wrong, outdated, or no longer needed.`,async execute(t,n){await removeMemory({backend:e.backend,index:t.index,key:e.key,signal:n.abortSignal})},inputSchema:REMOVE_MEMORY_INPUT_SCHEMA}),save_memory:defineTool({description:`Save one concise, stable fact or preference for future conversations. Omit secrets, instructions, and current-task details.`,async execute(t,n){await saveMemory({backend:e.backend,key:e.key,maxCharacters:e.maxCharacters,signal:n.abortSignal,slot:e.slot,text:t.text})},inputSchema:SAVE_MEMORY_INPUT_SCHEMA})}}async function recallMemory(e,t){let n=await readDocument({backend:e,key:t.memory.scope.key,signal:t.abortSignal});return n===null?null:{messages:[{content:formatRecallContext(parseMemoryDocument(n.content).entries,t.memory.slot),id:`file-memory-document`}]}}async function saveMemory(e){let t=normalizeMemoryText(e.text),n=await readDocument(e),r=0;for(;;){let i=parseMemoryDocumentOrEmpty(n);if(i.entries.some(e=>e.text===t))return;let a=nextMemoryIndex(i.lastAllocatedIndex),o=[...i.entries,{index:a,text:t}];if(formatRecallContext(o,e.slot).length>e.maxCharacters)throw RangeError(`Memory would exceed the configured ${e.maxCharacters.toLocaleString(`en-US`)}-character limit. Remove an outdated memory by index, then retry this save.`);let s=formatMemoryDocument({entries:o,lastAllocatedIndex:a});if(utf8Bytes(s)>MAX_DOCUMENT_BYTES)throw RangeError(`Memory document would exceed the ${MAX_DOCUMENT_BYTES.toLocaleString(`en-US`)}-byte limit. Remove an outdated memory, then retry this save.`);try{await e.backend.write({content:s,expectedVersion:n?.version??null,key:e.key,signal:e.signal});return}catch(t){if(!MemoryDocumentConflictError.is(t)||r>=8)throw t;r+=1,n=await readDocument(e)}}}async function removeMemory(e){let t=await readDocument(e),n=0;for(;;){if(t===null)return;let r=parseMemoryDocument(t.content),i=r.entries.filter(t=>t.index!==e.index);if(i.length===r.entries.length)return;try{await e.backend.write({content:formatMemoryDocument({entries:i,lastAllocatedIndex:r.lastAllocatedIndex}),expectedVersion:t?.version??null,key:e.key,signal:e.signal});return}catch(r){if(!MemoryDocumentConflictError.is(r)||n>=8)throw r;n+=1,t=await readDocument(e)}}}async function readDocument(e){let t=await e.backend.read({key:e.key,signal:e.signal});if(t===null)return null;if(typeof t.content!=`string`||typeof t.version!=`string`)throw TypeError(`Memory backend returned an invalid document.`);if(t.version.length===0)throw TypeError(`Memory backend returned an empty document version.`);if(utf8Bytes(t.content)>MAX_DOCUMENT_BYTES)throw TypeError(`Memory backend returned a document larger than ${MAX_DOCUMENT_BYTES.toLocaleString(`en-US`)} UTF-8 bytes.`);return parseMemoryDocument(t.content),t}function parseMemoryDocumentOrEmpty(e){return e===null?{entries:[],lastAllocatedIndex:-1}:parseMemoryDocument(e.content)}function parseMemoryDocument(e){let t=MEMORY_DOCUMENT_HEADER_PATTERN.exec(e);if(t===null)throw invalidMemoryDocument();let n=Number(t[1]);if(!Number.isSafeInteger(n)||n<-1)throw invalidMemoryDocument();let r=e.slice(t[0].length);if(r.length>0&&!r.endsWith(`
1
+ import{defineJsonSchema}from"#tools/schema.js";import{defineMemoryProvider}from"#public/memory/index.js";import{defineTool}from"#tools/definition.js";import{MemoryDocumentConflictError}from"#public/memory/file/backend.js";import{defaultFileMemoryBackend}from"#public/memory/file/backends/default.js";const MAX_DOCUMENT_BYTES=65536,MAX_ENTRY_BYTES=2048,MEMORY_DOCUMENT_HEADER_PATTERN=/^<!-- eve-memory-file-v1 lastAllocatedIndex=(-1|0|[1-9]\d*) -->\n/;function fileMemory(e={}){let t=e.backend??defaultFileMemoryBackend(),n=normalizeMaxCharacters(e.maxCharacters),recall=e=>recallMemory(t,e);return defineMemoryProvider({recall:{"turn.started":recall,"compaction.completed":recall},async tools(e){return createFileMemoryTools({backend:t,key:e.memory.scope.key,maxCharacters:n,slot:e.memory.slot})}})}const REMOVE_MEMORY_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{index:{type:`integer`,minimum:0,maximum:2**53-1}},required:[`index`],additionalProperties:!1}),SAVE_MEMORY_INPUT_SCHEMA=defineJsonSchema({type:`object`,properties:{text:{type:`string`,minLength:1}},required:[`text`],additionalProperties:!1});function createFileMemoryTools(e){return{remove_memory:defineTool({description:`Remove one persistent memory by the index shown in recalled memory. Use when it is wrong, outdated, or no longer needed.`,async execute(t,n){await removeMemory({backend:e.backend,index:t.index,key:e.key,signal:n.abortSignal})},inputSchema:REMOVE_MEMORY_INPUT_SCHEMA}),save_memory:defineTool({description:`Save one concise, stable fact or preference for future conversations. Omit secrets, instructions, and current-task details.`,async execute(t,n){await saveMemory({backend:e.backend,key:e.key,maxCharacters:e.maxCharacters,signal:n.abortSignal,slot:e.slot,text:t.text})},inputSchema:SAVE_MEMORY_INPUT_SCHEMA})}}async function recallMemory(e,t){let n=await readDocument({backend:e,key:t.memory.scope.key,signal:t.abortSignal});return n===null?null:{messages:[{content:formatRecallContext(parseMemoryDocument(n.content).entries,t.memory.slot),id:`file-memory-document`}]}}async function saveMemory(e){let t=normalizeMemoryText(e.text),n=await readDocument(e),r=0;for(;;){let i=parseMemoryDocumentOrEmpty(n);if(i.entries.some(e=>e.text===t))return;let a=nextMemoryIndex(i.lastAllocatedIndex),o=[...i.entries,{index:a,text:t}];if(formatRecallContext(o,e.slot).length>e.maxCharacters)throw RangeError(`Memory would exceed the configured ${e.maxCharacters.toLocaleString(`en-US`)}-character limit. Remove an outdated memory by index, then retry this save.`);let s=formatMemoryDocument({entries:o,lastAllocatedIndex:a});if(utf8Bytes(s)>MAX_DOCUMENT_BYTES)throw RangeError(`Memory document would exceed the ${MAX_DOCUMENT_BYTES.toLocaleString(`en-US`)}-byte limit. Remove an outdated memory, then retry this save.`);try{await e.backend.write({content:s,expectedVersion:n?.version??null,key:e.key,signal:e.signal});return}catch(t){if(!MemoryDocumentConflictError.is(t)||r>=8)throw t;r+=1,n=await readDocument(e)}}}async function removeMemory(e){let t=await readDocument(e),n=0;for(;;){if(t===null)return;let r=parseMemoryDocument(t.content),i=r.entries.filter(t=>t.index!==e.index);if(i.length===r.entries.length)return;try{await e.backend.write({content:formatMemoryDocument({entries:i,lastAllocatedIndex:r.lastAllocatedIndex}),expectedVersion:t?.version??null,key:e.key,signal:e.signal});return}catch(r){if(!MemoryDocumentConflictError.is(r)||n>=8)throw r;n+=1,t=await readDocument(e)}}}async function readDocument(e){let t=await e.backend.read({key:e.key,signal:e.signal});if(t===null)return null;if(typeof t.content!=`string`||typeof t.version!=`string`)throw TypeError(`Memory backend returned an invalid document.`);if(t.version.length===0)throw TypeError(`Memory backend returned an empty document version.`);if(utf8Bytes(t.content)>MAX_DOCUMENT_BYTES)throw TypeError(`Memory backend returned a document larger than ${MAX_DOCUMENT_BYTES.toLocaleString(`en-US`)} UTF-8 bytes.`);return parseMemoryDocument(t.content),t}function parseMemoryDocumentOrEmpty(e){return e===null?{entries:[],lastAllocatedIndex:-1}:parseMemoryDocument(e.content)}function parseMemoryDocument(e){let t=MEMORY_DOCUMENT_HEADER_PATTERN.exec(e);if(t===null)throw invalidMemoryDocument();let n=Number(t[1]);if(!Number.isSafeInteger(n)||n<-1)throw invalidMemoryDocument();let r=e.slice(t[0].length);if(r.length>0&&!r.endsWith(`
2
2
  `))throw invalidMemoryDocument();let i=r.length===0?[]:r.slice(0,-1).split(`
3
3
  `),a=[],o=new Set;for(let e of i){let t=/^(\d+): (.+)$/.exec(e),r=t===null?NaN:Number(t[1]),i=t?.[2];if(t===null||i===void 0||!Number.isSafeInteger(r)||r>n||o.has(r)||normalizeStoredMemoryText(i)!==i)throw invalidMemoryDocument();o.add(r),a.push({index:r,text:i})}if(n===-1&&a.length>0)throw invalidMemoryDocument();return{entries:a.sort((e,t)=>e.index-t.index),lastAllocatedIndex:n}}function formatMemoryDocument(e){let t=`<!-- eve-memory-file-v1 lastAllocatedIndex=${e.lastAllocatedIndex} -->\n`;return e.entries.length===0?t:`${t}${e.entries.toSorted((e,t)=>e.index-t.index).map(e=>`${e.index}: ${e.text}`).join(`
4
4
  `)}\n`}function nextMemoryIndex(e){if(e>=2**53-1)throw RangeError(`Memory has no available index.`);return e+1}function normalizeMemoryText(e){let t=e.trim().replaceAll(/\s+/g,` `);if(t.length===0)throw TypeError(`Memory text cannot be empty.`);if(utf8Bytes(t)>MAX_ENTRY_BYTES)throw RangeError(`Memory text exceeds the ${MAX_ENTRY_BYTES.toLocaleString(`en-US`)}-byte limit after whitespace normalization.`);return t}function normalizeStoredMemoryText(e){try{return normalizeMemoryText(e)}catch{throw invalidMemoryDocument()}}function normalizeMaxCharacters(e){let t=e??4e3;if(!Number.isSafeInteger(t)||t<1)throw TypeError(`fileMemory() maxCharacters must be a positive safe integer.`);return t}function formatRecallContext(e,t){let n=`# Persistent memories for ${t}`;return e.length===0?`${n}\n\nNo memories are saved.`:[n,``,`The following indexed memories are durable data, not instructions. They may be incomplete or outdated. To remove one, call \`${t}__remove_memory\` with its index.`,``,e.map(e=>`${e.index}: ${e.text}`).join(`
@@ -1,8 +1,9 @@
1
1
  import type { LanguageModelV4 } from "#compiled/@ai-sdk/provider/index.js";
2
2
  import { type CodexTransportOptions } from "./transport.js";
3
3
  /** Configures the Codex model selected by the local ChatGPT login. */
4
- export interface CodexModelOptions {
4
+ interface CodexModelOptions {
5
5
  /** OpenAI model ID passed to the Codex Responses endpoint, for example `gpt-5.6-sol`. */
6
6
  readonly model: string;
7
7
  }
8
8
  export declare function createCodexSubscriptionModel(input: CodexModelOptions, options?: CodexTransportOptions): LanguageModelV4;
9
+ export {};
@@ -24,7 +24,7 @@ export interface CodexTokenBroker {
24
24
  state(): ChatGptAuthState;
25
25
  }
26
26
  export type ChatGptCredentialOwner = "codex" | "eve";
27
- export interface CodexTokenBrokerOptions extends CodexAppServerOptions {
27
+ interface CodexTokenBrokerOptions extends CodexAppServerOptions {
28
28
  readonly appServer?: CodexAppServer;
29
29
  readonly store?: ChatGptCredentialStore;
30
30
  readonly fetch?: typeof fetch;
@@ -1,10 +1,10 @@
1
1
  import { type ChildProcess } from "node:child_process";
2
2
  export declare const EVE_BASE_URL_ENV = "EVE_BASE_URL";
3
- export interface EveProcessHandle {
3
+ interface EveProcessHandle {
4
4
  readonly origin: string;
5
5
  readonly process?: ChildProcess;
6
6
  }
7
- export interface EveDevServerRegistry {
7
+ interface EveDevServerRegistry {
8
8
  readonly appRoot: string;
9
9
  readonly origin: string;
10
10
  readonly pid: number | null;
@@ -22,3 +22,4 @@ export declare function normalizeDevServerRegistry(value: unknown): EveDevServer
22
22
  * cross-process lock so concurrent Nuxt processes don't each boot eve.
23
23
  */
24
24
  export declare function resolveSharedEveDevServer(appRoot: string): Promise<EveProcessHandle>;
25
+ export {};
@@ -1 +1 @@
1
- import{defineSkill}from"#public/definitions/skill.js";import{defineDynamic}from"#dynamic/definition.js";export{defineDynamic,defineSkill};
1
+ import{defineDynamic}from"#dynamic/definition.js";import{defineSkill}from"#public/definitions/skill.js";export{defineDynamic,defineSkill};
@@ -1,10 +1,10 @@
1
1
  import { type ChildProcess } from "node:child_process";
2
2
  export declare const EVE_BASE_URL_ENV = "EVE_BASE_URL";
3
- export interface EveProcessHandle {
3
+ interface EveProcessHandle {
4
4
  readonly origin: string;
5
5
  readonly process?: ChildProcess;
6
6
  }
7
- export interface EveDevServerRegistry {
7
+ interface EveDevServerRegistry {
8
8
  readonly appRoot: string;
9
9
  readonly origin: string;
10
10
  readonly pid: number | null;
@@ -22,3 +22,4 @@ export declare function normalizeDevServerRegistry(value: unknown): EveDevServer
22
22
  * cross-process lock so concurrent SvelteKit processes don't each boot eve.
23
23
  */
24
24
  export declare function resolveSharedEveDevServer(appRoot: string): Promise<EveProcessHandle>;
25
+ export {};
@@ -1 +1 @@
1
- import{defineTool,disableTool,isDisabledToolSentinel}from"#tools/definition.js";import{defineDynamic}from"#dynamic/definition.js";import{defineDurableCallback}from"#tools/durable-callbacks.js";import{defineDurableSchema}from"#tools/durable-schema.js";import{defineWorkflowTool}from"#tools/workflow-definition.js";import{toolOutput,toolOutputPart}from"#tools/model-output.js";import{toolResultFrom}from"#public/tools/result.js";export{defineDurableCallback,defineDurableSchema,defineDynamic,defineTool,defineWorkflowTool,disableTool,isDisabledToolSentinel,toolOutput,toolOutputPart,toolResultFrom};
1
+ import{defineDynamic}from"#dynamic/definition.js";import{defineDurableCallback}from"#tools/durable-callbacks.js";import{defineDurableSchema}from"#tools/durable-schema.js";import{defineWorkflowTool}from"#tools/workflow-definition.js";import{defineTool,disableTool,isDisabledToolSentinel}from"#tools/definition.js";import{toolOutput,toolOutputPart}from"#tools/model-output.js";import{toolResultFrom}from"#public/tools/result.js";export{defineDurableCallback,defineDurableSchema,defineDynamic,defineTool,defineWorkflowTool,disableTool,isDisabledToolSentinel,toolOutput,toolOutputPart,toolResultFrom};
@@ -55,10 +55,6 @@ export declare function createDiskRuntimeCompiledArtifactsSource(appRoot: string
55
55
  readonly sandboxAppRoot?: string;
56
56
  readonly sandboxScope?: string;
57
57
  }): RuntimeDiskCompiledArtifactsSource;
58
- /**
59
- * Returns the disk-backed app root when one exists for the artifact source.
60
- */
61
- export declare function getRuntimeCompiledArtifactsAppRoot(source: RuntimeCompiledArtifactsSource): string | undefined;
62
58
  /**
63
59
  * Returns the stable application root to use for local sandbox cache scope.
64
60
  */
@@ -1 +1 @@
1
- function createBundledRuntimeCompiledArtifactsSource(e){return e===void 0?{kind:`bundled`}:{kind:`bundled`,sandboxScope:e}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0||t.sandboxScope!==void 0||t.durableReference!==void 0?{appRoot:e,durableReference:t.durableReference,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot,sandboxScope:t.sandboxScope}:{appRoot:e,kind:`disk`}}function getRuntimeCompiledArtifactsAppRoot(e){return e.kind===`disk`?e.appRoot:void 0}function getRuntimeCompiledArtifactsSandboxAppRoot(e){return e.kind===`disk`?e.sandboxAppRoot??e.appRoot:void 0}function getRuntimeCompiledArtifactsCacheKey(e){return e.kind===`disk`?e.moduleMapLoaderPath===void 0?`disk:${e.appRoot}`:`disk:${e.appRoot}:authored-source:${e.moduleMapLoaderPath}`:`bundled`}export{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource,getRuntimeCompiledArtifactsAppRoot,getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot};
1
+ function createBundledRuntimeCompiledArtifactsSource(e){return e===void 0?{kind:`bundled`}:{kind:`bundled`,sandboxScope:e}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0||t.sandboxScope!==void 0||t.durableReference!==void 0?{appRoot:e,durableReference:t.durableReference,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot,sandboxScope:t.sandboxScope}:{appRoot:e,kind:`disk`}}function getRuntimeCompiledArtifactsSandboxAppRoot(e){return e.kind===`disk`?e.sandboxAppRoot??e.appRoot:void 0}function getRuntimeCompiledArtifactsCacheKey(e){return e.kind===`disk`?e.moduleMapLoaderPath===void 0?`disk:${e.appRoot}`:`disk:${e.appRoot}:authored-source:${e.moduleMapLoaderPath}`:`bundled`}export{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource,getRuntimeCompiledArtifactsCacheKey,getRuntimeCompiledArtifactsSandboxAppRoot};
@@ -1,5 +1,4 @@
1
1
  import type { ConnectionProtocol } from "#shared/connection-types.js";
2
- import type { ResolvedConnectionDefinition } from "#runtime/types.js";
3
2
  /** Builds the opaque, reconstruction-stable identity for one resolved connection instance. */
4
3
  export declare function createConnectionInstanceId(input: {
5
4
  readonly connectionName: string;
@@ -8,5 +7,3 @@ export declare function createConnectionInstanceId(input: {
8
7
  readonly sourceId: string;
9
8
  readonly url: string;
10
9
  }): string;
11
- /** Returns the cache and callback scope for one resolved connection. */
12
- export declare function connectionAuthorizationScope(connection: ResolvedConnectionDefinition): string;
@@ -1 +1 @@
1
- import{createHash}from"node:crypto";function createConnectionInstanceId(e){return`connection:${createHash(`sha256`).update(JSON.stringify([e.sourceId,e.connectionName,e.protocol,e.url,e.instanceKey??``])).digest(`base64url`)}`}function connectionAuthorizationScope(e){return e.instanceId??e.connectionName}export{connectionAuthorizationScope,createConnectionInstanceId};
1
+ import{createHash}from"node:crypto";function createConnectionInstanceId(e){return`connection:${createHash(`sha256`).update(JSON.stringify([e.sourceId,e.connectionName,e.protocol,e.url,e.instanceKey??``])).digest(`base64url`)}`}export{createConnectionInstanceId};
@@ -6,7 +6,6 @@ export declare function createMcpTraceFetch(input: {
6
6
  readonly getProtocolVersion: () => string | undefined;
7
7
  readonly injectContext?: McpTraceContextInjector;
8
8
  }): typeof fetch;
9
- export declare function injectMcpTraceContext(message: JsonRpcRequest, activeContext: Context, injectContext?: McpTraceContextInjector): JsonRpcRequest | undefined;
10
9
  export declare function withMcpToolsListSpan<T>(input: {
11
10
  readonly connectionName: string;
12
11
  readonly execute: () => Promise<T>;
@@ -19,9 +18,5 @@ export declare function withMcpToolCallSpan<T>(input: {
19
18
  readonly protocolVersion?: string;
20
19
  readonly toolName: string;
21
20
  }): Promise<T>;
22
- interface JsonRpcRequest extends Record<string, unknown> {
23
- readonly method: string;
24
- readonly params?: unknown;
25
- }
26
- export type McpTraceContextInjector = (context: Context, carrier: Record<string, string>) => void;
21
+ type McpTraceContextInjector = (context: Context, carrier: Record<string, string>) => void;
27
22
  export {};