Skip to content

An open-source, self-hosted system for apps built with web technologies.

Release PhreshOS 0.1.68

zohayrslileh09f35c9abe18
diff --git a/bun.lock b/bun.lock
index c104545..0d526b9 100644
--- a/bun.lock
+++ b/bun.lock
@@ -7,8 +7,8 @@
"dependencies": {
"@fontsource/roboto": "^5.3.0",
"@hono/node-server": "^2.1.1",
- "@phreshos/core": "^0.1.47",
- "@phreshos/react-ui": "^0.1.20",
+ "@phreshos/core": "^0.1.48",
+ "@phreshos/react-ui": "^0.1.21",
"@the-link/core": "^0.3.0",
"@the-link/http": "^0.1.1",
"@the-link/ipc": "^0.2.1",
@@ -235,9 +235,9 @@
"@oxc-project/types": ["@oxc-project/[email protected]", "", {}, "sha512-nuhZIOLuI6TFQ32I/WnUx+SCPY7SdSKwgnFHydAuoS1+Z4BRcaP+RRJmGzl9lw+0OFF7UmaESf7KQRXaNLHypg=="],
- "@phreshos/core": ["@phreshos/[email protected]", "", {}, "sha512-/0TrNk+7k8kHpMvnhzP1IS+tbdEILtCaE2gyewLIXl1oLfIzGeiBCTBqJhQ4E1i/iAgftlEYv9BQSwrn2P3PrA=="],
+ "@phreshos/core": ["@phreshos/[email protected]", "", {}, "sha512-Cc5N1vw45ib1/ahAW6GEWgXJiCdct8Goo8a3PGvjXXPUMX/eVZYkWqhF0b+KdgI4pqJQiC4TkgCJO/R6ZVAQNw=="],
- "@phreshos/react-ui": ["@phreshos/[email protected]", "", { "dependencies": { "@phreshos/core": "^0.1.47", "colorjs.io": "^0.7.1", "motion": "^13.2.0", "react-aria-components": "^1.20.0" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-jbXaXF4wac+a6e6iJxJrNMseG84FW4kKBsBKCbfQ3DADrUbJ+jc17cAM/zJBo1/fVco3rzZ5PEHXFmD7/rVntw=="],
+ "@phreshos/react-ui": ["@phreshos/[email protected]", "", { "dependencies": { "@phreshos/core": "^0.1.48", "colorjs.io": "^0.7.1", "motion": "^13.2.0", "react-aria-components": "^1.20.0" }, "peerDependencies": { "react": "^19.2.0", "react-dom": "^19.2.0" } }, "sha512-s3qP5loQX/6LOoObpSwD7Yjj7RuLtTTlcFoCOuPv7k5Eq++mDAMXncmvt6/1jhnG6C+AOVPC1++8ggM8HA7kfA=="],
"@react-types/shared": ["@react-types/[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" } }, "sha512-AzsuD9OfxTOZMMvTRhlN3oHBwOmFN7tDh27LzqmHt4+uOgPhJT7ZM7/kVs/8/o0WxayMUIk3hBmCFRHv1FUoag=="],
diff --git a/package.json b/package.json
index a7d42d8..eed287b 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "phreshos",
"displayName": "PhreshOS",
- "version": "0.1.67",
+ "version": "0.1.68",
"description": "The PhreshOS server, desktop, and authoritative system runtime.",
"type": "module",
"private": true,
@@ -36,8 +36,8 @@
"dependencies": {
"@fontsource/roboto": "^5.3.0",
"@hono/node-server": "^2.1.1",
- "@phreshos/core": "^0.1.47",
- "@phreshos/react-ui": "^0.1.20",
+ "@phreshos/core": "^0.1.48",
+ "@phreshos/react-ui": "^0.1.21",
"@the-link/core": "^0.3.0",
"@the-link/http": "^0.1.1",
"@the-link/ipc": "^0.2.1",
diff --git a/source/client/view/components/desktop-host/system-access.ts b/source/client/view/components/desktop-host/system-access.ts
index 0c8db06..3a715d7 100644
--- a/source/client/view/components/desktop-host/system-access.ts
+++ b/source/client/view/components/desktop-host/system-access.ts
@@ -99,8 +99,7 @@ export default class SystemAccess {
private async clientLayer(launch: ClientLaunch) {
- if (launch.layer === "under" || launch.layer === "over") await this.require("layers", [launch.layer])
- if (launch.layer === "wallpaper") await this.require("wallpaper", [])
+ if (launch.layer !== undefined && launch.layer !== "window") await this.require("layers", [launch.layer])
}
public async requireNetwork(scope: string) {
diff --git a/source/server/core/permissions.ts b/source/server/core/permissions.ts
index 6676685..284657a 100644
--- a/source/server/core/permissions.ts
+++ b/source/server/core/permissions.ts
@@ -289,12 +289,7 @@ export const permissionCatalog = new PermissionCatalog({
layers: {
default: [],
title: "Window layers",
- description: "Select the under and over layers in Client Endpoint launches."
- },
- wallpaper: {
- default: [],
- title: "Wallpaper",
- description: "Select the wallpaper layer in Client Endpoint launches."
+ description: "Select the under, over, and wallpaper layers in Client Endpoint launches."
},
network: {
default: [],
diff --git a/tests/client-layer-permissions.test.ts b/tests/client-layer-permissions.test.ts
index b2ca1ee..97abd63 100644
--- a/tests/client-layer-permissions.test.ts
+++ b/tests/client-layer-permissions.test.ts
@@ -44,18 +44,15 @@ test.each(["under", "over", "wallpaper"] as const)("Client launch routes check %
["launch", program, "set", launch],
["start-endpoint", process, "client", { layer }]
] as const
- const deniedPermissions: Permissions[] = layer === "wallpaper"
- ? [{}, { programs: [] }, { layers: [] }, { all: [], wallpaper: false }]
- : [{}, { programs: [] }, { layers: [layer === "under" ? "over" : "under"] }, { all: [], layers: false }, { wallpaper: [] }]
+ const anotherLayer = layer === "under" ? "over" : layer === "over" ? "wallpaper" : "under"
+ const deniedPermissions: Permissions[] = [{}, { programs: [] }, { layers: [anotherLayer] }, { all: [], layers: false }]
for (const denied of deniedPermissions) {
f.permissions(denied)
for (const [operation, ...args] of operations) await expect(f.answer(operation, ...args)).rejects.toThrow("Execution is not permitted")
}
const delegates = [f.createProcess, f.findOrCreateProcess, f.startup, f.savedLaunch, f.startEndpoint]
for (const delegate of delegates) expect(delegate).not.toHaveBeenCalled()
- const grantedPermissions: Permissions[] = layer === "wallpaper"
- ? [{ wallpaper: [] }, { wallpaper: [], layers: false }, { all: [] }]
- : [{ layers: [layer] }, { layers: [] }, { all: [] }]
+ const grantedPermissions: Permissions[] = [{ layers: [layer] }, { layers: [] }, { all: [] }]
for (const granted of grantedPermissions) {
f.permissions(granted)
for (const [operation, ...args] of operations) await f.answer(operation, ...args)
@@ -91,7 +88,7 @@ test.each(["under", "over", "wallpaper"] as const)("Client run streams authorize
boundary.receive(["end-host", "stream", "denied", "run", program, launch])
await vi.waitFor(() => expect(deliver).toHaveBeenCalledWith("host-end", "stream", "denied", "answer", { success: false, error: "Execution is not permitted" }))
expect(f.command).not.toHaveBeenCalled()
- f.permissions(layer === "wallpaper" ? { wallpaper: [] } : { layers: [layer] })
+ f.permissions({ layers: [layer] })
boundary.receive(["boundary", "expect", "allowed"])
boundary.receive(["end-host", "stream", "allowed", "run", program, launch])
await vi.waitFor(() => expect(deliver).toHaveBeenCalledWith("host-end", "stream", "allowed", "answer", { success: true, result: undefined }))
@@ -104,6 +101,7 @@ test("the layer catalog uses exact assignments before all", () => {
expect(permissionCatalog.allows("layers", ["over"], { layers: ["under"] })).toBe(false)
expect(permissionCatalog.allows("layers", ["under"], { layers: ["under"] })).toBe(true)
expect(permissionCatalog.allows("layers", ["under", "over"], { layers: [] })).toBe(true)
+ expect(permissionCatalog.allows("layers", ["wallpaper"], { layers: [] })).toBe(true)
expect(permissionCatalog.allows("layers", ["over"], { all: [], layers: false })).toBe(false)
expect(permissionCatalog.allows("layers", ["over"], { all: [] })).toBe(true)
expect(() => permissionCatalog.declarations({ layers: false })).toThrow()
diff --git a/tests/permissions.test.ts b/tests/permissions.test.ts
index d763227..d7eba67 100644
--- a/tests/permissions.test.ts
+++ b/tests/permissions.test.ts
@@ -23,12 +23,7 @@ test("permissions contract", async () => {
layers: {
default: [],
title: "Window layers",
- description: "Select the under and over layers in Client Endpoint launches."
- },
- wallpaper: {
- default: [],
- title: "Wallpaper",
- description: "Select the wallpaper layer in Client Endpoint launches."
+ description: "Select the under, over, and wallpaper layers in Client Endpoint launches."
},
network: {
default: [],