eve 0.24.1 → 0.24.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 +19 -0
- package/dist/src/cli/dev/environment.d.ts +6 -0
- package/dist/src/cli/dev/environment.js +1 -1
- package/dist/src/cli/run.js +2 -2
- package/dist/src/cli/vercel-service-output.d.ts +4 -0
- package/dist/src/cli/vercel-service-output.js +1 -0
- package/dist/src/compiled/.vendor-stamp.json +2 -1
- package/dist/src/compiled/@chat-adapter/slack/index.js +12 -12
- package/dist/src/compiled/@chat-adapter/twilio/index.js +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.js +19 -19
- package/dist/src/compiled/@workflow/world-local/index.d.ts +14 -0
- package/dist/src/compiled/_chunks/node/{auth-CWHn3Yve.js → auth-BuQkq4Gr.js} +2 -2
- package/dist/src/compiled/_chunks/node/{dist-BdTs18CF.js → chunk-BTyA9uPd.js} +1 -1
- package/dist/src/compiled/_chunks/node/{dist-W8yle6rh.js → dist-CdH_Yoxt.js} +5 -5
- package/dist/src/compiled/_chunks/node/{dist-RHRJZ03Q.js → dist-Drt-_JVK.js} +1 -1
- package/dist/src/compiled/_chunks/node/dist-DsNhwdzf.js +1 -0
- package/dist/src/compiled/_chunks/node/retry-DngYleaI.js +1 -0
- package/dist/src/compiled/_chunks/node/token-DabMnh8F.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-BoSJPKrG.js +1 -0
- package/dist/src/compiled/_chunks/node/token-util-DVigMYWS.js +1 -0
- package/dist/src/compiled/_chunks/node/virtual-loader-B8K8w9cr.js +1 -0
- package/dist/src/compiled/chat/index.js +1 -1
- package/dist/src/compiled/env-runner/LICENSE +21 -0
- package/dist/src/compiled/env-runner/index.d.ts +38 -0
- package/dist/src/compiled/env-runner/index.js +1 -0
- package/dist/src/compiled/env-runner/node-worker.d.ts +1 -0
- package/dist/src/compiled/env-runner/node-worker.js +12 -0
- package/dist/src/compiler/compile-agent.d.ts +4 -6
- package/dist/src/compiler/compile-agent.js +1 -1
- package/dist/src/execution/create-session-step.d.ts +2 -2
- package/dist/src/execution/create-session-step.js +1 -1
- package/dist/src/execution/workflow-runtime.js +1 -1
- package/dist/src/harness/compaction-prompt.d.ts +16 -0
- package/dist/src/harness/compaction-prompt.js +24 -0
- package/dist/src/harness/compaction.d.ts +2 -1
- package/dist/src/harness/compaction.js +1 -4
- package/dist/src/harness/input-requests.d.ts +1 -0
- package/dist/src/harness/input-requests.js +1 -1
- package/dist/src/harness/tool-loop.js +1 -1
- package/dist/src/internal/application/build-workspace.d.ts +1 -1
- package/dist/src/internal/application/build-workspace.js +1 -1
- package/dist/src/internal/application/compiled-artifacts.d.ts +13 -0
- package/dist/src/internal/application/compiled-artifacts.js +3 -2
- package/dist/src/internal/application/dev-environment.d.ts +4 -0
- package/dist/src/internal/application/dev-environment.js +1 -0
- package/dist/src/internal/application/optional-package-install.d.ts +2 -10
- package/dist/src/internal/application/optional-package-install.js +1 -1
- package/dist/src/internal/application/output-publication-lock.js +1 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/application/paths.d.ts +2 -0
- package/dist/src/internal/application/paths.js +1 -1
- package/dist/src/internal/application/tsconfig-dependencies.js +1 -1
- package/dist/src/internal/authored-module-loader.d.ts +3 -9
- package/dist/src/internal/authored-module-loader.js +2 -2
- package/dist/src/internal/authored-package-boundary.d.ts +0 -2
- package/dist/src/internal/authored-package-boundary.js +1 -1
- package/dist/src/internal/authored-package-tsconfig-paths.js +1 -1
- package/dist/src/internal/compiled-manifest-fingerprint.d.ts +5 -0
- package/dist/src/internal/compiled-manifest-fingerprint.js +1 -0
- package/dist/src/internal/materialized-authored-modules.d.ts +0 -3
- package/dist/src/internal/materialized-authored-modules.js +1 -1
- package/dist/src/internal/nitro/dev-client-address.d.ts +22 -0
- package/dist/src/internal/nitro/dev-client-address.js +1 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.d.ts +12 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts-retention.js +1 -0
- package/dist/src/internal/nitro/dev-runtime-artifacts.d.ts +19 -1
- package/dist/src/internal/nitro/dev-runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/development-generation.d.ts +5 -1
- package/dist/src/internal/nitro/development-generation.js +1 -1
- package/dist/src/internal/nitro/host/artifacts-config.d.ts +2 -0
- package/dist/src/internal/nitro/host/artifacts-config.js +1 -1
- package/dist/src/internal/nitro/host/build-application.js +1 -1
- package/dist/src/internal/nitro/host/channel-routes.d.ts +1 -13
- package/dist/src/internal/nitro/host/channel-routes.js +3 -3
- package/dist/src/internal/nitro/host/configure-nitro-routes.d.ts +1 -2
- package/dist/src/internal/nitro/host/configure-nitro-routes.js +2 -2
- package/dist/src/internal/nitro/host/copy-host-middleware.d.ts +12 -0
- package/dist/src/internal/nitro/host/copy-host-middleware.js +1 -0
- package/dist/src/internal/nitro/host/create-application-nitro.d.ts +3 -5
- package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.d.ts +32 -0
- package/dist/src/internal/nitro/host/dev-authored-rebuild-coordinator.js +1 -0
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.d.ts +4 -15
- package/dist/src/internal/nitro/host/dev-authored-source-watcher.js +1 -1
- package/dist/src/internal/nitro/host/dev-host-candidate.d.ts +16 -0
- package/dist/src/internal/nitro/host/dev-host-candidate.js +1 -0
- package/dist/src/internal/nitro/host/dev-host-fingerprint.d.ts +2 -0
- package/dist/src/internal/nitro/host/dev-host-fingerprint.js +1 -0
- package/dist/src/internal/nitro/host/dev-host-workspace.d.ts +10 -0
- package/dist/src/internal/nitro/host/dev-host-workspace.js +1 -0
- package/dist/src/internal/nitro/host/dev-runner.d.ts +21 -0
- package/dist/src/internal/nitro/host/dev-runner.js +1 -0
- package/dist/src/internal/nitro/host/dev-server-http.d.ts +5 -0
- package/dist/src/internal/nitro/host/dev-server-http.js +1 -0
- package/dist/src/internal/nitro/host/dev-server-url.d.ts +6 -0
- package/dist/src/internal/nitro/host/dev-server-url.js +1 -0
- package/dist/src/internal/nitro/host/dev-workflow-world-setup.d.ts +9 -0
- package/dist/src/internal/nitro/host/dev-workflow-world-setup.js +1 -0
- package/dist/src/internal/nitro/host/dispatch-schedule-in-dev.js +1 -1
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.d.ts +53 -0
- package/dist/src/internal/nitro/host/drained-nitro-dev-server.js +1 -0
- package/dist/src/internal/nitro/host/prepare-application-host.d.ts +4 -5
- package/dist/src/internal/nitro/host/prepare-application-host.js +1 -1
- package/dist/src/internal/nitro/host/start-development-server.d.ts +2 -5
- package/dist/src/internal/nitro/host/start-development-server.js +2 -2
- package/dist/src/internal/nitro/host/types.d.ts +10 -0
- package/dist/src/internal/nitro/routes/channel-dispatch.js +1 -1
- package/dist/src/internal/nitro/routes/runtime-artifacts.d.ts +7 -0
- package/dist/src/internal/nitro/routes/runtime-artifacts.js +1 -1
- package/dist/src/internal/nitro/routes/schedule-task.d.ts +9 -0
- package/dist/src/internal/nitro/routes/schedule-task.js +1 -1
- package/dist/src/internal/workflow/development-generation-context.d.ts +8 -0
- package/dist/src/internal/workflow/development-generation-context.js +1 -0
- package/dist/src/internal/workflow/development-world-client.d.ts +29 -0
- package/dist/src/internal/workflow/development-world-client.js +1 -0
- package/dist/src/internal/workflow/development-world-codec.d.ts +11 -0
- package/dist/src/internal/workflow/development-world-codec.js +1 -0
- package/dist/src/internal/workflow/development-world-protocol.d.ts +31 -0
- package/dist/src/internal/workflow/development-world-protocol.js +1 -0
- package/dist/src/internal/workflow/development-world-server.d.ts +27 -0
- package/dist/src/internal/workflow/development-world-server.js +1 -0
- package/dist/src/public/next/vercel-output-config.js +1 -1
- package/dist/src/runtime/compiled-artifacts-source.d.ts +9 -0
- package/dist/src/runtime/compiled-artifacts-source.js +1 -1
- package/dist/src/runtime/durable-compiled-artifacts-source.d.ts +8 -0
- package/dist/src/runtime/durable-compiled-artifacts-source.js +1 -0
- package/dist/src/runtime/sessions/runtime-context-keys.js +1 -1
- package/dist/src/setup/scaffold/create/project.js +1 -1
- package/dist/src/shared/atomic-write-file.d.ts +1 -1
- package/dist/src/shared/atomic-write-file.js +1 -1
- package/dist/src/shared/rename-with-retry.d.ts +5 -0
- package/dist/src/shared/rename-with-retry.js +1 -0
- package/docs/agent-config.md +3 -1
- package/docs/concepts/default-harness.md +1 -1
- package/docs/concepts/execution-model-and-durability.md +1 -1
- package/docs/reference/cli.md +1 -1
- package/package.json +2 -1
- package/dist/src/compiled/_chunks/node/retry-DkR2H1Y0.js +0 -1
- package/dist/src/compiled/_chunks/node/token-ORseRyWn.js +0 -1
- package/dist/src/internal/bundler/nitro-node-file-trace.d.ts +0 -10
- package/dist/src/internal/bundler/nitro-node-file-trace.js +0 -1
- package/dist/src/internal/materialize-authored-external-dependencies.d.ts +0 -10
- package/dist/src/internal/materialize-authored-external-dependencies.js +0 -2
- package/dist/src/internal/nitro/host/dev-live-virtual-modules.d.ts +0 -15
- package/dist/src/internal/nitro/host/dev-live-virtual-modules.js +0 -1
- package/dist/src/internal/nitro/host/server-external-packages.d.ts +0 -5
- package/dist/src/internal/nitro/host/server-external-packages.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function createBundledRuntimeCompiledArtifactsSource(){return{kind:`bundled`}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0?{appRoot:e,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot}:{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(){return{kind:`bundled`}}function createDiskRuntimeCompiledArtifactsSource(e,t={}){return t.moduleMapLoaderPath!==void 0||t.sandboxAppRoot!==void 0||t.durableReference!==void 0?{appRoot:e,durableReference:t.durableReference,kind:`disk`,moduleMapLoaderPath:t.moduleMapLoaderPath,sandboxAppRoot:t.sandboxAppRoot}:{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};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RuntimeCompiledArtifactsSource } from "#runtime/compiled-artifacts-source.js";
|
|
2
|
+
interface DevelopmentCompiledArtifactsSelector {
|
|
3
|
+
readonly kind: "development";
|
|
4
|
+
}
|
|
5
|
+
export type DurableCompiledArtifactsSource = RuntimeCompiledArtifactsSource | DevelopmentCompiledArtifactsSelector;
|
|
6
|
+
export declare function serializeDurableCompiledArtifactsSource(source: RuntimeCompiledArtifactsSource): DurableCompiledArtifactsSource;
|
|
7
|
+
export declare function resolveDurableCompiledArtifactsSource(source: DurableCompiledArtifactsSource): RuntimeCompiledArtifactsSource;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getDevelopmentWorkflowGeneration}from"#internal/workflow/development-generation-context.js";function serializeDurableCompiledArtifactsSource(e){return e.kind===`disk`&&e.durableReference===`development-generation`?{kind:`development`}:e}function resolveDurableCompiledArtifactsSource(t){if(t.kind!==`development`)return t;let n=getDevelopmentWorkflowGeneration();if(n===void 0)throw Error(`A development Workflow generation selector was resumed outside a generation-bound delivery.`);return n.source}export{resolveDurableCompiledArtifactsSource,serializeDurableCompiledArtifactsSource};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAdapterKind}from"#channel/adapter.js";import{ContextKey}from"#context/key.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{deserializeRuntimeAdapter}from"#runtime/channels/registry.js";const ChannelKey=new ContextKey(`eve.channel`,{codec:{serialize(t){return{kind:getAdapterKind(t),state:t.state?{...t.state}:{}}},deserialize(e,t){let n=t.get(BundleKey);if(n===void 0)throw Error(`Cannot deserialize "eve.channel" before "eve.bundle". The runtime bundle must be present in context.`);return deserializeRuntimeAdapter(n.adapterRegistry,e)}}}),BundleKey=new ContextKey(`eve.bundle`,{codec:{serialize:e=>({nodeId:e.nodeId,source:e.compiledArtifactsSource}),deserialize:e=>{let{source:t,nodeId:r}=e;return getCompiledRuntimeAgentBundle({compiledArtifactsSource:t,nodeId:r})}}});export{BundleKey,ChannelKey};
|
|
1
|
+
import{getAdapterKind}from"#channel/adapter.js";import{ContextKey}from"#context/key.js";import{getCompiledRuntimeAgentBundle}from"#runtime/sessions/compiled-agent-cache.js";import{resolveDurableCompiledArtifactsSource,serializeDurableCompiledArtifactsSource}from"#runtime/durable-compiled-artifacts-source.js";import{deserializeRuntimeAdapter}from"#runtime/channels/registry.js";const ChannelKey=new ContextKey(`eve.channel`,{codec:{serialize(t){return{kind:getAdapterKind(t),state:t.state?{...t.state}:{}}},deserialize(e,t){let n=t.get(BundleKey);if(n===void 0)throw Error(`Cannot deserialize "eve.channel" before "eve.bundle". The runtime bundle must be present in context.`);return deserializeRuntimeAdapter(n.adapterRegistry,e)}}}),BundleKey=new ContextKey(`eve.bundle`,{codec:{serialize:e=>({nodeId:e.nodeId,source:serializeDurableCompiledArtifactsSource(e.compiledArtifactsSource)}),deserialize:e=>{let{source:t,nodeId:r}=e;return getCompiledRuntimeAgentBundle({compiledArtifactsSource:resolveDurableCompiledArtifactsSource(t),nodeId:r})}}});export{BundleKey,ChannelKey};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{pathExists,writeTextFile}from"../files.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{basename,join,resolve}from"node:path";import{mkdir,readdir,stat}from"node:fs/promises";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,ALLOWED_CREATE_IN_PLACE_ENTRIES=new Set([`.DS_Store`,`.git`,`.gitkeep`,`.hg`]),DEFAULT_AI_PACKAGE_VERSION=`^7.0.26`,DEFAULT_CONNECT_PACKAGE_VERSION=`0.2.2`,DEFAULT_ZOD_PACKAGE_VERSION=`4.4.3`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.24.
|
|
1
|
+
import{pinnedNodeEngineMajor}from"../../node-engine.js";import{pathExists,writeTextFile}from"../files.js";import{resolveVersionToken}from"../version-tokens.js";import{applyPackageManagerWorkspaceConfiguration,isPackageManagerWorkspaceMember,patchWorkspaceRootPackageJson}from"../workspace-root.js";import{SUPPORTED_AUTHORED_MODULE_FILE_EXTENSIONS}from"../update/module-files.js";import{WEB_APP_TEMPLATE_FILES}from"./web-template.js";import{basename,join,resolve}from"node:path";import{mkdir,readdir,stat}from"node:fs/promises";const CURRENT_DIRECTORY_PROJECT_NAME=`.`,ALLOWED_CREATE_IN_PLACE_ENTRIES=new Set([`.DS_Store`,`.git`,`.gitkeep`,`.hg`]),DEFAULT_AI_PACKAGE_VERSION=`^7.0.26`,DEFAULT_CONNECT_PACKAGE_VERSION=`0.2.2`,DEFAULT_ZOD_PACKAGE_VERSION=`4.4.3`,DEFAULT_EVE_PACKAGE_CONTRACT={version:`0.24.3`,nodeEngine:`>=24`};function resolveEvePackageContract(e=DEFAULT_EVE_PACKAGE_CONTRACT){return{version:resolveVersionToken(`evePackage.version`,e.version),nodeEngine:resolveVersionToken(`evePackage.nodeEngine`,e.nodeEngine)}}function modelProviderSlug(e){let t=(e.split(`/`)[0]??``).replaceAll(/[^A-Za-z0-9._-]/gu,``);return t.length>0?t:`anthropic`}function byokProviderEnvVar(e){let t=modelProviderSlug(e).toUpperCase().replaceAll(/[^A-Z0-9]/gu,`_`);return`${/^[0-9]/.test(t)?`_`:``}${t}_API_KEY`}function agentTemplateFiles(e){return{"agent/agent.ts":BASE_AGENT_TEMPLATE.replaceAll(`__EVE_INIT_MODEL__`,e),"agent/channels/eve.ts":WEB_APP_TEMPLATE_FILES[`agent/channels/eve.ts`],"agent/instructions.md":AGENT_INSTRUCTIONS_TEMPLATE}}function renderTemplate(e,t){return e.replaceAll(`__EVE_INIT_APP_NAME__`,t.appName).replaceAll(`__EVE_INIT_MODEL__`,t.model).replaceAll(`__EVE_INIT_BYOK_PROVIDER__`,modelProviderSlug(t.model)).replaceAll(`__EVE_INIT_BYOK_ENV_VAR__`,byokProviderEnvVar(t.model)).replaceAll(`__EVE_INIT_PACKAGE_VERSION__`,formatEveDependencySpecifier(t.eveVersion)).replaceAll(`__EVE_INIT_AI_SDK_VERSION__`,t.aiPackageVersion).replaceAll(`__EVE_INIT_CONNECT_VERSION__`,t.connectPackageVersion).replaceAll(`__EVE_INIT_ZOD_VERSION__`,t.zodPackageVersion).replaceAll(`__EVE_INIT_TYPESCRIPT_VERSION__`,t.typescriptPackageVersion).replaceAll(`__EVE_INIT_TYPES_NODE_VERSION__`,t.nodeTypesVersion).replaceAll(`__EVE_INIT_NODE_ENGINE__`,t.nodeEngine)}function formatEveDependencySpecifier(e){return/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z-.]+)?$/.test(e)?`^${e}`:e}const BASE_AGENT_TEMPLATE=`import { defineAgent } from "eve";
|
|
2
2
|
|
|
3
3
|
export default defineAgent({
|
|
4
4
|
model: "__EVE_INIT_MODEL__",
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Windows refuses to replace a file while another handle is open on it
|
|
8
8
|
* (concurrent readers, `utimes` heartbeats, antivirus scans), surfacing as
|
|
9
|
-
* `EPERM`/`EACCES`, so the replace is retried briefly before giving up.
|
|
9
|
+
* `EPERM`/`EACCES`/`EBUSY`, so the replace is retried briefly before giving up.
|
|
10
10
|
*/
|
|
11
11
|
export declare function atomicWriteFile(targetPath: string, contents: string | Buffer | Uint8Array): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{rm,writeFile}from"node:fs/promises";import{renameWithTransientBusyRetry}from"#shared/rename-with-retry.js";async function atomicWriteFile(t,n){let r=`${t}.tmp-${process.pid}-${Date.now().toString(36)}`;await writeFile(r,n);try{await renameWithTransientBusyRetry(r,t)}catch(e){throw await rm(r,{force:!0}).catch(()=>void 0),e}}export{atomicWriteFile};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renames a path atomically, retrying the transient busy-handle errors that
|
|
3
|
+
* Windows can report while another process briefly has either path open.
|
|
4
|
+
*/
|
|
5
|
+
export declare function renameWithTransientBusyRetry(sourcePath: string, destinationPath: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{rename}from"node:fs/promises";import{isErrnoCode}from"#shared/guards.js";const TRANSIENT_RENAME_RETRY_DELAYS_MS=[10,20,40,80,160,320,640];async function renameWithTransientBusyRetry(t,n){for(let r of TRANSIENT_RENAME_RETRY_DELAYS_MS)try{await rename(t,n);return}catch(e){if(!isTransientRenameError(e))throw e;await new Promise(e=>setTimeout(e,r))}await rename(t,n)}function isTransientRenameError(e){return isErrnoCode(e,`EPERM`)||isErrnoCode(e,`EACCES`)||isErrnoCode(e,`EBUSY`)}export{renameWithTransientBusyRetry};
|
package/docs/agent-config.md
CHANGED
|
@@ -106,7 +106,7 @@ which levels are available and how they map to provider-native settings. Use
|
|
|
106
106
|
|
|
107
107
|
## Compaction
|
|
108
108
|
|
|
109
|
-
Compaction summarizes older turns as you approach the context window. It's on by default, so you only tune when it kicks in. Lower `thresholdPercent` to compact sooner:
|
|
109
|
+
Compaction summarizes older turns as you approach the context window. It's on by default, so you only tune when it kicks in. eve adds the estimated fixed checkpoint-prompt envelope to the trigger count, so compaction starts sooner than the conversation-only estimate. Lower `thresholdPercent` to compact sooner:
|
|
110
110
|
|
|
111
111
|
```ts title="agent/agent.ts"
|
|
112
112
|
export default defineAgent({
|
|
@@ -214,6 +214,8 @@ installed package must stay external in hosted output, list it in
|
|
|
214
214
|
|
|
215
215
|
`externalDependencies` is a packaging control only. It keeps selected packages as runtime dependencies in the hosted output; it does not authorize, configure, or review any third-party service those packages may call.
|
|
216
216
|
|
|
217
|
+
During `eve dev`, ordinary dependencies are bundled into each retained runtime generation. Packages listed in `externalDependencies` keep normal Node.js resolution instead, so replacing one of those packages requires restarting the dev server.
|
|
218
|
+
|
|
217
219
|
## Where adjacent settings live
|
|
218
220
|
|
|
219
221
|
| Concern | Lives in |
|
|
@@ -7,7 +7,7 @@ The default harness is eve's built-in agent loop. It manages model calls, compac
|
|
|
7
7
|
|
|
8
8
|
## Compaction
|
|
9
9
|
|
|
10
|
-
The harness keeps a long session from overflowing the model's context window.
|
|
10
|
+
The harness keeps a long session from overflowing the model's context window. Before comparing the conversation with `thresholdPercent` (`0.9` by default), it adds the estimated fixed envelope of the checkpoint prompt used for compaction. It then summarizes the older turns and keeps going. The prompt asks the compaction model to distinguish completed progress and decisions from remaining work and to retain the constraints, preferences, data, and references needed to continue. When eve compacts again, it passes the previous checkpoint separately and without the transcript's per-message truncation, then replaces it with the updated checkpoint. The summary uses the active turn model unless you override it. Tune when and how it kicks in under [`compaction`](../agent-config#compaction) in `agent.ts`:
|
|
11
11
|
|
|
12
12
|
```ts title="agent/agent.ts"
|
|
13
13
|
export default defineAgent({
|
|
@@ -15,7 +15,7 @@ Work nests in three levels:
|
|
|
15
15
|
|
|
16
16
|
Every turn runs as a durable workflow, built on the open-source [Workflow SDK](https://workflow-sdk.dev/) (Vercel Workflow when you deploy on Vercel). eve checkpoints progress and serializes durable state at each step boundary. Your code runs inside a managed step, so tools, the sandbox, and subagents feel synchronous even though the session underneath them is durable.
|
|
17
17
|
|
|
18
|
-
The Workflow SDK is not inherently tied to Vercel. In local development and in a self-deployed `eve start` process, eve uses the SDK's local world by default; that world persists workflow runs on disk
|
|
18
|
+
The Workflow SDK is not inherently tied to Vercel. In local development and in a self-deployed `eve start` process, eve uses the SDK's local world by default; that world persists workflow runs on disk under `.workflow-data` and dispatches through the same Nitro-hosted workflow routes. On Vercel, the same workflow code runs against Vercel Workflow instead, which adds platform features such as latest production deployment routing and dashboard run metadata.
|
|
19
19
|
|
|
20
20
|
When a Vercel production deployment changes, the next model turn in an existing session uses that deployment's current instructions, model, and tools. The durable session keeps its conversation history and authored state, so identity-based channels such as Telegram private chats and Twilio phone-number conversations adopt agent updates without requiring a new session.
|
|
21
21
|
|
package/docs/reference/cli.md
CHANGED
|
@@ -158,7 +158,7 @@ For bearer tokens or custom schemes, pass explicit headers with `-H`.
|
|
|
158
158
|
|
|
159
159
|
Local dev records the last ready URL per resolved app root in `.eve/dev-server-state.v1.json`. A second interactive `eve dev` reconnects only when that URL is loopback and healthy; each terminal UI creates a fresh client session while sharing the server process. A stale or malformed record is replaced when eve starts a new server. Passing `--host`, `--port`, or a `PORT` environment value skips reconnection and reports a healthy recorded server instead.
|
|
160
160
|
|
|
161
|
-
Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight
|
|
161
|
+
Local dev keeps immutable runtime source snapshots under `.eve/dev-runtime/snapshots/` so in-flight turns hold a consistent code revision while new turns pick up rebuilds. After a generation is superseded, `eve dev` retains it for at least 30 minutes and also retains the five most recently superseded generations, regardless of the configured Workflow World. The active generation is never pruned. Old runtime snapshots and local sandbox templates are pruned in the background. For manual cleanup, stop `eve dev` before deleting `.eve/dev-runtime/snapshots/` or `.eve/sandbox-cache/local/templates/`. A turn that remains unfinished beyond the automatic retention window can no longer resume after its generation is pruned.
|
|
162
162
|
|
|
163
163
|
## `eve link`
|
|
164
164
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eve",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Filesystem-first framework for durable backend AI agents that run anywhere.",
|
|
6
6
|
"keywords": [
|
|
@@ -316,6 +316,7 @@
|
|
|
316
316
|
"chokidar": "5.0.0",
|
|
317
317
|
"commander": "14.0.3",
|
|
318
318
|
"emulate": "0.6.0",
|
|
319
|
+
"env-runner": "0.1.12",
|
|
319
320
|
"eventsource-parser": "3.0.8",
|
|
320
321
|
"experimental-ai-sdk-code-mode": "1.0.16",
|
|
321
322
|
"gray-matter": "4.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./dist-BdTs18CF.js";var t=e(((e,t)=>{var n=1e3,r=n*60,i=r*60,a=i*24,o=a*7,s=a*365.25;t.exports=function(e,t){t||={};var n=typeof e;if(n===`string`&&e.length>0)return c(e);if(n===`number`&&isFinite(e))return t.long?u(e):l(e);throw Error(`val is not a non-empty string or a valid number. val=`+JSON.stringify(e))};function c(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var c=parseFloat(t[1]);switch((t[2]||`ms`).toLowerCase()){case`years`:case`year`:case`yrs`:case`yr`:case`y`:return c*s;case`weeks`:case`week`:case`w`:return c*o;case`days`:case`day`:case`d`:return c*a;case`hours`:case`hour`:case`hrs`:case`hr`:case`h`:return c*i;case`minutes`:case`minute`:case`mins`:case`min`:case`m`:return c*r;case`seconds`:case`second`:case`secs`:case`sec`:case`s`:return c*n;case`milliseconds`:case`millisecond`:case`msecs`:case`msec`:case`ms`:return c;default:return}}}}function l(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+`d`:t>=i?Math.round(e/i)+`h`:t>=r?Math.round(e/r)+`m`:t>=n?Math.round(e/n)+`s`:e+`ms`}function u(e){var t=Math.abs(e);return t>=a?d(e,t,a,`day`):t>=i?d(e,t,i,`hour`):t>=r?d(e,t,r,`minute`):t>=n?d(e,t,n,`second`):e+` ms`}function d(e,t,n,r){var i=t>=n*1.5;return Math.round(e/n)+` `+r+(i?`s`:``)}})),n=e(((e,t)=>{function n(e,t){typeof t==`boolean`&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=n,n.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},n.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},n.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(Error(`RetryOperation timeout occurred`)),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&&this._timer.unref(),!0},n.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},n.prototype.try=function(e){console.log(`Using RetryOperation.try() is deprecated`),this.attempt(e)},n.prototype.start=function(e){console.log(`Using RetryOperation.start() is deprecated`),this.attempt(e)},n.prototype.start=n.prototype.try,n.prototype.errors=function(){return this._errors},n.prototype.attempts=function(){return this._attempts},n.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],a=i.message,o=(e[a]||0)+1;e[a]=o,o>=n&&(t=i,n=o)}return t}})),r=e((e=>{var t=n();e.operation=function(n){return new t(e.timeouts(n),{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw Error(`minTimeout is greater than maxTimeout`);for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*t.factor**+e);return r=Math.min(r,t.maxTimeout),r},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],t)typeof t[i]==`function`&&r.push(i);for(var a=0;a<r.length;a++){var o=r[a],s=t[o];t[o]=function(r){var i=e.operation(n),a=Array.prototype.slice.call(arguments,1),o=a.pop();a.push(function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),o.apply(this,arguments))}),i.attempt(function(){r.apply(t,a)})}.bind(t,s),t[o].options=n}}})),i=e(((e,t)=>{t.exports=r()}));export{t as n,i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./dist-BdTs18CF.js";import{n as t,t as n}from"../../@vercel/sandbox/index.js";var r=e(((e,r)=>{var i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of o(t))!s.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=a(t,c))||r.enumerable});return e},u=e=>l(i({},`__esModule`,{value:!0}),e),d={};c(d,{refreshToken:()=>m}),r.exports=u(d);var f=t(),p=n();async function m(e){let t=e?.project,n=e?.team;if(!t&&!n){let e=(0,p.findProjectInfo)();t=e.projectId,n=e.teamId}else if(!t||!n){let e=(0,p.findProjectInfo)();t??=e.projectId,n??=e.teamId}if(!t)throw new f.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let r=(0,p.loadToken)(t);if(!r||(0,p.isExpired)((0,p.getTokenPayload)(r.token),e?.expirationBufferMs)){let i=await(0,p.getVercelToken)({expirationBufferMs:e?.expirationBufferMs});if(r=await(0,p.getVercelOidcToken)(i,t,n),!r)throw new f.VercelOidcTokenError(`Failed to refresh OIDC token`);(0,p.saveToken)(r,t)}process.env.VERCEL_OIDC_TOKEN=r.token}0&&(r.exports={refreshToken:m})}));export default r();export{};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface NodeFileTraceResult {
|
|
2
|
-
readonly fileList: ReadonlySet<string>;
|
|
3
|
-
readonly warnings: ReadonlySet<Error>;
|
|
4
|
-
}
|
|
5
|
-
export declare function traceNodeEsmFiles(input: {
|
|
6
|
-
readonly base: string;
|
|
7
|
-
readonly entries: readonly string[];
|
|
8
|
-
readonly processCwd: string;
|
|
9
|
-
}): Promise<NodeFileTraceResult>;
|
|
10
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createRequire}from"node:module";import{pathToFileURL}from"node:url";let nodeFileTraceModulePromise;async function loadNitroNodeFileTrace(){return nodeFileTraceModulePromise??=(async()=>await import(pathToFileURL(createRequire(createRequire(import.meta.url).resolve(`nitro/package.json`)).resolve(`@vercel/nft`)).href))(),await nodeFileTraceModulePromise}async function traceNodeEsmFiles(e){let{nodeFileTrace:t}=await loadNitroNodeFileTrace();return await t([...e.entries],{base:e.base,conditions:[`node`,`import`],processCwd:e.processCwd})}export{traceNodeEsmFiles};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface ResolvedAuthoredExternalModule {
|
|
2
|
-
readonly packageName: string;
|
|
3
|
-
readonly resolvedId: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function materializeAuthoredExternalDependencies(input: {
|
|
6
|
-
readonly appRoot: string;
|
|
7
|
-
readonly externalModules: readonly ResolvedAuthoredExternalModule[];
|
|
8
|
-
readonly snapshotSourceRoot: string;
|
|
9
|
-
readonly sourceRoot: string;
|
|
10
|
-
}): Promise<string>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{constants}from"node:fs";import{dirname,isAbsolute,join,parse,relative,resolve,sep}from"node:path";import{copyFile,lstat,mkdir,readFile,readdir,readlink,realpath,rm,stat,symlink}from"node:fs/promises";import{createHash}from"node:crypto";import{traceNodeEsmFiles}from"#internal/bundler/nitro-node-file-trace.js";const COPY_MODE=constants.COPYFILE_FICLONE;async function materializeAuthoredExternalDependencies(e){if(e.externalModules.length===0)return createHash(`sha256`).digest(`hex`);let n=await realpath(e.sourceRoot),i=await realpath(e.appRoot),s=await resolveExternalPackages(e.externalModules),c=createHash(`sha256`),l=await traceExternalDependencyPaths(s,i),u=new Set,d=new Set;for(let t of s)await materializeDependencyDirectory({fingerprint:c,materializedDirectories:d,materializedPaths:u,snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:t.packageRoot,sourceRoot:n});for(let t of l){let r=await findNearestPackageRoot(t);r!==void 0&&await materializeDependencyDirectory({fingerprint:c,materializedDirectories:d,materializedPaths:u,snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:r,sourceRoot:n})}for(let t of l)await materializeTracedPath({fingerprint:c,materializedPaths:u,snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:t,sourceRoot:n});for(let l of s){let s=toMaterializedPath({snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:l.packageRoot,sourceRoot:n}),u=join(toMaterializedPath({snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:i,sourceRoot:n}),`node_modules`,...l.packageName.split(`/`));resolve(u)!==resolve(s)&&(await rm(u,{force:!0,recursive:!0}),await mkdir(dirname(u),{recursive:!0}),await symlink(relative(dirname(u),s)||`.`,u,`junction`)),c.update(`package\0`).update(l.packageName).update(`\0`).update(toSemanticPath(l.packageRoot,n)).update(`\0`)}return c.digest(`hex`)}async function traceExternalDependencyPaths(e,t){let r=new Map;for(let t of e){let e=parse(t.resolvedId).root,n=normalizePathRoot(e),a=r.get(n)??{base:e,entries:[]};a.entries.push(t.resolvedId),r.set(n,a)}let a=new Set,s=[];for(let e of[...r.values()].sort((e,t)=>normalizePathRoot(e.base).localeCompare(normalizePathRoot(t.base)))){let r=await traceNodeEsmFiles({base:e.base,entries:e.entries.sort(),processCwd:t});s.push(...r.warnings);for(let t of r.fileList)a.add(isAbsolute(t)?t:resolve(e.base,t))}if(s.length>0){let e=s.map(e=>e.message).sort();throw Error(`Failed to trace the complete authored external dependency closure:\n${e.join(`
|
|
2
|
-
`)}`)}return[...a].sort((e,t)=>e.localeCompare(t))}async function materializeDependencyDirectory(e){let t=await realpath(e.sourcePath);if(!e.materializedDirectories.has(t)){e.materializedDirectories.add(t);for(let n of(await readdir(t,{withFileTypes:!0})).sort((e,t)=>e.name.localeCompare(t.name))){let i=join(t,n.name),a=await lstat(i);if(a.isDirectory()){await materializeDependencyDirectory({...e,sourcePath:i});continue}if(a.isSymbolicLink()){await materializeTracedPath({fingerprint:e.fingerprint,materializedPaths:e.materializedPaths,snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:i,sourceRoot:e.sourceRoot});continue}await materializeTracedPath({fingerprint:e.fingerprint,materializedPaths:e.materializedPaths,snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:i,sourceRoot:e.sourceRoot})}}}async function resolveExternalPackages(e){let t=new Map;for(let n of e){let e=await findPackageRoot(n.resolvedId,n.packageName),r=t.get(n.packageName);if(r!==void 0&&resolve(r.packageRoot)!==resolve(e))throw Error(`Authored external dependency "${n.packageName}" resolves to multiple package instances.`);t.set(n.packageName,{packageName:n.packageName,packageRoot:e,resolvedId:n.resolvedId})}return[...t.values()].sort((e,t)=>e.packageName.localeCompare(t.packageName))}async function findPackageRoot(e,n){let i=dirname(await realpath(e));for(;;){let a=join(i,`package.json`);try{if(JSON.parse(await readFile(a,`utf8`)).name===n)return i}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let o=dirname(i);if(o===i)throw Error(`Cannot find package root for authored external dependency "${n}" from "${e}".`);i=o}}async function findNearestPackageRoot(e){let n=await realpath(e),i=(await stat(n)).isDirectory()?n:dirname(n);for(;;){try{let e=JSON.parse(await readFile(join(i,`package.json`),`utf8`));if(typeof e.name==`string`&&e.name.length>0)return i}catch(e){if(!(e instanceof Error&&`code`in e&&e.code===`ENOENT`))throw e}let e=dirname(i);if(e===i)return;i=e}}async function materializeTracedPath(e){let n=toSemanticPath(e.sourcePath,e.sourceRoot);if(e.materializedPaths.has(n))return;e.materializedPaths.add(n);let r=toMaterializedPath(e),i=await lstat(e.sourcePath),s=toSemanticPath(e.sourcePath,e.sourceRoot);if(i.isSymbolicLink()){let n=await readlink(e.sourcePath),i=await realpath(resolve(dirname(e.sourcePath),n)),c=toMaterializedPath({snapshotSourceRoot:e.snapshotSourceRoot,sourcePath:i,sourceRoot:e.sourceRoot}),l=await stat(e.sourcePath);await rm(r,{force:!0,recursive:!0}),await mkdir(dirname(r),{recursive:!0}),await symlink(relative(dirname(r),c)||`.`,r,l.isDirectory()?`junction`:`file`),e.fingerprint.update(s).update(`\0link\0`).update(toSemanticPath(i,e.sourceRoot)).update(`\0`);return}if(!i.isFile())throw Error(`Unsupported traced authored dependency path "${e.sourcePath}".`);await mkdir(dirname(r),{recursive:!0}),await copyFile(e.sourcePath,r,COPY_MODE),e.fingerprint.update(s).update(`\0file\0`).update(await readFile(e.sourcePath)).update(`\0`)}function toMaterializedPath(e){if(isPathInsideOrEqual(e.sourcePath,e.sourceRoot))return join(e.snapshotSourceRoot,relative(e.sourceRoot,e.sourcePath));let t=parse(resolve(e.sourcePath)).root;return join(e.snapshotSourceRoot,`.eve`,`external-dependencies`,createPathRootKey(t),relative(t,e.sourcePath))}function toSemanticPath(e,t){if(isPathInsideOrEqual(e,t))return`source/${toPortablePath(relative(t,e))}`;let n=parse(resolve(e)).root;return`external/${createPathRootKey(n)}/${toPortablePath(relative(n,e))}`}function createPathRootKey(e){return createHash(`sha256`).update(normalizePathRoot(e)).digest(`hex`).slice(0,12)}function isPathInsideOrEqual(e,t){let r=relative(resolve(t),resolve(e));return!(isAbsolute(r)||r===`..`||r.startsWith(`..${sep}`)||r.startsWith(sep))}function normalizePathRoot(e){return toPortablePath(e).toLowerCase()}function toPortablePath(e){return e.split(sep).join(`/`)}export{materializeAuthoredExternalDependencies};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Nitro } from "nitro/types";
|
|
2
|
-
/**
|
|
3
|
-
* Starts capturing the dev bundler's live virtual-module map for `nitro`.
|
|
4
|
-
* Call once per dev Nitro instance, before its first build.
|
|
5
|
-
*/
|
|
6
|
-
export declare function captureDevLiveVirtualModules(nitro: Nitro): void;
|
|
7
|
-
/**
|
|
8
|
-
* Mirrors one virtual-module set into the captured dev bundler map: ids
|
|
9
|
-
* under `prefix` are replaced by `entries`. Returns `false` when no live
|
|
10
|
-
* map was captured (the caller should tell the user a restart is needed).
|
|
11
|
-
*/
|
|
12
|
-
export declare function replaceDevLiveVirtualModules(nitro: object, input: {
|
|
13
|
-
readonly entries: Readonly<Record<string, string>>;
|
|
14
|
-
readonly prefix: string;
|
|
15
|
-
}): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const liveVirtualModuleMaps=new WeakMap;function captureDevLiveVirtualModules(t){t.hooks.hook(`rollup:before`,(n,r)=>{let i=findNitroVirtualModuleMap(r.plugins);i!==void 0&&liveVirtualModuleMaps.set(t,i)})}function replaceDevLiveVirtualModules(t,n){let r=liveVirtualModuleMaps.get(t);if(r===void 0)return!1;for(let e of r.keys())e.startsWith(n.prefix)&&r.delete(e);for(let[e,t]of Object.entries(n.entries))r.set(e,{module:{id:e,template:t},render:()=>t});return!0}function findNitroVirtualModuleMap(e){if(Array.isArray(e)){for(let t of e.flat(1/0))if(typeof t==`object`&&t&&t.name===`nitro:virtual`){let e=t.api;if(e!==void 0&&e.modules instanceof Map)return e.modules}}}export{captureDevLiveVirtualModules,replaceDevLiveVirtualModules};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default server-side packages that should stay external and be traced into
|
|
3
|
-
* hosted output, copied from Next.js' server-external-packages config.
|
|
4
|
-
*/
|
|
5
|
-
export declare const SERVER_EXTERNAL_PACKAGES: readonly ["@alinea/generated", "@appsignal/nodejs", "@aws-sdk/client-kms", "@aws-sdk/client-s3", "@aws-sdk/client-sso", "@aws-sdk/s3-presigned-post", "@blockfrost/blockfrost-js", "@datadog/flagging-core", "@highlight-run/node", "@huggingface/transformers", "@jpg-store/lucid-cardano", "@libsql/client", "@mikro-orm/core", "@mikro-orm/knex", "@node-rs/argon2", "@node-rs/bcrypt", "@prisma/client", "@react-pdf/renderer", "@sentry/profiling-node", "@smithy/util-stream", "@sparticuz/chromium", "@sparticuz/chromium-min", "@statsig/statsig-node-core", "@swc/core", "@xenova/transformers", "@zenstackhq/runtime", "argon2", "autoprefixer", "aws-crt", "bcrypt", "better-sqlite3", "canvas", "chromadb-default-embed", "config", "cpu-features", "cypress", "dd-trace", "eslint", "express", "firebase-admin", "htmlrewriter", "import-in-the-middle", "isolated-vm", "jest", "jsdom", "keyv", "libsql", "mdx-bundler", "mongodb", "mongoose", "newrelic", "next-mdx-remote", "next-seo", "node-cron", "node-pty", "node-web-audio-api", "onnxruntime-node", "oslo", "pg", "pino", "pino-pretty", "pino-roll", "playwright", "playwright-core", "postcss", "prettier", "prisma", "puppeteer", "puppeteer-core", "ravendb", "require-in-the-middle", "rimraf", "sharp", "shiki", "sqlite3", "thread-stream", "ts-morph", "ts-node", "typescript", "vscode-oniguruma", "webpack", "websocket", "zeromq"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const SERVER_EXTERNAL_PACKAGES=`@alinea/generated.@appsignal/nodejs.@aws-sdk/client-kms.@aws-sdk/client-s3.@aws-sdk/client-sso.@aws-sdk/s3-presigned-post.@blockfrost/blockfrost-js.@datadog/flagging-core.@highlight-run/node.@huggingface/transformers.@jpg-store/lucid-cardano.@libsql/client.@mikro-orm/core.@mikro-orm/knex.@node-rs/argon2.@node-rs/bcrypt.@prisma/client.@react-pdf/renderer.@sentry/profiling-node.@smithy/util-stream.@sparticuz/chromium.@sparticuz/chromium-min.@statsig/statsig-node-core.@swc/core.@xenova/transformers.@zenstackhq/runtime.argon2.autoprefixer.aws-crt.bcrypt.better-sqlite3.canvas.chromadb-default-embed.config.cpu-features.cypress.dd-trace.eslint.express.firebase-admin.htmlrewriter.import-in-the-middle.isolated-vm.jest.jsdom.keyv.libsql.mdx-bundler.mongodb.mongoose.newrelic.next-mdx-remote.next-seo.node-cron.node-pty.node-web-audio-api.onnxruntime-node.oslo.pg.pino.pino-pretty.pino-roll.playwright.playwright-core.postcss.prettier.prisma.puppeteer.puppeteer-core.ravendb.require-in-the-middle.rimraf.sharp.shiki.sqlite3.thread-stream.ts-morph.ts-node.typescript.vscode-oniguruma.webpack.websocket.zeromq`.split(`.`);export{SERVER_EXTERNAL_PACKAGES};
|