@parall/sdk 1.34.0 → 1.36.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/client.d.ts +97 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +177 -8
- package/dist/constants.d.ts +19 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -0
- package/dist/types.d.ts +343 -21
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +338 -12
- package/src/constants.ts +41 -0
- package/src/types.ts +398 -20
package/dist/types.d.ts
CHANGED
|
@@ -202,6 +202,15 @@ export interface Message {
|
|
|
202
202
|
content: MessageContent;
|
|
203
203
|
version: number;
|
|
204
204
|
reply_count: number;
|
|
205
|
+
/** Timestamp of the most recent reply in this message's thread (root only). */
|
|
206
|
+
last_reply_at?: string | null;
|
|
207
|
+
/**
|
|
208
|
+
* Most-recent distinct reply authors, newest-first (root only, capped at 3).
|
|
209
|
+
* Approximate: derived from the newest ~30 replies per root, so on very long
|
|
210
|
+
* threads dominated by a few recent senders, older distinct authors may be
|
|
211
|
+
* absent from the stack. A reload re-derives it from the server's view.
|
|
212
|
+
*/
|
|
213
|
+
recent_repliers?: User[];
|
|
205
214
|
edited_at: string | null;
|
|
206
215
|
deleted_at: string | null;
|
|
207
216
|
created_at: string;
|
|
@@ -290,6 +299,15 @@ export interface OrgMember {
|
|
|
290
299
|
joined_at: string;
|
|
291
300
|
user?: User;
|
|
292
301
|
}
|
|
302
|
+
export interface Team {
|
|
303
|
+
id: string;
|
|
304
|
+
org_id: string;
|
|
305
|
+
name: string;
|
|
306
|
+
slug: string;
|
|
307
|
+
created_by: string;
|
|
308
|
+
created_at: string;
|
|
309
|
+
updated_at: string;
|
|
310
|
+
}
|
|
293
311
|
export type InvitationStatus = 'pending' | 'accepted' | 'declined' | 'revoked';
|
|
294
312
|
export interface OrgInvitation {
|
|
295
313
|
id: string;
|
|
@@ -357,9 +375,7 @@ export interface CreateInvitationRequest {
|
|
|
357
375
|
}
|
|
358
376
|
export interface ApiKey {
|
|
359
377
|
id: string;
|
|
360
|
-
|
|
361
|
-
agent_id: string;
|
|
362
|
-
created_at: string;
|
|
378
|
+
api_key: string;
|
|
363
379
|
}
|
|
364
380
|
export interface CreateAgentResponse {
|
|
365
381
|
user: User;
|
|
@@ -576,6 +592,7 @@ export interface UpdateAgentRequest {
|
|
|
576
592
|
thinking_effort?: string;
|
|
577
593
|
}
|
|
578
594
|
export type MachineStatus = 'provisioning' | 'starting' | 'restarting' | 'running' | 'stopped' | 'error' | 'terminated';
|
|
595
|
+
export type MachineCapability = 'agent_host' | 'browser_provider';
|
|
579
596
|
export interface Machine {
|
|
580
597
|
id: string;
|
|
581
598
|
org_id: string;
|
|
@@ -589,6 +606,7 @@ export interface Machine {
|
|
|
589
606
|
daemon_mode: boolean;
|
|
590
607
|
llm_source?: string;
|
|
591
608
|
compute_mode: 'hosted' | 'local';
|
|
609
|
+
capabilities?: MachineCapability[];
|
|
592
610
|
provider_enabled?: boolean;
|
|
593
611
|
clip_provider_url?: string;
|
|
594
612
|
daemon_version?: string | null;
|
|
@@ -737,6 +755,24 @@ export interface MachineBrowserProfileLifecycleData {
|
|
|
737
755
|
action: BrowserProfileLifecycleAction;
|
|
738
756
|
start_url?: string;
|
|
739
757
|
}
|
|
758
|
+
/**
|
|
759
|
+
* Live-viewer control command relayed to the host daemon over `machine:{id}`.
|
|
760
|
+
* One command per WebRTC signaling / tab-nav step; the daemon replies via
|
|
761
|
+
* `POST /machines/me/browser-profiles/viewer-response/{request_id}`.
|
|
762
|
+
*/
|
|
763
|
+
export interface MachineBrowserProfileViewerData {
|
|
764
|
+
request_id: string;
|
|
765
|
+
profile_id: string;
|
|
766
|
+
session_id: string;
|
|
767
|
+
command: string;
|
|
768
|
+
input?: Record<string, unknown>;
|
|
769
|
+
/** Short-lived managed TURN/ICE credentials, minted server-side per stream.start. */
|
|
770
|
+
turn?: {
|
|
771
|
+
url: string;
|
|
772
|
+
username?: string;
|
|
773
|
+
credential?: string;
|
|
774
|
+
};
|
|
775
|
+
}
|
|
740
776
|
export interface AgentNewSessionData {
|
|
741
777
|
previous_session_id?: string;
|
|
742
778
|
}
|
|
@@ -1023,6 +1059,162 @@ export interface ScheduleRunFilters {
|
|
|
1023
1059
|
cursor?: string;
|
|
1024
1060
|
limit?: number;
|
|
1025
1061
|
}
|
|
1062
|
+
export type ExternalConnectionStatus = 'active' | 'disabled';
|
|
1063
|
+
export type ExternalIngressEventStatus = 'received' | 'processed' | 'failed';
|
|
1064
|
+
export type ExternalTriggerStatus = 'active' | 'paused';
|
|
1065
|
+
export type ExternalTriggerEffectiveStatus = 'active' | 'inactive';
|
|
1066
|
+
export type ExternalTriggerInactiveReason = 'connection_disabled' | 'connection_archived' | 'trigger_paused' | 'trigger_archived' | 'expired' | 'max_runs_reached';
|
|
1067
|
+
export type ExternalTriggerRunStatus = 'delivered' | 'failed';
|
|
1068
|
+
export interface ExternalConnection {
|
|
1069
|
+
id: string;
|
|
1070
|
+
org_id: string;
|
|
1071
|
+
source_type: string;
|
|
1072
|
+
display_name: string;
|
|
1073
|
+
owner_id: string;
|
|
1074
|
+
status: ExternalConnectionStatus;
|
|
1075
|
+
auth_config: Record<string, unknown>;
|
|
1076
|
+
archived_at: string | null;
|
|
1077
|
+
archive_reason: string | null;
|
|
1078
|
+
ingress_url?: string;
|
|
1079
|
+
ingress_token?: string;
|
|
1080
|
+
created_at: string;
|
|
1081
|
+
updated_at: string;
|
|
1082
|
+
}
|
|
1083
|
+
export interface CreateExternalConnectionInput {
|
|
1084
|
+
source_type?: string;
|
|
1085
|
+
display_name: string;
|
|
1086
|
+
}
|
|
1087
|
+
export interface UpdateExternalConnectionInput {
|
|
1088
|
+
display_name?: string;
|
|
1089
|
+
status?: ExternalConnectionStatus;
|
|
1090
|
+
}
|
|
1091
|
+
export interface ExternalIngressEvent {
|
|
1092
|
+
id: string;
|
|
1093
|
+
org_id: string;
|
|
1094
|
+
connection_id: string;
|
|
1095
|
+
status: ExternalIngressEventStatus;
|
|
1096
|
+
dedupe_key: string | null;
|
|
1097
|
+
event_type: string;
|
|
1098
|
+
request_snapshot: Record<string, unknown>;
|
|
1099
|
+
body_snapshot: Record<string, unknown>;
|
|
1100
|
+
envelope_snapshot: Record<string, unknown>;
|
|
1101
|
+
raw_body_sha256: string;
|
|
1102
|
+
body_size: number;
|
|
1103
|
+
error_code: string | null;
|
|
1104
|
+
error_message: string | null;
|
|
1105
|
+
received_at: string;
|
|
1106
|
+
processed_at: string | null;
|
|
1107
|
+
}
|
|
1108
|
+
export interface ExternalTrigger {
|
|
1109
|
+
id: string;
|
|
1110
|
+
org_id: string;
|
|
1111
|
+
connection_id: string;
|
|
1112
|
+
creator_id: string;
|
|
1113
|
+
name: string;
|
|
1114
|
+
description: string;
|
|
1115
|
+
status: ExternalTriggerStatus;
|
|
1116
|
+
effective_status: ExternalTriggerEffectiveStatus;
|
|
1117
|
+
inactive_reason?: ExternalTriggerInactiveReason;
|
|
1118
|
+
archived_at: string | null;
|
|
1119
|
+
archive_reason: string | null;
|
|
1120
|
+
attached_to_uri: string | null;
|
|
1121
|
+
filter_language: 'cel';
|
|
1122
|
+
filter_profile: 'parall_cel_v1';
|
|
1123
|
+
filter_expr: string;
|
|
1124
|
+
filter_display_metadata: Record<string, unknown>;
|
|
1125
|
+
template_language: 'liquid';
|
|
1126
|
+
template_profile: 'parall_safe_v1';
|
|
1127
|
+
agent_input_template: string;
|
|
1128
|
+
max_runs: number | null;
|
|
1129
|
+
run_count: number;
|
|
1130
|
+
expires_at: string | null;
|
|
1131
|
+
client_context: Record<string, unknown>;
|
|
1132
|
+
target_agent_ids: string[];
|
|
1133
|
+
created_at: string;
|
|
1134
|
+
updated_at: string;
|
|
1135
|
+
}
|
|
1136
|
+
export interface CreateExternalTriggerInput {
|
|
1137
|
+
connection_id: string;
|
|
1138
|
+
name: string;
|
|
1139
|
+
description?: string;
|
|
1140
|
+
target_agent_ids: string[];
|
|
1141
|
+
attached_to_uri?: string;
|
|
1142
|
+
filter_expr: string;
|
|
1143
|
+
filter_display_metadata?: Record<string, unknown>;
|
|
1144
|
+
agent_input_template: string;
|
|
1145
|
+
max_runs?: number;
|
|
1146
|
+
expires_at?: string;
|
|
1147
|
+
client_context?: Record<string, unknown>;
|
|
1148
|
+
}
|
|
1149
|
+
export interface UpdateExternalTriggerInput {
|
|
1150
|
+
name?: string;
|
|
1151
|
+
description?: string;
|
|
1152
|
+
status?: ExternalTriggerStatus;
|
|
1153
|
+
target_agent_ids?: string[];
|
|
1154
|
+
attached_to_uri?: string;
|
|
1155
|
+
attached_to_uri_clear?: boolean;
|
|
1156
|
+
filter_expr?: string;
|
|
1157
|
+
filter_display_metadata?: Record<string, unknown>;
|
|
1158
|
+
agent_input_template?: string;
|
|
1159
|
+
max_runs?: number;
|
|
1160
|
+
max_runs_clear?: boolean;
|
|
1161
|
+
expires_at?: string;
|
|
1162
|
+
expires_at_clear?: boolean;
|
|
1163
|
+
client_context?: Record<string, unknown>;
|
|
1164
|
+
}
|
|
1165
|
+
export interface ExternalTriggerRun {
|
|
1166
|
+
id: string;
|
|
1167
|
+
org_id: string;
|
|
1168
|
+
connection_id: string;
|
|
1169
|
+
ingress_event_id: string;
|
|
1170
|
+
trigger_id: string;
|
|
1171
|
+
status: ExternalTriggerRunStatus;
|
|
1172
|
+
failure_stage: string | null;
|
|
1173
|
+
error_code: string | null;
|
|
1174
|
+
error_message: string | null;
|
|
1175
|
+
agent_input_body: string | null;
|
|
1176
|
+
trigger_snapshot: Record<string, unknown>;
|
|
1177
|
+
configured_target_agent_ids: string[];
|
|
1178
|
+
eligible_target_agent_ids: string[];
|
|
1179
|
+
skipped_target_agent_ids: string[];
|
|
1180
|
+
dispatch_event_ids: string[];
|
|
1181
|
+
trigger_name?: string;
|
|
1182
|
+
connection_source_type?: string;
|
|
1183
|
+
connection_display_name?: string;
|
|
1184
|
+
ingress_event_type?: string;
|
|
1185
|
+
created_at: string;
|
|
1186
|
+
delivered_at: string | null;
|
|
1187
|
+
}
|
|
1188
|
+
export interface ExternalConnectionFilters {
|
|
1189
|
+
cursor?: string;
|
|
1190
|
+
limit?: number;
|
|
1191
|
+
}
|
|
1192
|
+
export interface ExternalTriggerFilters {
|
|
1193
|
+
connection_id?: string;
|
|
1194
|
+
creator_id?: string;
|
|
1195
|
+
cursor?: string;
|
|
1196
|
+
limit?: number;
|
|
1197
|
+
}
|
|
1198
|
+
export interface ExternalIngressEventFilters {
|
|
1199
|
+
connection_id?: string;
|
|
1200
|
+
cursor?: string;
|
|
1201
|
+
limit?: number;
|
|
1202
|
+
}
|
|
1203
|
+
export interface ExternalTriggerRunFilters {
|
|
1204
|
+
trigger_id?: string;
|
|
1205
|
+
cursor?: string;
|
|
1206
|
+
limit?: number;
|
|
1207
|
+
}
|
|
1208
|
+
export interface ExternalTriggerSchema {
|
|
1209
|
+
filter_language: 'cel';
|
|
1210
|
+
filter_profile: 'parall_cel_v1';
|
|
1211
|
+
template_language: 'liquid';
|
|
1212
|
+
template_profile: 'parall_safe_v1';
|
|
1213
|
+
filter_variables: string[];
|
|
1214
|
+
template_variables: string[];
|
|
1215
|
+
template_filters: string[];
|
|
1216
|
+
examples: Record<string, string>;
|
|
1217
|
+
}
|
|
1026
1218
|
export type ScheduleCreatedData = Schedule;
|
|
1027
1219
|
export type ScheduleUpdatedData = Schedule;
|
|
1028
1220
|
export interface ScheduleDeletedData {
|
|
@@ -1100,6 +1292,10 @@ export interface WikiNodeSection {
|
|
|
1100
1292
|
start_line: number;
|
|
1101
1293
|
end_line: number;
|
|
1102
1294
|
content: string;
|
|
1295
|
+
/** Frontmatter metadata (OKF-inspired, file-level, all optional). */
|
|
1296
|
+
type?: string;
|
|
1297
|
+
description?: string;
|
|
1298
|
+
tags?: string[];
|
|
1103
1299
|
}
|
|
1104
1300
|
export interface WikiNodeSectionArtifact {
|
|
1105
1301
|
version: number;
|
|
@@ -1213,15 +1409,23 @@ export interface CreateWikiRequest {
|
|
|
1213
1409
|
name: string;
|
|
1214
1410
|
default_branch?: string;
|
|
1215
1411
|
}
|
|
1412
|
+
export interface WikiFileChangeInput {
|
|
1413
|
+
path: string;
|
|
1414
|
+
action: 'create' | 'update' | 'delete';
|
|
1415
|
+
content_base64?: string;
|
|
1416
|
+
base_version?: number;
|
|
1417
|
+
/**
|
|
1418
|
+
* Git blob SHA of the default-branch version this change was authored
|
|
1419
|
+
* against. When set on update/delete, the server rejects the changeset
|
|
1420
|
+
* with 409 STALE_BASE if the file has since changed on the default branch
|
|
1421
|
+
* (prevents silently overwriting concurrent edits).
|
|
1422
|
+
*/
|
|
1423
|
+
base_sha?: string;
|
|
1424
|
+
}
|
|
1216
1425
|
export interface CreateWikiChangesetRequest {
|
|
1217
1426
|
title: string;
|
|
1218
1427
|
message?: string;
|
|
1219
|
-
file_changes:
|
|
1220
|
-
path: string;
|
|
1221
|
-
action: 'create' | 'update' | 'delete';
|
|
1222
|
-
content_base64?: string;
|
|
1223
|
-
base_version?: number;
|
|
1224
|
-
}>;
|
|
1428
|
+
file_changes: WikiFileChangeInput[];
|
|
1225
1429
|
source_chat_id?: string;
|
|
1226
1430
|
source_message_id?: string;
|
|
1227
1431
|
source_run_id?: string;
|
|
@@ -1229,12 +1433,15 @@ export interface CreateWikiChangesetRequest {
|
|
|
1229
1433
|
export interface UpdateWikiChangesetRequest {
|
|
1230
1434
|
title?: string;
|
|
1231
1435
|
message?: string;
|
|
1232
|
-
file_changes?:
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1436
|
+
file_changes?: WikiFileChangeInput[];
|
|
1437
|
+
/**
|
|
1438
|
+
* When true, file_changes define the changeset's FULL content: the server
|
|
1439
|
+
* resets the feature branch to the current default-branch HEAD before
|
|
1440
|
+
* applying, so previously-proposed changes that are not re-sent are
|
|
1441
|
+
* dropped. Used by CLI re-propose (`changeset create --update`). Default
|
|
1442
|
+
* false preserves incremental merge semantics (binary-upload flow).
|
|
1443
|
+
*/
|
|
1444
|
+
replace_files?: boolean;
|
|
1238
1445
|
}
|
|
1239
1446
|
export interface WikiCommit {
|
|
1240
1447
|
sha: string;
|
|
@@ -1269,11 +1476,29 @@ export interface CreateWikiPathScopeRequest {
|
|
|
1269
1476
|
maintainers?: unknown;
|
|
1270
1477
|
admins?: unknown;
|
|
1271
1478
|
}
|
|
1479
|
+
export interface WikiPathRestriction {
|
|
1480
|
+
id: string;
|
|
1481
|
+
wiki_id: string;
|
|
1482
|
+
path: string;
|
|
1483
|
+
level: 'read' | 'maintain' | 'admin';
|
|
1484
|
+
subjects: string[];
|
|
1485
|
+
apply_to_admins: boolean;
|
|
1486
|
+
created_by: string;
|
|
1487
|
+
created_at: string;
|
|
1488
|
+
}
|
|
1489
|
+
export interface CreateWikiPathRestrictionRequest {
|
|
1490
|
+
path: string;
|
|
1491
|
+
level?: 'read' | 'maintain' | 'admin';
|
|
1492
|
+
subjects: string[];
|
|
1493
|
+
apply_to_admins?: boolean;
|
|
1494
|
+
}
|
|
1272
1495
|
export interface WikiAccessStatus {
|
|
1273
1496
|
path: string;
|
|
1274
1497
|
read: boolean;
|
|
1275
1498
|
maintain: boolean;
|
|
1276
1499
|
admin: boolean;
|
|
1500
|
+
acl_manage: boolean;
|
|
1501
|
+
acl_manage_any: boolean;
|
|
1277
1502
|
}
|
|
1278
1503
|
export interface CreateWikiAccessRequest {
|
|
1279
1504
|
path: string;
|
|
@@ -1586,7 +1811,7 @@ export interface InboxItem {
|
|
|
1586
1811
|
created_at: string;
|
|
1587
1812
|
updated_at: string;
|
|
1588
1813
|
}
|
|
1589
|
-
export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'approval_decided';
|
|
1814
|
+
export type DispatchEventType = 'message' | 'task_assign' | 'task_update' | 'task_comment' | 'wiki_comment' | 'schedule.fire' | 'external_trigger' | 'approval_decided';
|
|
1590
1815
|
export type DispatchStatus = 'pending' | 'received' | 'acked';
|
|
1591
1816
|
export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
|
|
1592
1817
|
export interface DispatchEvent {
|
|
@@ -1732,6 +1957,7 @@ export type WsEventMap = {
|
|
|
1732
1957
|
'machine.update': MachineUpdateData;
|
|
1733
1958
|
'machine.clip.sync': MachineClipSyncData;
|
|
1734
1959
|
'machine.browser_profile.lifecycle': MachineBrowserProfileLifecycleData;
|
|
1960
|
+
'machine.browser_profile.viewer': MachineBrowserProfileViewerData;
|
|
1735
1961
|
'clip.created': ClipCreatedData;
|
|
1736
1962
|
'clip.removed': ClipRemovedData;
|
|
1737
1963
|
'clip.updated': ClipUpdatedData;
|
|
@@ -1831,6 +2057,8 @@ export interface ResolvedRef {
|
|
|
1831
2057
|
range_truncated?: boolean;
|
|
1832
2058
|
file_name?: string;
|
|
1833
2059
|
wiki_name?: string;
|
|
2060
|
+
/** Frontmatter description of the referenced wiki page (OKF), when present. */
|
|
2061
|
+
wiki_description?: string;
|
|
1834
2062
|
fragment_exists?: boolean;
|
|
1835
2063
|
anchor_kind?: string;
|
|
1836
2064
|
anchor_exists?: boolean;
|
|
@@ -2103,6 +2331,8 @@ export interface CreateClipRequest {
|
|
|
2103
2331
|
browser_profile_id?: string;
|
|
2104
2332
|
}
|
|
2105
2333
|
export interface UpdateClipRequest {
|
|
2334
|
+
/** Rename the clip's org-local alias; uniqueness enforced per org. */
|
|
2335
|
+
alias?: string;
|
|
2106
2336
|
name?: string;
|
|
2107
2337
|
display_name?: string;
|
|
2108
2338
|
description?: string;
|
|
@@ -2113,6 +2343,17 @@ export interface UpdateClipRequest {
|
|
|
2113
2343
|
/** Empty string clears the binding; omitted leaves it unchanged. */
|
|
2114
2344
|
browser_profile_id?: string;
|
|
2115
2345
|
}
|
|
2346
|
+
/**
|
|
2347
|
+
* Atomically set application-level metadata (`display_name` and/or
|
|
2348
|
+
* `description`) on every clip instance of an application. All-or-nothing on the
|
|
2349
|
+
* server (one transaction). At least one field must be present; omitted leaves
|
|
2350
|
+
* it unchanged, an empty `description` clears it.
|
|
2351
|
+
*/
|
|
2352
|
+
export interface BulkUpdateClipMetadataRequest {
|
|
2353
|
+
clip_ids: string[];
|
|
2354
|
+
display_name?: string;
|
|
2355
|
+
description?: string;
|
|
2356
|
+
}
|
|
2116
2357
|
export interface BindAgentClipRequest {
|
|
2117
2358
|
clip_id: string;
|
|
2118
2359
|
config?: Record<string, unknown>;
|
|
@@ -2133,12 +2374,26 @@ export interface InvokeClipResponse {
|
|
|
2133
2374
|
output: unknown;
|
|
2134
2375
|
error: string | null;
|
|
2135
2376
|
}
|
|
2136
|
-
|
|
2377
|
+
/**
|
|
2378
|
+
* profile.status is owner INTENT only, never runtime readiness:
|
|
2379
|
+
* - BYOC: pending | running | stopped | error
|
|
2380
|
+
* - hosted: idle | stopped | error (idle = enabled, activates lazily on invoke/viewer)
|
|
2381
|
+
* Whether a hosted pod is registered + routable is the lease/controller/provider's
|
|
2382
|
+
* runtime state, NOT profile status — hosted profiles are never `active`.
|
|
2383
|
+
*/
|
|
2384
|
+
export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error' | 'idle';
|
|
2385
|
+
/**
|
|
2386
|
+
* Routing/identity discriminant: `byoc` runs on a user machine (machine_id
|
|
2387
|
+
* required), `hosted` runs on the platform pool (machine_id null).
|
|
2388
|
+
*/
|
|
2389
|
+
export type BrowserPlacement = 'byoc' | 'hosted';
|
|
2137
2390
|
export interface BrowserProfile {
|
|
2138
2391
|
id: string;
|
|
2139
2392
|
org_id: string;
|
|
2140
|
-
/**
|
|
2141
|
-
|
|
2393
|
+
/** byoc = user machine, hosted = platform pool. */
|
|
2394
|
+
placement: BrowserPlacement;
|
|
2395
|
+
/** Host machine for byoc profiles; null for hosted (the platform pool owns the pod). */
|
|
2396
|
+
machine_id: string | null;
|
|
2142
2397
|
owner_user_id: string;
|
|
2143
2398
|
display_name: string;
|
|
2144
2399
|
status: BrowserProfileStatus;
|
|
@@ -2147,6 +2402,33 @@ export interface BrowserProfile {
|
|
|
2147
2402
|
created_by?: string | null;
|
|
2148
2403
|
created_at: string;
|
|
2149
2404
|
updated_at: string;
|
|
2405
|
+
/** Control hint on the single-profile responses (create / get / lifecycle) —
|
|
2406
|
+
* always true, since reaching those endpoints means the caller passed the read
|
|
2407
|
+
* or control gate and owner/admin can always control. The org-wide list uses
|
|
2408
|
+
* {@link BrowserProfileListItem.can_open} (per-viewer) instead. */
|
|
2409
|
+
can_open?: boolean;
|
|
2410
|
+
}
|
|
2411
|
+
/** Sanitized row from `GET /orgs/{orgId}/browser-profiles` (org-wide discovery).
|
|
2412
|
+
* Carries only the fields the Browser Profiles tab needs to render + gate
|
|
2413
|
+
* actions — the full domain model (provenance, timestamps) is never returned
|
|
2414
|
+
* org-wide. `error_msg` / `last_seen` are present only for readers (the profile
|
|
2415
|
+
* owner or an org admin), not merely for own-local host owners who can `can_open`. */
|
|
2416
|
+
export interface BrowserProfileListItem {
|
|
2417
|
+
id: string;
|
|
2418
|
+
org_id: string;
|
|
2419
|
+
/** byoc = user machine, hosted = platform pool. */
|
|
2420
|
+
placement: BrowserPlacement;
|
|
2421
|
+
/** Host machine for byoc; null for hosted (the platform pool owns the pod). */
|
|
2422
|
+
machine_id: string | null;
|
|
2423
|
+
owner_user_id: string;
|
|
2424
|
+
display_name: string;
|
|
2425
|
+
status: BrowserProfileStatus;
|
|
2426
|
+
/** Per-viewer control hint computed by the server (owner / org admin / own
|
|
2427
|
+
* local host machine). Optional only for forward-compat with an older
|
|
2428
|
+
* clip-service mid web-first rollout; the current server always sets it. */
|
|
2429
|
+
can_open?: boolean;
|
|
2430
|
+
error_msg?: string | null;
|
|
2431
|
+
last_seen?: string | null;
|
|
2150
2432
|
}
|
|
2151
2433
|
export interface BrowserProfileConsent {
|
|
2152
2434
|
id: string;
|
|
@@ -2159,8 +2441,10 @@ export interface BrowserProfileConsent {
|
|
|
2159
2441
|
revoked_at?: string | null;
|
|
2160
2442
|
}
|
|
2161
2443
|
export interface CreateBrowserProfileRequest {
|
|
2162
|
-
/**
|
|
2163
|
-
|
|
2444
|
+
/** Defaults to `byoc` when omitted (backward compatible). */
|
|
2445
|
+
placement?: BrowserPlacement;
|
|
2446
|
+
/** Required for byoc; omitted for hosted (the platform pool assigns a pod). */
|
|
2447
|
+
machine_id?: string | null;
|
|
2164
2448
|
owner_user_id: string;
|
|
2165
2449
|
display_name: string;
|
|
2166
2450
|
}
|
|
@@ -2170,6 +2454,40 @@ export interface UpdateBrowserProfileRequest {
|
|
|
2170
2454
|
export interface BrowserProfileLifecycleRequest {
|
|
2171
2455
|
start_url?: string;
|
|
2172
2456
|
}
|
|
2457
|
+
/** A WebRTC ICE server (STUN/TURN) for the live-viewer peer connection. */
|
|
2458
|
+
export interface BrowserViewerIceServer {
|
|
2459
|
+
urls: string[];
|
|
2460
|
+
username?: string;
|
|
2461
|
+
credential?: string;
|
|
2462
|
+
}
|
|
2463
|
+
/** A serialized ICE candidate exchanged during live-viewer signaling. */
|
|
2464
|
+
export interface BrowserViewerIceCandidate {
|
|
2465
|
+
candidate: string;
|
|
2466
|
+
sdpMLineIndex?: number | null;
|
|
2467
|
+
sdpMid?: string | null;
|
|
2468
|
+
}
|
|
2469
|
+
/**
|
|
2470
|
+
* One live-viewer control command. The web client drives the WebRTC handshake
|
|
2471
|
+
* (`stream.start` → `stream.answer` → `stream.close`/`stream.switch`) and tab
|
|
2472
|
+
* navigation (`tab_list`/`tab_new`/`open`/`reload`/`back`/`forward`) through a
|
|
2473
|
+
* single endpoint; api-server forwards `command` to the host daemon.
|
|
2474
|
+
*/
|
|
2475
|
+
export interface BrowserViewerCommandRequest {
|
|
2476
|
+
/** Correlates a viewer session. Omit on `stream.start`; the server returns one. */
|
|
2477
|
+
session_id?: string;
|
|
2478
|
+
command: string;
|
|
2479
|
+
input?: Record<string, unknown>;
|
|
2480
|
+
}
|
|
2481
|
+
export interface BrowserViewerCommandResponse {
|
|
2482
|
+
session_id: string;
|
|
2483
|
+
/**
|
|
2484
|
+
* Command-specific result. For `stream.start`:
|
|
2485
|
+
* `{ offer_sdp: string, candidates: BrowserViewerIceCandidate[], ice_servers: BrowserViewerIceServer[] }`.
|
|
2486
|
+
* May be `null` on the wire — a nil Go result map serializes as JSON null; the
|
|
2487
|
+
* viewer client coalesces it to `{}`.
|
|
2488
|
+
*/
|
|
2489
|
+
result: Record<string, unknown> | null;
|
|
2490
|
+
}
|
|
2173
2491
|
export interface GrantBrowserProfileConsentRequest {
|
|
2174
2492
|
clip_id: string;
|
|
2175
2493
|
}
|
|
@@ -2258,6 +2576,10 @@ export interface SearchWikiResult {
|
|
|
2258
2576
|
heading_path: string[];
|
|
2259
2577
|
content_snippet: string;
|
|
2260
2578
|
score: number;
|
|
2579
|
+
/** Frontmatter document type (OKF facet label), when the file declares one. */
|
|
2580
|
+
type?: string;
|
|
2581
|
+
/** Frontmatter summary; clients may prefer it over content_snippet. */
|
|
2582
|
+
description?: string;
|
|
2261
2583
|
}
|
|
2262
2584
|
export interface SearchResponse {
|
|
2263
2585
|
messages: SearchMessageResult[];
|