Implement workspace evolution, migrations, and runtime continuity
Enable evolution by default for source-backed workspaces. Add stable conformance ownership, semantic-major review, candidate typechecking, and durable fenced cutover with explicit migrations and forward recovery. Independently supervise package runtimes so unchanged resource owners keep their processes and connections across cutover. Add scoped invocation authority, resource sessions, and typed callback rebinding. Wire opaque object references through generated bindings and RPCs. Add canonical relationship sets, keyed maps, and ordered lists with scoped transactional mutations, revision checks, and inverse consistency. Support planned cascade deletion, protection, tombstones, and lifecycle foundations. Add journaled structural edits, package/function/migration scaffolding, managed repository creation, and resumable bottom-up dependency pin publication. Document lifetime boundaries, revision pinning, prototype compatibility policy, commands, and deferred work. Validate with 210 tests, user-systemd process/connection continuity, generated-package TypeScript checks, and Nix host/protocol checks. TTL handoff, physical reclamation, general multi-step migrations, and root-systemd migration isolation acceptance remain deferred.
This commit is contained in:
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
import type { QxObjectRef } from "./references.js";
|
||||
import type { RelationshipCollection, RelationshipEntry } from "./index.js";
|
||||
type Key = string | boolean | bigint;
|
||||
type Port<T extends QxObjectRef> = {
|
||||
collection(): Promise<RelationshipCollection<T>>;
|
||||
replace(entries: RelationshipEntry<T>[], expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
};
|
||||
/** Helpers never retry a failed CAS or silently overwrite concurrent edits. */
|
||||
export declare const relationshipMap: <T extends QxObjectRef, K extends Key = Key>(port: Port<T>) => {
|
||||
read: () => Promise<RelationshipCollection<T>>;
|
||||
get(key: K): Promise<{
|
||||
revision: bigint;
|
||||
value: T | undefined;
|
||||
}>;
|
||||
set(key: K, target: T, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
delete(key: K, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
};
|
||||
export declare const relationshipList: <T extends QxObjectRef>(port: Port<T>) => {
|
||||
read: () => Promise<RelationshipCollection<T>>;
|
||||
insert(index: number, target: T, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
move(edgeId: string, index: number, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
delete(edgeId: string, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
};
|
||||
export declare const relationshipSet: <T extends QxObjectRef>(port: Port<T>) => {
|
||||
read: () => Promise<RelationshipCollection<T>>;
|
||||
add(target: T, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
delete(target: T, expectedRevision: bigint): Promise<RelationshipCollection<T>>;
|
||||
};
|
||||
export {};
|
||||
//# sourceMappingURL=relationships.d.ts.map
|
||||
Reference in New Issue
Block a user