@inferencesh/sdk 0.6.30 → 0.6.47

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.
Files changed (53) hide show
  1. package/README.md +35 -0
  2. package/dist/agent/actions.js +72 -13
  3. package/dist/agent/api.d.ts +30 -51
  4. package/dist/agent/api.js +129 -154
  5. package/dist/agent/provider.js +18 -1
  6. package/dist/agent/reducer.js +50 -11
  7. package/dist/agent/types.d.ts +34 -1
  8. package/dist/api/agents.d.ts +23 -14
  9. package/dist/api/agents.js +22 -4
  10. package/dist/api/api-keys.d.ts +4 -3
  11. package/dist/api/apps.d.ts +16 -15
  12. package/dist/api/chats.d.ts +14 -9
  13. package/dist/api/chats.js +6 -0
  14. package/dist/api/engines.d.ts +14 -13
  15. package/dist/api/files.d.ts +4 -3
  16. package/dist/api/files.js +2 -2
  17. package/dist/api/flow-runs.d.ts +8 -7
  18. package/dist/api/flows.d.ts +11 -10
  19. package/dist/api/integrations.d.ts +9 -8
  20. package/dist/api/integrations.js +8 -8
  21. package/dist/api/knowledge.d.ts +25 -24
  22. package/dist/api/mcp-servers.d.ts +10 -9
  23. package/dist/api/projects.d.ts +6 -5
  24. package/dist/api/search.d.ts +3 -2
  25. package/dist/api/secrets.d.ts +6 -5
  26. package/dist/api/sessions.d.ts +5 -4
  27. package/dist/api/sessions.js +2 -3
  28. package/dist/api/tasks.d.ts +14 -11
  29. package/dist/api/tasks.js +10 -4
  30. package/dist/api/teams.d.ts +16 -17
  31. package/dist/delta.d.ts +15 -0
  32. package/dist/delta.js +84 -0
  33. package/dist/hook-builder.d.ts +23 -0
  34. package/dist/hook-builder.js +50 -0
  35. package/dist/http/client.d.ts +9 -1
  36. package/dist/http/client.js +12 -3
  37. package/dist/http/response.d.ts +9 -0
  38. package/dist/http/response.js +1 -0
  39. package/dist/http/stream.d.ts +1 -0
  40. package/dist/http/stream.js +8 -3
  41. package/dist/http/streamable.d.ts +3 -1
  42. package/dist/http/streamable.js +10 -1
  43. package/dist/index.d.ts +11 -5
  44. package/dist/index.js +6 -1
  45. package/dist/proxy/index.d.ts +2 -0
  46. package/dist/proxy/index.js +9 -0
  47. package/dist/tool-builder.d.ts +2 -0
  48. package/dist/tool-builder.js +5 -0
  49. package/dist/types.d.ts +1041 -157
  50. package/dist/types.js +230 -30
  51. package/dist/utils.d.ts +13 -0
  52. package/dist/utils.js +43 -3
  53. package/package.json +8 -5
package/dist/types.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface InternalToolsConfig {
8
8
  finish?: boolean;
9
9
  skills?: boolean;
10
10
  host_context?: boolean;
11
+ meta?: boolean;
11
12
  }
12
13
  /**
13
14
  * AgentTool represents a unified tool that can be used by an agent
@@ -198,6 +199,7 @@ export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
198
199
  skills: SkillConfig[];
199
200
  context?: ContextField[];
200
201
  internal_tools?: InternalToolsConfig;
202
+ hooks?: LifecycleHookConfig[];
201
203
  output_schema?: any;
202
204
  }
203
205
  /**
@@ -229,6 +231,7 @@ export interface AgentConfigInput {
229
231
  skills?: SkillConfig[];
230
232
  context?: ContextField[];
231
233
  internal_tools?: InternalToolsConfig;
234
+ hooks?: LifecycleHookConfig[];
232
235
  output_schema?: any;
233
236
  }
234
237
  /**
@@ -253,6 +256,7 @@ export interface AgentRunDTO extends BaseModelDTO, PermissionModelDTO {
253
256
  interrupt_reason?: InterruptReason;
254
257
  interrupt_tool_id?: string;
255
258
  interrupt_meta?: any;
259
+ tool_invocation_id?: string;
256
260
  trigger_id?: string;
257
261
  metadata?: any;
258
262
  }
@@ -270,6 +274,19 @@ export interface APIError {
270
274
  [key: string]: any;
271
275
  };
272
276
  }
277
+ /**
278
+ * ResponseMessage carries a non-error notice alongside a successful response.
279
+ * Inspired by GraphQL's coexisting data+errors pattern, but for actionable
280
+ * messages (warnings, info) rather than partial failures.
281
+ */
282
+ export interface ResponseMessage {
283
+ level: string;
284
+ code: string;
285
+ message: string;
286
+ meta?: {
287
+ [key: string]: any;
288
+ };
289
+ }
273
290
  /**
274
291
  * ApiAppRunRequest is the request body for /apps/run endpoint.
275
292
  */
@@ -298,7 +315,7 @@ export interface ApiAgentRunRequest {
298
315
  agent?: string;
299
316
  agent_config?: AgentConfigInput;
300
317
  agent_name?: string;
301
- input: ChatTaskInput;
318
+ input: LLMInput;
302
319
  context?: {
303
320
  [key: string]: string;
304
321
  };
@@ -313,7 +330,7 @@ export interface CreateAgentMessageRequest {
313
330
  agent_version_id?: string;
314
331
  agent?: string;
315
332
  tool_call_id?: string;
316
- input: ChatTaskInput;
333
+ input: LLMInput;
317
334
  integration_context?: IntegrationContext;
318
335
  agent_config?: AgentConfigInput;
319
336
  agent_name?: string;
@@ -415,7 +432,10 @@ export interface CheckoutCreateRequest {
415
432
  export interface AuthResponse {
416
433
  user?: UserDTO;
417
434
  session_id: string;
435
+ is_new?: boolean;
418
436
  otp_required?: boolean;
437
+ otp_method?: string;
438
+ challenge_token?: string;
419
439
  redirect_to?: string;
420
440
  provider?: string;
421
441
  }
@@ -469,6 +489,7 @@ export interface SecretCreateRequest {
469
489
  key: string;
470
490
  value: string;
471
491
  description?: string;
492
+ provider?: string;
472
493
  }
473
494
  export interface SecretUpdateRequest {
474
495
  value: string;
@@ -777,6 +798,16 @@ export declare const ScopeApiKeysRead: Scope;
777
798
  * Empty scopes = full access (for backwards compatibility with existing keys).
778
799
  */
779
800
  export declare const ScopeApiKeysWrite: Scope;
801
+ /**
802
+ * Action-level scopes for Knowledge (includes skills)
803
+ */
804
+ export declare const ScopeKnowledgeRead: Scope;
805
+ /**
806
+ * API Key Scopes - hierarchical permission system.
807
+ * Resource-level scopes (e.g., "agents") imply all action-level scopes (e.g., "agents:read").
808
+ * Empty scopes = full access (for backwards compatibility with existing keys).
809
+ */
810
+ export declare const ScopeKnowledgeWrite: Scope;
780
811
  /**
781
812
  * Action-level scopes for User profile
782
813
  */
@@ -814,6 +845,7 @@ export declare const ScopeGroupSecrets: ScopeGroup;
814
845
  export declare const ScopeGroupIntegrations: ScopeGroup;
815
846
  export declare const ScopeGroupEngines: ScopeGroup;
816
847
  export declare const ScopeGroupApiKeys: ScopeGroup;
848
+ export declare const ScopeGroupKnowledge: ScopeGroup;
817
849
  export declare const ScopeGroupUser: ScopeGroup;
818
850
  export declare const ScopeGroupSettings: ScopeGroup;
819
851
  /**
@@ -1063,6 +1095,7 @@ export interface PublicAppStoreDTO {
1063
1095
  rank: number;
1064
1096
  has_approved_version: boolean;
1065
1097
  page_id?: string;
1098
+ pricing_description?: string;
1066
1099
  }
1067
1100
  /**
1068
1101
  * AuthSessionDTO is a safe representation of AuthSession for API responses.
@@ -1133,6 +1166,53 @@ export interface AvailabilityResponse {
1133
1166
  */
1134
1167
  reason?: string;
1135
1168
  }
1169
+ /**
1170
+ * BountyProgramDTO is the API representation of a bounty program.
1171
+ */
1172
+ export interface BountyProgramDTO extends BaseModelDTO, PermissionModelDTO {
1173
+ name: string;
1174
+ description: string;
1175
+ amount_microcents: number;
1176
+ grant_type: string;
1177
+ expiry_days: number;
1178
+ max_per_user: number;
1179
+ max_per_day: number;
1180
+ proof_type: string;
1181
+ proof_min_length: number;
1182
+ status: string;
1183
+ notice_text: string;
1184
+ notice_cooldown_hours: number;
1185
+ notice_priority: number;
1186
+ starts_at?: string;
1187
+ ends_at?: string;
1188
+ }
1189
+ /**
1190
+ * BountySubmissionDTO is the API representation of a bounty claim.
1191
+ */
1192
+ export interface BountySubmissionDTO extends BaseModelDTO, PermissionModelDTO {
1193
+ bounty_id: string;
1194
+ resource_id?: string;
1195
+ proof_id: string;
1196
+ proof_ref: string;
1197
+ agent?: string;
1198
+ source?: string;
1199
+ }
1200
+ /**
1201
+ * SubmitBountyRequest is used to claim a bounty reward.
1202
+ */
1203
+ export interface SubmitBountyRequest {
1204
+ bounty_id: string;
1205
+ proof_id: string;
1206
+ agent?: string;
1207
+ source?: string;
1208
+ }
1209
+ /**
1210
+ * SubmitBountyResponse is returned when claiming a bounty.
1211
+ */
1212
+ export interface SubmitBountyResponse {
1213
+ submission: BountySubmissionDTO;
1214
+ granted_amount?: number;
1215
+ }
1136
1216
  /**
1137
1217
  * ChatDTO for API responses
1138
1218
  */
@@ -1154,6 +1234,7 @@ export interface ChatDTO extends BaseModelDTO, PermissionModelDTO {
1154
1234
  chat_messages: ChatMessageDTO[];
1155
1235
  agent_data: ChatData;
1156
1236
  active_run?: AgentRunDTO;
1237
+ pending_interrupts?: InterruptDTO[];
1157
1238
  }
1158
1239
  /**
1159
1240
  * ChatMessageDTO for API responses
@@ -1222,6 +1303,12 @@ export interface CursorListResponse<T extends any> {
1222
1303
  items_per_page: number;
1223
1304
  total_items: number;
1224
1305
  }
1306
+ /**
1307
+ * CountResponse is the response for count endpoints.
1308
+ */
1309
+ export interface CountResponse {
1310
+ count: number;
1311
+ }
1225
1312
  /**
1226
1313
  * EngineConfig holds engine configuration (no gorm tags).
1227
1314
  */
@@ -1419,6 +1506,15 @@ export interface FlowNodeData {
1419
1506
  additional?: any;
1420
1507
  task?: TaskDTO;
1421
1508
  task_id?: string;
1509
+ /**
1510
+ * Primitive node configs (legacy, kept for backward compat)
1511
+ */
1512
+ gate_condition?: GateCondition;
1513
+ selector_config?: SelectorConfig;
1514
+ /**
1515
+ * Unified utility node config (replaces gate_condition/selector_config)
1516
+ */
1517
+ utility?: UtilityConfig;
1422
1518
  }
1423
1519
  /**
1424
1520
  * FlowNodeDataMap maps node IDs to their data
@@ -1489,6 +1585,190 @@ export interface FlowRunDTO extends BaseModelDTO, PermissionModelDTO {
1489
1585
  node_tasks: {
1490
1586
  [key: string]: NodeTaskDTO | undefined;
1491
1587
  };
1588
+ node_statuses?: {
1589
+ [key: string]: GraphNodeStatus;
1590
+ };
1591
+ node_outputs: any;
1592
+ }
1593
+ /**
1594
+ * FlowActionType is the string type for action constants.
1595
+ */
1596
+ export type FlowActionType = string;
1597
+ /**
1598
+ * Flow graph action type constants.
1599
+ */
1600
+ export declare const ActionNodeAdd: FlowActionType;
1601
+ /**
1602
+ * Flow graph action type constants.
1603
+ */
1604
+ export declare const ActionNodeRemove: FlowActionType;
1605
+ /**
1606
+ * Flow graph action type constants.
1607
+ */
1608
+ export declare const ActionNodeMove: FlowActionType;
1609
+ /**
1610
+ * Flow graph action type constants.
1611
+ */
1612
+ export declare const ActionNodeMoveMany: FlowActionType;
1613
+ /**
1614
+ * Flow graph action type constants.
1615
+ */
1616
+ export declare const ActionNodeDuplicate: FlowActionType;
1617
+ /**
1618
+ * Flow graph action type constants.
1619
+ */
1620
+ export declare const ActionNodeRename: FlowActionType;
1621
+ /**
1622
+ * Flow graph action type constants.
1623
+ */
1624
+ export declare const ActionNodeSetApp: FlowActionType;
1625
+ /**
1626
+ * Flow graph action type constants.
1627
+ */
1628
+ export declare const ActionNodeUpdate: FlowActionType;
1629
+ /**
1630
+ * Flow graph action type constants.
1631
+ */
1632
+ export declare const ActionNodeSetInput: FlowActionType;
1633
+ /**
1634
+ * Flow graph action type constants.
1635
+ */
1636
+ export declare const ActionNodeClearInput: FlowActionType;
1637
+ /**
1638
+ * Flow graph action type constants.
1639
+ */
1640
+ export declare const ActionEdgeAdd: FlowActionType;
1641
+ /**
1642
+ * Flow graph action type constants.
1643
+ */
1644
+ export declare const ActionEdgeRemove: FlowActionType;
1645
+ /**
1646
+ * Flow graph action type constants.
1647
+ */
1648
+ export declare const ActionFlowSetInputSchema: FlowActionType;
1649
+ /**
1650
+ * Flow graph action type constants.
1651
+ */
1652
+ export declare const ActionFlowSetOutputSchema: FlowActionType;
1653
+ /**
1654
+ * Flow graph action type constants.
1655
+ */
1656
+ export declare const ActionFlowSetOutputMapping: FlowActionType;
1657
+ /**
1658
+ * Flow graph action type constants.
1659
+ */
1660
+ export declare const ActionFlowRemoveOutputMapping: FlowActionType;
1661
+ /**
1662
+ * Flow graph action type constants.
1663
+ */
1664
+ export declare const ActionFlowRenameOutputField: FlowActionType;
1665
+ /**
1666
+ * Flow graph action type constants.
1667
+ */
1668
+ export declare const ActionUndo: FlowActionType;
1669
+ /**
1670
+ * Flow graph action type constants.
1671
+ */
1672
+ export declare const ActionRedo: FlowActionType;
1673
+ /**
1674
+ * FlowAction represents a single graph mutation.
1675
+ */
1676
+ export interface FlowAction {
1677
+ type: FlowActionType;
1678
+ payload: any;
1679
+ }
1680
+ /**
1681
+ * FlowActionsRequest is the request body for POST /flows/{id}/actions.
1682
+ */
1683
+ export interface FlowActionsRequest {
1684
+ actions: FlowAction[];
1685
+ }
1686
+ /**
1687
+ * FlowActionsResponse is the response from the actions endpoint.
1688
+ */
1689
+ export interface FlowActionsResponse {
1690
+ version: number;
1691
+ actions: FlowAction[];
1692
+ errors?: FlowActionError[];
1693
+ }
1694
+ /**
1695
+ * FlowActionError is an error returned from an action.
1696
+ */
1697
+ export interface FlowActionError {
1698
+ type?: string;
1699
+ message: string;
1700
+ }
1701
+ export interface AddNodePayload {
1702
+ id: string;
1703
+ type: string;
1704
+ position: FlowNodePosition;
1705
+ data: FlowNodeData;
1706
+ }
1707
+ export interface RemoveNodePayload {
1708
+ id: string;
1709
+ }
1710
+ export interface MoveNodePayload {
1711
+ id: string;
1712
+ position: FlowNodePosition;
1713
+ }
1714
+ export interface MoveNodesPayload {
1715
+ positions: {
1716
+ [key: string]: FlowNodePosition;
1717
+ };
1718
+ }
1719
+ export interface DuplicateNodePayload {
1720
+ source_id: string;
1721
+ new_id: string;
1722
+ offset: FlowNodePosition;
1723
+ }
1724
+ export interface RenameNodePayload {
1725
+ old_id: string;
1726
+ new_id: string;
1727
+ }
1728
+ export interface SetNodeAppPayload {
1729
+ node_id: string;
1730
+ app_id: string;
1731
+ app_version_id: string;
1732
+ function: string;
1733
+ }
1734
+ export interface UpdateNodeDataPayload {
1735
+ node_id: string;
1736
+ patch: {
1737
+ [key: string]: any;
1738
+ };
1739
+ }
1740
+ export interface SetInputPayload {
1741
+ node_id: string;
1742
+ input_key: string;
1743
+ input: FlowRunInput;
1744
+ }
1745
+ export interface ClearInputPayload {
1746
+ node_id: string;
1747
+ input_key: string;
1748
+ }
1749
+ export interface AddEdgePayload {
1750
+ id: string;
1751
+ source: string;
1752
+ target: string;
1753
+ source_handle?: string;
1754
+ target_handle?: string;
1755
+ }
1756
+ export interface RemoveEdgePayload {
1757
+ id: string;
1758
+ }
1759
+ export interface SetSchemaPayload {
1760
+ schema: any;
1761
+ }
1762
+ export interface SetOutputMappingPayload {
1763
+ field: string;
1764
+ mapping: OutputFieldMapping;
1765
+ }
1766
+ export interface RemoveOutputMappingPayload {
1767
+ field: string;
1768
+ }
1769
+ export interface RenameOutputFieldPayload {
1770
+ old_field: string;
1771
+ new_field: string;
1492
1772
  }
1493
1773
  /**
1494
1774
  * GraphNodeDTO is the API representation of a graph node
@@ -1596,6 +1876,7 @@ export interface InstanceTypeBootTime {
1596
1876
  */
1597
1877
  export interface IntegrationDTO extends BaseModelDTO, PermissionModelDTO {
1598
1878
  scope: IntegrationScope;
1879
+ grant?: IntegrationGrant;
1599
1880
  provider: IntegrationProvider;
1600
1881
  type: IntegrationAuthType;
1601
1882
  auth: IntegrationAuthType;
@@ -1631,6 +1912,7 @@ export interface IntegrationConfigDTO {
1631
1912
  allows_byok: boolean;
1632
1913
  available: boolean;
1633
1914
  has_managed: boolean;
1915
+ grant?: IntegrationGrant;
1634
1916
  integration?: IntegrationDTO;
1635
1917
  }
1636
1918
  /**
@@ -1643,6 +1925,20 @@ export interface SecretFieldConfig {
1643
1925
  sensitive: boolean;
1644
1926
  optional: boolean;
1645
1927
  }
1928
+ export interface InterruptDTO extends BaseModelDTO, PermissionModelDTO {
1929
+ run_id: string;
1930
+ chat_id: string;
1931
+ reason: InterruptReason;
1932
+ source: string;
1933
+ resource_id?: string;
1934
+ resource_type?: InterruptResourceType;
1935
+ status: InterruptStatus;
1936
+ resolution?: InterruptResolution;
1937
+ resolved_at?: string;
1938
+ resolved_data?: any;
1939
+ expires_at?: string;
1940
+ meta?: any;
1941
+ }
1646
1942
  /**
1647
1943
  * KnowledgeFile represents a file in a knowledge entry
1648
1944
  */
@@ -1711,6 +2007,8 @@ export interface KnowledgeVersionDTO extends BaseModelDTO {
1711
2007
  metadata?: {
1712
2008
  [key: string]: string;
1713
2009
  };
2010
+ origin?: string;
2011
+ generated_by?: string;
1714
2012
  source_url?: string;
1715
2013
  mutation_type?: string;
1716
2014
  version_notes?: string;
@@ -1786,6 +2084,77 @@ export interface SkillStoreListingDTO {
1786
2084
  uses: number;
1787
2085
  tags?: string[];
1788
2086
  }
2087
+ /**
2088
+ * LifecycleHookConfig registers a handler for an agent lifecycle event.
2089
+ * Stored on AgentVersion alongside Tools and Skills.
2090
+ */
2091
+ export interface LifecycleHookConfig {
2092
+ event: HookEvent;
2093
+ type: HookHandlerType;
2094
+ handler?: string;
2095
+ async?: boolean;
2096
+ timeout?: number;
2097
+ /**
2098
+ * Gate-specific fields (type: "gate")
2099
+ */
2100
+ default_resolution?: InterruptResolution;
2101
+ }
2102
+ /**
2103
+ * LifecycleHookPayload is sent to hook handlers on lifecycle events.
2104
+ */
2105
+ export interface LifecycleHookPayload {
2106
+ event: HookEvent;
2107
+ timestamp: string;
2108
+ agent_id: string;
2109
+ chat_id: string;
2110
+ run_id?: string;
2111
+ turn_count: number;
2112
+ data?: any;
2113
+ }
2114
+ /**
2115
+ * LifecycleHookResponse is returned by hook handlers.
2116
+ * All fields are optional — an empty 200 response is equivalent to {decision: "allow"}.
2117
+ */
2118
+ export interface LifecycleHookResponse {
2119
+ inject?: ContextInjection;
2120
+ decision?: HookDecision;
2121
+ reason?: string;
2122
+ override?: any;
2123
+ system?: string;
2124
+ }
2125
+ /**
2126
+ * ContextInjection adds ephemeral content to the agent's context window.
2127
+ * Injections are stored as ChatMessages and filtered at context-build time.
2128
+ */
2129
+ export interface ContextInjection {
2130
+ content: string;
2131
+ role?: string;
2132
+ ttl_turns?: number;
2133
+ dedup_key?: string;
2134
+ }
2135
+ /**
2136
+ * ToolCallEventData is the typed payload for agent.tool_call events.
2137
+ */
2138
+ export interface ToolCallEventData {
2139
+ tool: string;
2140
+ arguments?: {
2141
+ [key: string]: any;
2142
+ };
2143
+ }
2144
+ /**
2145
+ * ToolResultEventData is the typed payload for agent.tool_result events.
2146
+ */
2147
+ export interface ToolResultEventData {
2148
+ tool: string;
2149
+ status: string;
2150
+ result?: string;
2151
+ }
2152
+ /**
2153
+ * ErrorEventData is the typed payload for agent.error events.
2154
+ */
2155
+ export interface ErrorEventData {
2156
+ error: string;
2157
+ }
1789
2158
  /**
1790
2159
  * ElicitationCapability advertises which elicitation modes the client handles.
1791
2160
  * An empty struct is equivalent to form-only for backward compatibility.
@@ -1951,7 +2320,11 @@ export type StringSlice = string[];
1951
2320
  */
1952
2321
  export interface MCPServerDTO {
1953
2322
  id: string;
1954
- PermissionModelDTO: PermissionModelDTO;
2323
+ user_id: string;
2324
+ user: UserRelationDTO;
2325
+ team_id: string;
2326
+ team: TeamRelationDTO;
2327
+ visibility: Visibility;
1955
2328
  slug: string;
1956
2329
  name: string;
1957
2330
  description: string;
@@ -1961,6 +2334,7 @@ export interface MCPServerDTO {
1961
2334
  oauth_client_id?: string;
1962
2335
  default_scopes: StringSlice;
1963
2336
  documentation_url: string;
2337
+ connection_status?: string;
1964
2338
  }
1965
2339
  /**
1966
2340
  * NotificationDTO is the data transfer object
@@ -2028,6 +2402,9 @@ export interface PageMetadata {
2028
2402
  type?: string;
2029
2403
  icon?: string;
2030
2404
  hide_from_nav?: boolean;
2405
+ action_url?: string;
2406
+ action_label?: string;
2407
+ display_mode?: string;
2031
2408
  /**
2032
2409
  * PublishAt is when a scheduled page goes live. Only meaningful while the
2033
2410
  * page's status is PageStatusScheduled.
@@ -2179,6 +2556,8 @@ export interface KnowledgeVersionInput {
2179
2556
  metadata?: {
2180
2557
  [key: string]: string;
2181
2558
  };
2559
+ origin?: string;
2560
+ generated_by?: string;
2182
2561
  source_url?: string;
2183
2562
  mutation_type?: string;
2184
2563
  version_notes?: string;
@@ -2285,6 +2664,7 @@ export interface SuggestRequest {
2285
2664
  category?: string;
2286
2665
  agent?: boolean;
2287
2666
  scope?: string[];
2667
+ origin?: string;
2288
2668
  }
2289
2669
  /**
2290
2670
  * SuggestResponse is the output of the suggest endpoint.
@@ -2292,6 +2672,7 @@ export interface SuggestRequest {
2292
2672
  export interface SuggestResponse {
2293
2673
  query: string;
2294
2674
  results: SuggestResult[];
2675
+ impression_id?: string;
2295
2676
  }
2296
2677
  /**
2297
2678
  * SuggestResult is a single result item from the suggest endpoint.
@@ -2362,6 +2743,17 @@ export interface CheckRequirementsResponse {
2362
2743
  satisfied: boolean;
2363
2744
  errors?: RequirementError[];
2364
2745
  }
2746
+ export interface ResourceShareDTO extends BaseModelDTO {
2747
+ resource_id: string;
2748
+ resource_type: string;
2749
+ user_id: string;
2750
+ user?: UserRelationDTO;
2751
+ permission: Permission;
2752
+ }
2753
+ export interface ShareRequest {
2754
+ user_id: string;
2755
+ permission: Permission;
2756
+ }
2365
2757
  /**
2366
2758
  * SDKTypes is a phantom type for gotypegen dependency tracing.
2367
2759
  * Types listed here (and their transitive dependencies) are included
@@ -2379,6 +2771,22 @@ export interface SecretDTO extends BaseModelDTO, PermissionModelDTO {
2379
2771
  description?: string;
2380
2772
  scope?: SecretScope;
2381
2773
  }
2774
+ /**
2775
+ * MeStatsResponse is returned by GET /me/stats.
2776
+ */
2777
+ export interface MeStatsResponse {
2778
+ knowledge_count: number;
2779
+ skills_count: number;
2780
+ extracted: StatBuckets;
2781
+ }
2782
+ /**
2783
+ * StatBuckets holds time-windowed counts.
2784
+ */
2785
+ export interface StatBuckets {
2786
+ today: number;
2787
+ this_week: number;
2788
+ all_time: number;
2789
+ }
2382
2790
  /**
2383
2791
  * SubscriptionDTO for API responses
2384
2792
  */
@@ -2672,6 +3080,18 @@ export interface TeamInviteCreateRequest {
2672
3080
  email: string;
2673
3081
  role: TeamRole;
2674
3082
  }
3083
+ export interface TelemetryReportDTO extends BaseModelDTO, PermissionModelDTO {
3084
+ ip: string;
3085
+ level: number;
3086
+ payload: {
3087
+ [key: string]: any;
3088
+ };
3089
+ }
3090
+ export interface SubmitTelemetryRequest {
3091
+ payload: {
3092
+ [key: string]: any;
3093
+ };
3094
+ }
2675
3095
  /**
2676
3096
  * ToolInvocationFunction contains the function details for a tool invocation
2677
3097
  */
@@ -2744,6 +3164,9 @@ export interface UserDTO extends BaseModelDTO {
2744
3164
  name: string;
2745
3165
  full_name: string;
2746
3166
  avatar_url: string;
3167
+ banned_at?: string;
3168
+ ban_note?: string;
3169
+ totp_enabled: boolean;
2747
3170
  metadata?: UserMetadataDTO;
2748
3171
  }
2749
3172
  /**
@@ -2770,86 +3193,125 @@ export interface UserMetadataDTO {
2770
3193
  terms_version: string;
2771
3194
  }
2772
3195
  /**
2773
- * WidgetAction represents an action triggered by a widget button
2774
- */
2775
- export interface WidgetAction {
2776
- type: string;
2777
- payload?: {
2778
- [key: string]: any;
2779
- };
2780
- }
2781
- /**
2782
- * WidgetActionButton represents a button in a widget's action bar
2783
- */
2784
- export interface WidgetActionButton {
2785
- label: string;
2786
- action: WidgetAction;
3196
+ * Widget is an A2UI surface stored on a ToolInvocation.
3197
+ * Alias of shared.A2UISurface so the type generation pipeline picks it up.
3198
+ */
3199
+ export type Widget = A2UISurface;
3200
+ export type A2UIComponentType = string;
3201
+ export declare const A2UIRow: A2UIComponentType;
3202
+ export declare const A2UIColumn: A2UIComponentType;
3203
+ export declare const A2UIList: A2UIComponentType;
3204
+ export declare const A2UIText: A2UIComponentType;
3205
+ export declare const A2UIImage: A2UIComponentType;
3206
+ export declare const A2UIIcon: A2UIComponentType;
3207
+ export declare const A2UIDivider: A2UIComponentType;
3208
+ export declare const A2UIButton: A2UIComponentType;
3209
+ export declare const A2UITextField: A2UIComponentType;
3210
+ export declare const A2UICheckBox: A2UIComponentType;
3211
+ export declare const A2UISlider: A2UIComponentType;
3212
+ export declare const A2UIDateTimeInput: A2UIComponentType;
3213
+ export declare const A2UIChoicePicker: A2UIComponentType;
3214
+ export declare const A2UICard: A2UIComponentType;
3215
+ export declare const A2UIModal: A2UIComponentType;
3216
+ export declare const A2UITabs: A2UIComponentType;
3217
+ /**
3218
+ * Extensions (inferencesh/v1 catalog)
3219
+ */
3220
+ export declare const A2UIBadge: A2UIComponentType;
3221
+ export declare const A2UISpacer: A2UIComponentType;
3222
+ export declare const A2UIChart: A2UIComponentType;
3223
+ export declare const A2UIForm: A2UIComponentType;
3224
+ /**
3225
+ * A2UIComponent is the universal component representation.
3226
+ * Children are string IDs (flat adjacency list), not nested objects.
3227
+ */
3228
+ export interface A2UIComponent {
3229
+ id: string;
3230
+ component: A2UIComponentType;
3231
+ /**
3232
+ * Layout
3233
+ */
3234
+ children?: string[];
3235
+ justify?: string;
3236
+ align?: string;
3237
+ direction?: string;
3238
+ gap?: number;
3239
+ /**
3240
+ * Text
3241
+ */
3242
+ text?: A2UIBoundValue;
2787
3243
  variant?: string;
2788
- }
2789
- /**
2790
- * WidgetNode represents a UI element in a widget (text, input, select, etc.)
2791
- */
2792
- export interface WidgetNode {
2793
- type: WidgetNodeType;
2794
- value?: string;
2795
- src?: string;
2796
- alt?: string;
3244
+ /**
3245
+ * Image
3246
+ */
3247
+ url?: A2UIBoundValue;
3248
+ fit?: string;
3249
+ /**
3250
+ * Icon
3251
+ */
3252
+ name?: A2UIBoundValue;
3253
+ /**
3254
+ * Divider
3255
+ */
3256
+ axis?: string;
3257
+ /**
3258
+ * Button / Card
3259
+ */
3260
+ child?: string;
3261
+ primary?: boolean;
3262
+ action?: A2UIAction;
3263
+ /**
3264
+ * TextField
3265
+ */
2797
3266
  label?: string;
2798
- name?: string;
3267
+ value?: A2UIBoundValue;
3268
+ textFieldType?: string;
3269
+ validationRegexp?: string;
2799
3270
  placeholder?: string;
2800
- defaultValue?: string;
2801
- variant?: string;
2802
- action?: WidgetAction;
2803
- options?: WidgetSelectOption[];
2804
- defaultChecked?: boolean;
2805
- children?: WidgetNode[];
2806
- gap?: number;
3271
+ rows?: number;
2807
3272
  /**
2808
- * Layout props (Box, Row, Col, Form)
3273
+ * Slider
2809
3274
  */
2810
- align?: string;
2811
- justify?: string;
2812
- padding?: any;
2813
- background?: any;
2814
- radius?: string;
2815
- direction?: string;
2816
- wrap?: string;
2817
- flex?: any;
3275
+ minValue?: number;
3276
+ maxValue?: number;
3277
+ /**
3278
+ * DateTimeInput
3279
+ */
3280
+ enableDate?: boolean;
3281
+ enableTime?: boolean;
3282
+ /**
3283
+ * ChoicePicker
3284
+ */
3285
+ options?: A2UIChoiceOption[];
3286
+ selections?: A2UIBoundValue;
3287
+ maxAllowedSelections?: number;
2818
3288
  /**
2819
- * Typography props (Text, Title, Caption, Label)
3289
+ * Modal
2820
3290
  */
2821
- size?: string;
2822
- weight?: string;
2823
- color?: any;
2824
- textAlign?: string;
2825
- truncate?: boolean;
2826
- maxLines?: number;
3291
+ entryPointChild?: string;
3292
+ contentChild?: string;
2827
3293
  /**
2828
- * Control props (Input, Textarea, Select, Checkbox, RadioGroup, DatePicker, Button)
3294
+ * Tabs
2829
3295
  */
3296
+ tabItems?: A2UITabItem[];
3297
+ /**
3298
+ * Common
3299
+ */
3300
+ accessibility?: A2UIAccessibility;
3301
+ weight?: number;
2830
3302
  disabled?: boolean;
2831
3303
  required?: boolean;
2832
- rows?: number;
2833
- fieldName?: string;
2834
- submit?: boolean;
2835
- pattern?: string;
2836
- min?: string;
2837
- max?: string;
2838
- clearable?: boolean;
2839
3304
  /**
2840
- * Action handler for buttons (form data is collected locally and sent with action)
3305
+ * Extension: Badge
2841
3306
  */
2842
- onClickAction?: WidgetAction;
3307
+ badgeLabel?: string;
3308
+ badgeVariant?: string;
2843
3309
  /**
2844
- * Content props (Icon, Spacer, Divider, Chart)
3310
+ * Extension: Spacer
2845
3311
  */
2846
- iconName?: string;
2847
- spacing?: any;
2848
3312
  minSize?: any;
2849
- height?: any;
2850
- width?: any;
2851
3313
  /**
2852
- * Chart specific props
3314
+ * Extension: Chart
2853
3315
  */
2854
3316
  chartData?: any;
2855
3317
  chartSeries?: any;
@@ -2858,34 +3320,175 @@ export interface WidgetNode {
2858
3320
  showLegend?: boolean;
2859
3321
  showTooltip?: boolean;
2860
3322
  /**
2861
- * Form-specific props
2862
- */
2863
- onSubmitAction?: WidgetAction;
2864
- /**
2865
- * Data binding (deprecated - use templates instead)
3323
+ * Extension: Form
2866
3324
  */
2867
- dataKey?: string;
3325
+ onSubmitAction?: A2UIAction;
2868
3326
  }
2869
3327
  /**
2870
- * WidgetSelectOption represents an option in a select widget
3328
+ * A2UIBoundValue is either a literal or a data model path reference.
2871
3329
  */
2872
- export interface WidgetSelectOption {
3330
+ export interface A2UIBoundValue {
3331
+ path?: string;
3332
+ }
3333
+ export interface A2UIAction {
3334
+ type: string;
3335
+ payload?: any;
3336
+ }
3337
+ export interface A2UIChoiceOption {
2873
3338
  label: string;
2874
3339
  value: string;
2875
3340
  }
3341
+ export interface A2UITabItem {
3342
+ title: string;
3343
+ child: string;
3344
+ }
3345
+ export interface A2UIAccessibility {
3346
+ label?: string;
3347
+ description?: string;
3348
+ }
2876
3349
  /**
2877
- * Widget represents an interactive widget for display in chat
2878
- * Type is either "ui" (structured nodes) or "html" (raw HTML)
2879
- * For "ui" widgets, data-bound nodes read values from ToolInvocation.Data
3350
+ * A2UISurface is the complete renderable state for a widget.
2880
3351
  */
2881
- export interface Widget {
2882
- type: string;
2883
- interactive?: boolean;
2884
- title?: string;
2885
- html?: string;
2886
- json?: string;
2887
- children?: WidgetNode[];
2888
- actions?: WidgetActionButton[];
3352
+ export interface A2UISurface {
3353
+ version: string;
3354
+ surfaceId: string;
3355
+ catalogId: string;
3356
+ components: A2UIComponent[];
3357
+ dataModel?: any;
3358
+ }
3359
+ /**
3360
+ * AgentEventType identifies what happened in an agent run.
3361
+ * These are the backbone protocol events — every consumer (A2A, SDK, frontend)
3362
+ * projects from this set.
3363
+ */
3364
+ export type AgentEventType = string;
3365
+ /**
3366
+ * Run lifecycle
3367
+ */
3368
+ export declare const AgentEventRunStarted: AgentEventType;
3369
+ export declare const AgentEventRunStateChanged: AgentEventType;
3370
+ /**
3371
+ * Turn lifecycle
3372
+ */
3373
+ export declare const AgentEventTurnStarted: AgentEventType;
3374
+ export declare const AgentEventTurnCompleted: AgentEventType;
3375
+ /**
3376
+ * Content streaming — structural wrapper; high-frequency token deltas
3377
+ * still flow via the existing DeltaEvent channel for efficiency.
3378
+ */
3379
+ export declare const AgentEventContentDelta: AgentEventType;
3380
+ /**
3381
+ * Tool lifecycle
3382
+ */
3383
+ export declare const AgentEventToolStarted: AgentEventType;
3384
+ export declare const AgentEventToolCompleted: AgentEventType;
3385
+ /**
3386
+ * Approval flow
3387
+ */
3388
+ export declare const AgentEventApprovalRequired: AgentEventType;
3389
+ export declare const AgentEventApprovalResolved: AgentEventType;
3390
+ /**
3391
+ * Hook lifecycle
3392
+ */
3393
+ export declare const AgentEventHookExecuted: AgentEventType;
3394
+ /**
3395
+ * Usage
3396
+ */
3397
+ export declare const AgentEventUsageUpdated: AgentEventType;
3398
+ /**
3399
+ * Context management
3400
+ */
3401
+ export declare const AgentEventContextCompacted: AgentEventType;
3402
+ /**
3403
+ * Errors
3404
+ */
3405
+ export declare const AgentEventError: AgentEventType;
3406
+ /**
3407
+ * AgentEvent is the backbone protocol event for agent runs.
3408
+ * Published to "runs:<runID>" and "chats:<chatID>" keys on the event bus.
3409
+ */
3410
+ export interface AgentEvent {
3411
+ id: string;
3412
+ type: AgentEventType;
3413
+ run_id: string;
3414
+ chat_id: string;
3415
+ agent_id?: string;
3416
+ timestamp: string;
3417
+ payload?: any;
3418
+ }
3419
+ export interface RunStartedPayload {
3420
+ agent_id: string;
3421
+ agent_version_id?: string;
3422
+ user_message_id?: string;
3423
+ }
3424
+ export interface RunStateChangedPayload {
3425
+ from_state: AgentRunState;
3426
+ to_state: AgentRunState;
3427
+ error?: string;
3428
+ }
3429
+ export interface TurnStartedPayload {
3430
+ turn_index: number;
3431
+ model?: string;
3432
+ }
3433
+ export interface TurnCompletedPayload {
3434
+ turn_index: number;
3435
+ tool_count: number;
3436
+ has_output: boolean;
3437
+ stop_reason?: string;
3438
+ }
3439
+ export interface ContentDeltaPayload {
3440
+ kind: ContentDeltaKind;
3441
+ delta: string;
3442
+ }
3443
+ export type ContentDeltaKind = string;
3444
+ export declare const ContentDeltaText: ContentDeltaKind;
3445
+ export declare const ContentDeltaReasoning: ContentDeltaKind;
3446
+ export interface ToolStartedPayload {
3447
+ tool_invocation_id: string;
3448
+ tool_name: string;
3449
+ tool_type?: ToolType;
3450
+ display_name?: string;
3451
+ arguments?: StringEncodedMap;
3452
+ }
3453
+ export interface ToolCompletedPayload {
3454
+ tool_invocation_id: string;
3455
+ tool_name: string;
3456
+ status: ToolInvocationStatus;
3457
+ result?: string;
3458
+ duration_ms?: number;
3459
+ }
3460
+ export interface ApprovalRequiredPayload {
3461
+ tool_invocation_id: string;
3462
+ tool_name: string;
3463
+ arguments?: StringEncodedMap;
3464
+ reason: InterruptReason;
3465
+ }
3466
+ export interface ApprovalResolvedPayload {
3467
+ tool_invocation_id: string;
3468
+ tool_name: string;
3469
+ decision: string;
3470
+ reason?: string;
3471
+ }
3472
+ export interface HookExecutedPayload {
3473
+ hook_event: HookEvent;
3474
+ decision: HookDecision;
3475
+ reason?: string;
3476
+ duration_ms?: number;
3477
+ }
3478
+ export interface UsageUpdatedPayload {
3479
+ prompt_tokens: number;
3480
+ completion_tokens: number;
3481
+ total_tokens: number;
3482
+ reasoning_tokens?: number;
3483
+ cost_usd?: number;
3484
+ }
3485
+ export interface ContextCompactedPayload {
3486
+ before_tokens: number;
3487
+ after_tokens: number;
3488
+ }
3489
+ export interface ErrorPayload {
3490
+ message: string;
3491
+ code?: string;
2889
3492
  }
2890
3493
  /**
2891
3494
  * AgentRunState tracks the lifecycle of an agent run (one user→agent turn).
@@ -2910,6 +3513,7 @@ export declare const InterruptReasonClientTool: InterruptReason;
2910
3513
  export declare const InterruptReasonWidget: InterruptReason;
2911
3514
  export declare const InterruptReasonAuth: InterruptReason;
2912
3515
  export declare const InterruptReasonConfirmation: InterruptReason;
3516
+ export declare const InterruptReasonHookGate: InterruptReason;
2913
3517
  export type AppCategory = string;
2914
3518
  export declare const AppCategoryImage: AppCategory;
2915
3519
  export declare const AppCategoryVideo: AppCategory;
@@ -2936,8 +3540,15 @@ export declare const GPUTypeApple: GPUType;
2936
3540
  */
2937
3541
  export type Visibility = string;
2938
3542
  export declare const VisibilityPrivate: Visibility;
3543
+ export declare const VisibilityTeam: Visibility;
2939
3544
  export declare const VisibilityPublic: Visibility;
2940
3545
  export declare const VisibilityUnlisted: Visibility;
3546
+ /**
3547
+ * Permission represents a permission level for access checks.
3548
+ */
3549
+ export type Permission = string;
3550
+ export declare const PermRead: Permission;
3551
+ export declare const PermWrite: Permission;
2941
3552
  export type SubscriptionStatus = string;
2942
3553
  export declare const SubscriptionStatusTrialing: SubscriptionStatus;
2943
3554
  export declare const SubscriptionStatusActive: SubscriptionStatus;
@@ -2973,12 +3584,22 @@ export declare const PlanStepStatusInProgress: PlanStepStatus;
2973
3584
  export declare const PlanStepStatusCompleted: PlanStepStatus;
2974
3585
  export declare const PlanStepStatusCancelled: PlanStepStatus;
2975
3586
  export type ChatMessageRole = string;
3587
+ /**
3588
+ * LLM wire-protocol roles
3589
+ */
2976
3590
  export declare const ChatMessageRoleSystem: ChatMessageRole;
2977
3591
  export declare const ChatMessageRoleUser: ChatMessageRole;
2978
3592
  export declare const ChatMessageRoleAssistant: ChatMessageRole;
2979
3593
  export declare const ChatMessageRoleTool: ChatMessageRole;
3594
+ /**
3595
+ * Internal bookkeeping roles — never sent to the LLM provider.
3596
+ * BuildContext converts these to system messages or skips them.
3597
+ */
3598
+ export declare const ChatMessageRoleInjection: ChatMessageRole;
3599
+ export declare const ChatMessageRoleCompaction: ChatMessageRole;
2980
3600
  export type ChatMessageStatus = string;
2981
3601
  export declare const ChatMessageStatusPending: ChatMessageStatus;
3602
+ export declare const ChatMessageStatusQueued: ChatMessageStatus;
2982
3603
  export declare const ChatMessageStatusReady: ChatMessageStatus;
2983
3604
  export declare const ChatMessageStatusFailed: ChatMessageStatus;
2984
3605
  export declare const ChatMessageStatusCancelled: ChatMessageStatus;
@@ -3029,46 +3650,6 @@ export interface IntegrationContext {
3029
3650
  integration_type?: IntegrationType;
3030
3651
  integration_metadata?: any;
3031
3652
  }
3032
- /**
3033
- * ChatTaskInput is the input envelope for a chat LLM task
3034
- */
3035
- export interface ChatTaskInput {
3036
- model?: string;
3037
- context_size: number;
3038
- temperature?: number;
3039
- top_p?: number;
3040
- reasoning_effort?: string;
3041
- reasoning_max_tokens?: number;
3042
- system_prompt: string;
3043
- context: ChatTaskContextMessage[];
3044
- role?: ChatMessageRole;
3045
- text?: string;
3046
- reasoning?: string;
3047
- /**
3048
- * Attachments is the SDK input field with full file metadata
3049
- */
3050
- attachments?: FileRef[];
3051
- /**
3052
- * Images and Files are internal fields for task workers (filled from Attachments or context)
3053
- */
3054
- images?: string[];
3055
- files?: string[];
3056
- tools?: Tool[];
3057
- tool_call_id?: string;
3058
- }
3059
- /**
3060
- * ChatTaskContextMessage represents a message in the chat context for LLM tasks
3061
- */
3062
- export interface ChatTaskContextMessage {
3063
- role: ChatMessageRole;
3064
- text?: string;
3065
- reasoning?: string;
3066
- images?: string[];
3067
- files?: string[];
3068
- tools?: Tool[];
3069
- tool_calls?: ToolCall[];
3070
- tool_call_id?: string;
3071
- }
3072
3653
  export type StringEncodedMap = {
3073
3654
  [key: string]: any;
3074
3655
  };
@@ -3172,6 +3753,22 @@ export interface OutputFieldMapping {
3172
3753
  export type OutputMappings = {
3173
3754
  [key: string]: OutputFieldMapping;
3174
3755
  };
3756
+ /**
3757
+ * GateCondition defines a simple boolean condition for gate nodes.
3758
+ */
3759
+ export interface GateCondition {
3760
+ field: string;
3761
+ operator: string;
3762
+ value: any;
3763
+ }
3764
+ /**
3765
+ * SelectorConfig defines how to pick element(s) from an array.
3766
+ */
3767
+ export interface SelectorConfig {
3768
+ field: string;
3769
+ mode: string;
3770
+ index?: number;
3771
+ }
3175
3772
  export type GraphNodeType = string;
3176
3773
  export declare const GraphNodeTypeUnknown: GraphNodeType;
3177
3774
  export declare const GraphNodeTypeJoin: GraphNodeType;
@@ -3217,6 +3814,285 @@ export declare const GraphEdgeTypeReferences: GraphEdgeType;
3217
3814
  export declare const GraphEdgeTypeSupersedes: GraphEdgeType;
3218
3815
  export declare const GraphEdgeTypeInput: GraphEdgeType;
3219
3816
  export declare const GraphEdgeTypeOutput: GraphEdgeType;
3817
+ /**
3818
+ * InterruptStatus tracks the lifecycle of an interrupt gate.
3819
+ */
3820
+ export type InterruptStatus = string;
3821
+ export declare const InterruptStatusPending: InterruptStatus;
3822
+ export declare const InterruptStatusResolved: InterruptStatus;
3823
+ export declare const InterruptStatusExpired: InterruptStatus;
3824
+ export declare const InterruptStatusCancelled: InterruptStatus;
3825
+ /**
3826
+ * InterruptResolution records how a pending interrupt was resolved.
3827
+ */
3828
+ export type InterruptResolution = string;
3829
+ export declare const InterruptResolutionAllow: InterruptResolution;
3830
+ export declare const InterruptResolutionDeny: InterruptResolution;
3831
+ /**
3832
+ * InterruptResourceType identifies the kind of resource an interrupt gates.
3833
+ */
3834
+ export type InterruptResourceType = string;
3835
+ export declare const InterruptResourceToolInvocation: InterruptResourceType;
3836
+ export declare const InterruptResourceHookEvent: InterruptResourceType;
3837
+ /**
3838
+ * HookEvent is a lifecycle event in the agent conversation loop.
3839
+ * Events fire at well-defined points in the turn cycle, giving external
3840
+ * handlers the ability to observe, inject context, or halt execution.
3841
+ */
3842
+ export type HookEvent = string;
3843
+ export declare const HookEventAgentStart: HookEvent;
3844
+ export declare const HookEventTurnStart: HookEvent;
3845
+ export declare const HookEventToolCall: HookEvent;
3846
+ export declare const HookEventToolResult: HookEvent;
3847
+ export declare const HookEventTurnComplete: HookEvent;
3848
+ export declare const HookEventAgentError: HookEvent;
3849
+ export declare const HookEventAgentComplete: HookEvent;
3850
+ export declare const HookEventAgentIdle: HookEvent;
3851
+ export declare const HookEventPreCompact: HookEvent;
3852
+ export declare const HookEventPostCompact: HookEvent;
3853
+ /**
3854
+ * HookEventDefinition describes a lifecycle hook event and its capabilities.
3855
+ */
3856
+ export interface HookEventDefinition {
3857
+ event: HookEvent;
3858
+ description: string;
3859
+ can_gate: boolean;
3860
+ }
3861
+ /**
3862
+ * HookDecision is the handler's verdict on whether execution should continue.
3863
+ */
3864
+ export type HookDecision = string;
3865
+ export declare const HookDecisionAllow: HookDecision;
3866
+ export declare const HookDecisionDeny: HookDecision;
3867
+ export declare const HookDecisionStop: HookDecision;
3868
+ export declare const HookDecisionSuspend: HookDecision;
3869
+ /**
3870
+ * HookHandlerType distinguishes how a lifecycle hook is executed.
3871
+ */
3872
+ export type HookHandlerType = string;
3873
+ export declare const HookHandlerWebhook: HookHandlerType;
3874
+ export declare const HookHandlerTask: HookHandlerType;
3875
+ export declare const HookHandlerGate: HookHandlerType;
3876
+ /**
3877
+ * MergeStrategy defines how a delta field should be merged by consumers.
3878
+ */
3879
+ export type MergeStrategy = string;
3880
+ export declare const MergeStrategyConcat: MergeStrategy;
3881
+ export declare const MergeStrategyReplace: MergeStrategy;
3882
+ export declare const MergeStrategyIndexed: MergeStrategy;
3883
+ export declare const MergeStrategyNested: MergeStrategy;
3884
+ /**
3885
+ * StreamDelta is the marker base for all streaming delta types.
3886
+ * Types embedding StreamDelta are routed through the delta channel.
3887
+ */
3888
+ export interface StreamDelta {
3889
+ }
3890
+ /**
3891
+ * LLMOutput is the output envelope from an LLM provider task.
3892
+ * This is the contract between chat apps (sdk-py) and the agent runtime (go/api).
3893
+ */
3894
+ export interface LLMOutput {
3895
+ response: string;
3896
+ reasoning?: string;
3897
+ tool_calls?: ToolCall[];
3898
+ usage?: LLMUsage;
3899
+ }
3900
+ /**
3901
+ * LLMDelta is a streaming delta for LLMOutput.
3902
+ */
3903
+ export interface LLMDelta extends StreamDelta {
3904
+ response: string;
3905
+ reasoning?: string;
3906
+ tool_calls?: ToolCallDelta[];
3907
+ usage?: LLMUsage;
3908
+ }
3909
+ export declare const LLMDelta_fieldTags: {
3910
+ readonly response: {
3911
+ readonly merge: "concat";
3912
+ };
3913
+ readonly reasoning: {
3914
+ readonly merge: "concat";
3915
+ };
3916
+ readonly tool_calls: {
3917
+ readonly merge: "indexed";
3918
+ };
3919
+ readonly usage: {
3920
+ readonly merge: "replace";
3921
+ };
3922
+ };
3923
+ /**
3924
+ * ToolCallDelta is an incremental update to a tool call, identified by index.
3925
+ * First delta for an index carries ID, Type, and Function.Name.
3926
+ * Subsequent deltas carry only Function.Arguments fragments.
3927
+ */
3928
+ export interface ToolCallDelta {
3929
+ index: number;
3930
+ id?: string;
3931
+ type?: ToolCallType;
3932
+ function?: ToolCallFunctionDelta;
3933
+ }
3934
+ export declare const ToolCallDelta_fieldTags: {
3935
+ readonly id: {
3936
+ readonly merge: "replace";
3937
+ };
3938
+ readonly type: {
3939
+ readonly merge: "replace";
3940
+ };
3941
+ readonly function: {
3942
+ readonly merge: "nested";
3943
+ };
3944
+ };
3945
+ /**
3946
+ * DeltaEvent is the generic streaming envelope on the NDJSON wire.
3947
+ * Delta is raw bytes — consumers parse based on context.
3948
+ */
3949
+ export interface DeltaEvent {
3950
+ delta: any;
3951
+ seq: number;
3952
+ }
3953
+ /**
3954
+ * LLMDeltaEvent is a typed alias for backward compatibility.
3955
+ */
3956
+ export type LLMDeltaEvent = DeltaEvent;
3957
+ /**
3958
+ * ToolCallFunctionDelta carries partial tool call function data.
3959
+ * Arguments is a raw JSON string fragment — concatenate by index, parse on completion.
3960
+ */
3961
+ export interface ToolCallFunctionDelta {
3962
+ name?: string;
3963
+ arguments?: string;
3964
+ }
3965
+ export declare const ToolCallFunctionDelta_fieldTags: {
3966
+ readonly name: {
3967
+ readonly merge: "replace";
3968
+ };
3969
+ readonly arguments: {
3970
+ readonly merge: "concat";
3971
+ };
3972
+ };
3973
+ /**
3974
+ * ToolChoiceMode controls whether the model must call a tool this turn.
3975
+ */
3976
+ export type ToolChoiceMode = string;
3977
+ export declare const ToolChoiceModeNone: ToolChoiceMode;
3978
+ export declare const ToolChoiceModeAuto: ToolChoiceMode;
3979
+ export declare const ToolChoiceModeRequired: ToolChoiceMode;
3980
+ export declare const ToolChoiceModeFunction: ToolChoiceMode;
3981
+ /**
3982
+ * ToolChoice constrains tool calling for a turn. Providers spell this
3983
+ * differently (OpenAI tool_choice, Anthropic tool_choice.type any/tool,
3984
+ * Gemini functionCallingConfig); apps translate at the provider boundary.
3985
+ */
3986
+ export interface ToolChoice {
3987
+ mode: ToolChoiceMode;
3988
+ name?: string;
3989
+ }
3990
+ /**
3991
+ * ResponseFormatType selects how the model's output is constrained.
3992
+ */
3993
+ export type ResponseFormatType = string;
3994
+ export declare const ResponseFormatTypeText: ResponseFormatType;
3995
+ export declare const ResponseFormatTypeJSONObject: ResponseFormatType;
3996
+ export declare const ResponseFormatTypeJSONSchema: ResponseFormatType;
3997
+ /**
3998
+ * ResponseFormat constrains the shape of the model's response.
3999
+ * JSONSchema is required when Type is json_schema.
4000
+ */
4001
+ export interface ResponseFormat {
4002
+ type: ResponseFormatType;
4003
+ name?: string;
4004
+ json_schema?: any;
4005
+ strict?: boolean;
4006
+ }
4007
+ /**
4008
+ * ModelSettings groups sampling and generation parameters as a passable unit.
4009
+ */
4010
+ export interface ModelSettings {
4011
+ temperature?: number;
4012
+ top_p?: number;
4013
+ top_k?: number;
4014
+ min_p?: number;
4015
+ frequency_penalty?: number;
4016
+ presence_penalty?: number;
4017
+ repetition_penalty?: number;
4018
+ seed?: number;
4019
+ stop?: string[];
4020
+ max_tokens?: number;
4021
+ reasoning_effort?: string;
4022
+ reasoning_max_tokens?: number;
4023
+ }
4024
+ /**
4025
+ * LLMSettings is everything that configures a generation independent of the
4026
+ * conversation: model, sampling, system prompt, tools and output constraints.
4027
+ * Embedded by both BaseLLMInput (an agent's stored configuration) and
4028
+ * LLMInput (a single call), so a field added here reaches both and the call
4029
+ * is built from the configuration by one assignment.
4030
+ */
4031
+ export interface LLMSettings {
4032
+ model?: string;
4033
+ context_size: number;
4034
+ temperature?: number;
4035
+ top_p?: number;
4036
+ top_k?: number;
4037
+ min_p?: number;
4038
+ frequency_penalty?: number;
4039
+ presence_penalty?: number;
4040
+ repetition_penalty?: number;
4041
+ seed?: number;
4042
+ stop?: string[];
4043
+ max_tokens?: number;
4044
+ reasoning_effort?: string;
4045
+ reasoning_max_tokens?: number;
4046
+ system_prompt: string;
4047
+ tools?: Tool[];
4048
+ tool_choice?: ToolChoice;
4049
+ response_format?: ResponseFormat;
4050
+ }
4051
+ /**
4052
+ * LLMInput is the input envelope for an LLM provider task: the settings plus
4053
+ * the conversation, with the current turn split out of the context.
4054
+ */
4055
+ export interface LLMInput {
4056
+ model: string;
4057
+ context_size: number;
4058
+ temperature?: number;
4059
+ top_p?: number;
4060
+ top_k?: number;
4061
+ min_p?: number;
4062
+ frequency_penalty?: number;
4063
+ presence_penalty?: number;
4064
+ repetition_penalty?: number;
4065
+ seed?: number;
4066
+ stop?: string[];
4067
+ max_tokens?: number;
4068
+ reasoning_effort?: string;
4069
+ reasoning_max_tokens?: number;
4070
+ system_prompt: string;
4071
+ tools?: Tool[];
4072
+ tool_choice?: ToolChoice;
4073
+ response_format?: ResponseFormat;
4074
+ context: LLMContextMessage[];
4075
+ role?: ChatMessageRole;
4076
+ text?: string;
4077
+ reasoning?: string;
4078
+ attachments?: FileRef[];
4079
+ images?: string[];
4080
+ files?: string[];
4081
+ tool_call_id?: string;
4082
+ }
4083
+ /**
4084
+ * LLMContextMessage represents a message in the chat context for LLM tasks
4085
+ */
4086
+ export interface LLMContextMessage {
4087
+ role: ChatMessageRole;
4088
+ text?: string;
4089
+ reasoning?: string;
4090
+ images?: string[];
4091
+ files?: string[];
4092
+ tools?: Tool[];
4093
+ tool_calls?: ToolCall[];
4094
+ tool_call_id?: string;
4095
+ }
3220
4096
  /**
3221
4097
  * SecretScope defines the visibility/purpose of a secret
3222
4098
  */
@@ -3246,6 +4122,7 @@ export type PageType = string;
3246
4122
  export declare const PageTypeDoc: PageType;
3247
4123
  export declare const PageTypeBlog: PageType;
3248
4124
  export declare const PageTypePage: PageType;
4125
+ export declare const PageTypeAnnouncement: PageType;
3249
4126
  /**
3250
4127
  * ToolInvocationStatus represents the execution status of a tool invocation
3251
4128
  */
@@ -3377,6 +4254,8 @@ export declare const KnowledgeTypeAgentConfig: KnowledgeType;
3377
4254
  export type KnowledgeLifecycle = string;
3378
4255
  export declare const KnowledgeLifecyclePermanent: KnowledgeLifecycle;
3379
4256
  export declare const KnowledgeLifecycleDecay: KnowledgeLifecycle;
4257
+ export declare const KnowledgeLifecycleDraft: KnowledgeLifecycle;
4258
+ export declare const KnowledgeLifecycleDeprecated: KnowledgeLifecycle;
3380
4259
  export type FilterOperator = string;
3381
4260
  export declare const OpEqual: FilterOperator;
3382
4261
  export declare const OpNotEqual: FilterOperator;
@@ -3491,44 +4370,25 @@ export declare const IntegrationStatusDisconnected: IntegrationStatus;
3491
4370
  export declare const IntegrationStatusExpired: IntegrationStatus;
3492
4371
  export declare const IntegrationStatusError: IntegrationStatus;
3493
4372
  /**
3494
- * IntegrationScope distinguishes platform-provided vs team-owned integrations.
4373
+ * IntegrationScope controls credential resolution priority and ownership.
3495
4374
  */
3496
4375
  export type IntegrationScope = string;
4376
+ export declare const IntegrationScopeTeam: IntegrationScope;
4377
+ export declare const IntegrationScopePlatform: IntegrationScope;
4378
+ export declare const IntegrationScopeUser: IntegrationScope;
3497
4379
  /**
3498
- * IntegrationScopeTeam is owned by a user/team (BYOK credentials, user connections)
4380
+ * IntegrationGrant describes what an integration provides.
3499
4381
  */
3500
- export declare const IntegrationScopeTeam: IntegrationScope;
4382
+ export type IntegrationGrant = string;
3501
4383
  /**
3502
- * IntegrationScopePlatform is owned by the platform (managed credentials, admin-configured)
4384
+ * IntegrationGrantCredentials provides OAuth app credentials (client_id/secret).
4385
+ * Users connect their own accounts against it. Only valid for type=oauth.
3503
4386
  */
3504
- export declare const IntegrationScopePlatform: IntegrationScope;
3505
- export type WidgetNodeType = string;
3506
- export declare const WidgetNodeTypeText: WidgetNodeType;
3507
- export declare const WidgetNodeTypeMarkdown: WidgetNodeType;
3508
- export declare const WidgetNodeTypeImage: WidgetNodeType;
3509
- export declare const WidgetNodeTypeBadge: WidgetNodeType;
3510
- export declare const WidgetNodeTypeButton: WidgetNodeType;
3511
- export declare const WidgetNodeTypeInput: WidgetNodeType;
3512
- export declare const WidgetNodeTypeSelect: WidgetNodeType;
3513
- export declare const WidgetNodeTypeCheckbox: WidgetNodeType;
3514
- export declare const WidgetNodeTypeRow: WidgetNodeType;
3515
- export declare const WidgetNodeTypeCol: WidgetNodeType;
3516
- export declare const WidgetNodeTypeBox: WidgetNodeType;
3517
- export declare const WidgetNodeTypeSpacer: WidgetNodeType;
3518
- export declare const WidgetNodeTypeDivider: WidgetNodeType;
3519
- export declare const WidgetNodeTypeForm: WidgetNodeType;
3520
- export declare const WidgetNodeTypeTitle: WidgetNodeType;
3521
- export declare const WidgetNodeTypeCaption: WidgetNodeType;
3522
- export declare const WidgetNodeTypeLabel: WidgetNodeType;
3523
- export declare const WidgetNodeTypeTextarea: WidgetNodeType;
3524
- export declare const WidgetNodeTypeRadioGroup: WidgetNodeType;
3525
- export declare const WidgetNodeTypeDatePicker: WidgetNodeType;
3526
- export declare const WidgetNodeTypeIcon: WidgetNodeType;
3527
- export declare const WidgetNodeTypeChart: WidgetNodeType;
3528
- export declare const WidgetNodeTypeTransition: WidgetNodeType;
3529
- export declare const WidgetNodeTypePlanList: WidgetNodeType;
3530
- export declare const WidgetNodeTypeKeyValue: WidgetNodeType;
3531
- export declare const WidgetNodeTypeStatusBadge: WidgetNodeType;
4387
+ export declare const IntegrationGrantCredentials: IntegrationGrant;
4388
+ /**
4389
+ * IntegrationGrantToken provides ready-to-use access (token, API key, etc.).
4390
+ */
4391
+ export declare const IntegrationGrantToken: IntegrationGrant;
3532
4392
  /**
3533
4393
  * NotificationChannel represents a delivery channel
3534
4394
  */
@@ -3562,6 +4422,7 @@ export declare const NotificationTypeInvoice: NotificationType;
3562
4422
  export declare const NotificationTypeSubscriptionCreated: NotificationType;
3563
4423
  export declare const NotificationTypeSubscriptionCredit: NotificationType;
3564
4424
  export declare const NotificationTypeSubscriptionCanceled: NotificationType;
4425
+ export declare const NotificationTypeSubscriptionPaymentFailed: NotificationType;
3565
4426
  export declare const NotificationTypeSubscriptionTrialEnding: NotificationType;
3566
4427
  /**
3567
4428
  * Account notifications
@@ -3720,6 +4581,19 @@ export interface ToolCallFunction {
3720
4581
  name: string;
3721
4582
  arguments: StringEncodedMap;
3722
4583
  }
4584
+ /**
4585
+ * LLMUsage contains token usage and performance metrics from an LLM response
4586
+ */
4587
+ export interface LLMUsage {
4588
+ stop_reason: string;
4589
+ time_to_first_token: number;
4590
+ tokens_per_second: number;
4591
+ prompt_tokens: number;
4592
+ completion_tokens: number;
4593
+ total_tokens: number;
4594
+ reasoning_tokens: number;
4595
+ reasoning_time: number;
4596
+ }
3723
4597
  /**
3724
4598
  * FileRef is a lightweight reference to a file with essential metadata.
3725
4599
  * Used in chat inputs/context instead of full File objects.
@@ -3766,3 +4640,13 @@ export declare const RoleGuest: Role;
3766
4640
  export declare const RoleUser: Role;
3767
4641
  export declare const RoleAdmin: Role;
3768
4642
  export declare const RoleSystem: Role;
4643
+ /**
4644
+ * UtilityConfig defines a flow utility node — gate, selector, merge, or custom CEL.
4645
+ */
4646
+ export interface UtilityConfig {
4647
+ preset: string;
4648
+ expression?: string;
4649
+ gate?: GateCondition;
4650
+ selector?: SelectorConfig;
4651
+ constant?: any;
4652
+ }