@capybara-hq/plugin-sdk 0.1.0-rc.44 → 0.1.0-rc.45

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.44";
1
+ export declare const SDK_VERSION = "0.1.0-rc.45";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./bootstrap.js";
4
4
  export * from "./cards.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const SDK_VERSION = "0.1.0-rc.44";
1
+ export const SDK_VERSION = "0.1.0-rc.45";
2
2
  export * from "./agent-template.js";
3
3
  export * from "./bootstrap.js";
4
4
  export * from "./cards.js";
@@ -14,6 +14,8 @@ export declare const SHELL_CAPABILITY_KEYS: {
14
14
  readonly haptics: "haptics@1";
15
15
  readonly share: "share@1";
16
16
  readonly menu: "menu@1";
17
+ readonly nav: "nav@1";
18
+ readonly profiles: "profiles@1";
17
19
  };
18
20
  export type KeepAwakeMode = "off" | "while-busy" | "connected";
19
21
  export type DeviceConnection = "starting" | "online" | "offline" | "draining" | "stopped";
@@ -165,3 +167,35 @@ export declare const MOBILE_SHELL_LIMITS: {
165
167
  };
166
168
  /** The menu item id pattern, checked on `menu@1.show` (the shell validates every input). */
167
169
  export declare const MENU_ITEM_ID: RegExp;
170
+ export type NavSectionId = "chats" | "inbox" | "agents" | "schedules";
171
+ /** The strip's sections in display order. */
172
+ export declare const NAV_SECTION_ORDER: readonly NavSectionId[];
173
+ export interface NavBadgeV1 {
174
+ count?: number;
175
+ countMore?: boolean;
176
+ }
177
+ export interface NavItemV1 extends NavBadgeV1 {
178
+ id: NavSectionId;
179
+ label: string;
180
+ }
181
+ export interface NavMenuV1 extends NavBadgeV1 {
182
+ label: string;
183
+ }
184
+ export interface NavStateV1 {
185
+ /** The sections the person sees, in NAV_SECTION_ORDER (a guest has no `schedules`). */
186
+ items: NavItemV1[];
187
+ current: NavSectionId | null;
188
+ /** The strip's menu button, or null for none (non-null while the web's class is compact). */
189
+ menu: NavMenuV1 | null;
190
+ }
191
+ /** `nav@1`: offered only while the window has a strip (mobile app spec §6.1): presence is visibility. */
192
+ export interface NavCapabilityV1 {
193
+ set(state: NavStateV1): Promise<void>;
194
+ onSelect(listener: (id: NavSectionId) => void): () => void;
195
+ onMenu(listener: () => void): () => void;
196
+ }
197
+ /** `profiles@1`: the native profile switcher. */
198
+ export interface ProfilesCapabilityV1 {
199
+ /** Opens the native profile switcher; resolves when it closes, with nothing. */
200
+ show(): Promise<void>;
201
+ }
@@ -14,6 +14,8 @@ export const SHELL_CAPABILITY_KEYS = {
14
14
  haptics: "haptics@1",
15
15
  share: "share@1",
16
16
  menu: "menu@1",
17
+ nav: "nav@1",
18
+ profiles: "profiles@1",
17
19
  };
18
20
  /** The shell validates every input against these (and the web keeps within them). */
19
21
  export const MOBILE_SHELL_LIMITS = {
@@ -26,3 +28,5 @@ export const MOBILE_SHELL_LIMITS = {
26
28
  };
27
29
  /** The menu item id pattern, checked on `menu@1.show` (the shell validates every input). */
28
30
  export const MENU_ITEM_ID = /^[A-Za-z0-9_.-]{1,64}$/;
31
+ /** The strip's sections in display order. */
32
+ export const NAV_SECTION_ORDER = ["chats", "inbox", "agents", "schedules"];
@@ -16,4 +16,6 @@ export const SHELL_CAPABILITIES = [
16
16
  { key: "haptics@1", owner: "mobile app spec (2026-11-20-mobile-app-design.md), §5.2" },
17
17
  { key: "share@1", owner: "mobile app spec (2026-11-20-mobile-app-design.md), §5.2" },
18
18
  { key: "menu@1", owner: "mobile app spec (2026-11-20-mobile-app-design.md), §5.2" },
19
+ { key: "nav@1", owner: "mobile app spec (2026-11-20-mobile-app-design.md), §5.2" },
20
+ { key: "profiles@1", owner: "mobile app spec (2026-11-20-mobile-app-design.md), §5.2" },
19
21
  ];
@@ -121,6 +121,14 @@ export declare const THEME_TOKENS: {
121
121
  readonly dark: "rgba(0,0,0,.88)";
122
122
  readonly light: "rgba(10,10,10,.80)";
123
123
  };
124
+ readonly "float-ground": {
125
+ readonly dark: "rgba(28,28,26,0.85)";
126
+ readonly light: "rgba(255,255,255,0.85)";
127
+ };
128
+ readonly "float-line": {
129
+ readonly dark: "rgba(255,255,255,0.08)";
130
+ readonly light: "rgba(26,26,24,0.08)";
131
+ };
124
132
  readonly "diff-add": {
125
133
  readonly dark: "rgba(63,212,131,.08)";
126
134
  readonly light: "rgba(22,128,63,.10)";
@@ -263,6 +271,10 @@ export declare const THEME_TOKENS: {
263
271
  readonly dark: "0 8px 24px rgba(0,0,0,.45)";
264
272
  readonly light: "0 8px 24px rgba(26,26,24,.08)";
265
273
  };
274
+ readonly "shadow-float-touch": {
275
+ readonly dark: "0 6px 20px rgba(0,0,0,.35)";
276
+ readonly light: "0 6px 20px rgba(26,26,24,.10)";
277
+ };
266
278
  };
267
279
  readonly radius: {
268
280
  readonly sm: 4;
@@ -277,8 +289,8 @@ export declare const THEME_FONTS: {
277
289
  };
278
290
  /** The tokens a theme may override: no avatar colors, no color-mix values (they derive). */
279
291
  export declare const THEME_OVERRIDABLE: {
280
- readonly color: readonly ["bg", "panel", "panel-2", "sidebar", "sidebar-active", "raised", "selected", "hover", "line-soft", "line", "line-strong", "line-card", "scroll-thumb", "ink", "muted", "faint", "disabled", "accent", "accent-hover", "accent-press", "on-accent", "focus-ring", "ok", "fail", "warn", "scrim", "lightbox", "diff-add", "diff-del"];
281
- readonly shadow: readonly ["shadow-1", "shadow-2", "shadow-sheet", "shadow-float"];
292
+ readonly color: readonly ["bg", "panel", "panel-2", "sidebar", "sidebar-active", "raised", "selected", "hover", "line-soft", "line", "line-strong", "line-card", "scroll-thumb", "ink", "muted", "faint", "disabled", "accent", "accent-hover", "accent-press", "on-accent", "focus-ring", "ok", "fail", "warn", "scrim", "lightbox", "float-ground", "float-line", "diff-add", "diff-del"];
293
+ readonly shadow: readonly ["shadow-1", "shadow-2", "shadow-sheet", "shadow-float", "shadow-float-touch"];
282
294
  readonly radius: readonly ["sm", "md", "bubble"];
283
295
  };
284
296
  /** [foreground, background, floor] or, with a fourth element, the surface it sits on. */
@@ -33,6 +33,8 @@ export const THEME_TOKENS = {
33
33
  "preview-light": { dark: "#FAF9F6", light: "#FAF9F6" },
34
34
  "preview-dark": { dark: "#0A0A0A", light: "#0A0A0A" },
35
35
  "lightbox": { dark: "rgba(0,0,0,.88)", light: "rgba(10,10,10,.80)" },
36
+ "float-ground": { dark: "rgba(28,28,26,0.85)", light: "rgba(255,255,255,0.85)" },
37
+ "float-line": { dark: "rgba(255,255,255,0.08)", light: "rgba(26,26,24,0.08)" },
36
38
  "diff-add": { dark: "rgba(63,212,131,.08)", light: "rgba(22,128,63,.10)" },
37
39
  "diff-del": { dark: "rgba(255,92,82,.08)", light: "rgba(207,34,46,.08)" },
38
40
  "avatar-black": { dark: "#1C1C1A", light: "#1C1C1A" },
@@ -70,6 +72,7 @@ export const THEME_TOKENS = {
70
72
  "shadow-2": { dark: "0 16px 48px rgba(0,0,0,.50)", light: "0 8px 24px rgba(10,10,10,.12)" },
71
73
  "shadow-sheet": { dark: "-16px 0 40px rgba(0,0,0,.40)", light: "-4px 0 16px rgba(10,10,10,.08)" },
72
74
  "shadow-float": { dark: "0 8px 24px rgba(0,0,0,.45)", light: "0 8px 24px rgba(26,26,24,.08)" },
75
+ "shadow-float-touch": { dark: "0 6px 20px rgba(0,0,0,.35)", light: "0 6px 20px rgba(26,26,24,.10)" },
73
76
  },
74
77
  radius: { sm: 4, md: 8, bubble: 10 },
75
78
  };
@@ -108,6 +111,8 @@ export const THEME_OVERRIDABLE = {
108
111
  "warn",
109
112
  "scrim",
110
113
  "lightbox",
114
+ "float-ground",
115
+ "float-line",
111
116
  "diff-add",
112
117
  "diff-del",
113
118
  ],
@@ -116,6 +121,7 @@ export const THEME_OVERRIDABLE = {
116
121
  "shadow-2",
117
122
  "shadow-sheet",
118
123
  "shadow-float",
124
+ "shadow-float-touch",
119
125
  ],
120
126
  radius: ["sm", "md", "bubble"],
121
127
  };
@@ -127,6 +133,8 @@ export const THEME_CONTRAST = [
127
133
  ["muted", "sidebar", 4.5],
128
134
  ["muted", "panel-2", 4.5],
129
135
  ["muted", "raised", 4.5],
136
+ ["ink", "float-ground", 4.5, "bg"],
137
+ ["muted", "float-ground", 4.5, "bg"],
130
138
  ["muted", "selected", 4.5],
131
139
  ["muted", "hover", 4.5],
132
140
  ["ink", "hover", 4.5, "panel"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capybara-hq/plugin-sdk",
3
- "version": "0.1.0-rc.44",
3
+ "version": "0.1.0-rc.45",
4
4
  "description": "Capybara plugin SDK: the types and pure functions plugins are written against",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {