dsh-model-switch 0.4.34 → 0.4.35

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.
@@ -1,2 +1,2 @@
1
- import { a as bindAutoReviewSessionCorrelation, c as installToolCallSafetyNet, d as resolveSessionAutoReviewRoute, f as reviewLlm, i as autoReviewStatus, l as isReviewerInfrastructureFailure, n as autoReviewGate, o as defensivePermissionPresets, p as reviewScope, r as autoReviewRouteOf, s as inject, t as apply, u as name } from "./auto-review-BoF2_YtP.js";
1
+ import { a as bindAutoReviewSessionCorrelation, c as installToolCallSafetyNet, d as resolveSessionAutoReviewRoute, f as reviewLlm, i as autoReviewStatus, l as isReviewerInfrastructureFailure, n as autoReviewGate, o as defensivePermissionPresets, p as reviewScope, r as autoReviewRouteOf, s as inject, t as apply, u as name } from "./auto-review-D-0A5Amx.js";
2
2
  export { apply, autoReviewGate, autoReviewRouteOf, autoReviewStatus, bindAutoReviewSessionCorrelation, defensivePermissionPresets, inject, installToolCallSafetyNet, isReviewerInfrastructureFailure, name, resolveSessionAutoReviewRoute, reviewLlm, reviewScope };
package/lib/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { o as normalizeProviderGroups } from "./session-route-D1zoZgf3.js";
2
- import { i as autoReviewStatus } from "./auto-review-BoF2_YtP.js";
2
+ import { i as autoReviewStatus } from "./auto-review-D-0A5Amx.js";
3
3
  import { ModelSwitchAdapterRegistry } from "./adapter-registry.js";
4
4
  import { createRequire } from "node:module";
5
5
  import z from "@deepseek-ai/schemastery";
6
6
  import { Service } from "@deepseek-ai/cordis";
7
+ import { readFileSync } from "node:fs";
8
+ import { dirname, join } from "node:path";
7
9
  import { defineTool } from "@deepseek-ai/dsh-tools";
8
10
  import { clientRequestSchema } from "@deepseek-ai/dsh-client-connection";
9
11
  import { credentialRef, isCredentialRefName } from "@deepseek-ai/dsh-credentials";
10
12
  import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
11
13
  import { Config as Config$1, DEEPSEEK_DEFAULT_API_VERSION, DEEPSEEK_DEFAULT_BASE_URL, DEEPSEEK_DEFAULT_MAX_TOKENS, DEEPSEEK_DEFAULT_MAX_USES, DEEPSEEK_DEFAULT_MODEL, DEEPSEEK_PROVIDER_ID, DeepSeekSearchProvider, WEB_SEARCH_DEEPSEEK_SETTINGS_NAMESPACE } from "@deepseek-ai/dsh-web-search-deepseek";
12
- import { readFileSync } from "node:fs";
13
- import { dirname, join } from "node:path";
14
14
  //#region lib/types/host-settings.js
15
15
  /**
16
16
  * Annotated rather than inferred: the nested entry schema's inferred type
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Durable snapshot of the sessions that were on the Auto preset when this row
3
+ * released the Auto registration.
4
+ *
5
+ * The official auto-review gate's teardown moves live `auto` sessions to the
6
+ * fallback preset (`danger-full-access`) by design. That teardown runs whenever
7
+ * a gate is disposed — including every hot recompose of this row, where nothing
8
+ * of ours stays mounted long enough to restore the selection. This module owns
9
+ * the pure encode/decode half of the workaround: the ids are written before the
10
+ * release and replayed on the next mount.
11
+ */
12
+ /**
13
+ * How long a snapshot stays replayable. A flip caused by our own release is
14
+ * followed by a re-claim within seconds; anything older is a different restart
15
+ * and must not resurrect a preset the user may have chosen since.
16
+ */
17
+ export declare const AUTO_SESSION_STATE_MAX_AGE_MS: number;
18
+ /** Serialize the session ids that were on Auto at `savedAt`. */
19
+ export declare function encodeAutoSessionState(ids: readonly string[], savedAt: number): string;
20
+ /**
21
+ * Decode a snapshot written by {@link encodeAutoSessionState}.
22
+ *
23
+ * Every malformed or stale shape degrades to `[]`: an unreadable state file
24
+ * must never stop the Auto registration from being released or re-claimed.
25
+ */
26
+ export declare function decodeAutoSessionState(raw: string | undefined, now: number, maxAgeMs?: number): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-model-switch",
3
- "version": "0.4.34",
3
+ "version": "0.4.35",
4
4
  "description": "Explicit model routing plus composer/Plan picker for DeepSeek Harness",
5
5
  "repository": {
6
6
  "type": "git",