@finalai/final-agent-provider 0.15.0 → 0.15.1
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/dist/modules/harnesses/adapters.mjs +5 -2
- package/dist/modules/harnesses/adapters.mjs.map +2 -2
- package/dist/modules/sandboxes/computers-api-transport.d.mts +0 -1
- package/dist/modules/sandboxes/computers-api-transport.mjs +4 -5
- package/dist/modules/sandboxes/computers-api-transport.mjs.map +2 -2
- package/package.json +2 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const claudeCodeAdapterPackage = { "name": "@finalai/acp-adapter-claude-code", "version": "0.3.0" };
|
|
2
|
+
const codexAdapterPackage = { "name": "@finalai/acp-adapter-codex", "version": "0.2.1" };
|
|
1
3
|
import { defineAcpAdapter } from "@finalai/agent-definition/authoring";
|
|
2
4
|
import { FinalExtension } from "@finalai/agent-provider";
|
|
3
5
|
import { REQUIRED_FINAL_EXTENSIONS } from "../provider/general.mjs";
|
|
@@ -16,6 +18,7 @@ const NANOCODE_ACP_ADAPTER = defineAcpAdapter({
|
|
|
16
18
|
run: { worker: { program: "nanocode" } },
|
|
17
19
|
extensions: [...REQUIRED_FINAL_EXTENSIONS]
|
|
18
20
|
});
|
|
21
|
+
const releaseOf = (manifest) => `${manifest.name}@${manifest.version}`;
|
|
19
22
|
const permissionArgs = {
|
|
20
23
|
when: "configuration.permissionMode",
|
|
21
24
|
args: ["--permission-mode", "{{configuration.permissionMode}}"]
|
|
@@ -29,7 +32,7 @@ const CLAUDE_CODE_ACP_ADAPTER = defineAcpAdapter({
|
|
|
29
32
|
command: "npx",
|
|
30
33
|
args: [
|
|
31
34
|
"-y",
|
|
32
|
-
|
|
35
|
+
releaseOf(claudeCodeAdapterPackage),
|
|
33
36
|
permissionArgs,
|
|
34
37
|
"--",
|
|
35
38
|
"{{harness.command}}",
|
|
@@ -48,7 +51,7 @@ const CODEX_ACP_ADAPTER = defineAcpAdapter({
|
|
|
48
51
|
command: "npx",
|
|
49
52
|
args: [
|
|
50
53
|
"-y",
|
|
51
|
-
|
|
54
|
+
releaseOf(codexAdapterPackage),
|
|
52
55
|
permissionArgs,
|
|
53
56
|
"--",
|
|
54
57
|
"{{harness.command}}",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/harnesses/adapters.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,sBAAsD;AAC/D,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB,6BAA6B;AAShD,MAAM,iBAA4C,iBAAiB;AAAA,EACxE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,OAAO;AAAA,EACtC,KAAK,EAAE,QAAQ,EAAE,SAAS,KAAK,EAAE;AAAA,EACjC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAEM,MAAM,uBAAkD,iBAAiB;AAAA,EAC9E,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,QAAQ;AAAA,EACvC,KAAK,EAAE,QAAQ,EAAE,SAAS,WAAW,EAAE;AAAA,EACvC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;
|
|
4
|
+
"sourcesContent": ["const claudeCodeAdapterPackage = {\"name\":\"@finalai/acp-adapter-claude-code\",\"version\":\"0.3.0\"};\nconst codexAdapterPackage = {\"name\":\"@finalai/acp-adapter-codex\",\"version\":\"0.2.1\"};\nimport { defineAcpAdapter } from '@finalai/agent-definition/authoring';\nimport { FinalExtension, type AcpAdapterDefinitionIface } from '@finalai/agent-provider';\nimport { REQUIRED_FINAL_EXTENSIONS } from \"../provider/general.mjs\";\nimport { FinalAcpAdapter, FinalHarnessInterface } from \"./names.mjs\";\n\n// Final's ACP adapters. Each implements ACP v2 and Final's ACP extensions and\n// advertises them in `initialize`; the general harness provider refuses an\n// adapter that does not (../provider/general.ts). Fork is optional.\n\n// The worker runtime's engines that map a harness program to ACP v2. The\n// worker program started is the engine; the harness's own program comes in\n// its input (`{ harness: { program }, configuration }`).\nexport const PI_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Pi ACP adapter',\n description: 'Maps the Pi agent loop (Pi and the Final harness) to ACP v2 on a worker runtime.',\n adapts: [FinalHarnessInterface.PiAgent],\n run: { worker: { program: 'pi' } },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\nexport const NANOCODE_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'nanocode ACP adapter',\n description: \"Maps nanocode's Claude and Codex engines to ACP v2 on a worker runtime.\",\n adapts: [FinalHarnessInterface.Nanocode],\n run: { worker: { program: 'nanocode' } },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\n// The process adapters are published packages. Each takes the harness's\n// command line after `--` and launches it as the program it adapts; the\n// permission level is Final's (`ask`, `review`, `auto`), mapped by the\n// adapter onto the program's own modes.\n// An adapter package's exact release, as npx installs it: `npx -y <name>` alone resolves npm's\n// `latest` tag, which need not be the release these definitions were made with. The version is\n// the adapter package's own (inlined when this package is built).\nconst releaseOf = (manifest: { name: string; version: string }): string =>\n `${manifest.name}@${manifest.version}`;\n\nconst permissionArgs = {\n when: 'configuration.permissionMode',\n args: ['--permission-mode', '{{configuration.permissionMode}}'],\n};\n\nexport const CLAUDE_CODE_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Claude Code ACP adapter',\n description: 'Runs Claude Code through the Claude Agent SDK and speaks ACP v2 on stdio.',\n adapts: [FinalHarnessInterface.ClaudeAgentSdk],\n run: {\n process: {\n command: 'npx',\n args: [\n '-y',\n releaseOf(claudeCodeAdapterPackage),\n permissionArgs,\n '--',\n '{{harness.command}}',\n { spread: 'harness.args' },\n ],\n },\n },\n extensions: [...REQUIRED_FINAL_EXTENSIONS, FinalExtension.Fork],\n});\n\nexport const CODEX_ACP_ADAPTER: AcpAdapterDefinitionIface = defineAcpAdapter({\n title: 'Codex ACP adapter',\n description: 'Runs the Codex app-server and speaks ACP v2 on stdio.',\n adapts: [FinalHarnessInterface.CodexAppServer],\n run: {\n process: {\n command: 'npx',\n args: [\n '-y',\n releaseOf(codexAdapterPackage),\n permissionArgs,\n '--',\n '{{harness.command}}',\n { spread: 'harness.args' },\n ],\n },\n },\n extensions: [...REQUIRED_FINAL_EXTENSIONS],\n});\n\nexport const FINAL_ACP_ADAPTERS: Record<FinalAcpAdapter, AcpAdapterDefinitionIface> = {\n [FinalAcpAdapter.Pi]: PI_ACP_ADAPTER,\n [FinalAcpAdapter.Nanocode]: NANOCODE_ACP_ADAPTER,\n [FinalAcpAdapter.ClaudeCode]: CLAUDE_CODE_ACP_ADAPTER,\n [FinalAcpAdapter.Codex]: CODEX_ACP_ADAPTER,\n};\n"],
|
|
5
|
+
"mappings": "AAAA,MAAM,2BAA2B,EAAC,QAAO,oCAAmC,WAAU,QAAO;AAC7F,MAAM,sBAAsB,EAAC,QAAO,8BAA6B,WAAU,QAAO;AAClF,SAAS,wBAAwB;AACjC,SAAS,sBAAsD;AAC/D,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB,6BAA6B;AAShD,MAAM,iBAA4C,iBAAiB;AAAA,EACxE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,OAAO;AAAA,EACtC,KAAK,EAAE,QAAQ,EAAE,SAAS,KAAK,EAAE;AAAA,EACjC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAEM,MAAM,uBAAkD,iBAAiB;AAAA,EAC9E,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,QAAQ;AAAA,EACvC,KAAK,EAAE,QAAQ,EAAE,SAAS,WAAW,EAAE;AAAA,EACvC,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AASD,MAAM,YAAY,CAAC,aACjB,GAAG,SAAS,IAAI,IAAI,SAAS,OAAO;AAEtC,MAAM,iBAAiB;AAAA,EACrB,MAAM;AAAA,EACN,MAAM,CAAC,qBAAqB,kCAAkC;AAChE;AAEO,MAAM,0BAAqD,iBAAiB;AAAA,EACjF,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,cAAc;AAAA,EAC7C,KAAK;AAAA,IACH,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,QACJ;AAAA,QACA,UAAU,wBAAwB;AAAA,QAClC;AAAA,QACA;AAAA,QACA;AAAA,QACA,EAAE,QAAQ,eAAe;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY,CAAC,GAAG,2BAA2B,eAAe,IAAI;AAChE,CAAC;AAEM,MAAM,oBAA+C,iBAAiB;AAAA,EAC3E,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ,CAAC,sBAAsB,cAAc;AAAA,EAC7C,KAAK;AAAA,IACH,SAAS;AAAA,MACP,SAAS;AAAA,MACT,MAAM;AAAA,QACJ;AAAA,QACA,UAAU,mBAAmB;AAAA,QAC7B;AAAA,QACA;AAAA,QACA;AAAA,QACA,EAAE,QAAQ,eAAe;AAAA,MAC3B;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY,CAAC,GAAG,yBAAyB;AAC3C,CAAC;AAEM,MAAM,qBAAyE;AAAA,EACpF,CAAC,gBAAgB,EAAE,GAAG;AAAA,EACtB,CAAC,gBAAgB,QAAQ,GAAG;AAAA,EAC5B,CAAC,gBAAgB,UAAU,GAAG;AAAA,EAC9B,CAAC,gBAAgB,KAAK,GAAG;AAC3B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ComputersApiClientIface } from "./computers-api.mjs";
|
|
2
2
|
import type { SandboxTransportIface } from "./transport.mjs";
|
|
3
|
-
export declare const DEFAULT_EXEC_USER = "user";
|
|
4
3
|
export interface CreateComputersApiTransportArgsIface {
|
|
5
4
|
client: ComputersApiClientIface;
|
|
6
5
|
computerId: string;
|
|
@@ -8,7 +8,6 @@ import { shellQuote } from "./paths.mjs";
|
|
|
8
8
|
const FILE_CHUNK_BYTES = 1024 * 1024;
|
|
9
9
|
const PROCESS_GONE_MESSAGE = /process not found|stale boot id/i;
|
|
10
10
|
const OUTPUT_WAIT_MS = 25e3;
|
|
11
|
-
const DEFAULT_EXEC_USER = "user";
|
|
12
11
|
const toOutput = (output) => ({
|
|
13
12
|
stdout: {
|
|
14
13
|
data: decodeBase64(output.stdout.dataB64),
|
|
@@ -36,13 +35,13 @@ const findTypes = /* @__PURE__ */ new Map([
|
|
|
36
35
|
["l", SandboxEntryType.Symlink]
|
|
37
36
|
]);
|
|
38
37
|
const createComputersApiTransport = (args) => {
|
|
39
|
-
const user = args.user
|
|
38
|
+
const user = args.user;
|
|
40
39
|
const readyTimeoutMs = args.readyTimeoutMs ?? 12e4;
|
|
41
40
|
const capture = async (script) => {
|
|
42
41
|
const result = await args.client.run(args.computerId, {
|
|
43
42
|
command: script,
|
|
44
43
|
cwd: "/",
|
|
45
|
-
user,
|
|
44
|
+
...user == null ? {} : { user },
|
|
46
45
|
readyTimeoutMs,
|
|
47
46
|
autoResume: false,
|
|
48
47
|
timeoutMs: 6e4
|
|
@@ -144,7 +143,8 @@ const createComputersApiTransport = (args) => {
|
|
|
144
143
|
);
|
|
145
144
|
},
|
|
146
145
|
exec: async ({ command, cwd, env, timeoutMs }) => {
|
|
147
|
-
const body = { command, cwd, env,
|
|
146
|
+
const body = { command, cwd, env, readyTimeoutMs, autoResume: false };
|
|
147
|
+
if (user != null) body.user = user;
|
|
148
148
|
if (timeoutMs != null) body.timeoutMs = timeoutMs;
|
|
149
149
|
return args.client.exec(args.computerId, body);
|
|
150
150
|
},
|
|
@@ -198,7 +198,6 @@ const createComputersApiTransport = (args) => {
|
|
|
198
198
|
};
|
|
199
199
|
};
|
|
200
200
|
export {
|
|
201
|
-
DEFAULT_EXEC_USER,
|
|
202
201
|
createComputersApiTransport
|
|
203
202
|
};
|
|
204
203
|
//# sourceMappingURL=computers-api-transport.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/sandboxes/computers-api-transport.ts"],
|
|
4
|
-
"sourcesContent": ["import { SandboxEntryType } from '@finalai/agent-provider/sandbox';\nimport { decodeBase64, encodeBase64 } from \"./bytes.mjs\";\nimport {\n isComputersApiError,\n isComputersApiStatus,\n type ComputerProcessOutputIface,\n type ComputersApiClientIface,\n type ExecBodyIface,\n} from \"./computers-api.mjs\";\nimport { shellQuote } from \"./paths.mjs\";\nimport type {\n SandboxTransportIface,\n TransportDirEntryIface,\n TransportOutputIface,\n TransportStatIface,\n} from \"./transport.mjs\";\n\n// The public Computers API as a sandbox transport: files are ranged base64 reads and\n// replace-then-append writes; processes are managed processes with offset-polled\n// output. The API has no stat, list or remove, so those run as one short command.\n\nconst FILE_CHUNK_BYTES = 1024 * 1024;\n// The guest agent's answers (409) for an unknown process and one from an earlier boot.\nconst PROCESS_GONE_MESSAGE = /process not found|stale boot id/i;\n// The service caps a long-poll at 30 s.\nconst OUTPUT_WAIT_MS = 25_000;\
|
|
5
|
-
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,kBAAkB;AAY3B,MAAM,mBAAmB,OAAO;AAEhC,MAAM,uBAAuB;AAE7B,MAAM,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import { SandboxEntryType } from '@finalai/agent-provider/sandbox';\nimport { decodeBase64, encodeBase64 } from \"./bytes.mjs\";\nimport {\n isComputersApiError,\n isComputersApiStatus,\n type ComputerProcessOutputIface,\n type ComputersApiClientIface,\n type ExecBodyIface,\n} from \"./computers-api.mjs\";\nimport { shellQuote } from \"./paths.mjs\";\nimport type {\n SandboxTransportIface,\n TransportDirEntryIface,\n TransportOutputIface,\n TransportStatIface,\n} from \"./transport.mjs\";\n\n// The public Computers API as a sandbox transport: files are ranged base64 reads and\n// replace-then-append writes; processes are managed processes with offset-polled\n// output. The API has no stat, list or remove, so those run as one short command.\n\nconst FILE_CHUNK_BYTES = 1024 * 1024;\n// The guest agent's answers (409) for an unknown process and one from an earlier boot.\nconst PROCESS_GONE_MESSAGE = /process not found|stale boot id/i;\n// The service caps a long-poll at 30 s.\nconst OUTPUT_WAIT_MS = 25_000;\n\nconst toOutput = (output: ComputerProcessOutputIface): TransportOutputIface => ({\n stdout: {\n data: decodeBase64(output.stdout.dataB64),\n nextOffset: output.stdout.nextOffset,\n eof: output.stdout.eof,\n },\n stderr: {\n data: decodeBase64(output.stderr.dataB64),\n nextOffset: output.stderr.nextOffset,\n eof: output.stderr.eof,\n },\n exited: output.state === 'exited',\n exitCode: output.result?.exitCode ?? null,\n exitSignal: output.result?.signal ?? null,\n});\n\nconst statTypes = new Map([\n ['regular file', SandboxEntryType.File],\n ['regular empty file', SandboxEntryType.File],\n ['directory', SandboxEntryType.Directory],\n ['symbolic link', SandboxEntryType.Symlink],\n]);\nconst findTypes = new Map([\n ['f', SandboxEntryType.File],\n ['d', SandboxEntryType.Directory],\n ['l', SandboxEntryType.Symlink],\n]);\n\nexport interface CreateComputersApiTransportArgsIface {\n client: ComputersApiClientIface;\n computerId: string;\n // Who commands run as; unset, the image's own user (its `USER`), which any image has. Naming\n // an account the image lacks fails every command.\n user?: string;\n // How long a call waits for a waking computer to accept processes.\n readyTimeoutMs?: number;\n}\n\nexport const createComputersApiTransport = (\n args: CreateComputersApiTransportArgsIface,\n): SandboxTransportIface => {\n const user = args.user;\n const readyTimeoutMs = args.readyTimeoutMs ?? 120_000;\n\n // A short helper command, read to completion.\n const capture = async (\n script: string,\n ): Promise<{ exitCode: number | null; stdout: string; stderr: string }> => {\n const result = await args.client.run(args.computerId, {\n command: script,\n cwd: '/',\n ...(user == null ? {} : { user }),\n readyTimeoutMs,\n autoResume: false,\n timeoutMs: 60_000,\n });\n let output = toOutput(result);\n const stdout: Uint8Array[] = [output.stdout.data];\n const stderr: Uint8Array[] = [output.stderr.data];\n while (!(output.exited && output.stdout.eof && output.stderr.eof)) {\n output = toOutput(\n await args.client.output({\n computerId: args.computerId,\n processId: result.id,\n bootId: result.bootId,\n stdoutOffset: output.stdout.nextOffset,\n stderrOffset: output.stderr.nextOffset,\n waitMs: OUTPUT_WAIT_MS,\n }),\n );\n stdout.push(output.stdout.data);\n stderr.push(output.stderr.data);\n }\n const decode = (chunks: Uint8Array[]): string => {\n const decoder = new TextDecoder();\n return (\n chunks.map((chunk) => decoder.decode(chunk, { stream: true })).join('') + decoder.decode()\n );\n };\n return { exitCode: output.exitCode, stdout: decode(stdout), stderr: decode(stderr) };\n };\n\n const failIfNonZero = (\n label: string,\n result: { exitCode: number | null; stderr: string },\n ): void => {\n if (result.exitCode !== 0)\n throw new Error(`${label}: ${result.stderr.trim() || `exit ${result.exitCode}`}`);\n };\n\n return {\n kind: 'computers-api',\n fileChunkBytes: FILE_CHUNK_BYTES,\n outputWaitMs: OUTPUT_WAIT_MS,\n stat: async ({ path }): Promise<TransportStatIface | null> => {\n const quoted = shellQuote(path);\n const result = await capture(\n `if [ ! -e ${quoted} ] && [ ! -L ${quoted} ]; then echo missing; exit 0; fi; stat -c '%F|%s|%Y|%a' -- ${quoted}`,\n );\n failIfNonZero(`stat ${path}`, result);\n const line = result.stdout.trim();\n if (line === 'missing') return null;\n const [kind, size, mtime, mode] = line.split('|');\n return {\n type: statTypes.get(kind ?? '') ?? SandboxEntryType.Other,\n size: Number(size ?? 0),\n modifiedAtMs: mtime == null ? null : Number(mtime) * 1000,\n mode: mode == null ? null : Number.parseInt(mode, 8),\n };\n },\n readDir: async ({ path }): Promise<TransportDirEntryIface[]> => {\n const quoted = shellQuote(path);\n const result = await capture(\n `[ -d ${quoted} ] || { echo 'Not a directory' >&2; exit 2; }; find ${quoted} -mindepth 1 -maxdepth 1 -printf '%y\\\\t%s\\\\t%f\\\\0'`,\n );\n failIfNonZero(`list ${path}`, result);\n return result.stdout\n .split('\\0')\n .filter((entry) => entry !== '')\n .map((entry) => {\n const [kind, size, ...name] = entry.split('\\t');\n return {\n name: name.join('\\t'),\n type: findTypes.get(kind ?? '') ?? SandboxEntryType.Other,\n size: size == null ? null : Number(size),\n };\n });\n },\n readChunk: async ({ path, offset, length, signal }) => {\n const read = await args.client.readFile({\n computerId: args.computerId,\n path,\n offset,\n length,\n signal,\n });\n return { bytes: decodeBase64(read.dataB64), eof: read.eof };\n },\n writeChunk: async ({ path, offset, bytes, signal }) => {\n await args.client.writeFile({\n computerId: args.computerId,\n path,\n dataB64: encodeBase64(bytes),\n append: offset > 0,\n signal,\n });\n },\n createDirectory: async ({ path }) => {\n failIfNonZero(`mkdir ${path}`, await capture(`mkdir -p -- ${shellQuote(path)}`));\n },\n remove: async ({ path, recursive, force }) => {\n const quoted = shellQuote(path);\n const flags = `${recursive ? 'r' : ''}${force ? 'f' : ''}`;\n const removeDirectory = recursive ? `rm -${flags} -- ${quoted}` : `rmdir -- ${quoted}`;\n const removeFile = `rm ${force ? '-f ' : ''}-- ${quoted}`;\n failIfNonZero(\n `remove ${path}`,\n await capture(\n `if [ -d ${quoted} ] && [ ! -L ${quoted} ]; then ${removeDirectory}; else ${removeFile}; fi`,\n ),\n );\n },\n exec: async ({ command, cwd, env, timeoutMs }) => {\n const body: ExecBodyIface = { command, cwd, env, readyTimeoutMs, autoResume: false };\n if (user != null) body.user = user;\n if (timeoutMs != null) body.timeoutMs = timeoutMs;\n return args.client.exec(args.computerId, body);\n },\n output: async ({ process, stdoutOffset, stderrOffset, waitMs, signal }) =>\n toOutput(\n await args.client.output({\n computerId: args.computerId,\n processId: process.id,\n bootId: process.bootId,\n stdoutOffset,\n stderrOffset,\n waitMs,\n signal,\n }),\n ),\n input: async ({ process, data, eof, signal, terminate }) => {\n if (terminate === true) {\n await args.client.terminate({\n computerId: args.computerId,\n processId: process.id,\n bootId: process.bootId,\n });\n return;\n }\n const base = { bootId: process.bootId };\n if (data != null && data.byteLength > 0) {\n await args.client.input({\n computerId: args.computerId,\n processId: process.id,\n body: { ...base, dataB64: encodeBase64(data) },\n });\n }\n if (signal != null) {\n await args.client.input({\n computerId: args.computerId,\n processId: process.id,\n body: { ...base, signal },\n });\n }\n if (eof === true) {\n await args.client.input({\n computerId: args.computerId,\n processId: process.id,\n body: { ...base, eof: true },\n });\n }\n },\n // Managed processes run in the computer and are found again by id and\n // boot until it boots again or is deleted.\n processGone: (cause) =>\n isComputersApiStatus(cause, 404) ||\n (isComputersApiStatus(cause, 409) &&\n isComputersApiError(cause) &&\n PROCESS_GONE_MESSAGE.test(cause.message)),\n close: () => undefined,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,wBAAwB;AACjC,SAAS,cAAc,oBAAoB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,OAIK;AACP,SAAS,kBAAkB;AAY3B,MAAM,mBAAmB,OAAO;AAEhC,MAAM,uBAAuB;AAE7B,MAAM,iBAAiB;AAEvB,MAAM,WAAW,CAAC,YAA8D;AAAA,EAC9E,QAAQ;AAAA,IACN,MAAM,aAAa,OAAO,OAAO,OAAO;AAAA,IACxC,YAAY,OAAO,OAAO;AAAA,IAC1B,KAAK,OAAO,OAAO;AAAA,EACrB;AAAA,EACA,QAAQ;AAAA,IACN,MAAM,aAAa,OAAO,OAAO,OAAO;AAAA,IACxC,YAAY,OAAO,OAAO;AAAA,IAC1B,KAAK,OAAO,OAAO;AAAA,EACrB;AAAA,EACA,QAAQ,OAAO,UAAU;AAAA,EACzB,UAAU,OAAO,QAAQ,YAAY;AAAA,EACrC,YAAY,OAAO,QAAQ,UAAU;AACvC;AAEA,MAAM,YAAY,oBAAI,IAAI;AAAA,EACxB,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,EACtC,CAAC,sBAAsB,iBAAiB,IAAI;AAAA,EAC5C,CAAC,a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,MACH;AACA,UAAI,QAAQ,MAAM;AAChB,cAAM,KAAK,OAAO,MAAM;AAAA,UACtB,YAAY,KAAK;AAAA,UACjB,WAAW,QAAQ;AAAA,UACnB,MAAM,EAAE,GAAG,MAAM,KAAK,KAAK;AAAA,QAC7B,CAAC;AAAA,MACH;AAAA,IACF;AAAA;AAAA;AAAA,IAGA,aAAa,CAAC,UACZ,qBAAqB,OAAO,GAAG,KAC9B,qBAAqB,OAAO,GAAG,KAC9B,oBAAoB,KAAK,KACzB,qBAAqB,KAAK,MAAM,OAAO;AAAA,IAC3C,OAAO,MAAM;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finalai/final-agent-provider",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Final's harness and ACP adapter definitions and the general harness provider, computer, device and local sandbox providers, and Final's MCP gateway integration.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"@agentclientprotocol/sdk": "1.8.0",
|
|
135
135
|
"@finalai/agent-protocol": "0.13.0",
|
|
136
136
|
"@finalai/agent-provider": "0.14.0",
|
|
137
|
-
"@finalai/computers": "0.3.
|
|
137
|
+
"@finalai/computers": "0.3.2",
|
|
138
138
|
"zod": "4.6.6",
|
|
139
139
|
"@finalai/agent-definition": "0.13.0"
|
|
140
140
|
},
|