@parall/sdk 1.36.1 → 1.38.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/dist/types.d.ts CHANGED
@@ -468,6 +468,13 @@ export interface SendMessageRequest {
468
468
  agent_step_id?: string;
469
469
  agent_session_id?: string;
470
470
  hints?: MessageHints;
471
+ /**
472
+ * Binds this send to a claimed dispatch lane (agent senders only). Every
473
+ * lane-bound write passes the server's lane incumbency check; when
474
+ * idempotency_key carries a dispatch effect key ("reply:<dsp_id>") the
475
+ * write is arbitrated by the scoped dispatch effects ledger.
476
+ */
477
+ dispatch_lane?: string;
471
478
  }
472
479
  export interface SendDirectMessageRequest {
473
480
  user_id: string;
@@ -611,11 +618,17 @@ export interface Machine {
611
618
  clip_provider_url?: string;
612
619
  daemon_version?: string | null;
613
620
  self_update_capable?: boolean;
621
+ detected_runtimes?: DetectedRuntime[] | null;
614
622
  region: string | null;
615
623
  created_by: string;
616
624
  created_at: string;
617
625
  updated_at: string;
618
626
  }
627
+ export interface DetectedRuntime {
628
+ runtime_type: string;
629
+ version?: string;
630
+ status: 'ok' | 'broken';
631
+ }
619
632
  export type DaemonWorkspaceMode = 'default' | 'local_path' | 'git';
620
633
  export type DaemonWorkspaceSetupRunOn = 'first_attach' | 'config_change';
621
634
  export interface DaemonWorkspaceGitConfig {
@@ -670,7 +683,7 @@ export interface AgentProfile {
670
683
  model_management: string | null;
671
684
  permissions: string[];
672
685
  machine_id: string | null;
673
- hosting_mode?: 'hosted' | 'self_hosted';
686
+ hosting_mode?: 'hosted' | 'self_hosted' | 'platform_runtime';
674
687
  runtime_type: string;
675
688
  description: string | null;
676
689
  thinking_effort: string | null;
@@ -724,6 +737,11 @@ export interface MachineConfigUpdatedData {
724
737
  llm_source?: string;
725
738
  provider_enabled?: boolean;
726
739
  }
740
+ export interface MachineAgentConfigUpdatedData {
741
+ machine_id: string;
742
+ agent_id: string;
743
+ llm_source: string;
744
+ }
727
745
  export interface MachineWorkspaceSetupRequestedData {
728
746
  machine_id: string;
729
747
  agent_id: string;
@@ -754,6 +772,14 @@ export interface MachineBrowserProfileLifecycleData {
754
772
  profile_id: string;
755
773
  action: BrowserProfileLifecycleAction;
756
774
  start_url?: string;
775
+ /** Profile's lifecycle_generation after this transition's bump (PR #1650). The
776
+ * daemon acts under it and echoes it in its status report so the server can
777
+ * reject a stale report. Absent/0 from a pre-generation server. */
778
+ generation?: number;
779
+ /** Profile's reset_generation after this transition (bumped only by `reset`). On
780
+ * an online reset the daemon records it in its per-profile sidecar so a later
781
+ * reconnect doesn't redundantly re-wipe. */
782
+ reset_generation?: number;
757
783
  }
758
784
  /**
759
785
  * Live-viewer control command relayed to the host daemon over `machine:{id}`.
@@ -850,6 +876,13 @@ export interface Task {
850
876
  canceled_at: string | null;
851
877
  archived_at?: string | null;
852
878
  deleted_at?: string | null;
879
+ /**
880
+ * Per-viewer: whether the requesting user may manage OTHER members' comment
881
+ * subscriptions for this task (creator / assignee / project lead / org
882
+ * owner-admin). Populated on single-task GET; undefined elsewhere. Read this to
883
+ * gate subscriber-management UI — do not re-derive the rule client-side.
884
+ */
885
+ can_manage_subscribers?: boolean;
853
886
  }
854
887
  export interface TaskWatcher {
855
888
  task_id: string;
@@ -921,6 +954,17 @@ export interface UpdateTaskRequest {
921
954
  parent_id?: string | null;
922
955
  project_id?: string | null;
923
956
  sort_order?: number;
957
+ /**
958
+ * Dispatch lane binding (agent senders during a typed dispatch turn).
959
+ * dispatch_lane + dispatch_event_id bind the update to the claimed typed
960
+ * lane (incumbency-checked); dispatch_effect_key — exactly
961
+ * "task_update:<dispatch_event_id>" — additionally commits the update as
962
+ * the dispatch's idempotent Effect and resolves the WorkItem in the same
963
+ * transaction (first update only).
964
+ */
965
+ dispatch_lane?: string;
966
+ dispatch_event_id?: string;
967
+ dispatch_effect_key?: string;
924
968
  }
925
969
  export interface CreateTaskRelationRequest {
926
970
  target_type: TaskRelationTargetType;
@@ -1239,6 +1283,19 @@ export interface Wiki {
1239
1283
  created_by: string;
1240
1284
  created_at: string;
1241
1285
  updated_at: string;
1286
+ /** Protected default wiki — cannot be deleted. */
1287
+ is_default?: boolean | null;
1288
+ /** Set when the wiki is soft-deleted (recoverable). */
1289
+ deleted_at?: string | null;
1290
+ /** User who soft-deleted the wiki. */
1291
+ deleted_by?: string | null;
1292
+ /** Set once purge is claimed — the wiki can no longer be restored. */
1293
+ purge_started_at?: string | null;
1294
+ /** deleted_at + retention window (server-computed) — the recycle-bin countdown
1295
+ * source. Past this, restore is rejected with 410 WIKI_RETENTION_EXPIRED. */
1296
+ purge_eligible_at?: string | null;
1297
+ /** Server-computed restore availability for recycle-bin rows. */
1298
+ restorable?: boolean | null;
1242
1299
  }
1243
1300
  export interface WikiFileChange {
1244
1301
  path: string;
@@ -1267,10 +1324,18 @@ export interface WikiTreeEntry {
1267
1324
  path: string;
1268
1325
  type: 'tree' | 'blob';
1269
1326
  size?: number;
1327
+ /**
1328
+ * Entry sits inside a read-gated private subtree (path restriction). Advisory
1329
+ * display flag — the caller already passed read authorization to receive the
1330
+ * entry; use it to badge private folders, never for access decisions.
1331
+ */
1332
+ restricted?: boolean;
1270
1333
  }
1271
1334
  export interface WikiTreeResponse {
1272
1335
  data: WikiTreeEntry[];
1273
1336
  path: string;
1337
+ /** Whether the listed directory itself sits inside a read-gated private subtree. */
1338
+ path_restricted?: boolean;
1274
1339
  }
1275
1340
  export interface WikiFileManifestEntry {
1276
1341
  path: string;
@@ -1491,6 +1556,7 @@ export interface CreateWikiPathRestrictionRequest {
1491
1556
  level?: 'read' | 'maintain' | 'admin';
1492
1557
  subjects: string[];
1493
1558
  apply_to_admins?: boolean;
1559
+ create_only?: boolean;
1494
1560
  }
1495
1561
  export interface WikiAccessStatus {
1496
1562
  path: string;
@@ -1518,6 +1584,22 @@ export interface WikiOperationsResponse {
1518
1584
  data: WikiOperation[];
1519
1585
  has_more: boolean;
1520
1586
  }
1587
+ /**
1588
+ * Copy one wiki file to another path as an independent snapshot (no ongoing
1589
+ * sync). Primary use: "share a private file out" — copy from the caller's
1590
+ * personal namespace (`users/{userId}/…`) into the public wiki so the whole
1591
+ * org can read + edit the copy, leaving the private original untouched.
1592
+ */
1593
+ export interface CopyWikiFileRequest {
1594
+ source_path: string;
1595
+ dest_path: string;
1596
+ message?: string;
1597
+ }
1598
+ export interface CopyWikiFileResponse {
1599
+ source_path: string;
1600
+ dest_path: string;
1601
+ commit_sha: string;
1602
+ }
1521
1603
  export interface WikiBlob {
1522
1604
  path: string;
1523
1605
  ref: string;
@@ -1527,6 +1609,8 @@ export interface WikiBlob {
1527
1609
  content?: string;
1528
1610
  line_count?: number;
1529
1611
  sha256?: string;
1612
+ /** File sits inside a read-gated private subtree — advisory display flag. */
1613
+ restricted?: boolean;
1530
1614
  mime?: string;
1531
1615
  is_lfs?: boolean;
1532
1616
  content_sha?: string;
@@ -1636,6 +1720,15 @@ export interface MembershipChangedData {
1636
1720
  user_id: string;
1637
1721
  action: 'added' | 'removed' | 'role_changed';
1638
1722
  }
1723
+ /**
1724
+ * A member was removed from an org — kicked by an admin or self-removal
1725
+ * ("leave org"). Delivered on org:{orgId} (remaining members refresh the
1726
+ * directory) and user:{userId} (the removed user's clients drop the org).
1727
+ */
1728
+ export interface OrgMemberRemovedData {
1729
+ org_id: string;
1730
+ user_id: string;
1731
+ }
1639
1732
  export type TaskActivityAction = 'created' | 'field_changed' | 'commented';
1640
1733
  export interface TaskComment {
1641
1734
  id: string;
@@ -1668,7 +1761,15 @@ export interface UpdateTaskCommentRequest {
1668
1761
  export type TaskCreatedData = Task;
1669
1762
  export type TaskUpdatedData = Task;
1670
1763
  /** Sent to user:{agentID} channel when a task is assigned to an agent. Data is the full Task. */
1671
- export type TaskAssignedData = Task;
1764
+ export type TaskAssignedData = Task & {
1765
+ /**
1766
+ * Exact typed WorkItem this assignment enqueued. The runtime claims and
1767
+ * acks by it — never by the shared (task_activity, task_id) source tuple,
1768
+ * which sibling task_update WorkItems from the same PATCH may also carry.
1769
+ * Absent from older servers (fallback: claim by source).
1770
+ */
1771
+ dispatch_event_id?: string | null;
1772
+ };
1672
1773
  export interface TaskDeletedData {
1673
1774
  task_id: string;
1674
1775
  org_id: string;
@@ -1757,6 +1858,13 @@ export type WikiChangesetCreatedData = WikiChangeset & {
1757
1858
  export type WikiChangesetUpdatedData = WikiChangeset & {
1758
1859
  org_id: string;
1759
1860
  };
1861
+ export interface WikiDeletedData {
1862
+ org_id: string;
1863
+ wiki_id: string;
1864
+ slug: string;
1865
+ name: string;
1866
+ }
1867
+ export type WikiRestoredData = WikiDeletedData;
1760
1868
  export interface Comment {
1761
1869
  id: string;
1762
1870
  org_id: string;
@@ -1811,7 +1919,114 @@ export interface InboxItem {
1811
1919
  created_at: string;
1812
1920
  updated_at: string;
1813
1921
  }
1814
- export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'external_trigger' | 'approval_decided';
1922
+ export type ChannelProvider = 'feishu' | 'slack';
1923
+ export type ChannelConnectionStatus = 'pending' | 'active' | 'disabled';
1924
+ /**
1925
+ * Inbound transport for a connection. Defaults to the provider's lowest-
1926
+ * onboarding-cost mode server-side (Feishu → socket, Slack → webhook) when
1927
+ * omitted on create; can be overridden per connection.
1928
+ */
1929
+ export type ChannelIngressMode = 'webhook' | 'socket';
1930
+ export type ChannelMessageStatus = 'received' | 'dispatched' | 'failed';
1931
+ export interface ChannelConnection {
1932
+ id: string;
1933
+ org_id: string;
1934
+ agent_id: string;
1935
+ provider: ChannelProvider;
1936
+ ingress_mode: ChannelIngressMode;
1937
+ display_name: string;
1938
+ created_by: string;
1939
+ status: ChannelConnectionStatus;
1940
+ external_app_id?: string;
1941
+ external_team_id?: string;
1942
+ archived_at?: string | null;
1943
+ archive_reason?: string | null;
1944
+ /** Returned once at mint time (create / token regeneration). */
1945
+ ingress_url?: string;
1946
+ /** Returned once at mint time (create / token regeneration). */
1947
+ ingress_token?: string;
1948
+ created_at: string;
1949
+ updated_at: string;
1950
+ }
1951
+ export interface ChannelCredentialsInput {
1952
+ app_id: string;
1953
+ app_secret: string;
1954
+ verification_token?: string;
1955
+ encrypt_key?: string;
1956
+ team_id?: string;
1957
+ }
1958
+ export interface CreateChannelConnectionInput {
1959
+ agent_id: string;
1960
+ provider: ChannelProvider;
1961
+ display_name: string;
1962
+ /** Override the provider's default inbound transport (optional). */
1963
+ ingress_mode?: ChannelIngressMode;
1964
+ /** Manual provisioning: activates the connection immediately. */
1965
+ credentials?: ChannelCredentialsInput;
1966
+ }
1967
+ export interface UpdateChannelConnectionInput {
1968
+ display_name?: string;
1969
+ status?: 'active' | 'disabled';
1970
+ }
1971
+ export interface ChannelConversation {
1972
+ id: string;
1973
+ org_id: string;
1974
+ connection_id: string;
1975
+ agent_id: string;
1976
+ agent_session_id?: string | null;
1977
+ external_conversation_id: string;
1978
+ external_thread_id: string;
1979
+ conversation_type: string;
1980
+ external_user_id: string;
1981
+ external_user_name: string;
1982
+ last_inbound_at?: string | null;
1983
+ created_at: string;
1984
+ updated_at: string;
1985
+ }
1986
+ export interface ChannelMessage {
1987
+ id: string;
1988
+ org_id: string;
1989
+ connection_id: string;
1990
+ conversation_id: string;
1991
+ external_message_id: string;
1992
+ text: string;
1993
+ external_user_id: string;
1994
+ external_user_name: string;
1995
+ status: ChannelMessageStatus;
1996
+ received_at: string;
1997
+ created_at: string;
1998
+ }
1999
+ /**
2000
+ * Feishu one-click provisioning session (OAuth device flow). The client
2001
+ * renders `verification_url` as a QR code and lazily polls the status
2002
+ * endpoint every `poll_interval_seconds` — each poll may forward one
2003
+ * provider poll server-side, so respect the interval.
2004
+ */
2005
+ export type ChannelProvisioningStatus = 'pending' | 'polling' | 'done' | 'expired' | 'denied' | 'canceled' | 'failed';
2006
+ export interface ChannelProvisioningSession {
2007
+ id: string;
2008
+ org_id: string;
2009
+ agent_id: string;
2010
+ provider: ChannelProvider;
2011
+ created_by: string;
2012
+ status: ChannelProvisioningStatus;
2013
+ poll_interval_seconds: number;
2014
+ /** Set when status = 'done': the minted connection. */
2015
+ connection_id?: string;
2016
+ /** Terminal detail: access_denied / expired_token / domain_switched / connection_exists / alias_conflict / internal. */
2017
+ error_code?: string;
2018
+ expires_at: string;
2019
+ created_at: string;
2020
+ updated_at: string;
2021
+ /** QR target — present on live (pending/polling) sessions only. */
2022
+ verification_url?: string;
2023
+ user_code?: string;
2024
+ }
2025
+ export interface InitiateChannelProvisioningInput {
2026
+ agent_id: string;
2027
+ provider: ChannelProvider;
2028
+ }
2029
+ export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'external_trigger' | 'approval_decided' | 'channel_message';
1815
2030
  export type DispatchStatus = 'pending' | 'received' | 'acked';
1816
2031
  export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
1817
2032
  export interface DispatchEvent {
@@ -1838,9 +2053,73 @@ export interface DispatchEvent {
1838
2053
  */
1839
2054
  delivery_reason: DispatchDeliveryReason | null;
1840
2055
  status: DispatchStatus;
2056
+ /**
2057
+ * Ledger fields (dispatch idempotency redesign). dedupe_key is the domain
2058
+ * identity of the source fact; lease_owner points at the lane the WorkItem
2059
+ * is folded into; target_uri / thread_root_id are queue-routing metadata
2060
+ * for message WorkItems; resolution_kind / resolved_by_effect record the
2061
+ * terminal outcome. Nullable — historical rows may predate the ledger.
2062
+ */
2063
+ dedupe_key?: string | null;
2064
+ lease_owner?: string | null;
2065
+ target_uri?: string | null;
2066
+ thread_root_id?: string | null;
2067
+ resolution_kind?: 'effect' | 'no_action' | 'cancelled' | 'legacy_ack' | null;
2068
+ resolved_by_effect?: string | null;
2069
+ /**
2070
+ * Reply-message provenance ("prll://msg_x") of the resolving Effect.
2071
+ * Populated only by GET /dispatch/by-messages (Effect join) on
2072
+ * effect-resolved rows; absent elsewhere.
2073
+ */
2074
+ result_uri?: string | null;
1841
2075
  acked_at: string | null;
1842
2076
  created_at: string;
1843
2077
  }
2078
+ /** POST /dispatch/claim — occupy a lane and fold claimable WorkItems into it. */
2079
+ export interface ClaimDispatchRequest {
2080
+ /** Message lane resource (e.g. "prll://cht_x"). Omit for typed claims. */
2081
+ target_uri?: string;
2082
+ thread_root_id?: string;
2083
+ /** Typed WorkItem claim: the lane resource is the WorkItem itself. */
2084
+ dispatch_event_id?: string;
2085
+ /**
2086
+ * Typed claim by source identity, for callers without the WorkItem id
2087
+ * (the live task.assigned event). The dedupe arbiter guarantees at most
2088
+ * one live WorkItem per source.
2089
+ */
2090
+ source_type?: string;
2091
+ source_id?: string;
2092
+ limit?: number;
2093
+ }
2094
+ export interface ClaimDispatchResponse {
2095
+ claimed: boolean;
2096
+ lane?: string;
2097
+ lease_until?: string;
2098
+ events?: DispatchEvent[];
2099
+ }
2100
+ /** POST /dispatch/steer — fold a pending same-target WorkItem into a live lane. */
2101
+ export interface SteerDispatchRequest {
2102
+ lane: string;
2103
+ target_uri: string;
2104
+ thread_root_id?: string;
2105
+ /** Either the WorkItem id or its (source_type, source_id) pair. */
2106
+ dispatch_event_id?: string;
2107
+ source_type?: string;
2108
+ source_id?: string;
2109
+ }
2110
+ export interface SteerDispatchResponse {
2111
+ dispatch_event_id: string;
2112
+ }
2113
+ /** POST /dispatch/complete — end a turn: no_action sweep + lane release + re-drive. */
2114
+ export interface CompleteDispatchRequest {
2115
+ lane: string;
2116
+ target_uri: string;
2117
+ thread_root_id?: string;
2118
+ }
2119
+ export interface CompleteDispatchResult {
2120
+ swept_no_action: number;
2121
+ redriven: boolean;
2122
+ }
1844
2123
  export type DispatchNewData = DispatchEvent;
1845
2124
  export interface DispatchExpiredGroup {
1846
2125
  chat_id: string | null;
@@ -1863,6 +2142,27 @@ export interface DispatchReceivedData {
1863
2142
  task_id?: string | null;
1864
2143
  org_id: string;
1865
2144
  }
2145
+ /**
2146
+ * Terminal counterpart of DispatchReceivedData: published on org:{orgId} when
2147
+ * a message WorkItem reaches a terminal resolution, so the message-level
2148
+ * Activity indicator flips active→done (or clears, for `cancelled`) without
2149
+ * inferring completion from agent session state. Message WorkItems only.
2150
+ */
2151
+ export interface DispatchResolvedData {
2152
+ agent_id: string;
2153
+ event_type: string;
2154
+ source_type: string;
2155
+ source_id: string;
2156
+ chat_id?: string | null;
2157
+ org_id: string;
2158
+ resolution_kind: 'effect' | 'no_action' | 'cancelled' | 'legacy_ack';
2159
+ /**
2160
+ * Reply-message provenance ("prll://msg_x") for effect resolutions —
2161
+ * the indicator's click-through resolves the agent session from this
2162
+ * message. Absent for no_action / legacy_ack.
2163
+ */
2164
+ result_uri?: string | null;
2165
+ }
1866
2166
  export type InboxNewData = InboxItem;
1867
2167
  export interface InboxUpdateData {
1868
2168
  id: string;
@@ -1924,10 +2224,13 @@ export type WsEventMap = {
1924
2224
  'invitation.revoked': InvitationRevokedEventData;
1925
2225
  'org.join_request.new': OrgJoinRequestNewEventData;
1926
2226
  'org.invite_link.joined': OrgInviteLinkJoinedEventData;
2227
+ 'org.member.removed': OrgMemberRemovedData;
1927
2228
  'agent_config.update': AgentConfigUpdateData;
1928
2229
  'presence.update': PresenceUpdateData;
1929
2230
  'wiki.changeset.created': WikiChangesetCreatedData;
1930
2231
  'wiki.changeset.updated': WikiChangesetUpdatedData;
2232
+ 'wiki.deleted': WikiDeletedData;
2233
+ 'wiki.restored': WikiRestoredData;
1931
2234
  'comment.created': CommentCreatedData;
1932
2235
  'comment.updated': CommentUpdatedData;
1933
2236
  'comment.deleted': CommentDeletedData;
@@ -1938,6 +2241,7 @@ export type WsEventMap = {
1938
2241
  'read_position.updated': ReadPositionUpdateData;
1939
2242
  'dispatch.new': DispatchNewData;
1940
2243
  'dispatch.received': DispatchReceivedData;
2244
+ 'dispatch.resolved': DispatchResolvedData;
1941
2245
  'schedule.created': ScheduleCreatedData;
1942
2246
  'schedule.updated': ScheduleUpdatedData;
1943
2247
  'schedule.deleted': ScheduleDeletedData;
@@ -1951,6 +2255,7 @@ export type WsEventMap = {
1951
2255
  'machine.agent.attached': MachineAgentAttachedData;
1952
2256
  'machine.agent.detached': MachineAgentDetachedData;
1953
2257
  'machine.config.updated': MachineConfigUpdatedData;
2258
+ 'machine.agent_config.updated': MachineAgentConfigUpdatedData;
1954
2259
  'machine.workspace.setup.requested': MachineWorkspaceSetupRequestedData;
1955
2260
  'machine.stop': MachineStopData;
1956
2261
  'machine.filesystem.browse': MachineFilesystemBrowseData;
@@ -2008,7 +2313,14 @@ export interface PlatformConfigResponse {
2008
2313
  version: string;
2009
2314
  schema_version: number;
2010
2315
  min_plugin_version?: string;
2316
+ /** @deprecated V1-compat only — old bridges read this for override-vs-floor. New bridges read `model_is_pin`. */
2011
2317
  mode?: string;
2318
+ /**
2319
+ * Whether the delivered model is an operator PIN (override, beats the runtime's
2320
+ * env/default) vs a catalog FLOOR (loses to env). Optional: an old server omits
2321
+ * it and the bridge falls back to the legacy `model_management`-derived signal.
2322
+ */
2323
+ model_is_pin?: boolean;
2012
2324
  config: Record<string, unknown>;
2013
2325
  }
2014
2326
  export interface AgentConfigUpdateData {
@@ -2267,6 +2579,58 @@ export interface ComputePricing {
2267
2579
  created_at: string;
2268
2580
  }
2269
2581
  export type ComputePricingResponse = Record<string, ComputePricing>;
2582
+ /**
2583
+ * Per-runtime capability row from GET /api/v1/runtimes (public, no auth).
2584
+ * Server SSOT: server/pkg/hosting/capabilities.go RuntimeCapability — the
2585
+ * data source for the create/settings interlock (which compute × intelligence
2586
+ * × model combinations are offerable per runtime).
2587
+ */
2588
+ export interface RuntimeCapability {
2589
+ runtime: string;
2590
+ /** Where the runtime can run: "hosted" and/or "local". Hermes is cloud-only. */
2591
+ compute_modes: string[];
2592
+ /**
2593
+ * Provider family the runtime's OWN credentials can serve ("anthropic" /
2594
+ * "openai"), or "any" for family-agnostic runtimes. Own-route restriction
2595
+ * only — see cross_family_via_parall.
2596
+ */
2597
+ native_model_family: string;
2598
+ /** On the Parall proxy route any catalog model is allowed regardless of family. */
2599
+ cross_family_via_parall: boolean;
2600
+ /** Whether a pinned model is delivered when the agent runs on its own credentials. */
2601
+ own_route_model_pin: boolean;
2602
+ /** Catalog default the UI pre-selects for this runtime. */
2603
+ recommended_model: string;
2604
+ }
2605
+ /**
2606
+ * Catalog entry from GET /api/v1/models (public, no auth) — the DB-backed
2607
+ * platform model catalog. Server SSOT: handler.PlatformModelDTO
2608
+ * (docs/engineering-design/model-catalog-design.md §6.1). Replaces the
2609
+ * compile-time PLATFORM_MODELS constant as the picker data source.
2610
+ */
2611
+ export interface PlatformModelInfo {
2612
+ id: string;
2613
+ name: string;
2614
+ /** Provider family ("anthropic", "openai", "google", ...). */
2615
+ family: string;
2616
+ contextWindow: number;
2617
+ maxTokens: number;
2618
+ effortLevels?: string[];
2619
+ /** Runtime type → runtime-native CLI model name. */
2620
+ runtime_names?: Record<string, string>;
2621
+ /** Set on client-behavior variants (the "(1M)" entries) — see isPlatformModelSelectableForRuntime. */
2622
+ upstream_id?: string;
2623
+ /** Display hints: "recommended" / "new" / "beta". */
2624
+ tags?: string[];
2625
+ sort_order: number;
2626
+ /** True only for a legacy entry appended via include_model (not in the active catalog). */
2627
+ hidden?: boolean;
2628
+ }
2629
+ export interface PlatformModelsResponse {
2630
+ data: PlatformModelInfo[];
2631
+ /** Catalog content hash — changes whenever the catalog changes. */
2632
+ version: string;
2633
+ }
2270
2634
  export interface MachinePreset {
2271
2635
  key: string;
2272
2636
  cpu_cores: number;
@@ -2321,7 +2685,8 @@ export interface BillingMachineStoppedEvent {
2321
2685
  export interface BillingInsufficientEvent {
2322
2686
  org_id: string;
2323
2687
  }
2324
- export type ClipSourceType = 'registry' | 'custom' | 'builtin';
2688
+ export type ClipSourceType = 'registry' | 'custom' | 'builtin' | 'channel';
2689
+ export type UserClipSourceType = 'registry' | 'custom' | 'builtin';
2325
2690
  export type ClipStatus = 'active' | 'disabled';
2326
2691
  export interface Clip {
2327
2692
  id: string;
@@ -2353,7 +2718,7 @@ export interface CreateClipRequest {
2353
2718
  display_name?: string;
2354
2719
  description?: string;
2355
2720
  manifest?: Record<string, unknown>;
2356
- source_type?: ClipSourceType;
2721
+ source_type?: UserClipSourceType;
2357
2722
  source_ref?: string;
2358
2723
  version?: string;
2359
2724
  machine_id: string;
@@ -2416,6 +2781,14 @@ export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error' |
2416
2781
  * required), `hosted` runs on the platform pool (machine_id null).
2417
2782
  */
2418
2783
  export type BrowserPlacement = 'byoc' | 'hosted';
2784
+ /** Deployment-wide hosted browser runtime availability (the controller startup
2785
+ * gate). Drives whether the create UI offers the platform-hosted placement; it
2786
+ * is org-scoped only for auth — the value itself is the same for every org.
2787
+ * Fail-closed: the server reports `available: false` if it cannot verify. */
2788
+ export interface BrowserRuntimeStatus {
2789
+ available: boolean;
2790
+ reason?: string;
2791
+ }
2419
2792
  export interface BrowserProfile {
2420
2793
  id: string;
2421
2794
  org_id: string;
@@ -2488,6 +2861,12 @@ export interface MachineBrowserProfile {
2488
2861
  proxy_server?: string | null;
2489
2862
  proxy_username?: string | null;
2490
2863
  proxy_password?: string | null;
2864
+ /** Per-profile fencing tokens (PR #1650): lifecycle_generation bumps on every
2865
+ * open/stop/reset (daemon reports under it; stale reports rejected);
2866
+ * reset_generation bumps only on reset (daemon wipes local state on reconnect
2867
+ * when this is newer than what it last applied). Default 0. */
2868
+ lifecycle_generation: number;
2869
+ reset_generation: number;
2491
2870
  }
2492
2871
  export interface BrowserProfileConsent {
2493
2872
  id: string;
@@ -2616,10 +2995,18 @@ export type SearchParams = {
2616
2995
  types?: string;
2617
2996
  chat_id?: string;
2618
2997
  limit?: number;
2998
+ /** Page offset into the per-type candidate pool (default 0). Reachability is capped — past the pool, results are empty with `has_more` false. */
2999
+ offset?: number;
2619
3000
  /** Wiki document-type facet (frontmatter `type`) — a separate axis from `types`. */
2620
3001
  wiki_type?: string;
2621
- /** RFC3339 or YYYY-MM-DD; narrows messages (created_at) and tasks (updated_at). Not applied to wiki. */
3002
+ /** RFC3339 or YYYY-MM-DD lower bound; narrows messages (created_at) and tasks (updated_at). Not applied to wiki. */
2622
3003
  since?: string;
3004
+ /** Sender filter (Slack `from:`) — user id. Messages only; tasks/wiki carry no sender. */
3005
+ from?: string;
3006
+ /** Result order: `relevance` (default, RRF hybrid) or `recent` (newest-first). Recent applies to messages/tasks; wiki stays relevance (no authored timestamp). */
3007
+ order?: 'relevance' | 'recent';
3008
+ /** Collapse cross-chat message results to one hit per chat (default true). Pass false on the full results page to page every match. No effect when `chat_id` is set. */
3009
+ collapse_by_chat?: boolean;
2623
3010
  };
2624
3011
  export interface SearchMessageResult {
2625
3012
  message_id: string;
@@ -2660,6 +3047,12 @@ export interface SearchResponse {
2660
3047
  messages: SearchMessageResult[];
2661
3048
  tasks: SearchTaskResult[];
2662
3049
  wiki: SearchWikiResult[];
3050
+ /** Per-type flag: more results remain past the returned page (within the reachable pool). Lets a tabbed results UI page each type independently. Optional for resilience to older payloads; clients default to all-false. */
3051
+ has_more?: {
3052
+ messages: boolean;
3053
+ tasks: boolean;
3054
+ wiki: boolean;
3055
+ };
2663
3056
  }
2664
3057
  export {};
2665
3058
  //# sourceMappingURL=types.d.ts.map