agent-neckbeard 1.1.11 → 1.1.13
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/README.md +20 -0
- package/dist/index.cjs +540 -6
- package/dist/index.d.cts +68 -1
- package/dist/index.d.ts +68 -1
- package/dist/index.js +539 -7
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -85,6 +85,73 @@ interface BuildOptions {
|
|
|
85
85
|
*/
|
|
86
86
|
autoDetectExternal?: boolean;
|
|
87
87
|
}
|
|
88
|
+
interface NeckbeardNextConfigOptions {
|
|
89
|
+
/**
|
|
90
|
+
* Agent source file globs to include in the deployed Next.js server artifact.
|
|
91
|
+
*
|
|
92
|
+
* Paths follow Next.js `outputFileTracingIncludes` semantics and are resolved
|
|
93
|
+
* relative to the app root unless `outputFileTracingRoot` is also set.
|
|
94
|
+
*/
|
|
95
|
+
sourceFiles: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Also include files that the source entries import.
|
|
98
|
+
*
|
|
99
|
+
* Neckbeard rebundles `sourceFile` during `deploy()`. Framework server
|
|
100
|
+
* artifacts therefore need the source entry plus the files and package entry
|
|
101
|
+
* metadata that esbuild will need to resolve its import graph at runtime.
|
|
102
|
+
*
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
105
|
+
traceSourceDependencies?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Route glob or globs whose server traces should include `sourceFiles`.
|
|
108
|
+
*
|
|
109
|
+
* @default '/*'
|
|
110
|
+
*/
|
|
111
|
+
routeGlob?: string | string[];
|
|
112
|
+
/**
|
|
113
|
+
* Next.js output file tracing root. Set this for monorepos when source files
|
|
114
|
+
* live outside the app directory.
|
|
115
|
+
*/
|
|
116
|
+
outputFileTracingRoot?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Force the older Next.js experimental config placement used by Next 13.
|
|
119
|
+
*
|
|
120
|
+
* By default this is inferred when the provided config already uses
|
|
121
|
+
* `experimental.serverComponentsExternalPackages` or experimental tracing.
|
|
122
|
+
*/
|
|
123
|
+
legacyExperimental?: boolean;
|
|
124
|
+
}
|
|
125
|
+
interface ResolveAgentSourceFileOptions {
|
|
126
|
+
/** Custom error prefix when no source file candidate exists outside the sandbox runtime. */
|
|
127
|
+
errorMessage?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Existing file to use when the bundled agent is imported by the in-sandbox runtime server.
|
|
130
|
+
*
|
|
131
|
+
* @default `${process.cwd()}/agent.mjs`
|
|
132
|
+
*/
|
|
133
|
+
sandboxSourceFile?: string;
|
|
134
|
+
}
|
|
135
|
+
declare function resolveAgentSourceFile(candidates: string[], options?: ResolveAgentSourceFileOptions): string;
|
|
136
|
+
type NextConfigObject = {
|
|
137
|
+
experimental?: Record<string, unknown>;
|
|
138
|
+
outputFileTracingIncludes?: Record<string, unknown>;
|
|
139
|
+
outputFileTracingRoot?: string;
|
|
140
|
+
serverExternalPackages?: string[];
|
|
141
|
+
webpack?: NextWebpackFunction;
|
|
142
|
+
[key: string]: unknown;
|
|
143
|
+
};
|
|
144
|
+
type NextWebpackConfig = Record<string, unknown> & {
|
|
145
|
+
externals?: unknown;
|
|
146
|
+
plugins?: unknown[];
|
|
147
|
+
};
|
|
148
|
+
type NextWebpackContext = Record<string, unknown> & {
|
|
149
|
+
dev?: boolean;
|
|
150
|
+
dir?: string;
|
|
151
|
+
isServer?: boolean;
|
|
152
|
+
};
|
|
153
|
+
type NextWebpackFunction = (config: NextWebpackConfig, context: NextWebpackContext) => NextWebpackConfig;
|
|
154
|
+
declare function withNeckbeardNextConfig<TConfig extends NextConfigObject>(nextConfig: TConfig, options: NeckbeardNextConfigOptions): TConfig & NextConfigObject;
|
|
88
155
|
/**
|
|
89
156
|
* Configuration for downloading a file into the sandbox filesystem.
|
|
90
157
|
* Files are downloaded during deploy() before the agent runs.
|
|
@@ -335,4 +402,4 @@ declare class Agent<TInput, TOutput = unknown, TFrame = unknown> {
|
|
|
335
402
|
}): AsyncGenerator<TFrame>;
|
|
336
403
|
}
|
|
337
404
|
|
|
338
|
-
export { Agent, type AgentConfig, type AgentMode, type AgentRunContext, type AgentRunResult, type AgentSandboxContext, type BuildOptions, ConfigurationError, DEFAULT_DEPENDENCIES, type DaytonaSandboxConfig, DeploymentError, type E2BSandboxConfig, ExecutionError, type FileDownload, NeckbeardError, type OsDependencies, type RunAgentConfig, type SandboxConfig, type SandboxProvider, type ServerAgentConfig, ValidationError };
|
|
405
|
+
export { Agent, type AgentConfig, type AgentMode, type AgentRunContext, type AgentRunResult, type AgentSandboxContext, type BuildOptions, ConfigurationError, DEFAULT_DEPENDENCIES, type DaytonaSandboxConfig, DeploymentError, type E2BSandboxConfig, ExecutionError, type FileDownload, NeckbeardError, type NeckbeardNextConfigOptions, type OsDependencies, type ResolveAgentSourceFileOptions, type RunAgentConfig, type SandboxConfig, type SandboxProvider, type ServerAgentConfig, ValidationError, resolveAgentSourceFile, withNeckbeardNextConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,73 @@ interface BuildOptions {
|
|
|
85
85
|
*/
|
|
86
86
|
autoDetectExternal?: boolean;
|
|
87
87
|
}
|
|
88
|
+
interface NeckbeardNextConfigOptions {
|
|
89
|
+
/**
|
|
90
|
+
* Agent source file globs to include in the deployed Next.js server artifact.
|
|
91
|
+
*
|
|
92
|
+
* Paths follow Next.js `outputFileTracingIncludes` semantics and are resolved
|
|
93
|
+
* relative to the app root unless `outputFileTracingRoot` is also set.
|
|
94
|
+
*/
|
|
95
|
+
sourceFiles: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Also include files that the source entries import.
|
|
98
|
+
*
|
|
99
|
+
* Neckbeard rebundles `sourceFile` during `deploy()`. Framework server
|
|
100
|
+
* artifacts therefore need the source entry plus the files and package entry
|
|
101
|
+
* metadata that esbuild will need to resolve its import graph at runtime.
|
|
102
|
+
*
|
|
103
|
+
* @default true
|
|
104
|
+
*/
|
|
105
|
+
traceSourceDependencies?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Route glob or globs whose server traces should include `sourceFiles`.
|
|
108
|
+
*
|
|
109
|
+
* @default '/*'
|
|
110
|
+
*/
|
|
111
|
+
routeGlob?: string | string[];
|
|
112
|
+
/**
|
|
113
|
+
* Next.js output file tracing root. Set this for monorepos when source files
|
|
114
|
+
* live outside the app directory.
|
|
115
|
+
*/
|
|
116
|
+
outputFileTracingRoot?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Force the older Next.js experimental config placement used by Next 13.
|
|
119
|
+
*
|
|
120
|
+
* By default this is inferred when the provided config already uses
|
|
121
|
+
* `experimental.serverComponentsExternalPackages` or experimental tracing.
|
|
122
|
+
*/
|
|
123
|
+
legacyExperimental?: boolean;
|
|
124
|
+
}
|
|
125
|
+
interface ResolveAgentSourceFileOptions {
|
|
126
|
+
/** Custom error prefix when no source file candidate exists outside the sandbox runtime. */
|
|
127
|
+
errorMessage?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Existing file to use when the bundled agent is imported by the in-sandbox runtime server.
|
|
130
|
+
*
|
|
131
|
+
* @default `${process.cwd()}/agent.mjs`
|
|
132
|
+
*/
|
|
133
|
+
sandboxSourceFile?: string;
|
|
134
|
+
}
|
|
135
|
+
declare function resolveAgentSourceFile(candidates: string[], options?: ResolveAgentSourceFileOptions): string;
|
|
136
|
+
type NextConfigObject = {
|
|
137
|
+
experimental?: Record<string, unknown>;
|
|
138
|
+
outputFileTracingIncludes?: Record<string, unknown>;
|
|
139
|
+
outputFileTracingRoot?: string;
|
|
140
|
+
serverExternalPackages?: string[];
|
|
141
|
+
webpack?: NextWebpackFunction;
|
|
142
|
+
[key: string]: unknown;
|
|
143
|
+
};
|
|
144
|
+
type NextWebpackConfig = Record<string, unknown> & {
|
|
145
|
+
externals?: unknown;
|
|
146
|
+
plugins?: unknown[];
|
|
147
|
+
};
|
|
148
|
+
type NextWebpackContext = Record<string, unknown> & {
|
|
149
|
+
dev?: boolean;
|
|
150
|
+
dir?: string;
|
|
151
|
+
isServer?: boolean;
|
|
152
|
+
};
|
|
153
|
+
type NextWebpackFunction = (config: NextWebpackConfig, context: NextWebpackContext) => NextWebpackConfig;
|
|
154
|
+
declare function withNeckbeardNextConfig<TConfig extends NextConfigObject>(nextConfig: TConfig, options: NeckbeardNextConfigOptions): TConfig & NextConfigObject;
|
|
88
155
|
/**
|
|
89
156
|
* Configuration for downloading a file into the sandbox filesystem.
|
|
90
157
|
* Files are downloaded during deploy() before the agent runs.
|
|
@@ -335,4 +402,4 @@ declare class Agent<TInput, TOutput = unknown, TFrame = unknown> {
|
|
|
335
402
|
}): AsyncGenerator<TFrame>;
|
|
336
403
|
}
|
|
337
404
|
|
|
338
|
-
export { Agent, type AgentConfig, type AgentMode, type AgentRunContext, type AgentRunResult, type AgentSandboxContext, type BuildOptions, ConfigurationError, DEFAULT_DEPENDENCIES, type DaytonaSandboxConfig, DeploymentError, type E2BSandboxConfig, ExecutionError, type FileDownload, NeckbeardError, type OsDependencies, type RunAgentConfig, type SandboxConfig, type SandboxProvider, type ServerAgentConfig, ValidationError };
|
|
405
|
+
export { Agent, type AgentConfig, type AgentMode, type AgentRunContext, type AgentRunResult, type AgentSandboxContext, type BuildOptions, ConfigurationError, DEFAULT_DEPENDENCIES, type DaytonaSandboxConfig, DeploymentError, type E2BSandboxConfig, ExecutionError, type FileDownload, NeckbeardError, type NeckbeardNextConfigOptions, type OsDependencies, type ResolveAgentSourceFileOptions, type RunAgentConfig, type SandboxConfig, type SandboxProvider, type ServerAgentConfig, ValidationError, resolveAgentSourceFile, withNeckbeardNextConfig };
|