From bbca0b7d8f7b80c5855a67edb80117b515295e63 Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Mon, 3 Aug 2026 23:10:48 +0800 Subject: [PATCH 01/16] feat(sdk): scaffold @arcbox/sandbox package tooling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TypeScript SDK package at sdk/typescript (CORE-58 phase 1): standalone npm package, NodeNext + strict tsconfig, eslint (typed) + prettier + vitest gates, and the first hand-written module — connection resolution (explicit > env > default; ARCBOX_SOCKET / ARCBOX_API_URL / ARCBOX_API_KEY / ARCBOX_DATA_DIR) with unit tests. --- sdk/typescript/.gitignore | 3 + sdk/typescript/.prettierignore | 5 + sdk/typescript/.prettierrc.json | 4 + sdk/typescript/eslint.config.js | 24 + sdk/typescript/package-lock.json | 2679 ++++++++++++++++++++++++ sdk/typescript/package.json | 49 + sdk/typescript/src/connection.ts | 103 + sdk/typescript/src/errors.ts | 48 + sdk/typescript/test/connection.test.ts | 74 + sdk/typescript/tsconfig.build.json | 10 + sdk/typescript/tsconfig.json | 16 + sdk/typescript/vitest.config.ts | 7 + 12 files changed, 3022 insertions(+) create mode 100644 sdk/typescript/.gitignore create mode 100644 sdk/typescript/.prettierignore create mode 100644 sdk/typescript/.prettierrc.json create mode 100644 sdk/typescript/eslint.config.js create mode 100644 sdk/typescript/package-lock.json create mode 100644 sdk/typescript/package.json create mode 100644 sdk/typescript/src/connection.ts create mode 100644 sdk/typescript/src/errors.ts create mode 100644 sdk/typescript/test/connection.test.ts create mode 100644 sdk/typescript/tsconfig.build.json create mode 100644 sdk/typescript/tsconfig.json create mode 100644 sdk/typescript/vitest.config.ts diff --git a/sdk/typescript/.gitignore b/sdk/typescript/.gitignore new file mode 100644 index 00000000..9ebfc2d9 --- /dev/null +++ b/sdk/typescript/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +coverage/ diff --git a/sdk/typescript/.prettierignore b/sdk/typescript/.prettierignore new file mode 100644 index 00000000..5eaa6519 --- /dev/null +++ b/sdk/typescript/.prettierignore @@ -0,0 +1,5 @@ +node_modules/ +dist/ +coverage/ +src/gen/ +package-lock.json diff --git a/sdk/typescript/.prettierrc.json b/sdk/typescript/.prettierrc.json new file mode 100644 index 00000000..5ac85e27 --- /dev/null +++ b/sdk/typescript/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "printWidth": 100, + "singleQuote": true +} diff --git a/sdk/typescript/eslint.config.js b/sdk/typescript/eslint.config.js new file mode 100644 index 00000000..132171b3 --- /dev/null +++ b/sdk/typescript/eslint.config.js @@ -0,0 +1,24 @@ +// @ts-check +import eslint from '@eslint/js'; +import prettier from 'eslint-config-prettier'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + // Generated code is lint-exempt: protoc-gen-es owns its style. + { ignores: ['dist/', 'node_modules/', 'src/gen/', 'coverage/'] }, + eslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + { + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + files: ['**/*.js'], + ...tseslint.configs.disableTypeChecked, + }, + prettier, +); diff --git a/sdk/typescript/package-lock.json b/sdk/typescript/package-lock.json new file mode 100644 index 00000000..15d8bc67 --- /dev/null +++ b/sdk/typescript/package-lock.json @@ -0,0 +1,2679 @@ +{ + "name": "@arcbox/sandbox", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@arcbox/sandbox", + "version": "0.1.0", + "license": "MIT OR Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "^2.13.0", + "@connectrpc/connect": "^2.1.2", + "@connectrpc/connect-node": "^2.1.2" + }, + "devDependencies": { + "@bufbuild/buf": "^1.72.0", + "@bufbuild/protoc-gen-es": "^2.13.0", + "@eslint/js": "^10.0.1", + "@types/node": "^26.1.2", + "eslint": "^10.8.0", + "eslint-config-prettier": "^10.1.8", + "prettier": "^3.9.6", + "typescript": "^6.0.3", + "typescript-eslint": "^8.65.0", + "vitest": "^4.1.10" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@bufbuild/buf": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.72.0.tgz", + "integrity": "sha512-BwBKTX/WXkhAhqWJGrEKnqU03/4tK1O0OozSlwUMBCOEo8pLL3xu3M24RT3+umExEeM0wjlANO6axqGWMqtt4Q==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "buf": "bin/buf", + "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", + "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@bufbuild/buf-darwin-arm64": "1.72.0", + "@bufbuild/buf-darwin-x64": "1.72.0", + "@bufbuild/buf-linux-aarch64": "1.72.0", + "@bufbuild/buf-linux-armv7": "1.72.0", + "@bufbuild/buf-linux-x64": "1.72.0", + "@bufbuild/buf-win32-arm64": "1.72.0", + "@bufbuild/buf-win32-x64": "1.72.0" + } + }, + "node_modules/@bufbuild/buf-darwin-arm64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.72.0.tgz", + "integrity": "sha512-rKHRvjwAThapxIoOn92vIoTjYSz5FmRemDRLU4BYT4T6QWMEC13PM3/pPnqVgsNKZ5aW7iYDm9ztnisEqSi5yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-darwin-x64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.72.0.tgz", + "integrity": "sha512-4TQ1AGft8sGspNg9NMsEjsKKis7nGaVV8tZLnNa3cKUBmx22gwOnB6VRhgKWwjf+BDqr85lUEzQ6wHCboNUutg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-aarch64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.72.0.tgz", + "integrity": "sha512-cbIsUcgM5bHhbZWcDaAXqaYOAi8N0c0u+NiDydwVmZ04Et3s1EZ3TDqfQDRzwvoBPDP+lsO6YuTRXX6nI28x4w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-armv7": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.72.0.tgz", + "integrity": "sha512-v/bXVsFL8YNm2HgosGb9r3+nAt4jQiUc3r3JipYuiVY3DAJZAjoEvcak6/BkxQMTEQz9Zb8gRRlule9IFkbc5g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-x64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.72.0.tgz", + "integrity": "sha512-4xHGXEjqFxo1wX1zMGq4CzhYt5++nrj4C7k30j+YmGtvqCnipfdSe+V6kknBYRfYswVZEUwUbQOh6pnMTcGcrA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-arm64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.72.0.tgz", + "integrity": "sha512-WH7ClsoB9A0e/5fFhx0DLqLzillYPRdHBhlwzihgvjGci0bBdyJVHSQGf0B9uspCMU6sn6W/N1S9/2vvQBNMug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-x64": { + "version": "1.72.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.72.0.tgz", + "integrity": "sha512-X3eWqFzhDmu8CYQZz+Fu7i+PgH+yUl8UwJ5+x+bhZRYAIdcijikthodk60c5u/qq42m1Z2XAnAGyp/mTf7IffA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/protobuf": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.13.0.tgz", + "integrity": "sha512-acq7c49vxfm1ggJ95P70TX7ABDM0vxr1SYD3BB0o0jnBLB4OAqeHyKuN+cD3w80gXEDQ2zxHpR6CUeA+O/aU9g==", + "license": "(Apache-2.0 AND BSD-3-Clause)" + }, + "node_modules/@bufbuild/protoc-gen-es": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protoc-gen-es/-/protoc-gen-es-2.13.0.tgz", + "integrity": "sha512-ylI1vrLksdnXrVZRs9xGxmrQxKGhUm6pPszv26kqBvNiO3qPTktk+hgfwbLISBY4M/reShkT2dFLGT9fbydBXg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.13.0", + "@bufbuild/protoplugin": "2.13.0" + }, + "bin": { + "protoc-gen-es": "bin/protoc-gen-es" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@bufbuild/protobuf": "2.13.0" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + } + } + }, + "node_modules/@bufbuild/protoplugin": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.13.0.tgz", + "integrity": "sha512-32eMChKaL/A8Hh5AfMmXSdnuyznN85uoEjoyWiWeRrvtQOtpqX/v1R9PDe0g9vMIgzznK9inMT3CUaal0kjLUQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.13.0", + "@typescript/vfs": "^1.6.2", + "typescript": "5.4.5" + } + }, + "node_modules/@bufbuild/protoplugin/node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@connectrpc/connect": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect/-/connect-2.1.2.tgz", + "integrity": "sha512-MXkBijtcX09R10Eb6sFeIetc6w6746eio6xtfuyVOH7oQAacT1X0GzMIQFux6Qy8cq3W/T5qX5Bei8YbFtmRGA==", + "license": "Apache-2.0", + "peerDependencies": { + "@bufbuild/protobuf": "^2.7.0" + } + }, + "node_modules/@connectrpc/connect-node": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@connectrpc/connect-node/-/connect-node-2.1.2.tgz", + "integrity": "sha512-+i/aAOpsI8sIx1mbYp6d99zvxaUSF6t/jP9Ux9maAmjsZPgmIQ3JuIeYi0zJIP9zlCnBlJjkpPosshCgdRuThQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@bufbuild/protobuf": "^2.7.0", + "@connectrpc/connect": "2.1.2" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@oxc-project/types": { + "version": "0.142.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.142.0.tgz", + "integrity": "sha512-7W+2q5AKQVU36fkaryontrHn3YDt1RyUYXatw9i5H8ocYe2sPKSFB6eS8WNPeRKiN1qAWWZUPm7gwFzJGrccqQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.2.tgz", + "integrity": "sha512-l7x215OGvo1s52JWmR8U/DAVzEDWBCIbTm28aeJV/WDTSHgcKXaZTuBT0hJMs5NggilfJTW3clZVvd24yfKJxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.2.tgz", + "integrity": "sha512-9u9Xv6c1AJZT0FfwH5vrMG5Jjcwhc1MlyrPu0XfTqkzsmqfks2M6W/o5XwAJgVVN/jHpqqngC1WevHKKTIUtIA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.2.tgz", + "integrity": "sha512-9W1mbGZAfW3oqd85bhBkmpyHCCzL1TeG/zFFP3vg7b0rlly8cxOcre5nXwz+LHazCwac2MNWgPdPCHndABjpWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.2.tgz", + "integrity": "sha512-0p1lhiCSCyaerFwtrdZQUx7NqGk6LQnaRKWX7tFQqwQgvX0rjM15cIkm3pax1UpEakK14C4mOxx/jSqCBdBRqQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.2.tgz", + "integrity": "sha512-e+cOJXrJ2L3zx6YzqPg+f6Wbk3V1cKB8bOhbaYdVYN3DdquzNdRAmrbETz1qnt5yp/c7JNlNjmITiA2cVneQ7w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.2.tgz", + "integrity": "sha512-JsSMsj6sNat/MuhG5fnBD7QgbtpHKVe30x5/bAVirDHdhoQRXJkF6xc0Jqk8O4fiCUQAzMOoH9wZi3m60c8wtg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.2.tgz", + "integrity": "sha512-B5G/zJdHaoJn9vD50eGHWkiWfmq8Uhi3IiLPJTzmZTrAalk1bztUikSXo0qga18ibE0IXboyeMUnhPjhAJ45wQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.2.tgz", + "integrity": "sha512-6mC/awzKka8W6EoekjegpfGkjz8jXWDX63pqu/HYVpyKtZfu65Jsh4QAH3Kej3CAv/c1oGX7psTmFEbr0mDxLA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.2.tgz", + "integrity": "sha512-412MX9fJLdA1IK28EZnc8jYv2HRTleOZgfLQumJ5zy7OeJLZlg/CETwFaXjNmGVxG51cFHpKLqb5LKvBC+HsHA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.2.tgz", + "integrity": "sha512-Q/+HI/ToJafZ1iCqGgVQXUEkIjufHCTF0gBQ2a5o3cg7GJ2h0qyq3nvvSmU+bGda2/7ygXpTY4TM6gO9OhQ0ZA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.2.tgz", + "integrity": "sha512-ZKp/w41n6wCvxzxQHtQSbuphfX3Y4cCvbjkKHusrLx4lh+JWLTU7StSltO/DKARISzbj368d+qUaCjI8K2wzXw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.2.tgz", + "integrity": "sha512-pxE6xD4KS3eAROkKK5yrhB9/3+vhlhVGMvlQLbdpzrBGDbKrnzx3RLwPaHvasLo6jgaiBLn7e04Df9C4tYhjmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.2.tgz", + "integrity": "sha512-4MqEue5re+xIZzAWsB8sj0P1kqZySWqIuN4t6QaIO/YA6SFwySOLruvWQFzfmqk8LBK2P30KCSJwf6mJCZZ5/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.2.tgz", + "integrity": "sha512-NweNxxD0Nf9t8v7kodun45Ijp3EIwYY+uydPP6qBEYvfBqhIjN6dZMzlQja3tqX/aLs3F3Uz+AxDpKgRhpOZQg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.1.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.2.tgz", + "integrity": "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.3.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.65.0.tgz", + "integrity": "sha512-IEgob78X12rHpUmtcwFsXhZdVGJtwTVP8FiCLZkR6GlYVrl2PcuB+KhCE5BlVC/eQpQnu8WXRtkHZuPar+gCRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/type-utils": "8.65.0", + "@typescript-eslint/utils": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.65.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz", + "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.65.0.tgz", + "integrity": "sha512-CZ4nMxWwgu1HEEFNkeaCptra9QCtkmKdgf3sWh1rl1trIhmxLilgTV4cwcbQ4wemnT4sWQN8CaKOmdYx+g2gMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.65.0.tgz", + "integrity": "sha512-SxnPhbTsGahizDgbu7oqFH/xVtzIqMd/s+WtnSxNxJZJpLbdT5IPdzg8EZxO3+PoKahXmwJLeNQOpKJb3/bi7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.65.0", + "@typescript-eslint/types": "^8.65.0", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.65.0.tgz", + "integrity": "sha512-Esbl8OSYiVxBokYgWPf7VVWg/BE798wXhimnn9ML9Pt5qoDf8bfQlgjlKXR/k98+AcNzlLKYrpCcrcuZ9DZLgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.65.0.tgz", + "integrity": "sha512-j6GzGqCiRdA7Qhur2VVmKZAkBLfnHFQfx4TaJGL9RMveZqCo48jSHHO0DTgizEnGhtWnqmbtCUSrqSkdiY/0Hg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.65.0.tgz", + "integrity": "sha512-YjaZ7PRI5qY7ax2L3PbvX0rRyGtipAReCWs0mhhDBHjH/vl0g0BonaGXrKdKpMbIIsMIwDgbk/xzkBTyAltS5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0", + "debug": "^4.4.3", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.65.0.tgz", + "integrity": "sha512-JSSwWNy+H0E/01jJEM+hrX6N0OFDzFzeIhHFSAS01tlVaevpG8cFyYRPhS5yjGOvBUx3sqQHVMjCL1CAZZMxBg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.65.0.tgz", + "integrity": "sha512-JboAE2swaYt4tb1fHhHTABE2K+OLy09XfcTbhnk4Pw96f9dd2e9iYsJ28gBggHlo5z5x1rkyWvcPoTuNTd4oGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.65.0", + "@typescript-eslint/tsconfig-utils": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/visitor-keys": "8.65.0", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.5.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.65.0.tgz", + "integrity": "sha512-gXiwIHsYreboxeJucHKPvgwl7dXt50mF8s1/c00cP/WoVTyWKFdtfhRWwZiXYFU5H2O8vVoSLNrexFZjYS/SGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.65.0", + "@typescript-eslint/types": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.65.0.tgz", + "integrity": "sha512-8C71BQkGjiMmXtop7pHVJu1l2NNShFdkCyD6a2ezzs5vU/L3LRtb69EtcteFwz0mYMPzIgOw0n6OV4VBUWZd7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.65.0", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript/vfs": { + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@typescript/vfs/-/vfs-1.6.4.tgz", + "integrity": "sha512-PJFXFS4ZJKiJ9Qiuix6Dz/OwEIqHD7Dme1UwZhTK11vR+5dqW2ACbdndWQexBzCx+CPuMe5WBYQWCsFyGlQLlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.4.3" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", + "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", + "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.10", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", + "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", + "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.10", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", + "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "@vitest/utils": "4.1.10", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", + "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", + "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.1.tgz", + "integrity": "sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.8.0.tgz", + "integrity": "sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ==", + "dev": true, + "license": "MIT", + "workspaces": [ + "packages/*" + ], + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.4.tgz", + "integrity": "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q==", + "dev": true, + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.17", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.17.tgz", + "integrity": "sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/obug": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz", + "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.25", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz", + "integrity": "sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.16", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/rolldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.2.tgz", + "integrity": "sha512-opwpo1tQBAcpSUJDt94B7hhLNGOKjCdE//XXjeLrnx9b83bjnw45tXdg1b09yEw/VLFBJGZpwRULMmOZo7ol+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.142.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.2.2", + "@rolldown/binding-darwin-arm64": "1.2.2", + "@rolldown/binding-darwin-x64": "1.2.2", + "@rolldown/binding-freebsd-x64": "1.2.2", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.2", + "@rolldown/binding-linux-arm64-gnu": "1.2.2", + "@rolldown/binding-linux-arm64-musl": "1.2.2", + "@rolldown/binding-linux-ppc64-gnu": "1.2.2", + "@rolldown/binding-linux-s390x-gnu": "1.2.2", + "@rolldown/binding-linux-x64-gnu": "1.2.2", + "@rolldown/binding-linux-x64-musl": "1.2.2", + "@rolldown/binding-openharmony-arm64": "1.2.2", + "@rolldown/binding-win32-arm64-msvc": "1.2.2", + "@rolldown/binding-win32-x64-msvc": "1.2.2" + } + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz", + "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.1.tgz", + "integrity": "sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.65.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.65.0.tgz", + "integrity": "sha512-/ggrHAwyjENDusvyxbuqxAC2dTnZg/Z8F+fgQtYIz+L6n/9HfSlEZcFGV/NsMNa6CkGk0xUjUAFwC0vHOflvIA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.65.0", + "@typescript-eslint/parser": "8.65.0", + "@typescript-eslint/typescript-estree": "8.65.0", + "@typescript-eslint/utils": "8.65.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.1.0" + } + }, + "node_modules/undici-types": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/vite": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.0.tgz", + "integrity": "sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.33.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.23", + "rolldown": "~1.2.0", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.4.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", + "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.10", + "@vitest/mocker": "4.1.10", + "@vitest/pretty-format": "4.1.10", + "@vitest/runner": "4.1.10", + "@vitest/snapshot": "4.1.10", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.10", + "@vitest/browser-preview": "4.1.10", + "@vitest/browser-webdriverio": "4.1.10", + "@vitest/coverage-istanbul": "4.1.10", + "@vitest/coverage-v8": "4.1.10", + "@vitest/ui": "4.1.10", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json new file mode 100644 index 00000000..a8ff531a --- /dev/null +++ b/sdk/typescript/package.json @@ -0,0 +1,49 @@ +{ + "name": "@arcbox/sandbox", + "version": "0.1.0", + "description": "ArcBox Sandbox SDK for TypeScript — run isolated microVM sandboxes on your Mac", + "license": "MIT OR Apache-2.0", + "repository": { + "type": "git", + "url": "git+https://github.com/arcboxlabs/arcbox.git", + "directory": "sdk/typescript" + }, + "type": "module", + "engines": { + "node": ">=22" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + }, + "files": [ + "dist" + ], + "scripts": { + "build": "tsc -p tsconfig.build.json", + "typecheck": "tsc --noEmit", + "lint": "eslint . && prettier --check .", + "format": "prettier --write .", + "test": "vitest run", + "generate": "buf generate" + }, + "dependencies": { + "@bufbuild/protobuf": "^2.13.0", + "@connectrpc/connect": "^2.1.2", + "@connectrpc/connect-node": "^2.1.2" + }, + "devDependencies": { + "@bufbuild/buf": "^1.72.0", + "@bufbuild/protoc-gen-es": "^2.13.0", + "@eslint/js": "^10.0.1", + "@types/node": "^26.1.2", + "eslint": "^10.8.0", + "eslint-config-prettier": "^10.1.8", + "prettier": "^3.9.6", + "typescript": "^6.0.3", + "typescript-eslint": "^8.65.0", + "vitest": "^4.1.10" + } +} diff --git a/sdk/typescript/src/connection.ts b/sdk/typescript/src/connection.ts new file mode 100644 index 00000000..4c299a9b --- /dev/null +++ b/sdk/typescript/src/connection.ts @@ -0,0 +1,103 @@ +import { homedir } from 'node:os'; +import { join } from 'node:path'; + +import type { Transport } from '@connectrpc/connect'; + +import { InvalidArgumentError } from './errors.js'; + +/** + * Connection configuration for reaching an ArcBox daemon. + * + * Resolution order for every field: explicit option > environment > default. + * The default tier is the local daemon's Unix socket; setting an API URL + * (option or `ARCBOX_API_URL`) selects the remote tier instead (CORE-63, + * reserved — no cloud front door exists yet). + */ +export interface ConnectionOptions { + /** Unix socket path of the local daemon (env: `ARCBOX_SOCKET`). */ + socketPath?: string; + /** Base URL of a remote daemon / cloud front door (env: `ARCBOX_API_URL`). */ + apiUrl?: string; + /** + * Bearer credential attached as an `Authorization` header when set + * (env: `ARCBOX_API_KEY`). Unused by the local daemon, which trusts + * socket file permissions instead. + */ + apiKey?: string; + /** Per-RPC deadline in milliseconds for unary calls. Streams are exempt. */ + requestTimeoutMs?: number; + /** + * Injected connect-es Transport, replacing socket/URL resolution + * entirely — the mock/testing seam. + */ + transport?: Transport; +} + +/** A fully resolved connection target. */ +export interface ResolvedConnection { + /** + * Base URL handed to the transport. On the Unix-socket tier this is a + * placeholder (`http://arcbox`) that only supplies the Host header and + * request paths — the connection itself goes to `socketPath`. + */ + baseUrl: string; + /** Unix socket to dial; unset on the remote (TCP) tier. */ + socketPath?: string; + /** Bearer credential to attach, when set. */ + apiKey?: string; + /** Per-unary-RPC deadline in milliseconds, when set. */ + requestTimeoutMs?: number; +} + +/** + * Placeholder authority for Unix-socket requests. Node's `http.request` + * takes the connection target from `socketPath` and uses the URL only for + * the Host header and path, so any stable name works here. + */ +export const UDS_BASE_URL = 'http://arcbox'; + +/** Default socket location relative to the daemon data dir: `run/arcbox.sock`. */ +function defaultSocketPath(env: NodeJS.ProcessEnv): string { + // Mirrors arcbox-constants paths.rs: `/run/arcbox.sock`, data + // dir from ARCBOX_DATA_DIR, default `~/.arcbox`. + const dataDir = env.ARCBOX_DATA_DIR ?? join(homedir(), '.arcbox'); + return join(dataDir, 'run', 'arcbox.sock'); +} + +/** + * Resolve connection options against the environment. + * + * Tier selection: an explicit `socketPath` and an explicit `apiUrl` are + * contradictory and rejected. At the environment level `ARCBOX_API_URL` + * wins over `ARCBOX_SOCKET` — setting it selects the remote tier. + */ +export function resolveConnection( + options: ConnectionOptions = {}, + env: NodeJS.ProcessEnv = process.env, +): ResolvedConnection { + if (options.socketPath !== undefined && options.apiUrl !== undefined) { + throw new InvalidArgumentError( + 'connection.socketPath and connection.apiUrl are mutually exclusive: ' + + 'a connection dials either the local Unix socket or a remote URL', + ); + } + + const apiKey = options.apiKey ?? env.ARCBOX_API_KEY; + const requestTimeoutMs = options.requestTimeoutMs; + const common = { apiKey, requestTimeoutMs }; + + if (options.socketPath !== undefined) { + return { baseUrl: UDS_BASE_URL, socketPath: options.socketPath, ...common }; + } + if (options.apiUrl !== undefined) { + return { baseUrl: options.apiUrl, ...common }; + } + if (env.ARCBOX_API_URL !== undefined && env.ARCBOX_API_URL !== '') { + return { baseUrl: env.ARCBOX_API_URL, ...common }; + } + const socketPath = + env.ARCBOX_SOCKET !== undefined && env.ARCBOX_SOCKET !== '' + ? env.ARCBOX_SOCKET + : defaultSocketPath(env); + return { baseUrl: UDS_BASE_URL, socketPath, ...common }; +} diff --git a/sdk/typescript/src/errors.ts b/sdk/typescript/src/errors.ts new file mode 100644 index 00000000..428f07e9 --- /dev/null +++ b/sdk/typescript/src/errors.ts @@ -0,0 +1,48 @@ +/** + * Options carried by every ArcBox error. + */ +export interface ArcBoxErrorOptions { + /** Machine-readable cause from the daemon's error registry (`errors.proto`). */ + code?: string; + /** Actionable fix, phrased for direct display ("run `abctl daemon start`"). */ + suggestion?: string; + /** Structured facts about the failure (which limit, which state, ...). */ + context?: Record; + /** The SDK operation that failed (e.g. "commands.run"). */ + operation?: string; + /** Underlying cause, preserved for debugging. */ + cause?: unknown; +} + +/** + * Base class of every error thrown by this SDK. + * + * Carries the machine-readable `code` from the daemon's error registry + * (`arcbox.sandbox.v1.ErrorCode`) when one was attached, an actionable + * `suggestion`, structured `context`, and the failed `operation`. + */ +export class ArcBoxError extends Error { + readonly code?: string; + readonly suggestion?: string; + readonly context: Readonly>; + /** Stamped by the call site that surfaced the error. */ + operation?: string; + + constructor(message: string, options: ArcBoxErrorOptions = {}) { + super(message, options.cause === undefined ? undefined : { cause: options.cause }); + this.name = new.target.name; + if (options.code !== undefined) { + this.code = options.code; + } + if (options.suggestion !== undefined) { + this.suggestion = options.suggestion; + } + this.context = options.context ?? {}; + if (options.operation !== undefined) { + this.operation = options.operation; + } + } +} + +/** A request was rejected at the boundary: unknown, contradictory, or malformed input. */ +export class InvalidArgumentError extends ArcBoxError {} diff --git a/sdk/typescript/test/connection.test.ts b/sdk/typescript/test/connection.test.ts new file mode 100644 index 00000000..a3eab5b5 --- /dev/null +++ b/sdk/typescript/test/connection.test.ts @@ -0,0 +1,74 @@ +import { homedir } from 'node:os'; +import { join } from 'node:path'; + +import { describe, expect, it } from 'vitest'; + +import { resolveConnection, UDS_BASE_URL } from '../src/connection.js'; +import { InvalidArgumentError } from '../src/errors.js'; + +describe('resolveConnection', () => { + it('defaults to /.arcbox/run/arcbox.sock', () => { + const conn = resolveConnection({}, {}); + expect(conn.baseUrl).toBe(UDS_BASE_URL); + expect(conn.socketPath).toBe(join(homedir(), '.arcbox', 'run', 'arcbox.sock')); + expect(conn.apiKey).toBeUndefined(); + }); + + it('ARCBOX_DATA_DIR relocates the default socket', () => { + const conn = resolveConnection({}, { ARCBOX_DATA_DIR: '/tmp/abx' }); + expect(conn.socketPath).toBe(join('/tmp/abx', 'run', 'arcbox.sock')); + }); + + it('ARCBOX_SOCKET overrides the data-dir default', () => { + const conn = resolveConnection( + {}, + { ARCBOX_DATA_DIR: '/tmp/abx', ARCBOX_SOCKET: '/tmp/x.sock' }, + ); + expect(conn.socketPath).toBe('/tmp/x.sock'); + }); + + it('an explicit socketPath beats every environment variable', () => { + const conn = resolveConnection( + { socketPath: '/opt/d.sock' }, + { ARCBOX_SOCKET: '/tmp/x.sock', ARCBOX_API_URL: 'https://cloud.example' }, + ); + expect(conn.socketPath).toBe('/opt/d.sock'); + expect(conn.baseUrl).toBe(UDS_BASE_URL); + }); + + it('ARCBOX_API_URL selects the remote tier over ARCBOX_SOCKET', () => { + const conn = resolveConnection( + {}, + { ARCBOX_API_URL: 'https://cloud.example', ARCBOX_SOCKET: '/tmp/x.sock' }, + ); + expect(conn.baseUrl).toBe('https://cloud.example'); + expect(conn.socketPath).toBeUndefined(); + }); + + it('an explicit apiUrl selects the remote tier', () => { + const conn = resolveConnection({ apiUrl: 'https://cloud.example' }, {}); + expect(conn.baseUrl).toBe('https://cloud.example'); + expect(conn.socketPath).toBeUndefined(); + }); + + it('rejects socketPath together with apiUrl', () => { + expect(() => + resolveConnection({ socketPath: '/tmp/x.sock', apiUrl: 'https://cloud.example' }, {}), + ).toThrow(InvalidArgumentError); + }); + + it('resolves the api key from option over environment', () => { + expect(resolveConnection({ apiKey: 'opt' }, { ARCBOX_API_KEY: 'env' }).apiKey).toBe('opt'); + expect(resolveConnection({}, { ARCBOX_API_KEY: 'env' }).apiKey).toBe('env'); + }); + + it('treats empty environment strings as unset', () => { + const conn = resolveConnection({}, { ARCBOX_API_URL: '', ARCBOX_SOCKET: '' }); + expect(conn.baseUrl).toBe(UDS_BASE_URL); + expect(conn.socketPath).toBe(join(homedir(), '.arcbox', 'run', 'arcbox.sock')); + }); + + it('carries requestTimeoutMs through', () => { + expect(resolveConnection({ requestTimeoutMs: 5000 }, {}).requestTimeoutMs).toBe(5000); + }); +}); diff --git a/sdk/typescript/tsconfig.build.json b/sdk/typescript/tsconfig.build.json new file mode 100644 index 00000000..86350279 --- /dev/null +++ b/sdk/typescript/tsconfig.build.json @@ -0,0 +1,10 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "noEmit": false, + "declaration": true, + "outDir": "dist", + "rootDir": "src" + }, + "include": ["src"] +} diff --git a/sdk/typescript/tsconfig.json b/sdk/typescript/tsconfig.json new file mode 100644 index 00000000..7764df4e --- /dev/null +++ b/sdk/typescript/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2023", "ESNext.Disposable"], + "module": "NodeNext", + "moduleResolution": "NodeNext", + "strict": true, + "noUncheckedIndexedAccess": true, + "verbatimModuleSyntax": true, + "isolatedModules": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "noEmit": true + }, + "include": ["src", "test", "vitest.config.ts", "eslint.config.js"] +} diff --git a/sdk/typescript/vitest.config.ts b/sdk/typescript/vitest.config.ts new file mode 100644 index 00000000..43e56f45 --- /dev/null +++ b/sdk/typescript/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + include: ['test/**/*.test.ts'], + }, +}); From fbb081216b1479b0f27a1a3377ab277a3a69d22f Mon Sep 17 00:00:00 2001 From: AprilNEA Date: Mon, 3 Aug 2026 23:10:57 +0800 Subject: [PATCH 02/16] feat(sdk): generate sandbox_v1 wire types via buf + protoc-gen-es MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codegen pipeline (`npm run generate`): buf v2 config over the repo proto tree, filtered to the public arcbox.sandbox.v1 package (self-contained — only well-known-type imports). Output is committed under src/gen/ and is never exported from the package entry point; public shapes stay hand-written and are mapped at the transport boundary. --- sdk/typescript/buf.gen.yaml | 19 + .../src/gen/arcbox/sandbox/v1/errors_pb.ts | 227 +++ .../gen/arcbox/sandbox/v1/filesystem_pb.ts | 704 ++++++++ .../src/gen/arcbox/sandbox/v1/process_pb.ts | 934 ++++++++++ .../src/gen/arcbox/sandbox/v1/sandbox_pb.ts | 1609 +++++++++++++++++ .../src/gen/arcbox/sandbox/v1/snapshot_pb.ts | 365 ++++ .../src/gen/arcbox/sandbox/v1/template_pb.ts | 520 ++++++ 7 files changed, 4378 insertions(+) create mode 100644 sdk/typescript/buf.gen.yaml create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/errors_pb.ts create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/filesystem_pb.ts create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/process_pb.ts create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/sandbox_pb.ts create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/snapshot_pb.ts create mode 100644 sdk/typescript/src/gen/arcbox/sandbox/v1/template_pb.ts diff --git a/sdk/typescript/buf.gen.yaml b/sdk/typescript/buf.gen.yaml new file mode 100644 index 00000000..df796885 --- /dev/null +++ b/sdk/typescript/buf.gen.yaml @@ -0,0 +1,19 @@ +# Codegen for the sandbox API (`npm run generate`). +# +# Input is the repo's proto tree; only the public `arcbox.sandbox.v1` +# package is generated (it is self-contained: imports only well-known +# types, which protoc-gen-es maps to @bufbuild/protobuf/wkt). Output in +# src/gen/ is committed, never exported from the package entry point — +# public shapes are hand-written and mapped at the transport boundary. +version: v2 +inputs: + - directory: ../../rpc/arcbox-protocol/proto + paths: + - ../../rpc/arcbox-protocol/proto/arcbox/sandbox/v1 +plugins: + - local: protoc-gen-es + out: src/gen + opt: + - target=ts + - import_extension=js +clean: true diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/errors_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/errors_pb.ts new file mode 100644 index 00000000..67921687 --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/errors_pb.ts @@ -0,0 +1,227 @@ +// Sandbox error registry (CORE-58). +// +// One machine-readable error code registry for the whole sandbox surface. +// `ErrorInfo` rides as a Connect error detail on every daemon error, so +// SDKs derive their exception hierarchies from this single enum — one +// registry, per-language mappings generated from it, zero drift. +// +// `suggestion` is an actionable, human/LLM-readable fix ("run `abctl +// daemon start`") that agent frameworks surface directly; `context` +// carries structured facts about the failure (which timeout fired, the +// limit that was exceeded, the state that was observed) so messages can +// be rendered SDK-side in the caller's own parameter vocabulary. +// +// This file defines the contract only; daemon handlers attach `ErrorInfo` +// in a follow-up phase (CORE-58). + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/errors.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/errors.proto. + */ +export const file_arcbox_sandbox_v1_errors: GenFile = /*@__PURE__*/ + fileDesc("Ch5hcmNib3gvc2FuZGJveC92MS9lcnJvcnMucHJvdG8SEWFyY2JveC5zYW5kYm94LnYxIrcBCglFcnJvckluZm8SKgoEY29kZRgBIAEoDjIcLmFyY2JveC5zYW5kYm94LnYxLkVycm9yQ29kZRISCgpzdWdnZXN0aW9uGAIgASgJEjoKB2NvbnRleHQYAyADKAsyKS5hcmNib3guc2FuZGJveC52MS5FcnJvckluZm8uQ29udGV4dEVudHJ5Gi4KDENvbnRleHRFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBKvEECglFcnJvckNvZGUSGgoWRVJST1JfQ09ERV9VTlNQRUNJRklFRBAAEiAKHEVSUk9SX0NPREVfU0FOREJPWF9OT1RfRk9VTkQQARIhCh1FUlJPUl9DT0RFX1RFTVBMQVRFX05PVF9GT1VORBACEiIKHkVSUk9SX0NPREVfRVhFQ1VUSU9OX05PVF9GT1VORBADEh0KGUVSUk9SX0NPREVfRklMRV9OT1RfRk9VTkQQBBIdChlFUlJPUl9DT0RFX1NBTkRCT1hfUEFVU0VEEAUSIAocRVJST1JfQ09ERV9TQU5EQk9YX05PVF9SRUFEWRAGEh0KGUVSUk9SX0NPREVfU0FOREJPWF9GQUlMRUQQBxIaChZFUlJPUl9DT0RFX1RUTF9FWFBJUkVEEAgSHgoaRVJST1JfQ09ERV9DT01NQU5EX1RJTUVPVVQQCRImCiJFUlJPUl9DT0RFX05FU1RFRF9WSVJUX1VOU1VQUE9SVEVEEAoSHwobRVJST1JfQ09ERV9URU1QTEFURV9JTlZBTElEEAsSHQoZRVJST1JfQ09ERV9GSUxFX1RPT19MQVJHRRAMEhsKF0VSUk9SX0NPREVfU1RESU5fQ0xPU0VEEA0SGwoXRVJST1JfQ09ERV9UVFlfUkVRVUlSRUQQDhIaChZFUlJPUl9DT0RFX1BPUlRfSU5fVVNFEA8SHAoYRVJST1JfQ09ERV9BVVRIX1JFUVVJUkVEEBASIAocRVJST1JfQ09ERV9QUk9UT0NPTF9NSVNNQVRDSBAREiYKIkVSUk9SX0NPREVfUkVTT1VSQ0VfRVhIQVVTVEVEX0hPU1QQEmIGcHJvdG8z"); + +/** + * Structured detail attached to sandbox API errors. + * + * Carried as a Connect error detail; the transport status code stays the + * coarse routing signal while this message carries the precise cause. + * + * @generated from message arcbox.sandbox.v1.ErrorInfo + */ +export type ErrorInfo = Message<"arcbox.sandbox.v1.ErrorInfo"> & { + /** + * Machine-readable cause. + * + * @generated from field: arcbox.sandbox.v1.ErrorCode code = 1; + */ + code: ErrorCode; + + /** + * Actionable fix, phrased for direct display ("run `abctl daemon + * start`"). Agent frameworks surface this to the LLM verbatim. + * + * @generated from field: string suggestion = 2; + */ + suggestion: string; + + /** + * Structured facts about the failure: which timeout knob fired, the + * limit that was exceeded, the state that was observed, and so on. + * + * @generated from field: map context = 3; + */ + context: { [key: string]: string }; +}; + +/** + * Describes the message arcbox.sandbox.v1.ErrorInfo. + * Use `create(ErrorInfoSchema)` to create a new message. + */ +export const ErrorInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_errors, 0); + +/** + * Machine-readable cause of a sandbox API error. + * + * Values are append-only: SDKs map unknown codes to their base error + * class, so retiring or renumbering a value silently reclassifies errors + * for older clients. + * + * @generated from enum arcbox.sandbox.v1.ErrorCode + */ +export enum ErrorCode { + /** + * @generated from enum value: ERROR_CODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * The addressed sandbox does not exist. + * + * @generated from enum value: ERROR_CODE_SANDBOX_NOT_FOUND = 1; + */ + SANDBOX_NOT_FOUND = 1, + + /** + * The addressed template does not exist. + * + * @generated from enum value: ERROR_CODE_TEMPLATE_NOT_FOUND = 2; + */ + TEMPLATE_NOT_FOUND = 2, + + /** + * The addressed execution does not exist. + * + * @generated from enum value: ERROR_CODE_EXECUTION_NOT_FOUND = 3; + */ + EXECUTION_NOT_FOUND = 3, + + /** + * The addressed path does not exist inside the sandbox. + * + * @generated from enum value: ERROR_CODE_FILE_NOT_FOUND = 4; + */ + FILE_NOT_FOUND = 4, + + /** + * The sandbox is PAUSED and this call did not resume it. Data-plane + * calls resume a paused sandbox transparently (CORE-21), so this + * surfaces only where resume does not apply: on control-plane calls, + * or when the caller opted out of transparent resume (the reserved + * `x-arcbox-no-auto-resume` header — see sandbox.proto `Resume`). + * + * @generated from enum value: ERROR_CODE_SANDBOX_PAUSED = 5; + */ + SANDBOX_PAUSED = 5, + + /** + * The sandbox exists but is not READY for this operation + * (e.g. still STARTING). + * + * @generated from enum value: ERROR_CODE_SANDBOX_NOT_READY = 6; + */ + SANDBOX_NOT_READY = 6, + + /** + * The sandbox is in FAILED state; context carries the failure reason. + * + * @generated from enum value: ERROR_CODE_SANDBOX_FAILED = 7; + */ + SANDBOX_FAILED = 7, + + /** + * The sandbox's hard maximum lifetime (`ttl_seconds`) expired and the + * daemon destroyed it. + * + * @generated from enum value: ERROR_CODE_TTL_EXPIRED = 8; + */ + TTL_EXPIRED = 8, + + /** + * A per-command timeout fired and the process group was killed. + * + * @generated from enum value: ERROR_CODE_COMMAND_TIMEOUT = 9; + */ + COMMAND_TIMEOUT = 9, + + /** + * This host cannot run sandboxes (no nested virtualization). + * See SandboxService.GetCapabilities (CORE-13 fail-fast). + * + * @generated from enum value: ERROR_CODE_NESTED_VIRT_UNSUPPORTED = 10; + */ + NESTED_VIRT_UNSUPPORTED = 10, + + /** + * The template reference could not be resolved or is malformed. + * + * @generated from enum value: ERROR_CODE_TEMPLATE_INVALID = 11; + */ + TEMPLATE_INVALID = 11, + + /** + * A file transfer exceeded the per-file size cap; context carries + * the limit. + * + * @generated from enum value: ERROR_CODE_FILE_TOO_LARGE = 12; + */ + FILE_TOO_LARGE = 12, + + /** + * Stdin was already closed for this execution. + * + * @generated from enum value: ERROR_CODE_STDIN_CLOSED = 13; + */ + STDIN_CLOSED = 13, + + /** + * The operation requires a TTY execution (e.g. terminal resize). + * + * @generated from enum value: ERROR_CODE_TTY_REQUIRED = 14; + */ + TTY_REQUIRED = 14, + + /** + * The requested host port is already bound. + * + * @generated from enum value: ERROR_CODE_PORT_IN_USE = 15; + */ + PORT_IN_USE = 15, + + /** + * Authentication is required. Reserved for the remote tier (CORE-63). + * + * @generated from enum value: ERROR_CODE_AUTH_REQUIRED = 16; + */ + AUTH_REQUIRED = 16, + + /** + * The client and daemon protocol levels are incompatible; the + * suggestion names which side to upgrade. + * + * @generated from enum value: ERROR_CODE_PROTOCOL_MISMATCH = 17; + */ + PROTOCOL_MISMATCH = 17, + + /** + * The host is out of a resource (memory, disk, sandbox slots). + * + * @generated from enum value: ERROR_CODE_RESOURCE_EXHAUSTED_HOST = 18; + */ + RESOURCE_EXHAUSTED_HOST = 18, +} + +/** + * Describes the enum arcbox.sandbox.v1.ErrorCode. + */ +export const ErrorCodeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_errors, 0); + diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/filesystem_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/filesystem_pb.ts new file mode 100644 index 00000000..38a8f362 --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/filesystem_pb.ts @@ -0,0 +1,704 @@ +// Sandbox filesystem data plane. +// +// File transfer and path operations inside a running sandbox. **Data +// plane**: the calls carry file bytes and address one specific sandbox, +// so they are served by whatever is co-located with it rather than +// routed through the control-plane entry point. See `sandbox.proto` for +// the control plane. +// +// Every verb is a real RPC into the guest agent — never a shelled-out +// `ls`/`stat` parse. The path verbs (CORE-62) are contract-only until +// the guest side lands; whole-file read/write are live. + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/filesystem.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { KeepAlive } from "./sandbox_pb.js"; +import { file_arcbox_sandbox_v1_sandbox } from "./sandbox_pb.js"; +import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/filesystem.proto. + */ +export const file_arcbox_sandbox_v1_filesystem: GenFile = /*@__PURE__*/ + fileDesc("CiJhcmNib3gvc2FuZGJveC92MS9maWxlc3lzdGVtLnByb3RvEhFhcmNib3guc2FuZGJveC52MSIrCg9SZWFkRmlsZVJlcXVlc3QSCgoCaWQYASABKAkSDAoEcGF0aBgCIAEoCSInCglGaWxlQ2h1bmsSDAoEZGF0YRgBIAEoDBIMCgRkb25lGAIgASgIIjcKDVdyaXRlRmlsZU9wZW4SCgoCaWQYASABKAkSDAoEcGF0aBgCIAEoCRIMCgRtb2RlGAMgAS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lcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkSRwoGUmVtb3ZlEiUuYXJjYm94LnNhbmRib3gudjEuUmVtb3ZlRW50cnlSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5EkMKBE1vdmUSIy5hcmNib3guc2FuZGJveC52MS5Nb3ZlRW50cnlSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5ElUKCFdhdGNoRGlyEiIuYXJjYm94LnNhbmRib3gudjEuV2F0Y2hEaXJSZXF1ZXN0GiMuYXJjYm94LnNhbmRib3gudjEuV2F0Y2hEaXJSZXNwb25zZTABYgZwcm90bzM", [file_arcbox_sandbox_v1_sandbox, file_google_protobuf_empty, file_google_protobuf_timestamp]); + +/** + * Request to read a file from a sandbox. + * + * @generated from message arcbox.sandbox.v1.ReadFileRequest + */ +export type ReadFileRequest = Message<"arcbox.sandbox.v1.ReadFileRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute path inside the sandbox rootfs. + * + * @generated from field: string path = 2; + */ + path: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ReadFileRequest. + * Use `create(ReadFileRequestSchema)` to create a new message. + */ +export const ReadFileRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 0); + +/** + * One chunk of file data in a ReadFile / WriteFile stream. + * + * @generated from message arcbox.sandbox.v1.FileChunk + */ +export type FileChunk = Message<"arcbox.sandbox.v1.FileChunk"> & { + /** + * Raw bytes (may be empty on the final chunk, or on a keepalive). + * + * @generated from field: bytes data = 1; + */ + data: Uint8Array; + + /** + * True on the last chunk of the stream. + * + * @generated from field: bool done = 2; + */ + done: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.FileChunk. + * Use `create(FileChunkSchema)` to create a new message. + */ +export const FileChunkSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 1); + +/** + * Opens a WriteFile stream. Must be the first WriteFileRequest message. + * + * @generated from message arcbox.sandbox.v1.WriteFileOpen + */ +export type WriteFileOpen = Message<"arcbox.sandbox.v1.WriteFileOpen"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute destination path inside the sandbox rootfs. + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * Unix permission bits for the created file (0 = 0644). + * + * @generated from field: uint32 mode = 3; + */ + mode: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.WriteFileOpen. + * Use `create(WriteFileOpenSchema)` to create a new message. + */ +export const WriteFileOpenSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 2); + +/** + * A single client message in a WriteFile stream. + * + * @generated from message arcbox.sandbox.v1.WriteFileRequest + */ +export type WriteFileRequest = Message<"arcbox.sandbox.v1.WriteFileRequest"> & { + /** + * @generated from oneof arcbox.sandbox.v1.WriteFileRequest.payload + */ + payload: { + /** + * Stream header — sandbox, path, and mode. + * + * @generated from field: arcbox.sandbox.v1.WriteFileOpen open = 1; + */ + value: WriteFileOpen; + case: "open"; + } | { + /** + * File content chunk; the last one has done == true. + * + * @generated from field: arcbox.sandbox.v1.FileChunk chunk = 2; + */ + value: FileChunk; + case: "chunk"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message arcbox.sandbox.v1.WriteFileRequest. + * Use `create(WriteFileRequestSchema)` to create a new message. + */ +export const WriteFileRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 3); + +/** + * Metadata of one filesystem entry. + * + * @generated from message arcbox.sandbox.v1.FileStat + */ +export type FileStat = Message<"arcbox.sandbox.v1.FileStat"> & { + /** + * Base name of the entry (the final path component). + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Kind of entry (symlinks are reported as SYMLINK, not followed). + * + * @generated from field: arcbox.sandbox.v1.FileKind kind = 2; + */ + kind: FileKind; + + /** + * Size in bytes (regular files; 0 otherwise). + * + * @generated from field: uint64 size = 3; + */ + size: bigint; + + /** + * Unix permission bits (the low 12 bits of st_mode). + * + * @generated from field: uint32 mode = 4; + */ + mode: number; + + /** + * Last modification time. + * + * @generated from field: google.protobuf.Timestamp modified_at = 5; + */ + modifiedAt?: Timestamp | undefined; + + /** + * Owning user ID. + * + * @generated from field: uint32 uid = 6; + */ + uid: number; + + /** + * Owning group ID. + * + * @generated from field: uint32 gid = 7; + */ + gid: number; + + /** + * Symlink target (set only when kind == SYMLINK). + * + * @generated from field: string symlink_target = 8; + */ + symlinkTarget: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.FileStat. + * Use `create(FileStatSchema)` to create a new message. + */ +export const FileStatSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 4); + +/** + * Request to stat a path. + * + * @generated from message arcbox.sandbox.v1.StatFileRequest + */ +export type StatFileRequest = Message<"arcbox.sandbox.v1.StatFileRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute path inside the sandbox rootfs. + * + * @generated from field: string path = 2; + */ + path: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.StatFileRequest. + * Use `create(StatFileRequestSchema)` to create a new message. + */ +export const StatFileRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 5); + +/** + * Request to list a directory. + * + * @generated from message arcbox.sandbox.v1.ListDirRequest + */ +export type ListDirRequest = Message<"arcbox.sandbox.v1.ListDirRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute directory path inside the sandbox rootfs. + * + * @generated from field: string path = 2; + */ + path: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListDirRequest. + * Use `create(ListDirRequestSchema)` to create a new message. + */ +export const ListDirRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 6); + +/** + * Response to ListDir. + * + * @generated from message arcbox.sandbox.v1.ListDirResponse + */ +export type ListDirResponse = Message<"arcbox.sandbox.v1.ListDirResponse"> & { + /** + * Directory entries, each with full metadata. + * + * @generated from field: repeated arcbox.sandbox.v1.FileStat entries = 1; + */ + entries: FileStat[]; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListDirResponse. + * Use `create(ListDirResponseSchema)` to create a new message. + */ +export const ListDirResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 7); + +/** + * Request to create a directory. + * + * @generated from message arcbox.sandbox.v1.MakeDirRequest + */ +export type MakeDirRequest = Message<"arcbox.sandbox.v1.MakeDirRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute directory path to create (missing parents are created). + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * Unix permission bits for created directories (0 = 0755). + * + * @generated from field: uint32 mode = 3; + */ + mode: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.MakeDirRequest. + * Use `create(MakeDirRequestSchema)` to create a new message. + */ +export const MakeDirRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 8); + +/** + * Request to remove a filesystem entry. + * + * @generated from message arcbox.sandbox.v1.RemoveEntryRequest + */ +export type RemoveEntryRequest = Message<"arcbox.sandbox.v1.RemoveEntryRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute path to remove. + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * Remove directories and their contents recursively. Without it a + * non-empty directory fails with FAILED_PRECONDITION. + * + * @generated from field: bool recursive = 3; + */ + recursive: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.RemoveEntryRequest. + * Use `create(RemoveEntryRequestSchema)` to create a new message. + */ +export const RemoveEntryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 9); + +/** + * Request to rename / move a filesystem entry. + * + * @generated from message arcbox.sandbox.v1.MoveEntryRequest + */ +export type MoveEntryRequest = Message<"arcbox.sandbox.v1.MoveEntryRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute source path. + * + * @generated from field: string from_path = 2; + */ + fromPath: string; + + /** + * Absolute destination path. + * + * @generated from field: string to_path = 3; + */ + toPath: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.MoveEntryRequest. + * Use `create(MoveEntryRequestSchema)` to create a new message. + */ +export const MoveEntryRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 10); + +/** + * Request to watch a path for filesystem events. + * + * @generated from message arcbox.sandbox.v1.WatchDirRequest + */ +export type WatchDirRequest = Message<"arcbox.sandbox.v1.WatchDirRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Absolute path to watch (a directory). + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * Also watch subdirectories. + * + * @generated from field: bool recursive = 3; + */ + recursive: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.WatchDirRequest. + * Use `create(WatchDirRequestSchema)` to create a new message. + */ +export const WatchDirRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 11); + +/** + * One filesystem event. + * + * @generated from message arcbox.sandbox.v1.FsEvent + */ +export type FsEvent = Message<"arcbox.sandbox.v1.FsEvent"> & { + /** + * What happened. + * + * @generated from field: arcbox.sandbox.v1.FsEventKind kind = 1; + */ + kind: FsEventKind; + + /** + * Absolute path of the affected entry (the old path for RENAMED). + * + * @generated from field: string path = 2; + */ + path: string; + + /** + * New absolute path (set only for RENAMED). + * + * @generated from field: string renamed_to = 3; + */ + renamedTo: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.FsEvent. + * Use `create(FsEventSchema)` to create a new message. + */ +export const FsEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 12); + +/** + * One frame of a WatchDir stream. + * + * @generated from message arcbox.sandbox.v1.WatchDirResponse + */ +export type WatchDirResponse = Message<"arcbox.sandbox.v1.WatchDirResponse"> & { + /** + * @generated from oneof arcbox.sandbox.v1.WatchDirResponse.payload + */ + payload: { + /** + * A filesystem event. + * + * @generated from field: arcbox.sandbox.v1.FsEvent event = 1; + */ + value: FsEvent; + case: "event"; + } | { + /** + * Idle-stream keepalive; carries no data. + * + * @generated from field: arcbox.sandbox.v1.KeepAlive keep_alive = 2; + */ + value: KeepAlive; + case: "keepAlive"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message arcbox.sandbox.v1.WatchDirResponse. + * Use `create(WatchDirResponseSchema)` to create a new message. + */ +export const WatchDirResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_filesystem, 13); + +/** + * What kind of filesystem object a path is. + * + * @generated from enum arcbox.sandbox.v1.FileKind + */ +export enum FileKind { + /** + * @generated from enum value: FILE_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Regular file. + * + * @generated from enum value: FILE_KIND_FILE = 1; + */ + FILE = 1, + + /** + * @generated from enum value: FILE_KIND_DIRECTORY = 2; + */ + DIRECTORY = 2, + + /** + * @generated from enum value: FILE_KIND_SYMLINK = 3; + */ + SYMLINK = 3, + + /** + * Device node, FIFO, or socket. + * + * @generated from enum value: FILE_KIND_OTHER = 4; + */ + OTHER = 4, +} + +/** + * Describes the enum arcbox.sandbox.v1.FileKind. + */ +export const FileKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_filesystem, 0); + +/** + * Kind of a filesystem event. + * + * @generated from enum arcbox.sandbox.v1.FsEventKind + */ +export enum FsEventKind { + /** + * @generated from enum value: FS_EVENT_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * An entry was created. + * + * @generated from enum value: FS_EVENT_KIND_CREATED = 1; + */ + CREATED = 1, + + /** + * An entry's content or metadata changed. + * + * @generated from enum value: FS_EVENT_KIND_MODIFIED = 2; + */ + MODIFIED = 2, + + /** + * An entry was removed. + * + * @generated from enum value: FS_EVENT_KIND_REMOVED = 3; + */ + REMOVED = 3, + + /** + * An entry was renamed within the watched tree. + * + * @generated from enum value: FS_EVENT_KIND_RENAMED = 4; + */ + RENAMED = 4, +} + +/** + * Describes the enum arcbox.sandbox.v1.FsEventKind. + */ +export const FsEventKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_filesystem, 1); + +/** + * SandboxFilesystemService moves files in and out of a sandbox and + * operates on its paths. + * + * @generated from service arcbox.sandbox.v1.SandboxFilesystemService + */ +export const SandboxFilesystemService: GenService<{ + /** + * Read a file from inside a sandbox as a stream of chunks. + * The final chunk has done == true. The sandbox must be alive + * (READY or RUNNING). Limited to 256 MiB per file. Servers may emit + * empty non-final chunks as keepalives. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.ReadFile + */ + readFile: { + methodKind: "server_streaming"; + input: typeof ReadFileRequestSchema; + output: typeof FileChunkSchema; + }, + /** + * Write a file into a sandbox. The first message must carry `open`; + * subsequent messages stream `chunk` payloads, the last one with + * done == true. Limited to 256 MiB per file. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.WriteFile + */ + writeFile: { + methodKind: "client_streaming"; + input: typeof WriteFileRequestSchema; + output: typeof EmptySchema; + }, + /** + * Return metadata for one path. Symlinks are reported, not followed. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.Stat + */ + stat: { + methodKind: "unary"; + input: typeof StatFileRequestSchema; + output: typeof FileStatSchema; + }, + /** + * List a directory's entries, non-recursively. Every entry carries + * a full FileStat, so no per-entry Stat round-trips are needed. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.ListDir + */ + listDir: { + methodKind: "unary"; + input: typeof ListDirRequestSchema; + output: typeof ListDirResponseSchema; + }, + /** + * Create a directory, including missing parents (`mkdir -p` + * semantics — never the non-recursive trap). Succeeds when the + * directory already exists. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.MakeDir + */ + makeDir: { + methodKind: "unary"; + input: typeof MakeDirRequestSchema; + output: typeof EmptySchema; + }, + /** + * Remove a file, symlink, or directory. A non-empty directory + * requires `recursive`. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.Remove + */ + remove: { + methodKind: "unary"; + input: typeof RemoveEntryRequestSchema; + output: typeof EmptySchema; + }, + /** + * Rename / move a file or directory within the sandbox. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.Move + */ + move: { + methodKind: "unary"; + input: typeof MoveEntryRequestSchema; + output: typeof EmptySchema; + }, + /** + * Stream filesystem events under a path — push-based, never a + * polling fallback. KeepAlive frames are interleaved while idle so + * proxies do not cut the connection; the stream ends only on + * cancellation or sandbox stop. + * + * @generated from rpc arcbox.sandbox.v1.SandboxFilesystemService.WatchDir + */ + watchDir: { + methodKind: "server_streaming"; + input: typeof WatchDirRequestSchema; + output: typeof WatchDirResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_arcbox_sandbox_v1_filesystem, 0); + diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/process_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/process_pb.ts new file mode 100644 index 00000000..b927b2fb --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/process_pb.ts @@ -0,0 +1,934 @@ +// Sandbox process data plane (CORE-55). +// +// An execution is an addressable, resumable process inside a sandbox. It +// survives any client connection: output is offset-addressed per channel, so +// a client that loses its AttachExecution stream re-attaches at its last +// offsets and re-reads without loss; stdin writes are offset-idempotent, so +// a retried WriteStdin never double-feeds the process. Signals, TTY resize, +// and exit status go through the execution id, never through a stream. +// +// This is **data plane**: every call here touches a specific running +// sandbox, and carries the process's stdio. It is served by whatever is +// co-located with the sandbox — the local daemon, or the node agent in a +// cloud deployment — so bulk stdio never transits the control-plane entry +// point. See `sandbox.proto` for the control plane. + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/process.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { ExitStatus, KeepAlive } from "./sandbox_pb.js"; +import { file_arcbox_sandbox_v1_sandbox } from "./sandbox_pb.js"; +import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/process.proto. + */ +export const file_arcbox_sandbox_v1_process: GenFile = /*@__PURE__*/ + fileDesc("Ch9hcmNib3gvc2FuZGJveC92MS9wcm9jZXNzLnByb3RvEhFhcmNib3guc2FuZGJveC52MSItCgxUZXJtaW5hbFNpemUSDQoFd2lkdGgYASABKA0SDgoGaGVpZ2h0GAIgASgNIuMCCglFeGVjdXRpb24SCgoCaWQYASABKAkSEgoKc2FuZGJveF9pZBgCIAEoCRIwCgVzdGF0ZRgDIAEoDjIhLmFyY2JveC5zYW5kYm94LnYxLkV4ZWN1dGlvblN0YXRlEgsKA3R0eRgEIAEoCBIuCgpzdGFydGVkX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBItCglleGl0ZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjIKC2V4aXRfc3RhdHVzGAcgASgLMh0uYXJjYm94LnNhbmRib3gudjEuRXhpdFN0YXR1cxINCgVlcnJvchgIIAEoCRISCgpzdGRvdXRfbGVuGAkgASgEEhIKCnN0ZGVycl9sZW4YCiABKAQSLQoFc3RkaW4YCyABKAsyHi5hcmNib3guc2FuZGJveC52MS5TdGRpblN0YXR1cyLFAgoVU3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W5TdGF0dXMoARJaCg5HZXRTdGRpblN0YXR1cxIoLmFyY2JveC5zYW5kYm94LnYxLkdldFN0ZGluU3RhdHVzUmVxdWVzdBoeLmFyY2JveC5zYW5kYm94LnYxLlN0ZGluU3RhdHVzElQKD1NpZ25hbEV4ZWN1dGlvbhIpLmFyY2JveC5zYW5kYm94LnYxLlNpZ25hbEV4ZWN1dGlvblJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkSWgoSUmVzaXplRXhlY3V0aW9uVHR5EiwuYXJjYm94LnNhbmRib3gudjEuUmVzaXplRXhlY3V0aW9uVHR5UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRJWCg1XYWl0RXhlY3V0aW9uEicuYXJjYm94LnNhbmRib3gudjEuV2FpdEV4ZWN1dGlvblJlcXVlc3QaHC5hcmNib3guc2FuZGJveC52MS5FeGVjdXRpb24SZQoOTGlzdEV4ZWN1dGlvbnMSKC5hcmNib3guc2FuZGJveC52MS5MaXN0RXhlY3V0aW9uc1JlcXVlc3QaKS5hcmNib3guc2FuZGJveC52MS5MaXN0RXhlY3V0aW9uc1Jlc3BvbnNlEkwKC1dhaXRGb3JQb3J0EiUuYXJjYm94LnNhbmRib3gudjEuV2FpdEZvclBvcnRSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5YgZwcm90bzM", [file_arcbox_sandbox_v1_sandbox, file_google_protobuf_empty, file_google_protobuf_timestamp]); + +/** + * Terminal size for TTY executions. + * + * @generated from message arcbox.sandbox.v1.TerminalSize + */ +export type TerminalSize = Message<"arcbox.sandbox.v1.TerminalSize"> & { + /** + * Terminal width in columns. + * + * @generated from field: uint32 width = 1; + */ + width: number; + + /** + * Terminal height in rows. + * + * @generated from field: uint32 height = 2; + */ + height: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.TerminalSize. + * Use `create(TerminalSizeSchema)` to create a new message. + */ +export const TerminalSizeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 0); + +/** + * The state of an execution — the resource all execution RPCs address. + * + * @generated from message arcbox.sandbox.v1.Execution + */ +export type Execution = Message<"arcbox.sandbox.v1.Execution"> & { + /** + * Execution ID, unique within its sandbox. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Owning sandbox. + * + * @generated from field: string sandbox_id = 2; + */ + sandboxId: string; + + /** + * Current state. + * + * @generated from field: arcbox.sandbox.v1.ExecutionState state = 3; + */ + state: ExecutionState; + + /** + * Whether the process runs on a pseudo-TTY. + * + * @generated from field: bool tty = 4; + */ + tty: boolean; + + /** + * When the process was dispatched. + * + * @generated from field: google.protobuf.Timestamp started_at = 5; + */ + startedAt?: Timestamp | undefined; + + /** + * When the process terminated (unset while running). + * + * @generated from field: google.protobuf.Timestamp exited_at = 6; + */ + exitedAt?: Timestamp | undefined; + + /** + * How the process terminated. Unset while running, and also when the + * execution ended without an observed exit (see `error`). + * + * @generated from field: arcbox.sandbox.v1.ExitStatus exit_status = 7; + */ + exitStatus?: ExitStatus | undefined; + + /** + * Set when the execution ended without an observed exit (e.g. the + * sandbox stopped or the in-guest session broke). + * + * @generated from field: string error = 8; + */ + error: string; + + /** + * Total bytes produced on stdout/PTY so far (monotonic; the high-water + * offset for AttachExecution resume). + * + * @generated from field: uint64 stdout_len = 9; + */ + stdoutLen: bigint; + + /** + * Total bytes produced on stderr so far. + * + * @generated from field: uint64 stderr_len = 10; + */ + stderrLen: bigint; + + /** + * Stdin acceptance state. + * + * @generated from field: arcbox.sandbox.v1.StdinStatus stdin = 11; + */ + stdin?: StdinStatus | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.Execution. + * Use `create(ExecutionSchema)` to create a new message. + */ +export const ExecutionSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 1); + +/** + * Request to start an execution. + * + * @generated from message arcbox.sandbox.v1.StartExecutionRequest + */ +export type StartExecutionRequest = Message<"arcbox.sandbox.v1.StartExecutionRequest"> & { + /** + * Target sandbox. Must be READY. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Caller-supplied execution ID (unique within the sandbox) making the + * start idempotent across retries. Empty = server generates a UUID. + * + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * Command and arguments. + * + * @generated from field: repeated string cmd = 3; + */ + cmd: string[]; + + /** + * Environment variable overrides. + * + * @generated from field: map env = 4; + */ + env: { [key: string]: string }; + + /** + * Working directory (empty = rootfs default). + * + * @generated from field: string working_dir = 5; + */ + workingDir: string; + + /** + * User to run as (empty = rootfs default). + * + * @generated from field: string user = 6; + */ + user: string; + + /** + * Allocate a pseudo-TTY. Output then arrives on the PTY channel and + * stdin cannot be closed via `eof` (send Ctrl-D instead). + * + * @generated from field: bool tty = 7; + */ + tty: boolean; + + /** + * Initial terminal size (only meaningful when tty == true). + * + * @generated from field: arcbox.sandbox.v1.TerminalSize tty_size = 8; + */ + ttySize?: TerminalSize | undefined; + + /** + * Kill the process after this many seconds (0 = no timeout). + * + * @generated from field: uint32 timeout_seconds = 9; + */ + timeoutSeconds: number; + + /** + * Keep stdin open for WriteStdin. When false the process starts with + * stdin already at EOF (run semantics). + * + * @generated from field: bool stdin = 10; + */ + stdin: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.StartExecutionRequest. + * Use `create(StartExecutionRequestSchema)` to create a new message. + */ +export const StartExecutionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 2); + +/** + * Request to attach to an execution's output. + * + * @generated from message arcbox.sandbox.v1.AttachExecutionRequest + */ +export type AttachExecutionRequest = Message<"arcbox.sandbox.v1.AttachExecutionRequest"> & { + /** + * Owning sandbox. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Execution to attach to. + * + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * Resume offset for the stdout/PTY channel (0 = from the beginning of + * the retained buffer). + * + * @generated from field: uint64 stdout_offset = 3; + */ + stdoutOffset: bigint; + + /** + * Resume offset for the stderr channel. + * + * @generated from field: uint64 stderr_offset = 4; + */ + stderrOffset: bigint; +}; + +/** + * Describes the message arcbox.sandbox.v1.AttachExecutionRequest. + * Use `create(AttachExecutionRequestSchema)` to create a new message. + */ +export const AttachExecutionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 3); + +/** + * One frame of an AttachExecution stream. + * + * @generated from message arcbox.sandbox.v1.ExecutionEvent + */ +export type ExecutionEvent = Message<"arcbox.sandbox.v1.ExecutionEvent"> & { + /** + * @generated from oneof arcbox.sandbox.v1.ExecutionEvent.event + */ + event: { + /** + * First frame of every attach: the execution's current state. + * + * @generated from field: arcbox.sandbox.v1.ExecutionStarted started = 1; + */ + value: ExecutionStarted; + case: "started"; + } | { + /** + * A chunk of process output. + * + * @generated from field: arcbox.sandbox.v1.ExecutionOutput output = 2; + */ + value: ExecutionOutput; + case: "output"; + } | { + /** + * Final frame: the execution terminated. + * + * @generated from field: arcbox.sandbox.v1.ExecutionExited exited = 3; + */ + value: ExecutionExited; + case: "exited"; + } | { + /** + * Idle-stream keepalive; carries no data. + * + * @generated from field: arcbox.sandbox.v1.KeepAlive keep_alive = 4; + */ + value: KeepAlive; + case: "keepAlive"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExecutionEvent. + * Use `create(ExecutionEventSchema)` to create a new message. + */ +export const ExecutionEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 4); + +/** + * Attach preamble carrying the execution's state at attach time. + * + * @generated from message arcbox.sandbox.v1.ExecutionStarted + */ +export type ExecutionStarted = Message<"arcbox.sandbox.v1.ExecutionStarted"> & { + /** + * @generated from field: arcbox.sandbox.v1.Execution execution = 1; + */ + execution?: Execution | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExecutionStarted. + * Use `create(ExecutionStartedSchema)` to create a new message. + */ +export const ExecutionStartedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 5); + +/** + * An offset-addressed chunk of execution output. + * + * @generated from message arcbox.sandbox.v1.ExecutionOutput + */ +export type ExecutionOutput = Message<"arcbox.sandbox.v1.ExecutionOutput"> & { + /** + * Source channel (PTY for tty executions, STDOUT/STDERR otherwise). + * + * @generated from field: arcbox.sandbox.v1.StdioChannel channel = 1; + */ + channel: StdioChannel; + + /** + * Absolute offset of data[0] within the channel's byte stream. May be + * greater than the requested resume offset when retention already + * dropped older bytes — the jump is the client's signal of a gap. + * + * @generated from field: uint64 offset = 2; + */ + offset: bigint; + + /** + * Raw output bytes. + * + * @generated from field: bytes data = 3; + */ + data: Uint8Array; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExecutionOutput. + * Use `create(ExecutionOutputSchema)` to create a new message. + */ +export const ExecutionOutputSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 6); + +/** + * Final frame of an attach stream: the execution's terminal state, + * including exit_status / error and the final channel lengths. + * + * @generated from message arcbox.sandbox.v1.ExecutionExited + */ +export type ExecutionExited = Message<"arcbox.sandbox.v1.ExecutionExited"> & { + /** + * @generated from field: arcbox.sandbox.v1.Execution execution = 1; + */ + execution?: Execution | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExecutionExited. + * Use `create(ExecutionExitedSchema)` to create a new message. + */ +export const ExecutionExitedSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 7); + +/** + * Request to write stdin bytes at an absolute offset. + * + * @generated from message arcbox.sandbox.v1.WriteStdinRequest + */ +export type WriteStdinRequest = Message<"arcbox.sandbox.v1.WriteStdinRequest"> & { + /** + * Owning sandbox. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Target execution. + * + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * Absolute offset of data[0] within the stdin byte stream. Bytes below + * the server's accepted count are deduplicated (idempotent retry); an + * offset above it fails with OUT_OF_RANGE. + * + * @generated from field: uint64 offset = 3; + */ + offset: bigint; + + /** + * Bytes to feed to the process's stdin. + * + * @generated from field: bytes data = 4; + */ + data: Uint8Array; + + /** + * Close stdin after this write. Rejected for TTY executions — send + * Ctrl-D (0x04) as data instead. + * + * @generated from field: bool eof = 5; + */ + eof: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.WriteStdinRequest. + * Use `create(WriteStdinRequestSchema)` to create a new message. + */ +export const WriteStdinRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 8); + +/** + * Stdin acceptance state. + * + * @generated from message arcbox.sandbox.v1.StdinStatus + */ +export type StdinStatus = Message<"arcbox.sandbox.v1.StdinStatus"> & { + /** + * Bytes accepted and forwarded so far — the offset the next + * WriteStdin must start at. + * + * @generated from field: uint64 bytes_written = 1; + */ + bytesWritten: bigint; + + /** + * Whether stdin has been closed. + * + * @generated from field: bool closed = 2; + */ + closed: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.StdinStatus. + * Use `create(StdinStatusSchema)` to create a new message. + */ +export const StdinStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 9); + +/** + * Request for the current stdin acceptance state. + * + * @generated from message arcbox.sandbox.v1.GetStdinStatusRequest + */ +export type GetStdinStatusRequest = Message<"arcbox.sandbox.v1.GetStdinStatusRequest"> & { + /** + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * @generated from field: string execution_id = 2; + */ + executionId: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.GetStdinStatusRequest. + * Use `create(GetStdinStatusRequestSchema)` to create a new message. + */ +export const GetStdinStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 10); + +/** + * Request to signal a running execution. + * + * @generated from message arcbox.sandbox.v1.SignalExecutionRequest + */ +export type SignalExecutionRequest = Message<"arcbox.sandbox.v1.SignalExecutionRequest"> & { + /** + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * Signal to deliver to the process group. + * + * @generated from field: arcbox.sandbox.v1.Signal signal = 3; + */ + signal: Signal; +}; + +/** + * Describes the message arcbox.sandbox.v1.SignalExecutionRequest. + * Use `create(SignalExecutionRequestSchema)` to create a new message. + */ +export const SignalExecutionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 11); + +/** + * Request to resize a TTY execution's terminal. + * + * @generated from message arcbox.sandbox.v1.ResizeExecutionTtyRequest + */ +export type ResizeExecutionTtyRequest = Message<"arcbox.sandbox.v1.ResizeExecutionTtyRequest"> & { + /** + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * @generated from field: arcbox.sandbox.v1.TerminalSize size = 3; + */ + size?: TerminalSize | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.ResizeExecutionTtyRequest. + * Use `create(ResizeExecutionTtyRequestSchema)` to create a new message. + */ +export const ResizeExecutionTtyRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 12); + +/** + * Request to wait for an execution to exit. + * + * @generated from message arcbox.sandbox.v1.WaitExecutionRequest + */ +export type WaitExecutionRequest = Message<"arcbox.sandbox.v1.WaitExecutionRequest"> & { + /** + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * @generated from field: string execution_id = 2; + */ + executionId: string; + + /** + * Give up after this many seconds and return the current state + * (0 = return immediately — a poll). + * + * @generated from field: uint32 timeout_seconds = 3; + */ + timeoutSeconds: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.WaitExecutionRequest. + * Use `create(WaitExecutionRequestSchema)` to create a new message. + */ +export const WaitExecutionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 13); + +/** + * Request to list a sandbox's executions. + * + * @generated from message arcbox.sandbox.v1.ListExecutionsRequest + */ +export type ListExecutionsRequest = Message<"arcbox.sandbox.v1.ListExecutionsRequest"> & { + /** + * Sandbox whose executions to list. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListExecutionsRequest. + * Use `create(ListExecutionsRequestSchema)` to create a new message. + */ +export const ListExecutionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 14); + +/** + * Response to ListExecutions. + * + * @generated from message arcbox.sandbox.v1.ListExecutionsResponse + */ +export type ListExecutionsResponse = Message<"arcbox.sandbox.v1.ListExecutionsResponse"> & { + /** + * Every retained execution, running and exited. + * + * @generated from field: repeated arcbox.sandbox.v1.Execution executions = 1; + */ + executions: Execution[]; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListExecutionsResponse. + * Use `create(ListExecutionsResponseSchema)` to create a new message. + */ +export const ListExecutionsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 15); + +/** + * Request to wait for a listening TCP port inside a sandbox. + * + * @generated from message arcbox.sandbox.v1.WaitForPortRequest + */ +export type WaitForPortRequest = Message<"arcbox.sandbox.v1.WaitForPortRequest"> & { + /** + * Sandbox to watch. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * TCP port a workload is expected to listen on. + * + * @generated from field: uint32 port = 2; + */ + port: number; + + /** + * Give up after this many seconds with DEADLINE_EXCEEDED + * (0 = daemon default of 30 s). + * + * @generated from field: uint32 timeout_seconds = 3; + */ + timeoutSeconds: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.WaitForPortRequest. + * Use `create(WaitForPortRequestSchema)` to create a new message. + */ +export const WaitForPortRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_process, 16); + +/** + * Lifecycle state of an execution. + * + * @generated from enum arcbox.sandbox.v1.ExecutionState + */ +export enum ExecutionState { + /** + * @generated from enum value: EXECUTION_STATE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: EXECUTION_STATE_RUNNING = 1; + */ + RUNNING = 1, + + /** + * @generated from enum value: EXECUTION_STATE_EXITED = 2; + */ + EXITED = 2, +} + +/** + * Describes the enum arcbox.sandbox.v1.ExecutionState. + */ +export const ExecutionStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_process, 0); + +/** + * Stdio channel of an execution output chunk. Offsets are tracked per + * channel. A TTY execution produces one merged stream on PTY (stdout and + * stderr are indistinguishable once a terminal is allocated); non-TTY + * executions produce STDOUT and STDERR. + * + * @generated from enum arcbox.sandbox.v1.StdioChannel + */ +export enum StdioChannel { + /** + * @generated from enum value: STDIO_CHANNEL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: STDIO_CHANNEL_STDOUT = 1; + */ + STDOUT = 1, + + /** + * @generated from enum value: STDIO_CHANNEL_STDERR = 2; + */ + STDERR = 2, + + /** + * @generated from enum value: STDIO_CHANNEL_PTY = 3; + */ + PTY = 3, +} + +/** + * Describes the enum arcbox.sandbox.v1.StdioChannel. + */ +export const StdioChannelSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_process, 1); + +/** + * Deliverable POSIX signals. Values match the POSIX signal numbers. + * + * @generated from enum arcbox.sandbox.v1.Signal + */ +export enum Signal { + /** + * @generated from enum value: SIGNAL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SIGNAL_SIGHUP = 1; + */ + SIGHUP = 1, + + /** + * @generated from enum value: SIGNAL_SIGINT = 2; + */ + SIGINT = 2, + + /** + * @generated from enum value: SIGNAL_SIGQUIT = 3; + */ + SIGQUIT = 3, + + /** + * @generated from enum value: SIGNAL_SIGKILL = 9; + */ + SIGKILL = 9, + + /** + * @generated from enum value: SIGNAL_SIGUSR1 = 10; + */ + SIGUSR1 = 10, + + /** + * @generated from enum value: SIGNAL_SIGUSR2 = 12; + */ + SIGUSR2 = 12, + + /** + * @generated from enum value: SIGNAL_SIGTERM = 15; + */ + SIGTERM = 15, +} + +/** + * Describes the enum arcbox.sandbox.v1.Signal. + */ +export const SignalSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_process, 2); + +/** + * SandboxProcessService runs and drives processes inside a sandbox. + * + * @generated from service arcbox.sandbox.v1.SandboxProcessService + */ +export const SandboxProcessService: GenService<{ + /** + * Start an execution inside a READY sandbox and return its identity. + * Retrying with the same execution_id and command is idempotent: the + * existing execution is returned instead of a second process starting, + * including while the first start is still in flight. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.StartExecution + */ + startExecution: { + methodKind: "unary"; + input: typeof StartExecutionRequestSchema; + output: typeof ExecutionSchema; + }, + /** + * Stream an execution's output from the given per-channel offsets. + * Buffered output replays first (from the earliest retained byte when + * retention already dropped the requested offset — chunk offsets expose + * the gap), then live output follows. The stream ends with an Exited + * event. KeepAlive frames are interleaved while idle so proxies do not + * cut the connection. Multiple concurrent attaches are allowed. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.AttachExecution + */ + attachExecution: { + methodKind: "server_streaming"; + input: typeof AttachExecutionRequestSchema; + output: typeof ExecutionEventSchema; + }, + /** + * Write stdin bytes at an absolute offset (offset-idempotent). + * Bytes below the accepted count are deduplicated; an offset past the + * accepted count fails with OUT_OF_RANGE carrying the resume point. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.WriteStdin + */ + writeStdin: { + methodKind: "unary"; + input: typeof WriteStdinRequestSchema; + output: typeof StdinStatusSchema; + }, + /** + * Client-streaming variant of WriteStdin for high-volume stdin. Frames + * follow the same offset semantics; the final status is returned once. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.StreamStdin + */ + streamStdin: { + methodKind: "client_streaming"; + input: typeof WriteStdinRequestSchema; + output: typeof StdinStatusSchema; + }, + /** + * Report how many stdin bytes the server has accepted — the offset a + * client must resume from after a lost WriteStdin response. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.GetStdinStatus + */ + getStdinStatus: { + methodKind: "unary"; + input: typeof GetStdinStatusRequestSchema; + output: typeof StdinStatusSchema; + }, + /** + * Deliver a POSIX signal to a running execution's process group, + * without holding any stream. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.SignalExecution + */ + signalExecution: { + methodKind: "unary"; + input: typeof SignalExecutionRequestSchema; + output: typeof EmptySchema; + }, + /** + * Resize a TTY execution's terminal. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.ResizeExecutionTty + */ + resizeExecutionTty: { + methodKind: "unary"; + input: typeof ResizeExecutionTtyRequestSchema; + output: typeof EmptySchema; + }, + /** + * Wait until an execution exits or the timeout elapses, then return its + * state (a zero timeout polls). The exit status distinguishes a normal + * exit code from death by signal. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.WaitExecution + */ + waitExecution: { + methodKind: "unary"; + input: typeof WaitExecutionRequestSchema; + output: typeof ExecutionSchema; + }, + /** + * List a sandbox's executions, running and exited, so a client can + * rediscover processes it no longer holds handles to — after losing + * its connection, or across an auto-pause/resume cycle. Executions + * are retained for the life of their sandbox. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.ListExecutions + */ + listExecutions: { + methodKind: "unary"; + input: typeof ListExecutionsRequestSchema; + output: typeof ListExecutionsResponseSchema; + }, + /** + * Wait until something inside the sandbox listens on the given TCP + * port, or fail with DEADLINE_EXCEEDED when the timeout elapses. The + * guest agent watches the listen table directly — clients never + * poll with shelled-out probes. + * + * @generated from rpc arcbox.sandbox.v1.SandboxProcessService.WaitForPort + */ + waitForPort: { + methodKind: "unary"; + input: typeof WaitForPortRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_arcbox_sandbox_v1_process, 0); + diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/sandbox_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/sandbox_pb.ts new file mode 100644 index 00000000..caab1d3e --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/sandbox_pb.ts @@ -0,0 +1,1609 @@ +// Sandbox control plane. +// +// A sandbox is a short-lived, strongly-isolated microVM bound to a single +// workload (function, task, or container). Unlike MachineService VMs, a +// sandbox is decoupled from its workload: an execution exiting does NOT +// destroy the sandbox — it transitions back to READY and continues accepting +// executions until an explicit Stop/Remove or TTL expiry. +// +// This file is the **control plane**: creating, inspecting, listing, and +// destroying sandboxes, plus their lifecycle events and published ports. +// These calls address a fleet — in cloud deployments they are served by a +// multi-tenant front door that knows which node holds which sandbox. +// +// The **data plane** — the calls that touch a running sandbox's processes and +// files — lives in `process.proto` and `filesystem.proto`, so it can be +// served by whatever is co-located with the sandbox itself (the local daemon, +// or the node agent in a cloud deployment) without routing bulk stdio and +// file bytes through the control-plane entry point. `snapshot.proto` carries +// checkpoint/restore. +// +// Shared primitives (enums, resource limits, exit status, keepalive) live +// here because the control plane defines the sandbox resource itself; the +// data-plane files import this one. + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/sandbox.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/sandbox.proto. + */ +export const file_arcbox_sandbox_v1_sandbox: GenFile = /*@__PURE__*/ + fileDesc("Ch9hcmNib3gvc2FuZGJveC92MS9zYW5kYm94LnByb3RvEhFhcmNib3guc2FuZGJveC52MSI7CgtOZXR3b3JrU3BlYxIsCgRtb2RlGAEgASg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Rib3gudjEuTGlzdFNhbmRib3hlc1JlcXVlc3QaKC5hcmNib3guc2FuZGJveC52MS5MaXN0U2FuZGJveGVzUmVzcG9uc2USWwoGRXZlbnRzEicuYXJjYm94LnNhbmRib3gudjEuU2FuZGJveEV2ZW50c1JlcXVlc3QaJi5hcmNib3guc2FuZGJveC52MS5XYXRjaEV2ZW50c1Jlc3BvbnNlMAESWQoKRXhwb3NlUG9ydBIkLmFyY2JveC5zYW5kYm94LnYxLkV4cG9zZVBvcnRSZXF1ZXN0GiUuYXJjYm94LnNhbmRib3gudjEuRXhwb3NlUG9ydFJlc3BvbnNlEk4KDFVuZXhwb3NlUG9ydBImLmFyY2JveC5zYW5kYm94LnYxLlVuZXhwb3NlUG9ydFJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHliBnByb3RvMw", [file_google_protobuf_empty, file_google_protobuf_timestamp]); + +/** + * Network configuration for a sandbox. + * + * @generated from message arcbox.sandbox.v1.NetworkSpec + */ +export type NetworkSpec = Message<"arcbox.sandbox.v1.NetworkSpec"> & { + /** + * Network mode (UNSPECIFIED = daemon default). + * + * @generated from field: arcbox.sandbox.v1.NetworkMode mode = 1; + */ + mode: NetworkMode; +}; + +/** + * Describes the message arcbox.sandbox.v1.NetworkSpec. + * Use `create(NetworkSpecSchema)` to create a new message. + */ +export const NetworkSpecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 0); + +/** + * A single bind mount into the sandbox. + * + * @generated from message arcbox.sandbox.v1.Mount + */ +export type Mount = Message<"arcbox.sandbox.v1.Mount"> & { + /** + * Source path on the host. + * + * @generated from field: string source = 1; + */ + source: string; + + /** + * Target path inside the sandbox. + * + * @generated from field: string target = 2; + */ + target: string; + + /** + * Mount read-only. + * + * @generated from field: bool readonly = 3; + */ + readonly: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.Mount. + * Use `create(MountSchema)` to create a new message. + */ +export const MountSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 1); + +/** + * CPU and memory resource limits. + * + * @generated from message arcbox.sandbox.v1.ResourceLimits + */ +export type ResourceLimits = Message<"arcbox.sandbox.v1.ResourceLimits"> & { + /** + * Number of vCPUs (0 = daemon default). + * + * @generated from field: uint32 vcpus = 1; + */ + vcpus: number; + + /** + * Memory in MiB (0 = daemon default). + * + * @generated from field: uint64 memory_mib = 2; + */ + memoryMib: bigint; +}; + +/** + * Describes the message arcbox.sandbox.v1.ResourceLimits. + * Use `create(ResourceLimitsSchema)` to create a new message. + */ +export const ResourceLimitsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 2); + +/** + * How a process terminated: a normal exit code or death by signal. + * Exactly one is set once the execution has exited. + * + * @generated from message arcbox.sandbox.v1.ExitStatus + */ +export type ExitStatus = Message<"arcbox.sandbox.v1.ExitStatus"> & { + /** + * @generated from oneof arcbox.sandbox.v1.ExitStatus.status + */ + status: { + /** + * The process exited normally with this code. + * + * @generated from field: int32 code = 1; + */ + value: number; + case: "code"; + } | { + /** + * The process was killed by this POSIX signal. + * + * @generated from field: int32 signal = 2; + */ + value: number; + case: "signal"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExitStatus. + * Use `create(ExitStatusSchema)` to create a new message. + */ +export const ExitStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 3); + +/** + * An empty frame keeping an otherwise idle stream alive through proxies and + * load balancers. + * + * @generated from message arcbox.sandbox.v1.KeepAlive + */ +export type KeepAlive = Message<"arcbox.sandbox.v1.KeepAlive"> & { +}; + +/** + * Describes the message arcbox.sandbox.v1.KeepAlive. + * Use `create(KeepAliveSchema)` to create a new message. + */ +export const KeepAliveSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 4); + +/** + * Request to create a sandbox. + * + * @generated from message arcbox.sandbox.v1.CreateSandboxRequest + */ +export type CreateSandboxRequest = Message<"arcbox.sandbox.v1.CreateSandboxRequest"> & { + /** + * Caller-supplied unique ID for durable retry idempotency. + * If empty the daemon generates a fresh UUID for every attempt. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Arbitrary key-value metadata (used for filtering in List / Events). + * + * @generated from field: map labels = 2; + */ + labels: { [key: string]: string }; + + /** + * --- Resources --- + * Unset = the template's default limits, if any, else daemon + * defaults. Set = replaces the template default wholesale: a zero + * subfield (vcpus, memory_mib) inside a set message means the DAEMON + * default for that resource — the template's value does not shine + * through per-field. Precision costs message presence, which the + * subfields (plain proto3 scalars) do not have. + * + * @generated from field: arcbox.sandbox.v1.ResourceLimits limits = 6; + */ + limits?: ResourceLimits | undefined; + + /** + * --- Initial workload (optional) --- + * Initial command launched automatically after boot. + * Empty = inherit the template's default cmd, if any; otherwise the + * sandbox enters READY without running anything. Non-empty = + * replaces the template default. + * When this process exits the sandbox transitions back to READY + * (NOT destroyed) and continues accepting executions. + * + * @generated from field: repeated string cmd = 8; + */ + cmd: string[]; + + /** + * Suppress the template's default cmd: enter READY without running + * anything even when the template defines one. proto3 repeated + * fields cannot express "explicitly empty", so this flag carries the + * presence `cmd` cannot. Rejected with INVALID_ARGUMENT alongside a + * non-empty `cmd`. + * + * @generated from field: bool no_default_cmd = 20; + */ + noDefaultCmd: boolean; + + /** + * Environment variables for the initial command, merged over the + * template's default env (per key, this request wins). + * + * @generated from field: map env = 9; + */ + env: { [key: string]: string }; + + /** + * Start the initial command from exactly `env`, discarding the + * template's default env instead of merging over it (the map + * counterpart of `no_default_cmd`; to unset a single default key, + * set this and supply the full desired map). + * + * @generated from field: bool no_default_env = 21; + */ + noDefaultEnv: boolean; + + /** + * Working directory for the initial command. + * + * @generated from field: string working_dir = 10; + */ + workingDir: string; + + /** + * User to run the initial command as. + * + * @generated from field: string user = 11; + */ + user: string; + + /** + * --- Filesystem --- + * NOT supported in Sandbox V1: a non-empty list is rejected with + * FAILED_PRECONDITION. Copy files in with WriteFile / `sandbox cp`. + * + * @generated from field: repeated arcbox.sandbox.v1.Mount mounts = 12; + */ + mounts: Mount[]; + + /** + * --- Network --- + * + * @generated from field: arcbox.sandbox.v1.NetworkSpec network = 13; + */ + network?: NetworkSpec | undefined; + + /** + * --- Lifecycle --- + * Two independent lifecycle knobs exist; never conflate them: + * `ttl_seconds` is the hard maximum lifetime, `idle_timeout_seconds` + * reacts to inactivity. + * + * Hard maximum lifetime in seconds (0 = no limit). On expiry the + * sandbox is always destroyed — pausing does not apply. The deadline + * starts at creation and is not reset by workload activity; + * SetLifecycle replaces it with a fresh deadline from now (CORE-60). + * + * @generated from field: uint32 ttl_seconds = 14; + */ + ttlSeconds: number; + + /** + * --- Provisioning --- + * NOT supported in Sandbox V1: a set value is rejected with + * FAILED_PRECONDITION. Use executions for interactive access. + * + * @generated from field: optional string ssh_public_key = 15; + */ + sshPublicKey?: string | undefined; + + /** + * Reference to what boots inside the sandbox: + * "" — the built-in minimal template (busybox + init) + * "docker:" — a local Docker image reference, resolved and + * converted inside the VM + * "name[:version]" — a template from the catalog (`template.proto`, + * CORE-21); a bare name resolves to the newest + * published version. Template defaults apply + * per the override rules on the fields above. + * Cloud mode resolves names against the tenant's template registry. + * Anything else is rejected with INVALID_ARGUMENT. + * + * @generated from field: string template = 17; + */ + template: string; + + /** + * Apply `on_idle` after this many seconds without a running + * execution (0 = no idle detection). Re-armed every time the + * workload goes idle; distinct from `ttl_seconds`, which caps total + * lifetime regardless of activity (CORE-21). + * + * @generated from field: uint32 idle_timeout_seconds = 18; + */ + idleTimeoutSeconds: number; + + /** + * What to do when the idle timeout expires (UNSPECIFIED = the + * daemon default, currently KILL). + * + * @generated from field: arcbox.sandbox.v1.IdleAction on_idle = 19; + */ + onIdle: IdleAction; +}; + +/** + * Describes the message arcbox.sandbox.v1.CreateSandboxRequest. + * Use `create(CreateSandboxRequestSchema)` to create a new message. + */ +export const CreateSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 5); + +/** + * Response to CreateSandbox. + * Returned immediately; the sandbox may still be booting (state STARTING). + * + * @generated from message arcbox.sandbox.v1.CreateSandboxResponse + */ +export type CreateSandboxResponse = Message<"arcbox.sandbox.v1.CreateSandboxResponse"> & { + /** + * Assigned or caller-supplied sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * IP address pre-allocated for the sandbox (empty when network mode is + * NONE). Available even while state is STARTING. + * + * @generated from field: string ip_address = 2; + */ + ipAddress: string; + + /** + * State at time of response: always STARTING. + * + * @generated from field: arcbox.sandbox.v1.SandboxState state = 3; + */ + state: SandboxState; +}; + +/** + * Describes the message arcbox.sandbox.v1.CreateSandboxResponse. + * Use `create(CreateSandboxResponseSchema)` to create a new message. + */ +export const CreateSandboxResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 6); + +/** + * Request to stop a sandbox gracefully. + * + * @generated from message arcbox.sandbox.v1.StopSandboxRequest + */ +export type StopSandboxRequest = Message<"arcbox.sandbox.v1.StopSandboxRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Seconds to wait for any active execution to exit before force-killing + * the VM (0 = daemon default of 30 s). + * + * @generated from field: uint32 timeout_seconds = 2; + */ + timeoutSeconds: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.StopSandboxRequest. + * Use `create(StopSandboxRequestSchema)` to create a new message. + */ +export const StopSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 7); + +/** + * Request to forcibly remove a sandbox. + * + * @generated from message arcbox.sandbox.v1.RemoveSandboxRequest + */ +export type RemoveSandboxRequest = Message<"arcbox.sandbox.v1.RemoveSandboxRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Force removal even if the sandbox is in RUNNING state. + * + * @generated from field: bool force = 2; + */ + force: boolean; +}; + +/** + * Describes the message arcbox.sandbox.v1.RemoveSandboxRequest. + * Use `create(RemoveSandboxRequestSchema)` to create a new message. + */ +export const RemoveSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 8); + +/** + * Request to pause a sandbox. + * + * @generated from message arcbox.sandbox.v1.PauseSandboxRequest + */ +export type PauseSandboxRequest = Message<"arcbox.sandbox.v1.PauseSandboxRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.PauseSandboxRequest. + * Use `create(PauseSandboxRequestSchema)` to create a new message. + */ +export const PauseSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 9); + +/** + * Request to resume a paused sandbox. + * + * @generated from message arcbox.sandbox.v1.ResumeSandboxRequest + */ +export type ResumeSandboxRequest = Message<"arcbox.sandbox.v1.ResumeSandboxRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ResumeSandboxRequest. + * Use `create(ResumeSandboxRequestSchema)` to create a new message. + */ +export const ResumeSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 10); + +/** + * Request to replace a sandbox's lifecycle deadlines. Absent fields are + * left unchanged, so each knob can be adjusted independently. + * + * @generated from message arcbox.sandbox.v1.SetLifecycleRequest + */ +export type SetLifecycleRequest = Message<"arcbox.sandbox.v1.SetLifecycleRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Replace the hard maximum lifetime: expire this many seconds from + * now (0 = remove the limit). + * + * @generated from field: optional uint32 ttl_seconds = 2; + */ + ttlSeconds?: number | undefined; + + /** + * Replace the idle timeout (0 = disable idle detection). + * + * @generated from field: optional uint32 idle_timeout_seconds = 3; + */ + idleTimeoutSeconds?: number | undefined; + + /** + * Replace the idle policy (absent = leave unchanged; UNSPECIFIED = + * restore the daemon default). + * + * @generated from field: optional arcbox.sandbox.v1.IdleAction on_idle = 4; + */ + onIdle?: IdleAction | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.SetLifecycleRequest. + * Use `create(SetLifecycleRequestSchema)` to create a new message. + */ +export const SetLifecycleRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 11); + +/** + * Request for the daemon's sandbox capabilities. + * + * @generated from message arcbox.sandbox.v1.GetCapabilitiesRequest + */ +export type GetCapabilitiesRequest = Message<"arcbox.sandbox.v1.GetCapabilitiesRequest"> & { +}; + +/** + * Describes the message arcbox.sandbox.v1.GetCapabilitiesRequest. + * Use `create(GetCapabilitiesRequestSchema)` to create a new message. + */ +export const GetCapabilitiesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 12); + +/** + * What this daemon can do. SDKs fetch it lazily once per process and + * fail fast with an actionable error instead of probing per call. + * + * @generated from message arcbox.sandbox.v1.GetCapabilitiesResponse + */ +export type GetCapabilitiesResponse = Message<"arcbox.sandbox.v1.GetCapabilitiesResponse"> & { + /** + * Daemon version string (informational). + * + * @generated from field: string daemon_version = 1; + */ + daemonVersion: string; + + /** + * Sandbox API protocol level. SDKs compare it against their floor + * and raise a mismatch error with an upgrade suggestion + * (PROTOCOL_MISMATCH in `errors.proto`) instead of sprinkling + * version checks at call sites. + * + * @generated from field: uint32 protocol = 2; + */ + protocol: number; + + /** + * Named feature flags for capabilities that postdate `protocol`. + * + * @generated from field: repeated string features = 3; + */ + features: string[]; + + /** + * Whether this host can run sandboxes at all (CORE-13). + * + * @generated from field: arcbox.sandbox.v1.NestedVirtCapability nested_virt = 4; + */ + nestedVirt?: NestedVirtCapability | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.GetCapabilitiesResponse. + * Use `create(GetCapabilitiesResponseSchema)` to create a new message. + */ +export const GetCapabilitiesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 13); + +/** + * Nested-virtualization support on this host. + * + * @generated from message arcbox.sandbox.v1.NestedVirtCapability + */ +export type NestedVirtCapability = Message<"arcbox.sandbox.v1.NestedVirtCapability"> & { + /** + * True when sandboxes can run (M3+ hardware, VZ backend). + * + * @generated from field: bool supported = 1; + */ + supported: boolean; + + /** + * Why not, when unsupported — the daemon's authoritative reason + * (chip generation vs backend), surfaced verbatim in + * NESTED_VIRT_UNSUPPORTED errors. + * + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.NestedVirtCapability. + * Use `create(NestedVirtCapabilitySchema)` to create a new message. + */ +export const NestedVirtCapabilitySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 14); + +/** + * Request to inspect a sandbox. + * + * @generated from message arcbox.sandbox.v1.InspectSandboxRequest + */ +export type InspectSandboxRequest = Message<"arcbox.sandbox.v1.InspectSandboxRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.InspectSandboxRequest. + * Use `create(InspectSandboxRequestSchema)` to create a new message. + */ +export const InspectSandboxRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 15); + +/** + * Full sandbox state. See SandboxState for the state machine. + * + * @generated from message arcbox.sandbox.v1.SandboxInfo + */ +export type SandboxInfo = Message<"arcbox.sandbox.v1.SandboxInfo"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Lifecycle state. + * + * @generated from field: arcbox.sandbox.v1.SandboxState state = 2; + */ + state: SandboxState; + + /** + * User-supplied labels. + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; + + /** + * Effective resource limits. + * + * @generated from field: arcbox.sandbox.v1.ResourceLimits limits = 4; + */ + limits?: ResourceLimits | undefined; + + /** + * Network information. + * + * @generated from field: arcbox.sandbox.v1.SandboxNetwork network = 5; + */ + network?: SandboxNetwork | undefined; + + /** + * Creation time. + * + * @generated from field: google.protobuf.Timestamp created_at = 6; + */ + createdAt?: Timestamp | undefined; + + /** + * When the sandbox first became READY (unset if not yet). + * + * @generated from field: google.protobuf.Timestamp ready_at = 7; + */ + readyAt?: Timestamp | undefined; + + /** + * When the last execution exited (unset if none has run). + * + * @generated from field: google.protobuf.Timestamp last_exited_at = 8; + */ + lastExitedAt?: Timestamp | undefined; + + /** + * How the last execution terminated (unset if none has run, or when the + * last execution ended without an observed exit). + * + * @generated from field: arcbox.sandbox.v1.ExitStatus last_exit_status = 9; + */ + lastExitStatus?: ExitStatus | undefined; + + /** + * Human-readable error message (only set when state == FAILED). + * + * @generated from field: string error = 10; + */ + error: string; + + /** + * Template reference the sandbox was created from (as passed to + * Create; empty = the built-in minimal template). + * + * @generated from field: string template = 11; + */ + template: string; + + /** + * When the hard maximum lifetime fires (unset = no limit). Replaced + * by SetLifecycle. + * + * @generated from field: google.protobuf.Timestamp ttl_deadline = 12; + */ + ttlDeadline?: Timestamp | undefined; + + /** + * Idle timeout in seconds (0 = no idle detection). + * + * @generated from field: uint32 idle_timeout_seconds = 13; + */ + idleTimeoutSeconds: number; + + /** + * Action applied when the idle timeout expires. + * + * @generated from field: arcbox.sandbox.v1.IdleAction on_idle = 14; + */ + onIdle: IdleAction; + + /** + * When the sandbox reached PAUSED (unset unless paused). + * + * @generated from field: google.protobuf.Timestamp paused_at = 15; + */ + pausedAt?: Timestamp | undefined; + + /** + * When the sandbox reached FAILED (unset otherwise; `error` carries + * the reason). + * + * @generated from field: google.protobuf.Timestamp failed_at = 16; + */ + failedAt?: Timestamp | undefined; + + /** + * On-disk footprint of the sandbox's retained state (checkpoint + + * disk overlay). Paused sandboxes keep paying this until removed. + * + * @generated from field: uint64 storage_bytes = 17; + */ + storageBytes: bigint; +}; + +/** + * Describes the message arcbox.sandbox.v1.SandboxInfo. + * Use `create(SandboxInfoSchema)` to create a new message. + */ +export const SandboxInfoSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 16); + +/** + * Network details of a sandbox. + * + * @generated from message arcbox.sandbox.v1.SandboxNetwork + */ +export type SandboxNetwork = Message<"arcbox.sandbox.v1.SandboxNetwork"> & { + /** + * Assigned IP address. + * + * @generated from field: string ip_address = 1; + */ + ipAddress: string; + + /** + * Gateway address. + * + * @generated from field: string gateway = 2; + */ + gateway: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.SandboxNetwork. + * Use `create(SandboxNetworkSchema)` to create a new message. + */ +export const SandboxNetworkSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 17); + +/** + * Request to list sandboxes. + * + * @generated from message arcbox.sandbox.v1.ListSandboxesRequest + */ +export type ListSandboxesRequest = Message<"arcbox.sandbox.v1.ListSandboxesRequest"> & { + /** + * Filter by state (UNSPECIFIED = all states). + * + * @generated from field: arcbox.sandbox.v1.SandboxState state = 1; + */ + state: SandboxState; + + /** + * Filter by labels (all key-value pairs must match). + * + * @generated from field: map labels = 2; + */ + labels: { [key: string]: string }; + + /** + * Maximum entries per page (0 = server default of 100; capped at 1000). + * + * @generated from field: uint32 page_size = 3; + */ + pageSize: number; + + /** + * Continuation token from a previous response (empty = first page). + * + * @generated from field: string page_token = 4; + */ + pageToken: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListSandboxesRequest. + * Use `create(ListSandboxesRequestSchema)` to create a new message. + */ +export const ListSandboxesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 18); + +/** + * Response to ListSandboxes. + * + * @generated from message arcbox.sandbox.v1.ListSandboxesResponse + */ +export type ListSandboxesResponse = Message<"arcbox.sandbox.v1.ListSandboxesResponse"> & { + /** + * @generated from field: repeated arcbox.sandbox.v1.SandboxSummary sandboxes = 1; + */ + sandboxes: SandboxSummary[]; + + /** + * Token for the next page; empty when this is the last page. + * + * @generated from field: string next_page_token = 2; + */ + nextPageToken: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListSandboxesResponse. + * Use `create(ListSandboxesResponseSchema)` to create a new message. + */ +export const ListSandboxesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 19); + +/** + * Lightweight sandbox summary for List. + * + * Carries the state timestamps and retention cost so a listing shows + * lifecycle truth without an Inspect per row. + * + * @generated from message arcbox.sandbox.v1.SandboxSummary + */ +export type SandboxSummary = Message<"arcbox.sandbox.v1.SandboxSummary"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Lifecycle state. + * + * @generated from field: arcbox.sandbox.v1.SandboxState state = 2; + */ + state: SandboxState; + + /** + * Labels. + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; + + /** + * IP address. + * + * @generated from field: string ip_address = 4; + */ + ipAddress: string; + + /** + * Creation time. + * + * @generated from field: google.protobuf.Timestamp created_at = 5; + */ + createdAt?: Timestamp | undefined; + + /** + * When the sandbox first became READY (unset if not yet). + * + * @generated from field: google.protobuf.Timestamp ready_at = 6; + */ + readyAt?: Timestamp | undefined; + + /** + * When the sandbox reached PAUSED (unset unless paused). + * + * @generated from field: google.protobuf.Timestamp paused_at = 7; + */ + pausedAt?: Timestamp | undefined; + + /** + * When the sandbox reached FAILED (unset otherwise). + * + * @generated from field: google.protobuf.Timestamp failed_at = 8; + */ + failedAt?: Timestamp | undefined; + + /** + * On-disk footprint of retained state; nonzero for paused sandboxes. + * + * @generated from field: uint64 storage_bytes = 9; + */ + storageBytes: bigint; +}; + +/** + * Describes the message arcbox.sandbox.v1.SandboxSummary. + * Use `create(SandboxSummarySchema)` to create a new message. + */ +export const SandboxSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 20); + +/** + * Request to subscribe to sandbox lifecycle events. + * + * @generated from message arcbox.sandbox.v1.SandboxEventsRequest + */ +export type SandboxEventsRequest = Message<"arcbox.sandbox.v1.SandboxEventsRequest"> & { + /** + * Filter by sandbox ID (empty = all sandboxes). + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Filter by event kind (UNSPECIFIED = all kinds). + * + * @generated from field: arcbox.sandbox.v1.SandboxEventKind kind = 2; + */ + kind: SandboxEventKind; +}; + +/** + * Describes the message arcbox.sandbox.v1.SandboxEventsRequest. + * Use `create(SandboxEventsRequestSchema)` to create a new message. + */ +export const SandboxEventsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 21); + +/** + * One frame of an Events stream. + * + * @generated from message arcbox.sandbox.v1.WatchEventsResponse + */ +export type WatchEventsResponse = Message<"arcbox.sandbox.v1.WatchEventsResponse"> & { + /** + * @generated from oneof arcbox.sandbox.v1.WatchEventsResponse.payload + */ + payload: { + /** + * A lifecycle event. + * + * @generated from field: arcbox.sandbox.v1.SandboxEvent event = 1; + */ + value: SandboxEvent; + case: "event"; + } | { + /** + * Idle-stream keepalive; carries no data. + * + * @generated from field: arcbox.sandbox.v1.KeepAlive keep_alive = 2; + */ + value: KeepAlive; + case: "keepAlive"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message arcbox.sandbox.v1.WatchEventsResponse. + * Use `create(WatchEventsResponseSchema)` to create a new message. + */ +export const WatchEventsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 22); + +/** + * A sandbox lifecycle event. + * + * @generated from message arcbox.sandbox.v1.SandboxEvent + */ +export type SandboxEvent = Message<"arcbox.sandbox.v1.SandboxEvent"> & { + /** + * Sandbox ID. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * What happened; see SandboxEventKind for per-kind attributes. + * + * @generated from field: arcbox.sandbox.v1.SandboxEventKind kind = 2; + */ + kind: SandboxEventKind; + + /** + * When it happened. + * + * @generated from field: google.protobuf.Timestamp time = 3; + */ + time?: Timestamp | undefined; + + /** + * Additional context (e.g. "exit_code" / "signal" on IDLE, + * "error" on FAILED). + * + * @generated from field: map attributes = 4; + */ + attributes: { [key: string]: string }; +}; + +/** + * Describes the message arcbox.sandbox.v1.SandboxEvent. + * Use `create(SandboxEventSchema)` to create a new message. + */ +export const SandboxEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 23); + +/** + * Request to expose a sandbox port on the host. + * + * @generated from message arcbox.sandbox.v1.ExposePortRequest + */ +export type ExposePortRequest = Message<"arcbox.sandbox.v1.ExposePortRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Port the workload listens on inside the sandbox. + * + * @generated from field: uint32 sandbox_port = 2; + */ + sandboxPort: number; + + /** + * Host port to bind (0 = reuse the allocated guest relay port). + * + * @generated from field: uint32 host_port = 3; + */ + hostPort: number; + + /** + * Transport protocol (UNSPECIFIED = TCP). + * + * @generated from field: arcbox.sandbox.v1.PortProtocol protocol = 4; + */ + protocol: PortProtocol; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExposePortRequest. + * Use `create(ExposePortRequestSchema)` to create a new message. + */ +export const ExposePortRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 24); + +/** + * Response to ExposePort. + * + * @generated from message arcbox.sandbox.v1.ExposePortResponse + */ +export type ExposePortResponse = Message<"arcbox.sandbox.v1.ExposePortResponse"> & { + /** + * Host port the service is reachable on (via loopback). + * + * @generated from field: uint32 host_port = 1; + */ + hostPort: number; + + /** + * Reserved-range guest port carrying the DNAT relay. + * + * @generated from field: uint32 guest_port = 2; + */ + guestPort: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.ExposePortResponse. + * Use `create(ExposePortResponseSchema)` to create a new message. + */ +export const ExposePortResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 25); + +/** + * Request to remove an exposed port mapping. + * + * @generated from message arcbox.sandbox.v1.UnexposePortRequest + */ +export type UnexposePortRequest = Message<"arcbox.sandbox.v1.UnexposePortRequest"> & { + /** + * Sandbox ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * The sandbox port previously passed to ExposePort. + * + * @generated from field: uint32 sandbox_port = 2; + */ + sandboxPort: number; + + /** + * Transport protocol (UNSPECIFIED = TCP). + * + * @generated from field: arcbox.sandbox.v1.PortProtocol protocol = 3; + */ + protocol: PortProtocol; +}; + +/** + * Describes the message arcbox.sandbox.v1.UnexposePortRequest. + * Use `create(UnexposePortRequestSchema)` to create a new message. + */ +export const UnexposePortRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_sandbox, 26); + +/** + * Lifecycle state of a sandbox. + * + * State machine: + * + * STARTING ──► READY ──► RUNNING ──► READY (execution exited, sandbox alive) + * │ │ + * ├──────────┴──► STOPPING ──► STOPPED + * │ │ + * ├──────────┴──► PAUSING ──► PAUSED ──(Resume)──► STARTING (same ID) + * │ │ + * └──────────┴──► FAILED (error reason set) + * + * @generated from enum arcbox.sandbox.v1.SandboxState + */ +export enum SandboxState { + /** + * @generated from enum value: SANDBOX_STATE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Firecracker process spawned; VM still booting. + * + * @generated from enum value: SANDBOX_STATE_STARTING = 1; + */ + STARTING = 1, + + /** + * VM booted and accepting executions (or the last execution exited). + * + * @generated from enum value: SANDBOX_STATE_READY = 2; + */ + READY = 2, + + /** + * An execution is currently running inside the VM. + * + * @generated from enum value: SANDBOX_STATE_RUNNING = 3; + */ + RUNNING = 3, + + /** + * Stop called; draining the workload and shutting down the VM. + * + * @generated from enum value: SANDBOX_STATE_STOPPING = 4; + */ + STOPPING = 4, + + /** + * VM has shut down cleanly. + * + * @generated from enum value: SANDBOX_STATE_STOPPED = 5; + */ + STOPPED = 5, + + /** + * Unrecoverable error occurred. + * + * @generated from enum value: SANDBOX_STATE_FAILED = 6; + */ + FAILED = 6, + + /** + * Pause in progress: checkpointing state, then releasing the VM. + * + * @generated from enum value: SANDBOX_STATE_PAUSING = 7; + */ + PAUSING = 7, + + /** + * Checkpointed to disk; runtime resources released. The record and + * snapshot survive under the same ID until Resume or Remove. + * + * @generated from enum value: SANDBOX_STATE_PAUSED = 8; + */ + PAUSED = 8, +} + +/** + * Describes the enum arcbox.sandbox.v1.SandboxState. + */ +export const SandboxStateSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_sandbox, 0); + +/** + * Kind of a sandbox lifecycle event. + * + * @generated from enum arcbox.sandbox.v1.SandboxEventKind + */ +export enum SandboxEventKind { + /** + * @generated from enum value: SANDBOX_EVENT_KIND_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Sandbox record created, VM booting. + * + * @generated from enum value: SANDBOX_EVENT_KIND_CREATED = 1; + */ + CREATED = 1, + + /** + * VM booted, sandbox accepting executions. + * + * @generated from enum value: SANDBOX_EVENT_KIND_READY = 2; + */ + READY = 2, + + /** + * An execution started. + * + * @generated from enum value: SANDBOX_EVENT_KIND_RUNNING = 3; + */ + RUNNING = 3, + + /** + * The active execution exited; sandbox back to READY. Attributes carry + * "exit_code" (shell convention) and "signal" when killed by one, or + * "error" when the session broke before an exit was observed. + * + * @generated from enum value: SANDBOX_EVENT_KIND_IDLE = 4; + */ + IDLE = 4, + + /** + * Stop called, draining the workload. + * + * @generated from enum value: SANDBOX_EVENT_KIND_STOPPING = 5; + */ + STOPPING = 5, + + /** + * VM shut down. + * + * @generated from enum value: SANDBOX_EVENT_KIND_STOPPED = 6; + */ + STOPPED = 6, + + /** + * Unrecoverable error; attributes carry "error". + * + * @generated from enum value: SANDBOX_EVENT_KIND_FAILED = 7; + */ + FAILED = 7, + + /** + * Sandbox deleted. + * + * @generated from enum value: SANDBOX_EVENT_KIND_REMOVED = 8; + */ + REMOVED = 8, + + /** + * Pause started — whether client-driven (Pause) or automated (idle + * timeout with a PAUSE policy); automation must be visible, so the + * idle detector emits the same events. Attributes carry "reason" + * ("pause" or "idle_timeout"). + * + * @generated from enum value: SANDBOX_EVENT_KIND_PAUSING = 9; + */ + PAUSING = 9, + + /** + * Checkpoint complete; runtime resources released. + * + * @generated from enum value: SANDBOX_EVENT_KIND_PAUSED = 10; + */ + PAUSED = 10, + + /** + * Resume completed — explicit or transparent (a data-plane call to a + * paused sandbox); sandbox READY again under the same ID. Attributes + * carry "reason" ("resume" or "auto_resume"). + * + * @generated from enum value: SANDBOX_EVENT_KIND_RESUMED = 11; + */ + RESUMED = 11, +} + +/** + * Describes the enum arcbox.sandbox.v1.SandboxEventKind. + */ +export const SandboxEventKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_sandbox, 1); + +/** + * What the daemon does when a sandbox's idle timeout expires. + * + * @generated from enum arcbox.sandbox.v1.IdleAction + */ +export enum IdleAction { + /** + * Daemon default (currently KILL; auto-pause is opt-in). + * + * @generated from enum value: IDLE_ACTION_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Destroy the sandbox and release all resources (Remove semantics). + * + * @generated from enum value: IDLE_ACTION_KILL = 1; + */ + KILL = 1, + + /** + * Pause: checkpoint to disk under the same ID and release the VM. + * Trades RAM for disk — the sandbox reports `storage_bytes` until + * resumed or removed. + * + * @generated from enum value: IDLE_ACTION_PAUSE = 2; + */ + PAUSE = 2, +} + +/** + * Describes the enum arcbox.sandbox.v1.IdleAction. + */ +export const IdleActionSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_sandbox, 2); + +/** + * Sandbox network mode. + * + * @generated from enum arcbox.sandbox.v1.NetworkMode + */ +export enum NetworkMode { + /** + * Daemon default (currently ENABLED). + * + * @generated from enum value: NETWORK_MODE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * Networked sandbox with an IP from the sandbox pool. + * + * @generated from enum value: NETWORK_MODE_ENABLED = 1; + */ + ENABLED = 1, + + /** + * No network device. + * + * @generated from enum value: NETWORK_MODE_NONE = 2; + */ + NONE = 2, +} + +/** + * Describes the enum arcbox.sandbox.v1.NetworkMode. + */ +export const NetworkModeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_sandbox, 3); + +/** + * Transport protocol of an exposed port. + * + * @generated from enum arcbox.sandbox.v1.PortProtocol + */ +export enum PortProtocol { + /** + * Defaults to TCP. + * + * @generated from enum value: PORT_PROTOCOL_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: PORT_PROTOCOL_TCP = 1; + */ + TCP = 1, + + /** + * @generated from enum value: PORT_PROTOCOL_UDP = 2; + */ + UDP = 2, +} + +/** + * Describes the enum arcbox.sandbox.v1.PortProtocol. + */ +export const PortProtocolSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_arcbox_sandbox_v1_sandbox, 4); + +/** + * SandboxService manages sandbox lifecycle. Control plane. + * + * @generated from service arcbox.sandbox.v1.SandboxService + */ +export const SandboxService: GenService<{ + /** + * Create a sandbox and return immediately with state STARTING. + * Subscribe to Events or poll Inspect to wait for state READY. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Create + */ + create: { + methodKind: "unary"; + input: typeof CreateSandboxRequestSchema; + output: typeof CreateSandboxResponseSchema; + }, + /** + * Stop a sandbox gracefully (waits for any active execution to exit, + * then shuts down the VM). + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Stop + */ + stop: { + methodKind: "unary"; + input: typeof StopSandboxRequestSchema; + output: typeof EmptySchema; + }, + /** + * Forcibly destroy a sandbox and release all resources immediately. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Remove + */ + remove: { + methodKind: "unary"; + input: typeof RemoveSandboxRequestSchema; + output: typeof EmptySchema; + }, + /** + * Pause a sandbox: checkpoint it to disk under the same ID, then + * release its runtime resources (VM, network, CoW overlay). The + * record survives as PAUSED and Resume restores it in place — the + * origin VM is gone by construction, which sidesteps the direct-mode + * relocation constraint documented in `snapshot.proto` (CORE-21). + * Returns once the sandbox reaches PAUSED; requires READY (no active + * execution). Trades RAM for disk: a paused sandbox keeps paying + * `storage_bytes` until removed. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Pause + */ + pause: { + methodKind: "unary"; + input: typeof PauseSandboxRequestSchema; + output: typeof EmptySchema; + }, + /** + * Resume a PAUSED sandbox in place under the same ID; returns once + * it is READY again. Explicit resume is for control-plane callers: + * data-plane RPCs (executions, files) targeting a PAUSED sandbox + * resume it transparently before proceeding, so clients see a + * latency blip rather than an error. Callers that want the honest + * state machine instead set the reserved `x-arcbox-no-auto-resume` + * request header (not yet honored) and receive SANDBOX_PAUSED + * (`errors.proto`). Inspect and List never resume. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Resume + */ + resume: { + methodKind: "unary"; + input: typeof ResumeSandboxRequestSchema; + output: typeof EmptySchema; + }, + /** + * Replace a sandbox's lifecycle deadlines: the hard maximum lifetime + * (`ttl_seconds`, re-armed from now — CORE-60) and/or the idle + * timeout and its policy. Fields left unset are unchanged. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.SetLifecycle + */ + setLifecycle: { + methodKind: "unary"; + input: typeof SetLifecycleRequestSchema; + output: typeof EmptySchema; + }, + /** + * Report what this daemon can do: version, sandbox protocol level, + * feature flags, and whether nested virtualization is available. + * Serves the SDK's lazy version handshake and the fail-fast + * capability check (CORE-13): creating a sandbox on an unsupported + * host fails immediately with NESTED_VIRT_UNSUPPORTED instead of a + * boot that wedges. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.GetCapabilities + */ + getCapabilities: { + methodKind: "unary"; + input: typeof GetCapabilitiesRequestSchema; + output: typeof GetCapabilitiesResponseSchema; + }, + /** + * Return the current state and metadata of a sandbox. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Inspect + */ + inspect: { + methodKind: "unary"; + input: typeof InspectSandboxRequestSchema; + output: typeof SandboxInfoSchema; + }, + /** + * List sandboxes, optionally filtered by state or labels. Paginated. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.List + */ + list: { + methodKind: "unary"; + input: typeof ListSandboxesRequestSchema; + output: typeof ListSandboxesResponseSchema; + }, + /** + * Subscribe to sandbox lifecycle events. KeepAlive frames are + * interleaved while idle so proxies do not cut the connection. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.Events + */ + events: { + methodKind: "server_streaming"; + input: typeof SandboxEventsRequestSchema; + output: typeof WatchEventsResponseSchema; + }, + /** + * Expose a sandbox port on the host. The guest installs a DNAT rule from + * a reserved guest port (40000-49999) to the sandbox, and the daemon + * binds a host listener forwarding into the guest. Removed automatically + * on Stop/Remove. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.ExposePort + */ + exposePort: { + methodKind: "unary"; + input: typeof ExposePortRequestSchema; + output: typeof ExposePortResponseSchema; + }, + /** + * Remove a previously exposed port mapping. + * + * @generated from rpc arcbox.sandbox.v1.SandboxService.UnexposePort + */ + unexposePort: { + methodKind: "unary"; + input: typeof UnexposePortRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_arcbox_sandbox_v1_sandbox, 0); + diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/snapshot_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/snapshot_pb.ts new file mode 100644 index 00000000..3836ab20 --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/snapshot_pb.ts @@ -0,0 +1,365 @@ +// Sandbox checkpoint / restore. +// +// A snapshot captures a fully-booted, idle sandbox so that future sandboxes +// can be restored from it instead of booting from scratch. +// +// Checkpoint and Restore act on a specific sandbox / a specific node's +// snapshot store, so they sit with the data plane; the snapshot *catalog* +// (List / Delete) is control-plane-shaped and lives here with them because +// a snapshot is meaningless apart from the store that holds it. + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/snapshot.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/snapshot.proto. + */ +export const file_arcbox_sandbox_v1_snapshot: GenFile = /*@__PURE__*/ + fileDesc("CiBhcmNib3gvc2FuZGJveC92MS9zbmFwc2hvdC5wcm90bxIRYXJjYm94LnNhbmRib3gudjEipgEKEUNoZWNrcG9pbnRSZXF1ZXN0EhIKCnNhbmRib3hfaWQYASABKAkSDAoEbmFtZRgCIAEoCRJACgZsYWJlbHMYAyADKAsyMC5hcmNib3guc2FuZGJveC52MS5DaGVja3BvaW50UmVxdWVzdC5MYWJlbHNFbnRyeRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIm0KEkNoZWNrcG9pbnRSZXNwb25zZRITCgtzbmFwc2hvdF9pZBgBIAEoCRIuCgpjcmVhdGVkX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEoECAIQA1IMc25hcHNob3RfZGlyIs4BCg5SZXN0b3JlUmVxdWVzdBIKCgJpZBgBIAEoCRITCgtzbmFwc2hvdF9pZBgCIAEoCRI9CgZsYWJlbHMYAyADKAsyLS5hcmNib3guc2FuZGJveC52MS5SZXN0b3JlUmVxdWVzdC5MYWJlbHNFbnRyeRIYChBuZXR3b3JrX292ZXJyaWRlGAQgASgIEhMKC3R0bF9zZWNvbmRzGAUgASgNGi0KC0xhYmVsc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiMQoPUmVzdG9yZVJlc3BvbnNlEgoKAmlkGAEgASgJEhIKCmlwX2FkZHJlc3MYAiABKAkixQEKFExpc3RTbmFwc2hvdHNSZXF1ZXN0EhIKC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VzdBooLmFyY2JveC5zYW5kYm94LnYxLkxpc3RTbmFwc2hvdHNSZXNwb25zZRJSCg5EZWxldGVTbmFwc2hvdBIoLmFyY2JveC5zYW5kYm94LnYxLkRlbGV0ZVNuYXBzaG90UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eWIGcHJvdG8z", [file_google_protobuf_empty, file_google_protobuf_timestamp]); + +/** + * Request to checkpoint a sandbox. + * The sandbox must be in READY state (no active execution). + * + * @generated from message arcbox.sandbox.v1.CheckpointRequest + */ +export type CheckpointRequest = Message<"arcbox.sandbox.v1.CheckpointRequest"> & { + /** + * Sandbox ID to checkpoint. + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Human-readable label for the snapshot. + * + * @generated from field: string name = 2; + */ + name: string; + + /** + * Labels attached to the snapshot, filterable in ListSnapshots. + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; +}; + +/** + * Describes the message arcbox.sandbox.v1.CheckpointRequest. + * Use `create(CheckpointRequestSchema)` to create a new message. + */ +export const CheckpointRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 0); + +/** + * Response to Checkpoint. + * + * @generated from message arcbox.sandbox.v1.CheckpointResponse + */ +export type CheckpointResponse = Message<"arcbox.sandbox.v1.CheckpointResponse"> & { + /** + * Snapshot ID. + * + * @generated from field: string snapshot_id = 1; + */ + snapshotId: string; + + /** + * Creation time. + * + * @generated from field: google.protobuf.Timestamp created_at = 3; + */ + createdAt?: Timestamp | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.CheckpointResponse. + * Use `create(CheckpointResponseSchema)` to create a new message. + */ +export const CheckpointResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 1); + +/** + * Request to restore a sandbox from a snapshot. + * + * Restore requires jailer mode. Direct-mode vmstate records origin sandbox + * paths and cannot be safely relocated to a new sandbox ID. + * + * @generated from message arcbox.sandbox.v1.RestoreRequest + */ +export type RestoreRequest = Message<"arcbox.sandbox.v1.RestoreRequest"> & { + /** + * Caller-supplied ID for durable retry idempotency. Empty asks the daemon + * to generate a fresh UUID for every attempt. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Source snapshot ID. + * + * @generated from field: string snapshot_id = 2; + */ + snapshotId: string; + + /** + * Labels to assign to the restored sandbox. + * + * @generated from field: map labels = 3; + */ + labels: { [key: string]: string }; + + /** + * Assign a fresh TAP interface and IP. Required when running multiple + * sandboxes restored from the same snapshot concurrently. + * + * @generated from field: bool network_override = 4; + */ + networkOverride: boolean; + + /** + * TTL for the restored sandbox in seconds (0 = no limit). + * + * @generated from field: uint32 ttl_seconds = 5; + */ + ttlSeconds: number; +}; + +/** + * Describes the message arcbox.sandbox.v1.RestoreRequest. + * Use `create(RestoreRequestSchema)` to create a new message. + */ +export const RestoreRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 2); + +/** + * Response to Restore. + * The restored sandbox starts in READY state immediately. + * + * @generated from message arcbox.sandbox.v1.RestoreResponse + */ +export type RestoreResponse = Message<"arcbox.sandbox.v1.RestoreResponse"> & { + /** + * ID of the newly created sandbox. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * Allocated IP address. + * + * @generated from field: string ip_address = 2; + */ + ipAddress: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.RestoreResponse. + * Use `create(RestoreResponseSchema)` to create a new message. + */ +export const RestoreResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 3); + +/** + * Request to list snapshots. + * + * @generated from message arcbox.sandbox.v1.ListSnapshotsRequest + */ +export type ListSnapshotsRequest = Message<"arcbox.sandbox.v1.ListSnapshotsRequest"> & { + /** + * Filter by the origin sandbox ID (empty = all). + * + * @generated from field: string sandbox_id = 1; + */ + sandboxId: string; + + /** + * Filter by labels (all key-value pairs must match). + * + * @generated from field: map labels = 2; + */ + labels: { [key: string]: string }; + + /** + * Maximum entries per page (0 = server default of 100; capped at 1000). + * + * @generated from field: uint32 page_size = 3; + */ + pageSize: number; + + /** + * Continuation token from a previous response (empty = first page). + * + * @generated from field: string page_token = 4; + */ + pageToken: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListSnapshotsRequest. + * Use `create(ListSnapshotsRequestSchema)` to create a new message. + */ +export const ListSnapshotsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 4); + +/** + * Response to ListSnapshots. + * + * @generated from message arcbox.sandbox.v1.ListSnapshotsResponse + */ +export type ListSnapshotsResponse = Message<"arcbox.sandbox.v1.ListSnapshotsResponse"> & { + /** + * @generated from field: repeated arcbox.sandbox.v1.SnapshotSummary snapshots = 1; + */ + snapshots: SnapshotSummary[]; + + /** + * Token for the next page; empty when this is the last page. + * + * @generated from field: string next_page_token = 2; + */ + nextPageToken: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.ListSnapshotsResponse. + * Use `create(ListSnapshotsResponseSchema)` to create a new message. + */ +export const ListSnapshotsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 5); + +/** + * Lightweight snapshot summary. + * + * @generated from message arcbox.sandbox.v1.SnapshotSummary + */ +export type SnapshotSummary = Message<"arcbox.sandbox.v1.SnapshotSummary"> & { + /** + * Snapshot ID. + * + * @generated from field: string id = 1; + */ + id: string; + + /** + * ID of the sandbox that was checkpointed. + * + * @generated from field: string sandbox_id = 2; + */ + sandboxId: string; + + /** + * Human-readable label. + * + * @generated from field: string name = 3; + */ + name: string; + + /** + * Labels recorded at checkpoint time. + * + * @generated from field: map labels = 4; + */ + labels: { [key: string]: string }; + + /** + * Creation time. + * + * @generated from field: google.protobuf.Timestamp created_at = 6; + */ + createdAt?: Timestamp | undefined; +}; + +/** + * Describes the message arcbox.sandbox.v1.SnapshotSummary. + * Use `create(SnapshotSummarySchema)` to create a new message. + */ +export const SnapshotSummarySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 6); + +/** + * Request to delete a snapshot. + * + * @generated from message arcbox.sandbox.v1.DeleteSnapshotRequest + */ +export type DeleteSnapshotRequest = Message<"arcbox.sandbox.v1.DeleteSnapshotRequest"> & { + /** + * Snapshot ID. + * + * @generated from field: string snapshot_id = 1; + */ + snapshotId: string; +}; + +/** + * Describes the message arcbox.sandbox.v1.DeleteSnapshotRequest. + * Use `create(DeleteSnapshotRequestSchema)` to create a new message. + */ +export const DeleteSnapshotRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_arcbox_sandbox_v1_snapshot, 7); + +/** + * SandboxSnapshotService provides checkpoint / restore for cold-start + * optimisation. + * + * @generated from service arcbox.sandbox.v1.SandboxSnapshotService + */ +export const SandboxSnapshotService: GenService<{ + /** + * Checkpoint a sandbox into a reusable snapshot. + * The sandbox is paused, snapshotted, then resumed automatically. + * The sandbox must be in READY state with no active execution. + * + * @generated from rpc arcbox.sandbox.v1.SandboxSnapshotService.Checkpoint + */ + checkpoint: { + methodKind: "unary"; + input: typeof CheckpointRequestSchema; + output: typeof CheckpointResponseSchema; + }, + /** + * Restore a new sandbox from a previously created snapshot. + * The restored sandbox starts in READY state; boot time is near-zero. + * + * @generated from rpc arcbox.sandbox.v1.SandboxSnapshotService.Restore + */ + restore: { + methodKind: "unary"; + input: typeof RestoreRequestSchema; + output: typeof RestoreResponseSchema; + }, + /** + * List snapshots, optionally filtered by origin sandbox or label. + * Paginated. + * + * @generated from rpc arcbox.sandbox.v1.SandboxSnapshotService.ListSnapshots + */ + listSnapshots: { + methodKind: "unary"; + input: typeof ListSnapshotsRequestSchema; + output: typeof ListSnapshotsResponseSchema; + }, + /** + * Delete a snapshot and its on-disk data. + * + * @generated from rpc arcbox.sandbox.v1.SandboxSnapshotService.DeleteSnapshot + */ + deleteSnapshot: { + methodKind: "unary"; + input: typeof DeleteSnapshotRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_arcbox_sandbox_v1_snapshot, 0); + diff --git a/sdk/typescript/src/gen/arcbox/sandbox/v1/template_pb.ts b/sdk/typescript/src/gen/arcbox/sandbox/v1/template_pb.ts new file mode 100644 index 00000000..6eac1571 --- /dev/null +++ b/sdk/typescript/src/gen/arcbox/sandbox/v1/template_pb.ts @@ -0,0 +1,520 @@ +// Sandbox template catalog (CORE-21). +// +// A template is a named, versioned, reproducible base for sandboxes: a +// built rootfs plus a default-config bundle (resources, startup command, +// env, exposed ports, ready probe), optionally paired with a pre-warmed +// boot-to-ready snapshot for sub-second starts. Templates are what users +// author and share ("code-interpreter", "web-scraper", ...); +// `CreateSandboxRequest.template` resolves `name[:version]` references +// against this catalog. +// +// Control plane: the catalog addresses the fleet, not one sandbox. +// Checkpoint/restore of a *live* sandbox stays in `snapshot.proto`; +// promoting a checkpoint into a reusable template goes through +// `Build` with a `snapshot_id` source. + +// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js" +// @generated from file arcbox/sandbox/v1/template.proto (package arcbox.sandbox.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { ResourceLimits } from "./sandbox_pb.js"; +import { file_arcbox_sandbox_v1_sandbox } from "./sandbox_pb.js"; +import type { EmptySchema, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file arcbox/sandbox/v1/template.proto. + */ +export const file_arcbox_sandbox_v1_template: GenFile = /*@__PURE__*/ + fileDesc("CiBhcmNib3gvc2FuZGJveC92MS90ZW1wbGF0ZS5wcm90bxIRYXJjYm94LnNhbmRib3gudjEiygIKCFRlbXBsYXRlEgwKBG5hbWUYASABKAkSDwoHdmVyc2lvbhgCIAEoCRIO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UuYXJjYm94LnNhbmRib3gudjEuR2V0VGVtcGxhdGVSZXF1ZXN0GhsuYXJjYm94LnNhbmRib3gudjEuVGVtcGxhdGUSWQoETGlzdBInLmFyY2JveC5zYW5kYm94LnYxLkxpc3RUZW1wbGF0ZXNSZXF1ZXN0GiguYXJjYm94LnNhbmRib3gudjEuTGlzdFRlbXBsYXRlc1Jlc3BvbnNlEkoKBkRlbGV0ZRIoLmFyY2JveC5zYW5kYm94LnYxLkRlbGV0ZVRlbXBsYXRlUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eWIGcHJvdG8z", [file_arcbox_sandbox_v1_sandbox, file_google_protobuf_empty, file_google_protobuf_timestamp]); + +/** + * A template: named, versioned, reproducible sandbox base. + * + * @generated from message arcbox.sandbox.v1.Template + */ +export type Template = Message<"arcbox.sandbox.v1.Template"> & { + /** + * Template name, unique in the catalog. + * + * @generated from field: string name = 1; + */ + name: string; + + /** + * Published version this record describes (empty = unpublished draft). + * + * @generated from field: string version = 2; + */ + version: string; + + /** + * Content digest pinning this version's artifacts. + * + * @generated from field: string digest = 3; + */ + digest: string; + + /** + * Reference to the built rootfs image in the rootfs cache. + * + * @generated from field: string rootfs_ref = 4; + */ + rootfsRef: string; + + /** + * Pre-warmed boot-to-ready snapshot (empty = cold boot from + * `rootfs_ref`). Not a oneof with `rootfs_ref`: a built rootfs and + * its pre-warmed snapshot compose — creating from this template + * restores the snapshot for sub-second READY (CORE-16). + * + * @generated from field: string warm_snapshot_id = 5; + */ + warmSnapshotId: string; + + /** + * Defaults applied to sandboxes created from this template. + * + * @generated from field: arcbox.sandbox.v1.TemplateDefaults defaults = 6; + */ + defaults?: TemplateDefaults | undefined; + + /** + * Creation time of this version. + * + * @generated from field: google.protobuf.Timestamp created_at = 7; + */ + createdAt?: Timestamp | undefined; + + /** + * Arbitrary key-value metadata (filterable in List). + * + * @generated from field: map labels = 8; + */ + labels: { [key: string]: string }; + + /** + * On-disk footprint of this version's artifacts (rootfs + warm + * snapshot). + * + * @generated from field: uint64 size_bytes = 9; + */ + sizeBytes: bigint; +}; + +/** + * Describes the message arcbox.sandbox.v1.Template. + * Use `create(TemplateSchema)` to create a new message. + */ +export const TemplateSchema: GenMessage