@frockbot/plugin-search 0.3.1 → 0.3.3

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-search",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,10 +25,11 @@
25
25
  "typecheck": "vue-tsc --noEmit -p tsconfig.json"
26
26
  },
27
27
  "dependencies": {
28
- "@frockbot/client-core": "0.3.1",
29
- "@frockbot/client-ui": "0.3.1",
30
- "@frockbot/plugin-flock": "0.3.1",
31
- "@frockbot/plugin-shell": "0.3.1",
28
+ "@frockbot/client-core": "0.3.3",
29
+ "@frockbot/client-ui": "0.3.3",
30
+ "@frockbot/kernel-contracts": "0.3.3",
31
+ "@frockbot/plugin-flock": "0.3.3",
32
+ "@frockbot/plugin-shell": "0.3.3",
32
33
  "cordis": "4.0.0-rc.8",
33
34
  "vue": "3.5.41"
34
35
  },
package/src/backend.ts CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  type SearchQueryV1,
27
27
  type SearchRowKindV1,
28
28
  } from "./shared.js";
29
+ import { defineGatewayContribution } from "@frockbot/kernel-contracts/contributions";
29
30
 
30
31
  export interface SearchGatewayHost {
31
32
  searchTranscripts(
@@ -214,3 +215,16 @@ export namespace createSearchBackendContribution {
214
215
  return () => lifecycle.mount(createSearchBackendContribution(host));
215
216
  }
216
217
  }
218
+
219
+ /**
220
+ * The manifest's gateway `backend` entry, resolved by specifier. The
221
+ * application looks this descriptor up in its Contribution table; it never
222
+ * branches on which Package it belongs to.
223
+ */
224
+ export const backendContribution = defineGatewayContribution<
225
+ SearchGatewayHost,
226
+ SearchBackendRouteContribution
227
+ >({
228
+ specifier: "@frockbot/plugin-search/backend",
229
+ create: createSearchBackendContribution.plugin,
230
+ });
package/src/bot.ts CHANGED
@@ -39,6 +39,7 @@ export interface SearchProjectableRunV1 {
39
39
  | "completed"
40
40
  | "failed"
41
41
  | "cancelled"
42
+ | "superseded"
42
43
  | "reconciliation-required";
43
44
  events: readonly {
44
45
  type: string;
@@ -68,7 +69,8 @@ export function isSettledSearchRunV1(run: {
68
69
  return (
69
70
  run.status === "completed" ||
70
71
  run.status === "failed" ||
71
- run.status === "cancelled"
72
+ run.status === "cancelled" ||
73
+ run.status === "superseded"
72
74
  );
73
75
  }
74
76
 
@@ -24,6 +24,7 @@ import {
24
24
  type SearchWebData,
25
25
  } from "./state.js";
26
26
  import "./styles.css";
27
+ import { defineClientContribution } from "@frockbot/kernel-contracts/contributions";
27
28
 
28
29
  export const SEARCH_SURFACE_ID = "search";
29
30
 
@@ -190,3 +191,13 @@ export const searchClientPlugin: ClientPlugin = (ctx) => {
190
191
  };
191
192
 
192
193
  export default searchClientPlugin;
194
+
195
+ /**
196
+ * The manifest's `client` entry, resolved by specifier. The application looks
197
+ * this descriptor up in its Contribution table; it never branches on which
198
+ * Package it belongs to.
199
+ */
200
+ export const clientContribution = defineClientContribution<ClientPlugin>({
201
+ specifier: "@frockbot/plugin-search/client",
202
+ plugin: searchClientPlugin,
203
+ });
package/src/user.ts CHANGED
@@ -28,6 +28,7 @@ import {
28
28
  type SearchIndexStateV1,
29
29
  type SearchRowV1,
30
30
  } from "./shared.js";
31
+ import { defineUserBackendContribution } from "@frockbot/kernel-contracts/contributions";
31
32
 
32
33
  export interface SearchUserBackendHost {
33
34
  /** The User Durable Object's own SQL storage. */
@@ -114,3 +115,26 @@ export function createSearchUserBackendPlugin(
114
115
  ): Plugin {
115
116
  return () => lifecycle.mount(new SearchUserBackendContribution(host));
116
117
  }
118
+
119
+ /**
120
+ * What an application hands this Contribution: the User's transcript index, under the
121
+ * Package's own key so one wide host object can satisfy every Package's slice
122
+ * without their fields colliding.
123
+ */
124
+ export interface SearchUserApplicationHostV1 {
125
+ search: SearchUserBackendHost;
126
+ }
127
+
128
+ /**
129
+ * The manifest's `user` 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 userContribution = defineUserBackendContribution<
134
+ SearchUserApplicationHostV1,
135
+ SearchUserBackendContribution
136
+ >({
137
+ specifier: "@frockbot/plugin-search/user",
138
+ create: (host, lifecycle) =>
139
+ createSearchUserBackendPlugin(host.search, lifecycle),
140
+ });