@arbidocs/client 0.3.78 → 0.3.79

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
@@ -709,6 +709,61 @@ interface paths {
709
709
  patch?: never;
710
710
  trace?: never;
711
711
  };
712
+ '/v1/user/restore-account': {
713
+ parameters: {
714
+ query?: never;
715
+ header?: never;
716
+ path?: never;
717
+ cookie?: never;
718
+ };
719
+ get?: never;
720
+ put?: never;
721
+ /**
722
+ * Admin Restore Account
723
+ * @description Restore a soft-deleted account by clearing deleted_at and resetting token_version.
724
+ *
725
+ * Authenticated via the support API key (header ``X-API-Key``).
726
+ * After restoration the user can log in normally again.
727
+ */
728
+ post: operations['admin_restore_account'];
729
+ delete?: never;
730
+ options?: never;
731
+ head?: never;
732
+ patch?: never;
733
+ trace?: never;
734
+ };
735
+ '/v1/user/request-deletion': {
736
+ parameters: {
737
+ query?: never;
738
+ header?: never;
739
+ path?: never;
740
+ cookie?: never;
741
+ };
742
+ get?: never;
743
+ put?: never;
744
+ /**
745
+ * Request Deletion
746
+ * @description Soft-delete the calling user's account.
747
+ *
748
+ * Immediately closes the account:
749
+ * - Sets ``deleted_at = now()`` on the user row
750
+ * - Increments ``token_version`` to invalidate all existing JWT tokens
751
+ * - Deletes all active Redis sessions (logged out on all devices)
752
+ * - Sends a best-effort confirmation email
753
+ *
754
+ * Blockers (returns 422 if any apply):
755
+ * - User has an active Stripe subscription (must cancel first)
756
+ * - User is the sole admin of a workspace with other members
757
+ *
758
+ * Recovery is admin-only; there is no self-service cancel.
759
+ */
760
+ post: operations['request_deletion'];
761
+ delete?: never;
762
+ options?: never;
763
+ head?: never;
764
+ patch?: never;
765
+ trace?: never;
766
+ };
712
767
  '/v1/user/products': {
713
768
  parameters: {
714
769
  query?: never;
@@ -2215,6 +2270,43 @@ interface components {
2215
2270
  /** Session Pubkey B64 */
2216
2271
  session_pubkey_b64?: string | null;
2217
2272
  };
2273
+ /**
2274
+ * AgentStepDeltaEvent
2275
+ * @description Incremental narration for an in-progress agent step (event: arbi.agent_step_delta).
2276
+ *
2277
+ * Streamed live as the model generates its narration for a turn, BEFORE that
2278
+ * turn resolves into a tool call or an answer. The frontend appends `delta` to
2279
+ * the `focus` of the step with the matching `index` (creating a bare step if
2280
+ * that index hasn't been seen yet), giving a live play-by-play inside the
2281
+ * steps block. This channel is narration only — the final answer is delivered
2282
+ * separately and authoritatively via response.output_text.delta, never here.
2283
+ *
2284
+ * Example:
2285
+ * {"type": "arbi.agent_step_delta", "index": 2, "delta": "Searching the "}
2286
+ */
2287
+ AgentStepDeltaEvent: {
2288
+ /**
2289
+ * T
2290
+ * @description Seconds elapsed since stream start.
2291
+ */
2292
+ t?: number | null;
2293
+ /**
2294
+ * Type
2295
+ * @default arbi.agent_step_delta
2296
+ * @constant
2297
+ */
2298
+ type: 'arbi.agent_step_delta';
2299
+ /**
2300
+ * Index
2301
+ * @description Step index this narration belongs to (matches AgentStepEvent.index).
2302
+ */
2303
+ index: number;
2304
+ /**
2305
+ * Delta
2306
+ * @description Incremental focus/narration text to append to the step.
2307
+ */
2308
+ delta: string;
2309
+ };
2218
2310
  /**
2219
2311
  * AgentStepEvent
2220
2312
  * @description A single agent step with a sequential index.
@@ -2275,19 +2367,14 @@ interface components {
2275
2367
  index: number;
2276
2368
  /**
2277
2369
  * Step
2278
- * @description Lifecycle step (planning, answering, reviewing). Absent for tool calls.
2370
+ * @description Lifecycle step. Absent (None) for tool-call steps, which carry `detail` instead.
2279
2371
  */
2280
- step?: string | null;
2372
+ step?: ('goal' | 'skill' | 'planning' | 'tool_progress' | 'goal_progress' | 'answering' | 'reviewing' | 'evaluation') | null;
2281
2373
  /**
2282
2374
  * Label
2283
2375
  * @description Display label for the step. Backend-driven, no frontend mapping needed.
2284
2376
  */
2285
2377
  label?: string | null;
2286
- /**
2287
- * Icon
2288
- * @description Lucide icon name for the step (e.g. 'search'). Backend-driven, no frontend mapping needed.
2289
- */
2290
- icon?: string | null;
2291
2378
  /**
2292
2379
  * Focus
2293
2380
  * @description Agent's current focus (single sentence). Present on tool call steps.
@@ -2368,6 +2455,12 @@ interface components {
2368
2455
  * @default false
2369
2456
  */
2370
2457
  PLANNING_ENABLED: boolean;
2458
+ /**
2459
+ * Deep Research Enabled
2460
+ * @description Include the deep_research tool so the agent can delegate a focused research topic to a nested retrieval sub-agent (document + web search), keeping the main context clean while citations from the sub-agent's sources flow back.
2461
+ * @default false
2462
+ */
2463
+ DEEP_RESEARCH_ENABLED: boolean;
2371
2464
  /**
2372
2465
  * Suggested Queries
2373
2466
  * @description Generate a single suggested follow-up query after each response.
@@ -2422,18 +2515,6 @@ interface components {
2422
2515
  * @default false
2423
2516
  */
2424
2517
  GOALS_ENABLED: boolean;
2425
- /**
2426
- * Goal Loop
2427
- * @description Transient flag set by the /goal command (only when GOALS_ENABLED). When True, the agent runs inside a Ralph loop: PlanningLLM authors a frozen acceptance checklist, the agent works it to completion, and after each pass ReviewLLM grades every criterion. The loop stops when all criteria are met, or after GOAL_MAX_OUTER_LOOPS passes.
2428
- * @default false
2429
- */
2430
- GOAL_LOOP: boolean;
2431
- /**
2432
- * Goal Text
2433
- * @description Transient objective set by the /goal command — the goal the Ralph loop drives toward.
2434
- * @default
2435
- */
2436
- GOAL_TEXT: string;
2437
2518
  /**
2438
2519
  * Goal Max Outer Loops
2439
2520
  * @description Maximum number of outer Ralph-loop passes before the loop stops and returns its best answer, even if the goal judge has not declared the goal satisfied.
@@ -2506,7 +2587,7 @@ interface components {
2506
2587
  * @description System prompt for the agent. Dynamic context is appended automatically.
2507
2588
  * @default Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.
2508
2589
  *
2509
- * IMPORTANT: Never say "I don't have information in the available documents" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user asks about a specific workspace document, call read_document or get_table_of_contents — never answer from memory.
2590
+ * IMPORTANT: Never say "I don't have information in the available documents" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user's question may be answered by workspace documents, call search_inside_documents, read_document, or get_table_of_contents — never answer from memory.
2510
2591
  *
2511
2592
  * When using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.
2512
2593
  *
@@ -2531,8 +2612,8 @@ interface components {
2531
2612
  *
2532
2613
  * TOOL CALLING:
2533
2614
  * - Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.
2534
- * - Always invoke tools using the tool-calling mechanism. NEVER write text that describes or simulates a tool call (e.g. never write "Searching for X...", "Reading document Y...", "Calling search_inside_documents" as prose actually call the tool).
2535
- * - If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.
2615
+ * - Always invoke tools using the tool-calling mechanism. A short note about what you're doing is welcome and helps the user follow along — but it must accompany an actual tool call in the same turn; it is never a substitute for one. Writing "Searching for X..." or "Reading document Y..." and stopping there, with no tool call emitted, leaves the work undone.
2616
+ * - If you intend to search or read, issue the tool call in that same turn.
2536
2617
  *
2537
2618
  * EFFICIENCY:
2538
2619
  * 1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.
@@ -2589,6 +2670,7 @@ interface components {
2589
2670
  * },
2590
2671
  * "MCP_TOOLS": [],
2591
2672
  * "PLANNING_ENABLED": false,
2673
+ * "DEEP_RESEARCH_ENABLED": false,
2592
2674
  * "SUGGESTED_QUERIES": false,
2593
2675
  * "ARTIFACTS_ENABLED": false,
2594
2676
  * "VISION_ENABLED": false,
@@ -2598,8 +2680,6 @@ interface components {
2598
2680
  * "SKILL_CREATION": false,
2599
2681
  * "MEMORY_CREATION": false,
2600
2682
  * "GOALS_ENABLED": false,
2601
- * "GOAL_LOOP": false,
2602
- * "GOAL_TEXT": "",
2603
2683
  * "GOAL_MAX_OUTER_LOOPS": 6,
2604
2684
  * "REVIEW_ENABLED": false,
2605
2685
  * "PERSONA": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.",
@@ -2611,7 +2691,7 @@ interface components {
2611
2691
  * "AGENT_MAX_ITERATIONS": 20,
2612
2692
  * "AGENT_MAX_PARALLEL_TOOL_CALLS": 10,
2613
2693
  * "AGENT_HISTORY_CHAR_THRESHOLD": 8000,
2614
- * "AGENT_SYSTEM_PROMPT": "Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.\n\nIMPORTANT: Never say \"I don't have information in the available documents\" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user asks about a specific workspace document, call read_document or get_table_of_contents — never answer from memory.\n\nWhen using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.\n\nDOCUMENT INDEX:\nThe \"Workspace Documents\" table in your system prompt already lists every document with its Id, Title, Date, Pages, and Subject. Use this table directly when the user asks to list, catalogue, or tabulate documents — do NOT call any tools for that. Only use tools when you need to read or search document content.\n\nDOCUMENT STRATEGY:\n- For listing/cataloguing documents: use the document index already in your prompt — no tool calls needed.\n- For overview/summary requests: use get_table_of_contents first, then read key sections with read_document.\n- For specific questions: use search_inside_documents to find relevant sections, then read those sections with read_document.\n- For translation, deep analysis, or detailed summaries of a single document: use read_document with no ranges to load the complete text.\n- For extracting structured findings from passages: use read_document with digest=true or search_inside_documents with digest=true.\n- Never search for meta-queries like \"summary\", \"overview\", or \"all documents\" — search for the actual subject matter.\n\nFORMATTING:\n- Start your answer directly with the content — never open with a description of what you searched for or read (e.g. never write \"Searching for X\", \"Reading Y\", \"I found Z documents\" as the first lines of an answer).\n- Use markdown: headings, bold, bullet points, numbered lists\n- Main conclusion first, followed by supporting points\n- Bullet points for lists of discrete items\n- Numbering for sequential steps or prioritized items\n- Bold text for critical conclusions or decision points\n\nTOOL CALLING:\n- Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.\n- Always invoke tools using the tool-calling mechanism. NEVER write text that describes or simulates a tool call (e.g. never write \"Searching for X...\", \"Reading document Y...\", \"Calling search_inside_documents\" as prose actually call the tool).\n- If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.\n\nEFFICIENCY:\n1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.\n2. Call multiple tools in parallel when a query has several aspects.\n3. NEVER repeat a tool call with the same arguments.\n4. Use targeted queries and narrow page ranges per retrieval call.\n5. Stop when you have sufficient evidence — do not over-research."
2694
+ * "AGENT_SYSTEM_PROMPT": "Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.\n\nIMPORTANT: Never say \"I don't have information in the available documents\" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user's question may be answered by workspace documents, call search_inside_documents, read_document, or get_table_of_contents — never answer from memory.\n\nWhen using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.\n\nDOCUMENT INDEX:\nThe \"Workspace Documents\" table in your system prompt already lists every document with its Id, Title, Date, Pages, and Subject. Use this table directly when the user asks to list, catalogue, or tabulate documents — do NOT call any tools for that. Only use tools when you need to read or search document content.\n\nDOCUMENT STRATEGY:\n- For listing/cataloguing documents: use the document index already in your prompt — no tool calls needed.\n- For overview/summary requests: use get_table_of_contents first, then read key sections with read_document.\n- For specific questions: use search_inside_documents to find relevant sections, then read those sections with read_document.\n- For translation, deep analysis, or detailed summaries of a single document: use read_document with no ranges to load the complete text.\n- For extracting structured findings from passages: use read_document with digest=true or search_inside_documents with digest=true.\n- Never search for meta-queries like \"summary\", \"overview\", or \"all documents\" — search for the actual subject matter.\n\nFORMATTING:\n- Start your answer directly with the content — never open with a description of what you searched for or read (e.g. never write \"Searching for X\", \"Reading Y\", \"I found Z documents\" as the first lines of an answer).\n- Use markdown: headings, bold, bullet points, numbered lists\n- Main conclusion first, followed by supporting points\n- Bullet points for lists of discrete items\n- Numbering for sequential steps or prioritized items\n- Bold text for critical conclusions or decision points\n\nTOOL CALLING:\n- Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.\n- Always invoke tools using the tool-calling mechanism. A short note about what you're doing is welcome and helps the user follow along — but it must accompany an actual tool call in the same turn; it is never a substitute for one. Writing \"Searching for X...\" or \"Reading document Y...\" and stopping there, with no tool call emitted, leaves the work undone.\n- If you intend to search or read, issue the tool call in that same turn.\n\nEFFICIENCY:\n1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.\n2. Call multiple tools in parallel when a query has several aspects.\n3. NEVER repeat a tool call with the same arguments.\n4. Use targeted queries and narrow page ranges per retrieval call.\n5. Stop when you have sufficient evidence — do not over-research."
2615
2695
  * }
2616
2696
  */
2617
2697
  Agents: components['schemas']['AgentsConfig'];
@@ -2791,7 +2871,7 @@ interface components {
2791
2871
  * @default {
2792
2872
  * "API_TYPE": "remote",
2793
2873
  * "ENABLE_THINKING": true,
2794
- * "MODEL_NAME": "GLM5@Fireworks",
2874
+ * "MODEL_NAME": "Premium",
2795
2875
  * "SYSTEM_INSTRUCTION": "You are a code execution agent. You write and run code to accomplish tasks.\n\nYou have access to an execute_code tool that runs code in a sandboxed Docker container.\n\nThe sandbox has:\n- Python 3.12 with numpy, pandas, matplotlib, requests, beautifulsoup4,\n httpx, pillow, sympy, pyyaml (plus uv for installing more)\n- Node.js 22 with TypeScript (ts-node) and npm\n- Bash with git, curl, wget, jq, sqlite3, build-essential\n- Network access (can pip/npm install additional packages)\n\nInstructions:\n1. Write clean, correct code to accomplish the user's task\n2. Always call execute_code to run your code — never guess the output\n3. If execution errors, analyze the traceback, fix the code, and retry\n4. Once you have the correct output, respond with ONLY the final result\n\nKeep code simple and direct. Prefer Python unless the task specifically requires another language.",
2796
2876
  * "TEMPERATURE": 0.2,
2797
2877
  * "MAX_TOKENS": 8000,
@@ -2923,6 +3003,47 @@ interface components {
2923
3003
  */
2924
3004
  last_input_tokens: number;
2925
3005
  };
3006
+ /**
3007
+ * ArbiErrorEvent
3008
+ * @description ``arbi.error`` — a structured mid-stream error (e.g. AI-quota exceeded).
3009
+ *
3010
+ * Flat payload so the client can branch on ``code`` (e.g. QUOTA_EXCEEDED →
3011
+ * upgrade modal) without unwrapping, instead of treating it as a retryable
3012
+ * ``response.failed``. Accumulated for GET-poll reconnects.
3013
+ */
3014
+ ArbiErrorEvent: {
3015
+ /**
3016
+ * Type
3017
+ * @default arbi.error
3018
+ * @constant
3019
+ */
3020
+ type: 'arbi.error';
3021
+ /**
3022
+ * Code
3023
+ * @description Error code, e.g. 'QUOTA_EXCEEDED'
3024
+ */
3025
+ code: string;
3026
+ /**
3027
+ * Message
3028
+ * @description Human-readable error message
3029
+ */
3030
+ message: string;
3031
+ /**
3032
+ * Spend
3033
+ * @description Current spend in USD (QUOTA_EXCEEDED)
3034
+ */
3035
+ spend?: number | null;
3036
+ /**
3037
+ * Budget
3038
+ * @description Budget cap in USD (QUOTA_EXCEEDED)
3039
+ */
3040
+ budget?: number | null;
3041
+ /**
3042
+ * Project Ext Id
3043
+ * @description Affected project external id (QUOTA_EXCEEDED)
3044
+ */
3045
+ project_ext_id?: string | null;
3046
+ };
2926
3047
  /**
2927
3048
  * ArtifactEvent
2928
3049
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -3278,7 +3399,7 @@ interface components {
3278
3399
  /**
3279
3400
  * Model Name
3280
3401
  * @description Model for code generation. Should be a strong coding model.
3281
- * @default GLM5@Fireworks
3402
+ * @default Premium
3282
3403
  */
3283
3404
  MODEL_NAME: string;
3284
3405
  /**
@@ -4471,6 +4592,33 @@ interface components {
4471
4592
  */
4472
4593
  summary?: string | null;
4473
4594
  };
4595
+ /**
4596
+ * GoalProgressDetail
4597
+ * @description Detail for one /goal acceptance-criterion verdict (step: goal_progress).
4598
+ */
4599
+ GoalProgressDetail: {
4600
+ /**
4601
+ * Criterion
4602
+ * @description Criterion id (e.g. 'c1')
4603
+ */
4604
+ criterion: string;
4605
+ /**
4606
+ * Text
4607
+ * @description Criterion text
4608
+ */
4609
+ text: string;
4610
+ /**
4611
+ * Status
4612
+ * @description Verdict for this criterion
4613
+ * @enum {string}
4614
+ */
4615
+ status: 'met' | 'unmet' | 'absent_from_corpus';
4616
+ /**
4617
+ * Note
4618
+ * @description Judge note / concrete gap for this criterion
4619
+ */
4620
+ note: string;
4621
+ };
4474
4622
  /** HTTPValidationError */
4475
4623
  HTTPValidationError: {
4476
4624
  /** Detail */
@@ -5839,6 +5987,14 @@ interface components {
5839
5987
  /** Users */
5840
5988
  users: components['schemas']['RemoveWorkspaceUserItem'][];
5841
5989
  };
5990
+ /**
5991
+ * RequestDeletionResponse
5992
+ * @description Response for POST /v1/user/request-deletion.
5993
+ */
5994
+ RequestDeletionResponse: {
5995
+ /** Detail */
5996
+ detail: string;
5997
+ };
5842
5998
  /** RequestEmailChangeRequest */
5843
5999
  RequestEmailChangeRequest: {
5844
6000
  /**
@@ -6716,8 +6872,10 @@ interface components {
6716
6872
  response_output_item_added?: components['schemas']['ResponseOutputItemAddedEvent'] | null;
6717
6873
  response_content_part_added?: components['schemas']['ResponseContentPartAddedEvent'] | null;
6718
6874
  agent_step?: components['schemas']['AgentStepEvent'] | null;
6875
+ agent_step_delta?: components['schemas']['AgentStepDeltaEvent'] | null;
6719
6876
  user_input_request?: components['schemas']['UserInputRequestEvent'] | null;
6720
6877
  user_message?: components['schemas']['UserMessageEvent'] | null;
6878
+ arbi_error?: components['schemas']['ArbiErrorEvent'] | null;
6721
6879
  response_output_text_delta?: components['schemas']['ResponseOutputTextDeltaEvent'] | null;
6722
6880
  response_output_text_done?: components['schemas']['ResponseOutputTextDoneEvent'] | null;
6723
6881
  response_output_item_done?: components['schemas']['ResponseOutputItemDoneEvent'] | null;
@@ -6743,6 +6901,7 @@ interface components {
6743
6901
  detail_ask_user?: components['schemas']['AskUserDetail'] | null;
6744
6902
  detail_evaluation?: components['schemas']['EvaluationDetail'] | null;
6745
6903
  detail_tool_progress?: components['schemas']['ToolProgressDetail'] | null;
6904
+ detail_goal_progress?: components['schemas']['GoalProgressDetail'] | null;
6746
6905
  };
6747
6906
  /**
6748
6907
  * SSOConfigResponse
@@ -9446,6 +9605,62 @@ interface operations {
9446
9605
  };
9447
9606
  };
9448
9607
  };
9608
+ admin_restore_account: {
9609
+ parameters: {
9610
+ query: {
9611
+ /** @description Email of the account to restore */
9612
+ email: string;
9613
+ };
9614
+ header?: {
9615
+ 'x-api-key'?: string;
9616
+ };
9617
+ path?: never;
9618
+ cookie?: never;
9619
+ };
9620
+ requestBody?: never;
9621
+ responses: {
9622
+ /** @description Successful Response */
9623
+ 200: {
9624
+ headers: {
9625
+ [name: string]: unknown;
9626
+ };
9627
+ content: {
9628
+ 'application/json': {
9629
+ [key: string]: unknown;
9630
+ };
9631
+ };
9632
+ };
9633
+ /** @description Validation Error */
9634
+ 422: {
9635
+ headers: {
9636
+ [name: string]: unknown;
9637
+ };
9638
+ content: {
9639
+ 'application/json': components['schemas']['HTTPValidationError'];
9640
+ };
9641
+ };
9642
+ };
9643
+ };
9644
+ request_deletion: {
9645
+ parameters: {
9646
+ query?: never;
9647
+ header?: never;
9648
+ path?: never;
9649
+ cookie?: never;
9650
+ };
9651
+ requestBody?: never;
9652
+ responses: {
9653
+ /** @description Successful Response */
9654
+ 200: {
9655
+ headers: {
9656
+ [name: string]: unknown;
9657
+ };
9658
+ content: {
9659
+ 'application/json': components['schemas']['RequestDeletionResponse'];
9660
+ };
9661
+ };
9662
+ };
9663
+ };
9449
9664
  get_products: {
9450
9665
  parameters: {
9451
9666
  query?: never;
package/dist/index.d.ts CHANGED
@@ -709,6 +709,61 @@ interface paths {
709
709
  patch?: never;
710
710
  trace?: never;
711
711
  };
712
+ '/v1/user/restore-account': {
713
+ parameters: {
714
+ query?: never;
715
+ header?: never;
716
+ path?: never;
717
+ cookie?: never;
718
+ };
719
+ get?: never;
720
+ put?: never;
721
+ /**
722
+ * Admin Restore Account
723
+ * @description Restore a soft-deleted account by clearing deleted_at and resetting token_version.
724
+ *
725
+ * Authenticated via the support API key (header ``X-API-Key``).
726
+ * After restoration the user can log in normally again.
727
+ */
728
+ post: operations['admin_restore_account'];
729
+ delete?: never;
730
+ options?: never;
731
+ head?: never;
732
+ patch?: never;
733
+ trace?: never;
734
+ };
735
+ '/v1/user/request-deletion': {
736
+ parameters: {
737
+ query?: never;
738
+ header?: never;
739
+ path?: never;
740
+ cookie?: never;
741
+ };
742
+ get?: never;
743
+ put?: never;
744
+ /**
745
+ * Request Deletion
746
+ * @description Soft-delete the calling user's account.
747
+ *
748
+ * Immediately closes the account:
749
+ * - Sets ``deleted_at = now()`` on the user row
750
+ * - Increments ``token_version`` to invalidate all existing JWT tokens
751
+ * - Deletes all active Redis sessions (logged out on all devices)
752
+ * - Sends a best-effort confirmation email
753
+ *
754
+ * Blockers (returns 422 if any apply):
755
+ * - User has an active Stripe subscription (must cancel first)
756
+ * - User is the sole admin of a workspace with other members
757
+ *
758
+ * Recovery is admin-only; there is no self-service cancel.
759
+ */
760
+ post: operations['request_deletion'];
761
+ delete?: never;
762
+ options?: never;
763
+ head?: never;
764
+ patch?: never;
765
+ trace?: never;
766
+ };
712
767
  '/v1/user/products': {
713
768
  parameters: {
714
769
  query?: never;
@@ -2215,6 +2270,43 @@ interface components {
2215
2270
  /** Session Pubkey B64 */
2216
2271
  session_pubkey_b64?: string | null;
2217
2272
  };
2273
+ /**
2274
+ * AgentStepDeltaEvent
2275
+ * @description Incremental narration for an in-progress agent step (event: arbi.agent_step_delta).
2276
+ *
2277
+ * Streamed live as the model generates its narration for a turn, BEFORE that
2278
+ * turn resolves into a tool call or an answer. The frontend appends `delta` to
2279
+ * the `focus` of the step with the matching `index` (creating a bare step if
2280
+ * that index hasn't been seen yet), giving a live play-by-play inside the
2281
+ * steps block. This channel is narration only — the final answer is delivered
2282
+ * separately and authoritatively via response.output_text.delta, never here.
2283
+ *
2284
+ * Example:
2285
+ * {"type": "arbi.agent_step_delta", "index": 2, "delta": "Searching the "}
2286
+ */
2287
+ AgentStepDeltaEvent: {
2288
+ /**
2289
+ * T
2290
+ * @description Seconds elapsed since stream start.
2291
+ */
2292
+ t?: number | null;
2293
+ /**
2294
+ * Type
2295
+ * @default arbi.agent_step_delta
2296
+ * @constant
2297
+ */
2298
+ type: 'arbi.agent_step_delta';
2299
+ /**
2300
+ * Index
2301
+ * @description Step index this narration belongs to (matches AgentStepEvent.index).
2302
+ */
2303
+ index: number;
2304
+ /**
2305
+ * Delta
2306
+ * @description Incremental focus/narration text to append to the step.
2307
+ */
2308
+ delta: string;
2309
+ };
2218
2310
  /**
2219
2311
  * AgentStepEvent
2220
2312
  * @description A single agent step with a sequential index.
@@ -2275,19 +2367,14 @@ interface components {
2275
2367
  index: number;
2276
2368
  /**
2277
2369
  * Step
2278
- * @description Lifecycle step (planning, answering, reviewing). Absent for tool calls.
2370
+ * @description Lifecycle step. Absent (None) for tool-call steps, which carry `detail` instead.
2279
2371
  */
2280
- step?: string | null;
2372
+ step?: ('goal' | 'skill' | 'planning' | 'tool_progress' | 'goal_progress' | 'answering' | 'reviewing' | 'evaluation') | null;
2281
2373
  /**
2282
2374
  * Label
2283
2375
  * @description Display label for the step. Backend-driven, no frontend mapping needed.
2284
2376
  */
2285
2377
  label?: string | null;
2286
- /**
2287
- * Icon
2288
- * @description Lucide icon name for the step (e.g. 'search'). Backend-driven, no frontend mapping needed.
2289
- */
2290
- icon?: string | null;
2291
2378
  /**
2292
2379
  * Focus
2293
2380
  * @description Agent's current focus (single sentence). Present on tool call steps.
@@ -2368,6 +2455,12 @@ interface components {
2368
2455
  * @default false
2369
2456
  */
2370
2457
  PLANNING_ENABLED: boolean;
2458
+ /**
2459
+ * Deep Research Enabled
2460
+ * @description Include the deep_research tool so the agent can delegate a focused research topic to a nested retrieval sub-agent (document + web search), keeping the main context clean while citations from the sub-agent's sources flow back.
2461
+ * @default false
2462
+ */
2463
+ DEEP_RESEARCH_ENABLED: boolean;
2371
2464
  /**
2372
2465
  * Suggested Queries
2373
2466
  * @description Generate a single suggested follow-up query after each response.
@@ -2422,18 +2515,6 @@ interface components {
2422
2515
  * @default false
2423
2516
  */
2424
2517
  GOALS_ENABLED: boolean;
2425
- /**
2426
- * Goal Loop
2427
- * @description Transient flag set by the /goal command (only when GOALS_ENABLED). When True, the agent runs inside a Ralph loop: PlanningLLM authors a frozen acceptance checklist, the agent works it to completion, and after each pass ReviewLLM grades every criterion. The loop stops when all criteria are met, or after GOAL_MAX_OUTER_LOOPS passes.
2428
- * @default false
2429
- */
2430
- GOAL_LOOP: boolean;
2431
- /**
2432
- * Goal Text
2433
- * @description Transient objective set by the /goal command — the goal the Ralph loop drives toward.
2434
- * @default
2435
- */
2436
- GOAL_TEXT: string;
2437
2518
  /**
2438
2519
  * Goal Max Outer Loops
2439
2520
  * @description Maximum number of outer Ralph-loop passes before the loop stops and returns its best answer, even if the goal judge has not declared the goal satisfied.
@@ -2506,7 +2587,7 @@ interface components {
2506
2587
  * @description System prompt for the agent. Dynamic context is appended automatically.
2507
2588
  * @default Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.
2508
2589
  *
2509
- * IMPORTANT: Never say "I don't have information in the available documents" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user asks about a specific workspace document, call read_document or get_table_of_contents — never answer from memory.
2590
+ * IMPORTANT: Never say "I don't have information in the available documents" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user's question may be answered by workspace documents, call search_inside_documents, read_document, or get_table_of_contents — never answer from memory.
2510
2591
  *
2511
2592
  * When using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.
2512
2593
  *
@@ -2531,8 +2612,8 @@ interface components {
2531
2612
  *
2532
2613
  * TOOL CALLING:
2533
2614
  * - Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.
2534
- * - Always invoke tools using the tool-calling mechanism. NEVER write text that describes or simulates a tool call (e.g. never write "Searching for X...", "Reading document Y...", "Calling search_inside_documents" as prose actually call the tool).
2535
- * - If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.
2615
+ * - Always invoke tools using the tool-calling mechanism. A short note about what you're doing is welcome and helps the user follow along — but it must accompany an actual tool call in the same turn; it is never a substitute for one. Writing "Searching for X..." or "Reading document Y..." and stopping there, with no tool call emitted, leaves the work undone.
2616
+ * - If you intend to search or read, issue the tool call in that same turn.
2536
2617
  *
2537
2618
  * EFFICIENCY:
2538
2619
  * 1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.
@@ -2589,6 +2670,7 @@ interface components {
2589
2670
  * },
2590
2671
  * "MCP_TOOLS": [],
2591
2672
  * "PLANNING_ENABLED": false,
2673
+ * "DEEP_RESEARCH_ENABLED": false,
2592
2674
  * "SUGGESTED_QUERIES": false,
2593
2675
  * "ARTIFACTS_ENABLED": false,
2594
2676
  * "VISION_ENABLED": false,
@@ -2598,8 +2680,6 @@ interface components {
2598
2680
  * "SKILL_CREATION": false,
2599
2681
  * "MEMORY_CREATION": false,
2600
2682
  * "GOALS_ENABLED": false,
2601
- * "GOAL_LOOP": false,
2602
- * "GOAL_TEXT": "",
2603
2683
  * "GOAL_MAX_OUTER_LOOPS": 6,
2604
2684
  * "REVIEW_ENABLED": false,
2605
2685
  * "PERSONA": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.",
@@ -2611,7 +2691,7 @@ interface components {
2611
2691
  * "AGENT_MAX_ITERATIONS": 20,
2612
2692
  * "AGENT_MAX_PARALLEL_TOOL_CALLS": 10,
2613
2693
  * "AGENT_HISTORY_CHAR_THRESHOLD": 8000,
2614
- * "AGENT_SYSTEM_PROMPT": "Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.\n\nIMPORTANT: Never say \"I don't have information in the available documents\" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user asks about a specific workspace document, call read_document or get_table_of_contents — never answer from memory.\n\nWhen using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.\n\nDOCUMENT INDEX:\nThe \"Workspace Documents\" table in your system prompt already lists every document with its Id, Title, Date, Pages, and Subject. Use this table directly when the user asks to list, catalogue, or tabulate documents — do NOT call any tools for that. Only use tools when you need to read or search document content.\n\nDOCUMENT STRATEGY:\n- For listing/cataloguing documents: use the document index already in your prompt — no tool calls needed.\n- For overview/summary requests: use get_table_of_contents first, then read key sections with read_document.\n- For specific questions: use search_inside_documents to find relevant sections, then read those sections with read_document.\n- For translation, deep analysis, or detailed summaries of a single document: use read_document with no ranges to load the complete text.\n- For extracting structured findings from passages: use read_document with digest=true or search_inside_documents with digest=true.\n- Never search for meta-queries like \"summary\", \"overview\", or \"all documents\" — search for the actual subject matter.\n\nFORMATTING:\n- Start your answer directly with the content — never open with a description of what you searched for or read (e.g. never write \"Searching for X\", \"Reading Y\", \"I found Z documents\" as the first lines of an answer).\n- Use markdown: headings, bold, bullet points, numbered lists\n- Main conclusion first, followed by supporting points\n- Bullet points for lists of discrete items\n- Numbering for sequential steps or prioritized items\n- Bold text for critical conclusions or decision points\n\nTOOL CALLING:\n- Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.\n- Always invoke tools using the tool-calling mechanism. NEVER write text that describes or simulates a tool call (e.g. never write \"Searching for X...\", \"Reading document Y...\", \"Calling search_inside_documents\" as prose actually call the tool).\n- If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.\n\nEFFICIENCY:\n1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.\n2. Call multiple tools in parallel when a query has several aspects.\n3. NEVER repeat a tool call with the same arguments.\n4. Use targeted queries and narrow page ranges per retrieval call.\n5. Stop when you have sufficient evidence — do not over-research."
2694
+ * "AGENT_SYSTEM_PROMPT": "Answer any question the user asks. You have access to workspace documents — use them when relevant. When no documents are relevant, answer from your own knowledge. Always provide a helpful answer.\n\nIMPORTANT: Never say \"I don't have information in the available documents\" or refuse to answer. If documents are not relevant, just answer the question directly from your own knowledge. If the user's question may be answered by workspace documents, call search_inside_documents, read_document, or get_table_of_contents — never answer from memory.\n\nWhen using documents, retrieve actual document content — do not rely on metadata or headings alone. Cross-check information across sources. Not all assertions in sources are factual — some are arguments by a party. Attribute claims to their source where parties disagree.\n\nDOCUMENT INDEX:\nThe \"Workspace Documents\" table in your system prompt already lists every document with its Id, Title, Date, Pages, and Subject. Use this table directly when the user asks to list, catalogue, or tabulate documents — do NOT call any tools for that. Only use tools when you need to read or search document content.\n\nDOCUMENT STRATEGY:\n- For listing/cataloguing documents: use the document index already in your prompt — no tool calls needed.\n- For overview/summary requests: use get_table_of_contents first, then read key sections with read_document.\n- For specific questions: use search_inside_documents to find relevant sections, then read those sections with read_document.\n- For translation, deep analysis, or detailed summaries of a single document: use read_document with no ranges to load the complete text.\n- For extracting structured findings from passages: use read_document with digest=true or search_inside_documents with digest=true.\n- Never search for meta-queries like \"summary\", \"overview\", or \"all documents\" — search for the actual subject matter.\n\nFORMATTING:\n- Start your answer directly with the content — never open with a description of what you searched for or read (e.g. never write \"Searching for X\", \"Reading Y\", \"I found Z documents\" as the first lines of an answer).\n- Use markdown: headings, bold, bullet points, numbered lists\n- Main conclusion first, followed by supporting points\n- Bullet points for lists of discrete items\n- Numbering for sequential steps or prioritized items\n- Bold text for critical conclusions or decision points\n\nTOOL CALLING:\n- Your job is to gather context by calling tools, then answer only once every reasonable tool call has been made. Do not give a final answer while there is still relevant context you could retrieve.\n- Always invoke tools using the tool-calling mechanism. A short note about what you're doing is welcome and helps the user follow along — but it must accompany an actual tool call in the same turn; it is never a substitute for one. Writing \"Searching for X...\" or \"Reading document Y...\" and stopping there, with no tool call emitted, leaves the work undone.\n- If you intend to search or read, issue the tool call in that same turn.\n\nEFFICIENCY:\n1. Before each step, review the results of prior steps. Adapt your approach based on what you learned — if a call was rejected or returned poor results, adjust your strategy.\n2. Call multiple tools in parallel when a query has several aspects.\n3. NEVER repeat a tool call with the same arguments.\n4. Use targeted queries and narrow page ranges per retrieval call.\n5. Stop when you have sufficient evidence — do not over-research."
2615
2695
  * }
2616
2696
  */
2617
2697
  Agents: components['schemas']['AgentsConfig'];
@@ -2791,7 +2871,7 @@ interface components {
2791
2871
  * @default {
2792
2872
  * "API_TYPE": "remote",
2793
2873
  * "ENABLE_THINKING": true,
2794
- * "MODEL_NAME": "GLM5@Fireworks",
2874
+ * "MODEL_NAME": "Premium",
2795
2875
  * "SYSTEM_INSTRUCTION": "You are a code execution agent. You write and run code to accomplish tasks.\n\nYou have access to an execute_code tool that runs code in a sandboxed Docker container.\n\nThe sandbox has:\n- Python 3.12 with numpy, pandas, matplotlib, requests, beautifulsoup4,\n httpx, pillow, sympy, pyyaml (plus uv for installing more)\n- Node.js 22 with TypeScript (ts-node) and npm\n- Bash with git, curl, wget, jq, sqlite3, build-essential\n- Network access (can pip/npm install additional packages)\n\nInstructions:\n1. Write clean, correct code to accomplish the user's task\n2. Always call execute_code to run your code — never guess the output\n3. If execution errors, analyze the traceback, fix the code, and retry\n4. Once you have the correct output, respond with ONLY the final result\n\nKeep code simple and direct. Prefer Python unless the task specifically requires another language.",
2796
2876
  * "TEMPERATURE": 0.2,
2797
2877
  * "MAX_TOKENS": 8000,
@@ -2923,6 +3003,47 @@ interface components {
2923
3003
  */
2924
3004
  last_input_tokens: number;
2925
3005
  };
3006
+ /**
3007
+ * ArbiErrorEvent
3008
+ * @description ``arbi.error`` — a structured mid-stream error (e.g. AI-quota exceeded).
3009
+ *
3010
+ * Flat payload so the client can branch on ``code`` (e.g. QUOTA_EXCEEDED →
3011
+ * upgrade modal) without unwrapping, instead of treating it as a retryable
3012
+ * ``response.failed``. Accumulated for GET-poll reconnects.
3013
+ */
3014
+ ArbiErrorEvent: {
3015
+ /**
3016
+ * Type
3017
+ * @default arbi.error
3018
+ * @constant
3019
+ */
3020
+ type: 'arbi.error';
3021
+ /**
3022
+ * Code
3023
+ * @description Error code, e.g. 'QUOTA_EXCEEDED'
3024
+ */
3025
+ code: string;
3026
+ /**
3027
+ * Message
3028
+ * @description Human-readable error message
3029
+ */
3030
+ message: string;
3031
+ /**
3032
+ * Spend
3033
+ * @description Current spend in USD (QUOTA_EXCEEDED)
3034
+ */
3035
+ spend?: number | null;
3036
+ /**
3037
+ * Budget
3038
+ * @description Budget cap in USD (QUOTA_EXCEEDED)
3039
+ */
3040
+ budget?: number | null;
3041
+ /**
3042
+ * Project Ext Id
3043
+ * @description Affected project external id (QUOTA_EXCEEDED)
3044
+ */
3045
+ project_ext_id?: string | null;
3046
+ };
2926
3047
  /**
2927
3048
  * ArtifactEvent
2928
3049
  * @description A generated artifact (document/draft) for the artifact panel.
@@ -3278,7 +3399,7 @@ interface components {
3278
3399
  /**
3279
3400
  * Model Name
3280
3401
  * @description Model for code generation. Should be a strong coding model.
3281
- * @default GLM5@Fireworks
3402
+ * @default Premium
3282
3403
  */
3283
3404
  MODEL_NAME: string;
3284
3405
  /**
@@ -4471,6 +4592,33 @@ interface components {
4471
4592
  */
4472
4593
  summary?: string | null;
4473
4594
  };
4595
+ /**
4596
+ * GoalProgressDetail
4597
+ * @description Detail for one /goal acceptance-criterion verdict (step: goal_progress).
4598
+ */
4599
+ GoalProgressDetail: {
4600
+ /**
4601
+ * Criterion
4602
+ * @description Criterion id (e.g. 'c1')
4603
+ */
4604
+ criterion: string;
4605
+ /**
4606
+ * Text
4607
+ * @description Criterion text
4608
+ */
4609
+ text: string;
4610
+ /**
4611
+ * Status
4612
+ * @description Verdict for this criterion
4613
+ * @enum {string}
4614
+ */
4615
+ status: 'met' | 'unmet' | 'absent_from_corpus';
4616
+ /**
4617
+ * Note
4618
+ * @description Judge note / concrete gap for this criterion
4619
+ */
4620
+ note: string;
4621
+ };
4474
4622
  /** HTTPValidationError */
4475
4623
  HTTPValidationError: {
4476
4624
  /** Detail */
@@ -5839,6 +5987,14 @@ interface components {
5839
5987
  /** Users */
5840
5988
  users: components['schemas']['RemoveWorkspaceUserItem'][];
5841
5989
  };
5990
+ /**
5991
+ * RequestDeletionResponse
5992
+ * @description Response for POST /v1/user/request-deletion.
5993
+ */
5994
+ RequestDeletionResponse: {
5995
+ /** Detail */
5996
+ detail: string;
5997
+ };
5842
5998
  /** RequestEmailChangeRequest */
5843
5999
  RequestEmailChangeRequest: {
5844
6000
  /**
@@ -6716,8 +6872,10 @@ interface components {
6716
6872
  response_output_item_added?: components['schemas']['ResponseOutputItemAddedEvent'] | null;
6717
6873
  response_content_part_added?: components['schemas']['ResponseContentPartAddedEvent'] | null;
6718
6874
  agent_step?: components['schemas']['AgentStepEvent'] | null;
6875
+ agent_step_delta?: components['schemas']['AgentStepDeltaEvent'] | null;
6719
6876
  user_input_request?: components['schemas']['UserInputRequestEvent'] | null;
6720
6877
  user_message?: components['schemas']['UserMessageEvent'] | null;
6878
+ arbi_error?: components['schemas']['ArbiErrorEvent'] | null;
6721
6879
  response_output_text_delta?: components['schemas']['ResponseOutputTextDeltaEvent'] | null;
6722
6880
  response_output_text_done?: components['schemas']['ResponseOutputTextDoneEvent'] | null;
6723
6881
  response_output_item_done?: components['schemas']['ResponseOutputItemDoneEvent'] | null;
@@ -6743,6 +6901,7 @@ interface components {
6743
6901
  detail_ask_user?: components['schemas']['AskUserDetail'] | null;
6744
6902
  detail_evaluation?: components['schemas']['EvaluationDetail'] | null;
6745
6903
  detail_tool_progress?: components['schemas']['ToolProgressDetail'] | null;
6904
+ detail_goal_progress?: components['schemas']['GoalProgressDetail'] | null;
6746
6905
  };
6747
6906
  /**
6748
6907
  * SSOConfigResponse
@@ -9446,6 +9605,62 @@ interface operations {
9446
9605
  };
9447
9606
  };
9448
9607
  };
9608
+ admin_restore_account: {
9609
+ parameters: {
9610
+ query: {
9611
+ /** @description Email of the account to restore */
9612
+ email: string;
9613
+ };
9614
+ header?: {
9615
+ 'x-api-key'?: string;
9616
+ };
9617
+ path?: never;
9618
+ cookie?: never;
9619
+ };
9620
+ requestBody?: never;
9621
+ responses: {
9622
+ /** @description Successful Response */
9623
+ 200: {
9624
+ headers: {
9625
+ [name: string]: unknown;
9626
+ };
9627
+ content: {
9628
+ 'application/json': {
9629
+ [key: string]: unknown;
9630
+ };
9631
+ };
9632
+ };
9633
+ /** @description Validation Error */
9634
+ 422: {
9635
+ headers: {
9636
+ [name: string]: unknown;
9637
+ };
9638
+ content: {
9639
+ 'application/json': components['schemas']['HTTPValidationError'];
9640
+ };
9641
+ };
9642
+ };
9643
+ };
9644
+ request_deletion: {
9645
+ parameters: {
9646
+ query?: never;
9647
+ header?: never;
9648
+ path?: never;
9649
+ cookie?: never;
9650
+ };
9651
+ requestBody?: never;
9652
+ responses: {
9653
+ /** @description Successful Response */
9654
+ 200: {
9655
+ headers: {
9656
+ [name: string]: unknown;
9657
+ };
9658
+ content: {
9659
+ 'application/json': components['schemas']['RequestDeletionResponse'];
9660
+ };
9661
+ };
9662
+ };
9663
+ };
9449
9664
  get_products: {
9450
9665
  parameters: {
9451
9666
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.78",
3
+ "version": "0.3.79",
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",