eve 0.11.2 → 0.11.3
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.
- package/CHANGELOG.md +11 -2
- package/README.md +11 -11
- package/bin/eve.d.ts +1 -1
- package/bin/eve.js +6 -6
- package/dist/src/channel/routes.d.ts +4 -4
- package/dist/src/channel/types.d.ts +2 -2
- package/dist/src/channel/websocket-upgrade-server.d.ts +3 -3
- package/dist/src/chunks/{use-eve-agent-CdETo3qQ.js → use-eve-agent-D9ZhQhyV.js} +2 -2
- package/dist/src/chunks/{use-eve-agent-ClyM-_UT.js → use-eve-agent-DFI0POM9.js} +2 -2
- package/dist/src/cli/banner.d.ts +1 -1
- package/dist/src/cli/banner.js +1 -1
- package/dist/src/cli/commands/channel-add-conflicts.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/deploy.js +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/commands/init-agent-instructions.md +1 -1
- package/dist/src/cli/commands/init-git.js +1 -1
- package/dist/src/cli/commands/init.d.ts +1 -1
- package/dist/src/cli/commands/link.js +1 -1
- package/dist/src/cli/commands/preconditions.d.ts +2 -2
- package/dist/src/cli/commands/preconditions.js +1 -1
- package/dist/src/cli/dev/environment.d.ts +1 -1
- package/dist/src/cli/dev/tui/runner.js +1 -1
- package/dist/src/cli/dev/tui/setup-issues.d.ts +2 -0
- package/dist/src/cli/dev/tui/setup-issues.js +1 -1
- package/dist/src/cli/dev/tui/terminal-renderer.js +2 -2
- package/dist/src/cli/dev/tui/theme.d.ts +1 -1
- package/dist/src/cli/dev/tui/tui.d.ts +1 -1
- package/dist/src/cli/dev/url.d.ts +1 -1
- package/dist/src/cli/run.d.ts +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/ui/output.d.ts +1 -1
- package/dist/src/client/client-error.d.ts +1 -1
- package/dist/src/client/client.d.ts +3 -3
- package/dist/src/client/eve-agent-store.d.ts +1 -1
- package/dist/src/client/eve-agent-store.js +1 -1
- package/dist/src/client/message-reducer-types.d.ts +3 -3
- package/dist/src/client/message-reducer.d.ts +3 -3
- package/dist/src/client/output-schema.d.ts +1 -1
- package/dist/src/client/reducer.d.ts +5 -5
- package/dist/src/client/session.d.ts +1 -1
- package/dist/src/client/types.d.ts +1 -1
- package/dist/src/client/url.d.ts +2 -2
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@vercel/detect-agent/index.d.ts +1 -1
- package/dist/src/compiler/channel-instrumentation-types.js +1 -1
- package/dist/src/compiler/model-catalog.d.ts +1 -1
- package/dist/src/compiler/module-map.js +1 -1
- package/dist/src/compiler/normalize-agent-config.js +1 -1
- package/dist/src/compiler/normalize-channel.js +1 -1
- package/dist/src/compiler/normalize-connection.js +1 -1
- package/dist/src/compiler/normalize-instructions.js +1 -1
- package/dist/src/compiler/normalize-sandbox.js +1 -1
- package/dist/src/compiler/normalize-schedule.js +1 -1
- package/dist/src/compiler/normalize-skill.js +1 -1
- package/dist/src/compiler/normalize-subagent.js +1 -1
- package/dist/src/compiler/normalize-tool.js +1 -1
- package/dist/src/compiler/workspace-resources.js +1 -1
- package/dist/src/context/build-callback-context.js +1 -1
- package/dist/src/context/container.d.ts +4 -4
- package/dist/src/context/container.js +1 -1
- package/dist/src/discover/diagnostics.d.ts +1 -1
- package/dist/src/discover/project.d.ts +2 -2
- package/dist/src/discover/project.js +1 -1
- package/dist/src/evals/cli/eval-client.d.ts +1 -1
- package/dist/src/evals/define-eval.d.ts +1 -1
- package/dist/src/evals/runner/execute-eval.d.ts +1 -1
- package/dist/src/evals/runner/execute-task.d.ts +1 -1
- package/dist/src/evals/types.d.ts +6 -6
- package/dist/src/execution/durable-session-migrations/chain.js +1 -1
- package/dist/src/execution/sandbox/bash-tool.js +1 -1
- package/dist/src/execution/sandbox/bindings/docker-options.d.ts +1 -1
- package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/microsandbox-runtime.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.js +1 -1
- package/dist/src/execution/sandbox/development-prewarm.js +1 -1
- package/dist/src/execution/sandbox/ensure.js +1 -1
- package/dist/src/execution/sandbox/prewarm.js +1 -1
- package/dist/src/execution/session-callback-step.d.ts +1 -1
- package/dist/src/harness/attachment-staging.js +1 -1
- package/dist/src/harness/code-mode-lifecycle.d.ts +1 -1
- package/dist/src/harness/emission.d.ts +1 -1
- package/dist/src/harness/runtime-actions.d.ts +1 -1
- package/dist/src/internal/application/cache-metadata.d.ts +2 -2
- package/dist/src/internal/application/compiled-artifacts.js +2 -2
- package/dist/src/internal/application/package.d.ts +7 -7
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/authored-module-bundle.js +1 -1
- package/dist/src/internal/helpers/markdown.js +1 -1
- package/dist/src/internal/instrumentation.d.ts +1 -1
- package/dist/src/internal/nitro/host/build-application.d.ts +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +3 -3
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +1 -1
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +1 -1
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +1 -1
- package/dist/src/internal/nitro/host/cron-handler-route.d.ts +3 -3
- package/dist/src/internal/nitro/host/nitro-bundler-config.d.ts +1 -1
- package/dist/src/internal/nitro/host/optional-engine-dependency-plugin.d.ts +2 -2
- package/dist/src/internal/nitro/host/schedule-task-routes.d.ts +2 -2
- package/dist/src/internal/nitro/host/start-development-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/start-development-server.js +1 -1
- package/dist/src/internal/nitro/host/start-production-server.d.ts +1 -1
- package/dist/src/internal/nitro/host/start-production-server.js +2 -2
- package/dist/src/internal/nitro/routes/agent-info/load-agent-info-data.js +1 -1
- package/dist/src/internal/nitro/routes/health.d.ts +1 -1
- package/dist/src/internal/nitro/routes/info.d.ts +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +1 -1
- package/dist/src/internal/package-name.d.ts +1 -1
- package/dist/src/internal/vercel-agent-summary.d.ts +6 -6
- package/dist/src/internal/workflow/builtins.d.ts +3 -3
- package/dist/src/internal/workflow-bundle/nitro-step-entry.js +1 -1
- package/dist/src/internal/workflow-bundle/vercel-workflow-output.d.ts +7 -7
- package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +4 -4
- package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
- package/dist/src/packages/eve-catalog/src/index.js +1 -1
- package/dist/src/protocol/message.d.ts +2 -2
- package/dist/src/protocol/routes.d.ts +3 -3
- package/dist/src/public/agents/auth.d.ts +1 -1
- package/dist/src/public/channels/auth.d.ts +1 -1
- package/dist/src/public/channels/discord/api.d.ts +2 -2
- package/dist/src/public/channels/discord/discordChannel.d.ts +2 -2
- package/dist/src/public/channels/discord/hitl.d.ts +4 -4
- package/dist/src/public/channels/discord/verify.d.ts +1 -1
- package/dist/src/public/channels/eve.d.ts +5 -5
- package/dist/src/public/channels/github/api.d.ts +1 -1
- package/dist/src/public/channels/github/defaults.d.ts +1 -1
- package/dist/src/public/channels/github/inbound.d.ts +1 -1
- package/dist/src/public/channels/index.d.ts +2 -2
- package/dist/src/public/channels/linear/auth.d.ts +1 -1
- package/dist/src/public/channels/linear/hitl.d.ts +4 -4
- package/dist/src/public/channels/linear/inbound.d.ts +1 -1
- package/dist/src/public/channels/linear/verify.d.ts +1 -1
- package/dist/src/public/channels/slack/constants.d.ts +1 -1
- package/dist/src/public/channels/teams/api.d.ts +4 -4
- package/dist/src/public/channels/teams/hitl.d.ts +4 -4
- package/dist/src/public/channels/teams/limits.d.ts +3 -3
- package/dist/src/public/channels/teams/verify.d.ts +2 -2
- package/dist/src/public/channels/telegram/api.d.ts +1 -1
- package/dist/src/public/channels/telegram/hitl.d.ts +3 -3
- package/dist/src/public/channels/telegram/verify.d.ts +1 -1
- package/dist/src/public/channels/twilio/api.d.ts +1 -1
- package/dist/src/public/context/index.d.ts +1 -1
- package/dist/src/public/definitions/defineChannel.d.ts +2 -2
- package/dist/src/public/definitions/hook.d.ts +1 -1
- package/dist/src/public/definitions/remote-agent.d.ts +5 -5
- package/dist/src/public/definitions/sandbox.d.ts +1 -1
- package/dist/src/public/definitions/source.d.ts +2 -2
- package/dist/src/public/definitions/state.d.ts +2 -2
- package/dist/src/public/definitions/state.js +1 -1
- package/dist/src/public/instrumentation/index.d.ts +3 -3
- package/dist/src/public/next/index.d.ts +12 -12
- package/dist/src/public/next/index.js +1 -1
- package/dist/src/public/next/server.js +1 -1
- package/dist/src/public/next/vercel-output-config.js +1 -1
- package/dist/src/public/nuxt/dev-server.d.ts +2 -2
- package/dist/src/public/nuxt/dev-server.js +1 -1
- package/dist/src/public/nuxt/module.d.ts +10 -10
- package/dist/src/public/nuxt/routing.d.ts +6 -6
- package/dist/src/public/nuxt/routing.js +1 -1
- package/dist/src/public/nuxt/vercel-json.d.ts +2 -2
- package/dist/src/public/sandbox/backends/just-bash.d.ts +1 -1
- package/dist/src/public/sandbox/backends/microsandbox.d.ts +1 -1
- package/dist/src/public/sandbox/backends/vercel.d.ts +1 -1
- package/dist/src/public/sandbox/docker-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/just-bash-sandbox.d.ts +1 -1
- package/dist/src/public/sandbox/microsandbox-sandbox.d.ts +3 -3
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +2 -2
- package/dist/src/public/sveltekit/dev-server.d.ts +2 -2
- package/dist/src/public/sveltekit/dev-server.js +1 -1
- package/dist/src/public/sveltekit/index.d.ts +11 -11
- package/dist/src/public/sveltekit/routing.d.ts +5 -5
- package/dist/src/public/sveltekit/routing.js +1 -1
- package/dist/src/public/sveltekit/vercel-json.d.ts +2 -2
- package/dist/src/public/tool-result-narrowing.js +1 -1
- package/dist/src/public/types/json.d.ts +1 -1
- package/dist/src/react/use-eve-agent.d.ts +8 -8
- package/dist/src/runtime/agent/bootstrap-model.js +1 -1
- package/dist/src/runtime/agent/bootstrap.d.ts +1 -1
- package/dist/src/runtime/agent/bootstrap.js +1 -1
- package/dist/src/runtime/agent/mock-model-adapter.js +1 -1
- package/dist/src/runtime/agent/resolve-model.js +1 -1
- package/dist/src/runtime/attributes/emit.d.ts +2 -2
- package/dist/src/runtime/connections/callback-route.d.ts +1 -1
- package/dist/src/runtime/connections/principal.js +1 -1
- package/dist/src/runtime/connections/scoped-authorization.d.ts +1 -1
- package/dist/src/runtime/connections/types.d.ts +4 -4
- package/dist/src/runtime/framework-tools/final-output.d.ts +1 -1
- package/dist/src/runtime/governance/auth/http-basic.d.ts +1 -1
- package/dist/src/runtime/governance/auth/token-claims.d.ts +1 -1
- package/dist/src/runtime/governance/auth/types.d.ts +1 -1
- package/dist/src/runtime/loaders/artifact-paths.d.ts +1 -1
- package/dist/src/runtime/loaders/compile-metadata.js +1 -1
- package/dist/src/runtime/loaders/manifest.js +1 -1
- package/dist/src/runtime/loaders/module-map.js +1 -1
- package/dist/src/runtime/prompt/compose.js +1 -1
- package/dist/src/runtime/resolve-channel.js +1 -1
- package/dist/src/runtime/schedules/register.js +1 -1
- package/dist/src/runtime/sessions/auth.d.ts +1 -1
- package/dist/src/runtime/sessions/runtime-session.d.ts +1 -1
- package/dist/src/runtime/types.d.ts +1 -1
- package/dist/src/runtime/workspace/types.d.ts +1 -1
- package/dist/src/services/dev-client/request-headers.d.ts +2 -2
- package/dist/src/services/dev-client/vercel-auth-error.d.ts +1 -1
- package/dist/src/services/inspect-application.d.ts +1 -1
- package/dist/src/setup/boxes/add-channels.d.ts +1 -1
- package/dist/src/setup/boxes/add-channels.js +1 -1
- package/dist/src/setup/boxes/deploy-project.js +1 -1
- package/dist/src/setup/boxes/resolve-target.d.ts +2 -2
- package/dist/src/setup/boxes/scaffold.d.ts +4 -4
- package/dist/src/setup/boxes/scaffold.js +1 -1
- package/dist/src/setup/channel-add-conflicts.js +1 -1
- package/dist/src/setup/cli/rail-log.d.ts +1 -1
- package/dist/src/setup/flows/model.d.ts +3 -5
- package/dist/src/setup/flows/model.js +1 -1
- package/dist/src/setup/node-engine.d.ts +5 -5
- package/dist/src/setup/node-engine.js +1 -1
- package/dist/src/setup/onboarding.d.ts +2 -2
- package/dist/src/setup/primitives/open-url.d.ts +1 -1
- package/dist/src/setup/primitives/pm/pnpm.js +1 -1
- package/dist/src/setup/primitives/pm/run.d.ts +1 -1
- package/dist/src/setup/primitives/pm/types.d.ts +1 -1
- package/dist/src/setup/scaffold/connections/catalog.d.ts +1 -1
- package/dist/src/setup/scaffold/create/add-to-project.d.ts +2 -2
- package/dist/src/setup/scaffold/create/add-to-project.js +1 -1
- package/dist/src/setup/scaffold/create/project.d.ts +5 -5
- package/dist/src/setup/scaffold/create/project.js +3 -3
- package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
- package/dist/src/setup/scaffold/create/web-template.js +2 -2
- package/dist/src/setup/scaffold/update/package-json.d.ts +1 -1
- package/dist/src/setup/slack-connect-lifecycle.d.ts +2 -2
- package/dist/src/setup/slack-connect-lifecycle.js +1 -1
- package/dist/src/setup/slackbot.d.ts +1 -1
- package/dist/src/setup/slackbot.js +1 -1
- package/dist/src/setup/validate-gateway-key.d.ts +1 -1
- package/dist/src/setup/vercel-project.js +1 -1
- package/dist/src/shared/agent-definition.d.ts +15 -15
- package/dist/src/shared/code-mode.d.ts +3 -3
- package/dist/src/shared/json-schema.d.ts +1 -1
- package/dist/src/shared/model-endpoint-status.d.ts +2 -2
- package/dist/src/shared/sandbox-backend.d.ts +4 -4
- package/dist/src/shared/sandbox-definition.d.ts +3 -3
- package/dist/src/shared/sandbox-network-policy.d.ts +1 -1
- package/dist/src/shared/sandbox-session.d.ts +2 -2
- package/dist/src/shared/skill-package.d.ts +1 -1
- package/dist/src/shared/skill-package.js +1 -1
- package/dist/src/shared/tool-definition.d.ts +1 -1
- package/dist/src/svelte/index.js +1 -1
- package/dist/src/svelte/use-eve-agent.d.ts +7 -7
- package/dist/src/svelte/use-eve-agent.js +1 -1
- package/dist/src/vue/index.js +1 -1
- package/dist/src/vue/use-eve-agent.d.ts +7 -7
- package/dist/src/vue/use-eve-agent.js +1 -1
- package/docs/README.md +10 -10
- package/docs/agent-config.md +2 -2
- package/docs/channels/custom.mdx +5 -5
- package/docs/channels/discord.mdx +3 -3
- package/docs/channels/eve.mdx +7 -7
- package/docs/channels/linear.mdx +6 -6
- package/docs/channels/overview.mdx +11 -11
- package/docs/channels/slack.mdx +4 -4
- package/docs/channels/teams.mdx +2 -2
- package/docs/channels/telegram.mdx +3 -3
- package/docs/channels/twilio.mdx +1 -1
- package/docs/concepts/context-control.md +5 -5
- package/docs/concepts/default-harness.md +2 -2
- package/docs/concepts/execution-model-and-durability.md +9 -9
- package/docs/concepts/security-model.md +9 -9
- package/docs/concepts/sessions-runs-and-streaming.md +3 -3
- package/docs/connections.mdx +11 -11
- package/docs/evals/judge.mdx +2 -2
- package/docs/evals/overview.mdx +2 -2
- package/docs/evals/reporters.mdx +2 -2
- package/docs/getting-started.mdx +10 -10
- package/docs/guides/auth-and-route-protection.md +6 -6
- package/docs/guides/client/continuations.mdx +3 -3
- package/docs/guides/client/output-schema.mdx +1 -1
- package/docs/guides/client/overview.mdx +5 -5
- package/docs/guides/client/streaming.mdx +1 -1
- package/docs/guides/deployment.md +7 -7
- package/docs/guides/dev-tui.md +2 -2
- package/docs/guides/frontend/nextjs.mdx +13 -13
- package/docs/guides/frontend/nuxt.mdx +7 -7
- package/docs/guides/frontend/overview.mdx +12 -12
- package/docs/guides/frontend/sveltekit.mdx +7 -7
- package/docs/guides/frontend/use-eve-agent-svelte.mdx +6 -6
- package/docs/guides/frontend/use-eve-agent-vue.mdx +6 -6
- package/docs/guides/hooks.md +2 -2
- package/docs/guides/instrumentation.md +12 -12
- package/docs/guides/remote-agents.md +4 -4
- package/docs/guides/session-context.md +4 -4
- package/docs/guides/state.md +1 -1
- package/docs/instructions.mdx +4 -4
- package/docs/introduction.mdx +12 -12
- package/docs/reference/cli.md +5 -5
- package/docs/reference/project-layout.md +4 -4
- package/docs/responsible-use.md +3 -3
- package/docs/sandbox.mdx +8 -8
- package/docs/schedules.mdx +1 -1
- package/docs/skills.mdx +4 -4
- package/docs/subagents.mdx +3 -3
- package/docs/tools/human-in-the-loop.md +10 -10
- package/docs/tools/overview.mdx +10 -10
- package/docs/tutorial/connect-a-warehouse.mdx +3 -3
- package/docs/tutorial/first-agent.mdx +2 -2
- package/docs/tutorial/how-it-runs.mdx +2 -2
- package/docs/tutorial/query-sample-data.mdx +1 -1
- package/docs/tutorial/ship-it.mdx +4 -4
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{isObject}from"#shared/guards.js";import{normalizeInstructionsDefinition,normalizeScheduleDefinition,normalizeSkillDefinition}from"#internal/authored-definition/core.js";import matter from"#compiled/gray-matter/index.js";import{defineSchedule}from"#public/definitions/schedule.js";import{defineSkill}from"#public/definitions/skill.js";const CLOSED_FRONTMATTER_PATTERN=/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/;function rejectJavaScriptFrontmatter(){throw Error(`JavaScript frontmatter is not supported.`)}const SAFE_GRAY_MATTER_OPTIONS={language:`yaml`,engines:{javascript:rejectJavaScriptFrontmatter,js:rejectJavaScriptFrontmatter}};function parseMarkdownDocument(t){if(!matter.test(t))return{hasFrontmatter:!1,frontmatter:{},markdown:t};let n;try{n=matter(t,SAFE_GRAY_MATTER_OPTIONS)}catch(e){throw startsWithFrontmatterFence(t)&&!hasClosedFrontmatterFence(t)?Error(`Markdown frontmatter is missing a closing delimiter.`):e}if(!isObject(n.data))throw Error(`Markdown frontmatter must parse to an object.`);return{hasFrontmatter:!0,frontmatter:n.data,markdown:normalizeFrontmatterMarkdownBody(n.content)}}function lowerInstructionsMarkdown(e){return normalizeInstructionsDefinition({markdown:e},`Expected authored instructions markdown to match the public
|
|
1
|
+
import{isObject}from"#shared/guards.js";import{normalizeInstructionsDefinition,normalizeScheduleDefinition,normalizeSkillDefinition}from"#internal/authored-definition/core.js";import matter from"#compiled/gray-matter/index.js";import{defineSchedule}from"#public/definitions/schedule.js";import{defineSkill}from"#public/definitions/skill.js";const CLOSED_FRONTMATTER_PATTERN=/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/;function rejectJavaScriptFrontmatter(){throw Error(`JavaScript frontmatter is not supported.`)}const SAFE_GRAY_MATTER_OPTIONS={language:`yaml`,engines:{javascript:rejectJavaScriptFrontmatter,js:rejectJavaScriptFrontmatter}};function parseMarkdownDocument(t){if(!matter.test(t))return{hasFrontmatter:!1,frontmatter:{},markdown:t};let n;try{n=matter(t,SAFE_GRAY_MATTER_OPTIONS)}catch(e){throw startsWithFrontmatterFence(t)&&!hasClosedFrontmatterFence(t)?Error(`Markdown frontmatter is missing a closing delimiter.`):e}if(!isObject(n.data))throw Error(`Markdown frontmatter must parse to an object.`);return{hasFrontmatter:!0,frontmatter:n.data,markdown:normalizeFrontmatterMarkdownBody(n.content)}}function lowerInstructionsMarkdown(e){return normalizeInstructionsDefinition({markdown:e},`Expected authored instructions markdown to match the public eve shape.`)}function lowerScheduleMarkdown(e){let t=parseMarkdownDocument(e);if(!t.hasFrontmatter)throw Error(`Schedule markdown must start with YAML frontmatter declaring "cron".`);if(`run`in t.frontmatter)throw Error('Markdown-form schedules do not support the "run" frontmatter key. Use a TypeScript schedule (`<name>.ts`) to author a handler.');return defineSchedule(normalizeScheduleDefinition({...t.frontmatter,markdown:t.markdown},`Expected authored schedule markdown to match the public eve shape.`))}function lowerSkillMarkdown(e,t={}){let n=parseMarkdownDocument(e),i=t.slug;if(i===void 0&&!n.hasFrontmatter)throw Error(`Skill markdown must start with YAML frontmatter.`);let a=stripIgnoredSkillFrontmatterKeys(n.frontmatter),o=toOptionalString(a.description,`description`),s=i===void 0?requireStringFrontmatter(a.description,`description`):o??t.description??deriveFlatSkillDescription(n.markdown,i),c={...a,description:s,markdown:n.markdown};return applyOptionalSkillFrontmatter(c,a),defineSkill(normalizeSkillDefinition(c,`Expected authored skill markdown to match the public eve shape.`))}function startsWithFrontmatterFence(e){return e.startsWith(`---
|
|
2
2
|
`)||e.startsWith(`---\r
|
|
3
3
|
`)}function hasClosedFrontmatterFence(e){return CLOSED_FRONTMATTER_PATTERN.test(e)}function normalizeFrontmatterMarkdownBody(e){return e.replace(/^\r?\n/u,``)}function applyOptionalSkillFrontmatter(e,t){let n=toOptionalString(t.license,`license`);n!==void 0&&(e.license=n);let r=toOptionalStringRecord(t.metadata,`metadata`);r!==void 0&&(e.metadata=r)}const IGNORED_SKILL_FRONTMATTER_KEYS=[`name`];function stripIgnoredSkillFrontmatterKeys(e){let t={...e};for(let e of IGNORED_SKILL_FRONTMATTER_KEYS)delete t[e];return t}function toOptionalString(e,t){if(e!=null){if(typeof e!=`string`)throw Error(`Expected "${t}" frontmatter to be a string.`);return e}}function requireStringFrontmatter(e,t){let n=toOptionalString(e,t);if(n===void 0)throw Error(`Missing required "${t}" frontmatter.`);return n}function toOptionalStringRecord(t,n){if(t==null)return;if(!isObject(t))throw Error(`Expected "${n}" frontmatter to be an object.`);let r=Object.entries(t).map(([e,t])=>{if(typeof t!=`string`)throw Error(`Expected "${n}.${e}" frontmatter to be a string.`);return[e,t]});return Object.fromEntries(r)}function deriveFlatSkillDescription(e,t){let n=e.split(/\r?\n/u).map(e=>e.trim()).find(e=>e!==``&&!e.startsWith("```"));return n===void 0?`Instructions for the ${t} skill.`:n.replace(/^[#>*\-\s]+/u,``).trim()||`Instructions for the ${t} skill.`}export{lowerInstructionsMarkdown,lowerScheduleMarkdown,lowerSkillMarkdown};
|
|
@@ -28,7 +28,7 @@ export declare function normalizeInstrumentationChannelKind(rawKind: string | un
|
|
|
28
28
|
* Returns the JSON object the projector produced. Returns `undefined`
|
|
29
29
|
* without warning for a no-op `undefined`, or with a warning when it threw,
|
|
30
30
|
* returned a `Promise`, returned an incorrect shape, or included values
|
|
31
|
-
* outside
|
|
31
|
+
* outside eve's JSON contract. Every rejection path is warning-only so
|
|
32
32
|
* instrumentation can never break the turn. Per-value shaping (for example
|
|
33
33
|
* reserved-key filtering) is left to the caller, since the channel and
|
|
34
34
|
* harness expose different value shapes.
|
|
@@ -9,7 +9,7 @@ interface ChannelRouteNitro {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* One Nitro route registration for an
|
|
12
|
+
* One Nitro route registration for an eve channel.
|
|
13
13
|
*/
|
|
14
14
|
export interface NitroChannelRouteRegistration {
|
|
15
15
|
readonly method: ChannelRouteMethod;
|
|
@@ -20,14 +20,14 @@ export interface NitroChannelRouteRegistration {
|
|
|
20
20
|
*/
|
|
21
21
|
export declare function computeChannelRouteRegistrations(preparedHost: PreparedApplicationHost): readonly NitroChannelRouteRegistration[];
|
|
22
22
|
/**
|
|
23
|
-
* Registers virtual Nitro handlers for the provided
|
|
23
|
+
* Registers virtual Nitro handlers for the provided eve channel routes.
|
|
24
24
|
*/
|
|
25
25
|
export declare function registerChannelVirtualHandlers(nitro: Pick<ChannelRouteNitro, "options">, input: {
|
|
26
26
|
readonly artifactsConfig: NitroArtifactsConfigInput;
|
|
27
27
|
readonly registrations: readonly NitroChannelRouteRegistration[];
|
|
28
28
|
}): void;
|
|
29
29
|
/**
|
|
30
|
-
* Replaces the currently-mounted
|
|
30
|
+
* Replaces the currently-mounted eve channel virtual handlers when the route
|
|
31
31
|
* set changes.
|
|
32
32
|
*/
|
|
33
33
|
export declare function syncChannelVirtualHandlers(nitro: ChannelRouteNitro, input: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Nitro } from "nitro/types";
|
|
2
2
|
import type { NitroBuildSurface, PreparedApplicationHost } from "#internal/nitro/host/types.js";
|
|
3
3
|
/**
|
|
4
|
-
* Wires
|
|
4
|
+
* Wires eve's package-owned app, channel, workflow inspection, and Workflow
|
|
5
5
|
* SDK endpoints into one Nitro host instance.
|
|
6
6
|
*/
|
|
7
7
|
export declare function configureNitroRoutes(nitro: Nitro, preparedHost: PreparedApplicationHost, input: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{EVE_DEV_DISPATCH_SCHEDULE_ROUTE_PATTERN,EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH,EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH,EVE_HEALTH_ROUTE_PATH,EVE_INFO_ROUTE_PATH}from"#protocol/routes.js";import{resolvePackageRoot,resolvePackageSourceFilePath,resolveWorkflowModulePath}from"#internal/application/package.js";import{dirname,join,relative}from"node:path";import{mkdir,writeFile}from"node:fs/promises";import{normalizeEsmImportSpecifier,stringifyEsmImportSpecifier}from"#internal/application/import-specifier.js";import{EVE_WORKFLOW_QUEUE_PREFIX}from"#internal/workflow/queue-namespace.js";import{WorkflowBundleBuilder}from"#internal/workflow-bundle/builder.js";import{createNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{computeChannelRouteRegistrations,registerChannelVirtualHandlers}from"#internal/nitro/host/channel-routes.js";function includesApplicationRoutes(e){return e===`all`||e===`app`}function includesWorkflowBundles(e){return includesWorkflowRoute(e)}function includesWorkflowRoute(e){return e===`all`||e===`flow`}function registerHandler(e,t){let n=`#eve-route-handler/${t.method??`ALL`} ${t.route}`,r=stringifyEsmImportSpecifier(t.handlerPath);e.options.handlers.push({handler:n,method:t.method,route:t.route}),e.options.virtual[n]=[`import handler from ${r};`,`export default handler;`].join(`
|
|
2
|
-
`)}function resolveNitroWorkflowBuildDirectory(e){return join(e.options.buildDir,`workflow`)}function createRelativeImportSpecifier(e,t){let n=relative(e,t).replaceAll(`\\`,`/`);return n.startsWith(`.`)?n:`./${n}`}async function addWorkflowFileHandler(e,t){let n=join(resolveNitroWorkflowBuildDirectory(e),`${t.bundleName}-handler.mjs`),r=dirname(n),i=createRelativeImportSpecifier(r,t.bundlePath),a=(t.directHandlers??[]).map(e=>{let t=createRelativeImportSpecifier(r,e.bundlePath);return{importSpecifier:t,isOwnBundle:t===i,queuePrefix:e.queuePrefix}});await mkdir(r,{recursive:!0}),await writeFile(n,buildWorkflowFileHandlerSource({bundlePath:i,directHandlers:a,runtimeImportSpecifier:t.runtimeImportSpecifier})),e.options.handlers.push({handler:n,route:t.route})}function buildWorkflowFileHandlerSource(e){let t=[`// Generated by
|
|
2
|
+
`)}function resolveNitroWorkflowBuildDirectory(e){return join(e.options.buildDir,`workflow`)}function createRelativeImportSpecifier(e,t){let n=relative(e,t).replaceAll(`\\`,`/`);return n.startsWith(`.`)?n:`./${n}`}async function addWorkflowFileHandler(e,t){let n=join(resolveNitroWorkflowBuildDirectory(e),`${t.bundleName}-handler.mjs`),r=dirname(n),i=createRelativeImportSpecifier(r,t.bundlePath),a=(t.directHandlers??[]).map(e=>{let t=createRelativeImportSpecifier(r,e.bundlePath);return{importSpecifier:t,isOwnBundle:t===i,queuePrefix:e.queuePrefix}});await mkdir(r,{recursive:!0}),await writeFile(n,buildWorkflowFileHandlerSource({bundlePath:i,directHandlers:a,runtimeImportSpecifier:t.runtimeImportSpecifier})),e.options.handlers.push({handler:n,route:t.route})}function buildWorkflowFileHandlerSource(e){let t=[`// Generated by eve. Do not edit by hand.`,`import { POST } from ${JSON.stringify(e.bundlePath)};`];if(e.directHandlers.length>0&&e.runtimeImportSpecifier!==void 0){let n=0,r=e.directHandlers.map(e=>{if(e.isOwnBundle)return{...e,binding:`POST`};let t=`__eveWorkflowDirectHandler${n}`;return n+=1,{...e,binding:t}});for(let e of r)e.isOwnBundle||t.push(`import { POST as ${e.binding} } from ${JSON.stringify(e.importSpecifier)};`);t.push(`import { getWorld as __eveGetWorkflowWorld } from ${JSON.stringify(e.runtimeImportSpecifier)};`,``,`try {`,` const __eveWorkflowWorld = await __eveGetWorkflowWorld();`,` if (typeof __eveWorkflowWorld?.registerHandler === "function") {`);for(let e of r)t.push(` __eveWorkflowWorld.registerHandler(${JSON.stringify(e.queuePrefix)}, ${e.binding});`);t.push(` }`,`} catch (err) {`,` console.warn("[eve] Failed to register direct workflow queue handlers:", err);`,`}`)}return t.push(``,`export default async ({ req }) => {`,` return await POST(req);`,`};`,``),t.join(`
|
|
3
3
|
`)}function addFrameworkVirtualHandler(e,t){let n=`#eve-route${t.route}`,r=stringifyEsmImportSpecifier(t.modulePath);e.options.handlers.push({handler:n,method:t.method,route:t.route}),e.options.virtual[n]=[`import { ${t.handlerExport} } from ${r};`,`export default async (event) => ${t.handlerExport}(${t.args}, event.req);`].join(`
|
|
4
4
|
`)}async function configureNitroRoutes(o,s,c){if(includesWorkflowBundles(c.surface)){let e=resolvePackageRoot(),t=new WorkflowBundleBuilder({appRoot:s.appRoot,compiledArtifactsBootstrapPath:s.compiledArtifacts.bootstrapPath,outDir:s.workflowBuildDir,rootDir:e,watch:o.options.dev}),n=Promise.resolve(),buildWorkflowArtifacts=async()=>{await t.build({nitroStepOutfile:includesWorkflowRoute(c.surface)?join(resolveNitroWorkflowBuildDirectory(o),`steps.mjs`):void 0,nitroWorkflowOutfile:o.options.dev&&includesWorkflowRoute(c.surface)?join(resolveNitroWorkflowBuildDirectory(o),`workflows.mjs`):void 0})},syncWorkflowArtifacts=async()=>{let e=n.then(buildWorkflowArtifacts);n=e.catch(()=>{}),await e},r=!0;await syncWorkflowArtifacts(),o.hooks.hook(`build:before`,async()=>{if(r){r=!1;return}await syncWorkflowArtifacts()}),o.options.dev&&o.hooks.hook(`dev:reload`,async()=>{await syncWorkflowArtifacts()})}let l=createNitroArtifactsConfig({appRoot:s.appRoot,dev:o.options.dev});includesApplicationRoutes(c.surface)&&(registerHandler(o,{handlerPath:resolvePackageSourceFilePath(`src/internal/nitro/routes/index.ts`),method:`GET`,route:`/`}),registerHandler(o,{handlerPath:resolvePackageSourceFilePath(`src/internal/nitro/routes/health.ts`),method:`GET`,route:EVE_HEALTH_ROUTE_PATH}),addFrameworkVirtualHandler(o,{args:JSON.stringify({...l,mode:o.options.dev?`development`:`production`}),handlerExport:`handleAgentInfoRequest`,method:`GET`,modulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/info.ts`),route:EVE_INFO_ROUTE_PATH}),registerChannelVirtualHandlers(o,{artifactsConfig:l,registrations:computeChannelRouteRegistrations(s)}),o.options.dev&&(addFrameworkVirtualHandler(o,{args:JSON.stringify({appRoot:l.appRoot}),handlerExport:`handleDevRuntimeArtifactsRequest`,method:`GET`,modulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/dev-runtime-artifacts.ts`),route:EVE_DEV_RUNTIME_ARTIFACTS_ROUTE_PATH}),addFrameworkVirtualHandler(o,{args:JSON.stringify({appRoot:l.appRoot}),handlerExport:`handleDevRuntimeArtifactsRebuildRequest`,method:`POST`,modulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/dev-runtime-artifacts.ts`),route:EVE_DEV_RUNTIME_ARTIFACTS_REBUILD_ROUTE_PATH}),addFrameworkVirtualHandler(o,{args:JSON.stringify({appRoot:l.appRoot}),handlerExport:`handleDevScheduleDispatchRequest`,method:`POST`,modulePath:resolvePackageSourceFilePath(`src/internal/nitro/routes/dev-schedule-dispatch.ts`),route:EVE_DEV_DISPATCH_SCHEDULE_ROUTE_PATTERN})));let u=resolveNitroWorkflowBuildDirectory(o),d=includesWorkflowRoute(c.surface)?o.options.dev?join(u,`workflows.mjs`):join(s.workflowBuildDir,`workflows.mjs`):void 0,f=o.options.dev&&d!==void 0?[{bundlePath:d,queuePrefix:EVE_WORKFLOW_QUEUE_PREFIX}]:[],p=f.length>0?normalizeEsmImportSpecifier(resolveWorkflowModulePath(`workflow/runtime`)):void 0;d&&await addWorkflowFileHandler(o,{bundleName:`workflows`,bundlePath:d,directHandlers:f,route:`/.well-known/workflow/v1/flow`,runtimeImportSpecifier:p}),o.routing.sync()}export{configureNitroRoutes};
|
|
@@ -12,7 +12,7 @@ export declare function shouldPruneLocalSandboxBackends(input: {
|
|
|
12
12
|
}): boolean;
|
|
13
13
|
/**
|
|
14
14
|
* Creates one configured Nitro instance for either production build or dev
|
|
15
|
-
* hosting of an
|
|
15
|
+
* hosting of an eve application.
|
|
16
16
|
*
|
|
17
17
|
* `surface` narrows the mounted routes for isolated production builds.
|
|
18
18
|
* `outputDir` lets callers stage those isolated builds into separate Nitro
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Nitro } from "nitro/types";
|
|
2
2
|
/**
|
|
3
|
-
* Builds an unguessable route path for
|
|
3
|
+
* Builds an unguessable route path for eve's Vercel cron handler.
|
|
4
4
|
*
|
|
5
5
|
* Vercel cron jobs hit a single configurable path (default `/_vercel/cron`)
|
|
6
6
|
* for every scheduled tick, identifying the schedule via the
|
|
@@ -8,7 +8,7 @@ import type { Nitro } from "nitro/types";
|
|
|
8
8
|
* relies on the user setting a `CRON_SECRET` env var to authenticate
|
|
9
9
|
* incoming requests.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* eve sidesteps the manual env var by giving each build a unique random
|
|
12
12
|
* handler path under the framework's protocol prefix — the path itself is
|
|
13
13
|
* the secret. Vercel's cron infra reads the path from the deploy's
|
|
14
14
|
* `config.crons[]` so the platform always knows where to POST, and the same
|
|
@@ -22,7 +22,7 @@ import type { Nitro } from "nitro/types";
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function createEveCronHandlerRoute(): string;
|
|
24
24
|
/**
|
|
25
|
-
* Applies
|
|
25
|
+
* Applies eve's unguessable cron handler route to a Nitro instance built
|
|
26
26
|
* with the Vercel preset.
|
|
27
27
|
*
|
|
28
28
|
* The Vercel preset reads `nitro.options.vercel.cronHandlerRoute` at two
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Creates
|
|
2
|
+
* Creates eve-owned Nitro bundler overrides that must apply to both Rollup
|
|
3
3
|
* and Rolldown hosted builds.
|
|
4
4
|
*/
|
|
5
5
|
export declare function createNitroBundlerConfig(plugins: readonly object[]): Record<string, unknown>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Optional sandbox engine packages
|
|
2
|
+
* Optional sandbox engine packages eve's runtime references through
|
|
3
3
|
* lazy dynamic imports. Bundlers follow literal dynamic imports like
|
|
4
4
|
* static imports — so without intervention mere *resolvability* (for
|
|
5
|
-
* example
|
|
5
|
+
* example eve's own workspace devDependencies) would pull them into
|
|
6
6
|
* every hosted build. The source of truth for whether an application
|
|
7
7
|
* opted in is its compiled sandbox config: the backend names captured
|
|
8
8
|
* into the manifest at compile time.
|
|
@@ -44,7 +44,7 @@ export interface SyncScheduleTaskHandlersInput {
|
|
|
44
44
|
*/
|
|
45
45
|
export declare function registerScheduleTaskHandlers(nitro: ScheduleTaskNitro, input: RegisterScheduleTaskHandlersInput): void;
|
|
46
46
|
/**
|
|
47
|
-
* Replaces the currently-registered
|
|
47
|
+
* Replaces the currently-registered eve schedule task handlers when the
|
|
48
48
|
* compiled authored schedule set changes.
|
|
49
49
|
*
|
|
50
50
|
* Returns `true` when the registration set changed (and the caller should
|
|
@@ -52,7 +52,7 @@ export declare function registerScheduleTaskHandlers(nitro: ScheduleTaskNitro, i
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function syncScheduleTaskHandlers(nitro: ScheduleTaskNitro, input: SyncScheduleTaskHandlersInput): boolean;
|
|
54
54
|
/**
|
|
55
|
-
* Removes every
|
|
55
|
+
* Removes every eve-owned schedule task entry, virtual handler module, and
|
|
56
56
|
* cron entry from the Nitro options. Used by the dev watcher before
|
|
57
57
|
* re-registering the latest compiled set.
|
|
58
58
|
*/
|
|
@@ -5,7 +5,7 @@ import type { DevelopmentServerHandle } from "#internal/nitro/host/types.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function normalizeDevelopmentServerClientUrl(serverUrl: string): string;
|
|
7
7
|
/**
|
|
8
|
-
* Starts the development Nitro server for an
|
|
8
|
+
* Starts the development Nitro server for an eve application.
|
|
9
9
|
*
|
|
10
10
|
* Authored schedules are never registered with Nitro's cron scheduler in
|
|
11
11
|
* dev mode. To fire one authored schedule on demand, `POST` the dev-only
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{join}from"node:path";import{mkdir,readFile,rm,writeFile}from"node:fs/promises";import{startDevelopmentSandboxPrewarmInBackground}from"#execution/sandbox/development-prewarm.js";import{loadDevelopmentEnvironmentFiles}from"#cli/dev/environment.js";import{EVE_DEV_ENV_FLAG}from"#internal/application/optional-package-install.js";import{EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV,clearInitializedDevelopmentSandboxBackendNames,createDevelopmentSandboxRunId,getInitializedDevelopmentSandboxBackendNames}from"#execution/sandbox/development-run.js";import{pruneDevelopmentRuntimeArtifactsSnapshotsInBackground}from"#internal/nitro/dev-runtime-artifacts.js";import{build,createDevServer,prepare}from"nitro/builder";import{createApplicationNitro}from"#internal/nitro/host/create-application-nitro.js";import{prepareApplicationHost}from"#internal/nitro/host/prepare-application-host.js";import{createNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{resolveNitroCompiledArtifactsSource}from"#internal/nitro/routes/runtime-artifacts.js";import{pruneLocalSandboxTemplatesInBackground,stopDevelopmentSandboxResources}from"#execution/sandbox/bindings/local.js";import{DEFAULT_DEVELOPMENT_SERVER_PORT,MAX_DEVELOPMENT_SERVER_PORT_ATTEMPTS}from"#internal/nitro/host/ports.js";const MAX_ALLOWED_DEVELOPMENT_SERVER_PORT=65535,WORKFLOW_LOCAL_BASE_URL_ENV=`WORKFLOW_LOCAL_BASE_URL`,PORT_ENV=`PORT`,DEFAULT_DEVELOPMENT_SERVER_HOST=`127.0.0.1`,IPV6_WILDCARD_LISTEN_HOSTNAMES=new Set([`[::]`,`::`]);function normalizeDevelopmentServerClientUrl(e){let t=new URL(e);return IPV6_WILDCARD_LISTEN_HOSTNAMES.has(t.hostname)?(t.hostname=`[::1]`,t.toString()):t.hostname===`0.0.0.0`?(t.hostname=DEFAULT_DEVELOPMENT_SERVER_HOST,t.toString()):e}function isAddressInUseError(e){return e instanceof Error&&`code`in e&&e.code===`EADDRINUSE`}function resolveDevelopmentServerPort(e){let t=typeof e==`string`?Number(e):e??DEFAULT_DEVELOPMENT_SERVER_PORT;if(!Number.isInteger(t)||t<0||t>MAX_ALLOWED_DEVELOPMENT_SERVER_PORT)throw Error(`Invalid development server port "${String(e)}". Expected an integer between 0 and ${MAX_ALLOWED_DEVELOPMENT_SERVER_PORT}.`);return t}function readEnvironmentPort(){let e=process.env[PORT_ENV];if(e===void 0||e.trim()===``)return;let t=Number(e);if(!Number.isInteger(t)||t<0||t>MAX_ALLOWED_DEVELOPMENT_SERVER_PORT)throw Error(`Invalid ${PORT_ENV} environment variable "${e}". Expected an integer between 0 and ${MAX_ALLOWED_DEVELOPMENT_SERVER_PORT}.`);return t}function resolveDevelopmentProcessIdPath(t){return join(t,`.eve`,`dev-process.pid`)}function parseProcessId(e){let t=e.trim();if(!/^\d+$/.test(t))return;let n=Number(t);return Number.isSafeInteger(n)&&n>0?n:void 0}function isProcessRunning(e){try{return process.kill(e,0),!0}catch(e){return e instanceof Error&&`code`in e&&e.code===`EPERM`}}function formatKillCommand(e){return process.platform===`win32`?`taskkill /PID ${e}`:`kill ${e}`}async function readActiveDevelopmentProcessId(e){let t;try{t=parseProcessId(await readFile(resolveDevelopmentProcessIdPath(e),`utf8`))}catch{return}if(!(t===void 0||!isProcessRunning(t)))return t}async function writeDevelopmentProcessId(a){let o=resolveDevelopmentProcessIdPath(a),s=await readActiveDevelopmentProcessId(a);if(s!==void 0)throw Error([`A dev server is already running for this
|
|
1
|
+
import{join}from"node:path";import{mkdir,readFile,rm,writeFile}from"node:fs/promises";import{startDevelopmentSandboxPrewarmInBackground}from"#execution/sandbox/development-prewarm.js";import{loadDevelopmentEnvironmentFiles}from"#cli/dev/environment.js";import{EVE_DEV_ENV_FLAG}from"#internal/application/optional-package-install.js";import{EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV,clearInitializedDevelopmentSandboxBackendNames,createDevelopmentSandboxRunId,getInitializedDevelopmentSandboxBackendNames}from"#execution/sandbox/development-run.js";import{pruneDevelopmentRuntimeArtifactsSnapshotsInBackground}from"#internal/nitro/dev-runtime-artifacts.js";import{build,createDevServer,prepare}from"nitro/builder";import{createApplicationNitro}from"#internal/nitro/host/create-application-nitro.js";import{prepareApplicationHost}from"#internal/nitro/host/prepare-application-host.js";import{createNitroArtifactsConfig}from"#internal/nitro/host/artifacts-config.js";import{resolveNitroCompiledArtifactsSource}from"#internal/nitro/routes/runtime-artifacts.js";import{pruneLocalSandboxTemplatesInBackground,stopDevelopmentSandboxResources}from"#execution/sandbox/bindings/local.js";import{DEFAULT_DEVELOPMENT_SERVER_PORT,MAX_DEVELOPMENT_SERVER_PORT_ATTEMPTS}from"#internal/nitro/host/ports.js";const MAX_ALLOWED_DEVELOPMENT_SERVER_PORT=65535,WORKFLOW_LOCAL_BASE_URL_ENV=`WORKFLOW_LOCAL_BASE_URL`,PORT_ENV=`PORT`,DEFAULT_DEVELOPMENT_SERVER_HOST=`127.0.0.1`,IPV6_WILDCARD_LISTEN_HOSTNAMES=new Set([`[::]`,`::`]);function normalizeDevelopmentServerClientUrl(e){let t=new URL(e);return IPV6_WILDCARD_LISTEN_HOSTNAMES.has(t.hostname)?(t.hostname=`[::1]`,t.toString()):t.hostname===`0.0.0.0`?(t.hostname=DEFAULT_DEVELOPMENT_SERVER_HOST,t.toString()):e}function isAddressInUseError(e){return e instanceof Error&&`code`in e&&e.code===`EADDRINUSE`}function resolveDevelopmentServerPort(e){let t=typeof e==`string`?Number(e):e??DEFAULT_DEVELOPMENT_SERVER_PORT;if(!Number.isInteger(t)||t<0||t>MAX_ALLOWED_DEVELOPMENT_SERVER_PORT)throw Error(`Invalid development server port "${String(e)}". Expected an integer between 0 and ${MAX_ALLOWED_DEVELOPMENT_SERVER_PORT}.`);return t}function readEnvironmentPort(){let e=process.env[PORT_ENV];if(e===void 0||e.trim()===``)return;let t=Number(e);if(!Number.isInteger(t)||t<0||t>MAX_ALLOWED_DEVELOPMENT_SERVER_PORT)throw Error(`Invalid ${PORT_ENV} environment variable "${e}". Expected an integer between 0 and ${MAX_ALLOWED_DEVELOPMENT_SERVER_PORT}.`);return t}function resolveDevelopmentProcessIdPath(t){return join(t,`.eve`,`dev-process.pid`)}function parseProcessId(e){let t=e.trim();if(!/^\d+$/.test(t))return;let n=Number(t);return Number.isSafeInteger(n)&&n>0?n:void 0}function isProcessRunning(e){try{return process.kill(e,0),!0}catch(e){return e instanceof Error&&`code`in e&&e.code===`EPERM`}}function formatKillCommand(e){return process.platform===`win32`?`taskkill /PID ${e}`:`kill ${e}`}async function readActiveDevelopmentProcessId(e){let t;try{t=parseProcessId(await readFile(resolveDevelopmentProcessIdPath(e),`utf8`))}catch{return}if(!(t===void 0||!isProcessRunning(t)))return t}async function writeDevelopmentProcessId(a){let o=resolveDevelopmentProcessIdPath(a),s=await readActiveDevelopmentProcessId(a);if(s!==void 0)throw Error([`A dev server is already running for this eve agent (pid ${s}).`,`To stop it, run: ${formatKillCommand(s)}`].join(`
|
|
2
2
|
`));return await mkdir(join(a,`.eve`),{recursive:!0}),await writeFile(o,`${process.pid}\n`,`utf8`),async()=>{let e;try{e=parseProcessId(await readFile(o,`utf8`))}catch{return}e===process.pid&&await rm(o,{force:!0})}}function resolveDevelopmentServerPorts(e){let t=resolveDevelopmentServerPort(e.port);if(t===0||!e.retryOnAddressInUse)return[t];let n=[];for(let e=0;e<MAX_DEVELOPMENT_SERVER_PORT_ATTEMPTS;e+=1){let r=t+e;if(r>65535)break;n.push(r)}return n}function installWorkflowLocalQueueEnvironment(e){let t=process.env[WORKFLOW_LOCAL_BASE_URL_ENV],n=process.env[PORT_ENV],r=new URL(normalizeDevelopmentServerClientUrl(e));return process.env[WORKFLOW_LOCAL_BASE_URL_ENV]=r.origin,r.port&&(process.env[PORT_ENV]=r.port),()=>{t===void 0?delete process.env[WORKFLOW_LOCAL_BASE_URL_ENV]:process.env[WORKFLOW_LOCAL_BASE_URL_ENV]=t,n===void 0?delete process.env[PORT_ENV]:process.env[PORT_ENV]=n}}function attachTemporarySocketErrorHandler(e){let onSocketError=()=>{};return e.once(`error`,onSocketError),()=>{e.off(`error`,onSocketError)}}function shouldProxyDevelopmentServerWebSocketUpgrades(e){return e.options.features.websocket===!0||e.options.experimental.websocket===!0}function guardDevelopmentServerWebSocketUpgrades(e,t){let n=t.upgrade.bind(t),r=shouldProxyDevelopmentServerWebSocketUpgrades(e);t.upgrade=async(e,t,i)=>{if(!r){t.destroyed||t.destroy();return}let a=attachTemporarySocketErrorHandler(t);try{await n(e,t,i)}catch{t.destroyed||t.destroy()}finally{a()}}}async function listenForDevelopmentServer(e){let t=resolveDevelopmentServerPorts({port:e.port,retryOnAddressInUse:e.retryOnAddressInUse}),n;for(let r of t){let t=e.devServer.listen({hostname:e.host,port:r,silent:!0});try{return await t.ready(),t}catch(r){if(n=r,await t.close().catch(()=>{}),!isAddressInUseError(r)||!e.retryOnAddressInUse)throw r}}throw Error(`Failed to start Nitro dev server after ${t.length} attempts. Tried ports ${t.join(`, `)}.`,{cause:n})}async function startDevelopmentServer(e,t={}){process.env[EVE_DEV_ENV_FLAG]??=`1`,loadDevelopmentEnvironmentFiles(e);let n=process.env[EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV],r=createDevelopmentSandboxRunId();process.env[EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV]=r;let i,u,d,f,p;try{let o=await prepareApplicationHost(e,{dev:!0});p=await writeDevelopmentProcessId(o.appRoot),pruneDevelopmentRuntimeArtifactsSnapshotsInBackground(o.appRoot);let s=resolveNitroCompiledArtifactsSource(createNitroArtifactsConfig({appRoot:o.appRoot,dev:!0}));startDevelopmentSandboxPrewarmInBackground({appRoot:o.appRoot,compiledArtifactsSource:s}),pruneLocalSandboxTemplatesInBackground(o.appRoot),i=await createApplicationNitro(o,!0),u=createDevServer(i),guardDevelopmentServerWebSocketUpgrades(i,u);let c=t.host??i.options.devServer.hostname??DEFAULT_DEVELOPMENT_SERVER_HOST,l=t.port??readEnvironmentPort(),m=await listenForDevelopmentServer({devServer:u,host:c,port:l,retryOnAddressInUse:l===void 0});if(!m.url)throw Error(`Nitro dev server did not expose a URL.`);d=installWorkflowLocalQueueEnvironment(m.url),await prepare(i),await build(i);let{startAuthoredSourceWatcher:h}=await import(`#internal/nitro/host/dev-authored-source-watcher.js`);f=await h({nitro:i,preparedHost:o});let g=d;if(g===void 0)throw Error(`Workflow local queue environment was not initialized.`);let _=f,v=u,y=i;return{async close(){try{await _.close(),await v.close(),await y.close(),await stopDevelopmentSandboxResources({backendNames:getInitializedDevelopmentSandboxBackendNames(r),devRunId:r,log:e=>console.warn(`[eve:dev] ${e}`)})}finally{clearInitializedDevelopmentSandboxBackendNames(r),await p?.(),g(),restoreDevelopmentSandboxRunId(n)}},url:normalizeDevelopmentServerClientUrl(m.url)}}catch(e){throw await f?.close().catch(()=>{}),d?.(),await u?.close().catch(()=>{}),await i?.close().catch(()=>{}),await stopDevelopmentSandboxResources({backendNames:getInitializedDevelopmentSandboxBackendNames(r),devRunId:r,log:e=>console.warn(`[eve:dev] ${e}`)}).catch(()=>{}),clearInitializedDevelopmentSandboxBackendNames(r),await p?.().catch(()=>{}),restoreDevelopmentSandboxRunId(n),e}}function restoreDevelopmentSandboxRunId(e){if(e===void 0){delete process.env[EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV];return}process.env[EVE_DEVELOPMENT_SANDBOX_RUN_ID_ENV]=e}export{normalizeDevelopmentServerClientUrl,startDevelopmentServer};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ProductionServerHandle } from "#internal/nitro/host/types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Starts a built Nitro server for an
|
|
3
|
+
* Starts a built Nitro server for an eve application.
|
|
4
4
|
*/
|
|
5
5
|
export declare function startProductionServer(rootDir: string, options?: {
|
|
6
6
|
host?: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{EVE_HEALTH_ROUTE_PATH}from"#protocol/routes.js";import{existsSync}from"node:fs";import{join,resolve}from"node:path";import{spawn}from"node:child_process";import{loadDevelopmentEnvironmentFiles}from"#cli/dev/environment.js";import{setTimeout}from"node:timers/promises";import{prewarmBuiltAppSandboxes}from"#execution/sandbox/prewarm.js";import{createServer}from"node:net";const HEALTH_TIMEOUT_MS=6e4,LOCAL_SERVER_URL_PATTERN=/https?:\/\/(?:\[[^\]\s]+\]|[^\s/:[\]]+)(?::\d+)?/,WILDCARD_LISTEN_HOSTNAMES=new Set([`[::]`,`::`,`0.0.0.0`]);function isRecord(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function isAddressInUseError(e){return e instanceof Error&&`code`in e&&e.code===`EADDRINUSE`}function resolveOutputServerEntry(e){return join(resolve(e),`.output`,`server`,`index.mjs`)}function readEnvironmentPort(){let e=process.env.PORT;if(e===void 0||e.trim()===``)return;let t=Number(e);if(!Number.isInteger(t)||t<0||t>65535)throw Error(`Invalid PORT environment variable "${e}". Expected an integer between 0 and 65535.`);return t}function normalizeServerClientUrl(e){let t=new URL(e);return WILDCARD_LISTEN_HOSTNAMES.has(t.hostname)&&(t.hostname=`127.0.0.1`),t.toString()}function formatClientHost(e){return WILDCARD_LISTEN_HOSTNAMES.has(e)?`127.0.0.1`:e.includes(`:`)&&!e.startsWith(`[`)?`[${e}]`:e}function createKnownPortUrl(e){return`http://${formatClientHost(e.host)}:${String(e.port)}/`}async function resolveListenPort(e){if(e.port!==0)return e.port;let t=createServer();return await new Promise((n,r)=>{t.once(`error`,r),t.listen(0,e.host,()=>{let e=t.address();t.close(t=>{if(t){r(t);return}if(e===null||typeof e==`string`){r(Error(`Failed to resolve an available port for eve start.`));return}n(e.port)})})})}function parseServerUrlFromOutput(e){let t=LOCAL_SERVER_URL_PATTERN.exec(e);if(t!==null)return normalizeServerClientUrl(t[0])}async function waitForHealth(t){let{child:n,url:r}=t,i=new URL(EVE_HEALTH_ROUTE_PATH,r).toString(),a=Date.now()+HEALTH_TIMEOUT_MS;for(;Date.now()<a;){let e=t.getStartError();if(e!==void 0)throw e;if(n.exitCode!==null||n.signalCode!==null)throw Error(`Built server process exited (code=${String(n.exitCode)}, signal=${String(n.signalCode)}) before becoming healthy.`);try{if((await fetch(i,{signal:AbortSignal.timeout(2e3)})).ok)return new URL(r).toString()}catch(e){if(isAddressInUseError(e))throw e}await setTimeout(250)}throw Error(`Built server did not become healthy within ${HEALTH_TIMEOUT_MS/1e3}s at ${i}.`)}async function waitForReady(e){let t=Date.now()+HEALTH_TIMEOUT_MS;for(;Date.now()<t;){let t=e.getStartError();if(t!==void 0)throw t;let n=parseServerUrlFromOutput(e.getOutput())??e.knownUrl;if(n!==void 0)return await waitForHealth({child:e.child,getStartError:e.getStartError,url:n});if(e.child.exitCode!==null||e.child.signalCode!==null)throw Error(`Built server process exited (code=${String(e.child.exitCode)}, signal=${String(e.child.signalCode)}) before printing its URL.`);await setTimeout(250)}throw Error([`Built server did not become ready within ${HEALTH_TIMEOUT_MS/1e3}s.`,`Output:`,e.getOutput()].join(`
|
|
2
|
-
`))}async function terminate(e){e.exitCode!==null||e.killed||(e.kill(`SIGTERM`),await Promise.race([once(e,`exit`),setTimeout(5e3).then(()=>`timeout`)])===`timeout`&&e.exitCode===null&&(e.kill(`SIGKILL`),await once(e,`exit`)),e.stdout?.destroy(),e.stderr?.destroy())}function once(e,t){return new Promise(n=>{e.once(t,()=>n())})}async function startProductionServer(e,n={}){let o=resolve(e),s=resolveOutputServerEntry(o);if(!existsSync(s))throw Error(`Missing
|
|
3
|
-
`)))})});h.catch(()=>void 0);try{return{async close(){f=!0,await terminate(m)},url:await waitForReady({child:m,getStartError:()=>p,getOutput:()=>d,knownUrl:u}),async wait(){await h}}}catch(e){throw f=!0,await terminate(m),isRecord(e)&&e.name===`AbortError`?Error(`Timed out waiting for built
|
|
2
|
+
`))}async function terminate(e){e.exitCode!==null||e.killed||(e.kill(`SIGTERM`),await Promise.race([once(e,`exit`),setTimeout(5e3).then(()=>`timeout`)])===`timeout`&&e.exitCode===null&&(e.kill(`SIGKILL`),await once(e,`exit`)),e.stdout?.destroy(),e.stderr?.destroy())}function once(e,t){return new Promise(n=>{e.once(t,()=>n())})}async function startProductionServer(e,n={}){let o=resolve(e),s=resolveOutputServerEntry(o);if(!existsSync(s))throw Error(`Missing eve build output at ${s}. Run "eve build" before "eve start".`);loadDevelopmentEnvironmentFiles(o),await prewarmBuiltAppSandboxes({appRoot:o,log:e=>console.log(e)});let c=n.host??`0.0.0.0`,l=await resolveListenPort({host:c,port:n.port??readEnvironmentPort()??3e3}),u=createKnownPortUrl({host:c,port:l}),d=``,f=!1,p,m=spawn(process.execPath,[s],{cwd:o,env:{...process.env,HOST:c,NITRO_HOST:c,NITRO_PORT:String(l),PORT:String(l)},stdio:[`ignore`,`pipe`,`pipe`]});m.stdout?.on(`data`,e=>{d+=e.toString(`utf8`),process.stdout.write(e)}),m.stderr?.on(`data`,e=>{d+=e.toString(`utf8`),process.stderr.write(e)});let h=new Promise((e,t)=>{m.once(`error`,e=>{p=e,t(e)}),m.once(`exit`,(n,r)=>{if(f||n===0){e();return}t(Error([`Built server process exited unexpectedly (code=${String(n)}, signal=${String(r)}).`,d].join(`
|
|
3
|
+
`)))})});h.catch(()=>void 0);try{return{async close(){f=!0,await terminate(m)},url:await waitForReady({child:m,getStartError:()=>p,getOutput:()=>d,knownUrl:u}),async wait(){await h}}}catch(e){throw f=!0,await terminate(m),isRecord(e)&&e.name===`AbortError`?Error(`Timed out waiting for built eve server to respond.`,{cause:e}):e}}export{startProductionServer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{readDevelopmentRuntimeArtifactsSnapshotRoot}from"#internal/nitro/dev-runtime-artifacts.js";import{resolveSchedules}from"#runtime/schedules/resolve-schedule.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";import{resolveAgent}from"#runtime/resolve-agent.js";async function loadAgentInfoData(e){return await loadAgentInfoDataFromArtifacts(e.compiledArtifactsSource)}async function loadAgentInfoManifestData(e){let t=await loadCompiledManifest({compiledArtifactsSource:e.compiledArtifactsSource});return{manifest:t,schedules:await resolveSchedules({manifest:t})}}function resolveAgentInfoCompiledArtifactsSource(r={}){if(r.dev===!0&&r.appRoot!==void 0)return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(r.devRuntimeArtifactsPointerPath)??r.appRoot);if(readBundledCompiledArtifacts()!==null)return createBundledRuntimeCompiledArtifactsSource();if(r.appRoot!==void 0)return createDiskRuntimeCompiledArtifactsSource(r.appRoot);throw Error(`
|
|
1
|
+
import{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{loadCompiledManifest}from"#runtime/loaders/manifest.js";import{readDevelopmentRuntimeArtifactsSnapshotRoot}from"#internal/nitro/dev-runtime-artifacts.js";import{resolveSchedules}from"#runtime/schedules/resolve-schedule.js";import{loadCompiledModuleMap}from"#runtime/loaders/module-map.js";import{resolveAgent}from"#runtime/resolve-agent.js";async function loadAgentInfoData(e){return await loadAgentInfoDataFromArtifacts(e.compiledArtifactsSource)}async function loadAgentInfoManifestData(e){let t=await loadCompiledManifest({compiledArtifactsSource:e.compiledArtifactsSource});return{manifest:t,schedules:await resolveSchedules({manifest:t})}}function resolveAgentInfoCompiledArtifactsSource(r={}){if(r.dev===!0&&r.appRoot!==void 0)return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(r.devRuntimeArtifactsPointerPath)??r.appRoot);if(readBundledCompiledArtifacts()!==null)return createBundledRuntimeCompiledArtifactsSource();if(r.appRoot!==void 0)return createDiskRuntimeCompiledArtifactsSource(r.appRoot);throw Error(`eve agent info runtime data requires bundled artifacts or an app root.`)}async function loadAgentInfoDataFromArtifacts(e){let[t,n]=await Promise.all([loadCompiledManifest({compiledArtifactsSource:e}),loadCompiledModuleMap({compiledArtifactsSource:e})]),i=await resolveSchedules({manifest:t});return{agent:await resolveAgent({manifest:t,moduleMap:n}),manifest:t,schedules:i}}export{loadAgentInfoData,loadAgentInfoManifestData,resolveAgentInfoCompiledArtifactsSource};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { H3Event } from "nitro";
|
|
2
2
|
/**
|
|
3
|
-
* Nitro route for
|
|
3
|
+
* Nitro route for eve's health endpoint.
|
|
4
4
|
*
|
|
5
5
|
* The health endpoint is intentionally always-public so platform load
|
|
6
6
|
* balancers and uptime monitors can probe it without credentials.
|
|
@@ -6,7 +6,7 @@ interface AgentInfoRouteInput extends NitroArtifactsConfig {
|
|
|
6
6
|
/**
|
|
7
7
|
* Builds the package-owned JSON inspection response for the current agent.
|
|
8
8
|
*
|
|
9
|
-
* The route keeps the same default auth chain as the
|
|
9
|
+
* The route keeps the same default auth chain as the eve channel:
|
|
10
10
|
* local development requests are accepted by hostname, while deployed
|
|
11
11
|
* Vercel targets require a valid OIDC bearer.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{readDevelopmentRuntimeArtifactsSnapshotRoot}from"#internal/nitro/dev-runtime-artifacts.js";function resolveNitroCompiledArtifactsSource(e){let{appRoot:t,dev:n}=e;if(n&&t!==void 0){if(e.moduleMapLoaderPath===void 0)throw Error(`
|
|
1
|
+
import{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{readDevelopmentRuntimeArtifactsSnapshotRoot}from"#internal/nitro/dev-runtime-artifacts.js";function resolveNitroCompiledArtifactsSource(e){let{appRoot:t,dev:n}=e;if(n&&t!==void 0){if(e.moduleMapLoaderPath===void 0)throw Error(`eve Nitro development routes require "moduleMapLoaderPath" in the artifacts config.`);return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(e.devRuntimeArtifactsPointerPath)??t,{moduleMapLoaderPath:e.moduleMapLoaderPath,sandboxAppRoot:t})}if(readBundledCompiledArtifacts()!==null)return createBundledRuntimeCompiledArtifactsSource();if(t!==void 0)return createDiskRuntimeCompiledArtifactsSource(t);throw Error(`eve Nitro route requires bundled artifacts or an eve Nitro runtime configuration app root.`)}export{resolveNitroCompiledArtifactsSource};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NitroArtifactsConfig } from "#internal/nitro/routes/runtime-artifacts.js";
|
|
2
2
|
/**
|
|
3
|
-
* Dispatches one
|
|
3
|
+
* Dispatches one eve authored schedule via the execution engine.
|
|
4
4
|
*
|
|
5
5
|
* Fire-and-forget: the workflow runtime owns terminal completion and
|
|
6
6
|
* its own failure observability. The task return value reports which
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The published npm package name for the
|
|
2
|
+
* The published npm package name for the eve framework.
|
|
3
3
|
*
|
|
4
4
|
* This module is intentionally free of side effects and heavy imports so that
|
|
5
5
|
* any layer can reference the package identity without pulling in filesystem
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public, versioned summary of an
|
|
2
|
+
* Public, versioned summary of an eve agent emitted by `eve`
|
|
3
3
|
* during `eve build`.
|
|
4
4
|
*
|
|
5
|
-
* This schema is the stable contract between
|
|
5
|
+
* This schema is the stable contract between eve and Vercel platform
|
|
6
6
|
* surfaces (eg. the dashboard's project overview card). It is intentionally
|
|
7
7
|
* smaller and more conservative than the internal {@link CompiledAgentManifest}
|
|
8
8
|
* — only fields safe to render in product UI live here, and the schema is
|
|
@@ -37,10 +37,10 @@ export declare const VERCEL_EVE_AGENT_SUMMARY_KIND: "vercel-eve-agent-summary";
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const VERCEL_EVE_AGENT_SUMMARY_VERSION = 3;
|
|
39
39
|
/**
|
|
40
|
-
* Output path (relative to the agent's `appRoot`) where
|
|
40
|
+
* Output path (relative to the agent's `appRoot`) where eve writes the
|
|
41
41
|
* summary file at build time.
|
|
42
42
|
*
|
|
43
|
-
* Lives under `.eve/` — the existing
|
|
43
|
+
* Lives under `.eve/` — the existing eve-internal cache namespace that
|
|
44
44
|
* already holds `nitro/`, `nitro-output/`, `sandbox-cache/`, etc. (see
|
|
45
45
|
* `packages/eve/src/internal/application/paths.ts`). Intentionally
|
|
46
46
|
* outside `.vercel/output/` so the file is not part of the Build Output
|
|
@@ -50,7 +50,7 @@ export declare const VERCEL_EVE_AGENT_SUMMARY_VERSION = 3;
|
|
|
50
50
|
*/
|
|
51
51
|
export declare const VERCEL_EVE_AGENT_SUMMARY_OUTPUT_PATH = ".eve/agent-summary.json";
|
|
52
52
|
/**
|
|
53
|
-
* Display category
|
|
53
|
+
* Display category eve exposes to the dashboard for one channel chip. Built
|
|
54
54
|
* from the channel's reported {@link CompiledChannelDefinition.adapterKind}.
|
|
55
55
|
*/
|
|
56
56
|
export type VercelEveChannelType = "slack" | "http" | "webhook" | "unknown";
|
|
@@ -176,7 +176,7 @@ export interface VercelEveDiagnosticsSummary {
|
|
|
176
176
|
readonly warnings: number;
|
|
177
177
|
}
|
|
178
178
|
/**
|
|
179
|
-
* Versioned public summary of one
|
|
179
|
+
* Versioned public summary of one eve agent, emitted into the Vercel Build
|
|
180
180
|
* Output during `eve build` and ingested by Vercel as deployment metadata.
|
|
181
181
|
*/
|
|
182
182
|
export interface VercelEveAgentSummary {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in Workflow response body steps used by
|
|
2
|
+
* Built-in Workflow response body steps used by eve-owned workflow bundles.
|
|
3
3
|
*
|
|
4
4
|
* These mirror Workflow's tiny `workflow/internal/builtins` module without
|
|
5
|
-
* requiring
|
|
5
|
+
* requiring eve to depend on Workflow's umbrella package.
|
|
6
6
|
*/
|
|
7
7
|
export declare function __builtin_response_array_buffer(this: Request | Response): Promise<ArrayBuffer>;
|
|
8
8
|
export declare function __builtin_response_json(this: Request | Response): Promise<unknown>;
|
|
@@ -16,7 +16,7 @@ export declare function __builtin_response_text(this: Request | Response): Promi
|
|
|
16
16
|
* dispatches into the workflow runtime with the step id
|
|
17
17
|
* `"__builtin_set_attributes"`; the runtime walks the deployment's step
|
|
18
18
|
* registry to resolve it, so the step has to live inside an
|
|
19
|
-
*
|
|
19
|
+
* eve-vendored builtins module that the registry visits. The eve bundler
|
|
20
20
|
* already pulls this file in via `resolveWorkflowModulePath("workflow/internal/builtins")`,
|
|
21
21
|
* so adding the function here is sufficient to register it.
|
|
22
22
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{dirname,relative}from"node:path";import{mkdir,readFile,writeFile}from"node:fs/promises";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";import{applyWorkflowTransform}from"#internal/workflow-bundle/workflow-builders.js";async function writeNitroStepEntrypoint(t){let r=[...t.discoveredEntries.discoveredSteps].sort(),a=new Set(r),o=[...t.discoveredEntries.discoveredSerdeFiles].sort().filter(e=>!a.has(e)),s=await collectNitroStepManifest({projectRoot:t.projectRoot,stepFiles:r,serdeOnlyFiles:o,workingDir:t.workingDir}),c=dirname(t.outfile),l=[`// Generated by
|
|
1
|
+
import{dirname,relative}from"node:path";import{mkdir,readFile,writeFile}from"node:fs/promises";import{normalizeEsmImportSpecifier}from"#internal/application/import-specifier.js";import{applyWorkflowTransform}from"#internal/workflow-bundle/workflow-builders.js";async function writeNitroStepEntrypoint(t){let r=[...t.discoveredEntries.discoveredSteps].sort(),a=new Set(r),o=[...t.discoveredEntries.discoveredSerdeFiles].sort().filter(e=>!a.has(e)),s=await collectNitroStepManifest({projectRoot:t.projectRoot,stepFiles:r,serdeOnlyFiles:o,workingDir:t.workingDir}),c=dirname(t.outfile),l=[`// Generated by eve. Do not edit by hand.`,...createEntrypointImportLines({builtinsImportSpecifier:t.builtinsPath===void 0?`workflow/internal/builtins`:createFileImportSpecifier({outfileDirectory:c,preferAbsoluteFileImports:t.preferAbsoluteFileImports??!1,targetPath:t.builtinsPath}),outfileDirectory:c,preferAbsoluteFileImports:t.preferAbsoluteFileImports??!1,serdeOnlyFiles:o,stepFiles:r}),`export const __steps_registered = true;`,``].join(`
|
|
2
2
|
`);return await mkdir(c,{recursive:!0}),await readTextFileIfPresent(t.outfile)!==l&&await writeFile(t.outfile,l),s}function createEntrypointImportLines(e){return[e.builtinsImportSpecifier,...e.stepFiles.map(t=>createFileImportSpecifier({outfileDirectory:e.outfileDirectory,preferAbsoluteFileImports:e.preferAbsoluteFileImports,targetPath:t})),...e.serdeOnlyFiles.map(t=>createFileImportSpecifier({outfileDirectory:e.outfileDirectory,preferAbsoluteFileImports:e.preferAbsoluteFileImports,targetPath:t}))].map(e=>`import ${JSON.stringify(e)};`)}function createFileImportSpecifier(e){return e.preferAbsoluteFileImports?normalizeEsmImportSpecifier(e.targetPath):createRelativeImportSpecifier(e.outfileDirectory,e.targetPath)}async function collectNitroStepManifest(e){let t={},n=[...e.stepFiles,...e.serdeOnlyFiles];for(let i of n){let n=await readFile(i,`utf8`);mergeWorkflowManifest(t,(await applyWorkflowTransform(createManifestRelativeFilepath(e.workingDir,i),n,`step`,i,e.projectRoot)).workflowManifest)}return t}function mergeWorkflowManifest(e,t){e.steps=mergeWorkflowManifestSection(e.steps,t.steps),e.workflows=mergeWorkflowManifestSection(e.workflows,t.workflows),e.classes=mergeWorkflowManifestSection(e.classes,t.classes)}function mergeWorkflowManifestSection(e,t){if(t===void 0)return e;let n={...e};for(let[e,r]of Object.entries(t))n[e]={...n[e],...r};return n}function createManifestRelativeFilepath(e,n){let r=n.replaceAll(`\\`,`/`),i=relative(e.replaceAll(`\\`,`/`),r).replaceAll(`\\`,`/`);return i.startsWith(`../`)&&(i=i.split(`/`).filter(e=>e!==`..`).join(`/`)),i}function createRelativeImportSpecifier(e,n){let r=relative(e,n).replaceAll(`\\`,`/`);return r.startsWith(`.`)?r:`./${r}`}async function readTextFileIfPresent(e){try{return await readFile(e,`utf8`)}catch(e){if(e instanceof Error&&`code`in e&&e.code===`ENOENT`)return null;throw e}}export{writeNitroStepEntrypoint};
|
|
@@ -27,18 +27,18 @@ export declare function copyNitroFunctionDirectory(input: {
|
|
|
27
27
|
targetPath: string;
|
|
28
28
|
}): Promise<void>;
|
|
29
29
|
/**
|
|
30
|
-
* Keeps only
|
|
31
|
-
* symlinks to a shared
|
|
30
|
+
* Keeps only eve-owned Vercel function output and rewrites eve route function
|
|
31
|
+
* symlinks to a shared eve-owned server function.
|
|
32
32
|
*
|
|
33
33
|
* Nitro emits generic app routes such as `index.func -> ./__server.func` for
|
|
34
|
-
*
|
|
34
|
+
* eve's standalone landing page. In a multi-service Next.js deployment those
|
|
35
35
|
* root aliases collide with Next's own functions. The Next integration only
|
|
36
|
-
* proxies
|
|
37
|
-
* those route functions and workflow trigger functions, not
|
|
36
|
+
* proxies eve's `/eve/v1/**` transport routes, so Vercel output should expose
|
|
37
|
+
* those route functions and workflow trigger functions, not eve's root page.
|
|
38
38
|
*
|
|
39
39
|
* Nitro also dedupes every route function through `__server.func`. Preserve
|
|
40
|
-
* that model by copying the shared target once into the
|
|
41
|
-
* repointing
|
|
40
|
+
* that model by copying the shared target once into the eve-owned tree and
|
|
41
|
+
* repointing eve route aliases at it before pruning the root target.
|
|
42
42
|
*/
|
|
43
43
|
export declare function normalizeEveVercelFunctionOutput(outputDir: string, options?: {
|
|
44
44
|
readonly servicePrefix?: string;
|
|
@@ -50,18 +50,18 @@ export declare function getStepMetadata(): never;
|
|
|
50
50
|
* Options accepted by {@link experimental_setAttributes}.
|
|
51
51
|
*
|
|
52
52
|
* Mirrors `ExperimentalSetAttributesOptions` from `@workflow/core` so the
|
|
53
|
-
*
|
|
53
|
+
* eve workflow-body bundle does not have to pull the real type in.
|
|
54
54
|
*/
|
|
55
55
|
export interface ExperimentalSetAttributesOptions {
|
|
56
56
|
/**
|
|
57
|
-
* Permit attribute keys that start with the reserved `$` prefix.
|
|
57
|
+
* Permit attribute keys that start with the reserved `$` prefix. eve
|
|
58
58
|
* framework code passes `true` so it can write the `$eve.*` namespace;
|
|
59
59
|
* authored agent code never calls this shim directly.
|
|
60
60
|
*/
|
|
61
61
|
allowReservedAttributes?: boolean;
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Workflow-body implementation of `experimental_setAttributes` for the
|
|
64
|
+
* Workflow-body implementation of `experimental_setAttributes` for the eve
|
|
65
65
|
* bundle. Mirrors the dispatch path of `@workflow/core`'s workflow-body
|
|
66
66
|
* export (`dist/workflow/set-attributes.js`):
|
|
67
67
|
*
|
|
@@ -69,7 +69,7 @@ export interface ExperimentalSetAttributesOptions {
|
|
|
69
69
|
* runtime expects (`undefined` -> `null` to clear a key).
|
|
70
70
|
* 2. Resolve the workflow runtime's step dispatcher from
|
|
71
71
|
* `globalThis[Symbol.for("WORKFLOW_USE_STEP")]` (the same global symbol
|
|
72
|
-
*
|
|
72
|
+
* eve already relies on to materialize `"use step"` proxies).
|
|
73
73
|
* 3. Invoke the builtin `__builtin_set_attributes` step with the changes,
|
|
74
74
|
* which the runtime records on the active workflow run.
|
|
75
75
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const WORKFLOW_CONTEXT_SYMBOL=Symbol.for(`WORKFLOW_CONTEXT`),WORKFLOW_CREATE_HOOK=Symbol.for(`WORKFLOW_CREATE_HOOK`),WORKFLOW_GET_STREAM_ID=Symbol.for(`WORKFLOW_GET_STREAM_ID`),WORKFLOW_USE_STEP=Symbol.for(`WORKFLOW_USE_STEP`),STREAM_NAME_SYMBOL=Symbol.for(`WORKFLOW_STREAM_NAME`),workflowGlobal=globalThis;var RetryableError=class extends Error{},FatalError=class extends Error{};function createHook(e){let n=workflowGlobal[WORKFLOW_CREATE_HOOK];if(n===void 0)throw Error("`createHook()` can only be called inside a workflow function");return n(e)}function getWorkflowMetadata(){let t=workflowGlobal[WORKFLOW_CONTEXT_SYMBOL];if(t===void 0)throw Error("`getWorkflowMetadata()` can only be called inside a workflow or step function");return t}function getWritable(e={}){let t=workflowGlobal[WORKFLOW_GET_STREAM_ID];if(t===void 0)throw Error("`getWritable()` can only be called inside a workflow function");let r=t(e.namespace);return Object.create(globalThis.WritableStream.prototype,{[STREAM_NAME_SYMBOL]:{value:r,writable:!1}})}function createWebhook(e){let t=createHook(e),n=getWorkflowMetadata();return t.url=`${typeof n.url==`string`?n.url:``}/.well-known/workflow/v1/webhook/${encodeURIComponent(t.token)}`,t}function defineHook(){return{create:createHook,resume(){throw Error("`defineHook().resume()` can only be called from external contexts.")}}}function sleep(){throw Error("`sleep()` is not available in
|
|
1
|
+
const WORKFLOW_CONTEXT_SYMBOL=Symbol.for(`WORKFLOW_CONTEXT`),WORKFLOW_CREATE_HOOK=Symbol.for(`WORKFLOW_CREATE_HOOK`),WORKFLOW_GET_STREAM_ID=Symbol.for(`WORKFLOW_GET_STREAM_ID`),WORKFLOW_USE_STEP=Symbol.for(`WORKFLOW_USE_STEP`),STREAM_NAME_SYMBOL=Symbol.for(`WORKFLOW_STREAM_NAME`),workflowGlobal=globalThis;var RetryableError=class extends Error{},FatalError=class extends Error{};function createHook(e){let n=workflowGlobal[WORKFLOW_CREATE_HOOK];if(n===void 0)throw Error("`createHook()` can only be called inside a workflow function");return n(e)}function getWorkflowMetadata(){let t=workflowGlobal[WORKFLOW_CONTEXT_SYMBOL];if(t===void 0)throw Error("`getWorkflowMetadata()` can only be called inside a workflow or step function");return t}function getWritable(e={}){let t=workflowGlobal[WORKFLOW_GET_STREAM_ID];if(t===void 0)throw Error("`getWritable()` can only be called inside a workflow function");let r=t(e.namespace);return Object.create(globalThis.WritableStream.prototype,{[STREAM_NAME_SYMBOL]:{value:r,writable:!1}})}function createWebhook(e){let t=createHook(e),n=getWorkflowMetadata();return t.url=`${typeof n.url==`string`?n.url:``}/.well-known/workflow/v1/webhook/${encodeURIComponent(t.token)}`,t}function defineHook(){return{create:createHook,resume(){throw Error("`defineHook().resume()` can only be called from external contexts.")}}}function sleep(){throw Error("`sleep()` is not available in eve workflow body bundles")}function resumeHook(){throw Error("`resumeHook()` can only be called from outside a workflow function")}function getStepMetadata(){throw Error("`getStepMetadata()` can only be called inside a step function")}async function experimental_setAttributes(e,t={}){let n=Object.entries(e);if(n.length===0)return;let i=workflowGlobal[WORKFLOW_USE_STEP];if(i===void 0)throw Error("`experimental_setAttributes()` can only be called inside a workflow runtime context");let a=n.map(([e,t])=>({key:e,value:t===void 0?null:t})),o=t.allowReservedAttributes===!0?{allowReservedAttributes:!0}:{};await i(`__builtin_set_attributes`)(a,o)}export{FatalError,RetryableError,createHook,createWebhook,defineHook,experimental_setAttributes,getStepMetadata,getWorkflowMetadata,getWritable,resumeHook,sleep};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function connectionProtocols(e){return[e.mcp?`mcp`:null,e.openapi?`openapi`:null].filter(e=>e!==null)}const INTEGRATIONS=[{slug:`slack`,name:`Slack`,kind:`channel`,tagline:`Mention your agent in channels and DMs, with Connect-managed auth.`,surfaces:{scaffoldable:!0,gallery:!0}},{slug:`discord`,name:`Discord`,kind:`channel`,tagline:`Run your agent as a Discord bot across servers and threads.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`teams`,name:`Microsoft Teams`,kind:`channel`,tagline:`Bring your agent into Teams chats and channels.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`telegram`,name:`Telegram`,kind:`channel`,tagline:`Connect your agent to a Telegram bot for 1:1 and group chats.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`twilio`,name:`Twilio`,kind:`channel`,tagline:`Reach users over SMS and WhatsApp through Twilio.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`github`,name:`GitHub`,kind:`channel`,tagline:`Drive your agent from issues, pull requests, and comments.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`linear-agent`,name:`Linear Agent`,kind:`channel`,tagline:`Delegate Linear issues and comments to your agent through Linear's Agent Sessions.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`eve`,name:`
|
|
1
|
+
function connectionProtocols(e){return[e.mcp?`mcp`:null,e.openapi?`openapi`:null].filter(e=>e!==null)}const INTEGRATIONS=[{slug:`slack`,name:`Slack`,kind:`channel`,tagline:`Mention your agent in channels and DMs, with Connect-managed auth.`,surfaces:{scaffoldable:!0,gallery:!0}},{slug:`discord`,name:`Discord`,kind:`channel`,tagline:`Run your agent as a Discord bot across servers and threads.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`teams`,name:`Microsoft Teams`,kind:`channel`,tagline:`Bring your agent into Teams chats and channels.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`telegram`,name:`Telegram`,kind:`channel`,tagline:`Connect your agent to a Telegram bot for 1:1 and group chats.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`twilio`,name:`Twilio`,kind:`channel`,tagline:`Reach users over SMS and WhatsApp through Twilio.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`github`,name:`GitHub`,kind:`channel`,tagline:`Drive your agent from issues, pull requests, and comments.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`linear-agent`,name:`Linear Agent`,kind:`channel`,tagline:`Delegate Linear issues and comments to your agent through Linear's Agent Sessions.`,surfaces:{scaffoldable:!1,gallery:!0}},{slug:`eve`,name:`eve Web Chat`,kind:`channel`,tagline:`Embed a first-party web chat UI backed by your agent.`,surfaces:{scaffoldable:!0,gallery:!0}},{slug:`linear`,name:`Linear`,kind:`connection`,tagline:`Issues, projects, cycles, and comments via Linear's MCP server.`,surfaces:{scaffoldable:!0,gallery:!0},connection:{description:`Linear workspace: issues, projects, cycles, and comments.`,mcp:{url:`https://mcp.linear.app/sse`}}},{slug:`notion`,name:`Notion`,kind:`connection`,tagline:`Search and edit Notion pages and databases over MCP or OpenAPI.`,surfaces:{scaffoldable:!0,gallery:!0},connection:{description:`Notion workspace: search and edit pages and databases.`,mcp:{url:`https://mcp.notion.com/mcp`},openapi:{spec:`https://developers.notion.com/openapi.json`,baseUrl:`https://api.notion.com`,headers:{"Notion-Version":`2022-06-28`}}}},{slug:`datadog`,name:`Datadog`,kind:`connection`,tagline:`Query metrics, monitors, and logs through Datadog's MCP server.`,surfaces:{scaffoldable:!0,gallery:!0},connection:{description:`Datadog: query metrics, monitors, logs, and incidents.`,mcp:{url:`https://mcp.datadoghq.com/api/mcp`}}},{slug:`honeycomb`,name:`Honeycomb`,kind:`connection`,tagline:`Explore traces and run queries through Honeycomb's MCP server.`,surfaces:{scaffoldable:!0,gallery:!0},connection:{description:`Honeycomb: explore traces, run queries, and inspect datasets.`,mcp:{url:`https://mcp.honeycomb.io/mcp`}}}];new Map(INTEGRATIONS.map(e=>[e.slug,e]));function integrationsByKind(t){return INTEGRATIONS.filter(e=>e.kind===t)}function connectionEntries(){return integrationsByKind(`connection`)}function channelEntries(){return integrationsByKind(`channel`)}export{channelEntries,connectionEntries,connectionProtocols};
|
|
@@ -10,7 +10,7 @@ export declare const EVE_MESSAGE_STREAM_CONTENT_TYPE = "application/x-ndjson; ch
|
|
|
10
10
|
export declare const EVE_MESSAGE_STREAM_FORMAT = "ndjson";
|
|
11
11
|
export declare const EVE_MESSAGE_STREAM_VERSION = "16";
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* eve-owned finish reason for one completed assistant step.
|
|
14
14
|
*
|
|
15
15
|
* `tool-calls` is the only non-terminal assistant step in the current
|
|
16
16
|
* tool-loop harness. All other values indicate the assistant step ended the
|
|
@@ -59,7 +59,7 @@ export interface SubagentSessionInvocationMetadata {
|
|
|
59
59
|
* Runtime identity metadata attached to the `session.started` event.
|
|
60
60
|
*
|
|
61
61
|
* The server populates this at run time so remote eval processes and
|
|
62
|
-
* reporters receive authoritative metadata about the
|
|
62
|
+
* reporters receive authoritative metadata about the eve instance
|
|
63
63
|
* serving the run.
|
|
64
64
|
*/
|
|
65
65
|
export interface RuntimeIdentity {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Stable framework-owned route prefix reserved for
|
|
2
|
+
* Stable framework-owned route prefix reserved for eve's runtime transport
|
|
3
3
|
* surfaces.
|
|
4
4
|
*/
|
|
5
5
|
export declare const EVE_ROUTE_PREFIX = "/eve/v1";
|
|
@@ -10,7 +10,7 @@ export declare const EVE_HEALTH_ROUTE_PATH = "/eve/v1/health";
|
|
|
10
10
|
/**
|
|
11
11
|
* Stable framework-owned route exposing the JSON inspection payload for
|
|
12
12
|
* the current agent. Nitro registers this route with the application
|
|
13
|
-
* surface, and the handler uses the same default auth chain as the
|
|
13
|
+
* surface, and the handler uses the same default auth chain as the eve
|
|
14
14
|
* channel: local development accepts loopback requests, while deployed
|
|
15
15
|
* Vercel targets require OIDC.
|
|
16
16
|
*/
|
|
@@ -71,7 +71,7 @@ export declare function createEveDevDispatchSchedulePath(scheduleId: string): st
|
|
|
71
71
|
* via `resumeHook(token, payload)`.
|
|
72
72
|
*
|
|
73
73
|
* The route is unauthenticated by design: an OAuth IdP follows this URL
|
|
74
|
-
* via a 3xx redirect from the user's browser with no
|
|
74
|
+
* via a 3xx redirect from the user's browser with no eve credentials
|
|
75
75
|
* attached. The token is the unguessable capability that authorizes the
|
|
76
76
|
* resume; anyone who has it can deliver the callback payload, which is
|
|
77
77
|
* exactly what the IdP needs to do.
|
|
@@ -9,7 +9,7 @@ export type OutboundAuthFn = () => Promise<{
|
|
|
9
9
|
readonly headers: Readonly<Record<string, string>>;
|
|
10
10
|
}>;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* eve-owned mirror of the `@vercel/oidc` token lookup options forwarded to
|
|
13
13
|
* {@link vercelOidc}.
|
|
14
14
|
*/
|
|
15
15
|
export interface VercelOidcOptions {
|
|
@@ -321,7 +321,7 @@ export interface VerifyVercelOidcOptions {
|
|
|
321
321
|
* - Tokens with an `external_sub` claim authenticate as
|
|
322
322
|
* `principalType: "user"` when they match the current `VERCEL_PROJECT_ID`
|
|
323
323
|
* (if set) and `VERCEL_TARGET_ENV` / `VERCEL_ENV` (if set). `external_sub`
|
|
324
|
-
* becomes the
|
|
324
|
+
* becomes the eve subject, `external_iss` or `connector_id` the eve issuer
|
|
325
325
|
* when present, and string-valued OIDC profile claims (`name`, `picture`,
|
|
326
326
|
* `email`) are exposed as auth attributes.
|
|
327
327
|
* - Tokens from other Vercel projects are accepted **only** when their `sub`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Minimal Discord REST API wrapper. The channel talks directly to Discord's
|
|
3
|
-
* JSON HTTP API rather than exposing a third-party SDK through
|
|
3
|
+
* JSON HTTP API rather than exposing a third-party SDK through eve.
|
|
4
4
|
*/
|
|
5
5
|
import { type JsonObject } from "#shared/json.js";
|
|
6
6
|
import { resolveDiscordPublicKey, type DiscordPublicKey } from "#public/channels/discord/verify.js";
|
|
@@ -88,7 +88,7 @@ export declare function createDiscordFollowupMessage(input: DiscordApiOptions &
|
|
|
88
88
|
readonly interactionToken: string;
|
|
89
89
|
}): Promise<DiscordPostedMessage>;
|
|
90
90
|
/**
|
|
91
|
-
* JSON body for the Discord message endpoints
|
|
91
|
+
* JSON body for the Discord message endpoints eve calls. When
|
|
92
92
|
* `allowed_mentions` is omitted, channel write helpers default it to
|
|
93
93
|
* {@link DISCORD_NO_MENTIONS} (no pings); set it explicitly to allow mentions.
|
|
94
94
|
*/
|
|
@@ -43,7 +43,7 @@ export interface DiscordChannelState {
|
|
|
43
43
|
}
|
|
44
44
|
/** Discord channel credentials. */
|
|
45
45
|
export interface DiscordChannelCredentials extends DiscordCredentials {
|
|
46
|
-
/** Custom inbound webhook verifier. When supplied,
|
|
46
|
+
/** Custom inbound webhook verifier. When supplied, eve skips the `DISCORD_PUBLIC_KEY` fallback and delegates verification to it. */
|
|
47
47
|
readonly webhookVerifier?: DiscordWebhookVerifier;
|
|
48
48
|
}
|
|
49
49
|
/** Target accepted by `receive(discord, { target })` for proactive sessions. */
|
|
@@ -100,7 +100,7 @@ export interface DiscordHandle {
|
|
|
100
100
|
readonly applicationId: string | undefined;
|
|
101
101
|
/** Discord channel id. */
|
|
102
102
|
readonly channelId: string;
|
|
103
|
-
/** Current
|
|
103
|
+
/** Current eve conversation id, usually the Discord anchor message id. */
|
|
104
104
|
readonly conversationId: string;
|
|
105
105
|
/** Discord guild id when known. */
|
|
106
106
|
readonly guildId: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Discord HITL component rendering + decode helpers.
|
|
3
3
|
*
|
|
4
|
-
* Discord components carry a `custom_id` with a 100-character cap.
|
|
4
|
+
* Discord components carry a `custom_id` with a 100-character cap. eve
|
|
5
5
|
* encodes only the request id and, for buttons, the selected option id.
|
|
6
6
|
*/
|
|
7
7
|
import { type DiscordComponentInteraction, type DiscordModalSubmitInteraction } from "#public/channels/discord/inbound.js";
|
|
@@ -34,13 +34,13 @@ export declare function buildFreeformModalResponse(input: {
|
|
|
34
34
|
/** Returns true when a component custom id starts the freeform modal flow. */
|
|
35
35
|
export declare function isDiscordFreeformComponent(customId: string): boolean;
|
|
36
36
|
/**
|
|
37
|
-
* Decodes an
|
|
38
|
-
* if the custom id is not an
|
|
37
|
+
* Decodes an eve HITL component interaction into input responses. Empty array
|
|
38
|
+
* if the custom id is not an eve HITL id; otherwise one response from the
|
|
39
39
|
* encoded option id (buttons) or the first selected value (selects).
|
|
40
40
|
*/
|
|
41
41
|
export declare function deriveComponentInputResponses(interaction: DiscordComponentInteraction): readonly InputResponse[];
|
|
42
42
|
/**
|
|
43
|
-
* Decodes an
|
|
43
|
+
* Decodes an eve freeform modal submission into a single text input response.
|
|
44
44
|
* Empty array unless the custom id matches the freeform prefix and the freeform
|
|
45
45
|
* text field is present.
|
|
46
46
|
*/
|
|
@@ -10,7 +10,7 @@ export type DiscordPublicKey = string | (() => string | Promise<string>);
|
|
|
10
10
|
/**
|
|
11
11
|
* Caller-supplied inbound webhook verifier. Replaces Ed25519 verification
|
|
12
12
|
* when an integration authenticates forwarded webhooks before they reach
|
|
13
|
-
*
|
|
13
|
+
* eve. Receives the request and raw body.
|
|
14
14
|
*
|
|
15
15
|
* Return a falsy value to reject the request. Return a string to accept it
|
|
16
16
|
* and use that string as the (possibly rewritten) body. Return any other
|