dsh-ntr 0.1.3 → 0.1.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.en.md +8 -4
- package/README.md +8 -4
- package/lib/bridge.js +116 -28
- package/lib/client/acp-ui.js +3 -1
- package/lib/client/panel.js +6 -4
- package/lib/client/session-controls.js +27 -11
- package/lib/client.js +40 -17
- package/lib/client.js.map +1 -1
- package/lib/impl.js +102 -9
- package/lib/types/bridge.d.ts +32 -6
- package/lib/types/client/acp-ui.d.ts +6 -0
- package/lib/types/client/session-controls.d.ts +2 -0
- package/lib/types/client/store.d.ts +1 -1
- package/lib/types/impl.d.ts +36 -1
- package/lib/types/protocol.d.ts +22 -8
- package/package.json +1 -1
- package/src/bridge.ts +116 -32
- package/src/client/acp-ui.tsx +13 -2
- package/src/client/panel.tsx +6 -4
- package/src/client/session-controls.tsx +29 -11
- package/src/client/store.ts +1 -1
- package/src/impl.ts +101 -10
- package/src/protocol.ts +22 -8
package/src/protocol.ts
CHANGED
|
@@ -66,12 +66,13 @@ export interface AcpAgentDef {
|
|
|
66
66
|
*/
|
|
67
67
|
exposedModels?: string[]
|
|
68
68
|
/**
|
|
69
|
-
* Auto-discovery for {@link exposedModels}
|
|
70
|
-
* NEWLY publishes (present in an observed catalog but absent from the
|
|
71
|
-
* known before it) is appended to `exposedModels` automatically. It never
|
|
69
|
+
* Auto-discovery for {@link exposedModels}, ON by default: every model the
|
|
70
|
+
* agent NEWLY publishes (present in an observed catalog but absent from the
|
|
71
|
+
* one known before it) is appended to `exposedModels` automatically. It never
|
|
72
72
|
* touches models the user already had selected, and the very first catalog
|
|
73
|
-
* observation is a baseline (nothing is "new" yet).
|
|
74
|
-
*
|
|
73
|
+
* observation is a baseline (nothing is "new" yet). `false` is the explicit
|
|
74
|
+
* opt-out and the only value persisted; unset means "on". Flipped from the
|
|
75
|
+
* settings card's lightweight `agent/set-auto-discover-models` RPC — never by
|
|
75
76
|
* `agent/save`, which restarts the process for connection changes.
|
|
76
77
|
*/
|
|
77
78
|
autoDiscoverModels?: boolean
|
|
@@ -440,7 +441,7 @@ export interface ChatModelSetPayload { dshSessionId: string; modelId: string }
|
|
|
440
441
|
/** `session/chat-effort-set`: switch (or clear, by omitting) the agent's effort; `agentId` names the agent a not-yet-bound conversation is served by (the plugin default). */
|
|
441
442
|
export interface ChatEffortSetPayload { dshSessionId: string; effort?: string; agentId?: string }
|
|
442
443
|
/** `session/chat-config-set`: set one of the agent's extra config options. */
|
|
443
|
-
export interface ChatConfigSetPayload { dshSessionId: string; configId: string; value: string; agentId?: string }
|
|
444
|
+
export interface ChatConfigSetPayload { dshSessionId: string; configId: string; value: string | boolean; agentId?: string }
|
|
444
445
|
|
|
445
446
|
/** Host-detected agent presence and tested defaults. */
|
|
446
447
|
export interface DetectedAgentInfo {
|
|
@@ -466,7 +467,7 @@ export interface AgentSavePayload {
|
|
|
466
467
|
allowedCwdRoots?: string[]
|
|
467
468
|
env?: Record<string, string>
|
|
468
469
|
exposedModels?: string[]
|
|
469
|
-
/**
|
|
470
|
+
/** Opt out of auto-discovery with `false`; absent keeps the default (on). See {@link AcpAgentDef.autoDiscoverModels}. */
|
|
470
471
|
autoDiscoverModels?: boolean
|
|
471
472
|
/** Absent → keep the host default (30 minutes); `0` = never release. */
|
|
472
473
|
idleTimeoutMs?: number
|
|
@@ -511,6 +512,12 @@ export interface AcpCatalogChoice {
|
|
|
511
512
|
export interface AcpCatalogOption {
|
|
512
513
|
configId: string
|
|
513
514
|
name: string
|
|
515
|
+
/**
|
|
516
|
+
* `'boolean'` for an on/off toggle: `currentValue` is the string `'true'` /
|
|
517
|
+
* `'false'` (the catalog stays string-typed so every existing reader keeps
|
|
518
|
+
* working) and `choices` is empty. Absent means the ordinary select.
|
|
519
|
+
*/
|
|
520
|
+
kind?: 'boolean'
|
|
514
521
|
/** Currently selected value at parse time (may be absent from `choices`). */
|
|
515
522
|
currentValue: string | null
|
|
516
523
|
choices: AcpCatalogChoice[]
|
|
@@ -590,7 +597,7 @@ export interface AcpConversationChoice {
|
|
|
590
597
|
* accepts, persisted per conversation so a pick survives a restart and is
|
|
591
598
|
* re-applied when its ACP session is recreated or resumed.
|
|
592
599
|
*/
|
|
593
|
-
extraConfigs?: Record<string, string>
|
|
600
|
+
extraConfigs?: Record<string, string | boolean>
|
|
594
601
|
}
|
|
595
602
|
|
|
596
603
|
/** Result of `agent/probe-models`: the freshly probed (or cached) catalog. */
|
|
@@ -605,6 +612,13 @@ export interface AgentCatalogExtraOption {
|
|
|
605
612
|
configId: string
|
|
606
613
|
/** The agent's own option name (falls back to the config id host-side). */
|
|
607
614
|
name: string
|
|
615
|
+
/**
|
|
616
|
+
* `'boolean'` for an on/off toggle (`currentValue` is `'true'` / `'false'`,
|
|
617
|
+
* `choices` is empty and the composer renders a checkbox row). Absent means
|
|
618
|
+
* the ordinary select. Kept optional so cached catalogs written before
|
|
619
|
+
* toggles existed still read.
|
|
620
|
+
*/
|
|
621
|
+
kind?: 'boolean'
|
|
608
622
|
/** The value the agent reports as current, when it reports one. */
|
|
609
623
|
currentValue?: string
|
|
610
624
|
choices: Array<{ id: string; name: string; description?: string }>
|