@voltius/plugin-types 0.35.1 → 0.37.0

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.
Files changed (3) hide show
  1. package/index.d.ts +31 -3
  2. package/package.json +1 -1
  3. package/ui.d.ts +11 -0
package/index.d.ts CHANGED
@@ -87,7 +87,7 @@ export interface AppTheme {
87
87
  terminal: TerminalTheme;
88
88
  }
89
89
 
90
- export type Locale = "en" | "fr" | "ru" | "zh";
90
+ export type Locale = "en" | "fr" | "ru" | "zh" | "tr";
91
91
 
92
92
  export type PluginAuditAction =
93
93
  | "agent.grant_created"
@@ -320,12 +320,40 @@ export interface PluginTransfer {
320
320
  owner?: string;
321
321
  }
322
322
 
323
+ export type SyncProviderStatus = "idle" | "syncing" | "success" | "error" | "offline";
324
+
325
+ export type SyncProviderAvailability = "active" | "not_configured" | "disabled" | "locked" | "needs_upgrade";
326
+
327
+ /** What a sync provider plugin publishes under `publishState("sync-state", …)`. */
328
+ export interface SyncProviderState {
329
+ status: SyncProviderStatus;
330
+ lastSync: Date | string | number | null;
331
+ error: string | null;
332
+ blobSizeBytes: number | null;
333
+ configured: boolean;
334
+ }
335
+
336
+ /** What a sync provider plugin passes to `plugins.expose`. */
337
+ export interface SyncProviderPublicApi {
338
+ syncNow(): Promise<void>;
339
+ }
340
+
341
+ export interface SyncProviderSummary {
342
+ id: string;
343
+ label: string;
344
+ availability: SyncProviderAvailability;
345
+ status: SyncProviderStatus;
346
+ lastSync: string | null;
347
+ error: string | null;
348
+ }
349
+
323
350
  export interface PluginSyncState {
324
- status: "idle" | "syncing" | "success" | "error" | "offline";
351
+ status: SyncProviderStatus;
325
352
  lastSync: string | null;
326
353
  error: string | null;
327
354
  cloudActive: boolean;
328
355
  blobSizeBytes: number | null;
356
+ providers: SyncProviderSummary[];
329
357
  }
330
358
 
331
359
  export interface PluginHostPing {
@@ -1268,7 +1296,7 @@ export interface PluginAPI {
1268
1296
  /** Publish a plain, serialisable state snapshot for host UI to read, keyed
1269
1297
  * by `<pluginId>::<key>`. Host surfaces subscribe to this instead of
1270
1298
  * importing the plugin's runtime module. Cleared on unload/disable. */
1271
- publishState(key: string, value: unknown): void;
1299
+ publishState<K extends string>(key: K, value: K extends "sync-state" ? SyncProviderState : unknown): void;
1272
1300
  };
1273
1301
 
1274
1302
  // Plugin-scoped key-value storage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voltius/plugin-types",
3
- "version": "0.35.1",
3
+ "version": "0.37.0",
4
4
  "description": "TypeScript definitions for the Voltius plugin API",
5
5
  "types": "index.d.ts",
6
6
  "files": [
package/ui.d.ts CHANGED
@@ -32,4 +32,15 @@ declare module "@voltius/ui" {
32
32
  onConfirm: () => void;
33
33
  onCancel: () => void;
34
34
  }>;
35
+ export type StatusTone = "connected" | "connecting" | "warning" | "error" | "idle" | "accent";
36
+ export const StatusDot: ComponentType<{
37
+ tone: StatusTone;
38
+ size?: "sm" | "md";
39
+ hollow?: boolean;
40
+ halo?: string;
41
+ corner?: boolean;
42
+ motion?: "pulse" | "ping" | "ping-fast";
43
+ label?: string;
44
+ className?: string;
45
+ }>;
35
46
  }