@frockbot/plugin-package-publisher 0.3.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/plugin-package-publisher",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,18 +23,18 @@
23
23
  "typecheck": "vue-tsc --noEmit -p tsconfig.json"
24
24
  },
25
25
  "dependencies": {
26
- "@frockbot/kernel-contracts": "0.3.1",
27
- "@frockbot/plugin-prompt": "0.3.1",
28
- "@frockbot/plugin-tools": "0.3.1",
29
- "@frockbot/client-core": "0.3.1",
30
- "@frockbot/client-ui": "0.3.1",
31
- "@frockbot/plugin-shell": "0.3.1",
26
+ "@frockbot/kernel-contracts": "0.3.2",
27
+ "@frockbot/plugin-prompt": "0.3.2",
28
+ "@frockbot/plugin-tools": "0.3.2",
29
+ "@frockbot/client-core": "0.3.2",
30
+ "@frockbot/client-ui": "0.3.2",
31
+ "@frockbot/plugin-shell": "0.3.2",
32
32
  "cordis": "4.0.0-rc.8",
33
33
  "vue": "3.5.41"
34
34
  },
35
35
  "devDependencies": {
36
- "@frockbot/computer-core": "0.3.1",
37
- "@frockbot/plugin-testkit": "0.3.1",
36
+ "@frockbot/computer-core": "0.3.2",
37
+ "@frockbot/plugin-testkit": "0.3.2",
38
38
  "@types/bun": "1.4.0",
39
39
  "@vitejs/plugin-vue": "6.0.8",
40
40
  "typescript": "5.9.3",
package/src/backend.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  type PackageRevisionHistoryV1,
8
8
  type RollbackPackageCommandV1,
9
9
  } from "./shared.js";
10
+ import { defineGatewayContribution } from "@frockbot/kernel-contracts/contributions";
10
11
 
11
12
  export interface PackagePublisherGatewayHost {
12
13
  read(userId: string): Promise<PackageRevisionHistoryV1>;
@@ -123,3 +124,16 @@ export namespace createPackagePublisherBackendContribution {
123
124
  lifecycle.mount(createPackagePublisherBackendContribution(host));
124
125
  }
125
126
  }
127
+
128
+ /**
129
+ * The manifest's gateway `backend` entry, resolved by specifier. The
130
+ * application looks this descriptor up in its Contribution table; it never
131
+ * branches on which Package it belongs to.
132
+ */
133
+ export const backendContribution = defineGatewayContribution<
134
+ PackagePublisherGatewayHost,
135
+ PackagePublisherBackendRouteContribution
136
+ >({
137
+ specifier: "@frockbot/plugin-package-publisher/backend",
138
+ create: createPackagePublisherBackendContribution.plugin,
139
+ });
@@ -16,6 +16,7 @@ import {
16
16
  packagePublisherStateKey,
17
17
  type PackagePublisherClientState,
18
18
  } from "./state.js";
19
+ import { defineClientContribution } from "@frockbot/kernel-contracts/contributions";
19
20
 
20
21
  export const packagePublisherClientPlugin: ClientPlugin = (ctx) => {
21
22
  const surfaces = ctx.inject(clientSurfaceRegistryKey);
@@ -82,3 +83,13 @@ export const packagePublisherClientPlugin: ClientPlugin = (ctx) => {
82
83
  };
83
84
 
84
85
  export default packagePublisherClientPlugin;
86
+
87
+ /**
88
+ * The manifest's `client` entry, resolved by specifier. The application looks
89
+ * this descriptor up in its Contribution table; it never branches on which
90
+ * Package it belongs to.
91
+ */
92
+ export const clientContribution = defineClientContribution<ClientPlugin>({
93
+ specifier: "@frockbot/plugin-package-publisher/client",
94
+ plugin: packagePublisherClientPlugin,
95
+ });
package/src/user.ts CHANGED
@@ -11,6 +11,7 @@ import {
11
11
  type PublishPackageCommandV1,
12
12
  type RollbackPackageCommandV1,
13
13
  } from "./shared.js";
14
+ import { defineUserBackendContribution } from "@frockbot/kernel-contracts/contributions";
14
15
 
15
16
  const STATE_KEY = "package-publisher:state:v1";
16
17
  const RECEIPT_PREFIX = "package-publisher:receipt:";
@@ -470,3 +471,26 @@ export function createPackagePublisherUserPlugin(
470
471
  ): Plugin {
471
472
  return () => lifecycle.mount(createPackagePublisherUserContribution(host));
472
473
  }
474
+
475
+ /**
476
+ * What an application hands this Contribution: Package publication, under the
477
+ * Package's own key so one wide host object can satisfy every Package's slice
478
+ * without their fields colliding.
479
+ */
480
+ export interface PackagePublisherUserApplicationHostV1 {
481
+ packagePublisher: PackagePublisherUserHost;
482
+ }
483
+
484
+ /**
485
+ * The manifest's `user` entry, resolved by specifier. The
486
+ * application looks this descriptor up in its Contribution table; it never
487
+ * branches on which Package it belongs to.
488
+ */
489
+ export const userContribution = defineUserBackendContribution<
490
+ PackagePublisherUserApplicationHostV1,
491
+ PackagePublisherUserContribution
492
+ >({
493
+ specifier: "@frockbot/plugin-package-publisher/user",
494
+ create: (host, lifecycle) =>
495
+ createPackagePublisherUserPlugin(host.packagePublisher, lifecycle),
496
+ });