dsh-llm-fallbacks 0.6.3 → 0.6.4
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 +2 -2
- package/dist/client/ConversationFallbackSwitch.d.ts +1 -1
- package/dist/client/fallbacks-store.d.ts +5 -5
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +5 -5
- package/dist/gateway.d.ts +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/role-notice.d.ts +4 -4
- package/dist/role-projection.d.ts +2 -2
- package/dist/schema.d.ts +5 -5
- package/dist/state.d.ts +2 -2
- package/dist/subagent-policy.d.ts +1 -1
- package/dist/subagents-seam.d.ts +2 -2
- package/dist/time-slots.d.ts +5 -6
- package/dist/virtual-adapter.d.ts +1 -1
- package/package.json +23 -23
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|

|
|
10
|
-

|
|
11
11
|
[](https://dshfind.com/zh/plugins/omdsh-dev/dsh-llm-fallbacks?ref=badge)
|
|
12
12
|
|
|
13
13
|
Automatic provider/model fallback chains for dsh (DeepSeek Harness): when an agent's LLM requests keep failing — retries exhausted, auth errors, quota exceeded, rate limiting (429) — the plugin switches provider/model along the fallback chain for the current role, and the current step/turn continues on the target model: tasks are not interrupted by model problems.
|
|
@@ -94,7 +94,7 @@ Build the section up in four steps:
|
|
|
94
94
|
|
|
95
95
|
**2. Set the all-day `rootChain`.** Leading entries are the fallback chain, walked first when a request fails; the **last** entry is the Default model.
|
|
96
96
|
|
|
97
|
-
> **Conformance**: the last entry must be exactly one official model — `deepseek-official/deepseek-flash` or `deepseek-official/deepseek-v4-pro` (XOR). The settings card and gateway reject any other tail on save; a legacy non-official tail warns at startup and keeps working as a fallback-only walk, but cannot be saved as-is. The retired `deepseek-v4-flash` id is no longer a legal tail — a saved tail with it now warns, goes inert (slot rows + virtual picker), and blocks save until a legal tail is picked. The official Pro tail is catalog-served as `deepseek-official/deepseek-v4-pro` (dsh 0.
|
|
97
|
+
> **Conformance**: the last entry must be exactly one official model — `deepseek-official/deepseek-flash` or `deepseek-official/deepseek-v4-pro` (XOR). The settings card and gateway reject any other tail on save; a legacy non-official tail warns at startup and keeps working as a fallback-only walk, but cannot be saved as-is. The retired `deepseek-v4-flash` id is no longer a legal tail — a saved tail with it now warns, goes inert (slot rows + virtual picker), and blocks save until a legal tail is picked. The official Pro tail is catalog-served as `deepseek-official/deepseek-v4-pro` (dsh 0.2.0-rc.1; the claim re-verified against the rc.2 default catalog) and selectable in the card; a hand-written legacy `deepseek-official/deepseek-pro` tail — never catalog-served — reads back as non-conforming (no migration; re-pick the tail). The plugin does not probe catalog availability — a chain containing `deepseek-official/deepseek-v4-pro` dispatches to it like any other exact entry, and on the virtual route the `stream()` delegate serves the first dispatchable exact head of the effective chain, so a chain with a working entry before Pro still routes to that earlier entry.
|
|
98
98
|
|
|
99
99
|
**3. Add `timeSlots` (optional).** Rows rotate the effective root chain by wall-clock windows. Preset rows use frozen UTC+8 windows (only their chain is editable; while a preset row exists, `tz` locks to `Asia/Shanghai`); custom rows take `start`/`end` (may wrap midnight) and an optional `days` list. The first row whose window contains the current moment wins; no match → the all-day `rootChain`. Rotation is a routing seed — it applies on the next root request and consumes no cooldown (see [Time slots](#time-slots)).
|
|
100
100
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* so the `unknown-surface` fallback never picked it up and the transcript
|
|
11
11
|
* showed nothing).
|
|
12
12
|
*
|
|
13
|
-
* Contract notes (dsh-private,
|
|
13
|
+
* Contract notes (dsh-private, current homes, verified 2026-08-28):
|
|
14
14
|
* - D1 registry: `ConversationEventRegistry.register(definition)` — the
|
|
15
15
|
* client Context's `uiConversation.events` service seat
|
|
16
16
|
* (`ui-conversation conversation/event-registry.ts:17-25`); external
|
|
@@ -363,7 +363,7 @@ export declare function rulesToRows(rules: readonly FallbacksRoleRule[], catalog
|
|
|
363
363
|
export declare function rowsToRules(rows: readonly RoleRuleRow[]): FallbacksRoleRule[];
|
|
364
364
|
/**
|
|
365
365
|
* The settings Remote namespace face the fallbacks store reads
|
|
366
|
-
* (
|
|
366
|
+
* (`ctx.remote.settings`; api-settings-controller `@Remote` methods).
|
|
367
367
|
*/
|
|
368
368
|
export interface FallbacksSettingsRemote {
|
|
369
369
|
/** Redacted describe: provider writability plus the namespace directory. */
|
|
@@ -371,7 +371,7 @@ export interface FallbacksSettingsRemote {
|
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
* The llm Remote namespace face the fallbacks store reads
|
|
374
|
-
* (
|
|
374
|
+
* (`ctx.remote.llm`; dsh-llm `@Remote` methods).
|
|
375
375
|
*/
|
|
376
376
|
export interface FallbacksLlmRemote {
|
|
377
377
|
/** Declared configurable-provider directory, registered or dormant. */
|
|
@@ -379,7 +379,7 @@ export interface FallbacksLlmRemote {
|
|
|
379
379
|
}
|
|
380
380
|
/**
|
|
381
381
|
* The session Remote namespace face the fallbacks store reads
|
|
382
|
-
* (
|
|
382
|
+
* (`ctx.remote.session`; api-session-controller `@Remote` methods).
|
|
383
383
|
*/
|
|
384
384
|
export interface FallbacksSessionRemote {
|
|
385
385
|
/** Host-generation model catalog: provider groups plus per-provider failures. */
|
|
@@ -387,7 +387,7 @@ export interface FallbacksSessionRemote {
|
|
|
387
387
|
/**
|
|
388
388
|
* Live event stream for one durable session address; the opening snapshot
|
|
389
389
|
* frame carries the tail page this store reads, then the stream is
|
|
390
|
-
* cancelled (
|
|
390
|
+
* cancelled (successor of the apiproxy `sessions.history` unary —
|
|
391
391
|
* `session/page` needs the follow opening frame's cursor, so a cold tail
|
|
392
392
|
* read goes through the follow opening).
|
|
393
393
|
*/
|
|
@@ -479,7 +479,7 @@ export declare class FallbacksSettingsController {
|
|
|
479
479
|
/**
|
|
480
480
|
* Read the recent-switch summary for the current session (spec §2.5 D-5):
|
|
481
481
|
* one tail page (`maxMessages` = {@link SWITCHES_HISTORY_PAGE}) read from
|
|
482
|
-
* the `session/follow` opening snapshot —
|
|
482
|
+
* the `session/follow` opening snapshot — the host has no unary tail-page
|
|
483
483
|
* read (`session/page` needs the follow opening frame's cursor), so the
|
|
484
484
|
* stream is cancelled right after its first frame —
|
|
485
485
|
* `fallbacks/switch` events extracted newest-first capped at
|
package/dist/client/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* config rides the plugin's gateway channel (`connection.rpc` →
|
|
10
10
|
* `/api/fallbacks/get|set|reset`), while `settings/describe` (writable +
|
|
11
11
|
* namespace directory), the provider/model catalog, and the switch-history
|
|
12
|
-
* tail page ride the typed `ctx.remote` namespaces (
|
|
13
|
-
*
|
|
12
|
+
* tail page ride the typed `ctx.remote` namespaces (`ConnectionHandle`
|
|
13
|
+
* dropped `api`; see `fallbacks-store.ts`).
|
|
14
14
|
* - Registers the `plugins.bundle.config` card `key: 'dsh-llm-fallbacks'`
|
|
15
15
|
* (bundle package name) with a business-only inject face
|
|
16
16
|
* ({@link FallbacksSettingsController} + hooks.snapshot); the old
|
|
@@ -48,7 +48,7 @@ export { FallbacksSettingsController, FALLBACKS_SETTINGS_NS } from './fallbacks-
|
|
|
48
48
|
* (`setCurrentSession` never called, `loadSwitches` ready with an empty
|
|
49
49
|
* array, which the store already supports).
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* The host's dotted-namespace contract: each client Remote namespace is a
|
|
52
52
|
* child-fiber service named `remote.<ns>` (upstream `remoteServiceKey`), and
|
|
53
53
|
* the traceable proxy forwards `ctx.remote.llm` / `.settings` / `.session`
|
|
54
54
|
* to those context properties — consumers MUST declare the dotted names
|
package/dist/client/index.js
CHANGED
|
@@ -414,7 +414,7 @@ window.__ModuleLoader__.load({
|
|
|
414
414
|
* `deepseek-v4-flash` and the never-served legacy
|
|
415
415
|
* `deepseek-official/deepseek-pro` included) keeps slot rows inert and
|
|
416
416
|
* refuses the virtual-row
|
|
417
|
-
* delegate; the
|
|
417
|
+
* delegate; the legacy failure walk over the raw chain stays
|
|
418
418
|
* verbatim.
|
|
419
419
|
*/
|
|
420
420
|
function isAllDayConforming(chain) {
|
|
@@ -432,7 +432,7 @@ window.__ModuleLoader__.load({
|
|
|
432
432
|
* (`isAllDayConforming(config.rootChain)`) the winner is ALWAYS `'all-day'`
|
|
433
433
|
* — a legacy multi-model (or empty) chain earns no slot rows, so every
|
|
434
434
|
* surface fed by this resolver reports the inert state and routing stays on
|
|
435
|
-
* the raw `rootChain` (the
|
|
435
|
+
* the raw `rootChain` (the legacy walk verbatim).
|
|
436
436
|
*/
|
|
437
437
|
function resolveSlotState(config, now, tz) {
|
|
438
438
|
if (!isAllDayConforming(config.rootChain)) return {
|
|
@@ -1109,7 +1109,7 @@ window.__ModuleLoader__.load({
|
|
|
1109
1109
|
/**
|
|
1110
1110
|
* Read the recent-switch summary for the current session (spec §2.5 D-5):
|
|
1111
1111
|
* one tail page (`maxMessages` = {@link SWITCHES_HISTORY_PAGE}) read from
|
|
1112
|
-
* the `session/follow` opening snapshot —
|
|
1112
|
+
* the `session/follow` opening snapshot — the host has no unary tail-page
|
|
1113
1113
|
* read (`session/page` needs the follow opening frame's cursor), so the
|
|
1114
1114
|
* stream is cancelled right after its first frame —
|
|
1115
1115
|
* `fallbacks/switch` events extracted newest-first capped at
|
|
@@ -4458,7 +4458,7 @@ window.__ModuleLoader__.load({
|
|
|
4458
4458
|
* (`setCurrentSession` never called, `loadSwitches` ready with an empty
|
|
4459
4459
|
* array, which the store already supports).
|
|
4460
4460
|
*
|
|
4461
|
-
*
|
|
4461
|
+
* The host's dotted-namespace contract: each client Remote namespace is a
|
|
4462
4462
|
* child-fiber service named `remote.<ns>` (upstream `remoteServiceKey`), and
|
|
4463
4463
|
* the traceable proxy forwards `ctx.remote.llm` / `.settings` / `.session`
|
|
4464
4464
|
* to those context properties — consumers MUST declare the dotted names
|
|
@@ -4477,7 +4477,7 @@ window.__ModuleLoader__.load({
|
|
|
4477
4477
|
];
|
|
4478
4478
|
/**
|
|
4479
4479
|
* The session the client is LOOKING at, derived from the sessions-list
|
|
4480
|
-
* snapshot.
|
|
4480
|
+
* snapshot. The host moved view ownership out of `SessionListState` (the
|
|
4481
4481
|
* `current` field is gone — "navigation belongs to view owners"): the viewed
|
|
4482
4482
|
* session is the one the shell retains under the `mainView` reference source,
|
|
4483
4483
|
* surfaced as a positive `retainedBy.mainView` count on the row
|
package/dist/gateway.d.ts
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* rejection unchanged — the settings service itself is non-strict and would
|
|
39
39
|
* merge the unknown key through), then writes the plugin's profile-entry
|
|
40
40
|
* section in-process via `ctx.settings.update` (the `SettingsForms` form
|
|
41
|
-
* service;
|
|
41
|
+
* service; the host replaced the namespace registry — the write lands in
|
|
42
42
|
* the active profile's patch under {@link FALLBACKS_PROFILE_ENTRY} and the
|
|
43
43
|
* Loader commits it into the plugin's live config reference), and returns
|
|
44
44
|
* the new composed value. `reset` (fallbacks-specific third method —
|
|
@@ -74,14 +74,14 @@ import type { FallbacksSeedManager, SeedRevertOutcome, SeedsWireStatus } from '.
|
|
|
74
74
|
/**
|
|
75
75
|
* The `fallbacks` service/typert namespace identity (`fallbacks`): the cordis
|
|
76
76
|
* service key, the typert namespace under `/api/fallbacks/*`, and the settings
|
|
77
|
-
* identity under the
|
|
77
|
+
* identity under the legacy dsh API. Current settings writes target the
|
|
78
78
|
* PROFILE ENTRY id instead (see {@link FALLBACKS_PROFILE_ENTRY}); the branded
|
|
79
79
|
* `SettingsNamespace` type the old service APIs constrained on survives as the
|
|
80
80
|
* type this constant carries.
|
|
81
81
|
*/
|
|
82
82
|
export declare const FALLBACKS_SETTINGS_NAMESPACE: SettingsNamespace;
|
|
83
83
|
/**
|
|
84
|
-
* The plugin's profile ENTRY id — the settings-write target on dsh
|
|
84
|
+
* The plugin's profile ENTRY id — the settings-write target on the current dsh host:
|
|
85
85
|
* `SettingsForms` keys every form and write by the Loader entry id
|
|
86
86
|
* (`entry.options.id`), and this plugin's bundle row ships `id: llm-fallbacks`
|
|
87
87
|
* (`bundle/cordis.patch.yml`), so `settings.update('llm-fallbacks', …)` edits
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* `llm-fallbacks` (see `bundle/cordis.patch.yml`), composed AFTER llm-retry.
|
|
7
7
|
*
|
|
8
8
|
* Wiring:
|
|
9
|
-
* - `fallbacks` settings via the Loader entry Config (
|
|
9
|
+
* - `fallbacks` settings via the Loader entry Config (the current host contract: the
|
|
10
10
|
* volatile `Config` schema in `src/schema.ts` IS the settings section;
|
|
11
11
|
* `apply` reads the Loader's live config reference, and the
|
|
12
12
|
* `settings/document-updated` listener re-derives the runtime caches —
|
|
@@ -142,7 +142,7 @@ export declare function chainHeads(ctx: Context): ReadonlyMap<string, EffectiveC
|
|
|
142
142
|
*/
|
|
143
143
|
export declare function countRetryEvents(session: Session, turn: number, step: number, provider: string): number;
|
|
144
144
|
/**
|
|
145
|
-
* The live config reference the
|
|
145
|
+
* The live config reference the Loader hands `apply` for a
|
|
146
146
|
* volatile Config schema: an identity-stable `{ get }` view (cosmokit's
|
|
147
147
|
* `Volatile` protocol) whose snapshot the Loader re-commits on every form
|
|
148
148
|
* save, so reading `.get()` per call is the authoritative live composed
|
package/dist/role-notice.d.ts
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* Session-write contract (plan Global Constraints, hard): the row is a
|
|
30
30
|
* `user/message` built with `createUserMessage` and the producer-declared
|
|
31
31
|
* source `{ kind: 'llm-fallbacks-role-notice', form: 'notice', summary: … }`.
|
|
32
|
-
*
|
|
32
|
+
* The host removed the shared `plugin` kind: `MessageSourceMap` is
|
|
33
33
|
* producer-declared now ("each producer declares its own `kind` in its own
|
|
34
34
|
* module; there is no shared catch-all `plugin` kind" — dsh-llm message.d.ts),
|
|
35
35
|
* so this module merges its own kind and stamps `form: 'notice'` + the bound
|
|
@@ -81,7 +81,7 @@ declare module '@deepseek-ai/dsh-llm' {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
|
-
* The provenance label this plugin's notice rows carried under the
|
|
84
|
+
* The provenance label this plugin's notice rows carried under the legacy
|
|
85
85
|
* `kind: 'plugin'` source API. The durable rows survive as data: the V3→V4
|
|
86
86
|
* session-format edge rewrites every unlisted V3 plugin source to
|
|
87
87
|
* `kind: 'plugin:<plugin>'`, so pre-upgrade child sessions carry
|
|
@@ -91,7 +91,7 @@ declare module '@deepseek-ai/dsh-llm' {
|
|
|
91
91
|
*/
|
|
92
92
|
export declare const ROLE_NOTICE_PLUGIN = "dsh-llm-fallbacks";
|
|
93
93
|
/**
|
|
94
|
-
* The message source KIND the notice rides.
|
|
94
|
+
* The message source KIND the notice rides. The host removed the shared
|
|
95
95
|
* `plugin` kind (`MessageSourceMap` is producer-declared now — each producer
|
|
96
96
|
* declares its own `kind` in its own module, the upstream `model-selection`
|
|
97
97
|
* precedent), so this module declares `llm-fallbacks-role-notice` above and
|
|
@@ -102,7 +102,7 @@ export declare const ROLE_NOTICE_PLUGIN = "dsh-llm-fallbacks";
|
|
|
102
102
|
export declare const ROLE_NOTICE_SOURCE_KIND = "llm-fallbacks-role-notice";
|
|
103
103
|
/**
|
|
104
104
|
* The source kinds the role projection must ALSO accept besides
|
|
105
|
-
* {@link ROLE_NOTICE_SOURCE_KIND}: the V4-migrated form of the
|
|
105
|
+
* {@link ROLE_NOTICE_SOURCE_KIND}: the V4-migrated form of the legacy
|
|
106
106
|
* `kind: 'plugin', plugin: 'dsh-llm-fallbacks'` rows (see
|
|
107
107
|
* {@link ROLE_NOTICE_PLUGIN}).
|
|
108
108
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Data source = Task 3's notice row, the plugin's single write primitive: the
|
|
7
7
|
* fold reads the child's committed `user/message` events, keeps the one whose
|
|
8
8
|
* provenance is ours (`source.kind` is the producer-declared
|
|
9
|
-
* ROLE_NOTICE_SOURCE_KIND, or the V3→V4-migrated form of a
|
|
9
|
+
* ROLE_NOTICE_SOURCE_KIND, or the V3→V4-migrated form of a legacy row —
|
|
10
10
|
* `ROLE_NOTICE_LEGACY_SOURCE_KINDS`), and parses the role out of its
|
|
11
11
|
* **content text** (`[role: <id>]`). No second write path, no new event type,
|
|
12
12
|
* no plugin-owned store: the projection is a pure READ of the log, and the
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* The runtime shape relied on — `register({ key, stateSchema, init, apply,
|
|
34
34
|
* wire: { viewSchema, view }, stateVersion })` → unregister disposer — is the
|
|
35
35
|
* documented `ProjectionDefinition` contract of
|
|
36
|
-
* `@deepseek-ai/dsh-session-projection
|
|
36
|
+
* `@deepseek-ai/dsh-session-projection`
|
|
37
37
|
* (`lib/types/index.d.ts:38-80,150-152`); only `.parse` is ever called on the
|
|
38
38
|
* schemas (`lib/index.js:255,305,422`).
|
|
39
39
|
*
|
package/dist/schema.d.ts
CHANGED
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
* `roles.default`) on the composed object at startup (warn + gateway
|
|
20
20
|
* `legacyKeys`, see `src/index.ts` apply()).
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* Current host contract: the whole schema is marked `volatile` (the host
|
|
23
23
|
* retired `installSection` — the Loader entry Config IS the settings
|
|
24
24
|
* section now, and `SettingsForms.update` only accepts volatile paths, so
|
|
25
25
|
* the marker is what keeps the gateway/card write path legal). One marker
|
|
26
26
|
* on the ROOT object makes every field live-editable and hands `apply` a
|
|
27
27
|
* single identity-stable config reference the Loader commits saves into
|
|
28
28
|
* (no remount per save). The marker rides the generic `.extra()` writer —
|
|
29
|
-
* the exact bytes `.volatile()`
|
|
29
|
+
* the exact bytes `.volatile()` writes in newer schemastery — because the
|
|
30
30
|
* dev-time schemastery resolved from the lockfile can predate that sugar;
|
|
31
|
-
* the `Meta` augmentation below declares the field the
|
|
32
|
-
*
|
|
31
|
+
* the `Meta` augmentation below declares the field the peer range admits
|
|
32
|
+
* at its upper end.
|
|
33
33
|
*
|
|
34
34
|
* @module dsh-llm-fallbacks/schema
|
|
35
35
|
*/
|
|
@@ -38,7 +38,7 @@ import type { FallbacksConfig } from './config.ts';
|
|
|
38
38
|
declare module '@deepseek-ai/schemastery' {
|
|
39
39
|
namespace Schemastery {
|
|
40
40
|
interface Meta {
|
|
41
|
-
/** Live-editable marker read by the Loader / `SettingsForms
|
|
41
|
+
/** Live-editable marker read by the Loader / `SettingsForms`. */
|
|
42
42
|
volatile?: boolean;
|
|
43
43
|
}
|
|
44
44
|
}
|
package/dist/state.d.ts
CHANGED
|
@@ -67,14 +67,14 @@ export interface PendingSwitch {
|
|
|
67
67
|
/**
|
|
68
68
|
* One plugin-originated subagent switch the host allowlist blocked (plan
|
|
69
69
|
* dsh-012-subagent-routing T3; spec D1). The intersection of the resolved
|
|
70
|
-
* candidates with the effective allowlist was empty while the
|
|
70
|
+
* candidates with the effective allowlist was empty while the unconstrained walk
|
|
71
71
|
* would have switched — the attempt is recorded in-memory only (issue #52:
|
|
72
72
|
* no durable session write) for the Subagents card warning (spec D4/T5).
|
|
73
73
|
*/
|
|
74
74
|
export interface BlockedSwitchAttempt {
|
|
75
75
|
/** Epoch ms when the switch was blocked. */
|
|
76
76
|
at: number;
|
|
77
|
-
/** The route the
|
|
77
|
+
/** The route the unconstrained walk would have switched to (exact provider+model). */
|
|
78
78
|
route: {
|
|
79
79
|
provider: string;
|
|
80
80
|
model: string;
|
|
@@ -46,7 +46,7 @@ export type PolicyRoute = {
|
|
|
46
46
|
* Effective subagent routing policy for one session.
|
|
47
47
|
*
|
|
48
48
|
* - `disabled`: host policy off or absent — selection matches pre-policy
|
|
49
|
-
*
|
|
49
|
+
* behavior.
|
|
50
50
|
* - `enabled`: an allowlist is proven; plugin-originated routes must stay
|
|
51
51
|
* inside it.
|
|
52
52
|
* - `unprovable`: the policy is on but unreadable (malformed event payload,
|
package/dist/subagents-seam.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* role-based-subagent-adoption Task 1).
|
|
4
4
|
*
|
|
5
5
|
* The seam is the documented cordis service-read waterfall
|
|
6
|
-
* (`Events['internal/get']`, `@deepseek-ai/cordis`
|
|
6
|
+
* (`Events['internal/get']`, `@deepseek-ai/cordis`
|
|
7
7
|
* `lib/types/events.d.ts`): a listener wraps the `subagents` service VALUE on
|
|
8
8
|
* read and returns a prototype-delegating wrapper whose `start` /
|
|
9
9
|
* `startContinuable` resolve the dispatch role from the incoming request
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* `chain: []` role gets its persona exactly like a chained one (no routing
|
|
47
47
|
* state is read). Both native start surfaces are covered, with the gate each
|
|
48
48
|
* one's fail-loud contract needs (measured on the installed
|
|
49
|
-
* `@deepseek-ai/dsh-subagent`
|
|
49
|
+
* `@deepseek-ai/dsh-subagent`): the one-shot `start` REJECTS a
|
|
50
50
|
* request carrying `persona` for a provider whose
|
|
51
51
|
* `getProvider(name).capabilities.persona` is not `true` (`lib/index.js:3284,3340-3363`,
|
|
52
52
|
* `assertCapabilities`), so the merge pre-checks that flag; the continuable
|
package/dist/time-slots.d.ts
CHANGED
|
@@ -10,16 +10,15 @@
|
|
|
10
10
|
* throw: they warn ONCE per row instance (through `console.warn` — the
|
|
11
11
|
* resolver's 3-argument contract has no logger parameter) and are
|
|
12
12
|
* skipped; a legacy non-empty non-conforming `rootChain` keeps the
|
|
13
|
-
*
|
|
13
|
+
* legacy failure walk verbatim (P6).
|
|
14
14
|
*
|
|
15
15
|
* @module dsh-llm-fallbacks/time-slots
|
|
16
16
|
*/
|
|
17
17
|
import type { FallbacksConfig } from './config.ts';
|
|
18
18
|
/** Official all-day selectors — the ONLY legal tails (length 1, XOR):
|
|
19
19
|
* Flash (the current official default) and Pro, both selectable. The Pro
|
|
20
|
-
* tail id is the catalog id verbatim:
|
|
21
|
-
* still serves `deepseek-v4-pro` alongside `deepseek-flash`
|
|
22
|
-
* at rc.2 (rc.1 re-introduced it), so the card's Pro radio is selectable. `deepseek-v4-flash` stays retired (dropped
|
|
20
|
+
* tail id is the catalog id verbatim: the official default catalog
|
|
21
|
+
* still serves `deepseek-v4-pro` alongside `deepseek-flash`, so the card's Pro radio is selectable. `deepseek-v4-flash` stays retired (dropped
|
|
23
22
|
* from the catalog); a hand-written legacy `deepseek-official/deepseek-pro`
|
|
24
23
|
* tail — never catalog-served nor selectable — is just a non-legal tail
|
|
25
24
|
* that degrades through the existing nonconforming walk. */
|
|
@@ -83,7 +82,7 @@ export declare const PRESETS: Record<PresetId, PresetDefinition>;
|
|
|
83
82
|
* `deepseek-v4-flash` and the never-served legacy
|
|
84
83
|
* `deepseek-official/deepseek-pro` included) keeps slot rows inert and
|
|
85
84
|
* refuses the virtual-row
|
|
86
|
-
* delegate; the
|
|
85
|
+
* delegate; the legacy failure walk over the raw chain stays
|
|
87
86
|
* verbatim.
|
|
88
87
|
*/
|
|
89
88
|
export declare function isAllDayConforming(chain: readonly string[]): boolean;
|
|
@@ -111,7 +110,7 @@ export declare function resolveEffectiveChain(config: FallbacksConfig, now: Date
|
|
|
111
110
|
* (`isAllDayConforming(config.rootChain)`) the winner is ALWAYS `'all-day'`
|
|
112
111
|
* — a legacy multi-model (or empty) chain earns no slot rows, so every
|
|
113
112
|
* surface fed by this resolver reports the inert state and routing stays on
|
|
114
|
-
* the raw `rootChain` (the
|
|
113
|
+
* the raw `rootChain` (the legacy walk verbatim).
|
|
115
114
|
*/
|
|
116
115
|
export declare function resolveSlotState(config: FallbacksConfig, now: Date, tz: string): {
|
|
117
116
|
winner: SlotRowConfig | 'all-day';
|
|
@@ -146,7 +146,7 @@ export declare class FallbacksChainAdapter extends LlmAdapter {
|
|
|
146
146
|
*/
|
|
147
147
|
providerRetryPolicy(_provider: string): ResolvedRetryPolicy | undefined;
|
|
148
148
|
/**
|
|
149
|
-
* Route-accurate image pricing
|
|
149
|
+
* Route-accurate image pricing: the virtual row has no
|
|
150
150
|
* pricing of its own — the virtual `provider`/`model` arguments are
|
|
151
151
|
* intentionally ignored. Resolves the SAME effective head `stream()`
|
|
152
152
|
* dispatches and delegates through the runtime lookup, so the token
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"dsh",
|
|
6
6
|
"dsh-plugin"
|
|
7
7
|
],
|
|
8
|
-
"version": "0.6.
|
|
8
|
+
"version": "0.6.4",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "./dist/index.js",
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
@@ -65,28 +65,28 @@
|
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@deepseek-ai/cordis": "^4.0.2",
|
|
68
|
-
"@deepseek-ai/dsh-agent": "^0.
|
|
69
|
-
"@deepseek-ai/dsh-api-gateway": "^0.
|
|
70
|
-
"@deepseek-ai/dsh-api-remotes": "^0.
|
|
71
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.
|
|
72
|
-
"@deepseek-ai/dsh-client-connection": "^0.
|
|
73
|
-
"@deepseek-ai/dsh-client-locale": "^0.
|
|
74
|
-
"@deepseek-ai/dsh-client-store": "^0.
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.
|
|
81
|
-
"@deepseek-ai/dsh-commands": "^0.
|
|
82
|
-
"@deepseek-ai/dsh-llm": "^0.
|
|
83
|
-
"@deepseek-ai/dsh-llm-retry": "^0.
|
|
84
|
-
"@deepseek-ai/dsh-session": "^0.
|
|
85
|
-
"@deepseek-ai/dsh-session-projection": "^0.
|
|
86
|
-
"@deepseek-ai/dsh-settings": "^0.
|
|
87
|
-
"@deepseek-ai/dsh-tool-subagent": "^0.
|
|
88
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.
|
|
89
|
-
"@deepseek-ai/dsh-typert-registry": "^0.
|
|
68
|
+
"@deepseek-ai/dsh-agent": "^0.2.0-rc.1",
|
|
69
|
+
"@deepseek-ai/dsh-api-gateway": "^0.2.0-rc.1",
|
|
70
|
+
"@deepseek-ai/dsh-api-remotes": "^0.2.0-rc.1",
|
|
71
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.2.0-rc.1",
|
|
72
|
+
"@deepseek-ai/dsh-client-connection": "^0.2.0-rc.1",
|
|
73
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.0-rc.1",
|
|
74
|
+
"@deepseek-ai/dsh-client-store": "^0.2.0-rc.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.2.0-rc.1",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.0-rc.1",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.0-rc.1",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.0-rc.1",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.1",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.1",
|
|
81
|
+
"@deepseek-ai/dsh-commands": "^0.2.0-rc.1",
|
|
82
|
+
"@deepseek-ai/dsh-llm": "^0.2.0-rc.1",
|
|
83
|
+
"@deepseek-ai/dsh-llm-retry": "^0.2.0-rc.1",
|
|
84
|
+
"@deepseek-ai/dsh-session": "^0.2.0-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-session-projection": "^0.2.0-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-settings": "^0.2.0-rc.1",
|
|
87
|
+
"@deepseek-ai/dsh-tool-subagent": "^0.2.0-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.0-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-typert-registry": "^0.2.0-rc.1",
|
|
90
90
|
"@deepseek-ai/schemastery": "^3.18.2",
|
|
91
91
|
"react": "^18.2.0"
|
|
92
92
|
},
|