@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/src/types.ts
CHANGED
|
@@ -264,6 +264,15 @@ export interface Message {
|
|
|
264
264
|
content: MessageContent;
|
|
265
265
|
version: number;
|
|
266
266
|
reply_count: number;
|
|
267
|
+
/** Timestamp of the most recent reply in this message's thread (root only). */
|
|
268
|
+
last_reply_at?: string | null;
|
|
269
|
+
/**
|
|
270
|
+
* Most-recent distinct reply authors, newest-first (root only, capped at 3).
|
|
271
|
+
* Approximate: derived from the newest ~30 replies per root, so on very long
|
|
272
|
+
* threads dominated by a few recent senders, older distinct authors may be
|
|
273
|
+
* absent from the stack. A reload re-derives it from the server's view.
|
|
274
|
+
*/
|
|
275
|
+
recent_repliers?: User[];
|
|
267
276
|
edited_at: string | null;
|
|
268
277
|
deleted_at: string | null;
|
|
269
278
|
created_at: string;
|
|
@@ -362,6 +371,17 @@ export interface OrgMember {
|
|
|
362
371
|
user?: User;
|
|
363
372
|
}
|
|
364
373
|
|
|
374
|
+
// Team — a named group of org members, referenced in wiki ACLs as `@slug`.
|
|
375
|
+
export interface Team {
|
|
376
|
+
id: string;
|
|
377
|
+
org_id: string;
|
|
378
|
+
name: string;
|
|
379
|
+
slug: string;
|
|
380
|
+
created_by: string;
|
|
381
|
+
created_at: string;
|
|
382
|
+
updated_at: string;
|
|
383
|
+
}
|
|
384
|
+
|
|
365
385
|
// Invitation
|
|
366
386
|
|
|
367
387
|
export type InvitationStatus = 'pending' | 'accepted' | 'declined' | 'revoked';
|
|
@@ -441,11 +461,11 @@ export interface CreateInvitationRequest {
|
|
|
441
461
|
role?: OrgMemberRole;
|
|
442
462
|
}
|
|
443
463
|
|
|
464
|
+
// Response of agent API key create/regenerate. The plaintext `api_key` is
|
|
465
|
+
// returned exactly once at mint time and can never be fetched again.
|
|
444
466
|
export interface ApiKey {
|
|
445
467
|
id: string;
|
|
446
|
-
|
|
447
|
-
agent_id: string;
|
|
448
|
-
created_at: string;
|
|
468
|
+
api_key: string;
|
|
449
469
|
}
|
|
450
470
|
|
|
451
471
|
export interface CreateAgentResponse {
|
|
@@ -708,6 +728,10 @@ export type MachineStatus =
|
|
|
708
728
|
| 'error'
|
|
709
729
|
| 'terminated';
|
|
710
730
|
|
|
731
|
+
// What a Machine can provide. Composable (a BYOC daemon is typically both) and
|
|
732
|
+
// orthogonal to compute_mode. See hosted-browser-provider-design.md.
|
|
733
|
+
export type MachineCapability = 'agent_host' | 'browser_provider';
|
|
734
|
+
|
|
711
735
|
export interface Machine {
|
|
712
736
|
id: string;
|
|
713
737
|
org_id: string;
|
|
@@ -725,6 +749,13 @@ export interface Machine {
|
|
|
725
749
|
daemon_mode: boolean;
|
|
726
750
|
llm_source?: string;
|
|
727
751
|
compute_mode: 'hosted' | 'local';
|
|
752
|
+
// What this machine can provide — composable and orthogonal to compute_mode
|
|
753
|
+
// (which is lifecycle handoff, not BYOC/role). A BYOC daemon is typically
|
|
754
|
+
// agent_host + browser_provider; a hosted browser provider pod is browser-only.
|
|
755
|
+
// Filter agent-host pickers by includes('agent_host') — never by excluding
|
|
756
|
+
// 'browser_provider'. Absent on servers predating the field. See
|
|
757
|
+
// docs/engineering-design/hosted-browser-provider-design.md.
|
|
758
|
+
capabilities?: MachineCapability[];
|
|
728
759
|
// Whether the machine contributes its local clips as a hub provider
|
|
729
760
|
// (org-admin-toggleable via PATCH /machines/{id}/provider-enabled). Absent on
|
|
730
761
|
// servers predating the field → treat as true (default-on). See
|
|
@@ -929,6 +960,21 @@ export interface MachineBrowserProfileLifecycleData {
|
|
|
929
960
|
start_url?: string;
|
|
930
961
|
}
|
|
931
962
|
|
|
963
|
+
/**
|
|
964
|
+
* Live-viewer control command relayed to the host daemon over `machine:{id}`.
|
|
965
|
+
* One command per WebRTC signaling / tab-nav step; the daemon replies via
|
|
966
|
+
* `POST /machines/me/browser-profiles/viewer-response/{request_id}`.
|
|
967
|
+
*/
|
|
968
|
+
export interface MachineBrowserProfileViewerData {
|
|
969
|
+
request_id: string;
|
|
970
|
+
profile_id: string;
|
|
971
|
+
session_id: string;
|
|
972
|
+
command: string;
|
|
973
|
+
input?: Record<string, unknown>;
|
|
974
|
+
/** Short-lived managed TURN/ICE credentials, minted server-side per stream.start. */
|
|
975
|
+
turn?: { url: string; username?: string; credential?: string };
|
|
976
|
+
}
|
|
977
|
+
|
|
932
978
|
export interface AgentNewSessionData {
|
|
933
979
|
previous_session_id?: string;
|
|
934
980
|
}
|
|
@@ -1271,6 +1317,186 @@ export interface ScheduleRunFilters {
|
|
|
1271
1317
|
limit?: number;
|
|
1272
1318
|
}
|
|
1273
1319
|
|
|
1320
|
+
// ============================================================
|
|
1321
|
+
// External Trigger Types
|
|
1322
|
+
// ============================================================
|
|
1323
|
+
|
|
1324
|
+
export type ExternalConnectionStatus = 'active' | 'disabled';
|
|
1325
|
+
export type ExternalIngressEventStatus = 'received' | 'processed' | 'failed';
|
|
1326
|
+
export type ExternalTriggerStatus = 'active' | 'paused';
|
|
1327
|
+
export type ExternalTriggerEffectiveStatus = 'active' | 'inactive';
|
|
1328
|
+
export type ExternalTriggerInactiveReason =
|
|
1329
|
+
| 'connection_disabled'
|
|
1330
|
+
| 'connection_archived'
|
|
1331
|
+
| 'trigger_paused'
|
|
1332
|
+
| 'trigger_archived'
|
|
1333
|
+
| 'expired'
|
|
1334
|
+
| 'max_runs_reached';
|
|
1335
|
+
export type ExternalTriggerRunStatus = 'delivered' | 'failed';
|
|
1336
|
+
|
|
1337
|
+
export interface ExternalConnection {
|
|
1338
|
+
id: string;
|
|
1339
|
+
org_id: string;
|
|
1340
|
+
source_type: string;
|
|
1341
|
+
display_name: string;
|
|
1342
|
+
owner_id: string;
|
|
1343
|
+
status: ExternalConnectionStatus;
|
|
1344
|
+
auth_config: Record<string, unknown>;
|
|
1345
|
+
archived_at: string | null;
|
|
1346
|
+
archive_reason: string | null;
|
|
1347
|
+
ingress_url?: string;
|
|
1348
|
+
ingress_token?: string;
|
|
1349
|
+
created_at: string;
|
|
1350
|
+
updated_at: string;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export interface CreateExternalConnectionInput {
|
|
1354
|
+
source_type?: string;
|
|
1355
|
+
display_name: string;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
export interface UpdateExternalConnectionInput {
|
|
1359
|
+
display_name?: string;
|
|
1360
|
+
status?: ExternalConnectionStatus;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
export interface ExternalIngressEvent {
|
|
1364
|
+
id: string;
|
|
1365
|
+
org_id: string;
|
|
1366
|
+
connection_id: string;
|
|
1367
|
+
status: ExternalIngressEventStatus;
|
|
1368
|
+
dedupe_key: string | null;
|
|
1369
|
+
event_type: string;
|
|
1370
|
+
request_snapshot: Record<string, unknown>;
|
|
1371
|
+
body_snapshot: Record<string, unknown>;
|
|
1372
|
+
envelope_snapshot: Record<string, unknown>;
|
|
1373
|
+
raw_body_sha256: string;
|
|
1374
|
+
body_size: number;
|
|
1375
|
+
error_code: string | null;
|
|
1376
|
+
error_message: string | null;
|
|
1377
|
+
received_at: string;
|
|
1378
|
+
processed_at: string | null;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
export interface ExternalTrigger {
|
|
1382
|
+
id: string;
|
|
1383
|
+
org_id: string;
|
|
1384
|
+
connection_id: string;
|
|
1385
|
+
creator_id: string;
|
|
1386
|
+
name: string;
|
|
1387
|
+
description: string;
|
|
1388
|
+
status: ExternalTriggerStatus;
|
|
1389
|
+
effective_status: ExternalTriggerEffectiveStatus;
|
|
1390
|
+
inactive_reason?: ExternalTriggerInactiveReason;
|
|
1391
|
+
archived_at: string | null;
|
|
1392
|
+
archive_reason: string | null;
|
|
1393
|
+
attached_to_uri: string | null;
|
|
1394
|
+
filter_language: 'cel';
|
|
1395
|
+
filter_profile: 'parall_cel_v1';
|
|
1396
|
+
filter_expr: string;
|
|
1397
|
+
filter_display_metadata: Record<string, unknown>;
|
|
1398
|
+
template_language: 'liquid';
|
|
1399
|
+
template_profile: 'parall_safe_v1';
|
|
1400
|
+
agent_input_template: string;
|
|
1401
|
+
max_runs: number | null;
|
|
1402
|
+
run_count: number;
|
|
1403
|
+
expires_at: string | null;
|
|
1404
|
+
client_context: Record<string, unknown>;
|
|
1405
|
+
target_agent_ids: string[];
|
|
1406
|
+
created_at: string;
|
|
1407
|
+
updated_at: string;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
export interface CreateExternalTriggerInput {
|
|
1411
|
+
connection_id: string;
|
|
1412
|
+
name: string;
|
|
1413
|
+
description?: string;
|
|
1414
|
+
target_agent_ids: string[];
|
|
1415
|
+
attached_to_uri?: string;
|
|
1416
|
+
filter_expr: string;
|
|
1417
|
+
filter_display_metadata?: Record<string, unknown>;
|
|
1418
|
+
agent_input_template: string;
|
|
1419
|
+
max_runs?: number;
|
|
1420
|
+
expires_at?: string;
|
|
1421
|
+
client_context?: Record<string, unknown>;
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
export interface UpdateExternalTriggerInput {
|
|
1425
|
+
name?: string;
|
|
1426
|
+
description?: string;
|
|
1427
|
+
status?: ExternalTriggerStatus;
|
|
1428
|
+
target_agent_ids?: string[];
|
|
1429
|
+
attached_to_uri?: string;
|
|
1430
|
+
attached_to_uri_clear?: boolean;
|
|
1431
|
+
filter_expr?: string;
|
|
1432
|
+
filter_display_metadata?: Record<string, unknown>;
|
|
1433
|
+
agent_input_template?: string;
|
|
1434
|
+
max_runs?: number;
|
|
1435
|
+
max_runs_clear?: boolean;
|
|
1436
|
+
expires_at?: string;
|
|
1437
|
+
expires_at_clear?: boolean;
|
|
1438
|
+
client_context?: Record<string, unknown>;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
export interface ExternalTriggerRun {
|
|
1442
|
+
id: string;
|
|
1443
|
+
org_id: string;
|
|
1444
|
+
connection_id: string;
|
|
1445
|
+
ingress_event_id: string;
|
|
1446
|
+
trigger_id: string;
|
|
1447
|
+
status: ExternalTriggerRunStatus;
|
|
1448
|
+
failure_stage: string | null;
|
|
1449
|
+
error_code: string | null;
|
|
1450
|
+
error_message: string | null;
|
|
1451
|
+
agent_input_body: string | null;
|
|
1452
|
+
trigger_snapshot: Record<string, unknown>;
|
|
1453
|
+
configured_target_agent_ids: string[];
|
|
1454
|
+
eligible_target_agent_ids: string[];
|
|
1455
|
+
skipped_target_agent_ids: string[];
|
|
1456
|
+
dispatch_event_ids: string[];
|
|
1457
|
+
trigger_name?: string;
|
|
1458
|
+
connection_source_type?: string;
|
|
1459
|
+
connection_display_name?: string;
|
|
1460
|
+
ingress_event_type?: string;
|
|
1461
|
+
created_at: string;
|
|
1462
|
+
delivered_at: string | null;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
export interface ExternalConnectionFilters {
|
|
1466
|
+
cursor?: string;
|
|
1467
|
+
limit?: number;
|
|
1468
|
+
}
|
|
1469
|
+
|
|
1470
|
+
export interface ExternalTriggerFilters {
|
|
1471
|
+
connection_id?: string;
|
|
1472
|
+
creator_id?: string;
|
|
1473
|
+
cursor?: string;
|
|
1474
|
+
limit?: number;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
export interface ExternalIngressEventFilters {
|
|
1478
|
+
connection_id?: string;
|
|
1479
|
+
cursor?: string;
|
|
1480
|
+
limit?: number;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
export interface ExternalTriggerRunFilters {
|
|
1484
|
+
trigger_id?: string;
|
|
1485
|
+
cursor?: string;
|
|
1486
|
+
limit?: number;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
export interface ExternalTriggerSchema {
|
|
1490
|
+
filter_language: 'cel';
|
|
1491
|
+
filter_profile: 'parall_cel_v1';
|
|
1492
|
+
template_language: 'liquid';
|
|
1493
|
+
template_profile: 'parall_safe_v1';
|
|
1494
|
+
filter_variables: string[];
|
|
1495
|
+
template_variables: string[];
|
|
1496
|
+
template_filters: string[];
|
|
1497
|
+
examples: Record<string, string>;
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1274
1500
|
// Schedule WS event data
|
|
1275
1501
|
export type ScheduleCreatedData = Schedule;
|
|
1276
1502
|
export type ScheduleUpdatedData = Schedule;
|
|
@@ -1370,6 +1596,10 @@ export interface WikiNodeSection {
|
|
|
1370
1596
|
start_line: number;
|
|
1371
1597
|
end_line: number;
|
|
1372
1598
|
content: string;
|
|
1599
|
+
/** Frontmatter metadata (OKF-inspired, file-level, all optional). */
|
|
1600
|
+
type?: string;
|
|
1601
|
+
description?: string;
|
|
1602
|
+
tags?: string[];
|
|
1373
1603
|
}
|
|
1374
1604
|
|
|
1375
1605
|
export interface WikiNodeSectionArtifact {
|
|
@@ -1506,15 +1736,24 @@ export interface CreateWikiRequest {
|
|
|
1506
1736
|
default_branch?: string;
|
|
1507
1737
|
}
|
|
1508
1738
|
|
|
1739
|
+
export interface WikiFileChangeInput {
|
|
1740
|
+
path: string;
|
|
1741
|
+
action: 'create' | 'update' | 'delete';
|
|
1742
|
+
content_base64?: string;
|
|
1743
|
+
base_version?: number;
|
|
1744
|
+
/**
|
|
1745
|
+
* Git blob SHA of the default-branch version this change was authored
|
|
1746
|
+
* against. When set on update/delete, the server rejects the changeset
|
|
1747
|
+
* with 409 STALE_BASE if the file has since changed on the default branch
|
|
1748
|
+
* (prevents silently overwriting concurrent edits).
|
|
1749
|
+
*/
|
|
1750
|
+
base_sha?: string;
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1509
1753
|
export interface CreateWikiChangesetRequest {
|
|
1510
1754
|
title: string;
|
|
1511
1755
|
message?: string;
|
|
1512
|
-
file_changes:
|
|
1513
|
-
path: string;
|
|
1514
|
-
action: 'create' | 'update' | 'delete';
|
|
1515
|
-
content_base64?: string;
|
|
1516
|
-
base_version?: number;
|
|
1517
|
-
}>;
|
|
1756
|
+
file_changes: WikiFileChangeInput[];
|
|
1518
1757
|
source_chat_id?: string;
|
|
1519
1758
|
source_message_id?: string;
|
|
1520
1759
|
source_run_id?: string;
|
|
@@ -1523,12 +1762,15 @@ export interface CreateWikiChangesetRequest {
|
|
|
1523
1762
|
export interface UpdateWikiChangesetRequest {
|
|
1524
1763
|
title?: string;
|
|
1525
1764
|
message?: string;
|
|
1526
|
-
file_changes?:
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1765
|
+
file_changes?: WikiFileChangeInput[];
|
|
1766
|
+
/**
|
|
1767
|
+
* When true, file_changes define the changeset's FULL content: the server
|
|
1768
|
+
* resets the feature branch to the current default-branch HEAD before
|
|
1769
|
+
* applying, so previously-proposed changes that are not re-sent are
|
|
1770
|
+
* dropped. Used by CLI re-propose (`changeset create --update`). Default
|
|
1771
|
+
* false preserves incremental merge semantics (binary-upload flow).
|
|
1772
|
+
*/
|
|
1773
|
+
replace_files?: boolean;
|
|
1532
1774
|
}
|
|
1533
1775
|
|
|
1534
1776
|
export interface WikiCommit {
|
|
@@ -1572,11 +1814,42 @@ export interface CreateWikiPathScopeRequest {
|
|
|
1572
1814
|
admins?: unknown;
|
|
1573
1815
|
}
|
|
1574
1816
|
|
|
1817
|
+
// Narrowing ACL layer — gates a path subtree to `subjects`. Org owners/admins
|
|
1818
|
+
// are bound for CONTENT access too, and must be listed to view/edit restricted
|
|
1819
|
+
// content. They always keep rule management so they can add themselves, edit, or
|
|
1820
|
+
// delete the rule. `apply_to_admins` is retained for wire/data compatibility.
|
|
1821
|
+
// `level: read` = fully private folder. See authorization-design.md § Wiki.
|
|
1822
|
+
export interface WikiPathRestriction {
|
|
1823
|
+
id: string;
|
|
1824
|
+
wiki_id: string;
|
|
1825
|
+
path: string;
|
|
1826
|
+
level: 'read' | 'maintain' | 'admin';
|
|
1827
|
+
subjects: string[];
|
|
1828
|
+
apply_to_admins: boolean;
|
|
1829
|
+
created_by: string;
|
|
1830
|
+
created_at: string;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
export interface CreateWikiPathRestrictionRequest {
|
|
1834
|
+
path: string;
|
|
1835
|
+
level?: 'read' | 'maintain' | 'admin';
|
|
1836
|
+
subjects: string[];
|
|
1837
|
+
apply_to_admins?: boolean;
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1575
1840
|
export interface WikiAccessStatus {
|
|
1576
1841
|
path: string;
|
|
1577
1842
|
read: boolean;
|
|
1578
1843
|
maintain: boolean;
|
|
1579
1844
|
admin: boolean;
|
|
1845
|
+
// Management-surface capability on the requested path: true for org
|
|
1846
|
+
// owners/admins regardless of content restrictions (which narrow content
|
|
1847
|
+
// access above, never rule management). Gates the Activity tab (root-scoped
|
|
1848
|
+
// operation log).
|
|
1849
|
+
acl_manage: boolean;
|
|
1850
|
+
// True when the caller can administer at least one path in the wiki —
|
|
1851
|
+
// includes delegated sub-tree admins. Gates the Access tab.
|
|
1852
|
+
acl_manage_any: boolean;
|
|
1580
1853
|
}
|
|
1581
1854
|
|
|
1582
1855
|
export interface CreateWikiAccessRequest {
|
|
@@ -2001,6 +2274,7 @@ export type DispatchEventType =
|
|
|
2001
2274
|
| 'task_comment'
|
|
2002
2275
|
| 'wiki_comment'
|
|
2003
2276
|
| 'schedule.fire'
|
|
2277
|
+
| 'external_trigger'
|
|
2004
2278
|
| 'approval_decided';
|
|
2005
2279
|
export type DispatchStatus = 'pending' | 'received' | 'acked';
|
|
2006
2280
|
export type DispatchDeliveryReason = 'mention' | 'watcher' | 'assignee' | 'creator';
|
|
@@ -2157,6 +2431,7 @@ export type WsEventMap = {
|
|
|
2157
2431
|
'machine.update': MachineUpdateData;
|
|
2158
2432
|
'machine.clip.sync': MachineClipSyncData;
|
|
2159
2433
|
'machine.browser_profile.lifecycle': MachineBrowserProfileLifecycleData;
|
|
2434
|
+
'machine.browser_profile.viewer': MachineBrowserProfileViewerData;
|
|
2160
2435
|
'clip.created': ClipCreatedData;
|
|
2161
2436
|
'clip.removed': ClipRemovedData;
|
|
2162
2437
|
'clip.updated': ClipUpdatedData;
|
|
@@ -2288,6 +2563,8 @@ export interface ResolvedRef {
|
|
|
2288
2563
|
// Wiki fields
|
|
2289
2564
|
file_name?: string;
|
|
2290
2565
|
wiki_name?: string;
|
|
2566
|
+
/** Frontmatter description of the referenced wiki page (OKF), when present. */
|
|
2567
|
+
wiki_description?: string;
|
|
2291
2568
|
fragment_exists?: boolean;
|
|
2292
2569
|
anchor_kind?: string;
|
|
2293
2570
|
anchor_exists?: boolean;
|
|
@@ -2648,6 +2925,8 @@ export interface CreateClipRequest {
|
|
|
2648
2925
|
}
|
|
2649
2926
|
|
|
2650
2927
|
export interface UpdateClipRequest {
|
|
2928
|
+
/** Rename the clip's org-local alias; uniqueness enforced per org. */
|
|
2929
|
+
alias?: string;
|
|
2651
2930
|
name?: string;
|
|
2652
2931
|
display_name?: string;
|
|
2653
2932
|
description?: string;
|
|
@@ -2659,6 +2938,18 @@ export interface UpdateClipRequest {
|
|
|
2659
2938
|
browser_profile_id?: string;
|
|
2660
2939
|
}
|
|
2661
2940
|
|
|
2941
|
+
/**
|
|
2942
|
+
* Atomically set application-level metadata (`display_name` and/or
|
|
2943
|
+
* `description`) on every clip instance of an application. All-or-nothing on the
|
|
2944
|
+
* server (one transaction). At least one field must be present; omitted leaves
|
|
2945
|
+
* it unchanged, an empty `description` clears it.
|
|
2946
|
+
*/
|
|
2947
|
+
export interface BulkUpdateClipMetadataRequest {
|
|
2948
|
+
clip_ids: string[];
|
|
2949
|
+
display_name?: string;
|
|
2950
|
+
description?: string;
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2662
2953
|
export interface BindAgentClipRequest {
|
|
2663
2954
|
clip_id: string;
|
|
2664
2955
|
config?: Record<string, unknown>;
|
|
@@ -2679,13 +2970,28 @@ export interface InvokeClipResponse {
|
|
|
2679
2970
|
error: string | null;
|
|
2680
2971
|
}
|
|
2681
2972
|
|
|
2682
|
-
|
|
2973
|
+
/**
|
|
2974
|
+
* profile.status is owner INTENT only, never runtime readiness:
|
|
2975
|
+
* - BYOC: pending | running | stopped | error
|
|
2976
|
+
* - hosted: idle | stopped | error (idle = enabled, activates lazily on invoke/viewer)
|
|
2977
|
+
* Whether a hosted pod is registered + routable is the lease/controller/provider's
|
|
2978
|
+
* runtime state, NOT profile status — hosted profiles are never `active`.
|
|
2979
|
+
*/
|
|
2980
|
+
export type BrowserProfileStatus = 'pending' | 'running' | 'stopped' | 'error' | 'idle';
|
|
2981
|
+
|
|
2982
|
+
/**
|
|
2983
|
+
* Routing/identity discriminant: `byoc` runs on a user machine (machine_id
|
|
2984
|
+
* required), `hosted` runs on the platform pool (machine_id null).
|
|
2985
|
+
*/
|
|
2986
|
+
export type BrowserPlacement = 'byoc' | 'hosted';
|
|
2683
2987
|
|
|
2684
2988
|
export interface BrowserProfile {
|
|
2685
2989
|
id: string;
|
|
2686
2990
|
org_id: string;
|
|
2687
|
-
/**
|
|
2688
|
-
|
|
2991
|
+
/** byoc = user machine, hosted = platform pool. */
|
|
2992
|
+
placement: BrowserPlacement;
|
|
2993
|
+
/** Host machine for byoc profiles; null for hosted (the platform pool owns the pod). */
|
|
2994
|
+
machine_id: string | null;
|
|
2689
2995
|
owner_user_id: string;
|
|
2690
2996
|
display_name: string;
|
|
2691
2997
|
status: BrowserProfileStatus;
|
|
@@ -2694,6 +3000,34 @@ export interface BrowserProfile {
|
|
|
2694
3000
|
created_by?: string | null;
|
|
2695
3001
|
created_at: string;
|
|
2696
3002
|
updated_at: string;
|
|
3003
|
+
/** Control hint on the single-profile responses (create / get / lifecycle) —
|
|
3004
|
+
* always true, since reaching those endpoints means the caller passed the read
|
|
3005
|
+
* or control gate and owner/admin can always control. The org-wide list uses
|
|
3006
|
+
* {@link BrowserProfileListItem.can_open} (per-viewer) instead. */
|
|
3007
|
+
can_open?: boolean;
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
/** Sanitized row from `GET /orgs/{orgId}/browser-profiles` (org-wide discovery).
|
|
3011
|
+
* Carries only the fields the Browser Profiles tab needs to render + gate
|
|
3012
|
+
* actions — the full domain model (provenance, timestamps) is never returned
|
|
3013
|
+
* org-wide. `error_msg` / `last_seen` are present only for readers (the profile
|
|
3014
|
+
* owner or an org admin), not merely for own-local host owners who can `can_open`. */
|
|
3015
|
+
export interface BrowserProfileListItem {
|
|
3016
|
+
id: string;
|
|
3017
|
+
org_id: string;
|
|
3018
|
+
/** byoc = user machine, hosted = platform pool. */
|
|
3019
|
+
placement: BrowserPlacement;
|
|
3020
|
+
/** Host machine for byoc; null for hosted (the platform pool owns the pod). */
|
|
3021
|
+
machine_id: string | null;
|
|
3022
|
+
owner_user_id: string;
|
|
3023
|
+
display_name: string;
|
|
3024
|
+
status: BrowserProfileStatus;
|
|
3025
|
+
/** Per-viewer control hint computed by the server (owner / org admin / own
|
|
3026
|
+
* local host machine). Optional only for forward-compat with an older
|
|
3027
|
+
* clip-service mid web-first rollout; the current server always sets it. */
|
|
3028
|
+
can_open?: boolean;
|
|
3029
|
+
error_msg?: string | null;
|
|
3030
|
+
last_seen?: string | null;
|
|
2697
3031
|
}
|
|
2698
3032
|
|
|
2699
3033
|
export interface BrowserProfileConsent {
|
|
@@ -2708,8 +3042,10 @@ export interface BrowserProfileConsent {
|
|
|
2708
3042
|
}
|
|
2709
3043
|
|
|
2710
3044
|
export interface CreateBrowserProfileRequest {
|
|
2711
|
-
/**
|
|
2712
|
-
|
|
3045
|
+
/** Defaults to `byoc` when omitted (backward compatible). */
|
|
3046
|
+
placement?: BrowserPlacement;
|
|
3047
|
+
/** Required for byoc; omitted for hosted (the platform pool assigns a pod). */
|
|
3048
|
+
machine_id?: string | null;
|
|
2713
3049
|
owner_user_id: string;
|
|
2714
3050
|
display_name: string;
|
|
2715
3051
|
}
|
|
@@ -2722,6 +3058,44 @@ export interface BrowserProfileLifecycleRequest {
|
|
|
2722
3058
|
start_url?: string;
|
|
2723
3059
|
}
|
|
2724
3060
|
|
|
3061
|
+
/** A WebRTC ICE server (STUN/TURN) for the live-viewer peer connection. */
|
|
3062
|
+
export interface BrowserViewerIceServer {
|
|
3063
|
+
urls: string[];
|
|
3064
|
+
username?: string;
|
|
3065
|
+
credential?: string;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
/** A serialized ICE candidate exchanged during live-viewer signaling. */
|
|
3069
|
+
export interface BrowserViewerIceCandidate {
|
|
3070
|
+
candidate: string;
|
|
3071
|
+
sdpMLineIndex?: number | null;
|
|
3072
|
+
sdpMid?: string | null;
|
|
3073
|
+
}
|
|
3074
|
+
|
|
3075
|
+
/**
|
|
3076
|
+
* One live-viewer control command. The web client drives the WebRTC handshake
|
|
3077
|
+
* (`stream.start` → `stream.answer` → `stream.close`/`stream.switch`) and tab
|
|
3078
|
+
* navigation (`tab_list`/`tab_new`/`open`/`reload`/`back`/`forward`) through a
|
|
3079
|
+
* single endpoint; api-server forwards `command` to the host daemon.
|
|
3080
|
+
*/
|
|
3081
|
+
export interface BrowserViewerCommandRequest {
|
|
3082
|
+
/** Correlates a viewer session. Omit on `stream.start`; the server returns one. */
|
|
3083
|
+
session_id?: string;
|
|
3084
|
+
command: string;
|
|
3085
|
+
input?: Record<string, unknown>;
|
|
3086
|
+
}
|
|
3087
|
+
|
|
3088
|
+
export interface BrowserViewerCommandResponse {
|
|
3089
|
+
session_id: string;
|
|
3090
|
+
/**
|
|
3091
|
+
* Command-specific result. For `stream.start`:
|
|
3092
|
+
* `{ offer_sdp: string, candidates: BrowserViewerIceCandidate[], ice_servers: BrowserViewerIceServer[] }`.
|
|
3093
|
+
* May be `null` on the wire — a nil Go result map serializes as JSON null; the
|
|
3094
|
+
* viewer client coalesces it to `{}`.
|
|
3095
|
+
*/
|
|
3096
|
+
result: Record<string, unknown> | null;
|
|
3097
|
+
}
|
|
3098
|
+
|
|
2725
3099
|
export interface GrantBrowserProfileConsentRequest {
|
|
2726
3100
|
clip_id: string;
|
|
2727
3101
|
}
|
|
@@ -2820,6 +3194,10 @@ export interface SearchWikiResult {
|
|
|
2820
3194
|
heading_path: string[];
|
|
2821
3195
|
content_snippet: string;
|
|
2822
3196
|
score: number;
|
|
3197
|
+
/** Frontmatter document type (OKF facet label), when the file declares one. */
|
|
3198
|
+
type?: string;
|
|
3199
|
+
/** Frontmatter summary; clients may prefer it over content_snippet. */
|
|
3200
|
+
description?: string;
|
|
2823
3201
|
}
|
|
2824
3202
|
|
|
2825
3203
|
export interface SearchResponse {
|