experimental-ash 0.16.3 → 0.17.0
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 +26 -0
- package/dist/docs/public/channels/README.md +71 -0
- package/dist/docs/public/schedules.md +35 -0
- package/dist/src/channel/cross-channel-receive.d.ts +61 -0
- package/dist/src/channel/cross-channel-receive.js +50 -0
- package/dist/src/channel/receive-args.d.ts +17 -0
- package/dist/src/channel/receive-args.js +1 -0
- package/dist/src/channel/routes.d.ts +9 -0
- package/dist/src/channel/schedule.js +8 -15
- package/dist/src/chunks/{dev-authored-source-watcher-Tu9dhx5K.js → dev-authored-source-watcher-B5J6JK7p.js} +1 -1
- package/dist/src/chunks/{host-C83crl7k.js → host-ByUKG--q.js} +2 -2
- package/dist/src/chunks/{paths-KCBJzXn2.js → paths-CFoo44rU.js} +2 -2
- package/dist/src/chunks/{prewarm-CdxOi2uE.js → prewarm-BLFoNX7E.js} +1 -1
- package/dist/src/cli/commands/info.js +1 -1
- package/dist/src/cli/run.js +1 -1
- package/dist/src/compiled/.vendor-stamp.json +1 -1
- package/dist/src/compiled/@vercel/sandbox/index.d.ts +8 -1
- package/dist/src/evals/cli/eval.js +1 -1
- package/dist/src/execution/sandbox/bindings/vercel.d.ts +2 -2
- package/dist/src/execution/sandbox/bindings/vercel.js +8 -1
- package/dist/src/internal/application/package.js +1 -1
- package/dist/src/internal/nitro/routes/channel-dispatch.js +3 -0
- package/dist/src/public/channels/slack/index.d.ts +1 -1
- package/dist/src/public/channels/slack/slackChannel.d.ts +20 -1
- package/dist/src/public/channels/slack/slackChannel.js +25 -3
- package/dist/src/public/channels/twilio/twilioChannel.d.ts +2 -1
- package/dist/src/public/definitions/sandbox.d.ts +3 -3
- package/dist/src/public/definitions/schedule.d.ts +2 -16
- package/dist/src/public/sandbox/backends/vercel.d.ts +5 -5
- package/dist/src/public/sandbox/backends/vercel.js +3 -3
- package/dist/src/public/sandbox/index.d.ts +2 -2
- package/dist/src/public/sandbox/vercel-sandbox.d.ts +13 -0
- package/dist/src/runtime/resolve-channel.js +1 -0
- package/dist/src/runtime/types.d.ts +8 -0
- package/dist/src/shared/sandbox-backend.d.ts +7 -7
- package/dist/src/shared/sandbox-definition.d.ts +7 -12
- package/package.json +1 -1
|
@@ -7,9 +7,9 @@ import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
|
7
7
|
* runtime orchestrator can persist reconnect metadata and release
|
|
8
8
|
* resources.
|
|
9
9
|
*/
|
|
10
|
-
export interface SandboxBackendHandle<S extends SandboxSession = SandboxSession,
|
|
10
|
+
export interface SandboxBackendHandle<S extends SandboxSession = SandboxSession, SO = Record<string, never>> {
|
|
11
11
|
readonly session: SandboxSession;
|
|
12
|
-
readonly useSessionFn: SandboxSessionUseFn<S,
|
|
12
|
+
readonly useSessionFn: SandboxSessionUseFn<S, SO>;
|
|
13
13
|
captureState(): Promise<SandboxBackendSessionState>;
|
|
14
14
|
dispose(): Promise<void>;
|
|
15
15
|
}
|
|
@@ -79,9 +79,9 @@ export interface SandboxBackendCreateInput {
|
|
|
79
79
|
* `bootstrap` hook and `seedFiles`, then `backend.create(...)` opens
|
|
80
80
|
* durable sessions from that snapshot.
|
|
81
81
|
*/
|
|
82
|
-
export interface SandboxBackendPrewarmInput {
|
|
82
|
+
export interface SandboxBackendPrewarmInput<BO = Record<string, never>> {
|
|
83
83
|
readonly templateKey: string;
|
|
84
|
-
readonly bootstrap?: (input: SandboxBootstrapContext) => void | Promise<void>;
|
|
84
|
+
readonly bootstrap?: (input: SandboxBootstrapContext<BO>) => void | Promise<void>;
|
|
85
85
|
readonly runtimeContext: SandboxBackendRuntimeContext;
|
|
86
86
|
readonly seedFiles: ReadonlyArray<SandboxSeedFile>;
|
|
87
87
|
}
|
|
@@ -97,7 +97,7 @@ export interface SandboxBackendPrewarmInput {
|
|
|
97
97
|
* Each backend owns the full template-then-session lifecycle internally;
|
|
98
98
|
* callers only need a single `create` call.
|
|
99
99
|
*/
|
|
100
|
-
export interface SandboxBackend<S extends SandboxSession = SandboxSession,
|
|
100
|
+
export interface SandboxBackend<S extends SandboxSession = SandboxSession, BO = Record<string, never>, SO = Record<string, never>> {
|
|
101
101
|
/**
|
|
102
102
|
* Stable identifier for this backend implementation.
|
|
103
103
|
*
|
|
@@ -113,12 +113,12 @@ export interface SandboxBackend<S extends SandboxSession = SandboxSession, O = R
|
|
|
113
113
|
* {@link SandboxTemplateNotProvisionedError} when the requested
|
|
114
114
|
* template is missing.
|
|
115
115
|
*/
|
|
116
|
-
create(input: SandboxBackendCreateInput): Promise<SandboxBackendHandle<S,
|
|
116
|
+
create(input: SandboxBackendCreateInput): Promise<SandboxBackendHandle<S, SO>>;
|
|
117
117
|
/**
|
|
118
118
|
* Build-time prewarm hook. Ash invokes this for every authored
|
|
119
119
|
* sandbox in the compiled graph before serving traffic so the backend
|
|
120
120
|
* can capture a reusable template snapshot. Idempotent against an
|
|
121
121
|
* existing snapshot keyed by `templateKey`.
|
|
122
122
|
*/
|
|
123
|
-
prewarm(input: SandboxBackendPrewarmInput): Promise<void>;
|
|
123
|
+
prewarm(input: SandboxBackendPrewarmInput<BO>): Promise<void>;
|
|
124
124
|
}
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { SandboxSession } from "#shared/sandbox-session.js";
|
|
2
2
|
import type { SandboxBackend } from "#shared/sandbox-backend.js";
|
|
3
|
-
export
|
|
4
|
-
readonly runtime?: string;
|
|
5
|
-
readonly ports?: number[];
|
|
6
|
-
readonly env?: Record<string, string>;
|
|
7
|
-
}
|
|
8
|
-
export type SandboxBootstrapUseFn = (options?: SandboxBootstrapUseOptions) => Promise<SandboxSession>;
|
|
3
|
+
export type SandboxBootstrapUseFn<O = Record<string, never>> = (options?: O) => Promise<SandboxSession>;
|
|
9
4
|
export type SandboxSessionUseFn<S extends SandboxSession = SandboxSession, O = Record<string, never>> = (options?: O) => Promise<S>;
|
|
10
|
-
export interface SandboxBootstrapContext {
|
|
11
|
-
readonly use: SandboxBootstrapUseFn
|
|
5
|
+
export interface SandboxBootstrapContext<O = Record<string, never>> {
|
|
6
|
+
readonly use: SandboxBootstrapUseFn<O>;
|
|
12
7
|
}
|
|
13
8
|
export interface SandboxSessionContext<S extends SandboxSession = SandboxSession, O = Record<string, never>> {
|
|
14
9
|
readonly use: SandboxSessionUseFn<S, O>;
|
|
@@ -26,7 +21,7 @@ export interface SandboxSessionContext<S extends SandboxSession = SandboxSession
|
|
|
26
21
|
* `subagents/<name>/sandbox.ts` (or the folder form) and do not inherit
|
|
27
22
|
* their parent's sandbox (skill seeds differ per agent).
|
|
28
23
|
*/
|
|
29
|
-
export interface SandboxDefinition<S extends SandboxSession = SandboxSession,
|
|
24
|
+
export interface SandboxDefinition<S extends SandboxSession = SandboxSession, BO = Record<string, never>, SO = Record<string, never>> {
|
|
30
25
|
/**
|
|
31
26
|
* Backend that runs this sandbox.
|
|
32
27
|
*
|
|
@@ -36,7 +31,7 @@ export interface SandboxDefinition<S extends SandboxSession = SandboxSession, O
|
|
|
36
31
|
* everywhere else. Set `backend` explicitly to pin the sandbox to a
|
|
37
32
|
* specific backend regardless of environment.
|
|
38
33
|
*/
|
|
39
|
-
backend: SandboxBackend<S,
|
|
40
|
-
bootstrap?(input: SandboxBootstrapContext): Promise<void> | void;
|
|
41
|
-
onSession?(input: SandboxSessionContext<S,
|
|
34
|
+
backend: SandboxBackend<S, BO, SO>;
|
|
35
|
+
bootstrap?(input: SandboxBootstrapContext<BO>): Promise<void> | void;
|
|
36
|
+
onSession?(input: SandboxSessionContext<S, SO>): Promise<void> | void;
|
|
42
37
|
}
|