dsh-thinking-levels 4.6.0 → 4.7.1
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/CHANGELOG.md +48 -0
- package/lib/auto-schedule-projection.d.ts +164 -6
- package/lib/auto-schedule-projection.js +252 -19
- package/lib/client.js +1633 -353
- package/lib/client.js.map +1 -1
- package/lib/index.js +27 -0
- package/lib/plugin-records.d.ts +85 -0
- package/lib/plugin-records.js +181 -0
- package/package.json +155 -155
package/lib/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { buildBillingDefinition } from "./billing-projection.js";
|
|
|
4
4
|
import { recentToolCalls } from "./session-events.js";
|
|
5
5
|
import { buildAutoScheduleDefinition, readAutoSchedule, requestedEffortOf } from "./auto-schedule-projection.js";
|
|
6
6
|
import { effortOfSelection, planStrictStep, } from "./strict-step-schedule.js";
|
|
7
|
+
import { markSchedulerWrite } from "./plugin-records.js";
|
|
7
8
|
import { CONTEXT_WINDOW_MAX, CONTEXT_WINDOW_MIN } from "./context-window.js";
|
|
8
9
|
import { PI_AI_NAMESPACE, TAKEOVER_NAMESPACE_CANDIDATES, takeoverPatch, takeoverRoutesOf, withOfficialCompatFixes, } from "./takeover-sync.js";
|
|
9
10
|
import { describeSettings, readSection, readSectionOf, resolveNamespaceOf } from "./settings-read.js";
|
|
@@ -714,6 +715,27 @@ export function apply(ctx, config = DEFAULT_CONFIG) {
|
|
|
714
715
|
}
|
|
715
716
|
return strictSelectNext(agent, provider, model, write) ? 'next' : 'none';
|
|
716
717
|
};
|
|
718
|
+
/**
|
|
719
|
+
* Record a scheduler write into the session log so the trace can attribute it.
|
|
720
|
+
*
|
|
721
|
+
* Fire-and-forget on purpose: `agent/pre-step` must not wait on a log append,
|
|
722
|
+
* and a missing channel must never fail the step. The mark is an `ignorable`
|
|
723
|
+
* `plugin:` record, so readers that do not know it skip it rather than refuse
|
|
724
|
+
* the session (see plugin-records.ts).
|
|
725
|
+
* @param agent - the agent whose session receives the mark.
|
|
726
|
+
* @param write - the level written (or the clear).
|
|
727
|
+
* @param applied - whether it landed on this step or is deferred to the next.
|
|
728
|
+
*/
|
|
729
|
+
const markStrictWrite = (agent, provider, model, write, applied, intent) => {
|
|
730
|
+
const session = agent.session;
|
|
731
|
+
void markSchedulerWrite(session, {
|
|
732
|
+
...write.clear ? { clear: true } : { level: String(write.level) },
|
|
733
|
+
provider,
|
|
734
|
+
model,
|
|
735
|
+
applied,
|
|
736
|
+
intent,
|
|
737
|
+
}, ctx.logger).catch(() => { });
|
|
738
|
+
};
|
|
717
739
|
/**
|
|
718
740
|
* Schedule the step the host just fixed.
|
|
719
741
|
*/
|
|
@@ -739,6 +761,11 @@ export function apply(ctx, config = DEFAULT_CONFIG) {
|
|
|
739
761
|
const plan = await strictPlanFor(agent, provider, model, selection.reasoningEffort);
|
|
740
762
|
const applied = strictApplyStep(agent, provider, model, selection, plan);
|
|
741
763
|
const write = plan.select;
|
|
764
|
+
// Mark the write in the log: without it the trace cannot tell a scheduler
|
|
765
|
+
// choice from a user pick (the host never logs plugin-side selections).
|
|
766
|
+
if (write !== undefined && applied !== 'none') {
|
|
767
|
+
markStrictWrite(agent, provider, model, write, applied, plan.intent);
|
|
768
|
+
}
|
|
742
769
|
ctx.logger?.info?.('[thinking-levels] agent/pre-step: model=%s/%s fixed=%s intent=%s => %s=%s', provider, model, fixed ?? 'adapter default', plan.intent, applied === 'step' ? 'applied' : applied === 'next' ? 'deferred-next-step' : 'unchanged', write === undefined ? '-' : write.clear ? 'clear' : String(write.level));
|
|
743
770
|
}
|
|
744
771
|
catch (error) {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable marks for the scheduler's OWN `model/selection` writes.
|
|
3
|
+
*
|
|
4
|
+
* ## The problem this solves
|
|
5
|
+
*
|
|
6
|
+
* On the 0.2.2+ strict line this plugin is itself a `model/selection` writer:
|
|
7
|
+
* it fixes the next step's level through `agent.model.select()` (or by rewriting
|
|
8
|
+
* the step's captured selection). Those writes do NOT reach the session log —
|
|
9
|
+
* the host only appends `model/selection` for an explicit user pick
|
|
10
|
+
* (`api/session-controller/src/commands.ts:176` → `selectForNextRequest`).
|
|
11
|
+
*
|
|
12
|
+
* Measured live (session `7f321902`): ONE `model/selection` event against THIRTY
|
|
13
|
+
* `request/header` events alternating high/low. A projection folded over the log
|
|
14
|
+
* alone therefore cannot tell "the user chose low" from "the scheduler chose
|
|
15
|
+
* low", and the first honest answer was `unknown` — truthful, but useless: it
|
|
16
|
+
* cannot distinguish scheduler output from a genuinely unexplained change.
|
|
17
|
+
*
|
|
18
|
+
* ## The mechanism
|
|
19
|
+
*
|
|
20
|
+
* `@deepseek-ai/dsh-session` exposes `appendPluginRecord(session, type, data)`
|
|
21
|
+
* for exactly this: an `ignorable` event under a `plugin:`-namespaced type that
|
|
22
|
+
* never enters the model-visible surface, is retained across fork/resume, and is
|
|
23
|
+
* skipped (not refused) by readers that do not know it. We append one record per
|
|
24
|
+
* scheduler write, so the projection can attribute the following
|
|
25
|
+
* `request/header` to the scheduler.
|
|
26
|
+
*
|
|
27
|
+
* ## Coupling rules
|
|
28
|
+
*
|
|
29
|
+
* - **Soft**: the host package is resolved with a dynamic `import()` at call
|
|
30
|
+
* time and every failure degrades to "no mark" (the projection then keeps its
|
|
31
|
+
* `unknown` attribution). A plugin must never take a turn down because an
|
|
32
|
+
* optional telemetry channel is missing (`agent-loop/README.md:128`).
|
|
33
|
+
* - **Never throws**: the caller is mid-turn; a rejected append would abort the
|
|
34
|
+
* step. All paths are wrapped.
|
|
35
|
+
* - **Probed once**: the first attempt logs whether the API was reachable, so a
|
|
36
|
+
* silent degradation is diagnosable from the host log instead of by guessing.
|
|
37
|
+
* @module dsh-thinking-levels/plugin-records
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* The record type. `plugin:` + slash-separated lowercase segments, per the
|
|
41
|
+
* host grammar (`PluginRecordType` in `dsh-session/types`).
|
|
42
|
+
*/
|
|
43
|
+
export declare const SCHEDULER_WRITE_RECORD = "plugin:dsh-thinking-levels/scheduler-write";
|
|
44
|
+
/** Payload of one scheduler-write mark. */
|
|
45
|
+
export interface SchedulerWriteRecord {
|
|
46
|
+
/** The level this plugin wrote (absent when it cleared the effort). */
|
|
47
|
+
level?: string;
|
|
48
|
+
/** `true` when the write removed the effort instead of setting one. */
|
|
49
|
+
clear?: boolean;
|
|
50
|
+
/** The intent the scheduler resolved for this step, for diagnosis. */
|
|
51
|
+
intent?: string;
|
|
52
|
+
/** Provider/model route the write targeted. */
|
|
53
|
+
provider?: string;
|
|
54
|
+
model?: string;
|
|
55
|
+
/** `step` when the write landed on the current step, `next` when deferred. */
|
|
56
|
+
applied?: 'step' | 'next';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Append one scheduler-write mark to the session log.
|
|
60
|
+
*
|
|
61
|
+
* Best-effort by construction: an absent API, a non-appendable session, a
|
|
62
|
+
* rejected payload or a throwing host all resolve to `false` — never a
|
|
63
|
+
* rejection — because the caller is in the middle of a turn.
|
|
64
|
+
* @param session - the live Session the write applies to (`agent.session`).
|
|
65
|
+
* @param record - what was written.
|
|
66
|
+
* @param logger - optional host logger, used once for the capability probe.
|
|
67
|
+
* @returns whether the mark was committed.
|
|
68
|
+
*/
|
|
69
|
+
export declare function markSchedulerWrite(session: unknown, record: SchedulerWriteRecord, logger?: {
|
|
70
|
+
info?: (message: string, ...args: unknown[]) => void;
|
|
71
|
+
warn?: (message: string, ...args: unknown[]) => void;
|
|
72
|
+
}): Promise<boolean>;
|
|
73
|
+
/**
|
|
74
|
+
* Read one committed event as a scheduler-write mark.
|
|
75
|
+
*
|
|
76
|
+
* Duck-typed on purpose: the projection folds raw events and must recognize the
|
|
77
|
+
* mark on any host line without importing host types.
|
|
78
|
+
* @param event - any committed session event.
|
|
79
|
+
* @returns the record payload, or undefined for any other event.
|
|
80
|
+
*/
|
|
81
|
+
export declare function schedulerWriteOf(event: unknown): SchedulerWriteRecord | undefined;
|
|
82
|
+
/** Whether the capability probe has run and what it found (diagnostics/tests). */
|
|
83
|
+
export declare function schedulerMarkChannel(): 'ready' | 'unavailable' | 'unprobed';
|
|
84
|
+
/** Test seam: forget the cached module and probe state. */
|
|
85
|
+
export declare function resetSchedulerMarkChannel(): void;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable marks for the scheduler's OWN `model/selection` writes.
|
|
3
|
+
*
|
|
4
|
+
* ## The problem this solves
|
|
5
|
+
*
|
|
6
|
+
* On the 0.2.2+ strict line this plugin is itself a `model/selection` writer:
|
|
7
|
+
* it fixes the next step's level through `agent.model.select()` (or by rewriting
|
|
8
|
+
* the step's captured selection). Those writes do NOT reach the session log —
|
|
9
|
+
* the host only appends `model/selection` for an explicit user pick
|
|
10
|
+
* (`api/session-controller/src/commands.ts:176` → `selectForNextRequest`).
|
|
11
|
+
*
|
|
12
|
+
* Measured live (session `7f321902`): ONE `model/selection` event against THIRTY
|
|
13
|
+
* `request/header` events alternating high/low. A projection folded over the log
|
|
14
|
+
* alone therefore cannot tell "the user chose low" from "the scheduler chose
|
|
15
|
+
* low", and the first honest answer was `unknown` — truthful, but useless: it
|
|
16
|
+
* cannot distinguish scheduler output from a genuinely unexplained change.
|
|
17
|
+
*
|
|
18
|
+
* ## The mechanism
|
|
19
|
+
*
|
|
20
|
+
* `@deepseek-ai/dsh-session` exposes `appendPluginRecord(session, type, data)`
|
|
21
|
+
* for exactly this: an `ignorable` event under a `plugin:`-namespaced type that
|
|
22
|
+
* never enters the model-visible surface, is retained across fork/resume, and is
|
|
23
|
+
* skipped (not refused) by readers that do not know it. We append one record per
|
|
24
|
+
* scheduler write, so the projection can attribute the following
|
|
25
|
+
* `request/header` to the scheduler.
|
|
26
|
+
*
|
|
27
|
+
* ## Coupling rules
|
|
28
|
+
*
|
|
29
|
+
* - **Soft**: the host package is resolved with a dynamic `import()` at call
|
|
30
|
+
* time and every failure degrades to "no mark" (the projection then keeps its
|
|
31
|
+
* `unknown` attribution). A plugin must never take a turn down because an
|
|
32
|
+
* optional telemetry channel is missing (`agent-loop/README.md:128`).
|
|
33
|
+
* - **Never throws**: the caller is mid-turn; a rejected append would abort the
|
|
34
|
+
* step. All paths are wrapped.
|
|
35
|
+
* - **Probed once**: the first attempt logs whether the API was reachable, so a
|
|
36
|
+
* silent degradation is diagnosable from the host log instead of by guessing.
|
|
37
|
+
* @module dsh-thinking-levels/plugin-records
|
|
38
|
+
*/
|
|
39
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
40
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
41
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
42
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return path;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The record type. `plugin:` + slash-separated lowercase segments, per the
|
|
49
|
+
* host grammar (`PluginRecordType` in `dsh-session/types`).
|
|
50
|
+
*/
|
|
51
|
+
export const SCHEDULER_WRITE_RECORD = 'plugin:dsh-thinking-levels/scheduler-write';
|
|
52
|
+
/** Cached module namespace, so the dynamic import runs at most once per process. */
|
|
53
|
+
let recordsModule;
|
|
54
|
+
/** Whether the capability probe already ran (log once, not per request). */
|
|
55
|
+
let probed = false;
|
|
56
|
+
/** Whether the API is reachable; `undefined` until the first probe settles. */
|
|
57
|
+
let available;
|
|
58
|
+
/**
|
|
59
|
+
* Resolve the host session package and its `appendPluginRecord` export.
|
|
60
|
+
*
|
|
61
|
+
* The package is installation-scoped, so the host's runtime resolution answers
|
|
62
|
+
* it for any profile plugin (the plugin does not need it in its own
|
|
63
|
+
* `node_modules`, and does not declare it as a hard peer).
|
|
64
|
+
*
|
|
65
|
+
* The specifier is held in a variable on purpose: a literal
|
|
66
|
+
* `import('@deepseek-ai/dsh-session')` would make the package a hard
|
|
67
|
+
* compile-time dependency of this plugin, and it is deliberately optional —
|
|
68
|
+
* older hosts do not export the API at all, and the plugin must still install
|
|
69
|
+
* there. `tsc` therefore never type-checks the module's shape; the narrow
|
|
70
|
+
* structural interface below is the contract.
|
|
71
|
+
* @returns the append function, or undefined when unreachable.
|
|
72
|
+
*/
|
|
73
|
+
async function loadAppendPluginRecord() {
|
|
74
|
+
if (recordsModule !== undefined)
|
|
75
|
+
return recordsModule.appendPluginRecord;
|
|
76
|
+
try {
|
|
77
|
+
const specifier = '@deepseek-ai/dsh-session';
|
|
78
|
+
const namespace = await import(__rewriteRelativeImportExtension(/* @vite-ignore */ specifier));
|
|
79
|
+
recordsModule = namespace;
|
|
80
|
+
return typeof namespace.appendPluginRecord === 'function' ? namespace.appendPluginRecord : undefined;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// Unreachable on this host line: remember the miss so every later write
|
|
84
|
+
// short-circuits instead of retrying the import per step.
|
|
85
|
+
recordsModule = {};
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Append one scheduler-write mark to the session log.
|
|
91
|
+
*
|
|
92
|
+
* Best-effort by construction: an absent API, a non-appendable session, a
|
|
93
|
+
* rejected payload or a throwing host all resolve to `false` — never a
|
|
94
|
+
* rejection — because the caller is in the middle of a turn.
|
|
95
|
+
* @param session - the live Session the write applies to (`agent.session`).
|
|
96
|
+
* @param record - what was written.
|
|
97
|
+
* @param logger - optional host logger, used once for the capability probe.
|
|
98
|
+
* @returns whether the mark was committed.
|
|
99
|
+
*/
|
|
100
|
+
export async function markSchedulerWrite(session, record, logger) {
|
|
101
|
+
if (typeof session !== 'object' || session === null)
|
|
102
|
+
return false;
|
|
103
|
+
const append = await loadAppendPluginRecord();
|
|
104
|
+
if (!probed) {
|
|
105
|
+
probed = true;
|
|
106
|
+
available = append !== undefined;
|
|
107
|
+
// One line, at the first write: a silently unmarked trace is otherwise
|
|
108
|
+
// indistinguishable from a scheduler that never wrote anything. The log
|
|
109
|
+
// call is guarded — a hostile/throwing logger must not turn a best-effort
|
|
110
|
+
// mark into a rejected step.
|
|
111
|
+
const line = '[thinking-levels] plugin-record channel %s (scheduler-write marks)';
|
|
112
|
+
try {
|
|
113
|
+
if (append === undefined)
|
|
114
|
+
logger?.warn?.(line, 'unavailable — scheduler writes stay unmarked');
|
|
115
|
+
else
|
|
116
|
+
logger?.info?.(line, 'ready');
|
|
117
|
+
}
|
|
118
|
+
catch { /* diagnostics only */ }
|
|
119
|
+
}
|
|
120
|
+
if (append === undefined)
|
|
121
|
+
return false;
|
|
122
|
+
try {
|
|
123
|
+
append(session, SCHEDULER_WRITE_RECORD, {
|
|
124
|
+
...record.level === undefined ? {} : { level: record.level },
|
|
125
|
+
...record.clear === true ? { clear: true } : {},
|
|
126
|
+
...record.intent === undefined ? {} : { intent: record.intent },
|
|
127
|
+
...record.provider === undefined ? {} : { provider: record.provider },
|
|
128
|
+
...record.model === undefined ? {} : { model: record.model },
|
|
129
|
+
...record.applied === undefined ? {} : { applied: record.applied },
|
|
130
|
+
});
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
catch {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Read one committed event as a scheduler-write mark.
|
|
139
|
+
*
|
|
140
|
+
* Duck-typed on purpose: the projection folds raw events and must recognize the
|
|
141
|
+
* mark on any host line without importing host types.
|
|
142
|
+
* @param event - any committed session event.
|
|
143
|
+
* @returns the record payload, or undefined for any other event.
|
|
144
|
+
*/
|
|
145
|
+
export function schedulerWriteOf(event) {
|
|
146
|
+
if (typeof event !== 'object' || event === null)
|
|
147
|
+
return undefined;
|
|
148
|
+
const candidate = event;
|
|
149
|
+
if (candidate.type !== SCHEDULER_WRITE_RECORD)
|
|
150
|
+
return undefined;
|
|
151
|
+
const data = candidate.data;
|
|
152
|
+
if (typeof data !== 'object' || data === null)
|
|
153
|
+
return undefined;
|
|
154
|
+
const record = data;
|
|
155
|
+
const level = record['level'];
|
|
156
|
+
const clear = record['clear'];
|
|
157
|
+
const intent = record['intent'];
|
|
158
|
+
const provider = record['provider'];
|
|
159
|
+
const model = record['model'];
|
|
160
|
+
const applied = record['applied'];
|
|
161
|
+
return {
|
|
162
|
+
...typeof level === 'string' && level.length > 0 ? { level } : {},
|
|
163
|
+
...clear === true ? { clear: true } : {},
|
|
164
|
+
...typeof intent === 'string' ? { intent } : {},
|
|
165
|
+
...typeof provider === 'string' ? { provider } : {},
|
|
166
|
+
...typeof model === 'string' ? { model } : {},
|
|
167
|
+
...applied === 'step' || applied === 'next' ? { applied } : {},
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/** Whether the capability probe has run and what it found (diagnostics/tests). */
|
|
171
|
+
export function schedulerMarkChannel() {
|
|
172
|
+
if (available === undefined)
|
|
173
|
+
return 'unprobed';
|
|
174
|
+
return available ? 'ready' : 'unavailable';
|
|
175
|
+
}
|
|
176
|
+
/** Test seam: forget the cached module and probe state. */
|
|
177
|
+
export function resetSchedulerMarkChannel() {
|
|
178
|
+
recordsModule = undefined;
|
|
179
|
+
probed = false;
|
|
180
|
+
available = undefined;
|
|
181
|
+
}
|
package/package.json
CHANGED
|
@@ -1,155 +1,155 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-thinking-levels",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"publishConfig": {
|
|
5
|
-
"registry": "https://registry.npmjs.org",
|
|
6
|
-
"access": "public",
|
|
7
|
-
"tag": "latest"
|
|
8
|
-
},
|
|
9
|
-
"description": "DSH host plugin: thinking-level (reasoning_effort) control for dsh — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/drscrewdriver/dsh-thinking-levels.git"
|
|
13
|
-
},
|
|
14
|
-
"type": "module",
|
|
15
|
-
"files": [
|
|
16
|
-
"lib",
|
|
17
|
-
"cordis.patch.yml",
|
|
18
|
-
"dsh.plugin.json",
|
|
19
|
-
"README.md",
|
|
20
|
-
"README.zh.md",
|
|
21
|
-
"README.ja.md",
|
|
22
|
-
"README.ko.md",
|
|
23
|
-
"README.fr.md",
|
|
24
|
-
"README.de.md",
|
|
25
|
-
"README.it.md",
|
|
26
|
-
"README.ru.md",
|
|
27
|
-
"README.es.md",
|
|
28
|
-
"README.pt.md",
|
|
29
|
-
"INSTALL.md",
|
|
30
|
-
"INSTALL.zh.md",
|
|
31
|
-
"INSTALL.ja.md",
|
|
32
|
-
"INSTALL.ko.md",
|
|
33
|
-
"INSTALL.fr.md",
|
|
34
|
-
"INSTALL.de.md",
|
|
35
|
-
"INSTALL.it.md",
|
|
36
|
-
"INSTALL.ru.md",
|
|
37
|
-
"INSTALL.es.md",
|
|
38
|
-
"INSTALL.pt.md",
|
|
39
|
-
"CHANGELOG.md",
|
|
40
|
-
"CHANGELOG.ja.md",
|
|
41
|
-
"CHANGELOG.ko.md",
|
|
42
|
-
"CHANGELOG.fr.md",
|
|
43
|
-
"CHANGELOG.de.md",
|
|
44
|
-
"CHANGELOG.it.md",
|
|
45
|
-
"CHANGELOG.ru.md",
|
|
46
|
-
"CHANGELOG.es.md",
|
|
47
|
-
"CHANGELOG.pt.md",
|
|
48
|
-
"locale"
|
|
49
|
-
],
|
|
50
|
-
"main": "lib/index.js",
|
|
51
|
-
"types": "lib/index.d.ts",
|
|
52
|
-
"exports": {
|
|
53
|
-
".": {
|
|
54
|
-
"types": "./lib/index.d.ts",
|
|
55
|
-
"default": "./lib/index.js"
|
|
56
|
-
},
|
|
57
|
-
"./thinking-level": {
|
|
58
|
-
"types": "./lib/thinking-level.d.ts",
|
|
59
|
-
"default": "./lib/thinking-level.js"
|
|
60
|
-
},
|
|
61
|
-
"./client": {
|
|
62
|
-
"default": "./lib/client.js"
|
|
63
|
-
},
|
|
64
|
-
"./locale/*.json": "./locale/*.json",
|
|
65
|
-
"./package.json": "./package.json"
|
|
66
|
-
},
|
|
67
|
-
"engines": {
|
|
68
|
-
"node": ">=22.19.0 || >=24.0.0",
|
|
69
|
-
"dsh": ">=0.1.0-rc.8 <0.3.0-0"
|
|
70
|
-
},
|
|
71
|
-
"peerDependencies": {
|
|
72
|
-
"@deepseek-ai/cordis": "^4.0.1",
|
|
73
|
-
"@deepseek-ai/dsh-api-remotes": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
74
|
-
"@deepseek-ai/dsh-api-session-controller": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
75
|
-
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5"
|
|
80
|
-
},
|
|
81
|
-
"peerDependenciesMeta": {
|
|
82
|
-
"@deepseek-ai/dsh-api-remotes": {
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"@deepseek-ai/dsh-api-session-controller": {
|
|
86
|
-
"optional": true
|
|
87
|
-
},
|
|
88
|
-
"@deepseek-ai/dsh-client-locale": {
|
|
89
|
-
"optional": true
|
|
90
|
-
},
|
|
91
|
-
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
92
|
-
"optional": true
|
|
93
|
-
},
|
|
94
|
-
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
95
|
-
"optional": true
|
|
96
|
-
},
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-settings": {
|
|
98
|
-
"optional": true
|
|
99
|
-
},
|
|
100
|
-
"@deepseek-ai/dsh-client-ui-slots": {
|
|
101
|
-
"optional": true
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"dependencies": {
|
|
105
|
-
"@deepseek-ai/schemastery": "^3.18.4",
|
|
106
|
-
"zod": "^4.4.3"
|
|
107
|
-
},
|
|
108
|
-
"devDependencies": {
|
|
109
|
-
"@deepseek-ai/cordis": "^4.0.4",
|
|
110
|
-
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
111
|
-
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
112
|
-
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
113
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
114
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
115
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
116
|
-
"@deepseek-ai/schemastery": "^3.18.4",
|
|
117
|
-
"@eslint/js": "^10.0.1",
|
|
118
|
-
"@types/node": "^24.0.0",
|
|
119
|
-
"@types/react": "~18.3.1",
|
|
120
|
-
"eslint": "^10.8.1",
|
|
121
|
-
"react": "^18.2.0",
|
|
122
|
-
"react-test-renderer": "^18.3.1",
|
|
123
|
-
"tsdown": "^0.22.2",
|
|
124
|
-
"typescript": "^5.6.0",
|
|
125
|
-
"typescript-eslint": "^8.67.0",
|
|
126
|
-
"vitest": "^3.0.0"
|
|
127
|
-
},
|
|
128
|
-
"scripts": {
|
|
129
|
-
"build": "tsc -p tsconfig.build.json && tsdown",
|
|
130
|
-
"prepack": "npm run build",
|
|
131
|
-
"prepublishOnly": "npm run build",
|
|
132
|
-
"release:4x": "npm publish --tag dsh-0.2.0 --registry=https://registry.npmjs.org",
|
|
133
|
-
"typecheck": "tsc --noEmit",
|
|
134
|
-
"lint": "eslint src tests",
|
|
135
|
-
"test": "vitest run"
|
|
136
|
-
},
|
|
137
|
-
"license": "MIT",
|
|
138
|
-
"dsh": {
|
|
139
|
-
"bundle": {
|
|
140
|
-
"patch": "./cordis.patch.yml"
|
|
141
|
-
},
|
|
142
|
-
"client": {
|
|
143
|
-
"inject": [
|
|
144
|
-
"@deepseek-ai/dsh-api-remotes",
|
|
145
|
-
"@deepseek-ai/dsh-api-session-controller",
|
|
146
|
-
"@deepseek-ai/dsh-client-locale",
|
|
147
|
-
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
148
|
-
"@deepseek-ai/dsh-client-ui-renderer",
|
|
149
|
-
"@deepseek-ai/dsh-client-ui-settings",
|
|
150
|
-
"@deepseek-ai/dsh-client-ui-slots"
|
|
151
|
-
],
|
|
152
|
-
"platform": "web"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-thinking-levels",
|
|
3
|
+
"version": "4.7.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://registry.npmjs.org",
|
|
6
|
+
"access": "public",
|
|
7
|
+
"tag": "latest"
|
|
8
|
+
},
|
|
9
|
+
"description": "DSH host plugin: thinking-level (reasoning_effort) control for dsh — auto-adjust per tool round, with optional manual lock and per-tool timing telemetry.",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/drscrewdriver/dsh-thinking-levels.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"cordis.patch.yml",
|
|
18
|
+
"dsh.plugin.json",
|
|
19
|
+
"README.md",
|
|
20
|
+
"README.zh.md",
|
|
21
|
+
"README.ja.md",
|
|
22
|
+
"README.ko.md",
|
|
23
|
+
"README.fr.md",
|
|
24
|
+
"README.de.md",
|
|
25
|
+
"README.it.md",
|
|
26
|
+
"README.ru.md",
|
|
27
|
+
"README.es.md",
|
|
28
|
+
"README.pt.md",
|
|
29
|
+
"INSTALL.md",
|
|
30
|
+
"INSTALL.zh.md",
|
|
31
|
+
"INSTALL.ja.md",
|
|
32
|
+
"INSTALL.ko.md",
|
|
33
|
+
"INSTALL.fr.md",
|
|
34
|
+
"INSTALL.de.md",
|
|
35
|
+
"INSTALL.it.md",
|
|
36
|
+
"INSTALL.ru.md",
|
|
37
|
+
"INSTALL.es.md",
|
|
38
|
+
"INSTALL.pt.md",
|
|
39
|
+
"CHANGELOG.md",
|
|
40
|
+
"CHANGELOG.ja.md",
|
|
41
|
+
"CHANGELOG.ko.md",
|
|
42
|
+
"CHANGELOG.fr.md",
|
|
43
|
+
"CHANGELOG.de.md",
|
|
44
|
+
"CHANGELOG.it.md",
|
|
45
|
+
"CHANGELOG.ru.md",
|
|
46
|
+
"CHANGELOG.es.md",
|
|
47
|
+
"CHANGELOG.pt.md",
|
|
48
|
+
"locale"
|
|
49
|
+
],
|
|
50
|
+
"main": "lib/index.js",
|
|
51
|
+
"types": "lib/index.d.ts",
|
|
52
|
+
"exports": {
|
|
53
|
+
".": {
|
|
54
|
+
"types": "./lib/index.d.ts",
|
|
55
|
+
"default": "./lib/index.js"
|
|
56
|
+
},
|
|
57
|
+
"./thinking-level": {
|
|
58
|
+
"types": "./lib/thinking-level.d.ts",
|
|
59
|
+
"default": "./lib/thinking-level.js"
|
|
60
|
+
},
|
|
61
|
+
"./client": {
|
|
62
|
+
"default": "./lib/client.js"
|
|
63
|
+
},
|
|
64
|
+
"./locale/*.json": "./locale/*.json",
|
|
65
|
+
"./package.json": "./package.json"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=22.19.0 || >=24.0.0",
|
|
69
|
+
"dsh": ">=0.1.0-rc.8 <0.3.0-0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
73
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
74
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
75
|
+
"@deepseek-ai/dsh-client-locale": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2 || 0.2.1-rc.3 || 0.2.1-rc.4 || 0.2.1-rc.5 || 0.2.2-rc.1 || 0.2.2-rc.2 || 0.2.2-rc.3 || 0.2.2-rc.4 || 0.2.2-rc.5"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"@deepseek-ai/dsh-api-remotes": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"@deepseek-ai/dsh-api-session-controller": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"@deepseek-ai/dsh-client-locale": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-model-selection": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-renderer": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-settings": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"@deepseek-ai/dsh-client-ui-slots": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"dependencies": {
|
|
105
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
106
|
+
"zod": "^4.4.3"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
110
|
+
"@deepseek-ai/cosmokit": "^1.8.5",
|
|
111
|
+
"@deepseek-ai/dsh-client-locale": "0.2.1-rc.3",
|
|
112
|
+
"@deepseek-ai/dsh-client-store": "0.2.1-rc.3",
|
|
113
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.3",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.1-rc.3",
|
|
115
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.1-rc.3",
|
|
116
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
117
|
+
"@eslint/js": "^10.0.1",
|
|
118
|
+
"@types/node": "^24.0.0",
|
|
119
|
+
"@types/react": "~18.3.1",
|
|
120
|
+
"eslint": "^10.8.1",
|
|
121
|
+
"react": "^18.2.0",
|
|
122
|
+
"react-test-renderer": "^18.3.1",
|
|
123
|
+
"tsdown": "^0.22.2",
|
|
124
|
+
"typescript": "^5.6.0",
|
|
125
|
+
"typescript-eslint": "^8.67.0",
|
|
126
|
+
"vitest": "^3.0.0"
|
|
127
|
+
},
|
|
128
|
+
"scripts": {
|
|
129
|
+
"build": "tsc -p tsconfig.build.json && tsdown",
|
|
130
|
+
"prepack": "npm run build",
|
|
131
|
+
"prepublishOnly": "npm run build",
|
|
132
|
+
"release:4x": "npm publish --tag dsh-0.2.0 --registry=https://registry.npmjs.org",
|
|
133
|
+
"typecheck": "tsc --noEmit",
|
|
134
|
+
"lint": "eslint src tests",
|
|
135
|
+
"test": "vitest run"
|
|
136
|
+
},
|
|
137
|
+
"license": "MIT",
|
|
138
|
+
"dsh": {
|
|
139
|
+
"bundle": {
|
|
140
|
+
"patch": "./cordis.patch.yml"
|
|
141
|
+
},
|
|
142
|
+
"client": {
|
|
143
|
+
"inject": [
|
|
144
|
+
"@deepseek-ai/dsh-api-remotes",
|
|
145
|
+
"@deepseek-ai/dsh-api-session-controller",
|
|
146
|
+
"@deepseek-ai/dsh-client-locale",
|
|
147
|
+
"@deepseek-ai/dsh-client-ui-model-selection",
|
|
148
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
149
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
150
|
+
"@deepseek-ai/dsh-client-ui-slots"
|
|
151
|
+
],
|
|
152
|
+
"platform": "web"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|