@arbidocs/client 0.3.134 → 0.3.136

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.cts CHANGED
@@ -2726,6 +2726,33 @@ interface paths {
2726
2726
  patch?: never;
2727
2727
  trace?: never;
2728
2728
  };
2729
+ '/v1/connectors/{vendor_key}/admin-consent': {
2730
+ parameters: {
2731
+ query?: never;
2732
+ header?: never;
2733
+ path?: never;
2734
+ cookie?: never;
2735
+ };
2736
+ /**
2737
+ * Start the Microsoft org admin-consent flow (public, no login)
2738
+ * @description Redirect an IT admin to Microsoft's org-wide admin-consent screen.
2739
+ *
2740
+ * Public by design: the whole point is that the customer's Microsoft admin can
2741
+ * authorize ARBI for their organization WITHOUT having an ARBI account — a user
2742
+ * shares ``/{ADMIN_CONSENT_PAGE}`` (which links here), the admin approves on
2743
+ * login.microsoftonline.com, and Microsoft redirects back to the regular OAuth
2744
+ * callback (already registered on the Entra app) with ``state=admin-consent``.
2745
+ * No secrets are exposed: the URL carries only the public client id + scopes.
2746
+ */
2747
+ get: operations['start_admin_consent'];
2748
+ put?: never;
2749
+ post?: never;
2750
+ delete?: never;
2751
+ options?: never;
2752
+ head?: never;
2753
+ patch?: never;
2754
+ trace?: never;
2755
+ };
2729
2756
  '/v1/connectors/{vendor_key}/callback': {
2730
2757
  parameters: {
2731
2758
  query?: never;
@@ -2736,6 +2763,13 @@ interface paths {
2736
2763
  /**
2737
2764
  * OAuth callback — exchange code for tokens
2738
2765
  * @description Handle the OAuth callback: exchange code, encrypt + store tokens, redirect.
2766
+ *
2767
+ * The provider may redirect back with an error instead of a code — e.g. the user
2768
+ * declines consent, or a SharePoint admin-consent wall blocks the grant
2769
+ * (``?error=access_denied&state=...`` with no ``code``). Rather than let FastAPI
2770
+ * reject the missing ``code`` with a raw 422, treat that (and any explicit
2771
+ * ``error``) as a graceful failure: best-effort consume the one-time PKCE state and
2772
+ * redirect the user back to the app with ``?connect_error={vendor_key}``.
2739
2773
  */
2740
2774
  get: operations['oauth_callback'];
2741
2775
  put?: never;
@@ -3426,7 +3460,7 @@ interface components {
3426
3460
  /**
3427
3461
  * Subagents Enabled
3428
3462
  * @description Include the sub_agent tool so the agent can spawn detached background sub-agents and control them (check / steer / pause / resume / collect) while it keeps working — parallel delegation, unlike the blocking deep_research. Fan-out is one level deep and capped in concurrency.
3429
- * @default false
3463
+ * @default true
3430
3464
  */
3431
3465
  SUBAGENTS_ENABLED: boolean;
3432
3466
  /**
@@ -3669,7 +3703,7 @@ interface components {
3669
3703
  /**
3670
3704
  * Subagents Enabled
3671
3705
  * @description Include the sub_agent tool so the agent can spawn detached background sub-agents and control them (check / steer / pause / resume / collect) while it keeps working — parallel delegation, unlike the blocking deep_research. Fan-out is one level deep and capped in concurrency.
3672
- * @default false
3706
+ * @default true
3673
3707
  */
3674
3708
  SUBAGENTS_ENABLED: boolean;
3675
3709
  /**
@@ -3779,7 +3813,7 @@ interface components {
3779
3813
  * "MCP_TOOLS": [],
3780
3814
  * "PLANNING_ENABLED": false,
3781
3815
  * "DEEP_RESEARCH_ENABLED": true,
3782
- * "SUBAGENTS_ENABLED": false,
3816
+ * "SUBAGENTS_ENABLED": true,
3783
3817
  * "SUGGESTED_QUERIES": false,
3784
3818
  * "ARTIFACTS_ENABLED": false,
3785
3819
  * "IMAGE_ENABLED": false,
@@ -4067,7 +4101,7 @@ interface components {
4067
4101
  * },
4068
4102
  * "MAX_CONCURRENT_REQUESTS": 256,
4069
4103
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
4070
- * "API_TYPE": "remote",
4104
+ * "API_TYPE": "local",
4071
4105
  * "RETRIEVAL_INSTRUCTION": "Judge whether the passage contains the specific facts, figures, names, or references mentioned in the query. Only answer yes if the passage directly contains these details"
4072
4106
  * }
4073
4107
  */
@@ -4088,7 +4122,7 @@ interface components {
4088
4122
  /**
4089
4123
  * @default {
4090
4124
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
4091
- * "API_TYPE": "remote",
4125
+ * "API_TYPE": "local",
4092
4126
  * "BATCH_SIZE": 128,
4093
4127
  * "MAX_CONCURRENT_REQUESTS": 256,
4094
4128
  * "DOCUMENT_PREFIX": "",
@@ -4186,6 +4220,80 @@ interface components {
4186
4220
  */
4187
4221
  project_ext_id?: string | null;
4188
4222
  };
4223
+ /**
4224
+ * ArbiItemMeta
4225
+ * @description ARBI's agent-trace extension carried on a Responses output_item.
4226
+ *
4227
+ * Standard Responses items are `message` / `function_call` / `reasoning`; none
4228
+ * of them model the trace UI's needs — a human label ("Searching documents"),
4229
+ * the agent's focus narration, a result summary ("15 passages retrieved"),
4230
+ * per-item token cost, sub-agent lane grouping. Those ride here, under a single
4231
+ * namespaced `arbi` field, so a standard Responses client ignores it (unknown
4232
+ * field) while ours reads it. The item itself stays byte-for-byte standard.
4233
+ */
4234
+ ArbiItemMeta: {
4235
+ /**
4236
+ * Label
4237
+ * @description Human display label. Backend-owned.
4238
+ */
4239
+ label?: string | null;
4240
+ /**
4241
+ * Focus
4242
+ * @description The agent's own words for what this item is doing.
4243
+ */
4244
+ focus?: string | null;
4245
+ /**
4246
+ * Detail
4247
+ * @description Enriched tool-call display shape (resolved summary, page ranges, digest flags) — richer than the raw `arguments` JSON, for the trace UI. One entry per call on a function_call item.
4248
+ */
4249
+ detail?: {
4250
+ [key: string]: unknown;
4251
+ }[] | null;
4252
+ /**
4253
+ * Outcome
4254
+ * @description Result summary, e.g. '15 passages retrieved'.
4255
+ */
4256
+ outcome?: string | null;
4257
+ /** @description Token usage for the LLM call behind this item. */
4258
+ usage?: components['schemas']['StepUsage'] | null;
4259
+ /**
4260
+ * Step Tokens
4261
+ * @description Per-item token cost.
4262
+ */
4263
+ step_tokens?: number | null;
4264
+ /**
4265
+ * Total Tokens
4266
+ * @description Cumulative tokens across the response so far.
4267
+ */
4268
+ total_tokens?: number | null;
4269
+ /** @description Token budget snapshot. */
4270
+ context?: components['schemas']['TokenBudgetContext'] | null;
4271
+ /**
4272
+ * Parent Id
4273
+ * @description Output-item id this nests under (sub-agent steps).
4274
+ */
4275
+ parent_id?: string | null;
4276
+ /**
4277
+ * Subagent
4278
+ * @description Sub-agent handle for live-lane grouping.
4279
+ */
4280
+ subagent?: string | null;
4281
+ /**
4282
+ * Subagent Status
4283
+ * @description Sub-agent lane lifecycle marker.
4284
+ */
4285
+ subagent_status?: ('running' | 'done' | 'failed') | null;
4286
+ /**
4287
+ * Model Recommendation
4288
+ * @description FilterPlan model tier (goal item, auto mode).
4289
+ */
4290
+ model_recommendation?: string | null;
4291
+ /**
4292
+ * Selected Model
4293
+ * @description Resolved model (goal item, auto mode).
4294
+ */
4295
+ selected_model?: string | null;
4296
+ };
4189
4297
  /**
4190
4298
  * ArtifactEvent
4191
4299
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -5974,7 +6082,7 @@ interface components {
5974
6082
  /**
5975
6083
  * Api Type
5976
6084
  * @description The inference type (local or remote).
5977
- * @default remote
6085
+ * @default local
5978
6086
  * @enum {string}
5979
6087
  */
5980
6088
  API_TYPE: 'local' | 'remote';
@@ -6295,7 +6403,12 @@ interface components {
6295
6403
  };
6296
6404
  /**
6297
6405
  * FolderRead
6298
- * @description A selectable mail folder (Outlook) or label (Gmail).
6406
+ * @description A mail folder (Outlook), label (Gmail), or drive folder/site/library.
6407
+ *
6408
+ * Mail folders and ordinary drive folders are always selectable. Drive listings may
6409
+ * also surface non-selectable grouping nodes (e.g. a SharePoint *site*, which
6410
+ * contains document libraries but no files of its own) — ``selectable=False`` tells
6411
+ * the picker to render them as expandable-only branches.
6299
6412
  */
6300
6413
  FolderRead: {
6301
6414
  /** Id */
@@ -6304,6 +6417,56 @@ interface components {
6304
6417
  name: string;
6305
6418
  /** Count */
6306
6419
  count?: number | null;
6420
+ /**
6421
+ * Selectable
6422
+ * @default true
6423
+ */
6424
+ selectable: boolean;
6425
+ };
6426
+ /**
6427
+ * FunctionCallItem
6428
+ * @description A `function_call` output_item — one tool invocation (Responses-standard).
6429
+ *
6430
+ * Replaces the v1 tool-call agent_step. Arguments may stream incrementally via
6431
+ * response.function_call_arguments.delta before the item completes.
6432
+ */
6433
+ FunctionCallItem: {
6434
+ /**
6435
+ * Type
6436
+ * @default function_call
6437
+ * @constant
6438
+ */
6439
+ type: 'function_call';
6440
+ /**
6441
+ * Id
6442
+ * @description Output-item id
6443
+ */
6444
+ id: string;
6445
+ /**
6446
+ * Call Id
6447
+ * @description Tool call id, correlates the call with its result.
6448
+ */
6449
+ call_id: string;
6450
+ /**
6451
+ * Name
6452
+ * @description Tool name, e.g. 'search_inside_documents'.
6453
+ */
6454
+ name: string;
6455
+ /**
6456
+ * Arguments
6457
+ * @description JSON-encoded arguments (may arrive via arguments.delta).
6458
+ * @default
6459
+ */
6460
+ arguments: string;
6461
+ /**
6462
+ * Status
6463
+ * @description Call status.
6464
+ * @default in_progress
6465
+ * @enum {string}
6466
+ */
6467
+ status: 'in_progress' | 'completed';
6468
+ /** @description ARBI agent-trace extension (non-standard). */
6469
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
6307
6470
  };
6308
6471
  /**
6309
6472
  * GenerateAgentAvatarRequest
@@ -7387,7 +7550,11 @@ interface components {
7387
7550
  };
7388
7551
  /**
7389
7552
  * OutputMessage
7390
- * @description A single output message entry in a response.
7553
+ * @description A `message` output_item — assistant text (Responses-standard).
7554
+ *
7555
+ * The terminal message of a response is the answer; an earlier message (one
7556
+ * followed by a function_call) is narration the model emitted alongside a tool
7557
+ * call. Which is which is an ordering fact the client reads, not a backend gate.
7391
7558
  */
7392
7559
  OutputMessage: {
7393
7560
  /**
@@ -7398,7 +7565,7 @@ interface components {
7398
7565
  type: 'message';
7399
7566
  /**
7400
7567
  * Id
7401
- * @description Message external ID
7568
+ * @description Output-item id
7402
7569
  */
7403
7570
  id: string;
7404
7571
  /**
@@ -7418,6 +7585,8 @@ interface components {
7418
7585
  * @description Message content blocks
7419
7586
  */
7420
7587
  content?: components['schemas']['OutputTextContent'][];
7588
+ /** @description ARBI agent-trace extension (non-standard). */
7589
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
7421
7590
  };
7422
7591
  /**
7423
7592
  * OutputTextContent
@@ -8094,6 +8263,40 @@ interface components {
8094
8263
  */
8095
8264
  url: string;
8096
8265
  };
8266
+ /**
8267
+ * ReasoningItem
8268
+ * @description A `reasoning` output_item — the agent's non-answer thinking (Responses-standard).
8269
+ *
8270
+ * Carries ARBI lifecycle steps that are neither a message nor a tool call: the
8271
+ * goal/plan step, evaluation, goal-progress. `arbi.label` names it for the UI.
8272
+ */
8273
+ ReasoningItem: {
8274
+ /**
8275
+ * Type
8276
+ * @default reasoning
8277
+ * @constant
8278
+ */
8279
+ type: 'reasoning';
8280
+ /**
8281
+ * Id
8282
+ * @description Output-item id
8283
+ */
8284
+ id: string;
8285
+ /**
8286
+ * Status
8287
+ * @description Reasoning status.
8288
+ * @default in_progress
8289
+ * @enum {string}
8290
+ */
8291
+ status: 'in_progress' | 'completed';
8292
+ /**
8293
+ * Summary
8294
+ * @description Reasoning text blocks.
8295
+ */
8296
+ summary?: components['schemas']['OutputTextContent'][];
8297
+ /** @description ARBI agent-trace extension (non-standard). */
8298
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
8299
+ };
8097
8300
  /**
8098
8301
  * RegisterRequest
8099
8302
  * @description Unified user registration request (local and SSO).
@@ -8220,7 +8423,7 @@ interface components {
8220
8423
  /**
8221
8424
  * Api Type
8222
8425
  * @description The inference type (local or remote).
8223
- * @default remote
8426
+ * @default local
8224
8427
  * @enum {string}
8225
8428
  */
8226
8429
  API_TYPE: 'local' | 'remote';
@@ -8331,9 +8534,9 @@ interface components {
8331
8534
  model: string;
8332
8535
  /**
8333
8536
  * Output
8334
- * @description Final output messages with content
8537
+ * @description Final output items (messages, function_calls, reasoning)
8335
8538
  */
8336
- output: components['schemas']['OutputMessage'][];
8539
+ output: (components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'])[];
8337
8540
  /** @description Token usage summary */
8338
8541
  usage: components['schemas']['ResponseUsage'];
8339
8542
  /** @description Full MessageResponse plus context_usage, suggested_query */
@@ -8490,9 +8693,48 @@ interface components {
8490
8693
  /** @description Error details */
8491
8694
  error: components['schemas']['ResponseError'];
8492
8695
  };
8696
+ /**
8697
+ * ResponseFunctionCallArgumentsDeltaEvent
8698
+ * @description OpenAI response.function_call_arguments.delta: streams a tool call's args.
8699
+ *
8700
+ * Emitted between a function_call item's added and done events as the model
8701
+ * assembles the JSON arguments, so the client can show a call forming live.
8702
+ */
8703
+ ResponseFunctionCallArgumentsDeltaEvent: {
8704
+ /**
8705
+ * Type
8706
+ * @default response.function_call_arguments.delta
8707
+ * @constant
8708
+ */
8709
+ type: 'response.function_call_arguments.delta';
8710
+ /**
8711
+ * Sequence Number
8712
+ * @description Monotonic sequence number for event ordering
8713
+ */
8714
+ sequence_number: number;
8715
+ /**
8716
+ * Item Id
8717
+ * @description ID of the function_call output item
8718
+ */
8719
+ item_id: string;
8720
+ /**
8721
+ * Output Index
8722
+ * @default 0
8723
+ */
8724
+ output_index: number;
8725
+ /**
8726
+ * Delta
8727
+ * @description Incremental JSON-argument text to append.
8728
+ */
8729
+ delta: string;
8730
+ };
8493
8731
  /**
8494
8732
  * ResponseOutputItemAddedEvent
8495
- * @description OpenAI response.output_item.added: announces a new output message.
8733
+ * @description OpenAI response.output_item.added: announces a new output item.
8734
+ *
8735
+ * In v3 (#2075) the item is any of message / function_call / reasoning — one is
8736
+ * emitted for every assistant message, tool call, and lifecycle step, replacing
8737
+ * the index-keyed arbi.agent_step.
8496
8738
  */
8497
8739
  ResponseOutputItemAddedEvent: {
8498
8740
  /**
@@ -8511,12 +8753,18 @@ interface components {
8511
8753
  * @default 0
8512
8754
  */
8513
8755
  output_index: number;
8514
- /** @description The output message skeleton */
8515
- item: components['schemas']['OutputMessage'];
8756
+ /**
8757
+ * Item
8758
+ * @description The output item skeleton (message / function_call / reasoning)
8759
+ */
8760
+ item: components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'];
8516
8761
  };
8517
8762
  /**
8518
8763
  * ResponseOutputItemDoneEvent
8519
- * @description OpenAI response.output_item.done: completed output message with full content.
8764
+ * @description OpenAI response.output_item.done: a completed output item.
8765
+ *
8766
+ * The completed item carries its settled arbi extension (outcome, usage) for
8767
+ * function_call / reasoning items, and the full text for a message.
8520
8768
  */
8521
8769
  ResponseOutputItemDoneEvent: {
8522
8770
  /**
@@ -8535,8 +8783,11 @@ interface components {
8535
8783
  * @default 0
8536
8784
  */
8537
8785
  output_index: number;
8538
- /** @description The completed output message */
8539
- item: components['schemas']['OutputMessage'];
8786
+ /**
8787
+ * Item
8788
+ * @description The completed output item
8789
+ */
8790
+ item: components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'];
8540
8791
  };
8541
8792
  /**
8542
8793
  * ResponseOutputTextDeltaEvent
@@ -9019,7 +9270,7 @@ interface components {
9019
9270
  MEMORY_LIMIT: string;
9020
9271
  /**
9021
9272
  * Network
9022
- * @description Container network mode. 'arbi-sandbox-net' is the dedicated bridge created at deploy time (outbound internet works; other sandboxes are unreachable). 'none' for full isolation. Do not use 'bridge' — on the shared default bridge, model-authored code sits alongside every other container on the host.
9273
+ * @description Container network mode. 'arbi-sandbox-net' is the dedicated internal network created at deploy time: no egress at all (no internet, no LAN, no host), and other sandboxes are unreachable. Web access belongs to web_search / deep_research, not to executed code. Do not use 'bridge' — it would give model-authored code the host's whole network.
9023
9274
  * @default arbi-sandbox-net
9024
9275
  */
9025
9276
  NETWORK: string;
@@ -9070,6 +9321,7 @@ interface components {
9070
9321
  response_output_text_delta?: components['schemas']['ResponseOutputTextDeltaEvent'] | null;
9071
9322
  response_output_text_done?: components['schemas']['ResponseOutputTextDoneEvent'] | null;
9072
9323
  response_output_item_done?: components['schemas']['ResponseOutputItemDoneEvent'] | null;
9324
+ response_function_call_arguments_delta?: components['schemas']['ResponseFunctionCallArgumentsDeltaEvent'] | null;
9073
9325
  response_completed?: components['schemas']['ResponseCompletedEvent'] | null;
9074
9326
  response_failed?: components['schemas']['ResponseFailedEvent'] | null;
9075
9327
  artifact?: components['schemas']['ArtifactEvent'] | null;
@@ -9079,6 +9331,10 @@ interface components {
9079
9331
  output_tokens_details?: components['schemas']['OutputTokensDetails'] | null;
9080
9332
  context_usage?: components['schemas']['ContextUsage'] | null;
9081
9333
  message_metadata?: components['schemas']['MessageMetadataPayload'] | null;
9334
+ output_message?: components['schemas']['OutputMessage'] | null;
9335
+ function_call_item?: components['schemas']['FunctionCallItem'] | null;
9336
+ reasoning_item?: components['schemas']['ReasoningItem'] | null;
9337
+ arbi_item_meta?: components['schemas']['ArbiItemMeta'] | null;
9082
9338
  detail_search_inside_documents?: components['schemas']['SearchInsideDocumentsDetail'] | null;
9083
9339
  detail_read_document?: components['schemas']['ReadDocumentDetail'] | null;
9084
9340
  detail_get_table_of_contents?: components['schemas']['GetTableOfContentsDetail'] | null;
@@ -10632,6 +10888,11 @@ interface components {
10632
10888
  * @default true
10633
10889
  */
10634
10890
  show_connector_microsoft: boolean;
10891
+ /**
10892
+ * Show Connector Sharepoint
10893
+ * @default false
10894
+ */
10895
+ show_connector_sharepoint: boolean;
10635
10896
  /**
10636
10897
  * Show Connector Google
10637
10898
  * @default false
@@ -10737,6 +10998,8 @@ interface components {
10737
10998
  show_mcp_connectors?: boolean | null;
10738
10999
  /** Show Connector Microsoft */
10739
11000
  show_connector_microsoft?: boolean | null;
11001
+ /** Show Connector Sharepoint */
11002
+ show_connector_sharepoint?: boolean | null;
10740
11003
  /** Show Connector Google */
10741
11004
  show_connector_google?: boolean | null;
10742
11005
  /** Show Connector Imanage */
@@ -10787,7 +11050,7 @@ interface components {
10787
11050
  * (FastAPI validates + documents the allowed set) and the catalog keys.
10788
11051
  * @enum {string}
10789
11052
  */
10790
- VendorKey: 'microsoft' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'ms365_mail';
11053
+ VendorKey: 'microsoft' | 'microsoft_sharepoint' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'ms365_mail';
10791
11054
  /** VerifyEmailRequest */
10792
11055
  VerifyEmailRequest: {
10793
11056
  /**
@@ -15232,11 +15495,46 @@ interface operations {
15232
15495
  };
15233
15496
  };
15234
15497
  };
15498
+ start_admin_consent: {
15499
+ parameters: {
15500
+ query?: never;
15501
+ header?: never;
15502
+ path: {
15503
+ vendor_key: components['schemas']['VendorKey'];
15504
+ };
15505
+ cookie?: never;
15506
+ };
15507
+ requestBody?: never;
15508
+ responses: {
15509
+ /** @description Successful Response */
15510
+ 200: {
15511
+ headers: {
15512
+ [name: string]: unknown;
15513
+ };
15514
+ content: {
15515
+ 'application/json': unknown;
15516
+ };
15517
+ };
15518
+ /** @description Validation Error */
15519
+ 422: {
15520
+ headers: {
15521
+ [name: string]: unknown;
15522
+ };
15523
+ content: {
15524
+ 'application/json': components['schemas']['HTTPValidationError'];
15525
+ };
15526
+ };
15527
+ };
15528
+ };
15235
15529
  oauth_callback: {
15236
15530
  parameters: {
15237
- query: {
15238
- code: string;
15239
- state: string;
15531
+ query?: {
15532
+ code?: string | null;
15533
+ state?: string | null;
15534
+ error?: string | null;
15535
+ error_description?: string | null;
15536
+ admin_consent?: string | null;
15537
+ tenant?: string | null;
15240
15538
  };
15241
15539
  header?: never;
15242
15540
  path: {
package/dist/index.d.ts CHANGED
@@ -2726,6 +2726,33 @@ interface paths {
2726
2726
  patch?: never;
2727
2727
  trace?: never;
2728
2728
  };
2729
+ '/v1/connectors/{vendor_key}/admin-consent': {
2730
+ parameters: {
2731
+ query?: never;
2732
+ header?: never;
2733
+ path?: never;
2734
+ cookie?: never;
2735
+ };
2736
+ /**
2737
+ * Start the Microsoft org admin-consent flow (public, no login)
2738
+ * @description Redirect an IT admin to Microsoft's org-wide admin-consent screen.
2739
+ *
2740
+ * Public by design: the whole point is that the customer's Microsoft admin can
2741
+ * authorize ARBI for their organization WITHOUT having an ARBI account — a user
2742
+ * shares ``/{ADMIN_CONSENT_PAGE}`` (which links here), the admin approves on
2743
+ * login.microsoftonline.com, and Microsoft redirects back to the regular OAuth
2744
+ * callback (already registered on the Entra app) with ``state=admin-consent``.
2745
+ * No secrets are exposed: the URL carries only the public client id + scopes.
2746
+ */
2747
+ get: operations['start_admin_consent'];
2748
+ put?: never;
2749
+ post?: never;
2750
+ delete?: never;
2751
+ options?: never;
2752
+ head?: never;
2753
+ patch?: never;
2754
+ trace?: never;
2755
+ };
2729
2756
  '/v1/connectors/{vendor_key}/callback': {
2730
2757
  parameters: {
2731
2758
  query?: never;
@@ -2736,6 +2763,13 @@ interface paths {
2736
2763
  /**
2737
2764
  * OAuth callback — exchange code for tokens
2738
2765
  * @description Handle the OAuth callback: exchange code, encrypt + store tokens, redirect.
2766
+ *
2767
+ * The provider may redirect back with an error instead of a code — e.g. the user
2768
+ * declines consent, or a SharePoint admin-consent wall blocks the grant
2769
+ * (``?error=access_denied&state=...`` with no ``code``). Rather than let FastAPI
2770
+ * reject the missing ``code`` with a raw 422, treat that (and any explicit
2771
+ * ``error``) as a graceful failure: best-effort consume the one-time PKCE state and
2772
+ * redirect the user back to the app with ``?connect_error={vendor_key}``.
2739
2773
  */
2740
2774
  get: operations['oauth_callback'];
2741
2775
  put?: never;
@@ -3426,7 +3460,7 @@ interface components {
3426
3460
  /**
3427
3461
  * Subagents Enabled
3428
3462
  * @description Include the sub_agent tool so the agent can spawn detached background sub-agents and control them (check / steer / pause / resume / collect) while it keeps working — parallel delegation, unlike the blocking deep_research. Fan-out is one level deep and capped in concurrency.
3429
- * @default false
3463
+ * @default true
3430
3464
  */
3431
3465
  SUBAGENTS_ENABLED: boolean;
3432
3466
  /**
@@ -3669,7 +3703,7 @@ interface components {
3669
3703
  /**
3670
3704
  * Subagents Enabled
3671
3705
  * @description Include the sub_agent tool so the agent can spawn detached background sub-agents and control them (check / steer / pause / resume / collect) while it keeps working — parallel delegation, unlike the blocking deep_research. Fan-out is one level deep and capped in concurrency.
3672
- * @default false
3706
+ * @default true
3673
3707
  */
3674
3708
  SUBAGENTS_ENABLED: boolean;
3675
3709
  /**
@@ -3779,7 +3813,7 @@ interface components {
3779
3813
  * "MCP_TOOLS": [],
3780
3814
  * "PLANNING_ENABLED": false,
3781
3815
  * "DEEP_RESEARCH_ENABLED": true,
3782
- * "SUBAGENTS_ENABLED": false,
3816
+ * "SUBAGENTS_ENABLED": true,
3783
3817
  * "SUGGESTED_QUERIES": false,
3784
3818
  * "ARTIFACTS_ENABLED": false,
3785
3819
  * "IMAGE_ENABLED": false,
@@ -4067,7 +4101,7 @@ interface components {
4067
4101
  * },
4068
4102
  * "MAX_CONCURRENT_REQUESTS": 256,
4069
4103
  * "MODEL_NAME": "Qwen/Qwen3-Reranker-0.6B",
4070
- * "API_TYPE": "remote",
4104
+ * "API_TYPE": "local",
4071
4105
  * "RETRIEVAL_INSTRUCTION": "Judge whether the passage contains the specific facts, figures, names, or references mentioned in the query. Only answer yes if the passage directly contains these details"
4072
4106
  * }
4073
4107
  */
@@ -4088,7 +4122,7 @@ interface components {
4088
4122
  /**
4089
4123
  * @default {
4090
4124
  * "MODEL_NAME": "Qwen/Qwen3-Embedding-0.6B",
4091
- * "API_TYPE": "remote",
4125
+ * "API_TYPE": "local",
4092
4126
  * "BATCH_SIZE": 128,
4093
4127
  * "MAX_CONCURRENT_REQUESTS": 256,
4094
4128
  * "DOCUMENT_PREFIX": "",
@@ -4186,6 +4220,80 @@ interface components {
4186
4220
  */
4187
4221
  project_ext_id?: string | null;
4188
4222
  };
4223
+ /**
4224
+ * ArbiItemMeta
4225
+ * @description ARBI's agent-trace extension carried on a Responses output_item.
4226
+ *
4227
+ * Standard Responses items are `message` / `function_call` / `reasoning`; none
4228
+ * of them model the trace UI's needs — a human label ("Searching documents"),
4229
+ * the agent's focus narration, a result summary ("15 passages retrieved"),
4230
+ * per-item token cost, sub-agent lane grouping. Those ride here, under a single
4231
+ * namespaced `arbi` field, so a standard Responses client ignores it (unknown
4232
+ * field) while ours reads it. The item itself stays byte-for-byte standard.
4233
+ */
4234
+ ArbiItemMeta: {
4235
+ /**
4236
+ * Label
4237
+ * @description Human display label. Backend-owned.
4238
+ */
4239
+ label?: string | null;
4240
+ /**
4241
+ * Focus
4242
+ * @description The agent's own words for what this item is doing.
4243
+ */
4244
+ focus?: string | null;
4245
+ /**
4246
+ * Detail
4247
+ * @description Enriched tool-call display shape (resolved summary, page ranges, digest flags) — richer than the raw `arguments` JSON, for the trace UI. One entry per call on a function_call item.
4248
+ */
4249
+ detail?: {
4250
+ [key: string]: unknown;
4251
+ }[] | null;
4252
+ /**
4253
+ * Outcome
4254
+ * @description Result summary, e.g. '15 passages retrieved'.
4255
+ */
4256
+ outcome?: string | null;
4257
+ /** @description Token usage for the LLM call behind this item. */
4258
+ usage?: components['schemas']['StepUsage'] | null;
4259
+ /**
4260
+ * Step Tokens
4261
+ * @description Per-item token cost.
4262
+ */
4263
+ step_tokens?: number | null;
4264
+ /**
4265
+ * Total Tokens
4266
+ * @description Cumulative tokens across the response so far.
4267
+ */
4268
+ total_tokens?: number | null;
4269
+ /** @description Token budget snapshot. */
4270
+ context?: components['schemas']['TokenBudgetContext'] | null;
4271
+ /**
4272
+ * Parent Id
4273
+ * @description Output-item id this nests under (sub-agent steps).
4274
+ */
4275
+ parent_id?: string | null;
4276
+ /**
4277
+ * Subagent
4278
+ * @description Sub-agent handle for live-lane grouping.
4279
+ */
4280
+ subagent?: string | null;
4281
+ /**
4282
+ * Subagent Status
4283
+ * @description Sub-agent lane lifecycle marker.
4284
+ */
4285
+ subagent_status?: ('running' | 'done' | 'failed') | null;
4286
+ /**
4287
+ * Model Recommendation
4288
+ * @description FilterPlan model tier (goal item, auto mode).
4289
+ */
4290
+ model_recommendation?: string | null;
4291
+ /**
4292
+ * Selected Model
4293
+ * @description Resolved model (goal item, auto mode).
4294
+ */
4295
+ selected_model?: string | null;
4296
+ };
4189
4297
  /**
4190
4298
  * ArtifactEvent
4191
4299
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -5974,7 +6082,7 @@ interface components {
5974
6082
  /**
5975
6083
  * Api Type
5976
6084
  * @description The inference type (local or remote).
5977
- * @default remote
6085
+ * @default local
5978
6086
  * @enum {string}
5979
6087
  */
5980
6088
  API_TYPE: 'local' | 'remote';
@@ -6295,7 +6403,12 @@ interface components {
6295
6403
  };
6296
6404
  /**
6297
6405
  * FolderRead
6298
- * @description A selectable mail folder (Outlook) or label (Gmail).
6406
+ * @description A mail folder (Outlook), label (Gmail), or drive folder/site/library.
6407
+ *
6408
+ * Mail folders and ordinary drive folders are always selectable. Drive listings may
6409
+ * also surface non-selectable grouping nodes (e.g. a SharePoint *site*, which
6410
+ * contains document libraries but no files of its own) — ``selectable=False`` tells
6411
+ * the picker to render them as expandable-only branches.
6299
6412
  */
6300
6413
  FolderRead: {
6301
6414
  /** Id */
@@ -6304,6 +6417,56 @@ interface components {
6304
6417
  name: string;
6305
6418
  /** Count */
6306
6419
  count?: number | null;
6420
+ /**
6421
+ * Selectable
6422
+ * @default true
6423
+ */
6424
+ selectable: boolean;
6425
+ };
6426
+ /**
6427
+ * FunctionCallItem
6428
+ * @description A `function_call` output_item — one tool invocation (Responses-standard).
6429
+ *
6430
+ * Replaces the v1 tool-call agent_step. Arguments may stream incrementally via
6431
+ * response.function_call_arguments.delta before the item completes.
6432
+ */
6433
+ FunctionCallItem: {
6434
+ /**
6435
+ * Type
6436
+ * @default function_call
6437
+ * @constant
6438
+ */
6439
+ type: 'function_call';
6440
+ /**
6441
+ * Id
6442
+ * @description Output-item id
6443
+ */
6444
+ id: string;
6445
+ /**
6446
+ * Call Id
6447
+ * @description Tool call id, correlates the call with its result.
6448
+ */
6449
+ call_id: string;
6450
+ /**
6451
+ * Name
6452
+ * @description Tool name, e.g. 'search_inside_documents'.
6453
+ */
6454
+ name: string;
6455
+ /**
6456
+ * Arguments
6457
+ * @description JSON-encoded arguments (may arrive via arguments.delta).
6458
+ * @default
6459
+ */
6460
+ arguments: string;
6461
+ /**
6462
+ * Status
6463
+ * @description Call status.
6464
+ * @default in_progress
6465
+ * @enum {string}
6466
+ */
6467
+ status: 'in_progress' | 'completed';
6468
+ /** @description ARBI agent-trace extension (non-standard). */
6469
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
6307
6470
  };
6308
6471
  /**
6309
6472
  * GenerateAgentAvatarRequest
@@ -7387,7 +7550,11 @@ interface components {
7387
7550
  };
7388
7551
  /**
7389
7552
  * OutputMessage
7390
- * @description A single output message entry in a response.
7553
+ * @description A `message` output_item — assistant text (Responses-standard).
7554
+ *
7555
+ * The terminal message of a response is the answer; an earlier message (one
7556
+ * followed by a function_call) is narration the model emitted alongside a tool
7557
+ * call. Which is which is an ordering fact the client reads, not a backend gate.
7391
7558
  */
7392
7559
  OutputMessage: {
7393
7560
  /**
@@ -7398,7 +7565,7 @@ interface components {
7398
7565
  type: 'message';
7399
7566
  /**
7400
7567
  * Id
7401
- * @description Message external ID
7568
+ * @description Output-item id
7402
7569
  */
7403
7570
  id: string;
7404
7571
  /**
@@ -7418,6 +7585,8 @@ interface components {
7418
7585
  * @description Message content blocks
7419
7586
  */
7420
7587
  content?: components['schemas']['OutputTextContent'][];
7588
+ /** @description ARBI agent-trace extension (non-standard). */
7589
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
7421
7590
  };
7422
7591
  /**
7423
7592
  * OutputTextContent
@@ -8094,6 +8263,40 @@ interface components {
8094
8263
  */
8095
8264
  url: string;
8096
8265
  };
8266
+ /**
8267
+ * ReasoningItem
8268
+ * @description A `reasoning` output_item — the agent's non-answer thinking (Responses-standard).
8269
+ *
8270
+ * Carries ARBI lifecycle steps that are neither a message nor a tool call: the
8271
+ * goal/plan step, evaluation, goal-progress. `arbi.label` names it for the UI.
8272
+ */
8273
+ ReasoningItem: {
8274
+ /**
8275
+ * Type
8276
+ * @default reasoning
8277
+ * @constant
8278
+ */
8279
+ type: 'reasoning';
8280
+ /**
8281
+ * Id
8282
+ * @description Output-item id
8283
+ */
8284
+ id: string;
8285
+ /**
8286
+ * Status
8287
+ * @description Reasoning status.
8288
+ * @default in_progress
8289
+ * @enum {string}
8290
+ */
8291
+ status: 'in_progress' | 'completed';
8292
+ /**
8293
+ * Summary
8294
+ * @description Reasoning text blocks.
8295
+ */
8296
+ summary?: components['schemas']['OutputTextContent'][];
8297
+ /** @description ARBI agent-trace extension (non-standard). */
8298
+ arbi?: components['schemas']['ArbiItemMeta'] | null;
8299
+ };
8097
8300
  /**
8098
8301
  * RegisterRequest
8099
8302
  * @description Unified user registration request (local and SSO).
@@ -8220,7 +8423,7 @@ interface components {
8220
8423
  /**
8221
8424
  * Api Type
8222
8425
  * @description The inference type (local or remote).
8223
- * @default remote
8426
+ * @default local
8224
8427
  * @enum {string}
8225
8428
  */
8226
8429
  API_TYPE: 'local' | 'remote';
@@ -8331,9 +8534,9 @@ interface components {
8331
8534
  model: string;
8332
8535
  /**
8333
8536
  * Output
8334
- * @description Final output messages with content
8537
+ * @description Final output items (messages, function_calls, reasoning)
8335
8538
  */
8336
- output: components['schemas']['OutputMessage'][];
8539
+ output: (components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'])[];
8337
8540
  /** @description Token usage summary */
8338
8541
  usage: components['schemas']['ResponseUsage'];
8339
8542
  /** @description Full MessageResponse plus context_usage, suggested_query */
@@ -8490,9 +8693,48 @@ interface components {
8490
8693
  /** @description Error details */
8491
8694
  error: components['schemas']['ResponseError'];
8492
8695
  };
8696
+ /**
8697
+ * ResponseFunctionCallArgumentsDeltaEvent
8698
+ * @description OpenAI response.function_call_arguments.delta: streams a tool call's args.
8699
+ *
8700
+ * Emitted between a function_call item's added and done events as the model
8701
+ * assembles the JSON arguments, so the client can show a call forming live.
8702
+ */
8703
+ ResponseFunctionCallArgumentsDeltaEvent: {
8704
+ /**
8705
+ * Type
8706
+ * @default response.function_call_arguments.delta
8707
+ * @constant
8708
+ */
8709
+ type: 'response.function_call_arguments.delta';
8710
+ /**
8711
+ * Sequence Number
8712
+ * @description Monotonic sequence number for event ordering
8713
+ */
8714
+ sequence_number: number;
8715
+ /**
8716
+ * Item Id
8717
+ * @description ID of the function_call output item
8718
+ */
8719
+ item_id: string;
8720
+ /**
8721
+ * Output Index
8722
+ * @default 0
8723
+ */
8724
+ output_index: number;
8725
+ /**
8726
+ * Delta
8727
+ * @description Incremental JSON-argument text to append.
8728
+ */
8729
+ delta: string;
8730
+ };
8493
8731
  /**
8494
8732
  * ResponseOutputItemAddedEvent
8495
- * @description OpenAI response.output_item.added: announces a new output message.
8733
+ * @description OpenAI response.output_item.added: announces a new output item.
8734
+ *
8735
+ * In v3 (#2075) the item is any of message / function_call / reasoning — one is
8736
+ * emitted for every assistant message, tool call, and lifecycle step, replacing
8737
+ * the index-keyed arbi.agent_step.
8496
8738
  */
8497
8739
  ResponseOutputItemAddedEvent: {
8498
8740
  /**
@@ -8511,12 +8753,18 @@ interface components {
8511
8753
  * @default 0
8512
8754
  */
8513
8755
  output_index: number;
8514
- /** @description The output message skeleton */
8515
- item: components['schemas']['OutputMessage'];
8756
+ /**
8757
+ * Item
8758
+ * @description The output item skeleton (message / function_call / reasoning)
8759
+ */
8760
+ item: components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'];
8516
8761
  };
8517
8762
  /**
8518
8763
  * ResponseOutputItemDoneEvent
8519
- * @description OpenAI response.output_item.done: completed output message with full content.
8764
+ * @description OpenAI response.output_item.done: a completed output item.
8765
+ *
8766
+ * The completed item carries its settled arbi extension (outcome, usage) for
8767
+ * function_call / reasoning items, and the full text for a message.
8520
8768
  */
8521
8769
  ResponseOutputItemDoneEvent: {
8522
8770
  /**
@@ -8535,8 +8783,11 @@ interface components {
8535
8783
  * @default 0
8536
8784
  */
8537
8785
  output_index: number;
8538
- /** @description The completed output message */
8539
- item: components['schemas']['OutputMessage'];
8786
+ /**
8787
+ * Item
8788
+ * @description The completed output item
8789
+ */
8790
+ item: components['schemas']['OutputMessage'] | components['schemas']['FunctionCallItem'] | components['schemas']['ReasoningItem'];
8540
8791
  };
8541
8792
  /**
8542
8793
  * ResponseOutputTextDeltaEvent
@@ -9019,7 +9270,7 @@ interface components {
9019
9270
  MEMORY_LIMIT: string;
9020
9271
  /**
9021
9272
  * Network
9022
- * @description Container network mode. 'arbi-sandbox-net' is the dedicated bridge created at deploy time (outbound internet works; other sandboxes are unreachable). 'none' for full isolation. Do not use 'bridge' — on the shared default bridge, model-authored code sits alongside every other container on the host.
9273
+ * @description Container network mode. 'arbi-sandbox-net' is the dedicated internal network created at deploy time: no egress at all (no internet, no LAN, no host), and other sandboxes are unreachable. Web access belongs to web_search / deep_research, not to executed code. Do not use 'bridge' — it would give model-authored code the host's whole network.
9023
9274
  * @default arbi-sandbox-net
9024
9275
  */
9025
9276
  NETWORK: string;
@@ -9070,6 +9321,7 @@ interface components {
9070
9321
  response_output_text_delta?: components['schemas']['ResponseOutputTextDeltaEvent'] | null;
9071
9322
  response_output_text_done?: components['schemas']['ResponseOutputTextDoneEvent'] | null;
9072
9323
  response_output_item_done?: components['schemas']['ResponseOutputItemDoneEvent'] | null;
9324
+ response_function_call_arguments_delta?: components['schemas']['ResponseFunctionCallArgumentsDeltaEvent'] | null;
9073
9325
  response_completed?: components['schemas']['ResponseCompletedEvent'] | null;
9074
9326
  response_failed?: components['schemas']['ResponseFailedEvent'] | null;
9075
9327
  artifact?: components['schemas']['ArtifactEvent'] | null;
@@ -9079,6 +9331,10 @@ interface components {
9079
9331
  output_tokens_details?: components['schemas']['OutputTokensDetails'] | null;
9080
9332
  context_usage?: components['schemas']['ContextUsage'] | null;
9081
9333
  message_metadata?: components['schemas']['MessageMetadataPayload'] | null;
9334
+ output_message?: components['schemas']['OutputMessage'] | null;
9335
+ function_call_item?: components['schemas']['FunctionCallItem'] | null;
9336
+ reasoning_item?: components['schemas']['ReasoningItem'] | null;
9337
+ arbi_item_meta?: components['schemas']['ArbiItemMeta'] | null;
9082
9338
  detail_search_inside_documents?: components['schemas']['SearchInsideDocumentsDetail'] | null;
9083
9339
  detail_read_document?: components['schemas']['ReadDocumentDetail'] | null;
9084
9340
  detail_get_table_of_contents?: components['schemas']['GetTableOfContentsDetail'] | null;
@@ -10632,6 +10888,11 @@ interface components {
10632
10888
  * @default true
10633
10889
  */
10634
10890
  show_connector_microsoft: boolean;
10891
+ /**
10892
+ * Show Connector Sharepoint
10893
+ * @default false
10894
+ */
10895
+ show_connector_sharepoint: boolean;
10635
10896
  /**
10636
10897
  * Show Connector Google
10637
10898
  * @default false
@@ -10737,6 +10998,8 @@ interface components {
10737
10998
  show_mcp_connectors?: boolean | null;
10738
10999
  /** Show Connector Microsoft */
10739
11000
  show_connector_microsoft?: boolean | null;
11001
+ /** Show Connector Sharepoint */
11002
+ show_connector_sharepoint?: boolean | null;
10740
11003
  /** Show Connector Google */
10741
11004
  show_connector_google?: boolean | null;
10742
11005
  /** Show Connector Imanage */
@@ -10787,7 +11050,7 @@ interface components {
10787
11050
  * (FastAPI validates + documents the allowed set) and the catalog keys.
10788
11051
  * @enum {string}
10789
11052
  */
10790
- VendorKey: 'microsoft' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'ms365_mail';
11053
+ VendorKey: 'microsoft' | 'microsoft_sharepoint' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'ms365_mail';
10791
11054
  /** VerifyEmailRequest */
10792
11055
  VerifyEmailRequest: {
10793
11056
  /**
@@ -15232,11 +15495,46 @@ interface operations {
15232
15495
  };
15233
15496
  };
15234
15497
  };
15498
+ start_admin_consent: {
15499
+ parameters: {
15500
+ query?: never;
15501
+ header?: never;
15502
+ path: {
15503
+ vendor_key: components['schemas']['VendorKey'];
15504
+ };
15505
+ cookie?: never;
15506
+ };
15507
+ requestBody?: never;
15508
+ responses: {
15509
+ /** @description Successful Response */
15510
+ 200: {
15511
+ headers: {
15512
+ [name: string]: unknown;
15513
+ };
15514
+ content: {
15515
+ 'application/json': unknown;
15516
+ };
15517
+ };
15518
+ /** @description Validation Error */
15519
+ 422: {
15520
+ headers: {
15521
+ [name: string]: unknown;
15522
+ };
15523
+ content: {
15524
+ 'application/json': components['schemas']['HTTPValidationError'];
15525
+ };
15526
+ };
15527
+ };
15528
+ };
15235
15529
  oauth_callback: {
15236
15530
  parameters: {
15237
- query: {
15238
- code: string;
15239
- state: string;
15531
+ query?: {
15532
+ code?: string | null;
15533
+ state?: string | null;
15534
+ error?: string | null;
15535
+ error_description?: string | null;
15536
+ admin_consent?: string | null;
15537
+ tenant?: string | null;
15240
15538
  };
15241
15539
  header?: never;
15242
15540
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.134",
3
+ "version": "0.3.136",
4
4
  "description": "TypeScript SDK for the ARBI API — zero-knowledge auth, E2E encryption, and type-safe REST client",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",