@deepraxis/sdk 0.1.0-dev.449ac38 → 0.1.0-dev.67c7f3b

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.
@@ -5368,7 +5368,7 @@ export type AgentManaged170 = {
5368
5368
  */
5369
5369
  system: null | string;
5370
5370
  /**
5371
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
5371
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
5372
5372
  */
5373
5373
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
5374
5374
  /**
@@ -5480,7 +5480,7 @@ export type AgentManaged252 = {
5480
5480
  */
5481
5481
  custom_tool_use_id: string;
5482
5482
  /**
5483
- * Result of a custom tool call. Custom tools are not offered on this platform and this event returns 400.
5483
+ * Result of a custom tool call. Set custom_tool_use_id to the agent.custom_tool_use event id and send only text content blocks; omitted content becomes an empty array.
5484
5484
  */
5485
5485
  type: 'user.custom_tool_result';
5486
5486
  /**
@@ -5513,24 +5513,6 @@ export type AgentManaged253 = {
5513
5513
  */
5514
5514
  is_error?: null | false | true;
5515
5515
  };
5516
- export type AgentManaged185 = {
5517
- /**
5518
- * Unique identifier for this event.
5519
- */
5520
- id: string;
5521
- /**
5522
- * Array of content blocks comprising the user message.
5523
- */
5524
- content: Array<AgentManaged60 | AgentManaged61 | AgentManaged65 | AgentManaged70>;
5525
- /**
5526
- * Always `user.message`. A message from the user to the agent, with content blocks.
5527
- */
5528
- type: 'user.message';
5529
- /**
5530
- * A timestamp in RFC 3339 format
5531
- */
5532
- processed_at?: null | string;
5533
- };
5534
5516
  export type AgentSseEvent = ({
5535
5517
  /**
5536
5518
  * Always `user.message`. SSE event name of this frame; its data is a user.message payload. A message from the user to the agent, with content blocks.
@@ -5556,6 +5538,24 @@ export type AgentSseEvent = ({
5556
5538
  * A timestamp in RFC 3339 format
5557
5539
  */
5558
5540
  processed_at?: null | string;
5541
+ /**
5542
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
5543
+ */
5544
+ praxis_context?: {
5545
+ /**
5546
+ * Named page values supplied by the client for this turn.
5547
+ */
5548
+ items: Array<{
5549
+ /**
5550
+ * Page context key, such as lesson or section.
5551
+ */
5552
+ name: string;
5553
+ /**
5554
+ * Untrusted page value; escaped before inclusion in the user message.
5555
+ */
5556
+ value: string;
5557
+ }>;
5558
+ };
5559
5559
  /**
5560
5560
  * UI transcript message ID. Use the last assistant message in a successfully completed turn as the fork target.
5561
5561
  */
@@ -6352,6 +6352,86 @@ export type AgentSseEvent = ({
6352
6352
  };
6353
6353
  };
6354
6354
  };
6355
+ } | {
6356
+ /**
6357
+ * Always `agent.custom_tool_use`. SSE event name of this frame; its data is a agent.custom_tool_use payload. The agent called a custom tool defined by the client.
6358
+ */
6359
+ event?: 'agent.custom_tool_use';
6360
+ /**
6361
+ * Decoded JSON payload of this frame; its shape is selected by the event name.
6362
+ */
6363
+ data?: {
6364
+ /**
6365
+ * Unique identifier for this event.
6366
+ */
6367
+ id: string;
6368
+ /**
6369
+ * Input parameters for the tool call.
6370
+ */
6371
+ input: AgentManaged193;
6372
+ /**
6373
+ * Name of the custom tool being called.
6374
+ */
6375
+ name: string;
6376
+ /**
6377
+ * A timestamp in RFC 3339 format
6378
+ */
6379
+ processed_at: string;
6380
+ /**
6381
+ * Always `agent.custom_tool_use`. The agent called a custom tool defined by the client.
6382
+ */
6383
+ type: 'agent.custom_tool_use';
6384
+ /**
6385
+ * When set, this event was cross-posted from a subagent's thread to surface its
6386
+ * custom tool use on the primary thread's stream. Empty on the thread's own
6387
+ * events. Informational only: the server routes the matching
6388
+ * `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it
6389
+ * back.
6390
+ */
6391
+ session_thread_id?: null | string;
6392
+ };
6393
+ } | {
6394
+ /**
6395
+ * Always `user.custom_tool_result`. SSE event name of this frame; its data is a user.custom_tool_result payload. The user's result for a custom tool call.
6396
+ */
6397
+ event?: 'user.custom_tool_result';
6398
+ /**
6399
+ * Decoded JSON payload of this frame; its shape is selected by the event name.
6400
+ */
6401
+ data?: {
6402
+ /**
6403
+ * Unique identifier for this event.
6404
+ */
6405
+ id: string;
6406
+ /**
6407
+ * The id of the `agent.custom_tool_use` event this result corresponds to, which
6408
+ * can be found in the last `session.status_idle`
6409
+ * [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids)
6410
+ * `stop_reason.event_ids` field.
6411
+ */
6412
+ custom_tool_use_id: string;
6413
+ /**
6414
+ * Always `user.custom_tool_result`. The user's result for a custom tool call.
6415
+ */
6416
+ type: 'user.custom_tool_result';
6417
+ /**
6418
+ * The result content returned by the tool.
6419
+ */
6420
+ content?: Array<AgentManaged60 | AgentManaged61 | AgentManaged65 | AgentManaged189>;
6421
+ /**
6422
+ * Whether the tool execution resulted in an error.
6423
+ */
6424
+ is_error?: null | false | true;
6425
+ /**
6426
+ * A timestamp in RFC 3339 format
6427
+ */
6428
+ processed_at?: null | string;
6429
+ /**
6430
+ * Set by the server to the subagent thread this result was routed to. Omitted when
6431
+ * it was routed to the primary thread.
6432
+ */
6433
+ session_thread_id?: null | string;
6434
+ };
6355
6435
  } | {
6356
6436
  /**
6357
6437
  * Always `session.thread_created`. SSE event name of this frame; its data is a session.thread_created payload. A child thread was started.
@@ -7026,7 +7106,7 @@ export type AgentSseEvent = ({
7026
7106
  /**
7027
7107
  * Server-Sent Events event name of this frame.
7028
7108
  */
7029
- event: 'user.message' | 'user.interrupt' | 'agent.message' | 'agent.thinking' | 'session.status_running' | 'session.status_rescheduled' | 'session.status_idle' | 'session.status_terminated' | 'agent.thread_context_compacted' | 'agent.thread_context_reset' | 'session.updated' | 'session.error' | 'session.usage' | 'span.model_request_start' | 'span.model_request_end' | 'agent.tool_use' | 'agent.tool_result' | 'agent.mcp_tool_use' | 'agent.mcp_tool_result' | 'user.tool_confirmation' | 'session.thread_created' | 'session.thread_status_running' | 'session.thread_status_idle' | 'session.thread_status_rescheduled' | 'session.thread_status_terminated' | 'agent.thread_message_sent' | 'agent.thread_message_received' | 'user.withdraw' | 'user.steer' | 'system.notification' | 'session.forked' | 'session.goal_changed' | 'session.goal_verification' | 'event_start' | 'event_delta' | 'ping' | 'error';
7109
+ event: 'user.message' | 'user.interrupt' | 'agent.message' | 'agent.thinking' | 'session.status_running' | 'session.status_rescheduled' | 'session.status_idle' | 'session.status_terminated' | 'agent.thread_context_compacted' | 'agent.thread_context_reset' | 'session.updated' | 'session.error' | 'session.usage' | 'span.model_request_start' | 'span.model_request_end' | 'agent.tool_use' | 'agent.tool_result' | 'agent.mcp_tool_use' | 'agent.mcp_tool_result' | 'user.tool_confirmation' | 'agent.custom_tool_use' | 'user.custom_tool_result' | 'session.thread_created' | 'session.thread_status_running' | 'session.thread_status_idle' | 'session.thread_status_rescheduled' | 'session.thread_status_terminated' | 'agent.thread_message_sent' | 'agent.thread_message_received' | 'user.withdraw' | 'user.steer' | 'system.notification' | 'session.forked' | 'session.goal_changed' | 'session.goal_verification' | 'event_start' | 'event_delta' | 'ping' | 'error';
7030
7110
  data: AgentSseData;
7031
7111
  };
7032
7112
  export type AgentManaged256 = {
@@ -17448,7 +17528,7 @@ export type AgentManaged172 = {
17448
17528
  */
17449
17529
  system: null | string;
17450
17530
  /**
17451
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
17531
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
17452
17532
  */
17453
17533
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
17454
17534
  /**
@@ -17705,7 +17785,7 @@ export type AgentManaged191 = {
17705
17785
  */
17706
17786
  text: string;
17707
17787
  /**
17708
- * Text block inside a tool result. Tool results are not accepted as events on this platform; sending one returns 400.
17788
+ * Text block inside a tool result. user.custom_tool_result accepts text blocks only; user.tool_result remains unsupported.
17709
17789
  */
17710
17790
  type: 'text';
17711
17791
  };
@@ -17977,6 +18057,24 @@ export type AgentSseData = {
17977
18057
  * A timestamp in RFC 3339 format
17978
18058
  */
17979
18059
  processed_at?: null | string;
18060
+ /**
18061
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
18062
+ */
18063
+ praxis_context?: {
18064
+ /**
18065
+ * Named page values supplied by the client for this turn.
18066
+ */
18067
+ items: Array<{
18068
+ /**
18069
+ * Page context key, such as lesson or section.
18070
+ */
18071
+ name: string;
18072
+ /**
18073
+ * Untrusted page value; escaped before inclusion in the user message.
18074
+ */
18075
+ value: string;
18076
+ }>;
18077
+ };
17980
18078
  /**
17981
18079
  * UI transcript message ID. Use the last assistant message in a successfully completed turn as the fork target.
17982
18080
  */
@@ -18601,6 +18699,68 @@ export type AgentSseData = {
18601
18699
  notes?: string;
18602
18700
  };
18603
18701
  };
18702
+ } | {
18703
+ /**
18704
+ * Unique identifier for this event.
18705
+ */
18706
+ id: string;
18707
+ /**
18708
+ * Input parameters for the tool call.
18709
+ */
18710
+ input: AgentManaged193;
18711
+ /**
18712
+ * Name of the custom tool being called.
18713
+ */
18714
+ name: string;
18715
+ /**
18716
+ * A timestamp in RFC 3339 format
18717
+ */
18718
+ processed_at: string;
18719
+ /**
18720
+ * Always `agent.custom_tool_use`. The agent called a custom tool defined by the client.
18721
+ */
18722
+ type: 'agent.custom_tool_use';
18723
+ /**
18724
+ * When set, this event was cross-posted from a subagent's thread to surface its
18725
+ * custom tool use on the primary thread's stream. Empty on the thread's own
18726
+ * events. Informational only: the server routes the matching
18727
+ * `user.custom_tool_result` by `custom_tool_use_id`, so clients do not send it
18728
+ * back.
18729
+ */
18730
+ session_thread_id?: null | string;
18731
+ } | {
18732
+ /**
18733
+ * Unique identifier for this event.
18734
+ */
18735
+ id: string;
18736
+ /**
18737
+ * The id of the `agent.custom_tool_use` event this result corresponds to, which
18738
+ * can be found in the last `session.status_idle`
18739
+ * [event's](https://platform.claude.com/docs/en/api/beta/sessions/events/list#beta_managed_agents_session_requires_action.event_ids)
18740
+ * `stop_reason.event_ids` field.
18741
+ */
18742
+ custom_tool_use_id: string;
18743
+ /**
18744
+ * Always `user.custom_tool_result`. The user's result for a custom tool call.
18745
+ */
18746
+ type: 'user.custom_tool_result';
18747
+ /**
18748
+ * The result content returned by the tool.
18749
+ */
18750
+ content?: Array<AgentManaged60 | AgentManaged61 | AgentManaged65 | AgentManaged189>;
18751
+ /**
18752
+ * Whether the tool execution resulted in an error.
18753
+ */
18754
+ is_error?: null | false | true;
18755
+ /**
18756
+ * A timestamp in RFC 3339 format
18757
+ */
18758
+ processed_at?: null | string;
18759
+ /**
18760
+ * Set by the server to the subagent thread this result was routed to. Omitted when
18761
+ * it was routed to the primary thread.
18762
+ */
18763
+ session_thread_id?: null | string;
18604
18764
  } | {
18605
18765
  /**
18606
18766
  * Unique identifier for this event.
@@ -26430,6 +26590,598 @@ export type SetRunFeedbackResponses = {
26430
26590
  };
26431
26591
  };
26432
26592
  export type SetRunFeedbackResponse = SetRunFeedbackResponses[keyof SetRunFeedbackResponses];
26593
+ export type ListEndUsersData = {
26594
+ body?: never;
26595
+ path: {
26596
+ /**
26597
+ * Active service agent identifier from agent creation or listing.
26598
+ */
26599
+ agent_id: string;
26600
+ };
26601
+ query?: {
26602
+ /**
26603
+ * Maximum users per page; defaults to 20.
26604
+ */
26605
+ limit?: number;
26606
+ /**
26607
+ * next_page from the previous response with the same agent, q and limit.
26608
+ */
26609
+ page?: string;
26610
+ /**
26611
+ * Case-sensitive literal prefix of external_user_id; omit or use an empty string for all users.
26612
+ */
26613
+ q?: string;
26614
+ };
26615
+ url: '/agent/v1/agents/{agent_id}/end_users';
26616
+ };
26617
+ export type ListEndUsersErrors = {
26618
+ /**
26619
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26620
+ */
26621
+ 400: unknown;
26622
+ /**
26623
+ * Authenticate with a host credential.
26624
+ */
26625
+ 401: unknown;
26626
+ /**
26627
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26628
+ */
26629
+ 404: unknown;
26630
+ };
26631
+ export type ListEndUsersResponses = {
26632
+ /**
26633
+ * Matching users and next page cursor.
26634
+ */
26635
+ 200: {
26636
+ /**
26637
+ * Items of this page, in the order requested by the call.
26638
+ */
26639
+ data: Array<{
26640
+ /**
26641
+ * Host application's user identifier, scoped to this organization and agent.
26642
+ */
26643
+ external_user_id: string;
26644
+ /**
26645
+ * Earliest session creation or token issuance time; null for a preemptively blocked user with no history.
26646
+ */
26647
+ first_seen_at: string | null;
26648
+ /**
26649
+ * Latest session update or token issuance time; null when there is no history.
26650
+ */
26651
+ last_active_at: string | null;
26652
+ /**
26653
+ * Total sessions for this end user on this agent.
26654
+ */
26655
+ session_count: number;
26656
+ /**
26657
+ * Accumulated recorded session cost in millionths of a US dollar; zero when no cost has been recorded.
26658
+ */
26659
+ cost_micro_usd: number;
26660
+ /**
26661
+ * Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
26662
+ */
26663
+ blocked: boolean;
26664
+ }>;
26665
+ /**
26666
+ * Cursor for the same agent, q and limit; null when exhausted.
26667
+ */
26668
+ next_page: string | null;
26669
+ };
26670
+ };
26671
+ export type ListEndUsersResponse = ListEndUsersResponses[keyof ListEndUsersResponses];
26672
+ export type DeleteEndUserData = {
26673
+ body?: never;
26674
+ path: {
26675
+ /**
26676
+ * Active service agent identifier from agent creation or listing.
26677
+ */
26678
+ agent_id: string;
26679
+ /**
26680
+ * Host user identifier supplied at issuance or from end-user listing.
26681
+ */
26682
+ external_user_id: string;
26683
+ };
26684
+ query: {
26685
+ /**
26686
+ * Must exactly equal the external_user_id path parameter to confirm destructive deletion.
26687
+ */
26688
+ confirm: string;
26689
+ };
26690
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}';
26691
+ };
26692
+ export type DeleteEndUserErrors = {
26693
+ /**
26694
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26695
+ */
26696
+ 400: unknown;
26697
+ /**
26698
+ * Authenticate with a host credential.
26699
+ */
26700
+ 401: unknown;
26701
+ /**
26702
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26703
+ */
26704
+ 404: unknown;
26705
+ };
26706
+ export type DeleteEndUserResponses = {
26707
+ /**
26708
+ * Deletion accepted; poll the deletion endpoint until done or failed.
26709
+ */
26710
+ 202: {
26711
+ /**
26712
+ * Deletion task identifier.
26713
+ */
26714
+ id: string;
26715
+ /**
26716
+ * Accepted for asynchronous processing; poll deletion for progress.
26717
+ */
26718
+ status: 'pending';
26719
+ };
26720
+ };
26721
+ export type DeleteEndUserResponse = DeleteEndUserResponses[keyof DeleteEndUserResponses];
26722
+ export type GetEndUserData = {
26723
+ body?: never;
26724
+ path: {
26725
+ /**
26726
+ * Active service agent identifier from agent creation or listing.
26727
+ */
26728
+ agent_id: string;
26729
+ /**
26730
+ * Host user identifier supplied at issuance or from end-user listing.
26731
+ */
26732
+ external_user_id: string;
26733
+ };
26734
+ query?: never;
26735
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}';
26736
+ };
26737
+ export type GetEndUserErrors = {
26738
+ /**
26739
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26740
+ */
26741
+ 400: unknown;
26742
+ /**
26743
+ * Authenticate with a host credential.
26744
+ */
26745
+ 401: unknown;
26746
+ /**
26747
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26748
+ */
26749
+ 404: unknown;
26750
+ };
26751
+ export type GetEndUserResponses = {
26752
+ /**
26753
+ * Current end-user view.
26754
+ */
26755
+ 200: {
26756
+ /**
26757
+ * Host application's user identifier, scoped to this organization and agent.
26758
+ */
26759
+ external_user_id: string;
26760
+ /**
26761
+ * Earliest session creation or token issuance time; null for a preemptively blocked user with no history.
26762
+ */
26763
+ first_seen_at: string | null;
26764
+ /**
26765
+ * Latest session update or token issuance time; null when there is no history.
26766
+ */
26767
+ last_active_at: string | null;
26768
+ /**
26769
+ * Total sessions for this end user on this agent.
26770
+ */
26771
+ session_count: number;
26772
+ /**
26773
+ * Accumulated recorded session cost in millionths of a US dollar; zero when no cost has been recorded.
26774
+ */
26775
+ cost_micro_usd: number;
26776
+ /**
26777
+ * Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
26778
+ */
26779
+ blocked: boolean;
26780
+ /**
26781
+ * Up to twenty sessions, ordered by most recent update first.
26782
+ */
26783
+ recent_sessions: Array<{
26784
+ /**
26785
+ * Public sesn_ session identifier, usable with session retrieval.
26786
+ */
26787
+ id: string;
26788
+ /**
26789
+ * Session title, or null when unset.
26790
+ */
26791
+ title: string | null;
26792
+ /**
26793
+ * Session entry surface, or null when no surface was recorded.
26794
+ */
26795
+ source: string | null;
26796
+ /**
26797
+ * Session creation time in UTC.
26798
+ */
26799
+ created_at: string;
26800
+ /**
26801
+ * Most recent session update time in UTC.
26802
+ */
26803
+ updated_at: string;
26804
+ }>;
26805
+ };
26806
+ };
26807
+ export type GetEndUserResponse = GetEndUserResponses[keyof GetEndUserResponses];
26808
+ export type GetEndUserDeletionData = {
26809
+ body?: never;
26810
+ path: {
26811
+ /**
26812
+ * Active service agent identifier from agent creation or listing.
26813
+ */
26814
+ agent_id: string;
26815
+ /**
26816
+ * Host user identifier supplied at issuance or from end-user listing.
26817
+ */
26818
+ external_user_id: string;
26819
+ };
26820
+ query?: never;
26821
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion';
26822
+ };
26823
+ export type GetEndUserDeletionErrors = {
26824
+ /**
26825
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26826
+ */
26827
+ 400: unknown;
26828
+ /**
26829
+ * Authenticate with a host credential.
26830
+ */
26831
+ 401: unknown;
26832
+ /**
26833
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26834
+ */
26835
+ 404: unknown;
26836
+ };
26837
+ export type GetEndUserDeletionResponses = {
26838
+ /**
26839
+ * Latest deletion task and snapshot counts.
26840
+ */
26841
+ 200: {
26842
+ /**
26843
+ * Deletion task identifier.
26844
+ */
26845
+ id: string;
26846
+ /**
26847
+ * pending: accepted; snapshotting: exporting recovery data; deleting: verified snapshot exists and erasure is running; done: erasure completed; failed: stopped safely, retry DELETE to resume the same task.
26848
+ */
26849
+ status: 'pending' | 'snapshotting' | 'deleting' | 'done' | 'failed';
26850
+ /**
26851
+ * Counts from the verified snapshot; empty until snapshotting completes.
26852
+ */
26853
+ counts: {
26854
+ /**
26855
+ * Number of primary and child sessions in the snapshot.
26856
+ */
26857
+ sessions?: number;
26858
+ /**
26859
+ * Number of durable session events captured without changing the history.
26860
+ */
26861
+ events?: number;
26862
+ /**
26863
+ * Number of stored transcript messages in the snapshot.
26864
+ */
26865
+ messages?: number;
26866
+ /**
26867
+ * Number of backed-up directory, authorization, feedback and projection rows.
26868
+ */
26869
+ d1_rows?: number;
26870
+ /**
26871
+ * Number of session attachment references; their file bytes are retained.
26872
+ */
26873
+ attachments?: number;
26874
+ };
26875
+ /**
26876
+ * Operator recovery snapshot key, retained for seven days. Attachment bytes are not copied or deleted.
26877
+ */
26878
+ snapshot_key?: string;
26879
+ /**
26880
+ * Content-free failure summary; retry the confirmed deletion to resume.
26881
+ */
26882
+ error?: string;
26883
+ /**
26884
+ * Task creation time in RFC 3339 format.
26885
+ */
26886
+ created_at: string;
26887
+ /**
26888
+ * Latest task update time in RFC 3339 format.
26889
+ */
26890
+ updated_at: string;
26891
+ };
26892
+ };
26893
+ export type GetEndUserDeletionResponse = GetEndUserDeletionResponses[keyof GetEndUserDeletionResponses];
26894
+ export type RevokeEndUserTokensData = {
26895
+ body?: never;
26896
+ path: {
26897
+ /**
26898
+ * Active service agent identifier from agent creation or listing.
26899
+ */
26900
+ agent_id: string;
26901
+ /**
26902
+ * Host user identifier supplied at issuance or from end-user listing.
26903
+ */
26904
+ external_user_id: string;
26905
+ };
26906
+ query?: never;
26907
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens';
26908
+ };
26909
+ export type RevokeEndUserTokensErrors = {
26910
+ /**
26911
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26912
+ */
26913
+ 400: unknown;
26914
+ /**
26915
+ * Authenticate with a host credential.
26916
+ */
26917
+ 401: unknown;
26918
+ /**
26919
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26920
+ */
26921
+ 404: unknown;
26922
+ /**
26923
+ * Credential revocation failed; grant timestamps remain unchanged. A requested block remains in effect; retry to finish revocation.
26924
+ */
26925
+ 502: unknown;
26926
+ };
26927
+ export type RevokeEndUserTokensResponses = {
26928
+ /**
26929
+ * Number of newly revoked grants.
26930
+ */
26931
+ 200: {
26932
+ /**
26933
+ * Number of previously unrevoked grants marked revoked by this request.
26934
+ */
26935
+ revoked: number;
26936
+ };
26937
+ };
26938
+ export type RevokeEndUserTokensResponse = RevokeEndUserTokensResponses[keyof RevokeEndUserTokensResponses];
26939
+ export type BlockEndUserData = {
26940
+ body?: never;
26941
+ path: {
26942
+ /**
26943
+ * Active service agent identifier from agent creation or listing.
26944
+ */
26945
+ agent_id: string;
26946
+ /**
26947
+ * Host user identifier supplied at issuance or from end-user listing.
26948
+ */
26949
+ external_user_id: string;
26950
+ };
26951
+ query?: never;
26952
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block';
26953
+ };
26954
+ export type BlockEndUserErrors = {
26955
+ /**
26956
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
26957
+ */
26958
+ 400: unknown;
26959
+ /**
26960
+ * Authenticate with a host credential.
26961
+ */
26962
+ 401: unknown;
26963
+ /**
26964
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
26965
+ */
26966
+ 404: unknown;
26967
+ /**
26968
+ * Configure an embed policy before blocking or unblocking; retry if a concurrent policy update caused the conflict.
26969
+ */
26970
+ 409: unknown;
26971
+ /**
26972
+ * Credential revocation failed; grant timestamps remain unchanged. A requested block remains in effect; retry to finish revocation.
26973
+ */
26974
+ 502: unknown;
26975
+ };
26976
+ export type BlockEndUserResponses = {
26977
+ /**
26978
+ * Current end-user view.
26979
+ */
26980
+ 200: {
26981
+ /**
26982
+ * Host application's user identifier, scoped to this organization and agent.
26983
+ */
26984
+ external_user_id: string;
26985
+ /**
26986
+ * Earliest session creation or token issuance time; null for a preemptively blocked user with no history.
26987
+ */
26988
+ first_seen_at: string | null;
26989
+ /**
26990
+ * Latest session update or token issuance time; null when there is no history.
26991
+ */
26992
+ last_active_at: string | null;
26993
+ /**
26994
+ * Total sessions for this end user on this agent.
26995
+ */
26996
+ session_count: number;
26997
+ /**
26998
+ * Accumulated recorded session cost in millionths of a US dollar; zero when no cost has been recorded.
26999
+ */
27000
+ cost_micro_usd: number;
27001
+ /**
27002
+ * Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
27003
+ */
27004
+ blocked: boolean;
27005
+ };
27006
+ };
27007
+ export type BlockEndUserResponse = BlockEndUserResponses[keyof BlockEndUserResponses];
27008
+ export type UnblockEndUserData = {
27009
+ body?: never;
27010
+ path: {
27011
+ /**
27012
+ * Active service agent identifier from agent creation or listing.
27013
+ */
27014
+ agent_id: string;
27015
+ /**
27016
+ * Host user identifier supplied at issuance or from end-user listing.
27017
+ */
27018
+ external_user_id: string;
27019
+ };
27020
+ query?: never;
27021
+ url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock';
27022
+ };
27023
+ export type UnblockEndUserErrors = {
27024
+ /**
27025
+ * Invalid identifier, prefix, limit, cursor or blocklist size; correct the reported input.
27026
+ */
27027
+ 400: unknown;
27028
+ /**
27029
+ * Authenticate with a host credential.
27030
+ */
27031
+ 401: unknown;
27032
+ /**
27033
+ * Agent or requested user is unavailable to this caller, or the caller is an end user.
27034
+ */
27035
+ 404: unknown;
27036
+ /**
27037
+ * Configure an embed policy before blocking or unblocking; retry if a concurrent policy update caused the conflict.
27038
+ */
27039
+ 409: unknown;
27040
+ };
27041
+ export type UnblockEndUserResponses = {
27042
+ /**
27043
+ * Current end-user view.
27044
+ */
27045
+ 200: {
27046
+ /**
27047
+ * Host application's user identifier, scoped to this organization and agent.
27048
+ */
27049
+ external_user_id: string;
27050
+ /**
27051
+ * Earliest session creation or token issuance time; null for a preemptively blocked user with no history.
27052
+ */
27053
+ first_seen_at: string | null;
27054
+ /**
27055
+ * Latest session update or token issuance time; null when there is no history.
27056
+ */
27057
+ last_active_at: string | null;
27058
+ /**
27059
+ * Total sessions for this end user on this agent.
27060
+ */
27061
+ session_count: number;
27062
+ /**
27063
+ * Accumulated recorded session cost in millionths of a US dollar; zero when no cost has been recorded.
27064
+ */
27065
+ cost_micro_usd: number;
27066
+ /**
27067
+ * Whether the embed policy currently prevents this user from receiving tokens and creating sessions.
27068
+ */
27069
+ blocked: boolean;
27070
+ };
27071
+ };
27072
+ export type UnblockEndUserResponse = UnblockEndUserResponses[keyof UnblockEndUserResponses];
27073
+ export type ExchangeEmbedCodeData = {
27074
+ body: {
27075
+ /**
27076
+ * Single-use credential from the c fragment parameter of hosted_url returned by embed token creation. Valid for 60 seconds.
27077
+ */
27078
+ code: string;
27079
+ };
27080
+ path?: never;
27081
+ query?: never;
27082
+ url: '/agent/v1/embed/exchange';
27083
+ };
27084
+ export type ExchangeEmbedCodeErrors = {
27085
+ /**
27086
+ * Expected a JSON object containing only code. Correct the request body.
27087
+ */
27088
+ 400: unknown;
27089
+ /**
27090
+ * The code is expired, already used or unknown. Return to the host website for a new link; all three cases have the same response body.
27091
+ */
27092
+ 404: unknown;
27093
+ /**
27094
+ * The IP minute limit is reached. Wait for Retry-After before trying a fresh link.
27095
+ */
27096
+ 429: unknown;
27097
+ /**
27098
+ * Exchange or rate limiting is unavailable. Return to the host website for a new link later.
27099
+ */
27100
+ 503: unknown;
27101
+ };
27102
+ export type ExchangeEmbedCodeResponses = {
27103
+ /**
27104
+ * The end-user token and its expiration; the code has been consumed.
27105
+ */
27106
+ 200: {
27107
+ /**
27108
+ * End-user credential for the hosted conversation. Keep it in memory; it cannot be refreshed here.
27109
+ */
27110
+ token: string;
27111
+ /**
27112
+ * Token expiration as an ISO 8601 UTC timestamp. Return to the host website after expiration.
27113
+ */
27114
+ expires_at: string;
27115
+ };
27116
+ };
27117
+ export type ExchangeEmbedCodeResponse = ExchangeEmbedCodeResponses[keyof ExchangeEmbedCodeResponses];
27118
+ export type CreateAnonymousEmbedTokenData = {
27119
+ body: {
27120
+ /**
27121
+ * Public key created by the service agent owner; safe to include in browser code.
27122
+ */
27123
+ publishable_key: string;
27124
+ /**
27125
+ * Secret returned by a previous anonymous issuance for this key. Omit for a new visitor; an unknown secret creates a new visitor.
27126
+ */
27127
+ visitor_secret?: string;
27128
+ };
27129
+ headers: {
27130
+ /**
27131
+ * Browser page origin from the agent policy allowlist.
27132
+ */
27133
+ Origin: string;
27134
+ };
27135
+ path?: never;
27136
+ query?: never;
27137
+ url: '/agent/v1/embed_tokens/anonymous';
27138
+ };
27139
+ export type CreateAnonymousEmbedTokenErrors = {
27140
+ /**
27141
+ * Unknown or invalid request fields, or key budget exceeds policy. Correct the request or ask the owner to update the key.
27142
+ */
27143
+ 400: unknown;
27144
+ /**
27145
+ * Unknown or disabled publishable key. Ask the agent owner for an active key.
27146
+ */
27147
+ 401: unknown;
27148
+ /**
27149
+ * EMBED_BUDGET_EXHAUSTED. The daily spending cap is reached; wait for the UTC reset or ask the owner to raise it.
27150
+ */
27151
+ 402: unknown;
27152
+ /**
27153
+ * EMBED_ORIGIN_NOT_ALLOWED or EMBED_USER_BLOCKED. Use an allowed page origin or contact the owner.
27154
+ */
27155
+ 403: unknown;
27156
+ /**
27157
+ * EMBED_RATE_LIMITED. Wait for the IP minute window or UTC daily session cap reset.
27158
+ */
27159
+ 429: unknown;
27160
+ /**
27161
+ * Anonymous issuance or rate limiting is unavailable; retry later.
27162
+ */
27163
+ 503: unknown;
27164
+ };
27165
+ export type CreateAnonymousEmbedTokenResponses = {
27166
+ /**
27167
+ * End-user token and expiration, with a visitor secret only for a new visitor.
27168
+ */
27169
+ 200: {
27170
+ /**
27171
+ * Short-lived end-user bearer credential for this agent's embedded sessions.
27172
+ */
27173
+ token: string;
27174
+ /**
27175
+ * RFC 3339 expiration; refresh before this time using the same visitor_secret.
27176
+ */
27177
+ expires_at: string;
27178
+ /**
27179
+ * Newly generated visitor secret; save it locally and include it on later requests. Absent when the supplied secret was recognized.
27180
+ */
27181
+ visitor_secret?: string;
27182
+ };
27183
+ };
27184
+ export type CreateAnonymousEmbedTokenResponse = CreateAnonymousEmbedTokenResponses[keyof CreateAnonymousEmbedTokenResponses];
26433
27185
  export type ListEmbedTokensData = {
26434
27186
  body?: never;
26435
27187
  path?: never;
@@ -26539,6 +27291,10 @@ export type ListEmbedTokensResponses = {
26539
27291
  export type ListEmbedTokensResponse = ListEmbedTokensResponses[keyof ListEmbedTokensResponses];
26540
27292
  export type CreateEmbedTokenData = {
26541
27293
  body: {
27294
+ /**
27295
+ * Set true to also return a hosted chat URL with a single-use credential valid for 60 seconds. Defaults to false; the agent must have an identity_number.
27296
+ */
27297
+ hosted?: boolean;
26542
27298
  /**
26543
27299
  * Service agent ID or identity_number from agent retrieval; it must belong to your organization and be active.
26544
27300
  */
@@ -26598,7 +27354,7 @@ export type CreateEmbedTokenData = {
26598
27354
  };
26599
27355
  export type CreateEmbedTokenErrors = {
26600
27356
  /**
26601
- * Request fields exceed policy limits, the policy or its environment is unavailable, or hosted was supplied. Configure the policy or correct the reported field.
27357
+ * Request fields exceed policy limits, the policy or its environment is unavailable, or a hosted agent has no identity_number. Configure the policy or correct the reported field.
26602
27358
  */
26603
27359
  400: unknown;
26604
27360
  /**
@@ -26623,6 +27379,10 @@ export type CreateEmbedTokenResponses = {
26623
27379
  * Issued end-user token and its grant identifier and expiration.
26624
27380
  */
26625
27381
  201: {
27382
+ /**
27383
+ * Hosted chat link, returned only when hosted is true. Redirect the user here within 60 seconds; its fragment credential can be exchanged only once.
27384
+ */
27385
+ hosted_url?: string;
26626
27386
  /**
26627
27387
  * Grant identifier with the emb_ prefix, identifying this issuance.
26628
27388
  */
@@ -26857,6 +27617,10 @@ export type ComputersListResponses = {
26857
27617
  * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
26858
27618
  */
26859
27619
  sandbox_id: string | null;
27620
+ /**
27621
+ * not_started means the machine has not been created; first use provisions it. provisioned means a machine has been created, whether running or paused.
27622
+ */
27623
+ machine_state: 'not_started' | 'provisioned';
26860
27624
  /**
26861
27625
  * Environment recipe the computer was created with; null when none.
26862
27626
  */
@@ -27018,6 +27782,10 @@ export type ComputersCreateResponses = {
27018
27782
  * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
27019
27783
  */
27020
27784
  sandbox_id: string | null;
27785
+ /**
27786
+ * not_started means the machine has not been created; first use provisions it. provisioned means a machine has been created, whether running or paused.
27787
+ */
27788
+ machine_state: 'not_started' | 'provisioned';
27021
27789
  /**
27022
27790
  * Environment recipe the computer was created with; null when none.
27023
27791
  */
@@ -27286,6 +28054,10 @@ export type ComputersRetrieveResponses = {
27286
28054
  * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
27287
28055
  */
27288
28056
  sandbox_id: string | null;
28057
+ /**
28058
+ * not_started means the machine has not been created; first use provisions it. provisioned means a machine has been created, whether running or paused.
28059
+ */
28060
+ machine_state: 'not_started' | 'provisioned';
27289
28061
  /**
27290
28062
  * Environment recipe the computer was created with; null when none.
27291
28063
  */
@@ -27451,6 +28223,10 @@ export type ComputersUpdateResponses = {
27451
28223
  * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
27452
28224
  */
27453
28225
  sandbox_id: string | null;
28226
+ /**
28227
+ * not_started means the machine has not been created; first use provisions it. provisioned means a machine has been created, whether running or paused.
28228
+ */
28229
+ machine_state: 'not_started' | 'provisioned';
27454
28230
  /**
27455
28231
  * Environment recipe the computer was created with; null when none.
27456
28232
  */
@@ -27577,56 +28353,377 @@ export type ComputersArchiveErrors = {
27577
28353
  };
27578
28354
  };
27579
28355
  };
27580
- export type ComputersArchiveError = ComputersArchiveErrors[keyof ComputersArchiveErrors];
27581
- export type ComputersArchiveResponses = {
28356
+ export type ComputersArchiveError = ComputersArchiveErrors[keyof ComputersArchiveErrors];
28357
+ export type ComputersArchiveResponses = {
28358
+ /**
28359
+ * Computer result
28360
+ */
28361
+ 200: {
28362
+ /**
28363
+ * Always `computer`. A computer.
28364
+ */
28365
+ type: 'computer';
28366
+ /**
28367
+ * Computer id (cmp_...), the computer_id of computer calls.
28368
+ */
28369
+ id: string;
28370
+ /**
28371
+ * Display name of the computer, 1 to 255 characters.
28372
+ */
28373
+ name: string;
28374
+ /**
28375
+ * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
28376
+ */
28377
+ sandbox_id: string | null;
28378
+ /**
28379
+ * not_started means the machine has not been created; first use provisions it. provisioned means a machine has been created, whether running or paused.
28380
+ */
28381
+ machine_state: 'not_started' | 'provisioned';
28382
+ /**
28383
+ * Environment recipe the computer was created with; null when none.
28384
+ */
28385
+ environment_id: string | null;
28386
+ /**
28387
+ * active computers can be used by new sessions; archived ones keep their files readable but cannot start new sessions.
28388
+ */
28389
+ status: 'active' | 'archived';
28390
+ /**
28391
+ * RFC 3339 time at which the computer was created.
28392
+ */
28393
+ created_at: string;
28394
+ /**
28395
+ * RFC 3339 time at which the computer was last modified.
28396
+ */
28397
+ updated_at: string;
28398
+ /**
28399
+ * RFC 3339 time at which the computer was archived; null while active.
28400
+ */
28401
+ archived_at: string | null;
28402
+ };
28403
+ };
28404
+ export type ComputersArchiveResponse = ComputersArchiveResponses[keyof ComputersArchiveResponses];
28405
+ export type ComputersAttachmentsCreateData = {
28406
+ /**
28407
+ * Raw file content for the attachment named by the name query parameter.
28408
+ */
28409
+ body: Blob | File;
28410
+ path: {
28411
+ /**
28412
+ * Computer id (cmp_...), as returned by computers.create or computers.list.
28413
+ */
28414
+ computer_id: string;
28415
+ };
28416
+ query: {
28417
+ /**
28418
+ * Single filename, at most 255 UTF-8 bytes, excluding slash, dot segments and control characters.
28419
+ */
28420
+ name: string;
28421
+ };
28422
+ url: '/agent/v1/computers/{computer_id}/attachments';
28423
+ };
28424
+ export type ComputersAttachmentsCreateErrors = {
28425
+ /**
28426
+ * Platform error with Computer code, message and hint
28427
+ */
28428
+ 400: {
28429
+ error: {
28430
+ code: string;
28431
+ message: string;
28432
+ hint: string;
28433
+ };
28434
+ };
28435
+ /**
28436
+ * Platform error with Computer code, message and hint
28437
+ */
28438
+ 401: {
28439
+ error: {
28440
+ code: string;
28441
+ message: string;
28442
+ hint: string;
28443
+ };
28444
+ };
28445
+ /**
28446
+ * Platform error with Computer code, message and hint
28447
+ */
28448
+ 403: {
28449
+ error: {
28450
+ code: string;
28451
+ message: string;
28452
+ hint: string;
28453
+ };
28454
+ };
28455
+ /**
28456
+ * Computer or path not found; foreign computers are indistinguishable from absent computers.
28457
+ */
28458
+ 404: {
28459
+ error: {
28460
+ code: string;
28461
+ message: string;
28462
+ hint: string;
28463
+ };
28464
+ };
28465
+ /**
28466
+ * Platform error with Computer code, message and hint
28467
+ */
28468
+ 409: {
28469
+ error: {
28470
+ code: string;
28471
+ message: string;
28472
+ hint: string;
28473
+ };
28474
+ };
28475
+ /**
28476
+ * Platform error with Computer code, message and hint
28477
+ */
28478
+ 413: {
28479
+ error: {
28480
+ code: string;
28481
+ message: string;
28482
+ hint: string;
28483
+ };
28484
+ };
28485
+ /**
28486
+ * Platform error with Computer code, message and hint
28487
+ */
28488
+ 429: {
28489
+ error: {
28490
+ code: string;
28491
+ message: string;
28492
+ hint: string;
28493
+ };
28494
+ };
28495
+ /**
28496
+ * Platform error with Computer code, message and hint
28497
+ */
28498
+ 500: {
28499
+ error: {
28500
+ code: string;
28501
+ message: string;
28502
+ hint: string;
28503
+ };
28504
+ };
28505
+ /**
28506
+ * Platform error with Computer code, message and hint
28507
+ */
28508
+ 503: {
28509
+ error: {
28510
+ code: string;
28511
+ message: string;
28512
+ hint: string;
28513
+ };
28514
+ };
28515
+ };
28516
+ export type ComputersAttachmentsCreateError = ComputersAttachmentsCreateErrors[keyof ComputersAttachmentsCreateErrors];
28517
+ export type ComputersAttachmentsCreateResponses = {
28518
+ /**
28519
+ * Computer result
28520
+ */
28521
+ 201: {
28522
+ /**
28523
+ * Absolute path of the entry on the computer.
28524
+ */
28525
+ path: string;
28526
+ /**
28527
+ * Name of the entry or object.
28528
+ */
28529
+ name: string;
28530
+ /**
28531
+ * Kind of entry: a file, a directory or a symbolic link.
28532
+ */
28533
+ type: 'file' | 'dir' | 'symlink';
28534
+ /**
28535
+ * Size in bytes.
28536
+ */
28537
+ size: number;
28538
+ /**
28539
+ * MIME type of the file.
28540
+ */
28541
+ mime_type: string;
28542
+ /**
28543
+ * True when the entry cannot be modified through the API.
28544
+ */
28545
+ read_only: boolean;
28546
+ /**
28547
+ * Content digest of the file; null when not computed.
28548
+ */
28549
+ digest?: string | null;
28550
+ /**
28551
+ * RFC 3339 time at which the object was last modified.
28552
+ */
28553
+ updated_at: string | null;
28554
+ };
28555
+ };
28556
+ export type ComputersAttachmentsCreateResponse = ComputersAttachmentsCreateResponses[keyof ComputersAttachmentsCreateResponses];
28557
+ export type ComputersFilesListData = {
28558
+ body?: never;
28559
+ path: {
28560
+ /**
28561
+ * Computer id (cmp_...), as returned by computers.create or computers.list.
28562
+ */
28563
+ computer_id: string;
28564
+ };
28565
+ query?: {
28566
+ /**
28567
+ * Directory on the computer to list; absolute path as returned in the path field of an earlier listing. Omit it to list from the computer's root.
28568
+ */
28569
+ path?: string;
28570
+ };
28571
+ url: '/agent/v1/computers/{computer_id}/files';
28572
+ };
28573
+ export type ComputersFilesListErrors = {
28574
+ /**
28575
+ * Platform error with Computer code, message and hint
28576
+ */
28577
+ 400: {
28578
+ error: {
28579
+ code: string;
28580
+ message: string;
28581
+ hint: string;
28582
+ };
28583
+ };
28584
+ /**
28585
+ * Platform error with Computer code, message and hint
28586
+ */
28587
+ 401: {
28588
+ error: {
28589
+ code: string;
28590
+ message: string;
28591
+ hint: string;
28592
+ };
28593
+ };
28594
+ /**
28595
+ * Platform error with Computer code, message and hint
28596
+ */
28597
+ 403: {
28598
+ error: {
28599
+ code: string;
28600
+ message: string;
28601
+ hint: string;
28602
+ };
28603
+ };
28604
+ /**
28605
+ * Computer or path not found; foreign computers are indistinguishable from absent computers.
28606
+ */
28607
+ 404: {
28608
+ error: {
28609
+ code: string;
28610
+ message: string;
28611
+ hint: string;
28612
+ };
28613
+ };
28614
+ /**
28615
+ * Platform error with Computer code, message and hint
28616
+ */
28617
+ 409: {
28618
+ error: {
28619
+ code: string;
28620
+ message: string;
28621
+ hint: string;
28622
+ };
28623
+ };
28624
+ /**
28625
+ * Platform error with Computer code, message and hint
28626
+ */
28627
+ 413: {
28628
+ error: {
28629
+ code: string;
28630
+ message: string;
28631
+ hint: string;
28632
+ };
28633
+ };
28634
+ /**
28635
+ * Platform error with Computer code, message and hint
28636
+ */
28637
+ 429: {
28638
+ error: {
28639
+ code: string;
28640
+ message: string;
28641
+ hint: string;
28642
+ };
28643
+ };
28644
+ /**
28645
+ * Platform error with Computer code, message and hint
28646
+ */
28647
+ 500: {
28648
+ error: {
28649
+ code: string;
28650
+ message: string;
28651
+ hint: string;
28652
+ };
28653
+ };
28654
+ /**
28655
+ * Platform error with Computer code, message and hint
28656
+ */
28657
+ 503: {
28658
+ error: {
28659
+ code: string;
28660
+ message: string;
28661
+ hint: string;
28662
+ };
28663
+ };
28664
+ };
28665
+ export type ComputersFilesListError = ComputersFilesListErrors[keyof ComputersFilesListErrors];
28666
+ export type ComputersFilesListResponses = {
27582
28667
  /**
27583
28668
  * Computer result
27584
28669
  */
27585
28670
  200: {
27586
28671
  /**
27587
- * Always `computer`. A computer.
27588
- */
27589
- type: 'computer';
27590
- /**
27591
- * Computer id (cmp_...), the computer_id of computer calls.
27592
- */
27593
- id: string;
27594
- /**
27595
- * Display name of the computer, 1 to 255 characters.
27596
- */
27597
- name: string;
27598
- /**
27599
- * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
27600
- */
27601
- sandbox_id: string | null;
27602
- /**
27603
- * Environment recipe the computer was created with; null when none.
27604
- */
27605
- environment_id: string | null;
27606
- /**
27607
- * active computers can be used by new sessions; archived ones keep their files readable but cannot start new sessions.
28672
+ * Items of this page, in the order requested by the call.
27608
28673
  */
27609
- status: 'active' | 'archived';
28674
+ data: Array<{
28675
+ /**
28676
+ * Absolute path of the entry on the computer.
28677
+ */
28678
+ path: string;
28679
+ /**
28680
+ * Name of the entry or object.
28681
+ */
28682
+ name: string;
28683
+ /**
28684
+ * Kind of entry: a file, a directory or a symbolic link.
28685
+ */
28686
+ type: 'file' | 'dir' | 'symlink';
28687
+ /**
28688
+ * Size in bytes.
28689
+ */
28690
+ size: number;
28691
+ /**
28692
+ * MIME type of the file.
28693
+ */
28694
+ mime_type: string;
28695
+ /**
28696
+ * True when the entry cannot be modified through the API.
28697
+ */
28698
+ read_only: boolean;
28699
+ /**
28700
+ * Content digest of the file; null when not computed.
28701
+ */
28702
+ digest?: string | null;
28703
+ /**
28704
+ * RFC 3339 time at which the object was last modified.
28705
+ */
28706
+ updated_at: string | null;
28707
+ }>;
27610
28708
  /**
27611
- * RFC 3339 time at which the computer was created.
28709
+ * Whether more items exist beyond this page.
27612
28710
  */
27613
- created_at: string;
28711
+ has_more: false;
28712
+ };
28713
+ };
28714
+ export type ComputersFilesListResponse = ComputersFilesListResponses[keyof ComputersFilesListResponses];
28715
+ export type ComputersFilesContentData = {
28716
+ body?: never;
28717
+ headers?: {
27614
28718
  /**
27615
- * RFC 3339 time at which the computer was last modified.
28719
+ * Quoted digest entity-tag; legacy unquoted digests are also accepted.
27616
28720
  */
27617
- updated_at: string;
28721
+ 'If-None-Match'?: string;
27618
28722
  /**
27619
- * RFC 3339 time at which the computer was archived; null while active.
28723
+ * Single byte range, including open-ended and suffix ranges.
27620
28724
  */
27621
- archived_at: string | null;
28725
+ Range?: string;
27622
28726
  };
27623
- };
27624
- export type ComputersArchiveResponse = ComputersArchiveResponses[keyof ComputersArchiveResponses];
27625
- export type ComputersAttachmentsCreateData = {
27626
- /**
27627
- * Raw file content for the attachment named by the name query parameter.
27628
- */
27629
- body: Blob | File;
27630
28727
  path: {
27631
28728
  /**
27632
28729
  * Computer id (cmp_...), as returned by computers.create or computers.list.
@@ -27635,13 +28732,13 @@ export type ComputersAttachmentsCreateData = {
27635
28732
  };
27636
28733
  query: {
27637
28734
  /**
27638
- * Single filename, at most 255 UTF-8 bytes, excluding slash, dot segments and control characters.
28735
+ * Absolute path of the file whose content to download, as returned in the path field of computers.files.list.
27639
28736
  */
27640
- name: string;
28737
+ path: string;
27641
28738
  };
27642
- url: '/agent/v1/computers/{computer_id}/attachments';
28739
+ url: '/agent/v1/computers/{computer_id}/files/content';
27643
28740
  };
27644
- export type ComputersAttachmentsCreateErrors = {
28741
+ export type ComputersFilesContentErrors = {
27645
28742
  /**
27646
28743
  * Platform error with Computer code, message and hint
27647
28744
  */
@@ -27702,6 +28799,16 @@ export type ComputersAttachmentsCreateErrors = {
27702
28799
  hint: string;
27703
28800
  };
27704
28801
  };
28802
+ /**
28803
+ * Range unavailable
28804
+ */
28805
+ 416: {
28806
+ error: {
28807
+ code: string;
28808
+ message: string;
28809
+ hint: string;
28810
+ };
28811
+ };
27705
28812
  /**
27706
28813
  * Platform error with Computer code, message and hint
27707
28814
  */
@@ -27733,48 +28840,19 @@ export type ComputersAttachmentsCreateErrors = {
27733
28840
  };
27734
28841
  };
27735
28842
  };
27736
- export type ComputersAttachmentsCreateError = ComputersAttachmentsCreateErrors[keyof ComputersAttachmentsCreateErrors];
27737
- export type ComputersAttachmentsCreateResponses = {
28843
+ export type ComputersFilesContentError = ComputersFilesContentErrors[keyof ComputersFilesContentErrors];
28844
+ export type ComputersFilesContentResponses = {
27738
28845
  /**
27739
- * Computer result
28846
+ * Raw file bytes (at most 16 MiB); Content-Type is inferred from the extension. ETag is present only when a digest is available. Larger files require the sandbox connection issued by connect.
27740
28847
  */
27741
- 201: {
27742
- /**
27743
- * Absolute path of the entry on the computer.
27744
- */
27745
- path: string;
27746
- /**
27747
- * Name of the entry or object.
27748
- */
27749
- name: string;
27750
- /**
27751
- * Kind of entry: a file, a directory or a symbolic link.
27752
- */
27753
- type: 'file' | 'dir' | 'symlink';
27754
- /**
27755
- * Size in bytes.
27756
- */
27757
- size: number;
27758
- /**
27759
- * MIME type of the file.
27760
- */
27761
- mime_type: string;
27762
- /**
27763
- * True when the entry cannot be modified through the API.
27764
- */
27765
- read_only: boolean;
27766
- /**
27767
- * Content digest of the file; null when not computed.
27768
- */
27769
- digest?: string | null;
27770
- /**
27771
- * RFC 3339 time at which the object was last modified.
27772
- */
27773
- updated_at: string | null;
27774
- };
28848
+ 200: Blob | File;
28849
+ /**
28850
+ * Single byte range
28851
+ */
28852
+ 206: Blob | File;
27775
28853
  };
27776
- export type ComputersAttachmentsCreateResponse = ComputersAttachmentsCreateResponses[keyof ComputersAttachmentsCreateResponses];
27777
- export type ComputersFilesListData = {
28854
+ export type ComputersFilesContentResponse = ComputersFilesContentResponses[keyof ComputersFilesContentResponses];
28855
+ export type ConnectComputerData = {
27778
28856
  body?: never;
27779
28857
  path: {
27780
28858
  /**
@@ -27782,15 +28860,10 @@ export type ComputersFilesListData = {
27782
28860
  */
27783
28861
  computer_id: string;
27784
28862
  };
27785
- query?: {
27786
- /**
27787
- * Directory on the computer to list; absolute path as returned in the path field of an earlier listing. Omit it to list from the computer's root.
27788
- */
27789
- path?: string;
27790
- };
27791
- url: '/agent/v1/computers/{computer_id}/files';
28863
+ query?: never;
28864
+ url: '/agent/v1/computers/{computer_id}/connect';
27792
28865
  };
27793
- export type ComputersFilesListErrors = {
28866
+ export type ConnectComputerErrors = {
27794
28867
  /**
27795
28868
  * Platform error with Computer code, message and hint
27796
28869
  */
@@ -27882,83 +28955,55 @@ export type ComputersFilesListErrors = {
27882
28955
  };
27883
28956
  };
27884
28957
  };
27885
- export type ComputersFilesListError = ComputersFilesListErrors[keyof ComputersFilesListErrors];
27886
- export type ComputersFilesListResponses = {
28958
+ export type ConnectComputerError = ConnectComputerErrors[keyof ConnectComputerErrors];
28959
+ export type ConnectComputerResponses = {
27887
28960
  /**
27888
28961
  * Computer result
27889
28962
  */
27890
28963
  200: {
27891
28964
  /**
27892
- * Items of this page, in the order requested by the call.
28965
+ * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
27893
28966
  */
27894
- data: Array<{
27895
- /**
27896
- * Absolute path of the entry on the computer.
27897
- */
27898
- path: string;
27899
- /**
27900
- * Name of the entry or object.
27901
- */
27902
- name: string;
27903
- /**
27904
- * Kind of entry: a file, a directory or a symbolic link.
27905
- */
27906
- type: 'file' | 'dir' | 'symlink';
27907
- /**
27908
- * Size in bytes.
27909
- */
27910
- size: number;
27911
- /**
27912
- * MIME type of the file.
27913
- */
27914
- mime_type: string;
27915
- /**
27916
- * True when the entry cannot be modified through the API.
27917
- */
27918
- read_only: boolean;
27919
- /**
27920
- * Content digest of the file; null when not computed.
27921
- */
27922
- digest?: string | null;
27923
- /**
27924
- * RFC 3339 time at which the object was last modified.
27925
- */
27926
- updated_at: string | null;
27927
- }>;
28967
+ sandbox_id: string;
27928
28968
  /**
27929
- * Whether more items exist beyond this page.
28969
+ * Access token for the sandbox's environment daemon, returned by the connect call; treat it as a secret.
27930
28970
  */
27931
- has_more: false;
27932
- };
27933
- };
27934
- export type ComputersFilesListResponse = ComputersFilesListResponses[keyof ComputersFilesListResponses];
27935
- export type ComputersFilesContentData = {
27936
- body?: never;
27937
- headers?: {
28971
+ envd_access_token: string;
27938
28972
  /**
27939
- * Quoted digest entity-tag; legacy unquoted digests are also accepted.
28973
+ * Sandbox template the computer's sandbox was created from.
27940
28974
  */
27941
- 'If-None-Match'?: string;
28975
+ template_id: string;
27942
28976
  /**
27943
- * Single byte range, including open-ended and suffix ranges.
28977
+ * Machine the connection reached: light (the always-present file machine) or heavy (the full machine started on demand and kept while leases are held).
27944
28978
  */
27945
- Range?: string;
28979
+ tier: 'light' | 'heavy';
28980
+ /**
28981
+ * Id of the lease that keeps this connection's machine in service; renew it while the connection is open and release it on close. Null when no lease exists.
28982
+ */
28983
+ lease_id: string | null;
28984
+ /**
28985
+ * Time the lease lapses unless renewed, as an ISO 8601 timestamp; renew at about a third of the time remaining.
28986
+ */
28987
+ lease_expires_at: string | null;
27946
28988
  };
28989
+ };
28990
+ export type ConnectComputerResponse = ConnectComputerResponses[keyof ConnectComputerResponses];
28991
+ export type RenewComputerLeaseData = {
28992
+ body?: never;
27947
28993
  path: {
27948
28994
  /**
27949
28995
  * Computer id (cmp_...), as returned by computers.create or computers.list.
27950
28996
  */
27951
28997
  computer_id: string;
27952
- };
27953
- query: {
27954
28998
  /**
27955
- * Absolute path of the file whose content to download, as returned in the path field of computers.files.list.
28999
+ * lease_id from the connect response.
27956
29000
  */
27957
- path: string;
29001
+ lease_id: string;
27958
29002
  };
27959
- url: '/agent/v1/computers/{computer_id}/files/content';
29003
+ query?: never;
29004
+ url: '/agent/v1/computers/{computer_id}/leases/{lease_id}/renew';
27960
29005
  };
27961
- export type ComputersFilesContentErrors = {
29006
+ export type RenewComputerLeaseErrors = {
27962
29007
  /**
27963
29008
  * Platform error with Computer code, message and hint
27964
29009
  */
@@ -28019,16 +29064,6 @@ export type ComputersFilesContentErrors = {
28019
29064
  hint: string;
28020
29065
  };
28021
29066
  };
28022
- /**
28023
- * Range unavailable
28024
- */
28025
- 416: {
28026
- error: {
28027
- code: string;
28028
- message: string;
28029
- hint: string;
28030
- };
28031
- };
28032
29067
  /**
28033
29068
  * Platform error with Computer code, message and hint
28034
29069
  */
@@ -28060,30 +29095,39 @@ export type ComputersFilesContentErrors = {
28060
29095
  };
28061
29096
  };
28062
29097
  };
28063
- export type ComputersFilesContentError = ComputersFilesContentErrors[keyof ComputersFilesContentErrors];
28064
- export type ComputersFilesContentResponses = {
29098
+ export type RenewComputerLeaseError = RenewComputerLeaseErrors[keyof RenewComputerLeaseErrors];
29099
+ export type RenewComputerLeaseResponses = {
28065
29100
  /**
28066
- * Raw file bytes (at most 16 MiB); Content-Type is inferred from the extension. ETag is present only when a digest is available. Larger files require the sandbox connection issued by connect.
28067
- */
28068
- 200: Blob | File;
28069
- /**
28070
- * Single byte range
29101
+ * Computer result
28071
29102
  */
28072
- 206: Blob | File;
29103
+ 200: {
29104
+ /**
29105
+ * Id of the lease that keeps this connection's machine in service; renew it while the connection is open and release it on close. Null when no lease exists.
29106
+ */
29107
+ lease_id: string;
29108
+ /**
29109
+ * Time the lease lapses unless renewed, as an ISO 8601 timestamp; renew at about a third of the time remaining.
29110
+ */
29111
+ lease_expires_at: string;
29112
+ };
28073
29113
  };
28074
- export type ComputersFilesContentResponse = ComputersFilesContentResponses[keyof ComputersFilesContentResponses];
28075
- export type ConnectComputerData = {
29114
+ export type RenewComputerLeaseResponse = RenewComputerLeaseResponses[keyof RenewComputerLeaseResponses];
29115
+ export type ReleaseComputerLeaseData = {
28076
29116
  body?: never;
28077
29117
  path: {
28078
29118
  /**
28079
29119
  * Computer id (cmp_...), as returned by computers.create or computers.list.
28080
29120
  */
28081
29121
  computer_id: string;
29122
+ /**
29123
+ * lease_id from the connect response.
29124
+ */
29125
+ lease_id: string;
28082
29126
  };
28083
29127
  query?: never;
28084
- url: '/agent/v1/computers/{computer_id}/connect';
29128
+ url: '/agent/v1/computers/{computer_id}/leases/{lease_id}';
28085
29129
  };
28086
- export type ConnectComputerErrors = {
29130
+ export type ReleaseComputerLeaseErrors = {
28087
29131
  /**
28088
29132
  * Platform error with Computer code, message and hint
28089
29133
  */
@@ -28175,27 +29219,23 @@ export type ConnectComputerErrors = {
28175
29219
  };
28176
29220
  };
28177
29221
  };
28178
- export type ConnectComputerError = ConnectComputerErrors[keyof ConnectComputerErrors];
28179
- export type ConnectComputerResponses = {
29222
+ export type ReleaseComputerLeaseError = ReleaseComputerLeaseErrors[keyof ReleaseComputerLeaseErrors];
29223
+ export type ReleaseComputerLeaseResponses = {
28180
29224
  /**
28181
29225
  * Computer result
28182
29226
  */
28183
29227
  200: {
28184
29228
  /**
28185
- * Public id of the sandbox that backs the computer, usable with the sandbox API; null while none has been created.
29229
+ * Id of the released lease.
28186
29230
  */
28187
- sandbox_id: string;
29231
+ id: string;
28188
29232
  /**
28189
- * Access token for the sandbox's environment daemon, returned by the connect call; treat it as a secret.
29233
+ * Object type tag.
28190
29234
  */
28191
- envd_access_token: string;
28192
- /**
28193
- * Sandbox template the computer's sandbox was created from.
28194
- */
28195
- template_id: string;
29235
+ type: 'computer_lease_released';
28196
29236
  };
28197
29237
  };
28198
- export type ConnectComputerResponse = ConnectComputerResponses[keyof ConnectComputerResponses];
29238
+ export type ReleaseComputerLeaseResponse = ReleaseComputerLeaseResponses[keyof ReleaseComputerLeaseResponses];
28199
29239
  export type ListToolsetsData = {
28200
29240
  body?: never;
28201
29241
  path?: never;
@@ -28588,11 +29628,11 @@ export type ForkSessionResponses = {
28588
29628
  */
28589
29629
  description: null | string;
28590
29630
  /**
28591
- * URL MCP servers the agent can call, paired one-to-one with mcp_toolset entries in tools and saved with the agent version. No credentials are stored here.
29631
+ * Praxis extension: Streamable HTTP, SSE or trusted stdio MCP servers, persisted with the agent version. Optional fields remain omitted when not supplied.
28592
29632
  */
28593
29633
  mcp_servers: Array<{
28594
29634
  /**
28595
- * Always `url`. An MCP server reached over a URL.
29635
+ * Streamable HTTP transport.
28596
29636
  */
28597
29637
  type: 'url';
28598
29638
  /**
@@ -28600,9 +29640,69 @@ export type ForkSessionResponses = {
28600
29640
  */
28601
29641
  name: string;
28602
29642
  /**
28603
- * http(s) endpoint of the MCP server, at most 2048 characters.
29643
+ * HTTP or HTTPS MCP server endpoint.
28604
29644
  */
28605
29645
  url: string;
29646
+ /**
29647
+ * Praxis extension: request headers. Platform identity headers take precedence, case-insensitively.
29648
+ */
29649
+ headers?: {
29650
+ [key: string]: string;
29651
+ };
29652
+ /**
29653
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29654
+ */
29655
+ timeout_ms?: number;
29656
+ } | {
29657
+ /**
29658
+ * Legacy SSE transport.
29659
+ */
29660
+ type: 'sse';
29661
+ /**
29662
+ * Name of the MCP server; the mcp_toolset entry that refers to it uses the same name in mcp_server_name.
29663
+ */
29664
+ name: string;
29665
+ /**
29666
+ * HTTP or HTTPS MCP server endpoint.
29667
+ */
29668
+ url: string;
29669
+ /**
29670
+ * Praxis extension: request headers. Platform identity headers take precedence, case-insensitively.
29671
+ */
29672
+ headers?: {
29673
+ [key: string]: string;
29674
+ };
29675
+ /**
29676
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29677
+ */
29678
+ timeout_ms?: number;
29679
+ } | {
29680
+ /**
29681
+ * Run a command on the agent computer.
29682
+ */
29683
+ type: 'stdio';
29684
+ /**
29685
+ * Name of the MCP server; the mcp_toolset entry that refers to it uses the same name in mcp_server_name.
29686
+ */
29687
+ name: string;
29688
+ /**
29689
+ * Executable command on the agent computer.
29690
+ */
29691
+ command: string;
29692
+ /**
29693
+ * Command arguments; omitted means no arguments.
29694
+ */
29695
+ args?: Array<string>;
29696
+ /**
29697
+ * Praxis extension: environment variables for the command on the agent computer.
29698
+ */
29699
+ env?: {
29700
+ [key: string]: string;
29701
+ };
29702
+ /**
29703
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29704
+ */
29705
+ timeout_ms?: number;
28606
29706
  }>;
28607
29707
  /**
28608
29708
  * Model identifier and configuration.
@@ -28693,11 +29793,11 @@ export type ForkSessionResponses = {
28693
29793
  */
28694
29794
  description: null | string;
28695
29795
  /**
28696
- * URL MCP servers the agent can call, paired one-to-one with mcp_toolset entries in tools and saved with the agent version. No credentials are stored here.
29796
+ * Praxis extension: Streamable HTTP, SSE or trusted stdio MCP servers, persisted with the agent version. Optional fields remain omitted when not supplied.
28697
29797
  */
28698
29798
  mcp_servers: Array<{
28699
29799
  /**
28700
- * Always `url`. An MCP server reached over a URL.
29800
+ * Streamable HTTP transport.
28701
29801
  */
28702
29802
  type: 'url';
28703
29803
  /**
@@ -28705,9 +29805,69 @@ export type ForkSessionResponses = {
28705
29805
  */
28706
29806
  name: string;
28707
29807
  /**
28708
- * http(s) endpoint of the MCP server, at most 2048 characters.
29808
+ * HTTP or HTTPS MCP server endpoint.
29809
+ */
29810
+ url: string;
29811
+ /**
29812
+ * Praxis extension: request headers. Platform identity headers take precedence, case-insensitively.
29813
+ */
29814
+ headers?: {
29815
+ [key: string]: string;
29816
+ };
29817
+ /**
29818
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29819
+ */
29820
+ timeout_ms?: number;
29821
+ } | {
29822
+ /**
29823
+ * Legacy SSE transport.
29824
+ */
29825
+ type: 'sse';
29826
+ /**
29827
+ * Name of the MCP server; the mcp_toolset entry that refers to it uses the same name in mcp_server_name.
29828
+ */
29829
+ name: string;
29830
+ /**
29831
+ * HTTP or HTTPS MCP server endpoint.
28709
29832
  */
28710
29833
  url: string;
29834
+ /**
29835
+ * Praxis extension: request headers. Platform identity headers take precedence, case-insensitively.
29836
+ */
29837
+ headers?: {
29838
+ [key: string]: string;
29839
+ };
29840
+ /**
29841
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29842
+ */
29843
+ timeout_ms?: number;
29844
+ } | {
29845
+ /**
29846
+ * Run a command on the agent computer.
29847
+ */
29848
+ type: 'stdio';
29849
+ /**
29850
+ * Name of the MCP server; the mcp_toolset entry that refers to it uses the same name in mcp_server_name.
29851
+ */
29852
+ name: string;
29853
+ /**
29854
+ * Executable command on the agent computer.
29855
+ */
29856
+ command: string;
29857
+ /**
29858
+ * Command arguments; omitted means no arguments.
29859
+ */
29860
+ args?: Array<string>;
29861
+ /**
29862
+ * Praxis extension: environment variables for the command on the agent computer.
29863
+ */
29864
+ env?: {
29865
+ [key: string]: string;
29866
+ };
29867
+ /**
29868
+ * Praxis extension: timeout in milliseconds. Applied to stdio; HTTP/SSE currently use the connection SDK default.
29869
+ */
29870
+ timeout_ms?: number;
28711
29871
  }>;
28712
29872
  /**
28713
29873
  * Model identifier and configuration.
@@ -28801,7 +29961,7 @@ export type ForkSessionResponses = {
28801
29961
  */
28802
29962
  system: null | string;
28803
29963
  /**
28804
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
29964
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
28805
29965
  */
28806
29966
  tools: Array<{
28807
29967
  /**
@@ -29295,7 +30455,7 @@ export type ForkSessionResponses = {
29295
30455
  */
29296
30456
  system: null | string;
29297
30457
  /**
29298
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
30458
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
29299
30459
  */
29300
30460
  tools: Array<{
29301
30461
  /**
@@ -30600,6 +31760,188 @@ export type ListSessionCompactionsResponses = {
30600
31760
  };
30601
31761
  };
30602
31762
  export type ListSessionCompactionsResponse = ListSessionCompactionsResponses[keyof ListSessionCompactionsResponses];
31763
+ export type GetEmbedAppearanceData = {
31764
+ body?: never;
31765
+ headers?: {
31766
+ /**
31767
+ * Active public key from the agent's console embed settings; alternative to an end-user Bearer token.
31768
+ */
31769
+ 'Praxis-Publishable-Key'?: string;
31770
+ };
31771
+ path?: never;
31772
+ query?: never;
31773
+ url: '/agent/v1/embed/appearance';
31774
+ };
31775
+ export type GetEmbedAppearanceErrors = {
31776
+ /**
31777
+ * Addressing parameters are not accepted; remove identity_number, agent_id and other query parameters.
31778
+ */
31779
+ 400: unknown;
31780
+ /**
31781
+ * Supply a valid embed token or an active publishable key; organization member credentials cannot read this surface.
31782
+ */
31783
+ 401: unknown;
31784
+ /**
31785
+ * The credential's service agent is absent or archived; obtain credentials for an active service agent.
31786
+ */
31787
+ 404: unknown;
31788
+ /**
31789
+ * Appearance is temporarily unavailable; use default appearance and continue the conversation.
31790
+ */
31791
+ 503: unknown;
31792
+ };
31793
+ export type GetEmbedAppearanceResponses = {
31794
+ /**
31795
+ * Saved Kit options, at most 8192 UTF-8 JSON bytes. Omitted groups use Kit defaults; an unconfigured agent returns an empty object.
31796
+ */
31797
+ 200: {
31798
+ /**
31799
+ * Public identity displayed on the chat page, independent of the internal agent name.
31800
+ */
31801
+ agent?: {
31802
+ /**
31803
+ * Display name; omission keeps the neutral browser-language default.
31804
+ */
31805
+ name?: string;
31806
+ /**
31807
+ * Optional HTTPS avatar image URL; non-HTTPS images are rejected.
31808
+ */
31809
+ avatar?: string;
31810
+ };
31811
+ /**
31812
+ * Loader default: inline stays in the page, sidebar attaches to the edge, popup floats above its launcher, modal centers an overlay. A script data-layout overrides it; Hosted always uses inline.
31813
+ */
31814
+ layout?: 'inline' | 'sidebar' | 'popup' | 'modal';
31815
+ /**
31816
+ * Default entry button for the loader; an explicit script data-launcher takes precedence.
31817
+ */
31818
+ launcher?: {
31819
+ /**
31820
+ * Entry control: none hides the launcher, bubble shows a button, mascot shows the image.
31821
+ */
31822
+ type: 'none' | 'bubble' | 'mascot';
31823
+ /**
31824
+ * Optional HTTPS mascot image URL.
31825
+ */
31826
+ image?: string;
31827
+ /**
31828
+ * Launcher corner: bottom-right is the default; bottom-left uses the opposite corner.
31829
+ */
31830
+ position?: 'bottom-right' | 'bottom-left';
31831
+ /**
31832
+ * Accessible entry button label and bubble text; omission uses the default chat label.
31833
+ */
31834
+ label?: string;
31835
+ };
31836
+ /**
31837
+ * Visible chat heading; omitted title uses the public agent name.
31838
+ */
31839
+ header?: {
31840
+ /**
31841
+ * Optional heading text shown instead of the public agent name.
31842
+ */
31843
+ title?: string;
31844
+ /**
31845
+ * Optional secondary line beneath the heading.
31846
+ */
31847
+ subtitle?: string;
31848
+ /**
31849
+ * Optional HTTPS image shown in the heading avatar position.
31850
+ */
31851
+ icon?: string;
31852
+ };
31853
+ /**
31854
+ * Visual tokens applied to the conversation and header; omitted fields use Kit defaults.
31855
+ */
31856
+ theme?: {
31857
+ /**
31858
+ * light or dark selects a fixed scheme; system follows the device preference.
31859
+ */
31860
+ colorScheme?: 'light' | 'dark' | 'system';
31861
+ /**
31862
+ * Explicit opaque CSS accent color, for example #167A43.
31863
+ */
31864
+ accent?: string;
31865
+ /**
31866
+ * Explicit opaque CSS background color, for example #ffffff.
31867
+ */
31868
+ surface?: string;
31869
+ /**
31870
+ * neutral uses grayscale surfaces, warm uses warm tones, cool uses cool tones.
31871
+ */
31872
+ grayscale?: 'neutral' | 'warm' | 'cool';
31873
+ /**
31874
+ * Corner rounding: none is square, sm is small, md is medium, lg is large, full is fully rounded.
31875
+ */
31876
+ radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
31877
+ /**
31878
+ * Spacing: compact reduces gaps, normal uses defaults, spacious increases gaps.
31879
+ */
31880
+ density?: 'compact' | 'normal' | 'spacious';
31881
+ /**
31882
+ * CSS font family list using fonts available on the device; external font loading is not configured here.
31883
+ */
31884
+ fontFamily?: string;
31885
+ /**
31886
+ * Positive base font size in CSS pixels; omission preserves Kit sizing.
31887
+ */
31888
+ fontSize?: number;
31889
+ };
31890
+ /**
31891
+ * Reserved Kit locale preference: zh for Chinese, en for English. Kit currently passes this option through without translating all controls.
31892
+ */
31893
+ locale?: 'zh' | 'en';
31894
+ /**
31895
+ * Content displayed before the first message in a conversation.
31896
+ */
31897
+ startScreen?: {
31898
+ /**
31899
+ * Optional welcome text on the empty conversation.
31900
+ */
31901
+ greeting?: string;
31902
+ /**
31903
+ * Up to four suggested questions; clicking a label sends its prompt text.
31904
+ */
31905
+ prompts?: Array<{
31906
+ /**
31907
+ * Visible suggested-question button text.
31908
+ */
31909
+ label: string;
31910
+ /**
31911
+ * User message sent when this suggestion is selected.
31912
+ */
31913
+ prompt: string;
31914
+ }>;
31915
+ };
31916
+ /**
31917
+ * Message input appearance; transport and attachment settings are excluded.
31918
+ */
31919
+ composer?: {
31920
+ /**
31921
+ * Hint shown when the message input is empty.
31922
+ */
31923
+ placeholder?: string;
31924
+ };
31925
+ /**
31926
+ * Optional notice displayed beside the conversation composer.
31927
+ */
31928
+ disclaimer?: string;
31929
+ /**
31930
+ * Optional text below the conversation.
31931
+ */
31932
+ footer?: string;
31933
+ /**
31934
+ * Availability of the conversation history control.
31935
+ */
31936
+ history?: {
31937
+ /**
31938
+ * False hides history; omission uses the default enabled state.
31939
+ */
31940
+ enabled?: boolean;
31941
+ };
31942
+ };
31943
+ };
31944
+ export type GetEmbedAppearanceResponse = GetEmbedAppearanceResponses[keyof GetEmbedAppearanceResponses];
30603
31945
  export type CreateAudioSpeechData = {
30604
31946
  body: unknown & {
30605
31947
  /**
@@ -38156,7 +39498,7 @@ export type AgentsListResponses = {
38156
39498
  */
38157
39499
  system: null | string;
38158
39500
  /**
38159
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
39501
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
38160
39502
  */
38161
39503
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
38162
39504
  /**
@@ -39065,7 +40407,7 @@ export type AgentsCreateResponses = {
39065
40407
  */
39066
40408
  system: null | string;
39067
40409
  /**
39068
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
40410
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
39069
40411
  */
39070
40412
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
39071
40413
  /**
@@ -39541,7 +40883,7 @@ export type AgentsRetrieveResponses = {
39541
40883
  */
39542
40884
  system: null | string;
39543
40885
  /**
39544
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
40886
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
39545
40887
  */
39546
40888
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
39547
40889
  /**
@@ -40460,7 +41802,7 @@ export type AgentsUpdateResponses = {
40460
41802
  */
40461
41803
  system: null | string;
40462
41804
  /**
40463
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
41805
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
40464
41806
  */
40465
41807
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
40466
41808
  /**
@@ -40930,7 +42272,7 @@ export type AgentsArchiveResponses = {
40930
42272
  */
40931
42273
  system: null | string;
40932
42274
  /**
40933
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
42275
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
40934
42276
  */
40935
42277
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
40936
42278
  /**
@@ -41410,7 +42752,7 @@ export type AgentsVersionsListResponses = {
41410
42752
  */
41411
42753
  system: null | string;
41412
42754
  /**
41413
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
42755
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
41414
42756
  */
41415
42757
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
41416
42758
  /**
@@ -41947,7 +43289,7 @@ export type SessionsListResponses = {
41947
43289
  */
41948
43290
  system: null | string;
41949
43291
  /**
41950
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
43292
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
41951
43293
  */
41952
43294
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
41953
43295
  /**
@@ -42256,7 +43598,7 @@ export type SessionsCreateResponses = {
42256
43598
  */
42257
43599
  system: null | string;
42258
43600
  /**
42259
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
43601
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
42260
43602
  */
42261
43603
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
42262
43604
  /**
@@ -42494,7 +43836,7 @@ export type SessionsRetrieveResponses = {
42494
43836
  */
42495
43837
  system: null | string;
42496
43838
  /**
42497
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
43839
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
42498
43840
  */
42499
43841
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
42500
43842
  /**
@@ -42772,7 +44114,7 @@ export type SessionsUpdateResponses = {
42772
44114
  */
42773
44115
  system: null | string;
42774
44116
  /**
42775
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
44117
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
42776
44118
  */
42777
44119
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
42778
44120
  /**
@@ -43010,7 +44352,7 @@ export type SessionsArchiveResponses = {
43010
44352
  */
43011
44353
  system: null | string;
43012
44354
  /**
43013
- * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries; custom tool definitions are rejected with 400. Keep bash enabled to use codemode, skill and subagents.
44355
+ * Tools of the agent: one agent_toolset_20260401 entry for the native tools (all resolved settings are returned, ready to send back on update), plus mcp_toolset entries and custom tool definitions. Custom calls emit agent.custom_tool_use and wait for user.custom_tool_result. Keep bash enabled to use codemode, skill and subagents.
43014
44356
  */
43015
44357
  tools: Array<AgentManaged44 | AgentManaged54 | AgentManaged57>;
43016
44358
  /**
@@ -43229,6 +44571,24 @@ export type SessionsEventsListResponses = {
43229
44571
  * A timestamp in RFC 3339 format
43230
44572
  */
43231
44573
  processed_at?: null | string;
44574
+ /**
44575
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
44576
+ */
44577
+ praxis_context?: {
44578
+ /**
44579
+ * Named page values supplied by the client for this turn.
44580
+ */
44581
+ items: Array<{
44582
+ /**
44583
+ * Page context key, such as lesson or section.
44584
+ */
44585
+ name: string;
44586
+ /**
44587
+ * Untrusted page value; escaped before inclusion in the user message.
44588
+ */
44589
+ value: string;
44590
+ }>;
44591
+ };
43232
44592
  /**
43233
44593
  * UI transcript message ID. Use the last assistant message in a successfully completed turn as the fork target.
43234
44594
  */
@@ -43862,7 +45222,34 @@ export type SessionsEventsSendData = {
43862
45222
  /**
43863
45223
  * Events to send to the `session`.
43864
45224
  */
43865
- events: Array<AgentManaged59 | AgentManaged71 | AgentManaged74 | AgentManaged250 | AgentManaged251 | AgentManaged252 | AgentManaged253 | {
45225
+ events: Array<{
45226
+ /**
45227
+ * Array of content blocks for the user message.
45228
+ */
45229
+ content: Array<AgentManaged60 | AgentManaged61 | AgentManaged65 | AgentManaged70>;
45230
+ /**
45231
+ * User message event carrying one nonempty text content block.
45232
+ */
45233
+ type: 'user.message';
45234
+ /**
45235
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
45236
+ */
45237
+ praxis_context?: {
45238
+ /**
45239
+ * Named page values supplied by the client for this turn.
45240
+ */
45241
+ items: Array<{
45242
+ /**
45243
+ * Page context key, such as lesson or section.
45244
+ */
45245
+ name: string;
45246
+ /**
45247
+ * Untrusted page value; escaped before inclusion in the user message.
45248
+ */
45249
+ value: string;
45250
+ }>;
45251
+ };
45252
+ } | AgentManaged71 | AgentManaged74 | AgentManaged250 | AgentManaged251 | AgentManaged252 | AgentManaged253 | {
43866
45253
  /**
43867
45254
  * Request to inject the queued user message named by event_id into the running turn.
43868
45255
  */
@@ -43924,7 +45311,42 @@ export type SessionsEventsSendResponses = {
43924
45311
  /**
43925
45312
  * Sent events
43926
45313
  */
43927
- data?: Array<AgentManaged185 | AgentManaged186 | AgentManaged187 | AgentManaged188 | AgentManaged238 | AgentManaged243 | AgentManaged247 | {
45314
+ data?: Array<{
45315
+ /**
45316
+ * Unique identifier for this event.
45317
+ */
45318
+ id: string;
45319
+ /**
45320
+ * Array of content blocks comprising the user message.
45321
+ */
45322
+ content: Array<AgentManaged60 | AgentManaged61 | AgentManaged65 | AgentManaged70>;
45323
+ /**
45324
+ * Always `user.message`. A message from the user to the agent, with content blocks.
45325
+ */
45326
+ type: 'user.message';
45327
+ /**
45328
+ * A timestamp in RFC 3339 format
45329
+ */
45330
+ processed_at?: null | string;
45331
+ /**
45332
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
45333
+ */
45334
+ praxis_context?: {
45335
+ /**
45336
+ * Named page values supplied by the client for this turn.
45337
+ */
45338
+ items: Array<{
45339
+ /**
45340
+ * Page context key, such as lesson or section.
45341
+ */
45342
+ name: string;
45343
+ /**
45344
+ * Untrusted page value; escaped before inclusion in the user message.
45345
+ */
45346
+ value: string;
45347
+ }>;
45348
+ };
45349
+ } | AgentManaged186 | AgentManaged187 | AgentManaged188 | AgentManaged238 | AgentManaged243 | AgentManaged247 | {
43928
45350
  /**
43929
45351
  * Event id, unique within the session. Use it to refer to this event, for example in user.tool_confirmation or user.steer.
43930
45352
  */
@@ -44156,6 +45578,24 @@ export type SessionsThreadsEventsListResponses = {
44156
45578
  * A timestamp in RFC 3339 format
44157
45579
  */
44158
45580
  processed_at?: null | string;
45581
+ /**
45582
+ * Untrusted page context for this user message only. Resend on each turn when needed; never added to system instructions. The complete JSON value must be at most 4096 UTF-8 bytes; invalid values return 400 INVALID_PARAMS. Empty items are treated as absent. Available only on /agent/v1.
45583
+ */
45584
+ praxis_context?: {
45585
+ /**
45586
+ * Named page values supplied by the client for this turn.
45587
+ */
45588
+ items: Array<{
45589
+ /**
45590
+ * Page context key, such as lesson or section.
45591
+ */
45592
+ name: string;
45593
+ /**
45594
+ * Untrusted page value; escaped before inclusion in the user message.
45595
+ */
45596
+ value: string;
45597
+ }>;
45598
+ };
44159
45599
  /**
44160
45600
  * UI transcript message ID. Use the last assistant message in a successfully completed turn as the fork target.
44161
45601
  */