@frockbot/plugin-user-machine 0.3.0 → 0.3.2
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/package.json +9 -9
- package/src/backend.ts +14 -0
- package/src/client/index.ts +11 -0
- package/src/user.ts +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/plugin-user-machine",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"typecheck": "vue-tsc --noEmit -p tsconfig.json"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@frockbot/client-core": "0.3.
|
|
37
|
-
"@frockbot/client-ui": "0.3.
|
|
38
|
-
"@frockbot/desktop-core": "0.3.
|
|
39
|
-
"@frockbot/kernel-agent-loop": "0.3.
|
|
40
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
41
|
-
"@frockbot/machine-protocol": "0.3.
|
|
42
|
-
"@frockbot/plugin-shell": "0.3.
|
|
36
|
+
"@frockbot/client-core": "0.3.2",
|
|
37
|
+
"@frockbot/client-ui": "0.3.2",
|
|
38
|
+
"@frockbot/desktop-core": "0.3.2",
|
|
39
|
+
"@frockbot/kernel-agent-loop": "0.3.2",
|
|
40
|
+
"@frockbot/kernel-contracts": "0.3.2",
|
|
41
|
+
"@frockbot/machine-protocol": "0.3.2",
|
|
42
|
+
"@frockbot/plugin-shell": "0.3.2",
|
|
43
43
|
"cordis": "4.0.0-rc.8",
|
|
44
44
|
"vue": "3.5.41"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@frockbot/plugin-tools": "0.3.
|
|
47
|
+
"@frockbot/plugin-tools": "0.3.2",
|
|
48
48
|
"@types/bun": "1.4.0",
|
|
49
49
|
"@vitejs/plugin-vue": "6.0.8",
|
|
50
50
|
"typescript": "5.9.3",
|
package/src/backend.ts
CHANGED
|
@@ -60,6 +60,7 @@ import {
|
|
|
60
60
|
} from "@frockbot/machine-protocol";
|
|
61
61
|
import type { Plugin } from "cordis";
|
|
62
62
|
import { verifyMachinePairingCodeV1 } from "./pairing.js";
|
|
63
|
+
import { defineGatewayContribution } from "@frockbot/kernel-contracts/contributions";
|
|
63
64
|
|
|
64
65
|
/** What one machine call carries into the User Durable Object. */
|
|
65
66
|
export interface MachineCallV1 {
|
|
@@ -368,3 +369,16 @@ export namespace createMachineBackendContribution {
|
|
|
368
369
|
return () => lifecycle.mount(createMachineBackendContribution(host));
|
|
369
370
|
}
|
|
370
371
|
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* The manifest's gateway `backend` entry, resolved by specifier. The
|
|
375
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
376
|
+
* branches on which Package it belongs to.
|
|
377
|
+
*/
|
|
378
|
+
export const backendContribution = defineGatewayContribution<
|
|
379
|
+
MachineGatewayHostV1,
|
|
380
|
+
MachineBackendRouteContribution
|
|
381
|
+
>({
|
|
382
|
+
specifier: "@frockbot/plugin-user-machine/backend",
|
|
383
|
+
create: createMachineBackendContribution.plugin,
|
|
384
|
+
});
|
package/src/client/index.ts
CHANGED
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
type MachineAgentBridgeV1,
|
|
40
40
|
type MachinesClientState,
|
|
41
41
|
} from "./state.js";
|
|
42
|
+
import { defineClientContribution } from "@frockbot/kernel-contracts/contributions";
|
|
42
43
|
|
|
43
44
|
/** The surface the section opens. Not a settings anchor: a registered surface. */
|
|
44
45
|
export const MACHINE_SURFACE_ID_V1 = "user-machines";
|
|
@@ -178,3 +179,13 @@ export const userMachineClientPlugin: ClientPlugin = (ctx) => {
|
|
|
178
179
|
};
|
|
179
180
|
|
|
180
181
|
export default userMachineClientPlugin;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The manifest's `client` entry, resolved by specifier. The application looks
|
|
185
|
+
* this descriptor up in its Contribution table; it never branches on which
|
|
186
|
+
* Package it belongs to.
|
|
187
|
+
*/
|
|
188
|
+
export const clientContribution = defineClientContribution<ClientPlugin>({
|
|
189
|
+
specifier: "@frockbot/plugin-user-machine/client",
|
|
190
|
+
plugin: userMachineClientPlugin,
|
|
191
|
+
});
|
package/src/user.ts
CHANGED
|
@@ -77,6 +77,7 @@ import {
|
|
|
77
77
|
type MachineDispatchOutcomeV1,
|
|
78
78
|
type MachineStorageV1,
|
|
79
79
|
} from "./store.js";
|
|
80
|
+
import { defineUserBackendContribution } from "@frockbot/kernel-contracts/contributions";
|
|
80
81
|
|
|
81
82
|
export interface MachineUserBackendHost {
|
|
82
83
|
/** The User Durable Object's own storage. */
|
|
@@ -440,3 +441,26 @@ export function createMachineUserBackendPlugin(
|
|
|
440
441
|
): Plugin {
|
|
441
442
|
return () => lifecycle.mount(new MachineUserBackendContribution(host));
|
|
442
443
|
}
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* What an application hands this Contribution: the User's registered machines, under the
|
|
447
|
+
* Package's own key so one wide host object can satisfy every Package's slice
|
|
448
|
+
* without their fields colliding.
|
|
449
|
+
*/
|
|
450
|
+
export interface MachineUserApplicationHostV1 {
|
|
451
|
+
machines: MachineUserBackendHost;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* The manifest's `user` entry, resolved by specifier. The
|
|
456
|
+
* application looks this descriptor up in its Contribution table; it never
|
|
457
|
+
* branches on which Package it belongs to.
|
|
458
|
+
*/
|
|
459
|
+
export const userContribution = defineUserBackendContribution<
|
|
460
|
+
MachineUserApplicationHostV1,
|
|
461
|
+
MachineUserBackendContribution
|
|
462
|
+
>({
|
|
463
|
+
specifier: "@frockbot/plugin-user-machine/user",
|
|
464
|
+
create: (host, lifecycle) =>
|
|
465
|
+
createMachineUserBackendPlugin(host.machines, lifecycle),
|
|
466
|
+
});
|