@hasura/promptql 2.0.0-alpha.17 → 2.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -18,6 +18,13 @@ type ThreadEvent$1 = {
18
18
  user_id: PromptQlUserId;
19
19
  message: UserMessage;
20
20
  };
21
+ } | {
22
+ ScheduledAgentTriggerEvent: {
23
+ scheduled_agent_trigger_event_id: ScheduledAgentTriggerEventId;
24
+ scheduled_agent_trigger_id: ScheduledAgentTriggerId;
25
+ timestamp: string;
26
+ payload: ScheduledAgentTriggerPayload;
27
+ };
21
28
  } | {
22
29
  AgentMessage: {
23
30
  /**
@@ -59,9 +66,18 @@ type ThreadEvent$1 = {
59
66
  };
60
67
  type PromptQlUserId = string;
61
68
  type ArtifactId = string;
69
+ type TzWrapper = string;
70
+ type ScheduledAgentTriggerEventId = string;
71
+ /**
72
+ * A registered scheduled agent trigger ID
73
+ */
74
+ type ScheduledAgentTriggerId = string;
75
+ type ScheduledAgentTriggerPayload = ScheduledAgentTriggerPayloadV1;
62
76
  type VersionedOrUnversionedAgentUpdate = VersionedAgentUpdate | AgentUpdate;
63
77
  type AgentUpdateContent = {
64
- interaction_started: {};
78
+ interaction_started: {
79
+ triggered_by?: AgentTrigger | null;
80
+ };
65
81
  } | {
66
82
  interaction_update: InteractionUpdate;
67
83
  } | {
@@ -69,6 +85,18 @@ type AgentUpdateContent = {
69
85
  outcome: InteractionOutcome;
70
86
  };
71
87
  };
88
+ type AgentTrigger = {
89
+ user_message: {
90
+ /**
91
+ * A unique index for a user message in a thread
92
+ */
93
+ message_id: string;
94
+ };
95
+ } | {
96
+ scheduled_agent_trigger_event: {
97
+ scheduled_agent_trigger_event_id: ScheduledAgentTriggerEventId;
98
+ };
99
+ };
72
100
  type InteractionUpdate = {
73
101
  interaction_decision: InteractionDecisionUpdate;
74
102
  } | {
@@ -93,7 +121,7 @@ type InteractionDecisionUpdate = {
93
121
  /**
94
122
  * Why the interaction was declined
95
123
  */
96
- reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip";
124
+ reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip" | "FutureTriggersInThread";
97
125
  };
98
126
  } | {
99
127
  AcceptInteraction: {
@@ -239,6 +267,16 @@ type AgentLoopAction = {
239
267
  find_relevant_tables_functions: {
240
268
  search_query: string;
241
269
  };
270
+ } | {
271
+ create_scheduled_trigger: {
272
+ trigger_type: ScheduledAgentTriggerType;
273
+ description: string;
274
+ context: string;
275
+ };
276
+ } | {
277
+ delete_scheduled_trigger: {
278
+ trigger_id: ScheduledAgentTriggerId;
279
+ };
242
280
  };
243
281
  /**
244
282
  * Program Package Name is the unique name for a program within a project that usable from code
@@ -249,6 +287,16 @@ type ProgramPackageName = string;
249
287
  * Skill type identifier for the new skill-based architecture.
250
288
  */
251
289
  type SkillType = "python_programming" | "react_programming" | "knowledge_exploration" | "saved_programs" | "response_generation";
290
+ type ScheduledAgentTriggerType = {
291
+ one_time: {
292
+ scheduled_for: string;
293
+ };
294
+ } | {
295
+ recurring: {
296
+ cron_expr: string;
297
+ scheduled_for?: string | null;
298
+ };
299
+ };
252
300
  /**
253
301
  * Intermediate updates emitted during action execution.
254
302
  */
@@ -336,6 +384,14 @@ type AgentLoopActionResult = {
336
384
  summary: string;
337
385
  llm_usage: LlmUsage[];
338
386
  agent_loop_action_result_type: "relevant_tables_found";
387
+ } | {
388
+ trigger_id: ScheduledAgentTriggerId;
389
+ description: string;
390
+ next_fire_at: string;
391
+ agent_loop_action_result_type: "scheduled_trigger_created";
392
+ } | {
393
+ trigger_id: ScheduledAgentTriggerId;
394
+ agent_loop_action_result_type: "scheduled_trigger_deleted";
339
395
  };
340
396
  /**
341
397
  * The title of a wiki page or section
@@ -380,6 +436,10 @@ type InteractionOutcome = {
380
436
  user_cancelled: {};
381
437
  } | {
382
438
  server_cancelled: {};
439
+ } | {
440
+ interrupted_due_to_new_trigger: {
441
+ new_trigger: AgentTrigger;
442
+ };
383
443
  };
384
444
  /**
385
445
  * Updates sent by the agent during processing of a user interaction
@@ -459,7 +519,7 @@ type MessageProcessingUpdate = {
459
519
  /**
460
520
  * Why the interaction was declined
461
521
  */
462
- reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip";
522
+ reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip" | "FutureTriggersInThread";
463
523
  };
464
524
  } | {
465
525
  AcceptInteraction: {
@@ -1421,7 +1481,7 @@ type InteractionFinishedUpdate = {
1421
1481
  /**
1422
1482
  * Why the interaction was declined
1423
1483
  */
1424
- reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip";
1484
+ reason: "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip" | "FutureTriggersInThread";
1425
1485
  };
1426
1486
  };
1427
1487
  type TeachingId = string;
@@ -1440,6 +1500,7 @@ type AgentLearningUpdate = {
1440
1500
  } | {
1441
1501
  WikiChangesApplied: {
1442
1502
  build_id: string;
1503
+ audit_ids?: WikiAuditId[] | null;
1443
1504
  };
1444
1505
  } | {
1445
1506
  Errored: {
@@ -1448,6 +1509,7 @@ type AgentLearningUpdate = {
1448
1509
  } | {
1449
1510
  Completed: {};
1450
1511
  };
1512
+ type WikiAuditId = string;
1451
1513
  /**
1452
1514
  * Events that are internal to the system and not connected to a particular user/agent message
1453
1515
  */
@@ -1936,7 +1998,7 @@ type InteractionError = "Internal" | {
1936
1998
  /**
1937
1999
  * Reasons why an agent might decline to process a user interaction
1938
2000
  */
1939
- type InteractionDeclineReason = "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip";
2001
+ type InteractionDeclineReason = "MultipleUsersAndNoPromptQlMention" | "UserRequestedSkip" | "FutureTriggersInThread";
1940
2002
  type ConfidenceAnalysisOutcome = {
1941
2003
  Completed: {
1942
2004
  completed_at: string;
@@ -2067,7 +2129,7 @@ interface UserMessage {
2067
2129
  timestamp: string;
2068
2130
  message: string;
2069
2131
  uploads: UserUpload[];
2070
- timezone: string;
2132
+ timezone: TzWrapper;
2071
2133
  /**
2072
2134
  * Controls whether the agent should respond to this message.
2073
2135
  */
@@ -2090,6 +2152,9 @@ interface ArtifactReference {
2090
2152
  artifact_id: ArtifactId;
2091
2153
  version: number;
2092
2154
  }
2155
+ interface ScheduledAgentTriggerPayloadV1 {
2156
+ version: "v1";
2157
+ }
2093
2158
  interface VersionedAgentUpdate {
2094
2159
  timestamp: string;
2095
2160
  content: AgentUpdateContent;
@@ -3901,6 +3966,10 @@ type Project_Configuration_Bool_Exp = {
3901
3966
  _not?: InputMaybe<Project_Configuration_Bool_Exp>;
3902
3967
  _or?: InputMaybe<Array<Project_Configuration_Bool_Exp>>;
3903
3968
  created_at?: InputMaybe<Timestamptz_Comparison_Exp>;
3969
+ data_studio?: InputMaybe<Boolean_Comparison_Exp>;
3970
+ default_onboarding_modal_visibility?: InputMaybe<Boolean_Comparison_Exp>;
3971
+ default_room?: InputMaybe<Uuid_Comparison_Exp>;
3972
+ default_room_info?: InputMaybe<Rooms_Bool_Exp>;
3904
3973
  default_thread_visibility?: InputMaybe<Thread_Visibility_Enum_Enum_Comparison_Exp>;
3905
3974
  enable_social_feed?: InputMaybe<Boolean_Comparison_Exp>;
3906
3975
  project_id?: InputMaybe<Uuid_Comparison_Exp>;
@@ -3909,6 +3978,10 @@ type Project_Configuration_Bool_Exp = {
3909
3978
  /** Ordering options when selecting data from "project_configuration". */
3910
3979
  type Project_Configuration_Order_By = {
3911
3980
  created_at?: InputMaybe<Order_By>;
3981
+ data_studio?: InputMaybe<Order_By>;
3982
+ default_onboarding_modal_visibility?: InputMaybe<Order_By>;
3983
+ default_room?: InputMaybe<Order_By>;
3984
+ default_room_info?: InputMaybe<Rooms_Order_By>;
3912
3985
  default_thread_visibility?: InputMaybe<Order_By>;
3913
3986
  enable_social_feed?: InputMaybe<Order_By>;
3914
3987
  project_id?: InputMaybe<Order_By>;
@@ -3925,6 +3998,7 @@ type Promptql_Users_Bool_Exp = {
3925
3998
  display_name?: InputMaybe<String_Comparison_Exp>;
3926
3999
  email?: InputMaybe<Citext_Comparison_Exp>;
3927
4000
  is_active?: InputMaybe<Boolean_Comparison_Exp>;
4001
+ is_app_admin?: InputMaybe<Boolean_Comparison_Exp>;
3928
4002
  project_id?: InputMaybe<Uuid_Comparison_Exp>;
3929
4003
  promptql_user_id?: InputMaybe<Uuid_Comparison_Exp>;
3930
4004
  slack_info?: InputMaybe<Slack_Info_Bool_Exp>;
@@ -3942,6 +4016,7 @@ type Promptql_Users_Order_By = {
3942
4016
  display_name?: InputMaybe<Order_By>;
3943
4017
  email?: InputMaybe<Order_By>;
3944
4018
  is_active?: InputMaybe<Order_By>;
4019
+ is_app_admin?: InputMaybe<Order_By>;
3945
4020
  project_id?: InputMaybe<Order_By>;
3946
4021
  promptql_user_id?: InputMaybe<Order_By>;
3947
4022
  slack_info?: InputMaybe<Slack_Info_Order_By>;
@@ -4176,6 +4251,98 @@ type Slack_Integration_Min_Order_By = {
4176
4251
  slack_app_name?: InputMaybe<Order_By>;
4177
4252
  slack_workspace_id?: InputMaybe<Order_By>;
4178
4253
  };
4254
+ /** order by aggregate values of table "social_feed_candidates" */
4255
+ type Social_Feed_Candidates_Aggregate_Order_By = {
4256
+ avg?: InputMaybe<Social_Feed_Candidates_Avg_Order_By>;
4257
+ count?: InputMaybe<Order_By>;
4258
+ max?: InputMaybe<Social_Feed_Candidates_Max_Order_By>;
4259
+ min?: InputMaybe<Social_Feed_Candidates_Min_Order_By>;
4260
+ stddev?: InputMaybe<Social_Feed_Candidates_Stddev_Order_By>;
4261
+ stddev_pop?: InputMaybe<Social_Feed_Candidates_Stddev_Pop_Order_By>;
4262
+ stddev_samp?: InputMaybe<Social_Feed_Candidates_Stddev_Samp_Order_By>;
4263
+ sum?: InputMaybe<Social_Feed_Candidates_Sum_Order_By>;
4264
+ var_pop?: InputMaybe<Social_Feed_Candidates_Var_Pop_Order_By>;
4265
+ var_samp?: InputMaybe<Social_Feed_Candidates_Var_Samp_Order_By>;
4266
+ variance?: InputMaybe<Social_Feed_Candidates_Variance_Order_By>;
4267
+ };
4268
+ /** order by avg() on columns of table "social_feed_candidates" */
4269
+ type Social_Feed_Candidates_Avg_Order_By = {
4270
+ thread_event_id?: InputMaybe<Order_By>;
4271
+ version?: InputMaybe<Order_By>;
4272
+ };
4273
+ /** Boolean expression to filter rows from the table "social_feed_candidates". All fields are combined with a logical 'AND'. */
4274
+ type Social_Feed_Candidates_Bool_Exp = {
4275
+ _and?: InputMaybe<Array<Social_Feed_Candidates_Bool_Exp>>;
4276
+ _not?: InputMaybe<Social_Feed_Candidates_Bool_Exp>;
4277
+ _or?: InputMaybe<Array<Social_Feed_Candidates_Bool_Exp>>;
4278
+ created_at?: InputMaybe<Timestamptz_Comparison_Exp>;
4279
+ id?: InputMaybe<Uuid_Comparison_Exp>;
4280
+ llm_output?: InputMaybe<Jsonb_Comparison_Exp>;
4281
+ summary?: InputMaybe<String_Comparison_Exp>;
4282
+ thread?: InputMaybe<Threads_V2_Bool_Exp>;
4283
+ thread_event_id?: InputMaybe<Bigint_Comparison_Exp>;
4284
+ thread_id?: InputMaybe<Uuid_Comparison_Exp>;
4285
+ title?: InputMaybe<String_Comparison_Exp>;
4286
+ updated_at?: InputMaybe<Timestamptz_Comparison_Exp>;
4287
+ version?: InputMaybe<Int_Comparison_Exp>;
4288
+ };
4289
+ /** order by max() on columns of table "social_feed_candidates" */
4290
+ type Social_Feed_Candidates_Max_Order_By = {
4291
+ created_at?: InputMaybe<Order_By>;
4292
+ id?: InputMaybe<Order_By>;
4293
+ summary?: InputMaybe<Order_By>;
4294
+ thread_event_id?: InputMaybe<Order_By>;
4295
+ thread_id?: InputMaybe<Order_By>;
4296
+ title?: InputMaybe<Order_By>;
4297
+ updated_at?: InputMaybe<Order_By>;
4298
+ version?: InputMaybe<Order_By>;
4299
+ };
4300
+ /** order by min() on columns of table "social_feed_candidates" */
4301
+ type Social_Feed_Candidates_Min_Order_By = {
4302
+ created_at?: InputMaybe<Order_By>;
4303
+ id?: InputMaybe<Order_By>;
4304
+ summary?: InputMaybe<Order_By>;
4305
+ thread_event_id?: InputMaybe<Order_By>;
4306
+ thread_id?: InputMaybe<Order_By>;
4307
+ title?: InputMaybe<Order_By>;
4308
+ updated_at?: InputMaybe<Order_By>;
4309
+ version?: InputMaybe<Order_By>;
4310
+ };
4311
+ /** order by stddev() on columns of table "social_feed_candidates" */
4312
+ type Social_Feed_Candidates_Stddev_Order_By = {
4313
+ thread_event_id?: InputMaybe<Order_By>;
4314
+ version?: InputMaybe<Order_By>;
4315
+ };
4316
+ /** order by stddev_pop() on columns of table "social_feed_candidates" */
4317
+ type Social_Feed_Candidates_Stddev_Pop_Order_By = {
4318
+ thread_event_id?: InputMaybe<Order_By>;
4319
+ version?: InputMaybe<Order_By>;
4320
+ };
4321
+ /** order by stddev_samp() on columns of table "social_feed_candidates" */
4322
+ type Social_Feed_Candidates_Stddev_Samp_Order_By = {
4323
+ thread_event_id?: InputMaybe<Order_By>;
4324
+ version?: InputMaybe<Order_By>;
4325
+ };
4326
+ /** order by sum() on columns of table "social_feed_candidates" */
4327
+ type Social_Feed_Candidates_Sum_Order_By = {
4328
+ thread_event_id?: InputMaybe<Order_By>;
4329
+ version?: InputMaybe<Order_By>;
4330
+ };
4331
+ /** order by var_pop() on columns of table "social_feed_candidates" */
4332
+ type Social_Feed_Candidates_Var_Pop_Order_By = {
4333
+ thread_event_id?: InputMaybe<Order_By>;
4334
+ version?: InputMaybe<Order_By>;
4335
+ };
4336
+ /** order by var_samp() on columns of table "social_feed_candidates" */
4337
+ type Social_Feed_Candidates_Var_Samp_Order_By = {
4338
+ thread_event_id?: InputMaybe<Order_By>;
4339
+ version?: InputMaybe<Order_By>;
4340
+ };
4341
+ /** order by variance() on columns of table "social_feed_candidates" */
4342
+ type Social_Feed_Candidates_Variance_Order_By = {
4343
+ thread_event_id?: InputMaybe<Order_By>;
4344
+ version?: InputMaybe<Order_By>;
4345
+ };
4179
4346
  /** order by aggregate values of table "thread_artifacts" */
4180
4347
  type Thread_Artifacts_Aggregate_Order_By = {
4181
4348
  count?: InputMaybe<Order_By>;
@@ -4644,6 +4811,7 @@ type Threads_V2_Bool_Exp = {
4644
4811
  created_at?: InputMaybe<Timestamptz_Comparison_Exp>;
4645
4812
  custom_title?: InputMaybe<String_Comparison_Exp>;
4646
4813
  deleted_at?: InputMaybe<Timestamptz_Comparison_Exp>;
4814
+ forked_from?: InputMaybe<Uuid_Comparison_Exp>;
4647
4815
  learning_suggestion?: InputMaybe<String_Comparison_Exp>;
4648
4816
  pinned_threads_v2s?: InputMaybe<Pinned_Threads_V2_Bool_Exp>;
4649
4817
  project_config?: InputMaybe<Project_Configuration_Bool_Exp>;
@@ -4654,6 +4822,7 @@ type Threads_V2_Bool_Exp = {
4654
4822
  room?: InputMaybe<Rooms_Bool_Exp>;
4655
4823
  room_id?: InputMaybe<Uuid_Comparison_Exp>;
4656
4824
  shared_threads?: InputMaybe<Shared_Threads_Bool_Exp>;
4825
+ social_feed_candidates?: InputMaybe<Social_Feed_Candidates_Bool_Exp>;
4657
4826
  taught_by?: InputMaybe<Thread_Taught_By_Result_Bool_Exp>;
4658
4827
  thread_artifacts?: InputMaybe<Thread_Artifacts_Bool_Exp>;
4659
4828
  thread_events?: InputMaybe<Thread_Events_Bool_Exp>;
@@ -4674,6 +4843,7 @@ type Threads_V2_Max_Order_By = {
4674
4843
  created_at?: InputMaybe<Order_By>;
4675
4844
  custom_title?: InputMaybe<Order_By>;
4676
4845
  deleted_at?: InputMaybe<Order_By>;
4846
+ forked_from?: InputMaybe<Order_By>;
4677
4847
  project_id?: InputMaybe<Order_By>;
4678
4848
  /** The room this thread belongs to. Every thread must belong to exactly one room. */
4679
4849
  room_id?: InputMaybe<Order_By>;
@@ -4690,6 +4860,7 @@ type Threads_V2_Min_Order_By = {
4690
4860
  created_at?: InputMaybe<Order_By>;
4691
4861
  custom_title?: InputMaybe<Order_By>;
4692
4862
  deleted_at?: InputMaybe<Order_By>;
4863
+ forked_from?: InputMaybe<Order_By>;
4693
4864
  project_id?: InputMaybe<Order_By>;
4694
4865
  /** The room this thread belongs to. Every thread must belong to exactly one room. */
4695
4866
  room_id?: InputMaybe<Order_By>;
@@ -4706,6 +4877,7 @@ type Threads_V2_Order_By = {
4706
4877
  created_at?: InputMaybe<Order_By>;
4707
4878
  custom_title?: InputMaybe<Order_By>;
4708
4879
  deleted_at?: InputMaybe<Order_By>;
4880
+ forked_from?: InputMaybe<Order_By>;
4709
4881
  learning_suggestion?: InputMaybe<Order_By>;
4710
4882
  pinned_threads_v2s_aggregate?: InputMaybe<Pinned_Threads_V2_Aggregate_Order_By>;
4711
4883
  project_config?: InputMaybe<Project_Configuration_Order_By>;
@@ -4716,6 +4888,7 @@ type Threads_V2_Order_By = {
4716
4888
  room?: InputMaybe<Rooms_Order_By>;
4717
4889
  room_id?: InputMaybe<Order_By>;
4718
4890
  shared_threads_aggregate?: InputMaybe<Shared_Threads_Aggregate_Order_By>;
4891
+ social_feed_candidates_aggregate?: InputMaybe<Social_Feed_Candidates_Aggregate_Order_By>;
4719
4892
  taught_by_aggregate?: InputMaybe<Thread_Taught_By_Result_Aggregate_Order_By>;
4720
4893
  thread_artifacts_aggregate?: InputMaybe<Thread_Artifacts_Aggregate_Order_By>;
4721
4894
  thread_events_aggregate?: InputMaybe<Thread_Events_Aggregate_Order_By>;
@@ -4738,6 +4911,8 @@ type Threads_V2_Select_Column =
4738
4911
  | 'custom_title'
4739
4912
  /** column name */
4740
4913
  | 'deleted_at'
4914
+ /** column name */
4915
+ | 'forked_from'
4741
4916
  /** column name */
4742
4917
  | 'project_id'
4743
4918
  /** column name */
@@ -4832,6 +5007,7 @@ type User_Preferences_Bool_Exp = {
4832
5007
  created_at?: InputMaybe<Timestamptz_Comparison_Exp>;
4833
5008
  custom_instructions?: InputMaybe<String_Comparison_Exp>;
4834
5009
  feature_flags?: InputMaybe<Jsonb_Comparison_Exp>;
5010
+ onboarding_popup_shown?: InputMaybe<Boolean_Comparison_Exp>;
4835
5011
  promptql_user?: InputMaybe<Promptql_Users_Bool_Exp>;
4836
5012
  promptql_user_id?: InputMaybe<Uuid_Comparison_Exp>;
4837
5013
  updated_at?: InputMaybe<Timestamptz_Comparison_Exp>;
@@ -4841,6 +5017,7 @@ type User_Preferences_Order_By = {
4841
5017
  created_at?: InputMaybe<Order_By>;
4842
5018
  custom_instructions?: InputMaybe<Order_By>;
4843
5019
  feature_flags?: InputMaybe<Order_By>;
5020
+ onboarding_popup_shown?: InputMaybe<Order_By>;
4844
5021
  promptql_user?: InputMaybe<Promptql_Users_Order_By>;
4845
5022
  promptql_user_id?: InputMaybe<Order_By>;
4846
5023
  updated_at?: InputMaybe<Order_By>;
@@ -4911,6 +5088,17 @@ type Uuid_Comparison_Exp = {
4911
5088
  _neq?: InputMaybe<Scalars['uuid']['input']>;
4912
5089
  _nin?: InputMaybe<Array<Scalars['uuid']['input']>>;
4913
5090
  };
5091
+ type RoomFragment = {
5092
+ __typename?: 'rooms';
5093
+ room_id: string;
5094
+ name: string;
5095
+ description?: string | null;
5096
+ project_id: string;
5097
+ visibility: string;
5098
+ user_id: string;
5099
+ created_at: string;
5100
+ updated_at: string;
5101
+ };
4914
5102
  type ThreadFragment = {
4915
5103
  __typename?: 'threads_v2';
4916
5104
  thread_id: string;
@@ -4981,6 +5169,12 @@ type StartThreadMutation = {
4981
5169
  } | null>;
4982
5170
  } | null;
4983
5171
  };
5172
+ type GetRoomsQueryVariables = Exact<{
5173
+ where: Rooms_Bool_Exp;
5174
+ order_by?: InputMaybe<Array<Rooms_Order_By> | Rooms_Order_By>;
5175
+ offset?: InputMaybe<Scalars['Int']['input']>;
5176
+ limit?: InputMaybe<Scalars['Int']['input']>;
5177
+ }>;
4984
5178
  type GetThreadsQueryVariables = Exact<{
4985
5179
  where: Threads_V2_Bool_Exp;
4986
5180
  limit?: InputMaybe<Scalars['Int']['input']>;
@@ -5132,6 +5326,10 @@ type GetThreadEventOptions = {
5132
5326
  * Limit number of events
5133
5327
  */
5134
5328
  limit?: number | null;
5329
+ /**
5330
+ * Limit number of events
5331
+ */
5332
+ ordering?: Order_By | null;
5135
5333
  };
5136
5334
  /**
5137
5335
  * Optional options for streaming thread events.
@@ -5159,6 +5357,16 @@ type StreamThreadEventOptions = {
5159
5357
  timeout?: number;
5160
5358
  };
5161
5359
 
5360
+ /**
5361
+ * Download artifact data.
5362
+ */
5363
+ declare function downloadArtifactData(host: string, artifactId: string, version: number, headers: Record<string, string>, customFetch?: typeof fetch): Promise<unknown>;
5364
+
5365
+ /**
5366
+ * List rooms of the current project.The default limit is 10.
5367
+ */
5368
+ declare function listRooms(client: ApolloClient, variables: GetRoomsQueryVariables): Promise<RoomFragment[]>;
5369
+
5162
5370
  /**
5163
5371
  * List threads of the current project.The default limit is 10.
5164
5372
  */
@@ -5194,9 +5402,9 @@ declare function subscribeThreadEvents(client: ApolloClient, threadId: string, f
5194
5402
  */
5195
5403
  declare function streamThreadMessageEvents(client: ApolloClient, threadId: string, options?: StreamThreadEventOptions): Observable<ThreadEvent[]>;
5196
5404
  /**
5197
- * The guard to check if the thread interaction was finished.
5405
+ * The guard to check if the thread interaction is not finished.
5198
5406
  */
5199
- declare function wasInteractionFinished(events: ThreadEvent[], skipAnalysis?: boolean): boolean;
5407
+ declare function isInteractionAnalyzing(events: ThreadEvent[], skipAnalysis?: boolean): boolean;
5200
5408
 
5201
5409
  /**
5202
5410
  * Constructor options for a PromptQL authenticator.
@@ -5231,6 +5439,18 @@ declare class Project {
5231
5439
  info(): Promise<GetProjectInfoOutput>;
5232
5440
  }
5233
5441
 
5442
+ /**
5443
+ * Room class implements the set of PromptQL room APIs.
5444
+ */
5445
+ declare class Room {
5446
+ private _options;
5447
+ constructor(options: ClientOptions);
5448
+ /**
5449
+ * List rooms of the current project.The default limit is 10.
5450
+ */
5451
+ list(variables: GetRoomsQueryVariables): Promise<RoomFragment[]>;
5452
+ }
5453
+
5234
5454
  /**
5235
5455
  * Project class implements the set of PromptQL thread APIs.
5236
5456
  */
@@ -5283,6 +5503,7 @@ declare class PromptQLSdk {
5283
5503
  private _fetchToken;
5284
5504
  readonly thread: Thread;
5285
5505
  readonly project: Project;
5506
+ readonly room: Room;
5286
5507
  /**
5287
5508
  * Check if the PromptQL SDK instance is authenticated.
5288
5509
  */
@@ -5476,5 +5697,9 @@ type InteractionFinishedEvent = {
5476
5697
  * Validate and return the InteractionFinished event from the step update.
5477
5698
  */
5478
5699
  declare function getAgentInteractionFinishedEvent(eventData: ThreadEvent$1): InteractionFinishedEvent | null;
5700
+ /**
5701
+ * Get the message_id from the thread event data.
5702
+ */
5703
+ declare function getThreadEventMessageId(event: ThreadEvent$1 | undefined): string | undefined;
5479
5704
 
5480
- export { type AgentInteraction, type AgentLearningUpdate, type AgentLoopAction, type AgentLoopActionResult, type AgentLoopActionUpdate, type AgentLoopUpdate, type AgentState, type AgentUpdate, type AgentUpdateContent, type AllTheServerTypes, type AnalyzedCodeAction, type AnalyzedCodeAction2, type ApolloClientOptions, type ArtifactError, type ArtifactErrorV1, type ArtifactId, type ArtifactPreview, type ArtifactReference, type ArtifactReference1, type ArtifactReference2, type ArtifactState, type ArtifactType, type ArtifactType2, type ArtifactUpdate, type ArtifactUpdate1, type AssumptionFactCheck, type BuildError, type BuildErrorV1, type BuiltUi, type BuiltUi1, type CancelAgentMessageMutationVariables, type CheckedAssumption, type CheckedTopic, type CodeAction, type CodeAction2, type CodeBlock, type CodeError, type CodeErrorV1, type CodeExecutionComplete, type CodeOutputAnalysis, type CodeOutputAnalysis1, type CodeOutputAnalyzed, type ComponentResponse, type ComponentResponse1, type ComponentResponse2, type ComponentResponse3, type ComponentResponse4, type ComponentResponse5, type ConfidenceAnalysis, type ConfidenceAnalysis1, type ConfidenceAnalysisLlmUsage, type ConfidenceAnalysisOutcome, type ConfidenceAnalysisUpdate, type ContextExplorerCompleted, type ContextExplorerStarted, type ContextExplorerState, type ContextExplorerUpdate, type CopyFileEntry, type CurrentAction, type DataArtifactUpdated, type DataArtifactUpdatedV1, type Dependency, type EventOfKind, type ExternalKnowledgeExplorerAttempt, type ExternalKnowledgeExplorerAttempt1, type ExternalKnowledgeExplorerAttempt2, type ExternalKnowledgeExplorerState, type ExternalKnowledgeSummary, type ExternalKnowledgeTaskGeneratorState, type FactSource, type GeneratedCode, type GeneratedFile, type GeneratedFile2, type GeneratedProgramRunnerOutput, type GeneratedResponse, type GeneratedUiCode, type GeneratedUiCode1, type GetThreadEventOptions, type GetThreadsQueryVariables, type IPromptQLSdk, type Interaction, type InteractionDecision, type InteractionDecisionAccept, type InteractionDecisionDecline, type InteractionDecisionUpdate, type InteractionDeclineReason, type InteractionError, type InteractionFinishedEvent, type InteractionFinishedUpdate, type InteractionOutcome, type InteractionOutcome2, type InteractionOutcomeStatus, type InteractionUpdate, type InternalError, type InternalErrorV1, type InternalUpdate, type KeysOfUnion, type LearningSuggestion, type LearningSuggestionOutcome, type LearningSuggestionUpdate, type LearningSuggestionUpdateV1, type LlmResponse, type LlmUsage, type MessageProcessingStarted, type MessageProcessingState, type MessageProcessingUpdate, type NeedsSupportAnalysis, type NeedsSupportOutcome, type NeedsSupportUpdate, type OrchestratorState, type OrchestratorUpdate, type Order_By, type OutputEmitted, type OutputEmittedV1, type PipelineColumn, type PipelineColumnType, type PipelinePartitionSpec, type PipelinePartitionTransform, type PipelineProgress, type PipelineProgressV1, type PipelineRunStepDetails, type PipelineSchema, type PipelineSink, type PipelineSource, type PipelineStep, type PipelineTransform, type PlanGenerationStarted, type PlanState, type PlanStateStep, type PlanStepGenerated, type PlanningDecisionCompleted, type PlanningDecisionPlanningRequired, type PlanningDecisionStarted, type PlanningDecisionState, type PlanningDecisionUpdate, type ProgramId, type ProgramPackageName, type ProgramRunEvent, type ProgramRunResult, type ProgramRunnerAction, type ProgramRunnerAction2, type ProgramRunnerActionResult, type ProgramRunnerAttempt, type ProgramTransform, type ProgrammerState, type ProgrammerUpdate, PromptQLSdk, type PromptQLSdkOptions, type PromptQlConfigFeatureFlagModel, type PromptQlUserId, type PythonRunStepDetails, type PythonStep, type ResponseGenerationState, type ResponseGenerationUpdate, type ResponseTruncation, type RunConfigV1, type RunFinished, type RunFinishedOutcome, type RunFinishedV1, type RunProgramRequest, type RunProgramRequest2, type RunSavedProgramRequest, type RunSavedProgramRequest2, type RunStarted, type RunStartedV1, type RunStepDetails, type SavedProgramRunnerStage, type SavedProgramRunnerState, type SavedProgramRunnerUpdate, type SavedProgramRunnerUpdateV0, type SchemaContext, type SchemaContext1, type SchemaExplored, type SchemaExplorerCompleted, type SchemaExplorerStarted, type SchemaExplorerState, type SchemaExplorerUpdate, type SchemaTask, type SchemaTasksGenerationCompleted, type SchemaTasksGenerationStarted, type SchemaTasksGenerationState, type SchemaTasksGenerationUpdate, type SendMessageToThreadArguments, type SendMessageToThreadOutput, type SendThreadMessageMutationVariables, type ShelfActionEvent, type ShelfSink, type ShelfUpdate, type ShelfUpdateV1, type SkillType, type SocialFeedRating, type SocialFeedRatingLlmUsage, type SocialFeedRatingOutcome, type SocialFeedRatingUpdate, type Span, type SqlError, type SqlErrorV1, type SqlRunStepDetails, type SqlSource, type SqlStep, type StartThreadArguments, type StartThreadMutationVariables, type StartThreadOutput, type StartingOrchestrator, type Step, type StepExecutionFinished, type StepExecutionFinishedV1, type StepExecutionStarted, type StepExecutionStartedV1, type StepState, type StepUpdate, type StreamThreadEventOptions, type SummaryAction, type TasksGenerated, type Teaching, type TeachingId, type TeachingOutcome, type TeachingState, type ThreadEvent, type ThreadEvent$1 as ThreadEventData, type ThreadFragment, type ThreadParticipants, type TransactionId, type UiBuild, type UiBuild2, type UiBuildFailure, type UiBuildResult, type UiBuildRunStepDetails, type UiBuildStep, type UiMetadata, type UiProgrammerState, type UiProgrammerUpdate, type UserCancel, type UserCancelEvent, type UserInteraction, type UserMessage, type UserMessageEvent, type UserUpload, type UserUploadMetadata, type Version, type VersionedAgentUpdate, type VersionedOrUnversionedAgentUpdate, type Warning, type WikiChange, type WikiContent, type WikiDelta, type WikiExplorerCompleted, type WikiExplorerStarted, type WikiExplorerState, type WikiExplorerUpdate, type WikiGenerationOutcome, type WikiGenerationUpdate, type WikiInfoGenerated, type WikiLearningSuggestionUpdate, type WikiPageV1, type WikiSection, type WikiSelectionUpdate, type WikiTitle, cancelAgentMessage, createApolloClient, createPromptQLAuthTokenGenerator, diffThreadEvents, getAgentGeneratedResponse, getAgentInteractionDecisionAcceptInteractionEvent, getAgentInteractionDecisionDeclineInteractionEvent, getAgentInteractionFinishedEvent, getAgentMessageProcessingStartedEvent, getAgentOrchestratorContextExplorerCompletedEvent, getAgentOrchestratorContextExplorerStartedEvent, getAgentOrchestratorContextExplorerUpdateEvent, getAgentOrchestratorSchemaExplorerCodeExecutionCompleteEvent, getAgentOrchestratorSchemaExplorerCodeOutputAnalyzedEvent, getAgentOrchestratorSchemaExplorerCompletedEvent, getAgentOrchestratorSchemaExplorerGeneratedCodeEvent, getAgentOrchestratorSchemaExplorerSchemaExploredEvent, getAgentOrchestratorSchemaExplorerStartedEvent, getAgentOrchestratorSchemaExplorerUpdateEvent, getAgentOrchestratorSchemaTasksGeneratedEvent, getAgentOrchestratorSchemaTasksGenerationCompletedEvent, getAgentOrchestratorSchemaTasksGenerationStartedEvent, getAgentOrchestratorSchemaTasksGenerationUpdateEvent, getAgentOrchestratorStepProgrammerEvent, getAgentOrchestratorStepSavedProgramRunnerEvent, getAgentOrchestratorStepUiProgrammerEvent, getAgentOrchestratorStepUpdateEvent, getAgentOrchestratorUpdateEvent, getAgentOrchestratorWikiExplorerCompletedEvent, getAgentOrchestratorWikiExplorerStartedEvent, getAgentOrchestratorWikiExplorerUpdateEvent, getAgentOrchestratorWikiInfoGeneratedEvent, getAgentPlanGenerationStartedEvent, getAgentPlanStepGeneratedEvent, getAgentPlanningDecisionCompletedEvent, getAgentPlanningDecisionPlanningRequiredEvent, getAgentPlanningDecisionStartedEvent, getAgentPlanningDecisionUpdateEvent, getAgentStartingOrchestratorEvent, getThread, getThreadEvents, getUserCancelEvent, getUserMessageEvent, listThreads, sendThreadMessage, startThread, streamThreadMessageEvents, subscribeThreadEvents, wasInteractionFinished };
5705
+ export { type AgentInteraction, type AgentLearningUpdate, type AgentLoopAction, type AgentLoopActionResult, type AgentLoopActionUpdate, type AgentLoopUpdate, type AgentState, type AgentTrigger, type AgentUpdate, type AgentUpdateContent, type AllTheServerTypes, type AnalyzedCodeAction, type AnalyzedCodeAction2, type ApolloClientOptions, type ArtifactError, type ArtifactErrorV1, type ArtifactId, type ArtifactPreview, type ArtifactReference, type ArtifactReference1, type ArtifactReference2, type ArtifactState, type ArtifactType, type ArtifactType2, type ArtifactUpdate, type ArtifactUpdate1, type AssumptionFactCheck, type BuildError, type BuildErrorV1, type BuiltUi, type BuiltUi1, type CancelAgentMessageMutationVariables, type CheckedAssumption, type CheckedTopic, type CodeAction, type CodeAction2, type CodeBlock, type CodeError, type CodeErrorV1, type CodeExecutionComplete, type CodeOutputAnalysis, type CodeOutputAnalysis1, type CodeOutputAnalyzed, type ComponentResponse, type ComponentResponse1, type ComponentResponse2, type ComponentResponse3, type ComponentResponse4, type ComponentResponse5, type ConfidenceAnalysis, type ConfidenceAnalysis1, type ConfidenceAnalysisLlmUsage, type ConfidenceAnalysisOutcome, type ConfidenceAnalysisUpdate, type ContextExplorerCompleted, type ContextExplorerStarted, type ContextExplorerState, type ContextExplorerUpdate, type CopyFileEntry, type CurrentAction, type DataArtifactUpdated, type DataArtifactUpdatedV1, type Dependency, type EventOfKind, type ExternalKnowledgeExplorerAttempt, type ExternalKnowledgeExplorerAttempt1, type ExternalKnowledgeExplorerAttempt2, type ExternalKnowledgeExplorerState, type ExternalKnowledgeSummary, type ExternalKnowledgeTaskGeneratorState, type FactSource, type GeneratedCode, type GeneratedFile, type GeneratedFile2, type GeneratedProgramRunnerOutput, type GeneratedResponse, type GeneratedUiCode, type GeneratedUiCode1, type GetThreadEventOptions, type GetThreadsQueryVariables, type IPromptQLSdk, type Interaction, type InteractionDecision, type InteractionDecisionAccept, type InteractionDecisionDecline, type InteractionDecisionUpdate, type InteractionDeclineReason, type InteractionError, type InteractionFinishedEvent, type InteractionFinishedUpdate, type InteractionOutcome, type InteractionOutcome2, type InteractionOutcomeStatus, type InteractionUpdate, type InternalError, type InternalErrorV1, type InternalUpdate, type KeysOfUnion, type LearningSuggestion, type LearningSuggestionOutcome, type LearningSuggestionUpdate, type LearningSuggestionUpdateV1, type LlmResponse, type LlmUsage, type MessageProcessingStarted, type MessageProcessingState, type MessageProcessingUpdate, type NeedsSupportAnalysis, type NeedsSupportOutcome, type NeedsSupportUpdate, type OrchestratorState, type OrchestratorUpdate, type Order_By, type OutputEmitted, type OutputEmittedV1, type PipelineColumn, type PipelineColumnType, type PipelinePartitionSpec, type PipelinePartitionTransform, type PipelineProgress, type PipelineProgressV1, type PipelineRunStepDetails, type PipelineSchema, type PipelineSink, type PipelineSource, type PipelineStep, type PipelineTransform, type PlanGenerationStarted, type PlanState, type PlanStateStep, type PlanStepGenerated, type PlanningDecisionCompleted, type PlanningDecisionPlanningRequired, type PlanningDecisionStarted, type PlanningDecisionState, type PlanningDecisionUpdate, type ProgramId, type ProgramPackageName, type ProgramRunEvent, type ProgramRunResult, type ProgramRunnerAction, type ProgramRunnerAction2, type ProgramRunnerActionResult, type ProgramRunnerAttempt, type ProgramTransform, type ProgrammerState, type ProgrammerUpdate, PromptQLSdk, type PromptQLSdkOptions, type PromptQlConfigFeatureFlagModel, type PromptQlUserId, type PythonRunStepDetails, type PythonStep, type ResponseGenerationState, type ResponseGenerationUpdate, type ResponseTruncation, type RoomFragment, type RunConfigV1, type RunFinished, type RunFinishedOutcome, type RunFinishedV1, type RunProgramRequest, type RunProgramRequest2, type RunSavedProgramRequest, type RunSavedProgramRequest2, type RunStarted, type RunStartedV1, type RunStepDetails, type SavedProgramRunnerStage, type SavedProgramRunnerState, type SavedProgramRunnerUpdate, type SavedProgramRunnerUpdateV0, type ScheduledAgentTriggerEventId, type ScheduledAgentTriggerId, type ScheduledAgentTriggerPayload, type ScheduledAgentTriggerPayloadV1, type ScheduledAgentTriggerType, type SchemaContext, type SchemaContext1, type SchemaExplored, type SchemaExplorerCompleted, type SchemaExplorerStarted, type SchemaExplorerState, type SchemaExplorerUpdate, type SchemaTask, type SchemaTasksGenerationCompleted, type SchemaTasksGenerationStarted, type SchemaTasksGenerationState, type SchemaTasksGenerationUpdate, type SendMessageToThreadArguments, type SendMessageToThreadOutput, type SendThreadMessageMutationVariables, type ShelfActionEvent, type ShelfSink, type ShelfUpdate, type ShelfUpdateV1, type SkillType, type SocialFeedRating, type SocialFeedRatingLlmUsage, type SocialFeedRatingOutcome, type SocialFeedRatingUpdate, type Span, type SqlError, type SqlErrorV1, type SqlRunStepDetails, type SqlSource, type SqlStep, type StartThreadArguments, type StartThreadMutationVariables, type StartThreadOutput, type StartingOrchestrator, type Step, type StepExecutionFinished, type StepExecutionFinishedV1, type StepExecutionStarted, type StepExecutionStartedV1, type StepState, type StepUpdate, type StreamThreadEventOptions, type SummaryAction, type TasksGenerated, type Teaching, type TeachingId, type TeachingOutcome, type TeachingState, type ThreadEvent, type ThreadEvent$1 as ThreadEventData, type ThreadFragment, type ThreadParticipants, type TransactionId, type TzWrapper, type UiBuild, type UiBuild2, type UiBuildFailure, type UiBuildResult, type UiBuildRunStepDetails, type UiBuildStep, type UiMetadata, type UiProgrammerState, type UiProgrammerUpdate, type UserCancel, type UserCancelEvent, type UserInteraction, type UserMessage, type UserMessageEvent, type UserUpload, type UserUploadMetadata, type Version, type VersionedAgentUpdate, type VersionedOrUnversionedAgentUpdate, type Warning, type WikiAuditId, type WikiChange, type WikiContent, type WikiDelta, type WikiExplorerCompleted, type WikiExplorerStarted, type WikiExplorerState, type WikiExplorerUpdate, type WikiGenerationOutcome, type WikiGenerationUpdate, type WikiInfoGenerated, type WikiLearningSuggestionUpdate, type WikiPageV1, type WikiSection, type WikiSelectionUpdate, type WikiTitle, cancelAgentMessage, createApolloClient, createPromptQLAuthTokenGenerator, diffThreadEvents, downloadArtifactData, getAgentGeneratedResponse, getAgentInteractionDecisionAcceptInteractionEvent, getAgentInteractionDecisionDeclineInteractionEvent, getAgentInteractionFinishedEvent, getAgentMessageProcessingStartedEvent, getAgentOrchestratorContextExplorerCompletedEvent, getAgentOrchestratorContextExplorerStartedEvent, getAgentOrchestratorContextExplorerUpdateEvent, getAgentOrchestratorSchemaExplorerCodeExecutionCompleteEvent, getAgentOrchestratorSchemaExplorerCodeOutputAnalyzedEvent, getAgentOrchestratorSchemaExplorerCompletedEvent, getAgentOrchestratorSchemaExplorerGeneratedCodeEvent, getAgentOrchestratorSchemaExplorerSchemaExploredEvent, getAgentOrchestratorSchemaExplorerStartedEvent, getAgentOrchestratorSchemaExplorerUpdateEvent, getAgentOrchestratorSchemaTasksGeneratedEvent, getAgentOrchestratorSchemaTasksGenerationCompletedEvent, getAgentOrchestratorSchemaTasksGenerationStartedEvent, getAgentOrchestratorSchemaTasksGenerationUpdateEvent, getAgentOrchestratorStepProgrammerEvent, getAgentOrchestratorStepSavedProgramRunnerEvent, getAgentOrchestratorStepUiProgrammerEvent, getAgentOrchestratorStepUpdateEvent, getAgentOrchestratorUpdateEvent, getAgentOrchestratorWikiExplorerCompletedEvent, getAgentOrchestratorWikiExplorerStartedEvent, getAgentOrchestratorWikiExplorerUpdateEvent, getAgentOrchestratorWikiInfoGeneratedEvent, getAgentPlanGenerationStartedEvent, getAgentPlanStepGeneratedEvent, getAgentPlanningDecisionCompletedEvent, getAgentPlanningDecisionPlanningRequiredEvent, getAgentPlanningDecisionStartedEvent, getAgentPlanningDecisionUpdateEvent, getAgentStartingOrchestratorEvent, getThread, getThreadEventMessageId, getThreadEvents, getUserCancelEvent, getUserMessageEvent, isInteractionAnalyzing, listRooms, listThreads, sendThreadMessage, startThread, streamThreadMessageEvents, subscribeThreadEvents };