@robosystems/client 2.33.3 → 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.
@@ -14591,9 +14591,15 @@ export type OperatorRequest = {
14591
14591
  /**
14592
14592
  * History
14593
14593
  *
14594
- * Conversation history
14594
+ * Conversation history. Omit it on a threaded request and the run is seeded from the thread's own record instead
14595
14595
  */
14596
14596
  history?: Array<OperatorMessage>;
14597
+ /**
14598
+ * Thread Id
14599
+ *
14600
+ * 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`
14601
+ */
14602
+ thread_id?: string | null;
14597
14603
  /**
14598
14604
  * Context
14599
14605
  *
@@ -14718,6 +14724,334 @@ export type OperatorResponse = {
14718
14724
  */
14719
14725
  timestamp?: string;
14720
14726
  };
14727
+ /**
14728
+ * OperatorRunDetail
14729
+ *
14730
+ * A run with its full paper trail: the history it was given, every model
14731
+ * call, and the response envelope's metadata.
14732
+ */
14733
+ export type OperatorRunDetail = {
14734
+ /**
14735
+ * Operation Id
14736
+ *
14737
+ * The run's operation id; every mutation audit entry the run made carries it as `operation_id`
14738
+ */
14739
+ operation_id: string;
14740
+ /**
14741
+ * Thread Id
14742
+ *
14743
+ * The conversation the run belongs to, when the caller threaded it; null for a standalone API call
14744
+ */
14745
+ thread_id?: string | null;
14746
+ /**
14747
+ * User Id
14748
+ *
14749
+ * The user the run ran as
14750
+ */
14751
+ user_id: string;
14752
+ /**
14753
+ * Operator Type
14754
+ *
14755
+ * The operator that ran
14756
+ */
14757
+ operator_type: string;
14758
+ /**
14759
+ * Mode
14760
+ *
14761
+ * The execution mode the run used
14762
+ */
14763
+ mode: string;
14764
+ /**
14765
+ * Status
14766
+ *
14767
+ * How the run ended
14768
+ */
14769
+ status: 'completed' | 'failed' | 'cancelled';
14770
+ /**
14771
+ * Question
14772
+ *
14773
+ * The message the run was given
14774
+ */
14775
+ question: string;
14776
+ /**
14777
+ * Answer
14778
+ *
14779
+ * The operator's answer; null when the run did not reach one
14780
+ */
14781
+ answer?: string | null;
14782
+ /**
14783
+ * Error
14784
+ *
14785
+ * Why a failed run failed
14786
+ */
14787
+ error?: string | null;
14788
+ /**
14789
+ * Credits Consumed
14790
+ *
14791
+ * Credits the run's model calls cost
14792
+ */
14793
+ credits_consumed?: number;
14794
+ /**
14795
+ * Call Count
14796
+ *
14797
+ * Model calls the run made
14798
+ */
14799
+ call_count?: number;
14800
+ /**
14801
+ * Tools Called
14802
+ *
14803
+ * The tools the run called, each named once
14804
+ */
14805
+ tools_called?: Array<string>;
14806
+ /**
14807
+ * Write Count
14808
+ *
14809
+ * Writes the run made to the graph
14810
+ */
14811
+ write_count?: number;
14812
+ /**
14813
+ * Started At
14814
+ *
14815
+ * When the run started on the worker
14816
+ */
14817
+ started_at: string;
14818
+ /**
14819
+ * Finished At
14820
+ *
14821
+ * When the run ended
14822
+ */
14823
+ finished_at: string;
14824
+ /**
14825
+ * Duration Ms
14826
+ *
14827
+ * How long the run took
14828
+ */
14829
+ duration_ms: number;
14830
+ /**
14831
+ * History
14832
+ *
14833
+ * The prior turns the run was given, as role/content pairs
14834
+ */
14835
+ history?: Array<{
14836
+ [key: string]: unknown;
14837
+ }>;
14838
+ /**
14839
+ * Transcript
14840
+ *
14841
+ * 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
14842
+ */
14843
+ transcript?: Array<{
14844
+ [key: string]: unknown;
14845
+ }>;
14846
+ /**
14847
+ * Result
14848
+ *
14849
+ * The response envelope's metadata without its result rows: tokens, credits, the Cypher run, the writes made, confidence and loop flags
14850
+ */
14851
+ result?: {
14852
+ [key: string]: unknown;
14853
+ };
14854
+ };
14855
+ /**
14856
+ * OperatorRunListResponse
14857
+ *
14858
+ * A page of the graph's operator runs, newest first.
14859
+ */
14860
+ export type OperatorRunListResponse = {
14861
+ /**
14862
+ * Graph Id
14863
+ */
14864
+ graph_id: string;
14865
+ /**
14866
+ * Runs
14867
+ */
14868
+ runs: Array<OperatorRunSummary>;
14869
+ /**
14870
+ * Next Cursor
14871
+ *
14872
+ * Pass as `cursor` for the next, older page; null on the last page
14873
+ */
14874
+ next_cursor?: string | null;
14875
+ };
14876
+ /**
14877
+ * OperatorRunSummary
14878
+ *
14879
+ * One in-app AI operator run: what it was asked and what it answered.
14880
+ */
14881
+ export type OperatorRunSummary = {
14882
+ /**
14883
+ * Operation Id
14884
+ *
14885
+ * The run's operation id; every mutation audit entry the run made carries it as `operation_id`
14886
+ */
14887
+ operation_id: string;
14888
+ /**
14889
+ * Thread Id
14890
+ *
14891
+ * The conversation the run belongs to, when the caller threaded it; null for a standalone API call
14892
+ */
14893
+ thread_id?: string | null;
14894
+ /**
14895
+ * User Id
14896
+ *
14897
+ * The user the run ran as
14898
+ */
14899
+ user_id: string;
14900
+ /**
14901
+ * Operator Type
14902
+ *
14903
+ * The operator that ran
14904
+ */
14905
+ operator_type: string;
14906
+ /**
14907
+ * Mode
14908
+ *
14909
+ * The execution mode the run used
14910
+ */
14911
+ mode: string;
14912
+ /**
14913
+ * Status
14914
+ *
14915
+ * How the run ended
14916
+ */
14917
+ status: 'completed' | 'failed' | 'cancelled';
14918
+ /**
14919
+ * Question
14920
+ *
14921
+ * The message the run was given
14922
+ */
14923
+ question: string;
14924
+ /**
14925
+ * Answer
14926
+ *
14927
+ * The operator's answer; null when the run did not reach one
14928
+ */
14929
+ answer?: string | null;
14930
+ /**
14931
+ * Error
14932
+ *
14933
+ * Why a failed run failed
14934
+ */
14935
+ error?: string | null;
14936
+ /**
14937
+ * Credits Consumed
14938
+ *
14939
+ * Credits the run's model calls cost
14940
+ */
14941
+ credits_consumed?: number;
14942
+ /**
14943
+ * Call Count
14944
+ *
14945
+ * Model calls the run made
14946
+ */
14947
+ call_count?: number;
14948
+ /**
14949
+ * Tools Called
14950
+ *
14951
+ * The tools the run called, each named once
14952
+ */
14953
+ tools_called?: Array<string>;
14954
+ /**
14955
+ * Write Count
14956
+ *
14957
+ * Writes the run made to the graph
14958
+ */
14959
+ write_count?: number;
14960
+ /**
14961
+ * Started At
14962
+ *
14963
+ * When the run started on the worker
14964
+ */
14965
+ started_at: string;
14966
+ /**
14967
+ * Finished At
14968
+ *
14969
+ * When the run ended
14970
+ */
14971
+ finished_at: string;
14972
+ /**
14973
+ * Duration Ms
14974
+ *
14975
+ * How long the run took
14976
+ */
14977
+ duration_ms: number;
14978
+ };
14979
+ /**
14980
+ * OperatorThreadListResponse
14981
+ *
14982
+ * A page of the graph's operator threads, most recently active first.
14983
+ */
14984
+ export type OperatorThreadListResponse = {
14985
+ /**
14986
+ * Graph Id
14987
+ */
14988
+ graph_id: string;
14989
+ /**
14990
+ * Threads
14991
+ */
14992
+ threads: Array<OperatorThreadSummary>;
14993
+ /**
14994
+ * Next Cursor
14995
+ *
14996
+ * Pass as `cursor` for the next, older page; null on the last page
14997
+ */
14998
+ next_cursor?: string | null;
14999
+ };
15000
+ /**
15001
+ * OperatorThreadSummary
15002
+ *
15003
+ * One console conversation: the runs that share a thread id.
15004
+ */
15005
+ export type OperatorThreadSummary = {
15006
+ /**
15007
+ * Thread Id
15008
+ *
15009
+ * The thread id the runs were made under
15010
+ */
15011
+ thread_id: string;
15012
+ /**
15013
+ * User Id
15014
+ *
15015
+ * The user whose conversation it is
15016
+ */
15017
+ user_id: string;
15018
+ /**
15019
+ * Title
15020
+ *
15021
+ * The conversation's first question, clipped
15022
+ */
15023
+ title: string;
15024
+ /**
15025
+ * Run Count
15026
+ *
15027
+ * Runs in the thread
15028
+ */
15029
+ run_count: number;
15030
+ /**
15031
+ * First Run At
15032
+ *
15033
+ * When the first run started
15034
+ */
15035
+ first_run_at: string;
15036
+ /**
15037
+ * Last Run At
15038
+ *
15039
+ * When the latest run started
15040
+ */
15041
+ last_run_at: string;
15042
+ /**
15043
+ * Last Operator Type
15044
+ *
15045
+ * The operator the latest run used
15046
+ */
15047
+ last_operator_type: string;
15048
+ /**
15049
+ * Last Status
15050
+ *
15051
+ * How the latest run ended
15052
+ */
15053
+ last_status: 'completed' | 'failed' | 'cancelled';
15054
+ };
14721
15055
  /**
14722
15056
  * OrgDetailResponse
14723
15057
  *
@@ -27269,6 +27603,233 @@ export type ListGraphMutationsResponses = {
27269
27603
  200: MutationAuditListResponse;
27270
27604
  };
27271
27605
  export type ListGraphMutationsResponse = ListGraphMutationsResponses[keyof ListGraphMutationsResponses];
27606
+ export type ListOperatorThreadsData = {
27607
+ body?: never;
27608
+ path: {
27609
+ /**
27610
+ * Graph Id
27611
+ *
27612
+ * Graph identifier
27613
+ */
27614
+ graph_id: string;
27615
+ };
27616
+ query?: {
27617
+ /**
27618
+ * User Id
27619
+ *
27620
+ * Only this user's threads (admins; members see their own)
27621
+ */
27622
+ user_id?: string | null;
27623
+ /**
27624
+ * Cursor
27625
+ *
27626
+ * The `next_cursor` of the previous page
27627
+ */
27628
+ cursor?: string | null;
27629
+ /**
27630
+ * Limit
27631
+ *
27632
+ * Threads per page
27633
+ */
27634
+ limit?: number;
27635
+ };
27636
+ url: '/v1/graphs/{graph_id}/audit/threads';
27637
+ };
27638
+ export type ListOperatorThreadsErrors = {
27639
+ /**
27640
+ * Invalid request
27641
+ */
27642
+ 400: ErrorResponse;
27643
+ /**
27644
+ * Authentication required
27645
+ */
27646
+ 401: ErrorResponse;
27647
+ /**
27648
+ * Access denied
27649
+ */
27650
+ 403: ErrorResponse;
27651
+ /**
27652
+ * Resource not found
27653
+ */
27654
+ 404: ErrorResponse;
27655
+ /**
27656
+ * Validation Error
27657
+ */
27658
+ 422: HttpValidationError;
27659
+ /**
27660
+ * Rate limit exceeded
27661
+ */
27662
+ 429: ErrorResponse;
27663
+ /**
27664
+ * Internal server error
27665
+ */
27666
+ 500: ErrorResponse;
27667
+ };
27668
+ export type ListOperatorThreadsError = ListOperatorThreadsErrors[keyof ListOperatorThreadsErrors];
27669
+ export type ListOperatorThreadsResponses = {
27670
+ /**
27671
+ * Successful Response
27672
+ */
27673
+ 200: OperatorThreadListResponse;
27674
+ };
27675
+ export type ListOperatorThreadsResponse = ListOperatorThreadsResponses[keyof ListOperatorThreadsResponses];
27676
+ export type ListOperatorRunsData = {
27677
+ body?: never;
27678
+ path: {
27679
+ /**
27680
+ * Graph Id
27681
+ *
27682
+ * Graph identifier
27683
+ */
27684
+ graph_id: string;
27685
+ };
27686
+ query?: {
27687
+ /**
27688
+ * Thread Id
27689
+ *
27690
+ * Only the runs of this thread
27691
+ */
27692
+ thread_id?: string | null;
27693
+ /**
27694
+ * User Id
27695
+ *
27696
+ * Only runs made as this user (admins; members see their own)
27697
+ */
27698
+ user_id?: string | null;
27699
+ /**
27700
+ * Operator Type
27701
+ *
27702
+ * Only runs of this operator
27703
+ */
27704
+ operator_type?: string | null;
27705
+ /**
27706
+ * Status
27707
+ *
27708
+ * Only runs that ended this way
27709
+ */
27710
+ status?: 'completed' | 'failed' | 'cancelled' | null;
27711
+ /**
27712
+ * Since
27713
+ *
27714
+ * Only runs started at or after this time
27715
+ */
27716
+ since?: string | null;
27717
+ /**
27718
+ * Until
27719
+ *
27720
+ * Only runs started before this time
27721
+ */
27722
+ until?: string | null;
27723
+ /**
27724
+ * Cursor
27725
+ *
27726
+ * The `next_cursor` of the previous page
27727
+ */
27728
+ cursor?: string | null;
27729
+ /**
27730
+ * Limit
27731
+ *
27732
+ * Runs per page
27733
+ */
27734
+ limit?: number;
27735
+ };
27736
+ url: '/v1/graphs/{graph_id}/audit/runs';
27737
+ };
27738
+ export type ListOperatorRunsErrors = {
27739
+ /**
27740
+ * Invalid request
27741
+ */
27742
+ 400: ErrorResponse;
27743
+ /**
27744
+ * Authentication required
27745
+ */
27746
+ 401: ErrorResponse;
27747
+ /**
27748
+ * Access denied
27749
+ */
27750
+ 403: ErrorResponse;
27751
+ /**
27752
+ * Resource not found
27753
+ */
27754
+ 404: ErrorResponse;
27755
+ /**
27756
+ * Validation Error
27757
+ */
27758
+ 422: HttpValidationError;
27759
+ /**
27760
+ * Rate limit exceeded
27761
+ */
27762
+ 429: ErrorResponse;
27763
+ /**
27764
+ * Internal server error
27765
+ */
27766
+ 500: ErrorResponse;
27767
+ };
27768
+ export type ListOperatorRunsError = ListOperatorRunsErrors[keyof ListOperatorRunsErrors];
27769
+ export type ListOperatorRunsResponses = {
27770
+ /**
27771
+ * Successful Response
27772
+ */
27773
+ 200: OperatorRunListResponse;
27774
+ };
27775
+ export type ListOperatorRunsResponse = ListOperatorRunsResponses[keyof ListOperatorRunsResponses];
27776
+ export type GetOperatorRunData = {
27777
+ body?: never;
27778
+ path: {
27779
+ /**
27780
+ * Graph Id
27781
+ *
27782
+ * Graph identifier
27783
+ */
27784
+ graph_id: string;
27785
+ /**
27786
+ * Operation Id
27787
+ *
27788
+ * The run's operation id
27789
+ */
27790
+ operation_id: string;
27791
+ };
27792
+ query?: never;
27793
+ url: '/v1/graphs/{graph_id}/audit/runs/{operation_id}';
27794
+ };
27795
+ export type GetOperatorRunErrors = {
27796
+ /**
27797
+ * Invalid request
27798
+ */
27799
+ 400: ErrorResponse;
27800
+ /**
27801
+ * Authentication required
27802
+ */
27803
+ 401: ErrorResponse;
27804
+ /**
27805
+ * Access denied
27806
+ */
27807
+ 403: ErrorResponse;
27808
+ /**
27809
+ * Resource not found
27810
+ */
27811
+ 404: ErrorResponse;
27812
+ /**
27813
+ * Validation Error
27814
+ */
27815
+ 422: HttpValidationError;
27816
+ /**
27817
+ * Rate limit exceeded
27818
+ */
27819
+ 429: ErrorResponse;
27820
+ /**
27821
+ * Internal server error
27822
+ */
27823
+ 500: ErrorResponse;
27824
+ };
27825
+ export type GetOperatorRunError = GetOperatorRunErrors[keyof GetOperatorRunErrors];
27826
+ export type GetOperatorRunResponses = {
27827
+ /**
27828
+ * Successful Response
27829
+ */
27830
+ 200: OperatorRunDetail;
27831
+ };
27832
+ export type GetOperatorRunResponse = GetOperatorRunResponses[keyof GetOperatorRunResponses];
27272
27833
  export type ListSubgraphsData = {
27273
27834
  body?: never;
27274
27835
  path: {