veryfront 0.1.577 → 0.1.579

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.577",
3
+ "version": "0.1.579",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "workspace": [
@@ -1 +1 @@
1
- {"version":3,"file":"project-remote-tool-source.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/project-remote-tool-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,qCAAqC,EAC1C,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,2BAA2B,EAGjC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAGzC,8DAA8D;AAC9D,MAAM,MAAM,4CAA4C,GAAG,CACzD,QAAQ,EAAE,6BAA6B,KACpC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,oEAAoE;AACpE,MAAM,MAAM,iDAAiD,GAAG,CAC9D,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,wEAAwE;AACxE,MAAM,MAAM,6CAA6C,GAAG,CAAC,KAAK,EAAE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,C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AAU,CAAC,EAAE,SAAS,2BAA2B,EAAE,CAAC;IACpD,aAAa,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC5C,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,gBAAgB,CAAC;IACjF,qBAAqB,CAAC,EAAE,iDAAiD,CAAC;CAC3E,CAAC;AAsFJ,iDAAiD;AACjD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,yCAAyC,GAC/C,gBAAgB,EAAE,CA8BpB"}
1
+ {"version":3,"file":"project-remote-tool-source.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/hosted/project-remote-tool-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,qCAAqC,EAC1C,KAAK,uCAAuC,EAC5C,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,KAAK,2BAA2B,EAGjC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAGL,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,EAC1B,MAAM,iCAAiC,CAAC;AAGzC,8DAA8D;AAC9D,MAAM,MAAM,4CAA4C,GAAG,CACzD,QAAQ,EAAE,6BAA6B,KACpC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,oEAAoE;AACpE,MAAM,MAAM,iDAAiD,GAAG,CAC9D,SAAS,EAAE,MAAM,KACd,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE1B,wEAAwE;AACxE,MAAM,MAAM,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nE,MAAM,MAAM,yCAAyC,GACjD,IAAI,CACJ,wCAAwC,EACxC,QAAQ,GAAG,iBAAiB,CAC7B,GACC;IACA,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,CAAC,EAAE,SAAS,2BAA2B,EAAE,CAAC;IACpD,aAAa,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC5C,YAAY,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,yBAAyB,KAAK,gBAAgB,CAAC;IACjF,qBAAqB,CAAC,EAAE,iDAAiD,CAAC;CAC3E,CAAC;AA2EJ,iDAAiD;AACjD,wBAAgB,oCAAoC,CAClD,KAAK,EAAE,yCAAyC,GAC/C,gBAAgB,EAAE,CA8BpB"}
@@ -105,17 +105,8 @@ function prepareVeryfrontApiToolInput(input) {
105
105
  !isVeryfrontApiIntegrationTool(toolInputContext.toolName)) {
106
106
  return prepared;
107
107
  }
108
- if (typeof prepared.end_user_id === "string" && prepared.end_user_id.length > 0) {
109
- return prepared;
110
- }
111
- const endUserId = input.getEndUserId?.() ?? toolInputContext.context?.endUserId;
112
- if (typeof endUserId !== "string" || endUserId.length === 0) {
113
- return prepared;
114
- }
115
- return {
116
- ...prepared,
117
- end_user_id: endUserId,
118
- };
108
+ const { end_user_id: _endUserId, ...trustedInput } = prepared;
109
+ return trustedInput;
119
110
  };
120
111
  }
121
112
  function createHostedProjectRemoteToolSourceFromConfig(input, server, source, onProjectSwitch) {
@@ -1 +1 @@
1
- {"version":3,"file":"remote-tools.d.ts","sourceRoot":"","sources":["../../../src/src/integrations/remote-tools.ts"],"names":[],"mappings":"A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AAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKjE;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,kBAAkB,CAAC,EAAE,MAAM,GAAG,qCAAqC,GAClE,OAAO,CAAC,OAAO,CAAC,CAclB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GACjE,OAAO,CAAC,IAAI,CAAC,CAwBf"}
@@ -81,7 +81,6 @@ async function callRemoteTool(baseUrl, token, toolName, args, context) {
81
81
  body: JSON.stringify({
82
82
  name: toolName,
83
83
  arguments: args,
84
- end_user_id: context?.endUserId,
85
84
  run_id: context?.runId,
86
85
  agent_id: context?.agentId,
87
86
  }),
@@ -21,6 +21,15 @@ interface ProjectCandidateOptions {
21
21
  files: SourceFileLike[];
22
22
  developmentMode: boolean;
23
23
  }
24
+ export declare function getCandidateManifestCacheStats(): {
25
+ manifests: {
26
+ entries: number;
27
+ };
28
+ routeCandidates: {
29
+ entries: number;
30
+ maxEntries: number;
31
+ };
32
+ };
24
33
  /**
25
34
  * Resolve route-scoped Tailwind candidates from a precomputed per-project manifest.
26
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"css-candidate-manifest.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/css-candidate-manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,kDAAkD,CAAC;AAI1D,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,uBAAuB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAqHD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,GAAG,GAAG,CAAC,MAAM,CAAC,CAuC9E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,MAAM,CAAC,CAGlF;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAc/E"}
1
+ {"version":3,"file":"css-candidate-manifest.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/css-candidate-manifest.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,kDAAkD,CAAC;AAK1D,UAAU,cAAc;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,UAAU,qBAAqB;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,uBAAuB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAqBD,wBAAgB,8BAA8B,IAAI;IAChD,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,eAAe,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1D,CAUA;AA8GD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,GAAG,GAAG,CAAC,MAAM,CAAC,CAoD9E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,uBAAuB,GAAG,GAAG,CAAC,MAAM,CAAC,CAGlF;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAc/E"}
@@ -2,11 +2,33 @@ import { extractCandidates } from "../../html/styles-builder/tailwind-compiler.j
2
2
  import { filterFilesForStyleScope, } from "../../html/styles-builder/style-scope-profile.js";
3
3
  import { getRouteModulePaths } from "../../modules/manifest/route-module-manifest.js";
4
4
  import { rendererLogger } from "../../utils/index.js";
5
+ import { registerCache } from "../../utils/memory/index.js";
5
6
  const logger = rendererLogger.component("css-candidate-manifest");
6
7
  const SOURCE_EXTENSIONS = [".tsx", ".jsx", ".mdx", ".ts", ".js"];
7
8
  const DEV_MANIFEST_TTL_MS = 2_000;
9
+ const ROUTE_CANDIDATE_CACHE_MAX_ENTRIES = 200;
8
10
  const manifestCache = new Map();
9
11
  const routeCandidateCache = new Map();
12
+ registerCache("css-candidate-manifests", () => ({
13
+ name: "css-candidate-manifests",
14
+ entries: manifestCache.size,
15
+ }));
16
+ registerCache("css-route-candidates", () => ({
17
+ name: "css-route-candidates",
18
+ entries: routeCandidateCache.size,
19
+ maxEntries: ROUTE_CANDIDATE_CACHE_MAX_ENTRIES,
20
+ }));
21
+ export function getCandidateManifestCacheStats() {
22
+ return {
23
+ manifests: {
24
+ entries: manifestCache.size,
25
+ },
26
+ routeCandidates: {
27
+ entries: routeCandidateCache.size,
28
+ maxEntries: ROUTE_CANDIDATE_CACHE_MAX_ENTRIES,
29
+ },
30
+ };
31
+ }
10
32
  function normalizePath(path) {
11
33
  return path.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
12
34
  }
@@ -106,12 +128,22 @@ export function getRouteCandidates(options) {
106
128
  addCandidatesForPath(routeCandidates, manifest, sourcePath, options.projectDir);
107
129
  }
108
130
  }
131
+ let usedFullProjectFallback = false;
109
132
  // Fallback to full-project candidates for correctness if route manifest is incomplete.
110
133
  if (routeCandidates.size === 0) {
134
+ usedFullProjectFallback = true;
111
135
  for (const cls of manifest.allCandidates)
112
136
  routeCandidates.add(cls);
113
137
  }
114
- routeCandidateCache.set(routeCacheKey, routeCandidates);
138
+ if (!usedFullProjectFallback) {
139
+ if (routeCandidateCache.size >= ROUTE_CANDIDATE_CACHE_MAX_ENTRIES &&
140
+ !routeCandidateCache.has(routeCacheKey)) {
141
+ const oldestKey = routeCandidateCache.keys().next().value;
142
+ if (oldestKey)
143
+ routeCandidateCache.delete(oldestKey);
144
+ }
145
+ routeCandidateCache.set(routeCacheKey, routeCandidates);
146
+ }
115
147
  logger.debug("Resolved route candidates", {
116
148
  projectScope: options.projectScope,
117
149
  projectVersion: options.projectVersion,
@@ -1,15 +1,15 @@
1
- import type { CommandJob, CommandJobOutput, ExecOptions } from "./sandbox.js";
1
+ import type { BackgroundCommand, BackgroundCommandOutput, ExecOptions } from "./sandbox.js";
2
2
  import { type LazySandboxOptions } from "./lazy-sandbox.js";
3
3
  import { type BashToolSandboxLike, type CreateSandboxBashTool, type SandboxShellToolSet } from "./shell-tools.js";
4
- /** Public API contract for agent service sandbox job client. */
5
- export interface AgentServiceSandboxJobClient {
6
- startCommandJob(command: string): Promise<CommandJob>;
7
- getCommandJob(jobId: string): Promise<CommandJob>;
8
- getCommandJobOutput(jobId: string): Promise<CommandJobOutput>;
9
- cancelCommandJob(jobId: string): Promise<CommandJob>;
4
+ /** Public API contract for agent service sandbox background command client. */
5
+ export interface AgentServiceSandboxBackgroundCommandClient {
6
+ startBackgroundCommand(command: string): Promise<BackgroundCommand>;
7
+ getBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
8
+ getBackgroundCommandOutput(commandId: string): Promise<BackgroundCommandOutput>;
9
+ cancelBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
10
10
  }
11
11
  /** Public API contract for agent service sandbox client. */
12
- export interface AgentServiceSandboxClient extends BashToolSandboxLike, AgentServiceSandboxJobClient {
12
+ export interface AgentServiceSandboxClient extends BashToolSandboxLike, AgentServiceSandboxBackgroundCommandClient {
13
13
  ensure(): Promise<void>;
14
14
  close(): Promise<void>;
15
15
  readonly isActive: boolean;
@@ -38,8 +38,8 @@ export declare function createProjectScopedExecOptions(projectReference: string
38
38
  export declare function createAgentServiceSandboxClient(input?: AgentServiceSandboxClientOptions): AgentServiceSandboxClient;
39
39
  /** Create agent service sandbox tools. */
40
40
  export declare function createAgentServiceSandboxTools(input: AgentServiceSandboxToolsOptions): Promise<AgentServiceSandboxToolsResult>;
41
- /** Public API contract for hosted sandbox job client. */
42
- export type HostedSandboxJobClient = AgentServiceSandboxJobClient;
41
+ /** Public API contract for hosted sandbox background command client. */
42
+ export type HostedSandboxBackgroundCommandClient = AgentServiceSandboxBackgroundCommandClient;
43
43
  /** Public API contract for hosted sandbox client. */
44
44
  export type HostedSandboxClient = AgentServiceSandboxClient;
45
45
  /** Options accepted by hosted sandbox client. */
@@ -1 +1 @@
1
- {"version":3,"file":"agent-service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3C,wBAAgB,+BAA+B,CAC7C,KAAK,GAAE,gCAAqC,GAC3C,yBAAyB,CAoC3B;AAcD,0CAA0C;AAC1C,wBAAsB,8BAA8B,CAClD,KAAK,EAAE,+BAA+B,GACrC,OAAO,CAAC,8BAA8B,CAAC,CAoCzC;AAED,wEAAwE;AACxE,MAAM,MAAM,oCAAoC,GAAG,0CAA0C,CAAC;AAC9F,qDAAqD;AACrD,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC;AAC5D,iDAAiD;AACjD,MAAM,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAC1E,gDAAgD;AAChD,MAAM,MAAM,yBAAyB,GAAG,+BAA+B,CAAC;AACxE,iDAAiD;AACjD,MAAM,MAAM,wBAAwB,GAAG,8BAA8B,CAAC;AAEtE,oCAAoC;AACpC,eAAO,MAAM,yBAAyB,wCAAkC,CAAC;AACzE,mCAAmC;AACnC,eAAO,MAAM,wBAAwB,uCAAiC,CAAC"}
@@ -42,7 +42,7 @@ export function createAgentServiceSandboxClient(input = {}) {
42
42
  const getProjectId = input.getProjectId ?? (() => input.projectId);
43
43
  const sandbox = new LazySandbox({ ...input, getProjectId });
44
44
  const getExecOptions = () => createProjectScopedExecOptions(getProjectId());
45
- const getCommandJobExecOptions = () => ({
45
+ const getBackgroundCommandExecOptions = () => ({
46
46
  ...getExecOptions(),
47
47
  cwd: SANDBOX_WORKING_DIRECTORY,
48
48
  });
@@ -53,10 +53,10 @@ export function createAgentServiceSandboxClient(input = {}) {
53
53
  },
54
54
  readFile: (path) => sandbox.readFile(path),
55
55
  writeFiles: (files) => sandbox.writeFiles(files.map((file) => normalizeSandboxWriteFile(file))),
56
- startCommandJob: (command) => sandbox.startCommandJob(unwrapSandboxWorkingDirectoryCommand(command), getCommandJobExecOptions()),
57
- getCommandJob: (jobId) => sandbox.getCommandJob(jobId),
58
- getCommandJobOutput: (jobId) => sandbox.getCommandJobOutput(jobId),
59
- cancelCommandJob: (jobId) => sandbox.cancelCommandJob(jobId),
56
+ startBackgroundCommand: (command) => sandbox.startBackgroundCommand(unwrapSandboxWorkingDirectoryCommand(command), getBackgroundCommandExecOptions()),
57
+ getBackgroundCommand: (commandId) => sandbox.getBackgroundCommand(commandId),
58
+ getBackgroundCommandOutput: (commandId) => sandbox.getBackgroundCommandOutput(commandId),
59
+ cancelBackgroundCommand: (commandId) => sandbox.cancelBackgroundCommand(commandId),
60
60
  close: () => sandbox.close(),
61
61
  get isActive() {
62
62
  return sandbox.isActive;
@@ -69,11 +69,11 @@ export function createAgentServiceSandboxClient(input = {}) {
69
69
  },
70
70
  };
71
71
  }
72
- const getStartCommandJobInputSchema = defineSchema((v) => v.object({
72
+ const getStartBackgroundCommandInputSchema = defineSchema((v) => v.object({
73
73
  command: v.string().describe("Single shell command to run asynchronously in the sandbox"),
74
74
  }));
75
- const getCommandJobIdInputSchema = defineSchema((v) => v.object({
76
- jobId: v.string().describe("Sandbox command job ID"),
75
+ const getBackgroundCommandIdInputSchema = defineSchema((v) => v.object({
76
+ commandId: v.string().describe("Sandbox background command ID"),
77
77
  }));
78
78
  /** Create agent service sandbox tools. */
79
79
  export async function createAgentServiceSandboxTools(input) {
@@ -81,25 +81,25 @@ export async function createAgentServiceSandboxTools(input) {
81
81
  const shellTools = await createSandboxShellTools(sandbox, input.createBashTool);
82
82
  const tools = {
83
83
  ...shellTools,
84
- start_command_job: tool({
85
- description: "Start a long-running sandbox command as an async job. Use this instead of bash for durable shell operations.",
86
- inputSchema: getStartCommandJobInputSchema(),
87
- execute: async ({ command }) => await sandbox.startCommandJob(command),
84
+ start_background_command: tool({
85
+ description: "Start a long-running sandbox command as an async background command. Use this instead of bash for durable shell operations.",
86
+ inputSchema: getStartBackgroundCommandInputSchema(),
87
+ execute: async ({ command }) => await sandbox.startBackgroundCommand(command),
88
88
  }),
89
- get_command_job: tool({
90
- description: "Get the current status for an async sandbox command job. Use this for polling while a long-running job is still running.",
91
- inputSchema: getCommandJobIdInputSchema(),
92
- execute: async ({ jobId }) => await sandbox.getCommandJob(jobId),
89
+ get_background_command: tool({
90
+ description: "Get the current status for an async sandbox background command. Use this for polling while a long-running command is still running.",
91
+ inputSchema: getBackgroundCommandIdInputSchema(),
92
+ execute: async ({ commandId }) => await sandbox.getBackgroundCommand(commandId),
93
93
  }),
94
- get_command_job_output: tool({
95
- description: "Get the captured stdout/stderr and terminal metadata for an async sandbox command job. Prefer calling this after the job reaches a terminal state.",
96
- inputSchema: getCommandJobIdInputSchema(),
97
- execute: async ({ jobId }) => await sandbox.getCommandJobOutput(jobId),
94
+ get_background_command_output: tool({
95
+ description: "Get the captured stdout/stderr and terminal metadata for an async sandbox background command. Prefer calling this after the command reaches a terminal state.",
96
+ inputSchema: getBackgroundCommandIdInputSchema(),
97
+ execute: async ({ commandId }) => await sandbox.getBackgroundCommandOutput(commandId),
98
98
  }),
99
- cancel_command_job: tool({
100
- description: "Cancel a running async sandbox command job.",
101
- inputSchema: getCommandJobIdInputSchema(),
102
- execute: async ({ jobId }) => await sandbox.cancelCommandJob(jobId),
99
+ cancel_background_command: tool({
100
+ description: "Cancel a running async sandbox background command.",
101
+ inputSchema: getBackgroundCommandIdInputSchema(),
102
+ execute: async ({ commandId }) => await sandbox.cancelBackgroundCommand(commandId),
103
103
  }),
104
104
  };
105
105
  return {
@@ -17,8 +17,8 @@
17
17
  * @module
18
18
  */
19
19
  import "../../_dnt.polyfills.js";
20
- export { type CommandJob, type CommandJobHeartbeatStatus, type CommandJobOutput, type CommandJobStatus, type ExecOptions, type ExecResult, type ExecStreamEvent, Sandbox, type SandboxAttachment, type SandboxListOptions, type SandboxListResult, type SandboxOptions, type SandboxSession, } from "./sandbox.js";
20
+ export { type BackgroundCommand, type BackgroundCommandHeartbeatStatus, type BackgroundCommandOutput, type BackgroundCommandStatus, type ExecOptions, type ExecResult, type ExecStreamEvent, Sandbox, type SandboxAttachment, type SandboxListOptions, type SandboxListResult, type SandboxOptions, type SandboxSession, } from "./sandbox.js";
21
21
  export { LazySandbox, type LazySandboxOptions, resolveDefaultSandboxRuntimeEndpoint, } from "./lazy-sandbox.js";
22
22
  export { type BashToolSandboxLike, type CreateSandboxBashTool, createSandboxShellTools, normalizeBashToolSet, renameSandboxFileTools, type SandboxShellToolDefinition, type SandboxShellToolSet, } from "./shell-tools.js";
23
- export { type AgentServiceSandboxClient, type AgentServiceSandboxClientOptions, type AgentServiceSandboxJobClient, type AgentServiceSandboxToolsOptions, type AgentServiceSandboxToolsResult, createAgentServiceSandboxClient, createAgentServiceSandboxTools, createHostedSandboxClient, createHostedSandboxTools, createProjectScopedExecOptions, type HostedSandboxClient, type HostedSandboxClientOptions, type HostedSandboxJobClient, type HostedSandboxToolsOptions, type HostedSandboxToolsResult, unwrapSandboxWorkingDirectoryCommand, } from "./agent-service-tools.js";
23
+ export { type AgentServiceSandboxBackgroundCommandClient, type AgentServiceSandboxClient, type AgentServiceSandboxClientOptions, type AgentServiceSandboxToolsOptions, type AgentServiceSandboxToolsResult, createAgentServiceSandboxClient, createAgentServiceSandboxTools, createHostedSandboxClient, createHostedSandboxTools, createProjectScopedExecOptions, type HostedSandboxBackgroundCommandClient, type HostedSandboxClient, type HostedSandboxClientOptions, type HostedSandboxToolsOptions, type HostedSandboxToolsResult, unwrapSandboxWorkingDirectoryCommand, } from "./agent-service-tools.js";
24
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/sandbox/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,OAAO,EACP,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,oCAAoC,GACrC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,+BAA+B,EAC/B,8BAA8B,EAC9B,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,oCAAoC,GACrC,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/sandbox/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,OAAO,EACP,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,oCAAoC,GACrC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,0CAA0C,EAC/C,KAAK,yBAAyB,EAC9B,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,+BAA+B,EAC/B,8BAA8B,EAC9B,yBAAyB,EACzB,wBAAwB,EACxB,8BAA8B,EAC9B,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,oCAAoC,GACrC,MAAM,0BAA0B,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type CommandJob, type CommandJobOutput, type ExecOptions, type ExecResult, type ExecStreamEvent, type SandboxOptions } from "./types.js";
1
+ import { type BackgroundCommand, type BackgroundCommandOutput, type ExecOptions, type ExecResult, type ExecStreamEvent, type SandboxOptions } from "./types.js";
2
2
  /** Options accepted by lazy sandbox. */
3
3
  export interface LazySandboxOptions extends SandboxOptions {
4
4
  getProjectId?: () => string | null | undefined;
@@ -41,7 +41,7 @@ export declare class LazySandbox {
41
41
  private heartbeatPromise;
42
42
  private heartbeatTimer;
43
43
  private lastHeartbeatAt;
44
- private readonly activeCommandJobEndpoints;
44
+ private readonly activeBackgroundCommandEndpoints;
45
45
  constructor(options?: LazySandboxOptions);
46
46
  ensure(): Promise<void>;
47
47
  executeCommand(command: string, options?: ExecOptions): Promise<ExecResult>;
@@ -51,11 +51,11 @@ export declare class LazySandbox {
51
51
  path: string;
52
52
  content: string;
53
53
  }>): Promise<void>;
54
- startCommandJob(command: string, options?: ExecOptions): Promise<CommandJob>;
55
- getCommandJob(jobId: string): Promise<CommandJob>;
56
- getCommandJobOutput(jobId: string): Promise<CommandJobOutput>;
57
- listCommandJobs(): Promise<CommandJob[]>;
58
- cancelCommandJob(jobId: string): Promise<CommandJob>;
54
+ startBackgroundCommand(command: string, options?: ExecOptions): Promise<BackgroundCommand>;
55
+ getBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
56
+ getBackgroundCommandOutput(commandId: string): Promise<BackgroundCommandOutput>;
57
+ listBackgroundCommands(): Promise<BackgroundCommand[]>;
58
+ cancelBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
59
59
  heartbeat(force?: boolean): Promise<void>;
60
60
  close(): Promise<void>;
61
61
  get id(): string | null;
@@ -72,8 +72,8 @@ export declare class LazySandbox {
72
72
  private resolveProjectId;
73
73
  private resetSessionState;
74
74
  private resolveExecOptions;
75
- private resolveCommandJobEndpoint;
76
- private updateTrackedCommandJob;
75
+ private resolveBackgroundCommandEndpoint;
76
+ private updateTrackedBackgroundCommand;
77
77
  private startExec;
78
78
  private fetchExecStart;
79
79
  private fetchControl;
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-sandbox.d.ts","sourceRoot":"","sources":["../../../src/src/sandbox/lazy-sandbox.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,gBAAgB,EAErB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAEpB,wCAAwC;AACxC,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,sBAAsB,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,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andEndpoints = new Map();
62
62
  constructor(options = {}) {
63
63
  this.apiUrl = resolveSandboxApiUrl(options);
64
64
  this.authToken = resolveSandboxAuthToken(options);
@@ -172,86 +172,86 @@ export class LazySandbox {
172
172
  });
173
173
  }
174
174
  }
175
- async startCommandJob(command, options) {
175
+ async startBackgroundCommand(command, options) {
176
176
  await this.touchSession();
177
177
  const endpoint = this.resolveRuntimeEndpoint();
178
- const res = await this.fetchControl(`${endpoint}/exec/jobs`, {
178
+ const res = await this.fetchControl(`${endpoint}/exec/commands`, {
179
179
  method: "POST",
180
180
  headers: this.jsonHeaders(),
181
181
  body: JSON.stringify({ command, ...this.resolveExecOptions(options) }),
182
182
  });
183
183
  if (!res.ok) {
184
184
  throw REQUEST_ERROR.create({
185
- detail: `Start command job failed: ${res.status} ${await res.text()}`,
185
+ detail: `Start background command failed: ${res.status} ${await res.text()}`,
186
186
  });
187
187
  }
188
- const job = mapCommandJob(await res.json());
189
- this.updateTrackedCommandJob(job, endpoint);
190
- return job;
188
+ const backgroundCommand = mapBackgroundCommand(await res.json());
189
+ this.updateTrackedBackgroundCommand(backgroundCommand, endpoint);
190
+ return backgroundCommand;
191
191
  }
192
- async getCommandJob(jobId) {
193
- const endpoint = await this.resolveCommandJobEndpoint(jobId);
194
- const res = await this.fetchControl(`${endpoint}/exec/jobs/${jobId}`, {
192
+ async getBackgroundCommand(commandId) {
193
+ const endpoint = await this.resolveBackgroundCommandEndpoint(commandId);
194
+ const res = await this.fetchControl(`${endpoint}/exec/commands/${commandId}`, {
195
195
  headers: this.authHeaders(),
196
196
  });
197
197
  if (!res.ok) {
198
198
  throw REQUEST_ERROR.create({
199
- detail: `Get command job failed: ${res.status} ${await res.text()}`,
199
+ detail: `Get background command failed: ${res.status} ${await res.text()}`,
200
200
  });
201
201
  }
202
- const job = mapCommandJob(await res.json());
203
- this.updateTrackedCommandJob(job, endpoint);
204
- return job;
202
+ const backgroundCommand = mapBackgroundCommand(await res.json());
203
+ this.updateTrackedBackgroundCommand(backgroundCommand, endpoint);
204
+ return backgroundCommand;
205
205
  }
206
- async getCommandJobOutput(jobId) {
207
- const endpoint = await this.resolveCommandJobEndpoint(jobId);
208
- const res = await this.fetchControl(`${endpoint}/exec/jobs/${jobId}/output`, {
206
+ async getBackgroundCommandOutput(commandId) {
207
+ const endpoint = await this.resolveBackgroundCommandEndpoint(commandId);
208
+ const res = await this.fetchControl(`${endpoint}/exec/commands/${commandId}/output`, {
209
209
  headers: this.authHeaders(),
210
210
  });
211
211
  if (!res.ok) {
212
212
  throw REQUEST_ERROR.create({
213
- detail: `Get command job output failed: ${res.status} ${await res.text()}`,
213
+ detail: `Get background command output failed: ${res.status} ${await res.text()}`,
214
214
  });
215
215
  }
216
216
  const json = await res.json();
217
217
  const output = {
218
- ...mapCommandJob(json),
218
+ ...mapBackgroundCommand(json),
219
219
  stdout: json.stdout,
220
220
  stderr: json.stderr,
221
221
  stdoutTruncated: json.stdout_truncated,
222
222
  stderrTruncated: json.stderr_truncated,
223
223
  };
224
- this.updateTrackedCommandJob(output, endpoint);
224
+ this.updateTrackedBackgroundCommand(output, endpoint);
225
225
  return output;
226
226
  }
227
- async listCommandJobs() {
227
+ async listBackgroundCommands() {
228
228
  await this.ensure();
229
- const res = await this.fetchControl(`${this.requireEndpoint()}/exec/jobs`, {
229
+ const res = await this.fetchControl(`${this.requireEndpoint()}/exec/commands`, {
230
230
  headers: this.authHeaders(),
231
231
  });
232
232
  if (!res.ok) {
233
233
  throw REQUEST_ERROR.create({
234
- detail: `List command jobs failed: ${res.status} ${await res.text()}`,
234
+ detail: `List background commands failed: ${res.status} ${await res.text()}`,
235
235
  });
236
236
  }
237
237
  const json = await res.json();
238
- const jobs = Array.isArray(json) ? json : (json.jobs ?? []);
239
- return jobs.map((job) => mapCommandJob(job));
238
+ const commands = Array.isArray(json) ? json : (json.commands ?? []);
239
+ return commands.map((command) => mapBackgroundCommand(command));
240
240
  }
241
- async cancelCommandJob(jobId) {
242
- const endpoint = await this.resolveCommandJobEndpoint(jobId);
243
- const res = await this.fetchControl(`${endpoint}/exec/jobs/${jobId}/cancel`, {
241
+ async cancelBackgroundCommand(commandId) {
242
+ const endpoint = await this.resolveBackgroundCommandEndpoint(commandId);
243
+ const res = await this.fetchControl(`${endpoint}/exec/commands/${commandId}/cancel`, {
244
244
  method: "POST",
245
245
  headers: this.authHeaders(),
246
246
  });
247
247
  if (!res.ok) {
248
248
  throw REQUEST_ERROR.create({
249
- detail: `Cancel command job failed: ${res.status} ${await res.text()}`,
249
+ detail: `Cancel background command failed: ${res.status} ${await res.text()}`,
250
250
  });
251
251
  }
252
- const job = mapCommandJob(await res.json());
253
- this.updateTrackedCommandJob(job, endpoint);
254
- return job;
252
+ const backgroundCommand = mapBackgroundCommand(await res.json());
253
+ this.updateTrackedBackgroundCommand(backgroundCommand, endpoint);
254
+ return backgroundCommand;
255
255
  }
256
256
  async heartbeat(force = false) {
257
257
  const currentSessionId = this.sessionId;
@@ -273,7 +273,7 @@ export class LazySandbox {
273
273
  });
274
274
  if (!res.ok) {
275
275
  if (this.sessionId === currentSessionId) {
276
- if (this.activeCommandJobEndpoints.size === 0) {
276
+ if (this.activeBackgroundCommandEndpoints.size === 0) {
277
277
  await this.deleteSession(currentSessionId);
278
278
  this.resetSessionState(currentSessionId);
279
279
  }
@@ -407,8 +407,9 @@ export class LazySandbox {
407
407
  await this.heartbeat();
408
408
  }
409
409
  startHeartbeatLoop() {
410
- if (!this.sessionId || this.heartbeatTimer || this.activeCommandJobEndpoints.size > 0)
410
+ if (!this.sessionId || this.heartbeatTimer || this.activeBackgroundCommandEndpoints.size > 0) {
411
411
  return;
412
+ }
412
413
  this.heartbeatTimer = dntShim.setInterval(() => {
413
414
  void this.heartbeat().catch(() => {
414
415
  // next operation will reprovision
@@ -439,7 +440,7 @@ export class LazySandbox {
439
440
  resetSessionState(sessionId) {
440
441
  if (!sessionId || this.sessionId === sessionId) {
441
442
  this.stopHeartbeatLoop();
442
- this.activeCommandJobEndpoints.clear();
443
+ this.activeBackgroundCommandEndpoints.clear();
443
444
  this.endpoint = null;
444
445
  this.sessionId = null;
445
446
  this.sessionProjectId = null;
@@ -451,24 +452,24 @@ export class LazySandbox {
451
452
  const projectReference = options?.projectReference ?? this.resolveProjectId() ?? undefined;
452
453
  return projectReference ? { ...options, projectReference } : options;
453
454
  }
454
- async resolveCommandJobEndpoint(jobId) {
455
- const trackedEndpoint = this.activeCommandJobEndpoints.get(jobId);
455
+ async resolveBackgroundCommandEndpoint(commandId) {
456
+ const trackedEndpoint = this.activeBackgroundCommandEndpoints.get(commandId);
456
457
  if (trackedEndpoint) {
457
458
  return trackedEndpoint;
458
459
  }
459
460
  await this.ensure();
460
461
  return this.resolveRuntimeEndpoint();
461
462
  }
462
- updateTrackedCommandJob(job, endpoint) {
463
- if (job.status === "running") {
464
- this.activeCommandJobEndpoints.set(job.id, endpoint);
463
+ updateTrackedBackgroundCommand(backgroundCommand, endpoint) {
464
+ if (backgroundCommand.status === "running") {
465
+ this.activeBackgroundCommandEndpoints.set(backgroundCommand.id, endpoint);
465
466
  this.stopHeartbeatLoop();
466
467
  return;
467
468
  }
468
- if (!this.activeCommandJobEndpoints.delete(job.id)) {
469
+ if (!this.activeBackgroundCommandEndpoints.delete(backgroundCommand.id)) {
469
470
  return;
470
471
  }
471
- if (this.activeCommandJobEndpoints.size === 0 && this.endpoint) {
472
+ if (this.activeBackgroundCommandEndpoints.size === 0 && this.endpoint) {
472
473
  this.startHeartbeatLoop();
473
474
  }
474
475
  }
@@ -568,7 +569,7 @@ async function fetchWithTimeout(url, timeoutMs, init = {}) {
568
569
  clearTimeout(timeout);
569
570
  }
570
571
  }
571
- function mapCommandJob(json) {
572
+ function mapBackgroundCommand(json) {
572
573
  return {
573
574
  id: json.id,
574
575
  status: json.status,
@@ -1,7 +1,7 @@
1
1
  import { LazySandbox, type LazySandboxOptions } from "./lazy-sandbox.js";
2
- import type { CommandJob, CommandJobOutput, ExecOptions, ExecResult, ExecStreamEvent, SandboxAttachment, SandboxListOptions, SandboxListResult, SandboxOptions } from "./types.js";
2
+ import type { BackgroundCommand, BackgroundCommandOutput, ExecOptions, ExecResult, ExecStreamEvent, SandboxAttachment, SandboxListOptions, SandboxListResult, SandboxOptions } from "./types.js";
3
3
  export { resolveSandboxApiUrl, resolveSandboxAuthToken } from "./config.js";
4
- export type { CommandJob, CommandJobHeartbeatStatus, CommandJobOutput, CommandJobStatus, ExecOptions, ExecResult, ExecStreamEvent, SandboxAttachment, SandboxListOptions, SandboxListResult, SandboxOptions, SandboxSession, } from "./types.js";
4
+ export type { BackgroundCommand, BackgroundCommandHeartbeatStatus, BackgroundCommandOutput, BackgroundCommandStatus, ExecOptions, ExecResult, ExecStreamEvent, SandboxAttachment, SandboxListOptions, SandboxListResult, SandboxOptions, SandboxSession, } from "./types.js";
5
5
  /** Client for isolated ephemeral compute environments with command execution and file I/O. */
6
6
  export declare class Sandbox {
7
7
  private endpoint;
@@ -33,17 +33,17 @@ export declare class Sandbox {
33
33
  path: string;
34
34
  content: string;
35
35
  }>): Promise<void>;
36
- /** Start an async command job in the sandbox. */
37
- startCommandJob(command: string, options?: ExecOptions): Promise<CommandJob>;
38
- /** Get the status of an async command job. */
39
- getCommandJob(jobId: string): Promise<CommandJob>;
40
- /** Get the output of an async command job. */
41
- getCommandJobOutput(jobId: string): Promise<CommandJobOutput>;
42
- /** List all command jobs in the sandbox. */
43
- listCommandJobs(): Promise<CommandJob[]>;
44
- /** Cancel an async command job. */
45
- cancelCommandJob(jobId: string): Promise<CommandJob>;
46
- private static mapCommandJob;
36
+ /** Start an async background command in the sandbox. */
37
+ startBackgroundCommand(command: string, options?: ExecOptions): Promise<BackgroundCommand>;
38
+ /** Get the status of an async background command. */
39
+ getBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
40
+ /** Get the output of an async background command. */
41
+ getBackgroundCommandOutput(commandId: string): Promise<BackgroundCommandOutput>;
42
+ /** List all background commands in the sandbox. */
43
+ listBackgroundCommands(): Promise<BackgroundCommand[]>;
44
+ /** Cancel an async background command. */
45
+ cancelBackgroundCommand(commandId: string): Promise<BackgroundCommand>;
46
+ private static mapBackgroundCommand;
47
47
  /** Send a heartbeat to prevent idle timeout. */
48
48
  heartbeat(): Promise<void>;
49
49
  /** Close the sandbox session and mark for deletion. */
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/src/sandbox/sandbox.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,KAAK,EACV,UAAU,EAEV,gBAAgB,EAEhB,WAAW,EACX,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC5E,YAAY,EACV,UAAU,EACV,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC;AAEpB,8FAA8F;AAC9F,qBAAa,OAAO;IAEhB,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,MAAM;IAJhB,OAAO;IAOP,OAAO,CAAC,MAAM,CAAC,aAAa;IAI5B,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B,4EAA4E;WAC/D,MAAM,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IA6BnE,gDAAgD;WACnC,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;IAkB5E,0FAA0F;IAC1F,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,iB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;IAkB5D,0CAA0C;IACpC,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAe5E,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAenC,gDAAgD;IAC1C,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAahC,uDAAuD;IACjD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAa5B,0BAA0B;IAC1B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,oCAAoC;IACpC,IAAI,GAAG,IAAI,MAAM,CAEhB;CACF;AAED,wBAAsB,mBAAmB,CAAC,KAAK,EAAE;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0BhB"}
@@ -199,9 +199,9 @@ export class Sandbox {
199
199
  });
200
200
  }
201
201
  }
202
- /** Start an async command job in the sandbox. */
203
- async startCommandJob(command, options) {
204
- const res = await fetch(`${this.endpoint}/exec/jobs`, {
202
+ /** Start an async background command in the sandbox. */
203
+ async startBackgroundCommand(command, options) {
204
+ const res = await fetch(`${this.endpoint}/exec/commands`, {
205
205
  method: "POST",
206
206
  headers: {
207
207
  Authorization: `Bearer ${this.authToken}`,
@@ -211,70 +211,70 @@ export class Sandbox {
211
211
  });
212
212
  if (!res.ok) {
213
213
  throw REQUEST_ERROR.create({
214
- detail: `Start command job failed: ${res.status} ${await res.text()}`,
214
+ detail: `Start background command failed: ${res.status} ${await res.text()}`,
215
215
  });
216
216
  }
217
- return Sandbox.mapCommandJob(await res.json());
217
+ return Sandbox.mapBackgroundCommand(await res.json());
218
218
  }
219
- /** Get the status of an async command job. */
220
- async getCommandJob(jobId) {
221
- const res = await fetch(`${this.endpoint}/exec/jobs/${jobId}`, {
219
+ /** Get the status of an async background command. */
220
+ async getBackgroundCommand(commandId) {
221
+ const res = await fetch(`${this.endpoint}/exec/commands/${commandId}`, {
222
222
  headers: { Authorization: `Bearer ${this.authToken}` },
223
223
  });
224
224
  if (!res.ok) {
225
225
  throw REQUEST_ERROR.create({
226
- detail: `Get command job failed: ${res.status} ${await res.text()}`,
226
+ detail: `Get background command failed: ${res.status} ${await res.text()}`,
227
227
  });
228
228
  }
229
- return Sandbox.mapCommandJob(await res.json());
229
+ return Sandbox.mapBackgroundCommand(await res.json());
230
230
  }
231
- /** Get the output of an async command job. */
232
- async getCommandJobOutput(jobId) {
233
- const res = await fetch(`${this.endpoint}/exec/jobs/${jobId}/output`, {
231
+ /** Get the output of an async background command. */
232
+ async getBackgroundCommandOutput(commandId) {
233
+ const res = await fetch(`${this.endpoint}/exec/commands/${commandId}/output`, {
234
234
  headers: { Authorization: `Bearer ${this.authToken}` },
235
235
  });
236
236
  if (!res.ok) {
237
237
  throw REQUEST_ERROR.create({
238
- detail: `Get command job output failed: ${res.status} ${await res.text()}`,
238
+ detail: `Get background command output failed: ${res.status} ${await res.text()}`,
239
239
  });
240
240
  }
241
241
  const json = await res.json();
242
242
  return {
243
- ...Sandbox.mapCommandJob(json),
243
+ ...Sandbox.mapBackgroundCommand(json),
244
244
  stdout: json.stdout,
245
245
  stderr: json.stderr,
246
246
  stdoutTruncated: json.stdout_truncated,
247
247
  stderrTruncated: json.stderr_truncated,
248
248
  };
249
249
  }
250
- /** List all command jobs in the sandbox. */
251
- async listCommandJobs() {
252
- const res = await fetch(`${this.endpoint}/exec/jobs`, {
250
+ /** List all background commands in the sandbox. */
251
+ async listBackgroundCommands() {
252
+ const res = await fetch(`${this.endpoint}/exec/commands`, {
253
253
  headers: { Authorization: `Bearer ${this.authToken}` },
254
254
  });
255
255
  if (!res.ok) {
256
256
  throw REQUEST_ERROR.create({
257
- detail: `List command jobs failed: ${res.status} ${await res.text()}`,
257
+ detail: `List background commands failed: ${res.status} ${await res.text()}`,
258
258
  });
259
259
  }
260
260
  const json = await res.json();
261
- const jobs = Array.isArray(json) ? json : (json.jobs ?? []);
262
- return jobs.map((j) => Sandbox.mapCommandJob(j));
261
+ const commands = Array.isArray(json) ? json : (json.commands ?? []);
262
+ return commands.map((command) => Sandbox.mapBackgroundCommand(command));
263
263
  }
264
- /** Cancel an async command job. */
265
- async cancelCommandJob(jobId) {
266
- const res = await fetch(`${this.endpoint}/exec/jobs/${jobId}/cancel`, {
264
+ /** Cancel an async background command. */
265
+ async cancelBackgroundCommand(commandId) {
266
+ const res = await fetch(`${this.endpoint}/exec/commands/${commandId}/cancel`, {
267
267
  method: "POST",
268
268
  headers: { Authorization: `Bearer ${this.authToken}` },
269
269
  });
270
270
  if (!res.ok) {
271
271
  throw REQUEST_ERROR.create({
272
- detail: `Cancel command job failed: ${res.status} ${await res.text()}`,
272
+ detail: `Cancel background command failed: ${res.status} ${await res.text()}`,
273
273
  });
274
274
  }
275
- return Sandbox.mapCommandJob(await res.json());
275
+ return Sandbox.mapBackgroundCommand(await res.json());
276
276
  }
277
- static mapCommandJob(json) {
277
+ static mapBackgroundCommand(json) {
278
278
  return {
279
279
  id: json.id,
280
280
  status: json.status,
@@ -30,25 +30,25 @@ export interface ExecStreamEvent {
30
30
  data?: string;
31
31
  exitCode?: number;
32
32
  }
33
- /** Status of an async command job. */
34
- export type CommandJobStatus = "running" | "completed" | "failed" | "canceled";
35
- /** Heartbeat health status for a command job. */
36
- export type CommandJobHeartbeatStatus = "disabled" | "healthy" | "degraded";
37
- /** An async command job running in a sandbox. */
38
- export interface CommandJob {
33
+ /** Status of an async background command. */
34
+ export type BackgroundCommandStatus = "running" | "completed" | "failed" | "canceled";
35
+ /** Heartbeat health status for a background command. */
36
+ export type BackgroundCommandHeartbeatStatus = "disabled" | "healthy" | "degraded";
37
+ /** An async background command running in a sandbox. */
38
+ export interface BackgroundCommand {
39
39
  id: string;
40
- status: CommandJobStatus;
40
+ status: BackgroundCommandStatus;
41
41
  exitCode: number | null;
42
42
  signal: string | null;
43
43
  startedAt: string;
44
44
  finishedAt: string | null;
45
- heartbeatStatus: CommandJobHeartbeatStatus;
45
+ heartbeatStatus: BackgroundCommandHeartbeatStatus;
46
46
  lastHeartbeatAt: string | null;
47
47
  lastHeartbeatError: string | null;
48
48
  heartbeatFailureCount: number;
49
49
  }
50
- /** A command job with its captured output. */
51
- export interface CommandJobOutput extends CommandJob {
50
+ /** A background command with its captured output. */
51
+ export interface BackgroundCommandOutput extends BackgroundCommand {
52
52
  stdout: string;
53
53
  stderr: string;
54
54
  stdoutTruncated: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/sandbox/types.ts"],"names":[],"mappings":"AAAA,wHAAwH;AACxH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wDAAwD;IACxD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,8GAA8G;IAC9G,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,kGAAkG;IAClG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;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;QACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB,CAAC;CACH;AAED,2FAA2F;AAC3F,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.577";
2
+ export declare const VERSION = "0.1.579";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.577";
4
+ export const VERSION = "0.1.579";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.577",
3
+ "version": "0.1.579",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -292,7 +292,9 @@
292
292
  "node": ">=18.0.0"
293
293
  },
294
294
  "optionalDependencies": {
295
- "@huggingface/transformers": "^3.4.2"
295
+ "@huggingface/transformers": "^3.4.2",
296
+ "bash-tool": "1.3.16",
297
+ "just-bash": "^2.14.5"
296
298
  },
297
299
  "peerDependenciesMeta": {
298
300
  "better-sqlite3": {
@@ -330,9 +332,6 @@
330
332
  },
331
333
  "@opentelemetry/semantic-conventions": {
332
334
  "optional": true
333
- },
334
- "bash-tool": {
335
- "optional": true
336
335
  }
337
336
  },
338
337
  "dependencies": {
@@ -386,8 +385,7 @@
386
385
  "@opentelemetry/resources": "2.7.1",
387
386
  "@opentelemetry/sdk-node": "0.218.0",
388
387
  "@opentelemetry/sdk-trace-base": "2.7.1",
389
- "@opentelemetry/semantic-conventions": "1.40.0",
390
- "bash-tool": "1.3.16"
388
+ "@opentelemetry/semantic-conventions": "1.40.0"
391
389
  },
392
390
  "devDependencies": {
393
391
  "@types/node": "^20.9.0"