@cortex-agent/server 2026.10.15 → 2026.10.21
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/README.md +76 -50
- package/defaults/board/board.css +140 -62
- package/defaults/board/scaffold.html +36 -13
- package/defaults/config/environments/creative.json +0 -1
- package/defaults/config/environments/main.json +1 -2
- package/defaults/plugins/cortex-board/skills/board/SKILL.md +30 -22
- package/defaults/plugins/cortex-system/plugin.json +2 -2
- package/defaults/plugins/cortex-system/skills/browser/SKILL.md +56 -0
- package/dist/agent-adapter/claude/adapter.d.ts +2 -5
- package/dist/agent-adapter/claude/adapter.js +6 -5
- package/dist/agent-adapter/claude/assistant-blocks.d.ts +5 -0
- package/dist/agent-adapter/claude/assistant-blocks.js +61 -0
- package/dist/agent-adapter/claude/cache-refresh.d.ts +58 -0
- package/dist/agent-adapter/claude/cache-refresh.js +145 -0
- package/dist/agent-adapter/claude/cache-touch.d.ts +12 -0
- package/dist/agent-adapter/claude/cache-touch.js +75 -0
- package/dist/agent-adapter/claude/event-parser.d.ts +8 -3
- package/dist/agent-adapter/claude/event-parser.js +33 -17
- package/dist/agent-adapter/claude/event-translator.d.ts +2 -0
- package/dist/agent-adapter/claude/event-translator.js +2 -0
- package/dist/agent-adapter/claude/session-options.d.ts +6 -13
- package/dist/agent-adapter/claude/session-options.js +2 -13
- package/dist/agent-adapter/claude/spawn-args.d.ts +4 -21
- package/dist/agent-adapter/claude/spawn-args.js +17 -24
- package/dist/agent-adapter/claude/transcript-clear.d.ts +42 -0
- package/dist/agent-adapter/claude/transcript-clear.js +217 -0
- package/dist/agent-adapter/claude/turn-machine.d.ts +3 -2
- package/dist/agent-adapter/claude/turn-machine.js +21 -68
- package/dist/agent-adapter/claude/window-warmup.d.ts +13 -0
- package/dist/agent-adapter/claude/window-warmup.js +38 -0
- package/dist/agent-adapter/continuation-phase.js +3 -0
- package/dist/agent-adapter/normalize/event-types.d.ts +8 -0
- package/dist/agent-adapter/pi/adapter.d.ts +0 -1
- package/dist/agent-adapter/pi/adapter.js +5 -13
- package/dist/agent-adapter/pi/event-parser.d.ts +1 -1
- package/dist/agent-adapter/pi/event-parser.js +43 -27
- package/dist/agent-adapter/pi/mcp-bridge.d.ts +1 -1
- package/dist/agent-adapter/pi/pi-session.d.ts +2 -0
- package/dist/agent-adapter/pi/pi-session.js +15 -0
- package/dist/agent-adapter/pi/providers-config.d.ts +2 -2
- package/dist/agent-adapter/pi/providers-config.js +1 -1
- package/dist/agent-adapter/pi/quota-sink.d.ts +3 -3
- package/dist/agent-adapter/pi/quota-sink.js +3 -3
- package/dist/agent-adapter/pi/runtime.js +6 -1
- package/dist/agent-adapter/pi/session-options.d.ts +9 -13
- package/dist/agent-adapter/pi/session-options.js +12 -25
- package/dist/agent-adapter/run-events.d.ts +11 -10
- package/dist/agent-adapter/run-events.js +2 -0
- package/dist/agent-adapter/types.d.ts +5 -4
- package/dist/client-bundle/manifest.json +2 -2
- package/dist/core/codex-quota.d.ts +1 -1
- package/dist/core/codex-quota.js +1 -1
- package/dist/core/gateway-generator.d.ts +9 -11
- package/dist/core/gateway-generator.js +31 -58
- package/dist/core/locales/en.d.ts +51 -77
- package/dist/core/locales/slices/commands.d.ts +26 -31
- package/dist/core/locales/slices/commands.js +54 -64
- package/dist/core/locales/slices/init.d.ts +8 -19
- package/dist/core/locales/slices/init.js +17 -53
- package/dist/core/locales/slices/interactions.d.ts +3 -3
- package/dist/core/locales/slices/interactions.js +6 -6
- package/dist/core/locales/slices/notices.d.ts +1 -3
- package/dist/core/locales/slices/notices.js +2 -6
- package/dist/core/locales/slices/scheduling.d.ts +9 -9
- package/dist/core/locales/slices/scheduling.js +18 -18
- package/dist/core/locales/slices/status.d.ts +0 -4
- package/dist/core/locales/slices/status.js +0 -8
- package/dist/core/locales/slices/tui.d.ts +0 -1
- package/dist/core/locales/slices/tui.js +0 -2
- package/dist/core/locales/slices/uimsg.d.ts +4 -7
- package/dist/core/locales/slices/uimsg.js +9 -15
- package/dist/core/models-generator.d.ts +29 -0
- package/dist/core/models-generator.js +82 -0
- package/dist/core/paths.d.ts +1 -1
- package/dist/core/paths.js +1 -1
- package/dist/core/settings-spec.d.ts +25 -0
- package/dist/core/settings-spec.js +34 -0
- package/dist/core/status-format.d.ts +3 -2
- package/dist/core/status-format.js +2 -2
- package/dist/core/types/environment-types.d.ts +0 -2
- package/dist/domain/agents/agent-state.d.ts +11 -56
- package/dist/domain/agents/agent-state.js +48 -115
- package/dist/domain/agents/agent-switch.d.ts +2 -24
- package/dist/domain/agents/agent-switch.js +9 -72
- package/dist/domain/agents/config.d.ts +11 -61
- package/dist/domain/agents/config.js +47 -154
- package/dist/domain/agents/engine-selection.d.ts +21 -0
- package/dist/domain/agents/engine-selection.js +37 -0
- package/dist/domain/agents/environments/registry.js +2 -1
- package/dist/domain/agents/environments/resolve.js +0 -1
- package/dist/domain/agents/environments/schema.d.ts +0 -1
- package/dist/domain/agents/environments/schema.js +0 -1
- package/dist/domain/agents/index.d.ts +2 -1
- package/dist/domain/agents/index.js +3 -7
- package/dist/domain/agents/model-selection.d.ts +18 -70
- package/dist/domain/agents/model-selection.js +100 -150
- package/dist/domain/agents/models.d.ts +12 -0
- package/dist/domain/agents/models.js +94 -0
- package/dist/domain/agents/subagent/registry.d.ts +2 -0
- package/dist/domain/agents/subagent/registry.js +8 -0
- package/dist/domain/agents/subagent/runner.d.ts +5 -5
- package/dist/domain/agents/subagent/runner.js +12 -35
- package/dist/domain/auth/auth-status.d.ts +4 -4
- package/dist/domain/auth/auth-status.js +17 -28
- package/dist/domain/auth/gateway-sync.d.ts +6 -26
- package/dist/domain/auth/gateway-sync.js +31 -75
- package/dist/domain/benchmark/identity.d.ts +3 -5
- package/dist/domain/benchmark/identity.js +0 -1
- package/dist/domain/benchmark/production-attempt-identity.d.ts +6 -5
- package/dist/domain/benchmark/production-attempt-identity.js +32 -35
- package/dist/domain/benchmark/session-evidence.d.ts +2 -1
- package/dist/domain/benchmark/session-evidence.js +8 -1
- package/dist/domain/browser/broker.d.ts +99 -0
- package/dist/domain/browser/broker.js +487 -0
- package/dist/domain/costs/claude-account.js +21 -0
- package/dist/domain/costs/rate-limit-throttle.js +3 -1
- package/dist/domain/costs/reset-account.d.ts +2 -0
- package/dist/domain/costs/usage-service.d.ts +1 -1
- package/dist/domain/costs/usage-service.js +20 -7
- package/dist/domain/mcp/tools/context.d.ts +5 -6
- package/dist/domain/mcp/tools/context.js +17 -3
- package/dist/domain/mcp/tools/subagent.js +1 -1
- package/dist/domain/mcp/tools/ui-file.js +1 -1
- package/dist/domain/pi-providers/custom-provider-model.d.ts +1 -1
- package/dist/domain/pi-providers/custom-provider-model.js +1 -1
- package/dist/domain/remote/device-browser.js +1 -1
- package/dist/domain/remote/device-chrome-commands.js +2 -0
- package/dist/domain/remote/device-port.js +2 -2
- package/dist/domain/runs/attempt.d.ts +3 -3
- package/dist/domain/runs/attempt.js +2 -3
- package/dist/domain/runs/builders.d.ts +4 -4
- package/dist/domain/runs/builders.js +4 -5
- package/dist/domain/runs/compact.d.ts +4 -17
- package/dist/domain/runs/compact.js +14 -56
- package/dist/domain/runs/config-resolver.d.ts +15 -83
- package/dist/domain/runs/config-resolver.js +24 -150
- package/dist/domain/runs/engine-spec.d.ts +8 -8
- package/dist/domain/runs/engine-spec.js +15 -31
- package/dist/domain/runs/events.d.ts +1 -1
- package/dist/domain/runs/fallback.d.ts +6 -38
- package/dist/domain/runs/fallback.js +10 -72
- package/dist/domain/runs/notices.d.ts +1 -11
- package/dist/domain/runs/notices.js +3 -30
- package/dist/domain/runs/request.d.ts +4 -3
- package/dist/domain/runs/retryable-errors.d.ts +0 -13
- package/dist/domain/runs/retryable-errors.js +0 -17
- package/dist/domain/runs/run.d.ts +12 -42
- package/dist/domain/runs/run.js +40 -147
- package/dist/domain/runs/service.d.ts +1 -1
- package/dist/domain/runs/service.js +8 -3
- package/dist/domain/runs/spec-loader.d.ts +1 -1
- package/dist/domain/runs/spend.d.ts +1 -1
- package/dist/domain/runs/spend.js +1 -1
- package/dist/domain/scheduling/jobs/scheduled-task.d.ts +3 -2
- package/dist/domain/scheduling/jobs/scheduled-task.js +25 -19
- package/dist/domain/scheduling/schedule-ops.d.ts +0 -1
- package/dist/domain/scheduling/schedule-ops.js +2 -5
- package/dist/domain/scheduling/schedule-selection.d.ts +3 -0
- package/dist/domain/scheduling/schedule-selection.js +16 -0
- package/dist/domain/scheduling/schedule-spec.d.ts +6 -5
- package/dist/domain/scheduling/schedule-spec.js +6 -6
- package/dist/domain/scheduling/scheduler.d.ts +3 -1
- package/dist/domain/scheduling/scheduler.js +22 -21
- package/dist/domain/sessions/session-hooks.d.ts +5 -4
- package/dist/domain/sessions/session-hooks.js +15 -33
- package/dist/domain/sessions/session-lifecycle.d.ts +19 -51
- package/dist/domain/sessions/session-lifecycle.js +34 -96
- package/dist/domain/system/doctor.d.ts +3 -3
- package/dist/domain/system/doctor.js +22 -26
- package/dist/domain/system/own-bin-path.d.ts +13 -0
- package/dist/domain/system/own-bin-path.js +36 -0
- package/dist/domain/system/terminal-cli/index.d.ts +58 -0
- package/dist/domain/system/terminal-cli/index.js +100 -0
- package/dist/domain/system/terminal-cli/posix-profiles.d.ts +23 -0
- package/dist/domain/system/terminal-cli/posix-profiles.js +74 -0
- package/dist/domain/system/terminal-cli/registrar.d.ts +12 -0
- package/dist/domain/system/terminal-cli/registrar.js +1 -0
- package/dist/domain/system/terminal-cli/shims.d.ts +27 -0
- package/dist/domain/system/terminal-cli/shims.js +108 -0
- package/dist/domain/system/terminal-cli/state.d.ts +7 -0
- package/dist/domain/system/terminal-cli/state.js +36 -0
- package/dist/domain/system/terminal-cli/windows-user-path.d.ts +13 -0
- package/dist/domain/system/terminal-cli/windows-user-path.js +67 -0
- package/dist/domain/tui-session/tui-session-service.js +1 -1
- package/dist/domain/tui-session/types.d.ts +2 -2
- package/dist/domain/ui-service/app-router.d.ts +49 -71
- package/dist/domain/ui-service/app-router.js +9 -13
- package/dist/domain/ui-service/assistant-snapshots.js +2 -0
- package/dist/domain/ui-service/contract.parity.d.ts +19 -0
- package/dist/domain/ui-service/contract.parity.js +1 -0
- package/dist/domain/ui-service/inline-media-types.d.ts +18 -0
- package/dist/domain/ui-service/inline-media-types.js +1 -0
- package/dist/domain/ui-service/input-schemas.d.ts +52 -115
- package/dist/domain/ui-service/input-schemas.js +38 -84
- package/dist/domain/ui-service/mutate/auth.d.ts +1 -1
- package/dist/domain/ui-service/mutate/auth.js +3 -2
- package/dist/domain/ui-service/mutate/config.d.ts +0 -8
- package/dist/domain/ui-service/mutate/config.js +0 -22
- package/dist/domain/ui-service/mutate/models.d.ts +13 -0
- package/dist/domain/ui-service/mutate/models.js +137 -0
- package/dist/domain/ui-service/mutate/resolve-media.d.ts +4 -0
- package/dist/domain/ui-service/mutate/resolve-media.js +17 -0
- package/dist/domain/ui-service/mutate/sessions.d.ts +2 -2
- package/dist/domain/ui-service/mutate/sessions.js +29 -126
- package/dist/domain/ui-service/query/config.js +22 -42
- package/dist/domain/ui-service/query/models.js +2 -2
- package/dist/domain/ui-service/query/schedules.js +1 -1
- package/dist/domain/ui-service/query/sessions.js +7 -13
- package/dist/domain/ui-service/types.d.ts +51 -177
- package/dist/domain/ui-service/ui-service.d.ts +23 -49
- package/dist/domain/ui-service/ui-service.js +8 -6
- package/dist/entry/app.js +42 -19
- package/dist/entry/browser-cli.d.ts +39 -0
- package/dist/entry/browser-cli.js +317 -0
- package/dist/entry/cli-help.d.ts +1 -0
- package/dist/entry/cli-help.js +37 -6
- package/dist/entry/cli.js +16 -14
- package/dist/entry/daemon.js +2 -0
- package/dist/entry/init-auth.js +1 -1
- package/dist/entry/init.d.ts +7 -8
- package/dist/entry/init.js +89 -249
- package/dist/entry/path-cli.d.ts +4 -0
- package/dist/entry/path-cli.js +65 -0
- package/dist/entry/schedule-cli.js +13 -6
- package/dist/entry/shutdown.d.ts +1 -1
- package/dist/entry/shutdown.js +8 -1
- package/dist/entry/start-ui-http.js +8 -0
- package/dist/entry/ui-service-wiring.js +8 -10
- package/dist/events/event-types.d.ts +3 -2
- package/dist/orchestration/agent-runner.d.ts +2 -2
- package/dist/orchestration/agent-runner.js +10 -9
- package/dist/orchestration/benchmark-session-webhook.js +13 -1
- package/dist/orchestration/browser-webhook.d.ts +11 -0
- package/dist/orchestration/browser-webhook.js +28 -0
- package/dist/orchestration/cache-keep-warm.d.ts +77 -0
- package/dist/orchestration/cache-keep-warm.js +213 -0
- package/dist/orchestration/claude-window-warmup.d.ts +40 -0
- package/dist/orchestration/claude-window-warmup.js +126 -0
- package/dist/orchestration/conversation-request.d.ts +6 -10
- package/dist/orchestration/conversation-request.js +5 -23
- package/dist/orchestration/delta-coalescer.d.ts +4 -2
- package/dist/orchestration/delta-coalescer.js +5 -5
- package/dist/orchestration/edit-retry.js +9 -11
- package/dist/orchestration/inline-media-eager.d.ts +13 -0
- package/dist/orchestration/inline-media-eager.js +58 -0
- package/dist/orchestration/inline-media.d.ts +22 -0
- package/dist/orchestration/inline-media.js +151 -0
- package/dist/orchestration/interactions/ask-user-resume.js +3 -7
- package/dist/orchestration/interactions/interaction-handlers.js +6 -6
- package/dist/orchestration/mid-turn-inject.d.ts +2 -1
- package/dist/orchestration/mid-turn-inject.js +1 -1
- package/dist/orchestration/pending-injection-recovery.d.ts +2 -1
- package/dist/orchestration/pending-injection-recovery.js +1 -1
- package/dist/orchestration/routing/commands/index.js +4 -4
- package/dist/orchestration/routing/commands/mode.d.ts +5 -44
- package/dist/orchestration/routing/commands/mode.js +98 -272
- package/dist/orchestration/routing/commands/schedule.js +29 -18
- package/dist/orchestration/routing/commands/session.js +9 -9
- package/dist/orchestration/routing/commands/status.js +1 -1
- package/dist/orchestration/routing/commands/usage-format.js +3 -0
- package/dist/orchestration/routing/webhook.js +4 -0
- package/dist/orchestration/session-compact.d.ts +0 -1
- package/dist/orchestration/session-compact.js +5 -7
- package/dist/orchestration/session-events.d.ts +2 -1
- package/dist/orchestration/session-events.js +1 -0
- package/dist/orchestration/status-helpers.d.ts +0 -4
- package/dist/orchestration/status-helpers.js +0 -18
- package/dist/orchestration/subagent-webhook.js +9 -34
- package/dist/orchestration/team-webhook.d.ts +8 -9
- package/dist/orchestration/team-webhook.js +16 -42
- package/dist/orchestration/transcript-sink.d.ts +6 -0
- package/dist/orchestration/transcript-sink.js +21 -2
- package/dist/orchestration/turn/terminal.js +7 -7
- package/dist/orchestration/turn/turn-prep.d.ts +0 -8
- package/dist/orchestration/turn/turn-prep.js +0 -51
- package/dist/orchestration/turn/turn-tracking.d.ts +2 -2
- package/dist/orchestration/turn/turn-tracking.js +8 -5
- package/dist/orchestration/turn/turn.d.ts +0 -2
- package/dist/orchestration/turn/turn.js +13 -15
- package/dist/platform/adapters/tui/ports.d.ts +1 -1
- package/dist/platform/adapters/tui/tui-transcript.js +2 -0
- package/dist/platform/browser/agent-browser.d.ts +50 -0
- package/dist/platform/browser/agent-browser.js +165 -0
- package/dist/platform/browser/managed-browser.d.ts +1 -11
- package/dist/platform/browser/managed-browser.js +4 -12
- package/dist/platform/ui-http/browser-stream.d.ts +110 -0
- package/dist/platform/ui-http/browser-stream.js +447 -0
- package/dist/platform/ui-http/ui-http-server.d.ts +12 -0
- package/dist/platform/ui-http/ui-http-server.js +23 -6
- package/dist/store/conversation-history-reader.js +8 -0
- package/dist/store/conversation-history-repo.d.ts +8 -1
- package/dist/store/conversation-history-repo.js +5 -0
- package/dist/store/conversation-ledger-repo.d.ts +6 -6
- package/dist/store/conversation-ledger-repo.js +4 -4
- package/dist/store/models-repo.d.ts +18 -0
- package/dist/store/models-repo.js +74 -0
- package/dist/store/pending-injection-repo.d.ts +2 -1
- package/dist/store/pending-injection-repo.js +3 -1
- package/dist/store/retire-profiles-migration.d.ts +28 -0
- package/dist/store/retire-profiles-migration.js +335 -0
- package/dist/store/schedule-repo.d.ts +2 -1
- package/dist/store/session-registry-import.js +3 -2
- package/dist/store/session-registry-journal.d.ts +10 -13
- package/dist/store/session-registry-journal.js +48 -25
- package/dist/store/session-registry-repo.d.ts +4 -4
- package/dist/store/session-registry-repo.js +4 -5
- package/dist/store/version-migrations.d.ts +2 -3
- package/dist/store/version-migrations.js +19 -3
- package/dist/tui/slash-commands.js +2 -2
- package/dist/tui/turn-status.js +1 -1
- package/package.json +6 -4
- package/web/dist/assets/board-math-css-CB4GJ6qO.js +2 -0
- package/web/dist/assets/index-CaSZPg_H.css +1 -0
- package/web/dist/assets/index-CzOR7Edh.js +522 -0
- package/web/dist/assets/{index-CndZZ1IQ.js → index-cIGFv27z.js} +1 -1
- package/web/dist/index.html +3 -2
- package/web/dist/theme.css +6 -0
- package/dist/agent-adapter/browser-mcp-server.d.ts +0 -13
- package/dist/agent-adapter/browser-mcp-server.js +0 -28
- package/dist/agent-adapter/claude/browser-mcp.d.ts +0 -9
- package/dist/agent-adapter/claude/browser-mcp.js +0 -10
- package/dist/core/profile-generator.d.ts +0 -79
- package/dist/core/profile-generator.js +0 -215
- package/dist/domain/agents/profile-manager.d.ts +0 -103
- package/dist/domain/agents/profile-manager.js +0 -286
- package/dist/domain/agents/profile-switch.d.ts +0 -49
- package/dist/domain/agents/profile-switch.js +0 -62
- package/dist/domain/ui-service/mutate/profiles.d.ts +0 -36
- package/dist/domain/ui-service/mutate/profiles.js +0 -151
- package/dist/store/profile-repo.d.ts +0 -20
- package/dist/store/profile-repo.js +0 -97
- package/web/dist/assets/index-B76ueW3q.js +0 -494
- package/web/dist/assets/index-C8O0yxg8.css +0 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { PlatformSettingsSnapshot } from '../../core/platform-settings-spec.js';
|
|
2
2
|
export type { PlatformSettingsPatch, PlatformSettingsSnapshot, PlatformFieldSnapshot, PlatformFieldKey } from '../../core/platform-settings-spec.js';
|
|
3
|
+
import type { ResolveMediaInput, ResolveMediaResult } from './inline-media-types.js';
|
|
4
|
+
export type { InlineMediaErrorCode, ResolveMediaInput, ResolveMediaResult } from './inline-media-types.js';
|
|
3
5
|
import type { SessionsSetStarredReturn, SessionsRenameReturn } from './session-metadata-schemas.js';
|
|
4
6
|
export type { SessionsSetStarredArgs, SessionsSetStarredReturn, SessionsRenameArgs, SessionsRenameReturn, } from './session-metadata-schemas.js';
|
|
5
7
|
import type { z } from 'zod';
|
|
8
|
+
import type { EngineSelection, ModelRef } from '../agents/engine-selection.js';
|
|
9
|
+
export type { EngineSelection, ModelRef } from '../agents/engine-selection.js';
|
|
6
10
|
import type { queryInputSchemas, mutateInputSchemas } from './input-schemas.js';
|
|
7
11
|
import type { Project, CreateProjectResult } from '../projects/index.js';
|
|
8
12
|
import type { CostSummary } from '../costs/cost-tracker.js';
|
|
@@ -104,7 +108,8 @@ export interface AuthSyncGatewayReturn {
|
|
|
104
108
|
/** False when nothing was written (see `reason`); not an error. */
|
|
105
109
|
configured: boolean;
|
|
106
110
|
endpoints: number;
|
|
107
|
-
|
|
111
|
+
defaultSet: boolean;
|
|
112
|
+
favorites: ModelRef[];
|
|
108
113
|
reason?: string;
|
|
109
114
|
}
|
|
110
115
|
export interface AuthRemoveCustomProviderReturn {
|
|
@@ -116,16 +121,6 @@ export interface SessionsMarkManyReadReturn {
|
|
|
116
121
|
* are skipped rather than failing the batch. */
|
|
117
122
|
marked: number;
|
|
118
123
|
}
|
|
119
|
-
/** The part of a session's engine selection that came from the user rather than from its profile.
|
|
120
|
-
* Every field is optional: a session may override only its thinking level, only its model, or any
|
|
121
|
-
* mix. Backend is never here — it belongs to the profile (and a live conversation cannot change it). */
|
|
122
|
-
export interface SessionSelectionOverride {
|
|
123
|
-
model?: string;
|
|
124
|
-
provider?: string;
|
|
125
|
-
thinking?: string;
|
|
126
|
-
/** Which gateway route of the profile's endpoint bills the turn — anthropic `plan` vs `api`. */
|
|
127
|
-
mode?: string;
|
|
128
|
-
}
|
|
129
124
|
/** Return of sessions.answerQuestion / sessions.respondPlan. 'already-resolved' means another
|
|
130
125
|
* client (or Slack / timeout) resolved the interaction first — not an error; the caller
|
|
131
126
|
* refetches the transcript to show the final state. */
|
|
@@ -157,23 +152,9 @@ export interface ProviderRateLimitPolicy {
|
|
|
157
152
|
enabled: boolean;
|
|
158
153
|
threshold: number | null;
|
|
159
154
|
}
|
|
160
|
-
export interface
|
|
161
|
-
model: string;
|
|
162
|
-
backend?: Backend;
|
|
163
|
-
mode?: string;
|
|
164
|
-
provider?: string;
|
|
165
|
-
thinking?: string;
|
|
166
|
-
extraOption?: Record<string, string>;
|
|
167
|
-
}
|
|
168
|
-
export interface ProfilesCreateReturn {
|
|
169
|
-
name: string;
|
|
170
|
-
}
|
|
171
|
-
export interface ProfilesUpdateReturn {
|
|
155
|
+
export interface ModelsMutationReturn {
|
|
172
156
|
changed: boolean;
|
|
173
157
|
}
|
|
174
|
-
export interface ProfilesRemoveReturn {
|
|
175
|
-
removed: boolean;
|
|
176
|
-
}
|
|
177
158
|
export interface ProjectConduitInfo {
|
|
178
159
|
id: string;
|
|
179
160
|
kind: 'research' | 'general';
|
|
@@ -218,27 +199,16 @@ export interface SessionInfo {
|
|
|
218
199
|
starred?: boolean;
|
|
219
200
|
/** Explicitly renamed labels take precedence over generated scheduled-run titles. */
|
|
220
201
|
labelRenamed?: boolean;
|
|
221
|
-
/**
|
|
222
|
-
|
|
223
|
-
profileName: string | null;
|
|
202
|
+
/** Complete engine choice persisted with the session. */
|
|
203
|
+
selection: EngineSelection | null;
|
|
224
204
|
/** The agent template the session runs as — its environment (prompt, tools, skills, rules), the
|
|
225
205
|
* other half of "what will the next turn be". Null when the session follows its channel's
|
|
226
206
|
* selection and, beneath that, the global default. Kept in sync by the agent-switch rule. */
|
|
227
207
|
agentName?: string | null;
|
|
228
|
-
/** What the user selected on top of that profile (model / provider / thinking), or null when the
|
|
229
|
-
* session runs its profile as declared. The composer needs both halves to show what the next turn
|
|
230
|
-
* will actually run; the profile alone would lie whenever a model was picked. */
|
|
231
|
-
selectionOverride?: SessionSelectionOverride | null;
|
|
232
|
-
/** Browser control this session opted into at creation, or null. Fixed for the session's life:
|
|
233
|
-
* the agent's tool set is decided when its process spawns, so this is a fact to display, not a
|
|
234
|
-
* setting to flip. */
|
|
235
|
-
browser?: {
|
|
236
|
-
device: string;
|
|
237
|
-
} | null;
|
|
238
208
|
/** Latest backend context occupancy, or null until a supported backend reports one. Optional only
|
|
239
209
|
* for rolling compatibility with older servers/fixtures; current sessions.list always supplies it. */
|
|
240
210
|
contextUsage?: SessionContextUsage | null;
|
|
241
|
-
/**
|
|
211
|
+
/** Whether this backend supports manual context compaction. */
|
|
242
212
|
contextCompactionSupported?: boolean;
|
|
243
213
|
/** The agent's latest task list, or null when it has not written one. Queryable snapshot half of
|
|
244
214
|
* snapshot+delta — `session.todos` is the delta. Live state, not persisted: a server restart
|
|
@@ -361,7 +331,8 @@ export interface TranscriptMessage {
|
|
|
361
331
|
/** `worker-progress`: a team worker's final reply for a turn that ended while it still had work
|
|
362
332
|
* pending (queued message, background task, open waitpoint or interaction). Recorded in the
|
|
363
333
|
* LEAD's history for display only: it never reaches the lead model and is not a user turn. */
|
|
364
|
-
type: 'user' | 'assistant' | 'tool' | 'interaction' | 'worker-progress';
|
|
334
|
+
type: 'user' | 'assistant' | 'thinking' | 'tool' | 'interaction' | 'worker-progress';
|
|
335
|
+
blockId?: string;
|
|
365
336
|
/** user / assistant / interaction / worker-progress text; null for tool events. */
|
|
366
337
|
text: string | null;
|
|
367
338
|
/** tool name (tool events only). */
|
|
@@ -491,9 +462,8 @@ export interface ScheduleInfo {
|
|
|
491
462
|
type: 'interval' | 'daily' | 'weekly' | 'once';
|
|
492
463
|
message: string;
|
|
493
464
|
projectId: string;
|
|
494
|
-
/**
|
|
495
|
-
|
|
496
|
-
profile: string | null;
|
|
465
|
+
/** Complete engine choice materialized when the schedule is created. */
|
|
466
|
+
selection: EngineSelection | null;
|
|
497
467
|
nextRun: string | null;
|
|
498
468
|
lastRun: string | null;
|
|
499
469
|
paused: boolean;
|
|
@@ -650,32 +620,19 @@ export interface ConfigBudget {
|
|
|
650
620
|
* surfaced as a partially-null override. */
|
|
651
621
|
projects: Record<string, BudgetValue>;
|
|
652
622
|
}
|
|
653
|
-
export interface
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
/** Rate-limit provider identity; required by profiles whose effective backend is 'pi'. */
|
|
661
|
-
provider: string | null;
|
|
662
|
-
/** Extra CLI flags (keys start with '--'). Returned in full — the editor must round-trip them. */
|
|
663
|
-
extraOption: Record<string, string>;
|
|
664
|
-
/** KEYS ONLY of `extraEnv`. Values are environment injection and may hold a token, so they are
|
|
665
|
-
* never returned; an edit preserves the stored values untouched. */
|
|
666
|
-
extraEnvKeys: string[];
|
|
667
|
-
/** Number of declared fallback entries. The fallback chain itself is not editable from the UI. */
|
|
668
|
-
fallbackCount: number;
|
|
669
|
-
}
|
|
670
|
-
export interface ConfigProfiles {
|
|
671
|
-
defaultProfile: string | null;
|
|
672
|
-
profiles: ConfigProfileEntry[];
|
|
623
|
+
export interface ConfigModels {
|
|
624
|
+
default: EngineSelection | null;
|
|
625
|
+
favorites: ModelRef[];
|
|
626
|
+
memory: Record<string, {
|
|
627
|
+
thinking: string | null;
|
|
628
|
+
mode: string;
|
|
629
|
+
}>;
|
|
673
630
|
}
|
|
674
631
|
export interface ModelCatalogRoute {
|
|
675
632
|
/** Gateway endpoint group: 'anthropic' for claude, the PI provider name otherwise. */
|
|
676
633
|
endpoint: string;
|
|
677
634
|
backend: Backend;
|
|
678
|
-
/** PI `--provider`; null for claude
|
|
635
|
+
/** PI `--provider`; null for claude. */
|
|
679
636
|
provider: string | null;
|
|
680
637
|
/** Mode names gateway.yaml actually declares for this endpoint, in file order. Never empty: an
|
|
681
638
|
* endpoint with no gateway section falls back to the name `discoverEndpoints` would generate. */
|
|
@@ -696,7 +653,7 @@ export interface ModelCatalogSnapshot {
|
|
|
696
653
|
/** True while PI's first model scan is still in flight — the client may refetch shortly. */
|
|
697
654
|
piPending: boolean;
|
|
698
655
|
/** The backend-wide thinking ladders, served so a picker does not keep a second copy of the
|
|
699
|
-
* table the
|
|
656
|
+
* table the selection validator already enforces. Optional for the same roll-skew reason as
|
|
700
657
|
* `modelThinking`. */
|
|
701
658
|
thinkingLevels?: Record<Backend, string[]>;
|
|
702
659
|
}
|
|
@@ -710,13 +667,10 @@ export interface ConfigMachine {
|
|
|
710
667
|
export interface ConfigMcp {
|
|
711
668
|
servers: string[];
|
|
712
669
|
}
|
|
713
|
-
/** One execution environment (`config/environments/`)
|
|
714
|
-
* which profile it pins (or `__active__` — it runs whatever the conversation's own profile
|
|
715
|
-
* resolves to). */
|
|
670
|
+
/** One execution environment (`config/environments/`) offered by the picker. */
|
|
716
671
|
export interface ConfigAgentEntry {
|
|
717
672
|
name: string;
|
|
718
673
|
description?: string;
|
|
719
|
-
profile: string;
|
|
720
674
|
}
|
|
721
675
|
export interface ConfigEnvEntry {
|
|
722
676
|
key: string;
|
|
@@ -827,19 +781,14 @@ export interface HooksTestReturn {
|
|
|
827
781
|
stderr: string;
|
|
828
782
|
error: string | null;
|
|
829
783
|
}
|
|
830
|
-
/**
|
|
831
|
-
|
|
832
|
-
* nobody has picked anything yet — the composer then falls back to the default profile. */
|
|
833
|
-
export interface ConfigSelectionDefault extends SessionSelectionOverride {
|
|
834
|
-
profileName?: string;
|
|
835
|
-
/** The agent the last composer pick ran as — a draft opens in the environment the previous
|
|
836
|
-
* conversation was working in, the same way it opens on its profile. */
|
|
784
|
+
/** Last composer choice; absent state falls back to models.default. */
|
|
785
|
+
export interface ConfigSelectionDefault extends EngineSelection {
|
|
837
786
|
agentName?: string;
|
|
838
787
|
}
|
|
839
788
|
export interface ConfigSnapshot {
|
|
840
789
|
platforms?: PlatformSettingsSnapshot[];
|
|
841
790
|
budget: ConfigBudget | null;
|
|
842
|
-
|
|
791
|
+
models: ConfigModels;
|
|
843
792
|
machines: ConfigMachine[];
|
|
844
793
|
mcp: ConfigMcp | null;
|
|
845
794
|
/** The execution environments a composer may pick from, with what each one is and pins. Always
|
|
@@ -857,9 +806,8 @@ export interface ConfigSnapshot {
|
|
|
857
806
|
* falls back to its local cache.
|
|
858
807
|
*/
|
|
859
808
|
lang?: ConfigLang;
|
|
860
|
-
/** Seed for a draft composer — see {@link ConfigSelectionDefault}.
|
|
861
|
-
|
|
862
|
-
selectionDefault?: ConfigSelectionDefault | null;
|
|
809
|
+
/** Seed for a draft composer — see {@link ConfigSelectionDefault}. */
|
|
810
|
+
selectionDefault: ConfigSelectionDefault | null;
|
|
863
811
|
}
|
|
864
812
|
export interface ConfigLang {
|
|
865
813
|
value: 'en' | 'zh';
|
|
@@ -1339,34 +1287,12 @@ export interface SessionsCompactReturn {
|
|
|
1339
1287
|
status: 'compacted' | 'not-needed';
|
|
1340
1288
|
contextUsage: SessionContextUsage | null;
|
|
1341
1289
|
}
|
|
1342
|
-
export interface SessionsSetProfileReturn {
|
|
1343
|
-
/** The profile now active on the session. */
|
|
1344
|
-
profileName: string;
|
|
1345
|
-
/** True when the switch moved to a different backend (only possible on a session with no history). */
|
|
1346
|
-
backendChanged: boolean;
|
|
1347
|
-
}
|
|
1348
1290
|
export interface SessionsSetAgentReturn {
|
|
1349
|
-
/** The
|
|
1291
|
+
/** The selected environment; null follows the global default agent. */
|
|
1350
1292
|
agentName: string | null;
|
|
1351
|
-
/** The profile that agent will run under — its own when it pins one, the channel's otherwise.
|
|
1352
|
-
* For display: the switch never writes the channel's profile. */
|
|
1353
|
-
profileName: string;
|
|
1354
|
-
/** True when the switch moved to a different backend (only possible on a session with no history). */
|
|
1355
|
-
backendChanged: boolean;
|
|
1356
1293
|
}
|
|
1357
|
-
/**
|
|
1358
|
-
|
|
1359
|
-
export interface SessionsSetSelectionReturn {
|
|
1360
|
-
profileName: string;
|
|
1361
|
-
backend: Backend;
|
|
1362
|
-
model: string;
|
|
1363
|
-
provider: string | null;
|
|
1364
|
-
thinking: string | null;
|
|
1365
|
-
/** The gateway route the next turn bills to. */
|
|
1366
|
-
mode: string;
|
|
1367
|
-
/** The fields that came from the selection rather than from the profile. Null when the session
|
|
1368
|
-
* runs its profile as declared. */
|
|
1369
|
-
override: SessionSelectionOverride | null;
|
|
1294
|
+
/** Effective engine choice after the mutation. */
|
|
1295
|
+
export interface SessionsSetSelectionReturn extends EngineSelection {
|
|
1370
1296
|
backendChanged: boolean;
|
|
1371
1297
|
}
|
|
1372
1298
|
export interface SessionsCreateAndSendReturn {
|
|
@@ -1385,7 +1311,7 @@ export interface WaitpointsCancelReturn {
|
|
|
1385
1311
|
}
|
|
1386
1312
|
export interface ConfigSetReturn {
|
|
1387
1313
|
written: true;
|
|
1388
|
-
section: 'budget' | '
|
|
1314
|
+
section: 'budget' | 'settings' | 'preferences';
|
|
1389
1315
|
}
|
|
1390
1316
|
export interface ConfigSetProviderRateLimitPolicyReturn {
|
|
1391
1317
|
written: true;
|
|
@@ -1472,7 +1398,6 @@ export interface MutateReturnMap {
|
|
|
1472
1398
|
'sessions.send': SessionsSendReturn;
|
|
1473
1399
|
'sessions.cancel': SessionsCancelReturn;
|
|
1474
1400
|
'sessions.compact': SessionsCompactReturn;
|
|
1475
|
-
'sessions.setProfile': SessionsSetProfileReturn;
|
|
1476
1401
|
'sessions.setAgent': SessionsSetAgentReturn;
|
|
1477
1402
|
'sessions.setSelection': SessionsSetSelectionReturn;
|
|
1478
1403
|
'sessions.createAndSend': SessionsCreateAndSendReturn;
|
|
@@ -1485,6 +1410,7 @@ export interface MutateReturnMap {
|
|
|
1485
1410
|
'sessions.respondDecision': SessionsRespondDecisionReturn;
|
|
1486
1411
|
'sessions.cancelResume': SessionsCancelResumeReturn;
|
|
1487
1412
|
'sessions.rewind': SessionsRewindReturn;
|
|
1413
|
+
'sessions.resolveMedia': ResolveMediaResult;
|
|
1488
1414
|
'executions.cancel': ExecutionsCancelReturn;
|
|
1489
1415
|
'waitpoints.cancel': WaitpointsCancelReturn;
|
|
1490
1416
|
'schedules.pause': void;
|
|
@@ -1521,9 +1447,10 @@ export interface MutateReturnMap {
|
|
|
1521
1447
|
'hooks.setEnabled': HooksSetEnabledReturn;
|
|
1522
1448
|
'hooks.remove': HooksRemoveReturn;
|
|
1523
1449
|
'hooks.test': HooksTestReturn;
|
|
1524
|
-
'
|
|
1525
|
-
'
|
|
1526
|
-
'
|
|
1450
|
+
'models.favorites.add': ModelsMutationReturn;
|
|
1451
|
+
'models.favorites.remove': ModelsMutationReturn;
|
|
1452
|
+
'models.setDefault': ModelsMutationReturn;
|
|
1453
|
+
'models.setThinking': ModelsMutationReturn;
|
|
1527
1454
|
'plugins.assign': PluginsAssignReturn;
|
|
1528
1455
|
'plugins.skillWrite': PluginsSkillWriteReturn;
|
|
1529
1456
|
'plugins.skillCreate': PluginsSkillReturn;
|
|
@@ -1558,13 +1485,15 @@ export interface UiService {
|
|
|
1558
1485
|
};
|
|
1559
1486
|
}
|
|
1560
1487
|
export interface UiServiceDeps {
|
|
1488
|
+
/** Entry-layer callback: domain handlers never import orchestration. */
|
|
1489
|
+
resolveMedia: (input: ResolveMediaInput) => Promise<ResolveMediaResult>;
|
|
1561
1490
|
/** Shared with background timers; bounded discovery, never waits for update consent. */
|
|
1562
1491
|
checkServerUpdate: () => Promise<SystemUpdateCheckResult>;
|
|
1563
1492
|
/** Optional seams for deterministic authentication dispatch tests. */
|
|
1564
1493
|
getAuthStatus?: () => Promise<AuthStatusSnapshot>;
|
|
1565
1494
|
authLogin?: AuthLoginService;
|
|
1566
1495
|
logoutAccount?: (input: LogoutAccountInput) => Promise<AuthLogoutResult>;
|
|
1567
|
-
/** Re-derives gateway
|
|
1496
|
+
/** Re-derives gateway routes and favorites; defaults to discovery-backed sync. */
|
|
1568
1497
|
syncGateway?: (options: {
|
|
1569
1498
|
backends?: string[];
|
|
1570
1499
|
}) => Promise<AuthSyncGatewayReturn>;
|
|
@@ -1593,10 +1522,8 @@ export interface UiServiceDeps {
|
|
|
1593
1522
|
setStarred(sessionId: string, starred: boolean): Promise<Session | null>;
|
|
1594
1523
|
rename(sessionId: string, label: string): Promise<Session | null>;
|
|
1595
1524
|
};
|
|
1596
|
-
/** Capability hint for sessions.list; execution revalidates inside orchestration.
|
|
1597
|
-
|
|
1598
|
-
* instead of once per row. */
|
|
1599
|
-
supportsSessionCompaction: (session: Pick<Session, 'backend' | 'profileName'>) => boolean;
|
|
1525
|
+
/** Capability hint for sessions.list; execution revalidates inside orchestration. */
|
|
1526
|
+
supportsSessionCompaction: (session: Pick<Session, 'backend'>) => boolean;
|
|
1600
1527
|
/** Latest task-list snapshot for a session (in-memory registry). */
|
|
1601
1528
|
getSessionTodos: (sessionId: string) => TodoSnapshot | null;
|
|
1602
1529
|
/** Idle-only manual context compaction, injected at the entry layer. */
|
|
@@ -1693,12 +1620,8 @@ export interface UiServiceDeps {
|
|
|
1693
1620
|
createDirectSession: (opts: {
|
|
1694
1621
|
projectId: string;
|
|
1695
1622
|
sessionId?: string;
|
|
1696
|
-
profileName?: string | null;
|
|
1697
1623
|
agentName?: string | null;
|
|
1698
|
-
selection?:
|
|
1699
|
-
browser?: {
|
|
1700
|
-
device: string;
|
|
1701
|
-
} | null;
|
|
1624
|
+
selection?: EngineSelection;
|
|
1702
1625
|
}) => Promise<{
|
|
1703
1626
|
sessionId: string;
|
|
1704
1627
|
channel: string;
|
|
@@ -1724,76 +1647,27 @@ export interface UiServiceDeps {
|
|
|
1724
1647
|
sessionId: string;
|
|
1725
1648
|
attachments: AttachmentMeta[];
|
|
1726
1649
|
}) => Promise<AttachmentMeta[]>;
|
|
1727
|
-
/**
|
|
1728
|
-
* Switch the active agent profile for a session's channel under the shared profile-switch rule
|
|
1729
|
-
* (same `switchChannelProfile` the Slack/Feishu `!profile` command uses). Wired in the entry layer
|
|
1730
|
-
* (app.ts) so the ui-service domain never imports domain/agents. Returns a structured outcome:
|
|
1731
|
-
* `ok:false` with `reason` when the profile is unknown or a cross-backend switch is attempted on a
|
|
1732
|
-
* session that already has conversation history.
|
|
1733
|
-
*/
|
|
1734
|
-
switchSessionProfile: (opts: {
|
|
1735
|
-
channel: string;
|
|
1736
|
-
name: string;
|
|
1737
|
-
}) => Promise<{
|
|
1738
|
-
ok: boolean;
|
|
1739
|
-
name: string;
|
|
1740
|
-
currentBackend: string;
|
|
1741
|
-
targetBackend: string;
|
|
1742
|
-
backendChanged: boolean;
|
|
1743
|
-
reason?: 'unknown-profile' | 'cross-backend-live-session';
|
|
1744
|
-
}>;
|
|
1745
|
-
/**
|
|
1746
|
-
* Switch the agent — the execution environment — a session's channel runs, under the shared
|
|
1747
|
-
* agent-switch rule (the same `switchChannelAgent` the Slack/Feishu `!agent` command uses). A
|
|
1748
|
-
* null name clears the channel's selection. Wired in the entry layer (app.ts) for the same reason
|
|
1749
|
-
* as the profile switch above: the ui-service domain never imports domain/agents.
|
|
1750
|
-
*/
|
|
1650
|
+
/** Switch execution environment without changing the engine. */
|
|
1751
1651
|
switchSessionAgent: (opts: {
|
|
1752
1652
|
channel: string;
|
|
1753
1653
|
name: string | null;
|
|
1754
1654
|
}) => Promise<{
|
|
1755
1655
|
ok: boolean;
|
|
1756
1656
|
agentName: string | null;
|
|
1757
|
-
|
|
1758
|
-
effectiveProfile: string;
|
|
1759
|
-
backendChanged: boolean;
|
|
1760
|
-
reason?: 'unknown-agent' | 'cross-backend-live-session';
|
|
1761
|
-
currentBackend?: string;
|
|
1762
|
-
targetBackend?: string;
|
|
1657
|
+
reason?: 'unknown-agent';
|
|
1763
1658
|
}>;
|
|
1764
|
-
/**
|
|
1765
|
-
|
|
1766
|
-
* shared rule — the domain `applyChannelSelection`, wired in the entry layer (app.ts) so the
|
|
1767
|
-
* ui-service domain never imports domain/agents. Returns the effective selection, or a structured
|
|
1768
|
-
* refusal the handler maps to a Result code.
|
|
1769
|
-
*/
|
|
1770
|
-
applySessionSelection: (opts: {
|
|
1659
|
+
/** Shared domain selection rule, wired at the entry layer. */
|
|
1660
|
+
applySessionSelection: (opts: EngineSelection & {
|
|
1771
1661
|
channel: string;
|
|
1772
|
-
|
|
1773
|
-
model?: string | null;
|
|
1774
|
-
provider?: string | null;
|
|
1775
|
-
thinking?: string | null;
|
|
1776
|
-
mode?: string | null;
|
|
1777
|
-
}) => Promise<{
|
|
1662
|
+
}) => Promise<EngineSelection & {
|
|
1778
1663
|
ok: boolean;
|
|
1779
1664
|
backendChanged: boolean;
|
|
1780
|
-
|
|
1781
|
-
profileName: string;
|
|
1782
|
-
backend: Backend;
|
|
1783
|
-
model: string;
|
|
1784
|
-
provider: string | null;
|
|
1785
|
-
thinking: string | null;
|
|
1786
|
-
mode: string;
|
|
1787
|
-
override: SessionSelectionOverride | null;
|
|
1788
|
-
/** Present only when `ok` is false. */
|
|
1789
|
-
reason?: 'unknown-profile' | 'cross-backend-live-session' | 'invalid-thinking' | 'provider-not-supported' | 'invalid-mode';
|
|
1665
|
+
reason?: string;
|
|
1790
1666
|
currentBackend?: string;
|
|
1791
1667
|
targetBackend?: string;
|
|
1792
1668
|
allowed?: readonly string[];
|
|
1793
1669
|
}>;
|
|
1794
|
-
|
|
1795
|
-
* `applySessionSelection`, used to render `sessions.list`. Injected for the same reason. */
|
|
1796
|
-
getChannelSelectionOverride: (channel: string) => SessionSelectionOverride | null;
|
|
1670
|
+
getModelMemory: () => ConfigModels['memory'];
|
|
1797
1671
|
/** The last composer pick on this host, which a draft conversation starts from. Injected for the
|
|
1798
1672
|
* same reason as the two above. */
|
|
1799
1673
|
getSelectionDefault: () => ConfigSelectionDefault | null;
|
|
@@ -118,9 +118,6 @@ export declare const mutateHandlers: {
|
|
|
118
118
|
}) => Promise<Result<import("./types.js").ProjectCreateReturn>>;
|
|
119
119
|
'sessions.create': (deps: UiServiceDeps, args: {
|
|
120
120
|
projectId?: string;
|
|
121
|
-
browser?: {
|
|
122
|
-
device: string;
|
|
123
|
-
};
|
|
124
121
|
}) => Promise<Result<import("./types.js").SessionsCreateReturn>>;
|
|
125
122
|
'sessions.send': (deps: UiServiceDeps, args: {
|
|
126
123
|
sessionId: string;
|
|
@@ -139,37 +136,18 @@ export declare const mutateHandlers: {
|
|
|
139
136
|
'sessions.compact': (deps: UiServiceDeps, args: {
|
|
140
137
|
sessionId: string;
|
|
141
138
|
}) => Promise<Result<import("./types.js").SessionsCompactReturn>>;
|
|
142
|
-
'sessions.setProfile': (deps: UiServiceDeps, args: {
|
|
143
|
-
sessionId: string;
|
|
144
|
-
profileName: string;
|
|
145
|
-
}) => Promise<Result<import("./types.js").SessionsSetProfileReturn>>;
|
|
146
139
|
'sessions.setAgent': (deps: UiServiceDeps, args: {
|
|
147
140
|
sessionId: string;
|
|
148
141
|
agentName?: string;
|
|
149
142
|
}) => Promise<Result<import("./types.js").SessionsSetAgentReturn>>;
|
|
150
143
|
'sessions.setSelection': (deps: UiServiceDeps, args: {
|
|
151
144
|
sessionId: string;
|
|
152
|
-
|
|
153
|
-
selection?: {
|
|
154
|
-
model?: string;
|
|
155
|
-
provider?: string;
|
|
156
|
-
thinking?: string;
|
|
157
|
-
mode?: string;
|
|
158
|
-
};
|
|
145
|
+
selection: import("./types.js").EngineSelection;
|
|
159
146
|
}) => Promise<Result<import("./types.js").SessionsSetSelectionReturn>>;
|
|
160
147
|
'sessions.createAndSend': (deps: UiServiceDeps, args: {
|
|
161
148
|
projectId: string;
|
|
162
|
-
profileName?: string;
|
|
163
149
|
agentName?: string;
|
|
164
|
-
selection?:
|
|
165
|
-
model?: string;
|
|
166
|
-
provider?: string;
|
|
167
|
-
thinking?: string;
|
|
168
|
-
mode?: string;
|
|
169
|
-
};
|
|
170
|
-
browser?: {
|
|
171
|
-
device: string;
|
|
172
|
-
};
|
|
150
|
+
selection?: import("./types.js").EngineSelection;
|
|
173
151
|
text: string;
|
|
174
152
|
draftUploadId?: string;
|
|
175
153
|
attachments?: {
|
|
@@ -223,6 +201,11 @@ export declare const mutateHandlers: {
|
|
|
223
201
|
turnIndex: number;
|
|
224
202
|
text: string;
|
|
225
203
|
}) => Promise<Result<import("./types.js").SessionsRewindReturn>>;
|
|
204
|
+
'sessions.resolveMedia': (deps: UiServiceDeps, args: {
|
|
205
|
+
sessionId: string;
|
|
206
|
+
ts: string;
|
|
207
|
+
src: string;
|
|
208
|
+
}) => Promise<Result<import("./inline-media-types.js").ResolveMediaResult>>;
|
|
226
209
|
'executions.cancel': (deps: UiServiceDeps, args: {
|
|
227
210
|
executionId: string;
|
|
228
211
|
}) => Promise<Result<import("./types.js").ExecutionsCancelReturn>>;
|
|
@@ -242,7 +225,7 @@ export declare const mutateHandlers: {
|
|
|
242
225
|
type: "daily" | "interval" | "once" | "weekly";
|
|
243
226
|
message: string;
|
|
244
227
|
projectId?: string;
|
|
245
|
-
|
|
228
|
+
selection?: import("./types.js").EngineSelection;
|
|
246
229
|
intervalMs?: number;
|
|
247
230
|
time?: string;
|
|
248
231
|
dayOfWeek?: number;
|
|
@@ -252,7 +235,7 @@ export declare const mutateHandlers: {
|
|
|
252
235
|
scheduleId: string;
|
|
253
236
|
message?: string;
|
|
254
237
|
projectId?: string;
|
|
255
|
-
|
|
238
|
+
selection?: import("./types.js").EngineSelection;
|
|
256
239
|
intervalMs?: number;
|
|
257
240
|
time?: string;
|
|
258
241
|
dayOfWeek?: number;
|
|
@@ -305,11 +288,6 @@ export declare const mutateHandlers: {
|
|
|
305
288
|
daily_usd: number;
|
|
306
289
|
monthly_usd: number;
|
|
307
290
|
};
|
|
308
|
-
} | {
|
|
309
|
-
section: "profiles";
|
|
310
|
-
value: {
|
|
311
|
-
defaultProfile: string;
|
|
312
|
-
};
|
|
313
291
|
} | {
|
|
314
292
|
section: "settings";
|
|
315
293
|
value: Record<string, string | number | boolean | string[]>;
|
|
@@ -425,27 +403,23 @@ export declare const mutateHandlers: {
|
|
|
425
403
|
id: string;
|
|
426
404
|
payload: string;
|
|
427
405
|
}) => Promise<Result<import("./types.js").HooksTestReturn>>;
|
|
428
|
-
'
|
|
429
|
-
|
|
430
|
-
backend?: "claude" | "pi";
|
|
431
|
-
mode?: string;
|
|
406
|
+
'models.favorites.add': (deps: UiServiceDeps, args: {
|
|
407
|
+
backend: "claude" | "pi";
|
|
432
408
|
provider?: string;
|
|
433
|
-
thinking?: string;
|
|
434
|
-
extraOption?: Record<string, string>;
|
|
435
|
-
name: string;
|
|
436
|
-
}) => Promise<Result<import("./types.js").ProfilesCreateReturn>>;
|
|
437
|
-
'profiles.update': (deps: UiServiceDeps, args: {
|
|
438
409
|
model: string;
|
|
439
|
-
|
|
440
|
-
|
|
410
|
+
}) => Promise<Result<import("./types.js").ModelsMutationReturn>>;
|
|
411
|
+
'models.favorites.remove': (deps: UiServiceDeps, args: {
|
|
412
|
+
backend: "claude" | "pi";
|
|
441
413
|
provider?: string;
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
414
|
+
model: string;
|
|
415
|
+
}) => Promise<Result<import("./types.js").ModelsMutationReturn>>;
|
|
416
|
+
'models.setDefault': (deps: UiServiceDeps, args: {
|
|
417
|
+
selection: import("./types.js").EngineSelection;
|
|
418
|
+
}) => Promise<Result<import("./types.js").ModelsMutationReturn>>;
|
|
419
|
+
'models.setThinking': (deps: UiServiceDeps, args: {
|
|
420
|
+
ref: import("./types.js").ModelRef;
|
|
421
|
+
thinking: string | null;
|
|
422
|
+
}) => Promise<Result<import("./types.js").ModelsMutationReturn>>;
|
|
449
423
|
'plugins.assign': (deps: UiServiceDeps, args: {
|
|
450
424
|
target: {
|
|
451
425
|
kind: "agent";
|
|
@@ -26,12 +26,12 @@ import { handleEnvironmentsList, handleEnvironmentsGet } from './query/environme
|
|
|
26
26
|
import { handleSystemDaemonStatus, handleSystemRateLimitStatus, handleSystemUsageStatus, handleSystemNotices, handleSystemUpdateStatus, } from './query/system.js';
|
|
27
27
|
import { handleConfigSet, handleConfigSetProviderRateLimitPolicy, } from './mutate/config.js';
|
|
28
28
|
import { handleHooksCreate, handleHooksUpdate, handleHooksSetEnabled, handleHooksRemove, handleHooksTest, } from './mutate/hooks.js';
|
|
29
|
-
import {
|
|
29
|
+
import { handleModelsFavoriteAdd, handleModelsFavoriteRemove, handleModelsSetDefault, handleModelsSetThinking, } from './mutate/models.js';
|
|
30
30
|
import { handleEnvironmentsValidate, handleEnvironmentsSave, handleEnvironmentsDelete, handleEnvironmentsSavePrompt, } from './mutate/environments.js';
|
|
31
31
|
import { handlePluginsAssign } from './mutate/plugins.js';
|
|
32
32
|
import { handlePluginsSkillWrite, handlePluginsSkillCreate, handlePluginsSkillMove, handlePluginsSkillRemove, handlePluginsSkillRevert, handlePluginsCreate, handlePluginsRemove, handlePluginsConvertToPortable, handlePluginsMcpWrite, } from './mutate/plugin-packages.js';
|
|
33
33
|
import { handleCreateProject } from './mutate/projects.js';
|
|
34
|
-
import { handleCreateSession, handleSendSession, handleCancelSession, handleCompactSession,
|
|
34
|
+
import { handleCreateSession, handleSendSession, handleCancelSession, handleCompactSession, handleSetAgent, handleSetSelection, handleCreateAndSend, handleMarkReadSession, handleMarkManyReadSessions, handleAnswerQuestion, handleRespondPlan, handleRespondDecision, handleCancelResume, handleRewindSession } from './mutate/sessions.js';
|
|
35
35
|
import { handleCancelExecution } from './mutate/executions.js';
|
|
36
36
|
import { handleCancelWaitpoint } from './mutate/waitpoints.js';
|
|
37
37
|
import { handlePauseSchedule, handleResumeSchedule, handleRemoveSchedule, handleAddSchedule, handleUpdateSchedule, } from './mutate/schedules.js';
|
|
@@ -44,6 +44,7 @@ import { handleCustomProviderRemove, handleCustomProviderUpsert, } from './mutat
|
|
|
44
44
|
import { handleUsageSharingSet } from './mutate/usage-sharing.js';
|
|
45
45
|
import { createSubscription } from './subscribe.js';
|
|
46
46
|
import { AssistantSnapshots } from './assistant-snapshots.js';
|
|
47
|
+
import { handleResolveMedia } from './mutate/resolve-media.js';
|
|
47
48
|
export const queryHandlers = {
|
|
48
49
|
'projects.list': (deps) => handleProjectsList(deps),
|
|
49
50
|
'sessions.list': (deps, params) => handleSessionsList(deps, params),
|
|
@@ -93,7 +94,6 @@ export const mutateHandlers = {
|
|
|
93
94
|
'sessions.send': (deps, args) => handleSendSession(deps, args),
|
|
94
95
|
'sessions.cancel': (deps, args) => handleCancelSession(deps, args),
|
|
95
96
|
'sessions.compact': (deps, args) => handleCompactSession(deps, args),
|
|
96
|
-
'sessions.setProfile': (deps, args) => handleSetProfile(deps, args),
|
|
97
97
|
'sessions.setAgent': (deps, args) => handleSetAgent(deps, args),
|
|
98
98
|
'sessions.setSelection': (deps, args) => handleSetSelection(deps, args),
|
|
99
99
|
'sessions.createAndSend': (deps, args) => handleCreateAndSend(deps, args),
|
|
@@ -106,6 +106,7 @@ export const mutateHandlers = {
|
|
|
106
106
|
'sessions.respondDecision': (deps, args) => handleRespondDecision(deps, args),
|
|
107
107
|
'sessions.cancelResume': (_deps, args) => handleCancelResume(args),
|
|
108
108
|
'sessions.rewind': (deps, args) => handleRewindSession(deps, args),
|
|
109
|
+
'sessions.resolveMedia': (deps, args) => handleResolveMedia(deps, args),
|
|
109
110
|
'executions.cancel': (deps, args) => handleCancelExecution(deps, args),
|
|
110
111
|
'waitpoints.cancel': (deps, args) => handleCancelWaitpoint(deps, args),
|
|
111
112
|
'schedules.pause': (deps, args) => handlePauseSchedule(deps, args),
|
|
@@ -139,9 +140,10 @@ export const mutateHandlers = {
|
|
|
139
140
|
'hooks.setEnabled': (deps, args) => handleHooksSetEnabled(deps, args),
|
|
140
141
|
'hooks.remove': (deps, args) => handleHooksRemove(deps, args),
|
|
141
142
|
'hooks.test': (deps, args) => handleHooksTest(deps, args),
|
|
142
|
-
'
|
|
143
|
-
'
|
|
144
|
-
'
|
|
143
|
+
'models.favorites.add': (deps, args) => handleModelsFavoriteAdd(deps, args),
|
|
144
|
+
'models.favorites.remove': (deps, args) => handleModelsFavoriteRemove(deps, args),
|
|
145
|
+
'models.setDefault': (deps, args) => handleModelsSetDefault(deps, args),
|
|
146
|
+
'models.setThinking': (deps, args) => handleModelsSetThinking(deps, args),
|
|
145
147
|
'plugins.assign': (deps, args) => handlePluginsAssign(deps, args),
|
|
146
148
|
'plugins.skillWrite': (deps, args) => handlePluginsSkillWrite(deps, args),
|
|
147
149
|
'plugins.skillCreate': (deps, args) => handlePluginsSkillCreate(deps, args),
|