@agent-vm/worker-gateway 0.0.57 → 0.0.59
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/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/worker-lifecycle.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/worker-lifecycle.ts"],"mappings":";;;cAaa,eAAA,EAAiB,gBAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { buildGatewaySessionLabel, splitResolvedGatewaySecrets } from "@agent-vm/gateway-interface";
|
|
1
|
+
import { buildGatewaySessionLabel, controllerVmHost, gatewayVmAllowedHosts, splitResolvedGatewaySecrets } from "@agent-vm/gateway-interface";
|
|
2
2
|
//#region src/worker-lifecycle.ts
|
|
3
3
|
const workerLifecycle = {
|
|
4
4
|
buildVmSpec({ controllerPort, projectNamespace, resolvedSecrets, zone }) {
|
|
5
5
|
if (zone.gateway.type !== "worker") throw new Error(`Worker lifecycle cannot build gateway type '${zone.gateway.type}'.`);
|
|
6
6
|
const { environmentSecrets, mediatedSecrets } = splitResolvedGatewaySecrets(zone, resolvedSecrets);
|
|
7
7
|
return {
|
|
8
|
-
allowedHosts:
|
|
8
|
+
allowedHosts: gatewayVmAllowedHosts(zone.egressHosts),
|
|
9
9
|
environment: {
|
|
10
10
|
HOME: "/home/coder",
|
|
11
11
|
CONTROLLER_BASE_URL: "http://controller.vm.host:18800",
|
|
@@ -27,7 +27,7 @@ const workerLifecycle = {
|
|
|
27
27
|
mediatedSecrets,
|
|
28
28
|
rootfsMode: "cow",
|
|
29
29
|
sessionLabel: buildGatewaySessionLabel(projectNamespace, zone.id),
|
|
30
|
-
tcpHosts: {
|
|
30
|
+
tcpHosts: { [`${controllerVmHost}:18800`]: `127.0.0.1:${controllerPort}` },
|
|
31
31
|
vfsMounts: { "/state": {
|
|
32
32
|
hostPath: zone.gateway.stateDir,
|
|
33
33
|
kind: "realfs"
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/worker-lifecycle.ts"],"sourcesContent":["import type {\n\tBuildGatewayVmSpecOptions,\n\tGatewayLifecycle,\n\tGatewayProcessSpec,\n\tGatewayVmSpec,\n} from '@agent-vm/gateway-interface';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/worker-lifecycle.ts"],"sourcesContent":["import type {\n\tBuildGatewayVmSpecOptions,\n\tGatewayLifecycle,\n\tGatewayProcessSpec,\n\tGatewayVmSpec,\n} from '@agent-vm/gateway-interface';\nimport {\n\tbuildGatewaySessionLabel,\n\tcontrollerVmHost,\n\tgatewayVmAllowedHosts,\n\tsplitResolvedGatewaySecrets,\n} from '@agent-vm/gateway-interface';\n\nexport const workerLifecycle: GatewayLifecycle = {\n\tbuildVmSpec({\n\t\tcontrollerPort,\n\t\tprojectNamespace,\n\t\tresolvedSecrets,\n\t\tzone,\n\t}: BuildGatewayVmSpecOptions): GatewayVmSpec {\n\t\tif (zone.gateway.type !== 'worker') {\n\t\t\tthrow new Error(`Worker lifecycle cannot build gateway type '${zone.gateway.type}'.`);\n\t\t}\n\t\tconst { environmentSecrets, mediatedSecrets } = splitResolvedGatewaySecrets(\n\t\t\tzone,\n\t\t\tresolvedSecrets,\n\t\t);\n\n\t\treturn {\n\t\t\tallowedHosts: gatewayVmAllowedHosts(zone.egressHosts),\n\t\t\tenvironment: {\n\t\t\t\tHOME: '/home/coder',\n\t\t\t\tCONTROLLER_BASE_URL: 'http://controller.vm.host:18800',\n\t\t\t\tNODE_EXTRA_CA_CERTS: '/run/gondolin/ca-certificates.crt',\n\t\t\t\tAGENT_VM_ZONE_ID: zone.id,\n\t\t\t\tSTATE_DIR: '/state',\n\t\t\t\tWORKER_CONFIG_PATH: '/state/effective-worker.json',\n\t\t\t\tWORK_DIR: '/work',\n\t\t\t\tREPOS_DIR: '/work/repos',\n\t\t\t\tTMPDIR: '/work/tmp',\n\t\t\t\tTMP: '/work/tmp',\n\t\t\t\tTEMP: '/work/tmp',\n\t\t\t\tnpm_config_cache: '/work/cache/npm',\n\t\t\t\tpnpm_config_store_dir: '/work/cache/pnpm/store',\n\t\t\t\tPIP_CACHE_DIR: '/work/cache/pip',\n\t\t\t\tUV_CACHE_DIR: '/work/cache/uv',\n\t\t\t\t...environmentSecrets,\n\t\t\t},\n\t\t\tmediatedSecrets,\n\t\t\trootfsMode: 'cow',\n\t\t\tsessionLabel: buildGatewaySessionLabel(projectNamespace, zone.id),\n\t\t\ttcpHosts: {\n\t\t\t\t[`${controllerVmHost}:18800`]: `127.0.0.1:${controllerPort}`,\n\t\t\t},\n\t\t\tvfsMounts: {\n\t\t\t\t'/state': {\n\t\t\t\t\thostPath: zone.gateway.stateDir,\n\t\t\t\t\tkind: 'realfs',\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t},\n\n\tbuildProcessSpec(): GatewayProcessSpec {\n\t\treturn {\n\t\t\tbootstrapCommand:\n\t\t\t\t'mkdir -p /work/repos /work/tmp /work/cache/npm /work/cache/pnpm/store /work/cache/pip /work/cache/uv && if [ -f /state/agent-vm-worker.tgz ]; then npm install -g --force @openai/codex /state/agent-vm-worker.tgz; fi',\n\t\t\tstartCommand:\n\t\t\t\t'cd /work && nohup agent-vm-worker serve --port 18789 --config /state/effective-worker.json --state-dir /state > /tmp/agent-vm-worker.log 2>&1 &',\n\t\t\thealthCheck: { type: 'http', port: 18789, path: '/health' },\n\t\t\tguestListenPort: 18789,\n\t\t\tlogPath: '/tmp/agent-vm-worker.log',\n\t\t};\n\t},\n};\n"],"mappings":";;AAaA,MAAa,kBAAoC;CAChD,YAAY,EACX,gBACA,kBACA,iBACA,QAC4C;EAC5C,IAAI,KAAK,QAAQ,SAAS,UACzB,MAAM,IAAI,MAAM,+CAA+C,KAAK,QAAQ,KAAK,IAAI;EAEtF,MAAM,EAAE,oBAAoB,oBAAoB,4BAC/C,MACA,gBACA;EAED,OAAO;GACN,cAAc,sBAAsB,KAAK,YAAY;GACrD,aAAa;IACZ,MAAM;IACN,qBAAqB;IACrB,qBAAqB;IACrB,kBAAkB,KAAK;IACvB,WAAW;IACX,oBAAoB;IACpB,UAAU;IACV,WAAW;IACX,QAAQ;IACR,KAAK;IACL,MAAM;IACN,kBAAkB;IAClB,uBAAuB;IACvB,eAAe;IACf,cAAc;IACd,GAAG;IACH;GACD;GACA,YAAY;GACZ,cAAc,yBAAyB,kBAAkB,KAAK,GAAG;GACjE,UAAU,GACR,GAAG,iBAAiB,UAAU,aAAa,kBAC5C;GACD,WAAW,EACV,UAAU;IACT,UAAU,KAAK,QAAQ;IACvB,MAAM;IACN,EACD;GACD;;CAGF,mBAAuC;EACtC,OAAO;GACN,kBACC;GACD,cACC;GACD,aAAa;IAAE,MAAM;IAAQ,MAAM;IAAO,MAAM;IAAW;GAC3D,iBAAiB;GACjB,SAAS;GACT;;CAEF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-vm/worker-gateway",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"description": "Worker gateway lifecycle: boots a Gondolin VM and drives @agent-vm/agent-vm-worker for autonomous coding tasks.",
|
|
5
5
|
"homepage": "https://github.com/ShravanSunder/agent-vm#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@agent-vm/gateway-interface": "0.0.
|
|
33
|
-
"@agent-vm/gondolin-adapter": "0.0.
|
|
32
|
+
"@agent-vm/gateway-interface": "0.0.59",
|
|
33
|
+
"@agent-vm/gondolin-adapter": "0.0.59"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsdown",
|