@maudecode/talaria-web-contracts 1.21.0 → 1.23.2
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/agent-imports.d.ts +42 -0
- package/dist/agent-imports.js +11 -0
- package/dist/agent-imports.js.map +1 -0
- package/dist/context-detail.d.ts +3 -3
- package/dist/delegation.d.ts +206 -0
- package/dist/delegation.js +32 -0
- package/dist/delegation.js.map +1 -0
- package/dist/gateway-session.d.ts +24 -4
- package/dist/gateway-session.js +5 -1
- package/dist/gateway-session.js.map +1 -1
- package/dist/groups-native.d.ts +427 -0
- package/dist/groups-native.js +40 -0
- package/dist/groups-native.js.map +1 -0
- package/dist/groups.d.ts +1545 -0
- package/dist/groups.js +12 -0
- package/dist/groups.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-cost-policy.d.ts +1 -1
- package/dist/openapi.js +4 -0
- package/dist/openapi.js.map +1 -1
- package/dist/plan-usage.d.ts +92 -0
- package/dist/plan-usage.js +20 -0
- package/dist/plan-usage.js.map +1 -0
- package/dist/prompt-queue.d.ts +2 -2
- package/dist/router.d.ts +13 -20005
- package/dist/router.js +4 -1
- package/dist/router.js.map +1 -1
- package/dist/routes/automation.d.ts +15 -15
- package/dist/routes/chat.d.ts +279 -83
- package/dist/routes/core.d.ts +168 -0
- package/dist/routes/core.js +48 -1
- package/dist/routes/core.js.map +1 -1
- package/dist/routes/groups.d.ts +860 -0
- package/dist/routes/groups.js +13 -0
- package/dist/routes/groups.js.map +1 -0
- package/dist/routes/raw.js +18 -3
- package/dist/routes/raw.js.map +1 -1
- package/dist/routes/sessions.d.ts +751 -204
- package/dist/routes/settings.d.ts +1100 -1
- package/dist/routes/settings.js +56 -0
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/tools.d.ts +109 -24
- package/dist/routes/tools.js +6 -3
- package/dist/routes/tools.js.map +1 -1
- package/dist/routes/workspaces.d.ts +2 -2
- package/dist/sidecar/methods.d.ts +522 -24
- package/dist/sidecar/methods.js +3 -1
- package/dist/sidecar/methods.js.map +1 -1
- package/dist/sidecar/namespaces.d.ts +611 -34
- package/dist/sidecar/namespaces.js +46 -5
- package/dist/sidecar/namespaces.js.map +1 -1
- package/dist/sidecar/rpc.d.ts +3 -3
- package/dist/sidecar/version.d.ts +1 -1
- package/dist/sidecar/version.js +1 -1
- package/dist/sse.d.ts +97 -20
- package/dist/sse.js +4 -3
- package/dist/sse.js.map +1 -1
- package/dist/views.d.ts +886 -161
- package/dist/views.js +48 -23
- package/dist/views.js.map +1 -1
- package/fixtures/sidecar/agent-imports.json +6 -0
- package/fixtures/sidecar/aux.json +58 -0
- package/fixtures/sidecar/connectors.json +29 -0
- package/fixtures/sidecar/groups.json +18 -0
- package/fixtures/sidecar/providers.json +37 -1
- package/fixtures/sidecar/runtime.json +3 -3
- package/fixtures/sidecar/skills.json +19 -2
- package/fixtures/sidecar/tts.json +6 -0
- package/package.json +1 -1
package/dist/views.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DelegationSettingsSchema } from './delegation.js';
|
|
2
|
+
import { PlanGaugeSchema, PlanUsageSchema, ModelAllowanceSchema, ModelSectionsSchema } from './plan-usage.js';
|
|
1
3
|
import { McpCostPolicySchema } from './mcp-cost-policy.js';
|
|
2
4
|
/**
|
|
3
5
|
* Pinned response shapes shared by every consumer (formerly the frontend's
|
|
@@ -11,7 +13,7 @@ import { RunStatusSchema } from './run-status.js';
|
|
|
11
13
|
import { AgentRefreshConfirmationSchema, AgentUpdateOperationSchema } from './sidecar/runtime.js';
|
|
12
14
|
import { SpeedTierSchema } from './speed.js';
|
|
13
15
|
import { ExecutionModeSchema, OwnerAttachmentSchema, MessageReactionViewSchema } from './gateway-session.js';
|
|
14
|
-
import { KanbanInspectionNodeSchema, KanbanInspectionSnapshotSchema, CanonicalBotChatSchema, GatewayModeSchema, PluginOAuthClientSchema, PluginSettingFieldSchema, SkillCatalogIdentitySchema } from './sidecar/namespaces.js';
|
|
16
|
+
import { NousAccountSchema, KanbanInspectionNodeSchema, KanbanInspectionSnapshotSchema, CanonicalBotChatSchema, GatewayModeSchema, PluginOAuthClientSchema, PluginSettingFieldSchema, SkillCatalogIdentitySchema } from './sidecar/namespaces.js';
|
|
15
17
|
export { SpeedTierSchema } from './speed.js';
|
|
16
18
|
const Json = z.unknown();
|
|
17
19
|
export const NullableString = z.string().nullable();
|
|
@@ -21,6 +23,7 @@ export const UnixSeconds = z.number();
|
|
|
21
23
|
// ── sessions ─────────────────────────────────────────────────────────────
|
|
22
24
|
export const SessionIdSchema = z.string().regex(/^[A-Za-z0-9_.:-]{1,128}$/, 'invalid session id');
|
|
23
25
|
export const AttachmentSchema = z.looseObject({
|
|
26
|
+
download_url: z.string().startsWith('/api/groups/file?').optional(),
|
|
24
27
|
filename: z.string().optional(), name: z.string().optional(), path: z.string().optional(), size: z.number().optional(), mime: z.string().optional(), is_image: z.boolean().optional(), rollback_token: z.string().optional(),
|
|
25
28
|
});
|
|
26
29
|
/** The server's display class for a tool call: clients map it to an icon and localized verb, and never classify names themselves. */
|
|
@@ -195,8 +198,10 @@ export const MessageSchema = z.looseObject({
|
|
|
195
198
|
review_state: BackgroundReviewStateSchema.optional(),
|
|
196
199
|
}).optional(),
|
|
197
200
|
/**
|
|
198
|
-
* TAL-305: a marker
|
|
199
|
-
*
|
|
201
|
+
* TAL-305: a marker around context compaction, not a message anyone typed. Clients render a collapsed line with a
|
|
202
|
+
* localized title per kind and the body on expansion: `_marker_body` when sent, else `content`. TAL-1566: each compaction
|
|
203
|
+
* Web runs is one row in its place, with role `marker` and a stable `message_id`, display-only and excluded from model
|
|
204
|
+
* history; it is never a turn's prompt or reply.
|
|
200
205
|
*/
|
|
201
206
|
_marker_kind: z.enum(['context_compaction', 'preserved_task_list']).optional(),
|
|
202
207
|
/** TAL-305: a preserved task list's card body, without its marker line. */
|
|
@@ -272,6 +277,7 @@ const CanPinSchema = z.boolean().describe('Web may pin or unpin this session: ne
|
|
|
272
277
|
const CanArchiveSchema = z.boolean().describe('Web may archive or unarchive this session: never a subagent child or a session locked by canonical ownership or unreadable ownership storage.');
|
|
273
278
|
const CanDeleteSchema = z.boolean().describe('Web may delete this session: never a read-only session (a read-only import, a view-only subagent child, or a foreign session whose owner refuses claiming).');
|
|
274
279
|
const CanDuplicateSchema = z.boolean().describe('Web may duplicate this session: it has a WebUI copy, is not a subagent child, and is not locked by canonical ownership or unreadable ownership storage.');
|
|
280
|
+
const CanShareSchema = z.boolean().describe('Web may create or refresh a public share of this session: never a Claude Code import (TAL-551).');
|
|
275
281
|
// TAL-310: the server classifies every session's source once; clients file rows by it and never scan source markers.
|
|
276
282
|
export const SourceKindSchema = z.enum(['webui', 'cli', 'messaging', 'cron', 'webhook', 'subagent', 'claude_code', 'kanban', 'api', 'other'])
|
|
277
283
|
.describe('The session\'s source family. `is_cli_session` is true only for `cli` and `claude_code`.');
|
|
@@ -283,15 +289,6 @@ const IsMessagingSessionSchema = z.boolean().describe('`source_kind` is `messagi
|
|
|
283
289
|
* the folder name (TAL-303). Null without a workspace; absent from an older server, where clients show no label.
|
|
284
290
|
*/
|
|
285
291
|
const WorkspaceNameSchema = NullableString.optional();
|
|
286
|
-
/**
|
|
287
|
-
* TAL-560: the "Context compaction · Reference only" card, on payloads that carry `messages`. Clients render `text` after
|
|
288
|
-
* the row at full-transcript index `after_message_index` (row `after_message_index - _messages_offset` of `messages`), or
|
|
289
|
-
* above the loaded rows when it is null or before them. Null: no card.
|
|
290
|
-
*/
|
|
291
|
-
export const CompressionReferenceSchema = z.object({
|
|
292
|
-
text: z.string(),
|
|
293
|
-
after_message_index: z.number().int().nonnegative().nullable().describe('The full-transcript index of the row the card follows; null puts it above the transcript.'),
|
|
294
|
-
});
|
|
295
292
|
/** TAL-454: the chat a `/branch` copied, with its redacted title. */
|
|
296
293
|
export const BranchedFromSchema = z.object({ session_id: SessionIdSchema, title: z.string() });
|
|
297
294
|
export const MAX_SOURCE_REFERENCES = 5;
|
|
@@ -303,11 +300,24 @@ export const SourceReferenceSchema = z.object({
|
|
|
303
300
|
export const AcceptedSourceReferenceSchema = SourceReferenceSchema.extend({ title: z.string() });
|
|
304
301
|
/** Full session record from `GET /api/session` and mutations returning `session`. */
|
|
305
302
|
export const SessionActivityPhaseSchema = z.enum(['starting', 'running', 'waiting_for_approval', 'waiting_for_input', 'completed', 'failed', 'cancelled', 'stale']);
|
|
303
|
+
/** Raw rows remain for older clients; current clients render only the server-normalized display items. */
|
|
304
|
+
export const TodoItemSchema = z.looseObject({ id: z.union([z.string(), z.number()]).optional(), text: z.string().optional(), content: z.string().optional(), title: z.string().optional(), status: z.string().optional(), done: z.boolean().optional(), completed: z.boolean().optional() });
|
|
305
|
+
export const TodoStateSchema = z.looseObject({
|
|
306
|
+
display_items: z.array(z.object({ id: z.union([z.string(), z.number()]).optional(), text: z.string(), state: z.enum(['pending', 'in_progress', 'completed', 'cancelled']) })).optional(),
|
|
307
|
+
total_count: z.number().int().nonnegative().optional(), completed_count: z.number().int().nonnegative().optional(),
|
|
308
|
+
pending_count: z.number().int().nonnegative().optional(), in_progress_count: z.number().int().nonnegative().optional(), cancelled_count: z.number().int().nonnegative().optional(),
|
|
309
|
+
session_id: z.string().optional(), todos: z.array(TodoItemSchema).optional(), summary: z.record(z.string(), z.unknown()).optional(),
|
|
310
|
+
version: z.number().optional(), ts: z.number().optional(), source: z.string().optional(), description: z.string().optional(),
|
|
311
|
+
});
|
|
306
312
|
export const SessionSchema = z.looseObject({
|
|
313
|
+
plan_gauge: PlanGaugeSchema.nullable().optional(),
|
|
314
|
+
show_reasoning: z.boolean().optional().describe('Server-resolved display preference. Hidden reasoning is omitted from live events, history and activity scenes; older servers omit this field.'),
|
|
307
315
|
activity_phase: SessionActivityPhaseSchema.optional(),
|
|
316
|
+
todo_state: TodoStateSchema.optional(),
|
|
308
317
|
source_references: z.array(AcceptedSourceReferenceSchema).optional(),
|
|
309
318
|
context_detail_key: z.string().nullable().optional().describe('Opaque identity for open-only context details; changes with owner epoch, model and context.'),
|
|
310
319
|
composer_state_key: z.string().optional().describe('Opaque profile-home and owner identity for device-local composer state; never an API session id.'),
|
|
320
|
+
clear_generation: NullableString.optional().describe('TAL-848: opaque marker that changes each time /clear empties the session; a client whose clear outcome is unknown compares it with its last read. Null before any clear; older servers omit it.'),
|
|
311
321
|
session_id: SessionIdSchema, title: z.string(), workspace: z.string().optional(), created_workspace: z.string().nullable().optional(), model: NullableString.optional(), model_provider: NullableString.optional(),
|
|
312
322
|
model_option_id: NullableString.optional().describe('TAL-301: the catalog entry id the stored model/provider selects; null when none.'),
|
|
313
323
|
messages: z.array(MessageSchema).optional(), tool_calls: z.array(ToolCallSchema).optional(), created_at: UnixSeconds.optional(), updated_at: UnixSeconds.optional(), last_message_at: NullableNumber.optional(),
|
|
@@ -322,7 +332,7 @@ export const SessionSchema = z.looseObject({
|
|
|
322
332
|
pending_user_message: NullableString.optional(), pending_attachments: z.array(AttachmentSchema).optional(), pending_started_at: NullableNumber.optional(), pending_user_source: NullableString.optional(),
|
|
323
333
|
context_length: NullableNumber.optional(), threshold_tokens: NullableNumber.optional(), last_prompt_tokens: NullableNumber.optional(), post_compression_context_tokens_estimate: NullableNumber.optional(), ...ContextUsageFields,
|
|
324
334
|
execution_mode: ExecutionModeSchema.optional().describe('TAL-1040: the Agent execution policy frozen when the session was created; absent from older servers.'),
|
|
325
|
-
enabled_toolsets: z.array(z.string()).nullable().optional(), composer_draft: ComposerDraftSchema.optional(), is_cli_session: z.boolean().optional(), source_kind: SourceKindSchema, is_messaging_session: IsMessagingSessionSchema, sort_ts: SortTsSchema, read_only: ReadOnlySchema, read_only_reason: ReadOnlyReasonSchema, owner_attachment: OwnerAttachmentSchema.optional(), can_branch: CanBranchSchema, can_pin: CanPinSchema, can_archive: CanArchiveSchema, can_delete: CanDeleteSchema, can_duplicate: CanDuplicateSchema, source_tag: NullableString.optional(),
|
|
335
|
+
enabled_toolsets: z.array(z.string()).nullable().optional(), composer_draft: ComposerDraftSchema.optional(), is_cli_session: z.boolean().optional(), source_kind: SourceKindSchema, is_messaging_session: IsMessagingSessionSchema, sort_ts: SortTsSchema, read_only: ReadOnlySchema, read_only_reason: ReadOnlyReasonSchema, owner_attachment: OwnerAttachmentSchema.optional(), can_branch: CanBranchSchema, can_pin: CanPinSchema, can_archive: CanArchiveSchema, can_delete: CanDeleteSchema, can_duplicate: CanDuplicateSchema, can_share: CanShareSchema, source_tag: NullableString.optional(),
|
|
326
336
|
can_compress: z.boolean().optional().describe('TAL-614: a manual compression would start now: writable, no running turn, and at least four model-history messages. Only the full session detail carries it; absent means no.'),
|
|
327
337
|
confirms_deep_truncate: z.boolean().optional().describe('TAL-929: this server holds a `session.truncate` that discards more than one user turn until it is confirmed; absent on older servers, which cut at once.'),
|
|
328
338
|
source_label: NullableString.optional(), session_source: NullableString.optional(), raw_source: NullableString.optional(), parent_session_id: NullableString.optional(), worktree_path: NullableString.optional(),
|
|
@@ -340,19 +350,23 @@ export const SessionSchema = z.looseObject({
|
|
|
340
350
|
/** The agent's display name: a named profile's own name, else the `bot_name` setting (TAL-458). */
|
|
341
351
|
assistant_name: z.string().optional(),
|
|
342
352
|
workspace_name: WorkspaceNameSchema,
|
|
343
|
-
compression_reference: CompressionReferenceSchema.nullable().optional(),
|
|
344
353
|
focus_path: NullableString.optional().describe('TAL-1458: the last non-null `focus_path` of the session\'s persisted tool calls, so a reopened chat shows its file before any stream event; null when none.'),
|
|
345
354
|
branched_from: BranchedFromSchema.nullable().optional().describe('TAL-454: the chat this one was branched from while it still loads (archived included); null for a compression continuation, a deleted or missing parent, and every other chat.'),
|
|
346
355
|
});
|
|
347
356
|
export const SessionEnvelopeSchema = z.looseObject({ session: SessionSchema });
|
|
357
|
+
/** TAL-1534: the sidebar group a listed row belongs to; `pinned` rows come first in the canonical order. */
|
|
358
|
+
export const SidebarGroupKindSchema = z.enum(['pinned', 'recent']);
|
|
359
|
+
/** One group present in a session list, with its English caption; clients localize the known kinds. */
|
|
360
|
+
export const SidebarGroupSchema = z.object({ kind: SidebarGroupKindSchema, title: z.string() });
|
|
348
361
|
/** Sidebar row from `GET /api/sessions`. */
|
|
349
362
|
export const SessionRowSchema = z.looseObject({
|
|
350
363
|
session_id: SessionIdSchema, title: z.string(), workspace: z.string().optional(), model: NullableString.optional(), created_at: UnixSeconds.optional(), updated_at: UnixSeconds.optional(), last_message_at: NullableNumber.optional(),
|
|
351
364
|
message_count: z.number().optional(), pinned: z.boolean().optional(), archived: z.boolean().optional(), project_id: NullableString.optional(), profile: NullableString.optional(), is_streaming: IsStreamingSchema,
|
|
352
|
-
is_cli_session: z.boolean().optional(), source_kind: SourceKindSchema, is_messaging_session: IsMessagingSessionSchema, sort_ts: SortTsSchema, cron_running: z.boolean().optional(), read_only: ReadOnlySchema, read_only_reason: ReadOnlyReasonSchema, owner_attachment: OwnerAttachmentSchema.optional(), can_branch: CanBranchSchema, can_pin: CanPinSchema, can_archive: CanArchiveSchema, can_delete: CanDeleteSchema, can_duplicate: CanDuplicateSchema, attention: z.looseObject({ kind: z.string().optional(), count: z.number().optional() }).nullable().optional(),
|
|
365
|
+
is_cli_session: z.boolean().optional(), source_kind: SourceKindSchema, is_messaging_session: IsMessagingSessionSchema, sort_ts: SortTsSchema, cron_running: z.boolean().optional(), read_only: ReadOnlySchema, read_only_reason: ReadOnlyReasonSchema, owner_attachment: OwnerAttachmentSchema.optional(), can_branch: CanBranchSchema, can_pin: CanPinSchema, can_archive: CanArchiveSchema, can_delete: CanDeleteSchema, can_duplicate: CanDuplicateSchema, can_share: CanShareSchema, attention: z.looseObject({ kind: z.string().optional(), count: z.number().optional() }).nullable().optional(),
|
|
353
366
|
source_tag: NullableString.optional(), source_label: NullableString.optional(), session_source: NullableString.optional(), raw_source: NullableString.optional(), parent_session_id: NullableString.optional(),
|
|
354
367
|
active_stream_id: ActiveStreamIdSchema, share_token: NullableString.optional(), share_url: NullableString.optional(), worktree_branch: NullableString.optional(), match_type: z.enum(['title', 'metadata', 'content']).optional(), match_preview: NullableString.optional(),
|
|
355
368
|
workspace_name: WorkspaceNameSchema,
|
|
369
|
+
sidebar_group: SidebarGroupKindSchema.nullable().optional().describe('TAL-1534: the sidebar group `GET /api/sessions` files the row under; null for an archived row. Other routes omit it.'),
|
|
356
370
|
...ContextUsageFields,
|
|
357
371
|
});
|
|
358
372
|
/**
|
|
@@ -368,6 +382,7 @@ export const SessionsListSchema = z.looseObject({
|
|
|
368
382
|
// TAL-482: sidebar counts for the "Scheduled sessions" / "Webhook sessions" groups; `_truncated` means more exist than are listed.
|
|
369
383
|
scheduled_session_count: z.number().int().nonnegative(), scheduled_sessions_truncated: z.boolean(),
|
|
370
384
|
webhook_session_count: z.number().int().nonnegative(), webhook_sessions_truncated: z.boolean(),
|
|
385
|
+
sidebar_groups: z.array(SidebarGroupSchema).describe('TAL-1534: the groups the unarchived `sessions` rows fill, in display order; a client captions only these.'),
|
|
371
386
|
agent_storage: AgentStorageSchema.describe('Agent session storage health; a degraded state explains an empty or missing Agent session list.'),
|
|
372
387
|
archived_limit: z.number().int().nullable().optional(), archived_offset: z.number().int().optional(),
|
|
373
388
|
});
|
|
@@ -376,7 +391,7 @@ export const SessionStatusSchema = z.looseObject({
|
|
|
376
391
|
session_id: SessionIdSchema, title: z.string().optional(), active_stream_id: ActiveStreamIdSchema, active_turn_origin: ActiveTurnOriginSchema, agent_running: IsStreamingSchema, is_streaming: IsStreamingSchema, read_only: ReadOnlySchema, read_only_reason: ReadOnlyReasonSchema, owner_attachment: OwnerAttachmentSchema.optional(), message_count: z.number().optional(), model: NullableString.optional(),
|
|
377
392
|
profile: NullableString.optional(), workspace: z.string().optional(), input_tokens: z.number().optional(), output_tokens: z.number().optional(), total_tokens: z.number().optional(), estimated_cost: NullableNumber.optional(), updated_at: UnixSeconds.optional(),
|
|
378
393
|
});
|
|
379
|
-
export const SessionUsageSchema = z.looseObject({ input_tokens: z.number().optional(), output_tokens: z.number().optional(), total_tokens: z.number().optional(), estimated_cost: NullableNumber.optional(), model: NullableString.optional() });
|
|
394
|
+
export const SessionUsageSchema = z.looseObject({ plan_gauge: PlanGaugeSchema.nullable().optional(), input_tokens: z.number().optional(), output_tokens: z.number().optional(), total_tokens: z.number().optional(), estimated_cost: NullableNumber.optional(), model: NullableString.optional() });
|
|
380
395
|
export const ProjectSchema = z.looseObject({ project_id: z.string(), name: z.string(), color: z.string().nullable().optional(), profile: NullableString.optional(), created_at: z.number().optional() });
|
|
381
396
|
export const ProjectsSchema = z.looseObject({ projects: z.array(ProjectSchema), active_profile: z.string(), all_profiles: z.boolean(), other_profile_count: z.number().int() });
|
|
382
397
|
export const SessionDeleteResultSchema = z.looseObject({ ok: z.literal(true), state_db_cleanup_failed: z.boolean().optional() });
|
|
@@ -547,13 +562,15 @@ export const QuotaThresholdsSchema = z.object({
|
|
|
547
562
|
pace_warning_burn_rate_percent: z.number().int().min(100).max(300), pace_critical_burn_rate_percent: z.number().int().min(100).max(400), pace_minimum_elapsed_hours: z.number().int().min(0).max(72),
|
|
548
563
|
});
|
|
549
564
|
export const LoginResponseSchema = z.looseObject({ ok: z.literal(true), message: z.string().optional() });
|
|
565
|
+
/** TAL-1569: Talaria Web update channels, in display order. Nightly is a daily snapshot of the Experimental artifact. */
|
|
566
|
+
export const WebUpdateChannelSchema = z.enum(['stable', 'nightly', 'experimental']);
|
|
550
567
|
export const SettingsSchema = z.looseObject({
|
|
551
568
|
bot_name: z.string().optional(), default_model: z.string().optional(), default_workspace: z.string().optional(), language: z.string().optional(), send_key: z.string().optional(), font_size: z.string().optional(),
|
|
552
569
|
full_width_chat: z.boolean().optional(), chat_width: z.enum(['comfortable', 'wide', 'full']).optional(), auto_scroll_follow: z.boolean().optional(), render_user_markdown: z.boolean().optional(), chat_activity_display_mode: z.string().optional(), default_message_mode: z.string().optional(),
|
|
553
570
|
fade_text_effect: z.boolean().optional(), hidden_tabs: z.array(z.string()).optional(), composer_control_order: z.array(z.string()).optional(), show_cli_sessions: z.boolean().optional(), show_claude_code_sessions: z.boolean().optional(),
|
|
554
|
-
show_cron_sessions: z.boolean().optional(), show_webhook_sessions: z.boolean().optional(), show_kanban_sessions: z.boolean().optional(), check_for_updates: z.boolean().optional(), summarize_updates_automatically: z.boolean().optional(), ignore_agent_updates: z.boolean().optional(),
|
|
571
|
+
show_cron_sessions: z.boolean().optional(), show_sidebar_feedback: z.boolean().optional().describe('TAL-1588: show Send feedback in the Web rail above Notifications.'), show_webhook_sessions: z.boolean().optional(), show_kanban_sessions: z.boolean().optional(), check_for_updates: z.boolean().optional(), summarize_updates_automatically: z.boolean().optional(), ignore_agent_updates: z.boolean().optional(),
|
|
555
572
|
auth_enabled: z.boolean().optional(), password_auth_enabled: z.boolean().optional(), password_env_var: z.boolean().optional(), passkeys_enabled: z.boolean().optional(), passwordless_enabled: z.boolean().optional(),
|
|
556
|
-
auth_disabled_acknowledged: z.boolean().optional(), webui_version: z.string().optional(), agent_version: z.string().optional(), update_channel: z.string().optional(), agent_update_channel: z.enum(['stable', 'experimental']).optional(), update_channel_version: NullableString.optional(),
|
|
573
|
+
auth_disabled_acknowledged: z.boolean().optional(), webui_version: z.string().optional(), agent_version: z.string().optional(), update_channel: z.string().optional(), update_channels: z.array(WebUpdateChannelSchema).optional().describe('TAL-1569: the Web update channels this server offers, in display order.'), agent_update_channel: z.enum(['stable', 'experimental']).optional(), update_channel_version: NullableString.optional(),
|
|
557
574
|
max_tokens: NullableNumber.optional(), max_tokens_effective: NullableNumber.optional(), max_tokens_fallback: NullableNumber.optional(), tts_engine: z.string().optional(), tts_voice: z.string().optional(),
|
|
558
575
|
dictation_append: z.boolean().optional(), persisted_speech_keys: z.array(z.string()).optional(),
|
|
559
576
|
/** TAL-279: ask before opening external chat links; `trusted_link_hosts` are exact, server-normalized hostnames that skip the ask. */
|
|
@@ -583,6 +600,7 @@ export const QuotaLevelSchema = z.enum(['healthy', 'warning', 'critical', 'stale
|
|
|
583
600
|
* TAL-807: `limit` is present while the provider's credential pool cannot serve this model until `resets_at` (ISO-8601 UTC).
|
|
584
601
|
*/
|
|
585
602
|
export const ModelEntrySchema = z.looseObject({
|
|
603
|
+
allowance: ModelAllowanceSchema.optional(),
|
|
586
604
|
id: z.string(), label: z.string().optional(), provider: z.string().optional(), provider_id: z.string().optional(), bare_id: z.string().optional(), supports_fast_tier: z.boolean().optional(), supported_speed_tiers: z.array(SpeedTierSchema).optional(),
|
|
587
605
|
limit: z.object({ scope: z.literal('model'), resets_at: z.string() }).optional(),
|
|
588
606
|
});
|
|
@@ -598,6 +616,7 @@ export const ModelGroupLimitSchema = z.discriminatedUnion('scope', [
|
|
|
598
616
|
*/
|
|
599
617
|
export const CatalogAvailabilitySchema = z.object({ status: z.enum(['available', 'stale', 'unavailable']), authoritative: z.boolean(), unavailable_reason: NullableString, generation: z.string().min(1).describe('Opaque source generation; cached data from another generation must never be merged.') });
|
|
600
618
|
export const ModelGroupSchema = z.looseObject({
|
|
619
|
+
plan_usage: PlanUsageSchema.nullable().optional(), plan_stale: z.boolean().optional(), sections: ModelSectionsSchema.optional(),
|
|
601
620
|
availability: CatalogAvailabilitySchema.optional(),
|
|
602
621
|
provider: z.string(), provider_id: z.string().optional(), models: z.array(ModelEntrySchema), extra_models: z.array(ModelEntrySchema).optional(),
|
|
603
622
|
limit: ModelGroupLimitSchema.optional(), quota_level: QuotaLevelSchema.optional(),
|
|
@@ -615,6 +634,7 @@ export const KeySourceKindSchema = z.enum(['env', 'oauth', 'config', 'pool', 'pl
|
|
|
615
634
|
export const ProviderSchema = z.looseObject({
|
|
616
635
|
id: z.string(), display_name: z.string().optional(), has_key: z.boolean().optional(), configured: z.boolean().optional(), configurable: z.boolean().optional(), is_oauth: z.boolean().optional(), is_plugin_provider: z.boolean().optional(), is_self_hosted: z.boolean().optional(),
|
|
617
636
|
is_custom: z.boolean().optional(), key_source: z.string().optional(), base_url: NullableString.optional(), auth_error: NullableString.optional(), env_var: NullableString.optional(), models: z.array(ModelEntrySchema).optional(), models_total: z.number().optional(),
|
|
637
|
+
nous_account: NousAccountSchema.nullable().optional(), nous_account_error: NullableString.optional(),
|
|
618
638
|
is_active: z.boolean().optional(), key_source_kind: KeySourceKindSchema.nullable().optional(), removable: z.boolean().optional(),
|
|
619
639
|
});
|
|
620
640
|
export const ProvidersSchema = z.looseObject({ availability: CatalogAvailabilitySchema.optional(), providers: z.array(ProviderSchema), active_provider: NullableString.optional() });
|
|
@@ -642,6 +662,7 @@ export const QuotaWindowSchema = z.looseObject({
|
|
|
642
662
|
});
|
|
643
663
|
const QuotaWindowIndex = z.number().int().nullable().optional();
|
|
644
664
|
export const QuotaSourceSchema = z.looseObject({
|
|
665
|
+
plan_usage: PlanUsageSchema.nullable().optional(), plan_stale: z.boolean().optional(),
|
|
645
666
|
computed_at: z.string().optional().describe('Original reference time of this source, retained with stale windows.'),
|
|
646
667
|
source_id: z.string(), provider_id: z.string().optional(), provider_label: z.string().optional(), account_label: z.string().optional(), status: z.string().optional(), supported: z.boolean().optional(), message: z.string().nullable().optional(),
|
|
647
668
|
is_active_provider: z.boolean().optional(), quota: Json.optional(), windows: z.array(QuotaWindowSchema).optional(), balances: Json.optional(), plan: Json.optional(), details: Json.optional(), unavailable_reason: Json.optional(), retry_after: Json.optional(), fetched_at: Json.optional(),
|
|
@@ -651,6 +672,7 @@ export const QuotaSourceSchema = z.looseObject({
|
|
|
651
672
|
});
|
|
652
673
|
/** An account-usage provider's normalised snapshot on `/api/provider/quota` (the same windows and indexes as a quotas source). */
|
|
653
674
|
export const QuotaAccountLimitsSchema = z.looseObject({
|
|
675
|
+
plan_usage: PlanUsageSchema.nullable().optional(), plan_stale: z.boolean().optional(),
|
|
654
676
|
available: z.boolean().optional(), stale: z.boolean().optional(), title: z.string().optional(), plan: Json.optional(), unavailable_reason: NullableString.optional(),
|
|
655
677
|
windows: z.array(QuotaWindowSchema), details: Json.optional(), fetched_at: NullableString.describe('ISO-8601 UTC.'),
|
|
656
678
|
pace_window_index: QuotaWindowIndex, session_window_index: QuotaWindowIndex, weekly_window_index: QuotaWindowIndex,
|
|
@@ -704,7 +726,7 @@ export const AuxiliaryTaskSchema = z.looseObject({
|
|
|
704
726
|
/** TAL-800: the reasoning effort the slot runs with (the Agent's default until one is saved; `''` = provider default); null when the Agent does not report its slots. */
|
|
705
727
|
reasoning_effort: z.string().nullable(),
|
|
706
728
|
});
|
|
707
|
-
export const AuxiliaryModelsSchema = z.looseObject({ main: z.looseObject({ model: z.string().optional(), provider: z.string().optional(), base_url: z.string().optional(), api_key_set: z.boolean().optional(), service_tier: z.enum(['', 'default', 'priority', 'ultrafast']).optional().describe('Empty string is the Standard value returned by older servers.'), supported_speed_tiers: z.array(SpeedTierSchema).optional() }), tasks: z.array(AuxiliaryTaskSchema) });
|
|
729
|
+
export const AuxiliaryModelsSchema = z.looseObject({ delegation: DelegationSettingsSchema.optional(), main: z.looseObject({ model: z.string().optional(), provider: z.string().optional(), base_url: z.string().optional(), api_key_set: z.boolean().optional(), service_tier: z.enum(['', 'default', 'priority', 'ultrafast']).optional().describe('Empty string is the Standard value returned by older servers.'), supported_speed_tiers: z.array(SpeedTierSchema).optional() }), tasks: z.array(AuxiliaryTaskSchema) });
|
|
708
730
|
export const MaxTokensSchema = z.looseObject({ max_tokens: NullableNumber, max_tokens_effective: NullableNumber, max_tokens_fallback: NullableNumber });
|
|
709
731
|
// ── workspaces, files, git ───────────────────────────────────────────────
|
|
710
732
|
/** A registry entry; `name` is never empty (the folder name when none is registered, `Home` for `default`), so pickers show it as-is (TAL-303). */
|
|
@@ -828,7 +850,7 @@ export const UpdateVersionSchema = z.object({
|
|
|
828
850
|
}).describe('TAL-946: one installable Stable release newer than the installed one.');
|
|
829
851
|
export const UpdateTargetSchema = z.looseObject({
|
|
830
852
|
failed_update: z.object({ version: z.string(), restored_version: z.string() }).optional().describe('Web only: the update that failed before HTTP readiness and the restored package version. Manual retry remains available.'),
|
|
831
|
-
name: z.string().optional(), channel:
|
|
853
|
+
name: z.string().optional(), channel: WebUpdateChannelSchema.optional(),
|
|
832
854
|
unsupported: z.boolean().optional().describe('Deprecated (TAL-350): `support === \'unchecked\'`, kept for older clients.'),
|
|
833
855
|
support: AgentSupportSchema.optional().describe('Agent target only (TAL-350): `supported` when the target revision is exactly a release in the verified Agent window, else `unchecked`; an `unchecked` apply requires `confirmed_agent_revision`.'),
|
|
834
856
|
support_label: z.string().optional().describe('Agent target only (TAL-946): `support` worded to fit one phone line.'),
|
|
@@ -979,7 +1001,11 @@ export const ConnectorViewSchema = z.object({
|
|
|
979
1001
|
* so no switch changes them. `sign_in_required` offers Nous sign-in without creating a guest on reads.
|
|
980
1002
|
* `rules_error`: why the rules could not be read; every app then reads off (fails closed).
|
|
981
1003
|
*/
|
|
982
|
-
export const
|
|
1004
|
+
export const ConnectorSignInOfferSchema = z.object({
|
|
1005
|
+
available: z.boolean(), due: z.boolean().describe('The native eligible due check at this read; an already delivered offer remains visible independently.'), visible: z.boolean(), offer_id: z.string().nullable(),
|
|
1006
|
+
actions: z.array(z.enum(['sign_in', 'dismiss'])), refresh_after: z.number().int().positive().nullable(),
|
|
1007
|
+
});
|
|
1008
|
+
export const ConnectorsPageSchema = z.object({ available: z.boolean(), sign_in_required: z.boolean().default(false), sign_in_offer: ConnectorSignInOfferSchema.optional(), connectors: z.array(ConnectorViewSchema), policy_revision: z.string().nullable(), rules_error: z.string().nullable() });
|
|
983
1009
|
/**
|
|
984
1010
|
* TAL-818: one app's tools: `enabled`: Hermes may use it (the member rules leave it on and nothing locks it); `locked`: an
|
|
985
1011
|
* organization or role rule (by name or tag) keeps it off. `editable`: its switch may change the member rule (readable rules, the app on in them, and no lock).
|
|
@@ -1016,8 +1042,6 @@ export const WikiStatusSchema = z.object({
|
|
|
1016
1042
|
});
|
|
1017
1043
|
export const WikiBrowseSchema = z.object({ pages: z.array(z.object({ name: z.string(), path: z.string(), size: z.number().int(), mtime: z.number().int() })) });
|
|
1018
1044
|
export const WikiPageSchema = z.object({ content: z.string(), path: z.string() });
|
|
1019
|
-
export const TodoItemSchema = z.looseObject({ id: z.union([z.string(), z.number()]).optional(), text: z.string().optional(), content: z.string().optional(), title: z.string().optional(), status: z.string().optional(), done: z.boolean().optional(), completed: z.boolean().optional() });
|
|
1020
|
-
export const TodoStateSchema = z.looseObject({ session_id: z.string().optional(), todos: z.array(TodoItemSchema).optional(), summary: z.record(z.string(), z.unknown()).optional(), version: z.number().optional(), ts: z.number().optional(), source: z.string().optional(), description: z.string().optional(), pending_count: z.number().optional() });
|
|
1021
1045
|
// ── onboarding ───────────────────────────────────────────────────────────
|
|
1022
1046
|
/** `oauth_flow` (TAL-398): `device_code` when the provider signs in through `/api/onboarding/oauth/*` instead of taking an API key; `oauth_label` then names the account to sign in with, and `signed_in` says whether the profile already holds its credential. */
|
|
1023
1047
|
export const OnboardingProviderSchema = z.looseObject({ id: z.string(), name: z.string().optional(), label: z.string().optional(), kind: z.string().optional(), oauth: z.boolean().optional(), needs_key: z.boolean().optional(), base_url: NullableString.optional(), models: z.array(Json).optional(), category: z.string().optional(), default_model: z.string().optional(), oauth_flow: z.literal('device_code').nullable().optional(), oauth_label: z.string().optional(), signed_in: z.boolean().optional() });
|
|
@@ -1036,6 +1060,7 @@ export const OnboardingProbeSchema = z.looseObject({ ok: z.boolean().optional(),
|
|
|
1036
1060
|
* `user_code`, `verification_url`, `expires_in` and `interval` (seconds between polls) come with the start.
|
|
1037
1061
|
*/
|
|
1038
1062
|
export const OnboardingOAuthSchema = z.looseObject({
|
|
1063
|
+
nous_account: NousAccountSchema.nullable().optional(),
|
|
1039
1064
|
ok: z.boolean().optional(), status: z.string().optional(), url: z.string().optional(), verification_url: z.string().optional(), user_code: z.string().optional(), message: z.string().optional(),
|
|
1040
1065
|
error: z.string().nullable().optional(), flow_id: z.string().optional(), provider: z.string().optional(), expires_in: z.number().int().optional(), interval: z.number().int().optional(),
|
|
1041
1066
|
/**
|