@gjsify/devtools-protocol 0.36.0 → 0.37.0

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.
@@ -6,20 +6,16 @@
6
6
  */
7
7
  export type MethodKind = 'read-only' | 'presence' | 'mutating';
8
8
  /**
9
- * The generic, toolkit-neutral devtools methods and their kinds. Adapters
10
- * (DBus / WebSocket) implement the subset they support; the bridge
11
- * advertises only the implemented ones. App-specific methods are added via
12
- * extensions with their own kinds — the registry rejects an unclassified
13
- * method name, so a new method cannot bypass the pause policy unnoticed.
9
+ * The generic, toolkit-neutral devtools methods and their kinds. Adapters implement the
10
+ * subset they support and the bridge advertises only those; app-specific methods arrive
11
+ * through extensions with their own kinds, and the registry rejects an unclassified name
12
+ * so nothing can bypass the pause policy unnoticed.
14
13
  *
15
- * A NAME HERE IS A PROMISE, so nothing may be listed ahead of an adapter.
16
- * `SetProperty` and `EmitSignal` were classified `mutating` here and existed on
17
- * no wire at all: no `<method>` fragment in `GENERIC_METHODS_XML`, no handler
18
- * in `DevtoolsService`, no MCP tool. A caller reading this contract saw the
19
- * name and the kind, called it, and got `UnknownMethod` — the classification
20
- * made a method look supported and the pause policy look complete. Both were
21
- * removed rather than stubbed; add each back in the change that lands its
22
- * adapter, which is the only change that can prove the kind is right.
14
+ * A NAME HERE IS A PROMISE, so nothing may be listed ahead of an adapter. `SetProperty`
15
+ * and `EmitSignal` were once classified `mutating` here while existing on no wire at all
16
+ * — no XML fragment, no handler, no MCP tool — so a caller read the contract, called
17
+ * them and got `UnknownMethod`, while the pause policy looked complete. Add a method back
18
+ * in the change that lands its adapter, which is the only change that can prove the kind.
23
19
  */
24
20
  export declare const GENERIC_METHODS: {
25
21
  readonly GetStatus: "read-only";
@@ -1,9 +1,7 @@
1
1
  /**
2
- * Coerce a free-form instance label into a valid app-id segment
3
- * (letter-led, lowercase alphanumeric). Shared by the in-app adapter and
4
- * the MCP bridge so both derive the SAME per-instance bus name — replacing
5
- * the byte-identical hand-maintained duplication the map-editor needed when
6
- * its bridge was dependency-free.
2
+ * Coerce a free-form instance label into a valid app-id segment (letter-led, lowercase
3
+ * alphanumeric). Shared by the in-app adapter and the MCP bridge, so both derive the
4
+ * SAME per-instance bus name.
7
5
  */
8
6
  export declare function sanitizeInstanceId(label: string): string;
9
7
  export interface BusAddress {
@@ -12,16 +10,14 @@ export interface BusAddress {
12
10
  instance: string;
13
11
  }
14
12
  /**
15
- * Resolve an instance label to its DBus bus name + devtools object path,
16
- * given the app's base id (e.g. `"org.example.App"`). The default instance
17
- * keeps the bare base; a named instance gets a `.<segment>` bus-name suffix
18
- * and a `/<segment>` path segment, so the bridge dials the right process
19
- * when several run side by side.
13
+ * Resolve an instance label to its DBus bus name + devtools object path, given the app's
14
+ * base id. The default instance keeps the bare base; a named instance gets a
15
+ * `.<segment>` bus-name suffix and a `/<segment>` path segment, so the bridge dials the
16
+ * right process when several run side by side.
20
17
  *
21
- * Mirrors `Gio.Application`'s own object-path derivation (id dots → slashes,
22
- * leading slash) plus a trailing `/devtools` leaf. The in-app adapter should
23
- * prefer the authoritative `app.get_dbus_object_path() + '/devtools'`; this
24
- * helper lets the bridge predict the same address for the dotted-id case.
18
+ * Mirrors `Gio.Application`'s own path derivation (id dots → slashes, leading slash) plus
19
+ * a `/devtools` leaf. The in-app adapter should prefer the authoritative
20
+ * `app.get_dbus_object_path() + '/devtools'`; this only lets the bridge PREDICT it.
25
21
  *
26
22
  * - `("org.example.App")` → `org.example.App` @ `/org/example/App/devtools`
27
23
  * - `("org.example.App", "host")` → `org.example.App.host` @ `/org/example/App/host/devtools`
@@ -32,10 +28,9 @@ export declare const DEVTOOLS_ENABLE_ENV = "GJSIFY_DEVTOOLS";
32
28
  /** Env var carrying the per-instance label for side-by-side apps. */
33
29
  export declare const DEVTOOLS_INSTANCE_ENV = "GJSIFY_DEVTOOLS_INSTANCE";
34
30
  /**
35
- * Env var carrying a D-Bus address for the BUS-LESS peer-to-peer transport.
36
- * On the app side it is the address to LISTEN on (`unix:tmpdir=/tmp`,
37
- * `unix:path=…`, `nonce-tcp:host=127.0.0.1`); on the bridge side it is the
38
- * address to DIAL. It exists because macOS and Windows have no session bus.
31
+ * D-Bus address for the BUS-LESS peer transport, which exists because macOS and Windows
32
+ * have no session bus. The app LISTENS on it (`unix:tmpdir=/tmp`, `unix:path=…`,
33
+ * `nonce-tcp:host=127.0.0.1`), the bridge DIALS it.
39
34
  */
40
35
  export declare const DEVTOOLS_ADDRESS_ENV = "GJSIFY_DEVTOOLS_ADDRESS";
41
36
  /** Whether a value read from {@link DEVTOOLS_ENABLE_ENV} turns devtools on. */
@@ -43,20 +38,18 @@ export declare function isDevtoolsEnabledValue(value: string | null | undefined)
43
38
  /** Directory (under the user's runtime dir) holding the per-app peer-address files. */
44
39
  export declare const DEVTOOLS_ADDRESS_DIR = "gjsify-devtools";
45
40
  /**
46
- * Path of the file an app on the peer transport writes its concrete CLIENT
47
- * address into, so a bridge can find it with no environment at all. This is the
48
- * bus-less analogue of `DBUS_SESSION_BUS_ADDRESS`: a peer socket has no
49
- * well-known name to look up, so the address itself has to be discoverable.
41
+ * Path of the file an app on the peer transport writes its concrete CLIENT address into,
42
+ * so a bridge can find it with no environment at all — the bus-less analogue of
43
+ * `DBUS_SESSION_BUS_ADDRESS`, since a peer socket has no well-known name to look up.
50
44
  *
51
- * `runtimeDir` is passed IN rather than probed, keeping this package free of
52
- * platform imports (both sides pass `GLib.get_user_runtime_dir()`).
53
- *
54
- * The name derives from the SAME bus name {@link resolveBusAddress} derives, so
55
- * an instance label routes both transports identically:
45
+ * `runtimeDir` is passed IN rather than probed, which keeps this package free of platform
46
+ * imports (both sides pass `GLib.get_user_runtime_dir()`). The name derives from the SAME
47
+ * bus name {@link resolveBusAddress} does, so one instance label routes both transports
48
+ * identically:
56
49
  * - `(dir, "org.example.App")` → `<dir>/gjsify-devtools/org.example.App.address`
57
50
  * - `(dir, "org.example.App", "host")` → `<dir>/gjsify-devtools/org.example.App.host.address`
58
51
  *
59
- * Forward slashes unconditionally: GLib/GIO accept them as separators on win32
60
- * too, and a per-platform separator would need a platform probe in a pure module.
52
+ * Forward slashes unconditionally: GLib/GIO accept them on win32 too, and a per-platform
53
+ * separator would need a platform probe in a pure module.
61
54
  */
62
55
  export declare function devtoolsAddressFilePath(runtimeDir: string, base: string, label?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/devtools-protocol",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "description": "Transport-agnostic devtools contract (methods, JSON envelope, method-kinds, transport interface) shared by every gjsify devtools adapter and the MCP bridge",
5
5
  "type": "module",
6
6
  "module": "lib/esm/index.js",
@@ -35,8 +35,8 @@
35
35
  ],
36
36
  "dependencies": {},
37
37
  "devDependencies": {
38
- "@gjsify/cli": "^0.36.0",
39
- "@gjsify/unit": "^0.36.0",
38
+ "@gjsify/cli": "^0.37.0",
39
+ "@gjsify/unit": "^0.37.0",
40
40
  "@types/node": "^25.9.2",
41
41
  "typescript": "^6.0.3"
42
42
  },