An open-source, self-hosted system for apps built with web technologies.
Carry runtime handle references through the gateway
zohayrslileh9e5e16abae3c
diff --git a/source/server/core/link-manager/auth-manager/program-manager/config.ts b/source/server/core/link-manager/auth-manager/program-manager/config.tsindex 6410ea1..ab5ba27 100644--- a/source/server/core/link-manager/auth-manager/program-manager/config.ts+++ b/source/server/core/link-manager/auth-manager/program-manager/config.ts@@ -3,17 +3,17 @@ import { type Layer, type Position, type Size } from "@phreshos/core"/*** What a program says it is.*- * A description, and nothing that acts. It arrives either as a+ * A definition, and nothing that acts. It arrives either as a* `program.json` beside the things it names, or as an object built in* code — a program the system owns has no file to be read from.** The union is the contract's one hard rule wearing a type: a program- * has a server half, a client half, or both, and a description with+ * has a server half, a client half, or both, and a definition with* neither cannot be written down.*/-export type ProgramConfig = (Described & { server: ServerConfig, client?: ClientConfig }) | (Described & { server?: ServerConfig, client: ClientConfig })+export type ProgramConfig = (ProgramConfigBase & { server: ServerConfig, client?: ClientConfig }) | (ProgramConfigBase & { server?: ServerConfig, client: ClientConfig })-interface Described {+interface ProgramConfigBase {// What addresses it. Kebab-case, because it is also the name of the// directory the system lays the program out in — so it is a path@@ -53,7 +53,7 @@ interface Described {storage?: string}-interface ServerDescription {+interface ServerConfigBase {// Where this half is. Empty names the program's own root.location: string@@ -69,7 +69,7 @@ interface ServerDescription {}-export type ServerConfig = ServerDescription & ({+export type ServerConfig = ServerConfigBase & ({// Run an isolated operating-system process through the shell.startCommand: string@@ -120,7 +120,7 @@ export interface ClientConfig {// rise above it. The taskbar is above all three.//// Absent means `window`, said as an absence rather than written down- // twice: what a description leaves unsaid, the system decides.+ // twice: what a definition leaves unsaid, the system decides.layer?: Layer// Whether its window opens hidden. Absent means shown.diff --git a/source/server/core/system-control/system-control.ts b/source/server/core/system-control/system-control.tsindex e954ee6..d85ef25 100644--- a/source/server/core/system-control/system-control.ts+++ b/source/server/core/system-control/system-control.ts@@ -399,6 +399,7 @@ function processSnapshot(process: Process) {const owner = process.program.record()return Object.freeze({+ reference: process.reference,identity: process.identity,name: process.name,program: process.program.identity,@@ -439,6 +440,7 @@ function processRecordSnapshot(process: ReturnType<Process["record"]>) {}return Object.freeze({+ reference: process.reference,identity: record.identity,name: record.name,program: record.program.identity,diff --git a/source/server/view/gateway/program-request.ts b/source/server/view/gateway/program-request.tsindex 0b3d90b..23a509c 100644--- a/source/server/view/gateway/program-request.ts+++ b/source/server/view/gateway/program-request.ts@@ -29,7 +29,7 @@ export default async function programRequest(application: Application, socket: Sif (asked.word === "create") {- if (!asked.program) throw new Error("Creating needs a Program description")+ if (!asked.program) throw new Error("Creating needs a Program definition")const program = await programManager.create(asked.program)const entry = programManager.find(program.identity)@@ -40,7 +40,7 @@ export default async function programRequest(application: Application, socket: Sif (asked.word === "force-create") {- if (!asked.program) throw new Error("Creating needs a Program description")+ if (!asked.program) throw new Error("Creating needs a Program definition")const program = await programManager.forceCreate(asked.program)const entry = programManager.find(program.identity)