@deepseek-ai/dsh-client-ui-settings-models 0.1.1-rc.2 → 0.1.2-alpha.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.
@@ -7,7 +7,7 @@
7
7
  * the provider editor with extra fields: the route id is being *chosen* here,
8
8
  * and the settings address does not exist until it is. One `settings.mutate`
9
9
  * sets the whole profile at `providers.<route>`; the key travels separately
10
- * through `credentials.set` under the reference the profile records, exactly as
10
+ * through `credentials/set` under the reference the profile records, exactly as
11
11
  * an existing provider's key does.
12
12
  *
13
13
  * The three fields a hand-declared route cannot default — endpoint, protocol,
@@ -21,7 +21,7 @@
21
21
  * levels instead.
22
22
  */
23
23
  import type { ReactNode } from 'react';
24
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
24
+ import type { ModelsOperations } from './operations.ts';
25
25
  import type { en } from './locales.ts';
26
26
  /** Props of {@link CustomProviderCard}. */
27
27
  export interface CustomProviderCardProps {
@@ -35,8 +35,8 @@ export interface CustomProviderCardProps {
35
35
  * than a silent overwrite of its whole profile.
36
36
  */
37
37
  revision: number;
38
- /** Wire faces for the write and for interrogating the endpoint. */
39
- api: Pick<IApiClient, 'settings' | 'credentials' | 'llm'>;
38
+ /** The Host operations this card writes and interrogates through. */
39
+ operations: ModelsOperations;
40
40
  /** Section copy. */
41
41
  t: (key: keyof typeof en) => string;
42
42
  /** Disable writes (read-only settings provider). */
@@ -6,10 +6,10 @@
6
6
  * the onboarding plugin's shared modal, so the key is entered once.
7
7
  */
8
8
  import type { ReactNode } from 'react';
9
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
10
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
9
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
11
10
  import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
12
11
  import type { ModelsSettingsState, ModelsSettingsStore } from './store.ts';
12
+ import type { ModelsOperations } from './operations.ts';
13
13
  import type { SettingsSchemaOperations } from './schema-operations.ts';
14
14
  import type { en } from './locales.ts';
15
15
  /** Registration-side dependencies of {@link DeepSeekOnboardingDialog}. */
@@ -20,8 +20,8 @@ export interface DeepSeekOnboardingInjected {
20
20
  };
21
21
  /** Shared Models-page join controller. */
22
22
  controller: ModelsSettingsStore;
23
- /** Existing wire face reused by the Models credential editor. */
24
- api: Pick<IApiClient, 'settings' | 'credentials' | 'llm'>;
23
+ /** The Host operations the reused Models credential editor writes through. */
24
+ operations: ModelsOperations;
25
25
  /** Settings schema and immutable path callbacks. */
26
26
  schema: SettingsSchemaOperations;
27
27
  /** Feature copy. */
@@ -23,11 +23,11 @@ export interface EditorFooterProps {
23
23
  /** Whether the commit is refused, as judged by the owning card. */
24
24
  submitDisabled: boolean;
25
25
  /** Commit label while idle. */
26
- submitLabel: keyof typeof en;
26
+ submitLabelKey: keyof typeof en;
27
27
  /** Commit label while a commit is in flight. */
28
- submitBusyLabel: keyof typeof en;
28
+ submitBusyLabelKey: keyof typeof en;
29
29
  /** Dismiss label; defaults to the settings editor copy. */
30
- cancelLabel?: keyof typeof en;
30
+ cancelLabelKey?: keyof typeof en;
31
31
  /** Dismiss the card without committing. */
32
32
  onCancel: () => void;
33
33
  /** Run the card's commit. */
@@ -14,14 +14,12 @@
14
14
  * rows the user can still fill in by hand.
15
15
  */
16
16
  import type { ReactNode } from 'react';
17
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
17
+ import type { ModelsOperations } from './operations.ts';
18
18
  import type { DeepSeekModelDraft } from './DeepSeekModelsEditor.tsx';
19
19
  import type { en } from './locales.ts';
20
20
  /**
21
- * One configured model row. Structurally open, exactly like the DeepSeek
22
- * catalog editor's rows: a profile field this card does not edit — one a future
23
- * schema adds, or one hand-written in `settings.yaml` — has to survive being
24
- * edited here rather than being dropped by a rebuild.
21
+ * One configured model row. Fields this card does not edit must survive an
22
+ * edit rather than being dropped by a rebuild.
25
23
  */
26
24
  export type ModelDraft = DeepSeekModelDraft;
27
25
  /** What an interrogation needs, taken from the live form. */
@@ -60,8 +58,8 @@ export interface ModelListEditorProps {
60
58
  * told what the field already says.
61
59
  */
62
60
  probeBlocked?: keyof typeof en | undefined;
63
- /** Wire face the fetch action calls. */
64
- api: Pick<IApiClient, 'llm'>;
61
+ /** The Host operations whose interrogation answers the fetch action. */
62
+ operations: ModelsOperations;
65
63
  /** Section copy. */
66
64
  t: (key: keyof typeof en) => string;
67
65
  /** Disable every control (read-only deployment or a pending write). */
@@ -12,9 +12,9 @@
12
12
  * re-renders from pushed invalidations or the post-apply reload.
13
13
  */
14
14
  import type { ReactNode } from 'react';
15
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
16
- import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots';
15
+ import type { InjectFace, PropsRenderSlots } from '@deepseek-ai/dsh-client-ui-slots';
17
16
  import type { ModelsSettingsStore, ProviderRow } from './store.ts';
17
+ import type { ModelsOperations } from './operations.ts';
18
18
  import type { SettingsSchemaOperations } from './schema-operations.ts';
19
19
  import type { en } from './locales.ts';
20
20
  /** Injected dependencies of {@link ModelsSection} (slot `inject`). */
@@ -25,18 +25,23 @@ export interface ModelsSectionInjected {
25
25
  /** Page snapshot bound by the UI renderer as useSnapshot. */
26
26
  snapshot: ModelsSettingsStore['store'];
27
27
  };
28
- /** Wire faces the editor writes through. */
29
- api: Pick<IApiClient, 'settings' | 'credentials' | 'llm'>;
28
+ /** The Host operations the section and its cards invoke. */
29
+ operations: ModelsOperations;
30
30
  /** Settings schema and immutable path callbacks. */
31
31
  schema: SettingsSchemaOperations;
32
32
  /** Section copy. */
33
33
  t: (key: keyof typeof en) => string;
34
34
  }
35
+ /** The child slots this section declares and dispatches (see ./slot-contract.ts). */
36
+ type ModelsChildSlots = 'settings.models.provider-card' | 'settings.models.footer';
35
37
  /**
36
38
  * Props delivered by the slot outlet: the inject face spread flat (the
37
- * renderer erases the share boundary at the render call).
39
+ * renderer erases the share boundary at the render call) plus the child-slot
40
+ * dispatch seat. The seat is required: the renderer binds it at the render
41
+ * call itself — unlike the inject face it is never absent at runtime — and a
42
+ * direct render that forgets it fails to compile instead of mounting nothing.
38
43
  */
39
- export type ModelsSectionProps = Partial<InjectFace<ModelsSectionInjected>>;
44
+ export type ModelsSectionProps = Partial<InjectFace<ModelsSectionInjected>> & PropsRenderSlots<ModelsChildSlots>;
40
45
  /** Provider identity shared by row actions and confirmation copy. */
41
46
  export interface ProviderIdentity {
42
47
  /** Stable provider route id. */
@@ -50,12 +55,12 @@ export interface ProviderIdentity {
50
55
  * and the whole operation safely retryable; both unsets are idempotent.
51
56
  * The settings removal names the profile rather than rebuilding its whole
52
57
  * namespace from a partial view.
53
- * @param api - settings and credential wire faces.
58
+ * @param operations - the page's Host operations.
54
59
  * @param controller - the page store to refresh.
55
60
  * @param target - the provider's settings address and optional managed credential.
56
61
  * @returns the failure message, or undefined once the write and reload landed.
57
62
  */
58
- export declare function removeProviderProfile(api: Pick<IApiClient, 'settings' | 'credentials'>, controller: ModelsSettingsStore, target: {
63
+ export declare function removeProviderProfile(operations: ModelsOperations, controller: ModelsSettingsStore, target: {
59
64
  settingsNs: string;
60
65
  settingsPath: readonly string[];
61
66
  credentialRef?: string;
@@ -80,4 +85,5 @@ export declare function providerCopy(template: string, target: ProviderIdentity)
80
85
  * @returns the section, or null while the shell has not injected yet.
81
86
  */
82
87
  export declare function ModelsSection(props: ModelsSectionProps): ReactNode;
88
+ export {};
83
89
  //# sourceMappingURL=ModelsSection.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * One provider's editor card, hand-written per adapter family: the primary
3
3
  * field is a single write-only **API key** input (the page never asks for an
4
- * environment-variable name — a typed key stores through `credentials.set`
4
+ * environment-variable name — a typed key stores through `credentials/set`
5
5
  * under the profile's reference, deriving `<ROUTE>_API_KEY` when the profile
6
6
  * has none. The pi-ai profile records that derivation as `apiKeyEnv` only when
7
7
  * a key is entered; a blank key materializes a reference-free profile for
@@ -21,7 +21,8 @@
21
21
  * see instead of rebuilding the whole subtree from a partial descriptor.
22
22
  */
23
23
  import type { ReactNode } from 'react';
24
- import type { IApiClient, SettingsNamespaceView, SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client';
24
+ import type { SettingsNamespaceView, SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client';
25
+ import type { ModelsOperations } from './operations.ts';
25
26
  import type { SettingsSchemaOperations } from './schema-operations.ts';
26
27
  import type { en } from './locales.ts';
27
28
  /** Props of {@link ProviderEditor}. */
@@ -46,8 +47,8 @@ export interface ProviderEditorProps {
46
47
  schema: SettingsSchemaOperations;
47
48
  /** Path from the section root to this provider's profile. */
48
49
  settingsPath: readonly string[];
49
- /** Wire faces for writes and for interrogating a provider endpoint. */
50
- api: Pick<IApiClient, 'settings' | 'credentials' | 'llm'>;
50
+ /** The Host operations this card writes and interrogates through. */
51
+ operations: ModelsOperations;
51
52
  /** Section copy. */
52
53
  t: (key: keyof typeof en) => string;
53
54
  /** Disable writes (read-only settings provider). */
@@ -59,11 +60,11 @@ export interface ProviderEditorProps {
59
60
  /** Give the credential field initial focus when this editor mounts. */
60
61
  autoFocusCredential?: boolean;
61
62
  /** Override the dismiss action copy. */
62
- cancelLabel?: keyof typeof en;
63
+ cancelLabelKey?: keyof typeof en;
63
64
  /** Override the idle commit action copy. */
64
- submitLabel?: keyof typeof en;
65
+ submitLabelKey?: keyof typeof en;
65
66
  /** Override the in-flight commit action copy. */
66
- submitBusyLabel?: keyof typeof en;
67
+ submitBusyLabelKey?: keyof typeof en;
67
68
  /** Close the editor; `changed` reports whether an Apply committed. */
68
69
  onClose: (changed: boolean) => void;
69
70
  }
@@ -1,6 +1,6 @@
1
1
  /** Product-wide, versioned internal-testing notice. */
2
2
  import type { ReactNode } from 'react';
3
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
3
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
4
4
  import type { InjectFace, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
5
5
  import type { WelcomeNoticeState, WelcomeNoticeStore } from './welcome-store.ts';
6
6
  import type { en } from './locales.ts';
@@ -6,10 +6,11 @@
6
6
  * Export discipline:
7
7
  * packages/client/AGENTS.md.
8
8
  */
9
- import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
9
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
10
10
  import { ModelsSettingsStore } from './store.ts';
11
11
  import { type ModelsKey } from './locales.ts';
12
12
  export type { ModelsSectionInjected, ModelsSectionProps } from './ModelsSection.tsx';
13
+ export type { ModelsFooterOwnerProps, ProviderCardExtrasOwnerProps } from './slot-contract.ts';
13
14
  export type { ModelsKey } from './locales.ts';
14
15
  declare module '@deepseek-ai/dsh-client-ui-slots' {
15
16
  interface LocaleNamespaceMap {
@@ -17,7 +18,8 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
17
18
  'settings.models': ModelsKey;
18
19
  }
19
20
  }
20
- export type { ModelsSettingsState, ProviderRow } from './store.ts';
21
+ export type { ModelsSettingsState, ProviderDirectoryEntry, ProviderRow, } from './store.ts';
22
+ export type { ModelDiscoveryOutcome, ModelsOperations, SettingsWriteOutcome } from './operations.ts';
21
23
  /**
22
24
  * Refetch the page snapshot only after its first load: an unopened Models
23
25
  * page must not fetch on background invalidations.
@@ -84,11 +84,13 @@ export declare const en: {
84
84
  customApiUnset: string;
85
85
  customNeedsBaseUrl: string;
86
86
  customNeedsModels: string;
87
+ customBaseUrlPlaceholder: string;
88
+ settingsPathUnresolvable: string;
87
89
  create: string;
88
90
  creating: string;
89
- welcomeTitle: "Internal Testing Notice";
90
- welcomeBody: "DeepSeek Harness 0.1 remains in testing for Harness developers. Many areas need further improvement, and we welcome feedback from the developer community. DeepSeek Harness's core plugins and foundational APIs will continue to evolve rapidly over the coming months.\n\nWe look forward to exploring the limits of intelligence with developers around the world, building on open-source, open, reusable, and composable infrastructure. We welcome Harness developers everywhere to join the DSH plugin ecosystem.";
91
- welcomeContinue: "Continue";
91
+ welcomeTitle: string;
92
+ welcomeBody: string;
93
+ welcomeContinue: string;
92
94
  welcomeError: string;
93
95
  onboardingTitle: string;
94
96
  onboardingDescription: string;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * The Host reads and writes the Models cards perform, as callbacks built in the
3
+ * plugin body. Cards receive these instead of a context: the outcomes name what
4
+ * a card renders — a stored view, a stale revision, a refusal message — so the
5
+ * failure codes and Remote namespaces stay in the apply world.
6
+ */
7
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
8
+ import type { CredentialInfo, LlmDiscoveredModel, LlmModelDiscoveryRequest, SettingsNamespaceView, SettingsPathOpView } from '@deepseek-ai/dsh-api-remotes/client';
9
+ /** What one namespace write answered. */
10
+ export type SettingsWriteOutcome =
11
+ /** Committed; the view carries the stored user subtree and the new revision. */
12
+ {
13
+ readonly kind: 'written';
14
+ readonly view: SettingsNamespaceView;
15
+ }
16
+ /**
17
+ * The stored revision moved after the card read it, so the draft is stale.
18
+ * The message stays for callers that report the Host diagnostic as it is.
19
+ */
20
+ | {
21
+ readonly kind: 'conflict';
22
+ readonly message: string;
23
+ }
24
+ /** Any other refusal, with the Host's own diagnostic. */
25
+ | {
26
+ readonly kind: 'refused';
27
+ readonly message: string;
28
+ };
29
+ /** What one endpoint interrogation answered. */
30
+ export type ModelDiscoveryOutcome =
31
+ /** The candidates the provider disclosed, in its own order. */
32
+ {
33
+ readonly kind: 'found';
34
+ readonly models: readonly LlmDiscoveredModel[];
35
+ }
36
+ /** The interrogation was refused, with the Host's own diagnostic. */
37
+ | {
38
+ readonly kind: 'refused';
39
+ readonly message: string;
40
+ };
41
+ /** The Host operations the Models page and its cards invoke. */
42
+ export interface ModelsOperations {
43
+ /**
44
+ * Read one credential reference's state.
45
+ * @param ref - credential reference name.
46
+ * @returns the state, or undefined when the reference is unknown or the read was refused.
47
+ */
48
+ describeCredential(ref: string): Promise<CredentialInfo | undefined>;
49
+ /**
50
+ * Store one credential literal under its reference.
51
+ * @param ref - credential reference name.
52
+ * @param value - the literal to store.
53
+ * @returns the refusal message, or undefined once stored.
54
+ */
55
+ storeCredential(ref: string, value: string): Promise<string | undefined>;
56
+ /**
57
+ * Remove one credential reference (idempotent).
58
+ * @param ref - credential reference name.
59
+ * @returns the refusal message, or undefined once removed.
60
+ */
61
+ removeCredential(ref: string): Promise<string | undefined>;
62
+ /**
63
+ * Apply path operations to one settings namespace.
64
+ * @param ns - settings namespace identity.
65
+ * @param ops - ordered path operations against the stored section, as the
66
+ * wire takes them (the Remote signature owns the array).
67
+ * @param expectedRevision - revision the draft was opened at, or undefined to write unfenced.
68
+ * @returns the write outcome the card renders from.
69
+ */
70
+ writeSettings(ns: string, ops: SettingsPathOpView[], expectedRevision: number | undefined): Promise<SettingsWriteOutcome>;
71
+ /**
72
+ * Ask a provider endpoint what models it serves.
73
+ * @param settingsNs - namespace whose adapter family answers.
74
+ * @param request - endpoint facts as the form currently shows them.
75
+ * @returns the candidates, or the refusal.
76
+ */
77
+ discoverModels(settingsNs: string, request: LlmModelDiscoveryRequest): Promise<ModelDiscoveryOutcome>;
78
+ }
79
+ /**
80
+ * Bind the page's Host operations to the plugin's own Remote namespaces.
81
+ * @param ctx - the page plugin's context, which declares `remote.credentials`,
82
+ * `remote.llm`, and `remote.settings` in its own `inject`.
83
+ * @returns the callbacks the section and its cards are injected with.
84
+ */
85
+ export declare function createModelsOperations(ctx: ClientContext): ModelsOperations;
86
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Models-page extension slots — the two seats through which a plugin
3
+ * distributed outside this repository adds UI to the Models settings section
4
+ * without editing it.
5
+ *
6
+ * `settings.models.provider-card` is keyed by the row's owning settings
7
+ * namespace (`ProviderDirectoryEntry.settingsNs`): an adapter family's
8
+ * companion plugin registers one entry under the family's namespace and
9
+ * receives every card of that family — shipped, added, and hand-declared rows
10
+ * alike — while the section never learns what the namespace means. Keying on
11
+ * the namespace follows `settings.plugin.item`, and the key domain stays the
12
+ * open string space because hand-declared route ids are user-chosen at
13
+ * runtime.
14
+ *
15
+ * TYPE HOME RATIONALE: the Models section declares these slots at runtime,
16
+ * and a plugin registering an extension already depends on this package for
17
+ * the declaration. The types therefore live with their declarer.
18
+ */
19
+ import type { ProviderDirectoryEntry } from './store.ts';
20
+ declare module '@deepseek-ai/dsh-client-ui-slots' {
21
+ interface SlotMap {
22
+ /**
23
+ * One provider card's adapter extension area, dispatched with
24
+ * `entryKey = settingsNs` on every card that renders a directory row: a
25
+ * saved row's card (its first-run setup posture included) and the
26
+ * add-provider draft card. The hand-declared draft card has no directory
27
+ * row yet, so it dispatches nothing until saved. Without a registrant the
28
+ * area renders nothing.
29
+ */
30
+ 'settings.models.provider-card': {
31
+ kind: 'keyed';
32
+ scope: 'root';
33
+ owner: ProviderCardExtrasOwnerProps;
34
+ };
35
+ /**
36
+ * Ordered extension area after the provider rows and the add controls.
37
+ * Without a registrant the area renders nothing.
38
+ */
39
+ 'settings.models.footer': {
40
+ kind: 'list';
41
+ scope: 'root';
42
+ owner: ModelsFooterOwnerProps;
43
+ };
44
+ }
45
+ }
46
+ /** Owner share of one provider-card extension occurrence. */
47
+ export interface ProviderCardExtrasOwnerProps {
48
+ /** The card's directory row (route id, display name, settings address, live state). */
49
+ provider: ProviderDirectoryEntry;
50
+ /** Whether any layer configures this provider (its profile resolves); `false` while the add-provider draft edits a dormant row. */
51
+ configured: boolean;
52
+ /** Whether the row's referenced api-key credential is confirmed configured (the page's credential join). */
53
+ keyConfigured: boolean;
54
+ }
55
+ /** Owner share of the footer area (the section supplies nothing). */
56
+ export interface ModelsFooterOwnerProps {
57
+ /** Marker field: footer owner props are intentionally empty. */
58
+ children?: never;
59
+ }
60
+ //# sourceMappingURL=slot-contract.d.ts.map
@@ -1,18 +1,36 @@
1
1
  /**
2
2
  * Models settings page store: one snapshot joining the configurable-provider
3
- * directory (`llm.providers`), the settings namespaces (shared settings mirror),
4
- * and the referenced credentials (`credentials.describe`). The host stays the
3
+ * directory (`llm/listProviders` joined with `llm/listConfigurableProviders`),
4
+ * the settings namespaces (shared settings mirror),
5
+ * and the referenced credentials (`credentials/describe`). The host stays the
5
6
  * single fact source — every mutation writes through the wire and the page
6
7
  * re-renders from the next describe, pushed or refetched.
7
8
  */
8
- import type { ConfigurableProviderView, CredentialView, IApiClient, SettingsNamespaceView } from '@deepseek-ai/dsh-api-remotes/client';
9
- import type { SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
9
+ import type { Context as ClientContext } from '@deepseek-ai/cordis';
10
+ import type { CredentialInfo, LlmConfigurableProvider, LlmProviderInfo, SettingsNamespaceView } from '@deepseek-ai/dsh-api-remotes/client';
11
+ import type { SnapshotStore } from '@deepseek-ai/dsh-client-store';
10
12
  import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client';
11
13
  import type { SettingsSchemaOperations } from './schema-operations.ts';
14
+ /** One provider row after joining the configurable directory with live routes. */
15
+ export interface ProviderDirectoryEntry {
16
+ readonly provider: string;
17
+ readonly displayName: string;
18
+ readonly settingsNs: string;
19
+ readonly settingsPath: readonly string[];
20
+ readonly active: boolean;
21
+ readonly declared?: boolean;
22
+ }
23
+ /**
24
+ * Join declared configurable providers with the currently registered routes.
25
+ * @param registered - live provider routes in registration order.
26
+ * @param directory - declared configurable providers in declaration order.
27
+ * @returns declared rows followed by live routes with no declaration.
28
+ */
29
+ export declare function joinProviderDirectory(registered: readonly LlmProviderInfo[], directory: readonly LlmConfigurableProvider[]): ProviderDirectoryEntry[];
12
30
  /** One provider row the page renders. */
13
31
  export interface ProviderRow {
14
32
  /** The directory entry (route id, display name, settings address, live state). */
15
- entry: ConfigurableProviderView;
33
+ entry: ProviderDirectoryEntry;
16
34
  /** Whether any layer configures this provider (its profile resolves). */
17
35
  configured: boolean;
18
36
  /** Whether the user layer alone carries the profile (removal restores the base). */
@@ -20,7 +38,14 @@ export interface ProviderRow {
20
38
  /** The credential reference the resolved profile names, when one does. */
21
39
  apiKeyEnv: string | undefined;
22
40
  /** Credential state for {@link apiKeyEnv}, once described. */
23
- credential: CredentialView | undefined;
41
+ credential: CredentialInfo | undefined;
42
+ /**
43
+ * Credential state for the page's derived `<ROUTE>_API_KEY`, described only
44
+ * while the profile names no reference — the provider-card seat's
45
+ * `keyConfigured` fact for dormant and keyless rows, matching the editor's
46
+ * own derivation rule.
47
+ */
48
+ derivedCredential?: CredentialInfo;
24
49
  }
25
50
  /** Page snapshot. */
26
51
  export interface ModelsSettingsState {
@@ -36,14 +61,6 @@ export interface ModelsSettingsState {
36
61
  /** Namespace views by ns, for the editor's schema/layers/secrets. */
37
62
  namespaces: ReadonlyMap<string, SettingsNamespaceView>;
38
63
  }
39
- /**
40
- * Human text for a rejected wire call. A transport failure rejects with an
41
- * Error; a host or a runtime can reject with anything, and the page still has
42
- * to say something.
43
- * @param error - the rejection value.
44
- * @returns the message to show.
45
- */
46
- export declare function messageOf(error: unknown): string;
47
64
  /**
48
65
  * Derive the conventional credential reference for a provider route: the v1
49
66
  * page never asks for an environment-variable name, so a typed key stores
@@ -64,7 +81,7 @@ export declare function deriveKeyRef(provider: string): string;
64
81
  export declare function protocolChoices(namespace: SettingsNamespaceView | undefined, schema: SettingsSchemaOperations): string[];
65
82
  /** The models settings page controller (one per settings surface). */
66
83
  export declare class ModelsSettingsStore {
67
- private readonly api;
84
+ private readonly ctx;
68
85
  private readonly schema;
69
86
  private readonly describeFace;
70
87
  /** The snapshot the section renders from (uSES-safe store). */
@@ -72,10 +89,12 @@ export declare class ModelsSettingsStore {
72
89
  /** Latest load wins; an older response never overwrites a newer one. */
73
90
  private generation;
74
91
  /**
75
- * @param api - the wire face (credentials/llm domains, and settings writes).
92
+ * @param ctx - the page plugin's context, whose `remote.llm` and
93
+ * `remote.credentials` namespaces carry the directory and credential reads.
94
+ * @param schema - settings-owned schema and immutable path operations.
76
95
  * @param describeFace - the shared mirror's describe face (namespace views and writability).
77
96
  */
78
- constructor(api: Pick<IApiClient, 'settings' | 'credentials' | 'llm'>, schema: SettingsSchemaOperations, describeFace: SettingsDescribeFace);
97
+ constructor(ctx: ClientContext, schema: SettingsSchemaOperations, describeFace: SettingsDescribeFace);
79
98
  /**
80
99
  * Refresh the whole page snapshot: the provider directory and the mirror's
81
100
  * settings answer in parallel, then one batched credential describe over
@@ -85,6 +104,8 @@ export declare class ModelsSettingsStore {
85
104
  * @returns nothing; the snapshot carries the outcome.
86
105
  */
87
106
  load(): Promise<void>;
107
+ /** Publish one load's failure text, unless a newer load already took over. */
108
+ private failLoad;
88
109
  }
89
110
  /**
90
111
  * Whether a joined row can serve model requests as it stands: the route is
@@ -4,7 +4,8 @@
4
4
  * remote browser's memory-mode scope never answers and the acknowledgement
5
5
  * stays process-local here.
6
6
  */
7
- import type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
7
+ import { type SnapshotStore } from '@deepseek-ai/dsh-client-store';
8
+ import type { SettingsScope } from '@deepseek-ai/dsh-client-ui-settings/client';
8
9
  /** State rendered by the welcome step. */
9
10
  export interface WelcomeNoticeState {
10
11
  status: 'idle' | 'loading' | 'ready' | 'saving' | 'error';
@@ -7,17 +7,4 @@ export declare const WELCOME_NOTICE_ACK_FIELD = "welcomeNoticeVersion";
7
7
  * again. The acknowledgement is compared for exact equality.
8
8
  */
9
9
  export declare const WELCOME_NOTICE_VERSION = "2026-08-13.1";
10
- /** The complete editable internal-testing notice in both supported GUI locales. */
11
- export declare const WELCOME_NOTICE_COPY: {
12
- readonly zh: {
13
- readonly title: "内测声明";
14
- readonly body: "DeepSeek Harness 目前的 0.1 版本仍处在面向 Harness 开发者进行测试的阶段,还有许多地方需要持续改进和打磨,希望听取广大开发者的反馈建议。预计 DeepSeek Harness 的核心插件以及基础 API 都会在接下来的一段时间内快速迭代、持续演化。\n\n我们期待与全球开发者一起,在开源、开放、可复用、可组合的基础设施之上,共同探索智能上限。欢迎全球 Harness 开发者加入 DSH 插件生态。";
15
- readonly continueLabel: "继续";
16
- };
17
- readonly en: {
18
- readonly title: "Internal Testing Notice";
19
- readonly body: "DeepSeek Harness 0.1 remains in testing for Harness developers. Many areas need further improvement, and we welcome feedback from the developer community. DeepSeek Harness's core plugins and foundational APIs will continue to evolve rapidly over the coming months.\n\nWe look forward to exploring the limits of intelligence with developers around the world, building on open-source, open, reusable, and composable infrastructure. We welcome Harness developers everywhere to join the DSH plugin ecosystem.";
20
- readonly continueLabel: "Continue";
21
- };
22
- };
23
10
  //# sourceMappingURL=onboarding-copy.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-client-ui-settings-models",
3
3
  "description": "Models settings and shared product-onboarding dialogs over existing settings and credential joins",
4
- "version": "0.1.1-rc.2",
4
+ "version": "0.1.2-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,7 +32,6 @@
32
32
  "dsh": {
33
33
  "client": {
34
34
  "inject": [
35
- "@deepseek-ai/dsh-client-runtime",
36
35
  "@deepseek-ai/dsh-client-ui-settings",
37
36
  "@deepseek-ai/dsh-client-locale",
38
37
  "@deepseek-ai/dsh-api-remotes"
@@ -42,27 +41,22 @@
42
41
  },
43
42
  "license": "MIT",
44
43
  "peerDependencies": {
45
- "@deepseek-ai/cordis": "^4.0.1",
46
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
47
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
48
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
49
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
50
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
51
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2"
44
+ "@deepseek-ai/cordis": "^4.0.2"
52
45
  },
53
46
  "devDependencies": {
54
47
  "@types/react": "~18.3.1",
55
48
  "react": "^18.2.0",
56
- "@deepseek-ai/dsh-client-connection": "^0.1.1-rc.2",
57
- "@deepseek-ai/dsh-api-remotes": "^0.1.1-rc.2",
58
- "@deepseek-ai/dsh-client-locale": "^0.1.1-rc.2",
59
- "@deepseek-ai/dsh-client-runtime": "^0.1.1-rc.2",
60
- "@deepseek-ai/dsh-client-test-runtime": "^0.1.1-rc.2",
61
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.1-rc.2",
62
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.1-rc.2",
63
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.1-rc.2",
64
- "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
65
- "@deepseek-ai/cordis": "^4.0.1"
49
+ "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
50
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
51
+ "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.2",
52
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
53
+ "@deepseek-ai/dsh-client-test-runtime": "^0.1.2-alpha.2",
54
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
55
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
56
+ "@deepseek-ai/cordis": "^4.0.2",
57
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
58
+ "@deepseek-ai/dsh-util-values": "^0.1.2-alpha.2",
59
+ "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2"
66
60
  },
67
61
  "files": [
68
62
  "lib/index.js",