@capybara-hq/plugin-sdk 0.1.0-rc.52 → 0.1.0-rc.53

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const SDK_VERSION = "0.1.0-rc.52";
1
+ export declare const SDK_VERSION = "0.1.0-rc.53";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.52";
1
+ export const SDK_VERSION = "0.1.0-rc.53";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./avatar-presets.js";
4
4
  export * from "./bootstrap.js";
@@ -166,15 +166,21 @@ export declare const MOBILE_SHELL_LIMITS: {
166
166
  readonly shareTitle: 256;
167
167
  readonly shareText: 4000;
168
168
  readonly url: 2048;
169
- /** `nav@1`: a section or menu label is 1..32 characters. */
169
+ /** `nav@1`: an item or action label is 1..32 characters. */
170
170
  readonly navLabel: 32;
171
171
  /** `nav@1`: a badge count is an integer 0..9999 (`countMore` says there are more). */
172
172
  readonly navCount: 9999;
173
+ /** `nav@1`: the account's name is 1..64 characters (its initial 1..2). */
174
+ readonly navAccountName: 64;
173
175
  };
174
176
  /** The menu item id pattern, checked on `menu@1.show` (the shell validates every input). */
175
177
  export declare const MENU_ITEM_ID: RegExp;
176
- export type NavSectionId = "chats" | "inbox" | "agents" | "schedules";
177
- /** The strip's sections in display order. */
178
+ /**
179
+ * The strip's items: the four sections and, last, `search` (opens the web's command palette; never
180
+ * `current`).
181
+ */
182
+ export type NavSectionId = "chats" | "inbox" | "agents" | "schedules" | "search";
183
+ /** The strip's items in display order. */
178
184
  export declare const NAV_SECTION_ORDER: readonly NavSectionId[];
179
185
  export interface NavBadgeV1 {
180
186
  count?: number;
@@ -184,21 +190,53 @@ export interface NavItemV1 extends NavBadgeV1 {
184
190
  id: NavSectionId;
185
191
  label: string;
186
192
  }
187
- export interface NavMenuV1 extends NavBadgeV1 {
193
+ /**
194
+ * The pill's top item, accent-filled: the page's primary action, else the new conversation
195
+ * (`id` matches MENU_ITEM_ID, `label` 1..navLabel; the shell draws its own glyph per `icon`).
196
+ */
197
+ export interface NavActionV1 {
198
+ id: string;
188
199
  label: string;
200
+ icon: "plus" | "square-pen";
201
+ }
202
+ /**
203
+ * The account avatar under the strip's status: the image at `avatarUrl` (an absolute https URL
204
+ * or one on the profile's origin), else `initial` in a circle; `badge` a count 0..navCount.
205
+ */
206
+ export interface NavAccountV1 {
207
+ name: string;
208
+ avatarUrl?: string | null;
209
+ initial: string;
210
+ badge?: number;
189
211
  }
190
212
  export interface NavStateV1 {
191
- /** The sections the person sees, in NAV_SECTION_ORDER (a guest has no `schedules`). */
213
+ /** The items the person sees, in NAV_SECTION_ORDER (a guest has no `schedules`). */
192
214
  items: NavItemV1[];
215
+ /**
216
+ * The section of the page on screen; `null`: no section is selected and the shell clears its
217
+ * highlight (the new-conversation home, a page outside the sections). Never `search`.
218
+ */
193
219
  current: NavSectionId | null;
194
- /** The strip's menu button, or null for none (non-null while the web's class is compact). */
195
- menu: NavMenuV1 | null;
220
+ /** The pill's top item: the page's primary, else the new conversation (no menu button, D12). */
221
+ action: NavActionV1;
222
+ /** The avatar under the status (absent: the shell shows none). */
223
+ account?: NavAccountV1;
196
224
  }
197
- /** `nav@1`: offered only while the window has a strip (mobile app spec §6.1): presence is visibility. */
225
+ /**
226
+ * `nav@1`: offered only while the window has a strip (mobile app spec §6.1): presence is
227
+ * visibility. `side` is the edge the strip is on (right unless the app is the left one of a
228
+ * split), reported with the capability and updated with the envelope's `change`. The shell and
229
+ * the web ship this shape in lockstep (no older-shell path before 0.1.0): the shell's nav@1
230
+ * minor version of 2026-11-22 ships with or before the web that sends it.
231
+ */
198
232
  export interface NavCapabilityV1 {
199
233
  set(state: NavStateV1): Promise<void>;
200
234
  onSelect(listener: (id: NavSectionId) => void): () => void;
201
- onMenu(listener: () => void): () => void;
235
+ /** The pill's top item was tapped: the web runs the action. */
236
+ onAction(listener: () => void): () => void;
237
+ /** The account avatar was tapped: the web opens its account sheet. */
238
+ onAccount(listener: () => void): () => void;
239
+ readonly side?: "left" | "right";
202
240
  }
203
241
  /** `profiles@1`: the native profile switcher. */
204
242
  export interface ProfilesCapabilityV1 {
@@ -26,12 +26,20 @@ export const MOBILE_SHELL_LIMITS = {
26
26
  shareTitle: 256,
27
27
  shareText: 4000,
28
28
  url: 2048,
29
- /** `nav@1`: a section or menu label is 1..32 characters. */
29
+ /** `nav@1`: an item or action label is 1..32 characters. */
30
30
  navLabel: 32,
31
31
  /** `nav@1`: a badge count is an integer 0..9999 (`countMore` says there are more). */
32
32
  navCount: 9999,
33
+ /** `nav@1`: the account's name is 1..64 characters (its initial 1..2). */
34
+ navAccountName: 64,
33
35
  };
34
36
  /** The menu item id pattern, checked on `menu@1.show` (the shell validates every input). */
35
37
  export const MENU_ITEM_ID = /^[A-Za-z0-9_.-]{1,64}$/;
36
- /** The strip's sections in display order. */
37
- export const NAV_SECTION_ORDER = ["chats", "inbox", "agents", "schedules"];
38
+ /** The strip's items in display order. */
39
+ export const NAV_SECTION_ORDER = [
40
+ "chats",
41
+ "inbox",
42
+ "agents",
43
+ "schedules",
44
+ "search",
45
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.52",
3
+ "version": "0.1.0-rc.53",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {