@arbidocs/client 0.3.58 → 0.3.60

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
@@ -534,6 +534,83 @@ interface paths {
534
534
  patch?: never;
535
535
  trace?: never;
536
536
  };
537
+ '/v1/user/profile': {
538
+ parameters: {
539
+ query?: never;
540
+ header?: never;
541
+ path?: never;
542
+ cookie?: never;
543
+ };
544
+ get?: never;
545
+ put?: never;
546
+ post?: never;
547
+ delete?: never;
548
+ options?: never;
549
+ head?: never;
550
+ /**
551
+ * Update Profile
552
+ * @description Update user's display profile (given_name, family_name, picture).
553
+ *
554
+ * Pass an empty string to clear family_name or picture; null means "leave unchanged".
555
+ */
556
+ patch: operations['update_profile'];
557
+ trace?: never;
558
+ };
559
+ '/v1/user/request-email-change': {
560
+ parameters: {
561
+ query?: never;
562
+ header?: never;
563
+ path?: never;
564
+ cookie?: never;
565
+ };
566
+ get?: never;
567
+ put?: never;
568
+ /**
569
+ * Request Email Change
570
+ * @description Send a verification code to the new email address.
571
+ *
572
+ * SSO users cannot change their email here — Auth0 with account linking
573
+ * makes the semantics ambiguous (which linked identity? what about social
574
+ * providers that own the email upstream?). They change it at their IdP and
575
+ * /sso-status syncs it on next login.
576
+ *
577
+ * The code is generated deterministically from (new_email, current_user.external_id)
578
+ * so that only this user can complete the change.
579
+ */
580
+ post: operations['request_email_change'];
581
+ delete?: never;
582
+ options?: never;
583
+ head?: never;
584
+ patch?: never;
585
+ trace?: never;
586
+ };
587
+ '/v1/user/confirm-email-change': {
588
+ parameters: {
589
+ query?: never;
590
+ header?: never;
591
+ path?: never;
592
+ cookie?: never;
593
+ };
594
+ get?: never;
595
+ put?: never;
596
+ /**
597
+ * Confirm Email Change
598
+ * @description Confirm email change with verification code.
599
+ *
600
+ * Verifies the 3-word code, then atomically updates:
601
+ * 1. users.email
602
+ * 2. contacts.contact_email (all references to old email)
603
+ * 3. Stripe customer email (fire-and-forget)
604
+ *
605
+ * SSO users are blocked — see /request-email-change for rationale.
606
+ */
607
+ post: operations['confirm_email_change'];
608
+ delete?: never;
609
+ options?: never;
610
+ head?: never;
611
+ patch?: never;
612
+ trace?: never;
613
+ };
537
614
  '/v1/user/settings': {
538
615
  parameters: {
539
616
  query?: never;
@@ -1129,6 +1206,11 @@ interface paths {
1129
1206
  *
1130
1207
  * Returns 202 Accepted immediately - processing happens in background.
1131
1208
  * WebSocket notification sent when complete.
1209
+ *
1210
+ * Pre-checks the project's AI budget against LiteLLM and rejects with
1211
+ * 402 ``QUOTA_EXCEEDED`` before kicking off background work — these
1212
+ * docs are already indexed/completed, so we can't surface mid-flight
1213
+ * failures via the per-doc status path that the upload pipeline uses.
1132
1214
  */
1133
1215
  post: operations['generate_doctags'];
1134
1216
  delete?: never;
@@ -2081,7 +2163,7 @@ interface components {
2081
2163
  /**
2082
2164
  * Skills Enabled
2083
2165
  * @description Enable the skills system: /skill (create) and /<skill-name> (invoke) commands.
2084
- * @default false
2166
+ * @default true
2085
2167
  */
2086
2168
  SKILLS_ENABLED: boolean;
2087
2169
  /**
@@ -2090,6 +2172,12 @@ interface components {
2090
2172
  * @default false
2091
2173
  */
2092
2174
  SKILL_CREATION: boolean;
2175
+ /**
2176
+ * Memory Creation
2177
+ * @description Transient flag set by /setup command to enable the save_memory agent tool (authors the per-workspace practice-profile memory document).
2178
+ * @default false
2179
+ */
2180
+ MEMORY_CREATION: boolean;
2093
2181
  /**
2094
2182
  * Review Enabled
2095
2183
  * @description Enable ReviewLLM to review agent draft answers against source material before sending to the user. Uses the reasoning model for higher quality.
@@ -2117,8 +2205,8 @@ interface components {
2117
2205
  AGENT_API_TYPE: 'local' | 'remote';
2118
2206
  /**
2119
2207
  * Llm Agent Temperature
2120
- * @description Temperature value for agent LLM.
2121
- * @default 1
2208
+ * @description Temperature value for agent LLM. 0.6 matches the value recommended upstream for Qwen3-27B-AWQ-INT4 with thinking enabled. Higher values (we used to default to 1.0) cause the model to drift from the canonical tool-call grammar under complex agent contexts, producing malformed XML / JSON that vLLM's tool-call parser cannot extract — measured 20% tool-call success at temp=1.0 vs 100% at temp=0.6 on the same 20-run hard-tool-required test.
2209
+ * @default 0.6
2122
2210
  */
2123
2211
  LLM_AGENT_TEMPERATURE: number;
2124
2212
  /**
@@ -2156,7 +2244,7 @@ interface components {
2156
2244
  * @description System prompt for the agent. Dynamic context is appended automatically.
2157
2245
  * @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.
2158
2246
  *
2159
- * 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.
2247
+ * 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.
2160
2248
  *
2161
2249
  * 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.
2162
2250
  *
@@ -2179,6 +2267,10 @@ interface components {
2179
2267
  * - Numbering for sequential steps or prioritized items
2180
2268
  * - Bold text for critical conclusions or decision points
2181
2269
  *
2270
+ * TOOL CALLING:
2271
+ * - 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).
2272
+ * - If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.
2273
+ *
2182
2274
  * EFFICIENCY:
2183
2275
  * 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.
2184
2276
  * 2. Call multiple tools in parallel when a query has several aspects.
@@ -2239,19 +2331,20 @@ interface components {
2239
2331
  * "VISION_ENABLED": false,
2240
2332
  * "PERSONAL_AGENT": false,
2241
2333
  * "MEMORY_ENABLED": false,
2242
- * "SKILLS_ENABLED": false,
2334
+ * "SKILLS_ENABLED": true,
2243
2335
  * "SKILL_CREATION": false,
2336
+ * "MEMORY_CREATION": false,
2244
2337
  * "REVIEW_ENABLED": false,
2245
2338
  * "PERSONA": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.",
2246
2339
  * "AGENT_MODEL_NAME": "auto",
2247
2340
  * "AGENT_API_TYPE": "remote",
2248
- * "LLM_AGENT_TEMPERATURE": 1,
2341
+ * "LLM_AGENT_TEMPERATURE": 0.6,
2249
2342
  * "AGENT_MAX_TOKENS": 10000,
2250
2343
  * "ENABLE_THINKING": false,
2251
2344
  * "AGENT_MAX_ITERATIONS": 20,
2252
2345
  * "AGENT_MAX_PARALLEL_TOOL_CALLS": 10,
2253
2346
  * "AGENT_HISTORY_CHAR_THRESHOLD": 8000,
2254
- * "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.\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\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."
2347
+ * "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- 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."
2255
2348
  * }
2256
2349
  */
2257
2350
  Agents: components['schemas']['AgentsConfig'];
@@ -2261,7 +2354,7 @@ interface components {
2261
2354
  * "ENABLE_THINKING": false,
2262
2355
  * "MODEL_NAME": "Fast",
2263
2356
  * "SYSTEM_INSTRUCTION": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.Be concise. Use markdown where it helps readability. Cross-check information across sources before answering. Never fabricate facts. Not all assertions in the sources are factual — some are arguments by a party. Attribute claims to their source, especially where parties disagree.",
2264
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2357
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2265
2358
  * "TEMPERATURE": 0.1,
2266
2359
  * "MAX_TOKENS": 5000
2267
2360
  * }
@@ -2275,7 +2368,7 @@ interface components {
2275
2368
  * "SYSTEM_INSTRUCTION": "You are reviewing a draft answer prepared by a research agent. The draft was written based on summaries, but you now have access to the full source material.\n\nYour task:\n1. Review the draft answer against the source material provided\n2. Verify claims are supported by the sources\n3. Correct any inaccuracies or unsupported statements\n4. Add any important details from the sources that were missed\n5. Maintain formal, objective tone appropriate for professional contexts\n\nIf information is not found in the sources but the draft answer is based on web search results or general knowledge, preserve it and ensure it is clearly labelled as such. Only flag missing source support for claims that purport to come from the documents.\nDo not add inline citation markers - the system handles citations automatically.",
2276
2369
  * "TEMPERATURE": 0.1,
2277
2370
  * "MAX_TOKENS": 5000,
2278
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000
2371
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000
2279
2372
  * }
2280
2373
  */
2281
2374
  ReviewLLM: components['schemas']['ReviewLLMConfig'];
@@ -2287,7 +2380,7 @@ interface components {
2287
2380
  * "SYSTEM_INSTRUCTION": "You are a chunk evaluator. Analyze retrieved chunks to determine which are relevant to the user's query and extract key learnings from the RELEVANT chunks only. You must return your response as valid JSON matching the provided schema.",
2288
2381
  * "TEMPERATURE": 0.1,
2289
2382
  * "MAX_TOKENS": 20000,
2290
- * "MAX_CHAR_SIZE_TO_ANSWER": 100000
2383
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000
2291
2384
  * }
2292
2385
  */
2293
2386
  EvaluatorLLM: components['schemas']['EvaluatorLLMConfig'];
@@ -2297,7 +2390,7 @@ interface components {
2297
2390
  * "ENABLE_THINKING": false,
2298
2391
  * "MODEL_NAME": "Fast",
2299
2392
  * "SYSTEM_INSTRUCTION": "You are a title generator that creates concise, descriptive titles.\n\nOutput the title as plain text only. Do not use Markdown or any other formatting. Specifically:\n- Do not bold, italicize, or otherwise emphasize any part of the title.\n- Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n- Do not prefix the title with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n- Do not wrap the title in quotes or brackets.",
2300
- * "MAX_CHAR_SIZE_TO_ANSWER": 50,
2393
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 20,
2301
2394
  * "TEMPERATURE": 0.3,
2302
2395
  * "MAX_TOKENS": 20
2303
2396
  * }
@@ -2311,7 +2404,7 @@ interface components {
2311
2404
  * "SYSTEM_INSTRUCTION": "You are a conversation summariser. Condense the conversation history into a concise summary that preserves:\n- Key decisions and conclusions reached\n- Specific names, dates, numbers, and document references\n- Open questions and unresolved items\n- The user's goals and constraints\n\nWrite in past tense, third person. Be specific, not vague. Do not omit important details in favour of brevity.",
2312
2405
  * "TEMPERATURE": 0.1,
2313
2406
  * "MAX_TOKENS": 2000,
2314
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2407
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2315
2408
  * "COMPACTION_THRESHOLD_TOKENS": 0,
2316
2409
  * "COMPACTION_KEEP_RECENT": 4
2317
2410
  * }
@@ -2323,7 +2416,7 @@ interface components {
2323
2416
  * "ENABLE_THINKING": false,
2324
2417
  * "MODEL_NAME": "Fast",
2325
2418
  * "SYSTEM_INSTRUCTION": "You are a document analysis assistant. Answer questions based strictly on document content.\n\nGuidelines:\n- Only use information explicitly stated in the document\n- Do not infer or assume information not present\n- If information is not found, respond with \"Information not found in document.\"\n- Follow format instructions exactly for each answer\n- Be concise and precise\n- Output answers as plain text only. Do not use Markdown or any other formatting:\n - Do not bold, italicize, or otherwise emphasize any part of the answer.\n - Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n - Do not prefix answers with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n - Write multi-point answers as flowing sentences, not as a list.",
2326
- * "MAX_CHAR_CONTEXT_TO_ANSWER": 100000,
2419
+ * "MAX_TOKEN_CONTEXT_TO_ANSWER": 200000,
2327
2420
  * "TEMPERATURE": 0.1,
2328
2421
  * "MAX_TOKENS": 2000,
2329
2422
  * "MAX_CONCURRENT_DOCS": 10,
@@ -2386,7 +2479,7 @@ interface components {
2386
2479
  * "SYSTEM_INSTRUCTION": "You are a knowledge synthesizer. You receive the full agent scratchpad from a completed conversation and decide what, if anything, is worth saving.\n\n## Work Product Types\n- **\"memory\"**: Facts, findings, reference data — for *looking up* information.\n- **\"skill\"**: Procedures, workflows, step-by-step instructions — for *doing* something.\n\nWhen ambiguous, default to memory.\n\n## Rules\n- Return an empty work_products array if the conversation is trivial or produced nothing substantive.\n- Each work product must cover ONE coherent topic. Never combine disparate subjects into a single document — create separate documents for each distinct topic.\n- Ground everything in the provided context. Do not invent information.\n- Be concise. These are reference documents, not essays.\n\n## Output Format\nJSON with a `work_products` array. Each item has `wp_type`, `title`, and `content` (markdown).\n\nMemory content: `# Title`, date, source, key findings as bullets, source documents.\nSkill content: `# Title`, prerequisites, numbered steps, when to apply.",
2387
2480
  * "TEMPERATURE": 0.3,
2388
2481
  * "MAX_TOKENS": 8000,
2389
- * "MAX_CHAR_CONTEXT": 100000,
2482
+ * "MAX_TOKEN_CONTEXT": 200000,
2390
2483
  * "MAX_CONCURRENT": 5
2391
2484
  * }
2392
2485
  */
@@ -2399,7 +2492,7 @@ interface components {
2399
2492
  * "SYSTEM_INSTRUCTION": "You are a research planning assistant. Your job is to analyze a user query and produce a concise, numbered research plan.\n\nYou have access to a workspace of documents. The available tools for executing the plan are:\n- search_inside_documents: Search workspace documents for relevant passages (semantic, keyword, or hybrid). Use digest=true to extract learnings.\n- read_document: Read page ranges or entire documents. Use digest=true to extract learnings with citations.\n- get_table_of_contents: Get document headings with page references\n\nConsider:\n- What information is needed to answer the query\n- Which documents are likely relevant based on the document index\n- What search queries and document passages to examine\n- What order of operations will be most efficient\n- Whether parallel searches can be used for different aspects\n\nRespond with ONLY the plan (numbered steps). Do not execute any steps.",
2400
2493
  * "TEMPERATURE": 0.3,
2401
2494
  * "MAX_TOKENS": 4000,
2402
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2495
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2403
2496
  * "APPROVAL_TIMEOUT": 0
2404
2497
  * }
2405
2498
  */
@@ -3059,6 +3152,23 @@ interface components {
3059
3152
  /** Confirm Email */
3060
3153
  confirm_email: string;
3061
3154
  };
3155
+ /** ConfirmEmailChangeRequest */
3156
+ ConfirmEmailChangeRequest: {
3157
+ /**
3158
+ * New Email
3159
+ * Format: email
3160
+ */
3161
+ new_email: string;
3162
+ /** Verification Code */
3163
+ verification_code: string;
3164
+ };
3165
+ /** ConfirmEmailChangeResponse */
3166
+ ConfirmEmailChangeResponse: {
3167
+ /** Detail */
3168
+ detail: string;
3169
+ /** Email */
3170
+ email: string;
3171
+ };
3062
3172
  /**
3063
3173
  * ConnectionClosedMessage
3064
3174
  * @description Sent when connection is closed (e.g., another tab opened).
@@ -3457,6 +3567,8 @@ interface components {
3457
3567
  status?: string | null;
3458
3568
  /** Error Message */
3459
3569
  error_message?: string | null;
3570
+ /** Failed Stage */
3571
+ failed_stage?: string | null;
3460
3572
  /** N Pages */
3461
3573
  n_pages?: number | null;
3462
3574
  /** N Chunks */
@@ -3633,11 +3745,11 @@ interface components {
3633
3745
  */
3634
3746
  SYSTEM_INSTRUCTION: string;
3635
3747
  /**
3636
- * Max Char Context To Answer
3637
- * @description Maximum characters in document for context.
3638
- * @default 100000
3748
+ * Max Token Context To Answer
3749
+ * @description Maximum input tokens in document for context.
3750
+ * @default 200000
3639
3751
  */
3640
- MAX_CHAR_CONTEXT_TO_ANSWER: number;
3752
+ MAX_TOKEN_CONTEXT_TO_ANSWER: number;
3641
3753
  /**
3642
3754
  * Temperature
3643
3755
  * @description Temperature for factual answers.
@@ -3800,11 +3912,11 @@ interface components {
3800
3912
  */
3801
3913
  MAX_TOKENS: number;
3802
3914
  /**
3803
- * Max Char Size To Answer
3804
- * @description Maximum character size for evaluation context.
3805
- * @default 100000
3915
+ * Max Token Size To Answer
3916
+ * @description Maximum input token size for evaluation context.
3917
+ * @default 200000
3806
3918
  */
3807
- MAX_CHAR_SIZE_TO_ANSWER: number;
3919
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
3808
3920
  };
3809
3921
  /**
3810
3922
  * FileDeleteResponse
@@ -4241,11 +4353,11 @@ interface components {
4241
4353
  */
4242
4354
  MAX_TOKENS: number;
4243
4355
  /**
4244
- * Max Char Context
4245
- * @description Maximum characters of input context.
4246
- * @default 100000
4356
+ * Max Token Context
4357
+ * @description Maximum tokens of input context.
4358
+ * @default 200000
4247
4359
  */
4248
- MAX_CHAR_CONTEXT: number;
4360
+ MAX_TOKEN_CONTEXT: number;
4249
4361
  /**
4250
4362
  * Max Concurrent
4251
4363
  * @description Maximum concurrent synthesis operations.
@@ -4931,11 +5043,11 @@ interface components {
4931
5043
  */
4932
5044
  MAX_TOKENS: number;
4933
5045
  /**
4934
- * Max Char Size To Answer
4935
- * @description Maximum character size for planning context.
5046
+ * Max Token Size To Answer
5047
+ * @description Maximum input token size for planning context.
4936
5048
  * @default 200000
4937
5049
  */
4938
- MAX_CHAR_SIZE_TO_ANSWER: number;
5050
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
4939
5051
  /**
4940
5052
  * Approval Timeout
4941
5053
  * @description Seconds to wait for user approval after generating the plan. 0 = no approval (auto-proceed). Safe for non-interactive contexts.
@@ -5252,11 +5364,11 @@ interface components {
5252
5364
  */
5253
5365
  SYSTEM_INSTRUCTION: string;
5254
5366
  /**
5255
- * Max Char Size To Answer
5256
- * @description Maximum character size to answer.
5367
+ * Max Token Size To Answer
5368
+ * @description Maximum input token size to answer.
5257
5369
  * @default 200000
5258
5370
  */
5259
- MAX_CHAR_SIZE_TO_ANSWER: number;
5371
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
5260
5372
  /**
5261
5373
  * Temperature
5262
5374
  * @description Temperature value for randomness.
@@ -5392,6 +5504,19 @@ interface components {
5392
5504
  /** Users */
5393
5505
  users: components['schemas']['RemoveWorkspaceUserItem'][];
5394
5506
  };
5507
+ /** RequestEmailChangeRequest */
5508
+ RequestEmailChangeRequest: {
5509
+ /**
5510
+ * New Email
5511
+ * Format: email
5512
+ */
5513
+ new_email: string;
5514
+ };
5515
+ /** RequestEmailChangeResponse */
5516
+ RequestEmailChangeResponse: {
5517
+ /** Detail */
5518
+ detail: string;
5519
+ };
5395
5520
  /**
5396
5521
  * RerankerConfig
5397
5522
  * @description Wire/storage shape for reranker settings.
@@ -6179,11 +6304,11 @@ interface components {
6179
6304
  */
6180
6305
  MAX_TOKENS: number;
6181
6306
  /**
6182
- * Max Char Size To Answer
6183
- * @description Maximum character size for review context.
6307
+ * Max Token Size To Answer
6308
+ * @description Maximum input token size for review context.
6184
6309
  * @default 200000
6185
6310
  */
6186
- MAX_CHAR_SIZE_TO_ANSWER: number;
6311
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6187
6312
  };
6188
6313
  /**
6189
6314
  * RunCodeConfig
@@ -6609,11 +6734,11 @@ interface components {
6609
6734
  */
6610
6735
  MAX_TOKENS: number;
6611
6736
  /**
6612
- * Max Char Size To Answer
6613
- * @description Maximum character size of conversation history to summarise.
6737
+ * Max Token Size To Answer
6738
+ * @description Maximum input token size of conversation history to summarise.
6614
6739
  * @default 200000
6615
6740
  */
6616
- MAX_CHAR_SIZE_TO_ANSWER: number;
6741
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6617
6742
  /**
6618
6743
  * Compaction Threshold Tokens
6619
6744
  * @description Auto-compact when thread tokens exceed this threshold. 0 = disabled.
@@ -6753,6 +6878,8 @@ interface components {
6753
6878
  status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty' | 'low-content';
6754
6879
  /** Progress */
6755
6880
  progress: number;
6881
+ /** Failed Stage */
6882
+ failed_stage?: string | null;
6756
6883
  };
6757
6884
  /** Thread */
6758
6885
  Thread: {
@@ -6801,11 +6928,11 @@ interface components {
6801
6928
  */
6802
6929
  SYSTEM_INSTRUCTION: string;
6803
6930
  /**
6804
- * Max Char Size To Answer
6805
- * @description Maximum character size to answer.
6806
- * @default 50
6931
+ * Max Token Size To Answer
6932
+ * @description Maximum input token size to answer.
6933
+ * @default 20
6807
6934
  */
6808
- MAX_CHAR_SIZE_TO_ANSWER: number;
6935
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6809
6936
  /**
6810
6937
  * Temperature
6811
6938
  * @description Temperature value for randomness.
@@ -7009,6 +7136,26 @@ interface components {
7009
7136
  /** Updates */
7010
7137
  updates: components['schemas']['NotificationUpdate'][];
7011
7138
  };
7139
+ /** UpdateProfileRequest */
7140
+ UpdateProfileRequest: {
7141
+ /** Given Name */
7142
+ given_name?: string | null;
7143
+ /** Family Name */
7144
+ family_name?: string | null;
7145
+ /** Picture */
7146
+ picture?: string | null;
7147
+ };
7148
+ /** UpdateProfileResponse */
7149
+ UpdateProfileResponse: {
7150
+ /** Given Name */
7151
+ given_name: string;
7152
+ /** Family Name */
7153
+ family_name?: string | null;
7154
+ /** Email */
7155
+ email: string;
7156
+ /** Picture */
7157
+ picture?: string | null;
7158
+ };
7012
7159
  /** UpdateTagRequest */
7013
7160
  UpdateTagRequest: {
7014
7161
  /** Name */
@@ -7240,6 +7387,11 @@ interface components {
7240
7387
  picture?: string | null;
7241
7388
  /** Encryption Public Key */
7242
7389
  encryption_public_key: string;
7390
+ /**
7391
+ * Is Sso
7392
+ * @default false
7393
+ */
7394
+ is_sso: boolean;
7243
7395
  };
7244
7396
  /**
7245
7397
  * UserSettingsResponse
@@ -7261,6 +7413,11 @@ interface components {
7261
7413
  * @default []
7262
7414
  */
7263
7415
  pinned_templates: string[];
7416
+ /**
7417
+ * Pinned Skills
7418
+ * @default []
7419
+ */
7420
+ pinned_skills: string[];
7264
7421
  /**
7265
7422
  * Tableviews
7266
7423
  * @default []
@@ -7298,7 +7455,7 @@ interface components {
7298
7455
  show_help_page: boolean;
7299
7456
  /**
7300
7457
  * Show Templates
7301
- * @default true
7458
+ * @default false
7302
7459
  */
7303
7460
  show_templates: boolean;
7304
7461
  /**
@@ -7344,6 +7501,8 @@ interface components {
7344
7501
  pinned_workspaces?: string[] | null;
7345
7502
  /** Pinned Templates */
7346
7503
  pinned_templates?: string[] | null;
7504
+ /** Pinned Skills */
7505
+ pinned_skills?: string[] | null;
7347
7506
  /** Tableviews */
7348
7507
  tableviews?: components['schemas']['TableView'][] | null;
7349
7508
  /** Show Document Navigator */
@@ -7600,6 +7759,11 @@ interface components {
7600
7759
  updated_at: string;
7601
7760
  /** Wrapped Key */
7602
7761
  wrapped_key?: string | null;
7762
+ /**
7763
+ * Is Member
7764
+ * @default false
7765
+ */
7766
+ is_member: boolean;
7603
7767
  /**
7604
7768
  * Shared Conversation Count
7605
7769
  * @default 0
@@ -8498,6 +8662,105 @@ interface operations {
8498
8662
  };
8499
8663
  };
8500
8664
  };
8665
+ update_profile: {
8666
+ parameters: {
8667
+ query?: never;
8668
+ header?: never;
8669
+ path?: never;
8670
+ cookie?: never;
8671
+ };
8672
+ requestBody: {
8673
+ content: {
8674
+ 'application/json': components['schemas']['UpdateProfileRequest'];
8675
+ };
8676
+ };
8677
+ responses: {
8678
+ /** @description Successful Response */
8679
+ 200: {
8680
+ headers: {
8681
+ [name: string]: unknown;
8682
+ };
8683
+ content: {
8684
+ 'application/json': components['schemas']['UpdateProfileResponse'];
8685
+ };
8686
+ };
8687
+ /** @description Validation Error */
8688
+ 422: {
8689
+ headers: {
8690
+ [name: string]: unknown;
8691
+ };
8692
+ content: {
8693
+ 'application/json': components['schemas']['HTTPValidationError'];
8694
+ };
8695
+ };
8696
+ };
8697
+ };
8698
+ request_email_change: {
8699
+ parameters: {
8700
+ query?: never;
8701
+ header?: never;
8702
+ path?: never;
8703
+ cookie?: never;
8704
+ };
8705
+ requestBody: {
8706
+ content: {
8707
+ 'application/json': components['schemas']['RequestEmailChangeRequest'];
8708
+ };
8709
+ };
8710
+ responses: {
8711
+ /** @description Successful Response */
8712
+ 200: {
8713
+ headers: {
8714
+ [name: string]: unknown;
8715
+ };
8716
+ content: {
8717
+ 'application/json': components['schemas']['RequestEmailChangeResponse'];
8718
+ };
8719
+ };
8720
+ /** @description Validation Error */
8721
+ 422: {
8722
+ headers: {
8723
+ [name: string]: unknown;
8724
+ };
8725
+ content: {
8726
+ 'application/json': components['schemas']['HTTPValidationError'];
8727
+ };
8728
+ };
8729
+ };
8730
+ };
8731
+ confirm_email_change: {
8732
+ parameters: {
8733
+ query?: never;
8734
+ header?: never;
8735
+ path?: never;
8736
+ cookie?: never;
8737
+ };
8738
+ requestBody: {
8739
+ content: {
8740
+ 'application/json': components['schemas']['ConfirmEmailChangeRequest'];
8741
+ };
8742
+ };
8743
+ responses: {
8744
+ /** @description Successful Response */
8745
+ 200: {
8746
+ headers: {
8747
+ [name: string]: unknown;
8748
+ };
8749
+ content: {
8750
+ 'application/json': components['schemas']['ConfirmEmailChangeResponse'];
8751
+ };
8752
+ };
8753
+ /** @description Validation Error */
8754
+ 422: {
8755
+ headers: {
8756
+ [name: string]: unknown;
8757
+ };
8758
+ content: {
8759
+ 'application/json': components['schemas']['HTTPValidationError'];
8760
+ };
8761
+ };
8762
+ };
8763
+ };
8501
8764
  get_user_settings: {
8502
8765
  parameters: {
8503
8766
  query?: never;
package/dist/index.d.ts CHANGED
@@ -534,6 +534,83 @@ interface paths {
534
534
  patch?: never;
535
535
  trace?: never;
536
536
  };
537
+ '/v1/user/profile': {
538
+ parameters: {
539
+ query?: never;
540
+ header?: never;
541
+ path?: never;
542
+ cookie?: never;
543
+ };
544
+ get?: never;
545
+ put?: never;
546
+ post?: never;
547
+ delete?: never;
548
+ options?: never;
549
+ head?: never;
550
+ /**
551
+ * Update Profile
552
+ * @description Update user's display profile (given_name, family_name, picture).
553
+ *
554
+ * Pass an empty string to clear family_name or picture; null means "leave unchanged".
555
+ */
556
+ patch: operations['update_profile'];
557
+ trace?: never;
558
+ };
559
+ '/v1/user/request-email-change': {
560
+ parameters: {
561
+ query?: never;
562
+ header?: never;
563
+ path?: never;
564
+ cookie?: never;
565
+ };
566
+ get?: never;
567
+ put?: never;
568
+ /**
569
+ * Request Email Change
570
+ * @description Send a verification code to the new email address.
571
+ *
572
+ * SSO users cannot change their email here — Auth0 with account linking
573
+ * makes the semantics ambiguous (which linked identity? what about social
574
+ * providers that own the email upstream?). They change it at their IdP and
575
+ * /sso-status syncs it on next login.
576
+ *
577
+ * The code is generated deterministically from (new_email, current_user.external_id)
578
+ * so that only this user can complete the change.
579
+ */
580
+ post: operations['request_email_change'];
581
+ delete?: never;
582
+ options?: never;
583
+ head?: never;
584
+ patch?: never;
585
+ trace?: never;
586
+ };
587
+ '/v1/user/confirm-email-change': {
588
+ parameters: {
589
+ query?: never;
590
+ header?: never;
591
+ path?: never;
592
+ cookie?: never;
593
+ };
594
+ get?: never;
595
+ put?: never;
596
+ /**
597
+ * Confirm Email Change
598
+ * @description Confirm email change with verification code.
599
+ *
600
+ * Verifies the 3-word code, then atomically updates:
601
+ * 1. users.email
602
+ * 2. contacts.contact_email (all references to old email)
603
+ * 3. Stripe customer email (fire-and-forget)
604
+ *
605
+ * SSO users are blocked — see /request-email-change for rationale.
606
+ */
607
+ post: operations['confirm_email_change'];
608
+ delete?: never;
609
+ options?: never;
610
+ head?: never;
611
+ patch?: never;
612
+ trace?: never;
613
+ };
537
614
  '/v1/user/settings': {
538
615
  parameters: {
539
616
  query?: never;
@@ -1129,6 +1206,11 @@ interface paths {
1129
1206
  *
1130
1207
  * Returns 202 Accepted immediately - processing happens in background.
1131
1208
  * WebSocket notification sent when complete.
1209
+ *
1210
+ * Pre-checks the project's AI budget against LiteLLM and rejects with
1211
+ * 402 ``QUOTA_EXCEEDED`` before kicking off background work — these
1212
+ * docs are already indexed/completed, so we can't surface mid-flight
1213
+ * failures via the per-doc status path that the upload pipeline uses.
1132
1214
  */
1133
1215
  post: operations['generate_doctags'];
1134
1216
  delete?: never;
@@ -2081,7 +2163,7 @@ interface components {
2081
2163
  /**
2082
2164
  * Skills Enabled
2083
2165
  * @description Enable the skills system: /skill (create) and /<skill-name> (invoke) commands.
2084
- * @default false
2166
+ * @default true
2085
2167
  */
2086
2168
  SKILLS_ENABLED: boolean;
2087
2169
  /**
@@ -2090,6 +2172,12 @@ interface components {
2090
2172
  * @default false
2091
2173
  */
2092
2174
  SKILL_CREATION: boolean;
2175
+ /**
2176
+ * Memory Creation
2177
+ * @description Transient flag set by /setup command to enable the save_memory agent tool (authors the per-workspace practice-profile memory document).
2178
+ * @default false
2179
+ */
2180
+ MEMORY_CREATION: boolean;
2093
2181
  /**
2094
2182
  * Review Enabled
2095
2183
  * @description Enable ReviewLLM to review agent draft answers against source material before sending to the user. Uses the reasoning model for higher quality.
@@ -2117,8 +2205,8 @@ interface components {
2117
2205
  AGENT_API_TYPE: 'local' | 'remote';
2118
2206
  /**
2119
2207
  * Llm Agent Temperature
2120
- * @description Temperature value for agent LLM.
2121
- * @default 1
2208
+ * @description Temperature value for agent LLM. 0.6 matches the value recommended upstream for Qwen3-27B-AWQ-INT4 with thinking enabled. Higher values (we used to default to 1.0) cause the model to drift from the canonical tool-call grammar under complex agent contexts, producing malformed XML / JSON that vLLM's tool-call parser cannot extract — measured 20% tool-call success at temp=1.0 vs 100% at temp=0.6 on the same 20-run hard-tool-required test.
2209
+ * @default 0.6
2122
2210
  */
2123
2211
  LLM_AGENT_TEMPERATURE: number;
2124
2212
  /**
@@ -2156,7 +2244,7 @@ interface components {
2156
2244
  * @description System prompt for the agent. Dynamic context is appended automatically.
2157
2245
  * @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.
2158
2246
  *
2159
- * 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.
2247
+ * 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.
2160
2248
  *
2161
2249
  * 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.
2162
2250
  *
@@ -2179,6 +2267,10 @@ interface components {
2179
2267
  * - Numbering for sequential steps or prioritized items
2180
2268
  * - Bold text for critical conclusions or decision points
2181
2269
  *
2270
+ * TOOL CALLING:
2271
+ * - 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).
2272
+ * - If you intend to search or read, issue the tool call immediately. Do not narrate your intent first.
2273
+ *
2182
2274
  * EFFICIENCY:
2183
2275
  * 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.
2184
2276
  * 2. Call multiple tools in parallel when a query has several aspects.
@@ -2239,19 +2331,20 @@ interface components {
2239
2331
  * "VISION_ENABLED": false,
2240
2332
  * "PERSONAL_AGENT": false,
2241
2333
  * "MEMORY_ENABLED": false,
2242
- * "SKILLS_ENABLED": false,
2334
+ * "SKILLS_ENABLED": true,
2243
2335
  * "SKILL_CREATION": false,
2336
+ * "MEMORY_CREATION": false,
2244
2337
  * "REVIEW_ENABLED": false,
2245
2338
  * "PERSONA": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.",
2246
2339
  * "AGENT_MODEL_NAME": "auto",
2247
2340
  * "AGENT_API_TYPE": "remote",
2248
- * "LLM_AGENT_TEMPERATURE": 1,
2341
+ * "LLM_AGENT_TEMPERATURE": 0.6,
2249
2342
  * "AGENT_MAX_TOKENS": 10000,
2250
2343
  * "ENABLE_THINKING": false,
2251
2344
  * "AGENT_MAX_ITERATIONS": 20,
2252
2345
  * "AGENT_MAX_PARALLEL_TOOL_CALLS": 10,
2253
2346
  * "AGENT_HISTORY_CHAR_THRESHOLD": 8000,
2254
- * "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.\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\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."
2347
+ * "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- 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."
2255
2348
  * }
2256
2349
  */
2257
2350
  Agents: components['schemas']['AgentsConfig'];
@@ -2261,7 +2354,7 @@ interface components {
2261
2354
  * "ENABLE_THINKING": false,
2262
2355
  * "MODEL_NAME": "Fast",
2263
2356
  * "SYSTEM_INSTRUCTION": "You are ARBI, an AI assistant created by ARBI CITY. Be proactive, helpful and professional.Be concise. Use markdown where it helps readability. Cross-check information across sources before answering. Never fabricate facts. Not all assertions in the sources are factual — some are arguments by a party. Attribute claims to their source, especially where parties disagree.",
2264
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2357
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2265
2358
  * "TEMPERATURE": 0.1,
2266
2359
  * "MAX_TOKENS": 5000
2267
2360
  * }
@@ -2275,7 +2368,7 @@ interface components {
2275
2368
  * "SYSTEM_INSTRUCTION": "You are reviewing a draft answer prepared by a research agent. The draft was written based on summaries, but you now have access to the full source material.\n\nYour task:\n1. Review the draft answer against the source material provided\n2. Verify claims are supported by the sources\n3. Correct any inaccuracies or unsupported statements\n4. Add any important details from the sources that were missed\n5. Maintain formal, objective tone appropriate for professional contexts\n\nIf information is not found in the sources but the draft answer is based on web search results or general knowledge, preserve it and ensure it is clearly labelled as such. Only flag missing source support for claims that purport to come from the documents.\nDo not add inline citation markers - the system handles citations automatically.",
2276
2369
  * "TEMPERATURE": 0.1,
2277
2370
  * "MAX_TOKENS": 5000,
2278
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000
2371
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000
2279
2372
  * }
2280
2373
  */
2281
2374
  ReviewLLM: components['schemas']['ReviewLLMConfig'];
@@ -2287,7 +2380,7 @@ interface components {
2287
2380
  * "SYSTEM_INSTRUCTION": "You are a chunk evaluator. Analyze retrieved chunks to determine which are relevant to the user's query and extract key learnings from the RELEVANT chunks only. You must return your response as valid JSON matching the provided schema.",
2288
2381
  * "TEMPERATURE": 0.1,
2289
2382
  * "MAX_TOKENS": 20000,
2290
- * "MAX_CHAR_SIZE_TO_ANSWER": 100000
2383
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000
2291
2384
  * }
2292
2385
  */
2293
2386
  EvaluatorLLM: components['schemas']['EvaluatorLLMConfig'];
@@ -2297,7 +2390,7 @@ interface components {
2297
2390
  * "ENABLE_THINKING": false,
2298
2391
  * "MODEL_NAME": "Fast",
2299
2392
  * "SYSTEM_INSTRUCTION": "You are a title generator that creates concise, descriptive titles.\n\nOutput the title as plain text only. Do not use Markdown or any other formatting. Specifically:\n- Do not bold, italicize, or otherwise emphasize any part of the title.\n- Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n- Do not prefix the title with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n- Do not wrap the title in quotes or brackets.",
2300
- * "MAX_CHAR_SIZE_TO_ANSWER": 50,
2393
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 20,
2301
2394
  * "TEMPERATURE": 0.3,
2302
2395
  * "MAX_TOKENS": 20
2303
2396
  * }
@@ -2311,7 +2404,7 @@ interface components {
2311
2404
  * "SYSTEM_INSTRUCTION": "You are a conversation summariser. Condense the conversation history into a concise summary that preserves:\n- Key decisions and conclusions reached\n- Specific names, dates, numbers, and document references\n- Open questions and unresolved items\n- The user's goals and constraints\n\nWrite in past tense, third person. Be specific, not vague. Do not omit important details in favour of brevity.",
2312
2405
  * "TEMPERATURE": 0.1,
2313
2406
  * "MAX_TOKENS": 2000,
2314
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2407
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2315
2408
  * "COMPACTION_THRESHOLD_TOKENS": 0,
2316
2409
  * "COMPACTION_KEEP_RECENT": 4
2317
2410
  * }
@@ -2323,7 +2416,7 @@ interface components {
2323
2416
  * "ENABLE_THINKING": false,
2324
2417
  * "MODEL_NAME": "Fast",
2325
2418
  * "SYSTEM_INSTRUCTION": "You are a document analysis assistant. Answer questions based strictly on document content.\n\nGuidelines:\n- Only use information explicitly stated in the document\n- Do not infer or assume information not present\n- If information is not found, respond with \"Information not found in document.\"\n- Follow format instructions exactly for each answer\n- Be concise and precise\n- Output answers as plain text only. Do not use Markdown or any other formatting:\n - Do not bold, italicize, or otherwise emphasize any part of the answer.\n - Do not include asterisks (*), underscores (_), backticks (`), or other Markdown markers.\n - Do not prefix answers with bullets, dashes (-), or numbered/lettered enumeration (e.g. \"1.\", \"a)\").\n - Write multi-point answers as flowing sentences, not as a list.",
2326
- * "MAX_CHAR_CONTEXT_TO_ANSWER": 100000,
2419
+ * "MAX_TOKEN_CONTEXT_TO_ANSWER": 200000,
2327
2420
  * "TEMPERATURE": 0.1,
2328
2421
  * "MAX_TOKENS": 2000,
2329
2422
  * "MAX_CONCURRENT_DOCS": 10,
@@ -2386,7 +2479,7 @@ interface components {
2386
2479
  * "SYSTEM_INSTRUCTION": "You are a knowledge synthesizer. You receive the full agent scratchpad from a completed conversation and decide what, if anything, is worth saving.\n\n## Work Product Types\n- **\"memory\"**: Facts, findings, reference data — for *looking up* information.\n- **\"skill\"**: Procedures, workflows, step-by-step instructions — for *doing* something.\n\nWhen ambiguous, default to memory.\n\n## Rules\n- Return an empty work_products array if the conversation is trivial or produced nothing substantive.\n- Each work product must cover ONE coherent topic. Never combine disparate subjects into a single document — create separate documents for each distinct topic.\n- Ground everything in the provided context. Do not invent information.\n- Be concise. These are reference documents, not essays.\n\n## Output Format\nJSON with a `work_products` array. Each item has `wp_type`, `title`, and `content` (markdown).\n\nMemory content: `# Title`, date, source, key findings as bullets, source documents.\nSkill content: `# Title`, prerequisites, numbered steps, when to apply.",
2387
2480
  * "TEMPERATURE": 0.3,
2388
2481
  * "MAX_TOKENS": 8000,
2389
- * "MAX_CHAR_CONTEXT": 100000,
2482
+ * "MAX_TOKEN_CONTEXT": 200000,
2390
2483
  * "MAX_CONCURRENT": 5
2391
2484
  * }
2392
2485
  */
@@ -2399,7 +2492,7 @@ interface components {
2399
2492
  * "SYSTEM_INSTRUCTION": "You are a research planning assistant. Your job is to analyze a user query and produce a concise, numbered research plan.\n\nYou have access to a workspace of documents. The available tools for executing the plan are:\n- search_inside_documents: Search workspace documents for relevant passages (semantic, keyword, or hybrid). Use digest=true to extract learnings.\n- read_document: Read page ranges or entire documents. Use digest=true to extract learnings with citations.\n- get_table_of_contents: Get document headings with page references\n\nConsider:\n- What information is needed to answer the query\n- Which documents are likely relevant based on the document index\n- What search queries and document passages to examine\n- What order of operations will be most efficient\n- Whether parallel searches can be used for different aspects\n\nRespond with ONLY the plan (numbered steps). Do not execute any steps.",
2400
2493
  * "TEMPERATURE": 0.3,
2401
2494
  * "MAX_TOKENS": 4000,
2402
- * "MAX_CHAR_SIZE_TO_ANSWER": 200000,
2495
+ * "MAX_TOKEN_SIZE_TO_ANSWER": 200000,
2403
2496
  * "APPROVAL_TIMEOUT": 0
2404
2497
  * }
2405
2498
  */
@@ -3059,6 +3152,23 @@ interface components {
3059
3152
  /** Confirm Email */
3060
3153
  confirm_email: string;
3061
3154
  };
3155
+ /** ConfirmEmailChangeRequest */
3156
+ ConfirmEmailChangeRequest: {
3157
+ /**
3158
+ * New Email
3159
+ * Format: email
3160
+ */
3161
+ new_email: string;
3162
+ /** Verification Code */
3163
+ verification_code: string;
3164
+ };
3165
+ /** ConfirmEmailChangeResponse */
3166
+ ConfirmEmailChangeResponse: {
3167
+ /** Detail */
3168
+ detail: string;
3169
+ /** Email */
3170
+ email: string;
3171
+ };
3062
3172
  /**
3063
3173
  * ConnectionClosedMessage
3064
3174
  * @description Sent when connection is closed (e.g., another tab opened).
@@ -3457,6 +3567,8 @@ interface components {
3457
3567
  status?: string | null;
3458
3568
  /** Error Message */
3459
3569
  error_message?: string | null;
3570
+ /** Failed Stage */
3571
+ failed_stage?: string | null;
3460
3572
  /** N Pages */
3461
3573
  n_pages?: number | null;
3462
3574
  /** N Chunks */
@@ -3633,11 +3745,11 @@ interface components {
3633
3745
  */
3634
3746
  SYSTEM_INSTRUCTION: string;
3635
3747
  /**
3636
- * Max Char Context To Answer
3637
- * @description Maximum characters in document for context.
3638
- * @default 100000
3748
+ * Max Token Context To Answer
3749
+ * @description Maximum input tokens in document for context.
3750
+ * @default 200000
3639
3751
  */
3640
- MAX_CHAR_CONTEXT_TO_ANSWER: number;
3752
+ MAX_TOKEN_CONTEXT_TO_ANSWER: number;
3641
3753
  /**
3642
3754
  * Temperature
3643
3755
  * @description Temperature for factual answers.
@@ -3800,11 +3912,11 @@ interface components {
3800
3912
  */
3801
3913
  MAX_TOKENS: number;
3802
3914
  /**
3803
- * Max Char Size To Answer
3804
- * @description Maximum character size for evaluation context.
3805
- * @default 100000
3915
+ * Max Token Size To Answer
3916
+ * @description Maximum input token size for evaluation context.
3917
+ * @default 200000
3806
3918
  */
3807
- MAX_CHAR_SIZE_TO_ANSWER: number;
3919
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
3808
3920
  };
3809
3921
  /**
3810
3922
  * FileDeleteResponse
@@ -4241,11 +4353,11 @@ interface components {
4241
4353
  */
4242
4354
  MAX_TOKENS: number;
4243
4355
  /**
4244
- * Max Char Context
4245
- * @description Maximum characters of input context.
4246
- * @default 100000
4356
+ * Max Token Context
4357
+ * @description Maximum tokens of input context.
4358
+ * @default 200000
4247
4359
  */
4248
- MAX_CHAR_CONTEXT: number;
4360
+ MAX_TOKEN_CONTEXT: number;
4249
4361
  /**
4250
4362
  * Max Concurrent
4251
4363
  * @description Maximum concurrent synthesis operations.
@@ -4931,11 +5043,11 @@ interface components {
4931
5043
  */
4932
5044
  MAX_TOKENS: number;
4933
5045
  /**
4934
- * Max Char Size To Answer
4935
- * @description Maximum character size for planning context.
5046
+ * Max Token Size To Answer
5047
+ * @description Maximum input token size for planning context.
4936
5048
  * @default 200000
4937
5049
  */
4938
- MAX_CHAR_SIZE_TO_ANSWER: number;
5050
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
4939
5051
  /**
4940
5052
  * Approval Timeout
4941
5053
  * @description Seconds to wait for user approval after generating the plan. 0 = no approval (auto-proceed). Safe for non-interactive contexts.
@@ -5252,11 +5364,11 @@ interface components {
5252
5364
  */
5253
5365
  SYSTEM_INSTRUCTION: string;
5254
5366
  /**
5255
- * Max Char Size To Answer
5256
- * @description Maximum character size to answer.
5367
+ * Max Token Size To Answer
5368
+ * @description Maximum input token size to answer.
5257
5369
  * @default 200000
5258
5370
  */
5259
- MAX_CHAR_SIZE_TO_ANSWER: number;
5371
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
5260
5372
  /**
5261
5373
  * Temperature
5262
5374
  * @description Temperature value for randomness.
@@ -5392,6 +5504,19 @@ interface components {
5392
5504
  /** Users */
5393
5505
  users: components['schemas']['RemoveWorkspaceUserItem'][];
5394
5506
  };
5507
+ /** RequestEmailChangeRequest */
5508
+ RequestEmailChangeRequest: {
5509
+ /**
5510
+ * New Email
5511
+ * Format: email
5512
+ */
5513
+ new_email: string;
5514
+ };
5515
+ /** RequestEmailChangeResponse */
5516
+ RequestEmailChangeResponse: {
5517
+ /** Detail */
5518
+ detail: string;
5519
+ };
5395
5520
  /**
5396
5521
  * RerankerConfig
5397
5522
  * @description Wire/storage shape for reranker settings.
@@ -6179,11 +6304,11 @@ interface components {
6179
6304
  */
6180
6305
  MAX_TOKENS: number;
6181
6306
  /**
6182
- * Max Char Size To Answer
6183
- * @description Maximum character size for review context.
6307
+ * Max Token Size To Answer
6308
+ * @description Maximum input token size for review context.
6184
6309
  * @default 200000
6185
6310
  */
6186
- MAX_CHAR_SIZE_TO_ANSWER: number;
6311
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6187
6312
  };
6188
6313
  /**
6189
6314
  * RunCodeConfig
@@ -6609,11 +6734,11 @@ interface components {
6609
6734
  */
6610
6735
  MAX_TOKENS: number;
6611
6736
  /**
6612
- * Max Char Size To Answer
6613
- * @description Maximum character size of conversation history to summarise.
6737
+ * Max Token Size To Answer
6738
+ * @description Maximum input token size of conversation history to summarise.
6614
6739
  * @default 200000
6615
6740
  */
6616
- MAX_CHAR_SIZE_TO_ANSWER: number;
6741
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6617
6742
  /**
6618
6743
  * Compaction Threshold Tokens
6619
6744
  * @description Auto-compact when thread tokens exceed this threshold. 0 = disabled.
@@ -6753,6 +6878,8 @@ interface components {
6753
6878
  status: 'uploading' | 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed' | 'skipped' | 'empty' | 'low-content';
6754
6879
  /** Progress */
6755
6880
  progress: number;
6881
+ /** Failed Stage */
6882
+ failed_stage?: string | null;
6756
6883
  };
6757
6884
  /** Thread */
6758
6885
  Thread: {
@@ -6801,11 +6928,11 @@ interface components {
6801
6928
  */
6802
6929
  SYSTEM_INSTRUCTION: string;
6803
6930
  /**
6804
- * Max Char Size To Answer
6805
- * @description Maximum character size to answer.
6806
- * @default 50
6931
+ * Max Token Size To Answer
6932
+ * @description Maximum input token size to answer.
6933
+ * @default 20
6807
6934
  */
6808
- MAX_CHAR_SIZE_TO_ANSWER: number;
6935
+ MAX_TOKEN_SIZE_TO_ANSWER: number;
6809
6936
  /**
6810
6937
  * Temperature
6811
6938
  * @description Temperature value for randomness.
@@ -7009,6 +7136,26 @@ interface components {
7009
7136
  /** Updates */
7010
7137
  updates: components['schemas']['NotificationUpdate'][];
7011
7138
  };
7139
+ /** UpdateProfileRequest */
7140
+ UpdateProfileRequest: {
7141
+ /** Given Name */
7142
+ given_name?: string | null;
7143
+ /** Family Name */
7144
+ family_name?: string | null;
7145
+ /** Picture */
7146
+ picture?: string | null;
7147
+ };
7148
+ /** UpdateProfileResponse */
7149
+ UpdateProfileResponse: {
7150
+ /** Given Name */
7151
+ given_name: string;
7152
+ /** Family Name */
7153
+ family_name?: string | null;
7154
+ /** Email */
7155
+ email: string;
7156
+ /** Picture */
7157
+ picture?: string | null;
7158
+ };
7012
7159
  /** UpdateTagRequest */
7013
7160
  UpdateTagRequest: {
7014
7161
  /** Name */
@@ -7240,6 +7387,11 @@ interface components {
7240
7387
  picture?: string | null;
7241
7388
  /** Encryption Public Key */
7242
7389
  encryption_public_key: string;
7390
+ /**
7391
+ * Is Sso
7392
+ * @default false
7393
+ */
7394
+ is_sso: boolean;
7243
7395
  };
7244
7396
  /**
7245
7397
  * UserSettingsResponse
@@ -7261,6 +7413,11 @@ interface components {
7261
7413
  * @default []
7262
7414
  */
7263
7415
  pinned_templates: string[];
7416
+ /**
7417
+ * Pinned Skills
7418
+ * @default []
7419
+ */
7420
+ pinned_skills: string[];
7264
7421
  /**
7265
7422
  * Tableviews
7266
7423
  * @default []
@@ -7298,7 +7455,7 @@ interface components {
7298
7455
  show_help_page: boolean;
7299
7456
  /**
7300
7457
  * Show Templates
7301
- * @default true
7458
+ * @default false
7302
7459
  */
7303
7460
  show_templates: boolean;
7304
7461
  /**
@@ -7344,6 +7501,8 @@ interface components {
7344
7501
  pinned_workspaces?: string[] | null;
7345
7502
  /** Pinned Templates */
7346
7503
  pinned_templates?: string[] | null;
7504
+ /** Pinned Skills */
7505
+ pinned_skills?: string[] | null;
7347
7506
  /** Tableviews */
7348
7507
  tableviews?: components['schemas']['TableView'][] | null;
7349
7508
  /** Show Document Navigator */
@@ -7600,6 +7759,11 @@ interface components {
7600
7759
  updated_at: string;
7601
7760
  /** Wrapped Key */
7602
7761
  wrapped_key?: string | null;
7762
+ /**
7763
+ * Is Member
7764
+ * @default false
7765
+ */
7766
+ is_member: boolean;
7603
7767
  /**
7604
7768
  * Shared Conversation Count
7605
7769
  * @default 0
@@ -8498,6 +8662,105 @@ interface operations {
8498
8662
  };
8499
8663
  };
8500
8664
  };
8665
+ update_profile: {
8666
+ parameters: {
8667
+ query?: never;
8668
+ header?: never;
8669
+ path?: never;
8670
+ cookie?: never;
8671
+ };
8672
+ requestBody: {
8673
+ content: {
8674
+ 'application/json': components['schemas']['UpdateProfileRequest'];
8675
+ };
8676
+ };
8677
+ responses: {
8678
+ /** @description Successful Response */
8679
+ 200: {
8680
+ headers: {
8681
+ [name: string]: unknown;
8682
+ };
8683
+ content: {
8684
+ 'application/json': components['schemas']['UpdateProfileResponse'];
8685
+ };
8686
+ };
8687
+ /** @description Validation Error */
8688
+ 422: {
8689
+ headers: {
8690
+ [name: string]: unknown;
8691
+ };
8692
+ content: {
8693
+ 'application/json': components['schemas']['HTTPValidationError'];
8694
+ };
8695
+ };
8696
+ };
8697
+ };
8698
+ request_email_change: {
8699
+ parameters: {
8700
+ query?: never;
8701
+ header?: never;
8702
+ path?: never;
8703
+ cookie?: never;
8704
+ };
8705
+ requestBody: {
8706
+ content: {
8707
+ 'application/json': components['schemas']['RequestEmailChangeRequest'];
8708
+ };
8709
+ };
8710
+ responses: {
8711
+ /** @description Successful Response */
8712
+ 200: {
8713
+ headers: {
8714
+ [name: string]: unknown;
8715
+ };
8716
+ content: {
8717
+ 'application/json': components['schemas']['RequestEmailChangeResponse'];
8718
+ };
8719
+ };
8720
+ /** @description Validation Error */
8721
+ 422: {
8722
+ headers: {
8723
+ [name: string]: unknown;
8724
+ };
8725
+ content: {
8726
+ 'application/json': components['schemas']['HTTPValidationError'];
8727
+ };
8728
+ };
8729
+ };
8730
+ };
8731
+ confirm_email_change: {
8732
+ parameters: {
8733
+ query?: never;
8734
+ header?: never;
8735
+ path?: never;
8736
+ cookie?: never;
8737
+ };
8738
+ requestBody: {
8739
+ content: {
8740
+ 'application/json': components['schemas']['ConfirmEmailChangeRequest'];
8741
+ };
8742
+ };
8743
+ responses: {
8744
+ /** @description Successful Response */
8745
+ 200: {
8746
+ headers: {
8747
+ [name: string]: unknown;
8748
+ };
8749
+ content: {
8750
+ 'application/json': components['schemas']['ConfirmEmailChangeResponse'];
8751
+ };
8752
+ };
8753
+ /** @description Validation Error */
8754
+ 422: {
8755
+ headers: {
8756
+ [name: string]: unknown;
8757
+ };
8758
+ content: {
8759
+ 'application/json': components['schemas']['HTTPValidationError'];
8760
+ };
8761
+ };
8762
+ };
8763
+ };
8501
8764
  get_user_settings: {
8502
8765
  parameters: {
8503
8766
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.3.58",
3
+ "version": "0.3.60",
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",
@@ -29,7 +29,7 @@
29
29
  "@types/libsodium-wrappers-sumo": "^0.8.2",
30
30
  "fake-indexeddb": "^6.2.5",
31
31
  "tsup": "^8.4.0",
32
- "typescript": "^5.9.3",
32
+ "typescript": "^6.0.3",
33
33
  "vitest": "^4.0.18"
34
34
  },
35
35
  "license": "MIT",