From 16b344c0ad9eca5fb82c8a57729281b7a5a15f6a Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Thu, 3 Sep 2026 15:46:52 -0700 Subject: [PATCH 1/3] Introduce repository-backed capability workspaces - define and validate the capability and resource-lock languages - provision workspace source repositories through Central Gitea - build package runtimes from pinned standalone sources - replace legacy schema compilation with workspace persistence plans - add stable optimistic registers and Automerge CRDT documents - modernize TypeScript/Nix package builds and runtime activation readiness --- .yarn/install-state.gz | Bin 13406 -> 0 bytes .yarnrc.yml | 16 +- dist/camino/api_pb.d.ts | 487 +++++----- dist/camino/api_pb.d.ts.map | 2 +- dist/camino/api_pb.js | 146 ++- dist/camino/schema_pb.d.ts | 815 +++-------------- dist/camino/schema_pb.d.ts.map | 2 +- dist/camino/schema_pb.js | 255 +----- dist/codegen-ts-runtime.d.ts | 3 - dist/codegen-ts-runtime.d.ts.map | 1 - dist/codegen-ts-runtime.js | 527 ----------- dist/index.d.ts | 162 ++-- dist/index.d.ts.map | 2 +- dist/index.js | 1019 +++++++-------------- dist/quixos/orch_pb.d.ts | 470 ++++++++++ dist/quixos/orch_pb.d.ts.map | 1 + dist/quixos/orch_pb.js | 106 +++ dist/quixos/package_pb.d.ts | 51 ++ dist/quixos/package_pb.d.ts.map | 1 + dist/quixos/package_pb.js | 18 + dist/quixos/refs_pb.d.ts | 111 ++- dist/quixos/refs_pb.d.ts.map | 2 +- dist/quixos/refs_pb.js | 23 +- dist/quixos/runtime_pb.d.ts | 40 +- dist/quixos/runtime_pb.d.ts.map | 2 +- dist/quixos/runtime_pb.js | 2 +- dist/schema-compiler.d.ts | 8 - dist/schema-compiler.d.ts.map | 1 - dist/schema-compiler.js | 718 --------------- dist/schema-ir.d.ts | 138 --- dist/schema-ir.d.ts.map | 1 - dist/schema-ir.js | 1 - flake.lock | 28 +- flake.nix | 4 +- package.json | 19 +- src/camino/api_pb.ts | 618 ++++++------- src/camino/schema_pb.ts | 986 +++----------------- src/codegen-ts-runtime.ts | 684 -------------- src/index.ts | 1447 ++++++++---------------------- src/quixos/orch_pb.ts | 573 ++++++++++++ src/quixos/package_pb.ts | 68 ++ src/quixos/refs_pb.ts | 125 ++- src/quixos/runtime_pb.ts | 45 +- src/schema-compiler.ts | 973 -------------------- src/schema-ir.ts | 174 ---- test/runtime.test.mjs | 193 ++++ tsconfig.json | 4 +- yarn-project.nix | 25 +- yarn.lock | 414 ++++++--- 49 files changed, 3704 insertions(+), 7807 deletions(-) delete mode 100644 .yarn/install-state.gz delete mode 100644 dist/codegen-ts-runtime.d.ts delete mode 100644 dist/codegen-ts-runtime.d.ts.map delete mode 100755 dist/codegen-ts-runtime.js create mode 100644 dist/quixos/orch_pb.d.ts create mode 100644 dist/quixos/orch_pb.d.ts.map create mode 100644 dist/quixos/orch_pb.js create mode 100644 dist/quixos/package_pb.d.ts create mode 100644 dist/quixos/package_pb.d.ts.map create mode 100644 dist/quixos/package_pb.js delete mode 100644 dist/schema-compiler.d.ts delete mode 100644 dist/schema-compiler.d.ts.map delete mode 100644 dist/schema-compiler.js delete mode 100644 dist/schema-ir.d.ts delete mode 100644 dist/schema-ir.d.ts.map delete mode 100644 dist/schema-ir.js delete mode 100644 src/codegen-ts-runtime.ts create mode 100644 src/quixos/orch_pb.ts create mode 100644 src/quixos/package_pb.ts delete mode 100644 src/schema-compiler.ts delete mode 100644 src/schema-ir.ts create mode 100644 test/runtime.test.mjs diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz deleted file mode 100644 index 5a8b82bddd74c7f4b027f45270d11ca51cf51676..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 13406 zcmV-kG@;8MiwFP!000001MQvLZ>3p!)~9OvG?|`eW&#n3xFBvp5Sn(a^TESJlgVg^ zq9jDg+#z|ij@3?A*+qF*XF4rLxc~`n34a8+NH_{{2* zU75z+`93$D^mNfW#4>#5A@ zLaf%sFlQ)z#L=5Jv-R47(=Bx~rk_PA(@Uvl6di;1Hs(^C9oBT6tckI^T==%z5_B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LhHI!)~AFPtLc`7i4hz zq%_1Yef{cgKk>pebtlm8KfZ#fOB?LkgMsbN!N6-e&EaBBa^V|puXNQcd&$}LwxI%-#gxv z@7700n_t^M9-9YePy1l^G52|kH^JY>N1Ly0yPdYzj59#Uuaz@SVbNqX1PfXv4f%Dt z-{oq?{}++G^krUm@NThdn)02I)kg2Sn*2WuqH5!!VH_4QJ(0L_Fd{moL}~ac86a=I z0?l&UsGJoBdvFDfBNrPNtsMf$wq7LvV9<>r$^mJkA?K(7&J(T%`iaiUQ9XA)#NqZX zF(k}KKHIkRUDcn6(>Iqk;$=AdjeGANJ>5Jjj}Df;jP}h>_8B;5_r5NDP|}Le0X_V4 z_g8RE&;Qt@b?q*;1cCf?$ zbnhd(SnKdVzwkD#!~e3o>HrYRK?z3YMcXvq%XaRjtde<{7|F~ero)Qpzm%~?e&IBM-l+;zl`QmCwZhKo;v>wXI z_`2!R%jjD4!9y|&VXvecI4fy%vAXtNs*Q@YB}+6&Px2ON>)K9g8dAgOF^$}I5qPu6 zhurDYZI(9P^>DTH*}QLlqR-j+cWXJa^#)43^zk}}zjc2N2Kwy}I}>sBbd|%uet!on zi$~*5uX&PAhFj1_6FMmN7QE07Y77Kpn9xcnr0TZewi0X+MvywVBfChwi&~@QK{`2y zR&HdBU`MX87$pa~sw~r*2xcP{3lK?-@=Ju9t(1` zYUQ+=2)N6Z8BDEe1>UtR@1UfB{TL`3vsok8=n%M8wmji^G++TotPCcX`OOh9hH?p-i*kTlZEb6D4j9cSpj8L=-~aso1+BxRFas(90F%(c AxBvhE diff --git a/.yarnrc.yml b/.yarnrc.yml index a2c8e93..da4124a 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,5 +1,5 @@ approvedGitRepositories: - - https://gitea-external.egads.tutti.syntaxblitz.net/quixos/* + - "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/*" enableScripts: true @@ -9,6 +9,20 @@ individualNixPackaging: true nodeLinker: node-modules +supportedArchitectures: + os: + - current + - linux + cpu: + - current + - x64 + - arm64 + libc: + - current + - glibc + +npmMinimalAgeGate: 0 + plugins: - checksum: 271de9a785321a37c564b8e2a6b5cd689850b20572d5fee8ec0a6b8e7a5d4cfb59e533524af2b4a537e00da12828abd062eaec6978556e3dd9149a020db2591b path: .yarn/plugins/yarn-plugin-nixify.cjs diff --git a/dist/camino/api_pb.d.ts b/dist/camino/api_pb.d.ts index d9ffaf0..ff9e965 100644 --- a/dist/camino/api_pb.d.ts +++ b/dist/camino/api_pb.d.ts @@ -1,84 +1,10 @@ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; -import type { ClassSchema } from "./schema_pb.js"; -import type { FunctionRef } from "../quixos/refs_pb.js"; +import type { PersistencePlan } from "./schema_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file camino/api.proto. */ export declare const file_camino_api: GenFile; -/** - * @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 declare const RegisterSchemaRequestSchema: GenMessage; -/** - * @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 declare const RegisterSchemaResponseSchema: GenMessage; -/** - * @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 declare const ListClassesRequestSchema: GenMessage; -/** - * @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 declare const RegisteredClassSchema: GenMessage; -/** - * @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 declare const ListClassesResponseSchema: GenMessage; /** * @generated from message camino.NullValue */ @@ -155,47 +81,51 @@ export type CrdtValue = Message<"camino.CrdtValue"> & { */ export declare const CrdtValueSchema: GenMessage; /** - * @generated from message camino.FieldValueSource + * @generated from message camino.StateValueSource */ -export type FieldValueSource = Message<"camino.FieldValueSource"> & { +export type StateValueSource = Message<"camino.StateValueSource"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; /** - * @generated from field: string field_type = 3; + * @generated from field: string value_type_json = 3; */ - fieldType: string; + valueTypeJson: string; /** - * @generated from field: string field_storage = 4; + * @generated from field: string storage_policy_json = 4; */ - fieldStorage: string; + storagePolicyJson: string; /** - * @generated from field: string conflict_strategy = 5; - */ - conflictStrategy: string; - /** - * @generated from field: uint64 revision = 6; + * @generated from field: uint64 revision = 5; */ revision: bigint; + /** + * CRDT-backed state is still read as its materialized Value. The snapshot + * travels with the writable source identity so a client can retain and + * advance a local replica without exposing the document to package code. + * + * @generated from field: camino.CrdtValue crdt_snapshot = 6; + */ + crdtSnapshot?: CrdtValue | undefined; }; /** - * Describes the message camino.FieldValueSource. - * Use `create(FieldValueSourceSchema)` to create a new message. + * Describes the message camino.StateValueSource. + * Use `create(StateValueSourceSchema)` to create a new message. */ -export declare const FieldValueSourceSchema: GenMessage; +export declare const StateValueSourceSchema: GenMessage; /** * @generated from message camino.ValueSource */ export type ValueSource = Message<"camino.ValueSource"> & { /** - * @generated from field: camino.FieldValueSource field = 1; + * @generated from field: camino.StateValueSource state = 1; */ - field?: FieldValueSource | undefined; + state?: StateValueSource | undefined; }; /** * Describes the message camino.ValueSource. @@ -283,18 +213,69 @@ export type Value = Message<"camino.Value"> & { * Use `create(ValueSchema)` to create a new message. */ export declare const ValueSchema: GenMessage; +/** + * @generated from message camino.InstallPersistencePlanRequest + */ +export type InstallPersistencePlanRequest = Message<"camino.InstallPersistencePlanRequest"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; +/** + * Describes the message camino.InstallPersistencePlanRequest. + * Use `create(InstallPersistencePlanRequestSchema)` to create a new message. + */ +export declare const InstallPersistencePlanRequestSchema: GenMessage; +/** + * @generated from message camino.InstallPersistencePlanResponse + */ +export type InstallPersistencePlanResponse = Message<"camino.InstallPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; +/** + * Describes the message camino.InstallPersistencePlanResponse. + * Use `create(InstallPersistencePlanResponseSchema)` to create a new message. + */ +export declare const InstallPersistencePlanResponseSchema: GenMessage; +/** + * @generated from message camino.GetPersistencePlanRequest + */ +export type GetPersistencePlanRequest = Message<"camino.GetPersistencePlanRequest"> & {}; +/** + * Describes the message camino.GetPersistencePlanRequest. + * Use `create(GetPersistencePlanRequestSchema)` to create a new message. + */ +export declare const GetPersistencePlanRequestSchema: GenMessage; +/** + * @generated from message camino.GetPersistencePlanResponse + */ +export type GetPersistencePlanResponse = Message<"camino.GetPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; +/** + * Describes the message camino.GetPersistencePlanResponse. + * Use `create(GetPersistencePlanResponseSchema)` to create a new message. + */ +export declare const GetPersistencePlanResponseSchema: GenMessage; /** * @generated from message camino.CreateObjectRequest */ export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; /** - * @generated from field: map fields = 2; + * @generated from field: map initial_state = 2; */ - fields: { + initialState: { [key: string]: Value; }; }; @@ -350,9 +331,9 @@ export declare const GetObjectResponseSchema: GenMessage; */ export type ListObjectsRequest = Message<"camino.ListObjectsRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; }; /** * Describes the message camino.ListObjectsRequest. @@ -374,17 +355,49 @@ export type ListObjectsResponse = Message<"camino.ListObjectsResponse"> & { */ export declare const ListObjectsResponseSchema: GenMessage; /** - * @generated from message camino.SetFieldRequest + * @generated from message camino.ReadStateRequest */ -export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { +export type ReadStateRequest = Message<"camino.ReadStateRequest"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; +}; +/** + * Describes the message camino.ReadStateRequest. + * Use `create(ReadStateRequestSchema)` to create a new message. + */ +export declare const ReadStateRequestSchema: GenMessage; +/** + * @generated from message camino.ReadStateResponse + */ +export type ReadStateResponse = Message<"camino.ReadStateResponse"> & { + /** + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; +}; +/** + * Describes the message camino.ReadStateResponse. + * Use `create(ReadStateResponseSchema)` to create a new message. + */ +export declare const ReadStateResponseSchema: GenMessage; +/** + * @generated from message camino.WriteStateRequest + */ +export type WriteStateRequest = Message<"camino.WriteStateRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + /** + * @generated from field: string slot_id = 2; + */ + slotId: string; /** * @generated from field: camino.Value value = 3; */ @@ -395,102 +408,76 @@ export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { clientMutationId: string; }; /** - * Describes the message camino.SetFieldRequest. - * Use `create(SetFieldRequestSchema)` to create a new message. + * Describes the message camino.WriteStateRequest. + * Use `create(WriteStateRequestSchema)` to create a new message. */ -export declare const SetFieldRequestSchema: GenMessage; +export declare const WriteStateRequestSchema: GenMessage; /** - * @generated from message camino.SetFieldResponse + * @generated from message camino.WriteStateResponse */ -export type SetFieldResponse = Message<"camino.SetFieldResponse"> & { +export type WriteStateResponse = Message<"camino.WriteStateResponse"> & { /** - * @generated from field: camino.CaminoObject object = 1; + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; + /** + * @generated from field: camino.CaminoObject object = 2; */ object?: CaminoObject | undefined; }; /** - * Describes the message camino.SetFieldResponse. - * Use `create(SetFieldResponseSchema)` to create a new message. + * Describes the message camino.WriteStateResponse. + * Use `create(WriteStateResponseSchema)` to create a new message. */ -export declare const SetFieldResponseSchema: GenMessage; +export declare const WriteStateResponseSchema: GenMessage; /** - * @generated from message camino.AddEdgeRequest + * @generated from message camino.ConnectEdgeRequest */ -export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { +export type ConnectEdgeRequest = Message<"camino.ConnectEdgeRequest"> & { /** - * @generated from field: string from_object_id = 1; + * @generated from field: string edge_type_id = 1; */ - fromObjectId: string; + edgeTypeId: string; /** - * @generated from field: string source_field = 2; + * @generated from field: string projection_id = 2; */ - sourceField: string; + projectionId: string; /** - * @generated from field: string to_object_id = 3; + * @generated from field: string object_id = 3; */ - toObjectId: string; + objectId: string; /** - * @generated from field: map fields = 4; + * @generated from field: string target_object_id = 4; */ - fields: { - [key: string]: Value; - }; + targetObjectId: string; /** - * @generated from field: optional int32 source_ordinal = 5; + * @generated from field: optional int32 ordinal = 5; */ - sourceOrdinal?: number | undefined; + ordinal?: number | undefined; /** * @generated from field: optional int32 target_ordinal = 6; */ targetOrdinal?: number | undefined; }; /** - * Describes the message camino.AddEdgeRequest. - * Use `create(AddEdgeRequestSchema)` to create a new message. + * Describes the message camino.ConnectEdgeRequest. + * Use `create(ConnectEdgeRequestSchema)` to create a new message. */ -export declare const AddEdgeRequestSchema: GenMessage; +export declare const ConnectEdgeRequestSchema: GenMessage; /** - * @generated from message camino.AddEdgeResponse + * @generated from message camino.ConnectEdgeResponse */ -export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { +export type ConnectEdgeResponse = Message<"camino.ConnectEdgeResponse"> & { /** * @generated from field: camino.CaminoEdge edge = 1; */ edge?: CaminoEdge | undefined; }; /** - * Describes the message camino.AddEdgeResponse. - * Use `create(AddEdgeResponseSchema)` to create a new message. + * Describes the message camino.ConnectEdgeResponse. + * Use `create(ConnectEdgeResponseSchema)` to create a new message. */ -export declare const AddEdgeResponseSchema: GenMessage; -/** - * @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 declare const ListEdgesRequestSchema: GenMessage; -/** - * @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 declare const ListEdgesResponseSchema: GenMessage; +export declare const ConnectEdgeResponseSchema: GenMessage; /** * @generated from message camino.ResolveEdgeRequest */ @@ -500,9 +487,13 @@ export type ResolveEdgeRequest = Message<"camino.ResolveEdgeRequest"> & { */ objectId: string; /** - * @generated from field: string projection = 2; + * @generated from field: string edge_type_id = 2; */ - projection: string; + edgeTypeId: string; + /** + * @generated from field: string projection_id = 3; + */ + projectionId: string; }; /** * Describes the message camino.ResolveEdgeRequest. @@ -517,14 +508,6 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { * @generated from field: repeated camino.CaminoEdge edges = 1; */ edges: CaminoEdge[]; - /** - * @generated from field: camino.CaminoObject materialized_object = 2; - */ - materializedObject?: CaminoObject | undefined; - /** - * @generated from field: bool created = 3; - */ - created: boolean; }; /** * Describes the message camino.ResolveEdgeResponse. @@ -532,33 +515,33 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { */ export declare const ResolveEdgeResponseSchema: GenMessage; /** - * @generated from message camino.RemoveEdgeRequest + * @generated from message camino.DisconnectEdgeRequest */ -export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { +export type DisconnectEdgeRequest = Message<"camino.DisconnectEdgeRequest"> & { /** * @generated from field: string edge_id = 1; */ edgeId: string; }; /** - * Describes the message camino.RemoveEdgeRequest. - * Use `create(RemoveEdgeRequestSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeRequest. + * Use `create(DisconnectEdgeRequestSchema)` to create a new message. */ -export declare const RemoveEdgeRequestSchema: GenMessage; +export declare const DisconnectEdgeRequestSchema: GenMessage; /** - * @generated from message camino.RemoveEdgeResponse + * @generated from message camino.DisconnectEdgeResponse */ -export type RemoveEdgeResponse = Message<"camino.RemoveEdgeResponse"> & { +export type DisconnectEdgeResponse = Message<"camino.DisconnectEdgeResponse"> & { /** * @generated from field: string edge_id = 1; */ edgeId: string; }; /** - * Describes the message camino.RemoveEdgeResponse. - * Use `create(RemoveEdgeResponseSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeResponse. + * Use `create(DisconnectEdgeResponseSchema)` to create a new message. */ -export declare const RemoveEdgeResponseSchema: GenMessage; +export declare const DisconnectEdgeResponseSchema: GenMessage; /** * @generated from message camino.ListOpsRequest */ @@ -640,13 +623,13 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { */ id: string; /** - * @generated from field: string class_id = 2; + * @generated from field: string atom_id = 2; */ - classId: string; + atomId: string; /** - * @generated from field: uint32 schema_version = 3; + * @generated from field: string workspace_revision_id = 3; */ - schemaVersion: number; + workspaceRevisionId: string; /** * @generated from field: string created_at = 4; */ @@ -656,23 +639,17 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { */ updatedAt: string; /** - * @generated from field: map fields = 6; + * @generated from field: map state = 6; */ - fields: { + state: { [key: string]: Value; }; /** - * @generated from field: map field_revisions = 7; + * @generated from field: map state_revisions = 7; */ - fieldRevisions: { + stateRevisions: { [key: string]: bigint; }; - /** - * @generated from field: map field_conflicts = 8; - */ - fieldConflicts: { - [key: string]: string; - }; }; /** * Describes the message camino.CaminoObject. @@ -692,69 +669,33 @@ export type CaminoEdge = Message<"camino.CaminoEdge"> & { */ edgeTypeId: string; /** - * @generated from field: string from_object_id = 3; + * @generated from field: string first_object_id = 3; */ - fromObjectId: string; + firstObjectId: string; /** - * @generated from field: string to_object_id = 4; + * @generated from field: string second_object_id = 4; */ - toObjectId: string; + secondObjectId: string; /** - * Legacy canonical source-side projection fields. Prefer endpoint fields. - * - * @generated from field: string source_field = 5; + * @generated from field: string first_projection_id = 5; */ - sourceField: string; + firstProjectionId: string; /** - * @generated from field: string cardinality = 6; + * @generated from field: string second_projection_id = 6; */ - cardinality: string; + secondProjectionId: string; /** - * @generated from field: string inverse = 7; + * @generated from field: optional int32 first_ordinal = 7; */ - inverse: string; + firstOrdinal?: number | undefined; /** - * @generated from field: map fields = 8; + * @generated from field: optional int32 second_ordinal = 8; */ - fields: { - [key: string]: Value; - }; + secondOrdinal?: number | undefined; /** - * @generated from field: optional int32 from_ordinal = 9; - */ - fromOrdinal?: number | undefined; - /** - * @generated from field: string created_at = 10; + * @generated from field: string created_at = 9; */ createdAt: string; - /** - * @generated from field: string updated_at = 11; - */ - updatedAt: string; - /** - * @generated from field: string from_projection = 12; - */ - fromProjection: string; - /** - * @generated from field: string to_projection = 13; - */ - toProjection: string; - /** - * @generated from field: string from_cardinality = 14; - */ - fromCardinality: string; - /** - * @generated from field: string to_cardinality = 15; - */ - toCardinality: string; - /** - * @generated from field: optional int32 to_ordinal = 16; - */ - toOrdinal?: number | undefined; - /** - * @generated from field: string directionality = 17; - */ - directionality: string; }; /** * Describes the message camino.CaminoEdge. @@ -786,15 +727,11 @@ export type CaminoOp = Message<"camino.CaminoOp"> & { */ actor: string; /** - * @generated from field: quixos.FunctionRef function_ref = 6; - */ - functionRef?: FunctionRef | undefined; - /** - * @generated from field: string created_at = 7; + * @generated from field: string created_at = 6; */ createdAt: string; /** - * @generated from field: string client_mutation_id = 8; + * @generated from field: string client_mutation_id = 7; */ clientMutationId: string; }; @@ -808,20 +745,20 @@ export declare const CaminoOpSchema: GenMessage; */ export declare const CaminoService: GenService<{ /** - * @generated from rpc camino.CaminoService.RegisterSchema + * @generated from rpc camino.CaminoService.InstallPersistencePlan */ - registerSchema: { + installPersistencePlan: { methodKind: "unary"; - input: typeof RegisterSchemaRequestSchema; - output: typeof RegisterSchemaResponseSchema; + input: typeof InstallPersistencePlanRequestSchema; + output: typeof InstallPersistencePlanResponseSchema; }; /** - * @generated from rpc camino.CaminoService.ListClasses + * @generated from rpc camino.CaminoService.GetPersistencePlan */ - listClasses: { + getPersistencePlan: { methodKind: "unary"; - input: typeof ListClassesRequestSchema; - output: typeof ListClassesResponseSchema; + input: typeof GetPersistencePlanRequestSchema; + output: typeof GetPersistencePlanResponseSchema; }; /** * @generated from rpc camino.CaminoService.CreateObject @@ -848,28 +785,28 @@ export declare const CaminoService: GenService<{ output: typeof ListObjectsResponseSchema; }; /** - * @generated from rpc camino.CaminoService.SetField + * @generated from rpc camino.CaminoService.ReadState */ - setField: { + readState: { methodKind: "unary"; - input: typeof SetFieldRequestSchema; - output: typeof SetFieldResponseSchema; + input: typeof ReadStateRequestSchema; + output: typeof ReadStateResponseSchema; }; /** - * @generated from rpc camino.CaminoService.AddEdge + * @generated from rpc camino.CaminoService.WriteState */ - addEdge: { + writeState: { methodKind: "unary"; - input: typeof AddEdgeRequestSchema; - output: typeof AddEdgeResponseSchema; + input: typeof WriteStateRequestSchema; + output: typeof WriteStateResponseSchema; }; /** - * @generated from rpc camino.CaminoService.ListEdges + * @generated from rpc camino.CaminoService.ConnectEdge */ - listEdges: { + connectEdge: { methodKind: "unary"; - input: typeof ListEdgesRequestSchema; - output: typeof ListEdgesResponseSchema; + input: typeof ConnectEdgeRequestSchema; + output: typeof ConnectEdgeResponseSchema; }; /** * @generated from rpc camino.CaminoService.ResolveEdge @@ -880,12 +817,12 @@ export declare const CaminoService: GenService<{ output: typeof ResolveEdgeResponseSchema; }; /** - * @generated from rpc camino.CaminoService.RemoveEdge + * @generated from rpc camino.CaminoService.DisconnectEdge */ - removeEdge: { + disconnectEdge: { methodKind: "unary"; - input: typeof RemoveEdgeRequestSchema; - output: typeof RemoveEdgeResponseSchema; + input: typeof DisconnectEdgeRequestSchema; + output: typeof DisconnectEdgeResponseSchema; }; /** * @generated from rpc camino.CaminoService.ListOps diff --git a/dist/camino/api_pb.d.ts.map b/dist/camino/api_pb.d.ts.map index 758f3bc..040f9e4 100644 --- a/dist/camino/api_pb.d.ts.map +++ b/dist/camino/api_pb.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"api_pb.d.ts","sourceRoot":"","sources":["../../src/camino/api_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OAC2wM,CAAC;AAE1yM;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,8BAA8B,CAAC,GAAG;IAC5E;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,qBAAqB,CACzC,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,+BAA+B,CAA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AK,EAAE,OAAO,sBAAsB,CAAC;QACrC,MAAM,EAAE,OAAO,uBAAuB,CAAC;KACxC,CAAC;IACF;;OAEG;IACH,WAAW,EAAE;QACX,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,wBAAwB,CAAC;QACvC,MAAM,EAAE,OAAO,yBAAyB,CAAC;KAC1C,CAAC;IACF;;OAEG;IACH,UAAU,EAAE;QACV,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,uBAAuB,CAAC;QACtC,MAAM,EAAE,OAAO,wBAAwB,CAAC;KACzC,CAAC;IACF;;OAEG;IACH,OAAO,EAAE;QACP,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,oBAAoB,CAAC;QACnC,MAAM,EAAE,OAAO,qBAAqB,CAAC;KACtC,CAAC;IACF;;OAEG;IACH,WAAW,EAAE;QACX,UAAU,EAAE,kBAAkB,CAAC;QAC/B,KAAK,EAAE,OAAO,wBAAwB,CAAC;QACvC,MAAM,EAAE,OAAO,sBAAsB,CAAC;KACvC,CAAC;CACH,CACgC,CAAC"} \ No newline at end of file +{"version":3,"file":"api_pb.d.ts","sourceRoot":"","sources":["../../src/camino/api_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,OAC8sL,CAAC;AAE7uL;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG,EACrD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,SAAS,CACjB,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,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"} \ No newline at end of file diff --git a/dist/camino/api_pb.js b/dist/camino/api_pb.js index 2f81991..670b83a 100644 --- a/dist/camino/api_pb.js +++ b/dist/camino/api_pb.js @@ -3,191 +3,185 @@ /* eslint-disable */ import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; import { file_camino_schema } from "./schema_pb.js"; -import { file_quixos_refs } from "../quixos/refs_pb.js"; /** * Describes the file camino/api.proto. */ -export const file_camino_api = /*@__PURE__*/ fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iLAoVUmVnaXN0ZXJTY2hlbWFSZXF1ZXN0EhMKC3NvdXJjZV9maWxlGAEgASgJIlEKFlJlZ2lzdGVyU2NoZW1hUmVzcG9uc2USEQoJY2xhc3NfaWRzGAEgAygJEiQKB2NsYXNzZXMYAiADKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiFAoSTGlzdENsYXNzZXNSZXF1ZXN0IkIKD1JlZ2lzdGVyZWRDbGFzcxIKCgJpZBgBIAEoCRIjCgZzY2hlbWEYAiABKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiPwoTTGlzdENsYXNzZXNSZXNwb25zZRIoCgdjbGFzc2VzGAEgAygLMhcuY2FtaW5vLlJlZ2lzdGVyZWRDbGFzcyILCglOdWxsVmFsdWUifAoLT2JqZWN0VmFsdWUSLwoGZmllbGRzGAEgAygLMh8uY2FtaW5vLk9iamVjdFZhbHVlLkZpZWxkc0VudHJ5GjwKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZToCOAEiKgoJTGlzdFZhbHVlEh0KBnZhbHVlcxgBIAMoCzINLmNhbWluby5WYWx1ZSIdCghSZWZWYWx1ZRIRCglvYmplY3RfaWQYASABKAkiPAoJQ3JkdFZhbHVlEgwKBHR5cGUYASABKAkSEAoIZW5jb2RpbmcYAiABKAkSDwoHcGF5bG9hZBgDIAEoDCKRAQoQR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SZXF1ZXN0GhouY2FtaW5vLlJlbW92ZUVkZ2VSZXNwb25zZRI6CgdMaXN0T3BzEhYuY2FtaW5vLkxpc3RPcHNSZXF1ZXN0GhcuY2FtaW5vLkxpc3RPcHNSZXNwb25zZRJFCgtXYXRjaE9iamVjdBIaLmNhbWluby5XYXRjaE9iamVjdFJlcXVlc3QaGC5jYW1pbm8uV2F0Y2hPYmplY3RFdmVudDABYgZwcm90bzM", [file_camino_schema, file_quixos_refs]); -/** - * Describes the message camino.RegisterSchemaRequest. - * Use `create(RegisterSchemaRequestSchema)` to create a new message. - */ -export const RegisterSchemaRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 0); -/** - * Describes the message camino.RegisterSchemaResponse. - * Use `create(RegisterSchemaResponseSchema)` to create a new message. - */ -export const RegisterSchemaResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 1); -/** - * Describes the message camino.ListClassesRequest. - * Use `create(ListClassesRequestSchema)` to create a new message. - */ -export const ListClassesRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 2); -/** - * Describes the message camino.RegisteredClass. - * Use `create(RegisteredClassSchema)` to create a new message. - */ -export const RegisteredClassSchema = /*@__PURE__*/ messageDesc(file_camino_api, 3); -/** - * Describes the message camino.ListClassesResponse. - * Use `create(ListClassesResponseSchema)` to create a new message. - */ -export const ListClassesResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 4); +export const file_camino_api = /*@__PURE__*/ fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iCwoJTnVsbFZhbHVlInwKC09iamVjdFZhbHVlEi8KBmZpZWxkcxgBIAMoCzIfLmNhbWluby5PYmplY3RWYWx1ZS5GaWVsZHNFbnRyeRo8CgtGaWVsZHNFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBIioKCUxpc3RWYWx1ZRIdCgZ2YWx1ZXMYASADKAsyDS5jYW1pbm8uVmFsdWUiHQ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0Gh4uY2FtaW5vLkRpc2Nvbm5lY3RFZGdlUmVzcG9uc2USOgoHTGlzdE9wcxIWLmNhbWluby5MaXN0T3BzUmVxdWVzdBoXLmNhbWluby5MaXN0T3BzUmVzcG9uc2USRQoLV2F0Y2hPYmplY3QSGi5jYW1pbm8uV2F0Y2hPYmplY3RSZXF1ZXN0GhguY2FtaW5vLldhdGNoT2JqZWN0RXZlbnQwAWIGcHJvdG8z", [file_camino_schema]); /** * Describes the message camino.NullValue. * Use `create(NullValueSchema)` to create a new message. */ -export const NullValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 5); +export const NullValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 0); /** * Describes the message camino.ObjectValue. * Use `create(ObjectValueSchema)` to create a new message. */ -export const ObjectValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 6); +export const ObjectValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 1); /** * Describes the message camino.ListValue. * Use `create(ListValueSchema)` to create a new message. */ -export const ListValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 7); +export const ListValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 2); /** * Describes the message camino.RefValue. * Use `create(RefValueSchema)` to create a new message. */ -export const RefValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 8); +export const RefValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 3); /** * Describes the message camino.CrdtValue. * Use `create(CrdtValueSchema)` to create a new message. */ -export const CrdtValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 9); +export const CrdtValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 4); /** - * Describes the message camino.FieldValueSource. - * Use `create(FieldValueSourceSchema)` to create a new message. + * Describes the message camino.StateValueSource. + * Use `create(StateValueSourceSchema)` to create a new message. */ -export const FieldValueSourceSchema = /*@__PURE__*/ messageDesc(file_camino_api, 10); +export const StateValueSourceSchema = /*@__PURE__*/ messageDesc(file_camino_api, 5); /** * Describes the message camino.ValueSource. * Use `create(ValueSourceSchema)` to create a new message. */ -export const ValueSourceSchema = /*@__PURE__*/ messageDesc(file_camino_api, 11); +export const ValueSourceSchema = /*@__PURE__*/ messageDesc(file_camino_api, 6); /** * Describes the message camino.Value. * Use `create(ValueSchema)` to create a new message. */ -export const ValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 12); +export const ValueSchema = /*@__PURE__*/ messageDesc(file_camino_api, 7); +/** + * Describes the message camino.InstallPersistencePlanRequest. + * Use `create(InstallPersistencePlanRequestSchema)` to create a new message. + */ +export const InstallPersistencePlanRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 8); +/** + * Describes the message camino.InstallPersistencePlanResponse. + * Use `create(InstallPersistencePlanResponseSchema)` to create a new message. + */ +export const InstallPersistencePlanResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 9); +/** + * Describes the message camino.GetPersistencePlanRequest. + * Use `create(GetPersistencePlanRequestSchema)` to create a new message. + */ +export const GetPersistencePlanRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 10); +/** + * Describes the message camino.GetPersistencePlanResponse. + * Use `create(GetPersistencePlanResponseSchema)` to create a new message. + */ +export const GetPersistencePlanResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 11); /** * Describes the message camino.CreateObjectRequest. * Use `create(CreateObjectRequestSchema)` to create a new message. */ -export const CreateObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 13); +export const CreateObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 12); /** * Describes the message camino.CreateObjectResponse. * Use `create(CreateObjectResponseSchema)` to create a new message. */ -export const CreateObjectResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 14); +export const CreateObjectResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 13); /** * Describes the message camino.GetObjectRequest. * Use `create(GetObjectRequestSchema)` to create a new message. */ -export const GetObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 15); +export const GetObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 14); /** * Describes the message camino.GetObjectResponse. * Use `create(GetObjectResponseSchema)` to create a new message. */ -export const GetObjectResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 16); +export const GetObjectResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 15); /** * Describes the message camino.ListObjectsRequest. * Use `create(ListObjectsRequestSchema)` to create a new message. */ -export const ListObjectsRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 17); +export const ListObjectsRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 16); /** * Describes the message camino.ListObjectsResponse. * Use `create(ListObjectsResponseSchema)` to create a new message. */ -export const ListObjectsResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 18); +export const ListObjectsResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 17); /** - * Describes the message camino.SetFieldRequest. - * Use `create(SetFieldRequestSchema)` to create a new message. + * Describes the message camino.ReadStateRequest. + * Use `create(ReadStateRequestSchema)` to create a new message. */ -export const SetFieldRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 19); +export const ReadStateRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 18); /** - * Describes the message camino.SetFieldResponse. - * Use `create(SetFieldResponseSchema)` to create a new message. + * Describes the message camino.ReadStateResponse. + * Use `create(ReadStateResponseSchema)` to create a new message. */ -export const SetFieldResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 20); +export const ReadStateResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 19); /** - * Describes the message camino.AddEdgeRequest. - * Use `create(AddEdgeRequestSchema)` to create a new message. + * Describes the message camino.WriteStateRequest. + * Use `create(WriteStateRequestSchema)` to create a new message. */ -export const AddEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 21); +export const WriteStateRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 20); /** - * Describes the message camino.AddEdgeResponse. - * Use `create(AddEdgeResponseSchema)` to create a new message. + * Describes the message camino.WriteStateResponse. + * Use `create(WriteStateResponseSchema)` to create a new message. */ -export const AddEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 22); +export const WriteStateResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 21); /** - * Describes the message camino.ListEdgesRequest. - * Use `create(ListEdgesRequestSchema)` to create a new message. + * Describes the message camino.ConnectEdgeRequest. + * Use `create(ConnectEdgeRequestSchema)` to create a new message. */ -export const ListEdgesRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 23); +export const ConnectEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 22); /** - * Describes the message camino.ListEdgesResponse. - * Use `create(ListEdgesResponseSchema)` to create a new message. + * Describes the message camino.ConnectEdgeResponse. + * Use `create(ConnectEdgeResponseSchema)` to create a new message. */ -export const ListEdgesResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 24); +export const ConnectEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 23); /** * Describes the message camino.ResolveEdgeRequest. * Use `create(ResolveEdgeRequestSchema)` to create a new message. */ -export const ResolveEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 25); +export const ResolveEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 24); /** * Describes the message camino.ResolveEdgeResponse. * Use `create(ResolveEdgeResponseSchema)` to create a new message. */ -export const ResolveEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 26); +export const ResolveEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 25); /** - * Describes the message camino.RemoveEdgeRequest. - * Use `create(RemoveEdgeRequestSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeRequest. + * Use `create(DisconnectEdgeRequestSchema)` to create a new message. */ -export const RemoveEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 27); +export const DisconnectEdgeRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 26); /** - * Describes the message camino.RemoveEdgeResponse. - * Use `create(RemoveEdgeResponseSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeResponse. + * Use `create(DisconnectEdgeResponseSchema)` to create a new message. */ -export const RemoveEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 28); +export const DisconnectEdgeResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 27); /** * Describes the message camino.ListOpsRequest. * Use `create(ListOpsRequestSchema)` to create a new message. */ -export const ListOpsRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 29); +export const ListOpsRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 28); /** * Describes the message camino.ListOpsResponse. * Use `create(ListOpsResponseSchema)` to create a new message. */ -export const ListOpsResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 30); +export const ListOpsResponseSchema = /*@__PURE__*/ messageDesc(file_camino_api, 29); /** * Describes the message camino.WatchObjectRequest. * Use `create(WatchObjectRequestSchema)` to create a new message. */ -export const WatchObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 31); +export const WatchObjectRequestSchema = /*@__PURE__*/ messageDesc(file_camino_api, 30); /** * Describes the message camino.WatchObjectEvent. * Use `create(WatchObjectEventSchema)` to create a new message. */ -export const WatchObjectEventSchema = /*@__PURE__*/ messageDesc(file_camino_api, 32); +export const WatchObjectEventSchema = /*@__PURE__*/ messageDesc(file_camino_api, 31); /** * Describes the message camino.CaminoObject. * Use `create(CaminoObjectSchema)` to create a new message. */ -export const CaminoObjectSchema = /*@__PURE__*/ messageDesc(file_camino_api, 33); +export const CaminoObjectSchema = /*@__PURE__*/ messageDesc(file_camino_api, 32); /** * Describes the message camino.CaminoEdge. * Use `create(CaminoEdgeSchema)` to create a new message. */ -export const CaminoEdgeSchema = /*@__PURE__*/ messageDesc(file_camino_api, 34); +export const CaminoEdgeSchema = /*@__PURE__*/ messageDesc(file_camino_api, 33); /** * Describes the message camino.CaminoOp. * Use `create(CaminoOpSchema)` to create a new message. */ -export const CaminoOpSchema = /*@__PURE__*/ messageDesc(file_camino_api, 35); +export const CaminoOpSchema = /*@__PURE__*/ messageDesc(file_camino_api, 34); /** * @generated from service camino.CaminoService */ diff --git a/dist/camino/schema_pb.d.ts b/dist/camino/schema_pb.d.ts index 28eefd7..53182fd 100644 --- a/dist/camino/schema_pb.d.ts +++ b/dist/camino/schema_pb.d.ts @@ -1,681 +1,201 @@ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; -import type { FunctionRef } from "../quixos/refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file camino/schema.proto. */ export declare const file_camino_schema: GenFile; /** - * @generated from message camino.SymbolRef + * @generated from message camino.AtomDefinition */ -export type SymbolRef = Message<"camino.SymbolRef"> & { +export type AtomDefinition = Message<"camino.AtomDefinition"> & { /** - * @generated from field: string namespace = 1; + * @generated from field: string atom_id = 1; */ - namespace: string; + atomId: string; /** - * @generated from field: string name = 2; + * @generated from field: string display_name = 2; */ - name: string; - /** - * @generated from field: string version = 3; - */ - version: string; - /** - * @generated from field: string hash = 4; - */ - hash: string; + displayName: string; }; /** - * Describes the message camino.SymbolRef. - * Use `create(SymbolRefSchema)` to create a new message. + * Describes the message camino.AtomDefinition. + * Use `create(AtomDefinitionSchema)` to create a new message. */ -export declare const SymbolRefSchema: GenMessage; +export declare const AtomDefinitionSchema: GenMessage; /** - * @generated from message camino.Ref + * @generated from message camino.AtomConformance */ -export type Ref = Message<"camino.Ref"> & { +export type AtomConformance = Message<"camino.AtomConformance"> & { /** - * @generated from field: string object_id = 1; + * @generated from field: string atom_id = 1; */ - objectId: string; + atomId: string; + /** + * @generated from field: string interface_revision_id = 2; + */ + interfaceRevisionId: string; }; /** - * Describes the message camino.Ref. - * Use `create(RefSchema)` to create a new message. + * Describes the message camino.AtomConformance. + * Use `create(AtomConformanceSchema)` to create a new message. */ -export declare const RefSchema: GenMessage; +export declare const AtomConformanceSchema: GenMessage; /** - * @generated from message camino.CustomField + * @generated from message camino.StateAttachment */ -export type CustomField = Message<"camino.CustomField"> & {}; -/** - * Describes the message camino.CustomField. - * Use `create(CustomFieldSchema)` to create a new message. - */ -export declare const CustomFieldSchema: GenMessage; -/** - * @generated from message camino.WatchStartResult - */ -export type WatchStartResult = Message<"camino.WatchStartResult"> & { +export type StateAttachment = Message<"camino.StateAttachment"> & { /** - * @generated from field: string watch_id = 1; + * @generated from field: string slot_id = 1; */ - watchId: string; + slotId: string; + /** + * @generated from field: string attached_atom_id = 2; + */ + attachedAtomId: string; + /** + * @generated from field: string display_name = 3; + */ + displayName: string; + /** + * @generated from field: string value_type_json = 4; + */ + valueTypeJson: string; + /** + * @generated from field: string storage_policy_json = 5; + */ + storagePolicyJson: string; + /** + * @generated from field: string default_value_json = 6; + */ + defaultValueJson: string; }; /** - * Describes the message camino.WatchStartResult. - * Use `create(WatchStartResultSchema)` to create a new message. + * Describes the message camino.StateAttachment. + * Use `create(StateAttachmentSchema)` to create a new message. */ -export declare const WatchStartResultSchema: GenMessage; +export declare const StateAttachmentSchema: GenMessage; /** - * @generated from message camino.WatchStopRequest + * @generated from message camino.EndpointConstraint */ -export type WatchStopRequest = Message<"camino.WatchStopRequest"> & { +export type EndpointConstraint = Message<"camino.EndpointConstraint"> & { /** - * @generated from field: string watch_id = 1; + * @generated from oneof camino.EndpointConstraint.kind */ - watchId: string; + kind: { + /** + * @generated from field: string atom_id = 1; + */ + value: string; + case: "atomId"; + } | { + /** + * @generated from field: string interface_revision_id = 2; + */ + value: string; + case: "interfaceRevisionId"; + } | { + case: undefined; + value?: undefined; + }; }; /** - * Describes the message camino.WatchStopRequest. - * Use `create(WatchStopRequestSchema)` to create a new message. + * Describes the message camino.EndpointConstraint. + * Use `create(EndpointConstraintSchema)` to create a new message. */ -export declare const WatchStopRequestSchema: GenMessage; +export declare const EndpointConstraintSchema: GenMessage; /** - * @generated from message camino.WatchStopResult + * @generated from message camino.EdgeEndpoint */ -export type WatchStopResult = Message<"camino.WatchStopResult"> & {}; -/** - * Describes the message camino.WatchStopResult. - * Use `create(WatchStopResultSchema)` to create a new message. - */ -export declare const WatchStopResultSchema: GenMessage; -/** - * @generated from message camino.CrdtText - */ -export type CrdtText = Message<"camino.CrdtText"> & { +export type EdgeEndpoint = Message<"camino.EdgeEndpoint"> & { /** - * @generated from field: bytes payload = 1; + * @generated from field: string projection_id = 1; */ - payload: Uint8Array; -}; -/** - * Describes the message camino.CrdtText. - * Use `create(CrdtTextSchema)` to create a new message. - */ -export declare const CrdtTextSchema: GenMessage; -/** - * @generated from message camino.CrdtRichText - */ -export type CrdtRichText = Message<"camino.CrdtRichText"> & { + projectionId: string; /** - * @generated from field: bytes payload = 1; + * @generated from field: string display_name = 2; */ - payload: Uint8Array; -}; -/** - * Describes the message camino.CrdtRichText. - * Use `create(CrdtRichTextSchema)` to create a new message. - */ -export declare const CrdtRichTextSchema: GenMessage; -/** - * @generated from message camino.CrdtJson - */ -export type CrdtJson = Message<"camino.CrdtJson"> & { + displayName: string; /** - * @generated from field: bytes payload = 1; + * @generated from field: camino.EndpointConstraint constraint = 3; */ - payload: Uint8Array; -}; -/** - * Describes the message camino.CrdtJson. - * Use `create(CrdtJsonSchema)` to create a new message. - */ -export declare const CrdtJsonSchema: GenMessage; -/** - * @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[]; - /** - * @generated from field: repeated camino.InterfaceImplementationSchema implements = 10; - */ - implements: InterfaceImplementationSchema[]; - /** - * @generated from field: camino.ConstructorSpec constructor = 11; - */ - constructor$?: ConstructorSpec | undefined; -}; -/** - * Describes the message camino.ClassSchema. - * Use `create(ClassSchemaSchema)` to create a new message. - */ -export declare const ClassSchemaSchema: GenMessage; -/** - * @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; - /** - * @generated from field: camino.InterfaceFieldContract interface_contract = 9; - */ - interfaceContract?: InterfaceFieldContract | undefined; - /** - * @generated from field: bool is_display_label = 10; - */ - isDisplayLabel: boolean; -}; -/** - * Describes the message camino.FieldSchema. - * Use `create(FieldSchemaSchema)` to create a new message. - */ -export declare const FieldSchemaSchema: GenMessage; -/** - * @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 declare const FieldStorageSchema: GenMessage; -/** - * @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 declare const TypeRefSchema: GenMessage; -/** - * @generated from message camino.TypeBinding - */ -export type TypeBinding = Message<"camino.TypeBinding"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - /** - * @generated from field: camino.TypeRef type = 2; - */ - type?: TypeRef | undefined; -}; -/** - * Describes the message camino.TypeBinding. - * Use `create(TypeBindingSchema)` to create a new message. - */ -export declare const TypeBindingSchema: GenMessage; -/** - * @generated from message camino.InterfaceFieldContract - */ -export type InterfaceFieldContract = Message<"camino.InterfaceFieldContract"> & { - /** - * @generated from field: bool required = 1; - */ - required: boolean; - /** - * @generated from field: bool readable = 2; - */ - readable: boolean; - /** - * @generated from field: bool writable = 3; - */ - writable: boolean; - /** - * @generated from field: bool watchable = 4; - */ - watchable: boolean; - /** - * @generated from field: string type_param = 5; - */ - typeParam: string; - /** - * @generated from field: camino.TypeRef type = 6; - */ - type?: TypeRef | undefined; - /** - * @generated from field: string ref_target_type_param = 7; - */ - refTargetTypeParam: string; - /** - * @generated from field: camino.Cardinality edge_cardinality = 8; - */ - edgeCardinality: Cardinality; -}; -/** - * Describes the message camino.InterfaceFieldContract. - * Use `create(InterfaceFieldContractSchema)` to create a new message. - */ -export declare const InterfaceFieldContractSchema: GenMessage; -/** - * @generated from message camino.InterfaceImplementationSchema - */ -export type InterfaceImplementationSchema = Message<"camino.InterfaceImplementationSchema"> & { - /** - * @generated from field: camino.SymbolRef interface = 1; - */ - interface?: SymbolRef | undefined; - /** - * @generated from field: repeated camino.TypeBinding type_bindings = 2; - */ - typeBindings: TypeBinding[]; -}; -/** - * Describes the message camino.InterfaceImplementationSchema. - * Use `create(InterfaceImplementationSchemaSchema)` to create a new message. - */ -export declare const InterfaceImplementationSchemaSchema: GenMessage; -/** - * @generated from message camino.InterfaceSchema - */ -export type InterfaceSchema = Message<"camino.InterfaceSchema"> & { - /** - * @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: string source_file = 4; - */ - sourceFile: string; - /** - * @generated from field: string proto_message = 5; - */ - protoMessage: string; - /** - * @generated from field: repeated string type_parameters = 6; - */ - typeParameters: string[]; -}; -/** - * Describes the message camino.InterfaceSchema. - * Use `create(InterfaceSchemaSchema)` to create a new message. - */ -export declare const InterfaceSchemaSchema: GenMessage; -/** - * @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 declare const FieldOpsSchema: GenMessage; -/** - * @generated from message camino.EdgeSchema - */ -export type EdgeSchema = Message<"camino.EdgeSchema"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - /** - * Legacy/source-side projection fields. Prefer from_endpoint/to_endpoint. - * - * @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[]; - /** - * @generated from field: camino.EdgeEndpointSchema from_endpoint = 8; - */ - fromEndpoint?: EdgeEndpointSchema | undefined; - /** - * @generated from field: camino.EdgeEndpointSchema to_endpoint = 9; - */ - toEndpoint?: EdgeEndpointSchema | undefined; - /** - * @generated from field: camino.SymbolRef declaring_class = 10; - */ - declaringClass?: SymbolRef | undefined; - /** - * @generated from field: repeated camino.SymbolRef tags = 11; - */ - tags: SymbolRef[]; - /** - * @generated from field: repeated camino.SymbolRef implements = 12; - */ - implements: SymbolRef[]; - /** - * @generated from field: bool undirected = 13; - */ - undirected: boolean; -}; -/** - * Describes the message camino.EdgeSchema. - * Use `create(EdgeSchemaSchema)` to create a new message. - */ -export declare const EdgeSchemaSchema: GenMessage; -/** - * @generated from message camino.EdgeEndpointSchema - */ -export type EdgeEndpointSchema = Message<"camino.EdgeEndpointSchema"> & { - /** - * @generated from field: camino.SymbolRef class = 1; - */ - class?: SymbolRef | undefined; - /** - * @generated from field: camino.SymbolRef interface = 2; - */ - interface?: SymbolRef | undefined; - /** - * @generated from field: string projection = 3; - */ - projection: string; + constraint?: EndpointConstraint | undefined; /** * @generated from field: camino.Cardinality cardinality = 4; */ cardinality: Cardinality; /** - * @generated from field: bool indexed = 5; + * @generated from field: bool ordered = 5; */ - indexed: boolean; - /** - * @generated from field: camino.EdgeMaterialization materialize = 6; - */ - materialize?: EdgeMaterialization | undefined; + ordered: boolean; }; /** - * Describes the message camino.EdgeEndpointSchema. - * Use `create(EdgeEndpointSchemaSchema)` to create a new message. + * Describes the message camino.EdgeEndpoint. + * Use `create(EdgeEndpointSchema)` to create a new message. */ -export declare const EdgeEndpointSchemaSchema: GenMessage; +export declare const EdgeEndpointSchema: GenMessage; /** - * @generated from message camino.EdgeMaterialization + * @generated from message camino.EdgeAttachment */ -export type EdgeMaterialization = Message<"camino.EdgeMaterialization"> & { +export type EdgeAttachment = Message<"camino.EdgeAttachment"> & { /** - * @generated from field: camino.SymbolRef class = 1; + * @generated from field: string edge_type_id = 1; */ - class?: SymbolRef | undefined; + edgeTypeId: string; /** - * @generated from field: string connect_projection = 2; + * @generated from field: string display_name = 2; */ - connectProjection: string; + displayName: string; + /** + * @generated from field: camino.EdgeEndpoint first = 3; + */ + first?: EdgeEndpoint | undefined; + /** + * @generated from field: camino.EdgeEndpoint second = 4; + */ + second?: EdgeEndpoint | undefined; }; /** - * Describes the message camino.EdgeMaterialization. - * Use `create(EdgeMaterializationSchema)` to create a new message. + * Describes the message camino.EdgeAttachment. + * Use `create(EdgeAttachmentSchema)` to create a new message. */ -export declare const EdgeMaterializationSchema: GenMessage; +export declare const EdgeAttachmentSchema: GenMessage; /** - * @generated from message camino.MethodSchema + * Camino consumes this persistence-only projection of a checked workspace. + * Interfaces, operation bindings, packages, and constructors stay in orch. + * + * @generated from message camino.PersistencePlan */ -export type MethodSchema = Message<"camino.MethodSchema"> & { +export type PersistencePlan = Message<"camino.PersistencePlan"> & { /** - * @generated from field: string name = 1; + * @generated from field: string workspace_id = 1; */ - name: string; + workspaceId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: string workspace_revision_id = 2; */ - function?: FunctionRef | undefined; + workspaceRevisionId: string; + /** + * @generated from field: repeated camino.AtomDefinition atoms = 3; + */ + atoms: AtomDefinition[]; + /** + * @generated from field: repeated camino.AtomConformance conformances = 4; + */ + conformances: AtomConformance[]; + /** + * @generated from field: repeated camino.StateAttachment states = 5; + */ + states: StateAttachment[]; + /** + * @generated from field: repeated camino.EdgeAttachment edges = 6; + */ + edges: EdgeAttachment[]; }; /** - * Describes the message camino.MethodSchema. - * Use `create(MethodSchemaSchema)` to create a new message. + * Describes the message camino.PersistencePlan. + * Use `create(PersistencePlanSchema)` to create a new message. */ -export declare const MethodSchemaSchema: GenMessage; -/** - * @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 declare const MigrationSpecSchema: GenMessage; -/** - * @generated from message camino.ConstructorSpec - */ -export type ConstructorSpec = Message<"camino.ConstructorSpec"> & { - /** - * @generated from field: quixos.FunctionRef function = 1; - */ - function?: FunctionRef | undefined; -}; -/** - * Describes the message camino.ConstructorSpec. - * Use `create(ConstructorSpecSchema)` to create a new message. - */ -export declare const ConstructorSpecSchema: GenMessage; -/** - * @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 declare const OperationSchemaSchema: GenMessage; -/** - * @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 declare const OperationServiceSchemaSchema: GenMessage; -/** - * @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 declare const DocRefDeclarationSchema: GenMessage; -/** - * @generated from enum camino.ConflictStrategy - */ -export declare 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 declare const ConflictStrategySchema: GenEnum; +export declare const PersistencePlanSchema: GenMessage; /** * @generated from enum camino.Cardinality */ @@ -699,89 +219,10 @@ export declare enum Cardinality { /** * @generated from enum value: MANY_UNIQUE = 4; */ - MANY_UNIQUE = 4, - /** - * @generated from enum value: MANY_ORDERED = 5; - */ - MANY_ORDERED = 5, - /** - * @generated from enum value: MANY_UNIQUE_ORDERED = 6; - */ - MANY_UNIQUE_ORDERED = 6 + MANY_UNIQUE = 4 } /** * Describes the enum camino.Cardinality. */ export declare const CardinalitySchema: GenEnum; -/** - * @generated from enum camino.DocRefStrength - */ -export declare 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 declare const DocRefStrengthSchema: GenEnum; -/** - * @generated from enum camino.FieldStorageKind - */ -export declare 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, - /** - * @generated from enum value: STATIC_FINAL = 5; - */ - STATIC_FINAL = 5 -} -/** - * Describes the enum camino.FieldStorageKind. - */ -export declare const FieldStorageKindSchema: GenEnum; -/** - * @generated from enum camino.FieldImplementation - */ -export declare 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 declare const FieldImplementationSchema: GenEnum; //# sourceMappingURL=schema_pb.d.ts.map \ No newline at end of file diff --git a/dist/camino/schema_pb.d.ts.map b/dist/camino/schema_pb.d.ts.map index 91d3da5..1cba90b 100644 --- a/dist/camino/schema_pb.d.ts.map +++ b/dist/camino/schema_pb.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"schema_pb.d.ts","sourceRoot":"","sources":["../../src/camino/schema_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,OACwiK,CAAC;AAE1kK;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC,GAAG;IACpD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,SAAS,CACd,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG;IACxC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG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AED;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,OAAO,CAAC,mBAAmB,CAClC,CAAC"} \ No newline at end of file +{"version":3,"file":"schema_pb.d.ts","sourceRoot":"","sources":["../../src/camino/schema_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEjF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,OACq3C,CAAC;AAEv5C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC,GAAG;IAC9D;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,cAAc,CACxB,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG;IAChE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAAe,CAC1B,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG;IAChE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eA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oB,EAAE,UAAU,CAAC,cAAc,CACxB,CAAC;AAErC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,wBAAwB,CAAC,GAAG;IAChE;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IAExB;;OAEG;IACH,YAAY,EAAE,eAAe,EAAE,CAAC;IAEhC;;OAEG;IACH,MAAM,EAAE,eAAe,EAAE,CAAC;IAE1B;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAAe,CAC1B,CAAC;AAErC;;GAEG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,uBAAuB,IAAI;IAE3B;;OAEG;IACH,YAAY,IAAI;IAEhB;;OAEG;IACH,WAAW,IAAI;IAEf;;OAEG;IACH,IAAI,IAAI;IAER;;OAEG;IACH,WAAW,IAAI;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAClB,CAAC"} \ No newline at end of file diff --git a/dist/camino/schema_pb.js b/dist/camino/schema_pb.js index 1f4e173..1086ba3 100644 --- a/dist/camino/schema_pb.js +++ b/dist/camino/schema_pb.js @@ -2,172 +2,45 @@ // @generated from file camino/schema.proto (package camino, syntax proto3) /* eslint-disable */ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; -import { file_quixos_refs } from "../quixos/refs_pb.js"; /** * Describes the file camino/schema.proto. */ -export const file_camino_schema = /*@__PURE__*/ fileDesc("ChNjYW1pbm8vc2NoZW1hLnByb3RvEgZjYW1pbm8iSwoJU3ltYm9sUmVmEhEKCW5hbWVzcGFjZRgBIAEoCRIMCgRuYW1lGAIgASgJEg8KB3ZlcnNpb24YAyABKAkSDAoEaGFzaBg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U5ZEAMSDwoLTUFOWV9VTklRVUUQBGIGcHJvdG8z"); /** - * Describes the message camino.SymbolRef. - * Use `create(SymbolRefSchema)` to create a new message. + * Describes the message camino.AtomDefinition. + * Use `create(AtomDefinitionSchema)` to create a new message. */ -export const SymbolRefSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 0); +export const AtomDefinitionSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 0); /** - * Describes the message camino.Ref. - * Use `create(RefSchema)` to create a new message. + * Describes the message camino.AtomConformance. + * Use `create(AtomConformanceSchema)` to create a new message. */ -export const RefSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 1); +export const AtomConformanceSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 1); /** - * Describes the message camino.CustomField. - * Use `create(CustomFieldSchema)` to create a new message. + * Describes the message camino.StateAttachment. + * Use `create(StateAttachmentSchema)` to create a new message. */ -export const CustomFieldSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 2); +export const StateAttachmentSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 2); /** - * Describes the message camino.WatchStartResult. - * Use `create(WatchStartResultSchema)` to create a new message. + * Describes the message camino.EndpointConstraint. + * Use `create(EndpointConstraintSchema)` to create a new message. */ -export const WatchStartResultSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 3); +export const EndpointConstraintSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 3); /** - * Describes the message camino.WatchStopRequest. - * Use `create(WatchStopRequestSchema)` to create a new message. + * Describes the message camino.EdgeEndpoint. + * Use `create(EdgeEndpointSchema)` to create a new message. */ -export const WatchStopRequestSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 4); +export const EdgeEndpointSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 4); /** - * Describes the message camino.WatchStopResult. - * Use `create(WatchStopResultSchema)` to create a new message. + * Describes the message camino.EdgeAttachment. + * Use `create(EdgeAttachmentSchema)` to create a new message. */ -export const WatchStopResultSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 5); +export const EdgeAttachmentSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 5); /** - * Describes the message camino.CrdtText. - * Use `create(CrdtTextSchema)` to create a new message. + * Describes the message camino.PersistencePlan. + * Use `create(PersistencePlanSchema)` to create a new message. */ -export const CrdtTextSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 6); -/** - * Describes the message camino.CrdtRichText. - * Use `create(CrdtRichTextSchema)` to create a new message. - */ -export const CrdtRichTextSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 7); -/** - * Describes the message camino.CrdtJson. - * Use `create(CrdtJsonSchema)` to create a new message. - */ -export const CrdtJsonSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 8); -/** - * Describes the message camino.ClassSchema. - * Use `create(ClassSchemaSchema)` to create a new message. - */ -export const ClassSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 9); -/** - * Describes the message camino.FieldSchema. - * Use `create(FieldSchemaSchema)` to create a new message. - */ -export const FieldSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 10); -/** - * Describes the message camino.FieldStorage. - * Use `create(FieldStorageSchema)` to create a new message. - */ -export const FieldStorageSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 11); -/** - * Describes the message camino.TypeRef. - * Use `create(TypeRefSchema)` to create a new message. - */ -export const TypeRefSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 12); -/** - * Describes the message camino.TypeBinding. - * Use `create(TypeBindingSchema)` to create a new message. - */ -export const TypeBindingSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 13); -/** - * Describes the message camino.InterfaceFieldContract. - * Use `create(InterfaceFieldContractSchema)` to create a new message. - */ -export const InterfaceFieldContractSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 14); -/** - * Describes the message camino.InterfaceImplementationSchema. - * Use `create(InterfaceImplementationSchemaSchema)` to create a new message. - */ -export const InterfaceImplementationSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 15); -/** - * Describes the message camino.InterfaceSchema. - * Use `create(InterfaceSchemaSchema)` to create a new message. - */ -export const InterfaceSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 16); -/** - * Describes the message camino.FieldOps. - * Use `create(FieldOpsSchema)` to create a new message. - */ -export const FieldOpsSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 17); -/** - * Describes the message camino.EdgeSchema. - * Use `create(EdgeSchemaSchema)` to create a new message. - */ -export const EdgeSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 18); -/** - * Describes the message camino.EdgeEndpointSchema. - * Use `create(EdgeEndpointSchemaSchema)` to create a new message. - */ -export const EdgeEndpointSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 19); -/** - * Describes the message camino.EdgeMaterialization. - * Use `create(EdgeMaterializationSchema)` to create a new message. - */ -export const EdgeMaterializationSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 20); -/** - * Describes the message camino.MethodSchema. - * Use `create(MethodSchemaSchema)` to create a new message. - */ -export const MethodSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 21); -/** - * Describes the message camino.MigrationSpec. - * Use `create(MigrationSpecSchema)` to create a new message. - */ -export const MigrationSpecSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 22); -/** - * Describes the message camino.ConstructorSpec. - * Use `create(ConstructorSpecSchema)` to create a new message. - */ -export const ConstructorSpecSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 23); -/** - * Describes the message camino.OperationSchema. - * Use `create(OperationSchemaSchema)` to create a new message. - */ -export const OperationSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 24); -/** - * Describes the message camino.OperationServiceSchema. - * Use `create(OperationServiceSchemaSchema)` to create a new message. - */ -export const OperationServiceSchemaSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 25); -/** - * Describes the message camino.DocRefDeclaration. - * Use `create(DocRefDeclarationSchema)` to create a new message. - */ -export const DocRefDeclarationSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 26); -/** - * @generated from enum camino.ConflictStrategy - */ -export var ConflictStrategy; -(function (ConflictStrategy) { - /** - * @generated from enum value: CONFLICT_STRATEGY_UNSPECIFIED = 0; - */ - ConflictStrategy[ConflictStrategy["CONFLICT_STRATEGY_UNSPECIFIED"] = 0] = "CONFLICT_STRATEGY_UNSPECIFIED"; - /** - * @generated from enum value: REPLACE = 1; - */ - ConflictStrategy[ConflictStrategy["REPLACE"] = 1] = "REPLACE"; - /** - * @generated from enum value: PRESERVE_CONFLICTS = 2; - */ - ConflictStrategy[ConflictStrategy["PRESERVE_CONFLICTS"] = 2] = "PRESERVE_CONFLICTS"; - /** - * @generated from enum value: CRDT = 3; - */ - ConflictStrategy[ConflictStrategy["CRDT"] = 3] = "CRDT"; -})(ConflictStrategy || (ConflictStrategy = {})); -/** - * Describes the enum camino.ConflictStrategy. - */ -export const ConflictStrategySchema = /*@__PURE__*/ enumDesc(file_camino_schema, 0); +export const PersistencePlanSchema = /*@__PURE__*/ messageDesc(file_camino_schema, 6); /** * @generated from enum camino.Cardinality */ @@ -193,90 +66,8 @@ export var Cardinality; * @generated from enum value: MANY_UNIQUE = 4; */ Cardinality[Cardinality["MANY_UNIQUE"] = 4] = "MANY_UNIQUE"; - /** - * @generated from enum value: MANY_ORDERED = 5; - */ - Cardinality[Cardinality["MANY_ORDERED"] = 5] = "MANY_ORDERED"; - /** - * @generated from enum value: MANY_UNIQUE_ORDERED = 6; - */ - Cardinality[Cardinality["MANY_UNIQUE_ORDERED"] = 6] = "MANY_UNIQUE_ORDERED"; })(Cardinality || (Cardinality = {})); /** * Describes the enum camino.Cardinality. */ -export const CardinalitySchema = /*@__PURE__*/ enumDesc(file_camino_schema, 1); -/** - * @generated from enum camino.DocRefStrength - */ -export var DocRefStrength; -(function (DocRefStrength) { - /** - * @generated from enum value: DOC_REF_STRENGTH_UNSPECIFIED = 0; - */ - DocRefStrength[DocRefStrength["DOC_REF_STRENGTH_UNSPECIFIED"] = 0] = "DOC_REF_STRENGTH_UNSPECIFIED"; - /** - * @generated from enum value: SOFT_REF = 1; - */ - DocRefStrength[DocRefStrength["SOFT_REF"] = 1] = "SOFT_REF"; - /** - * @generated from enum value: PROJECTED_EDGE = 2; - */ - DocRefStrength[DocRefStrength["PROJECTED_EDGE"] = 2] = "PROJECTED_EDGE"; -})(DocRefStrength || (DocRefStrength = {})); -/** - * Describes the enum camino.DocRefStrength. - */ -export const DocRefStrengthSchema = /*@__PURE__*/ enumDesc(file_camino_schema, 2); -/** - * @generated from enum camino.FieldStorageKind - */ -export var FieldStorageKind; -(function (FieldStorageKind) { - /** - * @generated from enum value: FIELD_STORAGE_KIND_UNSPECIFIED = 0; - */ - FieldStorageKind[FieldStorageKind["FIELD_STORAGE_KIND_UNSPECIFIED"] = 0] = "FIELD_STORAGE_KIND_UNSPECIFIED"; - /** - * @generated from enum value: STORED = 1; - */ - FieldStorageKind[FieldStorageKind["STORED"] = 1] = "STORED"; - /** - * @generated from enum value: DERIVED = 2; - */ - FieldStorageKind[FieldStorageKind["DERIVED"] = 2] = "DERIVED"; - /** - * @generated from enum value: LAZY = 3; - */ - FieldStorageKind[FieldStorageKind["LAZY"] = 3] = "LAZY"; - /** - * @generated from enum value: EXTERNAL = 4; - */ - FieldStorageKind[FieldStorageKind["EXTERNAL"] = 4] = "EXTERNAL"; - /** - * @generated from enum value: STATIC_FINAL = 5; - */ - FieldStorageKind[FieldStorageKind["STATIC_FINAL"] = 5] = "STATIC_FINAL"; -})(FieldStorageKind || (FieldStorageKind = {})); -/** - * Describes the enum camino.FieldStorageKind. - */ -export const FieldStorageKindSchema = /*@__PURE__*/ enumDesc(file_camino_schema, 3); -/** - * @generated from enum camino.FieldImplementation - */ -export var FieldImplementation; -(function (FieldImplementation) { - /** - * @generated from enum value: FIELD_IMPLEMENTATION_UNSPECIFIED = 0; - */ - FieldImplementation[FieldImplementation["FIELD_IMPLEMENTATION_UNSPECIFIED"] = 0] = "FIELD_IMPLEMENTATION_UNSPECIFIED"; - /** - * @generated from enum value: SERVICE = 1; - */ - FieldImplementation[FieldImplementation["SERVICE"] = 1] = "SERVICE"; -})(FieldImplementation || (FieldImplementation = {})); -/** - * Describes the enum camino.FieldImplementation. - */ -export const FieldImplementationSchema = /*@__PURE__*/ enumDesc(file_camino_schema, 4); +export const CardinalitySchema = /*@__PURE__*/ enumDesc(file_camino_schema, 0); diff --git a/dist/codegen-ts-runtime.d.ts b/dist/codegen-ts-runtime.d.ts deleted file mode 100644 index 03518c9..0000000 --- a/dist/codegen-ts-runtime.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -export {}; -//# sourceMappingURL=codegen-ts-runtime.d.ts.map \ No newline at end of file diff --git a/dist/codegen-ts-runtime.d.ts.map b/dist/codegen-ts-runtime.d.ts.map deleted file mode 100644 index ff5fd19..0000000 --- a/dist/codegen-ts-runtime.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"codegen-ts-runtime.d.ts","sourceRoot":"","sources":["../src/codegen-ts-runtime.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/codegen-ts-runtime.js b/dist/codegen-ts-runtime.js deleted file mode 100755 index d5857bf..0000000 --- a/dist/codegen-ts-runtime.js +++ /dev/null @@ -1,527 +0,0 @@ -#!/usr/bin/env node -import fs from "node:fs"; -import path from "node:path"; -import protobuf from "protobufjs"; -import { compileCaminoSchema, loadCaminoSchemaRoot, } from "./schema-compiler.js"; -const usage = () => { - console.error("Usage: camino-codegen-ts-runtime [--react-only] [implementation-import]"); - process.exit(1); -}; -const required = (value) => value ?? usage(); -const stringLiteral = (value) => JSON.stringify(value); -const upperFirst = (value) => value.length === 0 ? value : `${value[0]?.toUpperCase()}${value.slice(1)}`; -const lowerFirst = (value) => value.length === 0 ? value : `${value[0]?.toLowerCase()}${value.slice(1)}`; -const camel = (value) => value - .split(/[^a-zA-Z0-9]+/) - .filter(Boolean) - .map((part, index) => index === 0 ? lowerFirst(part) : upperFirst(lowerFirst(part))) - .join(""); -const isIdentifier = (value) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value); -const classId = (schema) => `${schema.id.namespace}:${schema.id.name}:${schema.id.version}:${schema.id.hash ?? ""}`; -const symbolId = (value) => `${value.namespace}:${value.name}:${value.version}:${value.hash ?? ""}`; -const normalizedProtoType = (value) => value.replace(/^\./, ""); -const declarationName = (value) => value.name; -const tsTypeForTypeRef = (type, root) => { - if (type.enumValues && type.enumValues.length > 0) { - return type.enumValues.map(stringLiteral).join(" | "); - } - if (type.symbol) { - return `ObjectRef<${stringLiteral(symbolId(type.symbol))}>`; - } - const protoType = normalizedProtoType(type.protoType); - switch (protoType) { - case "string": - case "google.protobuf.StringValue": - return "string"; - case "bool": - case "google.protobuf.BoolValue": - return "boolean"; - case "double": - case "float": - case "google.protobuf.DoubleValue": - case "google.protobuf.FloatValue": - case "int32": - case "sint32": - case "sfixed32": - case "uint32": - case "fixed32": - case "int64": - case "sint64": - case "sfixed64": - case "uint64": - case "fixed64": - case "google.protobuf.Int32Value": - case "google.protobuf.UInt32Value": - case "google.protobuf.Int64Value": - case "google.protobuf.UInt64Value": - return "number"; - case "bytes": - case "google.protobuf.BytesValue": - return "Uint8Array"; - default: - if (protoType === "google.protobuf.Empty") { - return "Record"; - } - try { - const reflected = root?.lookup(protoType); - if (reflected instanceof protobuf.Type || reflected instanceof protobuf.Enum) { - return declarationName(reflected); - } - } - catch { - // Unknown imported message types remain opaque at this codegen boundary. - } - return "unknown"; - } -}; -const tsTypeForField = (field, root) => tsTypeForTypeRef(field.type, root); -const tsValueTypeForField = (field, root) => field.repeated ? `${tsTypeForField(field, root)}[]` : tsTypeForField(field, root); -const tsFieldApiType = (field, root) => field.conflict === "crdt" - ? `CrdtField<${tsValueTypeForField(field, root)}>` - : `Field<${tsValueTypeForField(field, root)}>`; -const functionExportName = (fn, fallback) => { - if (isIdentifier(fn.symbol)) { - return fn.symbol; - } - const fallbackName = camel(fallback); - if (isIdentifier(fallbackName)) { - return fallbackName; - } - throw new Error(`Cannot generate TS export name for function ${fn.symbol}`); -}; -const generatedWarning = `// @generated by camino-codegen-ts-runtime. Do not edit.\n`; -const scalarTsType = (field, root) => { - const primitive = tsTypeForTypeRef({ protoType: field.type }, root); - if (primitive !== "unknown") { - return primitive; - } - const resolved = field.resolvedType; - if (resolved instanceof protobuf.Type || resolved instanceof protobuf.Enum) { - return declarationName(resolved); - } - return "unknown"; -}; -const collectProtoDeclarations = (root, types) => { - const declarations = new Map(); - const visit = (value) => { - const key = value.fullName; - if (declarations.has(key)) { - return; - } - declarations.set(key, value); - if (value instanceof protobuf.Type) { - for (const field of value.fieldsArray) { - if (field.resolvedType instanceof protobuf.Type || - field.resolvedType instanceof protobuf.Enum) { - visit(field.resolvedType); - } - } - } - }; - for (const type of types) { - if (type.symbol || !type.protoType) { - continue; - } - try { - const reflected = root.lookup(normalizedProtoType(type.protoType)); - if (reflected instanceof protobuf.Type || reflected instanceof protobuf.Enum) { - visit(reflected); - } - } - catch { - // Opaque imported types are represented as unknown by the generated API. - } - } - return [...declarations.values()] - .map((value) => { - if (value instanceof protobuf.Enum) { - return `export type ${declarationName(value)} = ${Object.keys(value.values) - .map(stringLiteral) - .join(" | ")};`; - } - const fields = value.fieldsArray.map((field) => { - const fieldType = scalarTsType(field, root); - const valueType = field.map - ? `Record` - : field.repeated - ? `${fieldType}[]` - : fieldType; - return ` ${JSON.stringify(field.name)}${field.optional ? "?" : ""}: ${valueType};`; - }); - return `export type ${declarationName(value)} = {\n${fields.join("\n")}\n};`; - }) - .join("\n\n"); -}; -const fieldTypeId = (field) => field.type.symbol ? symbolId(field.type.symbol) : field.type.protoType; -const crdtStorageTypeId = (field) => field.type.protoType || - (field.type.symbol - ? `${field.type.symbol.namespace}.${field.type.symbol.name}` - : fieldTypeId(field)); -const fieldStorageId = (field) => field.ops && field.storage.kind === "stored" ? "derived" : field.storage.kind; -const interfaceTypeName = (implementation) => `${implementation.interface.name}Ref`; -const renderInterfaceRefTypes = (schema) => schema.implements - .map((implementation) => { - const typeParams = implementation.typeBindings.map((binding) => binding.name); - const generic = typeParams.length > 0 ? `<${typeParams.join(", ")}>` : ""; - const bindings = typeParams.length > 0 - ? typeParams - .map((param) => ` readonly ${param}: ${param};`) - .join("\n") - : " readonly value: unknown;"; - return `export type ${interfaceTypeName(implementation)}${generic} = ObjectRef & { - readonly $caminoInterfaces: { - readonly ${stringLiteral(symbolId(implementation.interface))}: { -${bindings} - }; - }; -};`; -}) - .join("\n\n"); -const interfaceMixins = (schema, root) => schema.implements.map((implementation) => { - const typeArgs = implementation.typeBindings.map((binding) => tsTypeForTypeRef(binding.type, root)); - return `${interfaceTypeName(implementation)}${typeArgs.length > 0 ? `<${typeArgs.join(", ")}>` : ""}`; -}); -const operationFunctionSpecs = (schema) => schema.fields.flatMap((field) => { - const serviceName = field.ops?.service.replace(/^\./, ""); - if (!serviceName) { - return []; - } - const service = schema.operationServices.find((candidate) => candidate.fullName === serviceName); - if (!service) { - throw new Error(`${schema.id.name}.${field.name} points to missing operation service ${field.ops?.service}`); - } - return service.operations.map((operation) => ({ - exportName: functionExportName(operation.function, `${field.name}_${operation.name}`), - symbol: operation.function.symbol, - ...(operation.function.operation - ? { operation: operation.function.operation } - : {}), - packageNamespace: operation.function.packageNamespace, - packageName: operation.function.packageName, - field: { - name: field.name, - type: fieldTypeId(field), - storage: fieldStorageId(field), - conflict: field.conflict, - }, - })); -}); -const renderRuntime = (schema, root) => { - const className = schema.id.name; - const objectTypeName = `${className}Object`; - const refTypeName = `${className}Ref`; - const contextTypeName = `${className}Context`; - const implementationTypeName = `${className}Implementation`; - const serveName = `serve${className}Runtime`; - const createObjectName = `create${className}Object`; - const interfaceRefTypes = renderInterfaceRefTypes(schema); - const refType = [`ObjectRef<${stringLiteral(classId(schema))}>`, ...interfaceMixins(schema, root)] - .join(" & "); - const edgeFields = new Set(schema.edges.map((edge) => edge.sourceField)); - const writableFields = schema.fields.filter((field) => field.storage.kind === "stored" && - !field.ops && - !edgeFields.has(field.name)); - const functionSpecs = [ - ...(schema.constructorSpec - ? [ - { - exportName: functionExportName(schema.constructorSpec.function, "constructor"), - symbol: schema.constructorSpec.function.symbol, - ...(schema.constructorSpec.function.operation - ? { operation: schema.constructorSpec.function.operation } - : {}), - packageNamespace: schema.constructorSpec.function.packageNamespace, - packageName: schema.constructorSpec.function.packageName, - }, - ] - : []), - ...schema.methods.map((method) => ({ - exportName: functionExportName(method.function, method.name), - symbol: method.function.symbol, - ...(method.function.operation ? { operation: method.function.operation } : {}), - packageNamespace: method.function.packageNamespace, - packageName: method.function.packageName, - })), - ...schema.fields.flatMap((field) => field.storage.resolver - ? [ - { - exportName: functionExportName(field.storage.resolver, field.name), - symbol: field.storage.resolver.symbol, - ...(field.storage.resolver.operation - ? { operation: field.storage.resolver.operation } - : {}), - packageNamespace: field.storage.resolver.packageNamespace, - packageName: field.storage.resolver.packageName, - }, - ] - : []), - ...operationFunctionSpecs(schema), - ]; - const firstFunction = functionSpecs[0]; - if (!firstFunction) { - throw new Error(`${schema.id.name} has no runtime functions to generate`); - } - const mixedPackage = functionSpecs.find((spec) => spec.packageNamespace !== firstFunction.packageNamespace || - spec.packageName !== firstFunction.packageName); - if (mixedPackage) { - throw new Error(`${schema.id.name} points to multiple packages; v0 TS runtime generation expects one package`); - } - return `${generatedWarning}import { - type CaminoClient, - createCrdtField, - createField, - type CrdtField, - type Field, - type FieldOperation, - type InvokeRequest, - objectRef, - type ObjectRef, - type RuntimeHandler, - serveQuixosPackageRuntime, -} from "@quixos/camino-package-runtime"; - -${collectProtoDeclarations(root, [ - ...writableFields.map((field) => field.type), - ...schema.implements.flatMap((entry) => entry.typeBindings.map((binding) => binding.type)), - ])} - -${interfaceRefTypes ? `${interfaceRefTypes}\n\n` : ""}export type ${refTypeName} = ${refType}; - -export type ${objectTypeName} = { - id: ${refTypeName}; -${writableFields - .map((field) => ` ${camel(field.name)}: ${tsFieldApiType(field, root)};`) - .join("\n")} -}; - -export type ${contextTypeName} = { - object: ${objectTypeName}; - camino: CaminoClient; - request: InvokeRequest; -}; - -export type ${implementationTypeName} = { -${functionSpecs - .map((spec) => spec.operation - ? ` ${spec.exportName}: FieldOperation<${contextTypeName}>;` - : ` ${spec.exportName}: RuntimeHandler<${contextTypeName}>;`) - .filter((line, index, lines) => lines.indexOf(line) === index) - .join("\n")} -}; - -const packageNamespace = ${stringLiteral(firstFunction.packageNamespace)}; -const packageName = ${stringLiteral(firstFunction.packageName)}; -const runtimeProtocolVersion = ${stringLiteral("camino-orch-v0")}; - -const functions = [ -${functionSpecs - .map((spec) => ` { exportName: ${stringLiteral(spec.exportName)}, symbol: ${stringLiteral(spec.symbol)}${spec.operation ? `, operation: ${stringLiteral(spec.operation)}` : ""}${spec.field - ? `, field: { name: ${stringLiteral(spec.field.name)}, type: ${stringLiteral(spec.field.type)}, storage: ${stringLiteral(spec.field.storage)}, conflict: ${stringLiteral(spec.field.conflict)} }` - : ""} },`) - .join("\n")} -] as const; - -export const ${createObjectName} = ( - camino: CaminoClient, - objectId: string, -): ${objectTypeName} => { - const id = objectRef<${stringLiteral(classId(schema))}>(objectId) as ${refTypeName}; - return { - id, -${writableFields - .map((fieldSchema) => fieldSchema.conflict === "crdt" - ? ` ${camel(fieldSchema.name)}: createCrdtField(camino, id, ${stringLiteral(fieldSchema.name)}, ${stringLiteral(crdtStorageTypeId(fieldSchema))}),` - : ` ${camel(fieldSchema.name)}: createField(camino, id, ${stringLiteral(fieldSchema.name)}),`) - .join("\n")} - }; -}; - -export const create${className}Context = ( - camino: CaminoClient, - request: InvokeRequest, -): ${contextTypeName} => ({ - object: ${createObjectName}(camino, request.objectId), - camino, - request, -}); - -export const ${serveName} = (implementation: ${implementationTypeName}) => { - serveQuixosPackageRuntime({ - packageNamespace, - packageName, - runtimeProtocolVersion, - functions, - implementation, - createContext: create${className}Context, - }); -}; -`; -}; -const implementationNamed = (schema, name) => schema.implements.find((entry) => entry.interface.namespace === "quixos.react" && - entry.interface.name === name); -const requiredBinding = (implementation, name) => { - const binding = implementation.typeBindings.find((entry) => entry.name === name); - if (!binding) { - throw new Error(`${implementation.interface.name} implementation is missing ${name}`); - } - return binding.type; -}; -const renderReactClient = (schema, root) => { - const react = implementationNamed(schema, "ReactComponent"); - const componentFor = implementationNamed(schema, "ReactComponentFor"); - if (!react || !componentFor) { - return undefined; - } - const renderProps = requiredBinding(react, "RenderProps"); - const action = requiredBinding(react, "Action"); - const object = requiredBinding(componentFor, "Object"); - if (!object.symbol) { - throw new Error(`${schema.id.name}.ReactComponentFor.Object must bind a class symbol`); - } - const edge = schema.edges.find((candidate) => candidate.sourceField === "for_object"); - if (!edge) { - throw new Error(`${schema.id.name} must declare its ReactComponentFor edge`); - } - const componentEndpoint = edge.fromEndpoint.projection === "for_object" - ? edge.fromEndpoint - : edge.toEndpoint.projection === "for_object" - ? edge.toEndpoint - : undefined; - const objectEndpoint = componentEndpoint === edge.fromEndpoint ? edge.toEndpoint : edge.fromEndpoint; - if (!componentEndpoint || !objectEndpoint.projection) { - throw new Error(`${schema.id.name}.for_object edge has no inverse projection`); - } - if (componentEndpoint.cardinality !== "exactly_one") { - throw new Error(`${schema.id.name}.for_object must have exactly_one cardinality`); - } - if (!objectEndpoint.materialization || - symbolId(objectEndpoint.materialization.class) !== symbolId(schema.id)) { - throw new Error(`${schema.id.name}.${objectEndpoint.projection} must materialize ${classId(schema)}`); - } - const className = schema.id.name; - const componentName = className.endsWith("ReactComponent") - ? `${className.slice(0, -"ReactComponent".length)}Component` - : className; - const propsTypeName = `${componentName}Props`; - const renderPropsType = tsTypeForTypeRef(renderProps, root); - const actionType = tsTypeForTypeRef(action, root); - const objectType = tsTypeForTypeRef(object, root); - const declarations = collectProtoDeclarations(root, [renderProps, action]); - return `${generatedWarning}import { - createReactComponentFor, - type ReactComponentHostProps, - type ObjectRef, -} from "@quixos/camino-react-runtime"; - -${declarations} - -export type ${propsTypeName} = { - forObject: ${objectType}; -} & ${renderPropsType} & ReactComponentHostProps<${actionType}>; - -export const ${componentName} = createReactComponentFor< - ${objectType}, - ${renderPropsType}, - ${actionType} ->({ - componentClassId: ${stringLiteral(classId(schema))}, - projection: ${stringLiteral(objectEndpoint.projection)}, -}); -`; -}; -const reactRuntimeDeclaration = `${generatedWarning}declare module "@quixos/camino-react-runtime" { - import type * as AutomergeNamespace from "@automerge/automerge"; - - export type ObjectRef = string & { - readonly $caminoClass: ClassId; - }; - - export type LiveFieldProp = { - value: T; - source: { - objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: string | number | bigint; - }; - }; - - export type ReactComponentHostProps = { - onAction?: (action: Action) => void; - fallback?: unknown; - className?: string; - style?: Record; - onError?: (error: Error) => void; - }; - - export type ReactComponentImplementationProps = { - camino: CaminoProps; - render: RenderProps; - dispatch: (action: Action) => void; - }; - - export const createReactComponentFor: < - ForObject extends ObjectRef, - RenderProps extends object, - Action, - >(config: { - componentClassId: string; - projection: string; - }) => (props: { - forObject: ForObject; - } & RenderProps & ReactComponentHostProps) => any; - - export const callObjectMethod: ( - object: ObjectRef, - methodName: string, - input?: Record, - ) => Promise; - - export const h: (...args: any[]) => any; - export const useLiveField: ( - field: LiveFieldProp, - ) => [T, (value: T) => void | Promise]; - export const Automerge: typeof AutomergeNamespace; -} -`; -const renderServer = (schema, implementationImport) => { - const className = schema.id.name; - return `${generatedWarning}import * as implementation from ${stringLiteral(implementationImport)}; -import { serve${className}Runtime } from "./${schema.id.namespace}.${className}.runtime.js"; - -serve${className}Runtime(implementation); -`; -}; -const main = async () => { - const reactOnly = process.argv[2] === "--react-only"; - const offset = reactOnly ? 1 : 0; - const sourceFile = required(process.argv[2 + offset]); - const outDir = required(process.argv[3 + offset]); - const implementationImport = process.argv[4 + offset] ?? "../task.impl.js"; - const compiled = await compileCaminoSchema(sourceFile); - const { root } = await loadCaminoSchemaRoot(sourceFile); - if (compiled.classes.length !== 1) { - throw new Error(`Expected exactly one Camino class in ${sourceFile}, found ${compiled.classes.length}`); - } - const schema = compiled.classes[0]; - if (!schema) { - throw new Error(`No Camino class found in ${sourceFile}`); - } - fs.mkdirSync(outDir, { recursive: true }); - const baseName = `${schema.id.namespace}.${schema.id.name}`; - const reactClient = renderReactClient(schema, root); - if (!reactOnly) { - fs.writeFileSync(path.join(outDir, `${baseName}.runtime.ts`), renderRuntime(schema, root)); - fs.writeFileSync(path.join(outDir, `${baseName}.server.ts`), renderServer(schema, implementationImport)); - } - if (reactClient) { - fs.writeFileSync(path.join(outDir, `${baseName}.react.ts`), reactClient); - fs.writeFileSync(path.join(outDir, "camino-react-runtime.d.ts"), reactRuntimeDeclaration); - } - else if (reactOnly) { - throw new Error(`${schema.id.name} does not implement ReactComponentFor`); - } -}; -await main(); diff --git a/dist/index.d.ts b/dist/index.d.ts index f2c6a7f..7b0421f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -1,110 +1,82 @@ -import { type Client } from "@connectrpc/connect"; -import { type CaminoAutomergeDoc } from "@quixos/camino-datatypes/crdt-automerge"; +import http from "node:http"; +import { type Client, type ConnectRouter } from "@connectrpc/connect"; import { CaminoService, type Value } from "./camino/api_pb.js"; -import { type InvokeRequest } from "./quixos/runtime_pb.js"; -declare const objectRefBrand: unique symbol; -export type ObjectRef = string & { - readonly [objectRefBrand]: ClassId; -}; +import { OrchestratorRuntime } from "./quixos/orch_pb.js"; export type CaminoClient = Client; -export type { InvokeRequest, Value }; -export type DerivedDependency = { - kind: "object"; +export type OrchClient = Client; +export type RuntimeDependency = { + kind: "state"; objectId: string; + attachmentId: string; } | { - kind: "field"; + kind: "edge"; objectId: string; - fieldName: string; -} | { - kind: "edges"; - objectId: string; - sourceField?: string; + attachmentId: string; + projectionId: string; }; -export declare const recordDerivedDependency: (dependency: DerivedDependency) => void; -export declare const getActiveDerivedDependencies: () => DerivedDependency[]; -export declare const runWithDerivedDependencyTracking: (fn: () => Promise | T) => Promise<{ - value: T; - dependencies: DerivedDependency[]; -}>; -export type Field = { - get(): Promise; +export declare const objectRef: (objectId: string) => { + $quixosRef: string; +}; +export declare const liveValue: (value: Value) => { + $quixosValue: Value; +}; +export declare const jsToProtoValue: (value: unknown) => Value; +export declare const protoValueToJs: (value: Value | undefined) => unknown; +export declare const protoFieldsToJs: (fields: Record) => { + [k: string]: unknown; +}; +export type StatePort = { + slotId: string; + get(): Promise; + live(): Promise>; set(value: T): Promise; }; -export type CrdtField = Field> & { - change(fn: (doc: { - value: T; - }) => void): Promise>; - replaceFromJson(value: T): Promise; +export type EdgePort = { + edgeTypeId: string; + projectionId: string; + resolve(): Promise; + connect(targetObjectId: string): Promise; }; -export type LiveFieldValue = { - $caminoValue: T; - $caminoSource: { - field: { - objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: number | string | bigint; - }; - }; +export type InterfacePort = { + interfaceRevisionId: string; + invoke(operationId: string, input?: Record): Promise; }; -export declare const liveFieldValue: (params: { - value: T; +export type ConstructorPort = { + atomId: string; + construct(input?: Record): Promise; +}; +export type RuntimePort = StatePort | EdgePort | InterfacePort | ConstructorPort; +export type RuntimeContext = { objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: number | string | bigint; -}) => LiveFieldValue; -export type RuntimeHandler = (context: Context) => Promise | unknown; -export type FieldOperation = { - get?: RuntimeHandler; - set?: RuntimeHandler; - watchStart?: RuntimeHandler; - watchStop?: RuntimeHandler; + input: Record; + inputProto: Record; + ports: ReadonlyMap; + state(portId: string): StatePort; + edge(portId: string): EdgePort; + interface(portId: string): InterfacePort; + constructor(portId: string): ConstructorPort; }; -export declare const fieldOps: (operation: FieldOperation) => FieldOperation; -export declare const derivedWithDeps: (operation: { - get: RuntimeHandler; -}) => FieldOperation; -export type RuntimeFunctionSpec = { - exportName: ExportName; - symbol: string; - operation?: string; - field?: { - name: string; - type?: string; - storage?: string; - conflict?: string; - }; +export declare const createRuntimeContext: (camino: CaminoClient, orch: OrchClient, request: RuntimeRequest) => RuntimeContext; +export type RuntimeHandler = (context: RuntimeContext) => unknown | Promise; +export type DerivedHandler = { + kind: "derived"; + get: RuntimeHandler; }; -type FieldCodec = { - fieldType?: string; - conflictStrategy?: string; -}; -export declare const jsToProtoValue: (value: unknown, codec?: FieldCodec) => Value; -export declare const protoValueToJs: (value: Value | undefined) => unknown; -export declare const jsObjectToProtoFields: (value: Record) => { - [k: string]: Value; -}; -export declare const protoFieldsToJs: (fields: Record | undefined) => Record; -export declare const canonicalFieldParams: (params: Record | undefined) => string; -export declare const fieldOperationKey: (params: { +export declare const derived: (get: RuntimeHandler) => DerivedHandler; +export declare const createPackageRuntimeRoutes: (config: { + packageRevisionId: string; + exports: Record; + caminoUrl?: string; + orchUrl?: string; +}) => (router: ConnectRouter) => ConnectRouter; +export declare const servePackageRuntime: (config: { + packageRevisionId: string; + exports: Record; +}) => http.Server; +type RuntimeRequest = { objectId: string; - fieldName: string; - input?: Record; -}) => string; -export declare const objectRef: (objectId: string) => ObjectRef; -export declare const createField: (camino: CaminoClient, objectId: string, fieldName: string, codec?: FieldCodec) => Field; -export declare const createCrdtField: (camino: CaminoClient, objectId: string, fieldName: string, fieldType: string) => CrdtField; -export declare const serveQuixosPackageRuntime: (params: { - packageNamespace: string; - packageName: string; - runtimeProtocolVersion: string; - functions: Spec; - implementation: { [Name in Spec[number]["exportName"]]: RuntimeHandler | FieldOperation; }; - createContext: (camino: CaminoClient, request: InvokeRequest) => Context; -}) => void; + input: Record; + dependencies: import("./quixos/refs_pb.js").InjectedDependency[]; +}; +export {}; //# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/dist/index.d.ts.map b/dist/index.d.ts.map index b456452..cb6a859 100644 --- a/dist/index.d.ts.map +++ b/dist/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,MAAM,EAGZ,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,yCAA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AC/B,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC;IACzC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAAC;CAC9C,CAAC;AAOF,eAAO,MAAM,oBAAoB,WACvB,YAAY,QACd,UAAU,WACP,cAAc,KACtB,cA2FF,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACrF,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,cAAc,CAAA;CAAE,CAAC;AACtE,eAAO,MAAM,OAAO,QAAS,cAAc,KAAG,cAA4C,CAAC;AAyB3F,eAAO,MAAM,0BAA0B,WAAY;IACjD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,cAsBiB,aAAa,kBA0I9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAY;IAC1C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAAC,CAAC;CAC1D,yEAaA,CAAC;AACF,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7B,YAAY,EAAE,OAAO,qBAAqB,EAAE,kBAAkB,EAAE,CAAC;CAClE,CAAC"} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 79e58ea..aae5071 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,735 +1,372 @@ import http from "node:http"; import { AsyncLocalStorage } from "node:async_hooks"; import { randomUUID } from "node:crypto"; -import { create } from "@bufbuild/protobuf"; -import { createClient, } from "@connectrpc/connect"; -import * as Automerge from "@automerge/automerge"; -import { createAutomergeFieldChanges, createAutomergeFieldValue, encodeAutomergeFieldWrite, loadAutomergeFieldDoc, } from "@quixos/camino-datatypes/crdt-automerge"; -import { connectNodeAdapter, createConnectTransport, } from "@connectrpc/connect-node"; -import { CaminoService, CrdtValueSchema, FieldValueSourceSchema, ListValueSchema, NullValueSchema, ObjectValueSchema, RefValueSchema, ValueSchema, ValueSourceSchema, } from "./camino/api_pb.js"; -import { DerivedDependencySchema, HandshakeResponseSchema, InvokeResponseSchema, PackageRuntime, WatchEventSchema, WatchRequestSchema, } from "./quixos/runtime_pb.js"; -import { FunctionRefSchema } from "./quixos/refs_pb.js"; -const dependencyKey = (dependency) => { - switch (dependency.kind) { - case "object": - return `object:${dependency.objectId}`; - case "field": - return `field:${dependency.objectId}:${dependency.fieldName}`; - case "edges": - return `edges:${dependency.objectId}:${dependency.sourceField ?? ""}`; - } -}; -const createDependencyTracker = () => { - const dependencies = new Map(); - return { - record(dependency) { - dependencies.set(dependencyKey(dependency), dependency); - }, - dependencies() { - return [...dependencies.values()]; - }, - }; -}; -const dependencyStorage = new AsyncLocalStorage(); -export const recordDerivedDependency = (dependency) => { - dependencyStorage.getStore()?.record(dependency); -}; -export const getActiveDerivedDependencies = () => dependencyStorage.getStore()?.dependencies() ?? []; -export const runWithDerivedDependencyTracking = async (fn) => { - const tracker = createDependencyTracker(); - const value = await dependencyStorage.run(tracker, fn); - return { - value, - dependencies: tracker.dependencies(), - }; -}; -const logDerivedDependencies = (dependencies) => { - if (process.env.QUIXOS_DERIVED_DEPS_LOG !== "1") { +import { create, equals } from "@bufbuild/protobuf"; +import { Code, ConnectError, createClient } from "@connectrpc/connect"; +import { connectNodeAdapter, createConnectTransport } from "@connectrpc/connect-node"; +import { CaminoService, CrdtValueSchema, ListValueSchema, NullValueSchema, ObjectValueSchema, RefValueSchema, ValueSchema, } from "./camino/api_pb.js"; +import { OrchestratorRuntime } from "./quixos/orch_pb.js"; +import { DerivedDependencySchema, HandshakeResponseSchema, InvokeResponseSchema, PackageRuntime, WatchEventSchema, } from "./quixos/runtime_pb.js"; +import { CapabilityRefSchema } from "./quixos/refs_pb.js"; +const dependencyKey = (dependency) => `${dependency.kind}:${dependency.objectId}:${dependency.attachmentId}:${dependency.kind === "edge" ? dependency.projectionId : ""}`; +const dependencyScope = new AsyncLocalStorage(); +const recordDependency = async (dependency) => { + const scope = dependencyScope.getStore(); + if (!scope) return; - } - process.stderr.write(`[derived-deps] ${JSON.stringify({ dependencies })}\n`); + const key = `${dependency.kind}:${dependency.objectId}:${dependency.attachmentId}:${dependency.kind === "edge" ? dependency.projectionId : ""}`; + scope.dependencies.set(key, dependency); + await scope.observe?.(dependency); }; -const logDerivedWatch = (event, detail) => { - if (process.env.QUIXOS_DERIVED_WATCH_LOG !== "1") { - return; - } - process.stderr.write(`[derived-watch] ${JSON.stringify({ event, ...detail })}\n`); -}; -const watchSinkStorage = new AsyncLocalStorage(); -const dependencyObjectIds = (dependencies) => new Set(dependencies.map((dependency) => dependency.objectId)); -const stopDerivedWatch = (watch) => { - if (watch.stopped) { - return; - } - watch.stopped = true; - for (const controller of watch.controllers.values()) { - controller.abort(); - } - watch.controllers.clear(); - logDerivedWatch("stopped", { watchId: watch.watchId }); -}; -export const liveFieldValue = (params) => ({ - $caminoValue: params.value, - $caminoSource: { - field: { - objectId: params.objectId, - fieldName: params.fieldName, - ...(params.fieldType ? { fieldType: params.fieldType } : {}), - ...(params.fieldStorage ? { fieldStorage: params.fieldStorage } : {}), - ...(params.conflictStrategy - ? { conflictStrategy: params.conflictStrategy } - : {}), - ...(params.revision !== undefined ? { revision: params.revision } : {}), - }, - }, -}); -export const fieldOps = (operation) => operation; -export const derivedWithDeps = (operation) => { - const watches = new Map(); - const rerun = async (watch) => { - if (watch.stopped) { - return; - } - if (watch.running) { - watch.pending = true; - return; - } - watch.running = true; - try { - do { - watch.pending = false; - const { value, dependencies } = await runWithDerivedDependencyTracking(() => watch.get(watch.context)); - watch.lastValue = value; - logDerivedDependencies(dependencies); - logDerivedWatch("evaluated", { - watchId: watch.watchId, - value, - dependencies, - }); - watch.sink?.publish({ - watchId: watch.watchId, - value, - dependencies, - initial: !watch.emitted, - }); - watch.emitted = true; - reconcileSubscriptions(watch, dependencies); - } while (watch.pending && !watch.stopped); - } - catch (error) { - const message = error instanceof Error ? error.message : String(error); - logDerivedWatch("error", { - watchId: watch.watchId, - error: message, - }); - watch.sink?.publish({ - watchId: watch.watchId, - dependencies: [], - error: message, - initial: !watch.emitted, - }); - watch.emitted = true; - } - finally { - watch.running = false; - } - }; - const scheduleRerun = (watch, reason) => { - if (watch.stopped) { - return; - } - logDerivedWatch("scheduled", { watchId: watch.watchId, reason }); - void rerun(watch); - }; - const startObjectWatch = (watch, objectId) => { - const controller = new AbortController(); - watch.controllers.set(objectId, controller); - logDerivedWatch("subscribed", { watchId: watch.watchId, objectId }); - void (async () => { - try { - for await (const event of watch.context.camino.watchObject({ - objectId, - includeSnapshot: false, - }, { signal: controller.signal })) { - if (controller.signal.aborted || watch.stopped) { - break; - } - scheduleRerun(watch, event.op?.id ? `op:${event.op.id}` : `object:${objectId}`); - } - } - catch (error) { - if (!controller.signal.aborted && !watch.stopped) { - logDerivedWatch("watch-error", { - watchId: watch.watchId, - objectId, - error: error instanceof Error ? error.message : String(error), - }); - } - } - finally { - if (watch.controllers.get(objectId) === controller) { - watch.controllers.delete(objectId); - logDerivedWatch("unsubscribed", { watchId: watch.watchId, objectId }); - } - } - })(); - }; - const reconcileSubscriptions = (watch, dependencies) => { - const objectIds = dependencyObjectIds(dependencies); - for (const [objectId, controller] of watch.controllers.entries()) { - if (!objectIds.has(objectId)) { - controller.abort(); - watch.controllers.delete(objectId); - logDerivedWatch("unsubscribed", { watchId: watch.watchId, objectId }); - } - } - for (const objectId of objectIds) { - if (!watch.controllers.has(objectId)) { - startObjectWatch(watch, objectId); - } - } - }; - return fieldOps({ - async get(context) { - const { value, dependencies } = await runWithDerivedDependencyTracking(() => operation.get(context)); - logDerivedDependencies(dependencies); - return value; - }, - async watchStart(context) { - const watchId = `watch:${randomUUID()}`; - const watch = { - watchId, - context: context, - get: operation.get, - sink: watchSinkStorage.getStore(), - controllers: new Map(), - running: false, - pending: false, - stopped: false, - emitted: false, - lastValue: undefined, - }; - watches.set(watchId, watch); - logDerivedWatch("started", { watchId }); - await rerun(watch); - return { - watch_id: watchId, - }; - }, - watchStop(context) { - const input = protoFieldsToJs(context.request.input); - const watchId = typeof input.watch_id === "string" - ? input.watch_id - : typeof input.watchId === "string" - ? input.watchId - : ""; - const watch = watches.get(watchId); - if (!watch) { - throw new Error(`Unknown derived watch: ${watchId}`); - } - stopDerivedWatch(watch); - watches.delete(watchId); - return {}; - }, - }); -}; -class AsyncEventQueue { - values = []; - waiters = []; - closed = false; - push(value) { - if (this.closed) { - return; - } - const waiter = this.waiters.shift(); - if (waiter) { - waiter({ value, done: false }); - return; - } - this.values.push(value); - } - close() { - if (this.closed) { - return; - } - this.closed = true; - for (const waiter of this.waiters.splice(0)) { - waiter({ value: undefined, done: true }); - } - } - async next() { - const value = this.values.shift(); - if (value !== undefined) { - return { value, done: false }; - } - if (this.closed) { - return { value: undefined, done: true }; - } - return await new Promise((resolve) => { - this.waiters.push(resolve); - }); - } - [Symbol.asyncIterator]() { - return this; - } -} -const isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value); const bytesToBase64 = (value) => Buffer.from(value).toString("base64"); const base64ToBytes = (value) => Buffer.from(value, "base64"); -const sourceToProto = (value) => { - if (!isRecord(value) || !isRecord(value.field)) { - return undefined; - } - const field = value.field; - if (typeof field.objectId !== "string" || - typeof field.fieldName !== "string") { - return undefined; - } - return create(ValueSourceSchema, { - field: create(FieldValueSourceSchema, { - objectId: field.objectId, - fieldName: field.fieldName, - fieldType: typeof field.fieldType === "string" ? field.fieldType : "", - fieldStorage: typeof field.fieldStorage === "string" ? field.fieldStorage : "", - conflictStrategy: typeof field.conflictStrategy === "string" ? field.conflictStrategy : "", - revision: typeof field.revision === "bigint" - ? field.revision - : typeof field.revision === "number" - ? BigInt(field.revision) - : typeof field.revision === "string" && /^\d+$/.test(field.revision) - ? BigInt(field.revision) - : 0n, - }), - }); -}; -const codecFromSource = (value) => { - if (!isRecord(value) || !isRecord(value.field)) { - return undefined; - } - const field = value.field; - return { - ...(typeof field.fieldType === "string" ? { fieldType: field.fieldType } : {}), - ...(typeof field.conflictStrategy === "string" - ? { conflictStrategy: field.conflictStrategy } - : {}), - }; -}; -const withSource = (value, source) => { - const sourceValue = sourceToProto(source); - return sourceValue ? create(ValueSchema, { ...value, source: sourceValue }) : value; -}; -export const jsToProtoValue = (value, codec) => { - if (codec?.conflictStrategy === "crdt" && codec.fieldType) { - return jsToProtoValue(encodeAutomergeFieldWrite(value, codec.fieldType)); - } +const isRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value); +const isWrappedValue = (value) => isRecord(value) && "$quixosValue" in value && + isRecord(value.$quixosValue) && value.$quixosValue.$typeName === "camino.Value"; +export const objectRef = (objectId) => ({ $quixosRef: objectId }); +export const liveValue = (value) => ({ $quixosValue: value }); +export const jsToProtoValue = (value) => { + if (isWrappedValue(value)) + return value.$quixosValue; if (value === null || value === undefined) { - return create(ValueSchema, { - kind: { - case: "nullValue", - value: create(NullValueSchema, {}), - }, - }); - } - if (typeof value === "boolean") { - return create(ValueSchema, { - kind: { case: "boolValue", value }, - }); - } - if (typeof value === "number") { - return create(ValueSchema, { - kind: { case: "numberValue", value }, - }); - } - if (typeof value === "bigint") { - return create(ValueSchema, { - kind: { case: "integerValue", value: value.toString() }, - }); - } - if (typeof value === "string") { - return create(ValueSchema, { - kind: { case: "stringValue", value }, - }); - } - if (value instanceof Uint8Array) { - return create(ValueSchema, { - kind: { case: "bytesValue", value }, - }); + return create(ValueSchema, { kind: { case: "nullValue", value: create(NullValueSchema, {}) } }); } + if (typeof value === "boolean") + return create(ValueSchema, { kind: { case: "boolValue", value } }); + if (typeof value === "number") + return create(ValueSchema, { kind: { case: "numberValue", value } }); + if (typeof value === "bigint") + return create(ValueSchema, { kind: { case: "integerValue", value: String(value) } }); + if (typeof value === "string") + return create(ValueSchema, { kind: { case: "stringValue", value } }); + if (value instanceof Uint8Array) + return create(ValueSchema, { kind: { case: "bytesValue", value } }); if (Array.isArray(value)) { return create(ValueSchema, { - kind: { - case: "listValue", - value: create(ListValueSchema, { - values: value.map((entry) => jsToProtoValue(entry)), - }), - }, + kind: { case: "listValue", value: create(ListValueSchema, { values: value.map(jsToProtoValue) }) }, }); } - if (isRecord(value)) { - if (Object.hasOwn(value, "$caminoValue") && isRecord(value.$caminoSource)) { - return withSource(jsToProtoValue(value.$caminoValue, codecFromSource(value.$caminoSource)), value.$caminoSource); - } - if (typeof value.$caminoRef === "string") { - return create(ValueSchema, { - kind: { - case: "refValue", - value: create(RefValueSchema, { - objectId: value.$caminoRef, - }), - }, - }); - } - if (typeof value.$caminoBytes === "string" && - Object.keys(value).every((key) => key === "$caminoBytes")) { - return create(ValueSchema, { - kind: { - case: "bytesValue", - value: base64ToBytes(value.$caminoBytes), - }, - }); - } - if (typeof value.$caminoCrdtType === "string" && - typeof value.$caminoCrdtPayload === "string") { - return create(ValueSchema, { - kind: { - case: "crdtValue", - value: create(CrdtValueSchema, { - type: value.$caminoCrdtType, - encoding: typeof value.$caminoCrdtEncoding === "string" - ? value.$caminoCrdtEncoding - : "base64", - payload: base64ToBytes(value.$caminoCrdtPayload), - }), - }, - }); - } + if (isRecord(value) && typeof value.$quixosRef === "string") { return create(ValueSchema, { - kind: { - case: "objectValue", - value: create(ObjectValueSchema, { - fields: jsObjectToProtoFields(value), - }), - }, + kind: { case: "refValue", value: create(RefValueSchema, { objectId: value.$quixosRef }) }, }); } - throw new Error(`Unsupported Camino RPC value: ${typeof value}`); + if (isRecord(value) && typeof value.$quixosCrdtType === "string" && + typeof value.$quixosCrdtPayload === "string") { + return create(ValueSchema, { + kind: { case: "crdtValue", value: create(CrdtValueSchema, { + type: value.$quixosCrdtType, + encoding: typeof value.$quixosCrdtEncoding === "string" ? value.$quixosCrdtEncoding : "base64", + payload: base64ToBytes(value.$quixosCrdtPayload), + }) }, + }); + } + if (!isRecord(value)) + throw new Error(`Unsupported runtime value ${typeof value}`); + return create(ValueSchema, { + kind: { case: "objectValue", value: create(ObjectValueSchema, { + fields: Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, jsToProtoValue(entry)])), + }) }, + }); }; export const protoValueToJs = (value) => { switch (value?.kind.case) { case "nullValue": - case undefined: - return null; + case undefined: return null; case "boolValue": case "numberValue": case "stringValue": - return value.kind.value; - case "integerValue": - return value.kind.value; - case "bytesValue": - return bytesToBase64(value.kind.value); - case "listValue": - return value.kind.value.values.map(protoValueToJs); - case "objectValue": - return protoFieldsToJs(value.kind.value.fields); - case "refValue": - return value.kind.value.objectId; - case "crdtValue": - return loadAutomergeFieldDoc({ - $caminoCrdtType: value.kind.value.type, - $caminoCrdtEncoding: value.kind.value.encoding === "base64" ? "base64" : "base64", - $caminoCrdtPayload: bytesToBase64(value.kind.value.payload), - }, value.kind.value.type); + case "integerValue": return value.kind.value; + case "bytesValue": return bytesToBase64(value.kind.value); + case "refValue": return value.kind.value.objectId; + case "listValue": return value.kind.value.values.map(protoValueToJs); + case "objectValue": return Object.fromEntries(Object.entries(value.kind.value.fields).map(([key, entry]) => [key, protoValueToJs(entry)])); + case "crdtValue": return { + $quixosCrdtType: value.kind.value.type, + $quixosCrdtEncoding: value.kind.value.encoding, + $quixosCrdtPayload: bytesToBase64(value.kind.value.payload), + }; } }; -export const jsObjectToProtoFields = (value) => Object.fromEntries(Object.entries(value) - .filter(([, fieldValue]) => fieldValue !== undefined) - .map(([key, fieldValue]) => [key, jsToProtoValue(fieldValue)])); -export const protoFieldsToJs = (fields) => Object.fromEntries(Object.entries(fields ?? {}).map(([key, value]) => [ - key, - protoValueToJs(value), -])); -const normalizeForCanonicalJson = (value) => { - if (Array.isArray(value)) { - return value.map(normalizeForCanonicalJson); - } - if (!value || typeof value !== "object") { - return value; - } - return Object.fromEntries(Object.entries(value) - .filter(([, entryValue]) => entryValue !== undefined) - .sort(([left], [right]) => left.localeCompare(right)) - .map(([key, entryValue]) => [key, normalizeForCanonicalJson(entryValue)])); -}; -export const canonicalFieldParams = (params) => JSON.stringify(normalizeForCanonicalJson(Object.fromEntries(Object.entries(params ?? {}).map(([key, value]) => [ - key, - protoValueToJs(value), -])))); -export const fieldOperationKey = (params) => [ - params.objectId, - params.fieldName, - Buffer.from(canonicalFieldParams(params.input)).toString("base64url"), -].join(":"); -const derivedDependencyToProto = (dependency) => create(DerivedDependencySchema, { - kind: dependency.kind, - objectId: dependency.objectId, - fieldName: dependency.kind === "field" ? dependency.fieldName : "", - sourceField: dependency.kind === "edges" ? dependency.sourceField ?? "" : "", -}); -const fieldSourceForSpec = (spec, objectId) => { - if (!spec.field) { - return undefined; - } - return { - field: { - objectId, - fieldName: spec.field.name, - ...(spec.field.type ? { fieldType: spec.field.type } : {}), - ...(spec.field.storage ? { fieldStorage: spec.field.storage } : {}), - ...(spec.field.conflict ? { conflictStrategy: spec.field.conflict } : {}), - }, - }; -}; -const wrapFieldResult = (spec, objectId, value) => { - const source = fieldSourceForSpec(spec, objectId); - return source ? { $caminoValue: value, $caminoSource: source } : value; -}; -const derivedEmissionToProtoForSpec = (spec, objectId, event) => create(WatchEventSchema, { - watchId: event.watchId, - value: jsToProtoValue(event.error ? null : wrapFieldResult(spec, objectId, event.value ?? null)), - dependencies: event.dependencies.map(derivedDependencyToProto), - error: event.error ?? "", - initial: event.initial, -}); -const watchIdFromResult = (value) => { - if (!isRecord(value)) { - return ""; - } - const watchId = value.watch_id ?? value.watchId; - return typeof watchId === "string" ? watchId : ""; -}; -export const objectRef = (objectId) => objectId; -export const createField = (camino, objectId, fieldName, codec) => ({ - async get() { - recordDerivedDependency({ kind: "field", objectId, fieldName }); - const response = await camino.getObject({ objectId }); - return protoValueToJs(response.object?.fields[fieldName]); - }, - async set(value) { - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue(value, codec), - }); - }, -}); -export const createCrdtField = (camino, objectId, fieldName, fieldType) => { - const field = createField(camino, objectId, fieldName, { - fieldType, - conflictStrategy: "crdt", - }); - return { - ...field, - async change(fn) { - const current = await field.get(); - if (!current) { - throw new Error(`Cannot change missing CRDT field ${fieldName}`); +export const protoFieldsToJs = (fields) => Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, protoValueToJs(value)])); +const targetForEdge = (edge, projectionId) => edge.firstProjectionId === projectionId ? edge.secondObjectId : edge.firstObjectId; +export const createRuntimeContext = (camino, orch, request) => { + const ports = new Map(); + for (const dependency of request.dependencies) { + switch (dependency.binding.case) { + case "stateSlotId": { + const slotId = dependency.binding.value; + const state = { + slotId, + async get() { + await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); + return protoValueToJs((await camino.readState({ objectId: request.objectId, slotId })).value); + }, + async live() { + await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); + const value = await camino.readState({ objectId: request.objectId, slotId }); + if (!value.value) + throw new Error(`State ${slotId} returned no value`); + return liveValue(value.value); + }, + async set(value) { + await camino.writeState({ objectId: request.objectId, slotId, value: jsToProtoValue(value) }); + }, + }; + ports.set(dependency.portId, state); + break; } - const next = Automerge.change(current, (doc) => { - fn(doc); - }); - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue(createAutomergeFieldChanges(current, next, fieldType)), - }); - return next; - }, - async replaceFromJson(value) { - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue(createAutomergeFieldValue(value, fieldType)), - }); - }, + case "edge": { + const { edgeTypeId, projectionId } = dependency.binding.value; + const edge = { + edgeTypeId, + projectionId, + async resolve() { + await recordDependency({ kind: "edge", objectId: request.objectId, attachmentId: edgeTypeId, projectionId }); + const result = await camino.resolveEdge({ objectId: request.objectId, edgeTypeId, projectionId }); + return result.edges.map((entry) => targetForEdge(entry, projectionId)); + }, + async connect(targetObjectId) { + await camino.connectEdge({ objectId: request.objectId, edgeTypeId, projectionId, targetObjectId }); + }, + }; + ports.set(dependency.portId, edge); + break; + } + case "receiverInterfaceRevisionId": { + const interfaceRevisionId = dependency.binding.value; + const capability = { + interfaceRevisionId, + async invoke(operationId, input = {}) { + const response = await orch.invokeCapability({ + capability: create(CapabilityRefSchema, { interfaceRevisionId, operationId }), + objectId: request.objectId, + input: Object.fromEntries(Object.entries(input).map(([key, value]) => [key, jsToProtoValue(value)])), + }); + if (!response.ok) + throw new Error(response.error || `Capability ${operationId} failed`); + return protoValueToJs(response.result); + }, + }; + ports.set(dependency.portId, capability); + break; + } + case "constructorAtomId": { + const atomId = dependency.binding.value; + const constructor = { + atomId, + async construct(input = {}) { + const response = await orch.constructObject({ + atomId, + input: Object.fromEntries(Object.entries(input).map(([key, value]) => [key, jsToProtoValue(value)])), + }); + if (!response.object) + throw new Error(`Constructor ${atomId} returned no object`); + return response.object.id; + }, + }; + ports.set(dependency.portId, constructor); + } + } + } + const requirePort = (portId, kind) => { + const port = ports.get(portId); + if (!port || !(kind in port)) + throw new Error(`Missing ${kind} dependency port ${portId}`); + return port; + }; + return { + objectId: request.objectId, + input: protoFieldsToJs(request.input), + inputProto: request.input, + ports, + state: (portId) => requirePort(portId, "slotId"), + edge: (portId) => requirePort(portId, "edgeTypeId"), + interface: (portId) => requirePort(portId, "interfaceRevisionId"), + constructor: (portId) => requirePort(portId, "atomId"), }; }; -const createDependencyTrackingCaminoClient = (camino) => new Proxy(camino, { - get(target, property, receiver) { - if (property === "getObject") { - return async (request, ...args) => { - if (request.objectId) { - recordDerivedDependency({ - kind: "object", - objectId: request.objectId, - }); - } - return await Reflect.get(target, property, receiver)(request, ...args); - }; - } - if (property === "listEdges") { - return async (request, ...args) => { - if (request.objectId) { - recordDerivedDependency({ - kind: "edges", - objectId: request.objectId, - ...(request.sourceField ? { sourceField: request.sourceField } : {}), - }); - } - return await Reflect.get(target, property, receiver)(request, ...args); - }; - } - return Reflect.get(target, property, receiver); - }, -}); -export const serveQuixosPackageRuntime = (params) => { - const host = process.env.QUIXOS_RUNTIME_HOST ?? "127.0.0.1"; - const port = Number(process.env.QUIXOS_RUNTIME_PORT ?? "0"); - const caminoUrl = process.env.CAMINO_URL ?? "http://127.0.0.1:7310"; - const runtimeToken = process.env.CAMINO_RUNTIME_AUTH_TOKEN ?? ""; - if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1" && !runtimeToken) { - throw new Error("CAMINO_RUNTIME_AUTH_REQUIRED=1 but CAMINO_RUNTIME_AUTH_TOKEN is missing"); +export const derived = (get) => ({ kind: "derived", get }); +const isDerived = (handler) => typeof handler === "object" && handler.kind === "derived"; +const evaluate = async (handler, context, observe) => { + const dependencies = new Map(); + const result = await dependencyScope.run({ dependencies, observe }, () => isDerived(handler) ? handler.get(context) : handler(context)); + return { value: jsToProtoValue(result), dependencies: [...dependencies.values()] }; +}; +const protoDependencies = (dependencies) => dependencies.map((entry) => create(DerivedDependencySchema, { + kind: entry.kind, + objectId: entry.objectId, + attachmentId: entry.attachmentId, + projectionId: entry.kind === "edge" ? entry.projectionId : "", +})); +export const createPackageRuntimeRoutes = (config) => { + const headers = {}; + if (process.env.CAMINO_RUNTIME_AUTH_TOKEN) { + headers["x-camino-runtime-token"] = process.env.CAMINO_RUNTIME_AUTH_TOKEN; + } + else if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1") { + throw new Error("CAMINO_RUNTIME_AUTH_TOKEN is required"); } - const runtimeTokenInterceptor = (next) => async (request) => { - if (runtimeToken) { - request.header.set("x-camino-runtime-token", runtimeToken); - } - return await next(request); - }; const camino = createClient(CaminoService, createConnectTransport({ - baseUrl: caminoUrl, + baseUrl: config.caminoUrl ?? process.env.CAMINO_URL ?? "http://127.0.0.1:7310", httpVersion: "1.1", - interceptors: runtimeToken ? [runtimeTokenInterceptor] : [], + interceptors: headers["x-camino-runtime-token"] ? [ + (next) => async (request) => { + request.header.set("x-camino-runtime-token", headers["x-camino-runtime-token"]); + return await next(request); + }, + ] : [], })); - const trackingCamino = createDependencyTrackingCaminoClient(camino); - if (!Number.isInteger(port) || port <= 0) { - throw new Error("QUIXOS_RUNTIME_PORT must be a positive integer"); - } - const functionRefs = params.functions.map((entry) => create(FunctionRefSchema, { - packageNamespace: params.packageNamespace, - packageName: params.packageName, - symbol: entry.symbol, - operation: entry.operation ?? "", + const orch = createClient(OrchestratorRuntime, createConnectTransport({ + baseUrl: config.orchUrl ?? process.env.QUIXOS_ORCH_URL ?? "http://127.0.0.1:7311", + httpVersion: "1.1", })); - const resolveRuntimeFunction = (fn) => { - const symbol = fn?.symbol ?? ""; - const spec = params.functions.find((entry) => entry.symbol === symbol && - (entry.operation ?? "") === (fn?.operation ?? "")); - if (!spec) { - throw new Error(`Unknown ${params.packageName} function: ${symbol}${fn?.operation ? `.${fn.operation}` : ""}`); - } - const implementationExport = params.implementation[spec.exportName]; - const runtimeFunction = spec.operation && typeof implementationExport === "object" - ? implementationExport[spec.operation] - : implementationExport; - if (!runtimeFunction) { - throw new Error(`Missing ${params.packageName} implementation export: ${spec.exportName}${spec.operation ? `.${spec.operation}` : ""}`); - } - if (typeof runtimeFunction !== "function") { - throw new Error(`${params.packageName} implementation export is not callable: ${spec.exportName}${spec.operation ? `.${spec.operation}` : ""}`); - } - return { spec, runtimeFunction }; - }; - const handler = connectNodeAdapter({ - routes: (router) => { - router.service(PackageRuntime, { - async handshake() { - return create(HandshakeResponseSchema, { - packageNamespace: params.packageNamespace, - packageName: params.packageName, - runtimeProtocolVersion: params.runtimeProtocolVersion, - functions: functionRefs, - }); - }, - async invoke(request) { + return (router) => router.service(PackageRuntime, { + handshake: () => create(HandshakeResponseSchema, { + packageRevisionId: config.packageRevisionId, + runtimeProtocolVersion: "quixos-capabilities-v1", + exportIds: Object.keys(config.exports), + }), + invoke: async (request) => { + const exportId = request.export?.exportId; + const handler = exportId ? config.exports[exportId] : undefined; + if (!handler) + throw new ConnectError(`Unknown export ${exportId ?? ""}`, Code.NotFound); + try { + const result = await evaluate(handler, createRuntimeContext(camino, orch, request)); + return create(InvokeResponseSchema, { ok: true, result: result.value }); + } + catch (error) { + return create(InvokeResponseSchema, { + ok: false, + error: error instanceof Error ? error.message : String(error), + }); + } + }, + watch: async function* (request, context) { + const exportId = request.export?.exportId; + const handler = exportId ? config.exports[exportId] : undefined; + if (!handler || !isDerived(handler)) { + throw new ConnectError(`Export ${exportId ?? ""} is not derived`, Code.FailedPrecondition); + } + const watchId = `watch:${randomUUID()}`; + const runtimeContext = createRuntimeContext(camino, orch, request); + const subscriptions = new Map(); + const establishing = new Map(); + const ensureSubscription = async (dependency) => { + const key = dependencyKey(dependency); + if (subscriptions.has(key)) + return; + const pending = establishing.get(key); + if (pending) + return await pending; + const establish = (async () => { + const controller = new AbortController(); + const stream = camino.watchObject({ objectId: dependency.objectId, includeSnapshot: true }, { signal: controller.signal })[Symbol.asyncIterator](); try { - const { spec, runtimeFunction } = resolveRuntimeFunction(request.function); - const value = await runtimeFunction(params.createContext(trackingCamino, request)); - return create(InvokeResponseSchema, { - ok: true, - result: jsToProtoValue(spec.operation === "get" - ? wrapFieldResult(spec, request.objectId, value) - : value), - }); - } - catch (error) { - return create(InvokeResponseSchema, { - ok: false, - result: jsToProtoValue(null), - error: error instanceof Error ? error.message : String(error), - }); - } - }, - async *watch(request, context) { - const queue = new AsyncEventQueue(); - let watchId = ""; - const closeQueue = () => queue.close(); - context.signal.addEventListener("abort", closeQueue, { once: true }); - try { - const { spec, runtimeFunction } = resolveRuntimeFunction(request.function); - if (spec.operation !== "watchStart") { - throw new Error(`PackageRuntime.watch requires a watchStart operation, got ${spec.symbol}${spec.operation ? `.${spec.operation}` : ""}`); - } - const sink = { - publish(event) { - queue.push(derivedEmissionToProtoForSpec(spec, request.objectId, event)); - }, + // Camino subscribes before producing the snapshot, so once this + // resolves the following state/edge read cannot race the stream. + const snapshot = await stream.next(); + if (snapshot.done) + throw new Error(`Dependency stream ${key} ended during setup`); + const waitNext = () => stream.next().then((result) => ({ key, done: Boolean(result.done) }), (error) => ({ key, done: true, error })); + const subscription = { + dependency, + controller, + waitNext, + next: Promise.resolve({ key, done: false }), }; - const result = await watchSinkStorage.run(sink, async () => runtimeFunction(params.createContext(trackingCamino, request))); - watchId = watchIdFromResult(result); - if (!watchId) { - throw new Error(`Watch start did not return a watch_id for ${spec.symbol}`); - } - for await (const event of queue) { - yield event; - } + subscription.next = waitNext(); + subscriptions.set(key, subscription); } catch (error) { + controller.abort(); + throw error; + } + })(); + establishing.set(key, establish); + try { + await establish; + } + finally { + establishing.delete(key); + } + }; + const abortAll = () => { + for (const subscription of subscriptions.values()) { + subscription.controller.abort(); + } + }; + context.signal.addEventListener("abort", abortAll, { once: true }); + let current = await evaluate(handler, runtimeContext, ensureSubscription); + yield create(WatchEventSchema, { + watchId, + value: current.value, + dependencies: protoDependencies(current.dependencies), + initial: true, + }); + const abort = new Promise((resolve) => { + if (context.signal.aborted) + resolve("abort"); + else + context.signal.addEventListener("abort", () => resolve("abort"), { once: true }); + }); + try { + while (!context.signal.aborted) { + if (subscriptions.size === 0) { + await abort; + break; + } + const outcome = await Promise.race([ + ...[...subscriptions.values()].map((entry) => entry.next), + abort, + ]); + if (outcome === "abort") + break; + const subscription = subscriptions.get(outcome.key); + if (!subscription) + continue; + if (outcome.error) + throw outcome.error; + if (outcome.done) + throw new Error(`Dependency stream ${outcome.key} ended unexpectedly`); + subscription.next = subscription.waitNext(); + const updated = await evaluate(handler, runtimeContext, ensureSubscription); + const active = new Set(updated.dependencies.map(dependencyKey)); + for (const [key, entry] of subscriptions) { + if (!active.has(key)) { + entry.controller.abort(); + subscriptions.delete(key); + } + } + if (!equals(ValueSchema, current.value, updated.value)) { yield create(WatchEventSchema, { watchId, - value: jsToProtoValue(null), - dependencies: [], - error: error instanceof Error ? error.message : String(error), - initial: !watchId, + value: updated.value, + dependencies: protoDependencies(updated.dependencies), }); } - finally { - context.signal.removeEventListener("abort", closeQueue); - queue.close(); - if (watchId) { - try { - const stopFunction = create(FunctionRefSchema, { - ...(request.function ?? create(FunctionRefSchema, {})), - operation: "watchStop", - }); - const { runtimeFunction } = resolveRuntimeFunction(stopFunction); - await runtimeFunction(params.createContext(trackingCamino, create(WatchRequestSchema, { - ...request, - function: stopFunction, - input: { - ...request.input, - watch_id: jsToProtoValue(watchId), - }, - }))); - } - catch (error) { - logDerivedWatch("stop-error", { - watchId, - error: error instanceof Error ? error.message : String(error), - }); - } - } - } - }, - }); + current = updated; + } + } + finally { + context.signal.removeEventListener("abort", abortAll); + abortAll(); + } }, }); - const server = http.createServer((request, response) => { - void handler(request, response); - }); - const close = () => server.close(() => process.exit(0)); - server.listen(port, host, () => { - process.stderr.write(`${params.packageName} listening on ${host}:${port}\n`); - }); - process.on("SIGTERM", close); - process.on("SIGINT", close); +}; +export const servePackageRuntime = (config) => { + const host = process.env.QUIXOS_RUNTIME_HOST ?? "127.0.0.1"; + const port = Number(process.env.QUIXOS_RUNTIME_PORT ?? "0"); + const handler = connectNodeAdapter({ routes: createPackageRuntimeRoutes(config) }); + const server = http.createServer((request, response) => void handler(request, response)); + server.listen(port, host, () => console.log(`${config.packageRevisionId} listening on ${host}:${port}`)); + const shutdown = () => { + server.close(() => process.exit(0)); + server.closeAllConnections(); + }; + process.on("SIGTERM", shutdown); + process.on("SIGINT", shutdown); + return server; }; diff --git a/dist/quixos/orch_pb.d.ts b/dist/quixos/orch_pb.d.ts new file mode 100644 index 0000000..4f085c2 --- /dev/null +++ b/dist/quixos/orch_pb.d.ts @@ -0,0 +1,470 @@ +import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; +import type { CaminoObject, Value } from "../camino/api_pb.js"; +import type { PackageDescriptor } from "./package_pb.js"; +import type { CapabilityRef, PackageExportRef } from "./refs_pb.js"; +import type { DerivedDependency } from "./runtime_pb.js"; +import type { Message } from "@bufbuild/protobuf"; +/** + * Describes the file quixos/orch.proto. + */ +export declare const file_quixos_orch: GenFile; +/** + * @generated from message quixos.orch.ConstructObjectRequest + */ +export type ConstructObjectRequest = Message<"quixos.orch.ConstructObjectRequest"> & { + /** + * @generated from field: string atom_id = 1; + */ + atomId: string; + /** + * @generated from field: map input = 2; + */ + input: { + [key: string]: Value; + }; +}; +/** + * Describes the message quixos.orch.ConstructObjectRequest. + * Use `create(ConstructObjectRequestSchema)` to create a new message. + */ +export declare const ConstructObjectRequestSchema: GenMessage; +/** + * @generated from message quixos.orch.ConstructObjectResponse + */ +export type ConstructObjectResponse = Message<"quixos.orch.ConstructObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; +/** + * Describes the message quixos.orch.ConstructObjectResponse. + * Use `create(ConstructObjectResponseSchema)` to create a new message. + */ +export declare const ConstructObjectResponseSchema: GenMessage; +/** + * @generated from message quixos.orch.InvokeCapabilityRequest + */ +export type InvokeCapabilityRequest = Message<"quixos.orch.InvokeCapabilityRequest"> & { + /** + * @generated from field: quixos.CapabilityRef capability = 1; + */ + capability?: CapabilityRef | 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.InvokeCapabilityRequest. + * Use `create(InvokeCapabilityRequestSchema)` to create a new message. + */ +export declare const InvokeCapabilityRequestSchema: GenMessage; +/** + * @generated from message quixos.orch.InvokeCapabilityResponse + */ +export type InvokeCapabilityResponse = Message<"quixos.orch.InvokeCapabilityResponse"> & { + /** + * @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.InvokeCapabilityResponse. + * Use `create(InvokeCapabilityResponseSchema)` to create a new message. + */ +export declare const InvokeCapabilityResponseSchema: GenMessage; +/** + * @generated from message quixos.orch.WatchCapabilityRequest + */ +export type WatchCapabilityRequest = Message<"quixos.orch.WatchCapabilityRequest"> & { + /** + * @generated from field: quixos.CapabilityRef capability = 1; + */ + capability?: CapabilityRef | 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.WatchCapabilityRequest. + * Use `create(WatchCapabilityRequestSchema)` to create a new message. + */ +export declare const WatchCapabilityRequestSchema: GenMessage; +/** + * @generated from message quixos.orch.WatchCapabilityEvent + */ +export type WatchCapabilityEvent = Message<"quixos.orch.WatchCapabilityEvent"> & { + /** + * @generated from field: string invocation_id = 1; + */ + invocationId: string; + /** + * @generated from field: quixos.orch.Activation activation = 2; + */ + activation?: Activation | undefined; + /** + * @generated from field: string watch_id = 3; + */ + watchId: string; + /** + * @generated from field: camino.Value value = 4; + */ + value?: Value | undefined; + /** + * @generated from field: repeated quixos.runtime.DerivedDependency dependencies = 5; + */ + dependencies: DerivedDependency[]; + /** + * @generated from field: string error = 6; + */ + error: string; + /** + * @generated from field: bool initial = 7; + */ + initial: boolean; +}; +/** + * Describes the message quixos.orch.WatchCapabilityEvent. + * Use `create(WatchCapabilityEventSchema)` to create a new message. + */ +export declare const WatchCapabilityEventSchema: GenMessage; +/** + * @generated from message quixos.orch.GetWorkspaceRequest + */ +export type GetWorkspaceRequest = Message<"quixos.orch.GetWorkspaceRequest"> & {}; +/** + * Describes the message quixos.orch.GetWorkspaceRequest. + * Use `create(GetWorkspaceRequestSchema)` to create a new message. + */ +export declare const GetWorkspaceRequestSchema: GenMessage; +/** + * @generated from message quixos.orch.GetWorkspaceResponse + */ +export type GetWorkspaceResponse = Message<"quixos.orch.GetWorkspaceResponse"> & { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId: string; + /** + * @generated from field: string workspace_revision_id = 2; + */ + workspaceRevisionId: string; + /** + * @generated from field: string source_root_commit = 3; + */ + sourceRootCommit: string; +}; +/** + * Describes the message quixos.orch.GetWorkspaceResponse. + * Use `create(GetWorkspaceResponseSchema)` to create a new message. + */ +export declare const GetWorkspaceResponseSchema: GenMessage; +/** + * @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 declare const ListActivationsRequestSchema: GenMessage; +/** + * @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 declare const ListPackageDescriptorsRequestSchema: GenMessage; +/** + * @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 declare const ListPackageDescriptorsResponseSchema: GenMessage; +/** + * @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 declare const ListPackageRuntimesRequestSchema: GenMessage; +/** + * @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 declare const ListPackageRuntimesResponseSchema: GenMessage; +/** + * @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 declare const ListActivationsResponseSchema: GenMessage; +/** + * @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 declare const CloseActivationRequestSchema: GenMessage; +/** + * @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 declare const CloseActivationResponseSchema: GenMessage; +/** + * @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.PackageExportRef export = 2; + */ + export?: PackageExportRef | 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 declare const ActivationSchema: GenMessage; +/** + * @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_revision_id = 2; + */ + packageRevisionId: string; + /** + * @generated from field: string source_repository = 3; + */ + sourceRepository: string; + /** + * @generated from field: string source_commit = 4; + */ + sourceCommit: string; + /** + * @generated from field: string build_target = 5; + */ + buildTarget: string; + /** + * @generated from field: string server_path = 6; + */ + serverPath: string; + /** + * @generated from field: uint32 pid = 7; + */ + pid: number; + /** + * @generated from field: string state = 8; + */ + state: string; + /** + * @generated from field: string started_at = 9; + */ + startedAt: string; + /** + * @generated from field: string last_handshake_at = 10; + */ + lastHandshakeAt: string; + /** + * @generated from field: string runtime_protocol_version = 11; + */ + runtimeProtocolVersion: string; + /** + * @generated from field: uint32 advertised_export_count = 12; + */ + advertisedExportCount: number; +}; +/** + * Describes the message quixos.orch.PackageRuntimeStatus. + * Use `create(PackageRuntimeStatusSchema)` to create a new message. + */ +export declare const PackageRuntimeStatusSchema: GenMessage; +/** + * @generated from service quixos.orch.OrchestratorRuntime + */ +export declare const OrchestratorRuntime: GenService<{ + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.InvokeCapability + */ + invokeCapability: { + methodKind: "unary"; + input: typeof InvokeCapabilityRequestSchema; + output: typeof InvokeCapabilityResponseSchema; + }; + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.WatchCapability + */ + watchCapability: { + methodKind: "server_streaming"; + input: typeof WatchCapabilityRequestSchema; + output: typeof WatchCapabilityEventSchema; + }; + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ConstructObject + */ + constructObject: { + methodKind: "unary"; + input: typeof ConstructObjectRequestSchema; + output: typeof ConstructObjectResponseSchema; + }; + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.GetWorkspace + */ + getWorkspace: { + methodKind: "unary"; + input: typeof GetWorkspaceRequestSchema; + output: typeof GetWorkspaceResponseSchema; + }; + /** + * @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; + }; +}>; +//# sourceMappingURL=orch_pb.d.ts.map \ No newline at end of file diff --git a/dist/quixos/orch_pb.d.ts.map b/dist/quixos/orch_pb.d.ts.map new file mode 100644 index 0000000..43932d3 --- /dev/null +++ b/dist/quixos/orch_pb.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"orch_pb.d.ts","sourceRoot":"","sources":["../../src/quixos/orch_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA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EAAE,OAAO,6BAA6B,CAAC;KAC9C,CAAC;IACF;;OAEG;IACH,YAAY,EAAE;QACZ,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,yBAAyB,CAAC;QACxC,MAAM,EAAE,OAAO,0BAA0B,CAAC;KAC3C,CAAC;IACF;;OAEG;IACH,sBAAsB,EAAE;QACtB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,mCAAmC,CAAC;QAClD,MAAM,EAAE,OAAO,oCAAoC,CAAC;KACrD,CAAC;IACF;;OAEG;IACH,mBAAmB,EAAE;QACnB,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,gCAAgC,CAAC;QAC/C,MAAM,EAAE,OAAO,iCAAiC,CAAC;KAClD,CAAC;IACF;;OAEG;IACH,eAAe,EAAE;QACf,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,4BAA4B,CAAC;QAC3C,MAAM,EAAE,OAAO,6BAA6B,CAAC;KAC9C,CAAC;IACF;;OAEG;IACH,eAAe,EAAE;QACf,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,4BAA4B,CAAC;QAC3C,MAAM,EAAE,OAAO,6BAA6B,CAAC;KAC9C,CAAC;CACH,CACiC,CAAC"} \ No newline at end of file diff --git a/dist/quixos/orch_pb.js b/dist/quixos/orch_pb.js new file mode 100644 index 0000000..f83f27b --- /dev/null +++ b/dist/quixos/orch_pb.js @@ -0,0 +1,106 @@ +// @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 { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2"; +import { file_camino_api } from "../camino/api_pb.js"; +import { file_quixos_package } from "./package_pb.js"; +import { file_quixos_refs } from "./refs_pb.js"; +import { file_quixos_runtime } from "./runtime_pb.js"; +/** + * Describes the file quixos/orch.proto. + */ +export const file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mNoLldhdGNoQ2FwYWJpbGl0eVJlcXVlc3QaIS5xdWl4b3Mub3JjaC5XYXRjaENhcGFiaWxpdHlFdmVudDABElwKD0NvbnN0cnVjdE9iamVjdBIjLnF1aXhvcy5vcmNoLkNvbnN0cnVjdE9iamVjdFJlcXVlc3QaJC5xdWl4b3Mub3JjaC5Db25zdHJ1Y3RPYmplY3RSZXNwb25zZRJTCgxHZXRXb3Jrc3BhY2USIC5xdWl4b3Mub3JjaC5HZXRXb3Jrc3BhY2VSZXF1ZXN0GiEucXVpeG9zLm9yY2guR2V0V29ya3NwYWNlUmVzcG9uc2UScQoWTGlzdFBhY2thZ2VEZXNjcmlwdG9ycxIqLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlRGVzY3JpcHRvcnNSZXF1ZXN0GisucXVpeG9zLm9yY2guTGlzdFBhY2thZ2VEZXNjcmlwdG9yc1Jlc3BvbnNlEmgKE0xpc3RQYWNrYWdlUnVudGltZXMSJy5xdWl4b3Mub3JjaC5MaXN0UGFja2FnZVJ1bnRpbWVzUmVxdWVzdBooLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlUnVudGltZXNSZXNwb25zZRJcCg9MaXN0QWN0aXZhdGlvbnMSIy5xdWl4b3Mub3JjaC5MaXN0QWN0aXZhdGlvbnNSZXF1ZXN0GiQucXVpeG9zLm9yY2guTGlzdEFjdGl2YXRpb25zUmVzcG9uc2USXAoPQ2xvc2VBY3RpdmF0aW9uEiMucXVpeG9zLm9yY2guQ2xvc2VBY3RpdmF0aW9uUmVxdWVzdBokLnF1aXhvcy5vcmNoLkNsb3NlQWN0aXZhdGlvblJlc3BvbnNlYgZwcm90bzM", [file_camino_api, file_quixos_package, file_quixos_refs, file_quixos_runtime]); +/** + * Describes the message quixos.orch.ConstructObjectRequest. + * Use `create(ConstructObjectRequestSchema)` to create a new message. + */ +export const ConstructObjectRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 0); +/** + * Describes the message quixos.orch.ConstructObjectResponse. + * Use `create(ConstructObjectResponseSchema)` to create a new message. + */ +export const ConstructObjectResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 1); +/** + * Describes the message quixos.orch.InvokeCapabilityRequest. + * Use `create(InvokeCapabilityRequestSchema)` to create a new message. + */ +export const InvokeCapabilityRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 2); +/** + * Describes the message quixos.orch.InvokeCapabilityResponse. + * Use `create(InvokeCapabilityResponseSchema)` to create a new message. + */ +export const InvokeCapabilityResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 3); +/** + * Describes the message quixos.orch.WatchCapabilityRequest. + * Use `create(WatchCapabilityRequestSchema)` to create a new message. + */ +export const WatchCapabilityRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 4); +/** + * Describes the message quixos.orch.WatchCapabilityEvent. + * Use `create(WatchCapabilityEventSchema)` to create a new message. + */ +export const WatchCapabilityEventSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 5); +/** + * Describes the message quixos.orch.GetWorkspaceRequest. + * Use `create(GetWorkspaceRequestSchema)` to create a new message. + */ +export const GetWorkspaceRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 6); +/** + * Describes the message quixos.orch.GetWorkspaceResponse. + * Use `create(GetWorkspaceResponseSchema)` to create a new message. + */ +export const GetWorkspaceResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 7); +/** + * Describes the message quixos.orch.ListActivationsRequest. + * Use `create(ListActivationsRequestSchema)` to create a new message. + */ +export const ListActivationsRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 8); +/** + * Describes the message quixos.orch.ListPackageDescriptorsRequest. + * Use `create(ListPackageDescriptorsRequestSchema)` to create a new message. + */ +export const ListPackageDescriptorsRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 9); +/** + * Describes the message quixos.orch.ListPackageDescriptorsResponse. + * Use `create(ListPackageDescriptorsResponseSchema)` to create a new message. + */ +export const ListPackageDescriptorsResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 10); +/** + * Describes the message quixos.orch.ListPackageRuntimesRequest. + * Use `create(ListPackageRuntimesRequestSchema)` to create a new message. + */ +export const ListPackageRuntimesRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 11); +/** + * Describes the message quixos.orch.ListPackageRuntimesResponse. + * Use `create(ListPackageRuntimesResponseSchema)` to create a new message. + */ +export const ListPackageRuntimesResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 12); +/** + * Describes the message quixos.orch.ListActivationsResponse. + * Use `create(ListActivationsResponseSchema)` to create a new message. + */ +export const ListActivationsResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 13); +/** + * Describes the message quixos.orch.CloseActivationRequest. + * Use `create(CloseActivationRequestSchema)` to create a new message. + */ +export const CloseActivationRequestSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 14); +/** + * Describes the message quixos.orch.CloseActivationResponse. + * Use `create(CloseActivationResponseSchema)` to create a new message. + */ +export const CloseActivationResponseSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 15); +/** + * Describes the message quixos.orch.Activation. + * Use `create(ActivationSchema)` to create a new message. + */ +export const ActivationSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 16); +/** + * Describes the message quixos.orch.PackageRuntimeStatus. + * Use `create(PackageRuntimeStatusSchema)` to create a new message. + */ +export const PackageRuntimeStatusSchema = /*@__PURE__*/ messageDesc(file_quixos_orch, 17); +/** + * @generated from service quixos.orch.OrchestratorRuntime + */ +export const OrchestratorRuntime = /*@__PURE__*/ serviceDesc(file_quixos_orch, 0); diff --git a/dist/quixos/package_pb.d.ts b/dist/quixos/package_pb.d.ts new file mode 100644 index 0000000..9ceded7 --- /dev/null +++ b/dist/quixos/package_pb.d.ts @@ -0,0 +1,51 @@ +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; +/** + * Describes the file quixos/package.proto. + */ +export declare const file_quixos_package: GenFile; +/** + * @generated from message quixos.PackageDescriptor + */ +export type PackageDescriptor = Message<"quixos.PackageDescriptor"> & { + /** + * @generated from field: string package_id = 1; + */ + packageId: string; + /** + * @generated from field: string package_revision_id = 2; + */ + packageRevisionId: string; + /** + * @generated from field: string runtime_protocol_version = 3; + */ + runtimeProtocolVersion: string; + /** + * @generated from field: repeated quixos.RuntimeExport exports = 4; + */ + exports: RuntimeExport[]; +}; +/** + * Describes the message quixos.PackageDescriptor. + * Use `create(PackageDescriptorSchema)` to create a new message. + */ +export declare const PackageDescriptorSchema: GenMessage; +/** + * @generated from message quixos.RuntimeExport + */ +export type RuntimeExport = Message<"quixos.RuntimeExport"> & { + /** + * @generated from field: string export_id = 1; + */ + exportId: string; + /** + * @generated from field: string runtime_symbol = 2; + */ + runtimeSymbol: string; +}; +/** + * Describes the message quixos.RuntimeExport. + * Use `create(RuntimeExportSchema)` to create a new message. + */ +export declare const RuntimeExportSchema: GenMessage; +//# sourceMappingURL=package_pb.d.ts.map \ No newline at end of file diff --git a/dist/quixos/package_pb.d.ts.map b/dist/quixos/package_pb.d.ts.map new file mode 100644 index 0000000..a3da300 --- /dev/null +++ b/dist/quixos/package_pb.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"package_pb.d.ts","sourceRoot":"","sources":["../../src/quixos/package_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OACgT,CAAC;AAEnV;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,0BAA0B,CAAC,GAAG;IACpE;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,iBAAiB,CAC7B,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG;IAC5D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,aAAa,CACrB,CAAC"} \ No newline at end of file diff --git a/dist/quixos/package_pb.js b/dist/quixos/package_pb.js new file mode 100644 index 0000000..0055a09 --- /dev/null +++ b/dist/quixos/package_pb.js @@ -0,0 +1,18 @@ +// @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 { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +/** + * Describes the file quixos/package.proto. + */ +export const file_quixos_package = /*@__PURE__*/ fileDesc("ChRxdWl4b3MvcGFja2FnZS5wcm90bxIGcXVpeG9zIo4BChFQYWNrYWdlRGVzY3JpcHRvchISCgpwYWNrYWdlX2lkGAEgASgJEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYAiABKAkSIAoYcnVudGltZV9wcm90b2NvbF92ZXJzaW9uGAMgASgJEiYKB2V4cG9ydHMYBCADKAsyFS5xdWl4b3MuUnVudGltZUV4cG9ydCI6Cg1SdW50aW1lRXhwb3J0EhEKCWV4cG9ydF9pZBgBIAEoCRIWCg5ydW50aW1lX3N5bWJvbBgCIAEoCWIGcHJvdG8z"); +/** + * Describes the message quixos.PackageDescriptor. + * Use `create(PackageDescriptorSchema)` to create a new message. + */ +export const PackageDescriptorSchema = /*@__PURE__*/ messageDesc(file_quixos_package, 0); +/** + * Describes the message quixos.RuntimeExport. + * Use `create(RuntimeExportSchema)` to create a new message. + */ +export const RuntimeExportSchema = /*@__PURE__*/ messageDesc(file_quixos_package, 1); diff --git a/dist/quixos/refs_pb.d.ts b/dist/quixos/refs_pb.d.ts index ae730f5..d942ff9 100644 --- a/dist/quixos/refs_pb.d.ts +++ b/dist/quixos/refs_pb.d.ts @@ -5,33 +5,102 @@ import type { Message } from "@bufbuild/protobuf"; */ export declare const file_quixos_refs: GenFile; /** - * @generated from message quixos.FunctionRef + * @generated from message quixos.CapabilityRef */ -export type FunctionRef = Message<"quixos.FunctionRef"> & { +export type CapabilityRef = Message<"quixos.CapabilityRef"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string interface_revision_id = 1; */ - packageNamespace: string; + interfaceRevisionId: string; /** - * @generated from field: string package_name = 2; + * @generated from field: string operation_id = 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; + operationId: string; }; /** - * Describes the message quixos.FunctionRef. - * Use `create(FunctionRefSchema)` to create a new message. + * Describes the message quixos.CapabilityRef. + * Use `create(CapabilityRefSchema)` to create a new message. */ -export declare const FunctionRefSchema: GenMessage; +export declare const CapabilityRefSchema: GenMessage; +/** + * @generated from message quixos.PackageExportRef + */ +export type PackageExportRef = Message<"quixos.PackageExportRef"> & { + /** + * @generated from field: string package_revision_id = 1; + */ + packageRevisionId: string; + /** + * @generated from field: string export_id = 2; + */ + exportId: string; +}; +/** + * Describes the message quixos.PackageExportRef. + * Use `create(PackageExportRefSchema)` to create a new message. + */ +export declare const PackageExportRefSchema: GenMessage; +/** + * @generated from message quixos.InjectedDependency + */ +export type InjectedDependency = Message<"quixos.InjectedDependency"> & { + /** + * @generated from field: string port_id = 1; + */ + portId: string; + /** + * @generated from oneof quixos.InjectedDependency.binding + */ + binding: { + /** + * @generated from field: string state_slot_id = 2; + */ + value: string; + case: "stateSlotId"; + } | { + /** + * @generated from field: quixos.EdgeDependency edge = 3; + */ + value: EdgeDependency; + case: "edge"; + } | { + /** + * @generated from field: string receiver_interface_revision_id = 4; + */ + value: string; + case: "receiverInterfaceRevisionId"; + } | { + /** + * @generated from field: string constructor_atom_id = 5; + */ + value: string; + case: "constructorAtomId"; + } | { + case: undefined; + value?: undefined; + }; +}; +/** + * Describes the message quixos.InjectedDependency. + * Use `create(InjectedDependencySchema)` to create a new message. + */ +export declare const InjectedDependencySchema: GenMessage; +/** + * @generated from message quixos.EdgeDependency + */ +export type EdgeDependency = Message<"quixos.EdgeDependency"> & { + /** + * @generated from field: string edge_type_id = 1; + */ + edgeTypeId: string; + /** + * @generated from field: string projection_id = 2; + */ + projectionId: string; +}; +/** + * Describes the message quixos.EdgeDependency. + * Use `create(EdgeDependencySchema)` to create a new message. + */ +export declare const EdgeDependencySchema: GenMessage; //# sourceMappingURL=refs_pb.d.ts.map \ No newline at end of file diff --git a/dist/quixos/refs_pb.d.ts.map b/dist/quixos/refs_pb.d.ts.map index 579043f..c229f3b 100644 --- a/dist/quixos/refs_pb.d.ts.map +++ b/dist/quixos/refs_pb.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"refs_pb.d.ts","sourceRoot":"","sources":["../../src/quixos/refs_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAC8L,CAAC;AAE9N;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,GAAG;IACxD;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,WAAW,CACpB,CAAC"} \ No newline at end of file +{"version":3,"file":"refs_pb.d.ts","sourceRoot":"","sources":["../../src/quixos/refs_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OACsiB,CAAC;AAEtkB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG;IAC5D;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,aAAa,CACxB,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,yBAAyB,CAAC,GAAG;IAClE;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,gBAAgB,CAC9B,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,2BAA2B,CAAC,GAAG;IACtE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE;QACP;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,aAAa,CAAC;KACrB,GAAG;QACF;;WAEG;QACH,KAAK,EAAE,cAAc,CAAC;QACtB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG;QACF;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,6BAA6B,CAAC;KACrC,GAAG;QACF;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,mBAAmB,CAAC;KAC3B,GAAG;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,KAAK,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,kBAAkB,CAClC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC,GAAG;IAC9D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,cAAc,CAC1B,CAAC"} \ No newline at end of file diff --git a/dist/quixos/refs_pb.js b/dist/quixos/refs_pb.js index 0e31ecc..6e69b98 100644 --- a/dist/quixos/refs_pb.js +++ b/dist/quixos/refs_pb.js @@ -5,9 +5,24 @@ import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; /** * Describes the file quixos/refs.proto. */ -export const file_quixos_refs = /*@__PURE__*/ fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zInYKC0Z1bmN0aW9uUmVmEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIOCgZzeW1ib2wYAyABKAkSEwoLdmVyc2lvbl9yZWYYBCABKAkSEQoJb3BlcmF0aW9uGAUgASgJYgZwcm90bzM"); +export const file_quixos_refs = /*@__PURE__*/ fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zIkQKDUNhcGFiaWxpdHlSZWYSHQoVaW50ZXJmYWNlX3JldmlzaW9uX2lkGAEgASgJEhQKDG9wZXJhdGlvbl9pZBgCIAEoCSJCChBQYWNrYWdlRXhwb3J0UmVmEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYASABKAkSEQoJZXhwb3J0X2lkGAIgASgJIroBChJJbmplY3RlZERlcGVuZGVuY3kSDwoHcG9ydF9pZBgBIAEoCRIXCg1zdGF0ZV9zbG90X2lkGAIgASgJSAASJgoEZWRnZRgDIAEoCzIWLnF1aXhvcy5FZGdlRGVwZW5kZW5jeUgAEigKHnJlY2VpdmVyX2ludGVyZmFjZV9yZXZpc2lvbl9pZBgEIAEoCUgAEh0KE2NvbnN0cnVjdG9yX2F0b21faWQYBSABKAlIAEIJCgdiaW5kaW5nIj0KDkVkZ2VEZXBlbmRlbmN5EhQKDGVkZ2VfdHlwZV9pZBgBIAEoCRIVCg1wcm9qZWN0aW9uX2lkGAIgASgJYgZwcm90bzM"); /** - * Describes the message quixos.FunctionRef. - * Use `create(FunctionRefSchema)` to create a new message. + * Describes the message quixos.CapabilityRef. + * Use `create(CapabilityRefSchema)` to create a new message. */ -export const FunctionRefSchema = /*@__PURE__*/ messageDesc(file_quixos_refs, 0); +export const CapabilityRefSchema = /*@__PURE__*/ messageDesc(file_quixos_refs, 0); +/** + * Describes the message quixos.PackageExportRef. + * Use `create(PackageExportRefSchema)` to create a new message. + */ +export const PackageExportRefSchema = /*@__PURE__*/ messageDesc(file_quixos_refs, 1); +/** + * Describes the message quixos.InjectedDependency. + * Use `create(InjectedDependencySchema)` to create a new message. + */ +export const InjectedDependencySchema = /*@__PURE__*/ messageDesc(file_quixos_refs, 2); +/** + * Describes the message quixos.EdgeDependency. + * Use `create(EdgeDependencySchema)` to create a new message. + */ +export const EdgeDependencySchema = /*@__PURE__*/ messageDesc(file_quixos_refs, 3); diff --git a/dist/quixos/runtime_pb.d.ts b/dist/quixos/runtime_pb.d.ts index c682c9b..034a792 100644 --- a/dist/quixos/runtime_pb.d.ts +++ b/dist/quixos/runtime_pb.d.ts @@ -1,6 +1,6 @@ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2"; import type { Value } from "../camino/api_pb.js"; -import type { FunctionRef } from "./refs_pb.js"; +import type { InjectedDependency, PackageExportRef } from "./refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; /** * Describes the file quixos/runtime.proto. @@ -25,21 +25,17 @@ export declare const HandshakeRequestSchema: GenMessage; */ export type HandshakeResponse = Message<"quixos.runtime.HandshakeResponse"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string package_revision_id = 1; */ - packageNamespace: string; + packageRevisionId: string; /** - * @generated from field: string package_name = 2; - */ - packageName: string; - /** - * @generated from field: string runtime_protocol_version = 3; + * @generated from field: string runtime_protocol_version = 2; */ runtimeProtocolVersion: string; /** - * @generated from field: repeated quixos.FunctionRef functions = 4; + * @generated from field: repeated string export_ids = 3; */ - functions: FunctionRef[]; + exportIds: string[]; }; /** * Describes the message quixos.runtime.HandshakeResponse. @@ -55,9 +51,9 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { */ invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; */ @@ -68,6 +64,10 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { input: { [key: string]: Value; }; + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** * Describes the message quixos.runtime.InvokeRequest. @@ -105,9 +105,9 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { */ invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; */ @@ -118,6 +118,10 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { input: { [key: string]: Value; }; + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** * Describes the message quixos.runtime.WatchRequest. @@ -137,13 +141,13 @@ export type DerivedDependency = Message<"quixos.runtime.DerivedDependency"> & { */ objectId: string; /** - * @generated from field: string field_name = 3; + * @generated from field: string attachment_id = 3; */ - fieldName: string; + attachmentId: string; /** - * @generated from field: string source_field = 4; + * @generated from field: string projection_id = 4; */ - sourceField: string; + projectionId: string; }; /** * Describes the message quixos.runtime.DerivedDependency. diff --git a/dist/quixos/runtime_pb.d.ts.map b/dist/quixos/runtime_pb.d.ts.map index 5e70a8b..d3927db 100644 --- a/dist/quixos/runtime_pb.d.ts.map +++ b/dist/quixos/runtime_pb.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"runtime_pb.d.ts","sourceRoot":"","sources":["../../src/quixos/runtime_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAEpF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OACwoD,CAAC;AAE3qD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,iCAAiC,CAAC,GAAG;IAC1E;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,gBAAgB,CAC3B,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,kCAAkC,CAAC,GAAG;IAC5E;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OA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IAErB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,iBAAiB,CAC7B,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,2BAA2B,CAAC,GAAG;IAC9D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAE1B;;OAEG;IACH,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAElC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,UAAU,CACf,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC;IACtC;;OAEG;IACH,SAAS,EAAE;QACT,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,sBAAsB,CAAC;QACrC,MAAM,EAAE,OAAO,uBAAuB,CAAC;KACxC,CAAC;IACF;;OAEG;IACH,MAAM,EAAE;QACN,UAAU,EAAE,OAAO,CAAC;QACpB,KAAK,EAAE,OAAO,mBAAmB,CAAC;QAClC,MAAM,EAAE,OAAO,oBAAoB,CAAC;KACrC,CAAC;IACF;;OAEG;IACH,KAAK,EAAE;QACL,UAAU,EAAE,kBAAkB,CAAC;QAC/B,KAAK,EAAE,OAAO,kBAAkB,CAAC;QACjC,MAAM,EAAE,OAAO,gBAAgB,CAAC;KACjC,CAAC;CACH,CACoC,CAAC"} \ No newline at end of file diff --git a/dist/quixos/runtime_pb.js b/dist/quixos/runtime_pb.js index cc60a7a..4a67a14 100644 --- a/dist/quixos/runtime_pb.js +++ b/dist/quixos/runtime_pb.js @@ -7,7 +7,7 @@ import { file_quixos_refs } from "./refs_pb.js"; /** * Describ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3MucnVudGltZS5IYW5kc2hha2VSZXF1ZXN0GiEucXVpeG9zLnJ1bnRpbWUuSGFuZHNoYWtlUmVzcG9uc2USRwoGSW52b2tlEh0ucXVpeG9zLnJ1bnRpbWUuSW52b2tlUmVxdWVzdBoeLnF1aXhvcy5ydW50aW1lLkludm9rZVJlc3BvbnNlEkMKBVdhdGNoEhwucXVpeG9zLnJ1bnRpbWUuV2F0Y2hSZXF1ZXN0GhoucXVpeG9zLnJ1bnRpbWUuV2F0Y2hFdmVudDABYgZwcm90bzM", [file_camino_api, file_quixos_refs]); /** * Describes the message quixos.runtime.HandshakeRequest. * Use `create(HandshakeRequestSchema)` to create a new message. diff --git a/dist/schema-compiler.d.ts b/dist/schema-compiler.d.ts deleted file mode 100644 index d037dae..0000000 --- a/dist/schema-compiler.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import protobuf from "protobufjs"; -import type { SchemaCompileResult } from "./schema-ir.js"; -export declare const loadCaminoSchemaRoot: (sourceFile: string) => Promise<{ - absoluteSourceFile: string; - root: protobuf.Root; -}>; -export declare const compileCaminoSchema: (sourceFile: string) => Promise; -//# sourceMappingURL=schema-compiler.d.ts.map \ No newline at end of file diff --git a/dist/schema-compiler.d.ts.map b/dist/schema-compiler.d.ts.map deleted file mode 100644 index 9f30bdf..0000000 --- a/dist/schema-compiler.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema-compiler.d.ts","sourceRoot":"","sources":["../src/schema-compiler.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,KAAK,EAeV,mBAAmB,EAIpB,MAAM,gBAAgB,CAAC;AAq2BxB,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,KACjB,OAAO,CAAC;IAAE,kBAAkB,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAA;CAAE,CAqC7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,YAAY,MAAM,KACjB,OAAO,CAAC,mBAAmB,CAsC7B,CAAC"} \ No newline at end of file diff --git a/dist/schema-compiler.js b/dist/schema-compiler.js deleted file mode 100644 index da3187b..0000000 --- a/dist/schema-compiler.js +++ /dev/null @@ -1,718 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import protobuf from "protobufjs"; -const CLASS_OPTION = "(camino.class)"; -const INTERFACE_OPTION = "(camino.interface)"; -const IMPLEMENTS_OPTION = "(camino.implements)"; -const CONSTRUCTOR_OPTION = "(camino.constructor)"; -const METHOD_OPTION = "(camino.method)"; -const MIGRATION_OPTION = "(camino.migration)"; -const CONFLICT_OPTION = "(camino.conflict)"; -const EDGE_OPTION = "(camino.edge)"; -const FIELD_STORAGE_OPTION = "(camino.field_storage)"; -const FIELD_OPS_OPTION = "(camino.field_ops)"; -const INTERFACE_FIELD_OPTION = "(camino.interface_field)"; -const DISPLAY_LABEL_OPTION = "(camino.display_label)"; -const IMPL_OPTION = "(camino.impl)"; -const SCHEMA_NAMESPACE_OPTION = "(camino.schema_namespace)"; -const SCHEMA_VERSION_OPTION = "(camino.schema_version)"; -const enumName = (value) => String(value) - .replace(/([a-z0-9])([A-Z])/g, "$1_$2") - .replace(/-/g, "_") - .toUpperCase(); -const lowerEnumName = (value) => enumName(value).toLowerCase(); -const getOption = (options, name) => { - if (!options) { - return undefined; - } - if (Object.hasOwn(options, name)) { - return options[name]; - } - const bareName = name.replace(/^\((.*)\)$/, "$1"); - if (Object.hasOwn(options, bareName)) { - return options[bareName]; - } - return undefined; -}; -const getParsedOptions = (reflection) => { - const parsedOptions = reflection - .parsedOptions; - return Array.isArray(parsedOptions) - ? parsedOptions.filter((option) => Boolean(option) && typeof option === "object" && !Array.isArray(option)) - : []; -}; -const getReflectionOptions = (reflection, name) => { - const parsedValues = getParsedOptions(reflection).flatMap((option) => { - const value = getOption(option, name); - return value === undefined ? [] : [value]; - }); - if (parsedValues.length > 0) { - return parsedValues; - } - const value = getOption(reflection.options, name); - return value === undefined ? [] : [value]; -}; -const getReflectionOption = (reflection, name) => getReflectionOptions(reflection, name)[0]; -const asObject = (value) => value && typeof value === "object" && !Array.isArray(value) - ? value - : undefined; -const asArray = (value) => Array.isArray(value) ? value : value === undefined ? [] : [value]; -const readString = (object, key) => { - const value = object?.[key]; - return typeof value === "string" ? value : undefined; -}; -const readNumber = (object, key) => { - const value = object?.[key]; - return typeof value === "number" && Number.isFinite(value) - ? value - : undefined; -}; -const readBoolean = (object, key) => { - const value = object?.[key]; - return typeof value === "boolean" ? value : undefined; -}; -const symbolRefFromOption = (value, fallback) => { - const object = asObject(value); - if (!object) { - return fallback; - } - return { - namespace: readString(object, "namespace") ?? fallback.namespace, - name: readString(object, "name") ?? fallback.name, - version: readString(object, "version") ?? fallback.version, - ...(readString(object, "hash") - ? { hash: readString(object, "hash") } - : {}), - }; -}; -const typeRefFromOption = (value, fallbackVersion) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const symbol = asObject(object.symbol) - ? symbolRefFromOption(object.symbol, { - namespace: "", - name: "", - version: fallbackVersion, - }) - : undefined; - const protoType = readString(object, "proto_type")?.replace(/^\./, ""); - const symbolProtoType = symbol?.namespace && symbol.name ? `${symbol.namespace}.${symbol.name}` : ""; - const resolvedProtoType = protoType ?? symbolProtoType; - if (!resolvedProtoType) { - return undefined; - } - return { - protoType: resolvedProtoType, - ...(symbol?.namespace && symbol.name ? { symbol } : {}), - }; -}; -const interfaceFieldContractFromOption = (value, schemaVersion) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const type = typeRefFromOption(object.type, schemaVersion); - const refTargetTypeParam = readString(object, "ref_target_type_param"); - const edgeCardinality = object.edge_cardinality === undefined - ? undefined - : cardinalityFromOption(object.edge_cardinality); - return { - required: readBoolean(object, "required") ?? false, - readable: readBoolean(object, "readable") ?? false, - writable: readBoolean(object, "writable") ?? false, - watchable: readBoolean(object, "watchable") ?? false, - ...(readString(object, "type_param") - ? { typeParam: readString(object, "type_param") } - : {}), - ...(type ? { type } : {}), - ...(refTargetTypeParam ? { refTargetTypeParam } : {}), - ...(edgeCardinality ? { edgeCardinality } : {}), - }; -}; -const functionRefFromOption = (value) => { - const object = asObject(value); - if (!object) { - throw new Error("Expected function ref option object"); - } - const packageNamespace = readString(object, "package_namespace"); - const packageName = readString(object, "package_name"); - const symbol = readString(object, "symbol"); - if (!packageNamespace || !packageName || !symbol) { - throw new Error("Function ref requires package_namespace, package_name, and symbol"); - } - return { - packageNamespace, - packageName, - symbol, - ...(readString(object, "operation") - ? { operation: readString(object, "operation") } - : {}), - ...(readString(object, "version_ref") - ? { versionRef: readString(object, "version_ref") } - : {}), - }; -}; -const conflictFromOption = (value) => { - const normalized = enumName(value); - if (!value || normalized === "CONFLICT_STRATEGY_UNSPECIFIED") { - return "preserve_conflicts"; - } - if (normalized === "REPLACE") { - return "replace"; - } - if (normalized === "PRESERVE_CONFLICTS") { - return "preserve_conflicts"; - } - if (normalized === "CRDT") { - return "crdt"; - } - throw new Error(`Unknown Camino conflict strategy: ${String(value)}`); -}; -const cardinalityFromOption = (value) => { - const normalized = lowerEnumName(value); - if (!value || normalized === "cardinality_unspecified") { - return "many"; - } - if (normalized === "optional_one" || - normalized === "exactly_one" || - normalized === "many" || - normalized === "many_unique" || - normalized === "many_ordered" || - normalized === "many_unique_ordered") { - return normalized; - } - throw new Error(`Unknown Camino cardinality: ${String(value)}`); -}; -const fieldStorageKindFromOption = (value) => { - if (value === 5) { - return "static_final"; - } - const normalized = lowerEnumName(value); - if (!value || normalized === "field_storage_kind_unspecified") { - return "stored"; - } - if (normalized === "stored" || - normalized === "derived" || - normalized === "lazy" || - normalized === "external" || - normalized === "static_final") { - return normalized; - } - throw new Error(`Unknown Camino field storage kind: ${String(value)}`); -}; -const fieldStorageFromOption = (value) => { - const object = asObject(value); - if (!object) { - return { - kind: "stored", - cache: false, - }; - } - const kind = fieldStorageKindFromOption(object.kind); - const resolver = object.resolver === undefined - ? undefined - : functionRefFromOption(object.resolver); - if ((kind === "derived" || kind === "lazy" || kind === "external") && !resolver) { - throw new Error(`${kind} field storage requires resolver`); - } - return { - kind, - ...(resolver ? { resolver } : {}), - cache: object.cache === true, - }; -}; -const fieldOpsFromOption = (value) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const implementation = enumName(object.implementation); - if (implementation !== "SERVICE") { - throw new Error(`Unsupported Camino field implementation: ${String(object.implementation)}`); - } - const service = readString(object, "service"); - if (!service) { - throw new Error("SERVICE field_ops requires service"); - } - return { - implementation: "service", - service, - }; -}; -const extractFileDefaults = (sourceFile) => { - const text = fs.readFileSync(sourceFile, "utf8"); - const packageMatch = /^\s*package\s+([a-zA-Z0-9_.]+)\s*;/m.exec(text); - const namespaceMatch = /^\s*option\s+\(camino\.schema_namespace\)\s*=\s*"([^"]+)"\s*;/m.exec(text); - const versionMatch = /^\s*option\s+\(camino\.schema_version\)\s*=\s*"([^"]+)"\s*;/m.exec(text); - return { - packageName: packageMatch?.[1] ?? "", - schemaNamespace: namespaceMatch?.[1] ?? packageMatch?.[1] ?? "", - schemaVersion: versionMatch?.[1] ?? "1", - }; -}; -const protoSymbolFromReflection = (reflection, fallbackVersion) => { - if (!reflection?.fullName) { - return undefined; - } - const parts = reflection.fullName.replace(/^\./, "").split("."); - const name = parts.pop(); - if (!name) { - return undefined; - } - return { - namespace: parts.join("."), - name, - version: fallbackVersion, - }; -}; -const typeRefForField = (field, _schemaVersion) => { - const enumValues = field.resolvedType instanceof protobuf.Enum - ? Object.entries(field.resolvedType.values) - .filter(([_name, value]) => value !== 0) - .map(([name]) => name) - : undefined; - return { - protoType: field.type, - ...(enumValues ? { enumValues } : {}), - }; -}; -const typeRefForType = (type, fallbackType, schemaVersion) => { - const symbol = protoSymbolFromReflection(type ?? null, schemaVersion); - return { - protoType: type?.fullName?.replace(/^\./, "") ?? fallbackType, - ...(symbol ? { symbol } : {}), - }; -}; -const fieldSchemaFromField = (field, schemaVersion) => { - const storage = fieldStorageFromOption(getReflectionOption(field, FIELD_STORAGE_OPTION)); - const ops = fieldOpsFromOption(getReflectionOption(field, FIELD_OPS_OPTION)); - if (ops && storage.kind !== "stored" && storage.kind !== "static_final") { - throw new Error(`Field ${field.fullName} cannot declare both field_ops and package-resolved storage`); - } - if (storage.kind === "static_final" && !ops) { - throw new Error(`Field ${field.fullName} with static_final storage requires field_ops`); - } - const interfaceContract = interfaceFieldContractFromOption(getReflectionOption(field, INTERFACE_FIELD_OPTION), schemaVersion); - return { - name: field.name, - tag: field.id, - type: typeRefForField(field, schemaVersion), - conflict: conflictFromOption(getReflectionOption(field, CONFLICT_OPTION)), - repeated: field.repeated, - optional: field.optional, - storage, - ...(ops ? { ops } : {}), - ...(interfaceContract ? { interfaceContract } : {}), - isDisplayLabel: getReflectionOption(field, DISPLAY_LABEL_OPTION) === true, - }; -}; -const isManyCardinality = (cardinality) => cardinality === "many" || - cardinality === "many_unique" || - cardinality === "many_ordered" || - cardinality === "many_unique_ordered"; -const materializationFromOption = (value, fallbackVersion) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const classRef = symbolRefFromOption(object.class, { - namespace: "", - name: "", - version: fallbackVersion, - }); - if (!classRef.name) { - throw new Error("Edge materialization requires class"); - } - return { - class: classRef, - connectProjection: readString(object, "connect_projection") ?? "", - }; -}; -const endpointFromOption = (params) => { - const object = asObject(params.option); - const classRef = asObject(object?.class) - ? symbolRefFromOption(object?.class, { - namespace: "", - name: "", - version: params.fallbackVersion, - }) - : params.fallbackClass; - const interfaceRef = asObject(object?.interface) - ? symbolRefFromOption(object?.interface, { - namespace: "", - name: "", - version: params.fallbackVersion, - }) - : undefined; - const projection = readString(object, "projection") ?? params.fallbackProjection; - const cardinality = object?.cardinality === undefined - ? params.fallbackCardinality - : cardinalityFromOption(object.cardinality); - const materialization = materializationFromOption(object?.materialize, params.fallbackVersion); - if (!classRef?.name && !interfaceRef?.name) { - throw new Error(`Edge endpoint ${projection} requires class or interface`); - } - return { - ...(classRef?.name ? { class: classRef } : {}), - ...(interfaceRef?.name ? { interface: interfaceRef } : {}), - projection, - cardinality, - indexed: readBoolean(object, "indexed") ?? false, - ...(materialization ? { materialization } : {}), - }; -}; -const symbolKey = (ref) => ref ? [ref.namespace, ref.name, ref.version, ref.hash ?? ""].join(":") : ""; -const endpointRoleKey = (endpoint) => [ - symbolKey(endpoint.class), - symbolKey(endpoint.interface), - endpoint.projection, - endpoint.cardinality, -].join("|"); -const normalizeEdgeEndpoints = (params) => { - if (params.directionality === "directed") { - return { - fromEndpoint: params.fromEndpoint, - toEndpoint: params.toEndpoint, - }; - } - return endpointRoleKey(params.fromEndpoint) <= endpointRoleKey(params.toEndpoint) - ? { - fromEndpoint: params.fromEndpoint, - toEndpoint: params.toEndpoint, - } - : { - fromEndpoint: params.toEndpoint, - toEndpoint: params.fromEndpoint, - }; -}; -const symbolArrayFromOption = (value, defaults) => asArray(value) - .map((item) => symbolRefFromOption(item, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, -})) - .filter((symbol) => Boolean(symbol.name)); -const isStringType = (type) => type.protoType === "string" || type.protoType === "google.protobuf.StringValue"; -const validateDisplayLabelFields = (type, fields, operationServices) => { - const displayLabelFields = fields.filter((field) => field.isDisplayLabel); - if (displayLabelFields.length > 1) { - throw new Error(`Class ${type.fullName} declares multiple Camino display label fields`); - } - const displayLabelField = displayLabelFields[0]; - if (!displayLabelField) { - return; - } - if (!displayLabelField.ops) { - if (!isStringType(displayLabelField.type)) { - throw new Error(`Display label field ${type.fullName}.${displayLabelField.name} must have string type`); - } - return; - } - const serviceName = displayLabelField.ops.service.replace(/^\./, ""); - const getOperation = operationServices - .find((service) => service.fullName === serviceName) - ?.operations.find((operation) => operation.name === "Get"); - if (!getOperation || !isStringType(getOperation.outputType)) { - throw new Error(`Display label field ${type.fullName}.${displayLabelField.name} must resolve to string`); - } -}; -const typeBindingFromOption = (value, schemaVersion) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const name = readString(object, "name"); - const type = typeRefFromOption(object.type, schemaVersion); - if (!name || !type) { - throw new Error("Interface type_binding requires name and type"); - } - return { name, type }; -}; -const interfaceImplementationFromOption = (value, defaults) => { - const object = asObject(value); - if (!object) { - throw new Error("Expected implements option object"); - } - const interfaceId = symbolRefFromOption(object.interface, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, - }); - if (!interfaceId.name) { - throw new Error("implements option requires interface name"); - } - return { - interface: interfaceId, - typeBindings: asArray(object.type_binding) - .map((binding) => typeBindingFromOption(binding, defaults.schemaVersion)) - .filter((binding) => Boolean(binding)), - }; -}; -const serviceName = (service) => service.fullName.replace(/^\./, ""); -const operationFromMethod = (method, schemaVersion) => { - const fn = functionRefFromOption(getReflectionOption(method, IMPL_OPTION)); - const methodWithTypes = method; - return { - name: method.name, - inputType: typeRefForType(methodWithTypes.resolvedRequestType, method.requestType, schemaVersion), - outputType: typeRefForType(methodWithTypes.resolvedResponseType, method.responseType, schemaVersion), - function: fn, - }; -}; -const operationServiceFromService = (service, schemaVersion) => ({ - name: service.name, - fullName: serviceName(service), - operations: service.methodsArray.map((method) => operationFromMethod(method, schemaVersion)), -}); -const classSchemaFromType = (type, sourceFile, defaults, operationServices) => { - const classOption = asObject(getReflectionOption(type, CLASS_OPTION)); - if (!classOption) { - return undefined; - } - const fallbackClassRef = { - namespace: defaults.schemaNamespace, - name: type.name, - version: defaults.schemaVersion, - }; - const classId = symbolRefFromOption(classOption.id, fallbackClassRef); - const classVersion = readNumber(classOption, "version") ?? Number(classId.version); - if (!Number.isInteger(classVersion) || classVersion <= 0) { - throw new Error(`Class ${type.fullName} has invalid Camino class version`); - } - const fields = type.fieldsArray.map((field) => fieldSchemaFromField(field, defaults.schemaVersion)); - validateDisplayLabelFields(type, fields, operationServices); - const edges = type.fieldsArray.flatMap((field) => { - const edgeOption = asObject(getReflectionOption(field, EDGE_OPTION)); - if (!edgeOption) { - return []; - } - const legacyTargetClass = symbolRefFromOption(edgeOption.target, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, - }); - const cardinality = cardinalityFromOption(edgeOption.cardinality); - const declaredFromEndpoint = endpointFromOption({ - option: edgeOption.this_endpoint, - fallbackClass: classId, - fallbackProjection: field.name, - fallbackCardinality: cardinality, - fallbackVersion: defaults.schemaVersion, - }); - const declaredToEndpoint = endpointFromOption({ - option: edgeOption.other_endpoint, - fallbackClass: legacyTargetClass.name ? legacyTargetClass : undefined, - fallbackProjection: readString(edgeOption, "inverse") ?? "", - fallbackCardinality: "many", - fallbackVersion: defaults.schemaVersion, - }); - if (!declaredToEndpoint.projection) { - throw new Error(`Edge field ${type.fullName}.${field.name} requires other_endpoint.projection or inverse`); - } - const sourceProtoType = field.resolvedType?.fullName?.replace(/^\./, ""); - if (sourceProtoType !== "camino.Ref") { - throw new Error(`Edge field ${type.fullName}.${field.name} must use camino.Ref`); - } - const isMany = isManyCardinality(declaredFromEndpoint.cardinality); - if (isMany && !field.repeated) { - throw new Error(`Edge field ${type.fullName}.${field.name} must be repeated for ${declaredFromEndpoint.cardinality}`); - } - if (!isMany && field.repeated) { - throw new Error(`Edge field ${type.fullName}.${field.name} must not be repeated for ${declaredFromEndpoint.cardinality}`); - } - const directionality = edgeOption.undirected === true ? "undirected" : "directed"; - const { fromEndpoint, toEndpoint } = normalizeEdgeEndpoints({ - directionality, - fromEndpoint: declaredFromEndpoint, - toEndpoint: declaredToEndpoint, - }); - const edgeId = symbolRefFromOption(edgeOption.id, { - namespace: defaults.schemaNamespace, - name: `${type.name}.${field.name}`, - version: defaults.schemaVersion, - }); - const fallbackToClass = toEndpoint.class ?? { - namespace: "", - name: "", - version: "", - }; - return [ - { - id: edgeId, - directionality, - sourceField: fromEndpoint.projection, - fromClass: fromEndpoint.class ?? classId, - toClass: fallbackToClass, - cardinality: fromEndpoint.cardinality, - ...(toEndpoint.projection - ? { inverse: toEndpoint.projection } - : {}), - fields: [], - fromEndpoint, - toEndpoint, - declaringClass: classId, - tags: symbolArrayFromOption(edgeOption.tag, defaults), - implements: symbolArrayFromOption(edgeOption.implements, defaults), - }, - ]; - }); - const methods = getReflectionOptions(type, METHOD_OPTION) - .map(asObject) - .filter((option) => Boolean(option)) - .map((option) => { - const name = readString(option, "name"); - if (!name) { - throw new Error(`Method option on ${type.fullName} requires name`); - } - return { - name, - function: functionRefFromOption(option.function), - }; - }); - const migrations = getReflectionOptions(type, MIGRATION_OPTION) - .map(asObject) - .filter((option) => Boolean(option)) - .map((option) => { - const fromVersion = readNumber(option, "from_version"); - const toVersion = readNumber(option, "to_version"); - if (!fromVersion || !toVersion) { - throw new Error(`Migration option on ${type.fullName} requires versions`); - } - return { - fromVersion, - toVersion, - function: functionRefFromOption(option.function), - }; - }); - const constructorOption = asObject(getReflectionOption(type, CONSTRUCTOR_OPTION)); - const constructorSpec = constructorOption - ? { function: functionRefFromOption(constructorOption.function) } - : undefined; - return { - id: classId, - version: classVersion, - fields, - edges, - methods, - migrations, - operationServices, - implements: getReflectionOptions(type, IMPLEMENTS_OPTION).map((option) => interfaceImplementationFromOption(option, defaults)), - ...(constructorSpec ? { constructorSpec } : {}), - sourceFile, - protoMessage: type.fullName, - }; -}; -const interfaceSchemaFromType = (type, sourceFile, defaults) => { - const interfaceOption = asObject(getReflectionOption(type, INTERFACE_OPTION)); - if (!interfaceOption) { - return undefined; - } - const classOption = asObject(getReflectionOption(type, CLASS_OPTION)); - if (classOption) { - throw new Error(`${type.fullName} cannot be both a Camino class and interface`); - } - const fallbackInterfaceRef = { - namespace: defaults.schemaNamespace, - name: type.name, - version: defaults.schemaVersion, - }; - const interfaceId = symbolRefFromOption(interfaceOption.id, fallbackInterfaceRef); - const interfaceVersion = readNumber(interfaceOption, "version") ?? Number(interfaceId.version); - if (!Number.isInteger(interfaceVersion) || interfaceVersion <= 0) { - throw new Error(`Interface ${type.fullName} has invalid Camino interface version`); - } - return { - id: interfaceId, - version: interfaceVersion, - fields: type.fieldsArray.map((field) => fieldSchemaFromField(field, defaults.schemaVersion)), - sourceFile, - protoMessage: type.fullName, - typeParameters: asArray(interfaceOption.type_parameter) - .map((entry) => String(entry).trim()) - .filter(Boolean), - }; -}; -const walkTypes = (namespace, visit) => { - for (const nested of namespace.nestedArray) { - if (nested instanceof protobuf.Type) { - visit(nested); - walkTypes(nested, visit); - } - else if (nested instanceof protobuf.Namespace) { - walkTypes(nested, visit); - } - } -}; -const walkServices = (namespace, visit) => { - for (const nested of namespace.nestedArray) { - if (nested instanceof protobuf.Service) { - visit(nested); - } - else if (nested instanceof protobuf.Namespace) { - walkServices(nested, visit); - } - } -}; -export const loadCaminoSchemaRoot = async (sourceFile) => { - const absoluteSourceFile = path.resolve(sourceFile); - const root = new protobuf.Root(); - const envIncludeDirs = [ - process.env.QUIXOS_PROTO_PATH, - process.env.CAMINO_PROTO_PATH, - ] - .filter((value) => Boolean(value)) - .join(path.delimiter) - .split(path.delimiter) - .map((entry) => entry.trim()) - .filter(Boolean) - .map((entry) => path.resolve(entry)); - const includeDirs = [ - path.dirname(absoluteSourceFile), - path.resolve("../../quixos-protocol/proto"), - path.resolve("quixos-protocol/proto"), - path.resolve("proto"), - ...envIncludeDirs, - ]; - root.resolvePath = (origin, target) => { - if (path.isAbsolute(target) && fs.existsSync(target)) { - return target; - } - const originDir = origin ? path.dirname(origin) : undefined; - const candidates = [ - ...(originDir ? [path.resolve(originDir, target)] : []), - ...includeDirs.map((dir) => path.resolve(dir, target)), - ]; - const found = candidates.find((candidate) => fs.existsSync(candidate)); - return found ?? target; - }; - await root.load(absoluteSourceFile, { keepCase: true }); - root.resolveAll(); - return { absoluteSourceFile, root }; -}; -export const compileCaminoSchema = async (sourceFile) => { - const { absoluteSourceFile, root } = await loadCaminoSchemaRoot(sourceFile); - const defaults = extractFileDefaults(absoluteSourceFile); - const operationServices = []; - walkServices(root, (service) => { - operationServices.push(operationServiceFromService(service, defaults.schemaVersion)); - }); - const classes = []; - const interfaces = []; - walkTypes(root, (type) => { - const interfaceSchema = interfaceSchemaFromType(type, absoluteSourceFile, defaults); - if (interfaceSchema) { - interfaces.push(interfaceSchema); - } - const classSchema = classSchemaFromType(type, absoluteSourceFile, defaults, operationServices); - if (classSchema) { - classes.push(classSchema); - } - }); - return { - sourceFile: absoluteSourceFile, - classes, - interfaces, - }; -}; diff --git a/dist/schema-ir.d.ts b/dist/schema-ir.d.ts deleted file mode 100644 index d7e7c5e..0000000 --- a/dist/schema-ir.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -export type SymbolRef = { - namespace: string; - name: string; - version: string; - hash?: string; -}; -export type FunctionRef = { - packageNamespace: string; - packageName: string; - symbol: string; - operation?: string; - versionRef?: string; -}; -export type ConflictStrategy = "replace" | "preserve_conflicts" | "crdt"; -export type Cardinality = "optional_one" | "exactly_one" | "many" | "many_unique" | "many_ordered" | "many_unique_ordered"; -export type EdgeDirectionality = "directed" | "undirected"; -export type EdgeMaterialization = { - class: SymbolRef; - connectProjection: string; -}; -export type FieldStorageKind = "stored" | "derived" | "lazy" | "external" | "static_final"; -export type FieldStorage = { - kind: FieldStorageKind; - resolver?: FunctionRef; - cache: boolean; -}; -export type FieldOps = { - implementation: "service"; - service: string; -}; -export type TypeRef = { - protoType: string; - symbol?: SymbolRef; - enumValues?: string[]; -}; -export type TypeBinding = { - name: string; - type: TypeRef; -}; -export type InterfaceFieldContract = { - required: boolean; - readable: boolean; - writable: boolean; - watchable: boolean; - typeParam?: string; - type?: TypeRef; - refTargetTypeParam?: string; - edgeCardinality?: Cardinality; -}; -export type InterfaceImplementation = { - interface: SymbolRef; - typeBindings: TypeBinding[]; -}; -export type FieldSchema = { - name: string; - tag: number; - type: TypeRef; - conflict: ConflictStrategy; - repeated: boolean; - optional: boolean; - storage: FieldStorage; - ops?: FieldOps; - interfaceContract?: InterfaceFieldContract; - isDisplayLabel: boolean; -}; -export type EdgeEndpointSchema = { - class?: SymbolRef; - interface?: SymbolRef; - projection: string; - cardinality: Cardinality; - indexed: boolean; - materialization?: EdgeMaterialization; -}; -export type EdgeSchema = { - id: SymbolRef; - directionality: EdgeDirectionality; - sourceField: string; - fromClass: SymbolRef; - toClass: SymbolRef; - cardinality: Cardinality; - inverse?: string; - fields: FieldSchema[]; - fromEndpoint: EdgeEndpointSchema; - toEndpoint: EdgeEndpointSchema; - declaringClass: SymbolRef; - tags: SymbolRef[]; - implements: SymbolRef[]; -}; -export type MethodSchema = { - name: string; - function: FunctionRef; -}; -export type MigrationSpec = { - fromVersion: number; - toVersion: number; - function: FunctionRef; -}; -export type ConstructorSpec = { - function: FunctionRef; -}; -export type OperationSchema = { - name: string; - inputType: TypeRef; - outputType: TypeRef; - function: FunctionRef; -}; -export type OperationServiceSchema = { - name: string; - fullName: string; - operations: OperationSchema[]; -}; -export type ClassSchema = { - id: SymbolRef; - version: number; - fields: FieldSchema[]; - edges: EdgeSchema[]; - methods: MethodSchema[]; - migrations: MigrationSpec[]; - operationServices: OperationServiceSchema[]; - implements: InterfaceImplementation[]; - constructorSpec?: ConstructorSpec; - sourceFile: string; - protoMessage: string; -}; -export type InterfaceSchema = { - id: SymbolRef; - version: number; - fields: FieldSchema[]; - sourceFile: string; - protoMessage: string; - typeParameters: string[]; -}; -export type SchemaCompileResult = { - sourceFile: string; - classes: ClassSchema[]; - interfaces: InterfaceSchema[]; -}; -//# sourceMappingURL=schema-ir.d.ts.map \ No newline at end of file diff --git a/dist/schema-ir.d.ts.map b/dist/schema-ir.d.ts.map deleted file mode 100644 index 0cae2a6..0000000 --- a/dist/schema-ir.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"schema-ir.d.ts","sourceRoot":"","sources":["../src/schema-ir.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,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;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B,CAAC"} \ No newline at end of file diff --git a/dist/schema-ir.js b/dist/schema-ir.js deleted file mode 100644 index cb0ff5c..0000000 --- a/dist/schema-ir.js +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/flake.lock b/flake.lock index 44e5eb3..efb5f32 100644 --- a/flake.lock +++ b/flake.lock @@ -74,17 +74,17 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1784395768, - "narHash": "sha256-g03xOnzJHiL/edNV6nqURtaPqiapq2uCm7wQTZh4b5s=", - "ref": "refs/heads/exported", - "rev": "e6b34535afa6e94a118e1f9d082054855e7df632", - "revCount": 24, + "lastModified": 1788571750, + "narHash": "sha256-y7ybGRo9U+cJ1Ol+hc62URVlg6MBQCQwIy848IzGKDg=", + "ref": "refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422", + "rev": "4d527898076eb6aa1151bcaab7dfbb447e3fa422", + "revCount": 32, "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git" }, "original": { - "ref": "refs/heads/exported", - "rev": "e6b34535afa6e94a118e1f9d082054855e7df632", + "ref": "refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422", + "rev": "4d527898076eb6aa1151bcaab7dfbb447e3fa422", "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git" } @@ -92,17 +92,17 @@ "quixosNixHelpers": { "flake": false, "locked": { - "lastModified": 1783914102, - "narHash": "sha256-A9EnXxKaODNrSUpw1IlUBR8fe4px5I+wNJFUFGbZY7c=", - "ref": "refs/heads/exported", - "rev": "1f0c39b01501d646fe97dfc6e5777ccab0bde2f1", - "revCount": 6, + "lastModified": 1788543053, + "narHash": "sha256-3YReATWEVxZinYVi/l3cwOz+oFoZUrwj24kUBQTmUpQ=", + "ref": "refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a", + "rev": "56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a", + "revCount": 8, "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git" }, "original": { - "ref": "refs/heads/exported", - "rev": "1f0c39b01501d646fe97dfc6e5777ccab0bde2f1", + "ref": "refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a", + "rev": "56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a", "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git" } diff --git a/flake.nix b/flake.nix index 2e3bdf2..666fc0f 100644 --- a/flake.nix +++ b/flake.nix @@ -4,9 +4,9 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; - quixos-protocol.url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git?ref=refs/heads/exported&rev=e6b34535afa6e94a118e1f9d082054855e7df632"; + quixos-protocol.url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git?ref=refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422&rev=4d527898076eb6aa1151bcaab7dfbb447e3fa422"; quixosNixHelpers = { - url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/heads/exported&rev=1f0c39b01501d646fe97dfc6e5777ccab0bde2f1"; + url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a&rev=56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a"; flake = false; }; }; diff --git a/package.json b/package.json index cc979ed..98e032a 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,10 @@ "name": "@quixos/camino-package-runtime", "version": "0.1.0", "private": true, - "packageManager": "yarn@4.14.1", + "packageManager": "yarn@4.18.0", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", - "bin": { - "camino-codegen-ts-runtime": "dist/codegen-ts-runtime.js" - }, "exports": { ".": { "types": "./dist/index.d.ts", @@ -16,21 +13,19 @@ } }, "scripts": { - "build": "yarn generate && tsc -p tsconfig.json", - "generate": "rm -rf src/camino src/quixos && protoc --es_out=src --es_opt=target=ts,import_extension=js --proto_path=$QUIXOS_PROTO_PATH quixos/refs.proto quixos/runtime.proto camino/schema.proto camino/api.proto", - "typecheck": "yarn generate && tsc --noEmit" + "build": "rm -rf dist && yarn generate && tsc -p tsconfig.json", + "generate": "rm -rf src/camino src/quixos && protoc --experimental_allow_proto3_optional --es_out=src --es_opt=target=ts,import_extension=js --proto_path=$QUIXOS_PROTO_PATH quixos/refs.proto quixos/runtime.proto quixos/orch.proto quixos/package.proto camino/schema.proto camino/api.proto", + "typecheck": "yarn generate && tsc --noEmit", + "test": "yarn build && node --test test/*.test.mjs" }, "dependencies": { - "@automerge/automerge": "^3.3.0", "@bufbuild/protobuf": "^2.12.1", "@connectrpc/connect": "^2.1.2", - "@connectrpc/connect-node": "^2.1.2", - "@quixos/camino-datatypes": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-datatypes.git#commit=70f9f45eb7ca23643f1b8220a203d7b3b7aa5bf4", - "protobufjs": "^7.5.4" + "@connectrpc/connect-node": "^2.1.2" }, "devDependencies": { "@bufbuild/protoc-gen-es": "^2.12.1", "@types/node": "^24", - "typescript": "^5.9.3" + "typescript": "^7.0.2" } } diff --git a/src/camino/api_pb.ts b/src/camino/api_pb.ts index b578aa6..f9ec35d 100644 --- a/src/camino/api_pb.ts +++ b/src/camino/api_pb.ts @@ -4,108 +4,15 @@ 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 type { PersistencePlan } 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("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iLAoVUmVnaXN0ZXJTY2hlbWFSZXF1ZXN0EhMKC3NvdXJjZV9maWxlGAEgASgJIlEKFlJlZ2lzdGVyU2NoZW1hUmVzcG9uc2USEQoJY2xhc3NfaWRzGAEgAygJEiQKB2NsYXNzZXMYAiADKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiFAoSTGlzdENsYXNzZXNSZXF1ZXN0IkIKD1JlZ2lzdGVyZWRDbGFzcxIKCgJpZBgBIAEoCRIjCgZzY2hlbWEYAiABKAsyEy5jYW1pbm8uQ2xhc3NTY2hlbWEiPwoTTGlzdENsYXNzZXNSZXNwb25zZRIoCgdjbGFzc2VzGAEgAygLMhcuY2FtaW5vLlJlZ2lzdGVyZWRDbGFzcyILCglOdWxsVmFsdWUifAoLT2JqZWN0VmFsdWUSLwoGZmllbGRzGAEgAygLMh8uY2FtaW5vLk9iamVjdFZhbHVlLkZpZWxkc0VudHJ5GjwKC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZToCOAEiKgoJTGlzdFZhbHVlEh0KBnZhbHVlcxgBIAMoCzINLmNhbWluby5WYWx1ZSIdCghSZWZWYWx1ZRIRCglvYmplY3RfaWQYASABKAkiPAoJQ3JkdFZhbH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mVzb2x2ZUVkZ2VSZXNwb25zZRJDCgpSZW1vdmVFZGdlEhkuY2FtaW5vLlJlbW92ZUVkZ2VSZXF1ZXN0GhouY2FtaW5vLlJlbW92ZUVkZ2VSZXNwb25zZRI6CgdMaXN0T3BzEhYuY2FtaW5vLkxpc3RPcHNSZXF1ZXN0GhcuY2FtaW5vLkxpc3RPcHNSZXNwb25zZRJFCgtXYXRjaE9iamVjdBIaLmNhbWluby5XYXRjaE9iamVjdFJlcXVlc3QaGC5jYW1pbm8uV2F0Y2hPYmplY3RFdmVudDABYgZwcm90bzM", [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); + fileDesc("ChBjYW1pbm8vYXBpLnByb3RvEgZjYW1pbm8iCwoJTnVsbFZhbHVlInwKC09iamVjdFZhbHVlEi8KBmZpZWxkcxgBIAMoCzIfLmNhbWluby5PYmplY3RWYWx1ZS5GaWVsZHNFbnRyeRo8CgtGaWVsZHNFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBIioKCUxpc3RWYWx1ZRIdCgZ2YWx1ZXMYASADKAsyDS5jYW1pbm8uVmFsdWUiHQoIUmVmVmFsdWUSEQoJb2JqZWN0X2lkGAEgASgJIjwKCUNyZHRWYWx1ZRIMCgR0eXBlGAEgASgJEhAKCGVuY29kaW5nGAIgASgJEg8KB3BheWxvYWQYAyABKAwiqAEKEFN0YXRlVmFsdWVTb3VyY2USEQoJb2JqZWN0X2lkGAEgASgJEg8KB3Nsb3RfaWQYAiABKAkSFwoPdmFsdWVfdHlwZV9qc29uGAMgASgJEhsKE3N0b3JhZ2VfcG9saWN5X2pzb24YBCABKAkSEAoIcmV2aXNpb24YBSABKAQSKAoNY3JkdF9zbmFwc2hvdBgGIAEoCzIRLmNhbWluby5DcmR0VmFsdWUiNgoLVmFsdWVTb3VyY2USJwoFc3RhdGUYASABKAsyGC5jYW1pbm8uU3RhdGVW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RlT2JqZWN0UmVzcG9uc2USQAoJR2V0T2JqZWN0EhguY2FtaW5vLkdldE9iamVjdFJlcXVlc3QaGS5jYW1pbm8uR2V0T2JqZWN0UmVzcG9uc2USRgoLTGlzdE9iamVjdHMSGi5jYW1pbm8uTGlzdE9iamVjdHNSZXF1ZXN0GhsuY2FtaW5vLkxpc3RPYmplY3RzUmVzcG9uc2USQAoJUmVhZFN0YXRlEhguY2FtaW5vLlJlYWRTdGF0ZVJlcXVlc3QaGS5jYW1pbm8uUmVhZFN0YXRlUmVzcG9uc2USQwoKV3JpdGVTdGF0ZRIZLmNhbWluby5Xcml0ZVN0YXRlUmVxdWVzdBoaLmNhbWluby5Xcml0ZVN0YXRlUmVzcG9uc2USRgoLQ29ubmVjdEVkZ2USGi5jYW1pbm8uQ29ubmVjdEVkZ2VSZXF1ZXN0GhsuY2FtaW5vLkNvbm5lY3RFZGdlUmVzcG9uc2USRgoLUmVzb2x2ZUVkZ2USGi5jYW1pbm8uUmVzb2x2ZUVkZ2VSZXF1ZXN0GhsuY2FtaW5vLlJlc29sdmVFZGdlUmVzcG9uc2USTwoORGlzY29ubmVjdEVkZ2USHS5jYW1pbm8uRGlzY29ubmVjdEVkZ2VSZXF1ZXN0Gh4uY2FtaW5vLkRpc2Nvbm5lY3RFZGdlUmVzcG9uc2USOgoHTGlzdE9wcxIWLmNhbWluby5MaXN0T3BzUmVxdWVzdBoXLmNhbWluby5MaXN0T3BzUmVzcG9uc2USRQoLV2F0Y2hPYmplY3QSGi5jYW1pbm8uV2F0Y2hPYmplY3RSZXF1ZXN0GhguY2FtaW5vLldhdGNoT2JqZWN0RXZlbnQwAWIGcHJvdG8z", [file_camino_schema]); /** * @generated from message camino.NullValue @@ -118,7 +25,7 @@ export type NullValue = Message<"camino.NullValue"> & { * Use `create(NullValueSchema)` to create a new message. */ export const NullValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 5); + messageDesc(file_camino_api, 0); /** * @generated from message camino.ObjectValue @@ -135,7 +42,7 @@ export type ObjectValue = Message<"camino.ObjectValue"> & { * Use `create(ObjectValueSchema)` to create a new message. */ export const ObjectValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 6); + messageDesc(file_camino_api, 1); /** * @generated from message camino.ListValue @@ -152,7 +59,7 @@ export type ListValue = Message<"camino.ListValue"> & { * Use `create(ListValueSchema)` to create a new message. */ export const ListValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 7); + messageDesc(file_camino_api, 2); /** * @generated from message camino.RefValue @@ -169,7 +76,7 @@ export type RefValue = Message<"camino.RefValue"> & { * Use `create(RefValueSchema)` to create a new message. */ export const RefValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 8); + messageDesc(file_camino_api, 3); /** * @generated from message camino.CrdtValue @@ -196,58 +103,62 @@ export type CrdtValue = Message<"camino.CrdtValue"> & { * Use `create(CrdtValueSchema)` to create a new message. */ export const CrdtValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 9); + messageDesc(file_camino_api, 4); /** - * @generated from message camino.FieldValueSource + * @generated from message camino.StateValueSource */ -export type FieldValueSource = Message<"camino.FieldValueSource"> & { +export type StateValueSource = Message<"camino.StateValueSource"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; /** - * @generated from field: string field_type = 3; + * @generated from field: string value_type_json = 3; */ - fieldType: string; + valueTypeJson: string; /** - * @generated from field: string field_storage = 4; + * @generated from field: string storage_policy_json = 4; */ - fieldStorage: string; + storagePolicyJson: string; /** - * @generated from field: string conflict_strategy = 5; - */ - conflictStrategy: string; - - /** - * @generated from field: uint64 revision = 6; + * @generated from field: uint64 revision = 5; */ revision: bigint; + + /** + * CRDT-backed state is still read as its materialized Value. The snapshot + * travels with the writable source identity so a client can retain and + * advance a local replica without exposing the document to package code. + * + * @generated from field: camino.CrdtValue crdt_snapshot = 6; + */ + crdtSnapshot?: CrdtValue | undefined; }; /** - * Describes the message camino.FieldValueSource. - * Use `create(FieldValueSourceSchema)` to create a new message. + * Describes the message camino.StateValueSource. + * Use `create(StateValueSourceSchema)` to create a new message. */ -export const FieldValueSourceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 10); +export const StateValueSourceSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 5); /** * @generated from message camino.ValueSource */ export type ValueSource = Message<"camino.ValueSource"> & { /** - * @generated from field: camino.FieldValueSource field = 1; + * @generated from field: camino.StateValueSource state = 1; */ - field?: FieldValueSource | undefined; + state?: StateValueSource | undefined; }; /** @@ -255,7 +166,7 @@ export type ValueSource = Message<"camino.ValueSource"> & { * Use `create(ValueSourceSchema)` to create a new message. */ export const ValueSourceSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 11); + messageDesc(file_camino_api, 6); /** * @generated from message camino.Value @@ -337,21 +248,85 @@ export type Value = Message<"camino.Value"> & { * Use `create(ValueSchema)` to create a new message. */ export const ValueSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 12); + messageDesc(file_camino_api, 7); + +/** + * @generated from message camino.InstallPersistencePlanRequest + */ +export type InstallPersistencePlanRequest = Message<"camino.InstallPersistencePlanRequest"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.InstallPersistencePlanRequest. + * Use `create(InstallPersistencePlanRequestSchema)` to create a new message. + */ +export const InstallPersistencePlanRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 8); + +/** + * @generated from message camino.InstallPersistencePlanResponse + */ +export type InstallPersistencePlanResponse = Message<"camino.InstallPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.InstallPersistencePlanResponse. + * Use `create(InstallPersistencePlanResponseSchema)` to create a new message. + */ +export const InstallPersistencePlanResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 9); + +/** + * @generated from message camino.GetPersistencePlanRequest + */ +export type GetPersistencePlanRequest = Message<"camino.GetPersistencePlanRequest"> & { +}; + +/** + * Describes the message camino.GetPersistencePlanRequest. + * Use `create(GetPersistencePlanRequestSchema)` to create a new message. + */ +export const GetPersistencePlanRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 10); + +/** + * @generated from message camino.GetPersistencePlanResponse + */ +export type GetPersistencePlanResponse = Message<"camino.GetPersistencePlanResponse"> & { + /** + * @generated from field: camino.PersistencePlan plan = 1; + */ + plan?: PersistencePlan | undefined; +}; + +/** + * Describes the message camino.GetPersistencePlanResponse. + * Use `create(GetPersistencePlanResponseSchema)` to create a new message. + */ +export const GetPersistencePlanResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 11); /** * @generated from message camino.CreateObjectRequest */ export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; /** - * @generated from field: map fields = 2; + * @generated from field: map initial_state = 2; */ - fields: { [key: string]: Value }; + initialState: { [key: string]: Value }; }; /** @@ -359,7 +334,7 @@ export type CreateObjectRequest = Message<"camino.CreateObjectRequest"> & { * Use `create(CreateObjectRequestSchema)` to create a new message. */ export const CreateObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 13); + messageDesc(file_camino_api, 12); /** * @generated from message camino.CreateObjectResponse @@ -376,7 +351,7 @@ export type CreateObjectResponse = Message<"camino.CreateObjectResponse"> & { * Use `create(CreateObjectResponseSchema)` to create a new message. */ export const CreateObjectResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 14); + messageDesc(file_camino_api, 13); /** * @generated from message camino.GetObjectRequest @@ -393,7 +368,7 @@ export type GetObjectRequest = Message<"camino.GetObjectRequest"> & { * Use `create(GetObjectRequestSchema)` to create a new message. */ export const GetObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 15); + messageDesc(file_camino_api, 14); /** * @generated from message camino.GetObjectResponse @@ -410,16 +385,16 @@ export type GetObjectResponse = Message<"camino.GetObjectResponse"> & { * Use `create(GetObjectResponseSchema)` to create a new message. */ export const GetObjectResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 16); + messageDesc(file_camino_api, 15); /** * @generated from message camino.ListObjectsRequest */ export type ListObjectsRequest = Message<"camino.ListObjectsRequest"> & { /** - * @generated from field: string class_id = 1; + * @generated from field: string atom_id = 1; */ - classId: string; + atomId: string; }; /** @@ -427,7 +402,7 @@ export type ListObjectsRequest = Message<"camino.ListObjectsRequest"> & { * Use `create(ListObjectsRequestSchema)` to create a new message. */ export const ListObjectsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 17); + messageDesc(file_camino_api, 16); /** * @generated from message camino.ListObjectsResponse @@ -444,21 +419,60 @@ export type ListObjectsResponse = Message<"camino.ListObjectsResponse"> & { * Use `create(ListObjectsResponseSchema)` to create a new message. */ export const ListObjectsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 18); + messageDesc(file_camino_api, 17); /** - * @generated from message camino.SetFieldRequest + * @generated from message camino.ReadStateRequest */ -export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { +export type ReadStateRequest = Message<"camino.ReadStateRequest"> & { /** * @generated from field: string object_id = 1; */ objectId: string; /** - * @generated from field: string field_name = 2; + * @generated from field: string slot_id = 2; */ - fieldName: string; + slotId: string; +}; + +/** + * Describes the message camino.ReadStateRequest. + * Use `create(ReadStateRequestSchema)` to create a new message. + */ +export const ReadStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 18); + +/** + * @generated from message camino.ReadStateResponse + */ +export type ReadStateResponse = Message<"camino.ReadStateResponse"> & { + /** + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; +}; + +/** + * Describes the message camino.ReadStateResponse. + * Use `create(ReadStateResponseSchema)` to create a new message. + */ +export const ReadStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 19); + +/** + * @generated from message camino.WriteStateRequest + */ +export type WriteStateRequest = Message<"camino.WriteStateRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: string slot_id = 2; + */ + slotId: string; /** * @generated from field: camino.Value value = 3; @@ -472,57 +486,62 @@ export type SetFieldRequest = Message<"camino.SetFieldRequest"> & { }; /** - * Describes the message camino.SetFieldRequest. - * Use `create(SetFieldRequestSchema)` to create a new message. + * Describes the message camino.WriteStateRequest. + * Use `create(WriteStateRequestSchema)` to create a new message. */ -export const SetFieldRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 19); +export const WriteStateRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 20); /** - * @generated from message camino.SetFieldResponse + * @generated from message camino.WriteStateResponse */ -export type SetFieldResponse = Message<"camino.SetFieldResponse"> & { +export type WriteStateResponse = Message<"camino.WriteStateResponse"> & { /** - * @generated from field: camino.CaminoObject object = 1; + * @generated from field: camino.Value value = 1; + */ + value?: Value | undefined; + + /** + * @generated from field: camino.CaminoObject object = 2; */ object?: CaminoObject | undefined; }; /** - * Describes the message camino.SetFieldResponse. - * Use `create(SetFieldResponseSchema)` to create a new message. + * Describes the message camino.WriteStateResponse. + * Use `create(WriteStateResponseSchema)` to create a new message. */ -export const SetFieldResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 20); +export const WriteStateResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 21); /** - * @generated from message camino.AddEdgeRequest + * @generated from message camino.ConnectEdgeRequest */ -export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { +export type ConnectEdgeRequest = Message<"camino.ConnectEdgeRequest"> & { /** - * @generated from field: string from_object_id = 1; + * @generated from field: string edge_type_id = 1; */ - fromObjectId: string; + edgeTypeId: string; /** - * @generated from field: string source_field = 2; + * @generated from field: string projection_id = 2; */ - sourceField: string; + projectionId: string; /** - * @generated from field: string to_object_id = 3; + * @generated from field: string object_id = 3; */ - toObjectId: string; + objectId: string; /** - * @generated from field: map fields = 4; + * @generated from field: string target_object_id = 4; */ - fields: { [key: string]: Value }; + targetObjectId: string; /** - * @generated from field: optional int32 source_ordinal = 5; + * @generated from field: optional int32 ordinal = 5; */ - sourceOrdinal?: number | undefined; + ordinal?: number | undefined; /** * @generated from field: optional int32 target_ordinal = 6; @@ -531,16 +550,16 @@ export type AddEdgeRequest = Message<"camino.AddEdgeRequest"> & { }; /** - * Describes the message camino.AddEdgeRequest. - * Use `create(AddEdgeRequestSchema)` to create a new message. + * Describes the message camino.ConnectEdgeRequest. + * Use `create(ConnectEdgeRequestSchema)` to create a new message. */ -export const AddEdgeRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 21); +export const ConnectEdgeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 22); /** - * @generated from message camino.AddEdgeResponse + * @generated from message camino.ConnectEdgeResponse */ -export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { +export type ConnectEdgeResponse = Message<"camino.ConnectEdgeResponse"> & { /** * @generated from field: camino.CaminoEdge edge = 1; */ @@ -548,46 +567,12 @@ export type AddEdgeResponse = Message<"camino.AddEdgeResponse"> & { }; /** - * Describes the message camino.AddEdgeResponse. - * Use `create(AddEdgeResponseSchema)` to create a new message. + * Describes the message camino.ConnectEdgeResponse. + * Use `create(ConnectEdgeResponseSchema)` to create a new message. */ -export const AddEdgeResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 22); - -/** - * @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__*/ +export const ConnectEdgeResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 23); -/** - * @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, 24); - /** * @generated from message camino.ResolveEdgeRequest */ @@ -598,9 +583,14 @@ export type ResolveEdgeRequest = Message<"camino.ResolveEdgeRequest"> & { objectId: string; /** - * @generated from field: string projection = 2; + * @generated from field: string edge_type_id = 2; */ - projection: string; + edgeTypeId: string; + + /** + * @generated from field: string projection_id = 3; + */ + projectionId: string; }; /** @@ -608,7 +598,7 @@ export type ResolveEdgeRequest = Message<"camino.ResolveEdgeRequest"> & { * Use `create(ResolveEdgeRequestSchema)` to create a new message. */ export const ResolveEdgeRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 25); + messageDesc(file_camino_api, 24); /** * @generated from message camino.ResolveEdgeResponse @@ -618,16 +608,6 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { * @generated from field: repeated camino.CaminoEdge edges = 1; */ edges: CaminoEdge[]; - - /** - * @generated from field: camino.CaminoObject materialized_object = 2; - */ - materializedObject?: CaminoObject | undefined; - - /** - * @generated from field: bool created = 3; - */ - created: boolean; }; /** @@ -635,12 +615,29 @@ export type ResolveEdgeResponse = Message<"camino.ResolveEdgeResponse"> & { * Use `create(ResolveEdgeResponseSchema)` to create a new message. */ export const ResolveEdgeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_api, 25); + +/** + * @generated from message camino.DisconnectEdgeRequest + */ +export type DisconnectEdgeRequest = Message<"camino.DisconnectEdgeRequest"> & { + /** + * @generated from field: string edge_id = 1; + */ + edgeId: string; +}; + +/** + * Describes the message camino.DisconnectEdgeRequest. + * Use `create(DisconnectEdgeRequestSchema)` to create a new message. + */ +export const DisconnectEdgeRequestSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 26); /** - * @generated from message camino.RemoveEdgeRequest + * @generated from message camino.DisconnectEdgeResponse */ -export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { +export type DisconnectEdgeResponse = Message<"camino.DisconnectEdgeResponse"> & { /** * @generated from field: string edge_id = 1; */ @@ -648,29 +645,12 @@ export type RemoveEdgeRequest = Message<"camino.RemoveEdgeRequest"> & { }; /** - * Describes the message camino.RemoveEdgeRequest. - * Use `create(RemoveEdgeRequestSchema)` to create a new message. + * Describes the message camino.DisconnectEdgeResponse. + * Use `create(DisconnectEdgeResponseSchema)` to create a new message. */ -export const RemoveEdgeRequestSchema: GenMessage = /*@__PURE__*/ +export const DisconnectEdgeResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_api, 27); -/** - * @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, 28); - /** * @generated from message camino.ListOpsRequest */ @@ -686,7 +666,7 @@ export type ListOpsRequest = Message<"camino.ListOpsRequest"> & { * Use `create(ListOpsRequestSchema)` to create a new message. */ export const ListOpsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 29); + messageDesc(file_camino_api, 28); /** * @generated from message camino.ListOpsResponse @@ -703,7 +683,7 @@ export type ListOpsResponse = Message<"camino.ListOpsResponse"> & { * Use `create(ListOpsResponseSchema)` to create a new message. */ export const ListOpsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 30); + messageDesc(file_camino_api, 29); /** * @generated from message camino.WatchObjectRequest @@ -730,7 +710,7 @@ export type WatchObjectRequest = Message<"camino.WatchObjectRequest"> & { * Use `create(WatchObjectRequestSchema)` to create a new message. */ export const WatchObjectRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 31); + messageDesc(file_camino_api, 30); /** * @generated from message camino.WatchObjectEvent @@ -757,7 +737,7 @@ export type WatchObjectEvent = Message<"camino.WatchObjectEvent"> & { * Use `create(WatchObjectEventSchema)` to create a new message. */ export const WatchObjectEventSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 32); + messageDesc(file_camino_api, 31); /** * @generated from message camino.CaminoObject @@ -769,14 +749,14 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { id: string; /** - * @generated from field: string class_id = 2; + * @generated from field: string atom_id = 2; */ - classId: string; + atomId: string; /** - * @generated from field: uint32 schema_version = 3; + * @generated from field: string workspace_revision_id = 3; */ - schemaVersion: number; + workspaceRevisionId: string; /** * @generated from field: string created_at = 4; @@ -789,19 +769,14 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { updatedAt: string; /** - * @generated from field: map fields = 6; + * @generated from field: map state = 6; */ - fields: { [key: string]: Value }; + state: { [key: string]: Value }; /** - * @generated from field: map field_revisions = 7; + * @generated from field: map state_revisions = 7; */ - fieldRevisions: { [key: string]: bigint }; - - /** - * @generated from field: map field_conflicts = 8; - */ - fieldConflicts: { [key: string]: string }; + stateRevisions: { [key: string]: bigint }; }; /** @@ -809,7 +784,7 @@ export type CaminoObject = Message<"camino.CaminoObject"> & { * Use `create(CaminoObjectSchema)` to create a new message. */ export const CaminoObjectSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 33); + messageDesc(file_camino_api, 32); /** * @generated from message camino.CaminoEdge @@ -826,81 +801,39 @@ export type CaminoEdge = Message<"camino.CaminoEdge"> & { edgeTypeId: string; /** - * @generated from field: string from_object_id = 3; + * @generated from field: string first_object_id = 3; */ - fromObjectId: string; + firstObjectId: string; /** - * @generated from field: string to_object_id = 4; + * @generated from field: string second_object_id = 4; */ - toObjectId: string; + secondObjectId: string; /** - * Legacy canonical source-side projection fields. Prefer endpoint fields. - * - * @generated from field: string source_field = 5; + * @generated from field: string first_projection_id = 5; */ - sourceField: string; + firstProjectionId: string; /** - * @generated from field: string cardinality = 6; + * @generated from field: string second_projection_id = 6; */ - cardinality: string; + secondProjectionId: string; /** - * @generated from field: string inverse = 7; + * @generated from field: optional int32 first_ordinal = 7; */ - inverse: string; + firstOrdinal?: number | undefined; /** - * @generated from field: map fields = 8; + * @generated from field: optional int32 second_ordinal = 8; */ - fields: { [key: string]: Value }; + secondOrdinal?: number | undefined; /** - * @generated from field: optional int32 from_ordinal = 9; - */ - fromOrdinal?: number | undefined; - - /** - * @generated from field: string created_at = 10; + * @generated from field: string created_at = 9; */ createdAt: string; - - /** - * @generated from field: string updated_at = 11; - */ - updatedAt: string; - - /** - * @generated from field: string from_projection = 12; - */ - fromProjection: string; - - /** - * @generated from field: string to_projection = 13; - */ - toProjection: string; - - /** - * @generated from field: string from_cardinality = 14; - */ - fromCardinality: string; - - /** - * @generated from field: string to_cardinality = 15; - */ - toCardinality: string; - - /** - * @generated from field: optional int32 to_ordinal = 16; - */ - toOrdinal?: number | undefined; - - /** - * @generated from field: string directionality = 17; - */ - directionality: string; }; /** @@ -908,7 +841,7 @@ export type CaminoEdge = Message<"camino.CaminoEdge"> & { * Use `create(CaminoEdgeSchema)` to create a new message. */ export const CaminoEdgeSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 34); + messageDesc(file_camino_api, 33); /** * @generated from message camino.CaminoOp @@ -940,17 +873,12 @@ export type CaminoOp = Message<"camino.CaminoOp"> & { actor: string; /** - * @generated from field: quixos.FunctionRef function_ref = 6; - */ - functionRef?: FunctionRef | undefined; - - /** - * @generated from field: string created_at = 7; + * @generated from field: string created_at = 6; */ createdAt: string; /** - * @generated from field: string client_mutation_id = 8; + * @generated from field: string client_mutation_id = 7; */ clientMutationId: string; }; @@ -960,27 +888,27 @@ export type CaminoOp = Message<"camino.CaminoOp"> & { * Use `create(CaminoOpSchema)` to create a new message. */ export const CaminoOpSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_api, 35); + messageDesc(file_camino_api, 34); /** * @generated from service camino.CaminoService */ export const CaminoService: GenService<{ /** - * @generated from rpc camino.CaminoService.RegisterSchema + * @generated from rpc camino.CaminoService.InstallPersistencePlan */ - registerSchema: { + installPersistencePlan: { methodKind: "unary"; - input: typeof RegisterSchemaRequestSchema; - output: typeof RegisterSchemaResponseSchema; + input: typeof InstallPersistencePlanRequestSchema; + output: typeof InstallPersistencePlanResponseSchema; }, /** - * @generated from rpc camino.CaminoService.ListClasses + * @generated from rpc camino.CaminoService.GetPersistencePlan */ - listClasses: { + getPersistencePlan: { methodKind: "unary"; - input: typeof ListClassesRequestSchema; - output: typeof ListClassesResponseSchema; + input: typeof GetPersistencePlanRequestSchema; + output: typeof GetPersistencePlanResponseSchema; }, /** * @generated from rpc camino.CaminoService.CreateObject @@ -1007,28 +935,28 @@ export const CaminoService: GenService<{ output: typeof ListObjectsResponseSchema; }, /** - * @generated from rpc camino.CaminoService.SetField + * @generated from rpc camino.CaminoService.ReadState */ - setField: { + readState: { methodKind: "unary"; - input: typeof SetFieldRequestSchema; - output: typeof SetFieldResponseSchema; + input: typeof ReadStateRequestSchema; + output: typeof ReadStateResponseSchema; }, /** - * @generated from rpc camino.CaminoService.AddEdge + * @generated from rpc camino.CaminoService.WriteState */ - addEdge: { + writeState: { methodKind: "unary"; - input: typeof AddEdgeRequestSchema; - output: typeof AddEdgeResponseSchema; + input: typeof WriteStateRequestSchema; + output: typeof WriteStateResponseSchema; }, /** - * @generated from rpc camino.CaminoService.ListEdges + * @generated from rpc camino.CaminoService.ConnectEdge */ - listEdges: { + connectEdge: { methodKind: "unary"; - input: typeof ListEdgesRequestSchema; - output: typeof ListEdgesResponseSchema; + input: typeof ConnectEdgeRequestSchema; + output: typeof ConnectEdgeResponseSchema; }, /** * @generated from rpc camino.CaminoService.ResolveEdge @@ -1039,12 +967,12 @@ export const CaminoService: GenService<{ output: typeof ResolveEdgeResponseSchema; }, /** - * @generated from rpc camino.CaminoService.RemoveEdge + * @generated from rpc camino.CaminoService.DisconnectEdge */ - removeEdge: { + disconnectEdge: { methodKind: "unary"; - input: typeof RemoveEdgeRequestSchema; - output: typeof RemoveEdgeResponseSchema; + input: typeof DisconnectEdgeRequestSchema; + output: typeof DisconnectEdgeResponseSchema; }, /** * @generated from rpc camino.CaminoService.ListOps diff --git a/src/camino/schema_pb.ts b/src/camino/schema_pb.ts index f34388a..d783f7b 100644 --- a/src/camino/schema_pb.ts +++ b/src/camino/schema_pb.ts @@ -4,611 +4,147 @@ 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 const file_camino_schema: GenFile = /*@__PURE__*/ - fileDesc("ChNjYW1pbm8vc2NoZW1hLnByb3RvEgZjYW1pbm8iSwoJU3ltYm9sUmVmEhEKCW5hbWVzcGFjZRgBIAEoCRIMCgRuYW1lGAIgASgJEg8KB3ZlcnNpb24YAyABKAkSDAoEaGFzaBgEIAEoCSIYCgNSZWYSEQoJb2JqZWN0X2lkGAEgASgJIg0KC0N1c3RvbUZpZWxkIiQKEFdhdGNoU3RhcnRSZXN1bHQSEAoId2F0Y2hfaWQYASABKAkiJAoQV2F0Y2hTdG9wUmVxdWVzdBIQCgh3YXRjaF9pZBgBIAEoCSIRCg9XYXRjaFN0b3BSZXN1bHQiGwoIQ3JkdFRleHQSDwoHcGF5bG9hZBgBIAEoDCIfCgxDcmR0UmljaFRleHQSDwoHcGF5bG9hZBg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wbGF5X25hbWUYAiABKAkSLgoKY29uc3RyYWludBgDIAEoCzIaLmNhbWluby5FbmRwb2ludENvbnN0cmFpbnQSKAoLY2FyZGluYWxpdHkYBCABKA4yEy5jYW1pbm8uQ2FyZGluYWxpdHkSDwoHb3JkZXJlZBgFIAEoCCKHAQoORWRnZUF0dGFjaG1lbnQSFAoMZWRnZV90eXBlX2lkGAEgASgJEhQKDGRpc3BsYXlfbmFtZRgCIAEoCRIjCgVmaXJzdBgDIAEoCzIULmNhbWluby5FZGdlRW5kcG9pbnQSJAoGc2Vjb25kGAQgASgLMhQuY2FtaW5vLkVkZ2VFbmRwb2ludCLsAQoPUGVyc2lzdGVuY2VQbGFuEhQKDHdvcmtzcGFjZV9pZBgBIAEoCRIdChV3b3Jrc3BhY2VfcmV2aXNpb25faWQYAiABKAkSJQoFYXRvbXMYAyADKAsyFi5jYW1pbm8uQXRvbURlZmluaXRpb24SLQoMY29uZm9ybWFuY2VzGAQgAygLMhcuY2FtaW5vLkF0b21Db25mb3JtYW5jZRInCgZzdGF0ZXMYBSADKAsyFy5jYW1pbm8uU3RhdGVBdHRhY2htZW50EiUKBWVkZ2VzGAYgAygLMhYuY2FtaW5vLkVkZ2VBdHRhY2htZW50KmgKC0NhcmRpbmFsaXR5EhsKF0NBUkRJTkFMSVRZX1VOU1BFQ0lGSUVEEAASEAoMT1BUSU9OQUxfT05FEAESDwoLRVhBQ1RMWV9PTkUQAhIICgRNQU5ZEAMSDwoLTUFOWV9VTklRVUUQBGIGcHJvdG8z"); /** - * @generated from message camino.SymbolRef + * @generated from message camino.AtomDefinition */ -export type SymbolRef = Message<"camino.SymbolRef"> & { +export type AtomDefinition = Message<"camino.AtomDefinition"> & { /** - * @generated from field: string namespace = 1; + * @generated from field: string atom_id = 1; */ - namespace: string; + atomId: string; /** - * @generated from field: string name = 2; + * @generated from field: string display_name = 2; */ - name: string; - - /** - * @generated from field: string version = 3; - */ - version: string; - - /** - * @generated from field: string hash = 4; - */ - hash: string; + displayName: string; }; /** - * Describes the message camino.SymbolRef. - * Use `create(SymbolRefSchema)` to create a new message. + * Describes the message camino.AtomDefinition. + * Use `create(AtomDefinitionSchema)` to create a new message. */ -export const SymbolRefSchema: GenMessage = /*@__PURE__*/ +export const AtomDefinitionSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 0); /** - * @generated from message camino.Ref + * @generated from message camino.AtomConformance */ -export type Ref = Message<"camino.Ref"> & { +export type AtomConformance = Message<"camino.AtomConformance"> & { /** - * @generated from field: string object_id = 1; + * @generated from field: string atom_id = 1; */ - objectId: string; + atomId: string; + + /** + * @generated from field: string interface_revision_id = 2; + */ + interfaceRevisionId: string; }; /** - * Describes the message camino.Ref. - * Use `create(RefSchema)` to create a new message. + * Describes the message camino.AtomConformance. + * Use `create(AtomConformanceSchema)` to create a new message. */ -export const RefSchema: GenMessage = /*@__PURE__*/ +export const AtomConformanceSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 1); /** - * @generated from message camino.CustomField + * @generated from message camino.StateAttachment */ -export type CustomField = Message<"camino.CustomField"> & { +export type StateAttachment = Message<"camino.StateAttachment"> & { + /** + * @generated from field: string slot_id = 1; + */ + slotId: string; + + /** + * @generated from field: string attached_atom_id = 2; + */ + attachedAtomId: string; + + /** + * @generated from field: string display_name = 3; + */ + displayName: string; + + /** + * @generated from field: string value_type_json = 4; + */ + valueTypeJson: string; + + /** + * @generated from field: string storage_policy_json = 5; + */ + storagePolicyJson: string; + + /** + * @generated from field: string default_value_json = 6; + */ + defaultValueJson: string; }; /** - * Describes the message camino.CustomField. - * Use `create(CustomFieldSchema)` to create a new message. + * Describes the message camino.StateAttachment. + * Use `create(StateAttachmentSchema)` to create a new message. */ -export const CustomFieldSchema: GenMessage = /*@__PURE__*/ +export const StateAttachmentSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 2); /** - * @generated from message camino.WatchStartResult + * @generated from message camino.EndpointConstraint */ -export type WatchStartResult = Message<"camino.WatchStartResult"> & { +export type EndpointConstraint = Message<"camino.EndpointConstraint"> & { /** - * @generated from field: string watch_id = 1; + * @generated from oneof camino.EndpointConstraint.kind */ - watchId: string; + kind: { + /** + * @generated from field: string atom_id = 1; + */ + value: string; + case: "atomId"; + } | { + /** + * @generated from field: string interface_revision_id = 2; + */ + value: string; + case: "interfaceRevisionId"; + } | { case: undefined; value?: undefined }; }; /** - * Describes the message camino.WatchStartResult. - * Use `create(WatchStartResultSchema)` to create a new message. + * Describes the message camino.EndpointConstraint. + * Use `create(EndpointConstraintSchema)` to create a new message. */ -export const WatchStartResultSchema: GenMessage = /*@__PURE__*/ +export const EndpointConstraintSchema: GenMessage = /*@__PURE__*/ messageDesc(file_camino_schema, 3); /** - * @generated from message camino.WatchStopRequest + * @generated from message camino.EdgeEndpoint */ -export type WatchStopRequest = Message<"camino.WatchStopRequest"> & { +export type EdgeEndpoint = Message<"camino.EdgeEndpoint"> & { /** - * @generated from field: string watch_id = 1; + * @generated from field: string projection_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[]; - - /** - * @generated from field: repeated camino.InterfaceImplementationSchema implements = 10; - */ - implements: InterfaceImplementationSchema[]; - - /** - * @generated from field: camino.ConstructorSpec constructor = 11; - */ - constructor$?: ConstructorSpec | undefined; -}; - -/** - * 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; - - /** - * @generated from field: camino.InterfaceFieldContract interface_contract = 9; - */ - interfaceContract?: InterfaceFieldContract | undefined; - - /** - * @generated from field: bool is_display_label = 10; - */ - isDisplayLabel: boolean; -}; - -/** - * 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.TypeBinding - */ -export type TypeBinding = Message<"camino.TypeBinding"> & { - /** - * @generated from field: string name = 1; - */ - name: string; - - /** - * @generated from field: camino.TypeRef type = 2; - */ - type?: TypeRef | undefined; -}; - -/** - * Describes the message camino.TypeBinding. - * Use `create(TypeBindingSchema)` to create a new message. - */ -export const TypeBindingSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 13); - -/** - * @generated from message camino.InterfaceFieldContract - */ -export type InterfaceFieldContract = Message<"camino.InterfaceFieldContract"> & { - /** - * @generated from field: bool required = 1; - */ - required: boolean; - - /** - * @generated from field: bool readable = 2; - */ - readable: boolean; - - /** - * @generated from field: bool writable = 3; - */ - writable: boolean; - - /** - * @generated from field: bool watchable = 4; - */ - watchable: boolean; - - /** - * @generated from field: string type_param = 5; - */ - typeParam: string; - - /** - * @generated from field: camino.TypeRef type = 6; - */ - type?: TypeRef | undefined; - - /** - * @generated from field: string ref_target_type_param = 7; - */ - refTargetTypeParam: string; - - /** - * @generated from field: camino.Cardinality edge_cardinality = 8; - */ - edgeCardinality: Cardinality; -}; - -/** - * Describes the message camino.InterfaceFieldContract. - * Use `create(InterfaceFieldContractSchema)` to create a new message. - */ -export const InterfaceFieldContractSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 14); - -/** - * @generated from message camino.InterfaceImplementationSchema - */ -export type InterfaceImplementationSchema = Message<"camino.InterfaceImplementationSchema"> & { - /** - * @generated from field: camino.SymbolRef interface = 1; - */ - interface?: SymbolRef | undefined; - - /** - * @generated from field: repeated camino.TypeBinding type_bindings = 2; - */ - typeBindings: TypeBinding[]; -}; - -/** - * Describes the message camino.InterfaceImplementationSchema. - * Use `create(InterfaceImplementationSchemaSchema)` to create a new message. - */ -export const InterfaceImplementationSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 15); - -/** - * @generated from message camino.InterfaceSchema - */ -export type InterfaceSchema = Message<"camino.InterfaceSchema"> & { - /** - * @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: string source_file = 4; - */ - sourceFile: string; - - /** - * @generated from field: string proto_message = 5; - */ - protoMessage: string; - - /** - * @generated from field: repeated string type_parameters = 6; - */ - typeParameters: string[]; -}; - -/** - * Describes the message camino.InterfaceSchema. - * Use `create(InterfaceSchemaSchema)` to create a new message. - */ -export const InterfaceSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 16); - -/** - * @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, 17); - -/** - * @generated from message camino.EdgeSchema - */ -export type EdgeSchema = Message<"camino.EdgeSchema"> & { - /** - * @generated from field: camino.SymbolRef id = 1; - */ - id?: SymbolRef | undefined; - - /** - * Legacy/source-side projection fields. Prefer from_endpoint/to_endpoint. - * - * @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[]; - - /** - * @generated from field: camino.EdgeEndpointSchema from_endpoint = 8; - */ - fromEndpoint?: EdgeEndpointSchema | undefined; - - /** - * @generated from field: camino.EdgeEndpointSchema to_endpoint = 9; - */ - toEndpoint?: EdgeEndpointSchema | undefined; - - /** - * @generated from field: camino.SymbolRef declaring_class = 10; - */ - declaringClass?: SymbolRef | undefined; - - /** - * @generated from field: repeated camino.SymbolRef tags = 11; - */ - tags: SymbolRef[]; - - /** - * @generated from field: repeated camino.SymbolRef implements = 12; - */ - implements: SymbolRef[]; - - /** - * @generated from field: bool undirected = 13; - */ - undirected: boolean; -}; - -/** - * Describes the message camino.EdgeSchema. - * Use `create(EdgeSchemaSchema)` to create a new message. - */ -export const EdgeSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 18); - -/** - * @generated from message camino.EdgeEndpointSchema - */ -export type EdgeEndpointSchema = Message<"camino.EdgeEndpointSchema"> & { - /** - * @generated from field: camino.SymbolRef class = 1; - */ - class?: SymbolRef | undefined; + projectionId: string; /** - * @generated from field: camino.SymbolRef interface = 2; + * @generated from field: string display_name = 2; */ - interface?: SymbolRef | undefined; + displayName: string; /** - * @generated from field: string projection = 3; + * @generated from field: camino.EndpointConstraint constraint = 3; */ - projection: string; + constraint?: EndpointConstraint | undefined; /** * @generated from field: camino.Cardinality cardinality = 4; @@ -616,232 +152,94 @@ export type EdgeEndpointSchema = Message<"camino.EdgeEndpointSchema"> & { cardinality: Cardinality; /** - * @generated from field: bool indexed = 5; + * @generated from field: bool ordered = 5; */ - indexed: boolean; - - /** - * @generated from field: camino.EdgeMaterialization materialize = 6; - */ - materialize?: EdgeMaterialization | undefined; + ordered: boolean; }; /** - * Describes the message camino.EdgeEndpointSchema. - * Use `create(EdgeEndpointSchemaSchema)` to create a new message. + * Describes the message camino.EdgeEndpoint. + * Use `create(EdgeEndpointSchema)` to create a new message. */ -export const EdgeEndpointSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 19); +export const EdgeEndpointSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 4); /** - * @generated from message camino.EdgeMaterialization + * @generated from message camino.EdgeAttachment */ -export type EdgeMaterialization = Message<"camino.EdgeMaterialization"> & { +export type EdgeAttachment = Message<"camino.EdgeAttachment"> & { /** - * @generated from field: camino.SymbolRef class = 1; + * @generated from field: string edge_type_id = 1; */ - class?: SymbolRef | undefined; + edgeTypeId: string; /** - * @generated from field: string connect_projection = 2; + * @generated from field: string display_name = 2; */ - connectProjection: string; + displayName: string; + + /** + * @generated from field: camino.EdgeEndpoint first = 3; + */ + first?: EdgeEndpoint | undefined; + + /** + * @generated from field: camino.EdgeEndpoint second = 4; + */ + second?: EdgeEndpoint | undefined; }; /** - * Describes the message camino.EdgeMaterialization. - * Use `create(EdgeMaterializationSchema)` to create a new message. + * Describes the message camino.EdgeAttachment. + * Use `create(EdgeAttachmentSchema)` to create a new message. */ -export const EdgeMaterializationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 20); +export const EdgeAttachmentSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 5); /** - * @generated from message camino.MethodSchema + * Camino consumes this persistence-only projection of a checked workspace. + * Interfaces, operation bindings, packages, and constructors stay in orch. + * + * @generated from message camino.PersistencePlan */ -export type MethodSchema = Message<"camino.MethodSchema"> & { +export type PersistencePlan = Message<"camino.PersistencePlan"> & { /** - * @generated from field: string name = 1; + * @generated from field: string workspace_id = 1; */ - name: string; + workspaceId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: string workspace_revision_id = 2; */ - function?: FunctionRef | undefined; + workspaceRevisionId: string; + + /** + * @generated from field: repeated camino.AtomDefinition atoms = 3; + */ + atoms: AtomDefinition[]; + + /** + * @generated from field: repeated camino.AtomConformance conformances = 4; + */ + conformances: AtomConformance[]; + + /** + * @generated from field: repeated camino.StateAttachment states = 5; + */ + states: StateAttachment[]; + + /** + * @generated from field: repeated camino.EdgeAttachment edges = 6; + */ + edges: EdgeAttachment[]; }; /** - * Describes the message camino.MethodSchema. - * Use `create(MethodSchemaSchema)` to create a new message. + * Describes the message camino.PersistencePlan. + * Use `create(PersistencePlanSchema)` to create a new message. */ -export const MethodSchemaSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 21); - -/** - * @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, 22); - -/** - * @generated from message camino.ConstructorSpec - */ -export type ConstructorSpec = Message<"camino.ConstructorSpec"> & { - /** - * @generated from field: quixos.FunctionRef function = 1; - */ - function?: FunctionRef | undefined; -}; - -/** - * Describes the message camino.ConstructorSpec. - * Use `create(ConstructorSpecSchema)` to create a new message. - */ -export const ConstructorSpecSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_camino_schema, 23); - -/** - * @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, 24); - -/** - * @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, 25); - -/** - * @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, 26); - -/** - * @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); +export const PersistencePlanSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_camino_schema, 6); /** * @generated from enum camino.Cardinality @@ -871,109 +269,11 @@ export enum Cardinality { * @generated from enum value: MANY_UNIQUE = 4; */ MANY_UNIQUE = 4, - - /** - * @generated from enum value: MANY_ORDERED = 5; - */ - MANY_ORDERED = 5, - - /** - * @generated from enum value: MANY_UNIQUE_ORDERED = 6; - */ - MANY_UNIQUE_ORDERED = 6, } /** * 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, - - /** - * @generated from enum value: STATIC_FINAL = 5; - */ - STATIC_FINAL = 5, -} - -/** - * 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); + enumDesc(file_camino_schema, 0); diff --git a/src/codegen-ts-runtime.ts b/src/codegen-ts-runtime.ts deleted file mode 100644 index 0d40c8a..0000000 --- a/src/codegen-ts-runtime.ts +++ /dev/null @@ -1,684 +0,0 @@ -#!/usr/bin/env node -import fs from "node:fs"; -import path from "node:path"; -import protobuf from "protobufjs"; -import { - compileCaminoSchema, - loadCaminoSchemaRoot, -} from "./schema-compiler.js"; -import type { - ClassSchema, - FieldSchema, - FunctionRef, - InterfaceImplementation, - TypeRef, -} from "./schema-ir.js"; - -const usage = (): never => { - console.error( - "Usage: camino-codegen-ts-runtime [--react-only] [implementation-import]", - ); - process.exit(1); -}; - -const required = (value: string | undefined) => value ?? usage(); - -const stringLiteral = (value: string) => JSON.stringify(value); - -const upperFirst = (value: string) => - value.length === 0 ? value : `${value[0]?.toUpperCase()}${value.slice(1)}`; - -const lowerFirst = (value: string) => - value.length === 0 ? value : `${value[0]?.toLowerCase()}${value.slice(1)}`; - -const camel = (value: string) => - value - .split(/[^a-zA-Z0-9]+/) - .filter(Boolean) - .map((part, index) => - index === 0 ? lowerFirst(part) : upperFirst(lowerFirst(part)), - ) - .join(""); - -const isIdentifier = (value: string) => /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(value); - -const classId = (schema: ClassSchema) => - `${schema.id.namespace}:${schema.id.name}:${schema.id.version}:${ - schema.id.hash ?? "" - }`; - -const symbolId = (value: { namespace: string; name: string; version: string; hash?: string }) => - `${value.namespace}:${value.name}:${value.version}:${value.hash ?? ""}`; - -const normalizedProtoType = (value: string) => value.replace(/^\./, ""); - -const declarationName = (value: protobuf.Type | protobuf.Enum) => value.name; - -const tsTypeForTypeRef = ( - type: TypeRef, - root?: protobuf.Root, -): string => { - if (type.enumValues && type.enumValues.length > 0) { - return type.enumValues.map(stringLiteral).join(" | "); - } - if (type.symbol) { - return `ObjectRef<${stringLiteral(symbolId(type.symbol))}>`; - } - const protoType = normalizedProtoType(type.protoType); - switch (protoType) { - case "string": - case "google.protobuf.StringValue": - return "string"; - case "bool": - case "google.protobuf.BoolValue": - return "boolean"; - case "double": - case "float": - case "google.protobuf.DoubleValue": - case "google.protobuf.FloatValue": - case "int32": - case "sint32": - case "sfixed32": - case "uint32": - case "fixed32": - case "int64": - case "sint64": - case "sfixed64": - case "uint64": - case "fixed64": - case "google.protobuf.Int32Value": - case "google.protobuf.UInt32Value": - case "google.protobuf.Int64Value": - case "google.protobuf.UInt64Value": - return "number"; - case "bytes": - case "google.protobuf.BytesValue": - return "Uint8Array"; - default: - if (protoType === "google.protobuf.Empty") { - return "Record"; - } - try { - const reflected = root?.lookup(protoType); - if (reflected instanceof protobuf.Type || reflected instanceof protobuf.Enum) { - return declarationName(reflected); - } - } catch { - // Unknown imported message types remain opaque at this codegen boundary. - } - return "unknown"; - } -}; - -const tsTypeForField = (field: FieldSchema, root?: protobuf.Root): string => - tsTypeForTypeRef(field.type, root); - -const tsValueTypeForField = (field: FieldSchema, root?: protobuf.Root) => - field.repeated ? `${tsTypeForField(field, root)}[]` : tsTypeForField(field, root); - -const tsFieldApiType = (field: FieldSchema, root?: protobuf.Root) => - field.conflict === "crdt" - ? `CrdtField<${tsValueTypeForField(field, root)}>` - : `Field<${tsValueTypeForField(field, root)}>`; - -const functionExportName = (fn: FunctionRef, fallback: string) => { - if (isIdentifier(fn.symbol)) { - return fn.symbol; - } - const fallbackName = camel(fallback); - if (isIdentifier(fallbackName)) { - return fallbackName; - } - throw new Error(`Cannot generate TS export name for function ${fn.symbol}`); -}; - -const generatedWarning = `// @generated by camino-codegen-ts-runtime. Do not edit.\n`; - -const scalarTsType = (field: protobuf.Field, root: protobuf.Root): string => { - const primitive = tsTypeForTypeRef({ protoType: field.type }, root); - if (primitive !== "unknown") { - return primitive; - } - const resolved = field.resolvedType; - if (resolved instanceof protobuf.Type || resolved instanceof protobuf.Enum) { - return declarationName(resolved); - } - return "unknown"; -}; - -const collectProtoDeclarations = ( - root: protobuf.Root, - types: TypeRef[], -) => { - const declarations = new Map(); - const visit = (value: protobuf.Type | protobuf.Enum) => { - const key = value.fullName; - if (declarations.has(key)) { - return; - } - declarations.set(key, value); - if (value instanceof protobuf.Type) { - for (const field of value.fieldsArray) { - if ( - field.resolvedType instanceof protobuf.Type || - field.resolvedType instanceof protobuf.Enum - ) { - visit(field.resolvedType); - } - } - } - }; - for (const type of types) { - if (type.symbol || !type.protoType) { - continue; - } - try { - const reflected = root.lookup(normalizedProtoType(type.protoType)); - if (reflected instanceof protobuf.Type || reflected instanceof protobuf.Enum) { - visit(reflected); - } - } catch { - // Opaque imported types are represented as unknown by the generated API. - } - } - return [...declarations.values()] - .map((value) => { - if (value instanceof protobuf.Enum) { - return `export type ${declarationName(value)} = ${Object.keys(value.values) - .map(stringLiteral) - .join(" | ")};`; - } - const fields = value.fieldsArray.map((field) => { - const fieldType = scalarTsType(field, root); - const valueType = field.map - ? `Record` - : field.repeated - ? `${fieldType}[]` - : fieldType; - return ` ${JSON.stringify(field.name)}${field.optional ? "?" : ""}: ${valueType};`; - }); - return `export type ${declarationName(value)} = {\n${fields.join("\n")}\n};`; - }) - .join("\n\n"); -}; - -type FunctionSpec = { - exportName: string; - symbol: string; - operation?: string; - packageNamespace: string; - packageName: string; - field?: { - name: string; - type: string; - storage: string; - conflict: string; - }; -}; - -const fieldTypeId = (field: FieldSchema) => - field.type.symbol ? symbolId(field.type.symbol) : field.type.protoType; - -const crdtStorageTypeId = (field: FieldSchema) => - field.type.protoType || - (field.type.symbol - ? `${field.type.symbol.namespace}.${field.type.symbol.name}` - : fieldTypeId(field)); - -const fieldStorageId = (field: FieldSchema) => - field.ops && field.storage.kind === "stored" ? "derived" : field.storage.kind; - -const interfaceTypeName = (implementation: InterfaceImplementation) => - `${implementation.interface.name}Ref`; - -const renderInterfaceRefTypes = (schema: ClassSchema) => - schema.implements - .map((implementation) => { - const typeParams = implementation.typeBindings.map((binding) => binding.name); - const generic = - typeParams.length > 0 ? `<${typeParams.join(", ")}>` : ""; - const bindings = - typeParams.length > 0 - ? typeParams - .map((param) => ` readonly ${param}: ${param};`) - .join("\n") - : " readonly value: unknown;"; - return `export type ${interfaceTypeName(implementation)}${generic} = ObjectRef & { - readonly $caminoInterfaces: { - readonly ${stringLiteral(symbolId(implementation.interface))}: { -${bindings} - }; - }; -};`; - }) - .join("\n\n"); - -const interfaceMixins = (schema: ClassSchema, root: protobuf.Root) => - schema.implements.map((implementation) => { - const typeArgs = implementation.typeBindings.map((binding) => - tsTypeForTypeRef(binding.type, root), - ); - return `${interfaceTypeName(implementation)}${ - typeArgs.length > 0 ? `<${typeArgs.join(", ")}>` : "" - }`; - }); - -const operationFunctionSpecs = (schema: ClassSchema): FunctionSpec[] => - schema.fields.flatMap((field) => { - const serviceName = field.ops?.service.replace(/^\./, ""); - if (!serviceName) { - return []; - } - const service = schema.operationServices.find( - (candidate) => candidate.fullName === serviceName, - ); - if (!service) { - throw new Error( - `${schema.id.name}.${field.name} points to missing operation service ${field.ops?.service}`, - ); - } - return service.operations.map((operation) => ({ - exportName: functionExportName( - operation.function, - `${field.name}_${operation.name}`, - ), - symbol: operation.function.symbol, - ...(operation.function.operation - ? { operation: operation.function.operation } - : {}), - packageNamespace: operation.function.packageNamespace, - packageName: operation.function.packageName, - field: { - name: field.name, - type: fieldTypeId(field), - storage: fieldStorageId(field), - conflict: field.conflict, - }, - })); - }); - -const renderRuntime = (schema: ClassSchema, root: protobuf.Root) => { - const className = schema.id.name; - const objectTypeName = `${className}Object`; - const refTypeName = `${className}Ref`; - const contextTypeName = `${className}Context`; - const implementationTypeName = `${className}Implementation`; - const serveName = `serve${className}Runtime`; - const createObjectName = `create${className}Object`; - const interfaceRefTypes = renderInterfaceRefTypes(schema); - const refType = - [ `ObjectRef<${stringLiteral(classId(schema))}>`, ...interfaceMixins(schema, root)] - .join(" & "); - const edgeFields = new Set(schema.edges.map((edge) => edge.sourceField)); - const writableFields = schema.fields.filter( - (field) => - field.storage.kind === "stored" && - !field.ops && - !edgeFields.has(field.name), - ); - const functionSpecs = [ - ...(schema.constructorSpec - ? [ - { - exportName: functionExportName( - schema.constructorSpec.function, - "constructor", - ), - symbol: schema.constructorSpec.function.symbol, - ...(schema.constructorSpec.function.operation - ? { operation: schema.constructorSpec.function.operation } - : {}), - packageNamespace: schema.constructorSpec.function.packageNamespace, - packageName: schema.constructorSpec.function.packageName, - }, - ] - : []), - ...schema.methods.map((method) => ({ - exportName: functionExportName(method.function, method.name), - symbol: method.function.symbol, - ...(method.function.operation ? { operation: method.function.operation } : {}), - packageNamespace: method.function.packageNamespace, - packageName: method.function.packageName, - })), - ...schema.fields.flatMap((field) => - field.storage.resolver - ? [ - { - exportName: functionExportName(field.storage.resolver, field.name), - symbol: field.storage.resolver.symbol, - ...(field.storage.resolver.operation - ? { operation: field.storage.resolver.operation } - : {}), - packageNamespace: field.storage.resolver.packageNamespace, - packageName: field.storage.resolver.packageName, - }, - ] - : [], - ), - ...operationFunctionSpecs(schema), - ]; - const firstFunction = functionSpecs[0]; - if (!firstFunction) { - throw new Error(`${schema.id.name} has no runtime functions to generate`); - } - const mixedPackage = functionSpecs.find( - (spec) => - spec.packageNamespace !== firstFunction.packageNamespace || - spec.packageName !== firstFunction.packageName, - ); - if (mixedPackage) { - throw new Error( - `${schema.id.name} points to multiple packages; v0 TS runtime generation expects one package`, - ); - } - - return `${generatedWarning}import { - type CaminoClient, - createCrdtField, - createField, - type CrdtField, - type Field, - type FieldOperation, - type InvokeRequest, - objectRef, - type ObjectRef, - type RuntimeHandler, - serveQuixosPackageRuntime, -} from "@quixos/camino-package-runtime"; - -${collectProtoDeclarations(root, [ - ...writableFields.map((field) => field.type), - ...schema.implements.flatMap((entry) => - entry.typeBindings.map((binding) => binding.type), - ), -])} - -${interfaceRefTypes ? `${interfaceRefTypes}\n\n` : ""}export type ${refTypeName} = ${refType}; - -export type ${objectTypeName} = { - id: ${refTypeName}; -${writableFields - .map( - (field) => - ` ${camel(field.name)}: ${tsFieldApiType(field, root)};`, - ) - .join("\n")} -}; - -export type ${contextTypeName} = { - object: ${objectTypeName}; - camino: CaminoClient; - request: InvokeRequest; -}; - -export type ${implementationTypeName} = { -${functionSpecs - .map((spec) => - spec.operation - ? ` ${spec.exportName}: FieldOperation<${contextTypeName}>;` - : ` ${spec.exportName}: RuntimeHandler<${contextTypeName}>;`, - ) - .filter((line, index, lines) => lines.indexOf(line) === index) - .join("\n")} -}; - -const packageNamespace = ${stringLiteral(firstFunction.packageNamespace)}; -const packageName = ${stringLiteral(firstFunction.packageName)}; -const runtimeProtocolVersion = ${stringLiteral("camino-orch-v0")}; - -const functions = [ -${functionSpecs - .map( - (spec) => - ` { exportName: ${stringLiteral(spec.exportName)}, symbol: ${stringLiteral(spec.symbol)}${ - spec.operation ? `, operation: ${stringLiteral(spec.operation)}` : "" - }${ - spec.field - ? `, field: { name: ${stringLiteral(spec.field.name)}, type: ${stringLiteral(spec.field.type)}, storage: ${stringLiteral(spec.field.storage)}, conflict: ${stringLiteral(spec.field.conflict)} }` - : "" - } },`, - ) - .join("\n")} -] as const; - -export const ${createObjectName} = ( - camino: CaminoClient, - objectId: string, -): ${objectTypeName} => { - const id = objectRef<${stringLiteral(classId(schema))}>(objectId) as ${refTypeName}; - return { - id, -${writableFields - .map( - (fieldSchema) => - fieldSchema.conflict === "crdt" - ? ` ${camel(fieldSchema.name)}: createCrdtField(camino, id, ${stringLiteral(fieldSchema.name)}, ${stringLiteral(crdtStorageTypeId(fieldSchema))}),` - : ` ${camel(fieldSchema.name)}: createField(camino, id, ${stringLiteral(fieldSchema.name)}),`, - ) - .join("\n")} - }; -}; - -export const create${className}Context = ( - camino: CaminoClient, - request: InvokeRequest, -): ${contextTypeName} => ({ - object: ${createObjectName}(camino, request.objectId), - camino, - request, -}); - -export const ${serveName} = (implementation: ${implementationTypeName}) => { - serveQuixosPackageRuntime({ - packageNamespace, - packageName, - runtimeProtocolVersion, - functions, - implementation, - createContext: create${className}Context, - }); -}; -`; -}; - -const implementationNamed = (schema: ClassSchema, name: string) => - schema.implements.find( - (entry) => - entry.interface.namespace === "quixos.react" && - entry.interface.name === name, - ); - -const requiredBinding = ( - implementation: InterfaceImplementation, - name: string, -) => { - const binding = implementation.typeBindings.find((entry) => entry.name === name); - if (!binding) { - throw new Error( - `${implementation.interface.name} implementation is missing ${name}`, - ); - } - return binding.type; -}; - -const renderReactClient = (schema: ClassSchema, root: protobuf.Root) => { - const react = implementationNamed(schema, "ReactComponent"); - const componentFor = implementationNamed(schema, "ReactComponentFor"); - if (!react || !componentFor) { - return undefined; - } - const renderProps = requiredBinding(react, "RenderProps"); - const action = requiredBinding(react, "Action"); - const object = requiredBinding(componentFor, "Object"); - if (!object.symbol) { - throw new Error(`${schema.id.name}.ReactComponentFor.Object must bind a class symbol`); - } - const edge = schema.edges.find((candidate) => candidate.sourceField === "for_object"); - if (!edge) { - throw new Error(`${schema.id.name} must declare its ReactComponentFor edge`); - } - const componentEndpoint = - edge.fromEndpoint.projection === "for_object" - ? edge.fromEndpoint - : edge.toEndpoint.projection === "for_object" - ? edge.toEndpoint - : undefined; - const objectEndpoint = - componentEndpoint === edge.fromEndpoint ? edge.toEndpoint : edge.fromEndpoint; - if (!componentEndpoint || !objectEndpoint.projection) { - throw new Error(`${schema.id.name}.for_object edge has no inverse projection`); - } - if (componentEndpoint.cardinality !== "exactly_one") { - throw new Error(`${schema.id.name}.for_object must have exactly_one cardinality`); - } - if ( - !objectEndpoint.materialization || - symbolId(objectEndpoint.materialization.class) !== symbolId(schema.id) - ) { - throw new Error( - `${schema.id.name}.${objectEndpoint.projection} must materialize ${classId(schema)}`, - ); - } - - const className = schema.id.name; - const componentName = className.endsWith("ReactComponent") - ? `${className.slice(0, -"ReactComponent".length)}Component` - : className; - const propsTypeName = `${componentName}Props`; - const renderPropsType = tsTypeForTypeRef(renderProps, root); - const actionType = tsTypeForTypeRef(action, root); - const objectType = tsTypeForTypeRef(object, root); - const declarations = collectProtoDeclarations(root, [renderProps, action]); - - return `${generatedWarning}import { - createReactComponentFor, - type ReactComponentHostProps, - type ObjectRef, -} from "@quixos/camino-react-runtime"; - -${declarations} - -export type ${propsTypeName} = { - forObject: ${objectType}; -} & ${renderPropsType} & ReactComponentHostProps<${actionType}>; - -export const ${componentName} = createReactComponentFor< - ${objectType}, - ${renderPropsType}, - ${actionType} ->({ - componentClassId: ${stringLiteral(classId(schema))}, - projection: ${stringLiteral(objectEndpoint.projection)}, -}); -`; -}; - -const reactRuntimeDeclaration = `${generatedWarning}declare module "@quixos/camino-react-runtime" { - import type * as AutomergeNamespace from "@automerge/automerge"; - - export type ObjectRef = string & { - readonly $caminoClass: ClassId; - }; - - export type LiveFieldProp = { - value: T; - source: { - objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: string | number | bigint; - }; - }; - - export type ReactComponentHostProps = { - onAction?: (action: Action) => void; - fallback?: unknown; - className?: string; - style?: Record; - onError?: (error: Error) => void; - }; - - export type ReactComponentImplementationProps = { - camino: CaminoProps; - render: RenderProps; - dispatch: (action: Action) => void; - }; - - export const createReactComponentFor: < - ForObject extends ObjectRef, - RenderProps extends object, - Action, - >(config: { - componentClassId: string; - projection: string; - }) => (props: { - forObject: ForObject; - } & RenderProps & ReactComponentHostProps) => any; - - export const callObjectMethod: ( - object: ObjectRef, - methodName: string, - input?: Record, - ) => Promise; - - export const h: (...args: any[]) => any; - export const useLiveField: ( - field: LiveFieldProp, - ) => [T, (value: T) => void | Promise]; - export const Automerge: typeof AutomergeNamespace; -} -`; - -const renderServer = (schema: ClassSchema, implementationImport: string) => { - const className = schema.id.name; - return `${generatedWarning}import * as implementation from ${stringLiteral(implementationImport)}; -import { serve${className}Runtime } from "./${schema.id.namespace}.${className}.runtime.js"; - -serve${className}Runtime(implementation); -`; -}; - -const main = async () => { - const reactOnly = process.argv[2] === "--react-only"; - const offset = reactOnly ? 1 : 0; - const sourceFile = required(process.argv[2 + offset]); - const outDir = required(process.argv[3 + offset]); - const implementationImport = process.argv[4 + offset] ?? "../task.impl.js"; - const compiled = await compileCaminoSchema(sourceFile); - const { root } = await loadCaminoSchemaRoot(sourceFile); - if (compiled.classes.length !== 1) { - throw new Error( - `Expected exactly one Camino class in ${sourceFile}, found ${compiled.classes.length}`, - ); - } - const schema = compiled.classes[0]; - if (!schema) { - throw new Error(`No Camino class found in ${sourceFile}`); - } - fs.mkdirSync(outDir, { recursive: true }); - const baseName = `${schema.id.namespace}.${schema.id.name}`; - const reactClient = renderReactClient(schema, root); - if (!reactOnly) { - fs.writeFileSync( - path.join(outDir, `${baseName}.runtime.ts`), - renderRuntime(schema, root), - ); - fs.writeFileSync( - path.join(outDir, `${baseName}.server.ts`), - renderServer(schema, implementationImport), - ); - } - if (reactClient) { - fs.writeFileSync(path.join(outDir, `${baseName}.react.ts`), reactClient); - fs.writeFileSync( - path.join(outDir, "camino-react-runtime.d.ts"), - reactRuntimeDeclaration, - ); - } else if (reactOnly) { - throw new Error(`${schema.id.name} does not implement ReactComponentFor`); - } -}; - -await main(); diff --git a/src/index.ts b/src/index.ts index c08dfe1..85e9acf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,1134 +1,479 @@ import http from "node:http"; import { AsyncLocalStorage } from "node:async_hooks"; import { randomUUID } from "node:crypto"; -import { create } from "@bufbuild/protobuf"; -import { - createClient, - type Client, - type HandlerContext, - type Interceptor, -} from "@connectrpc/connect"; -import * as Automerge from "@automerge/automerge"; -import { - createAutomergeFieldChanges, - createAutomergeFieldValue, - encodeAutomergeFieldWrite, - loadAutomergeFieldDoc, - type CaminoAutomergeDoc, -} from "@quixos/camino-datatypes/crdt-automerge"; -import { - connectNodeAdapter, - createConnectTransport, -} from "@connectrpc/connect-node"; +import { create, equals } from "@bufbuild/protobuf"; +import { Code, ConnectError, createClient, type Client, type ConnectRouter } from "@connectrpc/connect"; +import { connectNodeAdapter, createConnectTransport } from "@connectrpc/connect-node"; import { CaminoService, CrdtValueSchema, - FieldValueSourceSchema, ListValueSchema, NullValueSchema, ObjectValueSchema, RefValueSchema, ValueSchema, - ValueSourceSchema, type Value, } from "./camino/api_pb.js"; +import { OrchestratorRuntime } from "./quixos/orch_pb.js"; import { DerivedDependencySchema, HandshakeResponseSchema, InvokeResponseSchema, PackageRuntime, WatchEventSchema, - WatchRequestSchema, - type InvokeRequest, - type WatchEvent, - type WatchRequest, } from "./quixos/runtime_pb.js"; -import { FunctionRefSchema } from "./quixos/refs_pb.js"; - -declare const objectRefBrand: unique symbol; - -export type ObjectRef = string & { - readonly [objectRefBrand]: ClassId; -}; +import { CapabilityRefSchema } from "./quixos/refs_pb.js"; export type CaminoClient = Client; +export type OrchClient = Client; -export type { InvokeRequest, Value }; +export type RuntimeDependency = + | { kind: "state"; objectId: string; attachmentId: string } + | { kind: "edge"; objectId: string; attachmentId: string; projectionId: string }; -export type DerivedDependency = - | { - kind: "object"; - objectId: string; - } - | { - kind: "field"; - objectId: string; - fieldName: string; - } - | { - kind: "edges"; - objectId: string; - sourceField?: string; - }; - -type DerivedDependencyTracker = { - record(dependency: DerivedDependency): void; - dependencies(): DerivedDependency[]; +type DependencyScope = { + dependencies: Map; + observe?: (dependency: RuntimeDependency) => Promise; }; -const dependencyKey = (dependency: DerivedDependency) => { - switch (dependency.kind) { - case "object": - return `object:${dependency.objectId}`; - case "field": - return `field:${dependency.objectId}:${dependency.fieldName}`; - case "edges": - return `edges:${dependency.objectId}:${dependency.sourceField ?? ""}`; - } +const dependencyKey = (dependency: RuntimeDependency) => + `${dependency.kind}:${dependency.objectId}:${dependency.attachmentId}:${ + dependency.kind === "edge" ? dependency.projectionId : "" + }`; + +const dependencyScope = new AsyncLocalStorage(); +const recordDependency = async (dependency: RuntimeDependency) => { + const scope = dependencyScope.getStore(); + if (!scope) return; + const key = `${dependency.kind}:${dependency.objectId}:${dependency.attachmentId}:${ + dependency.kind === "edge" ? dependency.projectionId : "" + }`; + scope.dependencies.set(key, dependency); + await scope.observe?.(dependency); }; -const createDependencyTracker = (): DerivedDependencyTracker => { - const dependencies = new Map(); - return { - record(dependency) { - dependencies.set(dependencyKey(dependency), dependency); - }, - dependencies() { - return [...dependencies.values()]; - }, - }; -}; - -const dependencyStorage = new AsyncLocalStorage(); - -export const recordDerivedDependency = (dependency: DerivedDependency) => { - dependencyStorage.getStore()?.record(dependency); -}; - -export const getActiveDerivedDependencies = (): DerivedDependency[] => - dependencyStorage.getStore()?.dependencies() ?? []; - -export const runWithDerivedDependencyTracking = async ( - fn: () => Promise | T, -): Promise<{ value: T; dependencies: DerivedDependency[] }> => { - const tracker = createDependencyTracker(); - const value = await dependencyStorage.run(tracker, fn); - return { - value, - dependencies: tracker.dependencies(), - }; -}; - -const logDerivedDependencies = (dependencies: DerivedDependency[]) => { - if (process.env.QUIXOS_DERIVED_DEPS_LOG !== "1") { - return; - } - process.stderr.write( - `[derived-deps] ${JSON.stringify({ dependencies })}\n`, - ); -}; - -const logDerivedWatch = (event: string, detail: Record) => { - if (process.env.QUIXOS_DERIVED_WATCH_LOG !== "1") { - return; - } - process.stderr.write( - `[derived-watch] ${JSON.stringify({ event, ...detail })}\n`, - ); -}; - -type WatchableContext = { - camino: CaminoClient; - request: InvokeRequest; -}; - -type DerivedWatchEmission = { - watchId: string; - value?: unknown; - dependencies: DerivedDependency[]; - error?: string; - initial: boolean; -}; - -type DerivedWatchSink = { - publish(event: DerivedWatchEmission): void; -}; - -const watchSinkStorage = new AsyncLocalStorage(); - -type ActiveDerivedWatch = { - watchId: string; - context: Context; - get: RuntimeHandler; - sink?: DerivedWatchSink; - controllers: Map; - running: boolean; - pending: boolean; - stopped: boolean; - emitted: boolean; - lastValue: unknown; -}; - -const dependencyObjectIds = (dependencies: DerivedDependency[]) => - new Set(dependencies.map((dependency) => dependency.objectId)); - -const stopDerivedWatch = ( - watch: ActiveDerivedWatch, -) => { - if (watch.stopped) { - return; - } - watch.stopped = true; - for (const controller of watch.controllers.values()) { - controller.abort(); - } - watch.controllers.clear(); - logDerivedWatch("stopped", { watchId: watch.watchId }); -}; - -export type Field = { - get(): Promise; - set(value: T): Promise; -}; - -export type CrdtField = Field> & { - change(fn: (doc: { value: T }) => void): Promise>; - replaceFromJson(value: T): Promise; -}; - -export type LiveFieldValue = { - $caminoValue: T; - $caminoSource: { - field: { - objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: number | string | bigint; - }; - }; -}; - -export const liveFieldValue = (params: { - value: T; - objectId: string; - fieldName: string; - fieldType?: string; - fieldStorage?: string; - conflictStrategy?: string; - revision?: number | string | bigint; -}): LiveFieldValue => ({ - $caminoValue: params.value, - $caminoSource: { - field: { - objectId: params.objectId, - fieldName: params.fieldName, - ...(params.fieldType ? { fieldType: params.fieldType } : {}), - ...(params.fieldStorage ? { fieldStorage: params.fieldStorage } : {}), - ...(params.conflictStrategy - ? { conflictStrategy: params.conflictStrategy } - : {}), - ...(params.revision !== undefined ? { revision: params.revision } : {}), - }, - }, -}); - -export type RuntimeHandler = ( - context: Context, -) => Promise | unknown; - -export type FieldOperation = { - get?: RuntimeHandler; - set?: RuntimeHandler; - watchStart?: RuntimeHandler; - watchStop?: RuntimeHandler; -}; - -export const fieldOps = ( - operation: FieldOperation, -): FieldOperation => operation; - -export const derivedWithDeps = (operation: { - get: RuntimeHandler; -}): FieldOperation => { - type DerivedContext = Context & WatchableContext; - const watches = new Map>(); - - const rerun = async (watch: ActiveDerivedWatch) => { - if (watch.stopped) { - return; - } - if (watch.running) { - watch.pending = true; - return; - } - watch.running = true; - try { - do { - watch.pending = false; - const { value, dependencies } = await runWithDerivedDependencyTracking( - () => watch.get(watch.context), - ); - watch.lastValue = value; - logDerivedDependencies(dependencies); - logDerivedWatch("evaluated", { - watchId: watch.watchId, - value, - dependencies, - }); - watch.sink?.publish({ - watchId: watch.watchId, - value, - dependencies, - initial: !watch.emitted, - }); - watch.emitted = true; - reconcileSubscriptions(watch, dependencies); - } while (watch.pending && !watch.stopped); - } catch (error) { - const message = error instanceof Error ? error.message : String(error); - logDerivedWatch("error", { - watchId: watch.watchId, - error: message, - }); - watch.sink?.publish({ - watchId: watch.watchId, - dependencies: [], - error: message, - initial: !watch.emitted, - }); - watch.emitted = true; - } finally { - watch.running = false; - } - }; - - const scheduleRerun = ( - watch: ActiveDerivedWatch, - reason: string, - ) => { - if (watch.stopped) { - return; - } - logDerivedWatch("scheduled", { watchId: watch.watchId, reason }); - void rerun(watch); - }; - - const startObjectWatch = ( - watch: ActiveDerivedWatch, - objectId: string, - ) => { - const controller = new AbortController(); - watch.controllers.set(objectId, controller); - logDerivedWatch("subscribed", { watchId: watch.watchId, objectId }); - void (async () => { - try { - for await (const event of watch.context.camino.watchObject( - { - objectId, - includeSnapshot: false, - }, - { signal: controller.signal }, - )) { - if (controller.signal.aborted || watch.stopped) { - break; - } - scheduleRerun( - watch, - event.op?.id ? `op:${event.op.id}` : `object:${objectId}`, - ); - } - } catch (error) { - if (!controller.signal.aborted && !watch.stopped) { - logDerivedWatch("watch-error", { - watchId: watch.watchId, - objectId, - error: error instanceof Error ? error.message : String(error), - }); - } - } finally { - if (watch.controllers.get(objectId) === controller) { - watch.controllers.delete(objectId); - logDerivedWatch("unsubscribed", { watchId: watch.watchId, objectId }); - } - } - })(); - }; - - const reconcileSubscriptions = ( - watch: ActiveDerivedWatch, - dependencies: DerivedDependency[], - ) => { - const objectIds = dependencyObjectIds(dependencies); - for (const [objectId, controller] of watch.controllers.entries()) { - if (!objectIds.has(objectId)) { - controller.abort(); - watch.controllers.delete(objectId); - logDerivedWatch("unsubscribed", { watchId: watch.watchId, objectId }); - } - } - for (const objectId of objectIds) { - if (!watch.controllers.has(objectId)) { - startObjectWatch(watch, objectId); - } - } - }; - - return fieldOps({ - async get(context) { - const { value, dependencies } = await runWithDerivedDependencyTracking( - () => operation.get(context), - ); - logDerivedDependencies(dependencies); - return value; - }, - async watchStart(context) { - const watchId = `watch:${randomUUID()}`; - const watch: ActiveDerivedWatch = { - watchId, - context: context as DerivedContext, - get: operation.get as RuntimeHandler, - sink: watchSinkStorage.getStore(), - controllers: new Map(), - running: false, - pending: false, - stopped: false, - emitted: false, - lastValue: undefined, - }; - watches.set(watchId, watch); - logDerivedWatch("started", { watchId }); - await rerun(watch); - return { - watch_id: watchId, - }; - }, - watchStop(context) { - const input = protoFieldsToJs((context as DerivedContext).request.input); - const watchId = - typeof input.watch_id === "string" - ? input.watch_id - : typeof input.watchId === "string" - ? input.watchId - : ""; - const watch = watches.get(watchId); - if (!watch) { - throw new Error(`Unknown derived watch: ${watchId}`); - } - stopDerivedWatch(watch); - watches.delete(watchId); - return {}; - }, - }); -}; - -export type RuntimeFunctionSpec = { - exportName: ExportName; - symbol: string; - operation?: string; - field?: { - name: string; - type?: string; - storage?: string; - conflict?: string; - }; -}; - -class AsyncEventQueue implements AsyncIterableIterator { - private readonly values: T[] = []; - private readonly waiters: Array<(result: IteratorResult) => void> = []; - private closed = false; - - push(value: T) { - if (this.closed) { - return; - } - const waiter = this.waiters.shift(); - if (waiter) { - waiter({ value, done: false }); - return; - } - this.values.push(value); - } - - close() { - if (this.closed) { - return; - } - this.closed = true; - for (const waiter of this.waiters.splice(0)) { - waiter({ value: undefined, done: true }); - } - } - - async next(): Promise> { - const value = this.values.shift(); - if (value !== undefined) { - return { value, done: false }; - } - if (this.closed) { - return { value: undefined, done: true }; - } - return await new Promise>((resolve) => { - this.waiters.push(resolve); - }); - } - - [Symbol.asyncIterator]() { - return this; - } -} - +const bytesToBase64 = (value: Uint8Array) => Buffer.from(value).toString("base64"); +const base64ToBytes = (value: string) => Buffer.from(value, "base64"); const isRecord = (value: unknown): value is Record => Boolean(value) && typeof value === "object" && !Array.isArray(value); +const isWrappedValue = (value: unknown): value is { $quixosValue: Value } => + isRecord(value) && "$quixosValue" in value && + isRecord(value.$quixosValue) && value.$quixosValue.$typeName === "camino.Value"; -const bytesToBase64 = (value: Uint8Array) => - Buffer.from(value).toString("base64"); +export const objectRef = (objectId: string) => ({ $quixosRef: objectId }); +export const liveValue = (value: Value) => ({ $quixosValue: value }); -const base64ToBytes = (value: string) => Buffer.from(value, "base64"); - -type FieldCodec = { - fieldType?: string; - conflictStrategy?: string; -}; - -const sourceToProto = (value: unknown) => { - if (!isRecord(value) || !isRecord(value.field)) { - return undefined; - } - const field = value.field; - if ( - typeof field.objectId !== "string" || - typeof field.fieldName !== "string" - ) { - return undefined; - } - return create(ValueSourceSchema, { - field: create(FieldValueSourceSchema, { - objectId: field.objectId, - fieldName: field.fieldName, - fieldType: typeof field.fieldType === "string" ? field.fieldType : "", - fieldStorage: - typeof field.fieldStorage === "string" ? field.fieldStorage : "", - conflictStrategy: - typeof field.conflictStrategy === "string" ? field.conflictStrategy : "", - revision: - typeof field.revision === "bigint" - ? field.revision - : typeof field.revision === "number" - ? BigInt(field.revision) - : typeof field.revision === "string" && /^\d+$/.test(field.revision) - ? BigInt(field.revision) - : 0n, - }), - }); -}; - -const codecFromSource = (value: unknown): FieldCodec | undefined => { - if (!isRecord(value) || !isRecord(value.field)) { - return undefined; - } - const field = value.field; - return { - ...(typeof field.fieldType === "string" ? { fieldType: field.fieldType } : {}), - ...(typeof field.conflictStrategy === "string" - ? { conflictStrategy: field.conflictStrategy } - : {}), - }; -}; - -const withSource = (value: Value, source: unknown): Value => { - const sourceValue = sourceToProto(source); - return sourceValue ? create(ValueSchema, { ...value, source: sourceValue }) : value; -}; - -export const jsToProtoValue = (value: unknown, codec?: FieldCodec): Value => { - if (codec?.conflictStrategy === "crdt" && codec.fieldType) { - return jsToProtoValue( - encodeAutomergeFieldWrite(value, codec.fieldType), - ); - } +export const jsToProtoValue = (value: unknown): Value => { + if (isWrappedValue(value)) return value.$quixosValue; if (value === null || value === undefined) { - return create(ValueSchema, { - kind: { - case: "nullValue", - value: create(NullValueSchema, {}), - }, - }); - } - if (typeof value === "boolean") { - return create(ValueSchema, { - kind: { case: "boolValue", value }, - }); - } - if (typeof value === "number") { - return create(ValueSchema, { - kind: { case: "numberValue", value }, - }); - } - if (typeof value === "bigint") { - return create(ValueSchema, { - kind: { case: "integerValue", value: value.toString() }, - }); - } - if (typeof value === "string") { - return create(ValueSchema, { - kind: { case: "stringValue", value }, - }); - } - if (value instanceof Uint8Array) { - return create(ValueSchema, { - kind: { case: "bytesValue", value }, - }); + return create(ValueSchema, { kind: { case: "nullValue", value: create(NullValueSchema, {}) } }); } + if (typeof value === "boolean") return create(ValueSchema, { kind: { case: "boolValue", value } }); + if (typeof value === "number") return create(ValueSchema, { kind: { case: "numberValue", value } }); + if (typeof value === "bigint") return create(ValueSchema, { kind: { case: "integerValue", value: String(value) } }); + if (typeof value === "string") return create(ValueSchema, { kind: { case: "stringValue", value } }); + if (value instanceof Uint8Array) return create(ValueSchema, { kind: { case: "bytesValue", value } }); if (Array.isArray(value)) { return create(ValueSchema, { - kind: { - case: "listValue", - value: create(ListValueSchema, { - values: value.map((entry) => jsToProtoValue(entry)), - }), - }, + kind: { case: "listValue", value: create(ListValueSchema, { values: value.map(jsToProtoValue) }) }, }); } - if (isRecord(value)) { - if (Object.hasOwn(value, "$caminoValue") && isRecord(value.$caminoSource)) { - return withSource( - jsToProtoValue(value.$caminoValue, codecFromSource(value.$caminoSource)), - value.$caminoSource, - ); - } - if (typeof value.$caminoRef === "string") { - return create(ValueSchema, { - kind: { - case: "refValue", - value: create(RefValueSchema, { - objectId: value.$caminoRef, - }), - }, - }); - } - if ( - typeof value.$caminoBytes === "string" && - Object.keys(value).every((key) => key === "$caminoBytes") - ) { - return create(ValueSchema, { - kind: { - case: "bytesValue", - value: base64ToBytes(value.$caminoBytes), - }, - }); - } - if ( - typeof value.$caminoCrdtType === "string" && - typeof value.$caminoCrdtPayload === "string" - ) { - return create(ValueSchema, { - kind: { - case: "crdtValue", - value: create(CrdtValueSchema, { - type: value.$caminoCrdtType, - encoding: - typeof value.$caminoCrdtEncoding === "string" - ? value.$caminoCrdtEncoding - : "base64", - payload: base64ToBytes(value.$caminoCrdtPayload), - }), - }, - }); - } + if (isRecord(value) && typeof value.$quixosRef === "string") { return create(ValueSchema, { - kind: { - case: "objectValue", - value: create(ObjectValueSchema, { - fields: jsObjectToProtoFields(value), - }), - }, + kind: { case: "refValue", value: create(RefValueSchema, { objectId: value.$quixosRef }) }, }); } - throw new Error(`Unsupported Camino RPC value: ${typeof value}`); + if (isRecord(value) && typeof value.$quixosCrdtType === "string" && + typeof value.$quixosCrdtPayload === "string") { + return create(ValueSchema, { + kind: { case: "crdtValue", value: create(CrdtValueSchema, { + type: value.$quixosCrdtType, + encoding: typeof value.$quixosCrdtEncoding === "string" ? value.$quixosCrdtEncoding : "base64", + payload: base64ToBytes(value.$quixosCrdtPayload), + }) }, + }); + } + if (!isRecord(value)) throw new Error(`Unsupported runtime value ${typeof value}`); + return create(ValueSchema, { + kind: { case: "objectValue", value: create(ObjectValueSchema, { + fields: Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, jsToProtoValue(entry)])), + }) }, + }); }; export const protoValueToJs = (value: Value | undefined): unknown => { switch (value?.kind.case) { case "nullValue": - case undefined: - return null; + case undefined: return null; case "boolValue": case "numberValue": case "stringValue": - return value.kind.value; - case "integerValue": - return value.kind.value; - case "bytesValue": - return bytesToBase64(value.kind.value); - case "listValue": - return value.kind.value.values.map(protoValueToJs); - case "objectValue": - return protoFieldsToJs(value.kind.value.fields); - case "refValue": - return value.kind.value.objectId; - case "crdtValue": - return loadAutomergeFieldDoc({ - $caminoCrdtType: value.kind.value.type, - $caminoCrdtEncoding: - value.kind.value.encoding === "base64" ? "base64" : "base64", - $caminoCrdtPayload: bytesToBase64(value.kind.value.payload), - }, value.kind.value.type); + case "integerValue": return value.kind.value; + case "bytesValue": return bytesToBase64(value.kind.value); + case "refValue": return value.kind.value.objectId; + case "listValue": return value.kind.value.values.map(protoValueToJs); + case "objectValue": return Object.fromEntries( + Object.entries(value.kind.value.fields).map(([key, entry]) => [key, protoValueToJs(entry)]), + ); + case "crdtValue": return { + $quixosCrdtType: value.kind.value.type, + $quixosCrdtEncoding: value.kind.value.encoding, + $quixosCrdtPayload: bytesToBase64(value.kind.value.payload), + }; } }; -export const jsObjectToProtoFields = (value: Record) => - Object.fromEntries( - Object.entries(value) - .filter(([, fieldValue]) => fieldValue !== undefined) - .map(([key, fieldValue]) => [key, jsToProtoValue(fieldValue)]), - ); +export const protoFieldsToJs = (fields: Record) => + Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, protoValueToJs(value)])); -export const protoFieldsToJs = ( - fields: Record | undefined, -): Record => - Object.fromEntries( - Object.entries(fields ?? {}).map(([key, value]) => [ - key, - protoValueToJs(value), - ]), - ); - -const normalizeForCanonicalJson = (value: unknown): unknown => { - if (Array.isArray(value)) { - return value.map(normalizeForCanonicalJson); - } - if (!value || typeof value !== "object") { - return value; - } - return Object.fromEntries( - Object.entries(value) - .filter(([, entryValue]) => entryValue !== undefined) - .sort(([left], [right]) => left.localeCompare(right)) - .map(([key, entryValue]) => [key, normalizeForCanonicalJson(entryValue)]), - ); +export type StatePort = { + slotId: string; + get(): Promise; + live(): Promise>; + set(value: T): Promise; }; +export type EdgePort = { + edgeTypeId: string; + projectionId: string; + resolve(): Promise; + connect(targetObjectId: string): Promise; +}; +export type InterfacePort = { + interfaceRevisionId: string; + invoke(operationId: string, input?: Record): Promise; +}; +export type ConstructorPort = { + atomId: string; + construct(input?: Record): Promise; +}; +export type RuntimePort = StatePort | EdgePort | InterfacePort | ConstructorPort; -export const canonicalFieldParams = ( - params: Record | undefined, -) => - JSON.stringify( - normalizeForCanonicalJson( - Object.fromEntries( - Object.entries(params ?? {}).map(([key, value]) => [ - key, - protoValueToJs(value), - ]), - ), - ), - ); - -export const fieldOperationKey = (params: { +export type RuntimeContext = { objectId: string; - fieldName: string; - input?: Record; -}) => - [ - params.objectId, - params.fieldName, - Buffer.from(canonicalFieldParams(params.input)).toString("base64url"), - ].join(":"); + input: Record; + inputProto: Record; + ports: ReadonlyMap; + state(portId: string): StatePort; + edge(portId: string): EdgePort; + interface(portId: string): InterfacePort; + constructor(portId: string): ConstructorPort; +}; -const derivedDependencyToProto = (dependency: DerivedDependency) => - create(DerivedDependencySchema, { - kind: dependency.kind, - objectId: dependency.objectId, - fieldName: dependency.kind === "field" ? dependency.fieldName : "", - sourceField: dependency.kind === "edges" ? dependency.sourceField ?? "" : "", - }); +const targetForEdge = ( + edge: { firstObjectId: string; secondObjectId: string; firstProjectionId: string }, + projectionId: string, +) => edge.firstProjectionId === projectionId ? edge.secondObjectId : edge.firstObjectId; -const fieldSourceForSpec = ( - spec: RuntimeFunctionSpec, - objectId: string, -): LiveFieldValue["$caminoSource"] | undefined => { - if (!spec.field) { - return undefined; +export const createRuntimeContext = ( + camino: CaminoClient, + orch: OrchClient, + request: RuntimeRequest, +): RuntimeContext => { + const ports = new Map(); + for (const dependency of request.dependencies) { + switch (dependency.binding.case) { + case "stateSlotId": { + const slotId = dependency.binding.value; + const state: StatePort = { + slotId, + async get() { + await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); + return protoValueToJs((await camino.readState({ objectId: request.objectId, slotId })).value); + }, + async live() { + await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); + const value = await camino.readState({ objectId: request.objectId, slotId }); + if (!value.value) throw new Error(`State ${slotId} returned no value`); + return liveValue(value.value); + }, + async set(value) { + await camino.writeState({ objectId: request.objectId, slotId, value: jsToProtoValue(value) }); + }, + }; + ports.set(dependency.portId, state); + break; + } + case "edge": { + const { edgeTypeId, projectionId } = dependency.binding.value; + const edge: EdgePort = { + edgeTypeId, + projectionId, + async resolve() { + await recordDependency({ kind: "edge", objectId: request.objectId, attachmentId: edgeTypeId, projectionId }); + const result = await camino.resolveEdge({ objectId: request.objectId, edgeTypeId, projectionId }); + return result.edges.map((entry) => targetForEdge(entry, projectionId)); + }, + async connect(targetObjectId) { + await camino.connectEdge({ objectId: request.objectId, edgeTypeId, projectionId, targetObjectId }); + }, + }; + ports.set(dependency.portId, edge); + break; + } + case "receiverInterfaceRevisionId": { + const interfaceRevisionId = dependency.binding.value; + const capability: InterfacePort = { + interfaceRevisionId, + async invoke(operationId, input = {}) { + const response = await orch.invokeCapability({ + capability: create(CapabilityRefSchema, { interfaceRevisionId, operationId }), + objectId: request.objectId, + input: Object.fromEntries(Object.entries(input).map(([key, value]) => [key, jsToProtoValue(value)])), + }); + if (!response.ok) throw new Error(response.error || `Capability ${operationId} failed`); + return protoValueToJs(response.result); + }, + }; + ports.set(dependency.portId, capability); + break; + } + case "constructorAtomId": { + const atomId = dependency.binding.value; + const constructor: ConstructorPort = { + atomId, + async construct(input = {}) { + const response = await orch.constructObject({ + atomId, + input: Object.fromEntries(Object.entries(input).map(([key, value]) => [key, jsToProtoValue(value)])), + }); + if (!response.object) throw new Error(`Constructor ${atomId} returned no object`); + return response.object.id; + }, + }; + ports.set(dependency.portId, constructor); + } + } } + const requirePort = (portId: string, kind: string) => { + const port = ports.get(portId); + if (!port || !(kind in port)) throw new Error(`Missing ${kind} dependency port ${portId}`); + return port as T; + }; return { - field: { - objectId, - fieldName: spec.field.name, - ...(spec.field.type ? { fieldType: spec.field.type } : {}), - ...(spec.field.storage ? { fieldStorage: spec.field.storage } : {}), - ...(spec.field.conflict ? { conflictStrategy: spec.field.conflict } : {}), - }, + objectId: request.objectId, + input: protoFieldsToJs(request.input), + inputProto: request.input, + ports, + state: (portId: string) => requirePort>(portId, "slotId"), + edge: (portId: string) => requirePort(portId, "edgeTypeId"), + interface: (portId: string) => requirePort(portId, "interfaceRevisionId"), + constructor: (portId: string) => requirePort(portId, "atomId"), }; }; -const wrapFieldResult = ( - spec: RuntimeFunctionSpec, - objectId: string, - value: unknown, +export type RuntimeHandler = (context: RuntimeContext) => unknown | Promise; +export type DerivedHandler = { kind: "derived"; get: RuntimeHandler }; +export const derived = (get: RuntimeHandler): DerivedHandler => ({ kind: "derived", get }); +const isDerived = (handler: RuntimeHandler | DerivedHandler): handler is DerivedHandler => + typeof handler === "object" && handler.kind === "derived"; + +const evaluate = async ( + handler: RuntimeHandler | DerivedHandler, + context: RuntimeContext, + observe?: (dependency: RuntimeDependency) => Promise, ) => { - const source = fieldSourceForSpec(spec, objectId); - return source ? { $caminoValue: value, $caminoSource: source } : value; + const dependencies = new Map(); + const result = await dependencyScope.run( + { dependencies, observe }, + () => isDerived(handler) ? handler.get(context) : handler(context), + ); + return { value: jsToProtoValue(result), dependencies: [...dependencies.values()] }; }; -const derivedEmissionToProtoForSpec = ( - spec: RuntimeFunctionSpec, - objectId: string, - event: DerivedWatchEmission, -): WatchEvent => - create(WatchEventSchema, { - watchId: event.watchId, - value: jsToProtoValue( - event.error ? null : wrapFieldResult(spec, objectId, event.value ?? null), - ), - dependencies: event.dependencies.map(derivedDependencyToProto), - error: event.error ?? "", - initial: event.initial, - }); +const protoDependencies = (dependencies: RuntimeDependency[]) => dependencies.map((entry) => + create(DerivedDependencySchema, { + kind: entry.kind, + objectId: entry.objectId, + attachmentId: entry.attachmentId, + projectionId: entry.kind === "edge" ? entry.projectionId : "", + })); -const watchIdFromResult = (value: unknown) => { - if (!isRecord(value)) { - return ""; +export const createPackageRuntimeRoutes = (config: { + packageRevisionId: string; + exports: Record; + caminoUrl?: string; + orchUrl?: string; +}) => { + const headers: Record = {}; + if (process.env.CAMINO_RUNTIME_AUTH_TOKEN) { + headers["x-camino-runtime-token"] = process.env.CAMINO_RUNTIME_AUTH_TOKEN; + } else if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1") { + throw new Error("CAMINO_RUNTIME_AUTH_TOKEN is required"); } - const watchId = value.watch_id ?? value.watchId; - return typeof watchId === "string" ? watchId : ""; -}; + const camino = createClient(CaminoService, createConnectTransport({ + baseUrl: config.caminoUrl ?? process.env.CAMINO_URL ?? "http://127.0.0.1:7310", + httpVersion: "1.1", + interceptors: headers["x-camino-runtime-token"] ? [ + (next) => async (request) => { + request.header.set("x-camino-runtime-token", headers["x-camino-runtime-token"]!); + return await next(request); + }, + ] : [], + })); + const orch = createClient(OrchestratorRuntime, createConnectTransport({ + baseUrl: config.orchUrl ?? process.env.QUIXOS_ORCH_URL ?? "http://127.0.0.1:7311", + httpVersion: "1.1", + })); -export const objectRef = (objectId: string) => - objectId as ObjectRef; - -export const createField = ( - camino: CaminoClient, - objectId: string, - fieldName: string, - codec?: FieldCodec, -): Field => ({ - async get() { - recordDerivedDependency({ kind: "field", objectId, fieldName }); - const response = await camino.getObject({ objectId }); - return protoValueToJs(response.object?.fields[fieldName]) as T | undefined; - }, - async set(value) { - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue(value, codec), - }); - }, -}); - -export const createCrdtField = ( - camino: CaminoClient, - objectId: string, - fieldName: string, - fieldType: string, -): CrdtField => { - const field = createField>(camino, objectId, fieldName, { - fieldType, - conflictStrategy: "crdt", - }); - return { - ...field, - async change(fn) { - const current = await field.get(); - if (!current) { - throw new Error(`Cannot change missing CRDT field ${fieldName}`); + return (router: ConnectRouter) => router.service(PackageRuntime, { + handshake: () => create(HandshakeResponseSchema, { + packageRevisionId: config.packageRevisionId, + runtimeProtocolVersion: "quixos-capabilities-v1", + exportIds: Object.keys(config.exports), + }), + invoke: async (request) => { + const exportId = request.export?.exportId; + const handler = exportId ? config.exports[exportId] : undefined; + if (!handler) throw new ConnectError(`Unknown export ${exportId ?? ""}`, Code.NotFound); + try { + const result = await evaluate(handler, createRuntimeContext(camino, orch, request)); + return create(InvokeResponseSchema, { ok: true, result: result.value }); + } catch (error) { + return create(InvokeResponseSchema, { + ok: false, + error: error instanceof Error ? error.message : String(error), + }); } - const next = Automerge.change(current, (doc) => { - fn(doc as { value: T }); - }) as CaminoAutomergeDoc; - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue( - createAutomergeFieldChanges(current, next, fieldType), - ), - }); - return next; }, - async replaceFromJson(value) { - await camino.setField({ - objectId, - fieldName, - value: jsToProtoValue(createAutomergeFieldValue(value, fieldType)), - }); - }, - }; -}; + watch: async function* (request, context) { + const exportId = request.export?.exportId; + const handler = exportId ? config.exports[exportId] : undefined; + if (!handler || !isDerived(handler)) { + throw new ConnectError(`Export ${exportId ?? ""} is not derived`, Code.FailedPrecondition); + } + const watchId = `watch:${randomUUID()}`; + const runtimeContext = createRuntimeContext(camino, orch, request); + type WatchOutcome = { key: string; done: boolean; error?: unknown }; + type Subscription = { + dependency: RuntimeDependency; + controller: AbortController; + next: Promise; + waitNext: () => Promise; + }; + const subscriptions = new Map(); + const establishing = new Map>(); -const createDependencyTrackingCaminoClient = ( - camino: CaminoClient, -): CaminoClient => - new Proxy(camino, { - get(target, property, receiver) { - if (property === "getObject") { - return async (request: { objectId: string }, ...args: unknown[]) => { - if (request.objectId) { - recordDerivedDependency({ - kind: "object", - objectId: request.objectId, + const ensureSubscription = async (dependency: RuntimeDependency) => { + const key = dependencyKey(dependency); + if (subscriptions.has(key)) return; + const pending = establishing.get(key); + if (pending) return await pending; + const establish = (async () => { + const controller = new AbortController(); + const stream = camino.watchObject( + { objectId: dependency.objectId, includeSnapshot: true }, + { signal: controller.signal }, + )[Symbol.asyncIterator](); + try { + // Camino subscribes before producing the snapshot, so once this + // resolves the following state/edge read cannot race the stream. + const snapshot = await stream.next(); + if (snapshot.done) throw new Error(`Dependency stream ${key} ended during setup`); + const waitNext = () => stream.next().then( + (result) => ({ key, done: Boolean(result.done) }), + (error: unknown) => ({ key, done: true, error }), + ); + const subscription: Subscription = { + dependency, + controller, + waitNext, + next: Promise.resolve({ key, done: false }), + }; + subscription.next = waitNext(); + subscriptions.set(key, subscription); + } catch (error) { + controller.abort(); + throw error; + } + })(); + establishing.set(key, establish); + try { + await establish; + } finally { + establishing.delete(key); + } + }; + + const abortAll = () => { + for (const subscription of subscriptions.values()) { + subscription.controller.abort(); + } + }; + context.signal.addEventListener("abort", abortAll, { once: true }); + + let current = await evaluate(handler, runtimeContext, ensureSubscription); + yield create(WatchEventSchema, { + watchId, + value: current.value, + dependencies: protoDependencies(current.dependencies), + initial: true, + }); + + const abort = new Promise<"abort">((resolve) => { + if (context.signal.aborted) resolve("abort"); + else context.signal.addEventListener("abort", () => resolve("abort"), { once: true }); + }); + try { + while (!context.signal.aborted) { + if (subscriptions.size === 0) { + await abort; + break; + } + const outcome = await Promise.race([ + ...[...subscriptions.values()].map((entry) => entry.next), + abort, + ]); + if (outcome === "abort") break; + const subscription = subscriptions.get(outcome.key); + if (!subscription) continue; + if (outcome.error) throw outcome.error; + if (outcome.done) throw new Error(`Dependency stream ${outcome.key} ended unexpectedly`); + subscription.next = subscription.waitNext(); + + const updated = await evaluate(handler, runtimeContext, ensureSubscription); + const active = new Set(updated.dependencies.map(dependencyKey)); + for (const [key, entry] of subscriptions) { + if (!active.has(key)) { + entry.controller.abort(); + subscriptions.delete(key); + } + } + if (!equals(ValueSchema, current.value, updated.value)) { + yield create(WatchEventSchema, { + watchId, + value: updated.value, + dependencies: protoDependencies(updated.dependencies), }); } - return await ( - Reflect.get(target, property, receiver) as ( - request: { objectId: string }, - ...args: unknown[] - ) => Promise - )(request, ...args); - }; + current = updated; + } + } finally { + context.signal.removeEventListener("abort", abortAll); + abortAll(); } - if (property === "listEdges") { - return async ( - request: { objectId: string; sourceField?: string }, - ...args: unknown[] - ) => { - if (request.objectId) { - recordDerivedDependency({ - kind: "edges", - objectId: request.objectId, - ...(request.sourceField ? { sourceField: request.sourceField } : {}), - }); - } - return await ( - Reflect.get(target, property, receiver) as ( - request: { objectId: string; sourceField?: string }, - ...args: unknown[] - ) => Promise - )(request, ...args); - }; - } - return Reflect.get(target, property, receiver); }, }); +}; -export const serveQuixosPackageRuntime = < - Context, - Spec extends readonly RuntimeFunctionSpec[], ->(params: { - packageNamespace: string; - packageName: string; - runtimeProtocolVersion: string; - functions: Spec; - implementation: { - [Name in Spec[number]["exportName"]]: - | RuntimeHandler - | FieldOperation; - }; - createContext: (camino: CaminoClient, request: InvokeRequest) => Context; +export const servePackageRuntime = (config: { + packageRevisionId: string; + exports: Record; }) => { const host = process.env.QUIXOS_RUNTIME_HOST ?? "127.0.0.1"; const port = Number(process.env.QUIXOS_RUNTIME_PORT ?? "0"); - const caminoUrl = process.env.CAMINO_URL ?? "http://127.0.0.1:7310"; - const runtimeToken = process.env.CAMINO_RUNTIME_AUTH_TOKEN ?? ""; - if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1" && !runtimeToken) { - throw new Error( - "CAMINO_RUNTIME_AUTH_REQUIRED=1 but CAMINO_RUNTIME_AUTH_TOKEN is missing", - ); - } - const runtimeTokenInterceptor: Interceptor = (next) => async (request) => { - if (runtimeToken) { - request.header.set("x-camino-runtime-token", runtimeToken); - } - return await next(request); + const handler = connectNodeAdapter({ routes: createPackageRuntimeRoutes(config) }); + const server = http.createServer((request, response) => void handler(request, response)); + server.listen(port, host, () => console.log(`${config.packageRevisionId} listening on ${host}:${port}`)); + const shutdown = () => { + server.close(() => process.exit(0)); + server.closeAllConnections(); }; - const camino = createClient( - CaminoService, - createConnectTransport({ - baseUrl: caminoUrl, - httpVersion: "1.1", - interceptors: runtimeToken ? [runtimeTokenInterceptor] : [], - }), - ); - const trackingCamino = createDependencyTrackingCaminoClient(camino); - - if (!Number.isInteger(port) || port <= 0) { - throw new Error("QUIXOS_RUNTIME_PORT must be a positive integer"); - } - - const functionRefs = params.functions.map((entry) => - create(FunctionRefSchema, { - packageNamespace: params.packageNamespace, - packageName: params.packageName, - symbol: entry.symbol, - operation: entry.operation ?? "", - }), - ); - - const resolveRuntimeFunction = ( - fn: InvokeRequest["function"], - ): { - spec: RuntimeFunctionSpec; - runtimeFunction: RuntimeHandler; - } => { - const symbol = fn?.symbol ?? ""; - const spec = params.functions.find( - (entry) => - entry.symbol === symbol && - (entry.operation ?? "") === (fn?.operation ?? ""), - ); - if (!spec) { - throw new Error( - `Unknown ${params.packageName} function: ${symbol}${ - fn?.operation ? `.${fn.operation}` : "" - }`, - ); - } - const implementationExport = ( - params.implementation as Record< - string, - RuntimeHandler | FieldOperation - > - )[spec.exportName]; - const runtimeFunction = - spec.operation && typeof implementationExport === "object" - ? implementationExport[spec.operation as keyof FieldOperation] - : implementationExport; - if (!runtimeFunction) { - throw new Error( - `Missing ${params.packageName} implementation export: ${spec.exportName}${ - spec.operation ? `.${spec.operation}` : "" - }`, - ); - } - if (typeof runtimeFunction !== "function") { - throw new Error( - `${params.packageName} implementation export is not callable: ${spec.exportName}${ - spec.operation ? `.${spec.operation}` : "" - }`, - ); - } - return { spec, runtimeFunction }; - }; - - const handler = connectNodeAdapter({ - routes: (router) => { - router.service(PackageRuntime, { - async handshake() { - return create(HandshakeResponseSchema, { - packageNamespace: params.packageNamespace, - packageName: params.packageName, - runtimeProtocolVersion: params.runtimeProtocolVersion, - functions: functionRefs, - }); - }, - - async invoke(request) { - try { - const { spec, runtimeFunction } = resolveRuntimeFunction(request.function); - const value = await runtimeFunction( - params.createContext(trackingCamino, request), - ); - return create(InvokeResponseSchema, { - ok: true, - result: jsToProtoValue( - spec.operation === "get" - ? wrapFieldResult(spec, request.objectId, value) - : value, - ), - }); - } catch (error) { - return create(InvokeResponseSchema, { - ok: false, - result: jsToProtoValue(null), - error: error instanceof Error ? error.message : String(error), - }); - } - }, - - async *watch(request: WatchRequest, context: HandlerContext) { - const queue = new AsyncEventQueue(); - let watchId = ""; - const closeQueue = () => queue.close(); - context.signal.addEventListener("abort", closeQueue, { once: true }); - try { - const { spec, runtimeFunction } = resolveRuntimeFunction( - request.function, - ); - if (spec.operation !== "watchStart") { - throw new Error( - `PackageRuntime.watch requires a watchStart operation, got ${spec.symbol}${ - spec.operation ? `.${spec.operation}` : "" - }`, - ); - } - const sink: DerivedWatchSink = { - publish(event) { - queue.push( - derivedEmissionToProtoForSpec(spec, request.objectId, event), - ); - }, - }; - const result = await watchSinkStorage.run(sink, async () => - runtimeFunction( - params.createContext( - trackingCamino, - request as unknown as InvokeRequest, - ), - ), - ); - watchId = watchIdFromResult(result); - if (!watchId) { - throw new Error( - `Watch start did not return a watch_id for ${spec.symbol}`, - ); - } - for await (const event of queue) { - yield event; - } - } catch (error) { - yield create(WatchEventSchema, { - watchId, - value: jsToProtoValue(null), - dependencies: [], - error: error instanceof Error ? error.message : String(error), - initial: !watchId, - }); - } finally { - context.signal.removeEventListener("abort", closeQueue); - queue.close(); - if (watchId) { - try { - const stopFunction = create(FunctionRefSchema, { - ...(request.function ?? create(FunctionRefSchema, {})), - operation: "watchStop", - }); - const { runtimeFunction } = resolveRuntimeFunction(stopFunction); - await runtimeFunction( - params.createContext( - trackingCamino, - create(WatchRequestSchema, { - ...request, - function: stopFunction, - input: { - ...request.input, - watch_id: jsToProtoValue(watchId), - }, - }) as unknown as InvokeRequest, - ), - ); - } catch (error) { - logDerivedWatch("stop-error", { - watchId, - error: error instanceof Error ? error.message : String(error), - }); - } - } - } - }, - }); - }, - }); - - const server = http.createServer((request, response) => { - void handler(request, response); - }); - const close = () => server.close(() => process.exit(0)); - - server.listen(port, host, () => { - process.stderr.write( - `${params.packageName} listening on ${host}:${port}\n`, - ); - }); - process.on("SIGTERM", close); - process.on("SIGINT", close); + process.on("SIGTERM", shutdown); + process.on("SIGINT", shutdown); + return server; +}; +type RuntimeRequest = { + objectId: string; + input: Record; + dependencies: import("./quixos/refs_pb.js").InjectedDependency[]; }; diff --git a/src/quixos/orch_pb.ts b/src/quixos/orch_pb.ts new file mode 100644 index 0000000..b286cbe --- /dev/null +++ b/src/quixos/orch_pb.ts @@ -0,0 +1,573 @@ +// @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 { CaminoObject, 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 { CapabilityRef, PackageExportRef } from "./refs_pb.js"; +import { file_quixos_refs } from "./refs_pb.js"; +import type { DerivedDependency } from "./runtime_pb.js"; +import { file_quixos_runtime } from "./runtime_pb.js"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/orch.proto. + */ +export const file_quixos_orch: GenFile = /*@__PURE__*/ + fileDesc("ChFxdWl4b3Mvb3JjaC5wcm90bxILcXVpeG9zLm9yY2gipQEKFkNvbnN0cnVjdE9iamVjdFJlcXVlc3QSDwoHYXRvbV9pZBgBIAEoCRI9CgVpbnB1dBgCIAMoCzIuLnF1aXhvcy5vcmNoLkNvbnN0cnVjdE9iamVjdFJlcXVlc3QuSW5wdXRFbnRyeRo7CgpJbnB1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c3BhY2USIC5xdWl4b3Mub3JjaC5HZXRXb3Jrc3BhY2VSZXF1ZXN0GiEucXVpeG9zLm9yY2guR2V0V29ya3NwYWNlUmVzcG9uc2UScQoWTGlzdFBhY2thZ2VEZXNjcmlwdG9ycxIqLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlRGVzY3JpcHRvcnNSZXF1ZXN0GisucXVpeG9zLm9yY2guTGlzdFBhY2thZ2VEZXNjcmlwdG9yc1Jlc3BvbnNlEmgKE0xpc3RQYWNrYWdlUnVudGltZXMSJy5xdWl4b3Mub3JjaC5MaXN0UGFja2FnZVJ1bnRpbWVzUmVxdWVzdBooLnF1aXhvcy5vcmNoLkxpc3RQYWNrYWdlUnVudGltZXNSZXNwb25zZRJcCg9MaXN0QWN0aXZhdGlvbnMSIy5xdWl4b3Mub3JjaC5MaXN0QWN0aXZhdGlvbnNSZXF1ZXN0GiQucXVpeG9zLm9yY2guTGlzdEFjdGl2YXRpb25zUmVzcG9uc2USXAoPQ2xvc2VBY3RpdmF0aW9uEiMucXVpeG9zLm9yY2guQ2xvc2VBY3RpdmF0aW9uUmVxdWVzdBokLnF1aXhvcy5vcmNoLkNsb3NlQWN0aXZhdGlvblJlc3BvbnNlYgZwcm90bzM", [file_camino_api, file_quixos_package, file_quixos_refs, file_quixos_runtime]); + +/** + * @generated from message quixos.orch.ConstructObjectRequest + */ +export type ConstructObjectRequest = Message<"quixos.orch.ConstructObjectRequest"> & { + /** + * @generated from field: string atom_id = 1; + */ + atomId: string; + + /** + * @generated from field: map input = 2; + */ + input: { [key: string]: Value }; +}; + +/** + * Describes the message quixos.orch.ConstructObjectRequest. + * Use `create(ConstructObjectRequestSchema)` to create a new message. + */ +export const ConstructObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 0); + +/** + * @generated from message quixos.orch.ConstructObjectResponse + */ +export type ConstructObjectResponse = Message<"quixos.orch.ConstructObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; +}; + +/** + * Describes the message quixos.orch.ConstructObjectResponse. + * Use `create(ConstructObjectResponseSchema)` to create a new message. + */ +export const ConstructObjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 1); + +/** + * @generated from message quixos.orch.InvokeCapabilityRequest + */ +export type InvokeCapabilityRequest = Message<"quixos.orch.InvokeCapabilityRequest"> & { + /** + * @generated from field: quixos.CapabilityRef capability = 1; + */ + capability?: CapabilityRef | 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.InvokeCapabilityRequest. + * Use `create(InvokeCapabilityRequestSchema)` to create a new message. + */ +export const InvokeCapabilityRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 2); + +/** + * @generated from message quixos.orch.InvokeCapabilityResponse + */ +export type InvokeCapabilityResponse = Message<"quixos.orch.InvokeCapabilityResponse"> & { + /** + * @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.InvokeCapabilityResponse. + * Use `create(InvokeCapabilityResponseSchema)` to create a new message. + */ +export const InvokeCapabilityResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 3); + +/** + * @generated from message quixos.orch.WatchCapabilityRequest + */ +export type WatchCapabilityRequest = Message<"quixos.orch.WatchCapabilityRequest"> & { + /** + * @generated from field: quixos.CapabilityRef capability = 1; + */ + capability?: CapabilityRef | 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.WatchCapabilityRequest. + * Use `create(WatchCapabilityRequestSchema)` to create a new message. + */ +export const WatchCapabilityRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 4); + +/** + * @generated from message quixos.orch.WatchCapabilityEvent + */ +export type WatchCapabilityEvent = Message<"quixos.orch.WatchCapabilityEvent"> & { + /** + * @generated from field: string invocation_id = 1; + */ + invocationId: string; + + /** + * @generated from field: quixos.orch.Activation activation = 2; + */ + activation?: Activation | undefined; + + /** + * @generated from field: string watch_id = 3; + */ + watchId: string; + + /** + * @generated from field: camino.Value value = 4; + */ + value?: Value | undefined; + + /** + * @generated from field: repeated quixos.runtime.DerivedDependency dependencies = 5; + */ + dependencies: DerivedDependency[]; + + /** + * @generated from field: string error = 6; + */ + error: string; + + /** + * @generated from field: bool initial = 7; + */ + initial: boolean; +}; + +/** + * Describes the message quixos.orch.WatchCapabilityEvent. + * Use `create(WatchCapabilityEventSchema)` to create a new message. + */ +export const WatchCapabilityEventSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 5); + +/** + * @generated from message quixos.orch.GetWorkspaceRequest + */ +export type GetWorkspaceRequest = Message<"quixos.orch.GetWorkspaceRequest"> & { +}; + +/** + * Describes the message quixos.orch.GetWorkspaceRequest. + * Use `create(GetWorkspaceRequestSchema)` to create a new message. + */ +export const GetWorkspaceRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 6); + +/** + * @generated from message quixos.orch.GetWorkspaceResponse + */ +export type GetWorkspaceResponse = Message<"quixos.orch.GetWorkspaceResponse"> & { + /** + * @generated from field: string workspace_id = 1; + */ + workspaceId: string; + + /** + * @generated from field: string workspace_revision_id = 2; + */ + workspaceRevisionId: string; + + /** + * @generated from field: string source_root_commit = 3; + */ + sourceRootCommit: string; +}; + +/** + * Describes the message quixos.orch.GetWorkspaceResponse. + * Use `create(GetWorkspaceResponseSchema)` to create a new message. + */ +export const GetWorkspaceResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 7); + +/** + * @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, 8); + +/** + * @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, 9); + +/** + * @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, 10); + +/** + * @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, 11); + +/** + * @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, 12); + +/** + * @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, 13); + +/** + * @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, 14); + +/** + * @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, 15); + +/** + * @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.PackageExportRef export = 2; + */ + export?: PackageExportRef | 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, 16); + +/** + * @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_revision_id = 2; + */ + packageRevisionId: string; + + /** + * @generated from field: string source_repository = 3; + */ + sourceRepository: string; + + /** + * @generated from field: string source_commit = 4; + */ + sourceCommit: string; + + /** + * @generated from field: string build_target = 5; + */ + buildTarget: string; + + /** + * @generated from field: string server_path = 6; + */ + serverPath: string; + + /** + * @generated from field: uint32 pid = 7; + */ + pid: number; + + /** + * @generated from field: string state = 8; + */ + state: string; + + /** + * @generated from field: string started_at = 9; + */ + startedAt: string; + + /** + * @generated from field: string last_handshake_at = 10; + */ + lastHandshakeAt: string; + + /** + * @generated from field: string runtime_protocol_version = 11; + */ + runtimeProtocolVersion: string; + + /** + * @generated from field: uint32 advertised_export_count = 12; + */ + advertisedExportCount: number; +}; + +/** + * Describes the message quixos.orch.PackageRuntimeStatus. + * Use `create(PackageRuntimeStatusSchema)` to create a new message. + */ +export const PackageRuntimeStatusSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 17); + +/** + * @generated from service quixos.orch.OrchestratorRuntime + */ +export const OrchestratorRuntime: GenService<{ + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.InvokeCapability + */ + invokeCapability: { + methodKind: "unary"; + input: typeof InvokeCapabilityRequestSchema; + output: typeof InvokeCapabilityResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.WatchCapability + */ + watchCapability: { + methodKind: "server_streaming"; + input: typeof WatchCapabilityRequestSchema; + output: typeof WatchCapabilityEventSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ConstructObject + */ + constructObject: { + methodKind: "unary"; + input: typeof ConstructObjectRequestSchema; + output: typeof ConstructObjectResponseSchema; + }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.GetWorkspace + */ + getWorkspace: { + methodKind: "unary"; + input: typeof GetWorkspaceRequestSchema; + output: typeof GetWorkspaceResponseSchema; + }, + /** + * @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/quixos/package_pb.ts b/src/quixos/package_pb.ts new file mode 100644 index 0000000..428c66f --- /dev/null +++ b/src/quixos/package_pb.ts @@ -0,0 +1,68 @@ +// @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 { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file quixos/package.proto. + */ +export const file_quixos_package: GenFile = /*@__PURE__*/ + fileDesc("ChRxdWl4b3MvcGFja2FnZS5wcm90bxIGcXVpeG9zIo4BChFQYWNrYWdlRGVzY3JpcHRvchISCgpwYWNrYWdlX2lkGAEgASgJEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYAiABKAkSIAoYcnVudGltZV9wcm90b2NvbF92ZXJzaW9uGAMgASgJEiYKB2V4cG9ydHMYBCADKAsyFS5xdWl4b3MuUnVudGltZUV4cG9ydCI6Cg1SdW50aW1lRXhwb3J0EhEKCWV4cG9ydF9pZBgBIAEoCRIWCg5ydW50aW1lX3N5bWJvbBgCIAEoCWIGcHJvdG8z"); + +/** + * @generated from message quixos.PackageDescriptor + */ +export type PackageDescriptor = Message<"quixos.PackageDescriptor"> & { + /** + * @generated from field: string package_id = 1; + */ + packageId: string; + + /** + * @generated from field: string package_revision_id = 2; + */ + packageRevisionId: string; + + /** + * @generated from field: string runtime_protocol_version = 3; + */ + runtimeProtocolVersion: string; + + /** + * @generated from field: repeated quixos.RuntimeExport exports = 4; + */ + exports: RuntimeExport[]; +}; + +/** + * Describes the message quixos.PackageDescriptor. + * Use `create(PackageDescriptorSchema)` to create a new message. + */ +export const PackageDescriptorSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 0); + +/** + * @generated from message quixos.RuntimeExport + */ +export type RuntimeExport = Message<"quixos.RuntimeExport"> & { + /** + * @generated from field: string export_id = 1; + */ + exportId: string; + + /** + * @generated from field: string runtime_symbol = 2; + */ + runtimeSymbol: string; +}; + +/** + * Describes the message quixos.RuntimeExport. + * Use `create(RuntimeExportSchema)` to create a new message. + */ +export const RuntimeExportSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_package, 1); + diff --git a/src/quixos/refs_pb.ts b/src/quixos/refs_pb.ts index f320aa2..52da673 100644 --- a/src/quixos/refs_pb.ts +++ b/src/quixos/refs_pb.ts @@ -10,42 +10,117 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/refs.proto. */ export const file_quixos_refs: GenFile = /*@__PURE__*/ - fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zInYKC0Z1bmN0aW9uUmVmEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIOCgZzeW1ib2wYAyABKAkSEwoLdmVyc2lvbl9yZWYYBCABKAkSEQoJb3BlcmF0aW9uGAUgASgJYgZwcm90bzM"); + fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zIkQKDUNhcGFiaWxpdHlSZWYSHQoVaW50ZXJmYWNlX3JldmlzaW9uX2lkGAEgASgJEhQKDG9wZXJhdGlvbl9pZBgCIAEoCSJCChBQYWNrYWdlRXhwb3J0UmVmEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYASABKAkSEQoJZXhwb3J0X2lkGAIgASgJIroBChJJbmplY3RlZERlcGVuZGVuY3kSDwoHcG9ydF9pZBgBIAEoCRIXCg1zdGF0ZV9zbG90X2lkGAIgASgJSAASJgoEZWRnZRgDIAEoCzIWLnF1aXhvcy5FZGdlRGVwZW5kZW5jeUgAEigKHnJlY2VpdmVyX2ludGVyZmFjZV9yZXZpc2lvbl9pZBgEIAEoCUgAEh0KE2NvbnN0cnVjdG9yX2F0b21faWQYBSABKAlIAEIJCgdiaW5kaW5nIj0KDkVkZ2VEZXBlbmRlbmN5EhQKDGVkZ2VfdHlwZV9pZBgBIAEoCRIVCg1wcm9qZWN0aW9uX2lkGAIgASgJYgZwcm90bzM"); /** - * @generated from message quixos.FunctionRef + * @generated from message quixos.CapabilityRef */ -export type FunctionRef = Message<"quixos.FunctionRef"> & { +export type CapabilityRef = Message<"quixos.CapabilityRef"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string interface_revision_id = 1; */ - packageNamespace: string; + interfaceRevisionId: string; /** - * @generated from field: string package_name = 2; + * @generated from field: string operation_id = 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; + operationId: string; }; /** - * Describes the message quixos.FunctionRef. - * Use `create(FunctionRefSchema)` to create a new message. + * Describes the message quixos.CapabilityRef. + * Use `create(CapabilityRefSchema)` to create a new message. */ -export const FunctionRefSchema: GenMessage = /*@__PURE__*/ +export const CapabilityRefSchema: GenMessage = /*@__PURE__*/ messageDesc(file_quixos_refs, 0); +/** + * @generated from message quixos.PackageExportRef + */ +export type PackageExportRef = Message<"quixos.PackageExportRef"> & { + /** + * @generated from field: string package_revision_id = 1; + */ + packageRevisionId: string; + + /** + * @generated from field: string export_id = 2; + */ + exportId: string; +}; + +/** + * Describes the message quixos.PackageExportRef. + * Use `create(PackageExportRefSchema)` to create a new message. + */ +export const PackageExportRefSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 1); + +/** + * @generated from message quixos.InjectedDependency + */ +export type InjectedDependency = Message<"quixos.InjectedDependency"> & { + /** + * @generated from field: string port_id = 1; + */ + portId: string; + + /** + * @generated from oneof quixos.InjectedDependency.binding + */ + binding: { + /** + * @generated from field: string state_slot_id = 2; + */ + value: string; + case: "stateSlotId"; + } | { + /** + * @generated from field: quixos.EdgeDependency edge = 3; + */ + value: EdgeDependency; + case: "edge"; + } | { + /** + * @generated from field: string receiver_interface_revision_id = 4; + */ + value: string; + case: "receiverInterfaceRevisionId"; + } | { + /** + * @generated from field: string constructor_atom_id = 5; + */ + value: string; + case: "constructorAtomId"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message quixos.InjectedDependency. + * Use `create(InjectedDependencySchema)` to create a new message. + */ +export const InjectedDependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 2); + +/** + * @generated from message quixos.EdgeDependency + */ +export type EdgeDependency = Message<"quixos.EdgeDependency"> & { + /** + * @generated from field: string edge_type_id = 1; + */ + edgeTypeId: string; + + /** + * @generated from field: string projection_id = 2; + */ + projectionId: string; +}; + +/** + * Describes the message quixos.EdgeDependency. + * Use `create(EdgeDependencySchema)` to create a new message. + */ +export const EdgeDependencySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_refs, 3); + diff --git a/src/quixos/runtime_pb.ts b/src/quixos/runtime_pb.ts index 6574d7d..272c399 100644 --- a/src/quixos/runtime_pb.ts +++ b/src/quixos/runtime_pb.ts @@ -6,7 +6,7 @@ import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegen 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 type { InjectedDependency, PackageExportRef } from "./refs_pb.js"; import { file_quixos_refs } from "./refs_pb.js"; import type { Message } from "@bufbuild/protobuf"; @@ -14,7 +14,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/runtime.proto. */ export const file_quixos_runtime: GenFile = /*@__PURE__*/ - fileDesc("ChRxdWl4b3MvcnVudGltZS5wcm90bxIOcXVpeG9zLnJ1bnRpbWUiMQoQSGFuZHNoYWtlUmVxdWVzdBIdChVvcmNoX3Byb3RvY29sX3ZlcnNpb24YASABKAkijgEKEUhhbmRzaGFrZVJlc3BvbnNlEhkKEXBhY2thZ2VfbmFtZXNwYWNlGAEgASgJEhQKDHBhY2thZ2VfbmFtZRgCIAEoCRIgChhydW50aW1lX3Byb3RvY29sX3ZlcnNpb24YAyABKAkSJgoJZnVuY3Rpb25zGAQgAygLMhMucXVpeG9zLkZ1bmN0aW9uUmVmItYBCg1JbnZva2VSZXF1ZXN0EhUKDWludm9jYXRpb25faWQYASABKAkSJQoIZnVuY3Rpb24YAiABKAsyEy5xdWl4b3MuRnVuY3Rpb25SZWYSEQoJb2JqZWN0X2lkGAMgASgJEjcKBWlucHV0GAQgAygLMigucXVpeG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5EjAKDGRlcGVuZGVuY2llcxgFIAMoCzIaLnF1aXhvcy5JbmplY3RlZERlcGVuZGVuY3kaOwoKSW5wdXRFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBImIKEURlcml2ZWREZXBlbmRlbmN5EgwKBGtpbmQYASABKAkSEQoJb2JqZWN0X2lkGAIgASgJEhUKDWF0dGFjaG1lbnRfaWQYAyABKAkSFQoNcHJvamVjdGlvbl9pZBgEIAEoCSKVAQoKV2F0Y2hFdmVudBIQCgh3YXRjaF9pZBgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZRI3CgxkZXBlbmRlbmNpZXMYAyADKAsyIS5xdWl4b3MucnVudGltZS5EZXJpdmVkRGVwZW5kZW5jeRINCgVlcnJvchgEIAEoCRIPCgdpbml0aWFsGAUgASgIMvABCg5QYWNrYWdlUnVudGltZRJQCglIYW5kc2hha2USIC5xdWl4b3MucnVudGltZS5IYW5kc2hha2VSZXF1ZXN0GiEucXVpeG9zLnJ1bnRpbWUuSGFuZHNoYWtlUmVzcG9uc2USRwoGSW52b2tlEh0ucXVpeG9zLnJ1bnRpbWUuSW52b2tlUmVxdWVzdBoeLnF1aXhvcy5ydW50aW1lLkludm9rZVJlc3BvbnNlEkMKBVdhdGNoEhwucXVpeG9zLnJ1bnRpbWUuV2F0Y2hSZXF1ZXN0GhoucXVpeG9zLnJ1bnRpbWUuV2F0Y2hFdmVudDABYgZwcm90bzM", [file_camino_api, file_quixos_refs]); /** * @generated from message quixos.runtime.HandshakeRequest @@ -38,24 +38,19 @@ export const HandshakeRequestSchema: GenMessage = /*@__PURE__* */ export type HandshakeResponse = Message<"quixos.runtime.HandshakeResponse"> & { /** - * @generated from field: string package_namespace = 1; + * @generated from field: string package_revision_id = 1; */ - packageNamespace: string; + packageRevisionId: string; /** - * @generated from field: string package_name = 2; - */ - packageName: string; - - /** - * @generated from field: string runtime_protocol_version = 3; + * @generated from field: string runtime_protocol_version = 2; */ runtimeProtocolVersion: string; /** - * @generated from field: repeated quixos.FunctionRef functions = 4; + * @generated from field: repeated string export_ids = 3; */ - functions: FunctionRef[]; + exportIds: string[]; }; /** @@ -75,9 +70,9 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; @@ -88,6 +83,11 @@ export type InvokeRequest = Message<"quixos.runtime.InvokeRequest"> & { * @generated from field: map input = 4; */ input: { [key: string]: Value }; + + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** @@ -134,9 +134,9 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { invocationId: string; /** - * @generated from field: quixos.FunctionRef function = 2; + * @generated from field: quixos.PackageExportRef export = 2; */ - function?: FunctionRef | undefined; + export?: PackageExportRef | undefined; /** * @generated from field: string object_id = 3; @@ -147,6 +147,11 @@ export type WatchRequest = Message<"quixos.runtime.WatchRequest"> & { * @generated from field: map input = 4; */ input: { [key: string]: Value }; + + /** + * @generated from field: repeated quixos.InjectedDependency dependencies = 5; + */ + dependencies: InjectedDependency[]; }; /** @@ -171,14 +176,14 @@ export type DerivedDependency = Message<"quixos.runtime.DerivedDependency"> & { objectId: string; /** - * @generated from field: string field_name = 3; + * @generated from field: string attachment_id = 3; */ - fieldName: string; + attachmentId: string; /** - * @generated from field: string source_field = 4; + * @generated from field: string projection_id = 4; */ - sourceField: string; + projectionId: string; }; /** diff --git a/src/schema-compiler.ts b/src/schema-compiler.ts deleted file mode 100644 index e5d2c02..0000000 --- a/src/schema-compiler.ts +++ /dev/null @@ -1,973 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import protobuf from "protobufjs"; -import type { - Cardinality, - ClassSchema, - ConflictStrategy, - FieldSchema, - FieldStorage, - FieldStorageKind, - FunctionRef, - InterfaceFieldContract, - InterfaceImplementation, - InterfaceSchema, - MethodSchema, - OperationSchema, - OperationServiceSchema, - MigrationSpec, - SchemaCompileResult, - SymbolRef, - EdgeDirectionality, - TypeRef, -} from "./schema-ir.js"; - -type OptionBag = Record; - -const CLASS_OPTION = "(camino.class)"; -const INTERFACE_OPTION = "(camino.interface)"; -const IMPLEMENTS_OPTION = "(camino.implements)"; -const CONSTRUCTOR_OPTION = "(camino.constructor)"; -const METHOD_OPTION = "(camino.method)"; -const MIGRATION_OPTION = "(camino.migration)"; -const CONFLICT_OPTION = "(camino.conflict)"; -const EDGE_OPTION = "(camino.edge)"; -const FIELD_STORAGE_OPTION = "(camino.field_storage)"; -const FIELD_OPS_OPTION = "(camino.field_ops)"; -const INTERFACE_FIELD_OPTION = "(camino.interface_field)"; -const DISPLAY_LABEL_OPTION = "(camino.display_label)"; -const IMPL_OPTION = "(camino.impl)"; -const SCHEMA_NAMESPACE_OPTION = "(camino.schema_namespace)"; -const SCHEMA_VERSION_OPTION = "(camino.schema_version)"; - -const enumName = (value: unknown) => - String(value) - .replace(/([a-z0-9])([A-Z])/g, "$1_$2") - .replace(/-/g, "_") - .toUpperCase(); - -const lowerEnumName = (value: unknown) => enumName(value).toLowerCase(); - -const getOption = ( - options: OptionBag | undefined, - name: string, -): unknown => { - if (!options) { - return undefined; - } - if (Object.hasOwn(options, name)) { - return options[name]; - } - const bareName = name.replace(/^\((.*)\)$/, "$1"); - if (Object.hasOwn(options, bareName)) { - return options[bareName]; - } - return undefined; -}; - -const getParsedOptions = ( - reflection: protobuf.ReflectionObject, -): OptionBag[] => { - const parsedOptions = (reflection as unknown as { parsedOptions?: unknown }) - .parsedOptions; - return Array.isArray(parsedOptions) - ? parsedOptions.filter( - (option): option is OptionBag => - Boolean(option) && typeof option === "object" && !Array.isArray(option), - ) - : []; -}; - -const getReflectionOptions = ( - reflection: protobuf.ReflectionObject, - name: string, -): unknown[] => { - const parsedValues = getParsedOptions(reflection).flatMap((option) => { - const value = getOption(option, name); - return value === undefined ? [] : [value]; - }); - if (parsedValues.length > 0) { - return parsedValues; - } - const value = getOption(reflection.options, name); - return value === undefined ? [] : [value]; -}; - -const getReflectionOption = ( - reflection: protobuf.ReflectionObject, - name: string, -): unknown => getReflectionOptions(reflection, name)[0]; - -const asObject = (value: unknown): OptionBag | undefined => - value && typeof value === "object" && !Array.isArray(value) - ? (value as OptionBag) - : undefined; - -const asArray = (value: unknown): unknown[] => - Array.isArray(value) ? value : value === undefined ? [] : [value]; - -const readString = ( - object: OptionBag | undefined, - key: string, -): string | undefined => { - const value = object?.[key]; - return typeof value === "string" ? value : undefined; -}; - -const readNumber = ( - object: OptionBag | undefined, - key: string, -): number | undefined => { - const value = object?.[key]; - return typeof value === "number" && Number.isFinite(value) - ? value - : undefined; -}; - -const readBoolean = ( - object: OptionBag | undefined, - key: string, -): boolean | undefined => { - const value = object?.[key]; - return typeof value === "boolean" ? value : undefined; -}; - -const symbolRefFromOption = ( - value: unknown, - fallback: SymbolRef, -): SymbolRef => { - const object = asObject(value); - if (!object) { - return fallback; - } - return { - namespace: readString(object, "namespace") ?? fallback.namespace, - name: readString(object, "name") ?? fallback.name, - version: readString(object, "version") ?? fallback.version, - ...(readString(object, "hash") - ? { hash: readString(object, "hash") } - : {}), - }; -}; - -const typeRefFromOption = ( - value: unknown, - fallbackVersion: string, -): TypeRef | undefined => { - const object = asObject(value); - if (!object) { - return undefined; - } - const symbol = asObject(object.symbol) - ? symbolRefFromOption(object.symbol, { - namespace: "", - name: "", - version: fallbackVersion, - }) - : undefined; - const protoType = readString(object, "proto_type")?.replace(/^\./, ""); - const symbolProtoType = - symbol?.namespace && symbol.name ? `${symbol.namespace}.${symbol.name}` : ""; - const resolvedProtoType = protoType ?? symbolProtoType; - if (!resolvedProtoType) { - return undefined; - } - return { - protoType: resolvedProtoType, - ...(symbol?.namespace && symbol.name ? { symbol } : {}), - }; -}; - -const interfaceFieldContractFromOption = ( - value: unknown, - schemaVersion: string, -): InterfaceFieldContract | undefined => { - const object = asObject(value); - if (!object) { - return undefined; - } - const type = typeRefFromOption(object.type, schemaVersion); - const refTargetTypeParam = readString(object, "ref_target_type_param"); - const edgeCardinality = - object.edge_cardinality === undefined - ? undefined - : cardinalityFromOption(object.edge_cardinality); - return { - required: readBoolean(object, "required") ?? false, - readable: readBoolean(object, "readable") ?? false, - writable: readBoolean(object, "writable") ?? false, - watchable: readBoolean(object, "watchable") ?? false, - ...(readString(object, "type_param") - ? { typeParam: readString(object, "type_param") } - : {}), - ...(type ? { type } : {}), - ...(refTargetTypeParam ? { refTargetTypeParam } : {}), - ...(edgeCardinality ? { edgeCardinality } : {}), - }; -}; - -const functionRefFromOption = (value: unknown): FunctionRef => { - const object = asObject(value); - if (!object) { - throw new Error("Expected function ref option object"); - } - const packageNamespace = readString(object, "package_namespace"); - const packageName = readString(object, "package_name"); - const symbol = readString(object, "symbol"); - if (!packageNamespace || !packageName || !symbol) { - throw new Error("Function ref requires package_namespace, package_name, and symbol"); - } - return { - packageNamespace, - packageName, - symbol, - ...(readString(object, "operation") - ? { operation: readString(object, "operation") } - : {}), - ...(readString(object, "version_ref") - ? { versionRef: readString(object, "version_ref") } - : {}), - }; -}; - -const conflictFromOption = (value: unknown): ConflictStrategy => { - const normalized = enumName(value); - if (!value || normalized === "CONFLICT_STRATEGY_UNSPECIFIED") { - return "preserve_conflicts"; - } - if (normalized === "REPLACE") { - return "replace"; - } - if (normalized === "PRESERVE_CONFLICTS") { - return "preserve_conflicts"; - } - if (normalized === "CRDT") { - return "crdt"; - } - throw new Error(`Unknown Camino conflict strategy: ${String(value)}`); -}; - -const cardinalityFromOption = (value: unknown): Cardinality => { - const normalized = lowerEnumName(value); - if (!value || normalized === "cardinality_unspecified") { - return "many"; - } - if ( - normalized === "optional_one" || - normalized === "exactly_one" || - normalized === "many" || - normalized === "many_unique" || - normalized === "many_ordered" || - normalized === "many_unique_ordered" - ) { - return normalized; - } - throw new Error(`Unknown Camino cardinality: ${String(value)}`); -}; - -const fieldStorageKindFromOption = (value: unknown): FieldStorageKind => { - if (value === 5) { - return "static_final"; - } - const normalized = lowerEnumName(value); - if (!value || normalized === "field_storage_kind_unspecified") { - return "stored"; - } - if ( - normalized === "stored" || - normalized === "derived" || - normalized === "lazy" || - normalized === "external" || - normalized === "static_final" - ) { - return normalized; - } - throw new Error(`Unknown Camino field storage kind: ${String(value)}`); -}; - -const fieldStorageFromOption = (value: unknown): FieldStorage => { - const object = asObject(value); - if (!object) { - return { - kind: "stored", - cache: false, - }; - } - const kind = fieldStorageKindFromOption(object.kind); - const resolver = object.resolver === undefined - ? undefined - : functionRefFromOption(object.resolver); - if ((kind === "derived" || kind === "lazy" || kind === "external") && !resolver) { - throw new Error(`${kind} field storage requires resolver`); - } - return { - kind, - ...(resolver ? { resolver } : {}), - cache: object.cache === true, - }; -}; - -const fieldOpsFromOption = (value: unknown) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const implementation = enumName(object.implementation); - if (implementation !== "SERVICE") { - throw new Error( - `Unsupported Camino field implementation: ${String(object.implementation)}`, - ); - } - const service = readString(object, "service"); - if (!service) { - throw new Error("SERVICE field_ops requires service"); - } - return { - implementation: "service" as const, - service, - }; -}; - -const extractFileDefaults = (sourceFile: string) => { - const text = fs.readFileSync(sourceFile, "utf8"); - const packageMatch = /^\s*package\s+([a-zA-Z0-9_.]+)\s*;/m.exec(text); - const namespaceMatch = - /^\s*option\s+\(camino\.schema_namespace\)\s*=\s*"([^"]+)"\s*;/m.exec( - text, - ); - const versionMatch = - /^\s*option\s+\(camino\.schema_version\)\s*=\s*"([^"]+)"\s*;/m.exec(text); - - return { - packageName: packageMatch?.[1] ?? "", - schemaNamespace: namespaceMatch?.[1] ?? packageMatch?.[1] ?? "", - schemaVersion: versionMatch?.[1] ?? "1", - }; -}; - -const protoSymbolFromReflection = ( - reflection: protobuf.ReflectionObject | null, - fallbackVersion: string, -): SymbolRef | undefined => { - if (!reflection?.fullName) { - return undefined; - } - const parts = reflection.fullName.replace(/^\./, "").split("."); - const name = parts.pop(); - if (!name) { - return undefined; - } - return { - namespace: parts.join("."), - name, - version: fallbackVersion, - }; -}; - -const typeRefForField = ( - field: protobuf.Field, - _schemaVersion: string, -): TypeRef => { - const enumValues = - field.resolvedType instanceof protobuf.Enum - ? Object.entries(field.resolvedType.values) - .filter(([_name, value]) => value !== 0) - .map(([name]) => name) - : undefined; - return { - protoType: field.type, - ...(enumValues ? { enumValues } : {}), - }; -}; - -const typeRefForType = ( - type: protobuf.Type | undefined, - fallbackType: string, - schemaVersion: string, -): TypeRef => { - const symbol = protoSymbolFromReflection(type ?? null, schemaVersion); - return { - protoType: type?.fullName?.replace(/^\./, "") ?? fallbackType, - ...(symbol ? { symbol } : {}), - }; -}; - -const fieldSchemaFromField = ( - field: protobuf.Field, - schemaVersion: string, -): FieldSchema => { - const storage = fieldStorageFromOption( - getReflectionOption(field, FIELD_STORAGE_OPTION), - ); - const ops = fieldOpsFromOption(getReflectionOption(field, FIELD_OPS_OPTION)); - if (ops && storage.kind !== "stored" && storage.kind !== "static_final") { - throw new Error( - `Field ${field.fullName} cannot declare both field_ops and package-resolved storage`, - ); - } - if (storage.kind === "static_final" && !ops) { - throw new Error(`Field ${field.fullName} with static_final storage requires field_ops`); - } - const interfaceContract = interfaceFieldContractFromOption( - getReflectionOption(field, INTERFACE_FIELD_OPTION), - schemaVersion, - ); - return { - name: field.name, - tag: field.id, - type: typeRefForField(field, schemaVersion), - conflict: conflictFromOption(getReflectionOption(field, CONFLICT_OPTION)), - repeated: field.repeated, - optional: field.optional, - storage, - ...(ops ? { ops } : {}), - ...(interfaceContract ? { interfaceContract } : {}), - isDisplayLabel: getReflectionOption(field, DISPLAY_LABEL_OPTION) === true, - }; -}; - -const isManyCardinality = (cardinality: Cardinality) => - cardinality === "many" || - cardinality === "many_unique" || - cardinality === "many_ordered" || - cardinality === "many_unique_ordered"; - -const materializationFromOption = ( - value: unknown, - fallbackVersion: string, -) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const classRef = symbolRefFromOption(object.class, { - namespace: "", - name: "", - version: fallbackVersion, - }); - if (!classRef.name) { - throw new Error("Edge materialization requires class"); - } - return { - class: classRef, - connectProjection: readString(object, "connect_projection") ?? "", - }; -}; - -const endpointFromOption = (params: { - option: unknown; - fallbackClass?: SymbolRef; - fallbackProjection: string; - fallbackCardinality: Cardinality; - fallbackVersion: string; -}) => { - const object = asObject(params.option); - const classRef = asObject(object?.class) - ? symbolRefFromOption(object?.class, { - namespace: "", - name: "", - version: params.fallbackVersion, - }) - : params.fallbackClass; - const interfaceRef = asObject(object?.interface) - ? symbolRefFromOption(object?.interface, { - namespace: "", - name: "", - version: params.fallbackVersion, - }) - : undefined; - const projection = readString(object, "projection") ?? params.fallbackProjection; - const cardinality = object?.cardinality === undefined - ? params.fallbackCardinality - : cardinalityFromOption(object.cardinality); - const materialization = materializationFromOption( - object?.materialize, - params.fallbackVersion, - ); - if (!classRef?.name && !interfaceRef?.name) { - throw new Error(`Edge endpoint ${projection} requires class or interface`); - } - return { - ...(classRef?.name ? { class: classRef } : {}), - ...(interfaceRef?.name ? { interface: interfaceRef } : {}), - projection, - cardinality, - indexed: readBoolean(object, "indexed") ?? false, - ...(materialization ? { materialization } : {}), - }; -}; - -const symbolKey = (ref: SymbolRef | undefined) => - ref ? [ref.namespace, ref.name, ref.version, ref.hash ?? ""].join(":") : ""; - -const endpointRoleKey = (endpoint: ReturnType) => - [ - symbolKey(endpoint.class), - symbolKey(endpoint.interface), - endpoint.projection, - endpoint.cardinality, - ].join("|"); - -const normalizeEdgeEndpoints = (params: { - directionality: "directed" | "undirected"; - fromEndpoint: ReturnType; - toEndpoint: ReturnType; -}) => { - if (params.directionality === "directed") { - return { - fromEndpoint: params.fromEndpoint, - toEndpoint: params.toEndpoint, - }; - } - return endpointRoleKey(params.fromEndpoint) <= endpointRoleKey(params.toEndpoint) - ? { - fromEndpoint: params.fromEndpoint, - toEndpoint: params.toEndpoint, - } - : { - fromEndpoint: params.toEndpoint, - toEndpoint: params.fromEndpoint, - }; -}; - -const symbolArrayFromOption = ( - value: unknown, - defaults: ReturnType, -) => - asArray(value) - .map((item) => - symbolRefFromOption(item, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, - }), - ) - .filter((symbol) => Boolean(symbol.name)); - -const isStringType = (type: TypeRef) => - type.protoType === "string" || type.protoType === "google.protobuf.StringValue"; - -const validateDisplayLabelFields = ( - type: protobuf.Type, - fields: FieldSchema[], - operationServices: OperationServiceSchema[], -) => { - const displayLabelFields = fields.filter((field) => field.isDisplayLabel); - if (displayLabelFields.length > 1) { - throw new Error( - `Class ${type.fullName} declares multiple Camino display label fields`, - ); - } - const displayLabelField = displayLabelFields[0]; - if (!displayLabelField) { - return; - } - if (!displayLabelField.ops) { - if (!isStringType(displayLabelField.type)) { - throw new Error( - `Display label field ${type.fullName}.${displayLabelField.name} must have string type`, - ); - } - return; - } - const serviceName = displayLabelField.ops.service.replace(/^\./, ""); - const getOperation = operationServices - .find((service) => service.fullName === serviceName) - ?.operations.find((operation) => operation.name === "Get"); - if (!getOperation || !isStringType(getOperation.outputType)) { - throw new Error( - `Display label field ${type.fullName}.${displayLabelField.name} must resolve to string`, - ); - } -}; - -const typeBindingFromOption = ( - value: unknown, - schemaVersion: string, -) => { - const object = asObject(value); - if (!object) { - return undefined; - } - const name = readString(object, "name"); - const type = typeRefFromOption(object.type, schemaVersion); - if (!name || !type) { - throw new Error("Interface type_binding requires name and type"); - } - return { name, type }; -}; - -const interfaceImplementationFromOption = ( - value: unknown, - defaults: ReturnType, -): InterfaceImplementation => { - const object = asObject(value); - if (!object) { - throw new Error("Expected implements option object"); - } - const interfaceId = symbolRefFromOption(object.interface, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, - }); - if (!interfaceId.name) { - throw new Error("implements option requires interface name"); - } - return { - interface: interfaceId, - typeBindings: asArray(object.type_binding) - .map((binding) => typeBindingFromOption(binding, defaults.schemaVersion)) - .filter((binding): binding is NonNullable => - Boolean(binding), - ), - }; -}; - -const serviceName = (service: protobuf.Service) => - service.fullName.replace(/^\./, ""); - -const operationFromMethod = ( - method: protobuf.Method, - schemaVersion: string, -): OperationSchema => { - const fn = functionRefFromOption(getReflectionOption(method, IMPL_OPTION)); - const methodWithTypes = method as protobuf.Method & { - resolvedRequestType?: protobuf.Type; - resolvedResponseType?: protobuf.Type; - }; - return { - name: method.name, - inputType: typeRefForType( - methodWithTypes.resolvedRequestType, - method.requestType, - schemaVersion, - ), - outputType: typeRefForType( - methodWithTypes.resolvedResponseType, - method.responseType, - schemaVersion, - ), - function: fn, - }; -}; - -const operationServiceFromService = ( - service: protobuf.Service, - schemaVersion: string, -): OperationServiceSchema => ({ - name: service.name, - fullName: serviceName(service), - operations: service.methodsArray.map((method) => - operationFromMethod(method, schemaVersion), - ), -}); - -const classSchemaFromType = ( - type: protobuf.Type, - sourceFile: string, - defaults: ReturnType, - operationServices: OperationServiceSchema[], -): ClassSchema | undefined => { - const classOption = asObject(getReflectionOption(type, CLASS_OPTION)); - if (!classOption) { - return undefined; - } - - const fallbackClassRef = { - namespace: defaults.schemaNamespace, - name: type.name, - version: defaults.schemaVersion, - }; - const classId = symbolRefFromOption(classOption.id, fallbackClassRef); - const classVersion = readNumber(classOption, "version") ?? Number(classId.version); - if (!Number.isInteger(classVersion) || classVersion <= 0) { - throw new Error(`Class ${type.fullName} has invalid Camino class version`); - } - - const fields = type.fieldsArray.map((field) => - fieldSchemaFromField(field, defaults.schemaVersion), - ); - validateDisplayLabelFields(type, fields, operationServices); - const edges = type.fieldsArray.flatMap((field) => { - const edgeOption = asObject(getReflectionOption(field, EDGE_OPTION)); - if (!edgeOption) { - return []; - } - const legacyTargetClass = symbolRefFromOption(edgeOption.target, { - namespace: defaults.schemaNamespace, - name: "", - version: defaults.schemaVersion, - }); - const cardinality = cardinalityFromOption(edgeOption.cardinality); - const declaredFromEndpoint = endpointFromOption({ - option: edgeOption.this_endpoint, - fallbackClass: classId, - fallbackProjection: field.name, - fallbackCardinality: cardinality, - fallbackVersion: defaults.schemaVersion, - }); - const declaredToEndpoint = endpointFromOption({ - option: edgeOption.other_endpoint, - fallbackClass: legacyTargetClass.name ? legacyTargetClass : undefined, - fallbackProjection: readString(edgeOption, "inverse") ?? "", - fallbackCardinality: "many", - fallbackVersion: defaults.schemaVersion, - }); - if (!declaredToEndpoint.projection) { - throw new Error( - `Edge field ${type.fullName}.${field.name} requires other_endpoint.projection or inverse`, - ); - } - const sourceProtoType = field.resolvedType?.fullName?.replace(/^\./, ""); - if (sourceProtoType !== "camino.Ref") { - throw new Error(`Edge field ${type.fullName}.${field.name} must use camino.Ref`); - } - const isMany = isManyCardinality(declaredFromEndpoint.cardinality); - if (isMany && !field.repeated) { - throw new Error(`Edge field ${type.fullName}.${field.name} must be repeated for ${declaredFromEndpoint.cardinality}`); - } - if (!isMany && field.repeated) { - throw new Error(`Edge field ${type.fullName}.${field.name} must not be repeated for ${declaredFromEndpoint.cardinality}`); - } - const directionality: EdgeDirectionality = - edgeOption.undirected === true ? "undirected" : "directed"; - const { fromEndpoint, toEndpoint } = normalizeEdgeEndpoints({ - directionality, - fromEndpoint: declaredFromEndpoint, - toEndpoint: declaredToEndpoint, - }); - const edgeId = symbolRefFromOption(edgeOption.id, { - namespace: defaults.schemaNamespace, - name: `${type.name}.${field.name}`, - version: defaults.schemaVersion, - }); - const fallbackToClass = toEndpoint.class ?? { - namespace: "", - name: "", - version: "", - }; - return [ - { - id: edgeId, - directionality, - sourceField: fromEndpoint.projection, - fromClass: fromEndpoint.class ?? classId, - toClass: fallbackToClass, - cardinality: fromEndpoint.cardinality, - ...(toEndpoint.projection - ? { inverse: toEndpoint.projection } - : {}), - fields: [], - fromEndpoint, - toEndpoint, - declaringClass: classId, - tags: symbolArrayFromOption(edgeOption.tag, defaults), - implements: symbolArrayFromOption(edgeOption.implements, defaults), - }, - ]; - }); - - const methods: MethodSchema[] = getReflectionOptions(type, METHOD_OPTION) - .map(asObject) - .filter((option): option is OptionBag => Boolean(option)) - .map((option) => { - const name = readString(option, "name"); - if (!name) { - throw new Error(`Method option on ${type.fullName} requires name`); - } - return { - name, - function: functionRefFromOption(option.function), - }; - }); - - const migrations: MigrationSpec[] = getReflectionOptions(type, MIGRATION_OPTION) - .map(asObject) - .filter((option): option is OptionBag => Boolean(option)) - .map((option) => { - const fromVersion = readNumber(option, "from_version"); - const toVersion = readNumber(option, "to_version"); - if (!fromVersion || !toVersion) { - throw new Error(`Migration option on ${type.fullName} requires versions`); - } - return { - fromVersion, - toVersion, - function: functionRefFromOption(option.function), - }; - }); - - const constructorOption = asObject( - getReflectionOption(type, CONSTRUCTOR_OPTION), - ); - const constructorSpec = constructorOption - ? { function: functionRefFromOption(constructorOption.function) } - : undefined; - - return { - id: classId, - version: classVersion, - fields, - edges, - methods, - migrations, - operationServices, - implements: getReflectionOptions(type, IMPLEMENTS_OPTION).map((option) => - interfaceImplementationFromOption(option, defaults), - ), - ...(constructorSpec ? { constructorSpec } : {}), - sourceFile, - protoMessage: type.fullName, - }; -}; - -const interfaceSchemaFromType = ( - type: protobuf.Type, - sourceFile: string, - defaults: ReturnType, -): InterfaceSchema | undefined => { - const interfaceOption = asObject(getReflectionOption(type, INTERFACE_OPTION)); - if (!interfaceOption) { - return undefined; - } - const classOption = asObject(getReflectionOption(type, CLASS_OPTION)); - if (classOption) { - throw new Error(`${type.fullName} cannot be both a Camino class and interface`); - } - const fallbackInterfaceRef = { - namespace: defaults.schemaNamespace, - name: type.name, - version: defaults.schemaVersion, - }; - const interfaceId = symbolRefFromOption( - interfaceOption.id, - fallbackInterfaceRef, - ); - const interfaceVersion = - readNumber(interfaceOption, "version") ?? Number(interfaceId.version); - if (!Number.isInteger(interfaceVersion) || interfaceVersion <= 0) { - throw new Error(`Interface ${type.fullName} has invalid Camino interface version`); - } - return { - id: interfaceId, - version: interfaceVersion, - fields: type.fieldsArray.map((field) => - fieldSchemaFromField(field, defaults.schemaVersion), - ), - sourceFile, - protoMessage: type.fullName, - typeParameters: asArray(interfaceOption.type_parameter) - .map((entry) => String(entry).trim()) - .filter(Boolean), - }; -}; - -const walkTypes = ( - namespace: protobuf.NamespaceBase, - visit: (type: protobuf.Type) => void, -) => { - for (const nested of namespace.nestedArray) { - if (nested instanceof protobuf.Type) { - visit(nested); - walkTypes(nested, visit); - } else if (nested instanceof protobuf.Namespace) { - walkTypes(nested, visit); - } - } -}; - -const walkServices = ( - namespace: protobuf.NamespaceBase, - visit: (service: protobuf.Service) => void, -) => { - for (const nested of namespace.nestedArray) { - if (nested instanceof protobuf.Service) { - visit(nested); - } else if (nested instanceof protobuf.Namespace) { - walkServices(nested, visit); - } - } -}; - -export const loadCaminoSchemaRoot = async ( - sourceFile: string, -): Promise<{ absoluteSourceFile: string; root: protobuf.Root }> => { - const absoluteSourceFile = path.resolve(sourceFile); - const root = new protobuf.Root(); - const envIncludeDirs = [ - process.env.QUIXOS_PROTO_PATH, - process.env.CAMINO_PROTO_PATH, - ] - .filter((value): value is string => Boolean(value)) - .join(path.delimiter) - .split(path.delimiter) - .map((entry) => entry.trim()) - .filter(Boolean) - .map((entry) => path.resolve(entry)); - const includeDirs = [ - path.dirname(absoluteSourceFile), - path.resolve("../../quixos-protocol/proto"), - path.resolve("quixos-protocol/proto"), - path.resolve("proto"), - ...envIncludeDirs, - ]; - root.resolvePath = (origin, target) => { - if (path.isAbsolute(target) && fs.existsSync(target)) { - return target; - } - const originDir = origin ? path.dirname(origin) : undefined; - const candidates = [ - ...(originDir ? [path.resolve(originDir, target)] : []), - ...includeDirs.map((dir) => path.resolve(dir, target)), - ]; - const found = candidates.find((candidate) => fs.existsSync(candidate)); - return found ?? target; - }; - - await root.load(absoluteSourceFile, { keepCase: true }); - root.resolveAll(); - - return { absoluteSourceFile, root }; -}; - -export const compileCaminoSchema = async ( - sourceFile: string, -): Promise => { - const { absoluteSourceFile, root } = await loadCaminoSchemaRoot(sourceFile); - const defaults = extractFileDefaults(absoluteSourceFile); - - const operationServices: OperationServiceSchema[] = []; - walkServices(root, (service) => { - operationServices.push( - operationServiceFromService(service, defaults.schemaVersion), - ); - }); - - const classes: ClassSchema[] = []; - const interfaces: InterfaceSchema[] = []; - walkTypes(root, (type) => { - const interfaceSchema = interfaceSchemaFromType( - type, - absoluteSourceFile, - defaults, - ); - if (interfaceSchema) { - interfaces.push(interfaceSchema); - } - const classSchema = classSchemaFromType( - type, - absoluteSourceFile, - defaults, - operationServices, - ); - if (classSchema) { - classes.push(classSchema); - } - }); - - return { - sourceFile: absoluteSourceFile, - classes, - interfaces, - }; -}; diff --git a/src/schema-ir.ts b/src/schema-ir.ts deleted file mode 100644 index 5c40a24..0000000 --- a/src/schema-ir.ts +++ /dev/null @@ -1,174 +0,0 @@ -export type SymbolRef = { - namespace: string; - name: string; - version: string; - hash?: string; -}; - -export type FunctionRef = { - packageNamespace: string; - packageName: string; - symbol: string; - operation?: string; - versionRef?: string; -}; - -export type ConflictStrategy = - | "replace" - | "preserve_conflicts" - | "crdt"; - -export type Cardinality = - | "optional_one" - | "exactly_one" - | "many" - | "many_unique" - | "many_ordered" - | "many_unique_ordered"; - -export type EdgeDirectionality = "directed" | "undirected"; - -export type EdgeMaterialization = { - class: SymbolRef; - connectProjection: string; -}; - -export type FieldStorageKind = - | "stored" - | "derived" - | "lazy" - | "external" - | "static_final"; - -export type FieldStorage = { - kind: FieldStorageKind; - resolver?: FunctionRef; - cache: boolean; -}; - -export type FieldOps = { - implementation: "service"; - service: string; -}; - -export type TypeRef = { - protoType: string; - symbol?: SymbolRef; - enumValues?: string[]; -}; - -export type TypeBinding = { - name: string; - type: TypeRef; -}; - -export type InterfaceFieldContract = { - required: boolean; - readable: boolean; - writable: boolean; - watchable: boolean; - typeParam?: string; - type?: TypeRef; - refTargetTypeParam?: string; - edgeCardinality?: Cardinality; -}; - -export type InterfaceImplementation = { - interface: SymbolRef; - typeBindings: TypeBinding[]; -}; - -export type FieldSchema = { - name: string; - tag: number; - type: TypeRef; - conflict: ConflictStrategy; - repeated: boolean; - optional: boolean; - storage: FieldStorage; - ops?: FieldOps; - interfaceContract?: InterfaceFieldContract; - isDisplayLabel: boolean; -}; - -export type EdgeEndpointSchema = { - class?: SymbolRef; - interface?: SymbolRef; - projection: string; - cardinality: Cardinality; - indexed: boolean; - materialization?: EdgeMaterialization; -}; - -export type EdgeSchema = { - id: SymbolRef; - directionality: EdgeDirectionality; - sourceField: string; - fromClass: SymbolRef; - toClass: SymbolRef; - cardinality: Cardinality; - inverse?: string; - fields: FieldSchema[]; - fromEndpoint: EdgeEndpointSchema; - toEndpoint: EdgeEndpointSchema; - declaringClass: SymbolRef; - tags: SymbolRef[]; - implements: SymbolRef[]; -}; - -export type MethodSchema = { - name: string; - function: FunctionRef; -}; - -export type MigrationSpec = { - fromVersion: number; - toVersion: number; - function: FunctionRef; -}; - -export type ConstructorSpec = { - function: FunctionRef; -}; - -export type OperationSchema = { - name: string; - inputType: TypeRef; - outputType: TypeRef; - function: FunctionRef; -}; - -export type OperationServiceSchema = { - name: string; - fullName: string; - operations: OperationSchema[]; -}; - -export type ClassSchema = { - id: SymbolRef; - version: number; - fields: FieldSchema[]; - edges: EdgeSchema[]; - methods: MethodSchema[]; - migrations: MigrationSpec[]; - operationServices: OperationServiceSchema[]; - implements: InterfaceImplementation[]; - constructorSpec?: ConstructorSpec; - sourceFile: string; - protoMessage: string; -}; - -export type InterfaceSchema = { - id: SymbolRef; - version: number; - fields: FieldSchema[]; - sourceFile: string; - protoMessage: string; - typeParameters: string[]; -}; - -export type SchemaCompileResult = { - sourceFile: string; - classes: ClassSchema[]; - interfaces: InterfaceSchema[]; -}; diff --git a/test/runtime.test.mjs b/test/runtime.test.mjs new file mode 100644 index 0000000..b495486 --- /dev/null +++ b/test/runtime.test.mjs @@ -0,0 +1,193 @@ +import assert from "node:assert/strict"; +import http from "node:http"; +import test from "node:test"; +import { create } from "@bufbuild/protobuf"; +import { createClient } from "@connectrpc/connect"; +import { connectNodeAdapter, createConnectTransport } from "@connectrpc/connect-node"; +import { + createPackageRuntimeRoutes, + createRuntimeContext, + derived, + jsToProtoValue, + liveValue, + protoValueToJs, +} from "../dist/index.js"; +import { + CaminoObjectSchema, + CaminoService, + CrdtValueSchema, + StateValueSourceSchema, + ValueSchema, + ValueSourceSchema, +} from "../dist/camino/api_pb.js"; +import { + EdgeDependencySchema, + InjectedDependencySchema, + PackageExportRefSchema, +} from "../dist/quixos/refs_pb.js"; +import { PackageRuntime } from "../dist/quixos/runtime_pb.js"; + +const listen = async (routes) => { + const server = http.createServer((request, response) => void connectNodeAdapter({ routes })(request, response)); + await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve)); + const address = server.address(); + assert.ok(address && typeof address === "object"); + return { + url: `http://127.0.0.1:${address.port}`, + close: async () => { + server.closeAllConnections(); + await new Promise((resolve) => server.close(resolve)); + }, + }; +}; + +test("generic values preserve nested values and object references", () => { + const value = jsToProtoValue({ + title: "A task", + target: { $quixosRef: "obj:target" }, + tags: ["one", "two"], + }); + assert.deepEqual(protoValueToJs(value), { + title: "A task", + target: "obj:target", + tags: ["one", "two"], + }); +}); + +test("live values preserve writable CRDT source identity through derivation", () => { + const value = create(ValueSchema, { + kind: { case: "stringValue", value: "notes" }, + source: create(ValueSourceSchema, { + state: create(StateValueSourceSchema, { + objectId: "obj:task", + slotId: "slot:task:notes", + revision: 7n, + crdtSnapshot: create(CrdtValueSchema, { + type: "quixos.automerge-document.v1", + encoding: "automerge-snapshot-v1", + payload: new Uint8Array([1, 2, 3]), + }), + }), + }), + }); + + const forwarded = jsToProtoValue(liveValue(value)); + assert.equal(forwarded.source?.state?.objectId, "obj:task"); + assert.equal(forwarded.source?.state?.slotId, "slot:task:notes"); + assert.equal(forwarded.source?.state?.revision, 7n); + assert.deepEqual(forwarded.source?.state?.crdtSnapshot?.payload, new Uint8Array([1, 2, 3])); +}); + +test("runtime context exposes only explicitly injected ports", async () => { + const writes = []; + const camino = { + readState: async ({ objectId, slotId }) => ({ + value: jsToProtoValue(`${objectId}/${slotId}`), + }), + writeState: async (request) => { + writes.push(request); + return {}; + }, + resolveEdge: async () => ({ edges: [] }), + connectEdge: async () => ({}), + }; + const context = createRuntimeContext(camino, {}, { + objectId: "obj:task", + input: {}, + dependencies: [ + create(InjectedDependencySchema, { + portId: "port:title", + binding: { case: "stateSlotId", value: "slot:task:title" }, + }), + create(InjectedDependencySchema, { + portId: "port:children", + binding: { + case: "edge", + value: create(EdgeDependencySchema, { + edgeTypeId: "edge:task:children", + projectionId: "projection:task:children", + }), + }, + }), + ], + }); + + assert.equal(await context.state("port:title").get(), "obj:task/slot:task:title"); + await context.state("port:title").set("Changed"); + assert.equal(writes.length, 1); + assert.equal("camino" in context, false); + assert.equal("orch" in context, false); + assert.throws(() => context.state("port:not-injected"), /Missing slotId dependency/); + assert.throws(() => context.interface("port:title"), /Missing interfaceRevisionId dependency/); + assert.deepEqual(await context.edge("port:children").resolve(), []); +}); + +test("derived watches subscribe before reading and emit only real changes", async () => { + let current = "before"; + let subscribed = false; + const changes = []; + const caminoServer = await listen((router) => router.service(CaminoService, { + readState: () => { + assert.equal(subscribed, true, "the dependency stream must be live before the state read"); + return { value: jsToProtoValue(current) }; + }, + watchObject: async function* (request, context) { + subscribed = true; + yield { + objectId: request.objectId, + snapshot: create(CaminoObjectSchema, { + id: request.objectId, + atomId: "atom:test", + workspaceRevisionId: "workspace:test@1", + }), + }; + while (!context.signal.aborted) { + const changed = await new Promise((resolve) => { + const finish = () => resolve(true); + changes.push(finish); + context.signal.addEventListener("abort", () => resolve(false), { once: true }); + }); + if (!changed) return; + yield { objectId: request.objectId }; + } + }, + })); + const runtimeServer = await listen(createPackageRuntimeRoutes({ + packageRevisionId: "package:test@1", + caminoUrl: caminoServer.url, + exports: { + "export:test:value": derived((context) => context.state("port:value").get()), + }, + })); + const client = createClient(PackageRuntime, createConnectTransport({ + baseUrl: runtimeServer.url, + httpVersion: "1.1", + })); + const controller = new AbortController(); + try { + const stream = client.watch({ + export: create(PackageExportRefSchema, { + packageRevisionId: "package:test@1", + exportId: "export:test:value", + }), + objectId: "obj:test", + dependencies: [create(InjectedDependencySchema, { + portId: "port:value", + binding: { case: "stateSlotId", value: "slot:test:value" }, + })], + }, { signal: controller.signal })[Symbol.asyncIterator](); + const initial = await stream.next(); + assert.equal(protoValueToJs(initial.value?.value), "before"); + assert.equal(initial.value?.initial, true); + + current = "after"; + changes.shift()?.(); + const updated = await stream.next(); + assert.equal(protoValueToJs(updated.value?.value), "after"); + assert.equal(updated.value?.initial, false); + } finally { + controller.abort(); + await runtimeServer.close(); + await caminoServer.close(); + } +}); diff --git a/tsconfig.json b/tsconfig.json index 8b48867..3955eee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,9 +7,11 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, + "types": ["node"], "declaration": true, "declarationMap": true, - "outDir": "dist" + "outDir": "dist", + "rootDir": "src" }, "include": ["src/**/*.ts"] } diff --git a/yarn-project.nix b/yarn-project.nix index 36e8bc1..ffc2a2c 100644 --- a/yarn-project.nix +++ b/yarn-project.nix @@ -7,8 +7,8 @@ let yarnBin = fetchurl { - url = "https://repo.yarnpkg.com/4.14.1/packages/yarnpkg-cli/bin/yarn.js"; - hash = "sha512-ZN9EgFWy03uiadfbU1pGm42pP47xFAwl/XqDwAqPuqyyFMoOAlU7kqLFTO94u2fQtIF/qwIAHfDiT6wPrMw7Qg=="; + url = "https://repo.yarnpkg.com/4.18.0/packages/yarnpkg-cli/bin/yarn.js"; + hash = "sha512-/Lhxb+fNDuzhQf/Bi5IZOp35IEwbqDGJwoiDUiP8C75kr0c7qw1emSen2utcryuwfrJ4fMkzjKBA6hJfKh8vfg=="; }; cacheFolder = ".yarn/cache"; @@ -156,35 +156,22 @@ let overriddenProject = optionalOverride overrideAttrs project; cacheEntries = { -"@automerge/automerge@npm:3.3.0" = { filename = "@automerge-automerge-npm-3.3.0-3f6661ca17-74b3a8ef9e.zip"; hash = "sha512-dLOo7548v0B2DomHJ+za1RKOUv0rBTgJRUrnsrhbTsZHw8uipjXNv4MfIxVzGtQl2jenhLeb8TvIbsKKfpKv8g=="; }; "@bufbuild/protobuf@npm:2.12.1" = { filename = "@bufbuild-protobuf-npm-2.12.1-d8afb467b3-2d40cfe4ec.zip"; hash = "sha512-LUDP5Ow7sOPwarLih3HcXcVm6qywVfvok9dWIbBAfQJy1I9ApJCtR97YOe1UFRThr3G7E68CSzrjbvDFbVbdqQ=="; }; "@bufbuild/protoc-gen-es@npm:2.12.1" = { filename = "@bufbuild-protoc-gen-es-npm-2.12.1-6e9387fcb8-0e2805376d.zip"; hash = "sha512-DigFN22Lmj/OD9OdkPZa4dH/vqMSvi2tk2f3xyEqvFHcKleC531iqPhh7De9xtG9MM+sVRDRJCeCzXA/kH4f9Q=="; }; "@bufbuild/protoplugin@npm:2.12.1" = { filename = "@bufbuild-protoplugin-npm-2.12.1-e1aebb80bf-c7b401ab31.zip"; hash = "sha512-x7QBqzHZSsaCXLm75c/3XQXSjuINRnskt6XUKZuaygZmhuo5t6OoRTuLWgGD+qd4HoP8LliAZhgHudMVX3Hr6Q=="; }; "@connectrpc/connect-node@npm:2.1.2" = { filename = "@connectrpc-connect-node-npm-2.1.2-021434d5d5-ba8b0c9384.zip"; hash = "sha512-uosMk4TDgps3eqeoJtwM1Qpgk1J9LscBRgSRKDYzbqlgSitazqQrEEd/i+RWnknd7WbKD8d/X1sCcDXgKeE+qQ=="; }; "@connectrpc/connect@npm:2.1.2" = { filename = "@connectrpc-connect-npm-2.1.2-ab34825de3-4e15000890.zip"; hash = "sha512-ThUACJAjt1Lv1E+pQKWuHh+gDhvrxLoM7ScruTWSDYw7hbd0UOZErUQruMqaJ1sMFxNviWuo7/A2F4Ex2wHWFQ=="; }; -"@protobufjs/aspromise@npm:1.1.2" = { filename = "@protobufjs-aspromise-npm-1.1.2-71d00b938f-a83343a468.zip"; hash = "sha512-qDNDpGj/W17Gv/Nv14imTIOeSKB/+fT4E1ZPWMr0TQEc1lBO0hR780g1vXp90hBwUq91WWHGsJj9iQK09lANDw=="; }; -"@protobufjs/base64@npm:1.1.2" = { filename = "@protobufjs-base64-npm-1.1.2-cd8ca6814a-eec925e681.zip"; hash = "sha512-7skl5oEIGvGQuO4jH5utMQHhiau8GC/yedprUx59vSpW8fMG83qAsb6eAKotJxaQ0I3MXzJvccnu2FRmdcjK9g=="; }; -"@protobufjs/codegen@npm:2.0.5" = { filename = "@protobufjs-codegen-npm-2.0.5-bb74ff329d-1b8a2ae56e.zip"; hash = "sha512-G4oq5W7mClbp0gXNS2ByoVA8UGm467kFcQ+XT/AJig0HAGQcE34KjZje3xRCMVahBqlDNpXL9SV0gQ9VAA/cqw=="; }; -"@protobufjs/eventemitter@npm:1.1.1" = { filename = "@protobufjs-eventemitter-npm-1.1.1-dbe0dfc812-8e06193d46.zip"; hash = "sha512-jgYZPUYpxefAnU+MLduo/E36c58BSfM6HZAVaNNbt7i1J3pOhFK6873QswL9WZzyVdGTJnqpOgpHR+I80HPErA=="; }; -"@protobufjs/fetch@npm:1.1.1" = { filename = "@protobufjs-fetch-npm-1.1.1-b98d5396a8-a497ff5433.zip"; hash = "sha512-pJf/VDOFToV38EJ5g+o5uRE7SagSD5RRUpHXYzJwYdLDAT5g4k6kNtCR2vrgGg9usYZ+OxYWBF2Wox2LPGRu1A=="; }; -"@protobufjs/float@npm:1.0.2" = { filename = "@protobufjs-float-npm-1.0.2-5678f64d08-18f2bdede7.zip"; hash = "sha512-GPK97edv/PAXBwivFcnJ22JZt3HmuExRsG3zSpwznbvuwmfRTOC93SCswUKx2YDZg9MUNDmN9/mOsMlKDreQaQ=="; }; -"@protobufjs/path@npm:1.1.2" = { filename = "@protobufjs-path-npm-1.1.2-641d08de76-cece0a938e.zip"; hash = "sha512-zs4Kk45/Xf0voD+MFPLxz4sNbhOscyb/TJbqMR7/1ft64LunVPv1BTEq8uOFACUMkOaFBrl8AjYKQ3k9iKDYtA=="; }; -"@protobufjs/pool@npm:1.1.0" = { filename = "@protobufjs-pool-npm-1.1.0-47a76f96a1-eda2718b7f.zip"; hash = "sha512-7aJxi38iKsbmrTb3WKku+Q0mUmAmoZ9PF/Zo9F4DBqW9c03vP0j1H4E0rgl4tiYqXFF8CLEVpVF1bRo6rfzwOA=="; }; -"@protobufjs/utf8@npm:1.1.2" = { filename = "@protobufjs-utf8-npm-1.1.2-9c7ca5968f-975c6e2c03.zip"; hash = "sha512-l1xuLAMZvVDBdTHRhrU3qIy00yBePKkpfNhCtjHTQdoO4/8WvoZWzSZgdW3HU7KcimoUwK2O1gLB+R3fIuez8w=="; }; -"@quixos/camino-datatypes@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-datatypes.git#commit=70f9f45eb7ca23643f1b8220a203d7b3b7aa5bf4" = { filename = "@quixos-camino-datatypes-https-bd0d21d1d2-24717b0ac3.zip"; hash = "sha512-JHF7CsMfaNsZzxtrxO0Uqkw73ZRZnQOZm+NlttlSgXQ0wI6jlvCdw3MJzLcNxsGEmYrMSjrdgvspcIRi3ydm2w=="; }; "@types/node@npm:24.13.3" = { filename = "@types-node-npm-24.13.3-b512a0bbeb-a5bc08f49b.zip"; hash = "sha512-pbwI9JuVgdzcqQ4CzXcZejx5mECAdmSULlzVFhpVPU0q6AZPfjKUQQ10jX0Ji1wYSL5/pQwG8pxBk6sWvk5Z6w=="; }; -"@types/node@npm:26.1.1" = { filename = "@types-node-npm-26.1.1-7a7a9f32f4-25ac509319.zip"; hash = "sha512-JaxQkxlXNt0HTVAnrbuoVhe8lR1aQVBuvTuQcwSKy3IzYT84ItX5uUR/nAhByR9jh8Rig5FnZ+PvefI5F0UsRg=="; }; +"@typescript/typescript-linux-arm64@npm:7.0.2" = { filename = "@typescript-typescript-linux-arm64-npm-7.0.2-9cacfc53a0-10c0.zip"; hash = "sha512-s4c7nGT/lQIw6x0IfrL0b3ECy/D0g7UoDLdiIWJoM6EGXk5N/dmXdxUdA8Cr3hV/3nO2BYKTQ6Ai8/zGhiSQ3A=="; }; +"@typescript/typescript-linux-x64@npm:7.0.2" = { filename = "@typescript-typescript-linux-x64-npm-7.0.2-8dd7ff8d24-10c0.zip"; hash = "sha512-k9EUK5CZ3OOPnyslp8SAAonHJpnpPmlaulppI/NmFyCzNs3UN/TLPUkyQia3KIxgbyTzKoXI5L5fl8Uj9bJ7Cg=="; }; "@typescript/vfs@npm:1.6.4" = { filename = "@typescript-vfs-npm-1.6.4-78935c9d3e-acb9de42f2.zip"; hash = "sha512-rLneQvI/2j9149eQC6EG7zI6L0588OSpTbtFfibTU8pjuzUZPtGjL8hzPzrlkJlhKykLBr1iIWlIYb65v7YvYg=="; }; "debug@npm:4.4.3" = { filename = "debug-npm-4.4.3-0105c6123a-d79136ec6c.zip"; hash = "sha512-15E27GyD7L79D2pVk9pqnJHsTX3cS1TIg9bnHsmsy19noaXpbQCjKBlrW1yG02XpjYo6cIVqrxa057GYXmf1pg=="; }; -"long@npm:5.3.2" = { filename = "long-npm-5.3.2-f80d0f7d39-7130fe1cbc.zip"; hash = "sha512-cTD+HLzi3KBnNLNbcNOAyj9wJxx/iFLJIqfGLIbE418MOSkFZeynEzxiWQjUDhJqxXwCsbGkY2uUV9d+HmC5gQ=="; }; "ms@npm:2.1.3" = { filename = "ms-npm-2.1.3-81ff3cfac1-d924b57e73.zip"; hash = "sha512-2SS1fnMSs7Y60h/Fs9wK9eeNYaH8fPtUV+2vJjJr9ivlMHzIf/toYu8cKzOwIzzbXU8BxMlYzA1mCUi2Wih6SA=="; }; -"protobufjs@npm:7.6.5" = { filename = "protobufjs-npm-7.6.5-ff4a872120-863eaca9c6.zip"; hash = "sha512-hj6sqcb0W/z7h4fFRfU+nGaWUH4yjjmBtGQ8EtNd9/KCYCHBDj/TC+80LBOo6dMGVHusnAhJ7jv1D3cKEvAdxQ=="; }; "typescript@npm:5.4.5" = { filename = "typescript-npm-5.4.5-8568a42232-2954022ada.zip"; hash = "sha512-KVQCKto0D9PWqeK45TT2XVfJLV85iaJjdUp4q6VJ9+ZSmswZIZE1YKS4FsRtzn30pNKfnxGj3A1CE7t20EMlHg=="; }; -"typescript@npm:5.9.3" = { filename = "typescript-npm-5.9.3-48715be868-6bd7552ce3.zip"; hash = "sha512-a9dVLOOfl+cR21qgSPb5mVtT8cUvfYZnwavcFwDGinajCPV5zTCc5rU2Rt606aG+fIE6k7qvCijM1TajAnDhxQ=="; }; +"typescript@npm:7.0.2" = { filename = "typescript-npm-7.0.2-0bde2bcec5-3dcee51ec8.zip"; hash = "sha512-Pc7lHsjDMkkjJbzb999ItmZodR8SfmIq59QbbHFusZGEQkpF4U93UPUPNAIyOItp5ih4WRVfBqXOLfdvEssxzw=="; }; "typescript@patch:typescript@npm%3A5.4.5#optional!builtin::version=5.4.5&hash=5adc0c" = { filename = "typescript-patch-6e159bfddb-db2ad2a16c.zip"; hash = "sha512-2yrSoWyoKfUEJ+6x2hVeekXlmO7HsIbYtOi6ROWiNfdY5gbWgcZpkiMNP8O4mVhl5f0LIqLJVIbQsyAPgwcuyQ=="; }; -"typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" = { filename = "typescript-patch-6fda4d02cf-ad09fdf7a7.zip"; hash = "sha512-rQn996dWgU3OZbxgwWV7QNREUTRoWO6iMOEPLpWiidkYO24y5cEelazAzMIUtPNiidytS/GIawrbhNcR0zakMA=="; }; +"typescript@patch:typescript@npm%3A7.0.2#optional!builtin::version=7.0.2&hash=3bafbf" = { filename = "typescript-patch-4859cbaf66-6b3cdc369c.zip"; hash = "sha512-azzcNpzYKdRuAHNOpkIz7oRBnCglrY/kCJFa3ed6vO1LeiQB9+7VF9VKek9dHBhpdTy5kBjfHCFZx2HZ8zSDpg=="; }; "undici-types@npm:7.18.2" = { filename = "undici-types-npm-7.18.2-3e6d69d829-85a7918911.zip"; hash = "sha512-haeRiRE6I4lZ16ZHNo5PfFVZw6QE69uPxEiBRc6UJvzYIlKoRKMCeY38Djfm+xeP9IHtA7xMr2NMV1fZ70NSHQ=="; }; -"undici-types@npm:8.3.0" = { filename = "undici-types-npm-8.3.0-d34470de3e-c8aa7e2fbe.zip"; hash = "sha512-yKp+L76/zlGWVNr63A7OWb6IjSzK8YD7RJXah157U20kVjRcOEBpx+bz6cmrdDXwdJV9owbxQjQ+7ob/gEiFWg=="; }; }; in overriddenProject diff --git a/yarn.lock b/yarn.lock index 5c38ec7..8dc91bb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,16 +2,9 @@ # Manual changes might be lost - proceed with caution! __metadata: - version: 9 + version: 10 cacheKey: 10c0 -"@automerge/automerge@npm:^3.3.0": - version: 3.3.0 - resolution: "@automerge/automerge@npm:3.3.0" - checksum: 10c0/74b3a8ef9e3cbf40760e898727ecdad5128e52fd2b053809454ae7b2b85b4ec647c3cba2a635cdbf831f2315731ad425da37a784b79bf13bc86ec28a7e92aff2 - languageName: node - linkType: hard - "@bufbuild/protobuf@npm:2.12.1, @bufbuild/protobuf@npm:^2.12.1": version: 2.12.1 resolution: "@bufbuild/protobuf@npm:2.12.1" @@ -66,107 +59,19 @@ __metadata: languageName: node linkType: hard -"@protobufjs/aspromise@npm:^1.1.1, @protobufjs/aspromise@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/aspromise@npm:1.1.2" - checksum: 10c0/a83343a468ff5b5ec6bff36fd788a64c839e48a07ff9f4f813564f58caf44d011cd6504ed2147bf34835bd7a7dd2107052af755961c6b098fd8902b4f6500d0f - languageName: node - linkType: hard - -"@protobufjs/base64@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/base64@npm:1.1.2" - checksum: 10c0/eec925e681081af190b8ee231f9bad3101e189abbc182ff279da6b531e7dbd2a56f1f306f37a80b1be9e00aa2d271690d08dcc5f326f71c9eed8546675c8caf6 - languageName: node - linkType: hard - -"@protobufjs/codegen@npm:^2.0.5": - version: 2.0.5 - resolution: "@protobufjs/codegen@npm:2.0.5" - checksum: 10c0/1b8a2ae56ee60a56e9d205cd4b6072a1503c5069b8ebb905710f974ff0098a0d0700641c137e0a8d98dedf14423156a106a9433695cbf52574810f55000fdcab - languageName: node - linkType: hard - -"@protobufjs/eventemitter@npm:^1.1.1": - version: 1.1.1 - resolution: "@protobufjs/eventemitter@npm:1.1.1" - checksum: 10c0/8e06193d4629c5e7c09d4f8c2ddba8fc4dfa739f0149f33a1d901568d35bb7b8b5277a4e8452baf3bdd0b302fd599cf255d193267aa93a0a4747e23cd073c4ac - languageName: node - linkType: hard - -"@protobufjs/fetch@npm:^1.1.1": - version: 1.1.1 - resolution: "@protobufjs/fetch@npm:1.1.1" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.1" - checksum: 10c0/a497ff5433854e8577f0427983ea39b9113b49a8120f94515291d763327061d2c3013e60e24ea436d091dafae01a0f6eb1867e3b1616045d96a31d8b3c646ed4 - languageName: node - linkType: hard - -"@protobufjs/float@npm:^1.0.2": - version: 1.0.2 - resolution: "@protobufjs/float@npm:1.0.2" - checksum: 10c0/18f2bdede76ffcf0170708af15c9c9db6259b771e6b84c51b06df34a9c339dbbeec267d14ce0bddd20acc142b1d980d983d31434398df7f98eb0c94a0eb79069 - languageName: node - linkType: hard - -"@protobufjs/path@npm:^1.1.2": - version: 1.1.2 - resolution: "@protobufjs/path@npm:1.1.2" - checksum: 10c0/cece0a938e7f5dfd2fa03f8c14f2f1cf8b0d6e13ac7326ff4c96ea311effd5fb7ae0bba754fbf505312af2e38500250c90e68506b97c02360a43793d88a0d8b4 - languageName: node - linkType: hard - -"@protobufjs/pool@npm:^1.1.0": - version: 1.1.0 - resolution: "@protobufjs/pool@npm:1.1.0" - checksum: 10c0/eda2718b7f222ac6e6ad36f758a92ef90d26526026a19f4f17f668f45e0306a5bd734def3f48f51f8134ae0978b6262a5c517c08b115a551756d1a3aadfcf038 - languageName: node - linkType: hard - -"@protobufjs/utf8@npm:^1.1.1": - version: 1.1.2 - resolution: "@protobufjs/utf8@npm:1.1.2" - checksum: 10c0/975c6e2c0319bd50c17531d186b537a88cb4d3205e3ca9297cd842b631d341da0ee3ff16be8656cd2660756dc753b29c8a6a14c0ad8ed602c1f91ddf22e7b3f3 - languageName: node - linkType: hard - -"@quixos/camino-datatypes@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-datatypes.git#commit=70f9f45eb7ca23643f1b8220a203d7b3b7aa5bf4": - version: 0.1.0 - resolution: "@quixos/camino-datatypes@https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-datatypes.git#commit=70f9f45eb7ca23643f1b8220a203d7b3b7aa5bf4" - dependencies: - "@automerge/automerge": "npm:^3.3.0" - checksum: 10c0/24717b0ac31f68db19cf1b6bc4ed14aa4c3bdd94599d03999be365b6d952817434c08ea396f09dc37309ccb70dc6c184998acc4a3add82fb29708462df2766db - languageName: node - linkType: hard - "@quixos/camino-package-runtime@workspace:.": version: 0.0.0-use.local resolution: "@quixos/camino-package-runtime@workspace:." dependencies: - "@automerge/automerge": "npm:^3.3.0" "@bufbuild/protobuf": "npm:^2.12.1" "@bufbuild/protoc-gen-es": "npm:^2.12.1" "@connectrpc/connect": "npm:^2.1.2" "@connectrpc/connect-node": "npm:^2.1.2" - "@quixos/camino-datatypes": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-datatypes.git#commit=70f9f45eb7ca23643f1b8220a203d7b3b7aa5bf4" "@types/node": "npm:^24" - protobufjs: "npm:^7.5.4" - typescript: "npm:^5.9.3" - bin: - camino-codegen-ts-runtime: dist/codegen-ts-runtime.js + typescript: "npm:^7.0.2" languageName: unknown linkType: soft -"@types/node@npm:>=13.7.0": - version: 26.1.1 - resolution: "@types/node@npm:26.1.1" - dependencies: - undici-types: "npm:~8.3.0" - checksum: 10c0/25ac5093195736dd074d5027adbba85617bc951d5a41506ebd3b9073048acb7233613f3822d5f9b9447f9c0841c91f6387c46283916767e3ef79f23917452c46 - languageName: node - linkType: hard - "@types/node@npm:^24": version: 24.13.3 resolution: "@types/node@npm:24.13.3" @@ -176,6 +81,146 @@ __metadata: languageName: node linkType: hard +"@typescript/typescript-aix-ppc64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-aix-ppc64@npm:7.0.2" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@typescript/typescript-darwin-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-darwin-arm64@npm:7.0.2" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-darwin-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-darwin-x64@npm:7.0.2" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-freebsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-freebsd-arm64@npm:7.0.2" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-freebsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-freebsd-x64@npm:7.0.2" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-arm64@npm:7.0.2" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-arm@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-arm@npm:7.0.2" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@typescript/typescript-linux-loong64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-loong64@npm:7.0.2" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-mips64el@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-mips64el@npm:7.0.2" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@typescript/typescript-linux-ppc64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-ppc64@npm:7.0.2" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-riscv64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-riscv64@npm:7.0.2" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@typescript/typescript-linux-s390x@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-s390x@npm:7.0.2" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@typescript/typescript-linux-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-linux-x64@npm:7.0.2" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-netbsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-netbsd-arm64@npm:7.0.2" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-netbsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-netbsd-x64@npm:7.0.2" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-openbsd-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-openbsd-arm64@npm:7.0.2" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-openbsd-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-openbsd-x64@npm:7.0.2" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-sunos-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-sunos-x64@npm:7.0.2" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@typescript/typescript-win32-arm64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-win32-arm64@npm:7.0.2" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@typescript/typescript-win32-x64@npm:7.0.2": + version: 7.0.2 + resolution: "@typescript/typescript-win32-x64@npm:7.0.2" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@typescript/vfs@npm:^1.6.2": version: 1.6.4 resolution: "@typescript/vfs@npm:1.6.4" @@ -199,13 +244,6 @@ __metadata: languageName: node linkType: hard -"long@npm:^5.3.2": - version: 5.3.2 - resolution: "long@npm:5.3.2" - checksum: 10c0/7130fe1cbce2dca06734b35b70d380ca3f70271c7f8852c922a7c62c86c4e35f0c39290565eca7133c625908d40e126ac57c02b1b1a4636b9457d77e1e60b981 - languageName: node - linkType: hard - "ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" @@ -213,25 +251,6 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^7.5.4": - version: 7.6.5 - resolution: "protobufjs@npm:7.6.5" - dependencies: - "@protobufjs/aspromise": "npm:^1.1.2" - "@protobufjs/base64": "npm:^1.1.2" - "@protobufjs/codegen": "npm:^2.0.5" - "@protobufjs/eventemitter": "npm:^1.1.1" - "@protobufjs/fetch": "npm:^1.1.1" - "@protobufjs/float": "npm:^1.0.2" - "@protobufjs/path": "npm:^1.1.2" - "@protobufjs/pool": "npm:^1.1.0" - "@protobufjs/utf8": "npm:^1.1.1" - "@types/node": "npm:>=13.7.0" - long: "npm:^5.3.2" - checksum: 10c0/863eaca9c6f45bfcfb8787c545f53e9c6696507e328e3981b4643c12d35df7f2826021c10e3fd30bef342c13a8e9d306547bac9c0849ee3bf50f770a12f01dc5 - languageName: node - linkType: hard - "typescript@npm:5.4.5": version: 5.4.5 resolution: "typescript@npm:5.4.5" @@ -242,13 +261,74 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.9.3": - version: 5.9.3 - resolution: "typescript@npm:5.9.3" +"typescript@npm:^7.0.2": + version: 7.0.2 + resolution: "typescript@npm:7.0.2" + dependencies: + "@typescript/typescript-aix-ppc64": "npm:7.0.2" + "@typescript/typescript-darwin-arm64": "npm:7.0.2" + "@typescript/typescript-darwin-x64": "npm:7.0.2" + "@typescript/typescript-freebsd-arm64": "npm:7.0.2" + "@typescript/typescript-freebsd-x64": "npm:7.0.2" + "@typescript/typescript-linux-arm": "npm:7.0.2" + "@typescript/typescript-linux-arm64": "npm:7.0.2" + "@typescript/typescript-linux-loong64": "npm:7.0.2" + "@typescript/typescript-linux-mips64el": "npm:7.0.2" + "@typescript/typescript-linux-ppc64": "npm:7.0.2" + "@typescript/typescript-linux-riscv64": "npm:7.0.2" + "@typescript/typescript-linux-s390x": "npm:7.0.2" + "@typescript/typescript-linux-x64": "npm:7.0.2" + "@typescript/typescript-netbsd-arm64": "npm:7.0.2" + "@typescript/typescript-netbsd-x64": "npm:7.0.2" + "@typescript/typescript-openbsd-arm64": "npm:7.0.2" + "@typescript/typescript-openbsd-x64": "npm:7.0.2" + "@typescript/typescript-sunos-x64": "npm:7.0.2" + "@typescript/typescript-win32-arm64": "npm:7.0.2" + "@typescript/typescript-win32-x64": "npm:7.0.2" + dependenciesMeta: + "@typescript/typescript-aix-ppc64": + optional: true + "@typescript/typescript-darwin-arm64": + optional: true + "@typescript/typescript-darwin-x64": + optional: true + "@typescript/typescript-freebsd-arm64": + optional: true + "@typescript/typescript-freebsd-x64": + optional: true + "@typescript/typescript-linux-arm": + optional: true + "@typescript/typescript-linux-arm64": + optional: true + "@typescript/typescript-linux-loong64": + optional: true + "@typescript/typescript-linux-mips64el": + optional: true + "@typescript/typescript-linux-ppc64": + optional: true + "@typescript/typescript-linux-riscv64": + optional: true + "@typescript/typescript-linux-s390x": + optional: true + "@typescript/typescript-linux-x64": + optional: true + "@typescript/typescript-netbsd-arm64": + optional: true + "@typescript/typescript-netbsd-x64": + optional: true + "@typescript/typescript-openbsd-arm64": + optional: true + "@typescript/typescript-openbsd-x64": + optional: true + "@typescript/typescript-sunos-x64": + optional: true + "@typescript/typescript-win32-arm64": + optional: true + "@typescript/typescript-win32-x64": + optional: true bin: tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5 + checksum: 10c0/3dcee51ec8c332492325bcdbf7df48b66668751f127e622ae7d41b6c716eb19184424a45e14f7750f50f340232388b69e6287859155f06a5ce2df76f12cb31cf languageName: node linkType: hard @@ -262,13 +342,74 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.9.3#optional!builtin": - version: 5.9.3 - resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" +"typescript@patch:typescript@npm%3A^7.0.2#optional!builtin": + version: 7.0.2 + resolution: "typescript@patch:typescript@npm%3A7.0.2#optional!builtin::version=7.0.2&hash=3bafbf" + dependencies: + "@typescript/typescript-aix-ppc64": "npm:7.0.2" + "@typescript/typescript-darwin-arm64": "npm:7.0.2" + "@typescript/typescript-darwin-x64": "npm:7.0.2" + "@typescript/typescript-freebsd-arm64": "npm:7.0.2" + "@typescript/typescript-freebsd-x64": "npm:7.0.2" + "@typescript/typescript-linux-arm": "npm:7.0.2" + "@typescript/typescript-linux-arm64": "npm:7.0.2" + "@typescript/typescript-linux-loong64": "npm:7.0.2" + "@typescript/typescript-linux-mips64el": "npm:7.0.2" + "@typescript/typescript-linux-ppc64": "npm:7.0.2" + "@typescript/typescript-linux-riscv64": "npm:7.0.2" + "@typescript/typescript-linux-s390x": "npm:7.0.2" + "@typescript/typescript-linux-x64": "npm:7.0.2" + "@typescript/typescript-netbsd-arm64": "npm:7.0.2" + "@typescript/typescript-netbsd-x64": "npm:7.0.2" + "@typescript/typescript-openbsd-arm64": "npm:7.0.2" + "@typescript/typescript-openbsd-x64": "npm:7.0.2" + "@typescript/typescript-sunos-x64": "npm:7.0.2" + "@typescript/typescript-win32-arm64": "npm:7.0.2" + "@typescript/typescript-win32-x64": "npm:7.0.2" + dependenciesMeta: + "@typescript/typescript-aix-ppc64": + optional: true + "@typescript/typescript-darwin-arm64": + optional: true + "@typescript/typescript-darwin-x64": + optional: true + "@typescript/typescript-freebsd-arm64": + optional: true + "@typescript/typescript-freebsd-x64": + optional: true + "@typescript/typescript-linux-arm": + optional: true + "@typescript/typescript-linux-arm64": + optional: true + "@typescript/typescript-linux-loong64": + optional: true + "@typescript/typescript-linux-mips64el": + optional: true + "@typescript/typescript-linux-ppc64": + optional: true + "@typescript/typescript-linux-riscv64": + optional: true + "@typescript/typescript-linux-s390x": + optional: true + "@typescript/typescript-linux-x64": + optional: true + "@typescript/typescript-netbsd-arm64": + optional: true + "@typescript/typescript-netbsd-x64": + optional: true + "@typescript/typescript-openbsd-arm64": + optional: true + "@typescript/typescript-openbsd-x64": + optional: true + "@typescript/typescript-sunos-x64": + optional: true + "@typescript/typescript-win32-arm64": + optional: true + "@typescript/typescript-win32-x64": + optional: true bin: tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430 + checksum: 10c0/6b3cdc369cd829d46e00734ea64233ee84419c2825ad8fe408915adde77abced4b7a2401f7eed517d54a7a4f5d1c1869753cb99018df1c2159c761d9f33483a6 languageName: node linkType: hard @@ -278,10 +419,3 @@ __metadata: checksum: 10c0/85a79189113a238959d7a647368e4f7c5559c3a404ebdb8fc4488145ce9426fcd82252a844a302798dfc0e37e6fb178ff481ed03bc4caf634c5757d9ef43521d languageName: node linkType: hard - -"undici-types@npm:~8.3.0": - version: 8.3.0 - resolution: "undici-types@npm:8.3.0" - checksum: 10c0/c8aa7e2fbebfce519654dafadc0ece59be888d2ccaf180fb4495da875e7b536d2456345c384069c7e6f3e9c9ab7435f074957da306f142343eee86ff8048855a - languageName: node - linkType: hard From 04614be2c9982cf56fddbb7c97cfab5c0ff0f091 Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Fri, 4 Sep 2026 21:03:09 -0700 Subject: [PATCH 2/3] Introduce persisted Web Studio component capabilities --- src/index.ts | 18 +++++---- src/quixos/orch_pb.ts | 91 +++++++++++++++++++++++++++++++++++-------- src/quixos/refs_pb.ts | 10 ++++- 3 files changed, 93 insertions(+), 26 deletions(-) diff --git a/src/index.ts b/src/index.ts index 85e9acf..657e80c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -174,20 +174,21 @@ export const createRuntimeContext = ( switch (dependency.binding.case) { case "stateSlotId": { const slotId = dependency.binding.value; + const dependencyObjectId = dependency.objectId || request.objectId; const state: StatePort = { slotId, async get() { - await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); - return protoValueToJs((await camino.readState({ objectId: request.objectId, slotId })).value); + await recordDependency({ kind: "state", objectId: dependencyObjectId, attachmentId: slotId }); + return protoValueToJs((await camino.readState({ objectId: dependencyObjectId, slotId })).value); }, async live() { - await recordDependency({ kind: "state", objectId: request.objectId, attachmentId: slotId }); - const value = await camino.readState({ objectId: request.objectId, slotId }); + await recordDependency({ kind: "state", objectId: dependencyObjectId, attachmentId: slotId }); + const value = await camino.readState({ objectId: dependencyObjectId, slotId }); if (!value.value) throw new Error(`State ${slotId} returned no value`); return liveValue(value.value); }, async set(value) { - await camino.writeState({ objectId: request.objectId, slotId, value: jsToProtoValue(value) }); + await camino.writeState({ objectId: dependencyObjectId, slotId, value: jsToProtoValue(value) }); }, }; ports.set(dependency.portId, state); @@ -195,16 +196,17 @@ export const createRuntimeContext = ( } case "edge": { const { edgeTypeId, projectionId } = dependency.binding.value; + const dependencyObjectId = dependency.objectId || request.objectId; const edge: EdgePort = { edgeTypeId, projectionId, async resolve() { - await recordDependency({ kind: "edge", objectId: request.objectId, attachmentId: edgeTypeId, projectionId }); - const result = await camino.resolveEdge({ objectId: request.objectId, edgeTypeId, projectionId }); + await recordDependency({ kind: "edge", objectId: dependencyObjectId, attachmentId: edgeTypeId, projectionId }); + const result = await camino.resolveEdge({ objectId: dependencyObjectId, edgeTypeId, projectionId }); return result.edges.map((entry) => targetForEdge(entry, projectionId)); }, async connect(targetObjectId) { - await camino.connectEdge({ objectId: request.objectId, edgeTypeId, projectionId, targetObjectId }); + await camino.connectEdge({ objectId: dependencyObjectId, edgeTypeId, projectionId, targetObjectId }); }, }; ports.set(dependency.portId, edge); diff --git a/src/quixos/orch_pb.ts b/src/quixos/orch_pb.ts index b286cbe..4075581 100644 --- a/src/quixos/orch_pb.ts +++ b/src/quixos/orch_pb.ts @@ -18,7 +18,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/orch.proto. */ export const file_quixos_orch: GenFile = /*@__PURE__*/ - fileDesc("ChFxdWl4b3Mvb3JjaC5wcm90bxILcXVpeG9zLm9yY2gipQEKFkNvbnN0cnVjdE9iamVjdFJlcXVlc3QSDwoHYXRvbV9pZBgBIAEoCRI9CgVpbnB1dBgCIAMoCzIuLnF1aXhvcy5vcmNoLkNvbnN0cnVjdE9iamVjdFJlcXVlc3QuSW5wdXRFbnRyeRo7CgpJbnB1dEVudHJ5EgsKA2tleRgBIAEoCRIcCgV2YWx1ZRgCIAEoCzINLmNhbWluby5WYWx1ZToCOAEiPwoXQ29uc3RydWN0T2JqZWN0UmVzcG9uc2USJAoGb2JqZWN0GAEgASgLMhQuY2FtaW5vLkNhbWlub09iamVjdCLUAQoXSW52b2tlQ2FwYWJpbGl0eVJlcXVlc3QSKQoKY2FwYWJpbGl0eRgBIAEoCzIVLnF1aXhvcy5DYXBhYmlsaXR5UmVmEhEKCW9iamVjdF9pZBgCIAEoCRI+CgVpbnB1dBgDIAMoCzIvLnF1aXhvcy5vcmNoLkludm9rZUNhcGFiaWxpdHlSZXF1ZXN0LklucHV0RW50cnkaOwoKSW5wdXRFbnRyeRILCgNrZXkYASABKAkSHAoFdmFsdWUYAiABKAsyDS5jYW1pbm8uVmFsdWU6AjgBIpgBChhJbnZva2VDYXBhYmlsaXR5UmVzcG9uc2USFQoNaW52b2NhdGlvbl9pZBgBIAEoCRIrCgphY3RpdmF0aW9uGAIgASgLMhcucXVpeG9zLm9yY2guQWN0aXZhdGlvbhIKCgJvaxgDIAEoCBIdCgZyZXN1bHQYBCABKAsyDS5jYW1pbm8uVmFsdWUSDQoFZXJyb3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udGltZXNSZXF1ZXN0GigucXVpeG9zLm9yY2guTGlzdFBhY2thZ2VSdW50aW1lc1Jlc3BvbnNlElwKD0xpc3RBY3RpdmF0aW9ucxIjLnF1aXhvcy5vcmNoLkxpc3RBY3RpdmF0aW9uc1JlcXVlc3QaJC5xdWl4b3Mub3JjaC5MaXN0QWN0aXZhdGlvbnNSZXNwb25zZRJcCg9DbG9zZUFjdGl2YXRpb24SIy5xdWl4b3Mub3JjaC5DbG9zZUFjdGl2YXRpb25SZXF1ZXN0GiQucXVpeG9zLm9yY2guQ2xvc2VBY3RpdmF0aW9uUmVzcG9uc2ViBnByb3RvMw", [file_camino_api, file_quixos_package, file_quixos_refs, file_quixos_runtime]); /** * @generated from message quixos.orch.ConstructObjectRequest @@ -59,6 +59,55 @@ export type ConstructObjectResponse = Message<"quixos.orch.ConstructObjectRespon export const ConstructObjectResponseSchema: GenMessage = /*@__PURE__*/ messageDesc(file_quixos_orch, 1); +/** + * @generated from message quixos.orch.ResolveOrConstructRelatedObjectRequest + */ +export type ResolveOrConstructRelatedObjectRequest = Message<"quixos.orch.ResolveOrConstructRelatedObjectRequest"> & { + /** + * @generated from field: string object_id = 1; + */ + objectId: string; + + /** + * @generated from field: string interface_revision_id = 2; + */ + interfaceRevisionId: string; + + /** + * @generated from field: string member_id = 3; + */ + memberId: string; +}; + +/** + * Describes the message quixos.orch.ResolveOrConstructRelatedObjectRequest. + * Use `create(ResolveOrConstructRelatedObjectRequestSchema)` to create a new message. + */ +export const ResolveOrConstructRelatedObjectRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 2); + +/** + * @generated from message quixos.orch.ResolveOrConstructRelatedObjectResponse + */ +export type ResolveOrConstructRelatedObjectResponse = Message<"quixos.orch.ResolveOrConstructRelatedObjectResponse"> & { + /** + * @generated from field: camino.CaminoObject object = 1; + */ + object?: CaminoObject | undefined; + + /** + * @generated from field: bool constructed = 2; + */ + constructed: boolean; +}; + +/** + * Describes the message quixos.orch.ResolveOrConstructRelatedObjectResponse. + * Use `create(ResolveOrConstructRelatedObjectResponseSchema)` to create a new message. + */ +export const ResolveOrConstructRelatedObjectResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_quixos_orch, 3); + /** * @generated from message quixos.orch.InvokeCapabilityRequest */ @@ -84,7 +133,7 @@ export type InvokeCapabilityRequest = Message<"quixos.orch.InvokeCapabilityReque * Use `create(InvokeCapabilityRequestSchema)` to create a new message. */ export const InvokeCapabilityRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 2); + messageDesc(file_quixos_orch, 4); /** * @generated from message quixos.orch.InvokeCapabilityResponse @@ -121,7 +170,7 @@ export type InvokeCapabilityResponse = Message<"quixos.orch.InvokeCapabilityResp * Use `create(InvokeCapabilityResponseSchema)` to create a new message. */ export const InvokeCapabilityResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 3); + messageDesc(file_quixos_orch, 5); /** * @generated from message quixos.orch.WatchCapabilityRequest @@ -148,7 +197,7 @@ export type WatchCapabilityRequest = Message<"quixos.orch.WatchCapabilityRequest * Use `create(WatchCapabilityRequestSchema)` to create a new message. */ export const WatchCapabilityRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 4); + messageDesc(file_quixos_orch, 6); /** * @generated from message quixos.orch.WatchCapabilityEvent @@ -195,7 +244,7 @@ export type WatchCapabilityEvent = Message<"quixos.orch.WatchCapabilityEvent"> & * Use `create(WatchCapabilityEventSchema)` to create a new message. */ export const WatchCapabilityEventSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 5); + messageDesc(file_quixos_orch, 7); /** * @generated from message quixos.orch.GetWorkspaceRequest @@ -208,7 +257,7 @@ export type GetWorkspaceRequest = Message<"quixos.orch.GetWorkspaceRequest"> & { * Use `create(GetWorkspaceRequestSchema)` to create a new message. */ export const GetWorkspaceRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 6); + messageDesc(file_quixos_orch, 8); /** * @generated from message quixos.orch.GetWorkspaceResponse @@ -235,7 +284,7 @@ export type GetWorkspaceResponse = Message<"quixos.orch.GetWorkspaceResponse"> & * Use `create(GetWorkspaceResponseSchema)` to create a new message. */ export const GetWorkspaceResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 7); + messageDesc(file_quixos_orch, 9); /** * @generated from message quixos.orch.ListActivationsRequest @@ -248,7 +297,7 @@ export type ListActivationsRequest = Message<"quixos.orch.ListActivationsRequest * Use `create(ListActivationsRequestSchema)` to create a new message. */ export const ListActivationsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 8); + messageDesc(file_quixos_orch, 10); /** * @generated from message quixos.orch.ListPackageDescriptorsRequest @@ -261,7 +310,7 @@ export type ListPackageDescriptorsRequest = Message<"quixos.orch.ListPackageDesc * Use `create(ListPackageDescriptorsRequestSchema)` to create a new message. */ export const ListPackageDescriptorsRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 9); + messageDesc(file_quixos_orch, 11); /** * @generated from message quixos.orch.ListPackageDescriptorsResponse @@ -278,7 +327,7 @@ export type ListPackageDescriptorsResponse = Message<"quixos.orch.ListPackageDes * Use `create(ListPackageDescriptorsResponseSchema)` to create a new message. */ export const ListPackageDescriptorsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 10); + messageDesc(file_quixos_orch, 12); /** * @generated from message quixos.orch.ListPackageRuntimesRequest @@ -291,7 +340,7 @@ export type ListPackageRuntimesRequest = Message<"quixos.orch.ListPackageRuntime * Use `create(ListPackageRuntimesRequestSchema)` to create a new message. */ export const ListPackageRuntimesRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 11); + messageDesc(file_quixos_orch, 13); /** * @generated from message quixos.orch.ListPackageRuntimesResponse @@ -308,7 +357,7 @@ export type ListPackageRuntimesResponse = Message<"quixos.orch.ListPackageRuntim * Use `create(ListPackageRuntimesResponseSchema)` to create a new message. */ export const ListPackageRuntimesResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 12); + messageDesc(file_quixos_orch, 14); /** * @generated from message quixos.orch.ListActivationsResponse @@ -325,7 +374,7 @@ export type ListActivationsResponse = Message<"quixos.orch.ListActivationsRespon * Use `create(ListActivationsResponseSchema)` to create a new message. */ export const ListActivationsResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 13); + messageDesc(file_quixos_orch, 15); /** * @generated from message quixos.orch.CloseActivationRequest @@ -347,7 +396,7 @@ export type CloseActivationRequest = Message<"quixos.orch.CloseActivationRequest * Use `create(CloseActivationRequestSchema)` to create a new message. */ export const CloseActivationRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 14); + messageDesc(file_quixos_orch, 16); /** * @generated from message quixos.orch.CloseActivationResponse @@ -364,7 +413,7 @@ export type CloseActivationResponse = Message<"quixos.orch.CloseActivationRespon * Use `create(CloseActivationResponseSchema)` to create a new message. */ export const CloseActivationResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 15); + messageDesc(file_quixos_orch, 17); /** * @generated from message quixos.orch.Activation @@ -426,7 +475,7 @@ export type Activation = Message<"quixos.orch.Activation"> & { * Use `create(ActivationSchema)` to create a new message. */ export const ActivationSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 16); + messageDesc(file_quixos_orch, 18); /** * @generated from message quixos.orch.PackageRuntimeStatus @@ -498,7 +547,7 @@ export type PackageRuntimeStatus = Message<"quixos.orch.PackageRuntimeStatus"> & * Use `create(PackageRuntimeStatusSchema)` to create a new message. */ export const PackageRuntimeStatusSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_quixos_orch, 17); + messageDesc(file_quixos_orch, 19); /** * @generated from service quixos.orch.OrchestratorRuntime @@ -528,6 +577,14 @@ export const OrchestratorRuntime: GenService<{ input: typeof ConstructObjectRequestSchema; output: typeof ConstructObjectResponseSchema; }, + /** + * @generated from rpc quixos.orch.OrchestratorRuntime.ResolveOrConstructRelatedObject + */ + resolveOrConstructRelatedObject: { + methodKind: "unary"; + input: typeof ResolveOrConstructRelatedObjectRequestSchema; + output: typeof ResolveOrConstructRelatedObjectResponseSchema; + }, /** * @generated from rpc quixos.orch.OrchestratorRuntime.GetWorkspace */ diff --git a/src/quixos/refs_pb.ts b/src/quixos/refs_pb.ts index 52da673..e39311b 100644 --- a/src/quixos/refs_pb.ts +++ b/src/quixos/refs_pb.ts @@ -10,7 +10,7 @@ import type { Message } from "@bufbuild/protobuf"; * Describes the file quixos/refs.proto. */ export const file_quixos_refs: GenFile = /*@__PURE__*/ - fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zIkQKDUNhcGFiaWxpdHlSZWYSHQoVaW50ZXJmYWNlX3JldmlzaW9uX2lkGAEgASgJEhQKDG9wZXJhdGlvbl9pZBgCIAEoCSJCChBQYWNrYWdlRXhwb3J0UmVmEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYASABKAkSEQoJZXhwb3J0X2lkGAIgASgJIroBChJJbmplY3RlZERlcGVuZGVuY3kSDwoHcG9ydF9pZBgBIAEoCRIXCg1zdGF0ZV9zbG90X2lkGAIgASgJSAASJgoEZWRnZRgDIAEoCzIWLnF1aXhvcy5FZGdlRGVwZW5kZW5jeUgAEigKHnJlY2VpdmVyX2ludGVyZmFjZV9yZXZpc2lvbl9pZBgEIAEoCUgAEh0KE2NvbnN0cnVjdG9yX2F0b21faWQYBSABKAlIAEIJCgdiaW5kaW5nIj0KDkVkZ2VEZXBlbmRlbmN5EhQKDGVkZ2VfdHlwZV9pZBgBIAEoCRIVCg1wcm9qZWN0aW9uX2lkGAIgASgJYgZwcm90bzM"); + fileDesc("ChFxdWl4b3MvcmVmcy5wcm90bxIGcXVpeG9zIkQKDUNhcGFiaWxpdHlSZWYSHQoVaW50ZXJmYWNlX3JldmlzaW9uX2lkGAEgASgJEhQKDG9wZXJhdGlvbl9pZBgCIAEoCSJCChBQYWNrYWdlRXhwb3J0UmVmEhsKE3BhY2thZ2VfcmV2aXNpb25faWQYASABKAkSEQoJZXhwb3J0X2lkGAIgASgJIs0BChJJbmplY3RlZERlcGVuZGVuY3kSDwoHcG9ydF9pZBgBIAEoCRIXCg1zdGF0ZV9zbG90X2lkGAIgASgJSAASJgoEZWRnZRgDIAEoCzIWLnF1aXhvcy5FZGdlRGVwZW5kZW5jeUgAEigKHnJlY2VpdmVyX2ludGVyZmFjZV9yZXZpc2lvbl9pZBgEIAEoCUgAEh0KE2NvbnN0cnVjdG9yX2F0b21faWQYBSABKAlIABIRCglvYmplY3RfaWQYBiABKAlCCQoHYmluZGluZyI9Cg5FZGdlRGVwZW5kZW5jeRIUCgxlZGdlX3R5cGVfaWQYASABKAkSFQoNcHJvamVjdGlvbl9pZBgCIAEoCWIGcHJvdG8z"); /** * @generated from message quixos.CapabilityRef @@ -93,6 +93,14 @@ export type InjectedDependency = Message<"quixos.InjectedDependency"> & { value: string; case: "constructorAtomId"; } | { case: undefined; value?: undefined }; + + /** + * Defaults to the invocation receiver. A checked dependency traversal can + * select a related object explicitly before the package runtime starts. + * + * @generated from field: string object_id = 6; + */ + objectId: string; }; /** From d83f82c90f7f9753784d439e338269aad917ac5d Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Fri, 4 Sep 2026 21:06:10 -0700 Subject: [PATCH 3/3] Pin runtimes to persisted component protocol --- flake.lock | 14 +++++++------- flake.nix | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index efb5f32..82816fc 100644 --- a/flake.lock +++ b/flake.lock @@ -74,17 +74,17 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1788571750, - "narHash": "sha256-y7ybGRo9U+cJ1Ol+hc62URVlg6MBQCQwIy848IzGKDg=", - "ref": "refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422", - "rev": "4d527898076eb6aa1151bcaab7dfbb447e3fa422", - "revCount": 32, + "lastModified": 1788581083, + "narHash": "sha256-d+2xgaR/f/9b2AwXqEba2SnO7marqCEpwAT5kUIF8a4=", + "ref": "refs/tags/quixos-reachability/fd6160ec67c0c93a61f7f605c4c1397c95c6369b", + "rev": "fd6160ec67c0c93a61f7f605c4c1397c95c6369b", + "revCount": 35, "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git" }, "original": { - "ref": "refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422", - "rev": "4d527898076eb6aa1151bcaab7dfbb447e3fa422", + "ref": "refs/tags/quixos-reachability/fd6160ec67c0c93a61f7f605c4c1397c95c6369b", + "rev": "fd6160ec67c0c93a61f7f605c4c1397c95c6369b", "type": "git", "url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git" } diff --git a/flake.nix b/flake.nix index 666fc0f..ce096cb 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; - quixos-protocol.url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git?ref=refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422&rev=4d527898076eb6aa1151bcaab7dfbb447e3fa422"; + quixos-protocol.url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git?ref=refs/tags/quixos-reachability/fd6160ec67c0c93a61f7f605c4c1397c95c6369b&rev=fd6160ec67c0c93a61f7f605c4c1397c95c6369b"; quixosNixHelpers = { url = "git+https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-nix-helpers.git?ref=refs/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a&rev=56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a"; flake = false;