@pingagent/sdk 0.1.17 → 0.1.19

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/index.d.ts CHANGED
@@ -1157,6 +1157,7 @@ declare class OperatorSeenStateManager {
1157
1157
  }
1158
1158
 
1159
1159
  type HumanDeliveryBindingStatus = 'active' | 'stale';
1160
+ type ExternalTargetBindingStatus = HumanDeliveryBindingStatus;
1160
1161
  interface HumanDeliveryBinding {
1161
1162
  id: number;
1162
1163
  created_at: number;
@@ -1174,6 +1175,7 @@ interface HumanDeliveryBinding {
1174
1175
  last_outbound_at?: number;
1175
1176
  detail?: Record<string, unknown>;
1176
1177
  }
1178
+ type ExternalTargetBinding = HumanDeliveryBinding;
1177
1179
  interface HumanDeliveryBindingInput {
1178
1180
  created_at?: number;
1179
1181
  updated_at?: number;
@@ -1190,6 +1192,7 @@ interface HumanDeliveryBindingInput {
1190
1192
  last_outbound_at?: number;
1191
1193
  detail?: Record<string, unknown>;
1192
1194
  }
1195
+ type ExternalTargetBindingInput = HumanDeliveryBindingInput;
1193
1196
  declare class HumanDeliveryBindingManager {
1194
1197
  private store;
1195
1198
  constructor(store: LocalStore);
@@ -1207,8 +1210,11 @@ declare class HumanDeliveryBindingManager {
1207
1210
  }
1208
1211
 
1209
1212
  type NotificationIntentType = 'decision_required' | 'approval_result' | 'task_completed' | 'risk_alert' | 'handoff' | 'runtime_alert' | 'collaboration_update';
1213
+ type ActionCallbackIntentType = NotificationIntentType;
1210
1214
  type NotificationIntentStatus = 'pending' | 'bound' | 'sent' | 'acknowledged' | 'failed' | 'unresolved' | 'canceled';
1215
+ type ActionCallbackIntentStatus = NotificationIntentStatus;
1211
1216
  type NotificationIntentBindingScope = 'same_conversation' | 'same_session' | 'owner_last_active';
1217
+ type ActionCallbackIntentBindingScope = NotificationIntentBindingScope;
1212
1218
  interface NotificationIntent {
1213
1219
  id: number;
1214
1220
  created_at: number;
@@ -1218,6 +1224,7 @@ interface NotificationIntent {
1218
1224
  owner_ref?: string;
1219
1225
  source_event_id?: number;
1220
1226
  source_projection_outbox_id?: number;
1227
+ source_external_escalation_id?: number;
1221
1228
  intent_type: NotificationIntentType;
1222
1229
  title: string;
1223
1230
  summary: string;
@@ -1233,6 +1240,7 @@ interface NotificationIntent {
1233
1240
  acknowledged_by_binding_id?: number;
1234
1241
  acknowledged_by_message_ref?: string;
1235
1242
  }
1243
+ type ActionCallbackIntent = NotificationIntent;
1236
1244
  interface NotificationIntentInput {
1237
1245
  created_at?: number;
1238
1246
  updated_at?: number;
@@ -1241,6 +1249,7 @@ interface NotificationIntentInput {
1241
1249
  owner_ref?: string;
1242
1250
  source_event_id?: number;
1243
1251
  source_projection_outbox_id?: number;
1252
+ source_external_escalation_id?: number;
1244
1253
  intent_type: NotificationIntentType;
1245
1254
  title: string;
1246
1255
  summary: string;
@@ -1256,12 +1265,14 @@ interface NotificationIntentInput {
1256
1265
  acknowledged_by_binding_id?: number;
1257
1266
  acknowledged_by_message_ref?: string;
1258
1267
  }
1268
+ type ActionCallbackIntentInput = NotificationIntentInput;
1259
1269
  declare class NotificationIntentManager {
1260
1270
  private store;
1261
1271
  constructor(store: LocalStore);
1262
1272
  enqueue(input: NotificationIntentInput): NotificationIntent;
1263
1273
  get(id: number): NotificationIntent | null;
1264
1274
  findBySourceProjectionOutboxId(sourceProjectionOutboxId: number): NotificationIntent | null;
1275
+ findBySourceExternalEscalationId(sourceExternalEscalationId: number): NotificationIntent | null;
1265
1276
  listRecent(limit?: number): NotificationIntent[];
1266
1277
  listPending(limit?: number): NotificationIntent[];
1267
1278
  listUnacknowledgedSent(limit?: number): NotificationIntent[];
@@ -1282,6 +1293,7 @@ declare class NotificationIntentManager {
1282
1293
  message_ref?: string | null;
1283
1294
  ts?: number;
1284
1295
  }): NotificationIntent | null;
1296
+ linkExternalEscalation(id: number, externalEscalationId: number, ts?: number): NotificationIntent | null;
1285
1297
  acknowledgeLatestSentForBinding(input: {
1286
1298
  binding_id?: number | null;
1287
1299
  conversation_id?: string | null;
@@ -1291,6 +1303,52 @@ declare class NotificationIntentManager {
1291
1303
  }): NotificationIntent | null;
1292
1304
  }
1293
1305
 
1306
+ type RuntimeRunStatus = 'active' | 'completed' | 'blocked' | 'failed' | 'canceled';
1307
+ interface RuntimeRun {
1308
+ id: number;
1309
+ adapter: string;
1310
+ run_id: string;
1311
+ workflow_id: string;
1312
+ session_key: string;
1313
+ conversation_id?: string;
1314
+ source_agent?: string;
1315
+ source_model?: string;
1316
+ status: RuntimeRunStatus;
1317
+ created_at: number;
1318
+ updated_at: number;
1319
+ last_resume_at?: number;
1320
+ detail?: Record<string, unknown>;
1321
+ }
1322
+ interface RuntimeRunInput {
1323
+ adapter: string;
1324
+ run_id?: string;
1325
+ workflow_id?: string;
1326
+ session_key: string;
1327
+ conversation_id?: string;
1328
+ source_agent?: string;
1329
+ source_model?: string;
1330
+ status?: RuntimeRunStatus;
1331
+ created_at?: number;
1332
+ updated_at?: number;
1333
+ last_resume_at?: number;
1334
+ source_ref?: string;
1335
+ detail?: Record<string, unknown>;
1336
+ }
1337
+ declare function synthesizeOpenClawRunId(input: Pick<RuntimeRunInput, 'session_key' | 'source_ref'>): string;
1338
+ declare function synthesizeOpenClawWorkflowId(input: Pick<RuntimeRunInput, 'conversation_id' | 'session_key'>): string;
1339
+ declare class RuntimeRunManager {
1340
+ private store;
1341
+ constructor(store: LocalStore);
1342
+ private getRowByRun;
1343
+ private resolveRunFields;
1344
+ upsert(input: RuntimeRunInput): RuntimeRun;
1345
+ get(id: number): RuntimeRun | null;
1346
+ findByRun(adapter: string, runId: string): RuntimeRun | null;
1347
+ listRecent(limit?: number): RuntimeRun[];
1348
+ markStatus(id: number, status: RuntimeRunStatus, ts?: number): RuntimeRun | null;
1349
+ markResumed(id: number, ts?: number): RuntimeRun | null;
1350
+ }
1351
+
1294
1352
  type ProjectionDisposition = 'project' | 'detail_only' | 'decision_gate';
1295
1353
  interface ProjectionDispositionInput {
1296
1354
  preset: CollaborationProjectionPreset;
@@ -1359,6 +1417,299 @@ declare function buildProjectionPreview(store: LocalStore, sessionKey: string, p
1359
1417
  declare function buildDecisionReminderOutboxMessage(event: CollaborationEvent): string;
1360
1418
  declare function hasDecisionPromptOutbox(outboxManager: CollaborationProjectionOutboxManager, sourceEventId: number): boolean;
1361
1419
 
1420
+ type ActionMessageType = 'inform' | 'escalate' | 'approval_request' | 'callback_result' | 'delegate' | 'handoff' | 'interrupt' | 'status_update';
1421
+ type ActionResponseState = 'pending' | 'delivered' | 'seen' | 'acknowledged' | 'approved' | 'rejected' | 'delegated' | 'expired' | 'completed' | 'failed' | 'unresolved';
1422
+ type ActionRiskLevel = 'low' | 'moderate' | 'high' | 'critical';
1423
+ type ActionSensitivity = 'routine' | 'internal' | 'sensitive' | 'restricted';
1424
+ type ActionTargetClass = 'human_operator' | 'human_approver' | 'agent_runtime' | 'agent_delegate' | 'callback_endpoint' | 'mixed';
1425
+ interface ActionArtifact {
1426
+ label: string;
1427
+ ref?: string;
1428
+ url?: string;
1429
+ kind?: string;
1430
+ }
1431
+ interface ActionPolicyScope {
1432
+ kind?: string;
1433
+ grants?: string[];
1434
+ constraints?: string[];
1435
+ designated_target?: string;
1436
+ expires_at?: number;
1437
+ capability_token_id?: string;
1438
+ requires_designated_approver?: boolean;
1439
+ }
1440
+ interface ActionContract {
1441
+ run_id?: string;
1442
+ workflow_id?: string;
1443
+ source_agent?: string;
1444
+ source_runtime?: string;
1445
+ source_model?: string;
1446
+ message_type: ActionMessageType;
1447
+ response_state?: ActionResponseState;
1448
+ risk_level: ActionRiskLevel;
1449
+ required_action: string;
1450
+ task_summary: string;
1451
+ deadline?: number;
1452
+ sensitivity: ActionSensitivity;
1453
+ target_class: ActionTargetClass;
1454
+ callback_target?: string;
1455
+ artifacts: ActionArtifact[];
1456
+ expected_callback?: string;
1457
+ policy_scope?: ActionPolicyScope;
1458
+ consequence?: string;
1459
+ }
1460
+ interface BuildActionContractInput {
1461
+ intent_type?: NotificationIntentType | null;
1462
+ source_event_type?: CollaborationEventType | null;
1463
+ projection_kind?: CollaborationProjectionKind | null;
1464
+ severity?: CollaborationEventSeverity | null;
1465
+ summary?: string | null;
1466
+ deep_link?: string | null;
1467
+ body?: Record<string, unknown> | null;
1468
+ }
1469
+ declare function buildActionContract(input: BuildActionContractInput): ActionContract;
1470
+ declare function buildActionContractForDecisionView(event: CollaborationDecisionView): ActionContract;
1471
+ declare function buildActionContractForNotificationIntent(intent: NotificationIntent): ActionContract;
1472
+ declare function actionRiskRank(level: ActionRiskLevel): number;
1473
+ declare function actionDeadlineStatus(contract: Pick<ActionContract, 'deadline'>, now?: number): 'none' | 'timed_out' | 'upcoming';
1474
+
1475
+ type ExternalEscalationStatus = 'pending' | 'dispatched' | 'waiting_callback' | 'blocked' | 'failed' | 'completed' | 'canceled' | 'expired';
1476
+ interface ExternalEscalationDetail {
1477
+ action_contract: ActionContract;
1478
+ metadata?: Record<string, unknown>;
1479
+ source_event_id?: number;
1480
+ source_intent_id?: number;
1481
+ callback_target?: string;
1482
+ }
1483
+ interface ExternalEscalation {
1484
+ id: number;
1485
+ adapter: string;
1486
+ run_id: string;
1487
+ workflow_id: string;
1488
+ session_key: string;
1489
+ conversation_id?: string;
1490
+ source_event_id?: number;
1491
+ source_intent_id?: number;
1492
+ message_type: ActionMessageType;
1493
+ risk_level: ActionRiskLevel;
1494
+ required_action: string;
1495
+ callback_target?: string;
1496
+ target_class: ActionTargetClass;
1497
+ status: ExternalEscalationStatus;
1498
+ deadline?: number;
1499
+ token_required: boolean;
1500
+ linked_notification_intent_id?: number;
1501
+ created_at: number;
1502
+ updated_at: number;
1503
+ detail: ExternalEscalationDetail;
1504
+ }
1505
+ interface ExternalEscalationInput {
1506
+ adapter: string;
1507
+ run_id: string;
1508
+ workflow_id: string;
1509
+ session_key: string;
1510
+ conversation_id?: string;
1511
+ source_event_id?: number;
1512
+ source_intent_id?: number;
1513
+ callback_target?: string;
1514
+ linked_notification_intent_id?: number;
1515
+ status?: ExternalEscalationStatus;
1516
+ deadline?: number;
1517
+ token_required?: boolean;
1518
+ created_at?: number;
1519
+ updated_at?: number;
1520
+ action_contract: ActionContract;
1521
+ metadata?: Record<string, unknown>;
1522
+ }
1523
+ declare class ExternalEscalationManager {
1524
+ private store;
1525
+ constructor(store: LocalStore);
1526
+ enqueue(input: ExternalEscalationInput): ExternalEscalation;
1527
+ get(id: number): ExternalEscalation | null;
1528
+ findByLinkedNotificationIntentId(intentId: number): ExternalEscalation | null;
1529
+ findByRun(adapter: string, runId: string, workflowId?: string): ExternalEscalation | null;
1530
+ listRecent(limit?: number): ExternalEscalation[];
1531
+ listByStatus(status: ExternalEscalationStatus, limit?: number): ExternalEscalation[];
1532
+ listPendingWork(limit?: number): ExternalEscalation[];
1533
+ private updateStatus;
1534
+ markDispatched(id: number, linkedIntentId?: number | null, ts?: number): ExternalEscalation | null;
1535
+ markWaitingCallback(id: number, linkedIntentId?: number | null, ts?: number): ExternalEscalation | null;
1536
+ markBlocked(id: number, error?: string, ts?: number): ExternalEscalation | null;
1537
+ markFailed(id: number, error?: string, ts?: number): ExternalEscalation | null;
1538
+ markCompleted(id: number, ts?: number): ExternalEscalation | null;
1539
+ markCanceled(id: number, reason?: string, ts?: number): ExternalEscalation | null;
1540
+ markExpired(id: number, ts?: number): ExternalEscalation | null;
1541
+ linkNotificationIntent(id: number, intentId: number, ts?: number): ExternalEscalation | null;
1542
+ markPending(id: number, ts?: number): ExternalEscalation | null;
1543
+ updateDetail(id: number, detail: ExternalEscalationDetail, ts?: number): ExternalEscalation | null;
1544
+ }
1545
+
1546
+ type CallbackResumeDeliveryStatus = 'pending' | 'delivered' | 'failed';
1547
+ interface StoredCallbackResume {
1548
+ id: number;
1549
+ adapter: string;
1550
+ external_escalation_id: number;
1551
+ run_id: string;
1552
+ workflow_id: string;
1553
+ response_state: ActionResponseState;
1554
+ callback_target?: string;
1555
+ message_ref?: string;
1556
+ binding_id?: number;
1557
+ accepted: boolean;
1558
+ rejection_reason?: string;
1559
+ resume_delivery_status: CallbackResumeDeliveryStatus;
1560
+ received_at: number;
1561
+ delivered_at?: number;
1562
+ detail?: Record<string, unknown>;
1563
+ }
1564
+ interface StoredCallbackResumeInput {
1565
+ adapter: string;
1566
+ external_escalation_id: number;
1567
+ run_id: string;
1568
+ workflow_id: string;
1569
+ response_state: ActionResponseState;
1570
+ callback_target?: string;
1571
+ message_ref?: string;
1572
+ binding_id?: number;
1573
+ accepted: boolean;
1574
+ rejection_reason?: string;
1575
+ resume_delivery_status?: CallbackResumeDeliveryStatus;
1576
+ received_at?: number;
1577
+ delivered_at?: number;
1578
+ detail?: Record<string, unknown>;
1579
+ }
1580
+ declare class CallbackResumeManager {
1581
+ private store;
1582
+ constructor(store: LocalStore);
1583
+ record(input: StoredCallbackResumeInput): StoredCallbackResume;
1584
+ get(id: number): StoredCallbackResume | null;
1585
+ findDuplicate(externalEscalationId: number, messageRef?: string | null): StoredCallbackResume | null;
1586
+ listRecent(limit?: number): StoredCallbackResume[];
1587
+ listByEscalation(externalEscalationId: number, limit?: number): StoredCallbackResume[];
1588
+ markDelivered(id: number, ts?: number): StoredCallbackResume | null;
1589
+ markFailed(id: number, error?: string, ts?: number): StoredCallbackResume | null;
1590
+ }
1591
+
1592
+ type CapabilityTokenStatus = 'active' | 'used' | 'revoked' | 'expired';
1593
+ interface CapabilityToken {
1594
+ token_id: string;
1595
+ token_hash: string;
1596
+ external_escalation_id: number;
1597
+ run_id: string;
1598
+ workflow_id: string;
1599
+ target_ref?: string;
1600
+ grants: string[];
1601
+ constraints: string[];
1602
+ expires_at: number;
1603
+ status: CapabilityTokenStatus;
1604
+ issued_at: number;
1605
+ used_at?: number;
1606
+ revoked_at?: number;
1607
+ }
1608
+ interface CapabilityTokenIssueInput {
1609
+ external_escalation_id: number;
1610
+ run_id: string;
1611
+ workflow_id: string;
1612
+ target_ref?: string;
1613
+ grants?: string[];
1614
+ constraints?: string[];
1615
+ expires_at: number;
1616
+ }
1617
+ interface CapabilityTokenConsumeInput {
1618
+ token: string;
1619
+ external_escalation_id?: number;
1620
+ run_id?: string;
1621
+ workflow_id?: string;
1622
+ now?: number;
1623
+ }
1624
+ declare class CapabilityTokenManager {
1625
+ private store;
1626
+ constructor(store: LocalStore);
1627
+ get(tokenId: string): CapabilityToken | null;
1628
+ issue(input: CapabilityTokenIssueInput): {
1629
+ token: string;
1630
+ record: CapabilityToken;
1631
+ };
1632
+ listRecent(limit?: number): CapabilityToken[];
1633
+ consume(input: CapabilityTokenConsumeInput): {
1634
+ accepted: boolean;
1635
+ record?: CapabilityToken;
1636
+ reason?: string;
1637
+ };
1638
+ revoke(tokenId: string, ts?: number): CapabilityToken | null;
1639
+ expireStale(now?: number): number;
1640
+ }
1641
+
1642
+ interface OpenClawHookClientOptions {
1643
+ hooks_base_url?: string;
1644
+ hooks_path?: string;
1645
+ hooks_token?: string;
1646
+ agent_id?: string;
1647
+ timeout_seconds?: number;
1648
+ }
1649
+ interface OpenClawHookSendInput {
1650
+ sessionKey: string;
1651
+ message: string;
1652
+ timeoutSeconds?: number;
1653
+ agentId?: string;
1654
+ }
1655
+ interface OpenClawHookHealth {
1656
+ ok: boolean;
1657
+ hooks_base_url?: string;
1658
+ hooks_path?: string;
1659
+ token_source: 'env' | 'config' | 'missing';
1660
+ config_path: string;
1661
+ error?: string;
1662
+ }
1663
+ declare class OpenClawHooksClient {
1664
+ readonly config_path: string;
1665
+ readonly hooks_base_url: string;
1666
+ readonly hooks_path: string;
1667
+ readonly hooks_token: string;
1668
+ readonly token_source: 'env' | 'config' | 'missing';
1669
+ readonly agent_id: string;
1670
+ readonly timeout_seconds: number;
1671
+ constructor(options?: OpenClawHookClientOptions);
1672
+ healthcheck(): OpenClawHookHealth;
1673
+ private postToPath;
1674
+ sendToSession(input: OpenClawHookSendInput): Promise<void>;
1675
+ }
1676
+
1677
+ type OpenClawTransportMode = 'bridge' | 'channel';
1678
+ interface TransportPreferenceState {
1679
+ preferred_mode: OpenClawTransportMode;
1680
+ updated_at: string;
1681
+ updated_by: string;
1682
+ last_auto_switch_at?: string | null;
1683
+ last_auto_switch_reason?: string | null;
1684
+ }
1685
+ interface ManagedTransportSwitchResult {
1686
+ preferred_mode: OpenClawTransportMode;
1687
+ preference_path: string;
1688
+ updated_at: string;
1689
+ updated_by: string;
1690
+ last_auto_switch_at?: string | null;
1691
+ last_auto_switch_reason?: string | null;
1692
+ restarted: boolean;
1693
+ restart_required: boolean;
1694
+ restart_method?: string | null;
1695
+ restart_error?: string | null;
1696
+ }
1697
+ declare function normalizeTransportMode(value: unknown, fallback?: OpenClawTransportMode): OpenClawTransportMode;
1698
+ declare function getTransportPreferenceFilePath(): string;
1699
+ declare function readTransportPreference(filePath?: string): TransportPreferenceState | null;
1700
+ declare function writeTransportPreference(input: {
1701
+ preferred_mode: OpenClawTransportMode;
1702
+ updated_by: string;
1703
+ last_auto_switch_at?: string | null;
1704
+ last_auto_switch_reason?: string | null;
1705
+ }, filePath?: string): TransportPreferenceState;
1706
+ declare function switchTransportPreference(preferredMode: OpenClawTransportMode, opts: {
1707
+ updated_by: string;
1708
+ auto_switch_reason?: string | null;
1709
+ attempt_restart?: boolean;
1710
+ filePath?: string;
1711
+ }): ManagedTransportSwitchResult;
1712
+
1362
1713
  declare const HUMAN_DELIVERY_CHANNELS: readonly ["feishu", "discord", "telegram", "slack", "whatsapp"];
1363
1714
  type HumanDeliveryChannel = typeof HUMAN_DELIVERY_CHANNELS[number];
1364
1715
  interface HumanDeliveryChannelCapability {
@@ -1415,42 +1766,6 @@ declare function parseNotificationOverride(text: string | null | undefined): Not
1415
1766
  declare function buildNotificationIntentInputFromProjectionOutbox(store: LocalStore, projectionOutboxId: number, override?: NotificationOverride | null): NotificationIntentInput | null;
1416
1767
  declare function listRecentBindingsForSession(store: LocalStore, sessionKey: string, conversationId?: string | null, limit?: number): HumanDeliveryBinding[];
1417
1768
 
1418
- type OpenClawTransportMode = 'bridge' | 'channel';
1419
- interface TransportPreferenceState {
1420
- preferred_mode: OpenClawTransportMode;
1421
- updated_at: string;
1422
- updated_by: string;
1423
- last_auto_switch_at?: string | null;
1424
- last_auto_switch_reason?: string | null;
1425
- }
1426
- interface ManagedTransportSwitchResult {
1427
- preferred_mode: OpenClawTransportMode;
1428
- preference_path: string;
1429
- updated_at: string;
1430
- updated_by: string;
1431
- last_auto_switch_at?: string | null;
1432
- last_auto_switch_reason?: string | null;
1433
- restarted: boolean;
1434
- restart_required: boolean;
1435
- restart_method?: string | null;
1436
- restart_error?: string | null;
1437
- }
1438
- declare function normalizeTransportMode(value: unknown, fallback?: OpenClawTransportMode): OpenClawTransportMode;
1439
- declare function getTransportPreferenceFilePath(): string;
1440
- declare function readTransportPreference(filePath?: string): TransportPreferenceState | null;
1441
- declare function writeTransportPreference(input: {
1442
- preferred_mode: OpenClawTransportMode;
1443
- updated_by: string;
1444
- last_auto_switch_at?: string | null;
1445
- last_auto_switch_reason?: string | null;
1446
- }, filePath?: string): TransportPreferenceState;
1447
- declare function switchTransportPreference(preferredMode: OpenClawTransportMode, opts: {
1448
- updated_by: string;
1449
- auto_switch_reason?: string | null;
1450
- attempt_restart?: boolean;
1451
- filePath?: string;
1452
- }): ManagedTransportSwitchResult;
1453
-
1454
1769
  interface OpenClawIngressRuntimeStatus {
1455
1770
  receive_mode: 'webhook' | 'polling_degraded';
1456
1771
  human_delivery_mode?: 'projection_outbox' | 'bound_channel_reply' | null;
@@ -1489,6 +1804,88 @@ interface OpenClawIngressRuntimeStatus {
1489
1804
  declare function getIngressRuntimeStatusFilePath(): string;
1490
1805
  declare function readIngressRuntimeStatus(filePath?: string): OpenClawIngressRuntimeStatus | null;
1491
1806
 
1807
+ interface OpenClawExecutionAdapterHealth {
1808
+ ok: boolean;
1809
+ runtime_status?: OpenClawIngressRuntimeStatus | null;
1810
+ hooks: ReturnType<OpenClawHooksClient['healthcheck']>;
1811
+ error?: string;
1812
+ }
1813
+ interface EnqueueOpenClawEscalationInput {
1814
+ run_id?: string;
1815
+ workflow_id?: string;
1816
+ session_key: string;
1817
+ conversation_id?: string;
1818
+ source_event_id?: number;
1819
+ source_intent_id?: number;
1820
+ action_contract: ActionContract;
1821
+ callback_target?: string;
1822
+ metadata?: Record<string, unknown>;
1823
+ }
1824
+ interface ResumeOpenClawCallbackInput {
1825
+ external_escalation_id?: number;
1826
+ run_id?: string;
1827
+ workflow_id?: string;
1828
+ response_state: ActionResponseState;
1829
+ response_payload?: Record<string, unknown>;
1830
+ message_ref?: string;
1831
+ callback_target?: string;
1832
+ capability_token?: string;
1833
+ binding_id?: number;
1834
+ trusted_local?: boolean;
1835
+ }
1836
+ interface OpenClawAdapterOverview {
1837
+ health: OpenClawExecutionAdapterHealth;
1838
+ recent_runtime_runs: RuntimeRun[];
1839
+ recent_escalations: ExternalEscalation[];
1840
+ recent_callback_resumes: StoredCallbackResume[];
1841
+ token_required_pending: number;
1842
+ blocked_count: number;
1843
+ failed_count: number;
1844
+ expired_count: number;
1845
+ }
1846
+ declare class OpenClawExecutionAdapter {
1847
+ private store;
1848
+ private runtimeRuns;
1849
+ private escalations;
1850
+ private callbackResumes;
1851
+ private capabilityTokens;
1852
+ private intents;
1853
+ private hooksClient;
1854
+ constructor(store: LocalStore);
1855
+ enqueueEscalation(input: EnqueueOpenClawEscalationInput): {
1856
+ runtime_run: RuntimeRun;
1857
+ escalation: ExternalEscalation;
1858
+ notification_intent: NotificationIntent;
1859
+ token_required: boolean;
1860
+ capability_token?: {
1861
+ token_id: string;
1862
+ token: string;
1863
+ };
1864
+ };
1865
+ dispatchEscalation(escalationId: number): {
1866
+ escalation: ExternalEscalation;
1867
+ intent?: NotificationIntent | null;
1868
+ resolved_binding_id?: number;
1869
+ };
1870
+ ensureEscalationForIntent(intent: NotificationIntent): ExternalEscalation | null;
1871
+ resumeCallback(input: ResumeOpenClawCallbackInput): Promise<{
1872
+ accepted: boolean;
1873
+ escalation: ExternalEscalation;
1874
+ callback_resume: StoredCallbackResume;
1875
+ delivered: boolean;
1876
+ reason?: string;
1877
+ }>;
1878
+ healthcheck(): OpenClawExecutionAdapterHealth;
1879
+ buildOverview(limit?: number): OpenClawAdapterOverview;
1880
+ syncFromNotificationIntent(intent: NotificationIntent): ExternalEscalation | null;
1881
+ cancelEscalation(escalationId: number, reason?: string): ExternalEscalation | null;
1882
+ retryEscalation(escalationId: number): {
1883
+ escalation: ExternalEscalation;
1884
+ intent?: NotificationIntent | null;
1885
+ };
1886
+ private mapActionContractToIntentType;
1887
+ }
1888
+
1492
1889
  type TransportHealthState = 'Ready' | 'Degraded' | 'Switching Recommended';
1493
1890
  interface TransportHealth {
1494
1891
  transport_mode: OpenClawTransportMode;
@@ -1511,6 +1908,137 @@ declare function deriveTransportHealth(input: {
1511
1908
  projection_outbox_failed?: CollaborationProjectionOutboxEntry[];
1512
1909
  }): TransportHealth;
1513
1910
 
1911
+ type OpenClawAgentLifecycleState = 'activating' | 'ready_waiting_inbound' | 'active_session' | 'decision_pending' | 'human_delivery_pending' | 'human_delivery_acknowledged' | 'degraded' | 'blocked';
1912
+ interface OpenClawAgentState {
1913
+ state: OpenClawAgentLifecycleState;
1914
+ summary: string;
1915
+ reason?: string | null;
1916
+ next_action: string;
1917
+ active_session_key?: string | null;
1918
+ pending_decisions: number;
1919
+ human_delivery_pending: number;
1920
+ human_delivery_unresolved: number;
1921
+ human_delivery_failed: number;
1922
+ human_delivery_acknowledged: number;
1923
+ blocked: boolean;
1924
+ degraded: boolean;
1925
+ }
1926
+ interface DeriveOpenClawAgentStateInput {
1927
+ runtime_status?: OpenClawIngressRuntimeStatus | null;
1928
+ sessions?: Array<Pick<SessionState, 'session_key' | 'active' | 'unread_count'>>;
1929
+ pending_decisions?: number;
1930
+ human_delivery?: Pick<HumanDeliverySummary, 'pending_intents' | 'unresolved_intents' | 'failed_intents' | 'acknowledged_intents'> | null;
1931
+ transport_health?: Pick<TransportHealth, 'state' | 'last_error'> | null;
1932
+ blocked_reason?: string | null;
1933
+ }
1934
+ declare function describeOpenClawAgentState(state: OpenClawAgentLifecycleState): string;
1935
+ declare function nextActionForOpenClawAgentState(state: OpenClawAgentLifecycleState): string;
1936
+ declare function deriveOpenClawAgentState(input: DeriveOpenClawAgentStateInput): OpenClawAgentState;
1937
+
1938
+ type ActionInboxStatus = 'pending_approval' | 'pending_callback' | 'pending_escalation' | 'blocked' | 'degraded' | 'timed_out';
1939
+ type ActionInboxSource = 'decision' | 'notification_intent' | 'external_escalation' | 'runtime';
1940
+ interface ActionInboxItem {
1941
+ key: string;
1942
+ source: ActionInboxSource;
1943
+ status: ActionInboxStatus;
1944
+ risk_level: ActionRiskLevel;
1945
+ title: string;
1946
+ summary: string;
1947
+ required_action: string;
1948
+ consequence?: string;
1949
+ deadline?: number;
1950
+ overdue: boolean;
1951
+ session_key?: string;
1952
+ conversation_id?: string;
1953
+ owner_ref?: string;
1954
+ event_id?: number;
1955
+ intent_id?: number;
1956
+ escalation_id?: number;
1957
+ source_ref?: string;
1958
+ action_contract: ActionContract;
1959
+ }
1960
+ interface ActionInboxSummary {
1961
+ total: number;
1962
+ pending_approval: number;
1963
+ pending_callback: number;
1964
+ pending_escalation: number;
1965
+ blocked: number;
1966
+ degraded: number;
1967
+ timed_out: number;
1968
+ high_risk: number;
1969
+ critical_risk: number;
1970
+ by_status: Record<ActionInboxStatus, number>;
1971
+ by_risk: Record<ActionRiskLevel, number>;
1972
+ items: ActionInboxItem[];
1973
+ }
1974
+ interface BuildActionInboxSummaryInput {
1975
+ pending_decisions?: CollaborationDecisionView[];
1976
+ notification_intents?: NotificationIntent[];
1977
+ external_escalations?: ExternalEscalation[];
1978
+ agent_state?: OpenClawAgentState | null;
1979
+ include_runtime?: boolean;
1980
+ limit?: number;
1981
+ }
1982
+ declare function buildActionInboxSummary(input?: BuildActionInboxSummaryInput): ActionInboxSummary;
1983
+
1984
+ type RuntimeAdapterKind = 'openclaw' | 'managed_agents' | 'claude_code' | 'agent_sdk' | 'custom';
1985
+ type RuntimeAdapterStatus = 'available' | 'planned';
1986
+ interface RuntimeAdapterCapabilities {
1987
+ external_escalation: boolean;
1988
+ callback_resume: boolean;
1989
+ designated_routing: boolean;
1990
+ action_contracts: boolean;
1991
+ operator_callback_loop: boolean;
1992
+ }
1993
+ interface RuntimeAdapterDescriptor {
1994
+ id: RuntimeAdapterKind | string;
1995
+ label: string;
1996
+ status: RuntimeAdapterStatus;
1997
+ managed: boolean;
1998
+ description: string;
1999
+ capabilities: RuntimeAdapterCapabilities;
2000
+ }
2001
+ interface ExternalEscalationRequest {
2002
+ adapter: RuntimeAdapterKind | string;
2003
+ run_id?: string;
2004
+ workflow_id?: string;
2005
+ action_contract: ActionContract;
2006
+ callback_target?: string;
2007
+ callback_expires_at?: number;
2008
+ designated_targets?: string[];
2009
+ metadata?: Record<string, unknown>;
2010
+ }
2011
+ interface CallbackResumeRequest {
2012
+ adapter: RuntimeAdapterKind | string;
2013
+ run_id?: string;
2014
+ workflow_id?: string;
2015
+ response_state: ActionResponseState;
2016
+ action_contract?: ActionContract;
2017
+ callback_target?: string;
2018
+ response_payload?: Record<string, unknown>;
2019
+ message_ref?: string;
2020
+ responded_at?: number;
2021
+ approver_ref?: string;
2022
+ }
2023
+ interface CallbackResumeResult {
2024
+ accepted: boolean;
2025
+ adapter: RuntimeAdapterKind | string;
2026
+ run_id?: string;
2027
+ workflow_id?: string;
2028
+ response_state: ActionResponseState;
2029
+ reason?: string;
2030
+ resume_key?: string;
2031
+ }
2032
+ interface RuntimeAdapter {
2033
+ descriptor: RuntimeAdapterDescriptor;
2034
+ buildExternalEscalationRequest(input: Omit<ExternalEscalationRequest, 'adapter'>): ExternalEscalationRequest;
2035
+ buildCallbackResumeRequest(input: Omit<CallbackResumeRequest, 'adapter'>): CallbackResumeRequest;
2036
+ }
2037
+ declare function listRuntimeAdapterDescriptors(): RuntimeAdapterDescriptor[];
2038
+ declare function getRuntimeAdapterDescriptor(id: RuntimeAdapterKind | string): RuntimeAdapterDescriptor | undefined;
2039
+ declare function buildExternalEscalationRequest(input: ExternalEscalationRequest): ExternalEscalationRequest;
2040
+ declare function buildCallbackResumeRequest(input: CallbackResumeRequest): CallbackResumeRequest;
2041
+
1514
2042
  /**
1515
2043
  * A2A adapter for PingAgentClient.
1516
2044
  * Allows PingAgent to call external agents that speak the A2A protocol,
@@ -1726,33 +2254,6 @@ declare function clearSessionBindingAlert(conversationId: string, filePath?: str
1726
2254
  removed: boolean;
1727
2255
  };
1728
2256
 
1729
- type OpenClawAgentLifecycleState = 'activating' | 'ready_waiting_inbound' | 'active_session' | 'decision_pending' | 'human_delivery_pending' | 'human_delivery_acknowledged' | 'degraded' | 'blocked';
1730
- interface OpenClawAgentState {
1731
- state: OpenClawAgentLifecycleState;
1732
- summary: string;
1733
- reason?: string | null;
1734
- next_action: string;
1735
- active_session_key?: string | null;
1736
- pending_decisions: number;
1737
- human_delivery_pending: number;
1738
- human_delivery_unresolved: number;
1739
- human_delivery_failed: number;
1740
- human_delivery_acknowledged: number;
1741
- blocked: boolean;
1742
- degraded: boolean;
1743
- }
1744
- interface DeriveOpenClawAgentStateInput {
1745
- runtime_status?: OpenClawIngressRuntimeStatus | null;
1746
- sessions?: Array<Pick<SessionState, 'session_key' | 'active' | 'unread_count'>>;
1747
- pending_decisions?: number;
1748
- human_delivery?: Pick<HumanDeliverySummary, 'pending_intents' | 'unresolved_intents' | 'failed_intents' | 'acknowledged_intents'> | null;
1749
- transport_health?: Pick<TransportHealth, 'state' | 'last_error'> | null;
1750
- blocked_reason?: string | null;
1751
- }
1752
- declare function describeOpenClawAgentState(state: OpenClawAgentLifecycleState): string;
1753
- declare function nextActionForOpenClawAgentState(state: OpenClawAgentLifecycleState): string;
1754
- declare function deriveOpenClawAgentState(input: DeriveOpenClawAgentStateInput): OpenClawAgentState;
1755
-
1756
2257
  interface OpenClawDeliveryContext {
1757
2258
  channel?: string;
1758
2259
  to?: string;
@@ -1788,4 +2289,4 @@ declare function getOpenClawSessionEntry(sessionKey: string, filePath?: string):
1788
2289
  declare function deriveOwnerRefFromOpenClawSessionEntry(entry: OpenClawSessionEntryRecord): string | undefined;
1789
2290
  declare function buildHumanDeliveryBindingCandidate(sessionKey: string, filePath?: string): OpenClawHumanDeliveryBindingCandidate | null;
1790
2291
 
1791
- export { A2AAdapter, type A2AAdapterOptions, type A2ATaskResult, type AgentEncryptionCard, type AgentProfile, type CapabilityCard, type CapabilityCardItem, type CapabilityContactMode, type ClientOptions, type CollaborationApprovalStatus, type CollaborationDecisionView, type CollaborationEvent, type CollaborationEventInput, CollaborationEventManager, type CollaborationEventSeverity, type CollaborationEventSummary, type CollaborationEventType, type CollaborationProjectionKind, type CollaborationProjectionOutboxEntry, type CollaborationProjectionOutboxInput, CollaborationProjectionOutboxManager, type CollaborationProjectionOutboxStatus, type CollaborationProjectionPreset, type Contact, type ContactCardShare, ContactManager, type ContactPolicyAction, type ContactPolicyDecision, type ConversationEntry, type ConversationListResponse, type DeliveryTimelineEntry, type DeriveOpenClawAgentStateInput, type DirectoryBrowseResponse, type DirectorySelfResponse, type EncryptedPayloadWrapper, type EncryptionIdentityFields, type EncryptionPrivateKeyJwk, type EncryptionPublicKeyJwk, type FeedByDidResponse, type FeedPost, type FeedPublicResponse, type FetchResponse, HUMAN_DELIVERY_CHANNELS, HistoryManager, HttpTransport, type HumanDeliveryBinding, type HumanDeliveryBindingInput, HumanDeliveryBindingManager, type HumanDeliveryBindingStatus, type HumanDeliveryChannel, type HumanDeliveryChannelCapability, type HumanDeliverySummary, LocalStore, type ManagedTransportSwitchResult, type MarkOperatorSeenInput, type NotificationIntent, type NotificationIntentBindingScope, type NotificationIntentInput, NotificationIntentManager, type NotificationIntentStatus, type NotificationIntentType, type NotificationOverride, type OpenClawAgentLifecycleState, type OpenClawAgentState, type OpenClawDeliveryContext, type OpenClawHumanDeliveryBindingCandidate, type OpenClawIngressRuntimeStatus, type OpenClawSessionEntryRecord, type OpenClawTransportMode, type OperatorSeenState, OperatorSeenStateManager, type OperatorSeenStateOperatorId, type OperatorSeenStateScopeType, PingAgentClient, type ProjectionDisposition, type ProjectionDispositionInput, type ProjectionDispositionResult, type ProjectionPreviewEntry, type PublicAgentProfile, type PublicLinkState, type RecommendationSummary, type ReplyTarget, type ResolveCollaborationApprovalInput, type ResolveCollaborationApprovalResult, type ResolveHumanDeliveryBindingInput, type ResolveHumanDeliveryBindingResult, type RuntimeMode, SESSION_SUMMARY_FIELDS, type SendResponse, type SessionBindingAlert, type SessionBindingEntry, SessionManager, type SessionMessageInput, type SessionState, type SessionSummary, type SessionSummaryFieldKey, SessionSummaryManager, type SessionSummaryUpsert, type SinceLastSeenSummary, type StoredMessage, type StoredTrustRecommendation, type SubscriptionResponse, type SubscriptionUsage, type SyncTrustRecommendationsInput, type TaskHandoff, TaskHandoffManager, type TaskHandoffPayload, type TaskHandoffUpsert, type TaskPolicyAction, type TaskPolicyDecision, type TaskResult, type TaskShareEntry, type TaskThread, TaskThreadManager, type TaskThreadStatus, type TaskThreadUpsert, type TransportHealth, type TransportHealthState, type TransportOptions, type TransportPreferenceState, type TrustPolicyAuditEvent, type TrustPolicyAuditEventType, type TrustPolicyAuditInput, TrustPolicyAuditManager, type TrustPolicyAuditSummary, type TrustPolicyContext, type TrustPolicyDoc, type TrustPolicyLearningSummary, type TrustPolicyRecommendation, TrustRecommendationManager, type TrustRecommendationStatus, type TrustState, type UpdateProfileInput, type UserWakeEvent, UserWakeSubscription, type UserWakeSubscriptionOptions, WsSubscription, type WsSubscriptionOptions, buildDecisionReminderOutboxMessage, buildDeliveryTimeline, buildHumanDeliveryBindingCandidate, buildHumanDeliveryPayload, buildNotificationIntentInputFromProjectionOutbox, buildProjectionPreview, buildSessionKey, buildSessionSummaryHandoffText, buildTrustPolicyRecommendations, capabilityCardToLegacyCapabilities, clearSessionBindingAlert, decideContactPolicy, decideTaskPolicy, decryptPayloadForIdentity, defaultTrustPolicyDoc, deriveOpenClawAgentState, deriveOwnerRefFromOpenClawSessionEntry, deriveTransportHealth, describeOpenClawAgentState, describeProjectionPreset, encryptPayloadForRecipients, ensureIdentityEncryptionKeys, ensureTokenValid, formatCapabilityCardSummary, generateIdentity, getActiveSessionFilePath, getIdentityPath, getIngressRuntimeStatusFilePath, getOpenClawConfigFilePath, getOpenClawSessionEntry, getOpenClawSessionStorePath, getProfile, getProjectedEventTypes, getProjectionDisposition, getRootDir, getSessionBindingAlertsFilePath, getSessionMapFilePath, getStorePath, getTransportPreferenceFilePath, getTrustRecommendationActionLabel, hasDecisionPromptOutbox, identityExists, isEncryptedPayload, listOpenClawSessionEntries, listPendingDecisionViews, listRecentBindingsForSession, loadIdentity, matchesTrustPolicyRule, nextActionForOpenClawAgentState, normalizeCapabilityCard, normalizeTransportMode, normalizeTrustPolicyDoc, parseNotificationOverride, previewFromPayload, readCurrentActiveSessionKey, readIngressRuntimeStatus, readSessionBindingAlerts, readSessionBindings, readTransportPreference, removeSessionBinding, resolveHumanDeliveryBinding, saveIdentity, setSessionBinding, shouldEncryptConversationPayload, summarizeHumanDelivery, summarizeSinceLastSeen, summarizeTrustPolicyAudit, switchTransportPreference, updateStoredToken, upsertSessionBindingAlert, upsertTrustPolicyRecommendation, writeSessionBindingAlerts, writeSessionBindings, writeTransportPreference };
2292
+ export { A2AAdapter, type A2AAdapterOptions, type A2ATaskResult, type ActionArtifact, type ActionCallbackIntent, type ActionCallbackIntentBindingScope, type ActionCallbackIntentInput, NotificationIntentManager as ActionCallbackIntentManager, type ActionCallbackIntentStatus, type ActionCallbackIntentType, type ActionContract, type ActionInboxItem, type ActionInboxSource, type ActionInboxStatus, type ActionInboxSummary, type ActionMessageType, type ActionPolicyScope, type ActionResponseState, type ActionRiskLevel, type ActionSensitivity, type ActionTargetClass, type AgentEncryptionCard, type AgentProfile, type BuildActionContractInput, type BuildActionInboxSummaryInput, type CallbackResumeDeliveryStatus, CallbackResumeManager, type CallbackResumeRequest, type CallbackResumeResult, type CapabilityCard, type CapabilityCardItem, type CapabilityContactMode, type CapabilityToken, type CapabilityTokenConsumeInput, type CapabilityTokenIssueInput, CapabilityTokenManager, type CapabilityTokenStatus, type ClientOptions, type CollaborationApprovalStatus, type CollaborationDecisionView, type CollaborationEvent, type CollaborationEventInput, CollaborationEventManager, type CollaborationEventSeverity, type CollaborationEventSummary, type CollaborationEventType, type CollaborationProjectionKind, type CollaborationProjectionOutboxEntry, type CollaborationProjectionOutboxInput, CollaborationProjectionOutboxManager, type CollaborationProjectionOutboxStatus, type CollaborationProjectionPreset, type Contact, type ContactCardShare, ContactManager, type ContactPolicyAction, type ContactPolicyDecision, type ConversationEntry, type ConversationListResponse, type DeliveryTimelineEntry, type DeriveOpenClawAgentStateInput, type DirectoryBrowseResponse, type DirectorySelfResponse, type EncryptedPayloadWrapper, type EncryptionIdentityFields, type EncryptionPrivateKeyJwk, type EncryptionPublicKeyJwk, type EnqueueOpenClawEscalationInput, type ExternalEscalation, type ExternalEscalationDetail, type ExternalEscalationInput, ExternalEscalationManager, type ExternalEscalationRequest, type ExternalEscalationStatus, type ExternalTargetBinding, type ExternalTargetBindingInput, HumanDeliveryBindingManager as ExternalTargetBindingManager, type ExternalTargetBindingStatus, type FeedByDidResponse, type FeedPost, type FeedPublicResponse, type FetchResponse, HUMAN_DELIVERY_CHANNELS, HistoryManager, HttpTransport, type HumanDeliveryBinding, type HumanDeliveryBindingInput, HumanDeliveryBindingManager, type HumanDeliveryBindingStatus, type HumanDeliveryChannel, type HumanDeliveryChannelCapability, type HumanDeliverySummary, LocalStore, type ManagedTransportSwitchResult, type MarkOperatorSeenInput, type NotificationIntent, type NotificationIntentBindingScope, type NotificationIntentInput, NotificationIntentManager, type NotificationIntentStatus, type NotificationIntentType, type NotificationOverride, type OpenClawAdapterOverview, type OpenClawAgentLifecycleState, type OpenClawAgentState, type OpenClawDeliveryContext, OpenClawExecutionAdapter, type OpenClawExecutionAdapterHealth, type OpenClawHookClientOptions, type OpenClawHookHealth, type OpenClawHookSendInput, OpenClawHooksClient, type OpenClawHumanDeliveryBindingCandidate, type OpenClawIngressRuntimeStatus, type OpenClawSessionEntryRecord, type OpenClawTransportMode, type OperatorSeenState, OperatorSeenStateManager, type OperatorSeenStateOperatorId, type OperatorSeenStateScopeType, PingAgentClient, type ProjectionDisposition, type ProjectionDispositionInput, type ProjectionDispositionResult, type ProjectionPreviewEntry, type PublicAgentProfile, type PublicLinkState, type RecommendationSummary, type ReplyTarget, type ResolveCollaborationApprovalInput, type ResolveCollaborationApprovalResult, type ResolveHumanDeliveryBindingInput, type ResolveHumanDeliveryBindingResult, type ResumeOpenClawCallbackInput, type RuntimeAdapter, type RuntimeAdapterCapabilities, type RuntimeAdapterDescriptor, type RuntimeAdapterKind, type RuntimeAdapterStatus, type RuntimeMode, type RuntimeRun, type RuntimeRunInput, RuntimeRunManager, type RuntimeRunStatus, SESSION_SUMMARY_FIELDS, type SendResponse, type SessionBindingAlert, type SessionBindingEntry, SessionManager, type SessionMessageInput, type SessionState, type SessionSummary, type SessionSummaryFieldKey, SessionSummaryManager, type SessionSummaryUpsert, type SinceLastSeenSummary, type StoredCallbackResume, type StoredCallbackResumeInput, type StoredMessage, type StoredTrustRecommendation, type SubscriptionResponse, type SubscriptionUsage, type SyncTrustRecommendationsInput, type TaskHandoff, TaskHandoffManager, type TaskHandoffPayload, type TaskHandoffUpsert, type TaskPolicyAction, type TaskPolicyDecision, type TaskResult, type TaskShareEntry, type TaskThread, TaskThreadManager, type TaskThreadStatus, type TaskThreadUpsert, type TransportHealth, type TransportHealthState, type TransportOptions, type TransportPreferenceState, type TrustPolicyAuditEvent, type TrustPolicyAuditEventType, type TrustPolicyAuditInput, TrustPolicyAuditManager, type TrustPolicyAuditSummary, type TrustPolicyContext, type TrustPolicyDoc, type TrustPolicyLearningSummary, type TrustPolicyRecommendation, TrustRecommendationManager, type TrustRecommendationStatus, type TrustState, type UpdateProfileInput, type UserWakeEvent, UserWakeSubscription, type UserWakeSubscriptionOptions, WsSubscription, type WsSubscriptionOptions, actionDeadlineStatus, actionRiskRank, buildActionContract, buildActionContractForDecisionView, buildActionContractForNotificationIntent, buildActionInboxSummary, buildCallbackResumeRequest, buildDecisionReminderOutboxMessage, buildDeliveryTimeline, buildExternalEscalationRequest, buildHumanDeliveryBindingCandidate, buildHumanDeliveryPayload, buildNotificationIntentInputFromProjectionOutbox, buildProjectionPreview, buildSessionKey, buildSessionSummaryHandoffText, buildTrustPolicyRecommendations, capabilityCardToLegacyCapabilities, clearSessionBindingAlert, decideContactPolicy, decideTaskPolicy, decryptPayloadForIdentity, defaultTrustPolicyDoc, deriveOpenClawAgentState, deriveOwnerRefFromOpenClawSessionEntry, deriveTransportHealth, describeOpenClawAgentState, describeProjectionPreset, encryptPayloadForRecipients, ensureIdentityEncryptionKeys, ensureTokenValid, formatCapabilityCardSummary, generateIdentity, getActiveSessionFilePath, getIdentityPath, getIngressRuntimeStatusFilePath, getOpenClawConfigFilePath, getOpenClawSessionEntry, getOpenClawSessionStorePath, getProfile, getProjectedEventTypes, getProjectionDisposition, getRootDir, getRuntimeAdapterDescriptor, getSessionBindingAlertsFilePath, getSessionMapFilePath, getStorePath, getTransportPreferenceFilePath, getTrustRecommendationActionLabel, hasDecisionPromptOutbox, identityExists, isEncryptedPayload, listOpenClawSessionEntries, listPendingDecisionViews, listRecentBindingsForSession, listRuntimeAdapterDescriptors, loadIdentity, matchesTrustPolicyRule, nextActionForOpenClawAgentState, normalizeCapabilityCard, normalizeTransportMode, normalizeTrustPolicyDoc, parseNotificationOverride, previewFromPayload, readCurrentActiveSessionKey, readIngressRuntimeStatus, readSessionBindingAlerts, readSessionBindings, readTransportPreference, removeSessionBinding, resolveHumanDeliveryBinding, saveIdentity, setSessionBinding, shouldEncryptConversationPayload, summarizeHumanDelivery, summarizeSinceLastSeen, summarizeTrustPolicyAudit, switchTransportPreference, synthesizeOpenClawRunId, synthesizeOpenClawWorkflowId, updateStoredToken, upsertSessionBindingAlert, upsertTrustPolicyRecommendation, writeSessionBindingAlerts, writeSessionBindings, writeTransportPreference };