@parall/sdk 1.32.0 → 1.33.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.
package/src/types.ts CHANGED
@@ -21,6 +21,12 @@ export interface User {
21
21
  export type ChatType = 'direct' | 'group';
22
22
  export type AgentRoutingMode = 'passive' | 'active' | 'smart';
23
23
  export type ChatVisibility = 'public' | 'private';
24
+ /**
25
+ * Who can add new members to a chat.
26
+ * - `everyone` (default): any chat member can add another org member.
27
+ * - `admins`: only chat admins/owners (and org admins) may add.
28
+ */
29
+ export type MemberInvitePolicy = 'everyone' | 'admins';
24
30
 
25
31
  export interface Chat {
26
32
  id: string;
@@ -35,6 +41,7 @@ export interface Chat {
35
41
  smart_routing_strategy: string | null;
36
42
  /** Chat-level smart routing agent override. NULL = use org default. */
37
43
  smart_routing_agent_id: string | null;
44
+ member_invite_policy: MemberInvitePolicy;
38
45
  last_message_at: string | null;
39
46
  last_message_preview: string | null;
40
47
  last_message_sender: string | null;
@@ -718,7 +725,24 @@ export interface Machine {
718
725
  daemon_mode: boolean;
719
726
  llm_source?: string;
720
727
  compute_mode: 'hosted' | 'local';
728
+ // Whether the machine contributes its local clips as a hub provider
729
+ // (org-admin-toggleable via PATCH /machines/{id}/provider-enabled). Absent on
730
+ // servers predating the field → treat as true (default-on). See
731
+ // docs/engineering-design/clip-provider-sharing-design.md.
732
+ provider_enabled?: boolean;
733
+ // Externally-reachable ProviderStream endpoint the daemon connects to in order
734
+ // to register its clips with the hub. Server-computed (grey-cloud
735
+ // clip-rpc.{env}.prll.sh, which bypasses Cloudflare's bidi-incompatible proxy)
736
+ // and delivered only to BYOC (local daemon-mode) machines via GET /machines/me;
737
+ // absent for hosted machines. See
738
+ // docs/engineering-design/clip-provider-sharing-design.md.
739
+ clip_provider_url?: string;
721
740
  daemon_version?: string | null;
741
+ // Whether the daemon can act on a machine.update signal — true only when a
742
+ // service manager (launchd/systemd) supervises it, false for bare `npx`
743
+ // foreground runs that can't load the overlay or restart after exit(42).
744
+ // Reported on heartbeat; gates the "Check for Update" affordance + API.
745
+ self_update_capable?: boolean;
722
746
  region: string | null;
723
747
  created_by: string;
724
748
  created_at: string;
@@ -862,6 +886,9 @@ export interface MachineAgentDetachedData {
862
886
  export interface MachineConfigUpdatedData {
863
887
  machine_id: string;
864
888
  llm_source?: string;
889
+ // Present when provider_enabled changed → daemon (de)registers its clip
890
+ // provider. Absent on llm_source-only updates.
891
+ provider_enabled?: boolean;
865
892
  }
866
893
 
867
894
  export interface MachineWorkspaceSetupRequestedData {
@@ -887,11 +914,19 @@ export interface MachineUpdateData {
887
914
  reason?: string;
888
915
  }
889
916
 
890
- export interface MachineClipInstallData {
917
+ export interface MachineClipSyncData {
918
+ machine_id: string;
891
919
  clip_id: string;
892
- alias: string;
893
- source_ref: string;
894
- version?: string;
920
+ action?: 'create' | 'update' | 'delete' | string;
921
+ }
922
+
923
+ export type BrowserProfileLifecycleAction = 'open' | 'stop' | 'reset';
924
+
925
+ export interface MachineBrowserProfileLifecycleData {
926
+ machine_id: string;
927
+ profile_id: string;
928
+ action: BrowserProfileLifecycleAction;
929
+ start_url?: string;
895
930
  }
896
931
 
897
932
  export interface AgentNewSessionData {
@@ -1692,6 +1727,7 @@ export interface ChatUpdateData {
1692
1727
  | 'agent_routing_mode'
1693
1728
  | 'smart_routing_strategy'
1694
1729
  | 'smart_routing_agent_id'
1730
+ | 'member_invite_policy'
1695
1731
  | 'last_message_at'
1696
1732
  | 'last_message_preview'
1697
1733
  | 'last_message_sender'
@@ -1999,6 +2035,20 @@ export interface DispatchEvent {
1999
2035
 
2000
2036
  export type DispatchNewData = DispatchEvent;
2001
2037
 
2038
+ export interface DispatchExpiredGroup {
2039
+ chat_id: string | null;
2040
+ chat_name?: string | null;
2041
+ event_type: DispatchEventType;
2042
+ count: number;
2043
+ oldest: string;
2044
+ newest: string;
2045
+ }
2046
+
2047
+ export interface DispatchExpireResult {
2048
+ total: number;
2049
+ groups: DispatchExpiredGroup[];
2050
+ }
2051
+
2002
2052
  export interface DispatchReceivedData {
2003
2053
  agent_id: string;
2004
2054
  event_type: string;
@@ -2105,8 +2155,9 @@ export type WsEventMap = {
2105
2155
  'machine.stop': MachineStopData;
2106
2156
  'machine.filesystem.browse': MachineFilesystemBrowseData;
2107
2157
  'machine.update': MachineUpdateData;
2108
- 'machine.clip.install': MachineClipInstallData;
2109
- 'clip.installed': ClipInstalledData;
2158
+ 'machine.clip.sync': MachineClipSyncData;
2159
+ 'machine.browser_profile.lifecycle': MachineBrowserProfileLifecycleData;
2160
+ 'clip.created': ClipCreatedData;
2110
2161
  'clip.removed': ClipRemovedData;
2111
2162
  'clip.updated': ClipUpdatedData;
2112
2163
  'agent.new_session': AgentNewSessionData;
@@ -2560,17 +2611,16 @@ export interface Clip {
2560
2611
  org_id: string;
2561
2612
  alias: string;
2562
2613
  name: string;
2614
+ display_name: string;
2563
2615
  description: string | null;
2564
2616
  manifest: Record<string, unknown>;
2565
2617
  source_type: ClipSourceType;
2566
2618
  source_ref: string | null;
2567
2619
  version: string | null;
2568
2620
  status: ClipStatus;
2621
+ machine_id: string;
2622
+ browser_profile_id: string | null;
2569
2623
  created_by: string | null;
2570
- /** Registry clip that reconciles onto every org machine, including machines
2571
- * that join after creation. Targeted installs leave this false and persist
2572
- * per-machine pending clip_instances instead. */
2573
- install_on_all_machines: boolean;
2574
2624
  created_at: string;
2575
2625
  updated_at: string;
2576
2626
  }
@@ -2584,21 +2634,27 @@ export interface AgentClip {
2584
2634
 
2585
2635
  export interface CreateClipRequest {
2586
2636
  alias: string;
2587
- name: string;
2637
+ name?: string;
2638
+ display_name?: string;
2588
2639
  description?: string;
2589
- manifest: Record<string, unknown>;
2640
+ manifest?: Record<string, unknown>;
2590
2641
  source_type?: ClipSourceType;
2591
2642
  source_ref?: string;
2592
2643
  version?: string;
2593
- target_machine_ids?: string[];
2644
+ machine_id: string;
2645
+ browser_profile_id?: string;
2594
2646
  }
2595
2647
 
2596
2648
  export interface UpdateClipRequest {
2597
2649
  name?: string;
2650
+ display_name?: string;
2598
2651
  description?: string;
2599
2652
  manifest?: Record<string, unknown>;
2600
2653
  status?: ClipStatus;
2601
2654
  version?: string;
2655
+ machine_id?: string;
2656
+ /** Empty string clears the binding; omitted leaves it unchanged. */
2657
+ browser_profile_id?: string;
2602
2658
  }
2603
2659
 
2604
2660
  export interface BindAgentClipRequest {
@@ -2606,32 +2662,68 @@ export interface BindAgentClipRequest {
2606
2662
  config?: Record<string, unknown>;
2607
2663
  }
2608
2664
 
2609
- export interface InvokeClipRequest {
2610
- alias: string;
2665
+ interface InvokeClipBaseRequest {
2611
2666
  command: string;
2612
2667
  input?: unknown;
2613
2668
  timeout_ms?: number;
2614
2669
  }
2615
2670
 
2671
+ export type InvokeClipRequest =
2672
+ | (InvokeClipBaseRequest & { alias: string; clip_id?: never })
2673
+ | (InvokeClipBaseRequest & { clip_id: string; alias?: never });
2674
+
2616
2675
  export interface InvokeClipResponse {
2617
2676
  output: unknown;
2618
2677
  error: string | null;
2619
2678
  }
2620
2679
 
2621
- export type ClipInstanceStatus = 'pending' | 'installed' | 'running' | 'stopped' | 'error';
2680
+ export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error';
2622
2681
 
2623
- export interface ClipInstance {
2682
+ export interface BrowserProfile {
2624
2683
  id: string;
2625
- clip_id: string;
2626
- machine_id: string | null;
2627
- status: ClipInstanceStatus;
2628
- version: string | null;
2629
- error_msg: string | null;
2630
- last_seen: string | null;
2684
+ org_id: string;
2685
+ /** Host machine where the profile's cookies / bb-browser account live. */
2686
+ machine_id: string;
2687
+ owner_user_id: string;
2688
+ display_name: string;
2689
+ status: BrowserProfileStatus;
2690
+ error_msg?: string | null;
2691
+ last_seen?: string | null;
2692
+ created_by?: string | null;
2631
2693
  created_at: string;
2632
2694
  updated_at: string;
2633
2695
  }
2634
2696
 
2697
+ export interface BrowserProfileConsent {
2698
+ id: string;
2699
+ org_id: string;
2700
+ browser_profile_id: string;
2701
+ clip_id: string;
2702
+ owner_user_id: string;
2703
+ granted_by: string;
2704
+ granted_at: string;
2705
+ revoked_at?: string | null;
2706
+ }
2707
+
2708
+ export interface CreateBrowserProfileRequest {
2709
+ /** Host machine that runs the BrowserProfile (cookies / bb-browser account). */
2710
+ machine_id: string;
2711
+ owner_user_id: string;
2712
+ display_name: string;
2713
+ }
2714
+
2715
+ export interface UpdateBrowserProfileRequest {
2716
+ display_name?: string;
2717
+ }
2718
+
2719
+ export interface BrowserProfileLifecycleRequest {
2720
+ start_url?: string;
2721
+ }
2722
+
2723
+ export interface GrantBrowserProfileConsentRequest {
2724
+ clip_id: string;
2725
+ }
2726
+
2635
2727
  export interface OnlineClipInfo {
2636
2728
  alias: string;
2637
2729
  name: string;
@@ -2640,12 +2732,18 @@ export interface OnlineClipInfo {
2640
2732
  provider_name: string;
2641
2733
  }
2642
2734
 
2643
- // Durable install reconcile a registry clip the machine should install.
2644
- export interface MachineClipInstall {
2735
+ // Executable Clip definition assigned to a daemon machine.
2736
+ export interface MachineClip {
2645
2737
  clip_id: string;
2646
2738
  alias: string;
2739
+ name: string;
2740
+ display_name: string;
2741
+ description?: string | null;
2742
+ manifest?: Record<string, unknown>;
2743
+ source_type: ClipSourceType;
2647
2744
  source_ref?: string;
2648
2745
  version?: string;
2746
+ browser_profile_id?: string | null;
2649
2747
  }
2650
2748
 
2651
2749
  // Pinix registry catalog clip info (from GET /clip/v1/registry/clips,
@@ -2657,6 +2755,11 @@ export interface RegistryCommandInfo {
2657
2755
  output?: string;
2658
2756
  }
2659
2757
 
2758
+ export interface RegistryDependencyInfo {
2759
+ package: string;
2760
+ version: string;
2761
+ }
2762
+
2660
2763
  export interface RegistryClipInfo {
2661
2764
  name: string; // @scope/name (canonical package id)
2662
2765
  package: string; // @scope/name (alias derivation + install source_ref)
@@ -2666,11 +2769,11 @@ export interface RegistryClipInfo {
2666
2769
  domain?: string;
2667
2770
  author?: string;
2668
2771
  commands: RegistryCommandInfo[];
2669
- dependencies: string[];
2772
+ dependencies: Record<string, RegistryDependencyInfo>;
2670
2773
  }
2671
2774
 
2672
2775
  // Clip WS event data types
2673
- export type ClipInstalledData = Clip;
2776
+ export type ClipCreatedData = Clip;
2674
2777
  export type ClipUpdatedData = Clip;
2675
2778
  export interface ClipRemovedData {
2676
2779
  clip_id: string;