Compare commits

...

2 Commits

Author SHA1 Message Date
Quixos Subtree Publisher 385a5bd595 Publish camino-package-runtime from 321d5fa6c8b7619c1dc9cc4976318f246e645812 2026-09-05 01:30:55 +00:00
timothy 9771b0803e Host workspace repositories on Central Gitea 2026-09-04 18:30:55 -07:00
8 changed files with 58 additions and 12 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"version": 1,
"sourceRepo": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos.git",
"sourceCommit": "ce0dd80f56df35bf3db1be01236a949a704cb4c2",
"sourceCommit": "321d5fa6c8b7619c1dc9cc4976318f246e645812",
"sourcePath": "quixos-instance/packages/camino-package-runtime",
"exportName": "camino-package-runtime",
"mirrorRemote": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/camino-package-runtime.git"
+8
View File
@@ -104,6 +104,14 @@ export type StateValueSource = Message<"camino.StateValueSource"> & {
* @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.StateValueSource.
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated
+7 -7
View File
@@ -74,17 +74,17 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1788542526,
"narHash": "sha256-NaEdW9HKjRpOhZ8TBs6ieD/YuJ2jDyLPVk076wk6Kzs=",
"ref": "refs/tags/quixos-reachability/27373d801b31fbced51cc33bc2a9c92499a46ba3",
"rev": "27373d801b31fbced51cc33bc2a9c92499a46ba3",
"revCount": 28,
"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/tags/quixos-reachability/27373d801b31fbced51cc33bc2a9c92499a46ba3",
"rev": "27373d801b31fbced51cc33bc2a9c92499a46ba3",
"ref": "refs/tags/quixos-reachability/4d527898076eb6aa1151bcaab7dfbb447e3fa422",
"rev": "4d527898076eb6aa1151bcaab7dfbb447e3fa422",
"type": "git",
"url": "https://gitea-external.egads.tutti.syntaxblitz.net/quixos/quixos-protocol.git"
}
+1 -1
View File
@@ -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/27373d801b31fbced51cc33bc2a9c92499a46ba3&rev=27373d801b31fbced51cc33bc2a9c92499a46ba3";
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/tags/quixos-reachability/56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a&rev=56bbcd22d17f8c7f120b1e0b5bd1d5a86e91a80a";
flake = false;
+10 -1
View File
File diff suppressed because one or more lines are too long
+29
View File
@@ -9,11 +9,16 @@ import {
createRuntimeContext,
derived,
jsToProtoValue,
liveValue,
protoValueToJs,
} from "../dist/index.js";
import {
CaminoObjectSchema,
CaminoService,
CrdtValueSchema,
StateValueSourceSchema,
ValueSchema,
ValueSourceSchema,
} from "../dist/camino/api_pb.js";
import {
EdgeDependencySchema,
@@ -49,6 +54,30 @@ test("generic values preserve nested values and object references", () => {
});
});
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 = {