commit 63a3d995881f2c93ef538d206e1d86810b0f2099 Author: Timothy J. Aveni Date: Sun Jul 12 12:55:03 2026 -0700 Move quixos protocol to repository root diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a81576 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# Quixos Protocol + +Shared protobuf definitions for Camino, camino-orch, package descriptors, and +future package runtime RPC. + +This package owns the canonical proto source. Current services still generate +local TypeScript bindings from these protos; the generated bindings here are +available for later consolidation. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..96bc53e --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1783776592, + "narHash": "sha256-UgCQzxeWI75XM8G+hPrPh+MKzEPjG3SpAj7dtqSbksA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e7a3ca8092b61ff85b6a45bf863ea2b2d6a661b3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..95cf96e --- /dev/null +++ b/flake.nix @@ -0,0 +1,68 @@ +{ + description = "Shared Quixos protobuf protocol definitions"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + quixos-protocol = pkgs.stdenvNoCC.mkDerivation { + pname = "quixos-protocol"; + version = "0.1.0"; + src = ./.; + npmDeps = pkgs.importNpmLock { npmRoot = ./.; }; + npmConfigHook = pkgs.importNpmLock.npmConfigHook; + nativeBuildInputs = [ + pkgs.importNpmLock.npmConfigHook + pkgs.nodejs_24 + pkgs.protobuf + ]; + buildPhase = '' + runHook preBuild + export QUIXOS_PROTO_PATH="${pkgs.protobuf}/include:$PWD/proto''${QUIXOS_PROTO_PATH:+:$QUIXOS_PROTO_PATH}" + npm run build + runHook postBuild + ''; + installPhase = '' + runHook preInstall + mkdir -p "$out" + cp --reflink=auto --recursive proto "$out/proto" + cp --reflink=auto --recursive dist "$out/dist" + cp package.json "$out/package.json" + mkdir -p "$out/bin" + cat > "$out/bin/quixos-descriptor-check" <=20" + }, + "peerDependencies": { + "@bufbuild/protobuf": "2.12.1" + }, + "peerDependenciesMeta": { + "@bufbuild/protobuf": { + "optional": true + } + } + }, + "node_modules/@bufbuild/protoplugin": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/@bufbuild/protoplugin/-/protoplugin-2.12.1.tgz", + "integrity": "sha512-PY58KxQVAD1BnnKtStOctsMoegEVGfBnY5AOqVQOIu711nA13oYtTqJM8df5lUQg2J1DR3XxUXptE+fWX5oLdA==", + "license": "Apache-2.0", + "dependencies": { + "@bufbuild/protobuf": "2.12.1", + "@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==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@types/node": { + "version": "24.13.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.3.tgz", + "integrity": "sha512-Dh8vAsV36ig5wa9OX4pXvMc9D3Veibfw2wix0CUwYODLD8nkj9UsLjASr49nPg+2eKzxhBV+v7L8pXvT4e639Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.18.0" + } + }, + "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==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3" + }, + "peerDependencies": { + "typescript": "*" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "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==", + "license": "MIT" + }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..6f88ba8 --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "@quixos/quixos-protocol", + "version": "0.1.0", + "private": true, + "type": "module", + "bin": { + "quixos-descriptor-check": "dist/src/descriptor-check.js" + }, + "exports": { + "./gen/*": "./dist/src/gen/*" + }, + "scripts": { + "build": "npm run generate && tsc -p tsconfig.build.json", + "generate": "rm -rf src/gen && mkdir -p src/gen && protoc --plugin=protoc-gen-es=./node_modules/.bin/protoc-gen-es --es_out=src/gen --es_opt=target=ts,import_extension=js --proto_path=proto --proto_path=$QUIXOS_PROTO_PATH proto/quixos/refs.proto proto/quixos/package.proto proto/quixos/orch.proto proto/quixos/runtime.proto proto/camino/schema.proto proto/camino/api.proto proto/camino/options.proto", + "typecheck": "npm run generate && tsc --noEmit" + }, + "dependencies": { + "@bufbuild/protobuf": "^2.12.1", + "@bufbuild/protoc-gen-es": "^2.12.1" + }, + "devDependencies": { + "@types/node": "^24", + "typescript": "^5.9.3" + } +} diff --git a/proto/camino/api.proto b/proto/camino/api.proto new file mode 100644 index 0000000..de2d3b0 --- /dev/null +++ b/proto/camino/api.proto @@ -0,0 +1,184 @@ +syntax = "proto3"; + +package camino; + +import "camino/schema.proto"; +import "quixos/refs.proto"; + +service CaminoService { + rpc RegisterSchema(RegisterSchemaRequest) returns (RegisterSchemaResponse); + rpc ListClasses(ListClassesRequest) returns (ListClassesResponse); + rpc CreateObject(CreateObjectRequest) returns (CreateObjectResponse); + rpc GetObject(GetObjectRequest) returns (GetObjectResponse); + rpc SetField(SetFieldRequest) returns (SetFieldResponse); + rpc AddEdge(AddEdgeRequest) returns (AddEdgeResponse); + rpc ListEdges(ListEdgesRequest) returns (ListEdgesResponse); + rpc RemoveEdge(RemoveEdgeRequest) returns (RemoveEdgeResponse); + rpc ListOps(ListOpsRequest) returns (ListOpsResponse); + rpc WatchObject(WatchObjectRequest) returns (stream WatchObjectEvent); +} + +message RegisterSchemaRequest { + string source_file = 1; +} + +message RegisterSchemaResponse { + repeated string class_ids = 1; + repeated ClassSchema classes = 2; +} + +message ListClassesRequest {} + +message RegisteredClass { + string id = 1; + ClassSchema schema = 2; +} + +message ListClassesResponse { + repeated RegisteredClass classes = 1; +} + +message NullValue {} + +message ObjectValue { + map fields = 1; +} + +message ListValue { + repeated Value values = 1; +} + +message RefValue { + string object_id = 1; +} + +message CrdtValue { + string type = 1; + string encoding = 2; + bytes payload = 3; +} + +message Value { + oneof kind { + NullValue null_value = 1; + bool bool_value = 2; + double number_value = 3; + string string_value = 4; + string integer_value = 5; + bytes bytes_value = 6; + ObjectValue object_value = 7; + ListValue list_value = 8; + RefValue ref_value = 9; + CrdtValue crdt_value = 10; + } +} + +message CreateObjectRequest { + string class_id = 1; + map fields = 2; +} + +message CreateObjectResponse { + CaminoObject object = 1; +} + +message GetObjectRequest { + string object_id = 1; +} + +message GetObjectResponse { + CaminoObject object = 1; +} + +message SetFieldRequest { + string object_id = 1; + string field_name = 2; + Value value = 3; +} + +message SetFieldResponse { + CaminoObject object = 1; +} + +message AddEdgeRequest { + string from_object_id = 1; + string source_field = 2; + string to_object_id = 3; + map fields = 4; + optional int32 ordinal = 5; +} + +message AddEdgeResponse { + CaminoEdge edge = 1; +} + +message ListEdgesRequest { + string object_id = 1; +} + +message ListEdgesResponse { + repeated CaminoEdge edges = 1; +} + +message RemoveEdgeRequest { + string edge_id = 1; +} + +message RemoveEdgeResponse { + string edge_id = 1; +} + +message ListOpsRequest { + string object_id = 1; +} + +message ListOpsResponse { + repeated CaminoOp ops = 1; +} + +message WatchObjectRequest { + string object_id = 1; + string after_op_id = 2; + bool include_snapshot = 3; +} + +message WatchObjectEvent { + string object_id = 1; + CaminoObject snapshot = 2; + CaminoOp op = 3; +} + +message CaminoObject { + string id = 1; + string class_id = 2; + uint32 schema_version = 3; + string created_at = 4; + string updated_at = 5; + map fields = 6; + map field_revisions = 7; + map field_conflicts = 8; +} + +message CaminoEdge { + string id = 1; + string edge_type_id = 2; + string from_object_id = 3; + string to_object_id = 4; + string source_field = 5; + string cardinality = 6; + string inverse = 7; + map fields = 8; + optional int32 ordinal = 9; + string created_at = 10; + string updated_at = 11; +} + +message CaminoOp { + string id = 1; + string object_id = 2; + string op_kind = 3; + Value payload = 4; + string actor = 5; + quixos.FunctionRef function_ref = 6; + string created_at = 7; +} diff --git a/proto/camino/options.proto b/proto/camino/options.proto new file mode 100644 index 0000000..075f894 --- /dev/null +++ b/proto/camino/options.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; + +package camino; + +import "google/protobuf/descriptor.proto"; +import "camino/schema.proto"; +import "quixos/refs.proto"; + +extend google.protobuf.FileOptions { + string schema_namespace = 51000; + string schema_version = 51001; +} + +extend google.protobuf.MessageOptions { + ClassOptions class = 51010; + repeated MethodOptions method = 51011; + repeated MigrationOptions migration = 51012; +} + +extend google.protobuf.FieldOptions { + ConflictStrategy conflict = 51020; + EdgeOptions edge = 51021; + FieldStorage field_storage = 51022; + FieldOps field_ops = 51023; +} + +extend google.protobuf.MethodOptions { + quixos.FunctionRef impl = 51030; +} + +message ClassOptions { + uint32 version = 1; + SymbolRef id = 2; +} + +message EdgeOptions { + SymbolRef id = 1; + SymbolRef target = 2; + Cardinality cardinality = 3; + string inverse = 4; +} + +message MethodOptions { + string name = 1; + quixos.FunctionRef function = 2; +} + +message MigrationOptions { + uint32 from_version = 1; + uint32 to_version = 2; + quixos.FunctionRef function = 3; +} diff --git a/proto/camino/schema.proto b/proto/camino/schema.proto new file mode 100644 index 0000000..5d2d022 --- /dev/null +++ b/proto/camino/schema.proto @@ -0,0 +1,155 @@ +syntax = "proto3"; + +package camino; + +import "quixos/refs.proto"; + +message SymbolRef { + string namespace = 1; + string name = 2; + string version = 3; + string hash = 4; +} + +enum ConflictStrategy { + CONFLICT_STRATEGY_UNSPECIFIED = 0; + REPLACE = 1; + PRESERVE_CONFLICTS = 2; + CRDT = 3; +} + +enum Cardinality { + CARDINALITY_UNSPECIFIED = 0; + OPTIONAL_ONE = 1; + EXACTLY_ONE = 2; + MANY = 3; + MANY_UNIQUE = 4; + MANY_ORDERED = 5; +} + +enum DocRefStrength { + DOC_REF_STRENGTH_UNSPECIFIED = 0; + SOFT_REF = 1; + PROJECTED_EDGE = 2; +} + +enum FieldStorageKind { + FIELD_STORAGE_KIND_UNSPECIFIED = 0; + STORED = 1; + DERIVED = 2; + LAZY = 3; + EXTERNAL = 4; +} + +message Ref { + string object_id = 1; +} + +message CustomField {} + +message WatchStartResult { + string watch_id = 1; +} + +message WatchStopRequest { + string watch_id = 1; +} + +message WatchStopResult {} + +message CrdtText { + bytes payload = 1; +} + +message CrdtRichText { + bytes payload = 1; +} + +message CrdtJson { + bytes payload = 1; +} + +message ClassSchema { + SymbolRef id = 1; + uint32 version = 2; + repeated FieldSchema fields = 3; + repeated EdgeSchema edges = 4; + repeated MethodSchema methods = 5; + repeated MigrationSpec migrations = 6; + string source_file = 7; + string proto_message = 8; + repeated OperationServiceSchema operation_services = 9; +} + +message FieldSchema { + string name = 1; + uint32 tag = 2; + TypeRef type = 3; + ConflictStrategy conflict = 4; + bool repeated = 5; + bool optional = 6; + FieldStorage storage = 7; + FieldOps ops = 8; +} + +message FieldStorage { + FieldStorageKind kind = 1; + quixos.FunctionRef resolver = 2; + bool cache = 3; +} + +message TypeRef { + string proto_type = 1; + SymbolRef symbol = 2; +} + +enum FieldImplementation { + FIELD_IMPLEMENTATION_UNSPECIFIED = 0; + SERVICE = 1; +} + +message FieldOps { + FieldImplementation implementation = 1; + string service = 2; +} + +message EdgeSchema { + SymbolRef id = 1; + string source_field = 2; + SymbolRef from_class = 3; + SymbolRef to_class = 4; + Cardinality cardinality = 5; + string inverse = 6; + repeated FieldSchema fields = 7; +} + +message MethodSchema { + string name = 1; + quixos.FunctionRef function = 2; +} + +message MigrationSpec { + uint32 from_version = 1; + uint32 to_version = 2; + quixos.FunctionRef function = 3; +} + +message OperationSchema { + string name = 1; + TypeRef input_type = 2; + TypeRef output_type = 3; + quixos.FunctionRef function = 4; +} + +message OperationServiceSchema { + string name = 1; + string full_name = 2; + repeated OperationSchema operations = 3; +} + +message DocRefDeclaration { + string local_name = 1; + SymbolRef type = 2; + SymbolRef target_class = 3; + DocRefStrength strength = 4; +} diff --git a/proto/quixos/orch.proto b/proto/quixos/orch.proto new file mode 100644 index 0000000..b0f746e --- /dev/null +++ b/proto/quixos/orch.proto @@ -0,0 +1,86 @@ +syntax = "proto3"; + +package quixos.orch; + +import "camino/api.proto"; +import "quixos/package.proto"; +import "quixos/refs.proto"; + +service OrchestratorRuntime { + rpc InvokeFunction(InvokeFunctionRequest) returns (InvokeFunctionResponse); + rpc ListPackageDescriptors(ListPackageDescriptorsRequest) returns (ListPackageDescriptorsResponse); + rpc ListPackageRuntimes(ListPackageRuntimesRequest) returns (ListPackageRuntimesResponse); + rpc ListActivations(ListActivationsRequest) returns (ListActivationsResponse); + rpc CloseActivation(CloseActivationRequest) returns (CloseActivationResponse); +} + +message InvokeFunctionRequest { + quixos.FunctionRef function = 1; + string object_id = 2; + map input = 3; +} + +message InvokeFunctionResponse { + string invocation_id = 1; + Activation activation = 2; + bool ok = 3; + camino.Value result = 4; + string error = 5; +} + +message ListActivationsRequest {} + +message ListPackageDescriptorsRequest {} + +message ListPackageDescriptorsResponse { + repeated quixos.PackageDescriptor descriptors = 1; +} + +message ListPackageRuntimesRequest {} + +message ListPackageRuntimesResponse { + repeated PackageRuntimeStatus runtimes = 1; +} + +message ListActivationsResponse { + repeated Activation activations = 1; +} + +message CloseActivationRequest { + string activation_id = 1; + string reason = 2; +} + +message CloseActivationResponse { + Activation activation = 1; +} + +message Activation { + string activation_id = 1; + quixos.FunctionRef function = 2; + string object_id = 3; + string state = 4; + uint32 demand = 5; + string opened_at = 6; + string last_used_at = 7; + string idle_deadline_at = 8; + string closed_at = 9; + string close_reason = 10; +} + +message PackageRuntimeStatus { + string runtime_key = 1; + string package_namespace = 2; + string package_name = 3; + uint32 descriptor_version = 4; + string source_repo = 5; + string server_installable = 6; + string source_path = 7; + string server_path = 8; + uint32 pid = 9; + string state = 10; + string started_at = 11; + string last_handshake_at = 12; + string runtime_protocol_version = 13; + uint32 advertised_function_count = 14; +} diff --git a/proto/quixos/package.proto b/proto/quixos/package.proto new file mode 100644 index 0000000..4687994 --- /dev/null +++ b/proto/quixos/package.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +package quixos; + +import "camino/schema.proto"; +import "quixos/refs.proto"; + +message PackageRef { + string package_namespace = 1; + string package_name = 2; + uint32 descriptor_version = 3; + string version_ref = 4; +} + +message PackageDescriptor { + string package_namespace = 1; + string package_name = 2; + uint32 descriptor_version = 3; + uint32 interface_compatible_back_to = 4; + uint32 runner_compatible_back_to = 5; + string source_repo = 6; + string source_ref = 7; + string resolved_source_ref = 8; + string server_installable = 9; + string runtime_protocol_version = 10; + repeated ClassExport class_exports = 11; + repeated FunctionExport function_exports = 12; + repeated ComponentExport component_exports = 13; + repeated SidecarExport sidecar_exports = 14; + repeated PackageDependency dependencies = 15; +} + +enum FunctionCapabilityKind { + FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0; + METHOD = 1; + FIELD_RESOLVER = 2; + MIGRATION = 3; +} + +message ClassExport { + camino.SymbolRef class_id = 1; + string source_file = 2; +} + +message FunctionExport { + FunctionRef function = 1; + string input_type = 2; + string output_type = 3; + uint32 interface_version = 4; + uint32 interface_compatible_back_to = 5; + FunctionCapabilityKind capability_kind = 6; +} + +message ComponentExport { + string symbol = 1; + string props_type = 2; + repeated camino.SymbolRef supported_classes = 3; +} + +message SidecarExport { + string symbol = 1; + string side_effect_mode = 2; +} + +message PackageDependency { + PackageRef package = 1; + uint32 interface_compatible_back_to = 2; + bool refactor_required = 3; + string compatibility_note = 4; +} diff --git a/proto/quixos/refs.proto b/proto/quixos/refs.proto new file mode 100644 index 0000000..357a44f --- /dev/null +++ b/proto/quixos/refs.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package quixos; + +message FunctionRef { + string package_namespace = 1; + string package_name = 2; + string symbol = 3; + string version_ref = 4; + string operation = 5; +} diff --git a/proto/quixos/runtime.proto b/proto/quixos/runtime.proto new file mode 100644 index 0000000..241db00 --- /dev/null +++ b/proto/quixos/runtime.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package quixos.runtime; + +import "camino/api.proto"; +import "quixos/refs.proto"; + +service PackageRuntime { + rpc Handshake(HandshakeRequest) returns (HandshakeResponse); + rpc Invoke(InvokeRequest) returns (InvokeResponse); +} + +message HandshakeRequest { + string orch_protocol_version = 1; +} + +message HandshakeResponse { + string package_namespace = 1; + string package_name = 2; + string runtime_protocol_version = 3; + repeated quixos.FunctionRef functions = 4; +} + +message InvokeRequest { + string invocation_id = 1; + quixos.FunctionRef function = 2; + string object_id = 3; + map input = 4; +} + +message InvokeResponse { + bool ok = 1; + camino.Value result = 2; + string error = 3; +} diff --git a/src/descriptor-check.ts b/src/descriptor-check.ts new file mode 100644 index 0000000..031038a --- /dev/null +++ b/src/descriptor-check.ts @@ -0,0 +1,31 @@ +#!/usr/bin/env node +import fs from "node:fs"; +import { + packageDescriptorToJson, + parsePackageDescriptorTextproto, + validatePackageDescriptor, +} from "./descriptor.js"; + +const usage = (): never => { + console.error("Usage: quixos-descriptor-check "); + process.exit(1); +}; + +const path = process.argv[2] ?? usage(); + +try { + const descriptor = parsePackageDescriptorTextproto( + fs.readFileSync(path, "utf8"), + ); + const errors = validatePackageDescriptor(descriptor); + if (errors.length > 0) { + for (const error of errors) { + console.error(error); + } + process.exit(1); + } + process.stdout.write(`${packageDescriptorToJson(descriptor)}\n`); +} catch (error) { + console.error(error instanceof Error ? error.message : String(error)); + process.exit(1); +} diff --git a/src/descriptor.ts b/src/descriptor.ts new file mode 100644 index 0000000..43e092c --- /dev/null +++ b/src/descriptor.ts @@ -0,0 +1,163 @@ +import childProcess from "node:child_process"; +import fs from "node:fs"; +import path from "node:path"; +import { fromBinary, toJsonString } from "@bufbuild/protobuf"; +import type { PackageDescriptor } from "./gen/quixos/package_pb.js"; +import { + FunctionCapabilityKind, + PackageDescriptorSchema, +} from "./gen/quixos/package_pb.js"; + +const functionKey = (value: { + packageNamespace: string; + packageName: string; + symbol: string; + versionRef: string; +}) => + [ + value.packageNamespace, + value.packageName, + value.symbol, + value.versionRef, + ].join(":"); + +const protoPaths = () => { + const candidates = [ + ...(process.env.QUIXOS_PROTO_PATH ?? "") + .split(path.delimiter) + .map((entry) => entry.trim()) + .filter(Boolean), + path.resolve(process.cwd(), "proto"), + path.resolve(process.cwd(), "quixos-protocol/proto"), + ]; + return [...new Set(candidates)].filter((candidate) => + fs.existsSync(path.join(candidate, "quixos/package.proto")), + ); +}; + +export const parsePackageDescriptorTextproto = ( + text: string, +): PackageDescriptor => { + const paths = protoPaths(); + if (paths.length === 0) { + throw new Error( + "QUIXOS_PROTO_PATH must include quixos-protocol/proto to parse package descriptors", + ); + } + const result = childProcess.spawnSync( + "protoc", + [ + ...paths.map((protoPath) => `--proto_path=${protoPath}`), + "--encode=quixos.PackageDescriptor", + "quixos/package.proto", + ], + { + input: Buffer.from(text), + maxBuffer: 1024 * 1024 * 8, + }, + ); + if (result.error) { + throw result.error; + } + if (result.status !== 0) { + throw new Error( + `Failed to parse package descriptor textproto:\n${result.stderr.toString().trim()}`, + ); + } + return fromBinary(PackageDescriptorSchema, result.stdout); +}; + +export const packageDescriptorToJson = (descriptor: PackageDescriptor) => + toJsonString(PackageDescriptorSchema, descriptor, { + prettySpaces: 2, + }); + +export const validatePackageDescriptor = ( + descriptor: PackageDescriptor, +): string[] => { + const errors: string[] = []; + if (!descriptor.packageNamespace) { + errors.push("packageNamespace is required"); + } + if (!descriptor.packageName) { + errors.push("packageName is required"); + } + if (descriptor.descriptorVersion === 0) { + errors.push("descriptorVersion must be greater than zero"); + } + if ( + descriptor.interfaceCompatibleBackTo !== 0 && + descriptor.interfaceCompatibleBackTo > descriptor.descriptorVersion + ) { + errors.push("interfaceCompatibleBackTo must not exceed descriptorVersion"); + } + if ( + descriptor.runnerCompatibleBackTo !== 0 && + descriptor.runnerCompatibleBackTo > descriptor.descriptorVersion + ) { + errors.push("runnerCompatibleBackTo must not exceed descriptorVersion"); + } + + const seenFunctions = new Set(); + for (const [index, entry] of descriptor.functionExports.entries()) { + const fn = entry.function; + if (!fn) { + errors.push(`functionExports[${index}].function is required`); + continue; + } + if (!fn.packageNamespace) { + fn.packageNamespace = descriptor.packageNamespace; + } + if (!fn.packageName) { + fn.packageName = descriptor.packageName; + } + if ( + fn.packageNamespace !== descriptor.packageNamespace || + fn.packageName !== descriptor.packageName + ) { + errors.push( + `functionExports[${index}] must export from this package (${descriptor.packageNamespace}/${descriptor.packageName})`, + ); + } + if (!fn.symbol) { + errors.push(`functionExports[${index}].function.symbol is required`); + } + if (entry.interfaceVersion === 0) { + errors.push(`functionExports[${index}].interfaceVersion is required`); + } + if (entry.capabilityKind === FunctionCapabilityKind.FUNCTION_CAPABILITY_KIND_UNSPECIFIED) { + errors.push(`functionExports[${index}].capabilityKind is required`); + } + if ( + entry.interfaceCompatibleBackTo !== 0 && + entry.interfaceCompatibleBackTo > entry.interfaceVersion + ) { + errors.push( + `functionExports[${index}].interfaceCompatibleBackTo must not exceed interfaceVersion`, + ); + } + const key = functionKey(fn); + if (seenFunctions.has(key)) { + errors.push(`duplicate function export: ${key}`); + } + seenFunctions.add(key); + } + + for (const [index, entry] of descriptor.dependencies.entries()) { + if (!entry.package) { + errors.push(`dependencies[${index}].package is required`); + continue; + } + if (!entry.package.packageNamespace) { + errors.push(`dependencies[${index}].package.packageNamespace is required`); + } + if (!entry.package.packageName) { + errors.push(`dependencies[${index}].package.packageName is required`); + } + if (entry.package.descriptorVersion === 0) { + errors.push(`dependencies[${index}].package.descriptorVersion is required`); + } + } + + return errors; +}; diff --git a/src/gen/camino/api_pb.ts b/src/gen/camino/api_pb.ts new file mode 100644 index 0000000..c545abd --- /dev/null +++ b/src/gen/camino/api_pb.ts @@ -0,0 +1,856 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file camino/api.proto (package camino, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { ClassSchema } from "./schema_pb.js"; +import { file_camino_schema } from "./schema_pb.js"; +import type { FunctionRef } from "../quixos/refs_pb.js"; +import { file_quixos_refs } from "../quixos/refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file camino/api.proto. + */ +export const file_camino_api: GenFile = /*@__PURE__*/ + fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iLAoVUmVnaXN0ZXJTY2hlbWFSZXF1ZXN0EhMKC3NvdXJjZV9maWxlGAEgASgJIlEKFlJlZ2lzdGVyU2NoZW1hUmVzcG9uc2USEQoJY2xhc3NfaWRzGAEgAygJEiQKB2NsYXNzZXMYAiADKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiFAoSTGlzdENsYXNzZXNSZXF1ZXN0IkIKD1JlZ2lzdGVyZWRDbGFzcxIKCgJpZBgBIAEoCRIjCgZzY2hlbWEYAiABKAsyEy5jYW1pbm8uQ2xhc3N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cuY2FtaW5vLlNldEZpZWxkUmVxdWVzdBoYLmNhbWluby5TZXRGaWVsZFJlc3BvbnNlEjoKB0FkZEVkZ2USFi5jYW1pbm8uQWRkRWRnZVJlcXVlc3QaFy5jYW1pbm8uQWRkRWRnZVJlc3BvbnNlEkAKCUxpc3RFZGdlcxIYLmNhbWluby5MaXN0RWRnZXNSZXF1ZXN0GhkuY2FtaW5vLkxpc3RFZGdlc1Jlc3BvbnNlEkMKClJlbW92ZUVkZ2USGS5jYW1pbm8uUmVtb3ZlRWRnZVJlcXVlc3QaGi5jYW1pbm8uUmVtb3ZlRWRnZVJlc3BvbnNlEjoKB0xpc3RPcHMSFi5jYW1pbm8uTGlzdE9wc1JlcXVlc3QaFy5jYW1pbm8uTGlzdE9wc1Jlc3BvbnNlEkUKC1dhdGNoT2JqZWN0EhouY2FtaW5vLldhdGNoT2JqZWN0UmVxdWVzdBoYLmNhbWluby5XYXRjaE9iamVjdEV2ZW50MAFiBnByb3RvMw", [file_camino_schema, file_quixos_refs]); + +/** + * @generated from message camino.RegisterSchemaRequest + */ +export type RegisterSchemaRequest = Message<"camino.RegisterSchemaRequest"> & { + /** + * @generated from field: string source_file = 1; + */ + sourceFile: string; +}; + +/** + * Describes the message camino.RegisterSchemaRequest. + * Use `create(RegisterSchemaRequestSchema)` to create a new message. + */ +export const RegisterSchemaRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 0); + +/** + * @generated from message camino.RegisterSchemaResponse + */ +export type RegisterSchemaResponse = Message<"camino.RegisterSchemaResponse"> & { + /** + * @generated from field: repeated string class_ids = 1; + */ + classIds: string[]; + + /** + * @generated from field: repeated camino.ClassSchema classes = 2; + */ + classes: ClassSchema[]; +}; + +/** + * Describes the message camino.RegisterSchemaResponse. + * Use `create(RegisterSchemaResponseSchema)` to create a new message. + */ +export const RegisterSchemaResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 1); + +/** + * @generated from message camino.ListClassesRequest + */ +export type ListClassesRequest = Message<"camino.ListClassesRequest"> & { +}; + +/** + * Describes the message camino.ListClassesRequest. + * Use `create(ListClassesRequestSchema)` to create a new message. + */ +export const ListClassesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 2); + +/** + * @generated from message camino.RegisteredClass + */ +export type RegisteredClass = Message<"camino.RegisteredClass"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: camino.ClassSchema schema = 2; + */ + schema?: ClassSchema | undefined; +}; + +/** + * Describes the message camino.RegisteredClass. + * Use `create(RegisteredClassSchema)` to create a new message. + */ +export const RegisteredClassSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 3); + +/** + * @generated from message camino.ListClassesResponse + */ +export type ListClassesResponse = Message<"camino.ListClassesResponse"> & { + /** + * @generated from field: repeated camino.RegisteredClass classes = 1; + */ + classes: RegisteredClass[]; +}; + +/** + * Describes the message camino.ListClassesResponse. + * Use `create(ListClassesResponseSchema)` to create a new message. + */ +export const ListClassesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 4); + +/** + * @generated from message camino.NullValue + */ +export type NullValue = Message<"camino.NullValue"> & { +}; + +/** + * Describes the message camino.NullValue. + * Use `create(NullValueSchema)` to create a new message. + */ +export const NullValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 5); + +/** + * @generated from message camino.ObjectValue + */ +export type ObjectValue = Message<"camino.ObjectValue"> & { + /** + * @generated from field: map fields = 1; + */ + fields: { [key: string]: Value }; +}; + +/** + * Describes the message camino.ObjectValue. + * Use `create(ObjectValueSchema)` to create a new message. + */ +export const ObjectValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 6); + +/** + * @generated from message camino.ListValue + */ +export type ListValue = Message<"camino.ListValue"> & { + /** + * @generated from field: repeated camino.Value values = 1; + */ + values: Value[]; +}; + +/** + * Describes the message camino.ListValue. + * Use `create(ListValueSchema)` to create a new message. + */ +export const ListValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 7); + +/** + * @generated from message camino.RefValue + */ +export type RefValue = Message<"camino.RefValue"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; +}; + +/** + * Describes the message camino.RefValue. + * Use `create(RefValueSchema)` to create a new message. + */ +export const RefValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 8); + +/** + * @generated from message camino.CrdtValue + */ +export type CrdtValue = Message<"camino.CrdtValue"> & { + /** + * @generated from field: string type = 1; + */ + type: string; + + /** + * @generated from field: string encoding = 2; + */ + encoding: string; + + /** + * @generated from field: bytes payload = 3; + */ + payload: Uint8Array; +}; + +/** + * Describes the message camino.CrdtValue. + * Use `create(CrdtValueSchema)` to create a new message. + */ +export const CrdtValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 9); + +/** + * @generated from message camino.Value + */ +export type Value = Message<"camino.Value"> & { + /** + * @generated from oneof camino.Value.kind + */ + kind: { + /** + * @generated from field: camino.NullValue null_value = 1; + */ + value: NullValue; + case: "nullValue"; + } | { + /** + * @generated from field: bool bool_value = 2; + */ + value: boolean; + case: "boolValue"; + } | { + /** + * @generated from field: double number_value = 3; + */ + value: number; + case: "numberValue"; + } | { + /** + * @generated from field: string string_value = 4; + */ + value: string; + case: "stringValue"; + } | { + /** + * @generated from field: string integer_value = 5; + */ + value: string; + case: "integerValue"; + } | { + /** + * @generated from field: bytes bytes_value = 6; + */ + value: Uint8Array; + case: "bytesValue"; + } | { + /** + * @generated from field: camino.ObjectValue object_value = 7; + */ + value: ObjectValue; + case: "objectValue"; + } | { + /** + * @generated from field: camino.ListValue list_value = 8; + */ + value: ListValue; + case: "listValue"; + } | { + /** + * @generated from field: camino.RefValue ref_value = 9; + */ + value: RefValue; + case: "refValue"; + } | { + /** + * @generated from field: camino.CrdtValue crdt_value = 10; + */ + value: CrdtValue; + case: "crdtValue"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message camino.Value. + * Use `create(ValueSchema)` to create a new message. + */ +export const ValueSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 10); + +/** + * @generated from message camino.CreateObjectRequest + */ +export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { + /** + * @generated from field: string class_id = 1; + */ + classId: string; + + /** + * @generated from field: map fields = 2; + */ + fields: { [key: string]: Value }; +}; + +/** + * Describes the message camino.CreateObjectRequest. + * Use `create(CreateObjectRequestSchema)` to create a new message. + */ +export const CreateObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 11); + +/** + * @generated from message camino.CreateObjectResponse + */ +export type CreateObjectResponse = Message<"camino.CreateObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; + +/** + * Describes the message camino.CreateObjectResponse. + * Use `create(CreateObjectResponseSchema)` to create a new message. + */ +export const CreateObjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 12); + +/** + * @generated from message camino.GetObjectRequest + */ +export type GetObjectRequest = Message<"camino.GetObjectRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; +}; + +/** + * Describes the message camino.GetObjectRequest. + * Use `create(GetObjectRequestSchema)` to create a new message. + */ +export const GetObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 13); + +/** + * @generated from message camino.GetObjectResponse + */ +export type GetObjectResponse = Message<"camino.GetObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; + +/** + * Describes the message camino.GetObjectResponse. + * Use `create(GetObjectResponseSchema)` to create a new message. + */ +export const GetObjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 14); + +/** + * @generated from message camino.SetFieldRequest + */ +export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: string field_name = 2; + */ + fieldName: string; + + /** + * @generated from field: camino.Value value = 3; + */ + value?: Value | undefined; +}; + +/** + * Describes the message camino.SetFieldRequest. + * Use `create(SetFieldRequestSchema)` to create a new message. + */ +export const SetFieldRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 15); + +/** + * @generated from message camino.SetFieldResponse + */ +export type SetFieldResponse = Message<"camino.SetFieldResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; + +/** + * Describes the message camino.SetFieldResponse. + * Use `create(SetFieldResponseSchema)` to create a new message. + */ +export const SetFieldResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 16); + +/** + * @generated from message camino.AddEdgeRequest + */ +export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { + /** + * @generated from field: string from_object_id = 1; + */ + fromObjectId: string; + + /** + * @generated from field: string source_field = 2; + */ + sourceField: string; + + /** + * @generated from field: string to_object_id = 3; + */ + toObjectId: string; + + /** + * @generated from field: map fields = 4; + */ + fields: { [key: string]: Value }; + + /** + * @generated from field: optional int32 ordinal = 5; + */ + ordinal?: number | undefined; +}; + +/** + * Describes the message camino.AddEdgeRequest. + * Use `create(AddEdgeRequestSchema)` to create a new message. + */ +export const AddEdgeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 17); + +/** + * @generated from message camino.AddEdgeResponse + */ +export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { + /** + * @generated from field: camino.CaminoEdge edge = 1; + */ + edge?: CaminoEdge | undefined; +}; + +/** + * Describes the message camino.AddEdgeResponse. + * Use `create(AddEdgeResponseSchema)` to create a new message. + */ +export const AddEdgeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 18); + +/** + * @generated from message camino.ListEdgesRequest + */ +export type ListEdgesRequest = Message<"camino.ListEdgesRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; +}; + +/** + * Describes the message camino.ListEdgesRequest. + * Use `create(ListEdgesRequestSchema)` to create a new message. + */ +export const ListEdgesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 19); + +/** + * @generated from message camino.ListEdgesResponse + */ +export type ListEdgesResponse = Message<"camino.ListEdgesResponse"> & { + /** + * @generated from field: repeated camino.CaminoEdge edges = 1; + */ + edges: CaminoEdge[]; +}; + +/** + * Describes the message camino.ListEdgesResponse. + * Use `create(ListEdgesResponseSchema)` to create a new message. + */ +export const ListEdgesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 20); + +/** + * @generated from message camino.RemoveEdgeRequest + */ +export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { + /** + * @generated from field: string edge_id = 1; + */ + edgeId: string; +}; + +/** + * Describes the message camino.RemoveEdgeRequest. + * Use `create(RemoveEdgeRequestSchema)` to create a new message. + */ +export const RemoveEdgeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 21); + +/** + * @generated from message camino.RemoveEdgeResponse + */ +export type RemoveEdgeResponse = Message<"camino.RemoveEdgeResponse"> & { + /** + * @generated from field: string edge_id = 1; + */ + edgeId: string; +}; + +/** + * Describes the message camino.RemoveEdgeResponse. + * Use `create(RemoveEdgeResponseSchema)` to create a new message. + */ +export const RemoveEdgeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 22); + +/** + * @generated from message camino.ListOpsRequest + */ +export type ListOpsRequest = Message<"camino.ListOpsRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; +}; + +/** + * Describes the message camino.ListOpsRequest. + * Use `create(ListOpsRequestSchema)` to create a new message. + */ +export const ListOpsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 23); + +/** + * @generated from message camino.ListOpsResponse + */ +export type ListOpsResponse = Message<"camino.ListOpsResponse"> & { + /** + * @generated from field: repeated camino.CaminoOp ops = 1; + */ + ops: CaminoOp[]; +}; + +/** + * Describes the message camino.ListOpsResponse. + * Use `create(ListOpsResponseSchema)` to create a new message. + */ +export const ListOpsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 24); + +/** + * @generated from message camino.WatchObjectRequest + */ +export type WatchObjectRequest = Message<"camino.WatchObjectRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: string after_op_id = 2; + */ + afterOpId: string; + + /** + * @generated from field: bool include_snapshot = 3; + */ + includeSnapshot: boolean; +}; + +/** + * Describes the message camino.WatchObjectRequest. + * Use `create(WatchObjectRequestSchema)` to create a new message. + */ +export const WatchObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 25); + +/** + * @generated from message camino.WatchObjectEvent + */ +export type WatchObjectEvent = Message<"camino.WatchObjectEvent"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: camino.CaminoObject snapshot = 2; + */ + snapshot?: CaminoObject | undefined; + + /** + * @generated from field: camino.CaminoOp op = 3; + */ + op?: CaminoOp | undefined; +}; + +/** + * Describes the message camino.WatchObjectEvent. + * Use `create(WatchObjectEventSchema)` to create a new message. + */ +export const WatchObjectEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 26); + +/** + * @generated from message camino.CaminoObject + */ +export type CaminoObject = Message<"camino.CaminoObject"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string class_id = 2; + */ + classId: string; + + /** + * @generated from field: uint32 schema_version = 3; + */ + schemaVersion: number; + + /** + * @generated from field: string created_at = 4; + */ + createdAt: string; + + /** + * @generated from field: string updated_at = 5; + */ + updatedAt: string; + + /** + * @generated from field: map fields = 6; + */ + fields: { [key: string]: Value }; + + /** + * @generated from field: map field_revisions = 7; + */ + fieldRevisions: { [key: string]: bigint }; + + /** + * @generated from field: map field_conflicts = 8; + */ + fieldConflicts: { [key: string]: string }; +}; + +/** + * Describes the message camino.CaminoObject. + * Use `create(CaminoObjectSchema)` to create a new message. + */ +export const CaminoObjectSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 27); + +/** + * @generated from message camino.CaminoEdge + */ +export type CaminoEdge = Message<"camino.CaminoEdge"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string edge_type_id = 2; + */ + edgeTypeId: string; + + /** + * @generated from field: string from_object_id = 3; + */ + fromObjectId: string; + + /** + * @generated from field: string to_object_id = 4; + */ + toObjectId: string; + + /** + * @generated from field: string source_field = 5; + */ + sourceField: string; + + /** + * @generated from field: string cardinality = 6; + */ + cardinality: string; + + /** + * @generated from field: string inverse = 7; + */ + inverse: string; + + /** + * @generated from field: map fields = 8; + */ + fields: { [key: string]: Value }; + + /** + * @generated from field: optional int32 ordinal = 9; + */ + ordinal?: number | undefined; + + /** + * @generated from field: string created_at = 10; + */ + createdAt: string; + + /** + * @generated from field: string updated_at = 11; + */ + updatedAt: string; +}; + +/** + * Describes the message camino.CaminoEdge. + * Use `create(CaminoEdgeSchema)` to create a new message. + */ +export const CaminoEdgeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 28); + +/** + * @generated from message camino.CaminoOp + */ +export type CaminoOp = Message<"camino.CaminoOp"> & { + /** + * @generated from field: string id = 1; + */ + id: string; + + /** + * @generated from field: string object_id = 2; + */ + objectId: string; + + /** + * @generated from field: string op_kind = 3; + */ + opKind: string; + + /** + * @generated from field: camino.Value payload = 4; + */ + payload?: Value | undefined; + + /** + * @generated from field: string actor = 5; + */ + actor: string; + + /** + * @generated from field: quixos.FunctionRef function_ref = 6; + */ + functionRef?: FunctionRef | undefined; + + /** + * @generated from field: string created_at = 7; + */ + createdAt: string; +}; + +/** + * Describes the message camino.CaminoOp. + * Use `create(CaminoOpSchema)` to create a new message. + */ +export const CaminoOpSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 29); + +/** + * @generated from service camino.CaminoService + */ +export const CaminoService: GenService<{ + /** + * @generated from rpc camino.CaminoService.RegisterSchema + */ + registerSchema: { + methodKind: "unary"; + input: typeof RegisterSchemaRequestSchema; + output: typeof RegisterSchemaResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.ListClasses + */ + listClasses: { + methodKind: "unary"; + input: typeof ListClassesRequestSchema; + output: typeof ListClassesResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.CreateObject + */ + createObject: { + methodKind: "unary"; + input: typeof CreateObjectRequestSchema; + output: typeof CreateObjectResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.GetObject + */ + getObject: { + methodKind: "unary"; + input: typeof GetObjectRequestSchema; + output: typeof GetObjectResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.SetField + */ + setField: { + methodKind: "unary"; + input: typeof SetFieldRequestSchema; + output: typeof SetFieldResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.AddEdge + */ + addEdge: { + methodKind: "unary"; + input: typeof AddEdgeRequestSchema; + output: typeof AddEdgeResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.ListEdges + */ + listEdges: { + methodKind: "unary"; + input: typeof ListEdgesRequestSchema; + output: typeof ListEdgesResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.RemoveEdge + */ + removeEdge: { + methodKind: "unary"; + input: typeof RemoveEdgeRequestSchema; + output: typeof RemoveEdgeResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.ListOps + */ + listOps: { + methodKind: "unary"; + input: typeof ListOpsRequestSchema; + output: typeof ListOpsResponseSchema; + }, + /** + * @generated from rpc camino.CaminoService.WatchObject + */ + watchObject: { + methodKind: "server_streaming"; + input: typeof WatchObjectRequestSchema; + output: typeof WatchObjectEventSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_camino_api, 0); diff --git a/src/gen/camino/options_pb.ts b/src/gen/camino/options_pb.ts new file mode 100644 index 0000000..a06d4fe --- /dev/null +++ b/src/gen/camino/options_pb.ts @@ -0,0 +1,182 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file camino/options.proto (package camino, syntax proto3) +/* eslint-disable */ + +import type { GenExtension, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { extDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { FieldOptions, FileOptions, MessageOptions, MethodOptions as MethodOptions$1 } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt"; +import type { Cardinality, ConflictStrategy, FieldOps, FieldStorage, SymbolRef } from "./schema_pb.js"; +import { file_camino_schema } from "./schema_pb.js"; +import type { FunctionRef } from "../quixos/refs_pb.js"; +import { file_quixos_refs } from "../quixos/refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file camino/options.proto. + */ +export const file_camino_options: GenFile = /*@__PURE__*/ + fileDesc("ChRjYW1pbm8vb3B0aW9ucy5wcm90bxIGY2FtaW5vIj4KDENsYXNzT3B0aW9ucxIPCgd2ZXJzaW9uGAEgASgNEh0KAmlkGAIgASgLMhEuY2FtaW5vLlN5bWJvbFJlZiKKAQoLRWRnZU9wdGlvbnMSHQoCaWQYASABKAsyES5jYW1pbm8uU3ltYm9sUmVmEiEKBnRhcmdldBgCIAEoCzIRLmNhbWluby5TeW1ib2xSZWYSKAoLY2FyZGluYWxpdHkYAyABKA4yEy5jYW1pbm8uQ2FyZGluYWxpdHkSDwoHaW52ZXJzZRgEIAEoCSJECg1NZXRob2RPcHRpb25zEgwKBG5hbWUYASABKAkSJQoIZnVuY3Rpb24YAiABKAsyEy5xdWl4b3MuRnVuY3Rpb25SZWYiYwoQTWlncmF0aW9uT3B0aW9ucxIUCgxmcm9tX3ZlcnNpb24YASABKA0SEgoKdG9fdmVyc2lvbhgCIAEoDRIlCghmdW5jdGlvbhgDIAEoCzITLnF1aXhvcy5GdW5jdGlvblJlZjpJChBzY2hlbWFfbmFtZXNwYWNlEhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcHRpb25zGLiOAyABKAlSD3NjaGVtYU5hbWVzcGFjZTpFCg5zY2hlbWFfdmVyc2lvbhIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxi5jgMgASgJUg1zY2hlbWFWZXJzaW9uOk0KBWNsYXNzEh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGMKOAyABKAsyFC5jYW1pbm8uQ2xhc3NPcHRpb25zUgVjbGFzczpQCgZtZXRob2QSHy5nb29nbGUucHJvdG9idWYuTWVzc2FnZU9wdGlvbnMYw44DIAMoCzIVLmNhbWluby5NZXRob2RPcHRpb25zUgZtZXRob2Q6WQoJbWlncmF0aW9uEh8uZ29vZ2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGMSOAyADKAsyGC5jYW1pbm8uTWlncmF0aW9uT3B0aW9uc1IJbWlncmF0aW9uOlUKCGNvbmZsaWN0Eh0uZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucxjMjgMgASgOMhguY2FtaW5vLkNvbmZsaWN0U3RyYXRlZ3lSCGNvbmZsaWN0OkgKBGVkZ2USHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGM2OAyABKAsyEy5jYW1pbm8uRWRnZU9wdGlvbnNSBGVkZ2U6WgoNZmllbGRfc3RvcmFnZRIdLmdvb2dsZS5wcm90b2J1Zi5GaWVsZE9wdGlvbnMYzo4DIAEoCzIULmNhbWluby5GaWVsZFN0b3JhZ2VSDGZpZWxkU3RvcmFnZTpOCglmaWVsZF9vcHMSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGM+OAyABKAsyEC5jYW1pbm8uRmllbGRPcHNSCGZpZWxkT3BzOkkKBGltcGwSHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxjWjgMgASgLMhMucXVpeG9zLkZ1bmN0aW9uUmVmUgRpbXBsYgZwcm90bzM", [file_google_protobuf_descriptor, file_camino_schema, file_quixos_refs]); + +/** + * @generated from message camino.ClassOptions + */ +export type ClassOptions = Message<"camino.ClassOptions"> & { + /** + * @generated from field: uint32 version = 1; + */ + version: number; + + /** + * @generated from field: camino.SymbolRef id = 2; + */ + id?: SymbolRef | undefined; +}; + +/** + * Describes the message camino.ClassOptions. + * Use `create(ClassOptionsSchema)` to create a new message. + */ +export const ClassOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_options, 0); + +/** + * @generated from message camino.EdgeOptions + */ +export type EdgeOptions = Message<"camino.EdgeOptions"> & { + /** + * @generated from field: camino.SymbolRef id = 1; + */ + id?: SymbolRef | undefined; + + /** + * @generated from field: camino.SymbolRef target = 2; + */ + target?: SymbolRef | undefined; + + /** + * @generated from field: camino.Cardinality cardinality = 3; + */ + cardinality: Cardinality; + + /** + * @generated from field: string inverse = 4; + */ + inverse: string; +}; + +/** + * Describes the message camino.EdgeOptions. + * Use `create(EdgeOptionsSchema)` to create a new message. + */ +export const EdgeOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_options, 1); + +/** + * @generated from message camino.MethodOptions + */ +export type MethodOptions = Message<"camino.MethodOptions"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: quixos.FunctionRef function = 2; + */ + function?: FunctionRef | undefined; +}; + +/** + * Describes the message camino.MethodOptions. + * Use `create(MethodOptionsSchema)` to create a new message. + */ +export const MethodOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_options, 2); + +/** + * @generated from message camino.MigrationOptions + */ +export type MigrationOptions = Message<"camino.MigrationOptions"> & { + /** + * @generated from field: uint32 from_version = 1; + */ + fromVersion: number; + + /** + * @generated from field: uint32 to_version = 2; + */ + toVersion: number; + + /** + * @generated from field: quixos.FunctionRef function = 3; + */ + function?: FunctionRef | undefined; +}; + +/** + * Describes the message camino.MigrationOptions. + * Use `create(MigrationOptionsSchema)` to create a new message. + */ +export const MigrationOptionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_options, 3); + +/** + * @generated from extension: string schema_namespace = 51000; + */ +export const schema_namespace: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 0); + +/** + * @generated from extension: string schema_version = 51001; + */ +export const schema_version: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 1); + +/** + * @generated from extension: camino.ClassOptions class = 51010; + */ +export const class$: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 2); + +/** + * @generated from extension: repeated camino.MethodOptions method = 51011; + */ +export const method: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 3); + +/** + * @generated from extension: repeated camino.MigrationOptions migration = 51012; + */ +export const migration: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 4); + +/** + * @generated from extension: camino.ConflictStrategy conflict = 51020; + */ +export const conflict: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 5); + +/** + * @generated from extension: camino.EdgeOptions edge = 51021; + */ +export const edge: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 6); + +/** + * @generated from extension: camino.FieldStorage field_storage = 51022; + */ +export const field_storage: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 7); + +/** + * @generated from extension: camino.FieldOps field_ops = 51023; + */ +export const field_ops: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 8); + +/** + * @generated from extension: quixos.FunctionRef impl = 51030; + */ +export const impl: GenExtension = /*@__PURE__*/ + extDesc(file_camino_options, 9); diff --git a/src/gen/camino/schema_pb.ts b/src/gen/camino/schema_pb.ts new file mode 100644 index 0000000..c9729b2 --- /dev/null +++ b/src/gen/camino/schema_pb.ts @@ -0,0 +1,697 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file camino/schema.proto (package camino, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { FunctionRef } from "../quixos/refs_pb.js"; +import { file_quixos_refs } from "../quixos/refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file camino/schema.proto. + */ +export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bWVudGF0aW9uEiQKIEZJRUxEX0lNUExFTUVOVEFUSU9OX1VOU1BFQ0lGSUVEEAASCwoHU0VSVklDRRABYgZwcm90bzM", [file_quixos_refs]); + +/** + * @generated from message camino.SymbolRef + */ +export type SymbolRef = Message<"camino.SymbolRef"> & { + /** + * @generated from field: string namespace = 1; + */ + namespace: string; + + /** + * @generated from field: string name = 2; + */ + name: string; + + /** + * @generated from field: string version = 3; + */ + version: string; + + /** + * @generated from field: string hash = 4; + */ + hash: string; +}; + +/** + * Describes the message camino.SymbolRef. + * Use `create(SymbolRefSchema)` to create a new message. + */ +export const SymbolRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 0); + +/** + * @generated from message camino.Ref + */ +export type Ref = Message<"camino.Ref"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; +}; + +/** + * Describes the message camino.Ref. + * Use `create(RefSchema)` to create a new message. + */ +export const RefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 1); + +/** + * @generated from message camino.CustomField + */ +export type CustomField = Message<"camino.CustomField"> & { +}; + +/** + * Describes the message camino.CustomField. + * Use `create(CustomFieldSchema)` to create a new message. + */ +export const CustomFieldSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 2); + +/** + * @generated from message camino.WatchStartResult + */ +export type WatchStartResult = Message<"camino.WatchStartResult"> & { + /** + * @generated from field: string watch_id = 1; + */ + watchId: string; +}; + +/** + * Describes the message camino.WatchStartResult. + * Use `create(WatchStartResultSchema)` to create a new message. + */ +export const WatchStartResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 3); + +/** + * @generated from message camino.WatchStopRequest + */ +export type WatchStopRequest = Message<"camino.WatchStopRequest"> & { + /** + * @generated from field: string watch_id = 1; + */ + watchId: string; +}; + +/** + * Describes the message camino.WatchStopRequest. + * Use `create(WatchStopRequestSchema)` to create a new message. + */ +export const WatchStopRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 4); + +/** + * @generated from message camino.WatchStopResult + */ +export type WatchStopResult = Message<"camino.WatchStopResult"> & { +}; + +/** + * Describes the message camino.WatchStopResult. + * Use `create(WatchStopResultSchema)` to create a new message. + */ +export const WatchStopResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 5); + +/** + * @generated from message camino.CrdtText + */ +export type CrdtText = Message<"camino.CrdtText"> & { + /** + * @generated from field: bytes payload = 1; + */ + payload: Uint8Array; +}; + +/** + * Describes the message camino.CrdtText. + * Use `create(CrdtTextSchema)` to create a new message. + */ +export const CrdtTextSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 6); + +/** + * @generated from message camino.CrdtRichText + */ +export type CrdtRichText = Message<"camino.CrdtRichText"> & { + /** + * @generated from field: bytes payload = 1; + */ + payload: Uint8Array; +}; + +/** + * Describes the message camino.CrdtRichText. + * Use `create(CrdtRichTextSchema)` to create a new message. + */ +export const CrdtRichTextSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 7); + +/** + * @generated from message camino.CrdtJson + */ +export type CrdtJson = Message<"camino.CrdtJson"> & { + /** + * @generated from field: bytes payload = 1; + */ + payload: Uint8Array; +}; + +/** + * Describes the message camino.CrdtJson. + * Use `create(CrdtJsonSchema)` to create a new message. + */ +export const CrdtJsonSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 8); + +/** + * @generated from message camino.ClassSchema + */ +export type ClassSchema = Message<"camino.ClassSchema"> & { + /** + * @generated from field: camino.SymbolRef id = 1; + */ + id?: SymbolRef | undefined; + + /** + * @generated from field: uint32 version = 2; + */ + version: number; + + /** + * @generated from field: repeated camino.FieldSchema fields = 3; + */ + fields: FieldSchema[]; + + /** + * @generated from field: repeated camino.EdgeSchema edges = 4; + */ + edges: EdgeSchema[]; + + /** + * @generated from field: repeated camino.MethodSchema methods = 5; + */ + methods: MethodSchema[]; + + /** + * @generated from field: repeated camino.MigrationSpec migrations = 6; + */ + migrations: MigrationSpec[]; + + /** + * @generated from field: string source_file = 7; + */ + sourceFile: string; + + /** + * @generated from field: string proto_message = 8; + */ + protoMessage: string; + + /** + * @generated from field: repeated camino.OperationServiceSchema operation_services = 9; + */ + operationServices: OperationServiceSchema[]; +}; + +/** + * Describes the message camino.ClassSchema. + * Use `create(ClassSchemaSchema)` to create a new message. + */ +export const ClassSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 9); + +/** + * @generated from message camino.FieldSchema + */ +export type FieldSchema = Message<"camino.FieldSchema"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: uint32 tag = 2; + */ + tag: number; + + /** + * @generated from field: camino.TypeRef type = 3; + */ + type?: TypeRef | undefined; + + /** + * @generated from field: camino.ConflictStrategy conflict = 4; + */ + conflict: ConflictStrategy; + + /** + * @generated from field: bool repeated = 5; + */ + repeated: boolean; + + /** + * @generated from field: bool optional = 6; + */ + optional: boolean; + + /** + * @generated from field: camino.FieldStorage storage = 7; + */ + storage?: FieldStorage | undefined; + + /** + * @generated from field: camino.FieldOps ops = 8; + */ + ops?: FieldOps | undefined; +}; + +/** + * Describes the message camino.FieldSchema. + * Use `create(FieldSchemaSchema)` to create a new message. + */ +export const FieldSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 10); + +/** + * @generated from message camino.FieldStorage + */ +export type FieldStorage = Message<"camino.FieldStorage"> & { + /** + * @generated from field: camino.FieldStorageKind kind = 1; + */ + kind: FieldStorageKind; + + /** + * @generated from field: quixos.FunctionRef resolver = 2; + */ + resolver?: FunctionRef | undefined; + + /** + * @generated from field: bool cache = 3; + */ + cache: boolean; +}; + +/** + * Describes the message camino.FieldStorage. + * Use `create(FieldStorageSchema)` to create a new message. + */ +export const FieldStorageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 11); + +/** + * @generated from message camino.TypeRef + */ +export type TypeRef = Message<"camino.TypeRef"> & { + /** + * @generated from field: string proto_type = 1; + */ + protoType: string; + + /** + * @generated from field: camino.SymbolRef symbol = 2; + */ + symbol?: SymbolRef | undefined; +}; + +/** + * Describes the message camino.TypeRef. + * Use `create(TypeRefSchema)` to create a new message. + */ +export const TypeRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 12); + +/** + * @generated from message camino.FieldOps + */ +export type FieldOps = Message<"camino.FieldOps"> & { + /** + * @generated from field: camino.FieldImplementation implementation = 1; + */ + implementation: FieldImplementation; + + /** + * @generated from field: string service = 2; + */ + service: string; +}; + +/** + * Describes the message camino.FieldOps. + * Use `create(FieldOpsSchema)` to create a new message. + */ +export const FieldOpsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 13); + +/** + * @generated from message camino.EdgeSchema + */ +export type EdgeSchema = Message<"camino.EdgeSchema"> & { + /** + * @generated from field: camino.SymbolRef id = 1; + */ + id?: SymbolRef | undefined; + + /** + * @generated from field: string source_field = 2; + */ + sourceField: string; + + /** + * @generated from field: camino.SymbolRef from_class = 3; + */ + fromClass?: SymbolRef | undefined; + + /** + * @generated from field: camino.SymbolRef to_class = 4; + */ + toClass?: SymbolRef | undefined; + + /** + * @generated from field: camino.Cardinality cardinality = 5; + */ + cardinality: Cardinality; + + /** + * @generated from field: string inverse = 6; + */ + inverse: string; + + /** + * @generated from field: repeated camino.FieldSchema fields = 7; + */ + fields: FieldSchema[]; +}; + +/** + * Describes the message camino.EdgeSchema. + * Use `create(EdgeSchemaSchema)` to create a new message. + */ +export const EdgeSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 14); + +/** + * @generated from message camino.MethodSchema + */ +export type MethodSchema = Message<"camino.MethodSchema"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: quixos.FunctionRef function = 2; + */ + function?: FunctionRef | undefined; +}; + +/** + * Describes the message camino.MethodSchema. + * Use `create(MethodSchemaSchema)` to create a new message. + */ +export const MethodSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 15); + +/** + * @generated from message camino.MigrationSpec + */ +export type MigrationSpec = Message<"camino.MigrationSpec"> & { + /** + * @generated from field: uint32 from_version = 1; + */ + fromVersion: number; + + /** + * @generated from field: uint32 to_version = 2; + */ + toVersion: number; + + /** + * @generated from field: quixos.FunctionRef function = 3; + */ + function?: FunctionRef | undefined; +}; + +/** + * Describes the message camino.MigrationSpec. + * Use `create(MigrationSpecSchema)` to create a new message. + */ +export const MigrationSpecSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 16); + +/** + * @generated from message camino.OperationSchema + */ +export type OperationSchema = Message<"camino.OperationSchema"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: camino.TypeRef input_type = 2; + */ + inputType?: TypeRef | undefined; + + /** + * @generated from field: camino.TypeRef output_type = 3; + */ + outputType?: TypeRef | undefined; + + /** + * @generated from field: quixos.FunctionRef function = 4; + */ + function?: FunctionRef | undefined; +}; + +/** + * Describes the message camino.OperationSchema. + * Use `create(OperationSchemaSchema)` to create a new message. + */ +export const OperationSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 17); + +/** + * @generated from message camino.OperationServiceSchema + */ +export type OperationServiceSchema = Message<"camino.OperationServiceSchema"> & { + /** + * @generated from field: string name = 1; + */ + name: string; + + /** + * @generated from field: string full_name = 2; + */ + fullName: string; + + /** + * @generated from field: repeated camino.OperationSchema operations = 3; + */ + operations: OperationSchema[]; +}; + +/** + * Describes the message camino.OperationServiceSchema. + * Use `create(OperationServiceSchemaSchema)` to create a new message. + */ +export const OperationServiceSchemaSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 18); + +/** + * @generated from message camino.DocRefDeclaration + */ +export type DocRefDeclaration = Message<"camino.DocRefDeclaration"> & { + /** + * @generated from field: string local_name = 1; + */ + localName: string; + + /** + * @generated from field: camino.SymbolRef type = 2; + */ + type?: SymbolRef | undefined; + + /** + * @generated from field: camino.SymbolRef target_class = 3; + */ + targetClass?: SymbolRef | undefined; + + /** + * @generated from field: camino.DocRefStrength strength = 4; + */ + strength: DocRefStrength; +}; + +/** + * Describes the message camino.DocRefDeclaration. + * Use `create(DocRefDeclarationSchema)` to create a new message. + */ +export const DocRefDeclarationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 19); + +/** + * @generated from enum camino.ConflictStrategy + */ +export enum ConflictStrategy { + /** + * @generated from enum value: CONFLICT_STRATEGY_UNSPECIFIED = 0; + */ + CONFLICT_STRATEGY_UNSPECIFIED = 0, + + /** + * @generated from enum value: REPLACE = 1; + */ + REPLACE = 1, + + /** + * @generated from enum value: PRESERVE_CONFLICTS = 2; + */ + PRESERVE_CONFLICTS = 2, + + /** + * @generated from enum value: CRDT = 3; + */ + CRDT = 3, +} + +/** + * Describes the enum camino.ConflictStrategy. + */ +export const ConflictStrategySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_camino_schema, 0); + +/** + * @generated from enum camino.Cardinality + */ +export enum Cardinality { + /** + * @generated from enum value: CARDINALITY_UNSPECIFIED = 0; + */ + CARDINALITY_UNSPECIFIED = 0, + + /** + * @generated from enum value: OPTIONAL_ONE = 1; + */ + OPTIONAL_ONE = 1, + + /** + * @generated from enum value: EXACTLY_ONE = 2; + */ + EXACTLY_ONE = 2, + + /** + * @generated from enum value: MANY = 3; + */ + MANY = 3, + + /** + * @generated from enum value: MANY_UNIQUE = 4; + */ + MANY_UNIQUE = 4, + + /** + * @generated from enum value: MANY_ORDERED = 5; + */ + MANY_ORDERED = 5, +} + +/** + * Describes the enum camino.Cardinality. + */ +export const CardinalitySchema: GenEnum = /*@__PURE__*/ + enumDesc(file_camino_schema, 1); + +/** + * @generated from enum camino.DocRefStrength + */ +export enum DocRefStrength { + /** + * @generated from enum value: DOC_REF_STRENGTH_UNSPECIFIED = 0; + */ + DOC_REF_STRENGTH_UNSPECIFIED = 0, + + /** + * @generated from enum value: SOFT_REF = 1; + */ + SOFT_REF = 1, + + /** + * @generated from enum value: PROJECTED_EDGE = 2; + */ + PROJECTED_EDGE = 2, +} + +/** + * Describes the enum camino.DocRefStrength. + */ +export const DocRefStrengthSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_camino_schema, 2); + +/** + * @generated from enum camino.FieldStorageKind + */ +export enum FieldStorageKind { + /** + * @generated from enum value: FIELD_STORAGE_KIND_UNSPECIFIED = 0; + */ + FIELD_STORAGE_KIND_UNSPECIFIED = 0, + + /** + * @generated from enum value: STORED = 1; + */ + STORED = 1, + + /** + * @generated from enum value: DERIVED = 2; + */ + DERIVED = 2, + + /** + * @generated from enum value: LAZY = 3; + */ + LAZY = 3, + + /** + * @generated from enum value: EXTERNAL = 4; + */ + EXTERNAL = 4, +} + +/** + * Describes the enum camino.FieldStorageKind. + */ +export const FieldStorageKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_camino_schema, 3); + +/** + * @generated from enum camino.FieldImplementation + */ +export enum FieldImplementation { + /** + * @generated from enum value: FIELD_IMPLEMENTATION_UNSPECIFIED = 0; + */ + FIELD_IMPLEMENTATION_UNSPECIFIED = 0, + + /** + * @generated from enum value: SERVICE = 1; + */ + SERVICE = 1, +} + +/** + * Describes the enum camino.FieldImplementation. + */ +export const FieldImplementationSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_camino_schema, 4); diff --git a/src/gen/quixos/orch_pb.ts b/src/gen/quixos/orch_pb.ts new file mode 100644 index 0000000..a48f708 --- /dev/null +++ b/src/gen/quixos/orch_pb.ts @@ -0,0 +1,403 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file quixos/orch.proto (package quixos.orch, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Value } from "../camino/api_pb.js"; +import { file_camino_api } from "../camino/api_pb.js"; +import type { PackageDescriptor } from "./package_pb.js"; +import { file_quixos_package } from "./package_pb.js"; +import type { FunctionRef } from "./refs_pb.js"; +import { file_quixos_refs } from "./refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/orch.proto. + */ +export const file_quixos_orch: GenFile = /*@__PURE__*/ + fileDesc("ChFxdWl4b3Mvb3JjaC5wcm90bxILcXVpeG9zLm9yY2gizAEKFUludm9rZUZ1bmN0aW9uUmVxdWVzdBIlCghmdW5jdGlvbhgBIAEoCzITLnF1aXhvcy5GdW5jdGlvblJlZhIRCglvYmplY3RfaWQYAiABKAkSPAoFaW5wdXQYAyADKAsyLS5xdWl4b3Mub3JjaC5JbnZva2VGdW5jdGlvblJlcXVlc3QuSW5wdXRFbnRyeRo7CgpJbnB1dEVudHJ5EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZToCOAEilgEKFkludm9rZUZ1bmN0aW9uUmVzcG9uc2USFQoNaW52b2NhdGlvbl9pZBgBIAEoCRIrCgphY3RpdmF0aW9uGAIgASgLMhcucXVpeG9zLm9yY2guQWN0aXZhdGlvbhIKCgJvaxgDIAEoCBIdCgZyZXN1bHQYBCABKAsyDS5jYW1pbm8uVmFsdWUSDQoFZXJyb3IYBSABKAkiGAoWTGlzdEFjdGl2YXRpb25zUmVxdWVzdCIfCh1MaXN0UGFja2FnZURlc2NyaXB0b3JzUmVxdWVzdCJQCh5MaXN0UGFja2FnZURlc2NyaXB0b3JzUmVzcG9uc2USLgoLZGVzY3JpcHRvcnMYASADKAsyGS5xdWl4b3MuUGFja2FnZURlc2NyaXB0b3IiHAoaTGlzdFBhY2thZ2VSdW50aW1lc1JlcXVlc3QiUgobTGlzdFBhY2thZ2VSdW50aW1lc1Jlc3BvbnNlEjMKCHJ1bnRpbWVzGAEgAygLMiEucXVpeG9zLm9yY2guUGFja2FnZVJ1bnRpbWVTdGF0dXMiRwoXTGlzdEFjdGl2YXRpb25zUmVzcG9uc2USLAoLYWN0aXZhdGlvbnMYASADKAsyFy5xdWl4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mNoLkludm9rZUZ1bmN0aW9uUmVxdWVzdBojLnF1aXhvcy5vcmNoLkludm9rZUZ1bmN0aW9uUmVzcG9uc2UScQoWTGlzdFBhY2thZ2VEZXNjcmlwdG9ycxIqLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlRGVzY3JpcHRvcnNSZXF1ZXN0GisucXVpeG9zLm9yY2guTGlzdFBhY2thZ2VEZXNjcmlwdG9yc1Jlc3BvbnNlEmgKE0xpc3RQYWNrYWdlUnVudGltZXMSJy5xdWl4b3Mub3JjaC5MaXN0UGFja2FnZVJ1bnRpbWVzUmVxdWVzdBooLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlUnVudGltZXNSZXNwb25zZRJcCg9MaXN0QWN0aXZhdGlvbnMSIy5xdWl4b3Mub3JjaC5MaXN0QWN0aXZhdGlvbnNSZXF1ZXN0GiQucXVpeG9zLm9yY2guTGlzdEFjdGl2YXRpb25zUmVzcG9uc2USXAoPQ2xvc2VBY3RpdmF0aW9uEiMucXVpeG9zLm9yY2guQ2xvc2VBY3RpdmF0aW9uUmVxdWVzdBokLnF1aXhvcy5vcmNoLkNsb3NlQWN0aXZhdGlvblJlc3BvbnNlYgZwcm90bzM", [file_camino_api, file_quixos_package, file_quixos_refs]); + +/** + * @generated from message quixos.orch.InvokeFunctionRequest + */ +export type InvokeFunctionRequest = Message<"quixos.orch.InvokeFunctionRequest"> & { + /** + * @generated from field: quixos.FunctionRef function = 1; + */ + function?: FunctionRef | undefined; + + /** + * @generated from field: string object_id = 2; + */ + objectId: string; + + /** + * @generated from field: map input = 3; + */ + input: { [key: string]: Value }; +}; + +/** + * Describes the message quixos.orch.InvokeFunctionRequest. + * Use `create(InvokeFunctionRequestSchema)` to create a new message. + */ +export const InvokeFunctionRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 0); + +/** + * @generated from message quixos.orch.InvokeFunctionResponse + */ +export type InvokeFunctionResponse = Message<"quixos.orch.InvokeFunctionResponse"> & { + /** + * @generated from field: string invocation_id = 1; + */ + invocationId: string; + + /** + * @generated from field: quixos.orch.Activation activation = 2; + */ + activation?: Activation | undefined; + + /** + * @generated from field: bool ok = 3; + */ + ok: boolean; + + /** + * @generated from field: camino.Value result = 4; + */ + result?: Value | undefined; + + /** + * @generated from field: string error = 5; + */ + error: string; +}; + +/** + * Describes the message quixos.orch.InvokeFunctionResponse. + * Use `create(InvokeFunctionResponseSchema)` to create a new message. + */ +export const InvokeFunctionResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 1); + +/** + * @generated from message quixos.orch.ListActivationsRequest + */ +export type ListActivationsRequest = Message<"quixos.orch.ListActivationsRequest"> & { +}; + +/** + * Describes the message quixos.orch.ListActivationsRequest. + * Use `create(ListActivationsRequestSchema)` to create a new message. + */ +export const ListActivationsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 2); + +/** + * @generated from message quixos.orch.ListPackageDescriptorsRequest + */ +export type ListPackageDescriptorsRequest = Message<"quixos.orch.ListPackageDescriptorsRequest"> & { +}; + +/** + * Describes the message quixos.orch.ListPackageDescriptorsRequest. + * Use `create(ListPackageDescriptorsRequestSchema)` to create a new message. + */ +export const ListPackageDescriptorsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 3); + +/** + * @generated from message quixos.orch.ListPackageDescriptorsResponse + */ +export type ListPackageDescriptorsResponse = Message<"quixos.orch.ListPackageDescriptorsResponse"> & { + /** + * @generated from field: repeated quixos.PackageDescriptor descriptors = 1; + */ + descriptors: PackageDescriptor[]; +}; + +/** + * Describes the message quixos.orch.ListPackageDescriptorsResponse. + * Use `create(ListPackageDescriptorsResponseSchema)` to create a new message. + */ +export const ListPackageDescriptorsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 4); + +/** + * @generated from message quixos.orch.ListPackageRuntimesRequest + */ +export type ListPackageRuntimesRequest = Message<"quixos.orch.ListPackageRuntimesRequest"> & { +}; + +/** + * Describes the message quixos.orch.ListPackageRuntimesRequest. + * Use `create(ListPackageRuntimesRequestSchema)` to create a new message. + */ +export const ListPackageRuntimesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 5); + +/** + * @generated from message quixos.orch.ListPackageRuntimesResponse + */ +export type ListPackageRuntimesResponse = Message<"quixos.orch.ListPackageRuntimesResponse"> & { + /** + * @generated from field: repeated quixos.orch.PackageRuntimeStatus runtimes = 1; + */ + runtimes: PackageRuntimeStatus[]; +}; + +/** + * Describes the message quixos.orch.ListPackageRuntimesResponse. + * Use `create(ListPackageRuntimesResponseSchema)` to create a new message. + */ +export const ListPackageRuntimesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 6); + +/** + * @generated from message quixos.orch.ListActivationsResponse + */ +export type ListActivationsResponse = Message<"quixos.orch.ListActivationsResponse"> & { + /** + * @generated from field: repeated quixos.orch.Activation activations = 1; + */ + activations: Activation[]; +}; + +/** + * Describes the message quixos.orch.ListActivationsResponse. + * Use `create(ListActivationsResponseSchema)` to create a new message. + */ +export const ListActivationsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 7); + +/** + * @generated from message quixos.orch.CloseActivationRequest + */ +export type CloseActivationRequest = Message<"quixos.orch.CloseActivationRequest"> & { + /** + * @generated from field: string activation_id = 1; + */ + activationId: string; + + /** + * @generated from field: string reason = 2; + */ + reason: string; +}; + +/** + * Describes the message quixos.orch.CloseActivationRequest. + * Use `create(CloseActivationRequestSchema)` to create a new message. + */ +export const CloseActivationRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 8); + +/** + * @generated from message quixos.orch.CloseActivationResponse + */ +export type CloseActivationResponse = Message<"quixos.orch.CloseActivationResponse"> & { + /** + * @generated from field: quixos.orch.Activation activation = 1; + */ + activation?: Activation | undefined; +}; + +/** + * Describes the message quixos.orch.CloseActivationResponse. + * Use `create(CloseActivationResponseSchema)` to create a new message. + */ +export const CloseActivationResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 9); + +/** + * @generated from message quixos.orch.Activation + */ +export type Activation = Message<"quixos.orch.Activation"> & { + /** + * @generated from field: string activation_id = 1; + */ + activationId: string; + + /** + * @generated from field: quixos.FunctionRef function = 2; + */ + function?: FunctionRef | undefined; + + /** + * @generated from field: string object_id = 3; + */ + objectId: string; + + /** + * @generated from field: string state = 4; + */ + state: string; + + /** + * @generated from field: uint32 demand = 5; + */ + demand: number; + + /** + * @generated from field: string opened_at = 6; + */ + openedAt: string; + + /** + * @generated from field: string last_used_at = 7; + */ + lastUsedAt: string; + + /** + * @generated from field: string idle_deadline_at = 8; + */ + idleDeadlineAt: string; + + /** + * @generated from field: string closed_at = 9; + */ + closedAt: string; + + /** + * @generated from field: string close_reason = 10; + */ + closeReason: string; +}; + +/** + * Describes the message quixos.orch.Activation. + * Use `create(ActivationSchema)` to create a new message. + */ +export const ActivationSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 10); + +/** + * @generated from message quixos.orch.PackageRuntimeStatus + */ +export type PackageRuntimeStatus = Message<"quixos.orch.PackageRuntimeStatus"> & { + /** + * @generated from field: string runtime_key = 1; + */ + runtimeKey: string; + + /** + * @generated from field: string package_namespace = 2; + */ + packageNamespace: string; + + /** + * @generated from field: string package_name = 3; + */ + packageName: string; + + /** + * @generated from field: uint32 descriptor_version = 4; + */ + descriptorVersion: number; + + /** + * @generated from field: string source_repo = 5; + */ + sourceRepo: string; + + /** + * @generated from field: string server_installable = 6; + */ + serverInstallable: string; + + /** + * @generated from field: string source_path = 7; + */ + sourcePath: string; + + /** + * @generated from field: string server_path = 8; + */ + serverPath: string; + + /** + * @generated from field: uint32 pid = 9; + */ + pid: number; + + /** + * @generated from field: string state = 10; + */ + state: string; + + /** + * @generated from field: string started_at = 11; + */ + startedAt: string; + + /** + * @generated from field: string last_handshake_at = 12; + */ + lastHandshakeAt: string; + + /** + * @generated from field: string runtime_protocol_version = 13; + */ + runtimeProtocolVersion: string; + + /** + * @generated from field: uint32 advertised_function_count = 14; + */ + advertisedFunctionCount: number; +}; + +/** + * Describes the message quixos.orch.PackageRuntimeStatus. + * Use `create(PackageRuntimeStatusSchema)` to create a new message. + */ +export const PackageRuntimeStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 11); + +/** + * @generated from service quixos.orch.OrchestratorRuntime + */ +export const OrchestratorRuntime: GenService<{ + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.InvokeFunction + */ + invokeFunction: { + methodKind: "unary"; + input: typeof InvokeFunctionRequestSchema; + output: typeof InvokeFunctionResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ListPackageDescriptors + */ + listPackageDescriptors: { + methodKind: "unary"; + input: typeof ListPackageDescriptorsRequestSchema; + output: typeof ListPackageDescriptorsResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ListPackageRuntimes + */ + listPackageRuntimes: { + methodKind: "unary"; + input: typeof ListPackageRuntimesRequestSchema; + output: typeof ListPackageRuntimesResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ListActivations + */ + listActivations: { + methodKind: "unary"; + input: typeof ListActivationsRequestSchema; + output: typeof ListActivationsResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.CloseActivation + */ + closeActivation: { + methodKind: "unary"; + input: typeof CloseActivationRequestSchema; + output: typeof CloseActivationResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_quixos_orch, 0); diff --git a/src/gen/quixos/package_pb.ts b/src/gen/quixos/package_pb.ts new file mode 100644 index 0000000..e8fc067 --- /dev/null +++ b/src/gen/quixos/package_pb.ts @@ -0,0 +1,312 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file quixos/package.proto (package quixos, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { SymbolRef } from "../camino/schema_pb.js"; +import { file_camino_schema } from "../camino/schema_pb.js"; +import type { FunctionRef } from "./refs_pb.js"; +import { file_quixos_refs } from "./refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/package.proto. + */ +export const file_quixos_package: GenFile = /*@__PURE__*/ + fileDesc("ChRxdWl4b3MvcGFja2FnZS5wcm90bxIGcXVpeG9zIm4KClBhY2thZ2VSZWYSGQoRcGFja2FnZV9uYW1lc3BhY2UYASABKAkSFAoMcGFja2FnZV9uYW1lGAIgASgJEhoKEmRlc2NyaXB0b3JfdmVyc2lvbhgDIAEoDRITCgt2ZXJzaW9uX3JlZhgEIAEoCSKgBAoRUGFja2FnZURlc2NyaXB0b3ISGQoRcGFja2FnZV9uYW1lc3BhY2UYASABKAkSFAoMcGFja2FnZV9uYW1lGAIgASgJEhoKEmRlc2NyaXB0b3JfdmVyc2lvbhgDIAEoDRIkChxpbnRlcmZhY2VfY29tcGF0aWJsZV9iYWNrX3RvGAQgASgNEiEKGXJ1bm5lcl9jb21wYXRpYmxlX2JhY2tfdG8YBSABKA0SEwoLc291cmNlX3JlcG8YBiABKAkSEgoKc291cmNlX3JlZhgHIAEoCRIbChNyZXNvbHZlZF9zb3VyY2VfcmVmGAggASgJEhoKEnNlcnZlcl9pbnN0YWxsYWJsZRgJIAEoCRIgChhydW50aW1lX3Byb3RvY29sX3ZlcnNpb24YCiABKAkSKgoNY2xhc3NfZXhwb3J0cxgLIAMoCzITLnF1aXhvcy5DbGFzc0V4cG9ydBIwChBmdW5jdGlvbl9leHBvcnRzGAwgAygLMhYucXVpeG9zLkZ1bmN0aW9uRXhwb3J0EjIKEWNvbXBvbmVudF9leHBvcnRzGA0gAygLMhcucXVpeG9zLkNvbXBvbmVudEV4cG9ydBIuCg9zaWRlY2FyX2V4cG9ydHMYDiADKAsyFS5xdWl4b3MuU2lkZWNhckV4cG9ydBIvCgxkZXBlbmRlbmNpZXMYDyADKAsyGS5xdWl4b3MuUGFja2FnZURlcGVuZGVuY3kiRwoLQ2xhc3NFeHBvcnQSIwoIY2xhc3NfaWQYASABKAsyES5jYW1pbm8uU3ltYm9sUmVmEhMKC3NvdXJjZV9maWxlGAIgASgJItoBCg5GdW5jdGlvbkV4cG9ydBIlCghmdW5jdGlvbhgBIAEoCzITLnF1aXhvcy5GdW5jdGlvblJlZhISCgppbnB1dF90eXBlGAIgASgJEhMKC291dHB1dF90eXBlGAMgASgJEhkKEWludGVyZmFjZV92ZXJzaW9uGAQgASgNEiQKHGludGVyZmFjZV9jb21wYXRpYmxlX2JhY2tfdG8YBSABKA0SNwoPY2FwYWJpbGl0eV9raW5kGAYgASgOMh4ucXVpeG9zLkZ1bmN0aW9uQ2FwYWJpbGl0eUtpbmQiYwoPQ29tcG9uZW50RXhwb3J0Eg4KBnN5bWJvbBgBIAEoCRISCgpwcm9wc190eXBlGAIgASgJEiwKEXN1cHBvcnRlZF9jbGFzc2VzGAMgAygLMhEuY2FtaW5vLlN5bWJvbFJlZiI5Cg1TaWRlY2FyRXhwb3J0Eg4KBnN5bWJvbBgBIAEoCRIYChBzaWRlX2VmZmVjdF9tb2RlGAIgASgJIpUBChFQYWNrYWdlRGVwZW5kZW5jeRIjCgdwYWNrYWdlGAEgASgLMhIucXVpeG9zLlBhY2thZ2VSZWYSJAocaW50ZXJmYWNlX2NvbXBhdGlibGVfYmFja190bxgCIAEoDRIZChFyZWZhY3Rvcl9yZXF1aXJlZBgDIAEoCBIaChJjb21wYXRpYmlsaXR5X25vdGUYBCABKAkqcQoWRnVuY3Rpb25DYXBhYmlsaXR5S2luZBIoCiRGVU5DVElPTl9DQVBBQklMSVRZX0tJTkRfVU5TUEVDSUZJRUQQABIKCgZNRVRIT0QQARISCg5GSUVMRF9SRVNPTFZFUhACEg0KCU1JR1JBVElPThADYgZwcm90bzM", [file_camino_schema, file_quixos_refs]); + +/** + * @generated from message quixos.PackageRef + */ +export type PackageRef = Message<"quixos.PackageRef"> & { + /** + * @generated from field: string package_namespace = 1; + */ + packageNamespace: string; + + /** + * @generated from field: string package_name = 2; + */ + packageName: string; + + /** + * @generated from field: uint32 descriptor_version = 3; + */ + descriptorVersion: number; + + /** + * @generated from field: string version_ref = 4; + */ + versionRef: string; +}; + +/** + * Describes the message quixos.PackageRef. + * Use `create(PackageRefSchema)` to create a new message. + */ +export const PackageRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 0); + +/** + * @generated from message quixos.PackageDescriptor + */ +export type PackageDescriptor = Message<"quixos.PackageDescriptor"> & { + /** + * @generated from field: string package_namespace = 1; + */ + packageNamespace: string; + + /** + * @generated from field: string package_name = 2; + */ + packageName: string; + + /** + * @generated from field: uint32 descriptor_version = 3; + */ + descriptorVersion: number; + + /** + * @generated from field: uint32 interface_compatible_back_to = 4; + */ + interfaceCompatibleBackTo: number; + + /** + * @generated from field: uint32 runner_compatible_back_to = 5; + */ + runnerCompatibleBackTo: number; + + /** + * @generated from field: string source_repo = 6; + */ + sourceRepo: string; + + /** + * @generated from field: string source_ref = 7; + */ + sourceRef: string; + + /** + * @generated from field: string resolved_source_ref = 8; + */ + resolvedSourceRef: string; + + /** + * @generated from field: string server_installable = 9; + */ + serverInstallable: string; + + /** + * @generated from field: string runtime_protocol_version = 10; + */ + runtimeProtocolVersion: string; + + /** + * @generated from field: repeated quixos.ClassExport class_exports = 11; + */ + classExports: ClassExport[]; + + /** + * @generated from field: repeated quixos.FunctionExport function_exports = 12; + */ + functionExports: FunctionExport[]; + + /** + * @generated from field: repeated quixos.ComponentExport component_exports = 13; + */ + componentExports: ComponentExport[]; + + /** + * @generated from field: repeated quixos.SidecarExport sidecar_exports = 14; + */ + sidecarExports: SidecarExport[]; + + /** + * @generated from field: repeated quixos.PackageDependency dependencies = 15; + */ + dependencies: PackageDependency[]; +}; + +/** + * Describes the message quixos.PackageDescriptor. + * Use `create(PackageDescriptorSchema)` to create a new message. + */ +export const PackageDescriptorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 1); + +/** + * @generated from message quixos.ClassExport + */ +export type ClassExport = Message<"quixos.ClassExport"> & { + /** + * @generated from field: camino.SymbolRef class_id = 1; + */ + classId?: SymbolRef | undefined; + + /** + * @generated from field: string source_file = 2; + */ + sourceFile: string; +}; + +/** + * Describes the message quixos.ClassExport. + * Use `create(ClassExportSchema)` to create a new message. + */ +export const ClassExportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 2); + +/** + * @generated from message quixos.FunctionExport + */ +export type FunctionExport = Message<"quixos.FunctionExport"> & { + /** + * @generated from field: quixos.FunctionRef function = 1; + */ + function?: FunctionRef | undefined; + + /** + * @generated from field: string input_type = 2; + */ + inputType: string; + + /** + * @generated from field: string output_type = 3; + */ + outputType: string; + + /** + * @generated from field: uint32 interface_version = 4; + */ + interfaceVersion: number; + + /** + * @generated from field: uint32 interface_compatible_back_to = 5; + */ + interfaceCompatibleBackTo: number; + + /** + * @generated from field: quixos.FunctionCapabilityKind capability_kind = 6; + */ + capabilityKind: FunctionCapabilityKind; +}; + +/** + * Describes the message quixos.FunctionExport. + * Use `create(FunctionExportSchema)` to create a new message. + */ +export const FunctionExportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 3); + +/** + * @generated from message quixos.ComponentExport + */ +export type ComponentExport = Message<"quixos.ComponentExport"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: string props_type = 2; + */ + propsType: string; + + /** + * @generated from field: repeated camino.SymbolRef supported_classes = 3; + */ + supportedClasses: SymbolRef[]; +}; + +/** + * Describes the message quixos.ComponentExport. + * Use `create(ComponentExportSchema)` to create a new message. + */ +export const ComponentExportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 4); + +/** + * @generated from message quixos.SidecarExport + */ +export type SidecarExport = Message<"quixos.SidecarExport"> & { + /** + * @generated from field: string symbol = 1; + */ + symbol: string; + + /** + * @generated from field: string side_effect_mode = 2; + */ + sideEffectMode: string; +}; + +/** + * Describes the message quixos.SidecarExport. + * Use `create(SidecarExportSchema)` to create a new message. + */ +export const SidecarExportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 5); + +/** + * @generated from message quixos.PackageDependency + */ +export type PackageDependency = Message<"quixos.PackageDependency"> & { + /** + * @generated from field: quixos.PackageRef package = 1; + */ + package?: PackageRef | undefined; + + /** + * @generated from field: uint32 interface_compatible_back_to = 2; + */ + interfaceCompatibleBackTo: number; + + /** + * @generated from field: bool refactor_required = 3; + */ + refactorRequired: boolean; + + /** + * @generated from field: string compatibility_note = 4; + */ + compatibilityNote: string; +}; + +/** + * Describes the message quixos.PackageDependency. + * Use `create(PackageDependencySchema)` to create a new message. + */ +export const PackageDependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 6); + +/** + * @generated from enum quixos.FunctionCapabilityKind + */ +export enum FunctionCapabilityKind { + /** + * @generated from enum value: FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0; + */ + FUNCTION_CAPABILITY_KIND_UNSPECIFIED = 0, + + /** + * @generated from enum value: METHOD = 1; + */ + METHOD = 1, + + /** + * @generated from enum value: FIELD_RESOLVER = 2; + */ + FIELD_RESOLVER = 2, + + /** + * @generated from enum value: MIGRATION = 3; + */ + MIGRATION = 3, +} + +/** + * Describes the enum quixos.FunctionCapabilityKind. + */ +export const FunctionCapabilityKindSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_quixos_package, 0); diff --git a/src/gen/quixos/refs_pb.ts b/src/gen/quixos/refs_pb.ts new file mode 100644 index 0000000..ee3f89e --- /dev/null +++ b/src/gen/quixos/refs_pb.ts @@ -0,0 +1,50 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file quixos/refs.proto (package quixos, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/refs.proto. + */ +export const file_quixos_refs: GenFile = /*@__PURE__*/ + fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zInYKC0Z1bmN0aW9uUmVmEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIOCgZzeW1ib2wYAyABKAkSEwoLdmVyc2lvbl9yZWYYBCABKAkSEQoJb3BlcmF0aW9uGAUgASgJYgZwcm90bzM"); + +/** + * @generated from message quixos.FunctionRef + */ +export type FunctionRef = Message<"quixos.FunctionRef"> & { + /** + * @generated from field: string package_namespace = 1; + */ + packageNamespace: string; + + /** + * @generated from field: string package_name = 2; + */ + packageName: string; + + /** + * @generated from field: string symbol = 3; + */ + symbol: string; + + /** + * @generated from field: string version_ref = 4; + */ + versionRef: string; + + /** + * @generated from field: string operation = 5; + */ + operation: string; +}; + +/** + * Describes the message quixos.FunctionRef. + * Use `create(FunctionRefSchema)` to create a new message. + */ +export const FunctionRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 0); diff --git a/src/gen/quixos/runtime_pb.ts b/src/gen/quixos/runtime_pb.ts new file mode 100644 index 0000000..8ffc7fe --- /dev/null +++ b/src/gen/quixos/runtime_pb.ts @@ -0,0 +1,148 @@ +// @generated by protoc-gen-es v2.12.1 with parameter "target=ts,import_extension=js" +// @generated from file quixos/runtime.proto (package quixos.runtime, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Value } from "../camino/api_pb.js"; +import { file_camino_api } from "../camino/api_pb.js"; +import type { FunctionRef } from "./refs_pb.js"; +import { file_quixos_refs } from "./refs_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/runtime.proto. + */ +export const file_quixos_runtime: GenFile = /*@__PURE__*/ + fileDesc("ChRxdWl4b3MvcnVudGltZS5wcm90bxIOcXVpeG9zLnJ1bnRpbWUiMQoQSGFuZHNoYWtlUmVxdWVzdBIdChVvcmNoX3Byb3RvY29sX3ZlcnNpb24YASABKAkijgEKEUhhbmRzaGFrZVJlc3BvbnNlEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIgChhydW50aW1lX3Byb3RvY29sX3ZlcnNpb24YAyABKAkSJgoJZnVuY3Rpb25zGAQgAygLMhMucXVpeG9zLkZ1bmN0aW9uUmVmItYBCg1JbnZva2VSZXF1ZXN0EhUKDWludm9jYXRpb25faWQYASABKAkSJQoIZnVuY3Rpb24YAiABKAsyEy5xdWl4b3MuRnVuY3Rpb25SZWYSEQoJb2JqZWN0X2lkGAMgASgJEjcKBWlucHV0GAQgAygLMigucXVpeG9zLnJ1bnRpbWUuSW52b2tlUmVxdWVzdC5JbnB1dEVudHJ5GjsKCklucHV0RW50cnkSCwoDa2V5GAEgASgJEhwKBXZhbHVlGAIgASgLMg0uY2FtaW5vLlZhbHVlOgI4ASJKCg5JbnZva2VSZXNwb25zZRIKCgJvaxgBIAEoCBIdCgZyZXN1bHQYAiABKAsyDS5jYW1pbm8uVmFsdWUSDQoFZXJyb3IYAyABKAkyqwEKDlBhY2thZ2VSdW50aW1lElAKCUhhbmRzaGFrZRIgLnF1aXhvcy5ydW50aW1lLkhhbmRzaGFrZVJlcXVlc3QaIS5xdWl4b3MucnVudGltZS5IYW5kc2hha2VSZXNwb25zZRJHCgZJbnZva2USHS5xdWl4b3MucnVudGltZS5JbnZva2VSZXF1ZXN0Gh4ucXVpeG9zLnJ1bnRpbWUuSW52b2tlUmVzcG9uc2ViBnByb3RvMw", [file_camino_api, file_quixos_refs]); + +/** + * @generated from message quixos.runtime.HandshakeRequest + */ +export type HandshakeRequest = Message<"quixos.runtime.HandshakeRequest"> & { + /** + * @generated from field: string orch_protocol_version = 1; + */ + orchProtocolVersion: string; +}; + +/** + * Describes the message quixos.runtime.HandshakeRequest. + * Use `create(HandshakeRequestSchema)` to create a new message. + */ +export const HandshakeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_runtime, 0); + +/** + * @generated from message quixos.runtime.HandshakeResponse + */ +export type HandshakeResponse = Message<"quixos.runtime.HandshakeResponse"> & { + /** + * @generated from field: string package_namespace = 1; + */ + packageNamespace: string; + + /** + * @generated from field: string package_name = 2; + */ + packageName: string; + + /** + * @generated from field: string runtime_protocol_version = 3; + */ + runtimeProtocolVersion: string; + + /** + * @generated from field: repeated quixos.FunctionRef functions = 4; + */ + functions: FunctionRef[]; +}; + +/** + * Describes the message quixos.runtime.HandshakeResponse. + * Use `create(HandshakeResponseSchema)` to create a new message. + */ +export const HandshakeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_runtime, 1); + +/** + * @generated from message quixos.runtime.InvokeRequest + */ +export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { + /** + * @generated from field: string invocation_id = 1; + */ + invocationId: string; + + /** + * @generated from field: quixos.FunctionRef function = 2; + */ + function?: FunctionRef | undefined; + + /** + * @generated from field: string object_id = 3; + */ + objectId: string; + + /** + * @generated from field: map input = 4; + */ + input: { [key: string]: Value }; +}; + +/** + * Describes the message quixos.runtime.InvokeRequest. + * Use `create(InvokeRequestSchema)` to create a new message. + */ +export const InvokeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_runtime, 2); + +/** + * @generated from message quixos.runtime.InvokeResponse + */ +export type InvokeResponse = Message<"quixos.runtime.InvokeResponse"> & { + /** + * @generated from field: bool ok = 1; + */ + ok: boolean; + + /** + * @generated from field: camino.Value result = 2; + */ + result?: Value | undefined; + + /** + * @generated from field: string error = 3; + */ + error: string; +}; + +/** + * Describes the message quixos.runtime.InvokeResponse. + * Use `create(InvokeResponseSchema)` to create a new message. + */ +export const InvokeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_runtime, 3); + +/** + * @generated from service quixos.runtime.PackageRuntime + */ +export const PackageRuntime: GenService<{ + /** + * @generated from rpc quixos.runtime.PackageRuntime.Handshake + */ + handshake: { + methodKind: "unary"; + input: typeof HandshakeRequestSchema; + output: typeof HandshakeResponseSchema; + }, + /** + * @generated from rpc quixos.runtime.PackageRuntime.Invoke + */ + invoke: { + methodKind: "unary"; + input: typeof InvokeRequestSchema; + output: typeof InvokeResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_quixos_runtime, 0); diff --git a/tsconfig.build.json b/tsconfig.build.json new file mode 100644 index 0000000..f2c6ef4 --- /dev/null +++ b/tsconfig.build.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowImportingTsExtensions": false, + "declaration": true, + "noEmit": false, + "outDir": "dist", + "rootDir": ".", + "sourceMap": true + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..9b8167f --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "NodeNext", + "moduleResolution": "NodeNext", + "lib": ["ES2022"], + "strict": true, + "noEmit": true, + "allowImportingTsExtensions": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "skipLibCheck": true, + "resolveJsonModule": true, + "verbatimModuleSyntax": true, + "types": ["node"] + }, + "include": ["src/**/*.ts"], + "exclude": ["node_modules", "dist"] +}