@phreshos/server 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,13 +76,10 @@ retained handle. Server and Client handles remain stable for their Process
76
76
  lifetime. Each Client permanently owns one synchronous `window` capability,
77
77
  whose operations address that Client's current live presentation state.
78
78
 
79
- An `under` or `over` Client Window may own an authoritative host Surface through
80
- `client.window.surface`. It is command-only: `set()` or `remove()` changes the
81
- server-owned value, while Program endpoints cannot read or subscribe to it.
82
- Radius may be a
83
- nonnegative pixel number, `"full"`, or a semantic `ScaleLevel` resolved by the
84
- desktop against its current Theme. Ordinary `window` and system `wallpaper`
85
- layers reject Surface mutations.
79
+ Local representation and Surface presentation are deliberately absent from the
80
+ Server SDK. They belong to one live iframe and are requested through the
81
+ Client's `current.localWindow`; a Server may coordinate Program state, but it neither
82
+ owns nor controls the resulting desktop material.
86
83
 
87
84
  The package provides two contextual runtime entry points:
88
85
 
package/dist/domain.js CHANGED
@@ -249,11 +249,9 @@ class ClientHandle extends ClientBase {
249
249
  }
250
250
  class WindowHandle extends Events {
251
251
  target;
252
- surface;
253
252
  constructor(target) {
254
253
  super(...deferredScoped("host-end", target, (_event, values) => values[0]));
255
254
  this.target = target;
256
- this.surface = new WindowSurfaceHandle(target);
257
255
  }
258
256
  async state() {
259
257
  const answer = await wire.request(["window", await this.target()]);
@@ -268,18 +266,11 @@ class WindowHandle extends Events {
268
266
  async location() { return (await this.state()).location; }
269
267
  async move(position) { await wire.request(["move", await this.target(), position]); }
270
268
  async resize(size) { await wire.request(["resize", await this.target(), size]); }
269
+ async setGeometry(geometry) { await wire.request(["setGeometry", await this.target(), geometry]); }
271
270
  async minimize(minimized = true) { await wire.request(["minimize", await this.target(), minimized]); }
272
271
  async changeTitle(title) { await wire.request(["changeTitle", await this.target(), title]); }
273
272
  async raise() { await wire.request(["raise", await this.target()]); }
274
273
  }
275
- class WindowSurfaceHandle {
276
- target;
277
- constructor(target) {
278
- this.target = target;
279
- }
280
- async set(settings = {}) { await wire.request(["surfaceSet", await this.target(), settings]); }
281
- async remove() { await wire.request(["surfaceRemove", await this.target()]); }
282
- }
283
274
  function deferredScoped(route, target, convert) {
284
275
  return [
285
276
  (event, listener, impossible) => {
@@ -303,7 +294,7 @@ function deferredScoped(route, target, convert) {
303
294
  ];
304
295
  }
305
296
  function windowEvent(event) {
306
- return event === "move" || event === "resize" || event === "minimize" || event === "changeTitle" || event === "front";
297
+ return event === "move" || event === "resize" || event === "geometry" || event === "minimize" || event === "changeTitle" || event === "front";
307
298
  }
308
299
  function deferred(target, register, impossible) {
309
300
  let active = true;
package/dist/main.d.ts CHANGED
@@ -4,4 +4,4 @@ export { type Answerer, type Channel } from "./channel.js";
4
4
  export { type ProgramStartup } from "./startup.js";
5
5
  export { ClientServiceHandler, ServerServiceHandler, ServiceHandler, type ClientServiceChannel, type ServerServiceChannel, type ServiceChannel, type ServiceKey, type ServiceLifecycleEvents } from "@phreshos/core";
6
6
  export { Client, Endpoint, Process, Program, Server, type Window, type ProgramArea } from "./domain.js";
7
- export type { AnswerCapture, AnswerMessage, AnswerObserver, Askable, AskCapture, AskMessage, AskObserver, Capture, Captures, ChannelCapture, ChannelEvents, ChannelMessage, ClientTraffic, ClientDeclaration, Cleanup, DirectoryStat, EndpointDeclaration, EndpointTraffic, EntryStat, EventMessage, EventName, EventObserver, EventOptions, EventSubscriber, Exit, FileStat, Launch, LaunchClient, Layer, LogKind, LogRecord, LogSource, Message, OtherStat, Outcome, Position, ProgramEvents, ProgramPermissions, ProgramProcessExit, ProgramSql, ProgramStore, ProcessEvents, Publishable, ServedFile, ServerTraffic, Size, Subscribable, SubscribableEvents, SubscribableFallback, TimedAskable, TrafficCapture, TrafficEvents, TrafficMessage, Value, Theme, ThemeEvents, ThemeProperties, WallpaperLaunch, FileWallpaper, DesktopWallpaper, WritableTheme, WindowEvents, WindowLayer, WindowState, WindowSurface, WindowSurfaceEasing, WindowSurfaceSettings, WindowSurfaceTransaction } from "@phreshos/core";
7
+ export type { AnswerCapture, AnswerMessage, AnswerObserver, Askable, AskCapture, AskMessage, AskObserver, Capture, Captures, ChannelCapture, ChannelEvents, ChannelMessage, ClientTraffic, ClientDeclaration, Cleanup, DirectoryStat, EndpointDeclaration, EndpointTraffic, EntryStat, EventMessage, EventName, EventObserver, EventOptions, EventSubscriber, Exit, FileStat, Launch, LaunchClient, Layer, LogKind, LogRecord, LogSource, Message, OtherStat, Outcome, Position, ProgramEvents, ProgramPermissions, ProgramProcessExit, ProgramSql, ProgramStore, ProcessEvents, Publishable, ServedFile, ServerTraffic, Size, Subscribable, SubscribableEvents, SubscribableFallback, TimedAskable, TrafficCapture, TrafficEvents, TrafficMessage, Value, Theme, ThemeEvents, ThemeProperties, WallpaperLaunch, FileWallpaper, DesktopWallpaper, WritableTheme, WindowEvents, WindowGeometry, WindowLayer, WindowState } from "@phreshos/core";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phreshos/server",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "The SDK used by a Program's server endpoint.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -46,10 +46,10 @@
46
46
  "prepack": "node --run build"
47
47
  },
48
48
  "peerDependencies": {
49
- "@phreshos/core": "^0.1.4"
49
+ "@phreshos/core": "^0.1.6"
50
50
  },
51
51
  "devDependencies": {
52
- "@phreshos/core": "^0.1.4",
52
+ "@phreshos/core": "^0.1.6",
53
53
  "@types/node": "^26.2.0",
54
54
  "typescript": "^6.0.3"
55
55
  }