dsh-cline-pass 0.2.2 → 0.2.3
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/lib/index.js +10 -5
- package/lib/panel.js +5 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -160,8 +160,12 @@ export const Config = z.object({
|
|
|
160
160
|
* checkbox restores them.
|
|
161
161
|
*
|
|
162
162
|
* Read when the plugin activates, so a change needs a restart.
|
|
163
|
+
*
|
|
164
|
+
* Volatile because the panel writes it: the settings service refuses a write to
|
|
165
|
+
* any field the schema does not mark live ("Config field … is not volatile"),
|
|
166
|
+
* so a plain boolean would make the switch fail on every click.
|
|
163
167
|
*/
|
|
164
|
-
exposeTools: z.boolean().default(false),
|
|
168
|
+
exposeTools: markVolatile(z.boolean().default(false)),
|
|
165
169
|
exposeCatalog: z.boolean().default(false),
|
|
166
170
|
historyLimit: z.number().default(100),
|
|
167
171
|
/**
|
|
@@ -561,9 +565,6 @@ export function apply(ctx, config) {
|
|
|
561
565
|
await credentials.set(credentialRef(ref), String(value))
|
|
562
566
|
},
|
|
563
567
|
refreshCatalog,
|
|
564
|
-
// Read at activation, so this reports the value the running plugin was
|
|
565
|
-
// built with rather than the current config field.
|
|
566
|
-
exposeTools: () => toolsExposed,
|
|
567
568
|
}
|
|
568
569
|
|
|
569
570
|
// The agent-facing management surface. Optional: the eight definitions are
|
|
@@ -571,7 +572,11 @@ export function apply(ctx, config) {
|
|
|
571
572
|
// never probes, pins or edits the pool does not need them. `exposeTools:
|
|
572
573
|
// false` drops them while leaving the provider and the setup panel — a
|
|
573
574
|
// browser page rather than a tool — untouched.
|
|
574
|
-
|
|
575
|
+
//
|
|
576
|
+
// Read from the unwrapped snapshot, not from `config`: the field is volatile,
|
|
577
|
+
// so the Loader may hand it over as a reference object and `ref !== false`
|
|
578
|
+
// would be true for a stored `false`.
|
|
579
|
+
const toolsExposed = liveConfig.exposeTools !== false
|
|
575
580
|
if (toolsExposed) {
|
|
576
581
|
registerTools(ctx, { store, engine, control })
|
|
577
582
|
} else {
|
package/lib/panel.js
CHANGED
|
@@ -139,10 +139,11 @@ export function createPanel({ control, engine, store }) {
|
|
|
139
139
|
usage: store.usage(),
|
|
140
140
|
catalogCount: Number(store.catalog()?.ids?.length ?? 0),
|
|
141
141
|
historySize: store.historySize(),
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
//
|
|
145
|
-
|
|
142
|
+
// The stored value, not the running one: the switch states what the user
|
|
143
|
+
// wants, and reporting the running value would snap it back to where it
|
|
144
|
+
// started the moment they clicked it, which reads as a failed click. The
|
|
145
|
+
// caption is what says when the choice takes effect.
|
|
146
|
+
exposeTools: config.exposeTools !== false,
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-cline-pass",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Self-contained Cline Pass provider for dsh: register Cline Pass subscription models on the harness LLM seam, enumerate and validate the upstream channels behind each model, pin or exclude them with failover, and drive an account pool. No proxy process and no external cline-pass-switcher install required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|