@robosystems/client 2.33.2 → 2.34.0

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/sdk/types.gen.ts CHANGED
@@ -14923,9 +14923,15 @@ export type OperatorRequest = {
14923
14923
  /**
14924
14924
  * History
14925
14925
  *
14926
- * Conversation history
14926
+ * Conversation history. Omit it on a threaded request and the run is seeded from the thread's own record instead
14927
14927
  */
14928
14928
  history?: Array<OperatorMessage>;
14929
+ /**
14930
+ * Thread Id
14931
+ *
14932
+ * Groups this run with the earlier runs of one conversation. A caller mints the id (any ULID or UUID) on the first question and sends it with each follow-up; the run is recorded under it, and with no `history` given, the thread's last exchanges are the history. Runs list by thread at `GET /v1/graphs/{graph_id}/audit/runs`
14933
+ */
14934
+ thread_id?: string | null;
14929
14935
  /**
14930
14936
  * Context
14931
14937
  *
@@ -15052,6 +15058,339 @@ export type OperatorResponse = {
15052
15058
  timestamp?: string;
15053
15059
  };
15054
15060
 
15061
+ /**
15062
+ * OperatorRunDetail
15063
+ *
15064
+ * A run with its full paper trail: the history it was given, every model
15065
+ * call, and the response envelope's metadata.
15066
+ */
15067
+ export type OperatorRunDetail = {
15068
+ /**
15069
+ * Operation Id
15070
+ *
15071
+ * The run's operation id; every mutation audit entry the run made carries it as `operation_id`
15072
+ */
15073
+ operation_id: string;
15074
+ /**
15075
+ * Thread Id
15076
+ *
15077
+ * The conversation the run belongs to, when the caller threaded it; null for a standalone API call
15078
+ */
15079
+ thread_id?: string | null;
15080
+ /**
15081
+ * User Id
15082
+ *
15083
+ * The user the run ran as
15084
+ */
15085
+ user_id: string;
15086
+ /**
15087
+ * Operator Type
15088
+ *
15089
+ * The operator that ran
15090
+ */
15091
+ operator_type: string;
15092
+ /**
15093
+ * Mode
15094
+ *
15095
+ * The execution mode the run used
15096
+ */
15097
+ mode: string;
15098
+ /**
15099
+ * Status
15100
+ *
15101
+ * How the run ended
15102
+ */
15103
+ status: 'completed' | 'failed' | 'cancelled';
15104
+ /**
15105
+ * Question
15106
+ *
15107
+ * The message the run was given
15108
+ */
15109
+ question: string;
15110
+ /**
15111
+ * Answer
15112
+ *
15113
+ * The operator's answer; null when the run did not reach one
15114
+ */
15115
+ answer?: string | null;
15116
+ /**
15117
+ * Error
15118
+ *
15119
+ * Why a failed run failed
15120
+ */
15121
+ error?: string | null;
15122
+ /**
15123
+ * Credits Consumed
15124
+ *
15125
+ * Credits the run's model calls cost
15126
+ */
15127
+ credits_consumed?: number;
15128
+ /**
15129
+ * Call Count
15130
+ *
15131
+ * Model calls the run made
15132
+ */
15133
+ call_count?: number;
15134
+ /**
15135
+ * Tools Called
15136
+ *
15137
+ * The tools the run called, each named once
15138
+ */
15139
+ tools_called?: Array<string>;
15140
+ /**
15141
+ * Write Count
15142
+ *
15143
+ * Writes the run made to the graph
15144
+ */
15145
+ write_count?: number;
15146
+ /**
15147
+ * Started At
15148
+ *
15149
+ * When the run started on the worker
15150
+ */
15151
+ started_at: string;
15152
+ /**
15153
+ * Finished At
15154
+ *
15155
+ * When the run ended
15156
+ */
15157
+ finished_at: string;
15158
+ /**
15159
+ * Duration Ms
15160
+ *
15161
+ * How long the run took
15162
+ */
15163
+ duration_ms: number;
15164
+ /**
15165
+ * History
15166
+ *
15167
+ * The prior turns the run was given, as role/content pairs
15168
+ */
15169
+ history?: Array<{
15170
+ [key: string]: unknown;
15171
+ }>;
15172
+ /**
15173
+ * Transcript
15174
+ *
15175
+ * One entry per model call, in order: the input added since the previous call (the question, then each turn's tool results), the model's output blocks (text and tool calls), stop reason, token usage and credits. The first entry also carries the system prompt's SHA-256 and size and the tool names offered; later entries repeat them only when they change
15176
+ */
15177
+ transcript?: Array<{
15178
+ [key: string]: unknown;
15179
+ }>;
15180
+ /**
15181
+ * Result
15182
+ *
15183
+ * The response envelope's metadata without its result rows: tokens, credits, the Cypher run, the writes made, confidence and loop flags
15184
+ */
15185
+ result?: {
15186
+ [key: string]: unknown;
15187
+ };
15188
+ };
15189
+
15190
+ /**
15191
+ * OperatorRunListResponse
15192
+ *
15193
+ * A page of the graph's operator runs, newest first.
15194
+ */
15195
+ export type OperatorRunListResponse = {
15196
+ /**
15197
+ * Graph Id
15198
+ */
15199
+ graph_id: string;
15200
+ /**
15201
+ * Runs
15202
+ */
15203
+ runs: Array<OperatorRunSummary>;
15204
+ /**
15205
+ * Next Cursor
15206
+ *
15207
+ * Pass as `cursor` for the next, older page; null on the last page
15208
+ */
15209
+ next_cursor?: string | null;
15210
+ };
15211
+
15212
+ /**
15213
+ * OperatorRunSummary
15214
+ *
15215
+ * One in-app AI operator run: what it was asked and what it answered.
15216
+ */
15217
+ export type OperatorRunSummary = {
15218
+ /**
15219
+ * Operation Id
15220
+ *
15221
+ * The run's operation id; every mutation audit entry the run made carries it as `operation_id`
15222
+ */
15223
+ operation_id: string;
15224
+ /**
15225
+ * Thread Id
15226
+ *
15227
+ * The conversation the run belongs to, when the caller threaded it; null for a standalone API call
15228
+ */
15229
+ thread_id?: string | null;
15230
+ /**
15231
+ * User Id
15232
+ *
15233
+ * The user the run ran as
15234
+ */
15235
+ user_id: string;
15236
+ /**
15237
+ * Operator Type
15238
+ *
15239
+ * The operator that ran
15240
+ */
15241
+ operator_type: string;
15242
+ /**
15243
+ * Mode
15244
+ *
15245
+ * The execution mode the run used
15246
+ */
15247
+ mode: string;
15248
+ /**
15249
+ * Status
15250
+ *
15251
+ * How the run ended
15252
+ */
15253
+ status: 'completed' | 'failed' | 'cancelled';
15254
+ /**
15255
+ * Question
15256
+ *
15257
+ * The message the run was given
15258
+ */
15259
+ question: string;
15260
+ /**
15261
+ * Answer
15262
+ *
15263
+ * The operator's answer; null when the run did not reach one
15264
+ */
15265
+ answer?: string | null;
15266
+ /**
15267
+ * Error
15268
+ *
15269
+ * Why a failed run failed
15270
+ */
15271
+ error?: string | null;
15272
+ /**
15273
+ * Credits Consumed
15274
+ *
15275
+ * Credits the run's model calls cost
15276
+ */
15277
+ credits_consumed?: number;
15278
+ /**
15279
+ * Call Count
15280
+ *
15281
+ * Model calls the run made
15282
+ */
15283
+ call_count?: number;
15284
+ /**
15285
+ * Tools Called
15286
+ *
15287
+ * The tools the run called, each named once
15288
+ */
15289
+ tools_called?: Array<string>;
15290
+ /**
15291
+ * Write Count
15292
+ *
15293
+ * Writes the run made to the graph
15294
+ */
15295
+ write_count?: number;
15296
+ /**
15297
+ * Started At
15298
+ *
15299
+ * When the run started on the worker
15300
+ */
15301
+ started_at: string;
15302
+ /**
15303
+ * Finished At
15304
+ *
15305
+ * When the run ended
15306
+ */
15307
+ finished_at: string;
15308
+ /**
15309
+ * Duration Ms
15310
+ *
15311
+ * How long the run took
15312
+ */
15313
+ duration_ms: number;
15314
+ };
15315
+
15316
+ /**
15317
+ * OperatorThreadListResponse
15318
+ *
15319
+ * A page of the graph's operator threads, most recently active first.
15320
+ */
15321
+ export type OperatorThreadListResponse = {
15322
+ /**
15323
+ * Graph Id
15324
+ */
15325
+ graph_id: string;
15326
+ /**
15327
+ * Threads
15328
+ */
15329
+ threads: Array<OperatorThreadSummary>;
15330
+ /**
15331
+ * Next Cursor
15332
+ *
15333
+ * Pass as `cursor` for the next, older page; null on the last page
15334
+ */
15335
+ next_cursor?: string | null;
15336
+ };
15337
+
15338
+ /**
15339
+ * OperatorThreadSummary
15340
+ *
15341
+ * One console conversation: the runs that share a thread id.
15342
+ */
15343
+ export type OperatorThreadSummary = {
15344
+ /**
15345
+ * Thread Id
15346
+ *
15347
+ * The thread id the runs were made under
15348
+ */
15349
+ thread_id: string;
15350
+ /**
15351
+ * User Id
15352
+ *
15353
+ * The user whose conversation it is
15354
+ */
15355
+ user_id: string;
15356
+ /**
15357
+ * Title
15358
+ *
15359
+ * The conversation's first question, clipped
15360
+ */
15361
+ title: string;
15362
+ /**
15363
+ * Run Count
15364
+ *
15365
+ * Runs in the thread
15366
+ */
15367
+ run_count: number;
15368
+ /**
15369
+ * First Run At
15370
+ *
15371
+ * When the first run started
15372
+ */
15373
+ first_run_at: string;
15374
+ /**
15375
+ * Last Run At
15376
+ *
15377
+ * When the latest run started
15378
+ */
15379
+ last_run_at: string;
15380
+ /**
15381
+ * Last Operator Type
15382
+ *
15383
+ * The operator the latest run used
15384
+ */
15385
+ last_operator_type: string;
15386
+ /**
15387
+ * Last Status
15388
+ *
15389
+ * How the latest run ended
15390
+ */
15391
+ last_status: 'completed' | 'failed' | 'cancelled';
15392
+ };
15393
+
15055
15394
  /**
15056
15395
  * OrgDetailResponse
15057
15396
  *
@@ -28247,6 +28586,248 @@ export type ListGraphMutationsResponses = {
28247
28586
 
28248
28587
  export type ListGraphMutationsResponse = ListGraphMutationsResponses[keyof ListGraphMutationsResponses];
28249
28588
 
28589
+ export type ListOperatorThreadsData = {
28590
+ body?: never;
28591
+ path: {
28592
+ /**
28593
+ * Graph Id
28594
+ *
28595
+ * Graph identifier
28596
+ */
28597
+ graph_id: string;
28598
+ };
28599
+ query?: {
28600
+ /**
28601
+ * User Id
28602
+ *
28603
+ * Only this user's threads (admins; members see their own)
28604
+ */
28605
+ user_id?: string | null;
28606
+ /**
28607
+ * Cursor
28608
+ *
28609
+ * The `next_cursor` of the previous page
28610
+ */
28611
+ cursor?: string | null;
28612
+ /**
28613
+ * Limit
28614
+ *
28615
+ * Threads per page
28616
+ */
28617
+ limit?: number;
28618
+ };
28619
+ url: '/v1/graphs/{graph_id}/audit/threads';
28620
+ };
28621
+
28622
+ export type ListOperatorThreadsErrors = {
28623
+ /**
28624
+ * Invalid request
28625
+ */
28626
+ 400: ErrorResponse;
28627
+ /**
28628
+ * Authentication required
28629
+ */
28630
+ 401: ErrorResponse;
28631
+ /**
28632
+ * Access denied
28633
+ */
28634
+ 403: ErrorResponse;
28635
+ /**
28636
+ * Resource not found
28637
+ */
28638
+ 404: ErrorResponse;
28639
+ /**
28640
+ * Validation Error
28641
+ */
28642
+ 422: HttpValidationError;
28643
+ /**
28644
+ * Rate limit exceeded
28645
+ */
28646
+ 429: ErrorResponse;
28647
+ /**
28648
+ * Internal server error
28649
+ */
28650
+ 500: ErrorResponse;
28651
+ };
28652
+
28653
+ export type ListOperatorThreadsError = ListOperatorThreadsErrors[keyof ListOperatorThreadsErrors];
28654
+
28655
+ export type ListOperatorThreadsResponses = {
28656
+ /**
28657
+ * Successful Response
28658
+ */
28659
+ 200: OperatorThreadListResponse;
28660
+ };
28661
+
28662
+ export type ListOperatorThreadsResponse = ListOperatorThreadsResponses[keyof ListOperatorThreadsResponses];
28663
+
28664
+ export type ListOperatorRunsData = {
28665
+ body?: never;
28666
+ path: {
28667
+ /**
28668
+ * Graph Id
28669
+ *
28670
+ * Graph identifier
28671
+ */
28672
+ graph_id: string;
28673
+ };
28674
+ query?: {
28675
+ /**
28676
+ * Thread Id
28677
+ *
28678
+ * Only the runs of this thread
28679
+ */
28680
+ thread_id?: string | null;
28681
+ /**
28682
+ * User Id
28683
+ *
28684
+ * Only runs made as this user (admins; members see their own)
28685
+ */
28686
+ user_id?: string | null;
28687
+ /**
28688
+ * Operator Type
28689
+ *
28690
+ * Only runs of this operator
28691
+ */
28692
+ operator_type?: string | null;
28693
+ /**
28694
+ * Status
28695
+ *
28696
+ * Only runs that ended this way
28697
+ */
28698
+ status?: 'completed' | 'failed' | 'cancelled' | null;
28699
+ /**
28700
+ * Since
28701
+ *
28702
+ * Only runs started at or after this time
28703
+ */
28704
+ since?: string | null;
28705
+ /**
28706
+ * Until
28707
+ *
28708
+ * Only runs started before this time
28709
+ */
28710
+ until?: string | null;
28711
+ /**
28712
+ * Cursor
28713
+ *
28714
+ * The `next_cursor` of the previous page
28715
+ */
28716
+ cursor?: string | null;
28717
+ /**
28718
+ * Limit
28719
+ *
28720
+ * Runs per page
28721
+ */
28722
+ limit?: number;
28723
+ };
28724
+ url: '/v1/graphs/{graph_id}/audit/runs';
28725
+ };
28726
+
28727
+ export type ListOperatorRunsErrors = {
28728
+ /**
28729
+ * Invalid request
28730
+ */
28731
+ 400: ErrorResponse;
28732
+ /**
28733
+ * Authentication required
28734
+ */
28735
+ 401: ErrorResponse;
28736
+ /**
28737
+ * Access denied
28738
+ */
28739
+ 403: ErrorResponse;
28740
+ /**
28741
+ * Resource not found
28742
+ */
28743
+ 404: ErrorResponse;
28744
+ /**
28745
+ * Validation Error
28746
+ */
28747
+ 422: HttpValidationError;
28748
+ /**
28749
+ * Rate limit exceeded
28750
+ */
28751
+ 429: ErrorResponse;
28752
+ /**
28753
+ * Internal server error
28754
+ */
28755
+ 500: ErrorResponse;
28756
+ };
28757
+
28758
+ export type ListOperatorRunsError = ListOperatorRunsErrors[keyof ListOperatorRunsErrors];
28759
+
28760
+ export type ListOperatorRunsResponses = {
28761
+ /**
28762
+ * Successful Response
28763
+ */
28764
+ 200: OperatorRunListResponse;
28765
+ };
28766
+
28767
+ export type ListOperatorRunsResponse = ListOperatorRunsResponses[keyof ListOperatorRunsResponses];
28768
+
28769
+ export type GetOperatorRunData = {
28770
+ body?: never;
28771
+ path: {
28772
+ /**
28773
+ * Graph Id
28774
+ *
28775
+ * Graph identifier
28776
+ */
28777
+ graph_id: string;
28778
+ /**
28779
+ * Operation Id
28780
+ *
28781
+ * The run's operation id
28782
+ */
28783
+ operation_id: string;
28784
+ };
28785
+ query?: never;
28786
+ url: '/v1/graphs/{graph_id}/audit/runs/{operation_id}';
28787
+ };
28788
+
28789
+ export type GetOperatorRunErrors = {
28790
+ /**
28791
+ * Invalid request
28792
+ */
28793
+ 400: ErrorResponse;
28794
+ /**
28795
+ * Authentication required
28796
+ */
28797
+ 401: ErrorResponse;
28798
+ /**
28799
+ * Access denied
28800
+ */
28801
+ 403: ErrorResponse;
28802
+ /**
28803
+ * Resource not found
28804
+ */
28805
+ 404: ErrorResponse;
28806
+ /**
28807
+ * Validation Error
28808
+ */
28809
+ 422: HttpValidationError;
28810
+ /**
28811
+ * Rate limit exceeded
28812
+ */
28813
+ 429: ErrorResponse;
28814
+ /**
28815
+ * Internal server error
28816
+ */
28817
+ 500: ErrorResponse;
28818
+ };
28819
+
28820
+ export type GetOperatorRunError = GetOperatorRunErrors[keyof GetOperatorRunErrors];
28821
+
28822
+ export type GetOperatorRunResponses = {
28823
+ /**
28824
+ * Successful Response
28825
+ */
28826
+ 200: OperatorRunDetail;
28827
+ };
28828
+
28829
+ export type GetOperatorRunResponse = GetOperatorRunResponses[keyof GetOperatorRunResponses];
28830
+
28250
28831
  export type ListSubgraphsData = {
28251
28832
  body?: never;
28252
28833
  path: {