@panorama-ai/gateway 2.27.78 → 2.28.29

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.
@@ -272,6 +272,227 @@ export type Database = {
272
272
  }
273
273
  ];
274
274
  };
275
+ agent_cycle_run_steps: {
276
+ Row: {
277
+ args: Json;
278
+ attempt_id: string | null;
279
+ completed_at: string | null;
280
+ created_at: string;
281
+ error: string | null;
282
+ id: string;
283
+ idempotency_key: string;
284
+ is_read_only: boolean;
285
+ resource_keys: string[];
286
+ result: Json | null;
287
+ run_id: string;
288
+ started_at: string | null;
289
+ status: string;
290
+ step_index: number;
291
+ tool_call_id: string | null;
292
+ tool_name: string;
293
+ uncertainty_reason: string | null;
294
+ updated_at: string;
295
+ };
296
+ Insert: {
297
+ args?: Json;
298
+ attempt_id?: string | null;
299
+ completed_at?: string | null;
300
+ created_at?: string;
301
+ error?: string | null;
302
+ id?: string;
303
+ idempotency_key?: string;
304
+ is_read_only?: boolean;
305
+ resource_keys?: string[];
306
+ result?: Json | null;
307
+ run_id: string;
308
+ started_at?: string | null;
309
+ status?: string;
310
+ step_index: number;
311
+ tool_call_id?: string | null;
312
+ tool_name: string;
313
+ uncertainty_reason?: string | null;
314
+ updated_at?: string;
315
+ };
316
+ Update: {
317
+ args?: Json;
318
+ attempt_id?: string | null;
319
+ completed_at?: string | null;
320
+ created_at?: string;
321
+ error?: string | null;
322
+ id?: string;
323
+ idempotency_key?: string;
324
+ is_read_only?: boolean;
325
+ resource_keys?: string[];
326
+ result?: Json | null;
327
+ run_id?: string;
328
+ started_at?: string | null;
329
+ status?: string;
330
+ step_index?: number;
331
+ tool_call_id?: string | null;
332
+ tool_name?: string;
333
+ uncertainty_reason?: string | null;
334
+ updated_at?: string;
335
+ };
336
+ Relationships: [
337
+ {
338
+ foreignKeyName: "agent_cycle_run_steps_run_id_fkey";
339
+ columns: ["run_id"];
340
+ isOneToOne: false;
341
+ referencedRelation: "agent_cycle_runs";
342
+ referencedColumns: ["id"];
343
+ },
344
+ {
345
+ foreignKeyName: "agent_cycle_run_steps_tool_call_id_fkey";
346
+ columns: ["tool_call_id"];
347
+ isOneToOne: false;
348
+ referencedRelation: "tool_calls";
349
+ referencedColumns: ["id"];
350
+ }
351
+ ];
352
+ };
353
+ agent_cycle_runs: {
354
+ Row: {
355
+ agent_id: string;
356
+ available_tools: Json;
357
+ control_signals: Json;
358
+ correlation_id: string | null;
359
+ created_at: string;
360
+ cycle_id: string;
361
+ cycle_result: Json;
362
+ finalized_at: string | null;
363
+ id: string;
364
+ job_id: string;
365
+ last_error: string | null;
366
+ lease_acquired_at: string | null;
367
+ lease_expires_at: string | null;
368
+ lease_heartbeat_at: string | null;
369
+ lease_owner: string | null;
370
+ logs: Json;
371
+ next_tool_index: number;
372
+ pending_tool_calls: Json;
373
+ phase_generation: number;
374
+ planned_at: string | null;
375
+ progress_log_id: string | null;
376
+ soft_pacing_delay_seconds: number;
377
+ started_wake_generation: number | null;
378
+ state: string;
379
+ team_id: string;
380
+ tool_calls: Json;
381
+ trigger: Json;
382
+ updated_at: string;
383
+ };
384
+ Insert: {
385
+ agent_id: string;
386
+ available_tools?: Json;
387
+ control_signals?: Json;
388
+ correlation_id?: string | null;
389
+ created_at?: string;
390
+ cycle_id: string;
391
+ cycle_result?: Json;
392
+ finalized_at?: string | null;
393
+ id?: string;
394
+ job_id: string;
395
+ last_error?: string | null;
396
+ lease_acquired_at?: string | null;
397
+ lease_expires_at?: string | null;
398
+ lease_heartbeat_at?: string | null;
399
+ lease_owner?: string | null;
400
+ logs?: Json;
401
+ next_tool_index?: number;
402
+ pending_tool_calls?: Json;
403
+ phase_generation?: number;
404
+ planned_at?: string | null;
405
+ progress_log_id?: string | null;
406
+ soft_pacing_delay_seconds?: number;
407
+ started_wake_generation?: number | null;
408
+ state?: string;
409
+ team_id: string;
410
+ tool_calls?: Json;
411
+ trigger?: Json;
412
+ updated_at?: string;
413
+ };
414
+ Update: {
415
+ agent_id?: string;
416
+ available_tools?: Json;
417
+ control_signals?: Json;
418
+ correlation_id?: string | null;
419
+ created_at?: string;
420
+ cycle_id?: string;
421
+ cycle_result?: Json;
422
+ finalized_at?: string | null;
423
+ id?: string;
424
+ job_id?: string;
425
+ last_error?: string | null;
426
+ lease_acquired_at?: string | null;
427
+ lease_expires_at?: string | null;
428
+ lease_heartbeat_at?: string | null;
429
+ lease_owner?: string | null;
430
+ logs?: Json;
431
+ next_tool_index?: number;
432
+ pending_tool_calls?: Json;
433
+ phase_generation?: number;
434
+ planned_at?: string | null;
435
+ progress_log_id?: string | null;
436
+ soft_pacing_delay_seconds?: number;
437
+ started_wake_generation?: number | null;
438
+ state?: string;
439
+ team_id?: string;
440
+ tool_calls?: Json;
441
+ trigger?: Json;
442
+ updated_at?: string;
443
+ };
444
+ Relationships: [
445
+ {
446
+ foreignKeyName: "agent_cycle_runs_agent_id_fkey";
447
+ columns: ["agent_id"];
448
+ isOneToOne: false;
449
+ referencedRelation: "agent_full";
450
+ referencedColumns: ["id"];
451
+ },
452
+ {
453
+ foreignKeyName: "agent_cycle_runs_agent_id_fkey";
454
+ columns: ["agent_id"];
455
+ isOneToOne: false;
456
+ referencedRelation: "agents";
457
+ referencedColumns: ["id"];
458
+ },
459
+ {
460
+ foreignKeyName: "agent_cycle_runs_cycle_id_fkey";
461
+ columns: ["cycle_id"];
462
+ isOneToOne: true;
463
+ referencedRelation: "agent_cycles";
464
+ referencedColumns: ["id"];
465
+ },
466
+ {
467
+ foreignKeyName: "agent_cycle_runs_progress_log_id_fkey";
468
+ columns: ["progress_log_id"];
469
+ isOneToOne: false;
470
+ referencedRelation: "logs";
471
+ referencedColumns: ["id"];
472
+ },
473
+ {
474
+ foreignKeyName: "agent_cycle_runs_progress_log_id_fkey";
475
+ columns: ["progress_log_id"];
476
+ isOneToOne: false;
477
+ referencedRelation: "logs_with_agent";
478
+ referencedColumns: ["id"];
479
+ },
480
+ {
481
+ foreignKeyName: "agent_cycle_runs_progress_log_id_fkey";
482
+ columns: ["progress_log_id"];
483
+ isOneToOne: false;
484
+ referencedRelation: "ops_failure_events";
485
+ referencedColumns: ["log_id"];
486
+ },
487
+ {
488
+ foreignKeyName: "agent_cycle_runs_team_id_fkey";
489
+ columns: ["team_id"];
490
+ isOneToOne: false;
491
+ referencedRelation: "teams";
492
+ referencedColumns: ["id"];
493
+ }
494
+ ];
495
+ };
275
496
  agent_cycles: {
276
497
  Row: {
277
498
  agent_id: string;
@@ -1191,6 +1412,33 @@ export type Database = {
1191
1412
  }
1192
1413
  ];
1193
1414
  };
1415
+ cycle_phase_runtime_config: {
1416
+ Row: {
1417
+ finalizing_lease_seconds: number;
1418
+ id: string;
1419
+ lock_active_window_seconds: number;
1420
+ planning_lease_seconds: number;
1421
+ tools_running_lease_seconds: number;
1422
+ updated_at: string;
1423
+ };
1424
+ Insert: {
1425
+ finalizing_lease_seconds: number;
1426
+ id?: string;
1427
+ lock_active_window_seconds: number;
1428
+ planning_lease_seconds: number;
1429
+ tools_running_lease_seconds: number;
1430
+ updated_at?: string;
1431
+ };
1432
+ Update: {
1433
+ finalizing_lease_seconds?: number;
1434
+ id?: string;
1435
+ lock_active_window_seconds?: number;
1436
+ planning_lease_seconds?: number;
1437
+ tools_running_lease_seconds?: number;
1438
+ updated_at?: string;
1439
+ };
1440
+ Relationships: [];
1441
+ };
1194
1442
  database_query_rate_limits: {
1195
1443
  Row: {
1196
1444
  agent_id: string;
@@ -2584,6 +2832,150 @@ export type Database = {
2584
2832
  };
2585
2833
  Relationships: [];
2586
2834
  };
2835
+ slack_manifest_cleanup_jobs: {
2836
+ Row: {
2837
+ agent_id: string | null;
2838
+ app_id: string;
2839
+ attempt_count: number;
2840
+ created_at: string;
2841
+ id: string;
2842
+ last_attempt_at: string | null;
2843
+ last_error: string | null;
2844
+ metadata: Json;
2845
+ next_retry_at: string;
2846
+ reason: string | null;
2847
+ source: string;
2848
+ status: string;
2849
+ team_id: string;
2850
+ updated_at: string;
2851
+ };
2852
+ Insert: {
2853
+ agent_id?: string | null;
2854
+ app_id: string;
2855
+ attempt_count?: number;
2856
+ created_at?: string;
2857
+ id?: string;
2858
+ last_attempt_at?: string | null;
2859
+ last_error?: string | null;
2860
+ metadata?: Json;
2861
+ next_retry_at?: string;
2862
+ reason?: string | null;
2863
+ source?: string;
2864
+ status?: string;
2865
+ team_id: string;
2866
+ updated_at?: string;
2867
+ };
2868
+ Update: {
2869
+ agent_id?: string | null;
2870
+ app_id?: string;
2871
+ attempt_count?: number;
2872
+ created_at?: string;
2873
+ id?: string;
2874
+ last_attempt_at?: string | null;
2875
+ last_error?: string | null;
2876
+ metadata?: Json;
2877
+ next_retry_at?: string;
2878
+ reason?: string | null;
2879
+ source?: string;
2880
+ status?: string;
2881
+ team_id?: string;
2882
+ updated_at?: string;
2883
+ };
2884
+ Relationships: [
2885
+ {
2886
+ foreignKeyName: "slack_manifest_cleanup_jobs_agent_id_fkey";
2887
+ columns: ["agent_id"];
2888
+ isOneToOne: false;
2889
+ referencedRelation: "agent_full";
2890
+ referencedColumns: ["id"];
2891
+ },
2892
+ {
2893
+ foreignKeyName: "slack_manifest_cleanup_jobs_agent_id_fkey";
2894
+ columns: ["agent_id"];
2895
+ isOneToOne: false;
2896
+ referencedRelation: "agents";
2897
+ referencedColumns: ["id"];
2898
+ },
2899
+ {
2900
+ foreignKeyName: "slack_manifest_cleanup_jobs_team_id_fkey";
2901
+ columns: ["team_id"];
2902
+ isOneToOne: false;
2903
+ referencedRelation: "teams";
2904
+ referencedColumns: ["id"];
2905
+ }
2906
+ ];
2907
+ };
2908
+ sonos_scenes: {
2909
+ Row: {
2910
+ connection_id: string | null;
2911
+ created_at: string;
2912
+ household_id: string;
2913
+ id: string;
2914
+ name: string;
2915
+ name_key: string;
2916
+ owner_agent_id: string | null;
2917
+ payload: Json;
2918
+ scope: string;
2919
+ team_id: string;
2920
+ updated_at: string;
2921
+ };
2922
+ Insert: {
2923
+ connection_id?: string | null;
2924
+ created_at?: string;
2925
+ household_id: string;
2926
+ id?: string;
2927
+ name: string;
2928
+ name_key: string;
2929
+ owner_agent_id?: string | null;
2930
+ payload?: Json;
2931
+ scope?: string;
2932
+ team_id: string;
2933
+ updated_at?: string;
2934
+ };
2935
+ Update: {
2936
+ connection_id?: string | null;
2937
+ created_at?: string;
2938
+ household_id?: string;
2939
+ id?: string;
2940
+ name?: string;
2941
+ name_key?: string;
2942
+ owner_agent_id?: string | null;
2943
+ payload?: Json;
2944
+ scope?: string;
2945
+ team_id?: string;
2946
+ updated_at?: string;
2947
+ };
2948
+ Relationships: [
2949
+ {
2950
+ foreignKeyName: "sonos_scenes_connection_id_fkey";
2951
+ columns: ["connection_id"];
2952
+ isOneToOne: false;
2953
+ referencedRelation: "external_connections";
2954
+ referencedColumns: ["id"];
2955
+ },
2956
+ {
2957
+ foreignKeyName: "sonos_scenes_owner_agent_id_fkey";
2958
+ columns: ["owner_agent_id"];
2959
+ isOneToOne: false;
2960
+ referencedRelation: "agent_full";
2961
+ referencedColumns: ["id"];
2962
+ },
2963
+ {
2964
+ foreignKeyName: "sonos_scenes_owner_agent_id_fkey";
2965
+ columns: ["owner_agent_id"];
2966
+ isOneToOne: false;
2967
+ referencedRelation: "agents";
2968
+ referencedColumns: ["id"];
2969
+ },
2970
+ {
2971
+ foreignKeyName: "sonos_scenes_team_id_fkey";
2972
+ columns: ["team_id"];
2973
+ isOneToOne: false;
2974
+ referencedRelation: "teams";
2975
+ referencedColumns: ["id"];
2976
+ }
2977
+ ];
2978
+ };
2587
2979
  subagent_files: {
2588
2980
  Row: {
2589
2981
  content: string;
@@ -3437,6 +3829,11 @@ export type Database = {
3437
3829
  id: string;
3438
3830
  include_in_state: boolean;
3439
3831
  poll_config: Json | null;
3832
+ poll_consecutive_failures: number | null;
3833
+ poll_disabled_at: string | null;
3834
+ poll_interval_seconds: number | null;
3835
+ poll_last_at: string | null;
3836
+ poll_next_at: string | null;
3440
3837
  subscription_origin: string;
3441
3838
  subscription_path: string;
3442
3839
  team_resource_id: string;
@@ -3449,6 +3846,11 @@ export type Database = {
3449
3846
  id?: string;
3450
3847
  include_in_state?: boolean;
3451
3848
  poll_config?: Json | null;
3849
+ poll_consecutive_failures?: number | null;
3850
+ poll_disabled_at?: string | null;
3851
+ poll_interval_seconds?: number | null;
3852
+ poll_last_at?: string | null;
3853
+ poll_next_at?: string | null;
3452
3854
  subscription_origin?: string;
3453
3855
  subscription_path?: string;
3454
3856
  team_resource_id: string;
@@ -3461,6 +3863,11 @@ export type Database = {
3461
3863
  id?: string;
3462
3864
  include_in_state?: boolean;
3463
3865
  poll_config?: Json | null;
3866
+ poll_consecutive_failures?: number | null;
3867
+ poll_disabled_at?: string | null;
3868
+ poll_interval_seconds?: number | null;
3869
+ poll_last_at?: string | null;
3870
+ poll_next_at?: string | null;
3464
3871
  subscription_origin?: string;
3465
3872
  subscription_path?: string;
3466
3873
  team_resource_id?: string;
@@ -5043,6 +5450,19 @@ export type Database = {
5043
5450
  };
5044
5451
  Returns: boolean;
5045
5452
  };
5453
+ check_database_view_record_id_uniqueness: {
5454
+ Args: {
5455
+ p_record_id_column: string;
5456
+ p_schema_name: string;
5457
+ p_view_name: string;
5458
+ };
5459
+ Returns: {
5460
+ distinct_rows: number;
5461
+ is_valid: boolean;
5462
+ null_rows: number;
5463
+ total_rows: number;
5464
+ }[];
5465
+ };
5046
5466
  check_team_name_exists: {
5047
5467
  Args: {
5048
5468
  p_exclude_id?: string;
@@ -5432,6 +5852,12 @@ export type Database = {
5432
5852
  };
5433
5853
  Returns: undefined;
5434
5854
  };
5855
+ ensure_database_view_metadata_tables: {
5856
+ Args: {
5857
+ p_schema_name: string;
5858
+ };
5859
+ Returns: undefined;
5860
+ };
5435
5861
  ensure_health_alert_resources: {
5436
5862
  Args: {
5437
5863
  p_team_id: string;
@@ -5592,6 +6018,17 @@ export type Database = {
5592
6018
  table_name: string;
5593
6019
  }[];
5594
6020
  };
6021
+ get_database_table_config: {
6022
+ Args: {
6023
+ p_schema_name: string;
6024
+ };
6025
+ Returns: {
6026
+ description: string;
6027
+ display_name: string;
6028
+ hidden: boolean;
6029
+ table_name: string;
6030
+ }[];
6031
+ };
5595
6032
  get_database_table_data: {
5596
6033
  Args: {
5597
6034
  p_filter_column?: string;
@@ -5608,6 +6045,61 @@ export type Database = {
5608
6045
  total_count: number;
5609
6046
  }[];
5610
6047
  };
6048
+ get_database_view_links: {
6049
+ Args: {
6050
+ p_schema_name: string;
6051
+ };
6052
+ Returns: {
6053
+ source_column: string;
6054
+ source_view: string;
6055
+ target_column: string;
6056
+ target_view: string;
6057
+ }[];
6058
+ };
6059
+ get_database_view_record_id_column: {
6060
+ Args: {
6061
+ p_schema_name: string;
6062
+ p_view_name: string;
6063
+ };
6064
+ Returns: string;
6065
+ };
6066
+ get_database_view_registry: {
6067
+ Args: {
6068
+ p_schema_name: string;
6069
+ };
6070
+ Returns: {
6071
+ body_column: string;
6072
+ default_sort_column: string;
6073
+ default_sort_direction: string;
6074
+ description: string;
6075
+ detail_enabled: boolean;
6076
+ display_mode: string;
6077
+ display_name: string;
6078
+ group_by_column: string;
6079
+ icon: string;
6080
+ image_column: string;
6081
+ is_home: boolean;
6082
+ record_id_column: string;
6083
+ sort_order: number;
6084
+ subtitle_column: string;
6085
+ title_column: string;
6086
+ view_name: string;
6087
+ visible_columns: string[];
6088
+ }[];
6089
+ };
6090
+ get_database_view_schema_info: {
6091
+ Args: {
6092
+ p_schema_name: string;
6093
+ };
6094
+ Returns: {
6095
+ column_default: string;
6096
+ column_name: string;
6097
+ data_type: string;
6098
+ is_nullable: string;
6099
+ row_count: number;
6100
+ view_name: string;
6101
+ }[];
6102
+ };
5611
6103
  get_file_history: {
5612
6104
  Args: {
5613
6105
  p_agent_id: string;
@@ -6108,6 +6600,7 @@ export type Database = {
6108
6600
  p_agent_updates?: Json;
6109
6601
  p_job_id: string;
6110
6602
  p_logs: Json;
6603
+ p_primary_log_id?: string;
6111
6604
  p_total_cycle_cost?: number;
6112
6605
  p_usage_records?: Json;
6113
6606
  };
@@ -6179,6 +6672,34 @@ export type Database = {
6179
6672
  };
6180
6673
  Returns: boolean;
6181
6674
  };
6675
+ polling_bulk_update_poll_config: {
6676
+ Args: {
6677
+ p_updates: Json;
6678
+ };
6679
+ Returns: number;
6680
+ };
6681
+ polling_select_due_subscriptions: {
6682
+ Args: {
6683
+ p_limit?: number;
6684
+ p_now?: string;
6685
+ p_require_connection?: boolean;
6686
+ p_resource_types: string[];
6687
+ };
6688
+ Returns: {
6689
+ agent_id: string;
6690
+ connection_id: string;
6691
+ include_in_state: boolean;
6692
+ poll_config: Json;
6693
+ resource_id: string;
6694
+ resource_type: string;
6695
+ subscription_id: string;
6696
+ subscription_path: string;
6697
+ team_id: string;
6698
+ team_resource_id: string;
6699
+ title: string;
6700
+ wake_on_update: boolean;
6701
+ }[];
6702
+ };
6182
6703
  process_subagent_notification_event: {
6183
6704
  Args: {
6184
6705
  p_event_id: string;
@@ -6608,6 +7129,24 @@ export type Database = {
6608
7129
  };
6609
7130
  Returns: Json;
6610
7131
  };
7132
+ try_parse_poll_int: {
7133
+ Args: {
7134
+ p_value: string;
7135
+ };
7136
+ Returns: number;
7137
+ };
7138
+ try_parse_poll_timestamptz: {
7139
+ Args: {
7140
+ p_value: string;
7141
+ };
7142
+ Returns: string;
7143
+ };
7144
+ try_parse_poll_uuid: {
7145
+ Args: {
7146
+ p_value: string;
7147
+ };
7148
+ Returns: string;
7149
+ };
6611
7150
  unignore_team_invitation: {
6612
7151
  Args: {
6613
7152
  p_token: string;
@@ -6616,9 +7155,7 @@ export type Database = {
6616
7155
  Returns: Json;
6617
7156
  };
6618
7157
  unlock_stuck_agent_jobs: {
6619
- Args: {
6620
- p_timeout_seconds?: number;
6621
- };
7158
+ Args: never;
6622
7159
  Returns: {
6623
7160
  agent_id: string;
6624
7161
  locked_duration: string;